From 35cdd4619f991e7496cf303ee1cb181f11ba5680 Mon Sep 17 00:00:00 2001 From: Rich Felker Date: Fri, 6 Nov 2015 00:46:00 +0000 Subject: [PATCH] pass CFLAGS to gcc configure as env vars, not on command line old versions of gcc, such as 4.2.1 which I'm in the process of adding support for, have broken configure scripts that do not accept variables on the command line and instead interpret them as the target name. the easiest solution is just passing these in the environment. --- Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 6b2af9b..e4f595a 100644 --- a/Makefile +++ b/Makefile @@ -15,12 +15,12 @@ GCC_CONFIG = $(COMMON_CONFIG) --enable-tls \ --disable-libmudflap --disable-libsanitizer \ --disable-libquadmath --disable-decimal-float +GCC0_VARS = CFLAGS="-O0 -g0" CXXFLAGS="-O0 -g0" GCC0_CONFIG = $(GCC_CONFIG) \ --with-newlib --disable-libssp --disable-threads \ --disable-shared --disable-libgomp --disable-libatomic \ --disable-libquadmath --disable-decimal-float --disable-nls \ - --enable-languages=c \ - CFLAGS="-O0 -g0" CXXFLAGS="-O0 -g0" + --enable-languages=c GCC0_BDIR = $(PWD)/gcc-$(GCC_VER)/build0/gcc GCC0_CC = $(GCC0_BDIR)/xgcc -B $(GCC0_BDIR) @@ -86,7 +86,7 @@ steps/extract_gcc: sources/gcc-$(GCC_VER).tar.bz2 sources/config.sub steps/configure_gcc0: steps/extract_gcc mkdir -p gcc-$(GCC_VER)/build0 - test -e gcc-$(GCC_VER)/build0/config.status || ( cd gcc-$(GCC_VER)/build0 && ../configure $(GCC0_CONFIG) ) + test -e gcc-$(GCC_VER)/build0/config.status || ( cd gcc-$(GCC_VER)/build0 && $(GCC0_VARS) ../configure $(GCC0_CONFIG) ) touch $@ steps/build_gcc0: steps/configure_gcc0