Compare commits
2 Commits
Author | SHA1 | Date | |
---|---|---|---|
ee20250f8b | |||
|
34fb62d516 |
176
SOURCES/binutils-AMD-znver5.patch
Normal file
176
SOURCES/binutils-AMD-znver5.patch
Normal file
@ -0,0 +1,176 @@
|
||||
diff -rupN binutils.orig/gas/config/tc-i386.c binutils-2.40/gas/config/tc-i386.c
|
||||
--- binutils.orig/gas/config/tc-i386.c 2024-02-13 16:41:10.787729089 +0000
|
||||
+++ binutils-2.40/gas/config/tc-i386.c 2024-02-13 16:52:35.402669140 +0000
|
||||
@@ -998,6 +998,7 @@ static const arch_entry cpu_arch[] =
|
||||
ARCH (znver2, ZNVER, ZNVER2, false),
|
||||
ARCH (znver3, ZNVER, ZNVER3, false),
|
||||
ARCH (znver4, ZNVER, ZNVER4, false),
|
||||
+ ARCH (znver5, ZNVER, ZNVER5, false),
|
||||
ARCH (btver1, BT, BTVER1, false),
|
||||
ARCH (btver2, BT, BTVER2, false),
|
||||
|
||||
diff -rupN binutils.orig/gas/doc/c-i386.texi binutils-2.40/gas/doc/c-i386.texi
|
||||
--- binutils.orig/gas/doc/c-i386.texi 2024-02-13 16:41:10.789729089 +0000
|
||||
+++ binutils-2.40/gas/doc/c-i386.texi 2024-02-13 16:52:35.572669132 +0000
|
||||
@@ -125,6 +125,7 @@ processor names are recognized:
|
||||
@code{znver2},
|
||||
@code{znver3},
|
||||
@code{znver4},
|
||||
+@code{znver5},
|
||||
@code{btver1},
|
||||
@code{btver2},
|
||||
@code{generic32} and
|
||||
@@ -1477,7 +1478,8 @@ supported on the CPU specified. The cho
|
||||
@item @samp{k6} @tab @samp{k6_2} @tab @samp{athlon} @tab @samp{k8}
|
||||
@item @samp{amdfam10} @tab @samp{bdver1} @tab @samp{bdver2} @tab @samp{bdver3}
|
||||
@item @samp{bdver4} @tab @samp{znver1} @tab @samp{znver2} @tab @samp{znver3}
|
||||
-@item @samp{znver4} @tab @samp{btver1} @tab @samp{btver2} @tab @samp{generic32}
|
||||
+@item @samp{znver4} @tab @samp{znver5} @tab @samp{btver1} @tab @samp{btver2}
|
||||
+@item @samp{generic32}
|
||||
@item @samp{generic64} @tab @samp{.cmov} @tab @samp{.fxsr} @tab @samp{.mmx}
|
||||
@item @samp{.sse} @tab @samp{.sse2} @tab @samp{.sse3} @tab @samp{.sse4a}
|
||||
@item @samp{.ssse3} @tab @samp{.sse4.1} @tab @samp{.sse4.2} @tab @samp{.sse4}
|
||||
diff -rupN binutils.orig/gas/testsuite/gas/i386/arch-15-znver5.d binutils-2.40/gas/testsuite/gas/i386/arch-15-znver5.d
|
||||
--- binutils.orig/gas/testsuite/gas/i386/arch-15-znver5.d 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ binutils-2.40/gas/testsuite/gas/i386/arch-15-znver5.d 2024-02-13 16:52:35.405669140 +0000
|
||||
@@ -0,0 +1,5 @@
|
||||
+#source: arch-15.s
|
||||
+#as: -march=znver5
|
||||
+#objdump: -dw
|
||||
+#name: i386 arch 15 (znver5)
|
||||
+#dump: arch-15.d
|
||||
diff -rupN binutils.orig/gas/testsuite/gas/i386/arch-15.d binutils-2.40/gas/testsuite/gas/i386/arch-15.d
|
||||
--- binutils.orig/gas/testsuite/gas/i386/arch-15.d 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ binutils-2.40/gas/testsuite/gas/i386/arch-15.d 2024-02-13 16:52:35.405669140 +0000
|
||||
@@ -0,0 +1,13 @@
|
||||
+#objdump: -dw
|
||||
+#name: i386 arch 15
|
||||
+
|
||||
+.*: file format .*
|
||||
+
|
||||
+Disassembly of section .text:
|
||||
+
|
||||
+0+ <.text>:
|
||||
+[ ]*[a-f0-9]+:[ ]*c4 e2 59 50 d2[ ]*\{vex\} vpdpbusd %xmm2,%xmm4,%xmm2
|
||||
+[ ]*[a-f0-9]+:[ ]*0f 38 f9 01[ ]*movdiri %eax,\(%ecx\)
|
||||
+[ ]*[a-f0-9]+:[ ]*66 0f 38 f8 01[ ]*movdir64b \(%ecx\),%eax
|
||||
+[ ]*[a-f0-9]+:[ ]*62 f2 6f 48 68 d9[ ]*vp2intersectd %zmm1,%zmm2,%k3
|
||||
+#pass
|
||||
diff -rupN binutils.orig/gas/testsuite/gas/i386/arch-15.s binutils-2.40/gas/testsuite/gas/i386/arch-15.s
|
||||
--- binutils.orig/gas/testsuite/gas/i386/arch-15.s 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ binutils-2.40/gas/testsuite/gas/i386/arch-15.s 2024-02-13 16:52:35.405669140 +0000
|
||||
@@ -0,0 +1,7 @@
|
||||
+# Test -march=
|
||||
+ .text
|
||||
+
|
||||
+ {vex} vpdpbusd %xmm2, %xmm4, %xmm2 #AVX_VNNI
|
||||
+ movdiri %eax, (%ecx) #MOVDIRI
|
||||
+ movdir64b (%ecx), %eax #MOVDIR64B
|
||||
+ vp2intersectd %zmm1, %zmm2, %k3 #AVX512_VP2INTERSECT
|
||||
diff -rupN binutils.orig/gas/testsuite/gas/i386/i386.exp binutils-2.40/gas/testsuite/gas/i386/i386.exp
|
||||
--- binutils.orig/gas/testsuite/gas/i386/i386.exp 2024-02-13 16:41:10.859729082 +0000
|
||||
+++ binutils-2.40/gas/testsuite/gas/i386/i386.exp 2024-02-13 16:52:35.405669140 +0000
|
||||
@@ -199,6 +199,7 @@ if [gas_32_check] then {
|
||||
run_dump_test "arch-13-znver2"
|
||||
run_dump_test "arch-14-znver3"
|
||||
run_dump_test "arch-14-znver4"
|
||||
+ run_dump_test "arch-15-znver5"
|
||||
run_dump_test "arch-10-btver1"
|
||||
run_dump_test "arch-10-btver2"
|
||||
run_list_test "arch-10-1" "-march=generic32 -I${srcdir}/$subdir -al"
|
||||
@@ -211,6 +212,7 @@ if [gas_32_check] then {
|
||||
run_dump_test "arch-13"
|
||||
run_dump_test "arch-14"
|
||||
run_dump_test "arch-14-1"
|
||||
+ run_dump_test "arch-15"
|
||||
run_list_test "arch-dflt" "-march=generic32 -al"
|
||||
run_list_test "arch-stk" "-march=generic32 -al"
|
||||
run_dump_test "8087"
|
||||
diff -rupN binutils.orig/gas/testsuite/gas/i386/x86-64-arch-5-znver5.d binutils-2.40/gas/testsuite/gas/i386/x86-64-arch-5-znver5.d
|
||||
--- binutils.orig/gas/testsuite/gas/i386/x86-64-arch-5-znver5.d 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ binutils-2.40/gas/testsuite/gas/i386/x86-64-arch-5-znver5.d 2024-02-13 16:52:35.406669140 +0000
|
||||
@@ -0,0 +1,5 @@
|
||||
+#source: x86-64-arch-5.s
|
||||
+#as: -march=znver5
|
||||
+#objdump: -dw
|
||||
+#name: x86-64 arch 5 (znver5)
|
||||
+#dump: x86-64-arch-5.d
|
||||
diff -rupN binutils.orig/gas/testsuite/gas/i386/x86-64-arch-5.d binutils-2.40/gas/testsuite/gas/i386/x86-64-arch-5.d
|
||||
--- binutils.orig/gas/testsuite/gas/i386/x86-64-arch-5.d 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ binutils-2.40/gas/testsuite/gas/i386/x86-64-arch-5.d 2024-02-13 16:52:35.406669140 +0000
|
||||
@@ -0,0 +1,14 @@
|
||||
+#objdump: -dw
|
||||
+#name: x86-64 arch 5
|
||||
+
|
||||
+.*: file format .*
|
||||
+
|
||||
+Disassembly of section .text:
|
||||
+
|
||||
+0+ <.text>:
|
||||
+[ ]*[a-f0-9]+:[ ]*c4 c2 59 50 d4[ ]*\{vex\} vpdpbusd %xmm12,%xmm4,%xmm2
|
||||
+[ ]*[a-f0-9]+:[ ]*48 0f 38 f9 01[ ]*movdiri %rax,\(%rcx\)
|
||||
+[ ]*[a-f0-9]+:[ ]*66 0f 38 f8 01[ ]*movdir64b \(%rcx\),%rax
|
||||
+[ ]*[a-f0-9]+:[ ]*62 f2 6f 48 68 d9[ ]*vp2intersectd %zmm1,%zmm2,%k3
|
||||
+[ ]*[a-f0-9]+:[ ]*0f 18 3d 78 56 34 12[ ]*prefetchit0 0x12345678\(%rip\) # 0x[0-9a-f]+
|
||||
+#pass
|
||||
diff -rupN binutils.orig/gas/testsuite/gas/i386/x86-64-arch-5.s binutils-2.40/gas/testsuite/gas/i386/x86-64-arch-5.s
|
||||
--- binutils.orig/gas/testsuite/gas/i386/x86-64-arch-5.s 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ binutils-2.40/gas/testsuite/gas/i386/x86-64-arch-5.s 2024-02-13 16:52:35.406669140 +0000
|
||||
@@ -0,0 +1,8 @@
|
||||
+# Test -march=
|
||||
+ .text
|
||||
+
|
||||
+ {vex} vpdpbusd %xmm12, %xmm4, %xmm2 #AVX_VNNI
|
||||
+ movdiri %rax, (%rcx) #MOVDIRI
|
||||
+ movdir64b (%rcx), %rax #MOVDIR64B
|
||||
+ vp2intersectd %zmm1, %zmm2, %k3 #AVX512_VP2INTERSECT
|
||||
+ prefetchit0 0x12345678(%rip) #prefetchi
|
||||
diff -rupN binutils.orig/opcodes/i386-gen.c binutils-2.40/opcodes/i386-gen.c
|
||||
--- binutils.orig/opcodes/i386-gen.c 2024-02-13 16:41:11.145729056 +0000
|
||||
+++ binutils-2.40/opcodes/i386-gen.c 2024-02-13 16:52:35.406669140 +0000
|
||||
@@ -97,6 +97,8 @@ static const dependency isa_dependencies
|
||||
"ZNVER2|INVLPGB|TLBSYNC|VAES|VPCLMULQDQ|INVPCID|SNP|OSPKE" },
|
||||
{ "ZNVER4",
|
||||
"ZNVER3|AVX512F|AVX512DQ|AVX512IFMA|AVX512CD|AVX512BW|AVX512VL|AVX512_BF16|AVX512VBMI|AVX512_VBMI2|AVX512_VNNI|AVX512_BITALG|AVX512_VPOPCNTDQ|GFNI|RMPQUERY" },
|
||||
+ { "ZNVER5",
|
||||
+ "ZNVER4|AVX_VNNI|MOVDIRI|MOVDIR64B|AVX512_VP2INTERSECT|PREFETCHI" },
|
||||
{ "BTVER1",
|
||||
"GENERIC64|FISTTP|CX16|Rdtscp|SSSE3|SSE4A|ABM|PRFCHW|CX16|Clflush|FISTTP|SVME" },
|
||||
{ "BTVER2",
|
||||
diff -rupN binutils.orig/opcodes/i386-init.h binutils-2.40/opcodes/i386-init.h
|
||||
--- binutils.orig/opcodes/i386-init.h 2024-02-13 16:41:11.145729056 +0000
|
||||
+++ binutils-2.40/opcodes/i386-init.h 2024-02-13 17:32:50.339735343 +0000
|
||||
@@ -1431,6 +1431,15 @@
|
||||
1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, \
|
||||
0, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0 } }
|
||||
|
||||
+#define CPU_ZNVER5_FLAGS \
|
||||
+ { { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 0, \
|
||||
+ 0, 1, 0, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, \
|
||||
+ 1, 0, 1, 1, 1, 1, 1, 0, 0, 0, 1, 0, 1, 1, 0, 1, 1, 1, 1, 1, \
|
||||
+ 0, 0, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 0, \
|
||||
+ 0, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, \
|
||||
+ 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 0, \
|
||||
+ 0, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0 } }
|
||||
+
|
||||
#define CPU_BTVER1_FLAGS \
|
||||
{ { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 0, \
|
||||
0, 1, 0, 1, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \
|
||||
--- binutils.orig/gas/testsuite/gas/i386/i386.exp 2024-02-22 12:25:43.212505914 +0000
|
||||
+++ binutils-2.40/gas/testsuite/gas/i386/i386.exp 2024-02-22 12:28:26.254563823 +0000
|
||||
@@ -922,6 +922,7 @@ if [gas_64_check] then {
|
||||
run_dump_test "x86-64-arch-4"
|
||||
run_dump_test "x86-64-arch-4-1"
|
||||
run_dump_test "rmpquery"
|
||||
+ run_dump_test "x86-64-arch-5"
|
||||
run_dump_test "x86-64-arch-2-lzcnt"
|
||||
run_dump_test "x86-64-arch-2-prefetchw"
|
||||
run_dump_test "x86-64-arch-2-bdver1"
|
||||
@@ -932,6 +933,7 @@ if [gas_64_check] then {
|
||||
run_dump_test "x86-64-arch-3-znver2"
|
||||
run_dump_test "x86-64-arch-4-znver3"
|
||||
run_dump_test "x86-64-arch-4-znver4"
|
||||
+ run_dump_test "x86-64-arch-5-znver5"
|
||||
run_dump_test "x86-64-arch-2-btver1"
|
||||
run_dump_test "x86-64-arch-2-btver2"
|
||||
run_list_test "x86-64-arch-2-1" "-march=generic64 -I${srcdir}/$subdir -al"
|
@ -1125,3 +1125,109 @@ diff -rup binutils.orig/ld/testsuite/ld-elf/tls.exp binutils-2.40/ld/testsuite/l
|
||||
# Check to see if the C compiler works.
|
||||
if { ![check_compiler_available] } {
|
||||
return
|
||||
--- binutils.orig/ld/testsuite/ld-elf/indirect.exp 2023-04-25 09:59:06.491645786 +0100
|
||||
+++ binutils-2.40/ld/testsuite/ld-elf/indirect.exp 2023-04-25 10:00:53.347435547 +0100
|
||||
@@ -160,12 +160,6 @@ set run_tests {
|
||||
{"Run with libindirect4c.so 4"
|
||||
"-Wl,--no-as-needed tmpdir/libindirect4c.so tmpdir/indirect4b.o tmpdir/indirect4a.o" ""
|
||||
{dummy.c} "indirect4d" "indirect4.out"}
|
||||
- {"Run indirect5 1"
|
||||
- "$NOPIE_LDFLAGS -Wl,--no-as-needed tmpdir/libindirect5.so" ""
|
||||
- {indirect5a.c} "indirect5a" "indirect5.out" "$NOPIE_CFLAGS"}
|
||||
- {"Run indirect5 2"
|
||||
- "$NOPIE_LDFLAGS -Wl,--no-as-needed tmpdir/indirect5a.o tmpdir/libindirect5.so" ""
|
||||
- {dummy.c} "indirect5b" "indirect5.out" "$NOPIE_CFLAGS"}
|
||||
{"Run indirect6 1"
|
||||
"$NOPIE_LDFLAGS -Wl,--no-as-needed tmpdir/libindirect5.so" ""
|
||||
{indirect6a.c} "indirect6a" "indirect5.out" "$NOPIE_CFLAGS"}
|
||||
@@ -217,15 +211,6 @@ proc check_dynamic_syms { test } {
|
||||
return 1
|
||||
}
|
||||
|
||||
-foreach t [list indirect5a indirect5b indirect6a indirect6b] {
|
||||
- set testname [concat $t "dynsym"]
|
||||
- if { [check_dynamic_syms tmpdir/$t] } {
|
||||
- pass $testname
|
||||
- } else {
|
||||
- fail $testname
|
||||
- }
|
||||
-}
|
||||
-
|
||||
send_log "$CC_FOR_TARGET -fPIE -pie $srcdir/$subdir/main.c -o tmpdir/pie"
|
||||
catch "exec $CC_FOR_TARGET -fPIE -pie $srcdir/$subdir/main.c -o tmpdir/pie" exec_output
|
||||
send_log "$exec_output"
|
||||
@@ -234,12 +219,6 @@ if { ! [string match "" $exec_output] }
|
||||
}
|
||||
|
||||
set pie_tests {
|
||||
- {"Run indirect5 3"
|
||||
- "-pie -Wl,--no-as-needed tmpdir/libindirect5.so" ""
|
||||
- {indirect5a.c} "indirect5c" "indirect5.out" "-fPIE"}
|
||||
- {"Run indirect5 4"
|
||||
- "-pie -Wl,--no-as-needed tmpdir/indirect5a.o tmpdir/libindirect5.so" ""
|
||||
- {dummy.c} "indirect5d" "indirect5.out" "-fPIE"}
|
||||
{"Run indirect6 3"
|
||||
"-pie -Wl,--no-as-needed tmpdir/libindirect5.so" ""
|
||||
{indirect6a.c} "indirect6c" "indirect5.out" "-fPIE"}
|
||||
@@ -250,7 +229,7 @@ set pie_tests {
|
||||
|
||||
run_ld_link_exec_tests $pie_tests
|
||||
|
||||
-foreach t [list indirect5c indirect5d indirect6c indirect6d] {
|
||||
+foreach t [list indirect6c indirect6d] {
|
||||
set testname [concat $t "dynsym"]
|
||||
if { [check_dynamic_syms tmpdir/$t] } {
|
||||
pass $testname
|
||||
--- binutils.orig/ld/testsuite/ld-vsb/vsb.exp 2023-04-25 09:59:06.671645424 +0100
|
||||
+++ binutils-2.40/ld/testsuite/ld-vsb/vsb.exp 2023-04-25 10:40:56.526332345 +0100
|
||||
@@ -513,6 +513,11 @@ if { [istarget mips*-*-*] && ! [at_least
|
||||
set picflag "-KPIC"
|
||||
}
|
||||
}
|
||||
+
|
||||
+if { [istarget s390x*-*-linux*] } {
|
||||
+ return
|
||||
+}
|
||||
+
|
||||
verbose "Using $picflag to compile PIC code"
|
||||
|
||||
visibility_run hidden
|
||||
--- binutils.orig/ld/testsuite/ld-shared/shared.exp 2023-04-25 09:59:06.652645462 +0100
|
||||
+++ binutils-2.40/ld/testsuite/ld-shared/shared.exp 2023-04-25 11:00:01.019876693 +0100
|
||||
@@ -263,7 +263,7 @@ if ![ld_compile "$CC_FOR_TARGET $SHCFLAG
|
||||
setup_xfail "x86_64-*-linux*"
|
||||
}
|
||||
setup_xfail "x86_64-*-linux-gnux32"
|
||||
- setup_xfail "s390x-*-linux*"
|
||||
+
|
||||
if [ string match $shared_needs_pic "yes" ] {
|
||||
setup_xfail "arm*-*-linux*"
|
||||
}
|
||||
--- binutils.orig/ld/testsuite/ld-ctf/slice.d 2023-08-03 10:14:42.141231721 +0100
|
||||
+++ binutils-2.40/ld/testsuite/ld-ctf/slice.d 2023-08-03 10:17:52.161503327 +0100
|
||||
@@ -24,10 +24,10 @@ Contents of CTF section .ctf:
|
||||
Types:
|
||||
#...
|
||||
0x[0-9a-f]*: \(kind 6\) struct slices \(size 0x[0-9a-f]*\) \(aligned at 0x[0-9a-f]*\)
|
||||
- *\[0x0\] one: ID 0x[0-9a-f]*: \(kind 1\) int:1 \[slice 0x0:0x1\] \(format 0x1\) \(size 0x1\) \(aligned at 0x1\)
|
||||
- *\[0x1\] two: ID 0x[0-9a-f]*: \(kind 1\) int:2 \[slice 0x0:0x2\] \(format 0x1\) \(size 0x1\) \(aligned at 0x1\)
|
||||
- *\[0x3\] six: ID 0x[0-9a-f]*: \(kind 1\) int:6 \[slice 0x0:0x6\] \(format 0x1\) \(size 0x1\) \(aligned at 0x1\)
|
||||
- *\[0x9\] ten: ID 0x[0-9a-f]*: \(kind 1\) int:10 \[slice 0x0:0xa\] \(format 0x1\) \(size 0x2\) \(aligned at 0x2\)
|
||||
- *\[0x13\] bar: ID 0x[0-9a-f]*: \(kind 8\) enum foo:1 \[slice 0x0:0x1\] \(format 0x1\) \(size 0x1\) \(aligned at 0x1\)
|
||||
+ *\[0x0\] one: ID 0x[0-9a-f]*: \(kind 1\) int:1 \[slice 0x.:0x1\] \(format 0x1\) \(size 0x1\) \(aligned at 0x1\)
|
||||
+ *\[0x.\] two: ID 0x[0-9a-f]*: \(kind 1\) int:2 \[slice 0x.:0x2\] \(format 0x1\) \(size 0x1\) \(aligned at 0x1\)
|
||||
+ *\[0x.\] six: ID 0x[0-9a-f]*: \(kind 1\) int:6 \[slice 0x.:0x6\] \(format 0x1\) \(size 0x1\) \(aligned at 0x1\)
|
||||
+ *\[0x.\] ten: ID 0x[0-9a-f]*: \(kind 1\) int:10 \[slice 0x.:0xa\] \(format 0x1\) \(size 0x2\) \(aligned at 0x2\)
|
||||
+ *\[0x.*\] bar: ID 0x[0-9a-f]*: \(kind 8\) enum foo:1 \[slice 0x.*:0x1\] \(format 0x1\) \(size 0x1\) \(aligned at 0x1\)
|
||||
|
||||
#...
|
||||
--- binutils.orig/ld/testsuite/ld-shared/shared.exp 2023-08-03 16:29:35.541625154 +0100
|
||||
+++ binutils-2.40/ld/testsuite/ld-shared/shared.exp 2023-08-03 16:38:09.990388416 +0100
|
||||
@@ -270,6 +270,7 @@ if ![ld_compile "$CC_FOR_TARGET $SHCFLAG
|
||||
setup_xfail "aarch64*-*-linux*"
|
||||
# Solaris defaults to -z text.
|
||||
setup_xfail "*-*-solaris2*"
|
||||
+ setup_xfail "s390*-*-*"
|
||||
shared_test shnp "shared (non PIC, load offset)" \
|
||||
mainnp.o sh1np.o sh2np.o shared \
|
||||
"-Wl,-T,$srcdir/$subdir/elf-offset.ld,--hash-style=sysv"
|
||||
|
@ -9,7 +9,7 @@ BuildRequires: scl-utils-build
|
||||
Summary: A GNU collection of binary utilities
|
||||
Name: %{?scl_prefix}binutils
|
||||
Version: 2.40
|
||||
Release: 12%{?dist}
|
||||
Release: 21%{?dist}
|
||||
License: GPLv3+
|
||||
URL: https://sourceware.org/binutils
|
||||
|
||||
@ -26,7 +26,7 @@ URL: https://sourceware.org/binutils
|
||||
# --without docs Skip building documentation. Default is with docs, except when building a cross binutils.
|
||||
# --without gold Disable building of the GOLD linker.
|
||||
# --without gprofng Do not build the GprofNG profiler.
|
||||
# --without systemzlib Use the binutils version of zlib.
|
||||
# --with systemzlib Use the binutils version of zlib.
|
||||
# --without testsuite Do not run the testsuite. Default is to run it.
|
||||
|
||||
# Other configuration options can be set by modifying the following defines.
|
||||
@ -95,9 +95,9 @@ URL: https://sourceware.org/binutils
|
||||
%bcond_without debuginfod
|
||||
# Default: build binutils-gprofng package.
|
||||
%bcond_without gprofng
|
||||
# Use the system supplied version of the zlib compress library.
|
||||
# Default: Do not use the system supplied version of the zlib compression library.
|
||||
# Change this to use the binutils builtin version instead.
|
||||
%bcond_without systemzlib
|
||||
%bcond_with systemzlib
|
||||
|
||||
# Allow the user to override the compiler used to build the binutils.
|
||||
# The default build compiler is gcc if %%toolchain is not clang.
|
||||
@ -277,6 +277,10 @@ Patch20: binutils-reloc-symtab.patch
|
||||
# Lifetime: Fixed in 2.41
|
||||
Patch21: binutils-CVE-2023-1972.patch
|
||||
|
||||
# Purpose: Add support for AMD's znver5 architecture extension.
|
||||
# Lifetime: Fixed in 2.42
|
||||
Patch22: binutils-AMD-znver5.patch
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
|
||||
Provides: bundled(libiberty)
|
||||
@ -300,15 +304,11 @@ BuildRequires: clang compiler-rt
|
||||
# that will be used by consumers of GTS binutils.
|
||||
# Note - during GTS bootstrap these have to be changed to the systemOS versions.
|
||||
BuildRequires: %{?scl_prefix}gcc
|
||||
BuildRequires: %{?scl_prefix}annobin-plugin-gcc
|
||||
BuildRequires: %{?scl_prefix}gcc-c++
|
||||
%define gcc_for_libraries %{?_scl_root}/usr/bin/gcc
|
||||
%define gxx_for_libraries %{?_scl_root}/usr/bin/g++
|
||||
|
||||
BuildRequires: gcc
|
||||
BuildRequires: gcc-c++
|
||||
%define gcc_for_libraries gcc
|
||||
%define gxx_for_libraries g++
|
||||
|
||||
# Note - during GTS bootstrap it may be necessary to build the binutils without
|
||||
# annobin annotations.
|
||||
# %%undefine _annotated_build
|
||||
@ -353,7 +353,7 @@ Requires(post): %{alternatives_cmd}
|
||||
Requires(preun): %{alternatives_cmd}
|
||||
|
||||
# We also need rm.
|
||||
Requires(post): coreutils
|
||||
Requires(post): coreutils policycoreutils
|
||||
|
||||
%if %{with gold}
|
||||
# For now we make the binutils package require the gold sub-package.
|
||||
@ -962,29 +962,35 @@ install_binutils()
|
||||
%endif
|
||||
|
||||
# Rebuild the static libiaries with -fPIC.
|
||||
# It would be nice to build the static libraries with -fno-lto so that
|
||||
# they can be used by programs that are built with a different version
|
||||
# of GCC from the one used to build the libraries, but this will trigger
|
||||
# warnings from annocheck.
|
||||
#
|
||||
# Also disable LTO. This is because older versions of GCC can crash if
|
||||
# asked to parse the LTO information generated by newer versions.
|
||||
# cf: https://issues.redhat.com/browse/RHEL-18800
|
||||
#
|
||||
# Note - disabling LTO does mean that the binutils will be flagged by
|
||||
# annocheck as being non-compliant. There is not a lot that can be
|
||||
# done about this. :-(
|
||||
|
||||
local static_cflags="-g $RPM_OPT_FLAGS -fPIC -fno-lto"
|
||||
|
||||
# Future: Remove libiberty together with its header file, projects should bundle it.
|
||||
%make_build -s -C libiberty clean
|
||||
%set_build_flags
|
||||
%make_build -s CFLAGS="-g -fPIC $RPM_OPT_FLAGS" -C libiberty
|
||||
%make_build -s -C libiberty CFLAGS="$static_cflags"
|
||||
|
||||
# Without the hidden visibility the 3rd party shared libraries would export
|
||||
# the bfd non-stable ABI.
|
||||
%make_build -s -C bfd clean
|
||||
%set_build_flags
|
||||
%make_build -s CFLAGS="-g -fPIC $RPM_OPT_FLAGS -fvisibility=hidden" LD=%gcc_for_libraries -C bfd
|
||||
%make_build -s -C bfd CFLAGS="$static_cflags -fvisibility=hidden" LD=%gcc_for_libraries
|
||||
|
||||
%make_build -s -C opcodes clean
|
||||
%set_build_flags
|
||||
%make_build -s CFLAGS="-g -fPIC $RPM_OPT_FLAGS" -C opcodes
|
||||
%make_build -s -C opcodes CFLAGS="$static_cflags"
|
||||
|
||||
%make_build -s -C libsframe clean
|
||||
%set_build_flags
|
||||
%make_build -s CFLAGS="-g -fPIC $RPM_OPT_FLAGS" -C libsframe
|
||||
%make_build -s -C libsframe CFLAGS="$static_cflags"
|
||||
|
||||
install -m 644 bfd/libbfd.a $local_libdir
|
||||
install -m 644 libiberty/libiberty.a $local_libdir
|
||||
@ -1109,15 +1115,6 @@ export QA_RPATHS=0x0003
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
|
||||
%if %{with gold}
|
||||
%post gold
|
||||
|
||||
%{alternatives_cmdline} --install %{_bindir}/ld ld \
|
||||
%{_bindir}/ld.gold %{ld_gold_priority}
|
||||
|
||||
exit 0
|
||||
%endif
|
||||
|
||||
%post
|
||||
|
||||
%__rm -f %{_bindir}/ld
|
||||
@ -1129,8 +1126,43 @@ exit 0
|
||||
|
||||
%ldconfig_post
|
||||
|
||||
# BZ 2232410: We cannot be sure that the GTS runtime rpm has restored the SE context.
|
||||
restorecon -R %{_scl_root}/usr/share/locale
|
||||
|
||||
# RHEL-22817: Restore the SELinux context of the bfd-plugins.
|
||||
restorecon -R %{_libdir}
|
||||
|
||||
exit 0
|
||||
|
||||
#------------------
|
||||
|
||||
%post devel
|
||||
# RHEL-22818: Restore the SELinux context of the libraries.
|
||||
restorecon -R %{_libdir}
|
||||
exit 0
|
||||
|
||||
#------------------
|
||||
|
||||
%if %{with gprofng}
|
||||
%post gprofng
|
||||
# RHEL-22817: Restire the SELinux context of the gprofng libraries.
|
||||
restorecon -R %{_libdir}
|
||||
# And the rc file.
|
||||
restorecon /opt/rh/gcc-toolset-13/root/usr/etc/gprofng.rc
|
||||
exit 0
|
||||
%endif
|
||||
|
||||
#------------------
|
||||
|
||||
%if %{with gold}
|
||||
%post gold
|
||||
|
||||
%{alternatives_cmdline} --install %{_bindir}/ld ld \
|
||||
%{_bindir}/ld.gold %{ld_gold_priority}
|
||||
|
||||
exit 0
|
||||
%endif
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
|
||||
# Note: $1 == 0 means that there is an uninstall in progress.
|
||||
@ -1185,9 +1217,10 @@ exit 0
|
||||
%license COPYING COPYING3 COPYING3.LIB COPYING.LIB
|
||||
%doc README
|
||||
%{_bindir}/[!l]*
|
||||
# %%verify(symlink) does not work for some reason, so using "owner" instead.
|
||||
# %%verify(symlink) is not support in RHEL, so check owner instead.
|
||||
%verify(owner) %{_bindir}/ld
|
||||
%{_bindir}/ld.bfd
|
||||
# The mtime check fails for ld.bfd because of the laternatives mechanism, so ignore it.
|
||||
%verify(owner) %{_bindir}/ld.bfd
|
||||
|
||||
%if %{with gprofng}
|
||||
%exclude %{_bindir}/gp-*
|
||||
@ -1280,18 +1313,50 @@ exit 0
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
%changelog
|
||||
* Thu Feb 22 2024 Nick Clifton <nickc@redhat.com> - 2.40-21
|
||||
- Run x86_64 assembler tests for znver5 architecture extension. (RHEL-25405)
|
||||
|
||||
* Tue Feb 13 2024 Nick Clifton <nickc@redhat.com> - 2.40-20
|
||||
- Add support for AMD's znver5 architecture extension. (RHEL-25405)
|
||||
|
||||
* Fri Feb 09 2024 Nick Clifton <nickc@redhat.com> - 2.40-19
|
||||
- Spec File: Restore the SElinux context to %%{_libdir}. (RHEL-22817)
|
||||
- [2.40-18: was a failed attempt to fix RHEL-22817]
|
||||
|
||||
* Thu Jan 11 2024 Nick Clifton <nickc@redhat.com> - 2.40-17
|
||||
- Spec File: Do not use of the system zlib by default. (RHEL-19373)
|
||||
- Spec File: Do not check the mtime of ld.bfd. (RHEL-21303)
|
||||
|
||||
* Tue Dec 12 2023 Nick Clifton <nickc@redhat.com> - 2.40-16
|
||||
- Disable building static libraries with LTO. (RHEL-18800)
|
||||
|
||||
* Mon Sep 11 2023 Nick Clifton <nickc@redhat.com> - 2.40-15
|
||||
- Restore the SE context during the post install phase. (#2232410)
|
||||
|
||||
* Thu Aug 03 2023 Nick Clifton <nickc@redhat.com> - 2.40-14
|
||||
- Add expected linker test failure for s390x. (#2228870)
|
||||
|
||||
* Thu Aug 03 2023 Nick Clifton <nickc@redhat.com> - 2.40-13
|
||||
- Spec File: Really fix building with GTS-13 gcc. (#2217911)
|
||||
|
||||
* Mon Jun 26 2023 Nick Clifton <nickc@redhat.com> - 2.40-12
|
||||
- Spec File: Enable building with GTS-13 gcc. (#2217819)
|
||||
- Spec File: Sync version number with c8s.
|
||||
- Spec File: Enable building with GTS-13 gcc. (#2217911)
|
||||
- Spec File: Build static libraries with -fno-lto.
|
||||
|
||||
* Mon Jun 12 2023 Nick Clifton <nickc@redhat.com> - 2.40-9
|
||||
- Spec File: Use the correct alternatives. (#2209148 and #2213913)
|
||||
* Mon Jun 12 2023 Nick Clifton <nickc@redhat.com> - 2.40-11
|
||||
- Spec File: Use the correct alternatives. (#2209151 and #2213913)
|
||||
|
||||
* Mon May 22 2023 Marek Polacek <polacek@redhat.com> - 2.40-8
|
||||
- Spec File: Use the correct alternatives. (#2209148)
|
||||
* Mon May 22 2023 Marek Polacek <polacek@redhat.com> - 2.40-9
|
||||
- Spec File: Use the correct alternatives. (#2209151)
|
||||
|
||||
* Tue Apr 25 2023 Nick Clifton <nickc@redhat.com> - 2.40-8
|
||||
- Suppress some s390x linker tests. (#2186396)
|
||||
|
||||
* Mon Apr 24 2023 Nick Clifton <nickc@redhat.com> - 2.40-7
|
||||
- Rebase to 2.40.
|
||||
- Spec File: Fix typo. (#2186396)
|
||||
|
||||
* Mon Apr 17 2023 Nick Clifton <nickc@redhat.com> - 2.40-7
|
||||
- Spec File: Fix typo. (#2186396)
|
||||
- BFD library: Fix illegal memory access when loading corrupt symbol version info. (#2186579)
|
||||
|
||||
* Thu Mar 30 2023 Nick Clifton <nickc@redhat.com> - 2.40-6
|
||||
|
Loading…
Reference in New Issue
Block a user