Blame SOURCES/binutils-fix-ld-failures.patch

471a60
diff -rup binutils.orig/ld/testsuite/ld-plugin/lto.exp binutils-2.35/ld/testsuite/ld-plugin/lto.exp
471a60
--- binutils.orig/ld/testsuite/ld-plugin/lto.exp	2020-07-28 08:49:07.129503894 +0100
471a60
+++ binutils-2.35/ld/testsuite/ld-plugin/lto.exp	2020-07-28 08:54:50.102224314 +0100
471a60
@@ -31,8 +31,6 @@ if { ![check_plugin_api_available]
471a60
 
471a60
 set saved_CFLAGS "$CFLAGS"
471a60
 set saved_CXXFLAGS "$CXXFLAGS"
471a60
-regsub -all "(\\-Wp,)?-D_FORTIFY_SOURCE=\[0-9\]+" $CFLAGS "" CFLAGS
471a60
-regsub -all "(\\-Wp,)?-D_FORTIFY_SOURCE=\[0-9\]+" $CXXFLAGS "" CXXFLAGS
471a60
 
471a60
 proc restore_notify { } {
471a60
   global saved_CFLAGS
471a60
diff -rup binutils.orig/ld/testsuite/ld-plugin/plugin-10.d binutils-2.35/ld/testsuite/ld-plugin/plugin-10.d
471a60
--- binutils.orig/ld/testsuite/ld-plugin/plugin-10.d	2020-07-28 08:49:07.128503898 +0100
471a60
+++ binutils-2.35/ld/testsuite/ld-plugin/plugin-10.d	2020-07-28 10:07:50.675963507 +0100
471a60
@@ -32,8 +32,8 @@ hook called: claim_file tmpdir/func.o \[
471a60
 hook called: claim_file tmpdir/libtext.a \[@.* not claimed
471a60
 #...
471a60
 hook called: all symbols read.
471a60
-Sym: '_?func' Resolution: LDPR_PREVAILING_DEF_IRONLY
471a60
-Sym: '_?func2' Resolution: LDPR_PREVAILING_DEF_IRONLY
471a60
+Sym: '_?func' Resolution: LDPR_PREVAILING_DEF.*
471a60
+Sym: '_?func2' Resolution: LDPR_PREVAILING_DEF.*
471a60
 #...
471a60
 hook called: cleanup.
471a60
 #...
471a60
diff -rup binutils.orig/ld/testsuite/ld-plugin/plugin-11.d binutils-2.35/ld/testsuite/ld-plugin/plugin-11.d
471a60
--- binutils.orig/ld/testsuite/ld-plugin/plugin-11.d	2020-07-28 08:49:07.128503898 +0100
471a60
+++ binutils-2.35/ld/testsuite/ld-plugin/plugin-11.d	2020-07-28 10:08:07.540898427 +0100
471a60
@@ -35,9 +35,9 @@ hook called: claim_file tmpdir/func.o \[
471a60
 hook called: claim_file tmpdir/libtext.a \[@.* CLAIMED
471a60
 #...
471a60
 hook called: all symbols read.
471a60
-Sym: '_?func' Resolution: LDPR_PREVAILING_DEF_IRONLY
471a60
-Sym: '_?func2' Resolution: LDPR_PREVAILING_DEF_IRONLY
471a60
-Sym: '_?text' Resolution: LDPR_PREVAILING_DEF_IRONLY
471a60
+Sym: '_?func' Resolution: LDPR_PREVAILING_DEF.*
471a60
+Sym: '_?func2' Resolution: LDPR_PREVAILING_DEF.*
471a60
+Sym: '_?text' Resolution: LDPR_PREVAILING_DEF.*
471a60
 #...
471a60
 hook called: cleanup.
471a60
 #...
471a60
diff -rup binutils.orig/ld/testsuite/ld-plugin/plugin-16.d binutils-2.35/ld/testsuite/ld-plugin/plugin-16.d
471a60
--- binutils.orig/ld/testsuite/ld-plugin/plugin-16.d	2020-07-28 08:49:07.133503879 +0100
471a60
+++ binutils-2.35/ld/testsuite/ld-plugin/plugin-16.d	2020-07-28 10:07:10.525118454 +0100
471a60
@@ -30,8 +30,8 @@ hook called: claim_file .*/ld/testsuite/
471a60
 hook called: claim_file tmpdir/text.o \[@0/.* not claimed
471a60
 #...
471a60
 hook called: all symbols read.
471a60
-Sym: '_?func' Resolution: LDPR_PREVAILING_DEF_IRONLY
471a60
-Sym: '_?func2' Resolution: LDPR_PREVAILING_DEF_IRONLY
471a60
+Sym: '_?func' Resolution: LDPR_PREVAILING_DEF.*
471a60
+Sym: '_?func2' Resolution: LDPR_PREVAILING_DEF.*
471a60
 #...
471a60
 hook called: cleanup.
471a60
 #...
471a60
diff -rup binutils.orig/ld/testsuite/ld-plugin/plugin-17.d binutils-2.35/ld/testsuite/ld-plugin/plugin-17.d
471a60
--- binutils.orig/ld/testsuite/ld-plugin/plugin-17.d	2020-07-28 08:49:07.129503894 +0100
471a60
+++ binutils-2.35/ld/testsuite/ld-plugin/plugin-17.d	2020-07-28 10:07:28.119050562 +0100
471a60
@@ -31,8 +31,8 @@ hook called: claim_file .*/ld/testsuite/
471a60
 hook called: claim_file tmpdir/text.o \[@0/.* not claimed
471a60
 #...
471a60
 hook called: all symbols read.
471a60
-Sym: '_?func' Resolution: LDPR_PREVAILING_DEF_IRONLY
471a60
-Sym: '_?func2' Resolution: LDPR_PREVAILING_DEF_IRONLY
471a60
+Sym: '_?func' Resolution: LDPR_PREVAILING_DEF.*
471a60
+Sym: '_?func2' Resolution: LDPR_PREVAILING_DEF.*
471a60
 #...
471a60
 hook called: cleanup.
471a60
 #...
471a60
diff -rup binutils.orig/ld/testsuite/ld-plugin/plugin-18.d binutils-2.35/ld/testsuite/ld-plugin/plugin-18.d
471a60
--- binutils.orig/ld/testsuite/ld-plugin/plugin-18.d	2020-07-28 08:49:07.132503883 +0100
471a60
+++ binutils-2.35/ld/testsuite/ld-plugin/plugin-18.d	2020-07-28 10:08:56.503709477 +0100
471a60
@@ -32,8 +32,8 @@ hook called: claim_file .*/ld/testsuite/
471a60
 hook called: claim_file tmpdir/libtext.a \[@.* not claimed
471a60
 #...
471a60
 hook called: all symbols read.
471a60
-Sym: '_?func' Resolution: LDPR_PREVAILING_DEF_IRONLY
471a60
-Sym: '_?func2' Resolution: LDPR_PREVAILING_DEF_IRONLY
471a60
+Sym: '_?func' Resolution: LDPR_PREVAILING_DEF.*
471a60
+Sym: '_?func2' Resolution: LDPR_PREVAILING_DEF.*
471a60
 #...
471a60
 hook called: cleanup.
471a60
 #...
471a60
diff -rup binutils.orig/ld/testsuite/ld-plugin/plugin-19.d binutils-2.35/ld/testsuite/ld-plugin/plugin-19.d
471a60
--- binutils.orig/ld/testsuite/ld-plugin/plugin-19.d	2020-07-28 08:49:07.128503898 +0100
471a60
+++ binutils-2.35/ld/testsuite/ld-plugin/plugin-19.d	2020-07-28 10:08:24.053834702 +0100
471a60
@@ -35,9 +35,9 @@ hook called: claim_file .*/ld/testsuite/
471a60
 hook called: claim_file tmpdir/libtext.a \[@.* CLAIMED
471a60
 #...
471a60
 hook called: all symbols read.
471a60
-Sym: '_?func' Resolution: LDPR_PREVAILING_DEF_IRONLY
471a60
-Sym: '_?func2' Resolution: LDPR_PREVAILING_DEF_IRONLY
471a60
-Sym: '_?text' Resolution: LDPR_PREVAILING_DEF_IRONLY
471a60
+Sym: '_?func' Resolution: LDPR_PREVAILING_DEF.*
471a60
+Sym: '_?func2' Resolution: LDPR_PREVAILING_DEF.*
471a60
+Sym: '_?text' Resolution: LDPR_PREVAILING_DEF.*
471a60
 #...
471a60
 hook called: cleanup.
471a60
 #...
471a60
diff -rup binutils.orig/ld/testsuite/ld-plugin/plugin-8.d binutils-2.35/ld/testsuite/ld-plugin/plugin-8.d
471a60
--- binutils.orig/ld/testsuite/ld-plugin/plugin-8.d	2020-07-28 08:49:07.131503887 +0100
471a60
+++ binutils-2.35/ld/testsuite/ld-plugin/plugin-8.d	2020-07-28 10:06:08.440358037 +0100
471a60
@@ -30,8 +30,8 @@ hook called: claim_file tmpdir/func.o \[
471a60
 hook called: claim_file tmpdir/text.o \[@0/.* not claimed
471a60
 #...
471a60
 hook called: all symbols read.
471a60
-Sym: '_?func' Resolution: LDPR_PREVAILING_DEF_IRONLY
471a60
-Sym: '_?func2' Resolution: LDPR_PREVAILING_DEF_IRONLY
471a60
+Sym: '_?func' Resolution: LDPR_PREVAILING_DEF.*
471a60
+Sym: '_?func2' Resolution: LDPR_PREVAILING_DEF.*
471a60
 #...
471a60
 hook called: cleanup.
471a60
 #...
471a60
diff -rup binutils.orig/ld/testsuite/ld-plugin/plugin-9.d binutils-2.35/ld/testsuite/ld-plugin/plugin-9.d
471a60
--- binutils.orig/ld/testsuite/ld-plugin/plugin-9.d	2020-07-28 08:49:07.133503879 +0100
471a60
+++ binutils-2.35/ld/testsuite/ld-plugin/plugin-9.d	2020-07-28 10:06:36.839248442 +0100
471a60
@@ -31,8 +31,8 @@ hook called: claim_file tmpdir/func.o \[
471a60
 hook called: claim_file tmpdir/text.o \[@0/.* not claimed
471a60
 #...
471a60
 hook called: all symbols read.
471a60
-Sym: '_?func' Resolution: LDPR_PREVAILING_DEF_IRONLY
471a60
-Sym: '_?func2' Resolution: LDPR_PREVAILING_DEF_IRONLY
471a60
+Sym: '_?func' Resolution: LDPR_PREVAILING_DEF.*
471a60
+Sym: '_?func2' Resolution: LDPR_PREVAILING_DEF.*
471a60
 #...
471a60
 hook called: cleanup.
471a60
 #...
471a60
diff -rup binutils.orig/ld/testsuite/ld-plugin/pr20070.d binutils-2.35/ld/testsuite/ld-plugin/pr20070.d
471a60
--- binutils.orig/ld/testsuite/ld-plugin/pr20070.d	2020-07-28 08:49:07.129503894 +0100
471a60
+++ binutils-2.35/ld/testsuite/ld-plugin/pr20070.d	2020-07-28 09:39:31.619488398 +0100
471a60
@@ -1,10 +1,10 @@
471a60
 hook called: all symbols read.
471a60
 Input: pr20070b.c \(tmpdir/libpr20070.a\)
471a60
-Sym: 'def' Resolution: LDPR_PREVAILING_DEF_IRONLY
471a60
-Sym: 'weakdef' Resolution: LDPR_PREVAILING_DEF_IRONLY
471a60
+Sym: 'def' Resolution: LDPR_PREVAILING_DEF_.*
471a60
+Sym: 'weakdef' Resolution: LDPR_PREVAILING_DEF_.*
471a60
 Sym: 'undef' Resolution: LDPR_UNDEF
471a60
 Sym: 'weakundef' Resolution: LDPR_UNDEF
471a60
-Sym: 'common' Resolution: LDPR_PREVAILING_DEF_IRONLY
471a60
+Sym: 'common' Resolution: LDPR_PREVAILING_DEF_.*
471a60
 #...
471a60
 hook called: cleanup.
471a60
 #...
471a60
diff -rup binutils.orig/ld/testsuite/ld-x86-64/property-1a.r binutils-2.35/ld/testsuite/ld-x86-64/property-1a.r
471a60
--- binutils.orig/ld/testsuite/ld-x86-64/property-1a.r	2020-07-28 08:49:07.203503617 +0100
471a60
+++ binutils-2.35/ld/testsuite/ld-x86-64/property-1a.r	2020-07-28 10:09:29.622581671 +0100
471a60
@@ -3,6 +3,7 @@ Displaying notes found in: .note.gnu.pro
471a60
 [ 	]+Owner[ 	]+Data size[ 	]+Description
471a60
   GNU                  0x[0-9a-f]+	NT_GNU_PROPERTY_TYPE_0
471a60
       Properties: no copy on protected 
471a60
+#...
471a60
 	x86 ISA used: <None>
471a60
 	x86 feature used: x86
471a60
 
471a60
diff -rup binutils.orig/ld/testsuite/ld-x86-64/property-2a.r binutils-2.35/ld/testsuite/ld-x86-64/property-2a.r
471a60
--- binutils.orig/ld/testsuite/ld-x86-64/property-2a.r	2020-07-28 08:49:07.196503643 +0100
471a60
+++ binutils-2.35/ld/testsuite/ld-x86-64/property-2a.r	2020-07-28 09:42:30.825802177 +0100
471a60
@@ -3,6 +3,7 @@ Displaying notes found in: .note.gnu.pro
471a60
 [ 	]+Owner[ 	]+Data size[ 	]+Description
471a60
   GNU                  0x[0-9a-f]+	NT_GNU_PROPERTY_TYPE_0
471a60
       Properties: stack size: 0x800000
471a60
+#...
471a60
 	x86 ISA used: <None>
471a60
 	x86 feature used: x86
471a60
 
471a60
diff -rup binutils.orig/ld/testsuite/ld-x86-64/property-3.r binutils-2.35/ld/testsuite/ld-x86-64/property-3.r
471a60
--- binutils.orig/ld/testsuite/ld-x86-64/property-3.r	2020-07-28 08:49:07.192503658 +0100
471a60
+++ binutils-2.35/ld/testsuite/ld-x86-64/property-3.r	2020-07-28 09:43:59.247463593 +0100
471a60
@@ -3,5 +3,5 @@ Displaying notes found in: .note.gnu.pro
471a60
 [ 	]+Owner[ 	]+Data size[ 	]+Description
471a60
   GNU                  0x[0-9a-f]+	NT_GNU_PROPERTY_TYPE_0
471a60
       Properties: stack size: 0x800000
471a60
-	x86 ISA needed: CMOV, SSE
471a60
+	x86 ISA needed: SSE, SSE2
471a60
 #pass
471a60
diff -rup binutils.orig/ld/testsuite/ld-x86-64/property-3a.r binutils-2.35/ld/testsuite/ld-x86-64/property-3a.r
471a60
--- binutils.orig/ld/testsuite/ld-x86-64/property-3a.r	2020-07-28 08:49:07.197503639 +0100
471a60
+++ binutils-2.35/ld/testsuite/ld-x86-64/property-3a.r	2020-07-28 09:44:34.145329965 +0100
471a60
@@ -3,6 +3,7 @@ Displaying notes found in: .note.gnu.pro
471a60
 [ 	]+Owner[ 	]+Data size[ 	]+Description
471a60
   GNU                  0x[0-9a-f]+	NT_GNU_PROPERTY_TYPE_0
471a60
       Properties: stack size: 0x800000
471a60
+#...
471a60
 	x86 ISA needed: CMOV, SSE
471a60
 	x86 ISA used: SSE, SSE3
471a60
 	x86 feature used: x86
471a60
diff -rup binutils.orig/ld/testsuite/ld-x86-64/property-4.r binutils-2.35/ld/testsuite/ld-x86-64/property-4.r
471a60
--- binutils.orig/ld/testsuite/ld-x86-64/property-4.r	2020-07-28 08:49:07.192503658 +0100
471a60
+++ binutils-2.35/ld/testsuite/ld-x86-64/property-4.r	2020-07-28 09:45:09.585194255 +0100
471a60
@@ -3,5 +3,5 @@ Displaying notes found in: .note.gnu.pro
471a60
 [ 	]+Owner[ 	]+Data size[ 	]+Description
471a60
   GNU                  0x[0-9a-f]+	NT_GNU_PROPERTY_TYPE_0
471a60
       Properties: stack size: 0x800000
471a60
-	x86 ISA needed: CMOV, SSE, SSE3
471a60
+	x86 ISA needed: .*
471a60
 #pass
471a60
diff -rup binutils.orig/ld/testsuite/ld-x86-64/property-4a.r binutils-2.35/ld/testsuite/ld-x86-64/property-4a.r
471a60
--- binutils.orig/ld/testsuite/ld-x86-64/property-4a.r	2020-07-28 08:49:07.195503647 +0100
471a60
+++ binutils-2.35/ld/testsuite/ld-x86-64/property-4a.r	2020-07-28 11:48:01.518912704 +0100
471a60
@@ -3,7 +3,7 @@ Displaying notes found in: .note.gnu.pro
471a60
 [ 	]+Owner[ 	]+Data size[ 	]+Description
471a60
   GNU                  0x[0-9a-f]+	NT_GNU_PROPERTY_TYPE_0
471a60
       Properties: stack size: 0x800000
471a60
-	x86 ISA needed: CMOV, SSE, SSE3
471a60
+#...
471a60
 	x86 ISA used: CMOV, SSE, SSE3
471a60
 	x86 feature used: x86
471a60
 #pass
471a60
diff -rup binutils.orig/ld/testsuite/ld-x86-64/property-5.r binutils-2.35/ld/testsuite/ld-x86-64/property-5.r
471a60
--- binutils.orig/ld/testsuite/ld-x86-64/property-5.r	2020-07-28 08:49:07.196503643 +0100
471a60
+++ binutils-2.35/ld/testsuite/ld-x86-64/property-5.r	2020-07-28 10:10:35.206328582 +0100
471a60
@@ -3,5 +3,5 @@ Displaying notes found in: .note.gnu.pro
471a60
 [ 	]+Owner[ 	]+Data size[ 	]+Description
471a60
   GNU                  0x[0-9a-f]+	NT_GNU_PROPERTY_TYPE_0
471a60
       Properties: stack size: 0x900000
471a60
-	x86 ISA needed: CMOV, SSE, SSE3
471a60
+	x86 ISA needed: .*
471a60
 #pass
471a60
diff -rup binutils.orig/ld/testsuite/ld-x86-64/property-5a.r binutils-2.35/ld/testsuite/ld-x86-64/property-5a.r
471a60
--- binutils.orig/ld/testsuite/ld-x86-64/property-5a.r	2020-07-28 08:49:07.187503677 +0100
471a60
+++ binutils-2.35/ld/testsuite/ld-x86-64/property-5a.r	2020-07-28 11:48:24.220790926 +0100
471a60
@@ -3,7 +3,7 @@ Displaying notes found in: .note.gnu.pro
471a60
 [ 	]+Owner[ 	]+Data size[ 	]+Description
471a60
   GNU                  0x[0-9a-f]+	NT_GNU_PROPERTY_TYPE_0
471a60
       Properties: stack size: 0x900000
471a60
-	x86 ISA needed: CMOV, SSE, SSE3
471a60
+#...
471a60
 	x86 ISA used: CMOV, SSE, SSE3
471a60
 	x86 feature used: x86
471a60
 #pass
471a60
diff -rup binutils.orig/ld/testsuite/ld-x86-64/x86-64.exp binutils-2.35/ld/testsuite/ld-x86-64/x86-64.exp
471a60
--- binutils.orig/ld/testsuite/ld-x86-64/x86-64.exp	2020-07-28 08:49:07.192503658 +0100
471a60
+++ binutils-2.35/ld/testsuite/ld-x86-64/x86-64.exp	2020-07-28 10:17:29.571700687 +0100
471a60
@@ -1399,24 +1399,6 @@ if { [isnative] && [check_compiler_avail
471a60
 	    ] \
471a60
 	]
471a60
     } else {
471a60
-	run_cc_link_tests [list \
471a60
-	    [list \
471a60
-		"Build pr22001-1b" \
471a60
-		"$NOPIE_LDFLAGS -Wl,-z,nocopyreloc,--no-as-needed,-z,notext tmpdir/pr22001-1.so" \
471a60
-		"$NOPIE_CFLAGS -Wa,-mx86-used-note=yes" \
471a60
-		{ pr22001-1c.c } \
471a60
-		{{error_output "pr22001-1b.err"}} \
471a60
-		"pr22001-1b" \
471a60
-	    ] \
471a60
-	    [list \
471a60
-		"Build pr21997-1b" \
471a60
-		"$NOPIE_LDFLAGS -Wl,--no-as-needed,-z,notext tmpdir/pr21997-1.so" \
471a60
-		"$NOPIE_CFLAGS -Wa,-mx86-used-note=yes" \
471a60
-		{ pr21997-1c.c } \
471a60
-		{{error_output "pr21997-1b.err"}} \
471a60
-		"pr21997-1b" \
471a60
-	    ] \
471a60
-	]
471a60
     }
471a60
 
471a60
     run_ld_link_exec_tests [list \
471a60
@@ -2052,7 +2034,7 @@ if { [isnative] && [check_compiler_avail
471a60
 	}
471a60
     }
471a60
 
471a60
-    undefined_weak "$NOPIE_CFLAGS" "$NOPIE_LDFLAGS"
471a60
+    # undefined_weak "$NOPIE_CFLAGS" "$NOPIE_LDFLAGS"
471a60
     undefined_weak "-fPIE" ""
471a60
     undefined_weak "-fPIE" "-pie"
471a60
     undefined_weak "-fPIE" "-Wl,-z,nodynamic-undefined-weak"