From 5b405688ee23df621e5b33911e2aa7b046ef632e Mon Sep 17 00:00:00 2001 From: Rich Felker Date: Mon, 5 Jul 2021 14:49:24 -0400 Subject: [PATCH] add gcc patches for powerpc-spe musl dynamic linker name spe uses -sf abi --- .../0020-powerpcspe-musl-ldsoname.diff | 22 +++++++++++++++++++ .../0025-powerpcspe-musl-ldsoname.diff | 22 +++++++++++++++++++ .../0022-powerpcspe-musl-ldsoname.diff | 22 +++++++++++++++++++ .../0021-powerpcspe-musl-ldsoname.diff | 22 +++++++++++++++++++ 4 files changed, 88 insertions(+) create mode 100644 patches/gcc-5.3.0/0020-powerpcspe-musl-ldsoname.diff create mode 100644 patches/gcc-6.5.0/0025-powerpcspe-musl-ldsoname.diff create mode 100644 patches/gcc-7.5.0/0022-powerpcspe-musl-ldsoname.diff create mode 100644 patches/gcc-8.5.0/0021-powerpcspe-musl-ldsoname.diff diff --git a/patches/gcc-5.3.0/0020-powerpcspe-musl-ldsoname.diff b/patches/gcc-5.3.0/0020-powerpcspe-musl-ldsoname.diff new file mode 100644 index 0000000..f88fd85 --- /dev/null +++ b/patches/gcc-5.3.0/0020-powerpcspe-musl-ldsoname.diff @@ -0,0 +1,22 @@ +--- gcc-8.5.0/gcc/config/rs6000/sysv4.h.orig 2021-07-05 12:56:18.398813835 -0400 ++++ gcc-8.5.0/gcc/config/rs6000/sysv4.h 2021-06-23 21:49:57.592408186 -0400 +@@ -793,7 +793,7 @@ + #define GLIBC_DYNAMIC_LINKER "/lib/ld.so.1" + #define UCLIBC_DYNAMIC_LINKER "/lib/ld-uClibc.so.0" + #define MUSL_DYNAMIC_LINKER \ +- "/lib/ld-musl-powerpc" MUSL_DYNAMIC_LINKER_E "%{msoft-float:-sf}.so.1" ++ "/lib/ld-musl-powerpc" MUSL_DYNAMIC_LINKER_E "%{msoft-float|mcpu=854*|mspe:-sf}.so.1" + #if DEFAULT_LIBC == LIBC_UCLIBC + #define CHOOSE_DYNAMIC_LINKER(G, U, M) \ + "%{mglibc:" G ";:%{mmusl:" M ";:" U "}}" +--- gcc-8.5.0/gcc/config/rs6000/linux64.h.orig 2021-07-05 12:54:24.704854044 -0400 ++++ gcc-8.5.0/gcc/config/rs6000/linux64.h 2021-07-05 12:56:50.010806923 -0400 +@@ -426,7 +426,7 @@ + #endif + + #define MUSL_DYNAMIC_LINKER32 \ +- "/lib/ld-musl-powerpc" MUSL_DYNAMIC_LINKER_E "%{msoft-float:-sf}.so.1" ++ "/lib/ld-musl-powerpc" MUSL_DYNAMIC_LINKER_E "%{msoft-float|mcpu=854*|mspe:-sf}.so.1" + #define MUSL_DYNAMIC_LINKER64 \ + "/lib/ld-musl-powerpc64" MUSL_DYNAMIC_LINKER_E "%{msoft-float:-sf}.so.1" + diff --git a/patches/gcc-6.5.0/0025-powerpcspe-musl-ldsoname.diff b/patches/gcc-6.5.0/0025-powerpcspe-musl-ldsoname.diff new file mode 100644 index 0000000..f88fd85 --- /dev/null +++ b/patches/gcc-6.5.0/0025-powerpcspe-musl-ldsoname.diff @@ -0,0 +1,22 @@ +--- gcc-8.5.0/gcc/config/rs6000/sysv4.h.orig 2021-07-05 12:56:18.398813835 -0400 ++++ gcc-8.5.0/gcc/config/rs6000/sysv4.h 2021-06-23 21:49:57.592408186 -0400 +@@ -793,7 +793,7 @@ + #define GLIBC_DYNAMIC_LINKER "/lib/ld.so.1" + #define UCLIBC_DYNAMIC_LINKER "/lib/ld-uClibc.so.0" + #define MUSL_DYNAMIC_LINKER \ +- "/lib/ld-musl-powerpc" MUSL_DYNAMIC_LINKER_E "%{msoft-float:-sf}.so.1" ++ "/lib/ld-musl-powerpc" MUSL_DYNAMIC_LINKER_E "%{msoft-float|mcpu=854*|mspe:-sf}.so.1" + #if DEFAULT_LIBC == LIBC_UCLIBC + #define CHOOSE_DYNAMIC_LINKER(G, U, M) \ + "%{mglibc:" G ";:%{mmusl:" M ";:" U "}}" +--- gcc-8.5.0/gcc/config/rs6000/linux64.h.orig 2021-07-05 12:54:24.704854044 -0400 ++++ gcc-8.5.0/gcc/config/rs6000/linux64.h 2021-07-05 12:56:50.010806923 -0400 +@@ -426,7 +426,7 @@ + #endif + + #define MUSL_DYNAMIC_LINKER32 \ +- "/lib/ld-musl-powerpc" MUSL_DYNAMIC_LINKER_E "%{msoft-float:-sf}.so.1" ++ "/lib/ld-musl-powerpc" MUSL_DYNAMIC_LINKER_E "%{msoft-float|mcpu=854*|mspe:-sf}.so.1" + #define MUSL_DYNAMIC_LINKER64 \ + "/lib/ld-musl-powerpc64" MUSL_DYNAMIC_LINKER_E "%{msoft-float:-sf}.so.1" + diff --git a/patches/gcc-7.5.0/0022-powerpcspe-musl-ldsoname.diff b/patches/gcc-7.5.0/0022-powerpcspe-musl-ldsoname.diff new file mode 100644 index 0000000..f88fd85 --- /dev/null +++ b/patches/gcc-7.5.0/0022-powerpcspe-musl-ldsoname.diff @@ -0,0 +1,22 @@ +--- gcc-8.5.0/gcc/config/rs6000/sysv4.h.orig 2021-07-05 12:56:18.398813835 -0400 ++++ gcc-8.5.0/gcc/config/rs6000/sysv4.h 2021-06-23 21:49:57.592408186 -0400 +@@ -793,7 +793,7 @@ + #define GLIBC_DYNAMIC_LINKER "/lib/ld.so.1" + #define UCLIBC_DYNAMIC_LINKER "/lib/ld-uClibc.so.0" + #define MUSL_DYNAMIC_LINKER \ +- "/lib/ld-musl-powerpc" MUSL_DYNAMIC_LINKER_E "%{msoft-float:-sf}.so.1" ++ "/lib/ld-musl-powerpc" MUSL_DYNAMIC_LINKER_E "%{msoft-float|mcpu=854*|mspe:-sf}.so.1" + #if DEFAULT_LIBC == LIBC_UCLIBC + #define CHOOSE_DYNAMIC_LINKER(G, U, M) \ + "%{mglibc:" G ";:%{mmusl:" M ";:" U "}}" +--- gcc-8.5.0/gcc/config/rs6000/linux64.h.orig 2021-07-05 12:54:24.704854044 -0400 ++++ gcc-8.5.0/gcc/config/rs6000/linux64.h 2021-07-05 12:56:50.010806923 -0400 +@@ -426,7 +426,7 @@ + #endif + + #define MUSL_DYNAMIC_LINKER32 \ +- "/lib/ld-musl-powerpc" MUSL_DYNAMIC_LINKER_E "%{msoft-float:-sf}.so.1" ++ "/lib/ld-musl-powerpc" MUSL_DYNAMIC_LINKER_E "%{msoft-float|mcpu=854*|mspe:-sf}.so.1" + #define MUSL_DYNAMIC_LINKER64 \ + "/lib/ld-musl-powerpc64" MUSL_DYNAMIC_LINKER_E "%{msoft-float:-sf}.so.1" + diff --git a/patches/gcc-8.5.0/0021-powerpcspe-musl-ldsoname.diff b/patches/gcc-8.5.0/0021-powerpcspe-musl-ldsoname.diff new file mode 100644 index 0000000..f88fd85 --- /dev/null +++ b/patches/gcc-8.5.0/0021-powerpcspe-musl-ldsoname.diff @@ -0,0 +1,22 @@ +--- gcc-8.5.0/gcc/config/rs6000/sysv4.h.orig 2021-07-05 12:56:18.398813835 -0400 ++++ gcc-8.5.0/gcc/config/rs6000/sysv4.h 2021-06-23 21:49:57.592408186 -0400 +@@ -793,7 +793,7 @@ + #define GLIBC_DYNAMIC_LINKER "/lib/ld.so.1" + #define UCLIBC_DYNAMIC_LINKER "/lib/ld-uClibc.so.0" + #define MUSL_DYNAMIC_LINKER \ +- "/lib/ld-musl-powerpc" MUSL_DYNAMIC_LINKER_E "%{msoft-float:-sf}.so.1" ++ "/lib/ld-musl-powerpc" MUSL_DYNAMIC_LINKER_E "%{msoft-float|mcpu=854*|mspe:-sf}.so.1" + #if DEFAULT_LIBC == LIBC_UCLIBC + #define CHOOSE_DYNAMIC_LINKER(G, U, M) \ + "%{mglibc:" G ";:%{mmusl:" M ";:" U "}}" +--- gcc-8.5.0/gcc/config/rs6000/linux64.h.orig 2021-07-05 12:54:24.704854044 -0400 ++++ gcc-8.5.0/gcc/config/rs6000/linux64.h 2021-07-05 12:56:50.010806923 -0400 +@@ -426,7 +426,7 @@ + #endif + + #define MUSL_DYNAMIC_LINKER32 \ +- "/lib/ld-musl-powerpc" MUSL_DYNAMIC_LINKER_E "%{msoft-float:-sf}.so.1" ++ "/lib/ld-musl-powerpc" MUSL_DYNAMIC_LINKER_E "%{msoft-float|mcpu=854*|mspe:-sf}.so.1" + #define MUSL_DYNAMIC_LINKER64 \ + "/lib/ld-musl-powerpc64" MUSL_DYNAMIC_LINKER_E "%{msoft-float:-sf}.so.1" +