summaryrefslogtreecommitdiff
path: root/binutils/patches/158_ld_system_root.patch
diff options
context:
space:
mode:
Diffstat (limited to 'binutils/patches/158_ld_system_root.patch')
-rw-r--r--binutils/patches/158_ld_system_root.patch36
1 files changed, 36 insertions, 0 deletions
diff --git a/binutils/patches/158_ld_system_root.patch b/binutils/patches/158_ld_system_root.patch
new file mode 100644
index 0000000..c04c72c
--- /dev/null
+++ b/binutils/patches/158_ld_system_root.patch
@@ -0,0 +1,36 @@
+--- a/ld/configure.in
++++ b/ld/configure.in
+@@ -38,7 +38,9 @@
+ *) TARGET_SYSTEM_ROOT=$with_sysroot ;;
+ esac
+
++ if test "x$TARGET_SYSTEM_ROOT" != x/; then
+ TARGET_SYSTEM_ROOT_DEFINE='-DTARGET_SYSTEM_ROOT=\"$(TARGET_SYSTEM_ROOT)\"'
++ fi
+ use_sysroot=yes
+
+ if test "x$prefix" = xNONE; then
+--- a/ld/configure
++++ b/ld/configure
+@@ -4139,7 +4139,9 @@
+ *) TARGET_SYSTEM_ROOT=$with_sysroot ;;
+ esac
+
++ if test "x$TARGET_SYSTEM_ROOT" != x/; then
+ TARGET_SYSTEM_ROOT_DEFINE='-DTARGET_SYSTEM_ROOT=\"$(TARGET_SYSTEM_ROOT)\"'
++ fi
+ use_sysroot=yes
+
+ if test "x$prefix" = xNONE; then
+--- a/ld/ldmain.c
++++ b/ld/ldmain.c
+@@ -214,8 +214,8 @@
+ {
+ if (*TARGET_SYSTEM_ROOT == 0)
+ {
+- einfo ("%P%F: this linker was not configured to use sysroots\n");
+ ld_sysroot = "";
++ ld_canon_sysroot = "";
+ }
+ else
+ ld_canon_sysroot = lrealpath (ld_sysroot);