Alexandre Julliard : configure: Allow specifying different CFLAGS for the cross compiler.

Alexandre Julliard julliard at winehq.org
Mon Jul 10 15:52:44 CDT 2017


Module: wine
Branch: master
Commit: 40b7091ec578d99cd187e2949b83c3b1b76367fe
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=40b7091ec578d99cd187e2949b83c3b1b76367fe

Author: Alexandre Julliard <julliard at winehq.org>
Date:   Sat Jul  8 11:20:21 2017 +0200

configure: Allow specifying different CFLAGS for the cross compiler.

Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 Makefile.in     | 1 +
 configure       | 3 +++
 configure.ac    | 1 +
 tools/makedep.c | 2 +-
 4 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/Makefile.in b/Makefile.in
index 22b2ae7..6f1af8c 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -43,6 +43,7 @@ CPPBIN          = @CPPBIN@
 CROSSCC         = @CROSSCC@
 CFLAGS          = @CFLAGS@
 CPPFLAGS        = @CPPFLAGS@
+CROSSCFLAGS     = @CROSSCFLAGS@
 EXTRACFLAGS     = @EXTRACFLAGS@
 MSVCRTFLAGS     = @BUILTINFLAG@
 TARGETFLAGS     = @TARGETFLAGS@
diff --git a/configure b/configure
index 9858031..c421baf 100755
--- a/configure
+++ b/configure
@@ -690,6 +690,7 @@ X_PRE_LIBS
 X_CFLAGS
 XMKMF
 PTHREAD_LIBS
+CROSSCFLAGS
 CROSSCC
 CROSSTARGET
 PRELINK
@@ -9105,6 +9106,8 @@ $as_echo "no" >&6; }
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
         CC="$ac_save_CC"
+        CROSSCFLAGS=${CROSSCFLAGS:-$CFLAGS}
+
     fi
 fi
 
diff --git a/configure.ac b/configure.ac
index d8309ea..23937f1 100644
--- a/configure.ac
+++ b/configure.ac
@@ -983,6 +983,7 @@ then
                            done],
                           [AC_MSG_RESULT([no])])
         CC="$ac_save_CC"
+        AC_SUBST(CROSSCFLAGS,${CROSSCFLAGS:-$CFLAGS})
     fi
 fi
 
diff --git a/tools/makedep.c b/tools/makedep.c
index add722f..fe670af 100644
--- a/tools/makedep.c
+++ b/tools/makedep.c
@@ -2669,7 +2669,7 @@ static struct strarray output_sources( const struct makefile *make )
                 if (make->use_msvcrt) output_filenames( msvcrt_flags );
                 output_filename( "-DWINE_CROSSTEST" );
                 output_filenames( cpp_flags );
-                output_filename( "$(CFLAGS)" );
+                output_filename( "$(CROSSCFLAGS)" );
                 output( "\n" );
             }
             if (make->testdll && !strcmp( ext, "c" ) && !(source->file->flags & FLAG_GENERATED))




More information about the wine-cvs mailing list