Allow building the toolchain for x86_64

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
This commit is contained in:
Michael Tremer
2015-08-22 12:25:49 +02:00
parent fc155193bd
commit 81aa971410
3 changed files with 20 additions and 3 deletions

View File

@@ -36,6 +36,8 @@ DIR_APP = $(DIR_SRC)/$(THISAPP)
ifeq "$(ROOT)" ""
TARGET = $(DIR_INFO)/$(THISAPP)
EXTRA_CONFIG = \
--host="${BUILDTARGET}" \
--build="${BUILDTARGET}" \
--prefix=/usr \
--enable-shared \
--disable-nls
@@ -76,6 +78,9 @@ ifeq "$(MACHINE_TYPE)" "arm"
--with-float=soft
endif
EXTRA_CONFIG += \
--enable-64-bit-bfd
###############################################################################
# Top-level Rules
###############################################################################
@@ -125,9 +130,9 @@ $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
# Prevent installing libiberty to lib64.
cd $(DIR_APP) && sed -i 's%\(^MULTIOSDIR = \).*%\1 ../lib%' libiberty/Makefile.in
cd $(DIR_SRC)/binutils-build && $(EXTRA_ENV) MACHINE= $(DIR_APP)/configure $(EXTRA_CONFIG)
cd $(DIR_SRC)/binutils-build && make $(EXTRA_MAKE) $(MAKETUNING) MACHINE=
cd $(DIR_SRC)/binutils-build && make $(EXTRA_INSTALL) install MACHINE=
cd $(DIR_SRC)/binutils-build && $(EXTRA_ENV) $(DIR_APP)/configure $(EXTRA_CONFIG)
cd $(DIR_SRC)/binutils-build && make $(EXTRA_MAKE) $(MAKETUNING)
cd $(DIR_SRC)/binutils-build && make $(EXTRA_INSTALL) install
ifeq "$(ROOT)" ""
cp -v $(DIR_APP)/include/libiberty.h /usr/include
else

View File

@@ -114,6 +114,11 @@ ifeq "$(MACHINE)" "i586"
--with-tune=generic
endif
ifeq "$(MACHINE)" "x86_64"
EXTRA_CONFIG += \
--disable-multilib
endif
EXTRA_CONFIG += \
--with-bugurl=http://bugtracker.ipfire.org \
--disable-libunwind-exceptions \

View File

@@ -304,10 +304,15 @@ ifeq "$(ROOT)" ""
ifeq "$(MACHINE_TYPE)" "arm"
cd $(DIR_APP) && sed -i 's|libs -o|libs -L/usr/lib -Wl,-dynamic-linker=/lib/ld-linux.so.3 -o|' \
scripts/test-installation.pl
else
ifeq "$(MACHINE)" "x86_64"
cd $(DIR_APP) && sed -i 's|libs -o|libs -L/usr/lib64 -Wl,-dynamic-linker=/lib64/ld-linux-x86-64.so.2 -o|' \
scripts/test-installation.pl
else
cd $(DIR_APP) && sed -i 's|libs -o|libs -L/usr/lib -Wl,-dynamic-linker=/lib/ld-linux.so.2 -o|' \
scripts/test-installation.pl
endif
endif
endif
cd $(DIR_SRC)/glibc-build && \
@@ -337,6 +342,8 @@ ifeq "$(ROOT)" ""
# Timezone data will be shipped by tzdata.
rm -rfv /usr/share/zoneinfo
else
ln -svf lib /tools/lib64
endif
@rm -rf $(DIR_APP) $(DIR_SRC)/glibc-build
@$(POSTBUILD)