158 lines
7.6 KiB
Diff
158 lines
7.6 KiB
Diff
diff -Naur gcc-9.3.0.orig/gcc/config/arm/linux-eabi.h gcc-9.3.0/gcc/config/arm/linux-eabi.h
|
|
--- gcc-9.3.0.orig/gcc/config/arm/linux-eabi.h 2020-05-24 15:55:29.342326501 -0400
|
|
+++ gcc-9.3.0/gcc/config/arm/linux-eabi.h 2020-03-12 07:07:21.000000000 -0400
|
|
@@ -65,8 +65,8 @@
|
|
GLIBC_DYNAMIC_LINKER_DEFAULT and TARGET_DEFAULT_FLOAT_ABI. */
|
|
|
|
#undef GLIBC_DYNAMIC_LINKER
|
|
-#define GLIBC_DYNAMIC_LINKER_SOFT_FLOAT "/toolchain/lib/ld-linux.so.3"
|
|
-#define GLIBC_DYNAMIC_LINKER_HARD_FLOAT "/toolchain/lib/ld-linux-armhf.so.3"
|
|
+#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_DEFAULT GLIBC_DYNAMIC_LINKER_SOFT_FLOAT
|
|
|
|
#define GLIBC_DYNAMIC_LINKER \
|
|
@@ -89,7 +89,7 @@
|
|
#define MUSL_DYNAMIC_LINKER_E "%{mbig-endian:eb}"
|
|
#endif
|
|
#define MUSL_DYNAMIC_LINKER \
|
|
- "/toolchain/lib/ld-musl-arm" MUSL_DYNAMIC_LINKER_E "%{mfloat-abi=hard:hf}.so.1"
|
|
+ "/lib/ld-musl-arm" MUSL_DYNAMIC_LINKER_E "%{mfloat-abi=hard:hf}.so.1"
|
|
|
|
/* At this point, bpabi.h will have clobbered LINK_SPEC. We want to
|
|
use the GNU/Linux version, not the generic BPABI version. */
|
|
@@ -135,8 +135,3 @@
|
|
#define CLEAR_INSN_CACHE(BEG, END) not_used
|
|
|
|
#define ARM_TARGET2_DWARF_FORMAT (DW_EH_PE_pcrel | DW_EH_PE_indirect)
|
|
-
|
|
-#undef STANDARD_STARTFILE_PREFIX_1
|
|
-#undef STANDARD_STARTFILE_PREFIX_2
|
|
-#define STANDARD_STARTFILE_PREFIX_1 "/toolchain/lib/"
|
|
-#define STANDARD_STARTFILE_PREFIX_2 ""
|
|
diff -Naur gcc-9.3.0.orig/gcc/config/i386/linux64.h gcc-9.3.0/gcc/config/i386/linux64.h
|
|
--- gcc-9.3.0.orig/gcc/config/i386/linux64.h 2020-05-24 15:55:29.382326483 -0400
|
|
+++ gcc-9.3.0/gcc/config/i386/linux64.h 2020-03-12 07:07:21.000000000 -0400
|
|
@@ -27,18 +27,13 @@
|
|
#define GNU_USER_LINK_EMULATION64 "elf_x86_64"
|
|
#define GNU_USER_LINK_EMULATIONX32 "elf32_x86_64"
|
|
|
|
-#define GLIBC_DYNAMIC_LINKER32 "/toolchain/lib/ld-linux.so.2"
|
|
-#define GLIBC_DYNAMIC_LINKER64 "/toolchain/lib64/ld-linux-x86-64.so.2"
|
|
+#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"
|
|
|
|
#undef MUSL_DYNAMIC_LINKER32
|
|
-#define MUSL_DYNAMIC_LINKER32 "/toolchain/lib/ld-musl-i386.so.1"
|
|
+#define MUSL_DYNAMIC_LINKER32 "/lib/ld-musl-i386.so.1"
|
|
#undef MUSL_DYNAMIC_LINKER64
|
|
-#define MUSL_DYNAMIC_LINKER64 "/toolchain/lib/ld-musl-x86_64.so.1"
|
|
+#define MUSL_DYNAMIC_LINKER64 "/lib/ld-musl-x86_64.so.1"
|
|
#undef MUSL_DYNAMIC_LINKERX32
|
|
-#define MUSL_DYNAMIC_LINKERX32 "/toolchain/lib/ld-musl-x32.so.1"
|
|
-
|
|
-#undef STANDARD_STARTFILE_PREFIX_1
|
|
-#undef STANDARD_STARTFILE_PREFIX_2
|
|
-#define STANDARD_STARTFILE_PREFIX_1 "/toolchain/lib/"
|
|
-#define STANDARD_STARTFILE_PREFIX_2 ""
|
|
+#define MUSL_DYNAMIC_LINKERX32 "/lib/ld-musl-x32.so.1"
|
|
diff -Naur gcc-9.3.0.orig/gcc/config/i386/linux.h gcc-9.3.0/gcc/config/i386/linux.h
|
|
--- gcc-9.3.0.orig/gcc/config/i386/linux.h 2020-05-24 15:55:29.385659815 -0400
|
|
+++ gcc-9.3.0/gcc/config/i386/linux.h 2020-03-12 07:07:21.000000000 -0400
|
|
@@ -20,12 +20,7 @@
|
|
<http://www.gnu.org/licenses/>. */
|
|
|
|
#define GNU_USER_LINK_EMULATION "elf_i386"
|
|
-#define GLIBC_DYNAMIC_LINKER "/toolchain/lib/ld-linux.so.2"
|
|
+#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2"
|
|
|
|
#undef MUSL_DYNAMIC_LINKER
|
|
-#define MUSL_DYNAMIC_LINKER "/toolchain/lib/ld-musl-i386.so.1"
|
|
-
|
|
-#undef STANDARD_STARTFILE_PREFIX_1
|
|
-#undef STANDARD_STARTFILE_PREFIX_2
|
|
-#define STANDARD_STARTFILE_PREFIX_1 "/toolchain/lib/"
|
|
-#define STANDARD_STARTFILE_PREFIX_2 ""
|
|
+#define MUSL_DYNAMIC_LINKER "/lib/ld-musl-i386.so.1"
|
|
diff -Naur gcc-9.3.0.orig/gcc/config/i386/t-linux64 gcc-9.3.0/gcc/config/i386/t-linux64
|
|
--- gcc-9.3.0.orig/gcc/config/i386/t-linux64 2020-03-12 07:07:21.000000000 -0400
|
|
+++ gcc-9.3.0/gcc/config/i386/t-linux64 2020-05-25 11:23:07.257231934 -0400
|
|
@@ -33,6 +33,6 @@
|
|
comma=,
|
|
MULTILIB_OPTIONS = $(subst $(comma),/,$(TM_MULTILIB_CONFIG))
|
|
MULTILIB_DIRNAMES = $(patsubst m%, %, $(subst /, ,$(MULTILIB_OPTIONS)))
|
|
-MULTILIB_OSDIRNAMES = m64=../lib64$(call if_multiarch,:x86_64-linux-gnu)
|
|
+MULTILIB_OSDIRNAMES = m64=../lib$(call if_multiarch,:x86_64-linux-gnu)
|
|
MULTILIB_OSDIRNAMES+= m32=$(if $(wildcard $(shell echo $(SYSTEM_HEADER_DIR))/../../usr/lib32),../lib32,../lib)$(call if_multiarch,:i386-linux-gnu)
|
|
MULTILIB_OSDIRNAMES+= mx32=../libx32$(call if_multiarch,:x86_64-linux-gnux32)
|
|
diff -Naur gcc-9.3.0.orig/gcc/config/i386/t-linux64.orig gcc-9.3.0/gcc/config/i386/t-linux64.orig
|
|
--- gcc-9.3.0.orig/gcc/config/i386/t-linux64.orig 1969-12-31 19:00:00.000000000 -0500
|
|
+++ gcc-9.3.0/gcc/config/i386/t-linux64.orig 2020-03-12 07:07:21.000000000 -0400
|
|
@@ -0,0 +1,38 @@
|
|
+# Copyright (C) 2002-2019 Free Software Foundation, Inc.
|
|
+#
|
|
+# This file is part of GCC.
|
|
+#
|
|
+# GCC is free software; you can redistribute it and/or modify
|
|
+# it under the terms of the GNU General Public License as published by
|
|
+# the Free Software Foundation; either version 3, or (at your option)
|
|
+# any later version.
|
|
+#
|
|
+# GCC is distributed in the hope that it will be useful,
|
|
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
+# GNU General Public License for more details.
|
|
+#
|
|
+# You should have received a copy of the GNU General Public License
|
|
+# along with GCC; see the file COPYING3. If not see
|
|
+# <http://www.gnu.org/licenses/>.
|
|
+
|
|
+# On Debian, Ubuntu and other derivative distributions, the 32bit libraries
|
|
+# are found in /lib32 and /usr/lib32, /lib64 and /usr/lib64 are symlinks to
|
|
+# /lib and /usr/lib, while other distributions install libraries into /lib64
|
|
+# and /usr/lib64. The LSB does not enforce the use of /lib64 and /usr/lib64,
|
|
+# it doesn't tell anything about the 32bit libraries on those systems. Set
|
|
+# MULTILIB_OSDIRNAMES according to what is found on the target.
|
|
+
|
|
+# To support i386, x86-64 and x32 libraries, the directory structrue
|
|
+# should be:
|
|
+#
|
|
+# /lib has i386 libraries.
|
|
+# /lib64 has x86-64 libraries.
|
|
+# /libx32 has x32 libraries.
|
|
+#
|
|
+comma=,
|
|
+MULTILIB_OPTIONS = $(subst $(comma),/,$(TM_MULTILIB_CONFIG))
|
|
+MULTILIB_DIRNAMES = $(patsubst m%, %, $(subst /, ,$(MULTILIB_OPTIONS)))
|
|
+MULTILIB_OSDIRNAMES = m64=../lib64$(call if_multiarch,:x86_64-linux-gnu)
|
|
+MULTILIB_OSDIRNAMES+= m32=$(if $(wildcard $(shell echo $(SYSTEM_HEADER_DIR))/../../usr/lib32),../lib32,../lib)$(call if_multiarch,:i386-linux-gnu)
|
|
+MULTILIB_OSDIRNAMES+= mx32=../libx32$(call if_multiarch,:x86_64-linux-gnux32)
|
|
diff -Naur gcc-9.3.0.orig/gcc/config/linux.h gcc-9.3.0/gcc/config/linux.h
|
|
--- gcc-9.3.0.orig/gcc/config/linux.h 2020-05-24 15:55:29.385659815 -0400
|
|
+++ gcc-9.3.0/gcc/config/linux.h 2020-03-12 07:07:21.000000000 -0400
|
|
@@ -94,10 +94,10 @@
|
|
GLIBC_DYNAMIC_LINKER must be defined for each target using them, or
|
|
GLIBC_DYNAMIC_LINKER32 and GLIBC_DYNAMIC_LINKER64 for targets
|
|
supporting both 32-bit and 64-bit compilation. */
|
|
-#define UCLIBC_DYNAMIC_LINKER "/toolchain/lib/ld-uClibc.so.0"
|
|
-#define UCLIBC_DYNAMIC_LINKER32 "/toolchain/lib/ld-uClibc.so.0"
|
|
-#define UCLIBC_DYNAMIC_LINKER64 "/toolchain/lib/ld64-uClibc.so.0"
|
|
-#define UCLIBC_DYNAMIC_LINKERX32 "/toolchain/lib/ldx32-uClibc.so.0"
|
|
+#define UCLIBC_DYNAMIC_LINKER "/lib/ld-uClibc.so.0"
|
|
+#define UCLIBC_DYNAMIC_LINKER32 "/lib/ld-uClibc.so.0"
|
|
+#define UCLIBC_DYNAMIC_LINKER64 "/lib/ld64-uClibc.so.0"
|
|
+#define UCLIBC_DYNAMIC_LINKERX32 "/lib/ldx32-uClibc.so.0"
|
|
#define BIONIC_DYNAMIC_LINKER "/system/bin/linker"
|
|
#define BIONIC_DYNAMIC_LINKER32 "/system/bin/linker"
|
|
#define BIONIC_DYNAMIC_LINKER64 "/system/bin/linker64"
|
|
@@ -221,8 +221,3 @@
|
|
# define TARGET_LIBC_HAS_FUNCTION linux_libc_has_function
|
|
|
|
#endif
|
|
-
|
|
-#undef STANDARD_STARTFILE_PREFIX_1
|
|
-#undef STANDARD_STARTFILE_PREFIX_2
|
|
-#define STANDARD_STARTFILE_PREFIX_1 "/toolchain/lib/"
|
|
-#define STANDARD_STARTFILE_PREFIX_2 ""
|