diff mbox series

gcc-9.2: Fix risc-v dynamic linker relocation

Message ID 20190905012958.5888-1-raj.khem@gmail.com
State Accepted
Commit bd21f36faeceb83ab629bd34a4e53a6947d6a469
Headers show
Series gcc-9.2: Fix risc-v dynamic linker relocation | expand

Commit Message

Khem Raj Sept. 5, 2019, 1:29 a.m. UTC
Accidentally dropped in 9.2 update

Reported-by: Ricardo Salveti <ricardo@foundries.io>
Signed-off-by: Khem Raj <raj.khem@gmail.com>

---
 ...AMIC_LINKER-and-UCLIBC_DYNAMIC_LINKE.patch | 23 ++++++++++++++-----
 1 file changed, 17 insertions(+), 6 deletions(-)

-- 
2.23.0

-- 
_______________________________________________
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core

Comments

Alistair Francis Sept. 5, 2019, 9:59 p.m. UTC | #1
On Wed, Sep 4, 2019 at 6:30 PM Khem Raj <raj.khem@gmail.com> wrote:
>

> Accidentally dropped in 9.2 update

>

> Reported-by: Ricardo Salveti <ricardo@foundries.io>

> Signed-off-by: Khem Raj <raj.khem@gmail.com>


This fixes the RV64 build for me.

Reviewed-by: Alistair Francis <alistair.francis@wdc.com>


Alistair

> ---

>  ...AMIC_LINKER-and-UCLIBC_DYNAMIC_LINKE.patch | 23 ++++++++++++++-----

>  1 file changed, 17 insertions(+), 6 deletions(-)

>

> diff --git a/meta/recipes-devtools/gcc/gcc-9.2/0011-Define-GLIBC_DYNAMIC_LINKER-and-UCLIBC_DYNAMIC_LINKE.patch b/meta/recipes-devtools/gcc/gcc-9.2/0011-Define-GLIBC_DYNAMIC_LINKER-and-UCLIBC_DYNAMIC_LINKE.patch

> index 21908bce9b..66fb24d4cd 100644

> --- a/meta/recipes-devtools/gcc/gcc-9.2/0011-Define-GLIBC_DYNAMIC_LINKER-and-UCLIBC_DYNAMIC_LINKE.patch

> +++ b/meta/recipes-devtools/gcc/gcc-9.2/0011-Define-GLIBC_DYNAMIC_LINKER-and-UCLIBC_DYNAMIC_LINKE.patch

> @@ -1,7 +1,7 @@

> -From a93743732b2125aebd9a6d65e999d7506b01d6b3 Mon Sep 17 00:00:00 2001

> +From 72fc3975bcd720b2f8040fa87cd23d3db4c5975a Mon Sep 17 00:00:00 2001

>  From: Khem Raj <raj.khem@gmail.com>

>  Date: Fri, 29 Mar 2013 09:24:50 +0400

> -Subject: [PATCH 11/36] Define GLIBC_DYNAMIC_LINKER and UCLIBC_DYNAMIC_LINKER

> +Subject: [PATCH] Define GLIBC_DYNAMIC_LINKER and UCLIBC_DYNAMIC_LINKER

>   relative to SYSTEMLIBS_DIR

>

>  This patch defines GLIBC_DYNAMIC_LINKER and UCLIBC_DYNAMIC_LINKER

> @@ -23,11 +23,12 @@ Upstream-Status: Inappropriate [OE configuration]

>   gcc/config/i386/linux64.h    |  6 +++---

>   gcc/config/linux.h           |  8 ++++----

>   gcc/config/mips/linux.h      | 12 ++++++------

> + gcc/config/riscv/linux.h     |  2 +-

>   gcc/config/rs6000/linux64.h  | 15 +++++----------

>   gcc/config/sh/linux.h        |  2 +-

>   gcc/config/sparc/linux.h     |  2 +-

>   gcc/config/sparc/linux64.h   |  4 ++--

> - 11 files changed, 28 insertions(+), 33 deletions(-)

> + 12 files changed, 29 insertions(+), 34 deletions(-)

>

>  diff --git a/gcc/config/alpha/linux-elf.h b/gcc/config/alpha/linux-elf.h

>  index 824861befec..6afacce3292 100644

> @@ -152,6 +153,19 @@ index 6f79ac9c01a..25de96f9561 100644

>

>   #undef MUSL_DYNAMIC_LINKER32

>   #define MUSL_DYNAMIC_LINKER32 \

> +diff --git a/gcc/config/riscv/linux.h b/gcc/config/riscv/linux.h

> +index 58dd18b89f3..112ba9cd764 100644

> +--- a/gcc/config/riscv/linux.h

> ++++ b/gcc/config/riscv/linux.h

> +@@ -22,7 +22,7 @@ along with GCC; see the file COPYING3.  If not see

> +     GNU_USER_TARGET_OS_CPP_BUILTINS();                                \

> +   } while (0)

> +

> +-#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux-riscv" XLEN_SPEC "-" ABI_SPEC ".so.1"

