You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gentoo-overlay/games-emulation/snes9x/files/snes9x-1.61-libretro-flags....

26 lines
693 B

CXXFLAGS is used as a "common" flags variable and passed to CFLAGS,
but want to use user's CFLAGS for CC rather than CXXFLAGS. Workaround
with a temporary variable and also drop -O3/lto from defaults.
--- a/libretro/Makefile
+++ b/libretro/Makefile
@@ -4,3 +4,5 @@
-LTO ?= -flto
+LTO :=
+ORIG_CXXFLAGS := $(CXXFLAGS)
+CXXFLAGS :=
SPACE :=
@@ -580,4 +582,4 @@
else
- CFLAGS += -O3 -DNDEBUG
- CXXFLAGS += -O3 -DNDEBUG
+ CFLAGS += -DNDEBUG
+ CXXFLAGS += -DNDEBUG
endif
@@ -612,3 +614,4 @@
CXXFLAGS += -DRIGHTSHIFT_IS_SAR -D__LIBRETRO__ -DALLOW_CPU_OVERCLOCK
-CFLAGS := $(CXXFLAGS)
+CFLAGS := $(CXXFLAGS) $(CFLAGS)
+CXXFLAGS += $(ORIG_CXXFLAGS)
CFLAGS += -DHAVE_STDINT_H