From 892ca3199bd1724dfcac13fd7cd89dc0a4e44d4f Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Wed, 13 Jan 2010 02:07:59 -0800 Subject: gcc-svn: Port gcc-flags-for-build patch for getting cross native build going. Signed-off-by: Khem Raj --- recipes/gcc/gcc-svn.inc | 1 + recipes/gcc/gcc-svn/gcc-flags-for-build.patch | 178 ++++++++++++++++++++++++++ 2 files changed, 179 insertions(+) create mode 100644 recipes/gcc/gcc-svn/gcc-flags-for-build.patch diff --git a/recipes/gcc/gcc-svn.inc b/recipes/gcc/gcc-svn.inc index 8d7dec0e9d..8d02fceb79 100644 --- a/recipes/gcc/gcc-svn.inc +++ b/recipes/gcc/gcc-svn.inc @@ -17,6 +17,7 @@ SRC_URI = "svn://gcc.gnu.org/svn/gcc;module=trunk \ file://100-uclibc-conf.patch;patch=1 \ file://gcc-uclibc-locale-ctype_touplow_t.patch;patch=1 \ file://cache-amnesia.patch;patch=1 \ + file://gcc-flags-for-build.patch;patch=1 \ " # Language Overrides diff --git a/recipes/gcc/gcc-svn/gcc-flags-for-build.patch b/recipes/gcc/gcc-svn/gcc-flags-for-build.patch new file mode 100644 index 0000000000..98b3ecf2e1 --- /dev/null +++ b/recipes/gcc/gcc-svn/gcc-flags-for-build.patch @@ -0,0 +1,178 @@ +Index: gcc-4.5+svnr155680/Makefile.def +=================================================================== +--- gcc-4.5+svnr155680.orig/Makefile.def 2010-01-13 01:02:22.627540169 -0800 ++++ gcc-4.5+svnr155680/Makefile.def 2010-01-13 01:05:24.260056951 -0800 +@@ -240,6 +240,7 @@ flags_to_pass = { flag= AWK ; }; + flags_to_pass = { flag= BISON ; }; + flags_to_pass = { flag= CC_FOR_BUILD ; }; + flags_to_pass = { flag= CFLAGS_FOR_BUILD ; }; ++flags_to_pass = { flag= CPPFLAGS_FOR_BUILD ; }; + flags_to_pass = { flag= CXX_FOR_BUILD ; }; + flags_to_pass = { flag= EXPECT ; }; + flags_to_pass = { flag= FLEX ; }; +Index: gcc-4.5+svnr155680/gcc/Makefile.in +=================================================================== +--- gcc-4.5+svnr155680.orig/gcc/Makefile.in 2010-01-13 01:02:22.675542832 -0800 ++++ gcc-4.5+svnr155680/gcc/Makefile.in 2010-01-13 01:05:24.264047000 -0800 +@@ -755,7 +755,7 @@ BUILD_LINKERFLAGS = $(BUILD_CFLAGS) + + # Native linker and preprocessor flags. For x-fragment overrides. + BUILD_LDFLAGS=@BUILD_LDFLAGS@ +-BUILD_CPPFLAGS=$(ALL_CPPFLAGS) ++BUILD_CPPFLAGS=$(INCLUDES) @BUILD_CPPFLAGS@ $(X_CPPFLAGS) + + # Actual name to use when installing a native compiler. + GCC_INSTALL_NAME := $(shell echo gcc|sed '$(program_transform_name)') +Index: gcc-4.5+svnr155680/gcc/configure.ac +=================================================================== +--- gcc-4.5+svnr155680.orig/gcc/configure.ac 2010-01-13 01:02:22.687541624 -0800 ++++ gcc-4.5+svnr155680/gcc/configure.ac 2010-01-13 01:06:55.711583352 -0800 +@@ -1774,16 +1774,18 @@ AC_SUBST(inhibit_libc) + # Also, we cannot run fixincludes. + + # These are the normal (build=host) settings: +-CC_FOR_BUILD='$(CC)' AC_SUBST(CC_FOR_BUILD) +-BUILD_CFLAGS='$(ALL_CFLAGS)' AC_SUBST(BUILD_CFLAGS) +-BUILD_LDFLAGS='$(LDFLAGS)' AC_SUBST(BUILD_LDFLAGS) +-STMP_FIXINC=stmp-fixinc AC_SUBST(STMP_FIXINC) ++CC_FOR_BUILD='$(CC)' AC_SUBST(CC_FOR_BUILD) ++BUILD_CFLAGS='$(ALL_CFLAGS)' AC_SUBST(BUILD_CFLAGS) ++BUILD_LDFLAGS='$(LDFLAGS)' AC_SUBST(BUILD_LDFLAGS) ++BUILD_CPPFLAGS='$(ALL_CPPFLAGS)' AC_SUBST(BUILD_CPPFLAGS) ++STMP_FIXINC=stmp-fixinc AC_SUBST(STMP_FIXINC) + + # And these apply if build != host, or we are generating coverage data + if test x$build != x$host || test "x$coverage_flags" != x + then + BUILD_CFLAGS='$(INTERNAL_CFLAGS) $(T_CFLAGS) $(CFLAGS_FOR_BUILD)' + BUILD_LDFLAGS='$(LDFLAGS_FOR_BUILD)' ++ BUILD_CPPFLAGS='$(CPPFLAGS_FOR_BUILD)' + fi + + # Expand extra_headers to include complete path. +Index: gcc-4.5+svnr155680/Makefile.in +=================================================================== +--- gcc-4.5+svnr155680.orig/Makefile.in 2010-01-13 01:02:22.639539865 -0800 ++++ gcc-4.5+svnr155680/Makefile.in 2010-01-13 01:05:24.288038715 -0800 +@@ -328,6 +328,7 @@ AR_FOR_BUILD = @AR_FOR_BUILD@ + AS_FOR_BUILD = @AS_FOR_BUILD@ + CC_FOR_BUILD = @CC_FOR_BUILD@ + CFLAGS_FOR_BUILD = @CFLAGS_FOR_BUILD@ ++CPPFLAGS_FOR_BUILD = @CPPFLAGS_FOR_BUILD@ + CXXFLAGS_FOR_BUILD = @CXXFLAGS_FOR_BUILD@ + CXX_FOR_BUILD = @CXX_FOR_BUILD@ + DLLTOOL_FOR_BUILD = @DLLTOOL_FOR_BUILD@ +@@ -657,6 +658,7 @@ BASE_FLAGS_TO_PASS = \ + "BISON=$(BISON)" \ + "CC_FOR_BUILD=$(CC_FOR_BUILD)" \ + "CFLAGS_FOR_BUILD=$(CFLAGS_FOR_BUILD)" \ ++ "CPPFLAGS_FOR_BUILD=$(CPPFLAGS_FOR_BUILD)" \ + "CXX_FOR_BUILD=$(CXX_FOR_BUILD)" \ + "EXPECT=$(EXPECT)" \ + "FLEX=$(FLEX)" \ +Index: gcc-4.5+svnr155680/gcc/configure +=================================================================== +--- gcc-4.5+svnr155680.orig/gcc/configure 2010-01-13 01:02:22.663539713 -0800 ++++ gcc-4.5+svnr155680/gcc/configure 2010-01-13 01:07:24.315537016 -0800 +@@ -705,6 +705,7 @@ SED + LIBTOOL + collect2 + STMP_FIXINC ++BUILD_CPPFLAGS + BUILD_LDFLAGS + BUILD_CFLAGS + CC_FOR_BUILD +@@ -10911,6 +10912,7 @@ fi + CC_FOR_BUILD='$(CC)' + BUILD_CFLAGS='$(ALL_CFLAGS)' + BUILD_LDFLAGS='$(LDFLAGS)' ++BUILD_CPPFLAGS='$(ALL_CPPFLAGS)' + STMP_FIXINC=stmp-fixinc + + # And these apply if build != host, or we are generating coverage data +@@ -10918,6 +10920,7 @@ if test x$build != x$host || test "x$cov + then + BUILD_CFLAGS='$(INTERNAL_CFLAGS) $(T_CFLAGS) $(CFLAGS_FOR_BUILD)' + BUILD_LDFLAGS='$(LDFLAGS_FOR_BUILD)' ++ BUILD_CPPFLAGS='$(CPPFLAGS_FOR_BUILD)' + fi + + # Expand extra_headers to include complete path. +@@ -17037,7 +17040,7 @@ else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <<_LT_EOF +-#line 17040 "configure" ++#line 17043 "configure" + #include "confdefs.h" + + #if HAVE_DLFCN_H +@@ -17143,7 +17146,7 @@ else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <<_LT_EOF +-#line 17146 "configure" ++#line 17149 "configure" + #include "confdefs.h" + + #if HAVE_DLFCN_H +Index: gcc-4.5+svnr155680/Makefile.tpl +=================================================================== +--- gcc-4.5+svnr155680.orig/Makefile.tpl 2010-01-13 01:02:22.603540396 -0800 ++++ gcc-4.5+svnr155680/Makefile.tpl 2010-01-13 01:05:24.332038114 -0800 +@@ -331,6 +331,7 @@ AR_FOR_BUILD = @AR_FOR_BUILD@ + AS_FOR_BUILD = @AS_FOR_BUILD@ + CC_FOR_BUILD = @CC_FOR_BUILD@ + CFLAGS_FOR_BUILD = @CFLAGS_FOR_BUILD@ ++CPPFLAGS_FOR_BUILD = @CPPFLAGS_FOR_BUILD@ + CXXFLAGS_FOR_BUILD = @CXXFLAGS_FOR_BUILD@ + CXX_FOR_BUILD = @CXX_FOR_BUILD@ + DLLTOOL_FOR_BUILD = @DLLTOOL_FOR_BUILD@ +Index: gcc-4.5+svnr155680/configure +=================================================================== +--- gcc-4.5+svnr155680.orig/configure 2010-01-13 01:02:22.615539634 -0800 ++++ gcc-4.5+svnr155680/configure 2010-01-13 01:07:18.940037187 -0800 +@@ -651,6 +651,7 @@ GCJ_FOR_BUILD + DLLTOOL_FOR_BUILD + CXX_FOR_BUILD + CXXFLAGS_FOR_BUILD ++CPPFLAGS_FOR_BUILD + CFLAGS_FOR_BUILD + CC_FOR_BUILD + AS_FOR_BUILD +@@ -7862,6 +7863,7 @@ esac + # our build compiler if desired. + if test x"${build}" = x"${host}" ; then + CFLAGS_FOR_BUILD=${CFLAGS_FOR_BUILD-${CFLAGS}} ++ CPPFLAGS_FOR_BUILD=${CPPFLAGS_FOR_BUILD-${CPPFLAGS}} + CXXFLAGS_FOR_BUILD=${CXXFLAGS_FOR_BUILD-${CXXFLAGS}} + LDFLAGS_FOR_BUILD=${LDFLAGS_FOR_BUILD-${LDFLAGS}} + fi +@@ -7940,6 +7942,7 @@ done + + + ++ + # Generate default definitions for YACC, M4, LEX and other programs that run + # on the build machine. These are used if the Makefile can't locate these + # programs in objdir. +Index: gcc-4.5+svnr155680/configure.ac +=================================================================== +--- gcc-4.5+svnr155680.orig/configure.ac 2010-01-13 01:02:22.651540130 -0800 ++++ gcc-4.5+svnr155680/configure.ac 2010-01-13 01:05:24.340037763 -0800 +@@ -3022,6 +3022,7 @@ esac + # our build compiler if desired. + if test x"${build}" = x"${host}" ; then + CFLAGS_FOR_BUILD=${CFLAGS_FOR_BUILD-${CFLAGS}} ++ CPPFLAGS_FOR_BUILD=${CPPFLAGS_FOR_BUILD-${CPPFLAGS}} + CXXFLAGS_FOR_BUILD=${CXXFLAGS_FOR_BUILD-${CXXFLAGS}} + LDFLAGS_FOR_BUILD=${LDFLAGS_FOR_BUILD-${LDFLAGS}} + fi +@@ -3087,6 +3088,7 @@ AC_SUBST(AR_FOR_BUILD) + AC_SUBST(AS_FOR_BUILD) + AC_SUBST(CC_FOR_BUILD) + AC_SUBST(CFLAGS_FOR_BUILD) ++AC_SUBST(CPPFLAGS_FOR_BUILD) + AC_SUBST(CXXFLAGS_FOR_BUILD) + AC_SUBST(CXX_FOR_BUILD) + AC_SUBST(DLLTOOL_FOR_BUILD) -- cgit v1.2.3