···1-diff --git a/libada/Makefile.in b/libada/Makefile.in
2-index f5057a0..337e0c6 100644
3---- a/libada/Makefile.in
4-+++ b/libada/Makefile.in
5-@@ -55,7 +55,7 @@ GCC_WARN_CFLAGS = $(LOOSE_WARN)
6- WARN_CFLAGS = @warn_cflags@
7-8- TARGET_LIBGCC2_CFLAGS=
9--GNATLIBCFLAGS= -g -O2
10-+GNATLIBCFLAGS= -g -O2 $(CFLAGS)
11- GNATLIBCFLAGS_FOR_C = $(GNATLIBCFLAGS) $(TARGET_LIBGCC2_CFLAGS) -fexceptions \
12- -DIN_RTS @have_getipinfo@
13-14---- a/gcc/ada/gcc-interface/Makefile.in
15-+++ b/gcc/ada/gcc-interface/Makefile.in
16-@@ -105,7 +105,7 @@ ADAFLAGS = -W -Wall -gnatpg -gnata
17- SOME_ADAFLAGS =-gnata
18- FORCE_DEBUG_ADAFLAGS = -g
19- GNATLIBFLAGS = -gnatpg -nostdinc
20--GNATLIBCFLAGS = -g -O2
21-+GNATLIBCFLAGS = -g -O2 $(CFLAGS_FOR_TARGET)
22- # Pretend that _Unwind_GetIPInfo is available for the target by default. This
23- # should be autodetected during the configuration of libada and passed down to
24- # here, but we need something for --disable-libada and hope for the best.
25-@@ -193,7 +193,7 @@ RTSDIR = rts$(subst /,_,$(MULTISUBDIR))
26- # Link flags used to build gnat tools. By default we prefer to statically
27- # link with libgcc to avoid a dependency on shared libgcc (which is tricky
28- # to deal with as it may conflict with the libgcc provided by the system).
29--GCC_LINK_FLAGS=-static-libgcc
30-+GCC_LINK_FLAGS=-static-libgcc $(CFLAGS_FOR_TARGET)
31-32- # End of variables for you to override.
33-
···1-This patch fixes interaction with Libtool.
2-See <http://thread.gmane.org/gmane.comp.gcc.patches/258777>, for details.
3-4---- a/gcc/fortran/gfortranspec.c
5-+++ b/gcc/fortran/gfortranspec.c
6-@@ -461,8 +461,15 @@ For more information about these matters, see the file named COPYING\n\n"));
7- {
8- fprintf (stderr, _("Driving:"));
9- for (i = 0; i < g77_newargc; i++)
10-+ {
11-+ if (g77_new_decoded_options[i].opt_index == OPT_l)
12-+ /* Make sure no white space is inserted after `-l'. */
13-+ fprintf (stderr, " -l%s",
14-+ g77_new_decoded_options[i].canonical_option[1]);
15-+ else
16- fprintf (stderr, " %s",
17- g77_new_decoded_options[i].orig_option_with_args_text);
18-+ }
19- fprintf (stderr, "\n");
20- }
···1-diff --git a/libada/Makefile.in b/libada/Makefile.in
2-index f5057a0..337e0c6 100644
3---- a/libada/Makefile.in
4-+++ b/libada/Makefile.in
5-@@ -55,7 +55,7 @@ GCC_WARN_CFLAGS = $(LOOSE_WARN)
6- WARN_CFLAGS = @warn_cflags@
7-8- TARGET_LIBGCC2_CFLAGS=
9--GNATLIBCFLAGS= -g -O2
10-+GNATLIBCFLAGS= -g -O2 $(CFLAGS)
11- GNATLIBCFLAGS_FOR_C = $(GNATLIBCFLAGS) $(TARGET_LIBGCC2_CFLAGS) -fexceptions \
12- -DIN_RTS @have_getipinfo@
13-14---- a/gcc/ada/gcc-interface/Makefile.in
15-+++ b/gcc/ada/gcc-interface/Makefile.in
16-@@ -105,7 +105,7 @@ ADAFLAGS = -W -Wall -gnatpg -gnata
17- SOME_ADAFLAGS =-gnata
18- FORCE_DEBUG_ADAFLAGS = -g
19- GNATLIBFLAGS = -gnatpg -nostdinc
20--GNATLIBCFLAGS = -g -O2
21-+GNATLIBCFLAGS = -g -O2 $(CFLAGS_FOR_TARGET)
22- # Pretend that _Unwind_GetIPInfo is available for the target by default. This
23- # should be autodetected during the configuration of libada and passed down to
24- # here, but we need something for --disable-libada and hope for the best.
25-@@ -193,7 +193,7 @@ RTSDIR = rts$(subst /,_,$(MULTISUBDIR))
26- # Link flags used to build gnat tools. By default we prefer to statically
27- # link with libgcc to avoid a dependency on shared libgcc (which is tricky
28- # to deal with as it may conflict with the libgcc provided by the system).
29--GCC_LINK_FLAGS=-static-libgcc
30-+GCC_LINK_FLAGS=-static-libgcc $(CFLAGS_FOR_TARGET)
31-32- # End of variables for you to override.
33-
···1-Patch to make the target libraries 'configure' scripts find the proper CPP.
2-I noticed that building the mingw32 cross compiler.
3-Looking at the build script for mingw in archlinux, I think that only nixos
4-needs this patch. I don't know why.
5-diff --git a/Makefile.in b/Makefile.in
6-index 93f66b6..d691917 100644
7---- a/Makefile.in
8-+++ b/Makefile.in
9-@@ -266,6 +266,7 @@ BASE_TARGET_EXPORTS = \
10- AR="$(AR_FOR_TARGET)"; export AR; \
11- AS="$(COMPILER_AS_FOR_TARGET)"; export AS; \
12- CC="$(CC_FOR_TARGET) $(XGCC_FLAGS_FOR_TARGET) $$TFLAGS"; export CC; \
13-+ CPP="$(CC_FOR_TARGET) $(XGCC_FLAGS_FOR_TARGET) $$TFLAGS -E"; export CC; \
14- CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \
15- CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
16- CPPFLAGS="$(CPPFLAGS_FOR_TARGET)"; export CPPFLAGS; \
17-@@ -291,11 +292,13 @@ BASE_TARGET_EXPORTS = \
18- RAW_CXX_TARGET_EXPORTS = \
19- $(BASE_TARGET_EXPORTS) \
20- CXX_FOR_TARGET="$(RAW_CXX_FOR_TARGET)"; export CXX_FOR_TARGET; \
21-- CXX="$(RAW_CXX_FOR_TARGET) $(XGCC_FLAGS_FOR_TARGET) $$TFLAGS"; export CXX;
22-+ CXX="$(RAW_CXX_FOR_TARGET) $(XGCC_FLAGS_FOR_TARGET) $$TFLAGS"; export CXX; \
23-+ CXXCPP="$(RAW_CXX_FOR_TARGET) $(XGCC_FLAGS_FOR_TARGET) $$TFLAGS -E"; export CXX;
24-25- NORMAL_TARGET_EXPORTS = \
26- $(BASE_TARGET_EXPORTS) \
27-- CXX="$(CXX_FOR_TARGET) $(XGCC_FLAGS_FOR_TARGET) $$TFLAGS"; export CXX;
28-+ CXX="$(CXX_FOR_TARGET) $(XGCC_FLAGS_FOR_TARGET) $$TFLAGS"; export CXX; \
29-+ CXXCPP="$(CXX_FOR_TARGET) $(XGCC_FLAGS_FOR_TARGET) $$TFLAGS -E"; export CXX;
30-31- # Where to find GMP
32- HOST_GMPLIBS = @gmplibs@
···00000000000000000000000000000000
-255
pkgs/development/compilers/gcc/4.8/builder.sh
···1-source $stdenv/setup
2-3-4-export NIX_FIXINC_DUMMY=$NIX_BUILD_TOP/dummy
5-mkdir $NIX_FIXINC_DUMMY
6-7-8-if test "$staticCompiler" = "1"; then
9- EXTRA_LDFLAGS="-static"
10-else
11- EXTRA_LDFLAGS=""
12-fi
13-14-# GCC interprets empty paths as ".", which we don't want.
15-if test -z "$CPATH"; then unset CPATH; fi
16-if test -z "$LIBRARY_PATH"; then unset LIBRARY_PATH; fi
17-echo "\$CPATH is \`$CPATH'"
18-echo "\$LIBRARY_PATH is \`$LIBRARY_PATH'"
19-20-if test "$noSysDirs" = "1"; then
21-22- if test -e $NIX_CC/nix-support/orig-libc; then
23-24- # Figure out what extra flags to pass to the gcc compilers
25- # being generated to make sure that they use our glibc.
26- extraFlags="$(cat $NIX_CC/nix-support/libc-cflags)"
27- extraLDFlags="$(cat $NIX_CC/nix-support/libc-ldflags) $(cat $NIX_CC/nix-support/libc-ldflags-before)"
28-29- # Use *real* header files, otherwise a limits.h is generated
30- # that does not include Glibc's limits.h (notably missing
31- # SSIZE_MAX, which breaks the build).
32- export NIX_FIXINC_DUMMY=$(cat $NIX_CC/nix-support/orig-libc)/include
33-34- # The path to the Glibc binaries such as `crti.o'.
35- glibc_libdir="$(cat $NIX_CC/nix-support/orig-libc)/lib"
36-37- else
38- # Hack: support impure environments.
39- extraFlags="-isystem /usr/include"
40- extraLDFlags="-L/usr/lib64 -L/usr/lib"
41- glibc_libdir="/usr/lib"
42- export NIX_FIXINC_DUMMY=/usr/include
43- fi
44-45- extraFlags="-I$NIX_FIXINC_DUMMY $extraFlags"
46- extraLDFlags="-L$glibc_libdir -rpath $glibc_libdir $extraLDFlags"
47-48- # BOOT_CFLAGS defaults to `-g -O2'; since we override it below,
49- # make sure to explictly add them so that files compiled with the
50- # bootstrap compiler are optimized and (optionally) contain
51- # debugging information (info "(gccinstall) Building").
52- if test -n "$dontStrip"; then
53- extraFlags="-O2 -g $extraFlags"
54- else
55- # Don't pass `-g' at all; this saves space while building.
56- extraFlags="-O2 $extraFlags"
57- fi
58-59- EXTRA_FLAGS="$extraFlags"
60- for i in $extraLDFlags; do
61- EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,$i"
62- done
63-64- if test -n "$targetConfig"; then
65- # Cross-compiling, we need gcc not to read ./specs in order to build
66- # the g++ compiler (after the specs for the cross-gcc are created).
67- # Having LIBRARY_PATH= makes gcc read the specs from ., and the build
68- # breaks. Having this variable comes from the default.nix code to bring
69- # gcj in.
70- unset LIBRARY_PATH
71- unset CPATH
72- if test -z "$crossStageStatic"; then
73- EXTRA_TARGET_CFLAGS="-B${libcCross}/lib -idirafter ${libcCross}/include"
74- EXTRA_TARGET_LDFLAGS="-Wl,-L${libcCross}/lib -Wl,-rpath,${libcCross}/lib -Wl,-rpath-link,${libcCross}/lib"
75- fi
76- else
77- if test -z "$NIX_CC_CROSS"; then
78- EXTRA_TARGET_CFLAGS="$EXTRA_FLAGS"
79- EXTRA_TARGET_CXXFLAGS="$EXTRA_FLAGS"
80- EXTRA_TARGET_LDFLAGS="$EXTRA_LDFLAGS"
81- else
82- # This the case of cross-building the gcc.
83- # We need special flags for the target, different than those of the build
84- # Assertion:
85- test -e $NIX_CC_CROSS/nix-support/orig-libc
86-87- # Figure out what extra flags to pass to the gcc compilers
88- # being generated to make sure that they use our glibc.
89- extraFlags="$(cat $NIX_CC_CROSS/nix-support/libc-cflags)"
90- extraLDFlags="$(cat $NIX_CC_CROSS/nix-support/libc-ldflags) $(cat $NIX_CC_CROSS/nix-support/libc-ldflags-before)"
91-92- # Use *real* header files, otherwise a limits.h is generated
93- # that does not include Glibc's limits.h (notably missing
94- # SSIZE_MAX, which breaks the build).
95- NIX_FIXINC_DUMMY_CROSS=$(cat $NIX_CC_CROSS/nix-support/orig-libc)/include
96-97- # The path to the Glibc binaries such as `crti.o'.
98- glibc_dir="$(cat $NIX_CC_CROSS/nix-support/orig-libc)"
99- glibc_libdir="$glibc_dir/lib"
100- configureFlags="$configureFlags --with-native-system-header-dir=$glibc_dir/include"
101-102- extraFlags="-I$NIX_FIXINC_DUMMY_CROSS $extraFlags"
103- extraLDFlags="-L$glibc_libdir -rpath $glibc_libdir $extraLDFlags"
104-105- EXTRA_TARGET_CFLAGS="$extraFlags"
106- for i in $extraLDFlags; do
107- EXTRA_TARGET_LDFLAGS="$EXTRA_TARGET_LDFLAGS -Wl,$i"
108- done
109- fi
110- fi
111-112- # CFLAGS_FOR_TARGET are needed for the libstdc++ configure script to find
113- # the startfiles.
114- # FLAGS_FOR_TARGET are needed for the target libraries to receive the -Bxxx
115- # for the startfiles.
116- makeFlagsArray+=( \
117- NATIVE_SYSTEM_HEADER_DIR="$NIX_FIXINC_DUMMY" \
118- SYSTEM_HEADER_DIR="$NIX_FIXINC_DUMMY" \
119- CFLAGS_FOR_BUILD="$EXTRA_FLAGS $EXTRA_LDFLAGS" \
120- CXXFLAGS_FOR_BUILD="$EXTRA_FLAGS $EXTRA_LDFLAGS" \
121- CFLAGS_FOR_TARGET="$EXTRA_TARGET_CFLAGS $EXTRA_TARGET_LDFLAGS" \
122- CXXFLAGS_FOR_TARGET="$EXTRA_TARGET_CFLAGS $EXTRA_TARGET_LDFLAGS" \
123- FLAGS_FOR_TARGET="$EXTRA_TARGET_CFLAGS $EXTRA_TARGET_LDFLAGS" \
124- LDFLAGS_FOR_BUILD="$EXTRA_FLAGS $EXTRA_LDFLAGS" \
125- LDFLAGS_FOR_TARGET="$EXTRA_TARGET_LDFLAGS $EXTRA_TARGET_LDFLAGS" \
126- )
127-128- if test -z "$targetConfig"; then
129- makeFlagsArray+=( \
130- BOOT_CFLAGS="$EXTRA_FLAGS $EXTRA_LDFLAGS" \
131- BOOT_LDFLAGS="$EXTRA_TARGET_CFLAGS $EXTRA_TARGET_LDFLAGS" \
132- )
133- fi
134-135- if test -n "$targetConfig" -a "$crossStageStatic" == 1; then
136- # We don't want the gcc build to assume there will be a libc providing
137- # limits.h in this stagae
138- makeFlagsArray+=( \
139- LIMITS_H_TEST=false \
140- )
141- else
142- makeFlagsArray+=( \
143- LIMITS_H_TEST=true \
144- )
145- fi
146-fi
147-148-if test -n "$targetConfig"; then
149- # The host strip will destroy some important details of the objects
150- dontStrip=1
151-fi
152-153-providedPreConfigure="$preConfigure";
154-preConfigure() {
155- if test -n "$newlibSrc"; then
156- tar xvf "$newlibSrc" -C ..
157- ln -s ../newlib-*/newlib newlib
158- # Patch to get armvt5el working:
159- sed -i -e 's/ arm)/ arm*)/' newlib/configure.host
160- fi
161-162- # Bug - they packaged zlib
163- if test -d "zlib"; then
164- # This breaks the build without-headers, which should build only
165- # the target libgcc as target libraries.
166- # See 'configure:5370'
167- rm -Rf zlib
168- fi
169-170- if test -f "$NIX_CC/nix-support/orig-libc"; then
171- # Patch the configure script so it finds glibc headers. It's
172- # important for example in order not to get libssp built,
173- # because its functionality is in glibc already.
174- glibc_headers="$(cat $NIX_CC/nix-support/orig-libc)/include"
175- sed -i \
176- -e "s,glibc_header_dir=/usr/include,glibc_header_dir=$glibc_headers", \
177- gcc/configure
178- fi
179-180- if test -n "$crossMingw" -a -n "$crossStageStatic"; then
181- mkdir -p ../mingw
182- # --with-build-sysroot expects that:
183- cp -R $libcCross/include ../mingw
184- configureFlags="$configureFlags --with-build-sysroot=`pwd`/.."
185- fi
186-187- # Eval the preConfigure script from nix expression.
188- eval "$providedPreConfigure"
189-190- # Perform the build in a different directory.
191- mkdir ../build
192- cd ../build
193- configureScript=../$sourceRoot/configure
194-}
195-196-197-postConfigure() {
198- # Don't store the configure flags in the resulting executables.
199- sed -e '/TOPLEVEL_CONFIGURE_ARGUMENTS=/d' -i Makefile
200-}
201-202-203-preInstall() {
204- # Make ‘lib64’ a symlink to ‘lib’.
205- if [ -n "$is64bit" -a -z "$enableMultilib" ]; then
206- mkdir -p $out/lib
207- ln -s lib $out/lib64
208- fi
209-}
210-211-212-postInstall() {
213- # Remove precompiled headers for now. They are very big and
214- # probably not very useful yet.
215- find $out/include -name "*.gch" -exec rm -rf {} \; -prune
216-217- # Remove `fixincl' to prevent a retained dependency on the
218- # previous gcc.
219- rm -rf $out/libexec/gcc/*/*/install-tools
220- rm -rf $out/lib/gcc/*/*/install-tools
221-222- # More dependencies with the previous gcc or some libs (gccbug stores the build command line)
223- rm -rf $out/bin/gccbug
224- # Take out the bootstrap-tools from the rpath, as it's not needed at all having $out
225- for i in $out/libexec/gcc/*/*/*; do
226- if PREV_RPATH=`patchelf --print-rpath $i`; then
227- patchelf --set-rpath `echo $PREV_RPATH | sed 's,:[^:]*bootstrap-tools/lib,,'` $i
228- fi
229- done
230-231- # Get rid of some "fixed" header files
232- rm -rf $out/lib/gcc/*/*/include/root
233-234- # Replace hard links for i686-pc-linux-gnu-gcc etc. with symlinks.
235- for i in $out/bin/*-gcc*; do
236- if cmp -s $out/bin/gcc $i; then
237- ln -sfn gcc $i
238- fi
239- done
240-241- for i in $out/bin/c++ $out/bin/*-c++* $out/bin/*-g++*; do
242- if cmp -s $out/bin/g++ $i; then
243- ln -sfn g++ $i
244- fi
245- done
246-247- # Disable RANDMMAP on grsec, which causes segfaults when using
248- # precompiled headers.
249- # See https://bugs.gentoo.org/show_bug.cgi?id=301299#c31
250- paxmark r $out/libexec/gcc/*/*/{cc1,cc1plus}
251-252- eval "$postInstallGhdl"
253-}
254-255-genericBuild
···1-This patch fixes interaction with Libtool.
2-See <http://thread.gmane.org/gmane.comp.gcc.patches/258777>, for details.
3-4---- a/gcc/fortran/gfortranspec.c
5-+++ b/gcc/fortran/gfortranspec.c
6-@@ -461,8 +461,15 @@ For more information about these matters, see the file named COPYING\n\n"));
7- {
8- fprintf (stderr, _("Driving:"));
9- for (i = 0; i < g77_newargc; i++)
10-+ {
11-+ if (g77_new_decoded_options[i].opt_index == OPT_l)
12-+ /* Make sure no white space is inserted after `-l'. */
13-+ fprintf (stderr, " -l%s",
14-+ g77_new_decoded_options[i].canonical_option[1]);
15-+ else
16- fprintf (stderr, " %s",
17- g77_new_decoded_options[i].orig_option_with_args_text);
18-+ }
19- fprintf (stderr, "\n");
20- }
···1-diff --git a/libada/Makefile.in b/libada/Makefile.in
2-index f5057a0..337e0c6 100644
3---- a/libada/Makefile.in
4-+++ b/libada/Makefile.in
5-@@ -55,7 +55,7 @@ GCC_WARN_CFLAGS = $(LOOSE_WARN)
6- WARN_CFLAGS = @warn_cflags@
7-8- TARGET_LIBGCC2_CFLAGS=
9--GNATLIBCFLAGS= -g -O2
10-+GNATLIBCFLAGS= -g -O2 $(CFLAGS)
11- GNATLIBCFLAGS_FOR_C = $(GNATLIBCFLAGS) $(TARGET_LIBGCC2_CFLAGS) -fexceptions \
12- -DIN_RTS @have_getipinfo@
13-14---- a/gcc/ada/gcc-interface/Makefile.in
15-+++ b/gcc/ada/gcc-interface/Makefile.in
16-@@ -105,7 +105,7 @@ ADAFLAGS = -W -Wall -gnatpg -gnata
17- SOME_ADAFLAGS =-gnata
18- FORCE_DEBUG_ADAFLAGS = -g
19- GNATLIBFLAGS = -gnatpg -nostdinc
20--GNATLIBCFLAGS = -g -O2
21-+GNATLIBCFLAGS = -g -O2 $(CFLAGS_FOR_TARGET)
22- # Pretend that _Unwind_GetIPInfo is available for the target by default. This
23- # should be autodetected during the configuration of libada and passed down to
24- # here, but we need something for --disable-libada and hope for the best.
25-@@ -193,7 +193,7 @@ RTSDIR = rts$(subst /,_,$(MULTISUBDIR))
26- # Link flags used to build gnat tools. By default we prefer to statically
27- # link with libgcc to avoid a dependency on shared libgcc (which is tricky
28- # to deal with as it may conflict with the libgcc provided by the system).
29--GCC_LINK_FLAGS=-static-libgcc
30-+GCC_LINK_FLAGS=-static-libgcc $(CFLAGS_FOR_TARGET)
31-32- # End of variables for you to override.
33-
···1-This patch fixes interaction with Libtool.
2-See <http://thread.gmane.org/gmane.comp.gcc.patches/258777>, for details.
3-4---- a/gcc/fortran/gfortranspec.c
5-+++ b/gcc/fortran/gfortranspec.c
6-@@ -461,8 +461,15 @@ For more information about these matters, see the file named COPYING\n\n"));
7- {
8- fprintf (stderr, _("Driving:"));
9- for (i = 0; i < g77_newargc; i++)
10-+ {
11-+ if (g77_new_decoded_options[i].opt_index == OPT_l)
12-+ /* Make sure no white space is inserted after `-l'. */
13-+ fprintf (stderr, " -l%s",
14-+ g77_new_decoded_options[i].canonical_option[1]);
15-+ else
16- fprintf (stderr, " %s",
17- g77_new_decoded_options[i].orig_option_with_args_text);
18-+ }
19- fprintf (stderr, "\n");
20- }
···1-diff --git a/libada/Makefile.in b/libada/Makefile.in
2-index f5057a0..337e0c6 100644
3---- a/libada/Makefile.in
4-+++ b/libada/Makefile.in
5-@@ -55,7 +55,7 @@ GCC_WARN_CFLAGS = $(LOOSE_WARN)
6- WARN_CFLAGS = @warn_cflags@
7-8- TARGET_LIBGCC2_CFLAGS=
9--GNATLIBCFLAGS= -g -O2
10-+GNATLIBCFLAGS= -g -O2 $(CFLAGS)
11- GNATLIBCFLAGS_FOR_C = $(GNATLIBCFLAGS) $(TARGET_LIBGCC2_CFLAGS) -fexceptions \
12- -DIN_RTS @have_getipinfo@
13-14---- a/gcc/ada/gcc-interface/Makefile.in
15-+++ b/gcc/ada/gcc-interface/Makefile.in
16-@@ -105,7 +105,7 @@ ADAFLAGS = -W -Wall -gnatpg -gnata
17- SOME_ADAFLAGS =-gnata
18- FORCE_DEBUG_ADAFLAGS = -g
19- GNATLIBFLAGS = -gnatpg -nostdinc
20--GNATLIBCFLAGS = -g -O2
21-+GNATLIBCFLAGS = -g -O2 $(CFLAGS_FOR_TARGET)
22- # Pretend that _Unwind_GetIPInfo is available for the target by default. This
23- # should be autodetected during the configuration of libada and passed down to
24- # here, but we need something for --disable-libada and hope for the best.
25-@@ -193,7 +193,7 @@ RTSDIR = rts$(subst /,_,$(MULTISUBDIR))
26- # Link flags used to build gnat tools. By default we prefer to statically
27- # link with libgcc to avoid a dependency on shared libgcc (which is tricky
28- # to deal with as it may conflict with the libgcc provided by the system).
29--GCC_LINK_FLAGS=-static-libgcc
30-+GCC_LINK_FLAGS=-static-libgcc $(CFLAGS_FOR_TARGET)
31-32- # End of variables for you to override.
33-