]> git.ipfire.org Git - ipfire-2.x.git/blobdiff - lfs/gcc
Merge remote-tracking branch 'origin/kernel-update' into glibc-update2
[ipfire-2.x.git] / lfs / gcc
diff --git a/lfs/gcc b/lfs/gcc
index 5232df40848a7e369bd3770a3e9d0d7a90628f98..1857dde4c485a12f2f102f14d6835fe42ab258f2 100644 (file)
--- a/lfs/gcc
+++ b/lfs/gcc
@@ -38,14 +38,16 @@ DIR_APP    = $(DIR_SRC)/$(THISAPP)
 #
 ifeq "$(ROOT)" ""
   TARGET = $(DIR_INFO)/$(THISAPP)
-  EXTRA_CONFIG = --prefix=/usr \
-               --libexecdir=/usr/lib \
-               --enable-shared \
-               --enable-threads=posix \
-               --enable-__cxa_atexit \
-               --enable-clocale=gnu \
-               --enable-languages=c,c++ \
-               --disable-nls
+  EXTRA_CONFIG = \
+       --prefix=/usr \
+       --libexecdir=/usr/lib \
+       --enable-shared \
+       --enable-threads=posix \
+       --enable-__cxa_atexit \
+       --enable-clocale=gnu \
+       --enable-languages=c,c++ \
+       --disable-bootstrap \
+       --disable-nls
   EXTRA_MAKE =
   EXTRA_INSTALL =
 else
@@ -66,7 +68,8 @@ ifeq "$(PASS)" "1"
        --without-headers \
        --without-ppl \
        --without-cloog \
-       --enable-languages=c
+       --enable-languages=c \
+       --enable-bootstrap
   EXTRA_MAKE = 
   EXTRA_INSTALL = 
 else
@@ -95,12 +98,17 @@ endif
 
 ifeq "$(MACHINE_TYPE)" "arm"
        EXTRA_CONFIG += \
-               --with-float=soft
+               --with-float=soft \
+               --disable-sjlj-exceptions
 endif
 
 export XCFLAGS = $(CFLAGS)
 export TCFLAGS = $(CFLAGS)
 
+ifeq "$(PASS)" "1"
+  CFLAGS =
+endif
+
 ###############################################################################
 # Top-level Rules
 ###############################################################################
@@ -163,10 +171,6 @@ endif
 ifeq    "$(PASS)" "2"
        cd $(DIR_APP) && patch -Np1 -i $(DIR_SRC)/src/patches/gcc-4.4.3-startfiles_fix-1.patch
 
-       cd $(DIR_APP) && sed -i gcc/Makefile.in \
-               -e 's@\./fixinc\.sh@-c true@' \
-               -e 's/^T_CFLAGS =$$/& -fomit-frame-pointer/'
-
        for file in $$(find $(DIR_APP)/gcc/config -name linux64.h -o -name linux.h \
                        -o -name sysv4.h -o -name linux-eabi.h -o -name linux-elf.h); do \
                echo "Processing $${file}..."; \
@@ -181,6 +185,11 @@ ifeq    "$(PASS)" "2"
 endif
 endif
 
+       cd $(DIR_APP) && sed -i 's/install_to_$$(INSTALL_DEST) //' libiberty/Makefile.in
+       cd $(DIR_APP) && sed -i gcc/Makefile.in \
+               -e 's@\./fixinc\.sh@-c true@' \
+               -e 's/^T_CFLAGS =$$/& -fomit-frame-pointer/'
+
        # The actual build.
        cd $(DIR_SRC)/gcc-build && \
                $(EXTRA_ENV) \
@@ -189,7 +198,9 @@ endif
        cd $(DIR_SRC)/gcc-build && make $(MAKETUNING) $(EXTRA_MAKE)
        cd $(DIR_SRC)/gcc-build && make $(EXTRA_INSTALL) install
 
-ifneq "$(ROOT)" ""
+ifeq "$(ROOT)" ""
+       ln -svf ../usr/bin/cpp /lib
+else
 ifeq    "$(PASS)" "1"
        ln -svf libgcc.a $$(/tools/bin/$(CROSSTARGET)-gcc -print-libgcc-file-name | sed 's/libgcc/&_eh/')
 else