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.
This commit is contained in:
parent
d48d611f99
commit
35cdd4619f
6
Makefile
6
Makefile
|
@ -15,12 +15,12 @@ GCC_CONFIG = $(COMMON_CONFIG) --enable-tls \
|
||||||
--disable-libmudflap --disable-libsanitizer \
|
--disable-libmudflap --disable-libsanitizer \
|
||||||
--disable-libquadmath --disable-decimal-float
|
--disable-libquadmath --disable-decimal-float
|
||||||
|
|
||||||
|
GCC0_VARS = CFLAGS="-O0 -g0" CXXFLAGS="-O0 -g0"
|
||||||
GCC0_CONFIG = $(GCC_CONFIG) \
|
GCC0_CONFIG = $(GCC_CONFIG) \
|
||||||
--with-newlib --disable-libssp --disable-threads \
|
--with-newlib --disable-libssp --disable-threads \
|
||||||
--disable-shared --disable-libgomp --disable-libatomic \
|
--disable-shared --disable-libgomp --disable-libatomic \
|
||||||
--disable-libquadmath --disable-decimal-float --disable-nls \
|
--disable-libquadmath --disable-decimal-float --disable-nls \
|
||||||
--enable-languages=c \
|
--enable-languages=c
|
||||||
CFLAGS="-O0 -g0" CXXFLAGS="-O0 -g0"
|
|
||||||
|
|
||||||
GCC0_BDIR = $(PWD)/gcc-$(GCC_VER)/build0/gcc
|
GCC0_BDIR = $(PWD)/gcc-$(GCC_VER)/build0/gcc
|
||||||
GCC0_CC = $(GCC0_BDIR)/xgcc -B $(GCC0_BDIR)
|
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
|
steps/configure_gcc0: steps/extract_gcc
|
||||||
mkdir -p gcc-$(GCC_VER)/build0
|
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 $@
|
touch $@
|
||||||
|
|
||||||
steps/build_gcc0: steps/configure_gcc0
|
steps/build_gcc0: steps/configure_gcc0
|
||||||
|
|
Loading…
Reference in New Issue