summaryrefslogtreecommitdiff
path: root/meta-linaro-toolchain/recipes-devtools/gcc
diff options
context:
space:
mode:
authorDaniel Díaz <daniel.diaz@linaro.org>2017-10-11 18:55:20 +0100
committerDaniel Díaz <daniel.diaz@linaro.org>2017-11-14 08:53:42 -0600
commitacc13885ee5bfae0f6710659bd8cdba3147d1af0 (patch)
tree95a567601dcbf2068437bc0e9cc4aa1e2215be7e /meta-linaro-toolchain/recipes-devtools/gcc
parent40d5381ca653ee479371b0b7bdbd8f9be0b8ed1f (diff)
downloadmeta-linaro-acc13885ee5bfae0f6710659bd8cdba3147d1af0.tar.gz
gcc-linaro-7.1: add ILP32 patches for correct triplet
The GNU name proposed for ILP32 used to be aarch64_ilp32-linux-gnu and then: aarch64-linux-gnuilp32 but finally: aarch64-linux-gnu_ilp32 These patches are a continuation of the effort to correctly establish the right triplet. More information about ARM64 ILP32 can be found here: * https://wiki.linaro.org/Platform/arm64-ilp32 * https://wiki.debian.org/Arm64ilp32Port Change-Id: I560af755d69efe0eb3d89ecf7db4b4453eaab5e0 Signed-off-by: Daniel Díaz <daniel.diaz@linaro.org>
Diffstat (limited to 'meta-linaro-toolchain/recipes-devtools/gcc')
-rw-r--r--meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-7.1.inc3
-rw-r--r--meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-7.1/add-gcc-ilp32-default-support.patch61
-rw-r--r--meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-7.1/fix-gcc-multilib-for-ilp32-default.patch39
3 files changed, 102 insertions, 1 deletions
diff --git a/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-7.1.inc b/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-7.1.inc
index 92dc327..602dbe7 100644
--- a/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-7.1.inc
+++ b/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-7.1.inc
@@ -55,7 +55,6 @@ SRC_URI = "\
file://0026-Avoid-using-libdir-from-.la-which-usually-points-to-.patch \
file://0027-export-CPP.patch \
file://0028-Enable-SPE-AltiVec-generation-on-powepc-linux-target.patch \
- file://0029-Disable-the-MULTILIB_OSDIRNAMES-and-other-multilib-o.patch \
file://0030-Ensure-target-gcc-headers-can-be-included.patch \
file://0031-gcc-4.8-won-t-build-with-disable-dependency-tracking.patch \
file://0032-Don-t-search-host-directory-during-relink-if-inst_pr.patch \
@@ -74,6 +73,8 @@ SRC_URI = "\
file://0045-Link-libgcc-using-LDFLAGS-not-just-SHLIB_LDFLAGS.patch \
file://0046-libgcc_s-Use-alias-for-__cpu_indicator_init-instead-.patch \
file://0047-sync-gcc-stddef.h-with-musl.patch \
+ file://add-gcc-ilp32-default-support.patch \
+ file://fix-gcc-multilib-for-ilp32-default.patch \
${BACKPORTS} \
"
BACKPORTS = "\
diff --git a/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-7.1/add-gcc-ilp32-default-support.patch b/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-7.1/add-gcc-ilp32-default-support.patch
new file mode 100644
index 0000000..4c231a1
--- /dev/null
+++ b/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-7.1/add-gcc-ilp32-default-support.patch
@@ -0,0 +1,61 @@
+From ebfcbd5ace44eb4db1a8e0a0e0622ff053c69e31 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Daniel=20D=C3=ADaz?= <daniel.diaz@linaro.org>
+Date: Wed, 11 Oct 2017 11:27:58 -0500
+Subject: [PATCH 1/2] Add gcc ilp32 default support
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+This patch comes from Wookey:
+ https://people.linaro.org/~wookey/ilp32/patches/gcc-ilp32-default-support.patch
+
+Signed-off-by: Daniel Díaz <daniel.diaz@linaro.org>
+---
+ gcc/config.gcc | 22 ++++++++++++++++------
+ 1 file changed, 16 insertions(+), 6 deletions(-)
+
+diff --git a/gcc/config.gcc b/gcc/config.gcc
+index e8aaf2d..72522d0 100644
+--- a/gcc/config.gcc
++++ b/gcc/config.gcc
+@@ -518,11 +518,14 @@ aarch64*-*-*)
+ tm_p_file="${tm_p_file} arm/aarch-common-protos.h"
+ case ${with_abi} in
+ "")
+- if test "x$with_multilib_list" = xilp32; then
++ case ${target} in
++ aarch64*-*-*_ilp32)
+ tm_file="aarch64/biarchilp32.h ${tm_file}"
+- else
++ ;;
++ *)
+ tm_file="aarch64/biarchlp64.h ${tm_file}"
+- fi
++ ;;
++ esac
+ ;;
+ ilp32)
+ tm_file="aarch64/biarchilp32.h ${tm_file}"
+@@ -971,9 +974,16 @@ aarch64*-*-linux*)
+ esac
+ aarch64_multilibs="${with_multilib_list}"
+ if test "$aarch64_multilibs" = "default"; then
+- # TODO: turn on ILP32 multilib build after its support is mature.
+- # aarch64_multilibs="lp64,ilp32"
+- aarch64_multilibs="lp64"
++ case $target in
++ aarch64*_ilp32*)
++ aarch64_multilibs="ilp32"
++ ;;
++ aarch64*)
++ # TODO: turn on ILP32 multilib build after its support is mature.
++ # aarch64_multilibs="lp64,ilp32"
++ aarch64_multilibs="lp64"
++ ;;
++ esac
+ fi
+ aarch64_multilibs=`echo $aarch64_multilibs | sed -e 's/,/ /g'`
+ for aarch64_multilib in ${aarch64_multilibs}; do
+--
+2.7.4
+
diff --git a/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-7.1/fix-gcc-multilib-for-ilp32-default.patch b/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-7.1/fix-gcc-multilib-for-ilp32-default.patch
new file mode 100644
index 0000000..8a71fac
--- /dev/null
+++ b/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-7.1/fix-gcc-multilib-for-ilp32-default.patch
@@ -0,0 +1,39 @@
+From 50a45089ace8221682852d1c8401aad7824b9ec1 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Daniel=20D=C3=ADaz?= <daniel.diaz@linaro.org>
+Date: Wed, 11 Oct 2017 11:45:15 -0500
+Subject: [PATCH 2/2] Fix gcc multilib for ilp32 default
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+This comes from Wookey:
+ https://people.linaro.org/~wookey/ilp32/patches/gcc-fixup-multilib-patch-for-ilp32-default.patch
+on top of Debian's gcc-multiarch.diff.
+
+Signed-off-by: Daniel Díaz <daniel.diaz@linaro.org>
+---
+ gcc/config/aarch64/t-aarch64-linux | 9 +++++++--
+ 1 file changed, 7 insertions(+), 2 deletions(-)
+
+diff --git a/gcc/config/aarch64/t-aarch64-linux b/gcc/config/aarch64/t-aarch64-linux
+index ab064ab..38b33f6 100644
+--- a/gcc/config/aarch64/t-aarch64-linux
++++ b/gcc/config/aarch64/t-aarch64-linux
+@@ -22,7 +22,12 @@ LIB1ASMSRC = aarch64/lib1funcs.asm
+ LIB1ASMFUNCS = _aarch64_sync_cache_range
+
+ AARCH_BE = $(if $(findstring TARGET_BIG_ENDIAN_DEFAULT=1, $(tm_defines)),_be)
++ifneq (,$(findstring _ilp32,$(target)))
+ MULTILIB_OSDIRNAMES = mabi.lp64=../lib64$(call if_multiarch,:aarch64$(AARCH_BE)-linux-gnu)
++MULTILIB_OSDIRNAMES += mabi.ilp32=../lib$(call if_multiarch,:aarch64$(AARCH_BE)-linux-gnu_ilp32)
++MULTIARCH_DIRNAME = $(call if_multiarch,aarch64$(AARCH_BE)-linux-gnu_ilp32)
++else
++MULTILIB_OSDIRNAMES = mabi.lp64=../lib$(call if_multiarch,:aarch64$(AARCH_BE)-linux-gnu)
++MULTILIB_OSDIRNAMES += mabi.ilp32=../libilp32$(call if_multiarch,:aarch64$(AARCH_BE)-linux-gnu_ilp32)
+ MULTIARCH_DIRNAME = $(call if_multiarch,aarch64$(AARCH_BE)-linux-gnu)
+-
+-MULTILIB_OSDIRNAMES += mabi.ilp32=../libilp32
++endif
+--
+2.7.4
+