summaryrefslogtreecommitdiff
path: root/debian/patches/158_ld_system_root.patch
blob: 27c07a636e7f6a2a76003419ee5b8b5e5b1612ed (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
37
38
39
40
41
42
Index: b/ld/configure.ac
===================================================================
--- a/ld/configure.ac
+++ b/ld/configure.ac
@@ -56,7 +56,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
Index: b/ld/configure
===================================================================
--- a/ld/configure
+++ b/ld/configure
@@ -4283,7 +4283,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
Index: b/ld/ldmain.c
===================================================================
--- a/ld/ldmain.c
+++ b/ld/ldmain.c
@@ -226,8 +226,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);