gcc: Import patches from RHEL6.

This commit is contained in:
Michael Tremer
2012-08-16 18:48:19 +02:00
parent a09eee160f
commit ed635824a9
11 changed files with 785 additions and 1 deletions

27
lfs/gcc
View File

@@ -34,6 +34,9 @@ DL_FILE = $(THISAPP).tar.bz2
DL_FROM = $(URL_IPFIRE)
DIR_APP = $(DIR_SRC)/$(THISAPP)
CFLAGS := $(patsubst -march=%,,$(CFLAGS))
CFLAGS := $(patsubst -mtune=%,,$(CFLAGS))
# Normal build or /tools build.
#
ifeq "$(ROOT)" ""
@@ -52,7 +55,6 @@ ifeq "$(ROOT)" ""
EXTRA_INSTALL =
else
ifeq "$(PASS)" "1"
CFLAGS := $(patsubst -march=%,,$(CFLAGS))
TARGET = $(DIR_INFO)/$(THISAPP)-tools1
EXTRA_CONFIG = \
--target=$(CROSSTARGET) \
@@ -102,6 +104,17 @@ ifeq "$(MACHINE_TYPE)" "arm"
--disable-sjlj-exceptions
endif
ifeq "$(MACHINE)" "i586"
EXTRA_CONFIG += \
--with-arch=i586 \
--with-tune=generic
endif
EXTRA_CONFIG += \
--with-bugurl=http://bugtracker.ipfire.org \
--disable-libunwind-exceptions \
--enable-gnu-unique-object
export XCFLAGS = $(CFLAGS)
export TCFLAGS = $(CFLAGS)
@@ -155,6 +168,18 @@ $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
@rm -rf $(DIR_APP) $(DIR_SRC)/gcc-build && cd $(DIR_SRC) && tar jxf $(DIR_DL)/$(DL_FILE)
@mkdir $(DIR_SRC)/gcc-build
# Apply patches.
cd $(DIR_APP) && patch -Np0 < $(DIR_SRC)/src/patches/gcc/gcc44-build-id.patch
cd $(DIR_APP) && patch -Np0 < $(DIR_SRC)/src/patches/gcc/gcc44-c++-builtin-redecl.patch
cd $(DIR_APP) && patch -Np0 < $(DIR_SRC)/src/patches/gcc/gcc44-i386-libgomp.patch
cd $(DIR_APP) && patch -Np0 < $(DIR_SRC)/src/patches/gcc/gcc44-libtool-no-rpath.patch
cd $(DIR_APP) && patch -Np0 < $(DIR_SRC)/src/patches/gcc/gcc44-no-add-needed.patch
cd $(DIR_APP) && patch -Np0 < $(DIR_SRC)/src/patches/gcc/gcc44-pr33763.patch
cd $(DIR_APP) && patch -Np0 < $(DIR_SRC)/src/patches/gcc/gcc44-rh330771.patch
cd $(DIR_APP) && patch -Np0 < $(DIR_SRC)/src/patches/gcc/gcc44-rh533181.patch
cd $(DIR_APP) && patch -Np0 < $(DIR_SRC)/src/patches/gcc/gcc44-rh610785.patch
cd $(DIR_APP) && patch -Np0 < $(DIR_SRC)/src/patches/gcc/gcc44-unwind-debug-hook.patch
ifneq "$(ROOT)" ""
# Build gmp and mpfr internally in toolchain.
cd $(DIR_APP) && tar xfa $(DIR_DL)/gmp-$(GMP_VER).tar.bz2