]> git.ipfire.org Git - people/stevee/ipfire-3.x.git/blob - pkgs/toolchain/gcc-static/gcc-static.nm
naoki: Mixed things.
[people/stevee/ipfire-3.x.git] / pkgs / toolchain / gcc-static / gcc-static.nm
1
2 PKG_TOOLCHAIN_DEPS += binutils-static kernel-headers
3
4 include ../../core/gcc/gcc.nm
5
6 define STAGE_BUILD
7 ## Enable -fPIC by default
8 cd $(DIR_APP) && sed 's/^\(#define CC1_SPEC.*\)\("\)$$/\1 %{fno-pic|fpic|fPIC:;:-fPIC}\2/' \
9 -i gcc/config/i386/linux.h
10 cd $(DIR_APP) && sed 's/^\(#define CC1_SPEC.*\)\("\)$$/\1 %{fno-pic|fpic|fPIC:;:-fPIC}\2/' \
11 -i gcc/config/i386/x86-64.h
12
13 # libssp has no use with new versions of Glibc. Glibc completely replaces all
14 # functions in libssp, linking to libssp will cause conflicts with libc, so
15 # libssp is a waste of space... so --disable-libssp.
16
17 cd $(DIR_SRC)/gcc-build && \
18 CC="gcc -B/usr/bin/" \
19 ../$(THISAPP)/configure \
20 $(CONFIGURE_ARCH) \
21 --target=$(TARGET) \
22 $(CONFIG_CPU) \
23 --prefix=$(TOOLS_DIR) \
24 --with-local-prefix=$(TOOLS_DIR) \
25 --libexecdir=$(TOOLS_DIR)/lib \
26 --enable-languages=c \
27 --enable-shared \
28 --disable-nls \
29 --disable-libssp \
30 --disable-werror \
31 --disable-static \
32 $(CONFIGURE_ARGS)
33
34 cd $(DIR_SRC)/gcc-build && make $(PARALLELISMFLAGS)
35 endef
36
37 define STAGE_INSTALL
38 cd $(DIR_SRC)/gcc-build && make install
39
40 ln -fvs gcc $(TOOLS_DIR)/bin/cc
41
42 $(TARGET)-gcc -dumpspecs | sed \
43 -e 's@$(LINKER)@$(TOOLS_DIR)&@g' \
44 > $$(dirname $$($(TARGET)-gcc -print-libgcc-file-name))/specs
45 endef