]> git.ipfire.org Git - ipfire-2.x.git/commitdiff
Allow building the toolchain for x86_64
authorMichael Tremer <michael.tremer@ipfire.org>
Sat, 22 Aug 2015 10:25:49 +0000 (12:25 +0200)
committerMichael Tremer <michael.tremer@ipfire.org>
Sat, 22 Aug 2015 10:25:49 +0000 (12:25 +0200)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
lfs/binutils
lfs/gcc
lfs/glibc

index 08bc7c9b69a67ca1878253f9f5f31f0dcf25b15a..0fdc57053139a289ef32874b8dedcfd0aec4f559 100644 (file)
@@ -36,6 +36,8 @@ DIR_APP    = $(DIR_SRC)/$(THISAPP)
 ifeq "$(ROOT)" ""
   TARGET = $(DIR_INFO)/$(THISAPP)
   EXTRA_CONFIG = \
 ifeq "$(ROOT)" ""
   TARGET = $(DIR_INFO)/$(THISAPP)
   EXTRA_CONFIG = \
+       --host="${BUILDTARGET}" \
+       --build="${BUILDTARGET}" \
        --prefix=/usr \
        --enable-shared \
        --disable-nls
        --prefix=/usr \
        --enable-shared \
        --disable-nls
@@ -76,6 +78,9 @@ ifeq "$(MACHINE_TYPE)" "arm"
                --with-float=soft
 endif
 
                --with-float=soft
 endif
 
+EXTRA_CONFIG += \
+       --enable-64-bit-bfd
+
 ###############################################################################
 # Top-level Rules
 ###############################################################################
 ###############################################################################
 # 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
 
        # 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
 ifeq "$(ROOT)" ""
        cp -v $(DIR_APP)/include/libiberty.h /usr/include
 else
diff --git a/lfs/gcc b/lfs/gcc
index 0264d37f8308aa989604c40f15303aa2c69ddbab..ca6f4d722d5ad78ee1e6635c1c1f0932ae0489b4 100644 (file)
--- a/lfs/gcc
+++ b/lfs/gcc
@@ -114,6 +114,11 @@ ifeq "$(MACHINE)" "i586"
                --with-tune=generic
 endif
 
                --with-tune=generic
 endif
 
+ifeq "$(MACHINE)" "x86_64"
+       EXTRA_CONFIG += \
+               --disable-multilib
+endif
+
 EXTRA_CONFIG += \
        --with-bugurl=http://bugtracker.ipfire.org \
        --disable-libunwind-exceptions \
 EXTRA_CONFIG += \
        --with-bugurl=http://bugtracker.ipfire.org \
        --disable-libunwind-exceptions \
index 4ec71a788e6bf683d0204112c622621c34e1eeaf..3391d2d106c48eedea3554808048386c9a2a3438 100644 (file)
--- a/lfs/glibc
+++ b/lfs/glibc
@@ -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
 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
 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 && \
 endif
 
        cd $(DIR_SRC)/glibc-build && \
@@ -337,6 +342,8 @@ ifeq "$(ROOT)" ""
 
        # Timezone data will be shipped by tzdata.
        rm -rfv /usr/share/zoneinfo
 
        # 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)
 endif
        @rm -rf $(DIR_APP) $(DIR_SRC)/glibc-build
        @$(POSTBUILD)