> ++#define GLIBC_DYNAMIC_LINKER SYSTEMLIBS_DIR "ld-linux-riscv" XLEN_SPEC "-" ABI_SPEC ".so.1"

> +

> + #define MUSL_ABI_SUFFIX \

> +   "%{mabi=ilp32:-sf}" \

>  diff --git a/gcc/config/rs6000/linux64.h b/gcc/config/rs6000/linux64.h

>  index 9946d3fed94..45a9a7cae59 100644

>  --- a/gcc/config/rs6000/linux64.h

> @@ -227,6 +241,3 @@ index 789d1df4bd5..b920c680fb1 100644

>

>   #ifdef SPARC_BI_ARCH

>

> ---

> -2.22.1

> -

> --

> 2.23.0

>

> --

> _______________________________________________

> Openembedded-core mailing list

> Openembedded-core@lists.openembedded.org

> http://lists.openembedded.org/mailman/listinfo/openembedded-core

-- 
_______________________________________________
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core
diff mbox series

Patch

diff --git a/meta/recipes-devtools/gcc/gcc-9.2/0011-Define-GLIBC_DYNAMIC_LINKER-and-UCLIBC_DYNAMIC_LINKE.patch b/meta/recipes-devtools/gcc/gcc-9.2/0011-Define-GLIBC_DYNAMIC_LINKER-and-UCLIBC_DYNAMIC_LINKE.patch
index 21908bce9b..66fb24d4cd 100644
--- a/meta/recipes-devtools/gcc/gcc-9.2/0011-Define-GLIBC_DYNAMIC_LINKER-and-UCLIBC_DYNAMIC_LINKE.patch
+++ b/meta/recipes-devtools/gcc/gcc-9.2/0011-Define-GLIBC_DYNAMIC_LINKER-and-UCLIBC_DYNAMIC_LINKE.patch
@@ -1,7 +1,7 @@ 
-From a93743732b2125aebd9a6d65e999d7506b01d6b3 Mon Sep 17 00:00:00 2001
+From 72fc3975bcd720b2f8040fa87cd23d3db4c5975a Mon Sep 17 00:00:00 2001
 From: Khem Raj <raj.khem@gmail.com>
 Date: Fri, 29 Mar 2013 09:24:50 +0400
-Subject: [PATCH 11/36] Define GLIBC_DYNAMIC_LINKER and UCLIBC_DYNAMIC_LINKER
+Subject: [PATCH] Define GLIBC_DYNAMIC_LINKER and UCLIBC_DYNAMIC_LINKER
  relative to SYSTEMLIBS_DIR
 
 This patch defines GLIBC_DYNAMIC_LINKER and UCLIBC_DYNAMIC_LINKER
@@ -23,11 +23,12 @@  Upstream-Status: Inappropriate [OE configuration]
  gcc/config/i386/linux64.h    |  6 +++---
  gcc/config/linux.h           |  8 ++++----
  gcc/config/mips/linux.h      | 12 ++++++------
+ gcc/config/riscv/linux.h     |  2 +-
  gcc/config/rs6000/linux64.h  | 15 +++++----------
  gcc/config/sh/linux.h        |  2 +-
  gcc/config/sparc/linux.h     |  2 +-
  gcc/config/sparc/linux64.h   |  4 ++--
- 11 files changed, 28 insertions(+), 33 deletions(-)
+ 12 files changed, 29 insertions(+), 34 deletions(-)
 
 diff --git a/gcc/config/alpha/linux-elf.h b/gcc/config/alpha/linux-elf.h
 index 824861befec..6afacce3292 100644
@@ -152,6 +153,19 @@  index 6f79ac9c01a..25de96f9561 100644
  
  #undef MUSL_DYNAMIC_LINKER32
  #define MUSL_DYNAMIC_LINKER32 \
+diff --git a/gcc/config/riscv/linux.h b/gcc/config/riscv/linux.h
+index 58dd18b89f3..112ba9cd764 100644
+--- a/gcc/config/riscv/linux.h
++++ b/gcc/config/riscv/linux.h
+@@ -22,7 +22,7 @@ along with GCC; see the file COPYING3.  If not see
+     GNU_USER_TARGET_OS_CPP_BUILTINS();				\
+   } while (0)
+ 
+-#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux-riscv" XLEN_SPEC "-" ABI_SPEC ".so.1"
++#define GLIBC_DYNAMIC_LINKER SYSTEMLIBS_DIR "ld-linux-riscv" XLEN_SPEC "-" ABI_SPEC ".so.1"
+ 
+ #define MUSL_ABI_SUFFIX \
+   "%{mabi=ilp32:-sf}" \
 diff --git a/gcc/config/rs6000/linux64.h b/gcc/config/rs6000/linux64.h
 index 9946d3fed94..45a9a7cae59 100644
 --- a/gcc/config/rs6000/linux64.h
@@ -227,6 +241,3 @@  index 789d1df4bd5..b920c680fb1 100644
  
  #ifdef SPARC_BI_ARCH
  
--- 
-2.22.1
-