summaryrefslogtreecommitdiff
path: root/binutils/patches/158_ld_system_root.patch
blob: c04c72ce098d7689bcc87d5538ec7cdecf0eb48f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
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);