summaryrefslogtreecommitdiff
path: root/meta-linaro-toolchain/recipes-devtools/gcc
diff options
context:
space:
mode:
authorVictor Kamensky <victor.kamensky@linaro.org>2014-03-20 22:47:45 -0700
committerFathi Boudra <fathi.boudra@linaro.org>2014-03-22 06:28:06 +0000
commit95e0a57a1bfaf4c2c05b1c7ef63e29f482cda8fb (patch)
tree7032889df9e9d783bb332874187de6f14707dfe5 /meta-linaro-toolchain/recipes-devtools/gcc
parentc8e26b455e4576abda9eb99500184dfd46770668 (diff)
downloadmeta-linaro-95e0a57a1bfaf4c2c05b1c7ef63e29f482cda8fb.tar.gz
toolchain: fix aarch64 BE dynamic linker location
Now linaro rootfs picked eglibc-2.19 that contains change that places aarch64 BE dynamic linker at new location (/lib/ld-linux-aarch64_be.so.1). But linaro toolchain does not contain yet corresponding changes and still builds executable with linker path as /lib/ld-linux-aarch64.so.1. As result Linaro OE aarch64 BE rootfs is completely broken. Fix above issue by backporting required changes into binutils and gcc. One additional patch was required that deals with differences between 4.8 and 4.9 compiler. Remove these patches once we get corresponding updates from upstream. 0001-AArch64-Define-LP64-LE-loader-name.patch --------------------------------------------- > commit 30feb358161fe68402e0e42deebe71a0c432763b > Author: Marcus Shawcroft <marcus.shawcroft@arm.com> > Date: Mon Jan 20 18:18:52 2014 +0000 > > [AArch64] Define LP64 LE loader name. 0001-AArch64-Define-LP64-BE-linker-name.patch --------------------------------------------- > commit 5a4f233680ecf1132591f8213ff1cc6a2535b1b7 > Author: Marcus Shawcroft <marcus.shawcroft@arm.com> > Date: Mon Jan 20 18:20:04 2014 +0000 > > [AArch64] Define LP64 BE linker name. > 0001-AArch64-Define-BE-loader-name.patch ---------------------------------------- > commit 33a9ec1309cf9e4c8b64f289acf509c81d5bb3f8 > Author: mshawcroft <mshawcroft@138bc75d-0d04-0410-961f-82ee72b054a4> > Date: Mon Jan 20 17:41:54 2014 +0000 > > [AArch64] Define BE loader name. > > 2014-01-20 Marcus Shawcroft <marcus.shawcroft@arm.com> > > * config/aarch64/aarch64-linux.h (GLIBC_DYNAMIC_LINKER): Expand > loader name using mbig-endian. > (LINUX_TARGET_LINK_SPEC): Pass linker -m flag. > > > > git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@206845 138bc75d-0d04-0410-961f-82ee72b054a4 AArch64-Define-BE-loader-name-default-be.patch ---------------------------------------------- New change. Needed to deal with situation when gcc configured by default as big endian, i.e no -mbig-endian option is passed. Note this change is not needed in 4.9 because the following commit adds -mbig-endian or -mlittle-endian to command line always. But below commit is too big instead patch deals with this situation in local "old" way. > commit bb009361f2e0ff6a720d089220dba7183892cf90 > Author: yufeng <yufeng@138bc75d-0d04-0410-961f-82ee72b054a4> > Date: Tue Jul 23 12:12:53 2013 +0000 > > [AArch64, ILP32] 1/6 Initial support - configury changes Changes tested by building and running linaro-image-lng image for aarch64 BE and aarch64 LE Change-Id: I2003ab5c25316f564cfd5fc73eadd9d574e90a6b Signed-off-by: Victor Kamensky <victor.kamensky@linaro.org>
Diffstat (limited to 'meta-linaro-toolchain/recipes-devtools/gcc')
-rw-r--r--meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.8.inc2
-rw-r--r--meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.8/0001-AArch64-Define-BE-loader-name.patch59
-rw-r--r--meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.8/AArch64-Define-BE-loader-name-default-be.patch50
3 files changed, 111 insertions, 0 deletions
diff --git a/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.8.inc b/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.8.inc
index b876596..4befdc6 100644
--- a/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.8.inc
+++ b/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.8.inc
@@ -59,6 +59,8 @@ SRC_URI = "https://releases.linaro.org/${MMYY}/components/toolchain/gcc-linaro/$
file://0049-Enable-SPE-AltiVec-generation-on-powepc-linux-target.patch \
file://0050-PR-target-58595.patch \
file://use-lib-for-aarch64.patch \
+ file://0001-AArch64-Define-BE-loader-name.patch \
+ file://AArch64-Define-BE-loader-name-default-be.patch \
"
SRC_URI[md5sum] = "c9023cc7e44eaf68572d6c8549297970"
diff --git a/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.8/0001-AArch64-Define-BE-loader-name.patch b/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.8/0001-AArch64-Define-BE-loader-name.patch
new file mode 100644
index 0000000..2e98dcc
--- /dev/null
+++ b/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.8/0001-AArch64-Define-BE-loader-name.patch
@@ -0,0 +1,59 @@
+From 33a9ec1309cf9e4c8b64f289acf509c81d5bb3f8 Mon Sep 17 00:00:00 2001
+From: mshawcroft <mshawcroft@138bc75d-0d04-0410-961f-82ee72b054a4>
+Date: Mon, 20 Jan 2014 17:41:54 +0000
+Subject: [PATCH] [AArch64] Define BE loader name.
+
+2014-01-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
+
+ * config/aarch64/aarch64-linux.h (GLIBC_DYNAMIC_LINKER): Expand
+ loader name using mbig-endian.
+ (LINUX_TARGET_LINK_SPEC): Pass linker -m flag.
+
+
+
+git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@206845 138bc75d-0d04-0410-961f-82ee72b054a4
+---
+ gcc/ChangeLog | 6 ++++++
+ gcc/config/aarch64/aarch64-linux.h | 5 +++--
+ 2 files changed, 9 insertions(+), 2 deletions(-)
+
+Index: gcc-linaro-4.8-2014.03/gcc/ChangeLog
+===================================================================
+--- gcc-linaro-4.8-2014.03.orig/gcc/ChangeLog
++++ gcc-linaro-4.8-2014.03/gcc/ChangeLog
+@@ -1,3 +1,12 @@
++2014-03-19 Victor Kamensky <victor.kamensky@linaro.org>
++
++ Backport from mainline
++ 2014-01-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
++
++ * config/aarch64/aarch64-linux.h (GLIBC_DYNAMIC_LINKER): Expand
++ loader name using mbig-endian.
++ (LINUX_TARGET_LINK_SPEC): Pass linker -m flag.
++
+ 2014-02-25 Richard Biener <rguenther@suse.de>
+
+ Backport from mainline
+Index: gcc-linaro-4.8-2014.03/gcc/config/aarch64/aarch64-linux.h
+===================================================================
+--- gcc-linaro-4.8-2014.03.orig/gcc/config/aarch64/aarch64-linux.h
++++ gcc-linaro-4.8-2014.03/gcc/config/aarch64/aarch64-linux.h
+@@ -21,7 +21,7 @@
+ #ifndef GCC_AARCH64_LINUX_H
+ #define GCC_AARCH64_LINUX_H
+
+-#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux-aarch64.so.1"
++#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux-aarch64%{mbig-endian:_be}.so.1"
+
+ #define CPP_SPEC "%{pthread:-D_REENTRANT}"
+
+@@ -32,7 +32,8 @@
+ %{rdynamic:-export-dynamic} \
+ -dynamic-linker " GNU_USER_DYNAMIC_LINKER " \
+ -X \
+- %{mbig-endian:-EB} %{mlittle-endian:-EL}"
++ %{mbig-endian:-EB} %{mlittle-endian:-EL} \
++ -maarch64linux%{mbig-endian:b}"
+
+ #define LINK_SPEC LINUX_TARGET_LINK_SPEC
+
diff --git a/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.8/AArch64-Define-BE-loader-name-default-be.patch b/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.8/AArch64-Define-BE-loader-name-default-be.patch
new file mode 100644
index 0000000..93b1fc7
--- /dev/null
+++ b/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.8/AArch64-Define-BE-loader-name-default-be.patch
@@ -0,0 +1,50 @@
+Index: gcc-linaro-4.8-2014.03/gcc/config/aarch64/aarch64-linux.h
+===================================================================
+--- gcc-linaro-4.8-2014.03.orig/gcc/config/aarch64/aarch64-linux.h
++++ gcc-linaro-4.8-2014.03/gcc/config/aarch64/aarch64-linux.h
+@@ -21,10 +21,23 @@
+ #ifndef GCC_AARCH64_LINUX_H
+ #define GCC_AARCH64_LINUX_H
+
+-#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux-aarch64%{mbig-endian:_be}.so.1"
+-
+ #define CPP_SPEC "%{pthread:-D_REENTRANT}"
+
++#if TARGET_BIG_ENDIAN_DEFAULT
++#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux-aarch64%{!mlittle-endian:_be}.so.1"
++
++#define LINUX_TARGET_LINK_SPEC "%{h*} \
++ %{static:-Bstatic} \
++ %{shared:-shared} \
++ %{symbolic:-Bsymbolic} \
++ %{rdynamic:-export-dynamic} \
++ -dynamic-linker " GNU_USER_DYNAMIC_LINKER " \
++ -X \
++ %{mbig-endian:-EB} %{mlittle-endian:-EL} \
++ -maarch64linux%{!mlittle-endian:b}"
++#else
++#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux-aarch64%{mbig-endian:_be}.so.1"
++
+ #define LINUX_TARGET_LINK_SPEC "%{h*} \
+ %{static:-Bstatic} \
+ %{shared:-shared} \
+@@ -34,6 +47,7 @@
+ -X \
+ %{mbig-endian:-EB} %{mlittle-endian:-EL} \
+ -maarch64linux%{mbig-endian:b}"
++#endif
+
+ #define LINK_SPEC LINUX_TARGET_LINK_SPEC
+
+Index: gcc-linaro-4.8-2014.03/gcc/ChangeLog
+===================================================================
+--- gcc-linaro-4.8-2014.03.orig/gcc/ChangeLog
++++ gcc-linaro-4.8-2014.03/gcc/ChangeLog
+@@ -1,3 +1,7 @@
++2014-03-20 Victor Kamensky <victor.kamensky@linaro.org>
++ * config/aarch64/aarch64-linux.h (GLIBC_DYNAMIC_LINKER): Fix
++ loader spec in case if big endian configured by default
++
+ 2014-03-19 Victor Kamensky <victor.kamensky@linaro.org>
+
+ Backport from mainline