From 39601dd1742e6f7f48f0e0addecd872883089845 Mon Sep 17 00:00:00 2001 From: Brandon Wright Date: Sun, 6 May 2018 20:00:42 -0500 Subject: [PATCH] unix: Don't remove compiler flags for no reason, and put user flags at the end so as to overwrite Snes9x's. --- unix/configure | 14 +------------- unix/configure.ac | 14 +------------- 2 files changed, 2 insertions(+), 26 deletions(-) diff --git a/unix/configure b/unix/configure index 5c6a396c..ce2b6a78 100755 --- a/unix/configure +++ b/unix/configure @@ -3424,18 +3424,6 @@ S9XLIBS="" # *** Execution begins here *** # ***************************** -# Remove -g and -O2 flags manually. - -if test "x$CFLAGS" != "x"; then - CFLAGS="`echo \"$CFLAGS\" | sed -e 's/-g//'`" - CFLAGS="`echo \"$CFLAGS\" | sed -e 's/-O2//'`" -fi - -if test "x$CXXFLAGS" != "x"; then - CXXFLAGS="`echo \"$CXXFLAGS\" | sed -e 's/-g//'`" - CXXFLAGS="`echo \"$CXXFLAGS\" | sed -e 's/-O2//'`" -fi - # Test what compiler flags we should use. # Check whether --enable-debug was given. @@ -6310,7 +6298,7 @@ S9XDEFS="$S9XDEFS -DGFX_MULTI_FORMAT" # Output. -S9XFLGS="$CXXFLAGS $CPPFLAGS $LDFLAGS $S9XFLGS" +S9XFLGS="$S9XFLGS $CXXFLAGS $CPPFLAGS $LDFLAGS" S9XLIBS="$LIBS $S9XLIBS" S9XFLGS="`echo \"$S9XFLGS\" | sed -e 's/ */ /g'`" diff --git a/unix/configure.ac b/unix/configure.ac index 13434673..e8a834d3 100644 --- a/unix/configure.ac +++ b/unix/configure.ac @@ -56,18 +56,6 @@ AC_DEFUN([AC_S9X_COMPILER_FLAG], # *** Execution begins here *** # ***************************** -# Remove -g and -O2 flags manually. - -if test "x$CFLAGS" != "x"; then - CFLAGS="`echo \"$CFLAGS\" | sed -e 's/-g//'`" - CFLAGS="`echo \"$CFLAGS\" | sed -e 's/-O2//'`" -fi - -if test "x$CXXFLAGS" != "x"; then - CXXFLAGS="`echo \"$CXXFLAGS\" | sed -e 's/-g//'`" - CXXFLAGS="`echo \"$CXXFLAGS\" | sed -e 's/-O2//'`" -fi - # Test what compiler flags we should use. AC_ARG_ENABLE([debug], @@ -450,7 +438,7 @@ S9XDEFS="$S9XDEFS -DGFX_MULTI_FORMAT" # Output. -S9XFLGS="$CXXFLAGS $CPPFLAGS $LDFLAGS $S9XFLGS" +S9XFLGS="$S9XFLGS $CXXFLAGS $CPPFLAGS $LDFLAGS" S9XLIBS="$LIBS $S9XLIBS" S9XFLGS="`echo \"$S9XFLGS\" | sed -e 's/ */ /g'`"