0
0
mirror of https://github.com/termux-pacman/glibc-packages.git synced 2024-11-13 13:59:21 +00:00
glibc-packages/gpkg/gcc-libs/set_glibc_dynamic_linker.patch
2023-09-18 13:52:58 +03:00

112 lines
4.6 KiB
Diff

--- gcc-13.2.0/gcc/config/aarch64/aarch64-linux.h
+++ gcc-13.2.0/gcc/config/aarch64/aarch64-linux.h
@@ -21,10 +21,10 @@
#ifndef GCC_AARCH64_LINUX_H
#define GCC_AARCH64_LINUX_H
-#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux-aarch64%{mbig-endian:_be}%{mabi=ilp32:_ilp32}.so.1"
+#define GLIBC_DYNAMIC_LINKER "@TERMUX_PREFIX@/lib/ld-linux-aarch64%{mbig-endian:_be}%{mabi=ilp32:_ilp32}.so.1"
#undef MUSL_DYNAMIC_LINKER
-#define MUSL_DYNAMIC_LINKER "/lib/ld-musl-aarch64%{mbig-endian:_be}%{mabi=ilp32:_ilp32}.so.1"
+#define MUSL_DYNAMIC_LINKER "@TERMUX_PREFIX@/lib/ld-musl-aarch64%{mbig-endian:_be}%{mabi=ilp32:_ilp32}.so.1"
#undef ASAN_CC1_SPEC
#define ASAN_CC1_SPEC "%{%:sanitize(address):-funwind-tables}"
--- gcc-13.2.0/gcc/config/alpha/linux-elf.h
+++ gcc-13.2.0/gcc/config/alpha/linux-elf.h
@@ -23,7 +23,7 @@ along with GCC; see the file COPYING3. If not see
#define EXTRA_SPECS \
{ "elf_dynamic_linker", ELF_DYNAMIC_LINKER },
-#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2"
+#define GLIBC_DYNAMIC_LINKER "@TERMUX_PREFIX@/lib/ld-linux.so.2"
#define UCLIBC_DYNAMIC_LINKER "/lib/ld-uClibc.so.0"
#if DEFAULT_LIBC == LIBC_UCLIBC
#define CHOOSE_DYNAMIC_LINKER(G, U) "%{mglibc:" G ";:" U "}"
--- gcc-13.2.0/gcc/config/arm/linux-eabi.h
+++ gcc-13.2.0/gcc/config/arm/linux-eabi.h
@@ -65,8 +65,8 @@
GLIBC_DYNAMIC_LINKER_DEFAULT and TARGET_DEFAULT_FLOAT_ABI. */
#undef GLIBC_DYNAMIC_LINKER
-#define GLIBC_DYNAMIC_LINKER_SOFT_FLOAT "/lib/ld-linux.so.3"
-#define GLIBC_DYNAMIC_LINKER_HARD_FLOAT "/lib/ld-linux-armhf.so.3"
+#define GLIBC_DYNAMIC_LINKER_SOFT_FLOAT "@TERMUX_PREFIX@/lib/ld-linux.so.3"
+#define GLIBC_DYNAMIC_LINKER_HARD_FLOAT "@TERMUX_PREFIX@/lib/ld-linux-armhf.so.3"
#define GLIBC_DYNAMIC_LINKER_DEFAULT GLIBC_DYNAMIC_LINKER_SOFT_FLOAT
#define GLIBC_DYNAMIC_LINKER \
--- gcc-13.2.0/gcc/config/arm/linux-elf.h
+++ gcc-13.2.0/gcc/config/arm/linux-elf.h
@@ -60,7 +60,7 @@
#define LIBGCC_SPEC "%{mfloat-abi=soft*:-lfloat} -lgcc"
-#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2"
+#define GLIBC_DYNAMIC_LINKER "@TERMUX_PREFIX@/lib/ld-linux.so.2"
#define LINUX_TARGET_LINK_SPEC "%{h*} \
%{static:-Bstatic} \
--- gcc-13.2.0/gcc/config/i386/linux.h
+++ gcc-13.2.0/gcc/config/i386/linux.h
@@ -20,7 +20,7 @@ along with GCC; see the file COPYING3. If not see
<http://www.gnu.org/licenses/>. */
#define GNU_USER_LINK_EMULATION "elf_i386"
-#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2"
+#define GLIBC_DYNAMIC_LINKER "@TERMUX_PREFIX@/lib/ld-linux.so.2"
#undef MUSL_DYNAMIC_LINKER
#define MUSL_DYNAMIC_LINKER "/lib/ld-musl-i386.so.1"
--- gcc-13.2.0/gcc/config/i386/linux64.h
+++ gcc-13.2.0/gcc/config/i386/linux64.h
@@ -27,9 +27,9 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
#define GNU_USER_LINK_EMULATION64 "elf_x86_64"
#define GNU_USER_LINK_EMULATIONX32 "elf32_x86_64"
-#define GLIBC_DYNAMIC_LINKER32 "/lib/ld-linux.so.2"
-#define GLIBC_DYNAMIC_LINKER64 "/lib64/ld-linux-x86-64.so.2"
-#define GLIBC_DYNAMIC_LINKERX32 "/libx32/ld-linux-x32.so.2"
+#define GLIBC_DYNAMIC_LINKER32 "@TERMUX_PREFIX@/lib/ld-linux.so.2"
+#define GLIBC_DYNAMIC_LINKER64 "@TERMUX_PREFIX@/lib/ld-linux-x86-64.so.2"
+#define GLIBC_DYNAMIC_LINKERX32 "@TERMUX_PREFIX@/lib/ld-linux-x32.so.2"
#undef MUSL_DYNAMIC_LINKER32
#define MUSL_DYNAMIC_LINKER32 "/lib/ld-musl-i386.so.1"
--- gcc-13.2.0/gcc/config/sh/linux.h
+++ gcc-13.2.0/gcc/config/sh/linux.h
@@ -64,7 +64,7 @@ along with GCC; see the file COPYING3. If not see
"/lib/ld-musl-sh" MUSL_DYNAMIC_LINKER_E MUSL_DYNAMIC_LINKER_FP \
"%{mfdpic:-fdpic}.so.1"
-#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2"
+#define GLIBC_DYNAMIC_LINKER "@TERMUX_PREFIX@/lib/ld-linux.so.2"
#undef SUBTARGET_LINK_EMUL_SUFFIX
#define SUBTARGET_LINK_EMUL_SUFFIX "%{mfdpic:_fd;:_linux}"
--- gcc-13.2.0/gcc/config/sparc/linux.h
+++ gcc-13.2.0/gcc/config/sparc/linux.h
@@ -78,7 +78,7 @@ extern const char *host_detect_local_cpu (int argc, const char **argv);
When the -shared link option is used a final link is not being
done. */
-#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2"
+#define GLIBC_DYNAMIC_LINKER "@TERMUX_PREFIX@/lib/ld-linux.so.2"
#undef LINK_SPEC
#define LINK_SPEC "-m elf32_sparc %{shared:-shared} \
--- gcc-13.2.0/gcc/config/sparc/linux64.h
+++ gcc-13.2.0/gcc/config/sparc/linux64.h
@@ -78,8 +78,8 @@ along with GCC; see the file COPYING3. If not see
When the -shared link option is used a final link is not being
done. */
-#define GLIBC_DYNAMIC_LINKER32 "/lib/ld-linux.so.2"
-#define GLIBC_DYNAMIC_LINKER64 "/lib64/ld-linux.so.2"
+#define GLIBC_DYNAMIC_LINKER32 "@TERMUX_PREFIX@/lib/ld-linux.so.2"
+#define GLIBC_DYNAMIC_LINKER64 "@TERMUX_PREFIX@/lib/ld-linux.so.2"
#ifdef SPARC_BI_ARCH