Dominique Leuenberger 2022-03-05 13:42:56 +00:00 committed by Git OBS Bridge
commit ef3eb8be22
63 changed files with 8867 additions and 1982 deletions

View File

@ -5,10 +5,10 @@ Index: binutils-2.25.0/bfd/elfnn-aarch64.c
===================================================================
--- binutils-2.25.0.orig/bfd/elfnn-aarch64.c
+++ binutils-2.25.0/bfd/elfnn-aarch64.c
@@ -7945,7 +7945,7 @@ const struct elf_size_info elfNN_aarch64
@@ -9965,7 +9965,7 @@ const struct elf_size_info elfNN_aarch64_size_info =
#define ELF_ARCH bfd_arch_aarch64
#define ELF_MACHINE_CODE EM_AARCH64
#define ELF_MAXPAGESIZE 0x10000
#define ELF_MINPAGESIZE 0x1000
-#define ELF_COMMONPAGESIZE 0x1000
+#define ELF_COMMONPAGESIZE 0x10000

View File

@ -173,7 +173,7 @@ diff --git a/bfd/elfxx-x86.h b/bfd/elfxx-x86.h
index db11327e96f..89f51382216 100644
--- a/bfd/elfxx-x86.h
+++ b/bfd/elfxx-x86.h
@@ -452,6 +452,7 @@ struct elf_x86_link_hash_table
@@ -456,6 +456,7 @@ struct elf_x86_link_hash_table
asection *plt_second_eh_frame;
asection *plt_got;
asection *plt_got_eh_frame;
@ -181,7 +181,7 @@ index db11327e96f..89f51382216 100644
/* Parameters describing PLT generation, lazy or non-lazy. */
struct elf_x86_plt_layout plt;
@@ -690,6 +691,12 @@ extern void _bfd_x86_elf_link_report_relative_reloc
@@ -694,6 +695,12 @@ extern void _bfd_x86_elf_link_report_relative_reloc
(struct bfd_link_info *, asection *, struct elf_link_hash_entry *,
Elf_Internal_Sym *, const char *, const void *);
@ -194,11 +194,14 @@ index db11327e96f..89f51382216 100644
#define bfd_elf64_mkobject \
_bfd_x86_elf_mkobject
#define bfd_elf32_mkobject \
@@ -727,3 +734,7 @@ extern void _bfd_x86_elf_link_report_relative_reloc
_bfd_x86_elf_merge_gnu_properties
#define elf_backend_fixup_gnu_properties \
_bfd_x86_elf_link_fixup_gnu_properties
@@ -907,6 +914,10 @@ extern void _bfd_x86_elf_link_report_relative_reloc
_bfd_elf_x86_size_relative_relocs
#define elf_backend_finish_relative_relocs \
_bfd_elf_x86_finish_relative_relocs
+#define elf_backend_is_ulp_enabled \
+ _bfd_x86_elf_is_ulp_enabled
+#define elf_backend_setup_ulp \
+ _bfd_x86_elf_setup_ulp
#define ELF_P_ALIGN ELF_MINPAGESIZE

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:45003a64f46026c223e26bcd9aaf40889c89f945c6c8c763bd3997f05216963a
size 111305

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:67fc1a4030d08ee877a4867d3dcab35828148f87e1fd05da6db585ed5a166bd4
size 33888611

View File

@ -1,16 +0,0 @@
-----BEGIN PGP SIGNATURE-----
iQIzBAABCAAdFiEEOiS8Ho+0CfqfFDcYE/zvid2ePE8FAmD0YRIACgkQE/zvid2e
PE9mkxAAhmDeRKyVs2ttGuPsO4e2CYifJnneZoxWUjeEjEeYqKkuGN82LCcuMO8U
rzW00tzEn0G386DF6SmICxMxz2gi96TSRCUt9lWGKK+FHXc8HmFb/1sH/MLpgExS
mVPSRfuNhpFiz5NxkT0AekGxopWYxEntRIjCkoecjsdliNwJ/MbLEuiOOSFRtvcb
U98NFY9ol1JeTplL6Z/xMOJ4bkITo/8VN1cLJ0ejgDWF4uUDVYqqKYsZlSHaI/+Q
bOwLo9r4mBopcWap7Q5PWPLmQD6fGqlfvPnb0An2VqrSb0xbT6fO3VrAuHJKmZoJ
9ZBk1r4osvp6p8u56NQtCoacblmVlzZM53xaKbadVH02QDTevJVbjYuUggLC4/Uk
5gD/v6f8r9wqkFCQm5qCpBs19yskNK1YTABAlVOMwEq4v2TmSC0qhmJrW1z4NsoR
i3/SgMiWNxrB7eUigSHYhO4qYhW94pPqNjxX1oClfa9Ochq43nhWSXz5jcWtr8it
59e960jN3s6gNSex+D/pO7hW4KMQDE3NYR6ehbDWmmHSKWuVM2uxAKF4eBWRTml5
Hw70Sw82+17fxcLLohD82uHUpDIQp7of0r7HtnDEJlqiCcUndN9VM7TmdJeap6n6
WMLLmC9HtbVdu7+GHOG7VnBqn8kkGp5KIUkMGp2HuC/S2pd6Fp0=
=rn/O
-----END PGP SIGNATURE-----

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:28e6c621877154f80ff6ef001af53ddde1f0d53e09a5788e5eef0822f7374d52
size 153998

3
binutils-2.38.tar.bz2 Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:070ec71cf077a6a58e0b959f05a09a35015378c2d8a51e90f3aeabfe30590ef8
size 34866647

16
binutils-2.38.tar.bz2.sig Normal file
View File

@ -0,0 +1,16 @@
-----BEGIN PGP SIGNATURE-----
iQIzBAABCAAdFiEEOiS8Ho+0CfqfFDcYE/zvid2ePE8FAmIDtcQACgkQE/zvid2e
PE9USg/+OEkP/kUr3XyMiII5F1nVZMSk30DdniBSHEtn2cUxlPOfsWglfpDf7KCY
BQaBNaP0W82b3Bdjbb/PVc89Lp/PKAWr6jpfxy8wjBVHSzd2pAJRfXVq5rQERcDJ
WR1wY4QL+uu2uhCNjmd5pceucYAQZyKSik52jBoWUvJTdcEVNgSpAMw+Hx8xIeEZ
YH+RQr5Dl5migW3nIC6/dC8ZVmAAdXWFLA/6yfJ78z+m3BWe30+YeWKLnvah7dqY
NSIxCDM+pehoqHd567aPBGXBnAF+kIgcSS2JyEzPcaoUWvd/PLSEufij6eY8xBYE
5/c1cCc+VgMX7woX9TwAx6Bw09la/OWTF8PklzS4Urlh00cguWd/r/zJrCygbnrQ
vdzYI1irLzKF42K1Im0ROQRPAoAh6HA5mcApsWIKXnFxTEevBHuoKUXwtG/SsUHX
ZXG4+kep1nLfIt7vduAOdSHYzfBtCqeW/GpHhJnGvAIQEeuloxB8piGCo0sRxbDc
w0EQoj/QENtuKkQKtw8qNr+0dXZWQrQ9ipmjrrsCnT09NfhF2b7YPsa5fpgqT39n
w6vDraU9j3544x2gUckBoiiCedSYMcvRjlKGw6FvezEiCguW3YxlbbqLRCkXgBmn
YW9IBAPf1TY6GTjvgmIWDs3jgIAq2tJ/co7Mg8SGVGR1+/hcD7I=
=tbaA
-----END PGP SIGNATURE-----

View File

@ -1,10 +1,8 @@
Remove the #error to avoid issues with legacy not dealing with this
Index: bfd/bfd-in.h
===================================================================
--- bfd/bfd-in.h.orig
+++ bfd/bfd-in.h
@@ -23,11 +23,6 @@
--- bfd/bfd-in.h.orig 2012-11-30 13:44:35.715871571 +0100
+++ bfd/bfd-in.h 2012-11-30 13:44:43.428871298 +0100
@@ -25,11 +25,6 @@
#ifndef __BFD_H_SEEN__
#define __BFD_H_SEEN__

View File

@ -3,11 +3,11 @@ This adjusts some testcases that expect new behaviour:
* that separate-code is default
- this also implies that default max-page-size is 0x1000, instead of the
old 0x200000, so some testcases need to encode that as well
Index: binutils-2.37/ld/testsuite/ld-elf/linux-x86.exp
===================================================================
--- binutils-2.37.orig/ld/testsuite/ld-elf/linux-x86.exp
+++ binutils-2.37/ld/testsuite/ld-elf/linux-x86.exp
@@ -125,7 +125,7 @@ proc check_pr25749a {testname srcfilea s
diff --git a/ld/testsuite/ld-elf/linux-x86.exp b/ld/testsuite/ld-elf/linux-x86.exp
index 2e0cbd37f17..fcd3dd920e4 100644
--- a/ld/testsuite/ld-elf/linux-x86.exp
+++ b/ld/testsuite/ld-elf/linux-x86.exp
@@ -275,7 +275,7 @@ proc check_pr25749a {testname srcfilea srcfileb cflags ldflags lderror} {
}
# Suppress warning for unsupported attribute from older GCC.
@ -16,7 +16,7 @@ Index: binutils-2.37/ld/testsuite/ld-elf/linux-x86.exp
exec cp $srcdir/$subdir/$srcfilea $srcfilea
exec chmod +w $srcfilea
@@ -246,7 +246,7 @@ proc check_pr25749b {testname srcfilea s
@@ -396,7 +396,7 @@ proc check_pr25749b {testname srcfilea srcfileb cflags ldflags dsoldflags args}
[list \
"Build lib${testname}.so ($dsoldflags)" \
"-shared $dsoldflags tmpdir/pr25749-bin.o" \
@ -25,157 +25,39 @@ Index: binutils-2.37/ld/testsuite/ld-elf/linux-x86.exp
[list $srcfileb] \
{{readelf {-Wr} pr25749.rd}} \
"lib${testname}.so" \
Index: binutils-2.37/ld/testsuite/ld-i386/report-reloc-1.d
===================================================================
--- binutils-2.37.orig/ld/testsuite/ld-i386/report-reloc-1.d
+++ binutils-2.37/ld/testsuite/ld-i386/report-reloc-1.d
diff --git a/ld/testsuite/ld-i386/report-reloc-1.d b/ld/testsuite/ld-i386/report-reloc-1.d
index 162161592a1..ee96047043d 100644
--- a/ld/testsuite/ld-i386/report-reloc-1.d
+++ b/ld/testsuite/ld-i386/report-reloc-1.d
@@ -1,6 +1,6 @@
#source: report-reloc-1.s
#as: --32
-#ld: -pie -melf_i386 -z report-relative-reloc
+#ld: -pie -melf_i386 -z report-relative-reloc -z separate-code
-#ld: -pie -melf_i386 -z report-relative-reloc $NO_DT_RELR_LDFLAGS
+#ld: -pie -melf_i386 -z report-relative-reloc -z separate-code $NO_DT_RELR_LDFLAGS
#warning_output: report-reloc-1.l
#readelf: -r --wide
Index: binutils-2.37/ld/testsuite/ld-x86-64/pe-x86-64.exp
===================================================================
--- binutils-2.37.orig/ld/testsuite/ld-x86-64/pe-x86-64.exp
+++ binutils-2.37/ld/testsuite/ld-x86-64/pe-x86-64.exp
@@ -27,7 +27,7 @@ if {![istarget "x86_64-*-linux*"] } {
run_ld_link_tests [list \
[list \
"Build pe-x86-64-1" \
- "-m elf_x86_64 --entry=begin" \
+ "-m elf_x86_64 --entry=begin -z separate-code -z max-page-size=4096" \
"" \
"" \
{pe-x86-64-1a.obj.bz2 pe-x86-64-1b.obj.bz2 pe-x86-64-1c.obj.bz2} \
@@ -36,7 +36,7 @@ run_ld_link_tests [list \
] \
[list \
"Build pe-x86-64-2" \
- "-m elf_x86_64 --entry=begin" \
+ "-m elf_x86_64 --entry=begin -z separate-code -z max-page-size=4096" \
"" \
"" \
{pe-x86-64-2a.obj.bz2 pe-x86-64-2b.obj.bz2 pe-x86-64-2c.obj.bz2} \
@@ -45,7 +45,7 @@ run_ld_link_tests [list \
] \
[list \
"Build pe-x86-64-3" \
- "-m elf_x86_64 --entry=begin" \
+ "-m elf_x86_64 --entry=begin -z separate-code -z max-page-size=4096" \
"" \
"" \
{pe-x86-64-3a.obj.bz2 pe-x86-64-3b.obj.bz2 pe-x86-64-3c.obj.bz2 \
@@ -55,7 +55,7 @@ run_ld_link_tests [list \
] \
[list \
"Build pe-x86-64-4" \
- "-m elf_x86_64 --entry=begin" \
+ "-m elf_x86_64 --entry=begin -z separate-code -z max-page-size=4096" \
"" \
"" \
{pe-x86-64-4a.obj.bz2 pe-x86-64-4b.obj.bz2 pe-x86-64-4c.obj.bz2 \
@@ -65,7 +65,7 @@ run_ld_link_tests [list \
] \
[list \
"Build pe-x86-64-5" \
- "-m elf_x86_64 --entry=begin" \
+ "-m elf_x86_64 --entry=begin -z separate-code -z max-page-size=4096" \
"" \
"" \
{pe-x86-64-5.obj.bz2 } \
@@ -75,7 +75,7 @@ run_ld_link_tests [list \
] \
[list \
"Build pe-x86-64-6" \
- "-m elf_x86_64 --entry=main" \
+ "-m elf_x86_64 --entry=main -z separate-code -z max-page-size=4096" \
"" \
"" \
{pe-x86-64-6.obj.bz2 } \
Index: binutils-2.37/ld/testsuite/ld-x86-64/report-reloc-1-x32.d
===================================================================
--- binutils-2.37.orig/ld/testsuite/ld-x86-64/report-reloc-1-x32.d
+++ binutils-2.37/ld/testsuite/ld-x86-64/report-reloc-1-x32.d
diff --git a/ld/testsuite/ld-x86-64/report-reloc-1-x32.d b/ld/testsuite/ld-x86-64/report-reloc-1-x32.d
index 63fe7b1bb8a..29a94ff8762 100644
--- a/ld/testsuite/ld-x86-64/report-reloc-1-x32.d
+++ b/ld/testsuite/ld-x86-64/report-reloc-1-x32.d
@@ -1,6 +1,6 @@
#source: report-reloc-1.s
#as: --x32
-#ld: -pie -melf32_x86_64 -z report-relative-reloc
+#ld: -pie -melf32_x86_64 -z report-relative-reloc -z separate-code -z max-page-size=4096
-#ld: -pie -melf32_x86_64 -z report-relative-reloc $NO_DT_RELR_LDFLAGS
+#ld: -pie -melf32_x86_64 -z report-relative-reloc -z separate-code -z max-page-size=4096 $NO_DT_RELR_LDFLAGS
#warning_output: report-reloc-1.l
#readelf: -r --wide
Index: binutils-2.37/ld/testsuite/ld-x86-64/report-reloc-1.d
===================================================================
--- binutils-2.37.orig/ld/testsuite/ld-x86-64/report-reloc-1.d
+++ binutils-2.37/ld/testsuite/ld-x86-64/report-reloc-1.d
diff --git a/ld/testsuite/ld-x86-64/report-reloc-1.d b/ld/testsuite/ld-x86-64/report-reloc-1.d
index 69f164c9434..63079acc98a 100644
--- a/ld/testsuite/ld-x86-64/report-reloc-1.d
+++ b/ld/testsuite/ld-x86-64/report-reloc-1.d
@@ -1,6 +1,6 @@
#source: report-reloc-1.s
#as: --64
-#ld: -pie -melf_x86_64 -z report-relative-reloc
+#ld: -pie -melf_x86_64 -z report-relative-reloc -z separate-code -z max-page-size=4096
-#ld: -pie -melf_x86_64 -z report-relative-reloc $NO_DT_RELR_LDFLAGS
+#ld: -pie -melf_x86_64 -z report-relative-reloc -z separate-code -z max-page-size=4096 $NO_DT_RELR_LDFLAGS
#warning_output: report-reloc-1.l
#readelf: -r --wide
Index: binutils-2.37/ld/testsuite/ld-x86-64/pr19609-4e.d
===================================================================
--- binutils-2.37.orig/ld/testsuite/ld-x86-64/pr19609-4e.d
+++ binutils-2.37/ld/testsuite/ld-x86-64/pr19609-4e.d
@@ -1,6 +1,6 @@
#source: pr19609-4.s
#as: --64 -mrelax-relocations=yes
-#ld: -melf_x86_64 -Ttext=0x70000000 -Tdata=0xa0000000 --no-relax
+#ld: -melf_x86_64 -Ttext=0x70000000 -Tdata=0xa0000000 --no-relax -z separate-code -z max-page-size=4096
#objdump: -dw
.*: +file format .*
Index: binutils-2.37/ld/testsuite/ld-x86-64/pr19609-6a.d
===================================================================
--- binutils-2.37.orig/ld/testsuite/ld-x86-64/pr19609-6a.d
+++ binutils-2.37/ld/testsuite/ld-x86-64/pr19609-6a.d
@@ -1,6 +1,6 @@
#source: pr19609-6.s
#as: --64 -mrelax-relocations=yes
-#ld: -melf_x86_64 --defsym foobar=0x80000000
+#ld: -melf_x86_64 --defsym foobar=0x80000000 -z separate-code -z max-page-size=4096
#objdump: -dw
.*: +file format .*
Index: binutils-2.37/ld/testsuite/ld-x86-64/pr19609-6b.d
===================================================================
--- binutils-2.37.orig/ld/testsuite/ld-x86-64/pr19609-6b.d
+++ binutils-2.37/ld/testsuite/ld-x86-64/pr19609-6b.d
@@ -1,6 +1,6 @@
#source: pr19609-6.s
#as: --64 -mrelax-relocations=yes
-#ld: -melf_x86_64 --defsym foobar=0x80000000 --no-relax
+#ld: -melf_x86_64 --defsym foobar=0x80000000 --no-relax -z separate-code -z max-page-size=4096
#objdump: -dw
.*: +file format .*
Index: binutils-2.37/ld/testsuite/ld-x86-64/pr19609-7b.d
===================================================================
--- binutils-2.37.orig/ld/testsuite/ld-x86-64/pr19609-7b.d
+++ binutils-2.37/ld/testsuite/ld-x86-64/pr19609-7b.d
@@ -1,6 +1,6 @@
#source: pr19609-7.s
#as: --64 -mrelax-relocations=yes
-#ld: -melf_x86_64 -Ttext=0x80000000 --no-relax
+#ld: -melf_x86_64 -Ttext=0x80000000 --no-relax -z separate-code -z max-page-size=4096
#objdump: -dw
.*: +file format .*
Index: binutils-2.37/ld/testsuite/ld-x86-64/pr19609-7d.d
===================================================================
--- binutils-2.37.orig/ld/testsuite/ld-x86-64/pr19609-7d.d
+++ binutils-2.37/ld/testsuite/ld-x86-64/pr19609-7d.d
@@ -1,6 +1,6 @@
#source: pr19609-7.s
#as: --x32 -mrelax-relocations=yes
-#ld: -melf32_x86_64 -Ttext=0x80000000 --no-relax
+#ld: -melf32_x86_64 -Ttext=0x80000000 --no-relax -z separate-code -z max-page-size=4096
#objdump: -dw
.*: +file format .*

View File

@ -4,60 +4,31 @@ file with symbol names. ld errors on the '@' characters. Until
those packages are fixed we use this patch. We have to carry it
for old code streams forever.
Index: binutils-2.37/binutils/nm.c
===================================================================
--- binutils-2.37.orig/binutils/nm.c
+++ binutils-2.37/binutils/nm.c
@@ -183,7 +183,7 @@ static int show_version = 0; /* Show the
static int show_synthetic = 0; /* Display synthesized symbols too. */
static int line_numbers = 0; /* Print line numbers for symbols. */
static int allow_special_symbols = 0; /* Allow special symbols. */
-static int with_symbol_versions = -1; /* Output symbol version information. */
+static int with_symbol_versions = 0; /* Output symbol version information. */
static int quiet = 0; /* Suppress "no symbols" diagnostic. */
diff --git a/binutils/nm.c b/binutils/nm.c
index 2637756c647..253714ef179 100644
--- a/binutils/nm.c
+++ b/binutils/nm.c
@@ -666,7 +666,7 @@ print_symname (const char *form, struct extended_symbol_info *info,
name = convert_utf8 (name);
}
/* The characters to use for global and local ifunc symbols. */
Index: binutils-2.37/ld/testsuite/ld-elf/shared.exp
===================================================================
--- binutils-2.37.orig/ld/testsuite/ld-elf/shared.exp
+++ binutils-2.37/ld/testsuite/ld-elf/shared.exp
@@ -938,8 +938,7 @@ run_cc_link_tests [list \
"-fPIC" \
{pr26302b.c} \
{{readelf {-sW} pr26302.rd} \
- {nm {-u} pr26302.nd} \
- {nm {-u -D} pr26302.nd} \
+ {nm {-u --with-symbol-versions} pr26302.nd} \
{nm {-u -D --with-symbol-versions} pr26302.nd}} \
"pr26302b.so" \
] \
Index: binutils-2.37/gas/testsuite/gas/symver/symver0.d
===================================================================
--- binutils-2.37.orig/gas/testsuite/gas/symver/symver0.d
+++ binutils-2.37/gas/testsuite/gas/symver/symver0.d
@@ -1,4 +1,4 @@
-#nm: -n
+#nm: -n --with-symbol-versions
#name: symver symver0
#
# The #... and #pass are there to match extra symbols inserted by
Index: binutils-2.37/gas/testsuite/gas/symver/symver1.d
===================================================================
--- binutils-2.37.orig/gas/testsuite/gas/symver/symver1.d
+++ binutils-2.37/gas/testsuite/gas/symver/symver1.d
@@ -1,4 +1,4 @@
-#nm: -n
+#nm: -n --with-symbol-versions
#name: symver symver1
#
# The #... and #pass are there to match extra symbols inserted by
Index: binutils-2.37/gas/testsuite/gas/symver/symver6.d
===================================================================
--- binutils-2.37.orig/gas/testsuite/gas/symver/symver6.d
+++ binutils-2.37/gas/testsuite/gas/symver/symver6.d
@@ -1,4 +1,4 @@
-#nm: -n
+#nm: -n --with-symbol-versions
#name: symver symver6
#
- if (info != NULL && info->elfinfo && with_symbol_versions)
+ if (info != NULL && info->elfinfo && with_symbol_versions && 0)
{
const char *version_string;
bool hidden;
diff --git a/ld/testsuite/ld-elf/pr25708.d b/ld/testsuite/ld-elf/pr25708.d
index 60b8e31807a..1b62e25347e 100644
--- a/ld/testsuite/ld-elf/pr25708.d
+++ b/ld/testsuite/ld-elf/pr25708.d
@@ -2,8 +2,9 @@
#ld: -shared -version-script pr13195.t
#nm: -D --with-symbol-versions
#target: *-*-linux* *-*-gnu* arm*-*-uclinuxfdpiceabi
-#xfail: hppa64-*-* ![check_shared_lib_support]
+#xfail: *-*-* ![check_shared_lib_support]
# h8300 doesn't support -shared, and hppa64 creates .foo
+# our binutils revert the printing of symversions with nm -D
#..
0+ A VERS_2.0

View File

@ -79,11 +79,11 @@ Date: Tue Feb 13 07:34:22 2018 -0800
* testsuite/ld-x86-64/pr22791-2c.s: Likewise.
* testsuite/ld-x86-64/x86-64.exp: Run PR ld/22791 tests.
Index: binutils-2.37/bfd/elf64-x86-64.c
===================================================================
--- binutils-2.37.orig/bfd/elf64-x86-64.c
+++ binutils-2.37/bfd/elf64-x86-64.c
@@ -1832,6 +1832,24 @@ elf_x86_64_convert_load_reloc (bfd *abfd
diff --git a/bfd/elf64-x86-64.c b/bfd/elf64-x86-64.c
index dc416a7f..b9f96729 100644
--- a/bfd/elf64-x86-64.c
+++ b/bfd/elf64-x86-64.c
@@ -1817,6 +1817,24 @@ elf_x86_64_convert_load_reloc (bfd *abfd,
return true;
}
@ -106,9 +106,9 @@ Index: binutils-2.37/bfd/elf64-x86-64.c
+}
+
/* Look through the relocs for a section during the first phase, and
calculate needed space in the global offset table, procedure
linkage table, and dynamic reloc sections. */
@@ -3154,9 +3172,6 @@ elf_x86_64_relocate_section (bfd *output
calculate needed space in the global offset table, and procedure
linkage table. */
@@ -3159,9 +3177,6 @@ elf_x86_64_relocate_section (bfd *output_bfd,
&& (eh == NULL
|| !UNDEFINED_WEAK_RESOLVED_TO_ZERO (info,
eh)))
@ -118,7 +118,7 @@ Index: binutils-2.37/bfd/elf64-x86-64.c
|| (no_copyreloc_p
&& h->def_dynamic
&& !(h->root.u.def.section->flags & SEC_CODE))))
@@ -3165,20 +3180,25 @@ elf_x86_64_relocate_section (bfd *output
@@ -3170,20 +3185,25 @@ elf_x86_64_relocate_section (bfd *output_bfd,
|| bfd_link_dll (info)))
{
bool fail = false;
@ -148,7 +148,7 @@ Index: binutils-2.37/bfd/elf64-x86-64.c
}
else if (no_copyreloc_p || bfd_link_dll (info))
{
@@ -3187,9 +3207,10 @@ elf_x86_64_relocate_section (bfd *output
@@ -3192,9 +3212,10 @@ elf_x86_64_relocate_section (bfd *output_bfd,
relocations against default and protected
symbols since address of protected function
and location of protected data may not be in
@ -161,11 +161,11 @@ Index: binutils-2.37/bfd/elf64-x86-64.c
}
if (fail)
Index: binutils-2.37/gas/config/tc-i386.c
===================================================================
--- binutils-2.37.orig/gas/config/tc-i386.c
+++ binutils-2.37/gas/config/tc-i386.c
@@ -8770,55 +8770,12 @@ output_branch (void)
diff --git a/gas/config/tc-i386.c b/gas/config/tc-i386.c
index d3441988e34..8f8fb086cd8 100644
--- a/gas/config/tc-i386.c
+++ b/gas/config/tc-i386.c
@@ -8793,55 +8793,12 @@ output_branch (void)
frag_var (rs_machine_dependent, 5, i.reloc[0], subtype, sym, off, p);
}
@ -221,13 +221,13 @@ Index: binutils-2.37/gas/config/tc-i386.c
if (i.tm.opcode_modifier.jump == JUMP_BYTE)
{
@@ -8892,17 +8849,8 @@ output_jump (void)
@@ -8990,17 +8947,8 @@ output_jump (void)
abort ();
}
-#if defined (OBJ_ELF) || defined (OBJ_MAYBE_ELF)
- if (size == 4
- && jump_reloc == NO_RELOC
- if (flag_code == CODE_64BIT && size == 4
- && jump_reloc == NO_RELOC && i.op[0].disps->X_add_number == 0
- && need_plt32_p (i.op[0].disps->X_add_symbol))
- jump_reloc = BFD_RELOC_X86_64_PLT32;
-#endif
@ -240,21 +240,22 @@ Index: binutils-2.37/gas/config/tc-i386.c
/* All jumps handled here are signed, but don't unconditionally use a
signed limit check for 32 and 16 bit jumps as we want to allow wrap
@@ -12190,10 +12138,6 @@ md_estimate_size_before_relax (fragS *fr
@@ -12299,11 +12247,6 @@ md_estimate_size_before_relax (fragS *fragP, segT segment)
reloc_type = (enum bfd_reloc_code_real) fragP->fr_var;
else if (size == 2)
reloc_type = BFD_RELOC_16_PCREL;
-#if defined (OBJ_ELF) || defined (OBJ_MAYBE_ELF)
- else if (need_plt32_p (fragP->fr_symbol))
- else if (fragP->tc_frag_data.code64 && fragP->fr_offset == 0
- && need_plt32_p (fragP->fr_symbol))
- reloc_type = BFD_RELOC_X86_64_PLT32;
-#endif
else
reloc_type = BFD_RELOC_32_PCREL;
Index: binutils-2.37/gas/testsuite/gas/i386/ilp32/reloc64.d
===================================================================
--- binutils-2.37.orig/gas/testsuite/gas/i386/ilp32/reloc64.d
+++ binutils-2.37/gas/testsuite/gas/i386/ilp32/reloc64.d
diff --git a/gas/testsuite/gas/i386/ilp32/reloc64.d b/gas/testsuite/gas/i386/ilp32/reloc64.d
index 78ca3fd9e38..a961679754a 100644
--- a/gas/testsuite/gas/i386/ilp32/reloc64.d
+++ b/gas/testsuite/gas/i386/ilp32/reloc64.d
@@ -17,7 +17,7 @@ Disassembly of section \.text:
.*[ ]+R_X86_64_PC8[ ]+xtrn\+0x0*1
.*[ ]+R_X86_64_PC32[ ]+xtrn-0x0*4
@ -264,10 +265,10 @@ Index: binutils-2.37/gas/testsuite/gas/i386/ilp32/reloc64.d
.*[ ]+R_X86_64_PC8[ ]+xtrn-0x0*1
.*[ ]+R_X86_64_GOT32[ ]+xtrn
.*[ ]+R_X86_64_GOT32[ ]+xtrn
Index: binutils-2.37/gas/testsuite/gas/i386/ilp32/x86-64-branch.d
===================================================================
--- binutils-2.37.orig/gas/testsuite/gas/i386/ilp32/x86-64-branch.d
+++ binutils-2.37/gas/testsuite/gas/i386/ilp32/x86-64-branch.d
diff --git a/gas/testsuite/gas/i386/ilp32/x86-64-branch.d b/gas/testsuite/gas/i386/ilp32/x86-64-branch.d
index acf8c42ca97..57845fdc208 100644
--- a/gas/testsuite/gas/i386/ilp32/x86-64-branch.d
+++ b/gas/testsuite/gas/i386/ilp32/x86-64-branch.d
@@ -20,9 +20,9 @@ Disassembly of section .text:
[ ]*[a-f0-9]+: 66 ff 20 data16 jmp \*\(%rax\)
[ ]*[a-f0-9]+: e8 00 00 00 00 call (0x)?1f <.*> 1b: R_X86_64_PC32 \*ABS\*\+0x10003c
@ -281,10 +282,10 @@ Index: binutils-2.37/gas/testsuite/gas/i386/ilp32/x86-64-branch.d
[ ]*[a-f0-9]+: 66 c3 data16 ret *
[ ]*[a-f0-9]+: 66 c2 08 00 data16 ret \$0x8
[ ]*[a-f0-9]+: 3e 74 03[ ]+je,pt +[0-9a-fx]+ <.*>
Index: binutils-2.37/gas/testsuite/gas/i386/reloc64.d
===================================================================
--- binutils-2.37.orig/gas/testsuite/gas/i386/reloc64.d
+++ binutils-2.37/gas/testsuite/gas/i386/reloc64.d
diff --git a/gas/testsuite/gas/i386/reloc64.d b/gas/testsuite/gas/i386/reloc64.d
index 540a9b77d35..ea16c68de4b 100644
--- a/gas/testsuite/gas/i386/reloc64.d
+++ b/gas/testsuite/gas/i386/reloc64.d
@@ -20,7 +20,7 @@ Disassembly of section \.text:
.*[ ]+R_X86_64_PC8[ ]+xtrn\+0x0*1
.*[ ]+R_X86_64_PC32[ ]+xtrn-0x0*4
@ -294,10 +295,10 @@ Index: binutils-2.37/gas/testsuite/gas/i386/reloc64.d
.*[ ]+R_X86_64_PC8[ ]+xtrn-0x0*1
.*[ ]+R_X86_64_GOT64[ ]+xtrn
.*[ ]+R_X86_64_GOT32[ ]+xtrn
Index: binutils-2.37/gas/testsuite/gas/i386/x86-64-branch-2.d
===================================================================
--- binutils-2.37.orig/gas/testsuite/gas/i386/x86-64-branch-2.d
+++ binutils-2.37/gas/testsuite/gas/i386/x86-64-branch-2.d
diff --git a/gas/testsuite/gas/i386/x86-64-branch-2.d b/gas/testsuite/gas/i386/x86-64-branch-2.d
index fab75a6394c..e025de90b68 100644
--- a/gas/testsuite/gas/i386/x86-64-branch-2.d
+++ b/gas/testsuite/gas/i386/x86-64-branch-2.d
@@ -9,12 +9,12 @@ Disassembly of section .text:
0+ <bar-0xb>:
@ -313,10 +314,10 @@ Index: binutils-2.37/gas/testsuite/gas/i386/x86-64-branch-2.d
[ ]*[a-f0-9]+: 66 c3 retw *
[ ]*[a-f0-9]+: 66 c2 08 00 retw \$0x8
#pass
Index: binutils-2.37/gas/testsuite/gas/i386/x86-64-jump.d
===================================================================
--- binutils-2.37.orig/gas/testsuite/gas/i386/x86-64-jump.d
+++ binutils-2.37/gas/testsuite/gas/i386/x86-64-jump.d
diff --git a/gas/testsuite/gas/i386/x86-64-jump.d b/gas/testsuite/gas/i386/x86-64-jump.d
index 7d2c994ce26..58ad424badb 100644
--- a/gas/testsuite/gas/i386/x86-64-jump.d
+++ b/gas/testsuite/gas/i386/x86-64-jump.d
@@ -9,7 +9,7 @@ Disassembly of section .text:
0+ <.text>:
@ -335,10 +336,10 @@ Index: binutils-2.37/gas/testsuite/gas/i386/x86-64-jump.d
[ ]*[a-f0-9]+: ff 14 25 00 00 00 00 call \*0x0 3d: R_X86_64_32S xxx
[ ]*[a-f0-9]+: ff d7 call \*%rdi
[ ]*[a-f0-9]+: ff 17 call \*\(%rdi\)
Index: binutils-2.37/gas/testsuite/gas/i386/x86-64-mpx-branch-1.d
===================================================================
--- binutils-2.37.orig/gas/testsuite/gas/i386/x86-64-mpx-branch-1.d
+++ binutils-2.37/gas/testsuite/gas/i386/x86-64-mpx-branch-1.d
diff --git a/gas/testsuite/gas/i386/x86-64-mpx-branch-1.d b/gas/testsuite/gas/i386/x86-64-mpx-branch-1.d
index 795f3fdacc4..1d692e8f04d 100644
--- a/gas/testsuite/gas/i386/x86-64-mpx-branch-1.d
+++ b/gas/testsuite/gas/i386/x86-64-mpx-branch-1.d
@@ -23,9 +23,9 @@ Disassembly of section .text:
[ ]*[a-f0-9]+: f2 e8 00 00 00 00 bnd call 34 <foo2>
@ -352,10 +353,10 @@ Index: binutils-2.37/gas/testsuite/gas/i386/x86-64-mpx-branch-1.d
[ ]*[a-f0-9]+: f2 e9 00 00 00 00 bnd jmp 4d <foo2\+0x19> 49: R_X86_64_PLT32 foo-0x4
[ ]*[a-f0-9]+: f2 0f 82 00 00 00 00 bnd jb 54 <foo2\+0x20> 50: R_X86_64_PLT32 foo-0x4
[ ]*[a-f0-9]+: f2 e8 00 00 00 00 bnd call 5a <foo2\+0x26> 56: R_X86_64_PLT32 foo-0x4
Index: binutils-2.37/gas/testsuite/gas/i386/x86-64-nop-3.d
===================================================================
--- binutils-2.37.orig/gas/testsuite/gas/i386/x86-64-nop-3.d
+++ binutils-2.37/gas/testsuite/gas/i386/x86-64-nop-3.d
diff --git a/gas/testsuite/gas/i386/x86-64-nop-3.d b/gas/testsuite/gas/i386/x86-64-nop-3.d
index 1975481cc59..436487b5a99 100644
--- a/gas/testsuite/gas/i386/x86-64-nop-3.d
+++ b/gas/testsuite/gas/i386/x86-64-nop-3.d
@@ -18,5 +18,5 @@ Disassembly of section .text:
Disassembly of section .altinstr_replacement:
@ -363,32 +364,32 @@ Index: binutils-2.37/gas/testsuite/gas/i386/x86-64-nop-3.d
- +[a-f0-9]+: e9 00 00 00 00 jmp 5 <_start\+0x5> 1: R_X86_64_PLT32 foo-0x4
+ +[a-f0-9]+: e9 00 00 00 00 jmp 5 <_start\+0x5> 1: R_X86_64_PC32 foo-0x4
#pass
Index: binutils-2.37/gas/testsuite/gas/i386/x86-64-nop-4.d
===================================================================
--- binutils-2.37.orig/gas/testsuite/gas/i386/x86-64-nop-4.d
+++ binutils-2.37/gas/testsuite/gas/i386/x86-64-nop-4.d
@@ -21,5 +21,5 @@ Disassembly of section .altinstr_replace
diff --git a/gas/testsuite/gas/i386/x86-64-nop-4.d b/gas/testsuite/gas/i386/x86-64-nop-4.d
index 2da858db994..e390628b335 100644
--- a/gas/testsuite/gas/i386/x86-64-nop-4.d
+++ b/gas/testsuite/gas/i386/x86-64-nop-4.d
@@ -21,5 +21,5 @@ Disassembly of section .altinstr_replacement:
+[a-f0-9]+: 89 c0 mov %eax,%eax
+[a-f0-9]+: 89 c0 mov %eax,%eax
+[a-f0-9]+: 89 c0 mov %eax,%eax
- +[a-f0-9]+: e9 00 00 00 00 jmp b <_start\+0xb> 7: R_X86_64_PLT32 foo-0x4
+ +[a-f0-9]+: e9 00 00 00 00 jmp b <_start\+0xb> 7: R_X86_64_PC32 foo-0x4
#pass
Index: binutils-2.37/gas/testsuite/gas/i386/x86-64-nop-5.d
===================================================================
--- binutils-2.37.orig/gas/testsuite/gas/i386/x86-64-nop-5.d
+++ binutils-2.37/gas/testsuite/gas/i386/x86-64-nop-5.d
@@ -24,5 +24,5 @@ Disassembly of section .altinstr_replace
diff --git a/gas/testsuite/gas/i386/x86-64-nop-5.d b/gas/testsuite/gas/i386/x86-64-nop-5.d
index d5c84c1edf8..69820d54de8 100644
--- a/gas/testsuite/gas/i386/x86-64-nop-5.d
+++ b/gas/testsuite/gas/i386/x86-64-nop-5.d
@@ -24,5 +24,5 @@ Disassembly of section .altinstr_replacement:
+[a-f0-9]+: 89 c0 mov %eax,%eax
+[a-f0-9]+: 89 c0 mov %eax,%eax
+[a-f0-9]+: 89 c0 mov %eax,%eax
- +[a-f0-9]+: e9 00 00 00 00 jmp d <_start\+0xd> 9: R_X86_64_PLT32 foo-0x4
+ +[a-f0-9]+: e9 00 00 00 00 jmp d <_start\+0xd> 9: R_X86_64_PC32 foo-0x4
#pass
Index: binutils-2.37/gas/testsuite/gas/i386/x86-64-relax-2.d
===================================================================
--- binutils-2.37.orig/gas/testsuite/gas/i386/x86-64-relax-2.d
+++ binutils-2.37/gas/testsuite/gas/i386/x86-64-relax-2.d
diff --git a/gas/testsuite/gas/i386/x86-64-relax-2.d b/gas/testsuite/gas/i386/x86-64-relax-2.d
index fba47c14850..0949ab23907 100644
--- a/gas/testsuite/gas/i386/x86-64-relax-2.d
+++ b/gas/testsuite/gas/i386/x86-64-relax-2.d
@@ -11,12 +11,12 @@ Disassembly of section .text:
0+ <foo>:
[ ]*[a-f0-9]+: eb 24 jmp 26 <local>
@ -407,10 +408,10 @@ Index: binutils-2.37/gas/testsuite/gas/i386/x86-64-relax-2.d
0+22 <hidden_def>:
[ ]*[a-f0-9]+: c3 ret *
Index: binutils-2.37/gas/testsuite/gas/i386/x86-64-relax-3.d
===================================================================
--- binutils-2.37.orig/gas/testsuite/gas/i386/x86-64-relax-3.d
+++ binutils-2.37/gas/testsuite/gas/i386/x86-64-relax-3.d
diff --git a/gas/testsuite/gas/i386/x86-64-relax-3.d b/gas/testsuite/gas/i386/x86-64-relax-3.d
index 01df9ef340e..d16e6a55395 100644
--- a/gas/testsuite/gas/i386/x86-64-relax-3.d
+++ b/gas/testsuite/gas/i386/x86-64-relax-3.d
@@ -12,10 +12,10 @@ Disassembly of section .text:
[ ]*[a-f0-9]+: eb 1b jmp 1f <hidden_def>
[ ]*[a-f0-9]+: eb 1b jmp 21 <global_def>
@ -426,34 +427,37 @@ Index: binutils-2.37/gas/testsuite/gas/i386/x86-64-relax-3.d
0+1f <hidden_def>:
[ ]*[a-f0-9]+: c3 ret *
Index: binutils-2.37/ld/testsuite/ld-x86-64/mpx1c.rd
===================================================================
--- binutils-2.37.orig/ld/testsuite/ld-x86-64/mpx1c.rd
+++ binutils-2.37/ld/testsuite/ld-x86-64/mpx1c.rd
diff --git a/ld/testsuite/ld-x86-64/mpx1c.rd b/ld/testsuite/ld-x86-64/mpx1c.rd
index d66524c8834..d3b292cbdc1 100644
--- a/ld/testsuite/ld-x86-64/mpx1c.rd
+++ b/ld/testsuite/ld-x86-64/mpx1c.rd
@@ -1,3 +1,3 @@
#...
-[0-9a-f ]+R_X86_64_PLT32 +0+ +.*
+[0-9a-f ]+R_X86_64_PC32 +0+ +.*
#...
Index: binutils-2.37/ld/testsuite/ld-x86-64/pr22791-1.err
===================================================================
--- binutils-2.37.orig/ld/testsuite/ld-x86-64/pr22791-1.err
diff --git a/ld/testsuite/ld-x86-64/pr22791-1.err b/ld/testsuite/ld-x86-64/pr22791-1.err
deleted file mode 100644
index 8c5565992e7..00000000000
--- a/ld/testsuite/ld-x86-64/pr22791-1.err
+++ /dev/null
@@ -1,2 +0,0 @@
-.*relocation R_X86_64_PC32 against symbol `foo' can not be used when making a PIE object; recompile with -fPIE
-#...
Index: binutils-2.37/ld/testsuite/ld-x86-64/pr22791-1a.c
===================================================================
--- binutils-2.37.orig/ld/testsuite/ld-x86-64/pr22791-1a.c
diff --git a/ld/testsuite/ld-x86-64/pr22791-1a.c b/ld/testsuite/ld-x86-64/pr22791-1a.c
deleted file mode 100644
index cd0130cacdf..00000000000
--- a/ld/testsuite/ld-x86-64/pr22791-1a.c
+++ /dev/null
@@ -1,4 +0,0 @@
-void
-foo (void)
-{
-}
Index: binutils-2.37/ld/testsuite/ld-x86-64/pr22791-1b.s
===================================================================
--- binutils-2.37.orig/ld/testsuite/ld-x86-64/pr22791-1b.s
diff --git a/ld/testsuite/ld-x86-64/pr22791-1b.s b/ld/testsuite/ld-x86-64/pr22791-1b.s
deleted file mode 100644
index 9751db49aa5..00000000000
--- a/ld/testsuite/ld-x86-64/pr22791-1b.s
+++ /dev/null
@@ -1,6 +0,0 @@
- .text
@ -462,9 +466,10 @@ Index: binutils-2.37/ld/testsuite/ld-x86-64/pr22791-1b.s
-main:
- movl foo(%rip), %eax
- .size main, .-main
Index: binutils-2.37/ld/testsuite/ld-x86-64/pr22791-2.rd
===================================================================
--- binutils-2.37.orig/ld/testsuite/ld-x86-64/pr22791-2.rd
diff --git a/ld/testsuite/ld-x86-64/pr22791-2.rd b/ld/testsuite/ld-x86-64/pr22791-2.rd
deleted file mode 100644
index 70deb30d84d..00000000000
--- a/ld/testsuite/ld-x86-64/pr22791-2.rd
+++ /dev/null
@@ -1,6 +0,0 @@
-#failif
@ -473,9 +478,10 @@ Index: binutils-2.37/ld/testsuite/ld-x86-64/pr22791-2.rd
-#...
-[0-9a-f ]+R_X86_64_NONE.*
-#...
Index: binutils-2.37/ld/testsuite/ld-x86-64/pr22791-2a.s
===================================================================
--- binutils-2.37.orig/ld/testsuite/ld-x86-64/pr22791-2a.s
diff --git a/ld/testsuite/ld-x86-64/pr22791-2a.s b/ld/testsuite/ld-x86-64/pr22791-2a.s
deleted file mode 100644
index 0a855024d74..00000000000
--- a/ld/testsuite/ld-x86-64/pr22791-2a.s
+++ /dev/null
@@ -1,8 +0,0 @@
- .text
@ -486,9 +492,10 @@ Index: binutils-2.37/ld/testsuite/ld-x86-64/pr22791-2a.s
- jmp bar
- .size foo, .-foo
- .section .note.GNU-stack,"",@progbits
Index: binutils-2.37/ld/testsuite/ld-x86-64/pr22791-2b.c
===================================================================
--- binutils-2.37.orig/ld/testsuite/ld-x86-64/pr22791-2b.c
diff --git a/ld/testsuite/ld-x86-64/pr22791-2b.c b/ld/testsuite/ld-x86-64/pr22791-2b.c
deleted file mode 100644
index 79ef27c0857..00000000000
--- a/ld/testsuite/ld-x86-64/pr22791-2b.c
+++ /dev/null
@@ -1,7 +0,0 @@
-#include <stdio.h>
@ -498,9 +505,10 @@ Index: binutils-2.37/ld/testsuite/ld-x86-64/pr22791-2b.c
-{
- puts ("PASS");
-}
Index: binutils-2.37/ld/testsuite/ld-x86-64/pr22791-2c.s
===================================================================
--- binutils-2.37.orig/ld/testsuite/ld-x86-64/pr22791-2c.s
diff --git a/ld/testsuite/ld-x86-64/pr22791-2c.s b/ld/testsuite/ld-x86-64/pr22791-2c.s
deleted file mode 100644
index 1460d1b8288..00000000000
--- a/ld/testsuite/ld-x86-64/pr22791-2c.s
+++ /dev/null
@@ -1,12 +0,0 @@
- .text
@ -515,10 +523,10 @@ Index: binutils-2.37/ld/testsuite/ld-x86-64/pr22791-2c.s
- ret
- .size main, .-main
- .section .note.GNU-stack,"",@progbits
Index: binutils-2.37/ld/testsuite/ld-x86-64/pr22842b.S
===================================================================
--- binutils-2.37.orig/ld/testsuite/ld-x86-64/pr22842b.S
+++ binutils-2.37/ld/testsuite/ld-x86-64/pr22842b.S
diff --git a/ld/testsuite/ld-x86-64/pr22842b.S b/ld/testsuite/ld-x86-64/pr22842b.S
index f0659cd901e..b9dd81345b7 100644
--- a/ld/testsuite/ld-x86-64/pr22842b.S
+++ b/ld/testsuite/ld-x86-64/pr22842b.S
@@ -7,7 +7,7 @@ main:
leaq bar(%rip), %rdi
addq %rax, %rdi
@ -528,14 +536,15 @@ Index: binutils-2.37/ld/testsuite/ld-x86-64/pr22842b.S
xorl %eax, %eax
popq %rcx
retq
Index: binutils-2.37/ld/testsuite/ld-x86-64/x86-64.exp
===================================================================
--- binutils-2.37.orig/ld/testsuite/ld-x86-64/x86-64.exp
+++ binutils-2.37/ld/testsuite/ld-x86-64/x86-64.exp
@@ -1272,44 +1272,6 @@ if { [isnative] && [check_compiler_avail
diff --git a/ld/testsuite/ld-x86-64/x86-64.exp b/ld/testsuite/ld-x86-64/x86-64.exp
index 17fd10ee121..b4ae52ab376 100644
--- a/ld/testsuite/ld-x86-64/x86-64.exp
+++ b/ld/testsuite/ld-x86-64/x86-64.exp
@@ -1264,44 +1264,6 @@ if { [isnative] && [check_compiler_available] } {
{readelf -lW pr22393-3b.rd}} \
"pr22393-3-static" \
] \
[list \
- [list \
- "Build pr22791-1.so" \
- "-shared" \
- "-fPIC -Wa,-mx86-used-note=yes" \
@ -573,14 +582,14 @@ Index: binutils-2.37/ld/testsuite/ld-x86-64/x86-64.exp
- {{readelf -drW pr22791-2.rd}} \
- "pr22791-2" \
- ] \
- [list \
[list \
"Build pr22842.so" \
"-shared" \
"-fPIC -Wa,-mx86-used-note=yes" \
@@ -1719,15 +1681,6 @@ if { [isnative] && [check_compiler_avail
@@ -1703,15 +1665,6 @@ if { [isnative] && [check_compiler_available] } {
"pr22393-3-static" \
"pass.out" \
] \
[list \
- [list \
- "Run pr22791-2" \
- "-pie -Wl,--no-as-needed tmpdir/pr22791-2.so" \
- "-Wa,-mx86-used-note=yes" \
@ -589,32 +598,6 @@ Index: binutils-2.37/ld/testsuite/ld-x86-64/x86-64.exp
- "pass.out" \
- "$NOPIE_CFLAGS" \
- ] \
- [list \
[list \
"Run pr22842" \
"-pie -Wl,--no-as-needed tmpdir/pr22842.so" \
"-Wa,-mx86-used-note=yes" \
Index: binutils-2.37/gas/testsuite/gas/i386/x86-64-branch-3.d
===================================================================
--- binutils-2.37.orig/gas/testsuite/gas/i386/x86-64-branch-3.d
+++ binutils-2.37/gas/testsuite/gas/i386/x86-64-branch-3.d
@@ -8,15 +8,15 @@
Disassembly of section .text:
0+ <bar-0xd>:
-[ ]*[a-f0-9]+: 66 e9 00 00 00 00 data16 jmp 6 <bar-0x7> 2: R_X86_64_PLT32 foo-0x4
-[ ]*[a-f0-9]+: 66 48 e9 00 00 00 00 data16 rex\.W jmp d <bar> 9: R_X86_64_PLT32 foo-0x4
+[ ]*[a-f0-9]+: 66 e9 00 00 00 00 data16 jmp 6 <bar-0x7> 2: R_X86_64_PC32 foo-0x4
+[ ]*[a-f0-9]+: 66 48 e9 00 00 00 00 data16 rex\.W jmp d <bar> 9: R_X86_64_PC32 foo-0x4
0+d <bar>:
[ ]*[a-f0-9]+: 89 c3 mov %eax,%ebx
-[ ]*[a-f0-9]+: 66 e8 00 00 00 00 data16 call 15 <bar\+0x8> 11: R_X86_64_PLT32 foo-0x4
-[ ]*[a-f0-9]+: 66 48 e8 00 00 00 00 data16 rex\.W call 1c <bar\+0xf> 18: R_X86_64_PLT32 foo-0x4
+[ ]*[a-f0-9]+: 66 e8 00 00 00 00 data16 call 15 <bar\+0x8> 11: R_X86_64_PC32 foo-0x4
+[ ]*[a-f0-9]+: 66 48 e8 00 00 00 00 data16 rex\.W call 1c <bar\+0xf> 18: R_X86_64_PC32 foo-0x4
[ ]*[a-f0-9]+: 66 c7 f8 00 00 xbeginw 21 <bar\+0x14> 1f: R_X86_64_PC16 foo-0x2
-[ ]*[a-f0-9]+: 66 48 c7 f8 00 00 00 00 data16 rex\.W xbegin 29 <bar\+0x1c> 25: R_X86_64_PLT32 foo-0x4
+[ ]*[a-f0-9]+: 66 48 c7 f8 00 00 00 00 data16 rex\.W xbegin 29 <bar\+0x1c> 25: R_X86_64_PC32 foo-0x4
[ ]*[a-f0-9]+: 48 ff 18 lcallq \*\(%rax\)
[ ]*[a-f0-9]+: 48 ff 29 ljmpq \*\(%rcx\)
#pass

View File

@ -56,7 +56,7 @@ index 2e27cf48a8..7162d0cf91 100644
asection *sinterp;
bfd *abfd;
struct bfd_link_hash_entry *ehdr_start = NULL;
@@ -1608,7 +1633,67 @@ ldelf_before_allocation (char *audit, char *depaudit,
@@ -1572,7 +1597,65 @@ ldelf_before_allocation (char *audit, char *depaudit,
by dynamic linking. */
rpath = command_line.rpath;
if (rpath == NULL)
@ -73,14 +73,12 @@ index 2e27cf48a8..7162d0cf91 100644
+ fseek (ldso, 0, SEEK_END);
+ endcur = ftell (ldso);
+ fseek (ldso, 0, SEEK_SET);
+ dirs = xmalloc (endcur + 1);
+ dirs = xmalloc (endcur);
+ if (fread (dirs, 1, endcur, ldso) != (size_t) endcur)
+ {
+ free (dirs);
+ dirs = NULL;
+ }
+ else
+ dirs[endcur] = '\0';
+ }
+ if (dirs)
+ {

View File

@ -1,3 +1,106 @@
-------------------------------------------------------------------
Fri Mar 4 10:44:39 UTC 2022 - Martin Liška <mliska@suse.cz>
- Update binutils-2.38-branch.diff.gz in order to include PR28879.
-------------------------------------------------------------------
Tue Mar 1 12:41:27 UTC 2022 - Michael Matz <matz@suse.com>
- From Stefan Brüns <stefan.bruens@rwth-aachen.de>:
* Install symlinks for all target specific tools on
arm-eabi-none [bsc#1185712]
-------------------------------------------------------------------
Thu Feb 24 09:10:44 UTC 2022 - Martin Liška <mliska@suse.cz>
- Do not re-generate ld/ldlex.c, ld/ldgram.c, ld/ldgram.h and verify
that corresponding flex/bison files are not modified by a patch.
-------------------------------------------------------------------
Thu Feb 24 06:55:14 UTC 2022 - Martin Liška <mliska@suse.cz>
- Use verbose mode for make for cross compilers.
-------------------------------------------------------------------
Wed Feb 23 17:52:15 UTC 2022 - Michael Matz <matz@suse.com>
- Make it build on SLE-11 again.
-------------------------------------------------------------------
Tue Feb 22 09:13:15 UTC 2022 - Martin Liška <mliska@suse.cz>
- Use verbose mode for make.
-------------------------------------------------------------------
Sat Feb 12 19:13:31 UTC 2022 - Martin Liška <mliska@suse.cz>
- Update to binutils 2.38:
* elfedit: Add --output-abiversion option to update ABIVERSION.
* Add support for the LoongArch instruction set.
* Tools which display symbols or strings (readelf, strings, nm, objdump)
have a new command line option which controls how unicode characters are
handled. By default they are treated as normal for the tool. Using
--unicode=locale will display them according to the current locale.
Using --unicode=hex will display them as hex byte values, whilst
--unicode=escape will display them as escape sequences. In addition
using --unicode=highlight will display them as unicode escape sequences
highlighted in red (if supported by the output device).
* readelf -r dumps RELR relative relocations now.
* Support for efi-app-aarch64, efi-rtdrv-aarch64 and efi-bsdrv-aarch64 has been
added to objcopy in order to enable UEFI development using binutils.
* ar: Add --thin for creating thin archives. -T is a deprecated alias without
diagnostics. In many ar implementations -T has a different meaning, as
specified by X/Open System Interface.
* Add support for AArch64 system registers that were missing in previous
releases.
* Add support for the LoongArch instruction set.
* Add a command-line option, -muse-unaligned-vector-move, for x86 target
to encode aligned vector move as unaligned vector move.
* Add support for Cortex-R52+ for Arm.
* Add support for Cortex-A510, Cortex-A710, Cortex-X2 for AArch64.
* Add support for Cortex-A710 for Arm.
* Add support for Scalable Matrix Extension (SME) for AArch64.
* The --multibyte-handling=[allow|warn|warn-sym-only] option tells the
assembler what to when it encoutners multibyte characters in the input. The
default is to allow them. Setting the option to "warn" will generate a
warning message whenever any multibyte character is encountered. Using the
option to "warn-sym-only" will make the assembler generate a warning whenever a
symbol is defined containing multibyte characters. (References to undefined
symbols will not generate warnings).
* Outputs of .ds.x directive and .tfloat directive with hex input from
x86 assembler have been reduced from 12 bytes to 10 bytes to match the
output of .tfloat directive.
* Add support for 'armv8.8-a', 'armv9-a', 'armv9.1-a', 'armv9.2-a' and
'armv9.3-a' for -march in AArch64 GAS.
* Add support for 'armv8.7-a', 'armv8.8-a', 'armv9-a', 'armv9.1-a',
'armv9.2-a' and 'armv9.3-a' for -march in Arm GAS.
* Add support for Intel AVX512_FP16 instructions.
* Add -z pack-relative-relocs/-z no pack-relative-relocs to x86 ELF
linker to pack relative relocations in the DT_RELR section.
* Add support for the LoongArch architecture.
* Add -z indirect-extern-access/-z noindirect-extern-access to x86 ELF
linker to control canonical function pointers and copy relocation.
* Add --max-cache-size=SIZE to set the the maximum cache size to SIZE
bytes.
- Add binutils-2.38-branch.diff.gz.
- Removed deletion of man pages as they should be properly packages
in tarball.
- Rebased patches: aarch64-common-pagesize.patch, add-ulp-section.diff,
binutils-bfd_h.patch, binutils-revert-nm-symversion.diff,
binutils-revert-plt32-in-branches.diff, binutils-skip-rpaths.patch
and binutils-compat-old-behaviour.diff.
-------------------------------------------------------------------
Fri Feb 4 13:13:20 UTC 2022 - Matwey Kornilov <matwey.kornilov@gmail.com>
- Enable PRU architecture for AM335x CPU (Beagle Bone Black board)
-------------------------------------------------------------------
Thu Jan 27 20:36:30 UTC 2022 - Dirk Müller <dmueller@suse.com>
- use fdupes on datadir
- remove RPM_BUILD_ROOT usage and other cleanups
-------------------------------------------------------------------
Fri Nov 12 13:20:09 UTC 2021 - Martin Liška <mliska@suse.cz>

View File

@ -1,7 +1,7 @@
#
# spec file for package binutils
#
# Copyright (c) 2021 SUSE LLC
# Copyright (c) 2022 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@ -20,6 +20,7 @@ Name: binutils
BuildRequires: bc
BuildRequires: bison
BuildRequires: dejagnu
BuildRequires: fdupes
BuildRequires: flex
BuildRequires: gcc-c++
# for the testsuite
@ -34,7 +35,7 @@ BuildRequires: zlib-devel-static
%else
BuildRequires: zlib-devel
%endif
Version: 2.37
Version: 2.38
Release: 0
# disable libalternatives for now until it's changed to not
@ -72,7 +73,7 @@ Release: 0
%else
%define build_multitarget 0
%endif
%define target_list aarch64 alpha armv5l armv6l armv7l armv8l avr epiphany hppa hppa64 i686 ia64 m68k mips powerpc powerpc64 powerpc64le riscv64 rx s390 s390x sh4 sparc sparc64 x86_64 xtensa
%define target_list aarch64 alpha armv5l armv6l armv7l armv8l avr pru epiphany hppa hppa64 i686 ia64 m68k mips powerpc powerpc64 powerpc64le riscv64 rx s390 s390x sh4 sparc sparc64 x86_64 xtensa
#
#
#
@ -92,7 +93,7 @@ Source5: binutils.keyring
Source1: pre_checkin.sh
Source2: README.First-for.SUSE.packagers
Source3: baselibs.conf
Patch1: binutils-2.37-branch.diff.gz
Patch1: binutils-2.38-branch.diff.gz
Patch3: binutils-skip-rpaths.patch
Patch4: s390-biarch.diff
Patch5: x86-64-biarch.patch
@ -138,7 +139,7 @@ Requires: alts
%else
PreReq: update-alternatives
%endif
%if 0%{!?cross:1}
%if 0%{!?cross:1} && 0%{?suse_version} >= 1310
%define gold_archs %ix86 aarch64 %arm x86_64 ppc ppc64 ppc64le s390x %sparc
%endif
@ -188,6 +189,11 @@ The Compact C Type Format (CTF) is a way of representing information about a bin
%prep
echo "make check will return with %{make_check_handling} in case of testsuite failures."
%setup -q -n binutils-%{version}
# Backup flex and biscon files for later verification.
cp ld/ldlex.l ld/ldlex.l.orig
cp ld/ldgram.y ld/ldgram.y.orig
# Patch is outside test_vanilla because it's supposed to be the
# patch bringing the tarball to the newest upstream version
%patch1 -p1
@ -225,22 +231,11 @@ cp gas/config/tc-avr.h gas/config/tc-avr-nesc.h
#
# test_vanilla
%endif
# in parallel builds, when the flex or bison inputs are patched (possibly
# in the ...-branch.diff) it might happen that the dependency tracking
# of automake is confused and uses the old .c files from srcdir/ld/ while
# also generating the new .c files in builddir/ld leading to trouble.
# I haven't found the right entries to ensure this doesn't happen, so
# simply remove the intermediates
rm -f ld/ldlex.c
rm -f ld/ldgram.c ld/ldgram.h
# The 2.37 released tarball contains wrongly pre-generated (empty) man pages
# so we remove those here as well. Consider removing for later releases.
rm -f binutils/doc/*.1
rm -f binutils/doc/cxxfilt.man
rm -f gprof/*.1
rm -f gas/doc/*.1
rm -f ld/*.1
# Due to legacy flex version present in SLE-12 (and older), we cannot
# re-generate flex and bison files and so we verify that any patch modify these files.
diff -u ld/ldlex.l ld/ldlex.l.orig
diff -u ld/ldgram.y ld/ldgram.y.orig
%build
%define _lto_cflags %{nil}
@ -327,14 +322,14 @@ cd build-dir
# we patch headers (bfd-in.h) that are input to other headers
# which are generated only with --enable-maintainer-mode (which we
# don't do) or explicitely by make headers, so do this:
make %{?_smp_mflags} all-bfd TARGET-bfd=headers
make %{?_smp_mflags} all-bfd TARGET-bfd=headers V=1
# the above interacts with --enable-pgo-build=lto because all-bfd doesn't
# have the PGO handling, hence it's config.cache files are wrong
# remove all of those for reconfigure
rm */config.cache
# force reconfiguring
rm bfd/Makefile
make %{?_smp_mflags}
make %{?_smp_mflags} V=1
%else
# building cross-TARGET-binutils
@ -366,7 +361,7 @@ EXTRA_TARGETS="$EXTRA_TARGETS,arm-suse-linux-gnueabi"
%if "%{TARGET}" == "aarch64"
EXTRA_TARGETS="$EXTRA_TARGETS,aarch64-suse-linux"
%endif
%if "%{TARGET}" == "avr" || "%{TARGET}" == "spu"
%if "%{TARGET}" == "avr" || "%{TARGET}" == "spu" || "%{TARGET}" == "pru"
%define TARGET_OS %{TARGET}
%else
%if "%{TARGET}" == "epiphany" || "%{TARGET}" == "riscv32" || "%{TARGET}" == "rx"
@ -400,11 +395,11 @@ EXTRA_TARGETS="$EXTRA_TARGETS,aarch64-suse-linux"
--enable-default-hash-style=both \
%endif
${EXTRA_TARGETS:+--enable-targets="${EXTRA_TARGETS#,}"}
make %{?_smp_mflags} all-bfd TARGET-bfd=headers
make %{?_smp_mflags} all-bfd TARGET-bfd=headers V=1
rm */config.cache
# force reconfiguring
rm bfd/Makefile
make %{?_smp_mflags}
make %{?_smp_mflags} V=1
%if "%{TARGET}" == "avr"
# build an extra nesC version because nesC requires $'s in identifiers
cp -a gas gas-nesc
@ -428,26 +423,25 @@ cd build-dir
%if 0%{!?cross:1}
# installing native binutils
%ifarch %gold_archs
make DESTDIR=$RPM_BUILD_ROOT install-gold
ln -sf ld.gold $RPM_BUILD_ROOT%{_bindir}/gold
make DESTDIR=%{buildroot} install-gold
ln -sf ld.gold %{buildroot}%{_bindir}/gold
%endif
make DESTDIR=$RPM_BUILD_ROOT install-info install
make -C gas/doc DESTDIR=$RPM_BUILD_ROOT install-info-am install-am
make DESTDIR=$RPM_BUILD_ROOT install-bfd install-opcodes
if [ ! -f "%buildroot/%_bindir/ld.bfd" ]; then
mv "%buildroot/%_bindir"/{ld,ld.bfd};
make DESTDIR=%{buildroot} install-info install
make DESTDIR=%{buildroot} install-bfd install-opcodes
if [ ! -f "%{buildroot}/%_bindir/ld.bfd" ]; then
mv "%{buildroot}/%_bindir"/{ld,ld.bfd};
else
rm -f "%buildroot/%_bindir/ld";
rm -f "%{buildroot}/%_bindir/ld";
fi
%if ! 0%{with libalternatives}
mkdir -p "%buildroot/%_sysconfdir/alternatives";
mkdir -p "%{buildroot}/%_sysconfdir/alternatives";
# Keep older versions of brp-symlink happy
%if %{suse_version} < 1310
ln -s "%_bindir/ld" "%buildroot/%_sysconfdir/alternatives/ld"
ln -s "%_bindir/ld" "%{buildroot}/%_sysconfdir/alternatives/ld"
%endif
ln -s "%_sysconfdir/alternatives/ld" "%buildroot/%_bindir/ld";
ln -s "%_sysconfdir/alternatives/ld" "%{buildroot}/%_bindir/ld";
%else
ln -s %{_bindir}/alts "%buildroot/%_bindir/ld";
ln -s %{_bindir}/alts "%{buildroot}/%_bindir/ld";
mkdir -p %{buildroot}%{_datadir}/libalternatives/ld;
cat > %{buildroot}%{_datadir}/libalternatives/ld/1.conf <<EOF
binary=%{_bindir}/ld.gold
@ -457,24 +451,24 @@ binary=%{_bindir}/ld.bfd
EOF
%endif
rm -rf $RPM_BUILD_ROOT%{_prefix}/%{HOST}/bin
mkdir -p $RPM_BUILD_ROOT%{_prefix}/%{HOST}/bin
ln -sf ../../bin/{ar,as,ld,nm,ranlib,strip} $RPM_BUILD_ROOT%{_prefix}/%{HOST}/bin
mv $RPM_BUILD_ROOT%{_prefix}/%{HOST}/lib/ldscripts $RPM_BUILD_ROOT%{_libdir}
ln -sf ../../%{_lib}/ldscripts $RPM_BUILD_ROOT%{_prefix}/%{HOST}/lib/ldscripts
rm -rf %{buildroot}%{_prefix}/%{HOST}/bin
mkdir -p %{buildroot}%{_prefix}/%{HOST}/bin
ln -sf ../../bin/{ar,as,ld,nm,ranlib,strip} %{buildroot}%{_prefix}/%{HOST}/bin
mv %{buildroot}%{_prefix}/%{HOST}/lib/ldscripts $RPM_BUILD_ROOT%{_libdir}
ln -sf ../../%{_lib}/ldscripts %{buildroot}%{_prefix}/%{HOST}/lib/ldscripts
# Install header files
make -C libiberty install_to_libdir target_header_dir=/usr/include DESTDIR=$RPM_BUILD_ROOT
make -C libiberty install_to_libdir target_header_dir=/usr/include DESTDIR=%{buildroot}
# We want the PIC libiberty.a
install -m 644 libiberty/pic/libiberty.a $RPM_BUILD_ROOT%{_libdir}
install -m 644 libiberty/pic/libiberty.a %{buildroot}%{_libdir}
#
chmod a+x $RPM_BUILD_ROOT%{_libdir}/libbfd-*
chmod a+x $RPM_BUILD_ROOT%{_libdir}/libopcodes-*
chmod a+x %{buildroot}%{_libdir}/libbfd-*
chmod a+x %{buildroot}%{_libdir}/libopcodes-*
# No shared linking outside binutils
rm $RPM_BUILD_ROOT%{_libdir}/lib{bfd,opcodes}.so
rm $RPM_BUILD_ROOT%{_libdir}/lib{bfd,opcodes}.la
rm %{buildroot}%{_libdir}/lib{bfd,opcodes}.so
rm %{buildroot}%{_libdir}/lib{bfd,opcodes,ctf,ctf-nobfd}.la
# Remove unwanted files to shut up rpm
rm -f $RPM_BUILD_ROOT%{_infodir}/configure* $RPM_BUILD_ROOT%{_infodir}/standards.info*
rm -f $RPM_BUILD_ROOT%{_mandir}/man1/dlltool.1 $RPM_BUILD_ROOT%{_mandir}/man1/windres.1 $RPM_BUILD_ROOT%{_mandir}/man1/windmc.1
rm -f %{buildroot}%{_infodir}/configure* $RPM_BUILD_ROOT%{_infodir}/standards.info*
rm -f %{buildroot}%{_mandir}/man1/dlltool.1 $RPM_BUILD_ROOT%{_mandir}/man1/windres.1 $RPM_BUILD_ROOT%{_mandir}/man1/windmc.1
cd ..
%find_lang binutils
%find_lang bfd binutils.lang
@ -485,45 +479,47 @@ cd ..
%ifarch %gold_archs
%find_lang gold binutils-gold.lang
%endif
mkdir -p $RPM_BUILD_ROOT%{_docdir}/%{name}
install -m 644 binutils/NEWS $RPM_BUILD_ROOT%{_docdir}/%{name}/NEWS-binutils
install -m 644 gas/NEWS $RPM_BUILD_ROOT%{_docdir}/%{name}/NEWS-gas
install -m 644 ld/NEWS $RPM_BUILD_ROOT%{_docdir}/%{name}/NEWS-ld
mkdir -p %{buildroot}%{_docdir}/%{name}
install -m 644 binutils/NEWS %{buildroot}%{_docdir}/%{name}/NEWS-binutils
install -m 644 gas/NEWS %{buildroot}%{_docdir}/%{name}/NEWS-gas
install -m 644 ld/NEWS %{buildroot}%{_docdir}/%{name}/NEWS-ld
%else
# installing cross-TARGET-binutils and TARGET-binutils
make DESTDIR=$RPM_BUILD_ROOT install
make DESTDIR=%{buildroot} install
# Replace hard links by symlinks, so that rpmlint doesn't complain
T=$(basename %buildroot/usr/%{TARGET_OS})
for f in %buildroot/usr/$T/bin/* ; do
T=$(basename %{buildroot}/usr/%{TARGET_OS})
for f in %{buildroot}/usr/$T/bin/* ; do
ln -sf /usr/bin/$T-$(basename $f) $f
done
%if "%{TARGET}" == "arm"
# Instead of building duplicate binutils, add symlinks
for f in %buildroot/usr/$T/bin/* ; do
for f in %{buildroot}%{_bindir}/${T}-* ; do
_toolname=${f##$(dirname $f)/${T}-}
for p in arm-none-eabi; do
ln -sf %{_bindir}/$T-$(basename $f) %buildroot%{_bindir}/$p-$(basename $f)
ln -sf %{_bindir}/$T-${_toolname} %{buildroot}%{_bindir}/$p-${_toolname}
done
done
%endif
%if "%{TARGET}" == "riscv64"
# Instead of building duplicate binutils, add symlinks
for f in %buildroot/usr/$T/bin/* ; do
for f in %{buildroot}/usr/$T/bin/* ; do
for p in riscv64-elf; do
ln -sf %{_bindir}/$T-$(basename $f) %buildroot%{_bindir}/$p-$(basename $f)
ln -sf %{_bindir}/$T-$(basename $f) %{buildroot}%{_bindir}/$p-$(basename $f)
done
done
%endif
%if "%{TARGET}" == "avr"
install -c gas-nesc/as-new $RPM_BUILD_ROOT%{_prefix}/bin/%{TARGET_OS}-nesc-as
ln -sf ../../bin/%{TARGET_OS}-nesc-as $RPM_BUILD_ROOT%{_prefix}/%{TARGET_OS}/bin/nesc-as
install -c gas-nesc/as-new %{buildroot}%{_prefix}/bin/%{TARGET_OS}-nesc-as
ln -sf ../../bin/%{TARGET_OS}-nesc-as %{buildroot}%{_prefix}/%{TARGET_OS}/bin/nesc-as
%endif
rm -rf $RPM_BUILD_ROOT%{_mandir}
rm -rf $RPM_BUILD_ROOT%{_infodir}
rm -rf $RPM_BUILD_ROOT%{_prefix}/lib*
rm -rf $RPM_BUILD_ROOT%{_prefix}/include
rm -f $RPM_BUILD_ROOT%{_prefix}/bin/*-c++filt
rm -rf %{buildroot}%{_mandir}
rm -rf %{buildroot}%{_infodir}
rm -rf %{buildroot}%{_prefix}/lib*
rm -rf %{buildroot}%{_prefix}/include
rm -f %{buildroot}%{_prefix}/bin/*-c++filt
> ../binutils.lang
%endif
%fdupes %{buildroot}%{_prefix}
%if 0%{!?cross:1}
%post
@ -583,8 +579,7 @@ fi;
%postun -n libctf0 -p /sbin/ldconfig
%postun -n libctf-nobfd0 -p /sbin/ldconfig
%postun
/sbin/ldconfig
%postun -p /sbin/ldconfig
%endif
%files -f binutils.lang
@ -638,9 +633,11 @@ fi;
%{_libdir}/libctf-nobfd.so
%files -n libctf0
%defattr(-,root,root)
%{_libdir}/libctf.so.*
%files -n libctf-nobfd0
%defattr(-,root,root)
%{_libdir}/libctf-nobfd.so.*
%endif

View File

@ -1,3 +1,106 @@
-------------------------------------------------------------------
Fri Mar 4 10:44:39 UTC 2022 - Martin Liška <mliska@suse.cz>
- Update binutils-2.38-branch.diff.gz in order to include PR28879.
-------------------------------------------------------------------
Tue Mar 1 12:41:27 UTC 2022 - Michael Matz <matz@suse.com>
- From Stefan Brüns <stefan.bruens@rwth-aachen.de>:
* Install symlinks for all target specific tools on
arm-eabi-none [bsc#1185712]
-------------------------------------------------------------------
Thu Feb 24 09:10:44 UTC 2022 - Martin Liška <mliska@suse.cz>
- Do not re-generate ld/ldlex.c, ld/ldgram.c, ld/ldgram.h and verify
that corresponding flex/bison files are not modified by a patch.
-------------------------------------------------------------------
Thu Feb 24 06:55:14 UTC 2022 - Martin Liška <mliska@suse.cz>
- Use verbose mode for make for cross compilers.
-------------------------------------------------------------------
Wed Feb 23 17:52:15 UTC 2022 - Michael Matz <matz@suse.com>
- Make it build on SLE-11 again.
-------------------------------------------------------------------
Tue Feb 22 09:13:15 UTC 2022 - Martin Liška <mliska@suse.cz>
- Use verbose mode for make.
-------------------------------------------------------------------
Sat Feb 12 19:13:31 UTC 2022 - Martin Liška <mliska@suse.cz>
- Update to binutils 2.38:
* elfedit: Add --output-abiversion option to update ABIVERSION.
* Add support for the LoongArch instruction set.
* Tools which display symbols or strings (readelf, strings, nm, objdump)
have a new command line option which controls how unicode characters are
handled. By default they are treated as normal for the tool. Using
--unicode=locale will display them according to the current locale.
Using --unicode=hex will display them as hex byte values, whilst
--unicode=escape will display them as escape sequences. In addition
using --unicode=highlight will display them as unicode escape sequences
highlighted in red (if supported by the output device).
* readelf -r dumps RELR relative relocations now.
* Support for efi-app-aarch64, efi-rtdrv-aarch64 and efi-bsdrv-aarch64 has been
added to objcopy in order to enable UEFI development using binutils.
* ar: Add --thin for creating thin archives. -T is a deprecated alias without
diagnostics. In many ar implementations -T has a different meaning, as
specified by X/Open System Interface.
* Add support for AArch64 system registers that were missing in previous
releases.
* Add support for the LoongArch instruction set.
* Add a command-line option, -muse-unaligned-vector-move, for x86 target
to encode aligned vector move as unaligned vector move.
* Add support for Cortex-R52+ for Arm.
* Add support for Cortex-A510, Cortex-A710, Cortex-X2 for AArch64.
* Add support for Cortex-A710 for Arm.
* Add support for Scalable Matrix Extension (SME) for AArch64.
* The --multibyte-handling=[allow|warn|warn-sym-only] option tells the
assembler what to when it encoutners multibyte characters in the input. The
default is to allow them. Setting the option to "warn" will generate a
warning message whenever any multibyte character is encountered. Using the
option to "warn-sym-only" will make the assembler generate a warning whenever a
symbol is defined containing multibyte characters. (References to undefined
symbols will not generate warnings).
* Outputs of .ds.x directive and .tfloat directive with hex input from
x86 assembler have been reduced from 12 bytes to 10 bytes to match the
output of .tfloat directive.
* Add support for 'armv8.8-a', 'armv9-a', 'armv9.1-a', 'armv9.2-a' and
'armv9.3-a' for -march in AArch64 GAS.
* Add support for 'armv8.7-a', 'armv8.8-a', 'armv9-a', 'armv9.1-a',
'armv9.2-a' and 'armv9.3-a' for -march in Arm GAS.
* Add support for Intel AVX512_FP16 instructions.
* Add -z pack-relative-relocs/-z no pack-relative-relocs to x86 ELF
linker to pack relative relocations in the DT_RELR section.
* Add support for the LoongArch architecture.
* Add -z indirect-extern-access/-z noindirect-extern-access to x86 ELF
linker to control canonical function pointers and copy relocation.
* Add --max-cache-size=SIZE to set the the maximum cache size to SIZE
bytes.
- Add binutils-2.38-branch.diff.gz.
- Removed deletion of man pages as they should be properly packages
in tarball.
- Rebased patches: aarch64-common-pagesize.patch, add-ulp-section.diff,
binutils-bfd_h.patch, binutils-revert-nm-symversion.diff,
binutils-revert-plt32-in-branches.diff, binutils-skip-rpaths.patch
and binutils-compat-old-behaviour.diff.
-------------------------------------------------------------------
Fri Feb 4 13:13:20 UTC 2022 - Matwey Kornilov <matwey.kornilov@gmail.com>
- Enable PRU architecture for AM335x CPU (Beagle Bone Black board)
-------------------------------------------------------------------
Thu Jan 27 20:36:30 UTC 2022 - Dirk Müller <dmueller@suse.com>
- use fdupes on datadir
- remove RPM_BUILD_ROOT usage and other cleanups
-------------------------------------------------------------------
Fri Nov 12 13:20:09 UTC 2021 - Martin Liška <mliska@suse.cz>

View File

@ -1,7 +1,7 @@
#
# spec file for package cross-aarch64-binutils
#
# Copyright (c) 2021 SUSE LLC
# Copyright (c) 2022 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@ -23,6 +23,7 @@ ExcludeArch: aarch64
BuildRequires: bc
BuildRequires: bison
BuildRequires: dejagnu
BuildRequires: fdupes
BuildRequires: flex
BuildRequires: gcc-c++
# for the testsuite
@ -37,7 +38,7 @@ BuildRequires: zlib-devel-static
%else
BuildRequires: zlib-devel
%endif
Version: 2.37
Version: 2.38
Release: 0
# disable libalternatives for now until it's changed to not
@ -75,7 +76,7 @@ Release: 0
%else
%define build_multitarget 0
%endif
%define target_list aarch64 alpha armv5l armv6l armv7l armv8l avr epiphany hppa hppa64 i686 ia64 m68k mips powerpc powerpc64 powerpc64le riscv64 rx s390 s390x sh4 sparc sparc64 x86_64 xtensa
%define target_list aarch64 alpha armv5l armv6l armv7l armv8l avr pru epiphany hppa hppa64 i686 ia64 m68k mips powerpc powerpc64 powerpc64le riscv64 rx s390 s390x sh4 sparc sparc64 x86_64 xtensa
#
#
#
@ -95,7 +96,7 @@ Source5: binutils.keyring
Source1: pre_checkin.sh
Source2: README.First-for.SUSE.packagers
Source3: baselibs.conf
Patch1: binutils-2.37-branch.diff.gz
Patch1: binutils-2.38-branch.diff.gz
Patch3: binutils-skip-rpaths.patch
Patch4: s390-biarch.diff
Patch5: x86-64-biarch.patch
@ -141,7 +142,7 @@ Requires: alts
%else
PreReq: update-alternatives
%endif
%if 0%{!?cross:1}
%if 0%{!?cross:1} && 0%{?suse_version} >= 1310
%define gold_archs %ix86 aarch64 %arm x86_64 ppc ppc64 ppc64le s390x %sparc
%endif
@ -191,6 +192,11 @@ The Compact C Type Format (CTF) is a way of representing information about a bin
%prep
echo "make check will return with %{make_check_handling} in case of testsuite failures."
%setup -q -n binutils-%{version}
# Backup flex and biscon files for later verification.
cp ld/ldlex.l ld/ldlex.l.orig
cp ld/ldgram.y ld/ldgram.y.orig
# Patch is outside test_vanilla because it's supposed to be the
# patch bringing the tarball to the newest upstream version
%patch1 -p1
@ -228,22 +234,11 @@ cp gas/config/tc-avr.h gas/config/tc-avr-nesc.h
#
# test_vanilla
%endif
# in parallel builds, when the flex or bison inputs are patched (possibly
# in the ...-branch.diff) it might happen that the dependency tracking
# of automake is confused and uses the old .c files from srcdir/ld/ while
# also generating the new .c files in builddir/ld leading to trouble.
# I haven't found the right entries to ensure this doesn't happen, so
# simply remove the intermediates
rm -f ld/ldlex.c
rm -f ld/ldgram.c ld/ldgram.h
# The 2.37 released tarball contains wrongly pre-generated (empty) man pages
# so we remove those here as well. Consider removing for later releases.
rm -f binutils/doc/*.1
rm -f binutils/doc/cxxfilt.man
rm -f gprof/*.1
rm -f gas/doc/*.1
rm -f ld/*.1
# Due to legacy flex version present in SLE-12 (and older), we cannot
# re-generate flex and bison files and so we verify that any patch modify these files.
diff -u ld/ldlex.l ld/ldlex.l.orig
diff -u ld/ldgram.y ld/ldgram.y.orig
%build
%define _lto_cflags %{nil}
@ -330,14 +325,14 @@ cd build-dir
# we patch headers (bfd-in.h) that are input to other headers
# which are generated only with --enable-maintainer-mode (which we
# don't do) or explicitely by make headers, so do this:
make %{?_smp_mflags} all-bfd TARGET-bfd=headers
make %{?_smp_mflags} all-bfd TARGET-bfd=headers V=1
# the above interacts with --enable-pgo-build=lto because all-bfd doesn't
# have the PGO handling, hence it's config.cache files are wrong
# remove all of those for reconfigure
rm */config.cache
# force reconfiguring
rm bfd/Makefile
make %{?_smp_mflags}
make %{?_smp_mflags} V=1
%else
# building cross-TARGET-binutils
@ -369,7 +364,7 @@ EXTRA_TARGETS="$EXTRA_TARGETS,arm-suse-linux-gnueabi"
%if "%{TARGET}" == "aarch64"
EXTRA_TARGETS="$EXTRA_TARGETS,aarch64-suse-linux"
%endif
%if "%{TARGET}" == "avr" || "%{TARGET}" == "spu"
%if "%{TARGET}" == "avr" || "%{TARGET}" == "spu" || "%{TARGET}" == "pru"
%define TARGET_OS %{TARGET}
%else
%if "%{TARGET}" == "epiphany" || "%{TARGET}" == "riscv32" || "%{TARGET}" == "rx"
@ -403,11 +398,11 @@ EXTRA_TARGETS="$EXTRA_TARGETS,aarch64-suse-linux"
--enable-default-hash-style=both \
%endif
${EXTRA_TARGETS:+--enable-targets="${EXTRA_TARGETS#,}"}
make %{?_smp_mflags} all-bfd TARGET-bfd=headers
make %{?_smp_mflags} all-bfd TARGET-bfd=headers V=1
rm */config.cache
# force reconfiguring
rm bfd/Makefile
make %{?_smp_mflags}
make %{?_smp_mflags} V=1
%if "%{TARGET}" == "avr"
# build an extra nesC version because nesC requires $'s in identifiers
cp -a gas gas-nesc
@ -431,26 +426,25 @@ cd build-dir
%if 0%{!?cross:1}
# installing native binutils
%ifarch %gold_archs
make DESTDIR=$RPM_BUILD_ROOT install-gold
ln -sf ld.gold $RPM_BUILD_ROOT%{_bindir}/gold
make DESTDIR=%{buildroot} install-gold
ln -sf ld.gold %{buildroot}%{_bindir}/gold
%endif
make DESTDIR=$RPM_BUILD_ROOT install-info install
make -C gas/doc DESTDIR=$RPM_BUILD_ROOT install-info-am install-am
make DESTDIR=$RPM_BUILD_ROOT install-bfd install-opcodes
if [ ! -f "%buildroot/%_bindir/ld.bfd" ]; then
mv "%buildroot/%_bindir"/{ld,ld.bfd};
make DESTDIR=%{buildroot} install-info install
make DESTDIR=%{buildroot} install-bfd install-opcodes
if [ ! -f "%{buildroot}/%_bindir/ld.bfd" ]; then
mv "%{buildroot}/%_bindir"/{ld,ld.bfd};
else
rm -f "%buildroot/%_bindir/ld";
rm -f "%{buildroot}/%_bindir/ld";
fi
%if ! 0%{with libalternatives}
mkdir -p "%buildroot/%_sysconfdir/alternatives";
mkdir -p "%{buildroot}/%_sysconfdir/alternatives";
# Keep older versions of brp-symlink happy
%if %{suse_version} < 1310
ln -s "%_bindir/ld" "%buildroot/%_sysconfdir/alternatives/ld"
ln -s "%_bindir/ld" "%{buildroot}/%_sysconfdir/alternatives/ld"
%endif
ln -s "%_sysconfdir/alternatives/ld" "%buildroot/%_bindir/ld";
ln -s "%_sysconfdir/alternatives/ld" "%{buildroot}/%_bindir/ld";
%else
ln -s %{_bindir}/alts "%buildroot/%_bindir/ld";
ln -s %{_bindir}/alts "%{buildroot}/%_bindir/ld";
mkdir -p %{buildroot}%{_datadir}/libalternatives/ld;
cat > %{buildroot}%{_datadir}/libalternatives/ld/1.conf <<EOF
binary=%{_bindir}/ld.gold
@ -460,24 +454,24 @@ binary=%{_bindir}/ld.bfd
EOF
%endif
rm -rf $RPM_BUILD_ROOT%{_prefix}/%{HOST}/bin
mkdir -p $RPM_BUILD_ROOT%{_prefix}/%{HOST}/bin
ln -sf ../../bin/{ar,as,ld,nm,ranlib,strip} $RPM_BUILD_ROOT%{_prefix}/%{HOST}/bin
mv $RPM_BUILD_ROOT%{_prefix}/%{HOST}/lib/ldscripts $RPM_BUILD_ROOT%{_libdir}
ln -sf ../../%{_lib}/ldscripts $RPM_BUILD_ROOT%{_prefix}/%{HOST}/lib/ldscripts
rm -rf %{buildroot}%{_prefix}/%{HOST}/bin
mkdir -p %{buildroot}%{_prefix}/%{HOST}/bin
ln -sf ../../bin/{ar,as,ld,nm,ranlib,strip} %{buildroot}%{_prefix}/%{HOST}/bin
mv %{buildroot}%{_prefix}/%{HOST}/lib/ldscripts $RPM_BUILD_ROOT%{_libdir}
ln -sf ../../%{_lib}/ldscripts %{buildroot}%{_prefix}/%{HOST}/lib/ldscripts
# Install header files
make -C libiberty install_to_libdir target_header_dir=/usr/include DESTDIR=$RPM_BUILD_ROOT
make -C libiberty install_to_libdir target_header_dir=/usr/include DESTDIR=%{buildroot}
# We want the PIC libiberty.a
install -m 644 libiberty/pic/libiberty.a $RPM_BUILD_ROOT%{_libdir}
install -m 644 libiberty/pic/libiberty.a %{buildroot}%{_libdir}
#
chmod a+x $RPM_BUILD_ROOT%{_libdir}/libbfd-*
chmod a+x $RPM_BUILD_ROOT%{_libdir}/libopcodes-*
chmod a+x %{buildroot}%{_libdir}/libbfd-*
chmod a+x %{buildroot}%{_libdir}/libopcodes-*
# No shared linking outside binutils
rm $RPM_BUILD_ROOT%{_libdir}/lib{bfd,opcodes}.so
rm $RPM_BUILD_ROOT%{_libdir}/lib{bfd,opcodes}.la
rm %{buildroot}%{_libdir}/lib{bfd,opcodes}.so
rm %{buildroot}%{_libdir}/lib{bfd,opcodes,ctf,ctf-nobfd}.la
# Remove unwanted files to shut up rpm
rm -f $RPM_BUILD_ROOT%{_infodir}/configure* $RPM_BUILD_ROOT%{_infodir}/standards.info*
rm -f $RPM_BUILD_ROOT%{_mandir}/man1/dlltool.1 $RPM_BUILD_ROOT%{_mandir}/man1/windres.1 $RPM_BUILD_ROOT%{_mandir}/man1/windmc.1
rm -f %{buildroot}%{_infodir}/configure* $RPM_BUILD_ROOT%{_infodir}/standards.info*
rm -f %{buildroot}%{_mandir}/man1/dlltool.1 $RPM_BUILD_ROOT%{_mandir}/man1/windres.1 $RPM_BUILD_ROOT%{_mandir}/man1/windmc.1
cd ..
%find_lang binutils
%find_lang bfd binutils.lang
@ -488,45 +482,47 @@ cd ..
%ifarch %gold_archs
%find_lang gold binutils-gold.lang
%endif
mkdir -p $RPM_BUILD_ROOT%{_docdir}/%{name}
install -m 644 binutils/NEWS $RPM_BUILD_ROOT%{_docdir}/%{name}/NEWS-binutils
install -m 644 gas/NEWS $RPM_BUILD_ROOT%{_docdir}/%{name}/NEWS-gas
install -m 644 ld/NEWS $RPM_BUILD_ROOT%{_docdir}/%{name}/NEWS-ld
mkdir -p %{buildroot}%{_docdir}/%{name}
install -m 644 binutils/NEWS %{buildroot}%{_docdir}/%{name}/NEWS-binutils
install -m 644 gas/NEWS %{buildroot}%{_docdir}/%{name}/NEWS-gas
install -m 644 ld/NEWS %{buildroot}%{_docdir}/%{name}/NEWS-ld
%else
# installing cross-TARGET-binutils and TARGET-binutils
make DESTDIR=$RPM_BUILD_ROOT install
make DESTDIR=%{buildroot} install
# Replace hard links by symlinks, so that rpmlint doesn't complain
T=$(basename %buildroot/usr/%{TARGET_OS})
for f in %buildroot/usr/$T/bin/* ; do
T=$(basename %{buildroot}/usr/%{TARGET_OS})
for f in %{buildroot}/usr/$T/bin/* ; do
ln -sf /usr/bin/$T-$(basename $f) $f
done
%if "%{TARGET}" == "arm"
# Instead of building duplicate binutils, add symlinks
for f in %buildroot/usr/$T/bin/* ; do
for f in %{buildroot}%{_bindir}/${T}-* ; do
_toolname=${f##$(dirname $f)/${T}-}
for p in arm-none-eabi; do
ln -sf %{_bindir}/$T-$(basename $f) %buildroot%{_bindir}/$p-$(basename $f)
ln -sf %{_bindir}/$T-${_toolname} %{buildroot}%{_bindir}/$p-${_toolname}
done
done
%endif
%if "%{TARGET}" == "riscv64"
# Instead of building duplicate binutils, add symlinks
for f in %buildroot/usr/$T/bin/* ; do
for f in %{buildroot}/usr/$T/bin/* ; do
for p in riscv64-elf; do
ln -sf %{_bindir}/$T-$(basename $f) %buildroot%{_bindir}/$p-$(basename $f)
ln -sf %{_bindir}/$T-$(basename $f) %{buildroot}%{_bindir}/$p-$(basename $f)
done
done
%endif
%if "%{TARGET}" == "avr"
install -c gas-nesc/as-new $RPM_BUILD_ROOT%{_prefix}/bin/%{TARGET_OS}-nesc-as
ln -sf ../../bin/%{TARGET_OS}-nesc-as $RPM_BUILD_ROOT%{_prefix}/%{TARGET_OS}/bin/nesc-as
install -c gas-nesc/as-new %{buildroot}%{_prefix}/bin/%{TARGET_OS}-nesc-as
ln -sf ../../bin/%{TARGET_OS}-nesc-as %{buildroot}%{_prefix}/%{TARGET_OS}/bin/nesc-as
%endif
rm -rf $RPM_BUILD_ROOT%{_mandir}
rm -rf $RPM_BUILD_ROOT%{_infodir}
rm -rf $RPM_BUILD_ROOT%{_prefix}/lib*
rm -rf $RPM_BUILD_ROOT%{_prefix}/include
rm -f $RPM_BUILD_ROOT%{_prefix}/bin/*-c++filt
rm -rf %{buildroot}%{_mandir}
rm -rf %{buildroot}%{_infodir}
rm -rf %{buildroot}%{_prefix}/lib*
rm -rf %{buildroot}%{_prefix}/include
rm -f %{buildroot}%{_prefix}/bin/*-c++filt
> ../binutils.lang
%endif
%fdupes %{buildroot}%{_prefix}
%if 0%{!?cross:1}
%post
@ -586,8 +582,7 @@ fi;
%postun -n libctf0 -p /sbin/ldconfig
%postun -n libctf-nobfd0 -p /sbin/ldconfig
%postun
/sbin/ldconfig
%postun -p /sbin/ldconfig
%endif
%files -f binutils.lang
@ -641,9 +636,11 @@ fi;
%{_libdir}/libctf-nobfd.so
%files -n libctf0
%defattr(-,root,root)
%{_libdir}/libctf.so.*
%files -n libctf-nobfd0
%defattr(-,root,root)
%{_libdir}/libctf-nobfd.so.*
%endif

View File

@ -1,3 +1,106 @@
-------------------------------------------------------------------
Fri Mar 4 10:44:39 UTC 2022 - Martin Liška <mliska@suse.cz>
- Update binutils-2.38-branch.diff.gz in order to include PR28879.
-------------------------------------------------------------------
Tue Mar 1 12:41:27 UTC 2022 - Michael Matz <matz@suse.com>
- From Stefan Brüns <stefan.bruens@rwth-aachen.de>:
* Install symlinks for all target specific tools on
arm-eabi-none [bsc#1185712]
-------------------------------------------------------------------
Thu Feb 24 09:10:44 UTC 2022 - Martin Liška <mliska@suse.cz>
- Do not re-generate ld/ldlex.c, ld/ldgram.c, ld/ldgram.h and verify
that corresponding flex/bison files are not modified by a patch.
-------------------------------------------------------------------
Thu Feb 24 06:55:14 UTC 2022 - Martin Liška <mliska@suse.cz>
- Use verbose mode for make for cross compilers.
-------------------------------------------------------------------
Wed Feb 23 17:52:15 UTC 2022 - Michael Matz <matz@suse.com>
- Make it build on SLE-11 again.
-------------------------------------------------------------------
Tue Feb 22 09:13:15 UTC 2022 - Martin Liška <mliska@suse.cz>
- Use verbose mode for make.
-------------------------------------------------------------------
Sat Feb 12 19:13:31 UTC 2022 - Martin Liška <mliska@suse.cz>
- Update to binutils 2.38:
* elfedit: Add --output-abiversion option to update ABIVERSION.
* Add support for the LoongArch instruction set.
* Tools which display symbols or strings (readelf, strings, nm, objdump)
have a new command line option which controls how unicode characters are
handled. By default they are treated as normal for the tool. Using
--unicode=locale will display them according to the current locale.
Using --unicode=hex will display them as hex byte values, whilst
--unicode=escape will display them as escape sequences. In addition
using --unicode=highlight will display them as unicode escape sequences
highlighted in red (if supported by the output device).
* readelf -r dumps RELR relative relocations now.
* Support for efi-app-aarch64, efi-rtdrv-aarch64 and efi-bsdrv-aarch64 has been
added to objcopy in order to enable UEFI development using binutils.
* ar: Add --thin for creating thin archives. -T is a deprecated alias without
diagnostics. In many ar implementations -T has a different meaning, as
specified by X/Open System Interface.
* Add support for AArch64 system registers that were missing in previous
releases.
* Add support for the LoongArch instruction set.
* Add a command-line option, -muse-unaligned-vector-move, for x86 target
to encode aligned vector move as unaligned vector move.
* Add support for Cortex-R52+ for Arm.
* Add support for Cortex-A510, Cortex-A710, Cortex-X2 for AArch64.
* Add support for Cortex-A710 for Arm.
* Add support for Scalable Matrix Extension (SME) for AArch64.
* The --multibyte-handling=[allow|warn|warn-sym-only] option tells the
assembler what to when it encoutners multibyte characters in the input. The
default is to allow them. Setting the option to "warn" will generate a
warning message whenever any multibyte character is encountered. Using the
option to "warn-sym-only" will make the assembler generate a warning whenever a
symbol is defined containing multibyte characters. (References to undefined
symbols will not generate warnings).
* Outputs of .ds.x directive and .tfloat directive with hex input from
x86 assembler have been reduced from 12 bytes to 10 bytes to match the
output of .tfloat directive.
* Add support for 'armv8.8-a', 'armv9-a', 'armv9.1-a', 'armv9.2-a' and
'armv9.3-a' for -march in AArch64 GAS.
* Add support for 'armv8.7-a', 'armv8.8-a', 'armv9-a', 'armv9.1-a',
'armv9.2-a' and 'armv9.3-a' for -march in Arm GAS.
* Add support for Intel AVX512_FP16 instructions.
* Add -z pack-relative-relocs/-z no pack-relative-relocs to x86 ELF
linker to pack relative relocations in the DT_RELR section.
* Add support for the LoongArch architecture.
* Add -z indirect-extern-access/-z noindirect-extern-access to x86 ELF
linker to control canonical function pointers and copy relocation.
* Add --max-cache-size=SIZE to set the the maximum cache size to SIZE
bytes.
- Add binutils-2.38-branch.diff.gz.
- Removed deletion of man pages as they should be properly packages
in tarball.
- Rebased patches: aarch64-common-pagesize.patch, add-ulp-section.diff,
binutils-bfd_h.patch, binutils-revert-nm-symversion.diff,
binutils-revert-plt32-in-branches.diff, binutils-skip-rpaths.patch
and binutils-compat-old-behaviour.diff.
-------------------------------------------------------------------
Fri Feb 4 13:13:20 UTC 2022 - Matwey Kornilov <matwey.kornilov@gmail.com>
- Enable PRU architecture for AM335x CPU (Beagle Bone Black board)
-------------------------------------------------------------------
Thu Jan 27 20:36:30 UTC 2022 - Dirk Müller <dmueller@suse.com>
- use fdupes on datadir
- remove RPM_BUILD_ROOT usage and other cleanups
-------------------------------------------------------------------
Fri Nov 12 13:20:09 UTC 2021 - Martin Liška <mliska@suse.cz>

View File

@ -1,7 +1,7 @@
#
# spec file for package cross-arm-binutils
#
# Copyright (c) 2021 SUSE LLC
# Copyright (c) 2022 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@ -23,6 +23,7 @@ ExcludeArch: %arm
BuildRequires: bc
BuildRequires: bison
BuildRequires: dejagnu
BuildRequires: fdupes
BuildRequires: flex
BuildRequires: gcc-c++
# for the testsuite
@ -37,7 +38,7 @@ BuildRequires: zlib-devel-static
%else
BuildRequires: zlib-devel
%endif
Version: 2.37
Version: 2.38
Release: 0
# disable libalternatives for now until it's changed to not
@ -75,7 +76,7 @@ Release: 0
%else
%define build_multitarget 0
%endif
%define target_list aarch64 alpha armv5l armv6l armv7l armv8l avr epiphany hppa hppa64 i686 ia64 m68k mips powerpc powerpc64 powerpc64le riscv64 rx s390 s390x sh4 sparc sparc64 x86_64 xtensa
%define target_list aarch64 alpha armv5l armv6l armv7l armv8l avr pru epiphany hppa hppa64 i686 ia64 m68k mips powerpc powerpc64 powerpc64le riscv64 rx s390 s390x sh4 sparc sparc64 x86_64 xtensa
#
#
#
@ -95,7 +96,7 @@ Source5: binutils.keyring
Source1: pre_checkin.sh
Source2: README.First-for.SUSE.packagers
Source3: baselibs.conf
Patch1: binutils-2.37-branch.diff.gz
Patch1: binutils-2.38-branch.diff.gz
Patch3: binutils-skip-rpaths.patch
Patch4: s390-biarch.diff
Patch5: x86-64-biarch.patch
@ -141,7 +142,7 @@ Requires: alts
%else
PreReq: update-alternatives
%endif
%if 0%{!?cross:1}
%if 0%{!?cross:1} && 0%{?suse_version} >= 1310
%define gold_archs %ix86 aarch64 %arm x86_64 ppc ppc64 ppc64le s390x %sparc
%endif
@ -191,6 +192,11 @@ The Compact C Type Format (CTF) is a way of representing information about a bin
%prep
echo "make check will return with %{make_check_handling} in case of testsuite failures."
%setup -q -n binutils-%{version}
# Backup flex and biscon files for later verification.
cp ld/ldlex.l ld/ldlex.l.orig
cp ld/ldgram.y ld/ldgram.y.orig
# Patch is outside test_vanilla because it's supposed to be the
# patch bringing the tarball to the newest upstream version
%patch1 -p1
@ -228,22 +234,11 @@ cp gas/config/tc-avr.h gas/config/tc-avr-nesc.h
#
# test_vanilla
%endif
# in parallel builds, when the flex or bison inputs are patched (possibly
# in the ...-branch.diff) it might happen that the dependency tracking
# of automake is confused and uses the old .c files from srcdir/ld/ while
# also generating the new .c files in builddir/ld leading to trouble.
# I haven't found the right entries to ensure this doesn't happen, so
# simply remove the intermediates
rm -f ld/ldlex.c
rm -f ld/ldgram.c ld/ldgram.h
# The 2.37 released tarball contains wrongly pre-generated (empty) man pages
# so we remove those here as well. Consider removing for later releases.
rm -f binutils/doc/*.1
rm -f binutils/doc/cxxfilt.man
rm -f gprof/*.1
rm -f gas/doc/*.1
rm -f ld/*.1
# Due to legacy flex version present in SLE-12 (and older), we cannot
# re-generate flex and bison files and so we verify that any patch modify these files.
diff -u ld/ldlex.l ld/ldlex.l.orig
diff -u ld/ldgram.y ld/ldgram.y.orig
%build
%define _lto_cflags %{nil}
@ -330,14 +325,14 @@ cd build-dir
# we patch headers (bfd-in.h) that are input to other headers
# which are generated only with --enable-maintainer-mode (which we
# don't do) or explicitely by make headers, so do this:
make %{?_smp_mflags} all-bfd TARGET-bfd=headers
make %{?_smp_mflags} all-bfd TARGET-bfd=headers V=1
# the above interacts with --enable-pgo-build=lto because all-bfd doesn't
# have the PGO handling, hence it's config.cache files are wrong
# remove all of those for reconfigure
rm */config.cache
# force reconfiguring
rm bfd/Makefile
make %{?_smp_mflags}
make %{?_smp_mflags} V=1
%else
# building cross-TARGET-binutils
@ -369,7 +364,7 @@ EXTRA_TARGETS="$EXTRA_TARGETS,arm-suse-linux-gnueabi"
%if "%{TARGET}" == "aarch64"
EXTRA_TARGETS="$EXTRA_TARGETS,aarch64-suse-linux"
%endif
%if "%{TARGET}" == "avr" || "%{TARGET}" == "spu"
%if "%{TARGET}" == "avr" || "%{TARGET}" == "spu" || "%{TARGET}" == "pru"
%define TARGET_OS %{TARGET}
%else
%if "%{TARGET}" == "epiphany" || "%{TARGET}" == "riscv32" || "%{TARGET}" == "rx"
@ -403,11 +398,11 @@ EXTRA_TARGETS="$EXTRA_TARGETS,aarch64-suse-linux"
--enable-default-hash-style=both \
%endif
${EXTRA_TARGETS:+--enable-targets="${EXTRA_TARGETS#,}"}
make %{?_smp_mflags} all-bfd TARGET-bfd=headers
make %{?_smp_mflags} all-bfd TARGET-bfd=headers V=1
rm */config.cache
# force reconfiguring
rm bfd/Makefile
make %{?_smp_mflags}
make %{?_smp_mflags} V=1
%if "%{TARGET}" == "avr"
# build an extra nesC version because nesC requires $'s in identifiers
cp -a gas gas-nesc
@ -431,26 +426,25 @@ cd build-dir
%if 0%{!?cross:1}
# installing native binutils
%ifarch %gold_archs
make DESTDIR=$RPM_BUILD_ROOT install-gold
ln -sf ld.gold $RPM_BUILD_ROOT%{_bindir}/gold
make DESTDIR=%{buildroot} install-gold
ln -sf ld.gold %{buildroot}%{_bindir}/gold
%endif
make DESTDIR=$RPM_BUILD_ROOT install-info install
make -C gas/doc DESTDIR=$RPM_BUILD_ROOT install-info-am install-am
make DESTDIR=$RPM_BUILD_ROOT install-bfd install-opcodes
if [ ! -f "%buildroot/%_bindir/ld.bfd" ]; then
mv "%buildroot/%_bindir"/{ld,ld.bfd};
make DESTDIR=%{buildroot} install-info install
make DESTDIR=%{buildroot} install-bfd install-opcodes
if [ ! -f "%{buildroot}/%_bindir/ld.bfd" ]; then
mv "%{buildroot}/%_bindir"/{ld,ld.bfd};
else
rm -f "%buildroot/%_bindir/ld";
rm -f "%{buildroot}/%_bindir/ld";
fi
%if ! 0%{with libalternatives}
mkdir -p "%buildroot/%_sysconfdir/alternatives";
mkdir -p "%{buildroot}/%_sysconfdir/alternatives";
# Keep older versions of brp-symlink happy
%if %{suse_version} < 1310
ln -s "%_bindir/ld" "%buildroot/%_sysconfdir/alternatives/ld"
ln -s "%_bindir/ld" "%{buildroot}/%_sysconfdir/alternatives/ld"
%endif
ln -s "%_sysconfdir/alternatives/ld" "%buildroot/%_bindir/ld";
ln -s "%_sysconfdir/alternatives/ld" "%{buildroot}/%_bindir/ld";
%else
ln -s %{_bindir}/alts "%buildroot/%_bindir/ld";
ln -s %{_bindir}/alts "%{buildroot}/%_bindir/ld";
mkdir -p %{buildroot}%{_datadir}/libalternatives/ld;
cat > %{buildroot}%{_datadir}/libalternatives/ld/1.conf <<EOF
binary=%{_bindir}/ld.gold
@ -460,24 +454,24 @@ binary=%{_bindir}/ld.bfd
EOF
%endif
rm -rf $RPM_BUILD_ROOT%{_prefix}/%{HOST}/bin
mkdir -p $RPM_BUILD_ROOT%{_prefix}/%{HOST}/bin
ln -sf ../../bin/{ar,as,ld,nm,ranlib,strip} $RPM_BUILD_ROOT%{_prefix}/%{HOST}/bin
mv $RPM_BUILD_ROOT%{_prefix}/%{HOST}/lib/ldscripts $RPM_BUILD_ROOT%{_libdir}
ln -sf ../../%{_lib}/ldscripts $RPM_BUILD_ROOT%{_prefix}/%{HOST}/lib/ldscripts
rm -rf %{buildroot}%{_prefix}/%{HOST}/bin
mkdir -p %{buildroot}%{_prefix}/%{HOST}/bin
ln -sf ../../bin/{ar,as,ld,nm,ranlib,strip} %{buildroot}%{_prefix}/%{HOST}/bin
mv %{buildroot}%{_prefix}/%{HOST}/lib/ldscripts $RPM_BUILD_ROOT%{_libdir}
ln -sf ../../%{_lib}/ldscripts %{buildroot}%{_prefix}/%{HOST}/lib/ldscripts
# Install header files
make -C libiberty install_to_libdir target_header_dir=/usr/include DESTDIR=$RPM_BUILD_ROOT
make -C libiberty install_to_libdir target_header_dir=/usr/include DESTDIR=%{buildroot}
# We want the PIC libiberty.a
install -m 644 libiberty/pic/libiberty.a $RPM_BUILD_ROOT%{_libdir}
install -m 644 libiberty/pic/libiberty.a %{buildroot}%{_libdir}
#
chmod a+x $RPM_BUILD_ROOT%{_libdir}/libbfd-*
chmod a+x $RPM_BUILD_ROOT%{_libdir}/libopcodes-*
chmod a+x %{buildroot}%{_libdir}/libbfd-*
chmod a+x %{buildroot}%{_libdir}/libopcodes-*
# No shared linking outside binutils
rm $RPM_BUILD_ROOT%{_libdir}/lib{bfd,opcodes}.so
rm $RPM_BUILD_ROOT%{_libdir}/lib{bfd,opcodes}.la
rm %{buildroot}%{_libdir}/lib{bfd,opcodes}.so
rm %{buildroot}%{_libdir}/lib{bfd,opcodes,ctf,ctf-nobfd}.la
# Remove unwanted files to shut up rpm
rm -f $RPM_BUILD_ROOT%{_infodir}/configure* $RPM_BUILD_ROOT%{_infodir}/standards.info*
rm -f $RPM_BUILD_ROOT%{_mandir}/man1/dlltool.1 $RPM_BUILD_ROOT%{_mandir}/man1/windres.1 $RPM_BUILD_ROOT%{_mandir}/man1/windmc.1
rm -f %{buildroot}%{_infodir}/configure* $RPM_BUILD_ROOT%{_infodir}/standards.info*
rm -f %{buildroot}%{_mandir}/man1/dlltool.1 $RPM_BUILD_ROOT%{_mandir}/man1/windres.1 $RPM_BUILD_ROOT%{_mandir}/man1/windmc.1
cd ..
%find_lang binutils
%find_lang bfd binutils.lang
@ -488,45 +482,47 @@ cd ..
%ifarch %gold_archs
%find_lang gold binutils-gold.lang
%endif
mkdir -p $RPM_BUILD_ROOT%{_docdir}/%{name}
install -m 644 binutils/NEWS $RPM_BUILD_ROOT%{_docdir}/%{name}/NEWS-binutils
install -m 644 gas/NEWS $RPM_BUILD_ROOT%{_docdir}/%{name}/NEWS-gas
install -m 644 ld/NEWS $RPM_BUILD_ROOT%{_docdir}/%{name}/NEWS-ld
mkdir -p %{buildroot}%{_docdir}/%{name}
install -m 644 binutils/NEWS %{buildroot}%{_docdir}/%{name}/NEWS-binutils
install -m 644 gas/NEWS %{buildroot}%{_docdir}/%{name}/NEWS-gas
install -m 644 ld/NEWS %{buildroot}%{_docdir}/%{name}/NEWS-ld
%else
# installing cross-TARGET-binutils and TARGET-binutils
make DESTDIR=$RPM_BUILD_ROOT install
make DESTDIR=%{buildroot} install
# Replace hard links by symlinks, so that rpmlint doesn't complain
T=$(basename %buildroot/usr/%{TARGET_OS})
for f in %buildroot/usr/$T/bin/* ; do
T=$(basename %{buildroot}/usr/%{TARGET_OS})
for f in %{buildroot}/usr/$T/bin/* ; do
ln -sf /usr/bin/$T-$(basename $f) $f
done
%if "%{TARGET}" == "arm"
# Instead of building duplicate binutils, add symlinks
for f in %buildroot/usr/$T/bin/* ; do
for f in %{buildroot}%{_bindir}/${T}-* ; do
_toolname=${f##$(dirname $f)/${T}-}
for p in arm-none-eabi; do
ln -sf %{_bindir}/$T-$(basename $f) %buildroot%{_bindir}/$p-$(basename $f)
ln -sf %{_bindir}/$T-${_toolname} %{buildroot}%{_bindir}/$p-${_toolname}
done
done
%endif
%if "%{TARGET}" == "riscv64"
# Instead of building duplicate binutils, add symlinks
for f in %buildroot/usr/$T/bin/* ; do
for f in %{buildroot}/usr/$T/bin/* ; do
for p in riscv64-elf; do
ln -sf %{_bindir}/$T-$(basename $f) %buildroot%{_bindir}/$p-$(basename $f)
ln -sf %{_bindir}/$T-$(basename $f) %{buildroot}%{_bindir}/$p-$(basename $f)
done
done
%endif
%if "%{TARGET}" == "avr"
install -c gas-nesc/as-new $RPM_BUILD_ROOT%{_prefix}/bin/%{TARGET_OS}-nesc-as
ln -sf ../../bin/%{TARGET_OS}-nesc-as $RPM_BUILD_ROOT%{_prefix}/%{TARGET_OS}/bin/nesc-as
install -c gas-nesc/as-new %{buildroot}%{_prefix}/bin/%{TARGET_OS}-nesc-as
ln -sf ../../bin/%{TARGET_OS}-nesc-as %{buildroot}%{_prefix}/%{TARGET_OS}/bin/nesc-as
%endif
rm -rf $RPM_BUILD_ROOT%{_mandir}
rm -rf $RPM_BUILD_ROOT%{_infodir}
rm -rf $RPM_BUILD_ROOT%{_prefix}/lib*
rm -rf $RPM_BUILD_ROOT%{_prefix}/include
rm -f $RPM_BUILD_ROOT%{_prefix}/bin/*-c++filt
rm -rf %{buildroot}%{_mandir}
rm -rf %{buildroot}%{_infodir}
rm -rf %{buildroot}%{_prefix}/lib*
rm -rf %{buildroot}%{_prefix}/include
rm -f %{buildroot}%{_prefix}/bin/*-c++filt
> ../binutils.lang
%endif
%fdupes %{buildroot}%{_prefix}
%if 0%{!?cross:1}
%post
@ -586,8 +582,7 @@ fi;
%postun -n libctf0 -p /sbin/ldconfig
%postun -n libctf-nobfd0 -p /sbin/ldconfig
%postun
/sbin/ldconfig
%postun -p /sbin/ldconfig
%endif
%files -f binutils.lang
@ -641,9 +636,11 @@ fi;
%{_libdir}/libctf-nobfd.so
%files -n libctf0
%defattr(-,root,root)
%{_libdir}/libctf.so.*
%files -n libctf-nobfd0
%defattr(-,root,root)
%{_libdir}/libctf-nobfd.so.*
%endif

View File

@ -1,3 +1,106 @@
-------------------------------------------------------------------
Fri Mar 4 10:44:39 UTC 2022 - Martin Liška <mliska@suse.cz>
- Update binutils-2.38-branch.diff.gz in order to include PR28879.
-------------------------------------------------------------------
Tue Mar 1 12:41:27 UTC 2022 - Michael Matz <matz@suse.com>
- From Stefan Brüns <stefan.bruens@rwth-aachen.de>:
* Install symlinks for all target specific tools on
arm-eabi-none [bsc#1185712]
-------------------------------------------------------------------
Thu Feb 24 09:10:44 UTC 2022 - Martin Liška <mliska@suse.cz>
- Do not re-generate ld/ldlex.c, ld/ldgram.c, ld/ldgram.h and verify
that corresponding flex/bison files are not modified by a patch.
-------------------------------------------------------------------
Thu Feb 24 06:55:14 UTC 2022 - Martin Liška <mliska@suse.cz>
- Use verbose mode for make for cross compilers.
-------------------------------------------------------------------
Wed Feb 23 17:52:15 UTC 2022 - Michael Matz <matz@suse.com>
- Make it build on SLE-11 again.
-------------------------------------------------------------------
Tue Feb 22 09:13:15 UTC 2022 - Martin Liška <mliska@suse.cz>
- Use verbose mode for make.
-------------------------------------------------------------------
Sat Feb 12 19:13:31 UTC 2022 - Martin Liška <mliska@suse.cz>
- Update to binutils 2.38:
* elfedit: Add --output-abiversion option to update ABIVERSION.
* Add support for the LoongArch instruction set.
* Tools which display symbols or strings (readelf, strings, nm, objdump)
have a new command line option which controls how unicode characters are
handled. By default they are treated as normal for the tool. Using
--unicode=locale will display them according to the current locale.
Using --unicode=hex will display them as hex byte values, whilst
--unicode=escape will display them as escape sequences. In addition
using --unicode=highlight will display them as unicode escape sequences
highlighted in red (if supported by the output device).
* readelf -r dumps RELR relative relocations now.
* Support for efi-app-aarch64, efi-rtdrv-aarch64 and efi-bsdrv-aarch64 has been
added to objcopy in order to enable UEFI development using binutils.
* ar: Add --thin for creating thin archives. -T is a deprecated alias without
diagnostics. In many ar implementations -T has a different meaning, as
specified by X/Open System Interface.
* Add support for AArch64 system registers that were missing in previous
releases.
* Add support for the LoongArch instruction set.
* Add a command-line option, -muse-unaligned-vector-move, for x86 target
to encode aligned vector move as unaligned vector move.
* Add support for Cortex-R52+ for Arm.
* Add support for Cortex-A510, Cortex-A710, Cortex-X2 for AArch64.
* Add support for Cortex-A710 for Arm.
* Add support for Scalable Matrix Extension (SME) for AArch64.
* The --multibyte-handling=[allow|warn|warn-sym-only] option tells the
assembler what to when it encoutners multibyte characters in the input. The
default is to allow them. Setting the option to "warn" will generate a
warning message whenever any multibyte character is encountered. Using the
option to "warn-sym-only" will make the assembler generate a warning whenever a
symbol is defined containing multibyte characters. (References to undefined
symbols will not generate warnings).
* Outputs of .ds.x directive and .tfloat directive with hex input from
x86 assembler have been reduced from 12 bytes to 10 bytes to match the
output of .tfloat directive.
* Add support for 'armv8.8-a', 'armv9-a', 'armv9.1-a', 'armv9.2-a' and
'armv9.3-a' for -march in AArch64 GAS.
* Add support for 'armv8.7-a', 'armv8.8-a', 'armv9-a', 'armv9.1-a',
'armv9.2-a' and 'armv9.3-a' for -march in Arm GAS.
* Add support for Intel AVX512_FP16 instructions.
* Add -z pack-relative-relocs/-z no pack-relative-relocs to x86 ELF
linker to pack relative relocations in the DT_RELR section.
* Add support for the LoongArch architecture.
* Add -z indirect-extern-access/-z noindirect-extern-access to x86 ELF
linker to control canonical function pointers and copy relocation.
* Add --max-cache-size=SIZE to set the the maximum cache size to SIZE
bytes.
- Add binutils-2.38-branch.diff.gz.
- Removed deletion of man pages as they should be properly packages
in tarball.
- Rebased patches: aarch64-common-pagesize.patch, add-ulp-section.diff,
binutils-bfd_h.patch, binutils-revert-nm-symversion.diff,
binutils-revert-plt32-in-branches.diff, binutils-skip-rpaths.patch
and binutils-compat-old-behaviour.diff.
-------------------------------------------------------------------
Fri Feb 4 13:13:20 UTC 2022 - Matwey Kornilov <matwey.kornilov@gmail.com>
- Enable PRU architecture for AM335x CPU (Beagle Bone Black board)
-------------------------------------------------------------------
Thu Jan 27 20:36:30 UTC 2022 - Dirk Müller <dmueller@suse.com>
- use fdupes on datadir
- remove RPM_BUILD_ROOT usage and other cleanups
-------------------------------------------------------------------
Fri Nov 12 13:20:09 UTC 2021 - Martin Liška <mliska@suse.cz>

View File

@ -1,7 +1,7 @@
#
# spec file for package cross-avr-binutils
#
# Copyright (c) 2021 SUSE LLC
# Copyright (c) 2022 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@ -23,6 +23,7 @@ ExcludeArch: avr
BuildRequires: bc
BuildRequires: bison
BuildRequires: dejagnu
BuildRequires: fdupes
BuildRequires: flex
BuildRequires: gcc-c++
# for the testsuite
@ -37,7 +38,7 @@ BuildRequires: zlib-devel-static
%else
BuildRequires: zlib-devel
%endif
Version: 2.37
Version: 2.38
Release: 0
# disable libalternatives for now until it's changed to not
@ -75,7 +76,7 @@ Release: 0
%else
%define build_multitarget 0
%endif
%define target_list aarch64 alpha armv5l armv6l armv7l armv8l avr epiphany hppa hppa64 i686 ia64 m68k mips powerpc powerpc64 powerpc64le riscv64 rx s390 s390x sh4 sparc sparc64 x86_64 xtensa
%define target_list aarch64 alpha armv5l armv6l armv7l armv8l avr pru epiphany hppa hppa64 i686 ia64 m68k mips powerpc powerpc64 powerpc64le riscv64 rx s390 s390x sh4 sparc sparc64 x86_64 xtensa
#
#
#
@ -95,7 +96,7 @@ Source5: binutils.keyring
Source1: pre_checkin.sh
Source2: README.First-for.SUSE.packagers
Source3: baselibs.conf
Patch1: binutils-2.37-branch.diff.gz
Patch1: binutils-2.38-branch.diff.gz
Patch3: binutils-skip-rpaths.patch
Patch4: s390-biarch.diff
Patch5: x86-64-biarch.patch
@ -141,7 +142,7 @@ Requires: alts
%else
PreReq: update-alternatives
%endif
%if 0%{!?cross:1}
%if 0%{!?cross:1} && 0%{?suse_version} >= 1310
%define gold_archs %ix86 aarch64 %arm x86_64 ppc ppc64 ppc64le s390x %sparc
%endif
@ -191,6 +192,11 @@ The Compact C Type Format (CTF) is a way of representing information about a bin
%prep
echo "make check will return with %{make_check_handling} in case of testsuite failures."
%setup -q -n binutils-%{version}
# Backup flex and biscon files for later verification.
cp ld/ldlex.l ld/ldlex.l.orig
cp ld/ldgram.y ld/ldgram.y.orig
# Patch is outside test_vanilla because it's supposed to be the
# patch bringing the tarball to the newest upstream version
%patch1 -p1
@ -228,22 +234,11 @@ cp gas/config/tc-avr.h gas/config/tc-avr-nesc.h
#
# test_vanilla
%endif
# in parallel builds, when the flex or bison inputs are patched (possibly
# in the ...-branch.diff) it might happen that the dependency tracking
# of automake is confused and uses the old .c files from srcdir/ld/ while
# also generating the new .c files in builddir/ld leading to trouble.
# I haven't found the right entries to ensure this doesn't happen, so
# simply remove the intermediates
rm -f ld/ldlex.c
rm -f ld/ldgram.c ld/ldgram.h
# The 2.37 released tarball contains wrongly pre-generated (empty) man pages
# so we remove those here as well. Consider removing for later releases.
rm -f binutils/doc/*.1
rm -f binutils/doc/cxxfilt.man
rm -f gprof/*.1
rm -f gas/doc/*.1
rm -f ld/*.1
# Due to legacy flex version present in SLE-12 (and older), we cannot
# re-generate flex and bison files and so we verify that any patch modify these files.
diff -u ld/ldlex.l ld/ldlex.l.orig
diff -u ld/ldgram.y ld/ldgram.y.orig
%build
%define _lto_cflags %{nil}
@ -330,14 +325,14 @@ cd build-dir
# we patch headers (bfd-in.h) that are input to other headers
# which are generated only with --enable-maintainer-mode (which we
# don't do) or explicitely by make headers, so do this:
make %{?_smp_mflags} all-bfd TARGET-bfd=headers
make %{?_smp_mflags} all-bfd TARGET-bfd=headers V=1
# the above interacts with --enable-pgo-build=lto because all-bfd doesn't
# have the PGO handling, hence it's config.cache files are wrong
# remove all of those for reconfigure
rm */config.cache
# force reconfiguring
rm bfd/Makefile
make %{?_smp_mflags}
make %{?_smp_mflags} V=1
%else
# building cross-TARGET-binutils
@ -369,7 +364,7 @@ EXTRA_TARGETS="$EXTRA_TARGETS,arm-suse-linux-gnueabi"
%if "%{TARGET}" == "aarch64"
EXTRA_TARGETS="$EXTRA_TARGETS,aarch64-suse-linux"
%endif
%if "%{TARGET}" == "avr" || "%{TARGET}" == "spu"
%if "%{TARGET}" == "avr" || "%{TARGET}" == "spu" || "%{TARGET}" == "pru"
%define TARGET_OS %{TARGET}
%else
%if "%{TARGET}" == "epiphany" || "%{TARGET}" == "riscv32" || "%{TARGET}" == "rx"
@ -403,11 +398,11 @@ EXTRA_TARGETS="$EXTRA_TARGETS,aarch64-suse-linux"
--enable-default-hash-style=both \
%endif
${EXTRA_TARGETS:+--enable-targets="${EXTRA_TARGETS#,}"}
make %{?_smp_mflags} all-bfd TARGET-bfd=headers
make %{?_smp_mflags} all-bfd TARGET-bfd=headers V=1
rm */config.cache
# force reconfiguring
rm bfd/Makefile
make %{?_smp_mflags}
make %{?_smp_mflags} V=1
%if "%{TARGET}" == "avr"
# build an extra nesC version because nesC requires $'s in identifiers
cp -a gas gas-nesc
@ -431,26 +426,25 @@ cd build-dir
%if 0%{!?cross:1}
# installing native binutils
%ifarch %gold_archs
make DESTDIR=$RPM_BUILD_ROOT install-gold
ln -sf ld.gold $RPM_BUILD_ROOT%{_bindir}/gold
make DESTDIR=%{buildroot} install-gold
ln -sf ld.gold %{buildroot}%{_bindir}/gold
%endif
make DESTDIR=$RPM_BUILD_ROOT install-info install
make -C gas/doc DESTDIR=$RPM_BUILD_ROOT install-info-am install-am
make DESTDIR=$RPM_BUILD_ROOT install-bfd install-opcodes
if [ ! -f "%buildroot/%_bindir/ld.bfd" ]; then
mv "%buildroot/%_bindir"/{ld,ld.bfd};
make DESTDIR=%{buildroot} install-info install
make DESTDIR=%{buildroot} install-bfd install-opcodes
if [ ! -f "%{buildroot}/%_bindir/ld.bfd" ]; then
mv "%{buildroot}/%_bindir"/{ld,ld.bfd};
else
rm -f "%buildroot/%_bindir/ld";
rm -f "%{buildroot}/%_bindir/ld";
fi
%if ! 0%{with libalternatives}
mkdir -p "%buildroot/%_sysconfdir/alternatives";
mkdir -p "%{buildroot}/%_sysconfdir/alternatives";
# Keep older versions of brp-symlink happy
%if %{suse_version} < 1310
ln -s "%_bindir/ld" "%buildroot/%_sysconfdir/alternatives/ld"
ln -s "%_bindir/ld" "%{buildroot}/%_sysconfdir/alternatives/ld"
%endif
ln -s "%_sysconfdir/alternatives/ld" "%buildroot/%_bindir/ld";
ln -s "%_sysconfdir/alternatives/ld" "%{buildroot}/%_bindir/ld";
%else
ln -s %{_bindir}/alts "%buildroot/%_bindir/ld";
ln -s %{_bindir}/alts "%{buildroot}/%_bindir/ld";
mkdir -p %{buildroot}%{_datadir}/libalternatives/ld;
cat > %{buildroot}%{_datadir}/libalternatives/ld/1.conf <<EOF
binary=%{_bindir}/ld.gold
@ -460,24 +454,24 @@ binary=%{_bindir}/ld.bfd
EOF
%endif
rm -rf $RPM_BUILD_ROOT%{_prefix}/%{HOST}/bin
mkdir -p $RPM_BUILD_ROOT%{_prefix}/%{HOST}/bin
ln -sf ../../bin/{ar,as,ld,nm,ranlib,strip} $RPM_BUILD_ROOT%{_prefix}/%{HOST}/bin
mv $RPM_BUILD_ROOT%{_prefix}/%{HOST}/lib/ldscripts $RPM_BUILD_ROOT%{_libdir}
ln -sf ../../%{_lib}/ldscripts $RPM_BUILD_ROOT%{_prefix}/%{HOST}/lib/ldscripts
rm -rf %{buildroot}%{_prefix}/%{HOST}/bin
mkdir -p %{buildroot}%{_prefix}/%{HOST}/bin
ln -sf ../../bin/{ar,as,ld,nm,ranlib,strip} %{buildroot}%{_prefix}/%{HOST}/bin
mv %{buildroot}%{_prefix}/%{HOST}/lib/ldscripts $RPM_BUILD_ROOT%{_libdir}
ln -sf ../../%{_lib}/ldscripts %{buildroot}%{_prefix}/%{HOST}/lib/ldscripts
# Install header files
make -C libiberty install_to_libdir target_header_dir=/usr/include DESTDIR=$RPM_BUILD_ROOT
make -C libiberty install_to_libdir target_header_dir=/usr/include DESTDIR=%{buildroot}
# We want the PIC libiberty.a
install -m 644 libiberty/pic/libiberty.a $RPM_BUILD_ROOT%{_libdir}
install -m 644 libiberty/pic/libiberty.a %{buildroot}%{_libdir}
#
chmod a+x $RPM_BUILD_ROOT%{_libdir}/libbfd-*
chmod a+x $RPM_BUILD_ROOT%{_libdir}/libopcodes-*
chmod a+x %{buildroot}%{_libdir}/libbfd-*
chmod a+x %{buildroot}%{_libdir}/libopcodes-*
# No shared linking outside binutils
rm $RPM_BUILD_ROOT%{_libdir}/lib{bfd,opcodes}.so
rm $RPM_BUILD_ROOT%{_libdir}/lib{bfd,opcodes}.la
rm %{buildroot}%{_libdir}/lib{bfd,opcodes}.so
rm %{buildroot}%{_libdir}/lib{bfd,opcodes,ctf,ctf-nobfd}.la
# Remove unwanted files to shut up rpm
rm -f $RPM_BUILD_ROOT%{_infodir}/configure* $RPM_BUILD_ROOT%{_infodir}/standards.info*
rm -f $RPM_BUILD_ROOT%{_mandir}/man1/dlltool.1 $RPM_BUILD_ROOT%{_mandir}/man1/windres.1 $RPM_BUILD_ROOT%{_mandir}/man1/windmc.1
rm -f %{buildroot}%{_infodir}/configure* $RPM_BUILD_ROOT%{_infodir}/standards.info*
rm -f %{buildroot}%{_mandir}/man1/dlltool.1 $RPM_BUILD_ROOT%{_mandir}/man1/windres.1 $RPM_BUILD_ROOT%{_mandir}/man1/windmc.1
cd ..
%find_lang binutils
%find_lang bfd binutils.lang
@ -488,45 +482,47 @@ cd ..
%ifarch %gold_archs
%find_lang gold binutils-gold.lang
%endif
mkdir -p $RPM_BUILD_ROOT%{_docdir}/%{name}
install -m 644 binutils/NEWS $RPM_BUILD_ROOT%{_docdir}/%{name}/NEWS-binutils
install -m 644 gas/NEWS $RPM_BUILD_ROOT%{_docdir}/%{name}/NEWS-gas
install -m 644 ld/NEWS $RPM_BUILD_ROOT%{_docdir}/%{name}/NEWS-ld
mkdir -p %{buildroot}%{_docdir}/%{name}
install -m 644 binutils/NEWS %{buildroot}%{_docdir}/%{name}/NEWS-binutils
install -m 644 gas/NEWS %{buildroot}%{_docdir}/%{name}/NEWS-gas
install -m 644 ld/NEWS %{buildroot}%{_docdir}/%{name}/NEWS-ld
%else
# installing cross-TARGET-binutils and TARGET-binutils
make DESTDIR=$RPM_BUILD_ROOT install
make DESTDIR=%{buildroot} install
# Replace hard links by symlinks, so that rpmlint doesn't complain
T=$(basename %buildroot/usr/%{TARGET_OS})
for f in %buildroot/usr/$T/bin/* ; do
T=$(basename %{buildroot}/usr/%{TARGET_OS})
for f in %{buildroot}/usr/$T/bin/* ; do
ln -sf /usr/bin/$T-$(basename $f) $f
done
%if "%{TARGET}" == "arm"
# Instead of building duplicate binutils, add symlinks
for f in %buildroot/usr/$T/bin/* ; do
for f in %{buildroot}%{_bindir}/${T}-* ; do
_toolname=${f##$(dirname $f)/${T}-}
for p in arm-none-eabi; do
ln -sf %{_bindir}/$T-$(basename $f) %buildroot%{_bindir}/$p-$(basename $f)
ln -sf %{_bindir}/$T-${_toolname} %{buildroot}%{_bindir}/$p-${_toolname}
done
done
%endif
%if "%{TARGET}" == "riscv64"
# Instead of building duplicate binutils, add symlinks
for f in %buildroot/usr/$T/bin/* ; do
for f in %{buildroot}/usr/$T/bin/* ; do
for p in riscv64-elf; do
ln -sf %{_bindir}/$T-$(basename $f) %buildroot%{_bindir}/$p-$(basename $f)
ln -sf %{_bindir}/$T-$(basename $f) %{buildroot}%{_bindir}/$p-$(basename $f)
done
done
%endif
%if "%{TARGET}" == "avr"
install -c gas-nesc/as-new $RPM_BUILD_ROOT%{_prefix}/bin/%{TARGET_OS}-nesc-as
ln -sf ../../bin/%{TARGET_OS}-nesc-as $RPM_BUILD_ROOT%{_prefix}/%{TARGET_OS}/bin/nesc-as
install -c gas-nesc/as-new %{buildroot}%{_prefix}/bin/%{TARGET_OS}-nesc-as
ln -sf ../../bin/%{TARGET_OS}-nesc-as %{buildroot}%{_prefix}/%{TARGET_OS}/bin/nesc-as
%endif
rm -rf $RPM_BUILD_ROOT%{_mandir}
rm -rf $RPM_BUILD_ROOT%{_infodir}
rm -rf $RPM_BUILD_ROOT%{_prefix}/lib*
rm -rf $RPM_BUILD_ROOT%{_prefix}/include
rm -f $RPM_BUILD_ROOT%{_prefix}/bin/*-c++filt
rm -rf %{buildroot}%{_mandir}
rm -rf %{buildroot}%{_infodir}
rm -rf %{buildroot}%{_prefix}/lib*
rm -rf %{buildroot}%{_prefix}/include
rm -f %{buildroot}%{_prefix}/bin/*-c++filt
> ../binutils.lang
%endif
%fdupes %{buildroot}%{_prefix}
%if 0%{!?cross:1}
%post
@ -586,8 +582,7 @@ fi;
%postun -n libctf0 -p /sbin/ldconfig
%postun -n libctf-nobfd0 -p /sbin/ldconfig
%postun
/sbin/ldconfig
%postun -p /sbin/ldconfig
%endif
%files -f binutils.lang
@ -641,9 +636,11 @@ fi;
%{_libdir}/libctf-nobfd.so
%files -n libctf0
%defattr(-,root,root)
%{_libdir}/libctf.so.*
%files -n libctf-nobfd0
%defattr(-,root,root)
%{_libdir}/libctf-nobfd.so.*
%endif

View File

@ -2,11 +2,12 @@ Index: gas/config/tc-avr-nesc.h
===================================================================
--- gas/config/tc-avr-nesc.h.orig 2016-02-01 09:58:37.419903606 +0100
+++ gas/config/tc-avr-nesc.h 2016-02-01 09:58:39.631928732 +0100
@@ -143,8 +143,12 @@ extern long md_pcrel_from_section (struc
Index: gas/expr.c
@@ -143,8 +143,12 @@ extern int avr_force_relocation (struct fix *);
would print `12 34 56 78'. The default value is 4. */
#define LISTING_WORD_SIZE 2
-/* AVR port uses `$' as a logical line separator. */
-/* AVR port uses `$' as a logical line separator by default. */
-#define LEX_DOLLAR 0
+/* AVR port uses `$' as a logical line separator and doesn't
+ allow it in symbols. We allow it in the middle of symbols.
@ -17,7 +18,7 @@ Index: gas/config/tc-avr-nesc.h
/* An `.lcomm' directive with no explicit alignment parameter will
use this macro to set P2VAR to the alignment that a request for
Index: gas/expr.c
===================================================================
--- gas/expr.c.orig 2016-02-01 09:58:35.743884569 +0100
+++ gas/expr.c 2016-02-01 09:58:39.631928732 +0100

View File

@ -1,3 +1,106 @@
-------------------------------------------------------------------
Fri Mar 4 10:44:39 UTC 2022 - Martin Liška <mliska@suse.cz>
- Update binutils-2.38-branch.diff.gz in order to include PR28879.
-------------------------------------------------------------------
Tue Mar 1 12:41:27 UTC 2022 - Michael Matz <matz@suse.com>
- From Stefan Brüns <stefan.bruens@rwth-aachen.de>:
* Install symlinks for all target specific tools on
arm-eabi-none [bsc#1185712]
-------------------------------------------------------------------
Thu Feb 24 09:10:44 UTC 2022 - Martin Liška <mliska@suse.cz>
- Do not re-generate ld/ldlex.c, ld/ldgram.c, ld/ldgram.h and verify
that corresponding flex/bison files are not modified by a patch.
-------------------------------------------------------------------
Thu Feb 24 06:55:14 UTC 2022 - Martin Liška <mliska@suse.cz>
- Use verbose mode for make for cross compilers.
-------------------------------------------------------------------
Wed Feb 23 17:52:15 UTC 2022 - Michael Matz <matz@suse.com>
- Make it build on SLE-11 again.
-------------------------------------------------------------------
Tue Feb 22 09:13:15 UTC 2022 - Martin Liška <mliska@suse.cz>
- Use verbose mode for make.
-------------------------------------------------------------------
Sat Feb 12 19:13:31 UTC 2022 - Martin Liška <mliska@suse.cz>
- Update to binutils 2.38:
* elfedit: Add --output-abiversion option to update ABIVERSION.
* Add support for the LoongArch instruction set.
* Tools which display symbols or strings (readelf, strings, nm, objdump)
have a new command line option which controls how unicode characters are
handled. By default they are treated as normal for the tool. Using
--unicode=locale will display them according to the current locale.
Using --unicode=hex will display them as hex byte values, whilst
--unicode=escape will display them as escape sequences. In addition
using --unicode=highlight will display them as unicode escape sequences
highlighted in red (if supported by the output device).
* readelf -r dumps RELR relative relocations now.
* Support for efi-app-aarch64, efi-rtdrv-aarch64 and efi-bsdrv-aarch64 has been
added to objcopy in order to enable UEFI development using binutils.
* ar: Add --thin for creating thin archives. -T is a deprecated alias without
diagnostics. In many ar implementations -T has a different meaning, as
specified by X/Open System Interface.
* Add support for AArch64 system registers that were missing in previous
releases.
* Add support for the LoongArch instruction set.
* Add a command-line option, -muse-unaligned-vector-move, for x86 target
to encode aligned vector move as unaligned vector move.
* Add support for Cortex-R52+ for Arm.
* Add support for Cortex-A510, Cortex-A710, Cortex-X2 for AArch64.
* Add support for Cortex-A710 for Arm.
* Add support for Scalable Matrix Extension (SME) for AArch64.
* The --multibyte-handling=[allow|warn|warn-sym-only] option tells the
assembler what to when it encoutners multibyte characters in the input. The
default is to allow them. Setting the option to "warn" will generate a
warning message whenever any multibyte character is encountered. Using the
option to "warn-sym-only" will make the assembler generate a warning whenever a
symbol is defined containing multibyte characters. (References to undefined
symbols will not generate warnings).
* Outputs of .ds.x directive and .tfloat directive with hex input from
x86 assembler have been reduced from 12 bytes to 10 bytes to match the
output of .tfloat directive.
* Add support for 'armv8.8-a', 'armv9-a', 'armv9.1-a', 'armv9.2-a' and
'armv9.3-a' for -march in AArch64 GAS.
* Add support for 'armv8.7-a', 'armv8.8-a', 'armv9-a', 'armv9.1-a',
'armv9.2-a' and 'armv9.3-a' for -march in Arm GAS.
* Add support for Intel AVX512_FP16 instructions.
* Add -z pack-relative-relocs/-z no pack-relative-relocs to x86 ELF
linker to pack relative relocations in the DT_RELR section.
* Add support for the LoongArch architecture.
* Add -z indirect-extern-access/-z noindirect-extern-access to x86 ELF
linker to control canonical function pointers and copy relocation.
* Add --max-cache-size=SIZE to set the the maximum cache size to SIZE
bytes.
- Add binutils-2.38-branch.diff.gz.
- Removed deletion of man pages as they should be properly packages
in tarball.
- Rebased patches: aarch64-common-pagesize.patch, add-ulp-section.diff,
binutils-bfd_h.patch, binutils-revert-nm-symversion.diff,
binutils-revert-plt32-in-branches.diff, binutils-skip-rpaths.patch
and binutils-compat-old-behaviour.diff.
-------------------------------------------------------------------
Fri Feb 4 13:13:20 UTC 2022 - Matwey Kornilov <matwey.kornilov@gmail.com>
- Enable PRU architecture for AM335x CPU (Beagle Bone Black board)
-------------------------------------------------------------------
Thu Jan 27 20:36:30 UTC 2022 - Dirk Müller <dmueller@suse.com>
- use fdupes on datadir
- remove RPM_BUILD_ROOT usage and other cleanups
-------------------------------------------------------------------
Fri Nov 12 13:20:09 UTC 2021 - Martin Liška <mliska@suse.cz>

View File

@ -1,7 +1,7 @@
#
# spec file for package cross-epiphany-binutils
#
# Copyright (c) 2021 SUSE LLC
# Copyright (c) 2022 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@ -23,6 +23,7 @@ ExcludeArch: epiphany
BuildRequires: bc
BuildRequires: bison
BuildRequires: dejagnu
BuildRequires: fdupes
BuildRequires: flex
BuildRequires: gcc-c++
# for the testsuite
@ -37,7 +38,7 @@ BuildRequires: zlib-devel-static
%else
BuildRequires: zlib-devel
%endif
Version: 2.37
Version: 2.38
Release: 0
# disable libalternatives for now until it's changed to not
@ -75,7 +76,7 @@ Release: 0
%else
%define build_multitarget 0
%endif
%define target_list aarch64 alpha armv5l armv6l armv7l armv8l avr epiphany hppa hppa64 i686 ia64 m68k mips powerpc powerpc64 powerpc64le riscv64 rx s390 s390x sh4 sparc sparc64 x86_64 xtensa
%define target_list aarch64 alpha armv5l armv6l armv7l armv8l avr pru epiphany hppa hppa64 i686 ia64 m68k mips powerpc powerpc64 powerpc64le riscv64 rx s390 s390x sh4 sparc sparc64 x86_64 xtensa
#
#
#
@ -95,7 +96,7 @@ Source5: binutils.keyring
Source1: pre_checkin.sh
Source2: README.First-for.SUSE.packagers
Source3: baselibs.conf
Patch1: binutils-2.37-branch.diff.gz
Patch1: binutils-2.38-branch.diff.gz
Patch3: binutils-skip-rpaths.patch
Patch4: s390-biarch.diff
Patch5: x86-64-biarch.patch
@ -141,7 +142,7 @@ Requires: alts
%else
PreReq: update-alternatives
%endif
%if 0%{!?cross:1}
%if 0%{!?cross:1} && 0%{?suse_version} >= 1310
%define gold_archs %ix86 aarch64 %arm x86_64 ppc ppc64 ppc64le s390x %sparc
%endif
@ -191,6 +192,11 @@ The Compact C Type Format (CTF) is a way of representing information about a bin
%prep
echo "make check will return with %{make_check_handling} in case of testsuite failures."
%setup -q -n binutils-%{version}
# Backup flex and biscon files for later verification.
cp ld/ldlex.l ld/ldlex.l.orig
cp ld/ldgram.y ld/ldgram.y.orig
# Patch is outside test_vanilla because it's supposed to be the
# patch bringing the tarball to the newest upstream version
%patch1 -p1
@ -228,22 +234,11 @@ cp gas/config/tc-avr.h gas/config/tc-avr-nesc.h
#
# test_vanilla
%endif
# in parallel builds, when the flex or bison inputs are patched (possibly
# in the ...-branch.diff) it might happen that the dependency tracking
# of automake is confused and uses the old .c files from srcdir/ld/ while
# also generating the new .c files in builddir/ld leading to trouble.
# I haven't found the right entries to ensure this doesn't happen, so
# simply remove the intermediates
rm -f ld/ldlex.c
rm -f ld/ldgram.c ld/ldgram.h
# The 2.37 released tarball contains wrongly pre-generated (empty) man pages
# so we remove those here as well. Consider removing for later releases.
rm -f binutils/doc/*.1
rm -f binutils/doc/cxxfilt.man
rm -f gprof/*.1
rm -f gas/doc/*.1
rm -f ld/*.1
# Due to legacy flex version present in SLE-12 (and older), we cannot
# re-generate flex and bison files and so we verify that any patch modify these files.
diff -u ld/ldlex.l ld/ldlex.l.orig
diff -u ld/ldgram.y ld/ldgram.y.orig
%build
%define _lto_cflags %{nil}
@ -330,14 +325,14 @@ cd build-dir
# we patch headers (bfd-in.h) that are input to other headers
# which are generated only with --enable-maintainer-mode (which we
# don't do) or explicitely by make headers, so do this:
make %{?_smp_mflags} all-bfd TARGET-bfd=headers
make %{?_smp_mflags} all-bfd TARGET-bfd=headers V=1
# the above interacts with --enable-pgo-build=lto because all-bfd doesn't
# have the PGO handling, hence it's config.cache files are wrong
# remove all of those for reconfigure
rm */config.cache
# force reconfiguring
rm bfd/Makefile
make %{?_smp_mflags}
make %{?_smp_mflags} V=1
%else
# building cross-TARGET-binutils
@ -369,7 +364,7 @@ EXTRA_TARGETS="$EXTRA_TARGETS,arm-suse-linux-gnueabi"
%if "%{TARGET}" == "aarch64"
EXTRA_TARGETS="$EXTRA_TARGETS,aarch64-suse-linux"
%endif
%if "%{TARGET}" == "avr" || "%{TARGET}" == "spu"
%if "%{TARGET}" == "avr" || "%{TARGET}" == "spu" || "%{TARGET}" == "pru"
%define TARGET_OS %{TARGET}
%else
%if "%{TARGET}" == "epiphany" || "%{TARGET}" == "riscv32" || "%{TARGET}" == "rx"
@ -403,11 +398,11 @@ EXTRA_TARGETS="$EXTRA_TARGETS,aarch64-suse-linux"
--enable-default-hash-style=both \
%endif
${EXTRA_TARGETS:+--enable-targets="${EXTRA_TARGETS#,}"}
make %{?_smp_mflags} all-bfd TARGET-bfd=headers
make %{?_smp_mflags} all-bfd TARGET-bfd=headers V=1
rm */config.cache
# force reconfiguring
rm bfd/Makefile
make %{?_smp_mflags}
make %{?_smp_mflags} V=1
%if "%{TARGET}" == "avr"
# build an extra nesC version because nesC requires $'s in identifiers
cp -a gas gas-nesc
@ -431,26 +426,25 @@ cd build-dir
%if 0%{!?cross:1}
# installing native binutils
%ifarch %gold_archs
make DESTDIR=$RPM_BUILD_ROOT install-gold
ln -sf ld.gold $RPM_BUILD_ROOT%{_bindir}/gold
make DESTDIR=%{buildroot} install-gold
ln -sf ld.gold %{buildroot}%{_bindir}/gold
%endif
make DESTDIR=$RPM_BUILD_ROOT install-info install
make -C gas/doc DESTDIR=$RPM_BUILD_ROOT install-info-am install-am
make DESTDIR=$RPM_BUILD_ROOT install-bfd install-opcodes
if [ ! -f "%buildroot/%_bindir/ld.bfd" ]; then
mv "%buildroot/%_bindir"/{ld,ld.bfd};
make DESTDIR=%{buildroot} install-info install
make DESTDIR=%{buildroot} install-bfd install-opcodes
if [ ! -f "%{buildroot}/%_bindir/ld.bfd" ]; then
mv "%{buildroot}/%_bindir"/{ld,ld.bfd};
else
rm -f "%buildroot/%_bindir/ld";
rm -f "%{buildroot}/%_bindir/ld";
fi
%if ! 0%{with libalternatives}
mkdir -p "%buildroot/%_sysconfdir/alternatives";
mkdir -p "%{buildroot}/%_sysconfdir/alternatives";
# Keep older versions of brp-symlink happy
%if %{suse_version} < 1310
ln -s "%_bindir/ld" "%buildroot/%_sysconfdir/alternatives/ld"
ln -s "%_bindir/ld" "%{buildroot}/%_sysconfdir/alternatives/ld"
%endif
ln -s "%_sysconfdir/alternatives/ld" "%buildroot/%_bindir/ld";
ln -s "%_sysconfdir/alternatives/ld" "%{buildroot}/%_bindir/ld";
%else
ln -s %{_bindir}/alts "%buildroot/%_bindir/ld";
ln -s %{_bindir}/alts "%{buildroot}/%_bindir/ld";
mkdir -p %{buildroot}%{_datadir}/libalternatives/ld;
cat > %{buildroot}%{_datadir}/libalternatives/ld/1.conf <<EOF
binary=%{_bindir}/ld.gold
@ -460,24 +454,24 @@ binary=%{_bindir}/ld.bfd
EOF
%endif
rm -rf $RPM_BUILD_ROOT%{_prefix}/%{HOST}/bin
mkdir -p $RPM_BUILD_ROOT%{_prefix}/%{HOST}/bin
ln -sf ../../bin/{ar,as,ld,nm,ranlib,strip} $RPM_BUILD_ROOT%{_prefix}/%{HOST}/bin
mv $RPM_BUILD_ROOT%{_prefix}/%{HOST}/lib/ldscripts $RPM_BUILD_ROOT%{_libdir}
ln -sf ../../%{_lib}/ldscripts $RPM_BUILD_ROOT%{_prefix}/%{HOST}/lib/ldscripts
rm -rf %{buildroot}%{_prefix}/%{HOST}/bin
mkdir -p %{buildroot}%{_prefix}/%{HOST}/bin
ln -sf ../../bin/{ar,as,ld,nm,ranlib,strip} %{buildroot}%{_prefix}/%{HOST}/bin
mv %{buildroot}%{_prefix}/%{HOST}/lib/ldscripts $RPM_BUILD_ROOT%{_libdir}
ln -sf ../../%{_lib}/ldscripts %{buildroot}%{_prefix}/%{HOST}/lib/ldscripts
# Install header files
make -C libiberty install_to_libdir target_header_dir=/usr/include DESTDIR=$RPM_BUILD_ROOT
make -C libiberty install_to_libdir target_header_dir=/usr/include DESTDIR=%{buildroot}
# We want the PIC libiberty.a
install -m 644 libiberty/pic/libiberty.a $RPM_BUILD_ROOT%{_libdir}
install -m 644 libiberty/pic/libiberty.a %{buildroot}%{_libdir}
#
chmod a+x $RPM_BUILD_ROOT%{_libdir}/libbfd-*
chmod a+x $RPM_BUILD_ROOT%{_libdir}/libopcodes-*
chmod a+x %{buildroot}%{_libdir}/libbfd-*
chmod a+x %{buildroot}%{_libdir}/libopcodes-*
# No shared linking outside binutils
rm $RPM_BUILD_ROOT%{_libdir}/lib{bfd,opcodes}.so
rm $RPM_BUILD_ROOT%{_libdir}/lib{bfd,opcodes}.la
rm %{buildroot}%{_libdir}/lib{bfd,opcodes}.so
rm %{buildroot}%{_libdir}/lib{bfd,opcodes,ctf,ctf-nobfd}.la
# Remove unwanted files to shut up rpm
rm -f $RPM_BUILD_ROOT%{_infodir}/configure* $RPM_BUILD_ROOT%{_infodir}/standards.info*
rm -f $RPM_BUILD_ROOT%{_mandir}/man1/dlltool.1 $RPM_BUILD_ROOT%{_mandir}/man1/windres.1 $RPM_BUILD_ROOT%{_mandir}/man1/windmc.1
rm -f %{buildroot}%{_infodir}/configure* $RPM_BUILD_ROOT%{_infodir}/standards.info*
rm -f %{buildroot}%{_mandir}/man1/dlltool.1 $RPM_BUILD_ROOT%{_mandir}/man1/windres.1 $RPM_BUILD_ROOT%{_mandir}/man1/windmc.1
cd ..
%find_lang binutils
%find_lang bfd binutils.lang
@ -488,45 +482,47 @@ cd ..
%ifarch %gold_archs
%find_lang gold binutils-gold.lang
%endif
mkdir -p $RPM_BUILD_ROOT%{_docdir}/%{name}
install -m 644 binutils/NEWS $RPM_BUILD_ROOT%{_docdir}/%{name}/NEWS-binutils
install -m 644 gas/NEWS $RPM_BUILD_ROOT%{_docdir}/%{name}/NEWS-gas
install -m 644 ld/NEWS $RPM_BUILD_ROOT%{_docdir}/%{name}/NEWS-ld
mkdir -p %{buildroot}%{_docdir}/%{name}
install -m 644 binutils/NEWS %{buildroot}%{_docdir}/%{name}/NEWS-binutils
install -m 644 gas/NEWS %{buildroot}%{_docdir}/%{name}/NEWS-gas
install -m 644 ld/NEWS %{buildroot}%{_docdir}/%{name}/NEWS-ld
%else
# installing cross-TARGET-binutils and TARGET-binutils
make DESTDIR=$RPM_BUILD_ROOT install
make DESTDIR=%{buildroot} install
# Replace hard links by symlinks, so that rpmlint doesn't complain
T=$(basename %buildroot/usr/%{TARGET_OS})
for f in %buildroot/usr/$T/bin/* ; do
T=$(basename %{buildroot}/usr/%{TARGET_OS})
for f in %{buildroot}/usr/$T/bin/* ; do
ln -sf /usr/bin/$T-$(basename $f) $f
done
%if "%{TARGET}" == "arm"
# Instead of building duplicate binutils, add symlinks
for f in %buildroot/usr/$T/bin/* ; do
for f in %{buildroot}%{_bindir}/${T}-* ; do
_toolname=${f##$(dirname $f)/${T}-}
for p in arm-none-eabi; do
ln -sf %{_bindir}/$T-$(basename $f) %buildroot%{_bindir}/$p-$(basename $f)
ln -sf %{_bindir}/$T-${_toolname} %{buildroot}%{_bindir}/$p-${_toolname}
done
done
%endif
%if "%{TARGET}" == "riscv64"
# Instead of building duplicate binutils, add symlinks
for f in %buildroot/usr/$T/bin/* ; do
for f in %{buildroot}/usr/$T/bin/* ; do
for p in riscv64-elf; do
ln -sf %{_bindir}/$T-$(basename $f) %buildroot%{_bindir}/$p-$(basename $f)
ln -sf %{_bindir}/$T-$(basename $f) %{buildroot}%{_bindir}/$p-$(basename $f)
done
done
%endif
%if "%{TARGET}" == "avr"
install -c gas-nesc/as-new $RPM_BUILD_ROOT%{_prefix}/bin/%{TARGET_OS}-nesc-as
ln -sf ../../bin/%{TARGET_OS}-nesc-as $RPM_BUILD_ROOT%{_prefix}/%{TARGET_OS}/bin/nesc-as
install -c gas-nesc/as-new %{buildroot}%{_prefix}/bin/%{TARGET_OS}-nesc-as
ln -sf ../../bin/%{TARGET_OS}-nesc-as %{buildroot}%{_prefix}/%{TARGET_OS}/bin/nesc-as
%endif
rm -rf $RPM_BUILD_ROOT%{_mandir}
rm -rf $RPM_BUILD_ROOT%{_infodir}
rm -rf $RPM_BUILD_ROOT%{_prefix}/lib*
rm -rf $RPM_BUILD_ROOT%{_prefix}/include
rm -f $RPM_BUILD_ROOT%{_prefix}/bin/*-c++filt
rm -rf %{buildroot}%{_mandir}
rm -rf %{buildroot}%{_infodir}
rm -rf %{buildroot}%{_prefix}/lib*
rm -rf %{buildroot}%{_prefix}/include
rm -f %{buildroot}%{_prefix}/bin/*-c++filt
> ../binutils.lang
%endif
%fdupes %{buildroot}%{_prefix}
%if 0%{!?cross:1}
%post
@ -586,8 +582,7 @@ fi;
%postun -n libctf0 -p /sbin/ldconfig
%postun -n libctf-nobfd0 -p /sbin/ldconfig
%postun
/sbin/ldconfig
%postun -p /sbin/ldconfig
%endif
%files -f binutils.lang
@ -641,9 +636,11 @@ fi;
%{_libdir}/libctf-nobfd.so
%files -n libctf0
%defattr(-,root,root)
%{_libdir}/libctf.so.*
%files -n libctf-nobfd0
%defattr(-,root,root)
%{_libdir}/libctf-nobfd.so.*
%endif

View File

@ -1,3 +1,106 @@
-------------------------------------------------------------------
Fri Mar 4 10:44:39 UTC 2022 - Martin Liška <mliska@suse.cz>
- Update binutils-2.38-branch.diff.gz in order to include PR28879.
-------------------------------------------------------------------
Tue Mar 1 12:41:27 UTC 2022 - Michael Matz <matz@suse.com>
- From Stefan Brüns <stefan.bruens@rwth-aachen.de>:
* Install symlinks for all target specific tools on
arm-eabi-none [bsc#1185712]
-------------------------------------------------------------------
Thu Feb 24 09:10:44 UTC 2022 - Martin Liška <mliska@suse.cz>
- Do not re-generate ld/ldlex.c, ld/ldgram.c, ld/ldgram.h and verify
that corresponding flex/bison files are not modified by a patch.
-------------------------------------------------------------------
Thu Feb 24 06:55:14 UTC 2022 - Martin Liška <mliska@suse.cz>
- Use verbose mode for make for cross compilers.
-------------------------------------------------------------------
Wed Feb 23 17:52:15 UTC 2022 - Michael Matz <matz@suse.com>
- Make it build on SLE-11 again.
-------------------------------------------------------------------
Tue Feb 22 09:13:15 UTC 2022 - Martin Liška <mliska@suse.cz>
- Use verbose mode for make.
-------------------------------------------------------------------
Sat Feb 12 19:13:31 UTC 2022 - Martin Liška <mliska@suse.cz>
- Update to binutils 2.38:
* elfedit: Add --output-abiversion option to update ABIVERSION.
* Add support for the LoongArch instruction set.
* Tools which display symbols or strings (readelf, strings, nm, objdump)
have a new command line option which controls how unicode characters are
handled. By default they are treated as normal for the tool. Using
--unicode=locale will display them according to the current locale.
Using --unicode=hex will display them as hex byte values, whilst
--unicode=escape will display them as escape sequences. In addition
using --unicode=highlight will display them as unicode escape sequences
highlighted in red (if supported by the output device).
* readelf -r dumps RELR relative relocations now.
* Support for efi-app-aarch64, efi-rtdrv-aarch64 and efi-bsdrv-aarch64 has been
added to objcopy in order to enable UEFI development using binutils.
* ar: Add --thin for creating thin archives. -T is a deprecated alias without
diagnostics. In many ar implementations -T has a different meaning, as
specified by X/Open System Interface.
* Add support for AArch64 system registers that were missing in previous
releases.
* Add support for the LoongArch instruction set.
* Add a command-line option, -muse-unaligned-vector-move, for x86 target
to encode aligned vector move as unaligned vector move.
* Add support for Cortex-R52+ for Arm.
* Add support for Cortex-A510, Cortex-A710, Cortex-X2 for AArch64.
* Add support for Cortex-A710 for Arm.
* Add support for Scalable Matrix Extension (SME) for AArch64.
* The --multibyte-handling=[allow|warn|warn-sym-only] option tells the
assembler what to when it encoutners multibyte characters in the input. The
default is to allow them. Setting the option to "warn" will generate a
warning message whenever any multibyte character is encountered. Using the
option to "warn-sym-only" will make the assembler generate a warning whenever a
symbol is defined containing multibyte characters. (References to undefined
symbols will not generate warnings).
* Outputs of .ds.x directive and .tfloat directive with hex input from
x86 assembler have been reduced from 12 bytes to 10 bytes to match the
output of .tfloat directive.
* Add support for 'armv8.8-a', 'armv9-a', 'armv9.1-a', 'armv9.2-a' and
'armv9.3-a' for -march in AArch64 GAS.
* Add support for 'armv8.7-a', 'armv8.8-a', 'armv9-a', 'armv9.1-a',
'armv9.2-a' and 'armv9.3-a' for -march in Arm GAS.
* Add support for Intel AVX512_FP16 instructions.
* Add -z pack-relative-relocs/-z no pack-relative-relocs to x86 ELF
linker to pack relative relocations in the DT_RELR section.
* Add support for the LoongArch architecture.
* Add -z indirect-extern-access/-z noindirect-extern-access to x86 ELF
linker to control canonical function pointers and copy relocation.
* Add --max-cache-size=SIZE to set the the maximum cache size to SIZE
bytes.
- Add binutils-2.38-branch.diff.gz.
- Removed deletion of man pages as they should be properly packages
in tarball.
- Rebased patches: aarch64-common-pagesize.patch, add-ulp-section.diff,
binutils-bfd_h.patch, binutils-revert-nm-symversion.diff,
binutils-revert-plt32-in-branches.diff, binutils-skip-rpaths.patch
and binutils-compat-old-behaviour.diff.
-------------------------------------------------------------------
Fri Feb 4 13:13:20 UTC 2022 - Matwey Kornilov <matwey.kornilov@gmail.com>
- Enable PRU architecture for AM335x CPU (Beagle Bone Black board)
-------------------------------------------------------------------
Thu Jan 27 20:36:30 UTC 2022 - Dirk Müller <dmueller@suse.com>
- use fdupes on datadir
- remove RPM_BUILD_ROOT usage and other cleanups
-------------------------------------------------------------------
Fri Nov 12 13:20:09 UTC 2021 - Martin Liška <mliska@suse.cz>

View File

@ -1,7 +1,7 @@
#
# spec file for package cross-hppa-binutils
#
# Copyright (c) 2021 SUSE LLC
# Copyright (c) 2022 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@ -23,6 +23,7 @@ ExcludeArch: hppa
BuildRequires: bc
BuildRequires: bison
BuildRequires: dejagnu
BuildRequires: fdupes
BuildRequires: flex
BuildRequires: gcc-c++
# for the testsuite
@ -37,7 +38,7 @@ BuildRequires: zlib-devel-static
%else
BuildRequires: zlib-devel
%endif
Version: 2.37
Version: 2.38
Release: 0
# disable libalternatives for now until it's changed to not
@ -75,7 +76,7 @@ Release: 0
%else
%define build_multitarget 0
%endif
%define target_list aarch64 alpha armv5l armv6l armv7l armv8l avr epiphany hppa hppa64 i686 ia64 m68k mips powerpc powerpc64 powerpc64le riscv64 rx s390 s390x sh4 sparc sparc64 x86_64 xtensa
%define target_list aarch64 alpha armv5l armv6l armv7l armv8l avr pru epiphany hppa hppa64 i686 ia64 m68k mips powerpc powerpc64 powerpc64le riscv64 rx s390 s390x sh4 sparc sparc64 x86_64 xtensa
#
#
#
@ -95,7 +96,7 @@ Source5: binutils.keyring
Source1: pre_checkin.sh
Source2: README.First-for.SUSE.packagers
Source3: baselibs.conf
Patch1: binutils-2.37-branch.diff.gz
Patch1: binutils-2.38-branch.diff.gz
Patch3: binutils-skip-rpaths.patch
Patch4: s390-biarch.diff
Patch5: x86-64-biarch.patch
@ -141,7 +142,7 @@ Requires: alts
%else
PreReq: update-alternatives
%endif
%if 0%{!?cross:1}
%if 0%{!?cross:1} && 0%{?suse_version} >= 1310
%define gold_archs %ix86 aarch64 %arm x86_64 ppc ppc64 ppc64le s390x %sparc
%endif
@ -191,6 +192,11 @@ The Compact C Type Format (CTF) is a way of representing information about a bin
%prep
echo "make check will return with %{make_check_handling} in case of testsuite failures."
%setup -q -n binutils-%{version}
# Backup flex and biscon files for later verification.
cp ld/ldlex.l ld/ldlex.l.orig
cp ld/ldgram.y ld/ldgram.y.orig
# Patch is outside test_vanilla because it's supposed to be the
# patch bringing the tarball to the newest upstream version
%patch1 -p1
@ -228,22 +234,11 @@ cp gas/config/tc-avr.h gas/config/tc-avr-nesc.h
#
# test_vanilla
%endif
# in parallel builds, when the flex or bison inputs are patched (possibly
# in the ...-branch.diff) it might happen that the dependency tracking
# of automake is confused and uses the old .c files from srcdir/ld/ while
# also generating the new .c files in builddir/ld leading to trouble.
# I haven't found the right entries to ensure this doesn't happen, so
# simply remove the intermediates
rm -f ld/ldlex.c
rm -f ld/ldgram.c ld/ldgram.h
# The 2.37 released tarball contains wrongly pre-generated (empty) man pages
# so we remove those here as well. Consider removing for later releases.
rm -f binutils/doc/*.1
rm -f binutils/doc/cxxfilt.man
rm -f gprof/*.1
rm -f gas/doc/*.1
rm -f ld/*.1
# Due to legacy flex version present in SLE-12 (and older), we cannot
# re-generate flex and bison files and so we verify that any patch modify these files.
diff -u ld/ldlex.l ld/ldlex.l.orig
diff -u ld/ldgram.y ld/ldgram.y.orig
%build
%define _lto_cflags %{nil}
@ -330,14 +325,14 @@ cd build-dir
# we patch headers (bfd-in.h) that are input to other headers
# which are generated only with --enable-maintainer-mode (which we
# don't do) or explicitely by make headers, so do this:
make %{?_smp_mflags} all-bfd TARGET-bfd=headers
make %{?_smp_mflags} all-bfd TARGET-bfd=headers V=1
# the above interacts with --enable-pgo-build=lto because all-bfd doesn't
# have the PGO handling, hence it's config.cache files are wrong
# remove all of those for reconfigure
rm */config.cache
# force reconfiguring
rm bfd/Makefile
make %{?_smp_mflags}
make %{?_smp_mflags} V=1
%else
# building cross-TARGET-binutils
@ -369,7 +364,7 @@ EXTRA_TARGETS="$EXTRA_TARGETS,arm-suse-linux-gnueabi"
%if "%{TARGET}" == "aarch64"
EXTRA_TARGETS="$EXTRA_TARGETS,aarch64-suse-linux"
%endif
%if "%{TARGET}" == "avr" || "%{TARGET}" == "spu"
%if "%{TARGET}" == "avr" || "%{TARGET}" == "spu" || "%{TARGET}" == "pru"
%define TARGET_OS %{TARGET}
%else
%if "%{TARGET}" == "epiphany" || "%{TARGET}" == "riscv32" || "%{TARGET}" == "rx"
@ -403,11 +398,11 @@ EXTRA_TARGETS="$EXTRA_TARGETS,aarch64-suse-linux"
--enable-default-hash-style=both \
%endif
${EXTRA_TARGETS:+--enable-targets="${EXTRA_TARGETS#,}"}
make %{?_smp_mflags} all-bfd TARGET-bfd=headers
make %{?_smp_mflags} all-bfd TARGET-bfd=headers V=1
rm */config.cache
# force reconfiguring
rm bfd/Makefile
make %{?_smp_mflags}
make %{?_smp_mflags} V=1
%if "%{TARGET}" == "avr"
# build an extra nesC version because nesC requires $'s in identifiers
cp -a gas gas-nesc
@ -431,26 +426,25 @@ cd build-dir
%if 0%{!?cross:1}
# installing native binutils
%ifarch %gold_archs
make DESTDIR=$RPM_BUILD_ROOT install-gold
ln -sf ld.gold $RPM_BUILD_ROOT%{_bindir}/gold
make DESTDIR=%{buildroot} install-gold
ln -sf ld.gold %{buildroot}%{_bindir}/gold
%endif
make DESTDIR=$RPM_BUILD_ROOT install-info install
make -C gas/doc DESTDIR=$RPM_BUILD_ROOT install-info-am install-am
make DESTDIR=$RPM_BUILD_ROOT install-bfd install-opcodes
if [ ! -f "%buildroot/%_bindir/ld.bfd" ]; then
mv "%buildroot/%_bindir"/{ld,ld.bfd};
make DESTDIR=%{buildroot} install-info install
make DESTDIR=%{buildroot} install-bfd install-opcodes
if [ ! -f "%{buildroot}/%_bindir/ld.bfd" ]; then
mv "%{buildroot}/%_bindir"/{ld,ld.bfd};
else
rm -f "%buildroot/%_bindir/ld";
rm -f "%{buildroot}/%_bindir/ld";
fi
%if ! 0%{with libalternatives}
mkdir -p "%buildroot/%_sysconfdir/alternatives";
mkdir -p "%{buildroot}/%_sysconfdir/alternatives";
# Keep older versions of brp-symlink happy
%if %{suse_version} < 1310
ln -s "%_bindir/ld" "%buildroot/%_sysconfdir/alternatives/ld"
ln -s "%_bindir/ld" "%{buildroot}/%_sysconfdir/alternatives/ld"
%endif
ln -s "%_sysconfdir/alternatives/ld" "%buildroot/%_bindir/ld";
ln -s "%_sysconfdir/alternatives/ld" "%{buildroot}/%_bindir/ld";
%else
ln -s %{_bindir}/alts "%buildroot/%_bindir/ld";
ln -s %{_bindir}/alts "%{buildroot}/%_bindir/ld";
mkdir -p %{buildroot}%{_datadir}/libalternatives/ld;
cat > %{buildroot}%{_datadir}/libalternatives/ld/1.conf <<EOF
binary=%{_bindir}/ld.gold
@ -460,24 +454,24 @@ binary=%{_bindir}/ld.bfd
EOF
%endif
rm -rf $RPM_BUILD_ROOT%{_prefix}/%{HOST}/bin
mkdir -p $RPM_BUILD_ROOT%{_prefix}/%{HOST}/bin
ln -sf ../../bin/{ar,as,ld,nm,ranlib,strip} $RPM_BUILD_ROOT%{_prefix}/%{HOST}/bin
mv $RPM_BUILD_ROOT%{_prefix}/%{HOST}/lib/ldscripts $RPM_BUILD_ROOT%{_libdir}
ln -sf ../../%{_lib}/ldscripts $RPM_BUILD_ROOT%{_prefix}/%{HOST}/lib/ldscripts
rm -rf %{buildroot}%{_prefix}/%{HOST}/bin
mkdir -p %{buildroot}%{_prefix}/%{HOST}/bin
ln -sf ../../bin/{ar,as,ld,nm,ranlib,strip} %{buildroot}%{_prefix}/%{HOST}/bin
mv %{buildroot}%{_prefix}/%{HOST}/lib/ldscripts $RPM_BUILD_ROOT%{_libdir}
ln -sf ../../%{_lib}/ldscripts %{buildroot}%{_prefix}/%{HOST}/lib/ldscripts
# Install header files
make -C libiberty install_to_libdir target_header_dir=/usr/include DESTDIR=$RPM_BUILD_ROOT
make -C libiberty install_to_libdir target_header_dir=/usr/include DESTDIR=%{buildroot}
# We want the PIC libiberty.a
install -m 644 libiberty/pic/libiberty.a $RPM_BUILD_ROOT%{_libdir}
install -m 644 libiberty/pic/libiberty.a %{buildroot}%{_libdir}
#
chmod a+x $RPM_BUILD_ROOT%{_libdir}/libbfd-*
chmod a+x $RPM_BUILD_ROOT%{_libdir}/libopcodes-*
chmod a+x %{buildroot}%{_libdir}/libbfd-*
chmod a+x %{buildroot}%{_libdir}/libopcodes-*
# No shared linking outside binutils
rm $RPM_BUILD_ROOT%{_libdir}/lib{bfd,opcodes}.so
rm $RPM_BUILD_ROOT%{_libdir}/lib{bfd,opcodes}.la
rm %{buildroot}%{_libdir}/lib{bfd,opcodes}.so
rm %{buildroot}%{_libdir}/lib{bfd,opcodes,ctf,ctf-nobfd}.la
# Remove unwanted files to shut up rpm
rm -f $RPM_BUILD_ROOT%{_infodir}/configure* $RPM_BUILD_ROOT%{_infodir}/standards.info*
rm -f $RPM_BUILD_ROOT%{_mandir}/man1/dlltool.1 $RPM_BUILD_ROOT%{_mandir}/man1/windres.1 $RPM_BUILD_ROOT%{_mandir}/man1/windmc.1
rm -f %{buildroot}%{_infodir}/configure* $RPM_BUILD_ROOT%{_infodir}/standards.info*
rm -f %{buildroot}%{_mandir}/man1/dlltool.1 $RPM_BUILD_ROOT%{_mandir}/man1/windres.1 $RPM_BUILD_ROOT%{_mandir}/man1/windmc.1
cd ..
%find_lang binutils
%find_lang bfd binutils.lang
@ -488,45 +482,47 @@ cd ..
%ifarch %gold_archs
%find_lang gold binutils-gold.lang
%endif
mkdir -p $RPM_BUILD_ROOT%{_docdir}/%{name}
install -m 644 binutils/NEWS $RPM_BUILD_ROOT%{_docdir}/%{name}/NEWS-binutils
install -m 644 gas/NEWS $RPM_BUILD_ROOT%{_docdir}/%{name}/NEWS-gas
install -m 644 ld/NEWS $RPM_BUILD_ROOT%{_docdir}/%{name}/NEWS-ld
mkdir -p %{buildroot}%{_docdir}/%{name}
install -m 644 binutils/NEWS %{buildroot}%{_docdir}/%{name}/NEWS-binutils
install -m 644 gas/NEWS %{buildroot}%{_docdir}/%{name}/NEWS-gas
install -m 644 ld/NEWS %{buildroot}%{_docdir}/%{name}/NEWS-ld
%else
# installing cross-TARGET-binutils and TARGET-binutils
make DESTDIR=$RPM_BUILD_ROOT install
make DESTDIR=%{buildroot} install
# Replace hard links by symlinks, so that rpmlint doesn't complain
T=$(basename %buildroot/usr/%{TARGET_OS})
for f in %buildroot/usr/$T/bin/* ; do
T=$(basename %{buildroot}/usr/%{TARGET_OS})
for f in %{buildroot}/usr/$T/bin/* ; do
ln -sf /usr/bin/$T-$(basename $f) $f
done
%if "%{TARGET}" == "arm"
# Instead of building duplicate binutils, add symlinks
for f in %buildroot/usr/$T/bin/* ; do
for f in %{buildroot}%{_bindir}/${T}-* ; do
_toolname=${f##$(dirname $f)/${T}-}
for p in arm-none-eabi; do
ln -sf %{_bindir}/$T-$(basename $f) %buildroot%{_bindir}/$p-$(basename $f)
ln -sf %{_bindir}/$T-${_toolname} %{buildroot}%{_bindir}/$p-${_toolname}
done
done
%endif
%if "%{TARGET}" == "riscv64"
# Instead of building duplicate binutils, add symlinks
for f in %buildroot/usr/$T/bin/* ; do
for f in %{buildroot}/usr/$T/bin/* ; do
for p in riscv64-elf; do
ln -sf %{_bindir}/$T-$(basename $f) %buildroot%{_bindir}/$p-$(basename $f)
ln -sf %{_bindir}/$T-$(basename $f) %{buildroot}%{_bindir}/$p-$(basename $f)
done
done
%endif
%if "%{TARGET}" == "avr"
install -c gas-nesc/as-new $RPM_BUILD_ROOT%{_prefix}/bin/%{TARGET_OS}-nesc-as
ln -sf ../../bin/%{TARGET_OS}-nesc-as $RPM_BUILD_ROOT%{_prefix}/%{TARGET_OS}/bin/nesc-as
install -c gas-nesc/as-new %{buildroot}%{_prefix}/bin/%{TARGET_OS}-nesc-as
ln -sf ../../bin/%{TARGET_OS}-nesc-as %{buildroot}%{_prefix}/%{TARGET_OS}/bin/nesc-as
%endif
rm -rf $RPM_BUILD_ROOT%{_mandir}
rm -rf $RPM_BUILD_ROOT%{_infodir}
rm -rf $RPM_BUILD_ROOT%{_prefix}/lib*
rm -rf $RPM_BUILD_ROOT%{_prefix}/include
rm -f $RPM_BUILD_ROOT%{_prefix}/bin/*-c++filt
rm -rf %{buildroot}%{_mandir}
rm -rf %{buildroot}%{_infodir}
rm -rf %{buildroot}%{_prefix}/lib*
rm -rf %{buildroot}%{_prefix}/include
rm -f %{buildroot}%{_prefix}/bin/*-c++filt
> ../binutils.lang
%endif
%fdupes %{buildroot}%{_prefix}
%if 0%{!?cross:1}
%post
@ -586,8 +582,7 @@ fi;
%postun -n libctf0 -p /sbin/ldconfig
%postun -n libctf-nobfd0 -p /sbin/ldconfig
%postun
/sbin/ldconfig
%postun -p /sbin/ldconfig
%endif
%files -f binutils.lang
@ -641,9 +636,11 @@ fi;
%{_libdir}/libctf-nobfd.so
%files -n libctf0
%defattr(-,root,root)
%{_libdir}/libctf.so.*
%files -n libctf-nobfd0
%defattr(-,root,root)
%{_libdir}/libctf-nobfd.so.*
%endif

View File

@ -1,3 +1,106 @@
-------------------------------------------------------------------
Fri Mar 4 10:44:39 UTC 2022 - Martin Liška <mliska@suse.cz>
- Update binutils-2.38-branch.diff.gz in order to include PR28879.
-------------------------------------------------------------------
Tue Mar 1 12:41:27 UTC 2022 - Michael Matz <matz@suse.com>
- From Stefan Brüns <stefan.bruens@rwth-aachen.de>:
* Install symlinks for all target specific tools on
arm-eabi-none [bsc#1185712]
-------------------------------------------------------------------
Thu Feb 24 09:10:44 UTC 2022 - Martin Liška <mliska@suse.cz>
- Do not re-generate ld/ldlex.c, ld/ldgram.c, ld/ldgram.h and verify
that corresponding flex/bison files are not modified by a patch.
-------------------------------------------------------------------
Thu Feb 24 06:55:14 UTC 2022 - Martin Liška <mliska@suse.cz>
- Use verbose mode for make for cross compilers.
-------------------------------------------------------------------
Wed Feb 23 17:52:15 UTC 2022 - Michael Matz <matz@suse.com>
- Make it build on SLE-11 again.
-------------------------------------------------------------------
Tue Feb 22 09:13:15 UTC 2022 - Martin Liška <mliska@suse.cz>
- Use verbose mode for make.
-------------------------------------------------------------------
Sat Feb 12 19:13:31 UTC 2022 - Martin Liška <mliska@suse.cz>
- Update to binutils 2.38:
* elfedit: Add --output-abiversion option to update ABIVERSION.
* Add support for the LoongArch instruction set.
* Tools which display symbols or strings (readelf, strings, nm, objdump)
have a new command line option which controls how unicode characters are
handled. By default they are treated as normal for the tool. Using
--unicode=locale will display them according to the current locale.
Using --unicode=hex will display them as hex byte values, whilst
--unicode=escape will display them as escape sequences. In addition
using --unicode=highlight will display them as unicode escape sequences
highlighted in red (if supported by the output device).
* readelf -r dumps RELR relative relocations now.
* Support for efi-app-aarch64, efi-rtdrv-aarch64 and efi-bsdrv-aarch64 has been
added to objcopy in order to enable UEFI development using binutils.
* ar: Add --thin for creating thin archives. -T is a deprecated alias without
diagnostics. In many ar implementations -T has a different meaning, as
specified by X/Open System Interface.
* Add support for AArch64 system registers that were missing in previous
releases.
* Add support for the LoongArch instruction set.
* Add a command-line option, -muse-unaligned-vector-move, for x86 target
to encode aligned vector move as unaligned vector move.
* Add support for Cortex-R52+ for Arm.
* Add support for Cortex-A510, Cortex-A710, Cortex-X2 for AArch64.
* Add support for Cortex-A710 for Arm.
* Add support for Scalable Matrix Extension (SME) for AArch64.
* The --multibyte-handling=[allow|warn|warn-sym-only] option tells the
assembler what to when it encoutners multibyte characters in the input. The
default is to allow them. Setting the option to "warn" will generate a
warning message whenever any multibyte character is encountered. Using the
option to "warn-sym-only" will make the assembler generate a warning whenever a
symbol is defined containing multibyte characters. (References to undefined
symbols will not generate warnings).
* Outputs of .ds.x directive and .tfloat directive with hex input from
x86 assembler have been reduced from 12 bytes to 10 bytes to match the
output of .tfloat directive.
* Add support for 'armv8.8-a', 'armv9-a', 'armv9.1-a', 'armv9.2-a' and
'armv9.3-a' for -march in AArch64 GAS.
* Add support for 'armv8.7-a', 'armv8.8-a', 'armv9-a', 'armv9.1-a',
'armv9.2-a' and 'armv9.3-a' for -march in Arm GAS.
* Add support for Intel AVX512_FP16 instructions.
* Add -z pack-relative-relocs/-z no pack-relative-relocs to x86 ELF
linker to pack relative relocations in the DT_RELR section.
* Add support for the LoongArch architecture.
* Add -z indirect-extern-access/-z noindirect-extern-access to x86 ELF
linker to control canonical function pointers and copy relocation.
* Add --max-cache-size=SIZE to set the the maximum cache size to SIZE
bytes.
- Add binutils-2.38-branch.diff.gz.
- Removed deletion of man pages as they should be properly packages
in tarball.
- Rebased patches: aarch64-common-pagesize.patch, add-ulp-section.diff,
binutils-bfd_h.patch, binutils-revert-nm-symversion.diff,
binutils-revert-plt32-in-branches.diff, binutils-skip-rpaths.patch
and binutils-compat-old-behaviour.diff.
-------------------------------------------------------------------
Fri Feb 4 13:13:20 UTC 2022 - Matwey Kornilov <matwey.kornilov@gmail.com>
- Enable PRU architecture for AM335x CPU (Beagle Bone Black board)
-------------------------------------------------------------------
Thu Jan 27 20:36:30 UTC 2022 - Dirk Müller <dmueller@suse.com>
- use fdupes on datadir
- remove RPM_BUILD_ROOT usage and other cleanups
-------------------------------------------------------------------
Fri Nov 12 13:20:09 UTC 2021 - Martin Liška <mliska@suse.cz>

View File

@ -1,7 +1,7 @@
#
# spec file for package cross-hppa64-binutils
#
# Copyright (c) 2021 SUSE LLC
# Copyright (c) 2022 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@ -23,6 +23,7 @@ ExcludeArch: hppa64
BuildRequires: bc
BuildRequires: bison
BuildRequires: dejagnu
BuildRequires: fdupes
BuildRequires: flex
BuildRequires: gcc-c++
# for the testsuite
@ -37,7 +38,7 @@ BuildRequires: zlib-devel-static
%else
BuildRequires: zlib-devel
%endif
Version: 2.37
Version: 2.38
Release: 0
# disable libalternatives for now until it's changed to not
@ -75,7 +76,7 @@ Release: 0
%else
%define build_multitarget 0
%endif
%define target_list aarch64 alpha armv5l armv6l armv7l armv8l avr epiphany hppa hppa64 i686 ia64 m68k mips powerpc powerpc64 powerpc64le riscv64 rx s390 s390x sh4 sparc sparc64 x86_64 xtensa
%define target_list aarch64 alpha armv5l armv6l armv7l armv8l avr pru epiphany hppa hppa64 i686 ia64 m68k mips powerpc powerpc64 powerpc64le riscv64 rx s390 s390x sh4 sparc sparc64 x86_64 xtensa
#
#
#
@ -95,7 +96,7 @@ Source5: binutils.keyring
Source1: pre_checkin.sh
Source2: README.First-for.SUSE.packagers
Source3: baselibs.conf
Patch1: binutils-2.37-branch.diff.gz
Patch1: binutils-2.38-branch.diff.gz
Patch3: binutils-skip-rpaths.patch
Patch4: s390-biarch.diff
Patch5: x86-64-biarch.patch
@ -141,7 +142,7 @@ Requires: alts
%else
PreReq: update-alternatives
%endif
%if 0%{!?cross:1}
%if 0%{!?cross:1} && 0%{?suse_version} >= 1310
%define gold_archs %ix86 aarch64 %arm x86_64 ppc ppc64 ppc64le s390x %sparc
%endif
@ -191,6 +192,11 @@ The Compact C Type Format (CTF) is a way of representing information about a bin
%prep
echo "make check will return with %{make_check_handling} in case of testsuite failures."
%setup -q -n binutils-%{version}
# Backup flex and biscon files for later verification.
cp ld/ldlex.l ld/ldlex.l.orig
cp ld/ldgram.y ld/ldgram.y.orig
# Patch is outside test_vanilla because it's supposed to be the
# patch bringing the tarball to the newest upstream version
%patch1 -p1
@ -228,22 +234,11 @@ cp gas/config/tc-avr.h gas/config/tc-avr-nesc.h
#
# test_vanilla
%endif
# in parallel builds, when the flex or bison inputs are patched (possibly
# in the ...-branch.diff) it might happen that the dependency tracking
# of automake is confused and uses the old .c files from srcdir/ld/ while
# also generating the new .c files in builddir/ld leading to trouble.
# I haven't found the right entries to ensure this doesn't happen, so
# simply remove the intermediates
rm -f ld/ldlex.c
rm -f ld/ldgram.c ld/ldgram.h
# The 2.37 released tarball contains wrongly pre-generated (empty) man pages
# so we remove those here as well. Consider removing for later releases.
rm -f binutils/doc/*.1
rm -f binutils/doc/cxxfilt.man
rm -f gprof/*.1
rm -f gas/doc/*.1
rm -f ld/*.1
# Due to legacy flex version present in SLE-12 (and older), we cannot
# re-generate flex and bison files and so we verify that any patch modify these files.
diff -u ld/ldlex.l ld/ldlex.l.orig
diff -u ld/ldgram.y ld/ldgram.y.orig
%build
%define _lto_cflags %{nil}
@ -330,14 +325,14 @@ cd build-dir
# we patch headers (bfd-in.h) that are input to other headers
# which are generated only with --enable-maintainer-mode (which we
# don't do) or explicitely by make headers, so do this:
make %{?_smp_mflags} all-bfd TARGET-bfd=headers
make %{?_smp_mflags} all-bfd TARGET-bfd=headers V=1
# the above interacts with --enable-pgo-build=lto because all-bfd doesn't
# have the PGO handling, hence it's config.cache files are wrong
# remove all of those for reconfigure
rm */config.cache
# force reconfiguring
rm bfd/Makefile
make %{?_smp_mflags}
make %{?_smp_mflags} V=1
%else
# building cross-TARGET-binutils
@ -369,7 +364,7 @@ EXTRA_TARGETS="$EXTRA_TARGETS,arm-suse-linux-gnueabi"
%if "%{TARGET}" == "aarch64"
EXTRA_TARGETS="$EXTRA_TARGETS,aarch64-suse-linux"
%endif
%if "%{TARGET}" == "avr" || "%{TARGET}" == "spu"
%if "%{TARGET}" == "avr" || "%{TARGET}" == "spu" || "%{TARGET}" == "pru"
%define TARGET_OS %{TARGET}
%else
%if "%{TARGET}" == "epiphany" || "%{TARGET}" == "riscv32" || "%{TARGET}" == "rx"
@ -403,11 +398,11 @@ EXTRA_TARGETS="$EXTRA_TARGETS,aarch64-suse-linux"
--enable-default-hash-style=both \
%endif
${EXTRA_TARGETS:+--enable-targets="${EXTRA_TARGETS#,}"}
make %{?_smp_mflags} all-bfd TARGET-bfd=headers
make %{?_smp_mflags} all-bfd TARGET-bfd=headers V=1
rm */config.cache
# force reconfiguring
rm bfd/Makefile
make %{?_smp_mflags}
make %{?_smp_mflags} V=1
%if "%{TARGET}" == "avr"
# build an extra nesC version because nesC requires $'s in identifiers
cp -a gas gas-nesc
@ -431,26 +426,25 @@ cd build-dir
%if 0%{!?cross:1}
# installing native binutils
%ifarch %gold_archs
make DESTDIR=$RPM_BUILD_ROOT install-gold
ln -sf ld.gold $RPM_BUILD_ROOT%{_bindir}/gold
make DESTDIR=%{buildroot} install-gold
ln -sf ld.gold %{buildroot}%{_bindir}/gold
%endif
make DESTDIR=$RPM_BUILD_ROOT install-info install
make -C gas/doc DESTDIR=$RPM_BUILD_ROOT install-info-am install-am
make DESTDIR=$RPM_BUILD_ROOT install-bfd install-opcodes
if [ ! -f "%buildroot/%_bindir/ld.bfd" ]; then
mv "%buildroot/%_bindir"/{ld,ld.bfd};
make DESTDIR=%{buildroot} install-info install
make DESTDIR=%{buildroot} install-bfd install-opcodes
if [ ! -f "%{buildroot}/%_bindir/ld.bfd" ]; then
mv "%{buildroot}/%_bindir"/{ld,ld.bfd};
else
rm -f "%buildroot/%_bindir/ld";
rm -f "%{buildroot}/%_bindir/ld";
fi
%if ! 0%{with libalternatives}
mkdir -p "%buildroot/%_sysconfdir/alternatives";
mkdir -p "%{buildroot}/%_sysconfdir/alternatives";
# Keep older versions of brp-symlink happy
%if %{suse_version} < 1310
ln -s "%_bindir/ld" "%buildroot/%_sysconfdir/alternatives/ld"
ln -s "%_bindir/ld" "%{buildroot}/%_sysconfdir/alternatives/ld"
%endif
ln -s "%_sysconfdir/alternatives/ld" "%buildroot/%_bindir/ld";
ln -s "%_sysconfdir/alternatives/ld" "%{buildroot}/%_bindir/ld";
%else
ln -s %{_bindir}/alts "%buildroot/%_bindir/ld";
ln -s %{_bindir}/alts "%{buildroot}/%_bindir/ld";
mkdir -p %{buildroot}%{_datadir}/libalternatives/ld;
cat > %{buildroot}%{_datadir}/libalternatives/ld/1.conf <<EOF
binary=%{_bindir}/ld.gold
@ -460,24 +454,24 @@ binary=%{_bindir}/ld.bfd
EOF
%endif
rm -rf $RPM_BUILD_ROOT%{_prefix}/%{HOST}/bin
mkdir -p $RPM_BUILD_ROOT%{_prefix}/%{HOST}/bin
ln -sf ../../bin/{ar,as,ld,nm,ranlib,strip} $RPM_BUILD_ROOT%{_prefix}/%{HOST}/bin
mv $RPM_BUILD_ROOT%{_prefix}/%{HOST}/lib/ldscripts $RPM_BUILD_ROOT%{_libdir}
ln -sf ../../%{_lib}/ldscripts $RPM_BUILD_ROOT%{_prefix}/%{HOST}/lib/ldscripts
rm -rf %{buildroot}%{_prefix}/%{HOST}/bin
mkdir -p %{buildroot}%{_prefix}/%{HOST}/bin
ln -sf ../../bin/{ar,as,ld,nm,ranlib,strip} %{buildroot}%{_prefix}/%{HOST}/bin
mv %{buildroot}%{_prefix}/%{HOST}/lib/ldscripts $RPM_BUILD_ROOT%{_libdir}
ln -sf ../../%{_lib}/ldscripts %{buildroot}%{_prefix}/%{HOST}/lib/ldscripts
# Install header files
make -C libiberty install_to_libdir target_header_dir=/usr/include DESTDIR=$RPM_BUILD_ROOT
make -C libiberty install_to_libdir target_header_dir=/usr/include DESTDIR=%{buildroot}
# We want the PIC libiberty.a
install -m 644 libiberty/pic/libiberty.a $RPM_BUILD_ROOT%{_libdir}
install -m 644 libiberty/pic/libiberty.a %{buildroot}%{_libdir}
#
chmod a+x $RPM_BUILD_ROOT%{_libdir}/libbfd-*
chmod a+x $RPM_BUILD_ROOT%{_libdir}/libopcodes-*
chmod a+x %{buildroot}%{_libdir}/libbfd-*
chmod a+x %{buildroot}%{_libdir}/libopcodes-*
# No shared linking outside binutils
rm $RPM_BUILD_ROOT%{_libdir}/lib{bfd,opcodes}.so
rm $RPM_BUILD_ROOT%{_libdir}/lib{bfd,opcodes}.la
rm %{buildroot}%{_libdir}/lib{bfd,opcodes}.so
rm %{buildroot}%{_libdir}/lib{bfd,opcodes,ctf,ctf-nobfd}.la
# Remove unwanted files to shut up rpm
rm -f $RPM_BUILD_ROOT%{_infodir}/configure* $RPM_BUILD_ROOT%{_infodir}/standards.info*
rm -f $RPM_BUILD_ROOT%{_mandir}/man1/dlltool.1 $RPM_BUILD_ROOT%{_mandir}/man1/windres.1 $RPM_BUILD_ROOT%{_mandir}/man1/windmc.1
rm -f %{buildroot}%{_infodir}/configure* $RPM_BUILD_ROOT%{_infodir}/standards.info*
rm -f %{buildroot}%{_mandir}/man1/dlltool.1 $RPM_BUILD_ROOT%{_mandir}/man1/windres.1 $RPM_BUILD_ROOT%{_mandir}/man1/windmc.1
cd ..
%find_lang binutils
%find_lang bfd binutils.lang
@ -488,45 +482,47 @@ cd ..
%ifarch %gold_archs
%find_lang gold binutils-gold.lang
%endif
mkdir -p $RPM_BUILD_ROOT%{_docdir}/%{name}
install -m 644 binutils/NEWS $RPM_BUILD_ROOT%{_docdir}/%{name}/NEWS-binutils
install -m 644 gas/NEWS $RPM_BUILD_ROOT%{_docdir}/%{name}/NEWS-gas
install -m 644 ld/NEWS $RPM_BUILD_ROOT%{_docdir}/%{name}/NEWS-ld
mkdir -p %{buildroot}%{_docdir}/%{name}
install -m 644 binutils/NEWS %{buildroot}%{_docdir}/%{name}/NEWS-binutils
install -m 644 gas/NEWS %{buildroot}%{_docdir}/%{name}/NEWS-gas
install -m 644 ld/NEWS %{buildroot}%{_docdir}/%{name}/NEWS-ld
%else
# installing cross-TARGET-binutils and TARGET-binutils
make DESTDIR=$RPM_BUILD_ROOT install
make DESTDIR=%{buildroot} install
# Replace hard links by symlinks, so that rpmlint doesn't complain
T=$(basename %buildroot/usr/%{TARGET_OS})
for f in %buildroot/usr/$T/bin/* ; do
T=$(basename %{buildroot}/usr/%{TARGET_OS})
for f in %{buildroot}/usr/$T/bin/* ; do
ln -sf /usr/bin/$T-$(basename $f) $f
done
%if "%{TARGET}" == "arm"
# Instead of building duplicate binutils, add symlinks
for f in %buildroot/usr/$T/bin/* ; do
for f in %{buildroot}%{_bindir}/${T}-* ; do
_toolname=${f##$(dirname $f)/${T}-}
for p in arm-none-eabi; do
ln -sf %{_bindir}/$T-$(basename $f) %buildroot%{_bindir}/$p-$(basename $f)
ln -sf %{_bindir}/$T-${_toolname} %{buildroot}%{_bindir}/$p-${_toolname}
done
done
%endif
%if "%{TARGET}" == "riscv64"
# Instead of building duplicate binutils, add symlinks
for f in %buildroot/usr/$T/bin/* ; do
for f in %{buildroot}/usr/$T/bin/* ; do
for p in riscv64-elf; do
ln -sf %{_bindir}/$T-$(basename $f) %buildroot%{_bindir}/$p-$(basename $f)
ln -sf %{_bindir}/$T-$(basename $f) %{buildroot}%{_bindir}/$p-$(basename $f)
done
done
%endif
%if "%{TARGET}" == "avr"
install -c gas-nesc/as-new $RPM_BUILD_ROOT%{_prefix}/bin/%{TARGET_OS}-nesc-as
ln -sf ../../bin/%{TARGET_OS}-nesc-as $RPM_BUILD_ROOT%{_prefix}/%{TARGET_OS}/bin/nesc-as
install -c gas-nesc/as-new %{buildroot}%{_prefix}/bin/%{TARGET_OS}-nesc-as
ln -sf ../../bin/%{TARGET_OS}-nesc-as %{buildroot}%{_prefix}/%{TARGET_OS}/bin/nesc-as
%endif
rm -rf $RPM_BUILD_ROOT%{_mandir}
rm -rf $RPM_BUILD_ROOT%{_infodir}
rm -rf $RPM_BUILD_ROOT%{_prefix}/lib*
rm -rf $RPM_BUILD_ROOT%{_prefix}/include
rm -f $RPM_BUILD_ROOT%{_prefix}/bin/*-c++filt
rm -rf %{buildroot}%{_mandir}
rm -rf %{buildroot}%{_infodir}
rm -rf %{buildroot}%{_prefix}/lib*
rm -rf %{buildroot}%{_prefix}/include
rm -f %{buildroot}%{_prefix}/bin/*-c++filt
> ../binutils.lang
%endif
%fdupes %{buildroot}%{_prefix}
%if 0%{!?cross:1}
%post
@ -586,8 +582,7 @@ fi;
%postun -n libctf0 -p /sbin/ldconfig
%postun -n libctf-nobfd0 -p /sbin/ldconfig
%postun
/sbin/ldconfig
%postun -p /sbin/ldconfig
%endif
%files -f binutils.lang
@ -641,9 +636,11 @@ fi;
%{_libdir}/libctf-nobfd.so
%files -n libctf0
%defattr(-,root,root)
%{_libdir}/libctf.so.*
%files -n libctf-nobfd0
%defattr(-,root,root)
%{_libdir}/libctf-nobfd.so.*
%endif

View File

@ -1,3 +1,106 @@
-------------------------------------------------------------------
Fri Mar 4 10:44:39 UTC 2022 - Martin Liška <mliska@suse.cz>
- Update binutils-2.38-branch.diff.gz in order to include PR28879.
-------------------------------------------------------------------
Tue Mar 1 12:41:27 UTC 2022 - Michael Matz <matz@suse.com>
- From Stefan Brüns <stefan.bruens@rwth-aachen.de>:
* Install symlinks for all target specific tools on
arm-eabi-none [bsc#1185712]
-------------------------------------------------------------------
Thu Feb 24 09:10:44 UTC 2022 - Martin Liška <mliska@suse.cz>
- Do not re-generate ld/ldlex.c, ld/ldgram.c, ld/ldgram.h and verify
that corresponding flex/bison files are not modified by a patch.
-------------------------------------------------------------------
Thu Feb 24 06:55:14 UTC 2022 - Martin Liška <mliska@suse.cz>
- Use verbose mode for make for cross compilers.
-------------------------------------------------------------------
Wed Feb 23 17:52:15 UTC 2022 - Michael Matz <matz@suse.com>
- Make it build on SLE-11 again.
-------------------------------------------------------------------
Tue Feb 22 09:13:15 UTC 2022 - Martin Liška <mliska@suse.cz>
- Use verbose mode for make.
-------------------------------------------------------------------
Sat Feb 12 19:13:31 UTC 2022 - Martin Liška <mliska@suse.cz>
- Update to binutils 2.38:
* elfedit: Add --output-abiversion option to update ABIVERSION.
* Add support for the LoongArch instruction set.
* Tools which display symbols or strings (readelf, strings, nm, objdump)
have a new command line option which controls how unicode characters are
handled. By default they are treated as normal for the tool. Using
--unicode=locale will display them according to the current locale.
Using --unicode=hex will display them as hex byte values, whilst
--unicode=escape will display them as escape sequences. In addition
using --unicode=highlight will display them as unicode escape sequences
highlighted in red (if supported by the output device).
* readelf -r dumps RELR relative relocations now.
* Support for efi-app-aarch64, efi-rtdrv-aarch64 and efi-bsdrv-aarch64 has been
added to objcopy in order to enable UEFI development using binutils.
* ar: Add --thin for creating thin archives. -T is a deprecated alias without
diagnostics. In many ar implementations -T has a different meaning, as
specified by X/Open System Interface.
* Add support for AArch64 system registers that were missing in previous
releases.
* Add support for the LoongArch instruction set.
* Add a command-line option, -muse-unaligned-vector-move, for x86 target
to encode aligned vector move as unaligned vector move.
* Add support for Cortex-R52+ for Arm.
* Add support for Cortex-A510, Cortex-A710, Cortex-X2 for AArch64.
* Add support for Cortex-A710 for Arm.
* Add support for Scalable Matrix Extension (SME) for AArch64.
* The --multibyte-handling=[allow|warn|warn-sym-only] option tells the
assembler what to when it encoutners multibyte characters in the input. The
default is to allow them. Setting the option to "warn" will generate a
warning message whenever any multibyte character is encountered. Using the
option to "warn-sym-only" will make the assembler generate a warning whenever a
symbol is defined containing multibyte characters. (References to undefined
symbols will not generate warnings).
* Outputs of .ds.x directive and .tfloat directive with hex input from
x86 assembler have been reduced from 12 bytes to 10 bytes to match the
output of .tfloat directive.
* Add support for 'armv8.8-a', 'armv9-a', 'armv9.1-a', 'armv9.2-a' and
'armv9.3-a' for -march in AArch64 GAS.
* Add support for 'armv8.7-a', 'armv8.8-a', 'armv9-a', 'armv9.1-a',
'armv9.2-a' and 'armv9.3-a' for -march in Arm GAS.
* Add support for Intel AVX512_FP16 instructions.
* Add -z pack-relative-relocs/-z no pack-relative-relocs to x86 ELF
linker to pack relative relocations in the DT_RELR section.
* Add support for the LoongArch architecture.
* Add -z indirect-extern-access/-z noindirect-extern-access to x86 ELF
linker to control canonical function pointers and copy relocation.
* Add --max-cache-size=SIZE to set the the maximum cache size to SIZE
bytes.
- Add binutils-2.38-branch.diff.gz.
- Removed deletion of man pages as they should be properly packages
in tarball.
- Rebased patches: aarch64-common-pagesize.patch, add-ulp-section.diff,
binutils-bfd_h.patch, binutils-revert-nm-symversion.diff,
binutils-revert-plt32-in-branches.diff, binutils-skip-rpaths.patch
and binutils-compat-old-behaviour.diff.
-------------------------------------------------------------------
Fri Feb 4 13:13:20 UTC 2022 - Matwey Kornilov <matwey.kornilov@gmail.com>
- Enable PRU architecture for AM335x CPU (Beagle Bone Black board)
-------------------------------------------------------------------
Thu Jan 27 20:36:30 UTC 2022 - Dirk Müller <dmueller@suse.com>
- use fdupes on datadir
- remove RPM_BUILD_ROOT usage and other cleanups
-------------------------------------------------------------------
Fri Nov 12 13:20:09 UTC 2021 - Martin Liška <mliska@suse.cz>

View File

@ -1,7 +1,7 @@
#
# spec file for package cross-i386-binutils
#
# Copyright (c) 2021 SUSE LLC
# Copyright (c) 2022 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@ -23,6 +23,7 @@ ExcludeArch: %ix86
BuildRequires: bc
BuildRequires: bison
BuildRequires: dejagnu
BuildRequires: fdupes
BuildRequires: flex
BuildRequires: gcc-c++
# for the testsuite
@ -37,7 +38,7 @@ BuildRequires: zlib-devel-static
%else
BuildRequires: zlib-devel
%endif
Version: 2.37
Version: 2.38
Release: 0
# disable libalternatives for now until it's changed to not
@ -75,7 +76,7 @@ Release: 0
%else
%define build_multitarget 0
%endif
%define target_list aarch64 alpha armv5l armv6l armv7l armv8l avr epiphany hppa hppa64 i686 ia64 m68k mips powerpc powerpc64 powerpc64le riscv64 rx s390 s390x sh4 sparc sparc64 x86_64 xtensa
%define target_list aarch64 alpha armv5l armv6l armv7l armv8l avr pru epiphany hppa hppa64 i686 ia64 m68k mips powerpc powerpc64 powerpc64le riscv64 rx s390 s390x sh4 sparc sparc64 x86_64 xtensa
#
#
#
@ -95,7 +96,7 @@ Source5: binutils.keyring
Source1: pre_checkin.sh
Source2: README.First-for.SUSE.packagers
Source3: baselibs.conf
Patch1: binutils-2.37-branch.diff.gz
Patch1: binutils-2.38-branch.diff.gz
Patch3: binutils-skip-rpaths.patch
Patch4: s390-biarch.diff
Patch5: x86-64-biarch.patch
@ -141,7 +142,7 @@ Requires: alts
%else
PreReq: update-alternatives
%endif
%if 0%{!?cross:1}
%if 0%{!?cross:1} && 0%{?suse_version} >= 1310
%define gold_archs %ix86 aarch64 %arm x86_64 ppc ppc64 ppc64le s390x %sparc
%endif
@ -191,6 +192,11 @@ The Compact C Type Format (CTF) is a way of representing information about a bin
%prep
echo "make check will return with %{make_check_handling} in case of testsuite failures."
%setup -q -n binutils-%{version}
# Backup flex and biscon files for later verification.
cp ld/ldlex.l ld/ldlex.l.orig
cp ld/ldgram.y ld/ldgram.y.orig
# Patch is outside test_vanilla because it's supposed to be the
# patch bringing the tarball to the newest upstream version
%patch1 -p1
@ -228,22 +234,11 @@ cp gas/config/tc-avr.h gas/config/tc-avr-nesc.h
#
# test_vanilla
%endif
# in parallel builds, when the flex or bison inputs are patched (possibly
# in the ...-branch.diff) it might happen that the dependency tracking
# of automake is confused and uses the old .c files from srcdir/ld/ while
# also generating the new .c files in builddir/ld leading to trouble.
# I haven't found the right entries to ensure this doesn't happen, so
# simply remove the intermediates
rm -f ld/ldlex.c
rm -f ld/ldgram.c ld/ldgram.h
# The 2.37 released tarball contains wrongly pre-generated (empty) man pages
# so we remove those here as well. Consider removing for later releases.
rm -f binutils/doc/*.1
rm -f binutils/doc/cxxfilt.man
rm -f gprof/*.1
rm -f gas/doc/*.1
rm -f ld/*.1
# Due to legacy flex version present in SLE-12 (and older), we cannot
# re-generate flex and bison files and so we verify that any patch modify these files.
diff -u ld/ldlex.l ld/ldlex.l.orig
diff -u ld/ldgram.y ld/ldgram.y.orig
%build
%define _lto_cflags %{nil}
@ -330,14 +325,14 @@ cd build-dir
# we patch headers (bfd-in.h) that are input to other headers
# which are generated only with --enable-maintainer-mode (which we
# don't do) or explicitely by make headers, so do this:
make %{?_smp_mflags} all-bfd TARGET-bfd=headers
make %{?_smp_mflags} all-bfd TARGET-bfd=headers V=1
# the above interacts with --enable-pgo-build=lto because all-bfd doesn't
# have the PGO handling, hence it's config.cache files are wrong
# remove all of those for reconfigure
rm */config.cache
# force reconfiguring
rm bfd/Makefile
make %{?_smp_mflags}
make %{?_smp_mflags} V=1
%else
# building cross-TARGET-binutils
@ -369,7 +364,7 @@ EXTRA_TARGETS="$EXTRA_TARGETS,arm-suse-linux-gnueabi"
%if "%{TARGET}" == "aarch64"
EXTRA_TARGETS="$EXTRA_TARGETS,aarch64-suse-linux"
%endif
%if "%{TARGET}" == "avr" || "%{TARGET}" == "spu"
%if "%{TARGET}" == "avr" || "%{TARGET}" == "spu" || "%{TARGET}" == "pru"
%define TARGET_OS %{TARGET}
%else
%if "%{TARGET}" == "epiphany" || "%{TARGET}" == "riscv32" || "%{TARGET}" == "rx"
@ -403,11 +398,11 @@ EXTRA_TARGETS="$EXTRA_TARGETS,aarch64-suse-linux"
--enable-default-hash-style=both \
%endif
${EXTRA_TARGETS:+--enable-targets="${EXTRA_TARGETS#,}"}
make %{?_smp_mflags} all-bfd TARGET-bfd=headers
make %{?_smp_mflags} all-bfd TARGET-bfd=headers V=1
rm */config.cache
# force reconfiguring
rm bfd/Makefile
make %{?_smp_mflags}
make %{?_smp_mflags} V=1
%if "%{TARGET}" == "avr"
# build an extra nesC version because nesC requires $'s in identifiers
cp -a gas gas-nesc
@ -431,26 +426,25 @@ cd build-dir
%if 0%{!?cross:1}
# installing native binutils
%ifarch %gold_archs
make DESTDIR=$RPM_BUILD_ROOT install-gold
ln -sf ld.gold $RPM_BUILD_ROOT%{_bindir}/gold
make DESTDIR=%{buildroot} install-gold
ln -sf ld.gold %{buildroot}%{_bindir}/gold
%endif
make DESTDIR=$RPM_BUILD_ROOT install-info install
make -C gas/doc DESTDIR=$RPM_BUILD_ROOT install-info-am install-am
make DESTDIR=$RPM_BUILD_ROOT install-bfd install-opcodes
if [ ! -f "%buildroot/%_bindir/ld.bfd" ]; then
mv "%buildroot/%_bindir"/{ld,ld.bfd};
make DESTDIR=%{buildroot} install-info install
make DESTDIR=%{buildroot} install-bfd install-opcodes
if [ ! -f "%{buildroot}/%_bindir/ld.bfd" ]; then
mv "%{buildroot}/%_bindir"/{ld,ld.bfd};
else
rm -f "%buildroot/%_bindir/ld";
rm -f "%{buildroot}/%_bindir/ld";
fi
%if ! 0%{with libalternatives}
mkdir -p "%buildroot/%_sysconfdir/alternatives";
mkdir -p "%{buildroot}/%_sysconfdir/alternatives";
# Keep older versions of brp-symlink happy
%if %{suse_version} < 1310
ln -s "%_bindir/ld" "%buildroot/%_sysconfdir/alternatives/ld"
ln -s "%_bindir/ld" "%{buildroot}/%_sysconfdir/alternatives/ld"
%endif
ln -s "%_sysconfdir/alternatives/ld" "%buildroot/%_bindir/ld";
ln -s "%_sysconfdir/alternatives/ld" "%{buildroot}/%_bindir/ld";
%else
ln -s %{_bindir}/alts "%buildroot/%_bindir/ld";
ln -s %{_bindir}/alts "%{buildroot}/%_bindir/ld";
mkdir -p %{buildroot}%{_datadir}/libalternatives/ld;
cat > %{buildroot}%{_datadir}/libalternatives/ld/1.conf <<EOF
binary=%{_bindir}/ld.gold
@ -460,24 +454,24 @@ binary=%{_bindir}/ld.bfd
EOF
%endif
rm -rf $RPM_BUILD_ROOT%{_prefix}/%{HOST}/bin
mkdir -p $RPM_BUILD_ROOT%{_prefix}/%{HOST}/bin
ln -sf ../../bin/{ar,as,ld,nm,ranlib,strip} $RPM_BUILD_ROOT%{_prefix}/%{HOST}/bin
mv $RPM_BUILD_ROOT%{_prefix}/%{HOST}/lib/ldscripts $RPM_BUILD_ROOT%{_libdir}
ln -sf ../../%{_lib}/ldscripts $RPM_BUILD_ROOT%{_prefix}/%{HOST}/lib/ldscripts
rm -rf %{buildroot}%{_prefix}/%{HOST}/bin
mkdir -p %{buildroot}%{_prefix}/%{HOST}/bin
ln -sf ../../bin/{ar,as,ld,nm,ranlib,strip} %{buildroot}%{_prefix}/%{HOST}/bin
mv %{buildroot}%{_prefix}/%{HOST}/lib/ldscripts $RPM_BUILD_ROOT%{_libdir}
ln -sf ../../%{_lib}/ldscripts %{buildroot}%{_prefix}/%{HOST}/lib/ldscripts
# Install header files
make -C libiberty install_to_libdir target_header_dir=/usr/include DESTDIR=$RPM_BUILD_ROOT
make -C libiberty install_to_libdir target_header_dir=/usr/include DESTDIR=%{buildroot}
# We want the PIC libiberty.a
install -m 644 libiberty/pic/libiberty.a $RPM_BUILD_ROOT%{_libdir}
install -m 644 libiberty/pic/libiberty.a %{buildroot}%{_libdir}
#
chmod a+x $RPM_BUILD_ROOT%{_libdir}/libbfd-*
chmod a+x $RPM_BUILD_ROOT%{_libdir}/libopcodes-*
chmod a+x %{buildroot}%{_libdir}/libbfd-*
chmod a+x %{buildroot}%{_libdir}/libopcodes-*
# No shared linking outside binutils
rm $RPM_BUILD_ROOT%{_libdir}/lib{bfd,opcodes}.so
rm $RPM_BUILD_ROOT%{_libdir}/lib{bfd,opcodes}.la
rm %{buildroot}%{_libdir}/lib{bfd,opcodes}.so
rm %{buildroot}%{_libdir}/lib{bfd,opcodes,ctf,ctf-nobfd}.la
# Remove unwanted files to shut up rpm
rm -f $RPM_BUILD_ROOT%{_infodir}/configure* $RPM_BUILD_ROOT%{_infodir}/standards.info*
rm -f $RPM_BUILD_ROOT%{_mandir}/man1/dlltool.1 $RPM_BUILD_ROOT%{_mandir}/man1/windres.1 $RPM_BUILD_ROOT%{_mandir}/man1/windmc.1
rm -f %{buildroot}%{_infodir}/configure* $RPM_BUILD_ROOT%{_infodir}/standards.info*
rm -f %{buildroot}%{_mandir}/man1/dlltool.1 $RPM_BUILD_ROOT%{_mandir}/man1/windres.1 $RPM_BUILD_ROOT%{_mandir}/man1/windmc.1
cd ..
%find_lang binutils
%find_lang bfd binutils.lang
@ -488,45 +482,47 @@ cd ..
%ifarch %gold_archs
%find_lang gold binutils-gold.lang
%endif
mkdir -p $RPM_BUILD_ROOT%{_docdir}/%{name}
install -m 644 binutils/NEWS $RPM_BUILD_ROOT%{_docdir}/%{name}/NEWS-binutils
install -m 644 gas/NEWS $RPM_BUILD_ROOT%{_docdir}/%{name}/NEWS-gas
install -m 644 ld/NEWS $RPM_BUILD_ROOT%{_docdir}/%{name}/NEWS-ld
mkdir -p %{buildroot}%{_docdir}/%{name}
install -m 644 binutils/NEWS %{buildroot}%{_docdir}/%{name}/NEWS-binutils
install -m 644 gas/NEWS %{buildroot}%{_docdir}/%{name}/NEWS-gas
install -m 644 ld/NEWS %{buildroot}%{_docdir}/%{name}/NEWS-ld
%else
# installing cross-TARGET-binutils and TARGET-binutils
make DESTDIR=$RPM_BUILD_ROOT install
make DESTDIR=%{buildroot} install
# Replace hard links by symlinks, so that rpmlint doesn't complain
T=$(basename %buildroot/usr/%{TARGET_OS})
for f in %buildroot/usr/$T/bin/* ; do
T=$(basename %{buildroot}/usr/%{TARGET_OS})
for f in %{buildroot}/usr/$T/bin/* ; do
ln -sf /usr/bin/$T-$(basename $f) $f
done
%if "%{TARGET}" == "arm"
# Instead of building duplicate binutils, add symlinks
for f in %buildroot/usr/$T/bin/* ; do
for f in %{buildroot}%{_bindir}/${T}-* ; do
_toolname=${f##$(dirname $f)/${T}-}
for p in arm-none-eabi; do
ln -sf %{_bindir}/$T-$(basename $f) %buildroot%{_bindir}/$p-$(basename $f)
ln -sf %{_bindir}/$T-${_toolname} %{buildroot}%{_bindir}/$p-${_toolname}
done
done
%endif
%if "%{TARGET}" == "riscv64"
# Instead of building duplicate binutils, add symlinks
for f in %buildroot/usr/$T/bin/* ; do
for f in %{buildroot}/usr/$T/bin/* ; do
for p in riscv64-elf; do
ln -sf %{_bindir}/$T-$(basename $f) %buildroot%{_bindir}/$p-$(basename $f)
ln -sf %{_bindir}/$T-$(basename $f) %{buildroot}%{_bindir}/$p-$(basename $f)
done
done
%endif
%if "%{TARGET}" == "avr"
install -c gas-nesc/as-new $RPM_BUILD_ROOT%{_prefix}/bin/%{TARGET_OS}-nesc-as
ln -sf ../../bin/%{TARGET_OS}-nesc-as $RPM_BUILD_ROOT%{_prefix}/%{TARGET_OS}/bin/nesc-as
install -c gas-nesc/as-new %{buildroot}%{_prefix}/bin/%{TARGET_OS}-nesc-as
ln -sf ../../bin/%{TARGET_OS}-nesc-as %{buildroot}%{_prefix}/%{TARGET_OS}/bin/nesc-as
%endif
rm -rf $RPM_BUILD_ROOT%{_mandir}
rm -rf $RPM_BUILD_ROOT%{_infodir}
rm -rf $RPM_BUILD_ROOT%{_prefix}/lib*
rm -rf $RPM_BUILD_ROOT%{_prefix}/include
rm -f $RPM_BUILD_ROOT%{_prefix}/bin/*-c++filt
rm -rf %{buildroot}%{_mandir}
rm -rf %{buildroot}%{_infodir}
rm -rf %{buildroot}%{_prefix}/lib*
rm -rf %{buildroot}%{_prefix}/include
rm -f %{buildroot}%{_prefix}/bin/*-c++filt
> ../binutils.lang
%endif
%fdupes %{buildroot}%{_prefix}
%if 0%{!?cross:1}
%post
@ -586,8 +582,7 @@ fi;
%postun -n libctf0 -p /sbin/ldconfig
%postun -n libctf-nobfd0 -p /sbin/ldconfig
%postun
/sbin/ldconfig
%postun -p /sbin/ldconfig
%endif
%files -f binutils.lang
@ -641,9 +636,11 @@ fi;
%{_libdir}/libctf-nobfd.so
%files -n libctf0
%defattr(-,root,root)
%{_libdir}/libctf.so.*
%files -n libctf-nobfd0
%defattr(-,root,root)
%{_libdir}/libctf-nobfd.so.*
%endif

View File

@ -1,3 +1,106 @@
-------------------------------------------------------------------
Fri Mar 4 10:44:39 UTC 2022 - Martin Liška <mliska@suse.cz>
- Update binutils-2.38-branch.diff.gz in order to include PR28879.
-------------------------------------------------------------------
Tue Mar 1 12:41:27 UTC 2022 - Michael Matz <matz@suse.com>
- From Stefan Brüns <stefan.bruens@rwth-aachen.de>:
* Install symlinks for all target specific tools on
arm-eabi-none [bsc#1185712]
-------------------------------------------------------------------
Thu Feb 24 09:10:44 UTC 2022 - Martin Liška <mliska@suse.cz>
- Do not re-generate ld/ldlex.c, ld/ldgram.c, ld/ldgram.h and verify
that corresponding flex/bison files are not modified by a patch.
-------------------------------------------------------------------
Thu Feb 24 06:55:14 UTC 2022 - Martin Liška <mliska@suse.cz>
- Use verbose mode for make for cross compilers.
-------------------------------------------------------------------
Wed Feb 23 17:52:15 UTC 2022 - Michael Matz <matz@suse.com>
- Make it build on SLE-11 again.
-------------------------------------------------------------------
Tue Feb 22 09:13:15 UTC 2022 - Martin Liška <mliska@suse.cz>
- Use verbose mode for make.
-------------------------------------------------------------------
Sat Feb 12 19:13:31 UTC 2022 - Martin Liška <mliska@suse.cz>
- Update to binutils 2.38:
* elfedit: Add --output-abiversion option to update ABIVERSION.
* Add support for the LoongArch instruction set.
* Tools which display symbols or strings (readelf, strings, nm, objdump)
have a new command line option which controls how unicode characters are
handled. By default they are treated as normal for the tool. Using
--unicode=locale will display them according to the current locale.
Using --unicode=hex will display them as hex byte values, whilst
--unicode=escape will display them as escape sequences. In addition
using --unicode=highlight will display them as unicode escape sequences
highlighted in red (if supported by the output device).
* readelf -r dumps RELR relative relocations now.
* Support for efi-app-aarch64, efi-rtdrv-aarch64 and efi-bsdrv-aarch64 has been
added to objcopy in order to enable UEFI development using binutils.
* ar: Add --thin for creating thin archives. -T is a deprecated alias without
diagnostics. In many ar implementations -T has a different meaning, as
specified by X/Open System Interface.
* Add support for AArch64 system registers that were missing in previous
releases.
* Add support for the LoongArch instruction set.
* Add a command-line option, -muse-unaligned-vector-move, for x86 target
to encode aligned vector move as unaligned vector move.
* Add support for Cortex-R52+ for Arm.
* Add support for Cortex-A510, Cortex-A710, Cortex-X2 for AArch64.
* Add support for Cortex-A710 for Arm.
* Add support for Scalable Matrix Extension (SME) for AArch64.
* The --multibyte-handling=[allow|warn|warn-sym-only] option tells the
assembler what to when it encoutners multibyte characters in the input. The
default is to allow them. Setting the option to "warn" will generate a
warning message whenever any multibyte character is encountered. Using the
option to "warn-sym-only" will make the assembler generate a warning whenever a
symbol is defined containing multibyte characters. (References to undefined
symbols will not generate warnings).
* Outputs of .ds.x directive and .tfloat directive with hex input from
x86 assembler have been reduced from 12 bytes to 10 bytes to match the
output of .tfloat directive.
* Add support for 'armv8.8-a', 'armv9-a', 'armv9.1-a', 'armv9.2-a' and
'armv9.3-a' for -march in AArch64 GAS.
* Add support for 'armv8.7-a', 'armv8.8-a', 'armv9-a', 'armv9.1-a',
'armv9.2-a' and 'armv9.3-a' for -march in Arm GAS.
* Add support for Intel AVX512_FP16 instructions.
* Add -z pack-relative-relocs/-z no pack-relative-relocs to x86 ELF
linker to pack relative relocations in the DT_RELR section.
* Add support for the LoongArch architecture.
* Add -z indirect-extern-access/-z noindirect-extern-access to x86 ELF
linker to control canonical function pointers and copy relocation.
* Add --max-cache-size=SIZE to set the the maximum cache size to SIZE
bytes.
- Add binutils-2.38-branch.diff.gz.
- Removed deletion of man pages as they should be properly packages
in tarball.
- Rebased patches: aarch64-common-pagesize.patch, add-ulp-section.diff,
binutils-bfd_h.patch, binutils-revert-nm-symversion.diff,
binutils-revert-plt32-in-branches.diff, binutils-skip-rpaths.patch
and binutils-compat-old-behaviour.diff.
-------------------------------------------------------------------
Fri Feb 4 13:13:20 UTC 2022 - Matwey Kornilov <matwey.kornilov@gmail.com>
- Enable PRU architecture for AM335x CPU (Beagle Bone Black board)
-------------------------------------------------------------------
Thu Jan 27 20:36:30 UTC 2022 - Dirk Müller <dmueller@suse.com>
- use fdupes on datadir
- remove RPM_BUILD_ROOT usage and other cleanups
-------------------------------------------------------------------
Fri Nov 12 13:20:09 UTC 2021 - Martin Liška <mliska@suse.cz>

View File

@ -1,7 +1,7 @@
#
# spec file for package cross-ia64-binutils
#
# Copyright (c) 2021 SUSE LLC
# Copyright (c) 2022 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@ -23,6 +23,7 @@ ExcludeArch: ia64
BuildRequires: bc
BuildRequires: bison
BuildRequires: dejagnu
BuildRequires: fdupes
BuildRequires: flex
BuildRequires: gcc-c++
# for the testsuite
@ -37,7 +38,7 @@ BuildRequires: zlib-devel-static
%else
BuildRequires: zlib-devel
%endif
Version: 2.37
Version: 2.38
Release: 0
# disable libalternatives for now until it's changed to not
@ -75,7 +76,7 @@ Release: 0
%else
%define build_multitarget 0
%endif
%define target_list aarch64 alpha armv5l armv6l armv7l armv8l avr epiphany hppa hppa64 i686 ia64 m68k mips powerpc powerpc64 powerpc64le riscv64 rx s390 s390x sh4 sparc sparc64 x86_64 xtensa
%define target_list aarch64 alpha armv5l armv6l armv7l armv8l avr pru epiphany hppa hppa64 i686 ia64 m68k mips powerpc powerpc64 powerpc64le riscv64 rx s390 s390x sh4 sparc sparc64 x86_64 xtensa
#
#
#
@ -95,7 +96,7 @@ Source5: binutils.keyring
Source1: pre_checkin.sh
Source2: README.First-for.SUSE.packagers
Source3: baselibs.conf
Patch1: binutils-2.37-branch.diff.gz
Patch1: binutils-2.38-branch.diff.gz
Patch3: binutils-skip-rpaths.patch
Patch4: s390-biarch.diff
Patch5: x86-64-biarch.patch
@ -141,7 +142,7 @@ Requires: alts
%else
PreReq: update-alternatives
%endif
%if 0%{!?cross:1}
%if 0%{!?cross:1} && 0%{?suse_version} >= 1310
%define gold_archs %ix86 aarch64 %arm x86_64 ppc ppc64 ppc64le s390x %sparc
%endif
@ -191,6 +192,11 @@ The Compact C Type Format (CTF) is a way of representing information about a bin
%prep
echo "make check will return with %{make_check_handling} in case of testsuite failures."
%setup -q -n binutils-%{version}
# Backup flex and biscon files for later verification.
cp ld/ldlex.l ld/ldlex.l.orig
cp ld/ldgram.y ld/ldgram.y.orig
# Patch is outside test_vanilla because it's supposed to be the
# patch bringing the tarball to the newest upstream version
%patch1 -p1
@ -228,22 +234,11 @@ cp gas/config/tc-avr.h gas/config/tc-avr-nesc.h
#
# test_vanilla
%endif
# in parallel builds, when the flex or bison inputs are patched (possibly
# in the ...-branch.diff) it might happen that the dependency tracking
# of automake is confused and uses the old .c files from srcdir/ld/ while
# also generating the new .c files in builddir/ld leading to trouble.
# I haven't found the right entries to ensure this doesn't happen, so
# simply remove the intermediates
rm -f ld/ldlex.c
rm -f ld/ldgram.c ld/ldgram.h
# The 2.37 released tarball contains wrongly pre-generated (empty) man pages
# so we remove those here as well. Consider removing for later releases.
rm -f binutils/doc/*.1
rm -f binutils/doc/cxxfilt.man
rm -f gprof/*.1
rm -f gas/doc/*.1
rm -f ld/*.1
# Due to legacy flex version present in SLE-12 (and older), we cannot
# re-generate flex and bison files and so we verify that any patch modify these files.
diff -u ld/ldlex.l ld/ldlex.l.orig
diff -u ld/ldgram.y ld/ldgram.y.orig
%build
%define _lto_cflags %{nil}
@ -330,14 +325,14 @@ cd build-dir
# we patch headers (bfd-in.h) that are input to other headers
# which are generated only with --enable-maintainer-mode (which we
# don't do) or explicitely by make headers, so do this:
make %{?_smp_mflags} all-bfd TARGET-bfd=headers
make %{?_smp_mflags} all-bfd TARGET-bfd=headers V=1
# the above interacts with --enable-pgo-build=lto because all-bfd doesn't
# have the PGO handling, hence it's config.cache files are wrong
# remove all of those for reconfigure
rm */config.cache
# force reconfiguring
rm bfd/Makefile
make %{?_smp_mflags}
make %{?_smp_mflags} V=1
%else
# building cross-TARGET-binutils
@ -369,7 +364,7 @@ EXTRA_TARGETS="$EXTRA_TARGETS,arm-suse-linux-gnueabi"
%if "%{TARGET}" == "aarch64"
EXTRA_TARGETS="$EXTRA_TARGETS,aarch64-suse-linux"
%endif
%if "%{TARGET}" == "avr" || "%{TARGET}" == "spu"
%if "%{TARGET}" == "avr" || "%{TARGET}" == "spu" || "%{TARGET}" == "pru"
%define TARGET_OS %{TARGET}
%else
%if "%{TARGET}" == "epiphany" || "%{TARGET}" == "riscv32" || "%{TARGET}" == "rx"
@ -403,11 +398,11 @@ EXTRA_TARGETS="$EXTRA_TARGETS,aarch64-suse-linux"
--enable-default-hash-style=both \
%endif
${EXTRA_TARGETS:+--enable-targets="${EXTRA_TARGETS#,}"}
make %{?_smp_mflags} all-bfd TARGET-bfd=headers
make %{?_smp_mflags} all-bfd TARGET-bfd=headers V=1
rm */config.cache
# force reconfiguring
rm bfd/Makefile
make %{?_smp_mflags}
make %{?_smp_mflags} V=1
%if "%{TARGET}" == "avr"
# build an extra nesC version because nesC requires $'s in identifiers
cp -a gas gas-nesc
@ -431,26 +426,25 @@ cd build-dir
%if 0%{!?cross:1}
# installing native binutils
%ifarch %gold_archs
make DESTDIR=$RPM_BUILD_ROOT install-gold
ln -sf ld.gold $RPM_BUILD_ROOT%{_bindir}/gold
make DESTDIR=%{buildroot} install-gold
ln -sf ld.gold %{buildroot}%{_bindir}/gold
%endif
make DESTDIR=$RPM_BUILD_ROOT install-info install
make -C gas/doc DESTDIR=$RPM_BUILD_ROOT install-info-am install-am
make DESTDIR=$RPM_BUILD_ROOT install-bfd install-opcodes
if [ ! -f "%buildroot/%_bindir/ld.bfd" ]; then
mv "%buildroot/%_bindir"/{ld,ld.bfd};
make DESTDIR=%{buildroot} install-info install
make DESTDIR=%{buildroot} install-bfd install-opcodes
if [ ! -f "%{buildroot}/%_bindir/ld.bfd" ]; then
mv "%{buildroot}/%_bindir"/{ld,ld.bfd};
else
rm -f "%buildroot/%_bindir/ld";
rm -f "%{buildroot}/%_bindir/ld";
fi
%if ! 0%{with libalternatives}
mkdir -p "%buildroot/%_sysconfdir/alternatives";
mkdir -p "%{buildroot}/%_sysconfdir/alternatives";
# Keep older versions of brp-symlink happy
%if %{suse_version} < 1310
ln -s "%_bindir/ld" "%buildroot/%_sysconfdir/alternatives/ld"
ln -s "%_bindir/ld" "%{buildroot}/%_sysconfdir/alternatives/ld"
%endif
ln -s "%_sysconfdir/alternatives/ld" "%buildroot/%_bindir/ld";
ln -s "%_sysconfdir/alternatives/ld" "%{buildroot}/%_bindir/ld";
%else
ln -s %{_bindir}/alts "%buildroot/%_bindir/ld";
ln -s %{_bindir}/alts "%{buildroot}/%_bindir/ld";
mkdir -p %{buildroot}%{_datadir}/libalternatives/ld;
cat > %{buildroot}%{_datadir}/libalternatives/ld/1.conf <<EOF
binary=%{_bindir}/ld.gold
@ -460,24 +454,24 @@ binary=%{_bindir}/ld.bfd
EOF
%endif
rm -rf $RPM_BUILD_ROOT%{_prefix}/%{HOST}/bin
mkdir -p $RPM_BUILD_ROOT%{_prefix}/%{HOST}/bin
ln -sf ../../bin/{ar,as,ld,nm,ranlib,strip} $RPM_BUILD_ROOT%{_prefix}/%{HOST}/bin
mv $RPM_BUILD_ROOT%{_prefix}/%{HOST}/lib/ldscripts $RPM_BUILD_ROOT%{_libdir}
ln -sf ../../%{_lib}/ldscripts $RPM_BUILD_ROOT%{_prefix}/%{HOST}/lib/ldscripts
rm -rf %{buildroot}%{_prefix}/%{HOST}/bin
mkdir -p %{buildroot}%{_prefix}/%{HOST}/bin
ln -sf ../../bin/{ar,as,ld,nm,ranlib,strip} %{buildroot}%{_prefix}/%{HOST}/bin
mv %{buildroot}%{_prefix}/%{HOST}/lib/ldscripts $RPM_BUILD_ROOT%{_libdir}
ln -sf ../../%{_lib}/ldscripts %{buildroot}%{_prefix}/%{HOST}/lib/ldscripts
# Install header files
make -C libiberty install_to_libdir target_header_dir=/usr/include DESTDIR=$RPM_BUILD_ROOT
make -C libiberty install_to_libdir target_header_dir=/usr/include DESTDIR=%{buildroot}
# We want the PIC libiberty.a
install -m 644 libiberty/pic/libiberty.a $RPM_BUILD_ROOT%{_libdir}
install -m 644 libiberty/pic/libiberty.a %{buildroot}%{_libdir}
#
chmod a+x $RPM_BUILD_ROOT%{_libdir}/libbfd-*
chmod a+x $RPM_BUILD_ROOT%{_libdir}/libopcodes-*
chmod a+x %{buildroot}%{_libdir}/libbfd-*
chmod a+x %{buildroot}%{_libdir}/libopcodes-*
# No shared linking outside binutils
rm $RPM_BUILD_ROOT%{_libdir}/lib{bfd,opcodes}.so
rm $RPM_BUILD_ROOT%{_libdir}/lib{bfd,opcodes}.la
rm %{buildroot}%{_libdir}/lib{bfd,opcodes}.so
rm %{buildroot}%{_libdir}/lib{bfd,opcodes,ctf,ctf-nobfd}.la
# Remove unwanted files to shut up rpm
rm -f $RPM_BUILD_ROOT%{_infodir}/configure* $RPM_BUILD_ROOT%{_infodir}/standards.info*
rm -f $RPM_BUILD_ROOT%{_mandir}/man1/dlltool.1 $RPM_BUILD_ROOT%{_mandir}/man1/windres.1 $RPM_BUILD_ROOT%{_mandir}/man1/windmc.1
rm -f %{buildroot}%{_infodir}/configure* $RPM_BUILD_ROOT%{_infodir}/standards.info*
rm -f %{buildroot}%{_mandir}/man1/dlltool.1 $RPM_BUILD_ROOT%{_mandir}/man1/windres.1 $RPM_BUILD_ROOT%{_mandir}/man1/windmc.1
cd ..
%find_lang binutils
%find_lang bfd binutils.lang
@ -488,45 +482,47 @@ cd ..
%ifarch %gold_archs
%find_lang gold binutils-gold.lang
%endif
mkdir -p $RPM_BUILD_ROOT%{_docdir}/%{name}
install -m 644 binutils/NEWS $RPM_BUILD_ROOT%{_docdir}/%{name}/NEWS-binutils
install -m 644 gas/NEWS $RPM_BUILD_ROOT%{_docdir}/%{name}/NEWS-gas
install -m 644 ld/NEWS $RPM_BUILD_ROOT%{_docdir}/%{name}/NEWS-ld
mkdir -p %{buildroot}%{_docdir}/%{name}
install -m 644 binutils/NEWS %{buildroot}%{_docdir}/%{name}/NEWS-binutils
install -m 644 gas/NEWS %{buildroot}%{_docdir}/%{name}/NEWS-gas
install -m 644 ld/NEWS %{buildroot}%{_docdir}/%{name}/NEWS-ld
%else
# installing cross-TARGET-binutils and TARGET-binutils
make DESTDIR=$RPM_BUILD_ROOT install
make DESTDIR=%{buildroot} install
# Replace hard links by symlinks, so that rpmlint doesn't complain
T=$(basename %buildroot/usr/%{TARGET_OS})
for f in %buildroot/usr/$T/bin/* ; do
T=$(basename %{buildroot}/usr/%{TARGET_OS})
for f in %{buildroot}/usr/$T/bin/* ; do
ln -sf /usr/bin/$T-$(basename $f) $f
done
%if "%{TARGET}" == "arm"
# Instead of building duplicate binutils, add symlinks
for f in %buildroot/usr/$T/bin/* ; do
for f in %{buildroot}%{_bindir}/${T}-* ; do
_toolname=${f##$(dirname $f)/${T}-}
for p in arm-none-eabi; do
ln -sf %{_bindir}/$T-$(basename $f) %buildroot%{_bindir}/$p-$(basename $f)
ln -sf %{_bindir}/$T-${_toolname} %{buildroot}%{_bindir}/$p-${_toolname}
done
done
%endif
%if "%{TARGET}" == "riscv64"
# Instead of building duplicate binutils, add symlinks
for f in %buildroot/usr/$T/bin/* ; do
for f in %{buildroot}/usr/$T/bin/* ; do
for p in riscv64-elf; do
ln -sf %{_bindir}/$T-$(basename $f) %buildroot%{_bindir}/$p-$(basename $f)
ln -sf %{_bindir}/$T-$(basename $f) %{buildroot}%{_bindir}/$p-$(basename $f)
done
done
%endif
%if "%{TARGET}" == "avr"
install -c gas-nesc/as-new $RPM_BUILD_ROOT%{_prefix}/bin/%{TARGET_OS}-nesc-as
ln -sf ../../bin/%{TARGET_OS}-nesc-as $RPM_BUILD_ROOT%{_prefix}/%{TARGET_OS}/bin/nesc-as
install -c gas-nesc/as-new %{buildroot}%{_prefix}/bin/%{TARGET_OS}-nesc-as
ln -sf ../../bin/%{TARGET_OS}-nesc-as %{buildroot}%{_prefix}/%{TARGET_OS}/bin/nesc-as
%endif
rm -rf $RPM_BUILD_ROOT%{_mandir}
rm -rf $RPM_BUILD_ROOT%{_infodir}
rm -rf $RPM_BUILD_ROOT%{_prefix}/lib*
rm -rf $RPM_BUILD_ROOT%{_prefix}/include
rm -f $RPM_BUILD_ROOT%{_prefix}/bin/*-c++filt
rm -rf %{buildroot}%{_mandir}
rm -rf %{buildroot}%{_infodir}
rm -rf %{buildroot}%{_prefix}/lib*
rm -rf %{buildroot}%{_prefix}/include
rm -f %{buildroot}%{_prefix}/bin/*-c++filt
> ../binutils.lang
%endif
%fdupes %{buildroot}%{_prefix}
%if 0%{!?cross:1}
%post
@ -586,8 +582,7 @@ fi;
%postun -n libctf0 -p /sbin/ldconfig
%postun -n libctf-nobfd0 -p /sbin/ldconfig
%postun
/sbin/ldconfig
%postun -p /sbin/ldconfig
%endif
%files -f binutils.lang
@ -641,9 +636,11 @@ fi;
%{_libdir}/libctf-nobfd.so
%files -n libctf0
%defattr(-,root,root)
%{_libdir}/libctf.so.*
%files -n libctf-nobfd0
%defattr(-,root,root)
%{_libdir}/libctf-nobfd.so.*
%endif

View File

@ -1,3 +1,106 @@
-------------------------------------------------------------------
Fri Mar 4 10:44:39 UTC 2022 - Martin Liška <mliska@suse.cz>
- Update binutils-2.38-branch.diff.gz in order to include PR28879.
-------------------------------------------------------------------
Tue Mar 1 12:41:27 UTC 2022 - Michael Matz <matz@suse.com>
- From Stefan Brüns <stefan.bruens@rwth-aachen.de>:
* Install symlinks for all target specific tools on
arm-eabi-none [bsc#1185712]
-------------------------------------------------------------------
Thu Feb 24 09:10:44 UTC 2022 - Martin Liška <mliska@suse.cz>
- Do not re-generate ld/ldlex.c, ld/ldgram.c, ld/ldgram.h and verify
that corresponding flex/bison files are not modified by a patch.
-------------------------------------------------------------------
Thu Feb 24 06:55:14 UTC 2022 - Martin Liška <mliska@suse.cz>
- Use verbose mode for make for cross compilers.
-------------------------------------------------------------------
Wed Feb 23 17:52:15 UTC 2022 - Michael Matz <matz@suse.com>
- Make it build on SLE-11 again.
-------------------------------------------------------------------
Tue Feb 22 09:13:15 UTC 2022 - Martin Liška <mliska@suse.cz>
- Use verbose mode for make.
-------------------------------------------------------------------
Sat Feb 12 19:13:31 UTC 2022 - Martin Liška <mliska@suse.cz>
- Update to binutils 2.38:
* elfedit: Add --output-abiversion option to update ABIVERSION.
* Add support for the LoongArch instruction set.
* Tools which display symbols or strings (readelf, strings, nm, objdump)
have a new command line option which controls how unicode characters are
handled. By default they are treated as normal for the tool. Using
--unicode=locale will display them according to the current locale.
Using --unicode=hex will display them as hex byte values, whilst
--unicode=escape will display them as escape sequences. In addition
using --unicode=highlight will display them as unicode escape sequences
highlighted in red (if supported by the output device).
* readelf -r dumps RELR relative relocations now.
* Support for efi-app-aarch64, efi-rtdrv-aarch64 and efi-bsdrv-aarch64 has been
added to objcopy in order to enable UEFI development using binutils.
* ar: Add --thin for creating thin archives. -T is a deprecated alias without
diagnostics. In many ar implementations -T has a different meaning, as
specified by X/Open System Interface.
* Add support for AArch64 system registers that were missing in previous
releases.
* Add support for the LoongArch instruction set.
* Add a command-line option, -muse-unaligned-vector-move, for x86 target
to encode aligned vector move as unaligned vector move.
* Add support for Cortex-R52+ for Arm.
* Add support for Cortex-A510, Cortex-A710, Cortex-X2 for AArch64.
* Add support for Cortex-A710 for Arm.
* Add support for Scalable Matrix Extension (SME) for AArch64.
* The --multibyte-handling=[allow|warn|warn-sym-only] option tells the
assembler what to when it encoutners multibyte characters in the input. The
default is to allow them. Setting the option to "warn" will generate a
warning message whenever any multibyte character is encountered. Using the
option to "warn-sym-only" will make the assembler generate a warning whenever a
symbol is defined containing multibyte characters. (References to undefined
symbols will not generate warnings).
* Outputs of .ds.x directive and .tfloat directive with hex input from
x86 assembler have been reduced from 12 bytes to 10 bytes to match the
output of .tfloat directive.
* Add support for 'armv8.8-a', 'armv9-a', 'armv9.1-a', 'armv9.2-a' and
'armv9.3-a' for -march in AArch64 GAS.
* Add support for 'armv8.7-a', 'armv8.8-a', 'armv9-a', 'armv9.1-a',
'armv9.2-a' and 'armv9.3-a' for -march in Arm GAS.
* Add support for Intel AVX512_FP16 instructions.
* Add -z pack-relative-relocs/-z no pack-relative-relocs to x86 ELF
linker to pack relative relocations in the DT_RELR section.
* Add support for the LoongArch architecture.
* Add -z indirect-extern-access/-z noindirect-extern-access to x86 ELF
linker to control canonical function pointers and copy relocation.
* Add --max-cache-size=SIZE to set the the maximum cache size to SIZE
bytes.
- Add binutils-2.38-branch.diff.gz.
- Removed deletion of man pages as they should be properly packages
in tarball.
- Rebased patches: aarch64-common-pagesize.patch, add-ulp-section.diff,
binutils-bfd_h.patch, binutils-revert-nm-symversion.diff,
binutils-revert-plt32-in-branches.diff, binutils-skip-rpaths.patch
and binutils-compat-old-behaviour.diff.
-------------------------------------------------------------------
Fri Feb 4 13:13:20 UTC 2022 - Matwey Kornilov <matwey.kornilov@gmail.com>
- Enable PRU architecture for AM335x CPU (Beagle Bone Black board)
-------------------------------------------------------------------
Thu Jan 27 20:36:30 UTC 2022 - Dirk Müller <dmueller@suse.com>
- use fdupes on datadir
- remove RPM_BUILD_ROOT usage and other cleanups
-------------------------------------------------------------------
Fri Nov 12 13:20:09 UTC 2021 - Martin Liška <mliska@suse.cz>

View File

@ -1,7 +1,7 @@
#
# spec file for package cross-m68k-binutils
#
# Copyright (c) 2021 SUSE LLC
# Copyright (c) 2022 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@ -23,6 +23,7 @@ ExcludeArch: m68k
BuildRequires: bc
BuildRequires: bison
BuildRequires: dejagnu
BuildRequires: fdupes
BuildRequires: flex
BuildRequires: gcc-c++
# for the testsuite
@ -37,7 +38,7 @@ BuildRequires: zlib-devel-static
%else
BuildRequires: zlib-devel
%endif
Version: 2.37
Version: 2.38
Release: 0
# disable libalternatives for now until it's changed to not
@ -75,7 +76,7 @@ Release: 0
%else
%define build_multitarget 0
%endif
%define target_list aarch64 alpha armv5l armv6l armv7l armv8l avr epiphany hppa hppa64 i686 ia64 m68k mips powerpc powerpc64 powerpc64le riscv64 rx s390 s390x sh4 sparc sparc64 x86_64 xtensa
%define target_list aarch64 alpha armv5l armv6l armv7l armv8l avr pru epiphany hppa hppa64 i686 ia64 m68k mips powerpc powerpc64 powerpc64le riscv64 rx s390 s390x sh4 sparc sparc64 x86_64 xtensa
#
#
#
@ -95,7 +96,7 @@ Source5: binutils.keyring
Source1: pre_checkin.sh
Source2: README.First-for.SUSE.packagers
Source3: baselibs.conf
Patch1: binutils-2.37-branch.diff.gz
Patch1: binutils-2.38-branch.diff.gz
Patch3: binutils-skip-rpaths.patch
Patch4: s390-biarch.diff
Patch5: x86-64-biarch.patch
@ -141,7 +142,7 @@ Requires: alts
%else
PreReq: update-alternatives
%endif
%if 0%{!?cross:1}
%if 0%{!?cross:1} && 0%{?suse_version} >= 1310
%define gold_archs %ix86 aarch64 %arm x86_64 ppc ppc64 ppc64le s390x %sparc
%endif
@ -191,6 +192,11 @@ The Compact C Type Format (CTF) is a way of representing information about a bin
%prep
echo "make check will return with %{make_check_handling} in case of testsuite failures."
%setup -q -n binutils-%{version}
# Backup flex and biscon files for later verification.
cp ld/ldlex.l ld/ldlex.l.orig
cp ld/ldgram.y ld/ldgram.y.orig
# Patch is outside test_vanilla because it's supposed to be the
# patch bringing the tarball to the newest upstream version
%patch1 -p1
@ -228,22 +234,11 @@ cp gas/config/tc-avr.h gas/config/tc-avr-nesc.h
#
# test_vanilla
%endif
# in parallel builds, when the flex or bison inputs are patched (possibly
# in the ...-branch.diff) it might happen that the dependency tracking
# of automake is confused and uses the old .c files from srcdir/ld/ while
# also generating the new .c files in builddir/ld leading to trouble.
# I haven't found the right entries to ensure this doesn't happen, so
# simply remove the intermediates
rm -f ld/ldlex.c
rm -f ld/ldgram.c ld/ldgram.h
# The 2.37 released tarball contains wrongly pre-generated (empty) man pages
# so we remove those here as well. Consider removing for later releases.
rm -f binutils/doc/*.1
rm -f binutils/doc/cxxfilt.man
rm -f gprof/*.1
rm -f gas/doc/*.1
rm -f ld/*.1
# Due to legacy flex version present in SLE-12 (and older), we cannot
# re-generate flex and bison files and so we verify that any patch modify these files.
diff -u ld/ldlex.l ld/ldlex.l.orig
diff -u ld/ldgram.y ld/ldgram.y.orig
%build
%define _lto_cflags %{nil}
@ -330,14 +325,14 @@ cd build-dir
# we patch headers (bfd-in.h) that are input to other headers
# which are generated only with --enable-maintainer-mode (which we
# don't do) or explicitely by make headers, so do this:
make %{?_smp_mflags} all-bfd TARGET-bfd=headers
make %{?_smp_mflags} all-bfd TARGET-bfd=headers V=1
# the above interacts with --enable-pgo-build=lto because all-bfd doesn't
# have the PGO handling, hence it's config.cache files are wrong
# remove all of those for reconfigure
rm */config.cache
# force reconfiguring
rm bfd/Makefile
make %{?_smp_mflags}
make %{?_smp_mflags} V=1
%else
# building cross-TARGET-binutils
@ -369,7 +364,7 @@ EXTRA_TARGETS="$EXTRA_TARGETS,arm-suse-linux-gnueabi"
%if "%{TARGET}" == "aarch64"
EXTRA_TARGETS="$EXTRA_TARGETS,aarch64-suse-linux"
%endif
%if "%{TARGET}" == "avr" || "%{TARGET}" == "spu"
%if "%{TARGET}" == "avr" || "%{TARGET}" == "spu" || "%{TARGET}" == "pru"
%define TARGET_OS %{TARGET}
%else
%if "%{TARGET}" == "epiphany" || "%{TARGET}" == "riscv32" || "%{TARGET}" == "rx"
@ -403,11 +398,11 @@ EXTRA_TARGETS="$EXTRA_TARGETS,aarch64-suse-linux"
--enable-default-hash-style=both \
%endif
${EXTRA_TARGETS:+--enable-targets="${EXTRA_TARGETS#,}"}
make %{?_smp_mflags} all-bfd TARGET-bfd=headers
make %{?_smp_mflags} all-bfd TARGET-bfd=headers V=1
rm */config.cache
# force reconfiguring
rm bfd/Makefile
make %{?_smp_mflags}
make %{?_smp_mflags} V=1
%if "%{TARGET}" == "avr"
# build an extra nesC version because nesC requires $'s in identifiers
cp -a gas gas-nesc
@ -431,26 +426,25 @@ cd build-dir
%if 0%{!?cross:1}
# installing native binutils
%ifarch %gold_archs
make DESTDIR=$RPM_BUILD_ROOT install-gold
ln -sf ld.gold $RPM_BUILD_ROOT%{_bindir}/gold
make DESTDIR=%{buildroot} install-gold
ln -sf ld.gold %{buildroot}%{_bindir}/gold
%endif
make DESTDIR=$RPM_BUILD_ROOT install-info install
make -C gas/doc DESTDIR=$RPM_BUILD_ROOT install-info-am install-am
make DESTDIR=$RPM_BUILD_ROOT install-bfd install-opcodes
if [ ! -f "%buildroot/%_bindir/ld.bfd" ]; then
mv "%buildroot/%_bindir"/{ld,ld.bfd};
make DESTDIR=%{buildroot} install-info install
make DESTDIR=%{buildroot} install-bfd install-opcodes
if [ ! -f "%{buildroot}/%_bindir/ld.bfd" ]; then
mv "%{buildroot}/%_bindir"/{ld,ld.bfd};
else
rm -f "%buildroot/%_bindir/ld";
rm -f "%{buildroot}/%_bindir/ld";
fi
%if ! 0%{with libalternatives}
mkdir -p "%buildroot/%_sysconfdir/alternatives";
mkdir -p "%{buildroot}/%_sysconfdir/alternatives";
# Keep older versions of brp-symlink happy
%if %{suse_version} < 1310
ln -s "%_bindir/ld" "%buildroot/%_sysconfdir/alternatives/ld"
ln -s "%_bindir/ld" "%{buildroot}/%_sysconfdir/alternatives/ld"
%endif
ln -s "%_sysconfdir/alternatives/ld" "%buildroot/%_bindir/ld";
ln -s "%_sysconfdir/alternatives/ld" "%{buildroot}/%_bindir/ld";
%else
ln -s %{_bindir}/alts "%buildroot/%_bindir/ld";
ln -s %{_bindir}/alts "%{buildroot}/%_bindir/ld";
mkdir -p %{buildroot}%{_datadir}/libalternatives/ld;
cat > %{buildroot}%{_datadir}/libalternatives/ld/1.conf <<EOF
binary=%{_bindir}/ld.gold
@ -460,24 +454,24 @@ binary=%{_bindir}/ld.bfd
EOF
%endif
rm -rf $RPM_BUILD_ROOT%{_prefix}/%{HOST}/bin
mkdir -p $RPM_BUILD_ROOT%{_prefix}/%{HOST}/bin
ln -sf ../../bin/{ar,as,ld,nm,ranlib,strip} $RPM_BUILD_ROOT%{_prefix}/%{HOST}/bin
mv $RPM_BUILD_ROOT%{_prefix}/%{HOST}/lib/ldscripts $RPM_BUILD_ROOT%{_libdir}
ln -sf ../../%{_lib}/ldscripts $RPM_BUILD_ROOT%{_prefix}/%{HOST}/lib/ldscripts
rm -rf %{buildroot}%{_prefix}/%{HOST}/bin
mkdir -p %{buildroot}%{_prefix}/%{HOST}/bin
ln -sf ../../bin/{ar,as,ld,nm,ranlib,strip} %{buildroot}%{_prefix}/%{HOST}/bin
mv %{buildroot}%{_prefix}/%{HOST}/lib/ldscripts $RPM_BUILD_ROOT%{_libdir}
ln -sf ../../%{_lib}/ldscripts %{buildroot}%{_prefix}/%{HOST}/lib/ldscripts
# Install header files
make -C libiberty install_to_libdir target_header_dir=/usr/include DESTDIR=$RPM_BUILD_ROOT
make -C libiberty install_to_libdir target_header_dir=/usr/include DESTDIR=%{buildroot}
# We want the PIC libiberty.a
install -m 644 libiberty/pic/libiberty.a $RPM_BUILD_ROOT%{_libdir}
install -m 644 libiberty/pic/libiberty.a %{buildroot}%{_libdir}
#
chmod a+x $RPM_BUILD_ROOT%{_libdir}/libbfd-*
chmod a+x $RPM_BUILD_ROOT%{_libdir}/libopcodes-*
chmod a+x %{buildroot}%{_libdir}/libbfd-*
chmod a+x %{buildroot}%{_libdir}/libopcodes-*
# No shared linking outside binutils
rm $RPM_BUILD_ROOT%{_libdir}/lib{bfd,opcodes}.so
rm $RPM_BUILD_ROOT%{_libdir}/lib{bfd,opcodes}.la
rm %{buildroot}%{_libdir}/lib{bfd,opcodes}.so
rm %{buildroot}%{_libdir}/lib{bfd,opcodes,ctf,ctf-nobfd}.la
# Remove unwanted files to shut up rpm
rm -f $RPM_BUILD_ROOT%{_infodir}/configure* $RPM_BUILD_ROOT%{_infodir}/standards.info*
rm -f $RPM_BUILD_ROOT%{_mandir}/man1/dlltool.1 $RPM_BUILD_ROOT%{_mandir}/man1/windres.1 $RPM_BUILD_ROOT%{_mandir}/man1/windmc.1
rm -f %{buildroot}%{_infodir}/configure* $RPM_BUILD_ROOT%{_infodir}/standards.info*
rm -f %{buildroot}%{_mandir}/man1/dlltool.1 $RPM_BUILD_ROOT%{_mandir}/man1/windres.1 $RPM_BUILD_ROOT%{_mandir}/man1/windmc.1
cd ..
%find_lang binutils
%find_lang bfd binutils.lang
@ -488,45 +482,47 @@ cd ..
%ifarch %gold_archs
%find_lang gold binutils-gold.lang
%endif
mkdir -p $RPM_BUILD_ROOT%{_docdir}/%{name}
install -m 644 binutils/NEWS $RPM_BUILD_ROOT%{_docdir}/%{name}/NEWS-binutils
install -m 644 gas/NEWS $RPM_BUILD_ROOT%{_docdir}/%{name}/NEWS-gas
install -m 644 ld/NEWS $RPM_BUILD_ROOT%{_docdir}/%{name}/NEWS-ld
mkdir -p %{buildroot}%{_docdir}/%{name}
install -m 644 binutils/NEWS %{buildroot}%{_docdir}/%{name}/NEWS-binutils
install -m 644 gas/NEWS %{buildroot}%{_docdir}/%{name}/NEWS-gas
install -m 644 ld/NEWS %{buildroot}%{_docdir}/%{name}/NEWS-ld
%else
# installing cross-TARGET-binutils and TARGET-binutils
make DESTDIR=$RPM_BUILD_ROOT install
make DESTDIR=%{buildroot} install
# Replace hard links by symlinks, so that rpmlint doesn't complain
T=$(basename %buildroot/usr/%{TARGET_OS})
for f in %buildroot/usr/$T/bin/* ; do
T=$(basename %{buildroot}/usr/%{TARGET_OS})
for f in %{buildroot}/usr/$T/bin/* ; do
ln -sf /usr/bin/$T-$(basename $f) $f
done
%if "%{TARGET}" == "arm"
# Instead of building duplicate binutils, add symlinks
for f in %buildroot/usr/$T/bin/* ; do
for f in %{buildroot}%{_bindir}/${T}-* ; do
_toolname=${f##$(dirname $f)/${T}-}
for p in arm-none-eabi; do
ln -sf %{_bindir}/$T-$(basename $f) %buildroot%{_bindir}/$p-$(basename $f)
ln -sf %{_bindir}/$T-${_toolname} %{buildroot}%{_bindir}/$p-${_toolname}
done
done
%endif
%if "%{TARGET}" == "riscv64"
# Instead of building duplicate binutils, add symlinks
for f in %buildroot/usr/$T/bin/* ; do
for f in %{buildroot}/usr/$T/bin/* ; do
for p in riscv64-elf; do
ln -sf %{_bindir}/$T-$(basename $f) %buildroot%{_bindir}/$p-$(basename $f)
ln -sf %{_bindir}/$T-$(basename $f) %{buildroot}%{_bindir}/$p-$(basename $f)
done
done
%endif
%if "%{TARGET}" == "avr"
install -c gas-nesc/as-new $RPM_BUILD_ROOT%{_prefix}/bin/%{TARGET_OS}-nesc-as
ln -sf ../../bin/%{TARGET_OS}-nesc-as $RPM_BUILD_ROOT%{_prefix}/%{TARGET_OS}/bin/nesc-as
install -c gas-nesc/as-new %{buildroot}%{_prefix}/bin/%{TARGET_OS}-nesc-as
ln -sf ../../bin/%{TARGET_OS}-nesc-as %{buildroot}%{_prefix}/%{TARGET_OS}/bin/nesc-as
%endif
rm -rf $RPM_BUILD_ROOT%{_mandir}
rm -rf $RPM_BUILD_ROOT%{_infodir}
rm -rf $RPM_BUILD_ROOT%{_prefix}/lib*
rm -rf $RPM_BUILD_ROOT%{_prefix}/include
rm -f $RPM_BUILD_ROOT%{_prefix}/bin/*-c++filt
rm -rf %{buildroot}%{_mandir}
rm -rf %{buildroot}%{_infodir}
rm -rf %{buildroot}%{_prefix}/lib*
rm -rf %{buildroot}%{_prefix}/include
rm -f %{buildroot}%{_prefix}/bin/*-c++filt
> ../binutils.lang
%endif
%fdupes %{buildroot}%{_prefix}
%if 0%{!?cross:1}
%post
@ -586,8 +582,7 @@ fi;
%postun -n libctf0 -p /sbin/ldconfig
%postun -n libctf-nobfd0 -p /sbin/ldconfig
%postun
/sbin/ldconfig
%postun -p /sbin/ldconfig
%endif
%files -f binutils.lang
@ -641,9 +636,11 @@ fi;
%{_libdir}/libctf-nobfd.so
%files -n libctf0
%defattr(-,root,root)
%{_libdir}/libctf.so.*
%files -n libctf-nobfd0
%defattr(-,root,root)
%{_libdir}/libctf-nobfd.so.*
%endif

View File

@ -1,3 +1,106 @@
-------------------------------------------------------------------
Fri Mar 4 10:44:39 UTC 2022 - Martin Liška <mliska@suse.cz>
- Update binutils-2.38-branch.diff.gz in order to include PR28879.
-------------------------------------------------------------------
Tue Mar 1 12:41:27 UTC 2022 - Michael Matz <matz@suse.com>
- From Stefan Brüns <stefan.bruens@rwth-aachen.de>:
* Install symlinks for all target specific tools on
arm-eabi-none [bsc#1185712]
-------------------------------------------------------------------
Thu Feb 24 09:10:44 UTC 2022 - Martin Liška <mliska@suse.cz>
- Do not re-generate ld/ldlex.c, ld/ldgram.c, ld/ldgram.h and verify
that corresponding flex/bison files are not modified by a patch.
-------------------------------------------------------------------
Thu Feb 24 06:55:14 UTC 2022 - Martin Liška <mliska@suse.cz>
- Use verbose mode for make for cross compilers.
-------------------------------------------------------------------
Wed Feb 23 17:52:15 UTC 2022 - Michael Matz <matz@suse.com>
- Make it build on SLE-11 again.
-------------------------------------------------------------------
Tue Feb 22 09:13:15 UTC 2022 - Martin Liška <mliska@suse.cz>
- Use verbose mode for make.
-------------------------------------------------------------------
Sat Feb 12 19:13:31 UTC 2022 - Martin Liška <mliska@suse.cz>
- Update to binutils 2.38:
* elfedit: Add --output-abiversion option to update ABIVERSION.
* Add support for the LoongArch instruction set.
* Tools which display symbols or strings (readelf, strings, nm, objdump)
have a new command line option which controls how unicode characters are
handled. By default they are treated as normal for the tool. Using
--unicode=locale will display them according to the current locale.
Using --unicode=hex will display them as hex byte values, whilst
--unicode=escape will display them as escape sequences. In addition
using --unicode=highlight will display them as unicode escape sequences
highlighted in red (if supported by the output device).
* readelf -r dumps RELR relative relocations now.
* Support for efi-app-aarch64, efi-rtdrv-aarch64 and efi-bsdrv-aarch64 has been
added to objcopy in order to enable UEFI development using binutils.
* ar: Add --thin for creating thin archives. -T is a deprecated alias without
diagnostics. In many ar implementations -T has a different meaning, as
specified by X/Open System Interface.
* Add support for AArch64 system registers that were missing in previous
releases.
* Add support for the LoongArch instruction set.
* Add a command-line option, -muse-unaligned-vector-move, for x86 target
to encode aligned vector move as unaligned vector move.
* Add support for Cortex-R52+ for Arm.
* Add support for Cortex-A510, Cortex-A710, Cortex-X2 for AArch64.
* Add support for Cortex-A710 for Arm.
* Add support for Scalable Matrix Extension (SME) for AArch64.
* The --multibyte-handling=[allow|warn|warn-sym-only] option tells the
assembler what to when it encoutners multibyte characters in the input. The
default is to allow them. Setting the option to "warn" will generate a
warning message whenever any multibyte character is encountered. Using the
option to "warn-sym-only" will make the assembler generate a warning whenever a
symbol is defined containing multibyte characters. (References to undefined
symbols will not generate warnings).
* Outputs of .ds.x directive and .tfloat directive with hex input from
x86 assembler have been reduced from 12 bytes to 10 bytes to match the
output of .tfloat directive.
* Add support for 'armv8.8-a', 'armv9-a', 'armv9.1-a', 'armv9.2-a' and
'armv9.3-a' for -march in AArch64 GAS.
* Add support for 'armv8.7-a', 'armv8.8-a', 'armv9-a', 'armv9.1-a',
'armv9.2-a' and 'armv9.3-a' for -march in Arm GAS.
* Add support for Intel AVX512_FP16 instructions.
* Add -z pack-relative-relocs/-z no pack-relative-relocs to x86 ELF
linker to pack relative relocations in the DT_RELR section.
* Add support for the LoongArch architecture.
* Add -z indirect-extern-access/-z noindirect-extern-access to x86 ELF
linker to control canonical function pointers and copy relocation.
* Add --max-cache-size=SIZE to set the the maximum cache size to SIZE
bytes.
- Add binutils-2.38-branch.diff.gz.
- Removed deletion of man pages as they should be properly packages
in tarball.
- Rebased patches: aarch64-common-pagesize.patch, add-ulp-section.diff,
binutils-bfd_h.patch, binutils-revert-nm-symversion.diff,
binutils-revert-plt32-in-branches.diff, binutils-skip-rpaths.patch
and binutils-compat-old-behaviour.diff.
-------------------------------------------------------------------
Fri Feb 4 13:13:20 UTC 2022 - Matwey Kornilov <matwey.kornilov@gmail.com>
- Enable PRU architecture for AM335x CPU (Beagle Bone Black board)
-------------------------------------------------------------------
Thu Jan 27 20:36:30 UTC 2022 - Dirk Müller <dmueller@suse.com>
- use fdupes on datadir
- remove RPM_BUILD_ROOT usage and other cleanups
-------------------------------------------------------------------
Fri Nov 12 13:20:09 UTC 2021 - Martin Liška <mliska@suse.cz>

View File

@ -1,7 +1,7 @@
#
# spec file for package cross-mips-binutils
#
# Copyright (c) 2021 SUSE LLC
# Copyright (c) 2022 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@ -23,6 +23,7 @@ ExcludeArch: mips
BuildRequires: bc
BuildRequires: bison
BuildRequires: dejagnu
BuildRequires: fdupes
BuildRequires: flex
BuildRequires: gcc-c++
# for the testsuite
@ -37,7 +38,7 @@ BuildRequires: zlib-devel-static
%else
BuildRequires: zlib-devel
%endif
Version: 2.37
Version: 2.38
Release: 0
# disable libalternatives for now until it's changed to not
@ -75,7 +76,7 @@ Release: 0
%else
%define build_multitarget 0
%endif
%define target_list aarch64 alpha armv5l armv6l armv7l armv8l avr epiphany hppa hppa64 i686 ia64 m68k mips powerpc powerpc64 powerpc64le riscv64 rx s390 s390x sh4 sparc sparc64 x86_64 xtensa
%define target_list aarch64 alpha armv5l armv6l armv7l armv8l avr pru epiphany hppa hppa64 i686 ia64 m68k mips powerpc powerpc64 powerpc64le riscv64 rx s390 s390x sh4 sparc sparc64 x86_64 xtensa
#
#
#
@ -95,7 +96,7 @@ Source5: binutils.keyring
Source1: pre_checkin.sh
Source2: README.First-for.SUSE.packagers
Source3: baselibs.conf
Patch1: binutils-2.37-branch.diff.gz
Patch1: binutils-2.38-branch.diff.gz
Patch3: binutils-skip-rpaths.patch
Patch4: s390-biarch.diff
Patch5: x86-64-biarch.patch
@ -141,7 +142,7 @@ Requires: alts
%else
PreReq: update-alternatives
%endif
%if 0%{!?cross:1}
%if 0%{!?cross:1} && 0%{?suse_version} >= 1310
%define gold_archs %ix86 aarch64 %arm x86_64 ppc ppc64 ppc64le s390x %sparc
%endif
@ -191,6 +192,11 @@ The Compact C Type Format (CTF) is a way of representing information about a bin
%prep
echo "make check will return with %{make_check_handling} in case of testsuite failures."
%setup -q -n binutils-%{version}
# Backup flex and biscon files for later verification.
cp ld/ldlex.l ld/ldlex.l.orig
cp ld/ldgram.y ld/ldgram.y.orig
# Patch is outside test_vanilla because it's supposed to be the
# patch bringing the tarball to the newest upstream version
%patch1 -p1
@ -228,22 +234,11 @@ cp gas/config/tc-avr.h gas/config/tc-avr-nesc.h
#
# test_vanilla
%endif
# in parallel builds, when the flex or bison inputs are patched (possibly
# in the ...-branch.diff) it might happen that the dependency tracking
# of automake is confused and uses the old .c files from srcdir/ld/ while
# also generating the new .c files in builddir/ld leading to trouble.
# I haven't found the right entries to ensure this doesn't happen, so
# simply remove the intermediates
rm -f ld/ldlex.c
rm -f ld/ldgram.c ld/ldgram.h
# The 2.37 released tarball contains wrongly pre-generated (empty) man pages
# so we remove those here as well. Consider removing for later releases.
rm -f binutils/doc/*.1
rm -f binutils/doc/cxxfilt.man
rm -f gprof/*.1
rm -f gas/doc/*.1
rm -f ld/*.1
# Due to legacy flex version present in SLE-12 (and older), we cannot
# re-generate flex and bison files and so we verify that any patch modify these files.
diff -u ld/ldlex.l ld/ldlex.l.orig
diff -u ld/ldgram.y ld/ldgram.y.orig
%build
%define _lto_cflags %{nil}
@ -330,14 +325,14 @@ cd build-dir
# we patch headers (bfd-in.h) that are input to other headers
# which are generated only with --enable-maintainer-mode (which we
# don't do) or explicitely by make headers, so do this:
make %{?_smp_mflags} all-bfd TARGET-bfd=headers
make %{?_smp_mflags} all-bfd TARGET-bfd=headers V=1
# the above interacts with --enable-pgo-build=lto because all-bfd doesn't
# have the PGO handling, hence it's config.cache files are wrong
# remove all of those for reconfigure
rm */config.cache
# force reconfiguring
rm bfd/Makefile
make %{?_smp_mflags}
make %{?_smp_mflags} V=1
%else
# building cross-TARGET-binutils
@ -369,7 +364,7 @@ EXTRA_TARGETS="$EXTRA_TARGETS,arm-suse-linux-gnueabi"
%if "%{TARGET}" == "aarch64"
EXTRA_TARGETS="$EXTRA_TARGETS,aarch64-suse-linux"
%endif
%if "%{TARGET}" == "avr" || "%{TARGET}" == "spu"
%if "%{TARGET}" == "avr" || "%{TARGET}" == "spu" || "%{TARGET}" == "pru"
%define TARGET_OS %{TARGET}
%else
%if "%{TARGET}" == "epiphany" || "%{TARGET}" == "riscv32" || "%{TARGET}" == "rx"
@ -403,11 +398,11 @@ EXTRA_TARGETS="$EXTRA_TARGETS,aarch64-suse-linux"
--enable-default-hash-style=both \
%endif
${EXTRA_TARGETS:+--enable-targets="${EXTRA_TARGETS#,}"}
make %{?_smp_mflags} all-bfd TARGET-bfd=headers
make %{?_smp_mflags} all-bfd TARGET-bfd=headers V=1
rm */config.cache
# force reconfiguring
rm bfd/Makefile
make %{?_smp_mflags}
make %{?_smp_mflags} V=1
%if "%{TARGET}" == "avr"
# build an extra nesC version because nesC requires $'s in identifiers
cp -a gas gas-nesc
@ -431,26 +426,25 @@ cd build-dir
%if 0%{!?cross:1}
# installing native binutils
%ifarch %gold_archs
make DESTDIR=$RPM_BUILD_ROOT install-gold
ln -sf ld.gold $RPM_BUILD_ROOT%{_bindir}/gold
make DESTDIR=%{buildroot} install-gold
ln -sf ld.gold %{buildroot}%{_bindir}/gold
%endif
make DESTDIR=$RPM_BUILD_ROOT install-info install
make -C gas/doc DESTDIR=$RPM_BUILD_ROOT install-info-am install-am
make DESTDIR=$RPM_BUILD_ROOT install-bfd install-opcodes
if [ ! -f "%buildroot/%_bindir/ld.bfd" ]; then
mv "%buildroot/%_bindir"/{ld,ld.bfd};
make DESTDIR=%{buildroot} install-info install
make DESTDIR=%{buildroot} install-bfd install-opcodes
if [ ! -f "%{buildroot}/%_bindir/ld.bfd" ]; then
mv "%{buildroot}/%_bindir"/{ld,ld.bfd};
else
rm -f "%buildroot/%_bindir/ld";
rm -f "%{buildroot}/%_bindir/ld";
fi
%if ! 0%{with libalternatives}
mkdir -p "%buildroot/%_sysconfdir/alternatives";
mkdir -p "%{buildroot}/%_sysconfdir/alternatives";
# Keep older versions of brp-symlink happy
%if %{suse_version} < 1310
ln -s "%_bindir/ld" "%buildroot/%_sysconfdir/alternatives/ld"
ln -s "%_bindir/ld" "%{buildroot}/%_sysconfdir/alternatives/ld"
%endif
ln -s "%_sysconfdir/alternatives/ld" "%buildroot/%_bindir/ld";
ln -s "%_sysconfdir/alternatives/ld" "%{buildroot}/%_bindir/ld";
%else
ln -s %{_bindir}/alts "%buildroot/%_bindir/ld";
ln -s %{_bindir}/alts "%{buildroot}/%_bindir/ld";
mkdir -p %{buildroot}%{_datadir}/libalternatives/ld;
cat > %{buildroot}%{_datadir}/libalternatives/ld/1.conf <<EOF
binary=%{_bindir}/ld.gold
@ -460,24 +454,24 @@ binary=%{_bindir}/ld.bfd
EOF
%endif
rm -rf $RPM_BUILD_ROOT%{_prefix}/%{HOST}/bin
mkdir -p $RPM_BUILD_ROOT%{_prefix}/%{HOST}/bin
ln -sf ../../bin/{ar,as,ld,nm,ranlib,strip} $RPM_BUILD_ROOT%{_prefix}/%{HOST}/bin
mv $RPM_BUILD_ROOT%{_prefix}/%{HOST}/lib/ldscripts $RPM_BUILD_ROOT%{_libdir}
ln -sf ../../%{_lib}/ldscripts $RPM_BUILD_ROOT%{_prefix}/%{HOST}/lib/ldscripts
rm -rf %{buildroot}%{_prefix}/%{HOST}/bin
mkdir -p %{buildroot}%{_prefix}/%{HOST}/bin
ln -sf ../../bin/{ar,as,ld,nm,ranlib,strip} %{buildroot}%{_prefix}/%{HOST}/bin
mv %{buildroot}%{_prefix}/%{HOST}/lib/ldscripts $RPM_BUILD_ROOT%{_libdir}
ln -sf ../../%{_lib}/ldscripts %{buildroot}%{_prefix}/%{HOST}/lib/ldscripts
# Install header files
make -C libiberty install_to_libdir target_header_dir=/usr/include DESTDIR=$RPM_BUILD_ROOT
make -C libiberty install_to_libdir target_header_dir=/usr/include DESTDIR=%{buildroot}
# We want the PIC libiberty.a
install -m 644 libiberty/pic/libiberty.a $RPM_BUILD_ROOT%{_libdir}
install -m 644 libiberty/pic/libiberty.a %{buildroot}%{_libdir}
#
chmod a+x $RPM_BUILD_ROOT%{_libdir}/libbfd-*
chmod a+x $RPM_BUILD_ROOT%{_libdir}/libopcodes-*
chmod a+x %{buildroot}%{_libdir}/libbfd-*
chmod a+x %{buildroot}%{_libdir}/libopcodes-*
# No shared linking outside binutils
rm $RPM_BUILD_ROOT%{_libdir}/lib{bfd,opcodes}.so
rm $RPM_BUILD_ROOT%{_libdir}/lib{bfd,opcodes}.la
rm %{buildroot}%{_libdir}/lib{bfd,opcodes}.so
rm %{buildroot}%{_libdir}/lib{bfd,opcodes,ctf,ctf-nobfd}.la
# Remove unwanted files to shut up rpm
rm -f $RPM_BUILD_ROOT%{_infodir}/configure* $RPM_BUILD_ROOT%{_infodir}/standards.info*
rm -f $RPM_BUILD_ROOT%{_mandir}/man1/dlltool.1 $RPM_BUILD_ROOT%{_mandir}/man1/windres.1 $RPM_BUILD_ROOT%{_mandir}/man1/windmc.1
rm -f %{buildroot}%{_infodir}/configure* $RPM_BUILD_ROOT%{_infodir}/standards.info*
rm -f %{buildroot}%{_mandir}/man1/dlltool.1 $RPM_BUILD_ROOT%{_mandir}/man1/windres.1 $RPM_BUILD_ROOT%{_mandir}/man1/windmc.1
cd ..
%find_lang binutils
%find_lang bfd binutils.lang
@ -488,45 +482,47 @@ cd ..
%ifarch %gold_archs
%find_lang gold binutils-gold.lang
%endif
mkdir -p $RPM_BUILD_ROOT%{_docdir}/%{name}
install -m 644 binutils/NEWS $RPM_BUILD_ROOT%{_docdir}/%{name}/NEWS-binutils
install -m 644 gas/NEWS $RPM_BUILD_ROOT%{_docdir}/%{name}/NEWS-gas
install -m 644 ld/NEWS $RPM_BUILD_ROOT%{_docdir}/%{name}/NEWS-ld
mkdir -p %{buildroot}%{_docdir}/%{name}
install -m 644 binutils/NEWS %{buildroot}%{_docdir}/%{name}/NEWS-binutils
install -m 644 gas/NEWS %{buildroot}%{_docdir}/%{name}/NEWS-gas
install -m 644 ld/NEWS %{buildroot}%{_docdir}/%{name}/NEWS-ld
%else
# installing cross-TARGET-binutils and TARGET-binutils
make DESTDIR=$RPM_BUILD_ROOT install
make DESTDIR=%{buildroot} install
# Replace hard links by symlinks, so that rpmlint doesn't complain
T=$(basename %buildroot/usr/%{TARGET_OS})
for f in %buildroot/usr/$T/bin/* ; do
T=$(basename %{buildroot}/usr/%{TARGET_OS})
for f in %{buildroot}/usr/$T/bin/* ; do
ln -sf /usr/bin/$T-$(basename $f) $f
done
%if "%{TARGET}" == "arm"
# Instead of building duplicate binutils, add symlinks
for f in %buildroot/usr/$T/bin/* ; do
for f in %{buildroot}%{_bindir}/${T}-* ; do
_toolname=${f##$(dirname $f)/${T}-}
for p in arm-none-eabi; do
ln -sf %{_bindir}/$T-$(basename $f) %buildroot%{_bindir}/$p-$(basename $f)
ln -sf %{_bindir}/$T-${_toolname} %{buildroot}%{_bindir}/$p-${_toolname}
done
done
%endif
%if "%{TARGET}" == "riscv64"
# Instead of building duplicate binutils, add symlinks
for f in %buildroot/usr/$T/bin/* ; do
for f in %{buildroot}/usr/$T/bin/* ; do
for p in riscv64-elf; do
ln -sf %{_bindir}/$T-$(basename $f) %buildroot%{_bindir}/$p-$(basename $f)
ln -sf %{_bindir}/$T-$(basename $f) %{buildroot}%{_bindir}/$p-$(basename $f)
done
done
%endif
%if "%{TARGET}" == "avr"
install -c gas-nesc/as-new $RPM_BUILD_ROOT%{_prefix}/bin/%{TARGET_OS}-nesc-as
ln -sf ../../bin/%{TARGET_OS}-nesc-as $RPM_BUILD_ROOT%{_prefix}/%{TARGET_OS}/bin/nesc-as
install -c gas-nesc/as-new %{buildroot}%{_prefix}/bin/%{TARGET_OS}-nesc-as
ln -sf ../../bin/%{TARGET_OS}-nesc-as %{buildroot}%{_prefix}/%{TARGET_OS}/bin/nesc-as
%endif
rm -rf $RPM_BUILD_ROOT%{_mandir}
rm -rf $RPM_BUILD_ROOT%{_infodir}
rm -rf $RPM_BUILD_ROOT%{_prefix}/lib*
rm -rf $RPM_BUILD_ROOT%{_prefix}/include
rm -f $RPM_BUILD_ROOT%{_prefix}/bin/*-c++filt
rm -rf %{buildroot}%{_mandir}
rm -rf %{buildroot}%{_infodir}
rm -rf %{buildroot}%{_prefix}/lib*
rm -rf %{buildroot}%{_prefix}/include
rm -f %{buildroot}%{_prefix}/bin/*-c++filt
> ../binutils.lang
%endif
%fdupes %{buildroot}%{_prefix}
%if 0%{!?cross:1}
%post
@ -586,8 +582,7 @@ fi;
%postun -n libctf0 -p /sbin/ldconfig
%postun -n libctf-nobfd0 -p /sbin/ldconfig
%postun
/sbin/ldconfig
%postun -p /sbin/ldconfig
%endif
%files -f binutils.lang
@ -641,9 +636,11 @@ fi;
%{_libdir}/libctf-nobfd.so
%files -n libctf0
%defattr(-,root,root)
%{_libdir}/libctf.so.*
%files -n libctf-nobfd0
%defattr(-,root,root)
%{_libdir}/libctf-nobfd.so.*
%endif

View File

@ -1,3 +1,106 @@
-------------------------------------------------------------------
Fri Mar 4 10:44:39 UTC 2022 - Martin Liška <mliska@suse.cz>
- Update binutils-2.38-branch.diff.gz in order to include PR28879.
-------------------------------------------------------------------
Tue Mar 1 12:41:27 UTC 2022 - Michael Matz <matz@suse.com>
- From Stefan Brüns <stefan.bruens@rwth-aachen.de>:
* Install symlinks for all target specific tools on
arm-eabi-none [bsc#1185712]
-------------------------------------------------------------------
Thu Feb 24 09:10:44 UTC 2022 - Martin Liška <mliska@suse.cz>
- Do not re-generate ld/ldlex.c, ld/ldgram.c, ld/ldgram.h and verify
that corresponding flex/bison files are not modified by a patch.
-------------------------------------------------------------------
Thu Feb 24 06:55:14 UTC 2022 - Martin Liška <mliska@suse.cz>
- Use verbose mode for make for cross compilers.
-------------------------------------------------------------------
Wed Feb 23 17:52:15 UTC 2022 - Michael Matz <matz@suse.com>
- Make it build on SLE-11 again.
-------------------------------------------------------------------
Tue Feb 22 09:13:15 UTC 2022 - Martin Liška <mliska@suse.cz>
- Use verbose mode for make.
-------------------------------------------------------------------
Sat Feb 12 19:13:31 UTC 2022 - Martin Liška <mliska@suse.cz>
- Update to binutils 2.38:
* elfedit: Add --output-abiversion option to update ABIVERSION.
* Add support for the LoongArch instruction set.
* Tools which display symbols or strings (readelf, strings, nm, objdump)
have a new command line option which controls how unicode characters are
handled. By default they are treated as normal for the tool. Using
--unicode=locale will display them according to the current locale.
Using --unicode=hex will display them as hex byte values, whilst
--unicode=escape will display them as escape sequences. In addition
using --unicode=highlight will display them as unicode escape sequences
highlighted in red (if supported by the output device).
* readelf -r dumps RELR relative relocations now.
* Support for efi-app-aarch64, efi-rtdrv-aarch64 and efi-bsdrv-aarch64 has been
added to objcopy in order to enable UEFI development using binutils.
* ar: Add --thin for creating thin archives. -T is a deprecated alias without
diagnostics. In many ar implementations -T has a different meaning, as
specified by X/Open System Interface.
* Add support for AArch64 system registers that were missing in previous
releases.
* Add support for the LoongArch instruction set.
* Add a command-line option, -muse-unaligned-vector-move, for x86 target
to encode aligned vector move as unaligned vector move.
* Add support for Cortex-R52+ for Arm.
* Add support for Cortex-A510, Cortex-A710, Cortex-X2 for AArch64.
* Add support for Cortex-A710 for Arm.
* Add support for Scalable Matrix Extension (SME) for AArch64.
* The --multibyte-handling=[allow|warn|warn-sym-only] option tells the
assembler what to when it encoutners multibyte characters in the input. The
default is to allow them. Setting the option to "warn" will generate a
warning message whenever any multibyte character is encountered. Using the
option to "warn-sym-only" will make the assembler generate a warning whenever a
symbol is defined containing multibyte characters. (References to undefined
symbols will not generate warnings).
* Outputs of .ds.x directive and .tfloat directive with hex input from
x86 assembler have been reduced from 12 bytes to 10 bytes to match the
output of .tfloat directive.
* Add support for 'armv8.8-a', 'armv9-a', 'armv9.1-a', 'armv9.2-a' and
'armv9.3-a' for -march in AArch64 GAS.
* Add support for 'armv8.7-a', 'armv8.8-a', 'armv9-a', 'armv9.1-a',
'armv9.2-a' and 'armv9.3-a' for -march in Arm GAS.
* Add support for Intel AVX512_FP16 instructions.
* Add -z pack-relative-relocs/-z no pack-relative-relocs to x86 ELF
linker to pack relative relocations in the DT_RELR section.
* Add support for the LoongArch architecture.
* Add -z indirect-extern-access/-z noindirect-extern-access to x86 ELF
linker to control canonical function pointers and copy relocation.
* Add --max-cache-size=SIZE to set the the maximum cache size to SIZE
bytes.
- Add binutils-2.38-branch.diff.gz.
- Removed deletion of man pages as they should be properly packages
in tarball.
- Rebased patches: aarch64-common-pagesize.patch, add-ulp-section.diff,
binutils-bfd_h.patch, binutils-revert-nm-symversion.diff,
binutils-revert-plt32-in-branches.diff, binutils-skip-rpaths.patch
and binutils-compat-old-behaviour.diff.
-------------------------------------------------------------------
Fri Feb 4 13:13:20 UTC 2022 - Matwey Kornilov <matwey.kornilov@gmail.com>
- Enable PRU architecture for AM335x CPU (Beagle Bone Black board)
-------------------------------------------------------------------
Thu Jan 27 20:36:30 UTC 2022 - Dirk Müller <dmueller@suse.com>
- use fdupes on datadir
- remove RPM_BUILD_ROOT usage and other cleanups
-------------------------------------------------------------------
Fri Nov 12 13:20:09 UTC 2021 - Martin Liška <mliska@suse.cz>

View File

@ -1,7 +1,7 @@
#
# spec file for package cross-ppc-binutils
#
# Copyright (c) 2021 SUSE LLC
# Copyright (c) 2022 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@ -23,6 +23,7 @@ ExcludeArch: ppc
BuildRequires: bc
BuildRequires: bison
BuildRequires: dejagnu
BuildRequires: fdupes
BuildRequires: flex
BuildRequires: gcc-c++
# for the testsuite
@ -37,7 +38,7 @@ BuildRequires: zlib-devel-static
%else
BuildRequires: zlib-devel
%endif
Version: 2.37
Version: 2.38
Release: 0
# disable libalternatives for now until it's changed to not
@ -75,7 +76,7 @@ Release: 0
%else
%define build_multitarget 0
%endif
%define target_list aarch64 alpha armv5l armv6l armv7l armv8l avr epiphany hppa hppa64 i686 ia64 m68k mips powerpc powerpc64 powerpc64le riscv64 rx s390 s390x sh4 sparc sparc64 x86_64 xtensa
%define target_list aarch64 alpha armv5l armv6l armv7l armv8l avr pru epiphany hppa hppa64 i686 ia64 m68k mips powerpc powerpc64 powerpc64le riscv64 rx s390 s390x sh4 sparc sparc64 x86_64 xtensa
#
#
#
@ -95,7 +96,7 @@ Source5: binutils.keyring
Source1: pre_checkin.sh
Source2: README.First-for.SUSE.packagers
Source3: baselibs.conf
Patch1: binutils-2.37-branch.diff.gz
Patch1: binutils-2.38-branch.diff.gz
Patch3: binutils-skip-rpaths.patch
Patch4: s390-biarch.diff
Patch5: x86-64-biarch.patch
@ -141,7 +142,7 @@ Requires: alts
%else
PreReq: update-alternatives
%endif
%if 0%{!?cross:1}
%if 0%{!?cross:1} && 0%{?suse_version} >= 1310
%define gold_archs %ix86 aarch64 %arm x86_64 ppc ppc64 ppc64le s390x %sparc
%endif
@ -191,6 +192,11 @@ The Compact C Type Format (CTF) is a way of representing information about a bin
%prep
echo "make check will return with %{make_check_handling} in case of testsuite failures."
%setup -q -n binutils-%{version}
# Backup flex and biscon files for later verification.
cp ld/ldlex.l ld/ldlex.l.orig
cp ld/ldgram.y ld/ldgram.y.orig
# Patch is outside test_vanilla because it's supposed to be the
# patch bringing the tarball to the newest upstream version
%patch1 -p1
@ -228,22 +234,11 @@ cp gas/config/tc-avr.h gas/config/tc-avr-nesc.h
#
# test_vanilla
%endif
# in parallel builds, when the flex or bison inputs are patched (possibly
# in the ...-branch.diff) it might happen that the dependency tracking
# of automake is confused and uses the old .c files from srcdir/ld/ while
# also generating the new .c files in builddir/ld leading to trouble.
# I haven't found the right entries to ensure this doesn't happen, so
# simply remove the intermediates
rm -f ld/ldlex.c
rm -f ld/ldgram.c ld/ldgram.h
# The 2.37 released tarball contains wrongly pre-generated (empty) man pages
# so we remove those here as well. Consider removing for later releases.
rm -f binutils/doc/*.1
rm -f binutils/doc/cxxfilt.man
rm -f gprof/*.1
rm -f gas/doc/*.1
rm -f ld/*.1
# Due to legacy flex version present in SLE-12 (and older), we cannot
# re-generate flex and bison files and so we verify that any patch modify these files.
diff -u ld/ldlex.l ld/ldlex.l.orig
diff -u ld/ldgram.y ld/ldgram.y.orig
%build
%define _lto_cflags %{nil}
@ -330,14 +325,14 @@ cd build-dir
# we patch headers (bfd-in.h) that are input to other headers
# which are generated only with --enable-maintainer-mode (which we
# don't do) or explicitely by make headers, so do this:
make %{?_smp_mflags} all-bfd TARGET-bfd=headers
make %{?_smp_mflags} all-bfd TARGET-bfd=headers V=1
# the above interacts with --enable-pgo-build=lto because all-bfd doesn't
# have the PGO handling, hence it's config.cache files are wrong
# remove all of those for reconfigure
rm */config.cache
# force reconfiguring
rm bfd/Makefile
make %{?_smp_mflags}
make %{?_smp_mflags} V=1
%else
# building cross-TARGET-binutils
@ -369,7 +364,7 @@ EXTRA_TARGETS="$EXTRA_TARGETS,arm-suse-linux-gnueabi"
%if "%{TARGET}" == "aarch64"
EXTRA_TARGETS="$EXTRA_TARGETS,aarch64-suse-linux"
%endif
%if "%{TARGET}" == "avr" || "%{TARGET}" == "spu"
%if "%{TARGET}" == "avr" || "%{TARGET}" == "spu" || "%{TARGET}" == "pru"
%define TARGET_OS %{TARGET}
%else
%if "%{TARGET}" == "epiphany" || "%{TARGET}" == "riscv32" || "%{TARGET}" == "rx"
@ -403,11 +398,11 @@ EXTRA_TARGETS="$EXTRA_TARGETS,aarch64-suse-linux"
--enable-default-hash-style=both \
%endif
${EXTRA_TARGETS:+--enable-targets="${EXTRA_TARGETS#,}"}
make %{?_smp_mflags} all-bfd TARGET-bfd=headers
make %{?_smp_mflags} all-bfd TARGET-bfd=headers V=1
rm */config.cache
# force reconfiguring
rm bfd/Makefile
make %{?_smp_mflags}
make %{?_smp_mflags} V=1
%if "%{TARGET}" == "avr"
# build an extra nesC version because nesC requires $'s in identifiers
cp -a gas gas-nesc
@ -431,26 +426,25 @@ cd build-dir
%if 0%{!?cross:1}
# installing native binutils
%ifarch %gold_archs
make DESTDIR=$RPM_BUILD_ROOT install-gold
ln -sf ld.gold $RPM_BUILD_ROOT%{_bindir}/gold
make DESTDIR=%{buildroot} install-gold
ln -sf ld.gold %{buildroot}%{_bindir}/gold
%endif
make DESTDIR=$RPM_BUILD_ROOT install-info install
make -C gas/doc DESTDIR=$RPM_BUILD_ROOT install-info-am install-am
make DESTDIR=$RPM_BUILD_ROOT install-bfd install-opcodes
if [ ! -f "%buildroot/%_bindir/ld.bfd" ]; then
mv "%buildroot/%_bindir"/{ld,ld.bfd};
make DESTDIR=%{buildroot} install-info install
make DESTDIR=%{buildroot} install-bfd install-opcodes
if [ ! -f "%{buildroot}/%_bindir/ld.bfd" ]; then
mv "%{buildroot}/%_bindir"/{ld,ld.bfd};
else
rm -f "%buildroot/%_bindir/ld";
rm -f "%{buildroot}/%_bindir/ld";
fi
%if ! 0%{with libalternatives}
mkdir -p "%buildroot/%_sysconfdir/alternatives";
mkdir -p "%{buildroot}/%_sysconfdir/alternatives";
# Keep older versions of brp-symlink happy
%if %{suse_version} < 1310
ln -s "%_bindir/ld" "%buildroot/%_sysconfdir/alternatives/ld"
ln -s "%_bindir/ld" "%{buildroot}/%_sysconfdir/alternatives/ld"
%endif
ln -s "%_sysconfdir/alternatives/ld" "%buildroot/%_bindir/ld";
ln -s "%_sysconfdir/alternatives/ld" "%{buildroot}/%_bindir/ld";
%else
ln -s %{_bindir}/alts "%buildroot/%_bindir/ld";
ln -s %{_bindir}/alts "%{buildroot}/%_bindir/ld";
mkdir -p %{buildroot}%{_datadir}/libalternatives/ld;
cat > %{buildroot}%{_datadir}/libalternatives/ld/1.conf <<EOF
binary=%{_bindir}/ld.gold
@ -460,24 +454,24 @@ binary=%{_bindir}/ld.bfd
EOF
%endif
rm -rf $RPM_BUILD_ROOT%{_prefix}/%{HOST}/bin
mkdir -p $RPM_BUILD_ROOT%{_prefix}/%{HOST}/bin
ln -sf ../../bin/{ar,as,ld,nm,ranlib,strip} $RPM_BUILD_ROOT%{_prefix}/%{HOST}/bin
mv $RPM_BUILD_ROOT%{_prefix}/%{HOST}/lib/ldscripts $RPM_BUILD_ROOT%{_libdir}
ln -sf ../../%{_lib}/ldscripts $RPM_BUILD_ROOT%{_prefix}/%{HOST}/lib/ldscripts
rm -rf %{buildroot}%{_prefix}/%{HOST}/bin
mkdir -p %{buildroot}%{_prefix}/%{HOST}/bin
ln -sf ../../bin/{ar,as,ld,nm,ranlib,strip} %{buildroot}%{_prefix}/%{HOST}/bin
mv %{buildroot}%{_prefix}/%{HOST}/lib/ldscripts $RPM_BUILD_ROOT%{_libdir}
ln -sf ../../%{_lib}/ldscripts %{buildroot}%{_prefix}/%{HOST}/lib/ldscripts
# Install header files
make -C libiberty install_to_libdir target_header_dir=/usr/include DESTDIR=$RPM_BUILD_ROOT
make -C libiberty install_to_libdir target_header_dir=/usr/include DESTDIR=%{buildroot}
# We want the PIC libiberty.a
install -m 644 libiberty/pic/libiberty.a $RPM_BUILD_ROOT%{_libdir}
install -m 644 libiberty/pic/libiberty.a %{buildroot}%{_libdir}
#
chmod a+x $RPM_BUILD_ROOT%{_libdir}/libbfd-*
chmod a+x $RPM_BUILD_ROOT%{_libdir}/libopcodes-*
chmod a+x %{buildroot}%{_libdir}/libbfd-*
chmod a+x %{buildroot}%{_libdir}/libopcodes-*
# No shared linking outside binutils
rm $RPM_BUILD_ROOT%{_libdir}/lib{bfd,opcodes}.so
rm $RPM_BUILD_ROOT%{_libdir}/lib{bfd,opcodes}.la
rm %{buildroot}%{_libdir}/lib{bfd,opcodes}.so
rm %{buildroot}%{_libdir}/lib{bfd,opcodes,ctf,ctf-nobfd}.la
# Remove unwanted files to shut up rpm
rm -f $RPM_BUILD_ROOT%{_infodir}/configure* $RPM_BUILD_ROOT%{_infodir}/standards.info*
rm -f $RPM_BUILD_ROOT%{_mandir}/man1/dlltool.1 $RPM_BUILD_ROOT%{_mandir}/man1/windres.1 $RPM_BUILD_ROOT%{_mandir}/man1/windmc.1
rm -f %{buildroot}%{_infodir}/configure* $RPM_BUILD_ROOT%{_infodir}/standards.info*
rm -f %{buildroot}%{_mandir}/man1/dlltool.1 $RPM_BUILD_ROOT%{_mandir}/man1/windres.1 $RPM_BUILD_ROOT%{_mandir}/man1/windmc.1
cd ..
%find_lang binutils
%find_lang bfd binutils.lang
@ -488,45 +482,47 @@ cd ..
%ifarch %gold_archs
%find_lang gold binutils-gold.lang
%endif
mkdir -p $RPM_BUILD_ROOT%{_docdir}/%{name}
install -m 644 binutils/NEWS $RPM_BUILD_ROOT%{_docdir}/%{name}/NEWS-binutils
install -m 644 gas/NEWS $RPM_BUILD_ROOT%{_docdir}/%{name}/NEWS-gas
install -m 644 ld/NEWS $RPM_BUILD_ROOT%{_docdir}/%{name}/NEWS-ld
mkdir -p %{buildroot}%{_docdir}/%{name}
install -m 644 binutils/NEWS %{buildroot}%{_docdir}/%{name}/NEWS-binutils
install -m 644 gas/NEWS %{buildroot}%{_docdir}/%{name}/NEWS-gas
install -m 644 ld/NEWS %{buildroot}%{_docdir}/%{name}/NEWS-ld
%else
# installing cross-TARGET-binutils and TARGET-binutils
make DESTDIR=$RPM_BUILD_ROOT install
make DESTDIR=%{buildroot} install
# Replace hard links by symlinks, so that rpmlint doesn't complain
T=$(basename %buildroot/usr/%{TARGET_OS})
for f in %buildroot/usr/$T/bin/* ; do
T=$(basename %{buildroot}/usr/%{TARGET_OS})
for f in %{buildroot}/usr/$T/bin/* ; do
ln -sf /usr/bin/$T-$(basename $f) $f
done
%if "%{TARGET}" == "arm"
# Instead of building duplicate binutils, add symlinks
for f in %buildroot/usr/$T/bin/* ; do
for f in %{buildroot}%{_bindir}/${T}-* ; do
_toolname=${f##$(dirname $f)/${T}-}
for p in arm-none-eabi; do
ln -sf %{_bindir}/$T-$(basename $f) %buildroot%{_bindir}/$p-$(basename $f)
ln -sf %{_bindir}/$T-${_toolname} %{buildroot}%{_bindir}/$p-${_toolname}
done
done
%endif
%if "%{TARGET}" == "riscv64"
# Instead of building duplicate binutils, add symlinks
for f in %buildroot/usr/$T/bin/* ; do
for f in %{buildroot}/usr/$T/bin/* ; do
for p in riscv64-elf; do
ln -sf %{_bindir}/$T-$(basename $f) %buildroot%{_bindir}/$p-$(basename $f)
ln -sf %{_bindir}/$T-$(basename $f) %{buildroot}%{_bindir}/$p-$(basename $f)
done
done
%endif
%if "%{TARGET}" == "avr"
install -c gas-nesc/as-new $RPM_BUILD_ROOT%{_prefix}/bin/%{TARGET_OS}-nesc-as
ln -sf ../../bin/%{TARGET_OS}-nesc-as $RPM_BUILD_ROOT%{_prefix}/%{TARGET_OS}/bin/nesc-as
install -c gas-nesc/as-new %{buildroot}%{_prefix}/bin/%{TARGET_OS}-nesc-as
ln -sf ../../bin/%{TARGET_OS}-nesc-as %{buildroot}%{_prefix}/%{TARGET_OS}/bin/nesc-as
%endif
rm -rf $RPM_BUILD_ROOT%{_mandir}
rm -rf $RPM_BUILD_ROOT%{_infodir}
rm -rf $RPM_BUILD_ROOT%{_prefix}/lib*
rm -rf $RPM_BUILD_ROOT%{_prefix}/include
rm -f $RPM_BUILD_ROOT%{_prefix}/bin/*-c++filt
rm -rf %{buildroot}%{_mandir}
rm -rf %{buildroot}%{_infodir}
rm -rf %{buildroot}%{_prefix}/lib*
rm -rf %{buildroot}%{_prefix}/include
rm -f %{buildroot}%{_prefix}/bin/*-c++filt
> ../binutils.lang
%endif
%fdupes %{buildroot}%{_prefix}
%if 0%{!?cross:1}
%post
@ -586,8 +582,7 @@ fi;
%postun -n libctf0 -p /sbin/ldconfig
%postun -n libctf-nobfd0 -p /sbin/ldconfig
%postun
/sbin/ldconfig
%postun -p /sbin/ldconfig
%endif
%files -f binutils.lang
@ -641,9 +636,11 @@ fi;
%{_libdir}/libctf-nobfd.so
%files -n libctf0
%defattr(-,root,root)
%{_libdir}/libctf.so.*
%files -n libctf-nobfd0
%defattr(-,root,root)
%{_libdir}/libctf-nobfd.so.*
%endif

View File

@ -1,3 +1,106 @@
-------------------------------------------------------------------
Fri Mar 4 10:44:39 UTC 2022 - Martin Liška <mliska@suse.cz>
- Update binutils-2.38-branch.diff.gz in order to include PR28879.
-------------------------------------------------------------------
Tue Mar 1 12:41:27 UTC 2022 - Michael Matz <matz@suse.com>
- From Stefan Brüns <stefan.bruens@rwth-aachen.de>:
* Install symlinks for all target specific tools on
arm-eabi-none [bsc#1185712]
-------------------------------------------------------------------
Thu Feb 24 09:10:44 UTC 2022 - Martin Liška <mliska@suse.cz>
- Do not re-generate ld/ldlex.c, ld/ldgram.c, ld/ldgram.h and verify
that corresponding flex/bison files are not modified by a patch.
-------------------------------------------------------------------
Thu Feb 24 06:55:14 UTC 2022 - Martin Liška <mliska@suse.cz>
- Use verbose mode for make for cross compilers.
-------------------------------------------------------------------
Wed Feb 23 17:52:15 UTC 2022 - Michael Matz <matz@suse.com>
- Make it build on SLE-11 again.
-------------------------------------------------------------------
Tue Feb 22 09:13:15 UTC 2022 - Martin Liška <mliska@suse.cz>
- Use verbose mode for make.
-------------------------------------------------------------------
Sat Feb 12 19:13:31 UTC 2022 - Martin Liška <mliska@suse.cz>
- Update to binutils 2.38:
* elfedit: Add --output-abiversion option to update ABIVERSION.
* Add support for the LoongArch instruction set.
* Tools which display symbols or strings (readelf, strings, nm, objdump)
have a new command line option which controls how unicode characters are
handled. By default they are treated as normal for the tool. Using
--unicode=locale will display them according to the current locale.
Using --unicode=hex will display them as hex byte values, whilst
--unicode=escape will display them as escape sequences. In addition
using --unicode=highlight will display them as unicode escape sequences
highlighted in red (if supported by the output device).
* readelf -r dumps RELR relative relocations now.
* Support for efi-app-aarch64, efi-rtdrv-aarch64 and efi-bsdrv-aarch64 has been
added to objcopy in order to enable UEFI development using binutils.
* ar: Add --thin for creating thin archives. -T is a deprecated alias without
diagnostics. In many ar implementations -T has a different meaning, as
specified by X/Open System Interface.
* Add support for AArch64 system registers that were missing in previous
releases.
* Add support for the LoongArch instruction set.
* Add a command-line option, -muse-unaligned-vector-move, for x86 target
to encode aligned vector move as unaligned vector move.
* Add support for Cortex-R52+ for Arm.
* Add support for Cortex-A510, Cortex-A710, Cortex-X2 for AArch64.
* Add support for Cortex-A710 for Arm.
* Add support for Scalable Matrix Extension (SME) for AArch64.
* The --multibyte-handling=[allow|warn|warn-sym-only] option tells the
assembler what to when it encoutners multibyte characters in the input. The
default is to allow them. Setting the option to "warn" will generate a
warning message whenever any multibyte character is encountered. Using the
option to "warn-sym-only" will make the assembler generate a warning whenever a
symbol is defined containing multibyte characters. (References to undefined
symbols will not generate warnings).
* Outputs of .ds.x directive and .tfloat directive with hex input from
x86 assembler have been reduced from 12 bytes to 10 bytes to match the
output of .tfloat directive.
* Add support for 'armv8.8-a', 'armv9-a', 'armv9.1-a', 'armv9.2-a' and
'armv9.3-a' for -march in AArch64 GAS.
* Add support for 'armv8.7-a', 'armv8.8-a', 'armv9-a', 'armv9.1-a',
'armv9.2-a' and 'armv9.3-a' for -march in Arm GAS.
* Add support for Intel AVX512_FP16 instructions.
* Add -z pack-relative-relocs/-z no pack-relative-relocs to x86 ELF
linker to pack relative relocations in the DT_RELR section.
* Add support for the LoongArch architecture.
* Add -z indirect-extern-access/-z noindirect-extern-access to x86 ELF
linker to control canonical function pointers and copy relocation.
* Add --max-cache-size=SIZE to set the the maximum cache size to SIZE
bytes.
- Add binutils-2.38-branch.diff.gz.
- Removed deletion of man pages as they should be properly packages
in tarball.
- Rebased patches: aarch64-common-pagesize.patch, add-ulp-section.diff,
binutils-bfd_h.patch, binutils-revert-nm-symversion.diff,
binutils-revert-plt32-in-branches.diff, binutils-skip-rpaths.patch
and binutils-compat-old-behaviour.diff.
-------------------------------------------------------------------
Fri Feb 4 13:13:20 UTC 2022 - Matwey Kornilov <matwey.kornilov@gmail.com>
- Enable PRU architecture for AM335x CPU (Beagle Bone Black board)
-------------------------------------------------------------------
Thu Jan 27 20:36:30 UTC 2022 - Dirk Müller <dmueller@suse.com>
- use fdupes on datadir
- remove RPM_BUILD_ROOT usage and other cleanups
-------------------------------------------------------------------
Fri Nov 12 13:20:09 UTC 2021 - Martin Liška <mliska@suse.cz>

View File

@ -1,7 +1,7 @@
#
# spec file for package cross-ppc64-binutils
#
# Copyright (c) 2021 SUSE LLC
# Copyright (c) 2022 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@ -23,6 +23,7 @@ ExcludeArch: ppc64
BuildRequires: bc
BuildRequires: bison
BuildRequires: dejagnu
BuildRequires: fdupes
BuildRequires: flex
BuildRequires: gcc-c++
# for the testsuite
@ -37,7 +38,7 @@ BuildRequires: zlib-devel-static
%else
BuildRequires: zlib-devel
%endif
Version: 2.37
Version: 2.38
Release: 0
# disable libalternatives for now until it's changed to not
@ -75,7 +76,7 @@ Release: 0
%else
%define build_multitarget 0
%endif
%define target_list aarch64 alpha armv5l armv6l armv7l armv8l avr epiphany hppa hppa64 i686 ia64 m68k mips powerpc powerpc64 powerpc64le riscv64 rx s390 s390x sh4 sparc sparc64 x86_64 xtensa
%define target_list aarch64 alpha armv5l armv6l armv7l armv8l avr pru epiphany hppa hppa64 i686 ia64 m68k mips powerpc powerpc64 powerpc64le riscv64 rx s390 s390x sh4 sparc sparc64 x86_64 xtensa
#
#
#
@ -95,7 +96,7 @@ Source5: binutils.keyring
Source1: pre_checkin.sh
Source2: README.First-for.SUSE.packagers
Source3: baselibs.conf
Patch1: binutils-2.37-branch.diff.gz
Patch1: binutils-2.38-branch.diff.gz
Patch3: binutils-skip-rpaths.patch
Patch4: s390-biarch.diff
Patch5: x86-64-biarch.patch
@ -141,7 +142,7 @@ Requires: alts
%else
PreReq: update-alternatives
%endif
%if 0%{!?cross:1}
%if 0%{!?cross:1} && 0%{?suse_version} >= 1310
%define gold_archs %ix86 aarch64 %arm x86_64 ppc ppc64 ppc64le s390x %sparc
%endif
@ -191,6 +192,11 @@ The Compact C Type Format (CTF) is a way of representing information about a bin
%prep
echo "make check will return with %{make_check_handling} in case of testsuite failures."
%setup -q -n binutils-%{version}
# Backup flex and biscon files for later verification.
cp ld/ldlex.l ld/ldlex.l.orig
cp ld/ldgram.y ld/ldgram.y.orig
# Patch is outside test_vanilla because it's supposed to be the
# patch bringing the tarball to the newest upstream version
%patch1 -p1
@ -228,22 +234,11 @@ cp gas/config/tc-avr.h gas/config/tc-avr-nesc.h
#
# test_vanilla
%endif
# in parallel builds, when the flex or bison inputs are patched (possibly
# in the ...-branch.diff) it might happen that the dependency tracking
# of automake is confused and uses the old .c files from srcdir/ld/ while
# also generating the new .c files in builddir/ld leading to trouble.
# I haven't found the right entries to ensure this doesn't happen, so
# simply remove the intermediates
rm -f ld/ldlex.c
rm -f ld/ldgram.c ld/ldgram.h
# The 2.37 released tarball contains wrongly pre-generated (empty) man pages
# so we remove those here as well. Consider removing for later releases.
rm -f binutils/doc/*.1
rm -f binutils/doc/cxxfilt.man
rm -f gprof/*.1
rm -f gas/doc/*.1
rm -f ld/*.1
# Due to legacy flex version present in SLE-12 (and older), we cannot
# re-generate flex and bison files and so we verify that any patch modify these files.
diff -u ld/ldlex.l ld/ldlex.l.orig
diff -u ld/ldgram.y ld/ldgram.y.orig
%build
%define _lto_cflags %{nil}
@ -330,14 +325,14 @@ cd build-dir
# we patch headers (bfd-in.h) that are input to other headers
# which are generated only with --enable-maintainer-mode (which we
# don't do) or explicitely by make headers, so do this:
make %{?_smp_mflags} all-bfd TARGET-bfd=headers
make %{?_smp_mflags} all-bfd TARGET-bfd=headers V=1
# the above interacts with --enable-pgo-build=lto because all-bfd doesn't
# have the PGO handling, hence it's config.cache files are wrong
# remove all of those for reconfigure
rm */config.cache
# force reconfiguring
rm bfd/Makefile
make %{?_smp_mflags}
make %{?_smp_mflags} V=1
%else
# building cross-TARGET-binutils
@ -369,7 +364,7 @@ EXTRA_TARGETS="$EXTRA_TARGETS,arm-suse-linux-gnueabi"
%if "%{TARGET}" == "aarch64"
EXTRA_TARGETS="$EXTRA_TARGETS,aarch64-suse-linux"
%endif
%if "%{TARGET}" == "avr" || "%{TARGET}" == "spu"
%if "%{TARGET}" == "avr" || "%{TARGET}" == "spu" || "%{TARGET}" == "pru"
%define TARGET_OS %{TARGET}
%else
%if "%{TARGET}" == "epiphany" || "%{TARGET}" == "riscv32" || "%{TARGET}" == "rx"
@ -403,11 +398,11 @@ EXTRA_TARGETS="$EXTRA_TARGETS,aarch64-suse-linux"
--enable-default-hash-style=both \
%endif
${EXTRA_TARGETS:+--enable-targets="${EXTRA_TARGETS#,}"}
make %{?_smp_mflags} all-bfd TARGET-bfd=headers
make %{?_smp_mflags} all-bfd TARGET-bfd=headers V=1
rm */config.cache
# force reconfiguring
rm bfd/Makefile
make %{?_smp_mflags}
make %{?_smp_mflags} V=1
%if "%{TARGET}" == "avr"
# build an extra nesC version because nesC requires $'s in identifiers
cp -a gas gas-nesc
@ -431,26 +426,25 @@ cd build-dir
%if 0%{!?cross:1}
# installing native binutils
%ifarch %gold_archs
make DESTDIR=$RPM_BUILD_ROOT install-gold
ln -sf ld.gold $RPM_BUILD_ROOT%{_bindir}/gold
make DESTDIR=%{buildroot} install-gold
ln -sf ld.gold %{buildroot}%{_bindir}/gold
%endif
make DESTDIR=$RPM_BUILD_ROOT install-info install
make -C gas/doc DESTDIR=$RPM_BUILD_ROOT install-info-am install-am
make DESTDIR=$RPM_BUILD_ROOT install-bfd install-opcodes
if [ ! -f "%buildroot/%_bindir/ld.bfd" ]; then
mv "%buildroot/%_bindir"/{ld,ld.bfd};
make DESTDIR=%{buildroot} install-info install
make DESTDIR=%{buildroot} install-bfd install-opcodes
if [ ! -f "%{buildroot}/%_bindir/ld.bfd" ]; then
mv "%{buildroot}/%_bindir"/{ld,ld.bfd};
else
rm -f "%buildroot/%_bindir/ld";
rm -f "%{buildroot}/%_bindir/ld";
fi
%if ! 0%{with libalternatives}
mkdir -p "%buildroot/%_sysconfdir/alternatives";
mkdir -p "%{buildroot}/%_sysconfdir/alternatives";
# Keep older versions of brp-symlink happy
%if %{suse_version} < 1310
ln -s "%_bindir/ld" "%buildroot/%_sysconfdir/alternatives/ld"
ln -s "%_bindir/ld" "%{buildroot}/%_sysconfdir/alternatives/ld"
%endif
ln -s "%_sysconfdir/alternatives/ld" "%buildroot/%_bindir/ld";
ln -s "%_sysconfdir/alternatives/ld" "%{buildroot}/%_bindir/ld";
%else
ln -s %{_bindir}/alts "%buildroot/%_bindir/ld";
ln -s %{_bindir}/alts "%{buildroot}/%_bindir/ld";
mkdir -p %{buildroot}%{_datadir}/libalternatives/ld;
cat > %{buildroot}%{_datadir}/libalternatives/ld/1.conf <<EOF
binary=%{_bindir}/ld.gold
@ -460,24 +454,24 @@ binary=%{_bindir}/ld.bfd
EOF
%endif
rm -rf $RPM_BUILD_ROOT%{_prefix}/%{HOST}/bin
mkdir -p $RPM_BUILD_ROOT%{_prefix}/%{HOST}/bin
ln -sf ../../bin/{ar,as,ld,nm,ranlib,strip} $RPM_BUILD_ROOT%{_prefix}/%{HOST}/bin
mv $RPM_BUILD_ROOT%{_prefix}/%{HOST}/lib/ldscripts $RPM_BUILD_ROOT%{_libdir}
ln -sf ../../%{_lib}/ldscripts $RPM_BUILD_ROOT%{_prefix}/%{HOST}/lib/ldscripts
rm -rf %{buildroot}%{_prefix}/%{HOST}/bin
mkdir -p %{buildroot}%{_prefix}/%{HOST}/bin
ln -sf ../../bin/{ar,as,ld,nm,ranlib,strip} %{buildroot}%{_prefix}/%{HOST}/bin
mv %{buildroot}%{_prefix}/%{HOST}/lib/ldscripts $RPM_BUILD_ROOT%{_libdir}
ln -sf ../../%{_lib}/ldscripts %{buildroot}%{_prefix}/%{HOST}/lib/ldscripts
# Install header files
make -C libiberty install_to_libdir target_header_dir=/usr/include DESTDIR=$RPM_BUILD_ROOT
make -C libiberty install_to_libdir target_header_dir=/usr/include DESTDIR=%{buildroot}
# We want the PIC libiberty.a
install -m 644 libiberty/pic/libiberty.a $RPM_BUILD_ROOT%{_libdir}
install -m 644 libiberty/pic/libiberty.a %{buildroot}%{_libdir}
#
chmod a+x $RPM_BUILD_ROOT%{_libdir}/libbfd-*
chmod a+x $RPM_BUILD_ROOT%{_libdir}/libopcodes-*
chmod a+x %{buildroot}%{_libdir}/libbfd-*
chmod a+x %{buildroot}%{_libdir}/libopcodes-*
# No shared linking outside binutils
rm $RPM_BUILD_ROOT%{_libdir}/lib{bfd,opcodes}.so
rm $RPM_BUILD_ROOT%{_libdir}/lib{bfd,opcodes}.la
rm %{buildroot}%{_libdir}/lib{bfd,opcodes}.so
rm %{buildroot}%{_libdir}/lib{bfd,opcodes,ctf,ctf-nobfd}.la
# Remove unwanted files to shut up rpm
rm -f $RPM_BUILD_ROOT%{_infodir}/configure* $RPM_BUILD_ROOT%{_infodir}/standards.info*
rm -f $RPM_BUILD_ROOT%{_mandir}/man1/dlltool.1 $RPM_BUILD_ROOT%{_mandir}/man1/windres.1 $RPM_BUILD_ROOT%{_mandir}/man1/windmc.1
rm -f %{buildroot}%{_infodir}/configure* $RPM_BUILD_ROOT%{_infodir}/standards.info*
rm -f %{buildroot}%{_mandir}/man1/dlltool.1 $RPM_BUILD_ROOT%{_mandir}/man1/windres.1 $RPM_BUILD_ROOT%{_mandir}/man1/windmc.1
cd ..
%find_lang binutils
%find_lang bfd binutils.lang
@ -488,45 +482,47 @@ cd ..
%ifarch %gold_archs
%find_lang gold binutils-gold.lang
%endif
mkdir -p $RPM_BUILD_ROOT%{_docdir}/%{name}
install -m 644 binutils/NEWS $RPM_BUILD_ROOT%{_docdir}/%{name}/NEWS-binutils
install -m 644 gas/NEWS $RPM_BUILD_ROOT%{_docdir}/%{name}/NEWS-gas
install -m 644 ld/NEWS $RPM_BUILD_ROOT%{_docdir}/%{name}/NEWS-ld
mkdir -p %{buildroot}%{_docdir}/%{name}
install -m 644 binutils/NEWS %{buildroot}%{_docdir}/%{name}/NEWS-binutils
install -m 644 gas/NEWS %{buildroot}%{_docdir}/%{name}/NEWS-gas
install -m 644 ld/NEWS %{buildroot}%{_docdir}/%{name}/NEWS-ld
%else
# installing cross-TARGET-binutils and TARGET-binutils
make DESTDIR=$RPM_BUILD_ROOT install
make DESTDIR=%{buildroot} install
# Replace hard links by symlinks, so that rpmlint doesn't complain
T=$(basename %buildroot/usr/%{TARGET_OS})
for f in %buildroot/usr/$T/bin/* ; do
T=$(basename %{buildroot}/usr/%{TARGET_OS})
for f in %{buildroot}/usr/$T/bin/* ; do
ln -sf /usr/bin/$T-$(basename $f) $f
done
%if "%{TARGET}" == "arm"
# Instead of building duplicate binutils, add symlinks
for f in %buildroot/usr/$T/bin/* ; do
for f in %{buildroot}%{_bindir}/${T}-* ; do
_toolname=${f##$(dirname $f)/${T}-}
for p in arm-none-eabi; do
ln -sf %{_bindir}/$T-$(basename $f) %buildroot%{_bindir}/$p-$(basename $f)
ln -sf %{_bindir}/$T-${_toolname} %{buildroot}%{_bindir}/$p-${_toolname}
done
done
%endif
%if "%{TARGET}" == "riscv64"
# Instead of building duplicate binutils, add symlinks
for f in %buildroot/usr/$T/bin/* ; do
for f in %{buildroot}/usr/$T/bin/* ; do
for p in riscv64-elf; do
ln -sf %{_bindir}/$T-$(basename $f) %buildroot%{_bindir}/$p-$(basename $f)
ln -sf %{_bindir}/$T-$(basename $f) %{buildroot}%{_bindir}/$p-$(basename $f)
done
done
%endif
%if "%{TARGET}" == "avr"
install -c gas-nesc/as-new $RPM_BUILD_ROOT%{_prefix}/bin/%{TARGET_OS}-nesc-as
ln -sf ../../bin/%{TARGET_OS}-nesc-as $RPM_BUILD_ROOT%{_prefix}/%{TARGET_OS}/bin/nesc-as
install -c gas-nesc/as-new %{buildroot}%{_prefix}/bin/%{TARGET_OS}-nesc-as
ln -sf ../../bin/%{TARGET_OS}-nesc-as %{buildroot}%{_prefix}/%{TARGET_OS}/bin/nesc-as
%endif
rm -rf $RPM_BUILD_ROOT%{_mandir}
rm -rf $RPM_BUILD_ROOT%{_infodir}
rm -rf $RPM_BUILD_ROOT%{_prefix}/lib*
rm -rf $RPM_BUILD_ROOT%{_prefix}/include
rm -f $RPM_BUILD_ROOT%{_prefix}/bin/*-c++filt
rm -rf %{buildroot}%{_mandir}
rm -rf %{buildroot}%{_infodir}
rm -rf %{buildroot}%{_prefix}/lib*
rm -rf %{buildroot}%{_prefix}/include
rm -f %{buildroot}%{_prefix}/bin/*-c++filt
> ../binutils.lang
%endif
%fdupes %{buildroot}%{_prefix}
%if 0%{!?cross:1}
%post
@ -586,8 +582,7 @@ fi;
%postun -n libctf0 -p /sbin/ldconfig
%postun -n libctf-nobfd0 -p /sbin/ldconfig
%postun
/sbin/ldconfig
%postun -p /sbin/ldconfig
%endif
%files -f binutils.lang
@ -641,9 +636,11 @@ fi;
%{_libdir}/libctf-nobfd.so
%files -n libctf0
%defattr(-,root,root)
%{_libdir}/libctf.so.*
%files -n libctf-nobfd0
%defattr(-,root,root)
%{_libdir}/libctf-nobfd.so.*
%endif

View File

@ -1,3 +1,106 @@
-------------------------------------------------------------------
Fri Mar 4 10:44:39 UTC 2022 - Martin Liška <mliska@suse.cz>
- Update binutils-2.38-branch.diff.gz in order to include PR28879.
-------------------------------------------------------------------
Tue Mar 1 12:41:27 UTC 2022 - Michael Matz <matz@suse.com>
- From Stefan Brüns <stefan.bruens@rwth-aachen.de>:
* Install symlinks for all target specific tools on
arm-eabi-none [bsc#1185712]
-------------------------------------------------------------------
Thu Feb 24 09:10:44 UTC 2022 - Martin Liška <mliska@suse.cz>
- Do not re-generate ld/ldlex.c, ld/ldgram.c, ld/ldgram.h and verify
that corresponding flex/bison files are not modified by a patch.
-------------------------------------------------------------------
Thu Feb 24 06:55:14 UTC 2022 - Martin Liška <mliska@suse.cz>
- Use verbose mode for make for cross compilers.
-------------------------------------------------------------------
Wed Feb 23 17:52:15 UTC 2022 - Michael Matz <matz@suse.com>
- Make it build on SLE-11 again.
-------------------------------------------------------------------
Tue Feb 22 09:13:15 UTC 2022 - Martin Liška <mliska@suse.cz>
- Use verbose mode for make.
-------------------------------------------------------------------
Sat Feb 12 19:13:31 UTC 2022 - Martin Liška <mliska@suse.cz>
- Update to binutils 2.38:
* elfedit: Add --output-abiversion option to update ABIVERSION.
* Add support for the LoongArch instruction set.
* Tools which display symbols or strings (readelf, strings, nm, objdump)
have a new command line option which controls how unicode characters are
handled. By default they are treated as normal for the tool. Using
--unicode=locale will display them according to the current locale.
Using --unicode=hex will display them as hex byte values, whilst
--unicode=escape will display them as escape sequences. In addition
using --unicode=highlight will display them as unicode escape sequences
highlighted in red (if supported by the output device).
* readelf -r dumps RELR relative relocations now.
* Support for efi-app-aarch64, efi-rtdrv-aarch64 and efi-bsdrv-aarch64 has been
added to objcopy in order to enable UEFI development using binutils.
* ar: Add --thin for creating thin archives. -T is a deprecated alias without
diagnostics. In many ar implementations -T has a different meaning, as
specified by X/Open System Interface.
* Add support for AArch64 system registers that were missing in previous
releases.
* Add support for the LoongArch instruction set.
* Add a command-line option, -muse-unaligned-vector-move, for x86 target
to encode aligned vector move as unaligned vector move.
* Add support for Cortex-R52+ for Arm.
* Add support for Cortex-A510, Cortex-A710, Cortex-X2 for AArch64.
* Add support for Cortex-A710 for Arm.
* Add support for Scalable Matrix Extension (SME) for AArch64.
* The --multibyte-handling=[allow|warn|warn-sym-only] option tells the
assembler what to when it encoutners multibyte characters in the input. The
default is to allow them. Setting the option to "warn" will generate a
warning message whenever any multibyte character is encountered. Using the
option to "warn-sym-only" will make the assembler generate a warning whenever a
symbol is defined containing multibyte characters. (References to undefined
symbols will not generate warnings).
* Outputs of .ds.x directive and .tfloat directive with hex input from
x86 assembler have been reduced from 12 bytes to 10 bytes to match the
output of .tfloat directive.
* Add support for 'armv8.8-a', 'armv9-a', 'armv9.1-a', 'armv9.2-a' and
'armv9.3-a' for -march in AArch64 GAS.
* Add support for 'armv8.7-a', 'armv8.8-a', 'armv9-a', 'armv9.1-a',
'armv9.2-a' and 'armv9.3-a' for -march in Arm GAS.
* Add support for Intel AVX512_FP16 instructions.
* Add -z pack-relative-relocs/-z no pack-relative-relocs to x86 ELF
linker to pack relative relocations in the DT_RELR section.
* Add support for the LoongArch architecture.
* Add -z indirect-extern-access/-z noindirect-extern-access to x86 ELF
linker to control canonical function pointers and copy relocation.
* Add --max-cache-size=SIZE to set the the maximum cache size to SIZE
bytes.
- Add binutils-2.38-branch.diff.gz.
- Removed deletion of man pages as they should be properly packages
in tarball.
- Rebased patches: aarch64-common-pagesize.patch, add-ulp-section.diff,
binutils-bfd_h.patch, binutils-revert-nm-symversion.diff,
binutils-revert-plt32-in-branches.diff, binutils-skip-rpaths.patch
and binutils-compat-old-behaviour.diff.
-------------------------------------------------------------------
Fri Feb 4 13:13:20 UTC 2022 - Matwey Kornilov <matwey.kornilov@gmail.com>
- Enable PRU architecture for AM335x CPU (Beagle Bone Black board)
-------------------------------------------------------------------
Thu Jan 27 20:36:30 UTC 2022 - Dirk Müller <dmueller@suse.com>
- use fdupes on datadir
- remove RPM_BUILD_ROOT usage and other cleanups
-------------------------------------------------------------------
Fri Nov 12 13:20:09 UTC 2021 - Martin Liška <mliska@suse.cz>

View File

@ -1,7 +1,7 @@
#
# spec file for package cross-ppc64le-binutils
#
# Copyright (c) 2021 SUSE LLC
# Copyright (c) 2022 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@ -23,6 +23,7 @@ ExcludeArch: ppc64le
BuildRequires: bc
BuildRequires: bison
BuildRequires: dejagnu
BuildRequires: fdupes
BuildRequires: flex
BuildRequires: gcc-c++
# for the testsuite
@ -37,7 +38,7 @@ BuildRequires: zlib-devel-static
%else
BuildRequires: zlib-devel
%endif
Version: 2.37
Version: 2.38
Release: 0
# disable libalternatives for now until it's changed to not
@ -75,7 +76,7 @@ Release: 0
%else
%define build_multitarget 0
%endif
%define target_list aarch64 alpha armv5l armv6l armv7l armv8l avr epiphany hppa hppa64 i686 ia64 m68k mips powerpc powerpc64 powerpc64le riscv64 rx s390 s390x sh4 sparc sparc64 x86_64 xtensa
%define target_list aarch64 alpha armv5l armv6l armv7l armv8l avr pru epiphany hppa hppa64 i686 ia64 m68k mips powerpc powerpc64 powerpc64le riscv64 rx s390 s390x sh4 sparc sparc64 x86_64 xtensa
#
#
#
@ -95,7 +96,7 @@ Source5: binutils.keyring
Source1: pre_checkin.sh
Source2: README.First-for.SUSE.packagers
Source3: baselibs.conf
Patch1: binutils-2.37-branch.diff.gz
Patch1: binutils-2.38-branch.diff.gz
Patch3: binutils-skip-rpaths.patch
Patch4: s390-biarch.diff
Patch5: x86-64-biarch.patch
@ -141,7 +142,7 @@ Requires: alts
%else
PreReq: update-alternatives
%endif
%if 0%{!?cross:1}
%if 0%{!?cross:1} && 0%{?suse_version} >= 1310
%define gold_archs %ix86 aarch64 %arm x86_64 ppc ppc64 ppc64le s390x %sparc
%endif
@ -191,6 +192,11 @@ The Compact C Type Format (CTF) is a way of representing information about a bin
%prep
echo "make check will return with %{make_check_handling} in case of testsuite failures."
%setup -q -n binutils-%{version}
# Backup flex and biscon files for later verification.
cp ld/ldlex.l ld/ldlex.l.orig
cp ld/ldgram.y ld/ldgram.y.orig
# Patch is outside test_vanilla because it's supposed to be the
# patch bringing the tarball to the newest upstream version
%patch1 -p1
@ -228,22 +234,11 @@ cp gas/config/tc-avr.h gas/config/tc-avr-nesc.h
#
# test_vanilla
%endif
# in parallel builds, when the flex or bison inputs are patched (possibly
# in the ...-branch.diff) it might happen that the dependency tracking
# of automake is confused and uses the old .c files from srcdir/ld/ while
# also generating the new .c files in builddir/ld leading to trouble.
# I haven't found the right entries to ensure this doesn't happen, so
# simply remove the intermediates
rm -f ld/ldlex.c
rm -f ld/ldgram.c ld/ldgram.h
# The 2.37 released tarball contains wrongly pre-generated (empty) man pages
# so we remove those here as well. Consider removing for later releases.
rm -f binutils/doc/*.1
rm -f binutils/doc/cxxfilt.man
rm -f gprof/*.1
rm -f gas/doc/*.1
rm -f ld/*.1
# Due to legacy flex version present in SLE-12 (and older), we cannot
# re-generate flex and bison files and so we verify that any patch modify these files.
diff -u ld/ldlex.l ld/ldlex.l.orig
diff -u ld/ldgram.y ld/ldgram.y.orig
%build
%define _lto_cflags %{nil}
@ -330,14 +325,14 @@ cd build-dir
# we patch headers (bfd-in.h) that are input to other headers
# which are generated only with --enable-maintainer-mode (which we
# don't do) or explicitely by make headers, so do this:
make %{?_smp_mflags} all-bfd TARGET-bfd=headers
make %{?_smp_mflags} all-bfd TARGET-bfd=headers V=1
# the above interacts with --enable-pgo-build=lto because all-bfd doesn't
# have the PGO handling, hence it's config.cache files are wrong
# remove all of those for reconfigure
rm */config.cache
# force reconfiguring
rm bfd/Makefile
make %{?_smp_mflags}
make %{?_smp_mflags} V=1
%else
# building cross-TARGET-binutils
@ -369,7 +364,7 @@ EXTRA_TARGETS="$EXTRA_TARGETS,arm-suse-linux-gnueabi"
%if "%{TARGET}" == "aarch64"
EXTRA_TARGETS="$EXTRA_TARGETS,aarch64-suse-linux"
%endif
%if "%{TARGET}" == "avr" || "%{TARGET}" == "spu"
%if "%{TARGET}" == "avr" || "%{TARGET}" == "spu" || "%{TARGET}" == "pru"
%define TARGET_OS %{TARGET}
%else
%if "%{TARGET}" == "epiphany" || "%{TARGET}" == "riscv32" || "%{TARGET}" == "rx"
@ -403,11 +398,11 @@ EXTRA_TARGETS="$EXTRA_TARGETS,aarch64-suse-linux"
--enable-default-hash-style=both \
%endif
${EXTRA_TARGETS:+--enable-targets="${EXTRA_TARGETS#,}"}
make %{?_smp_mflags} all-bfd TARGET-bfd=headers
make %{?_smp_mflags} all-bfd TARGET-bfd=headers V=1
rm */config.cache
# force reconfiguring
rm bfd/Makefile
make %{?_smp_mflags}
make %{?_smp_mflags} V=1
%if "%{TARGET}" == "avr"
# build an extra nesC version because nesC requires $'s in identifiers
cp -a gas gas-nesc
@ -431,26 +426,25 @@ cd build-dir
%if 0%{!?cross:1}
# installing native binutils
%ifarch %gold_archs
make DESTDIR=$RPM_BUILD_ROOT install-gold
ln -sf ld.gold $RPM_BUILD_ROOT%{_bindir}/gold
make DESTDIR=%{buildroot} install-gold
ln -sf ld.gold %{buildroot}%{_bindir}/gold
%endif
make DESTDIR=$RPM_BUILD_ROOT install-info install
make -C gas/doc DESTDIR=$RPM_BUILD_ROOT install-info-am install-am
make DESTDIR=$RPM_BUILD_ROOT install-bfd install-opcodes
if [ ! -f "%buildroot/%_bindir/ld.bfd" ]; then
mv "%buildroot/%_bindir"/{ld,ld.bfd};
make DESTDIR=%{buildroot} install-info install
make DESTDIR=%{buildroot} install-bfd install-opcodes
if [ ! -f "%{buildroot}/%_bindir/ld.bfd" ]; then
mv "%{buildroot}/%_bindir"/{ld,ld.bfd};
else
rm -f "%buildroot/%_bindir/ld";
rm -f "%{buildroot}/%_bindir/ld";
fi
%if ! 0%{with libalternatives}
mkdir -p "%buildroot/%_sysconfdir/alternatives";
mkdir -p "%{buildroot}/%_sysconfdir/alternatives";
# Keep older versions of brp-symlink happy
%if %{suse_version} < 1310
ln -s "%_bindir/ld" "%buildroot/%_sysconfdir/alternatives/ld"
ln -s "%_bindir/ld" "%{buildroot}/%_sysconfdir/alternatives/ld"
%endif
ln -s "%_sysconfdir/alternatives/ld" "%buildroot/%_bindir/ld";
ln -s "%_sysconfdir/alternatives/ld" "%{buildroot}/%_bindir/ld";
%else
ln -s %{_bindir}/alts "%buildroot/%_bindir/ld";
ln -s %{_bindir}/alts "%{buildroot}/%_bindir/ld";
mkdir -p %{buildroot}%{_datadir}/libalternatives/ld;
cat > %{buildroot}%{_datadir}/libalternatives/ld/1.conf <<EOF
binary=%{_bindir}/ld.gold
@ -460,24 +454,24 @@ binary=%{_bindir}/ld.bfd
EOF
%endif
rm -rf $RPM_BUILD_ROOT%{_prefix}/%{HOST}/bin
mkdir -p $RPM_BUILD_ROOT%{_prefix}/%{HOST}/bin
ln -sf ../../bin/{ar,as,ld,nm,ranlib,strip} $RPM_BUILD_ROOT%{_prefix}/%{HOST}/bin
mv $RPM_BUILD_ROOT%{_prefix}/%{HOST}/lib/ldscripts $RPM_BUILD_ROOT%{_libdir}
ln -sf ../../%{_lib}/ldscripts $RPM_BUILD_ROOT%{_prefix}/%{HOST}/lib/ldscripts
rm -rf %{buildroot}%{_prefix}/%{HOST}/bin
mkdir -p %{buildroot}%{_prefix}/%{HOST}/bin
ln -sf ../../bin/{ar,as,ld,nm,ranlib,strip} %{buildroot}%{_prefix}/%{HOST}/bin
mv %{buildroot}%{_prefix}/%{HOST}/lib/ldscripts $RPM_BUILD_ROOT%{_libdir}
ln -sf ../../%{_lib}/ldscripts %{buildroot}%{_prefix}/%{HOST}/lib/ldscripts
# Install header files
make -C libiberty install_to_libdir target_header_dir=/usr/include DESTDIR=$RPM_BUILD_ROOT
make -C libiberty install_to_libdir target_header_dir=/usr/include DESTDIR=%{buildroot}
# We want the PIC libiberty.a
install -m 644 libiberty/pic/libiberty.a $RPM_BUILD_ROOT%{_libdir}
install -m 644 libiberty/pic/libiberty.a %{buildroot}%{_libdir}
#
chmod a+x $RPM_BUILD_ROOT%{_libdir}/libbfd-*
chmod a+x $RPM_BUILD_ROOT%{_libdir}/libopcodes-*
chmod a+x %{buildroot}%{_libdir}/libbfd-*
chmod a+x %{buildroot}%{_libdir}/libopcodes-*
# No shared linking outside binutils
rm $RPM_BUILD_ROOT%{_libdir}/lib{bfd,opcodes}.so
rm $RPM_BUILD_ROOT%{_libdir}/lib{bfd,opcodes}.la
rm %{buildroot}%{_libdir}/lib{bfd,opcodes}.so
rm %{buildroot}%{_libdir}/lib{bfd,opcodes,ctf,ctf-nobfd}.la
# Remove unwanted files to shut up rpm
rm -f $RPM_BUILD_ROOT%{_infodir}/configure* $RPM_BUILD_ROOT%{_infodir}/standards.info*
rm -f $RPM_BUILD_ROOT%{_mandir}/man1/dlltool.1 $RPM_BUILD_ROOT%{_mandir}/man1/windres.1 $RPM_BUILD_ROOT%{_mandir}/man1/windmc.1
rm -f %{buildroot}%{_infodir}/configure* $RPM_BUILD_ROOT%{_infodir}/standards.info*
rm -f %{buildroot}%{_mandir}/man1/dlltool.1 $RPM_BUILD_ROOT%{_mandir}/man1/windres.1 $RPM_BUILD_ROOT%{_mandir}/man1/windmc.1
cd ..
%find_lang binutils
%find_lang bfd binutils.lang
@ -488,45 +482,47 @@ cd ..
%ifarch %gold_archs
%find_lang gold binutils-gold.lang
%endif
mkdir -p $RPM_BUILD_ROOT%{_docdir}/%{name}
install -m 644 binutils/NEWS $RPM_BUILD_ROOT%{_docdir}/%{name}/NEWS-binutils
install -m 644 gas/NEWS $RPM_BUILD_ROOT%{_docdir}/%{name}/NEWS-gas
install -m 644 ld/NEWS $RPM_BUILD_ROOT%{_docdir}/%{name}/NEWS-ld
mkdir -p %{buildroot}%{_docdir}/%{name}
install -m 644 binutils/NEWS %{buildroot}%{_docdir}/%{name}/NEWS-binutils
install -m 644 gas/NEWS %{buildroot}%{_docdir}/%{name}/NEWS-gas
install -m 644 ld/NEWS %{buildroot}%{_docdir}/%{name}/NEWS-ld
%else
# installing cross-TARGET-binutils and TARGET-binutils
make DESTDIR=$RPM_BUILD_ROOT install
make DESTDIR=%{buildroot} install
# Replace hard links by symlinks, so that rpmlint doesn't complain
T=$(basename %buildroot/usr/%{TARGET_OS})
for f in %buildroot/usr/$T/bin/* ; do
T=$(basename %{buildroot}/usr/%{TARGET_OS})
for f in %{buildroot}/usr/$T/bin/* ; do
ln -sf /usr/bin/$T-$(basename $f) $f
done
%if "%{TARGET}" == "arm"
# Instead of building duplicate binutils, add symlinks
for f in %buildroot/usr/$T/bin/* ; do
for f in %{buildroot}%{_bindir}/${T}-* ; do
_toolname=${f##$(dirname $f)/${T}-}
for p in arm-none-eabi; do
ln -sf %{_bindir}/$T-$(basename $f) %buildroot%{_bindir}/$p-$(basename $f)
ln -sf %{_bindir}/$T-${_toolname} %{buildroot}%{_bindir}/$p-${_toolname}
done
done
%endif
%if "%{TARGET}" == "riscv64"
# Instead of building duplicate binutils, add symlinks
for f in %buildroot/usr/$T/bin/* ; do
for f in %{buildroot}/usr/$T/bin/* ; do
for p in riscv64-elf; do
ln -sf %{_bindir}/$T-$(basename $f) %buildroot%{_bindir}/$p-$(basename $f)
ln -sf %{_bindir}/$T-$(basename $f) %{buildroot}%{_bindir}/$p-$(basename $f)
done
done
%endif
%if "%{TARGET}" == "avr"
install -c gas-nesc/as-new $RPM_BUILD_ROOT%{_prefix}/bin/%{TARGET_OS}-nesc-as
ln -sf ../../bin/%{TARGET_OS}-nesc-as $RPM_BUILD_ROOT%{_prefix}/%{TARGET_OS}/bin/nesc-as
install -c gas-nesc/as-new %{buildroot}%{_prefix}/bin/%{TARGET_OS}-nesc-as
ln -sf ../../bin/%{TARGET_OS}-nesc-as %{buildroot}%{_prefix}/%{TARGET_OS}/bin/nesc-as
%endif
rm -rf $RPM_BUILD_ROOT%{_mandir}
rm -rf $RPM_BUILD_ROOT%{_infodir}
rm -rf $RPM_BUILD_ROOT%{_prefix}/lib*
rm -rf $RPM_BUILD_ROOT%{_prefix}/include
rm -f $RPM_BUILD_ROOT%{_prefix}/bin/*-c++filt
rm -rf %{buildroot}%{_mandir}
rm -rf %{buildroot}%{_infodir}
rm -rf %{buildroot}%{_prefix}/lib*
rm -rf %{buildroot}%{_prefix}/include
rm -f %{buildroot}%{_prefix}/bin/*-c++filt
> ../binutils.lang
%endif
%fdupes %{buildroot}%{_prefix}
%if 0%{!?cross:1}
%post
@ -586,8 +582,7 @@ fi;
%postun -n libctf0 -p /sbin/ldconfig
%postun -n libctf-nobfd0 -p /sbin/ldconfig
%postun
/sbin/ldconfig
%postun -p /sbin/ldconfig
%endif
%files -f binutils.lang
@ -641,9 +636,11 @@ fi;
%{_libdir}/libctf-nobfd.so
%files -n libctf0
%defattr(-,root,root)
%{_libdir}/libctf.so.*
%files -n libctf-nobfd0
%defattr(-,root,root)
%{_libdir}/libctf-nobfd.so.*
%endif

4102
cross-pru-binutils.changes Normal file

File diff suppressed because it is too large Load Diff

647
cross-pru-binutils.spec Normal file
View File

@ -0,0 +1,647 @@
#
# spec file for package cross-pru-binutils
#
# Copyright (c) 2022 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
Name: cross-pru-binutils
ExcludeArch: pru
%define cross 1
%define TARGET pru
BuildRequires: bc
BuildRequires: bison
BuildRequires: dejagnu
BuildRequires: fdupes
BuildRequires: flex
BuildRequires: gcc-c++
# for the testsuite
%if 0%{suse_version} >= 1210
BuildRequires: glibc-devel-static
%endif
%if 0%{suse_version} > 1220
BuildRequires: makeinfo
%endif
%if 0%{suse_version} > 1110
BuildRequires: zlib-devel-static
%else
BuildRequires: zlib-devel
%endif
Version: 2.38
Release: 0
# disable libalternatives for now until it's changed to not
# introduce cmake/cunit-tests into the bootstrap cycle
%if 0 && 0%{?suse_version} > 1500
%bcond_without libalternatives
%else
%bcond_with libalternatives
%endif
#
# RUN_TESTS
%define run_tests %(test ! -f %_sourcedir/RUN_TESTS ; echo $?)
# check the vanilla binutils, with no patches applied
# TEST_VANILLA
%define test_vanilla %(test ! -f %_sourcedir/TEST_VANILLA ; echo $?)
#
# handle test suite failures
#
%ifarch alpha %arm aarch64 hppa mips sh4 %sparc
%define make_check_handling true
%else
# XXX check again
# XXX disabled because gold is seriously broken for now
# Note that some gold tests fail due to gcc-PIE which leads PIE executables
%define make_check_handling true
%endif
# let make check fail anyway if RUN_TESTS was requested
%if %{run_tests}
%define make_check_handling false
%endif
# handle all binary object formats supported by SUSE (and a few more)
%ifarch %ix86 %arm aarch64 ia64 ppc ppc64 ppc64le s390 s390x x86_64
%define build_multitarget 1
%else
%define build_multitarget 0
%endif
%define target_list aarch64 alpha armv5l armv6l armv7l armv8l avr pru epiphany hppa hppa64 i686 ia64 m68k mips powerpc powerpc64 powerpc64le riscv64 rx s390 s390x sh4 sparc sparc64 x86_64 xtensa
#
#
#
URL: http://www.gnu.org/software/binutils/
PreReq: %{install_info_prereq}
# bug437293
%ifarch ppc64
Obsoletes: binutils-64bit
%endif
#
Summary: GNU Binutils
License: GFDL-1.3-only AND GPL-3.0-or-later
Group: Development/Tools/Building
Source: binutils-%{version}.tar.bz2
Source4: binutils-%{version}.tar.bz2.sig
Source5: binutils.keyring
Source1: pre_checkin.sh
Source2: README.First-for.SUSE.packagers
Source3: baselibs.conf
Patch1: binutils-2.38-branch.diff.gz
Patch3: binutils-skip-rpaths.patch
Patch4: s390-biarch.diff
Patch5: x86-64-biarch.patch
Patch6: unit-at-a-time.patch
Patch8: ld-relro.diff
Patch9: testsuite.diff
Patch10: enable-targets-gold.diff
Patch12: s390-pic-dso.diff
Patch14: binutils-build-as-needed.diff
Patch22: binutils-bfd_h.patch
Patch34: aarch64-common-pagesize.patch
Patch36: binutils-pr22868.diff
Patch37: binutils-revert-plt32-in-branches.diff
Patch38: binutils-fix-invalid-op-errata.diff
Patch39: binutils-revert-nm-symversion.diff
Patch40: binutils-fix-abierrormsg.diff
Patch41: binutils-fix-relax.diff
Patch42: binutils-compat-old-behaviour.diff
Patch43: binutils-revert-hlasm-insns.diff
Patch100: add-ulp-section.diff
Patch90: cross-avr-nesc-as.patch
Patch92: cross-avr-omit_section_dynsym.patch
Patch93: cross-avr-size.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%if %{with libalternatives}
Requires: alts
%else
PreReq: update-alternatives
%endif
%description
C compiler utilities: ar, as, gprof, ld, nm, objcopy, objdump, ranlib,
size, strings, and strip. These utilities are needed whenever you want
to compile a program or kernel.
%package gold
Summary: The gold linker
License: GPL-3.0-or-later
Group: Development/Tools/Building
Requires: binutils = %{version}-%{release}
%if %{with libalternatives}
Requires: alts
%else
PreReq: update-alternatives
%endif
%if 0%{!?cross:1} && 0%{?suse_version} >= 1310
%define gold_archs %ix86 aarch64 %arm x86_64 ppc ppc64 ppc64le s390x %sparc
%endif
%description gold
gold is an ELF linker. It is intended to have complete support for ELF
and to run as fast as possible on modern systems. For normal use it is
a drop-in replacement for the older GNU linker.
%package devel
Summary: GNU binutils (BFD development files)
License: GPL-3.0-or-later
Group: Development/Libraries/C and C++
Requires: binutils = %{version}-%{release}
Requires: zlib-devel
Provides: binutils:/usr/include/bfd.h
%description devel
This package includes header files and static libraries necessary to
build programs which use the GNU BFD library, which is part of
binutils.
%package -n libctf0
Summary: Compact C Type Format library (runtime, BFD dependency)
License: GFDL-1.3-only AND GPL-3.0-or-later
Group: Development/Tools/Building
%description -n libctf0
This package includes the libctf shared library.
The Compact C Type Format (CTF) is a way of representing information about a binary program
%package -n libctf-nobfd0
Summary: Compact C Type Format library (runtime, no BFD dependency)
License: GFDL-1.3-only AND GPL-3.0-or-later
Group: Development/Tools/Building
%description -n libctf-nobfd0
This package includes the libctf-nobfd shared library.
The Compact C Type Format (CTF) is a way of representing information about a binary program
%ifarch %arm
%define HOST %{_target_cpu}-suse-linux-gnueabi
%else
%define HOST %(echo %{_target_cpu} | sed -e "s/parisc/hppa/" -e "s/i.86/i586/" -e "s/ppc/powerpc/" -e "s/sparc64v.*/sparc64/" -e "s/sparcv.*/sparc/")-suse-linux
%endif
%define DIST %(echo '%distribution' | sed 's/ (.*)//')
%prep
echo "make check will return with %{make_check_handling} in case of testsuite failures."
%setup -q -n binutils-%{version}
# Backup flex and biscon files for later verification.
cp ld/ldlex.l ld/ldlex.l.orig
cp ld/ldgram.y ld/ldgram.y.orig
# Patch is outside test_vanilla because it's supposed to be the
# patch bringing the tarball to the newest upstream version
%patch1 -p1
%if !%{test_vanilla}
%patch3 -p1
%patch4
%patch5
%patch6
%patch8
%patch9
%patch10
%patch12
%patch14
%patch22
%patch34 -p1
%patch36 -p1
%if %{suse_version} < 1550
%patch37 -p1
%endif
%patch38
%patch39 -p1
%patch40 -p1
%patch41 -p1
%if %{suse_version} < 1550
%patch42 -p1
%patch43 -p1
%endif
%patch100 -p1
%if "%{TARGET}" == "avr"
cp gas/config/tc-avr.h gas/config/tc-avr-nesc.h
%patch90
%patch92
%patch93 -p1
%endif
#
# test_vanilla
%endif
# Due to legacy flex version present in SLE-12 (and older), we cannot
# re-generate flex and bison files and so we verify that any patch modify these files.
diff -u ld/ldlex.l ld/ldlex.l.orig
diff -u ld/ldgram.y ld/ldgram.y.orig
%build
%define _lto_cflags %{nil}
sed -i -e '/BFD_VERSION_DATE/s/$/-%(echo %release | sed 's/\.[0-9]*$//')/' bfd/version.h
RPM_OPT_FLAGS="$RPM_OPT_FLAGS -Wno-error"
%if 0%{!?cross:1}
# Building native binutils
echo "Building native binutils."
%if %build_multitarget
EXTRA_TARGETS="%(printf ,%%s-suse-linux %target_list)"
EXTRA_TARGETS="$EXTRA_TARGETS,powerpc-macos,powerpc-macos10,spu-elf,x86_64-pep"
%else
EXTRA_TARGETS=
%ifarch sparc
EXTRA_TARGETS="$EXTRA_TARGETS,sparc64-suse-linux"
%endif
%ifarch ppc
EXTRA_TARGETS="$EXTRA_TARGETS,powerpc64-suse-linux"
%endif
%ifarch s390
EXTRA_TARGETS="$EXTRA_TARGETS,s390x-suse-linux"
%endif
%ifarch s390x
EXTRA_TARGETS="$EXTRA_TARGETS,s390-suse-linux"
%endif
%ifarch %ix86
EXTRA_TARGETS="$EXTRA_TARGETS,x86_64-suse-linux"
%endif
%ifarch ppc ppc64 ppc64le
EXTRA_TARGETS="$EXTRA_TARGETS,spu-elf"
%endif
%ifarch %arm
EXTRA_TARGETS="$EXTRA_TARGETS,arm-suse-linux-gnueabi"
%endif
%ifarch aarch64
EXTRA_TARGETS="$EXTRA_TARGETS,aarch64-suse-linux"
%endif
%endif
# Normally we'd like to add --enable-deterministic-archives
# here (which by default makes uid/mtime be zero for archive
# members), to increase chances of getting a reproducable build
# But this breaks Makefile rules when directly accessing archives:
# rebuilding the same archive from unchanged .o files recreates
# it, because timestamps in the .a are 0, unequal to the actual timestamp
# of the .o files :-/
%define common_flags CFLAGS="${RPM_OPT_FLAGS}" CXXFLAGS="${RPM_OPT_FLAGS}" \\\
--prefix=%{_prefix} --libdir=%{_libdir} \\\
--infodir=%{_infodir} --mandir=%{_mandir} \\\
--with-bugurl=http://bugs.opensuse.org/ \\\
--with-pkgversion="GNU Binutils; %{DIST}" \\\
--with-separate-debug-dir=%{_prefix}/lib/debug \\\
--with-pic --with-system-zlib --build=%{HOST}
mkdir build-dir
cd build-dir
../configure %common_flags \
${EXTRA_TARGETS:+--enable-targets="${EXTRA_TARGETS#,}"} \
--enable-plugins \
%ifarch %gold_archs
--enable-gold \
--enable-threads \
%endif
%if %{suse_version} <= 1320
--disable-x86-relax-relocations \
--disable-compressed-debug-sections \
%endif
%if %{suse_version} > 1320
--enable-compressed-debug-sections=gas \
%endif
%if %{suse_version} < 1550
--disable-x86-used-note \
--disable-separate-code \
%endif
--enable-new-dtags \
%if "%{TARGET}" != "mips"
--enable-default-hash-style=both \
%endif
--enable-shared \
%if %{suse_version} > 1500
--enable-pgo-build=lto \
%endif
--enable-obsolete
# we patch headers (bfd-in.h) that are input to other headers
# which are generated only with --enable-maintainer-mode (which we
# don't do) or explicitely by make headers, so do this:
make %{?_smp_mflags} all-bfd TARGET-bfd=headers V=1
# the above interacts with --enable-pgo-build=lto because all-bfd doesn't
# have the PGO handling, hence it's config.cache files are wrong
# remove all of those for reconfigure
rm */config.cache
# force reconfiguring
rm bfd/Makefile
make %{?_smp_mflags} V=1
%else
# building cross-TARGET-binutils
echo "Building cross binutils."
mkdir build-dir
cd build-dir
EXTRA_TARGETS=
%if "%{TARGET}" == "sparc"
EXTRA_TARGETS="$EXTRA_TARGETS,sparc64-suse-linux"
%endif
%if "%{TARGET}" == "powerpc"
EXTRA_TARGETS="$EXTRA_TARGETS,powerpc64-suse-linux"
%endif
%if "%{TARGET}" == "s390"
EXTRA_TARGETS="$EXTRA_TARGETS,s390x-suse-linux"
%endif
%if "%{TARGET}" == "s390x"
EXTRA_TARGETS="$EXTRA_TARGETS,s390-suse-linux"
%endif
%if "%{TARGET}" == "i586"
EXTRA_TARGETS="$EXTRA_TARGETS,x86_64-suse-linux"
%endif
%if "%{TARGET}" == "hppa"
EXTRA_TARGETS="$EXTRA_TARGETS,hppa64-suse-linux"
%endif
%if "%{TARGET}" == "arm"
EXTRA_TARGETS="$EXTRA_TARGETS,arm-suse-linux-gnueabi"
%endif
%if "%{TARGET}" == "aarch64"
EXTRA_TARGETS="$EXTRA_TARGETS,aarch64-suse-linux"
%endif
%if "%{TARGET}" == "avr" || "%{TARGET}" == "spu" || "%{TARGET}" == "pru"
%define TARGET_OS %{TARGET}
%else
%if "%{TARGET}" == "epiphany" || "%{TARGET}" == "riscv32" || "%{TARGET}" == "rx"
%define TARGET_OS %{TARGET}-elf
%else
%if "%{TARGET}" == "arm"
%define TARGET_OS %{TARGET}-suse-linux-gnueabi
%else
%define TARGET_OS %{TARGET}-suse-linux
%endif
%endif
%endif
../configure CFLAGS="${RPM_OPT_FLAGS}" \
--prefix=%{_prefix} \
--with-bugurl=http://bugs.opensuse.org/ \
--with-pkgversion="GNU Binutils; %{DIST}" \
--with-system-zlib \
--disable-nls \
--enable-new-dtags \
--enable-obsolete \
%if %{suse_version} <= 1320
--disable-x86-relax-relocations \
%endif
--build=%{HOST} --target=%{TARGET_OS} \
%if "%{TARGET}" == "spu"
--with-sysroot=/usr/spu \
%else
--with-sysroot=%{_prefix}/%{TARGET_OS}/sys-root \
%endif
%if "%{TARGET}" != "mips"
--enable-default-hash-style=both \
%endif
${EXTRA_TARGETS:+--enable-targets="${EXTRA_TARGETS#,}"}
make %{?_smp_mflags} all-bfd TARGET-bfd=headers V=1
rm */config.cache
# force reconfiguring
rm bfd/Makefile
make %{?_smp_mflags} V=1
%if "%{TARGET}" == "avr"
# build an extra nesC version because nesC requires $'s in identifiers
cp -a gas gas-nesc
echo '#include "tc-%{TARGET}-nesc.h"' > gas-nesc/targ-cpu.h
make -C gas-nesc clean
make -C gas-nesc %{?_smp_mflags}
%endif
%endif
%check
unset SUSE_ASNEEDED
cd build-dir
%if 0%{?cross:1}
make -k check CFLAGS="-O2 -g" CXXFLAGS="-O2 -g" CFLAGS_FOR_TARGET="-O2 -g" CXXFLAGS_FOR_TARGET="-O2 -g" || %{make_check_handling}
%else
make -k check CFLAGS="-g $RPM_OPT_FLAGS" CXXFLAGS="-g $RPM_OPT_FLAGS" CFLAGS_FOR_TARGET="-g $RPM_OPT_FLAGS" CXXFLAGS_FOR_TARGET="-g $RPM_OPT_FLAGS" || %{make_check_handling}
%endif
%install
cd build-dir
%if 0%{!?cross:1}
# installing native binutils
%ifarch %gold_archs
make DESTDIR=%{buildroot} install-gold
ln -sf ld.gold %{buildroot}%{_bindir}/gold
%endif
make DESTDIR=%{buildroot} install-info install
make DESTDIR=%{buildroot} install-bfd install-opcodes
if [ ! -f "%{buildroot}/%_bindir/ld.bfd" ]; then
mv "%{buildroot}/%_bindir"/{ld,ld.bfd};
else
rm -f "%{buildroot}/%_bindir/ld";
fi
%if ! 0%{with libalternatives}
mkdir -p "%{buildroot}/%_sysconfdir/alternatives";
# Keep older versions of brp-symlink happy
%if %{suse_version} < 1310
ln -s "%_bindir/ld" "%{buildroot}/%_sysconfdir/alternatives/ld"
%endif
ln -s "%_sysconfdir/alternatives/ld" "%{buildroot}/%_bindir/ld";
%else
ln -s %{_bindir}/alts "%{buildroot}/%_bindir/ld";
mkdir -p %{buildroot}%{_datadir}/libalternatives/ld;
cat > %{buildroot}%{_datadir}/libalternatives/ld/1.conf <<EOF
binary=%{_bindir}/ld.gold
EOF
cat > %{buildroot}%{_datadir}/libalternatives/ld/2.conf <<EOF
binary=%{_bindir}/ld.bfd
EOF
%endif
rm -rf %{buildroot}%{_prefix}/%{HOST}/bin
mkdir -p %{buildroot}%{_prefix}/%{HOST}/bin
ln -sf ../../bin/{ar,as,ld,nm,ranlib,strip} %{buildroot}%{_prefix}/%{HOST}/bin
mv %{buildroot}%{_prefix}/%{HOST}/lib/ldscripts $RPM_BUILD_ROOT%{_libdir}
ln -sf ../../%{_lib}/ldscripts %{buildroot}%{_prefix}/%{HOST}/lib/ldscripts
# Install header files
make -C libiberty install_to_libdir target_header_dir=/usr/include DESTDIR=%{buildroot}
# We want the PIC libiberty.a
install -m 644 libiberty/pic/libiberty.a %{buildroot}%{_libdir}
#
chmod a+x %{buildroot}%{_libdir}/libbfd-*
chmod a+x %{buildroot}%{_libdir}/libopcodes-*
# No shared linking outside binutils
rm %{buildroot}%{_libdir}/lib{bfd,opcodes}.so
rm %{buildroot}%{_libdir}/lib{bfd,opcodes,ctf,ctf-nobfd}.la
# Remove unwanted files to shut up rpm
rm -f %{buildroot}%{_infodir}/configure* $RPM_BUILD_ROOT%{_infodir}/standards.info*
rm -f %{buildroot}%{_mandir}/man1/dlltool.1 $RPM_BUILD_ROOT%{_mandir}/man1/windres.1 $RPM_BUILD_ROOT%{_mandir}/man1/windmc.1
cd ..
%find_lang binutils
%find_lang bfd binutils.lang
%find_lang gas binutils.lang
%find_lang ld binutils.lang
%find_lang opcodes binutils.lang
%find_lang gprof binutils.lang
%ifarch %gold_archs
%find_lang gold binutils-gold.lang
%endif
mkdir -p %{buildroot}%{_docdir}/%{name}
install -m 644 binutils/NEWS %{buildroot}%{_docdir}/%{name}/NEWS-binutils
install -m 644 gas/NEWS %{buildroot}%{_docdir}/%{name}/NEWS-gas
install -m 644 ld/NEWS %{buildroot}%{_docdir}/%{name}/NEWS-ld
%else
# installing cross-TARGET-binutils and TARGET-binutils
make DESTDIR=%{buildroot} install
# Replace hard links by symlinks, so that rpmlint doesn't complain
T=$(basename %{buildroot}/usr/%{TARGET_OS})
for f in %{buildroot}/usr/$T/bin/* ; do
ln -sf /usr/bin/$T-$(basename $f) $f
done
%if "%{TARGET}" == "arm"
# Instead of building duplicate binutils, add symlinks
for f in %{buildroot}%{_bindir}/${T}-* ; do
_toolname=${f##$(dirname $f)/${T}-}
for p in arm-none-eabi; do
ln -sf %{_bindir}/$T-${_toolname} %{buildroot}%{_bindir}/$p-${_toolname}
done
done
%endif
%if "%{TARGET}" == "riscv64"
# Instead of building duplicate binutils, add symlinks
for f in %{buildroot}/usr/$T/bin/* ; do
for p in riscv64-elf; do
ln -sf %{_bindir}/$T-$(basename $f) %{buildroot}%{_bindir}/$p-$(basename $f)
done
done
%endif
%if "%{TARGET}" == "avr"
install -c gas-nesc/as-new %{buildroot}%{_prefix}/bin/%{TARGET_OS}-nesc-as
ln -sf ../../bin/%{TARGET_OS}-nesc-as %{buildroot}%{_prefix}/%{TARGET_OS}/bin/nesc-as
%endif
rm -rf %{buildroot}%{_mandir}
rm -rf %{buildroot}%{_infodir}
rm -rf %{buildroot}%{_prefix}/lib*
rm -rf %{buildroot}%{_prefix}/include
rm -f %{buildroot}%{_prefix}/bin/*-c++filt
> ../binutils.lang
%endif
%fdupes %{buildroot}%{_prefix}
%if 0%{!?cross:1}
%post
/sbin/ldconfig
%if ! %{with libalternatives}
"%_sbindir/update-alternatives" --install \
"%_bindir/ld" ld "%_bindir/ld.bfd" 2
%endif
%install_info --info-dir=%{_infodir} %{_infodir}/as.info.gz
%install_info --info-dir=%{_infodir} %{_infodir}/bfd.info.gz
%install_info --info-dir=%{_infodir} %{_infodir}/binutils.info.gz
%install_info --info-dir=%{_infodir} %{_infodir}/gprof.info.gz
%install_info --info-dir=%{_infodir} %{_infodir}/ld.info.gz
%if ! %{with libalternatives}
%post gold
"%_sbindir/update-alternatives" --install \
"%_bindir/ld" ld "%_bindir/ld.gold" 1
%endif
%post -n libctf0 -p /sbin/ldconfig
%post -n libctf-nobfd0 -p /sbin/ldconfig
%if %{with libalternatives}
%pre
# removing old update-alternatives entries
if [ "$1" -gt 0 ] && [ -f %{_sbindir}/update-alternatives ] ; then
"%_sbindir/update-alternatives" --remove ld "%_bindir/ld.bfd";
fi;
%pre gold
# removing old update-alternatives entries
if [ "$1" -gt 0 ] && [ -f %{_sbindir}/update-alternatives ] ; then
"%_sbindir/update-alternatives" --remove ld "%_bindir/ld.gold";
fi;
%endif
%preun
%install_info_delete --info-dir=%{_infodir} %{_infodir}/as.info.gz
%install_info_delete --info-dir=%{_infodir} %{_infodir}/bfd.info.gz
%install_info_delete --info-dir=%{_infodir} %{_infodir}/binutils.info.gz
%install_info_delete --info-dir=%{_infodir} %{_infodir}/gprof.info.gz
%install_info_delete --info-dir=%{_infodir} %{_infodir}/ld.info.gz
%if ! %{with libalternatives}
if [ "$1" = 0 ]; then
"%_sbindir/update-alternatives" --remove ld "%_bindir/ld.bfd";
fi;
%endif
%if ! %{with libalternatives}
%preun gold
if [ "$1" = 0 ]; then
"%_sbindir/update-alternatives" --remove ld "%_bindir/ld.gold";
fi;
%endif
%postun -n libctf0 -p /sbin/ldconfig
%postun -n libctf-nobfd0 -p /sbin/ldconfig
%postun -p /sbin/ldconfig
%endif
%files -f binutils.lang
%defattr(-,root,root)
%if 0%{!?cross:1}
%{_docdir}/%{name}
%{_prefix}/%{HOST}/bin/*
%{_prefix}/%{HOST}/lib/ldscripts
%{_libdir}/ldscripts
%dir %{_libdir}/bfd-plugins
%{_libdir}/bfd-plugins/libdep.so
%{_bindir}/*
%if ! 0%{with libalternatives}
%ghost %_sysconfdir/alternatives/ld
%else
%dir %{_datadir}/libalternatives
%dir %{_datadir}/libalternatives/ld
%{_datadir}/libalternatives/ld/2.conf
%endif
%ifarch %gold_archs
%exclude %{_bindir}/gold
%exclude %{_bindir}/ld.gold
%endif
%doc %{_infodir}/*.gz
%{_libdir}/lib*-%{version}*.so
%doc %{_mandir}/man1/*.1.gz
%else
%{_prefix}/%{TARGET_OS}
%{_prefix}/bin/*
%endif
%ifarch %gold_archs
%files gold -f binutils-gold.lang
%defattr(-,root,root)
%doc gold/NEWS gold/README
%{_bindir}/gold
%{_bindir}/ld.gold
%if %{with libalternatives}
%dir %{_datadir}/libalternatives
%dir %{_datadir}/libalternatives/ld
%{_datadir}/libalternatives/ld/1.conf
%endif
%endif
%if 0%{!?cross:1}
%files devel
%defattr(-,root,root)
%{_prefix}/include/*.h
%{_libdir}/lib*.*a
%{_libdir}/libctf.so
%{_libdir}/libctf-nobfd.so
%files -n libctf0
%defattr(-,root,root)
%{_libdir}/libctf.so.*
%files -n libctf-nobfd0
%defattr(-,root,root)
%{_libdir}/libctf-nobfd.so.*
%endif
%changelog

View File

@ -1,3 +1,106 @@
-------------------------------------------------------------------
Fri Mar 4 10:44:39 UTC 2022 - Martin Liška <mliska@suse.cz>
- Update binutils-2.38-branch.diff.gz in order to include PR28879.
-------------------------------------------------------------------
Tue Mar 1 12:41:27 UTC 2022 - Michael Matz <matz@suse.com>
- From Stefan Brüns <stefan.bruens@rwth-aachen.de>:
* Install symlinks for all target specific tools on
arm-eabi-none [bsc#1185712]
-------------------------------------------------------------------
Thu Feb 24 09:10:44 UTC 2022 - Martin Liška <mliska@suse.cz>
- Do not re-generate ld/ldlex.c, ld/ldgram.c, ld/ldgram.h and verify
that corresponding flex/bison files are not modified by a patch.
-------------------------------------------------------------------
Thu Feb 24 06:55:14 UTC 2022 - Martin Liška <mliska@suse.cz>
- Use verbose mode for make for cross compilers.
-------------------------------------------------------------------
Wed Feb 23 17:52:15 UTC 2022 - Michael Matz <matz@suse.com>
- Make it build on SLE-11 again.
-------------------------------------------------------------------
Tue Feb 22 09:13:15 UTC 2022 - Martin Liška <mliska@suse.cz>
- Use verbose mode for make.
-------------------------------------------------------------------
Sat Feb 12 19:13:31 UTC 2022 - Martin Liška <mliska@suse.cz>
- Update to binutils 2.38:
* elfedit: Add --output-abiversion option to update ABIVERSION.
* Add support for the LoongArch instruction set.
* Tools which display symbols or strings (readelf, strings, nm, objdump)
have a new command line option which controls how unicode characters are
handled. By default they are treated as normal for the tool. Using
--unicode=locale will display them according to the current locale.
Using --unicode=hex will display them as hex byte values, whilst
--unicode=escape will display them as escape sequences. In addition
using --unicode=highlight will display them as unicode escape sequences
highlighted in red (if supported by the output device).
* readelf -r dumps RELR relative relocations now.
* Support for efi-app-aarch64, efi-rtdrv-aarch64 and efi-bsdrv-aarch64 has been
added to objcopy in order to enable UEFI development using binutils.
* ar: Add --thin for creating thin archives. -T is a deprecated alias without
diagnostics. In many ar implementations -T has a different meaning, as
specified by X/Open System Interface.
* Add support for AArch64 system registers that were missing in previous
releases.
* Add support for the LoongArch instruction set.
* Add a command-line option, -muse-unaligned-vector-move, for x86 target
to encode aligned vector move as unaligned vector move.
* Add support for Cortex-R52+ for Arm.
* Add support for Cortex-A510, Cortex-A710, Cortex-X2 for AArch64.
* Add support for Cortex-A710 for Arm.
* Add support for Scalable Matrix Extension (SME) for AArch64.
* The --multibyte-handling=[allow|warn|warn-sym-only] option tells the
assembler what to when it encoutners multibyte characters in the input. The
default is to allow them. Setting the option to "warn" will generate a
warning message whenever any multibyte character is encountered. Using the
option to "warn-sym-only" will make the assembler generate a warning whenever a
symbol is defined containing multibyte characters. (References to undefined
symbols will not generate warnings).
* Outputs of .ds.x directive and .tfloat directive with hex input from
x86 assembler have been reduced from 12 bytes to 10 bytes to match the
output of .tfloat directive.
* Add support for 'armv8.8-a', 'armv9-a', 'armv9.1-a', 'armv9.2-a' and
'armv9.3-a' for -march in AArch64 GAS.
* Add support for 'armv8.7-a', 'armv8.8-a', 'armv9-a', 'armv9.1-a',
'armv9.2-a' and 'armv9.3-a' for -march in Arm GAS.
* Add support for Intel AVX512_FP16 instructions.
* Add -z pack-relative-relocs/-z no pack-relative-relocs to x86 ELF
linker to pack relative relocations in the DT_RELR section.
* Add support for the LoongArch architecture.
* Add -z indirect-extern-access/-z noindirect-extern-access to x86 ELF
linker to control canonical function pointers and copy relocation.
* Add --max-cache-size=SIZE to set the the maximum cache size to SIZE
bytes.
- Add binutils-2.38-branch.diff.gz.
- Removed deletion of man pages as they should be properly packages
in tarball.
- Rebased patches: aarch64-common-pagesize.patch, add-ulp-section.diff,
binutils-bfd_h.patch, binutils-revert-nm-symversion.diff,
binutils-revert-plt32-in-branches.diff, binutils-skip-rpaths.patch
and binutils-compat-old-behaviour.diff.
-------------------------------------------------------------------
Fri Feb 4 13:13:20 UTC 2022 - Matwey Kornilov <matwey.kornilov@gmail.com>
- Enable PRU architecture for AM335x CPU (Beagle Bone Black board)
-------------------------------------------------------------------
Thu Jan 27 20:36:30 UTC 2022 - Dirk Müller <dmueller@suse.com>
- use fdupes on datadir
- remove RPM_BUILD_ROOT usage and other cleanups
-------------------------------------------------------------------
Fri Nov 12 13:20:09 UTC 2021 - Martin Liška <mliska@suse.cz>

View File

@ -1,7 +1,7 @@
#
# spec file for package cross-riscv64-binutils
#
# Copyright (c) 2021 SUSE LLC
# Copyright (c) 2022 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@ -23,6 +23,7 @@ ExcludeArch: riscv64
BuildRequires: bc
BuildRequires: bison
BuildRequires: dejagnu
BuildRequires: fdupes
BuildRequires: flex
BuildRequires: gcc-c++
# for the testsuite
@ -37,7 +38,7 @@ BuildRequires: zlib-devel-static
%else
BuildRequires: zlib-devel
%endif
Version: 2.37
Version: 2.38
Release: 0
# disable libalternatives for now until it's changed to not
@ -75,7 +76,7 @@ Release: 0
%else
%define build_multitarget 0
%endif
%define target_list aarch64 alpha armv5l armv6l armv7l armv8l avr epiphany hppa hppa64 i686 ia64 m68k mips powerpc powerpc64 powerpc64le riscv64 rx s390 s390x sh4 sparc sparc64 x86_64 xtensa
%define target_list aarch64 alpha armv5l armv6l armv7l armv8l avr pru epiphany hppa hppa64 i686 ia64 m68k mips powerpc powerpc64 powerpc64le riscv64 rx s390 s390x sh4 sparc sparc64 x86_64 xtensa
#
#
#
@ -95,7 +96,7 @@ Source5: binutils.keyring
Source1: pre_checkin.sh
Source2: README.First-for.SUSE.packagers
Source3: baselibs.conf
Patch1: binutils-2.37-branch.diff.gz
Patch1: binutils-2.38-branch.diff.gz
Patch3: binutils-skip-rpaths.patch
Patch4: s390-biarch.diff
Patch5: x86-64-biarch.patch
@ -141,7 +142,7 @@ Requires: alts
%else
PreReq: update-alternatives
%endif
%if 0%{!?cross:1}
%if 0%{!?cross:1} && 0%{?suse_version} >= 1310
%define gold_archs %ix86 aarch64 %arm x86_64 ppc ppc64 ppc64le s390x %sparc
%endif
@ -191,6 +192,11 @@ The Compact C Type Format (CTF) is a way of representing information about a bin
%prep
echo "make check will return with %{make_check_handling} in case of testsuite failures."
%setup -q -n binutils-%{version}
# Backup flex and biscon files for later verification.
cp ld/ldlex.l ld/ldlex.l.orig
cp ld/ldgram.y ld/ldgram.y.orig
# Patch is outside test_vanilla because it's supposed to be the
# patch bringing the tarball to the newest upstream version
%patch1 -p1
@ -228,22 +234,11 @@ cp gas/config/tc-avr.h gas/config/tc-avr-nesc.h
#
# test_vanilla
%endif
# in parallel builds, when the flex or bison inputs are patched (possibly
# in the ...-branch.diff) it might happen that the dependency tracking
# of automake is confused and uses the old .c files from srcdir/ld/ while
# also generating the new .c files in builddir/ld leading to trouble.
# I haven't found the right entries to ensure this doesn't happen, so
# simply remove the intermediates
rm -f ld/ldlex.c
rm -f ld/ldgram.c ld/ldgram.h
# The 2.37 released tarball contains wrongly pre-generated (empty) man pages
# so we remove those here as well. Consider removing for later releases.
rm -f binutils/doc/*.1
rm -f binutils/doc/cxxfilt.man
rm -f gprof/*.1
rm -f gas/doc/*.1
rm -f ld/*.1
# Due to legacy flex version present in SLE-12 (and older), we cannot
# re-generate flex and bison files and so we verify that any patch modify these files.
diff -u ld/ldlex.l ld/ldlex.l.orig
diff -u ld/ldgram.y ld/ldgram.y.orig
%build
%define _lto_cflags %{nil}
@ -330,14 +325,14 @@ cd build-dir
# we patch headers (bfd-in.h) that are input to other headers
# which are generated only with --enable-maintainer-mode (which we
# don't do) or explicitely by make headers, so do this:
make %{?_smp_mflags} all-bfd TARGET-bfd=headers
make %{?_smp_mflags} all-bfd TARGET-bfd=headers V=1
# the above interacts with --enable-pgo-build=lto because all-bfd doesn't
# have the PGO handling, hence it's config.cache files are wrong
# remove all of those for reconfigure
rm */config.cache
# force reconfiguring
rm bfd/Makefile
make %{?_smp_mflags}
make %{?_smp_mflags} V=1
%else
# building cross-TARGET-binutils
@ -369,7 +364,7 @@ EXTRA_TARGETS="$EXTRA_TARGETS,arm-suse-linux-gnueabi"
%if "%{TARGET}" == "aarch64"
EXTRA_TARGETS="$EXTRA_TARGETS,aarch64-suse-linux"
%endif
%if "%{TARGET}" == "avr" || "%{TARGET}" == "spu"
%if "%{TARGET}" == "avr" || "%{TARGET}" == "spu" || "%{TARGET}" == "pru"
%define TARGET_OS %{TARGET}
%else
%if "%{TARGET}" == "epiphany" || "%{TARGET}" == "riscv32" || "%{TARGET}" == "rx"
@ -403,11 +398,11 @@ EXTRA_TARGETS="$EXTRA_TARGETS,aarch64-suse-linux"
--enable-default-hash-style=both \
%endif
${EXTRA_TARGETS:+--enable-targets="${EXTRA_TARGETS#,}"}
make %{?_smp_mflags} all-bfd TARGET-bfd=headers
make %{?_smp_mflags} all-bfd TARGET-bfd=headers V=1
rm */config.cache
# force reconfiguring
rm bfd/Makefile
make %{?_smp_mflags}
make %{?_smp_mflags} V=1
%if "%{TARGET}" == "avr"
# build an extra nesC version because nesC requires $'s in identifiers
cp -a gas gas-nesc
@ -431,26 +426,25 @@ cd build-dir
%if 0%{!?cross:1}
# installing native binutils
%ifarch %gold_archs
make DESTDIR=$RPM_BUILD_ROOT install-gold
ln -sf ld.gold $RPM_BUILD_ROOT%{_bindir}/gold
make DESTDIR=%{buildroot} install-gold
ln -sf ld.gold %{buildroot}%{_bindir}/gold
%endif
make DESTDIR=$RPM_BUILD_ROOT install-info install
make -C gas/doc DESTDIR=$RPM_BUILD_ROOT install-info-am install-am
make DESTDIR=$RPM_BUILD_ROOT install-bfd install-opcodes
if [ ! -f "%buildroot/%_bindir/ld.bfd" ]; then
mv "%buildroot/%_bindir"/{ld,ld.bfd};
make DESTDIR=%{buildroot} install-info install
make DESTDIR=%{buildroot} install-bfd install-opcodes
if [ ! -f "%{buildroot}/%_bindir/ld.bfd" ]; then
mv "%{buildroot}/%_bindir"/{ld,ld.bfd};
else
rm -f "%buildroot/%_bindir/ld";
rm -f "%{buildroot}/%_bindir/ld";
fi
%if ! 0%{with libalternatives}
mkdir -p "%buildroot/%_sysconfdir/alternatives";
mkdir -p "%{buildroot}/%_sysconfdir/alternatives";
# Keep older versions of brp-symlink happy
%if %{suse_version} < 1310
ln -s "%_bindir/ld" "%buildroot/%_sysconfdir/alternatives/ld"
ln -s "%_bindir/ld" "%{buildroot}/%_sysconfdir/alternatives/ld"
%endif
ln -s "%_sysconfdir/alternatives/ld" "%buildroot/%_bindir/ld";
ln -s "%_sysconfdir/alternatives/ld" "%{buildroot}/%_bindir/ld";
%else
ln -s %{_bindir}/alts "%buildroot/%_bindir/ld";
ln -s %{_bindir}/alts "%{buildroot}/%_bindir/ld";
mkdir -p %{buildroot}%{_datadir}/libalternatives/ld;
cat > %{buildroot}%{_datadir}/libalternatives/ld/1.conf <<EOF
binary=%{_bindir}/ld.gold
@ -460,24 +454,24 @@ binary=%{_bindir}/ld.bfd
EOF
%endif
rm -rf $RPM_BUILD_ROOT%{_prefix}/%{HOST}/bin
mkdir -p $RPM_BUILD_ROOT%{_prefix}/%{HOST}/bin
ln -sf ../../bin/{ar,as,ld,nm,ranlib,strip} $RPM_BUILD_ROOT%{_prefix}/%{HOST}/bin
mv $RPM_BUILD_ROOT%{_prefix}/%{HOST}/lib/ldscripts $RPM_BUILD_ROOT%{_libdir}
ln -sf ../../%{_lib}/ldscripts $RPM_BUILD_ROOT%{_prefix}/%{HOST}/lib/ldscripts
rm -rf %{buildroot}%{_prefix}/%{HOST}/bin
mkdir -p %{buildroot}%{_prefix}/%{HOST}/bin
ln -sf ../../bin/{ar,as,ld,nm,ranlib,strip} %{buildroot}%{_prefix}/%{HOST}/bin
mv %{buildroot}%{_prefix}/%{HOST}/lib/ldscripts $RPM_BUILD_ROOT%{_libdir}
ln -sf ../../%{_lib}/ldscripts %{buildroot}%{_prefix}/%{HOST}/lib/ldscripts
# Install header files
make -C libiberty install_to_libdir target_header_dir=/usr/include DESTDIR=$RPM_BUILD_ROOT
make -C libiberty install_to_libdir target_header_dir=/usr/include DESTDIR=%{buildroot}
# We want the PIC libiberty.a
install -m 644 libiberty/pic/libiberty.a $RPM_BUILD_ROOT%{_libdir}
install -m 644 libiberty/pic/libiberty.a %{buildroot}%{_libdir}
#
chmod a+x $RPM_BUILD_ROOT%{_libdir}/libbfd-*
chmod a+x $RPM_BUILD_ROOT%{_libdir}/libopcodes-*
chmod a+x %{buildroot}%{_libdir}/libbfd-*
chmod a+x %{buildroot}%{_libdir}/libopcodes-*
# No shared linking outside binutils
rm $RPM_BUILD_ROOT%{_libdir}/lib{bfd,opcodes}.so
rm $RPM_BUILD_ROOT%{_libdir}/lib{bfd,opcodes}.la
rm %{buildroot}%{_libdir}/lib{bfd,opcodes}.so
rm %{buildroot}%{_libdir}/lib{bfd,opcodes,ctf,ctf-nobfd}.la
# Remove unwanted files to shut up rpm
rm -f $RPM_BUILD_ROOT%{_infodir}/configure* $RPM_BUILD_ROOT%{_infodir}/standards.info*
rm -f $RPM_BUILD_ROOT%{_mandir}/man1/dlltool.1 $RPM_BUILD_ROOT%{_mandir}/man1/windres.1 $RPM_BUILD_ROOT%{_mandir}/man1/windmc.1
rm -f %{buildroot}%{_infodir}/configure* $RPM_BUILD_ROOT%{_infodir}/standards.info*
rm -f %{buildroot}%{_mandir}/man1/dlltool.1 $RPM_BUILD_ROOT%{_mandir}/man1/windres.1 $RPM_BUILD_ROOT%{_mandir}/man1/windmc.1
cd ..
%find_lang binutils
%find_lang bfd binutils.lang
@ -488,45 +482,47 @@ cd ..
%ifarch %gold_archs
%find_lang gold binutils-gold.lang
%endif
mkdir -p $RPM_BUILD_ROOT%{_docdir}/%{name}
install -m 644 binutils/NEWS $RPM_BUILD_ROOT%{_docdir}/%{name}/NEWS-binutils
install -m 644 gas/NEWS $RPM_BUILD_ROOT%{_docdir}/%{name}/NEWS-gas
install -m 644 ld/NEWS $RPM_BUILD_ROOT%{_docdir}/%{name}/NEWS-ld
mkdir -p %{buildroot}%{_docdir}/%{name}
install -m 644 binutils/NEWS %{buildroot}%{_docdir}/%{name}/NEWS-binutils
install -m 644 gas/NEWS %{buildroot}%{_docdir}/%{name}/NEWS-gas
install -m 644 ld/NEWS %{buildroot}%{_docdir}/%{name}/NEWS-ld
%else
# installing cross-TARGET-binutils and TARGET-binutils
make DESTDIR=$RPM_BUILD_ROOT install
make DESTDIR=%{buildroot} install
# Replace hard links by symlinks, so that rpmlint doesn't complain
T=$(basename %buildroot/usr/%{TARGET_OS})
for f in %buildroot/usr/$T/bin/* ; do
T=$(basename %{buildroot}/usr/%{TARGET_OS})
for f in %{buildroot}/usr/$T/bin/* ; do
ln -sf /usr/bin/$T-$(basename $f) $f
done
%if "%{TARGET}" == "arm"
# Instead of building duplicate binutils, add symlinks
for f in %buildroot/usr/$T/bin/* ; do
for f in %{buildroot}%{_bindir}/${T}-* ; do
_toolname=${f##$(dirname $f)/${T}-}
for p in arm-none-eabi; do
ln -sf %{_bindir}/$T-$(basename $f) %buildroot%{_bindir}/$p-$(basename $f)
ln -sf %{_bindir}/$T-${_toolname} %{buildroot}%{_bindir}/$p-${_toolname}
done
done
%endif
%if "%{TARGET}" == "riscv64"
# Instead of building duplicate binutils, add symlinks
for f in %buildroot/usr/$T/bin/* ; do
for f in %{buildroot}/usr/$T/bin/* ; do
for p in riscv64-elf; do
ln -sf %{_bindir}/$T-$(basename $f) %buildroot%{_bindir}/$p-$(basename $f)
ln -sf %{_bindir}/$T-$(basename $f) %{buildroot}%{_bindir}/$p-$(basename $f)
done
done
%endif
%if "%{TARGET}" == "avr"
install -c gas-nesc/as-new $RPM_BUILD_ROOT%{_prefix}/bin/%{TARGET_OS}-nesc-as
ln -sf ../../bin/%{TARGET_OS}-nesc-as $RPM_BUILD_ROOT%{_prefix}/%{TARGET_OS}/bin/nesc-as
install -c gas-nesc/as-new %{buildroot}%{_prefix}/bin/%{TARGET_OS}-nesc-as
ln -sf ../../bin/%{TARGET_OS}-nesc-as %{buildroot}%{_prefix}/%{TARGET_OS}/bin/nesc-as
%endif
rm -rf $RPM_BUILD_ROOT%{_mandir}
rm -rf $RPM_BUILD_ROOT%{_infodir}
rm -rf $RPM_BUILD_ROOT%{_prefix}/lib*
rm -rf $RPM_BUILD_ROOT%{_prefix}/include
rm -f $RPM_BUILD_ROOT%{_prefix}/bin/*-c++filt
rm -rf %{buildroot}%{_mandir}
rm -rf %{buildroot}%{_infodir}
rm -rf %{buildroot}%{_prefix}/lib*
rm -rf %{buildroot}%{_prefix}/include
rm -f %{buildroot}%{_prefix}/bin/*-c++filt
> ../binutils.lang
%endif
%fdupes %{buildroot}%{_prefix}
%if 0%{!?cross:1}
%post
@ -586,8 +582,7 @@ fi;
%postun -n libctf0 -p /sbin/ldconfig
%postun -n libctf-nobfd0 -p /sbin/ldconfig
%postun
/sbin/ldconfig
%postun -p /sbin/ldconfig
%endif
%files -f binutils.lang
@ -641,9 +636,11 @@ fi;
%{_libdir}/libctf-nobfd.so
%files -n libctf0
%defattr(-,root,root)
%{_libdir}/libctf.so.*
%files -n libctf-nobfd0
%defattr(-,root,root)
%{_libdir}/libctf-nobfd.so.*
%endif

View File

@ -1,3 +1,106 @@
-------------------------------------------------------------------
Fri Mar 4 10:44:39 UTC 2022 - Martin Liška <mliska@suse.cz>
- Update binutils-2.38-branch.diff.gz in order to include PR28879.
-------------------------------------------------------------------
Tue Mar 1 12:41:27 UTC 2022 - Michael Matz <matz@suse.com>
- From Stefan Brüns <stefan.bruens@rwth-aachen.de>:
* Install symlinks for all target specific tools on
arm-eabi-none [bsc#1185712]
-------------------------------------------------------------------
Thu Feb 24 09:10:44 UTC 2022 - Martin Liška <mliska@suse.cz>
- Do not re-generate ld/ldlex.c, ld/ldgram.c, ld/ldgram.h and verify
that corresponding flex/bison files are not modified by a patch.
-------------------------------------------------------------------
Thu Feb 24 06:55:14 UTC 2022 - Martin Liška <mliska@suse.cz>
- Use verbose mode for make for cross compilers.
-------------------------------------------------------------------
Wed Feb 23 17:52:15 UTC 2022 - Michael Matz <matz@suse.com>
- Make it build on SLE-11 again.
-------------------------------------------------------------------
Tue Feb 22 09:13:15 UTC 2022 - Martin Liška <mliska@suse.cz>
- Use verbose mode for make.
-------------------------------------------------------------------
Sat Feb 12 19:13:31 UTC 2022 - Martin Liška <mliska@suse.cz>
- Update to binutils 2.38:
* elfedit: Add --output-abiversion option to update ABIVERSION.
* Add support for the LoongArch instruction set.
* Tools which display symbols or strings (readelf, strings, nm, objdump)
have a new command line option which controls how unicode characters are
handled. By default they are treated as normal for the tool. Using
--unicode=locale will display them according to the current locale.
Using --unicode=hex will display them as hex byte values, whilst
--unicode=escape will display them as escape sequences. In addition
using --unicode=highlight will display them as unicode escape sequences
highlighted in red (if supported by the output device).
* readelf -r dumps RELR relative relocations now.
* Support for efi-app-aarch64, efi-rtdrv-aarch64 and efi-bsdrv-aarch64 has been
added to objcopy in order to enable UEFI development using binutils.
* ar: Add --thin for creating thin archives. -T is a deprecated alias without
diagnostics. In many ar implementations -T has a different meaning, as
specified by X/Open System Interface.
* Add support for AArch64 system registers that were missing in previous
releases.
* Add support for the LoongArch instruction set.
* Add a command-line option, -muse-unaligned-vector-move, for x86 target
to encode aligned vector move as unaligned vector move.
* Add support for Cortex-R52+ for Arm.
* Add support for Cortex-A510, Cortex-A710, Cortex-X2 for AArch64.
* Add support for Cortex-A710 for Arm.
* Add support for Scalable Matrix Extension (SME) for AArch64.
* The --multibyte-handling=[allow|warn|warn-sym-only] option tells the
assembler what to when it encoutners multibyte characters in the input. The
default is to allow them. Setting the option to "warn" will generate a
warning message whenever any multibyte character is encountered. Using the
option to "warn-sym-only" will make the assembler generate a warning whenever a
symbol is defined containing multibyte characters. (References to undefined
symbols will not generate warnings).
* Outputs of .ds.x directive and .tfloat directive with hex input from
x86 assembler have been reduced from 12 bytes to 10 bytes to match the
output of .tfloat directive.
* Add support for 'armv8.8-a', 'armv9-a', 'armv9.1-a', 'armv9.2-a' and
'armv9.3-a' for -march in AArch64 GAS.
* Add support for 'armv8.7-a', 'armv8.8-a', 'armv9-a', 'armv9.1-a',
'armv9.2-a' and 'armv9.3-a' for -march in Arm GAS.
* Add support for Intel AVX512_FP16 instructions.
* Add -z pack-relative-relocs/-z no pack-relative-relocs to x86 ELF
linker to pack relative relocations in the DT_RELR section.
* Add support for the LoongArch architecture.
* Add -z indirect-extern-access/-z noindirect-extern-access to x86 ELF
linker to control canonical function pointers and copy relocation.
* Add --max-cache-size=SIZE to set the the maximum cache size to SIZE
bytes.
- Add binutils-2.38-branch.diff.gz.
- Removed deletion of man pages as they should be properly packages
in tarball.
- Rebased patches: aarch64-common-pagesize.patch, add-ulp-section.diff,
binutils-bfd_h.patch, binutils-revert-nm-symversion.diff,
binutils-revert-plt32-in-branches.diff, binutils-skip-rpaths.patch
and binutils-compat-old-behaviour.diff.
-------------------------------------------------------------------
Fri Feb 4 13:13:20 UTC 2022 - Matwey Kornilov <matwey.kornilov@gmail.com>
- Enable PRU architecture for AM335x CPU (Beagle Bone Black board)
-------------------------------------------------------------------
Thu Jan 27 20:36:30 UTC 2022 - Dirk Müller <dmueller@suse.com>
- use fdupes on datadir
- remove RPM_BUILD_ROOT usage and other cleanups
-------------------------------------------------------------------
Fri Nov 12 13:20:09 UTC 2021 - Martin Liška <mliska@suse.cz>

View File

@ -1,7 +1,7 @@
#
# spec file for package cross-rx-binutils
#
# Copyright (c) 2021 SUSE LLC
# Copyright (c) 2022 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@ -23,6 +23,7 @@ ExcludeArch: rx
BuildRequires: bc
BuildRequires: bison
BuildRequires: dejagnu
BuildRequires: fdupes
BuildRequires: flex
BuildRequires: gcc-c++
# for the testsuite
@ -37,7 +38,7 @@ BuildRequires: zlib-devel-static
%else
BuildRequires: zlib-devel
%endif
Version: 2.37
Version: 2.38
Release: 0
# disable libalternatives for now until it's changed to not
@ -75,7 +76,7 @@ Release: 0
%else
%define build_multitarget 0
%endif
%define target_list aarch64 alpha armv5l armv6l armv7l armv8l avr epiphany hppa hppa64 i686 ia64 m68k mips powerpc powerpc64 powerpc64le riscv64 rx s390 s390x sh4 sparc sparc64 x86_64 xtensa
%define target_list aarch64 alpha armv5l armv6l armv7l armv8l avr pru epiphany hppa hppa64 i686 ia64 m68k mips powerpc powerpc64 powerpc64le riscv64 rx s390 s390x sh4 sparc sparc64 x86_64 xtensa
#
#
#
@ -95,7 +96,7 @@ Source5: binutils.keyring
Source1: pre_checkin.sh
Source2: README.First-for.SUSE.packagers
Source3: baselibs.conf
Patch1: binutils-2.37-branch.diff.gz
Patch1: binutils-2.38-branch.diff.gz
Patch3: binutils-skip-rpaths.patch
Patch4: s390-biarch.diff
Patch5: x86-64-biarch.patch
@ -141,7 +142,7 @@ Requires: alts
%else
PreReq: update-alternatives
%endif
%if 0%{!?cross:1}
%if 0%{!?cross:1} && 0%{?suse_version} >= 1310
%define gold_archs %ix86 aarch64 %arm x86_64 ppc ppc64 ppc64le s390x %sparc
%endif
@ -191,6 +192,11 @@ The Compact C Type Format (CTF) is a way of representing information about a bin
%prep
echo "make check will return with %{make_check_handling} in case of testsuite failures."
%setup -q -n binutils-%{version}
# Backup flex and biscon files for later verification.
cp ld/ldlex.l ld/ldlex.l.orig
cp ld/ldgram.y ld/ldgram.y.orig
# Patch is outside test_vanilla because it's supposed to be the
# patch bringing the tarball to the newest upstream version
%patch1 -p1
@ -228,22 +234,11 @@ cp gas/config/tc-avr.h gas/config/tc-avr-nesc.h
#
# test_vanilla
%endif
# in parallel builds, when the flex or bison inputs are patched (possibly
# in the ...-branch.diff) it might happen that the dependency tracking
# of automake is confused and uses the old .c files from srcdir/ld/ while
# also generating the new .c files in builddir/ld leading to trouble.
# I haven't found the right entries to ensure this doesn't happen, so
# simply remove the intermediates
rm -f ld/ldlex.c
rm -f ld/ldgram.c ld/ldgram.h
# The 2.37 released tarball contains wrongly pre-generated (empty) man pages
# so we remove those here as well. Consider removing for later releases.
rm -f binutils/doc/*.1
rm -f binutils/doc/cxxfilt.man
rm -f gprof/*.1
rm -f gas/doc/*.1
rm -f ld/*.1
# Due to legacy flex version present in SLE-12 (and older), we cannot
# re-generate flex and bison files and so we verify that any patch modify these files.
diff -u ld/ldlex.l ld/ldlex.l.orig
diff -u ld/ldgram.y ld/ldgram.y.orig
%build
%define _lto_cflags %{nil}
@ -330,14 +325,14 @@ cd build-dir
# we patch headers (bfd-in.h) that are input to other headers
# which are generated only with --enable-maintainer-mode (which we
# don't do) or explicitely by make headers, so do this:
make %{?_smp_mflags} all-bfd TARGET-bfd=headers
make %{?_smp_mflags} all-bfd TARGET-bfd=headers V=1
# the above interacts with --enable-pgo-build=lto because all-bfd doesn't
# have the PGO handling, hence it's config.cache files are wrong
# remove all of those for reconfigure
rm */config.cache
# force reconfiguring
rm bfd/Makefile
make %{?_smp_mflags}
make %{?_smp_mflags} V=1
%else
# building cross-TARGET-binutils
@ -369,7 +364,7 @@ EXTRA_TARGETS="$EXTRA_TARGETS,arm-suse-linux-gnueabi"
%if "%{TARGET}" == "aarch64"
EXTRA_TARGETS="$EXTRA_TARGETS,aarch64-suse-linux"
%endif
%if "%{TARGET}" == "avr" || "%{TARGET}" == "spu"
%if "%{TARGET}" == "avr" || "%{TARGET}" == "spu" || "%{TARGET}" == "pru"
%define TARGET_OS %{TARGET}
%else
%if "%{TARGET}" == "epiphany" || "%{TARGET}" == "riscv32" || "%{TARGET}" == "rx"
@ -403,11 +398,11 @@ EXTRA_TARGETS="$EXTRA_TARGETS,aarch64-suse-linux"
--enable-default-hash-style=both \
%endif
${EXTRA_TARGETS:+--enable-targets="${EXTRA_TARGETS#,}"}
make %{?_smp_mflags} all-bfd TARGET-bfd=headers
make %{?_smp_mflags} all-bfd TARGET-bfd=headers V=1
rm */config.cache
# force reconfiguring
rm bfd/Makefile
make %{?_smp_mflags}
make %{?_smp_mflags} V=1
%if "%{TARGET}" == "avr"
# build an extra nesC version because nesC requires $'s in identifiers
cp -a gas gas-nesc
@ -431,26 +426,25 @@ cd build-dir
%if 0%{!?cross:1}
# installing native binutils
%ifarch %gold_archs
make DESTDIR=$RPM_BUILD_ROOT install-gold
ln -sf ld.gold $RPM_BUILD_ROOT%{_bindir}/gold
make DESTDIR=%{buildroot} install-gold
ln -sf ld.gold %{buildroot}%{_bindir}/gold
%endif
make DESTDIR=$RPM_BUILD_ROOT install-info install
make -C gas/doc DESTDIR=$RPM_BUILD_ROOT install-info-am install-am
make DESTDIR=$RPM_BUILD_ROOT install-bfd install-opcodes
if [ ! -f "%buildroot/%_bindir/ld.bfd" ]; then
mv "%buildroot/%_bindir"/{ld,ld.bfd};
make DESTDIR=%{buildroot} install-info install
make DESTDIR=%{buildroot} install-bfd install-opcodes
if [ ! -f "%{buildroot}/%_bindir/ld.bfd" ]; then
mv "%{buildroot}/%_bindir"/{ld,ld.bfd};
else
rm -f "%buildroot/%_bindir/ld";
rm -f "%{buildroot}/%_bindir/ld";
fi
%if ! 0%{with libalternatives}
mkdir -p "%buildroot/%_sysconfdir/alternatives";
mkdir -p "%{buildroot}/%_sysconfdir/alternatives";
# Keep older versions of brp-symlink happy
%if %{suse_version} < 1310
ln -s "%_bindir/ld" "%buildroot/%_sysconfdir/alternatives/ld"
ln -s "%_bindir/ld" "%{buildroot}/%_sysconfdir/alternatives/ld"
%endif
ln -s "%_sysconfdir/alternatives/ld" "%buildroot/%_bindir/ld";
ln -s "%_sysconfdir/alternatives/ld" "%{buildroot}/%_bindir/ld";
%else
ln -s %{_bindir}/alts "%buildroot/%_bindir/ld";
ln -s %{_bindir}/alts "%{buildroot}/%_bindir/ld";
mkdir -p %{buildroot}%{_datadir}/libalternatives/ld;
cat > %{buildroot}%{_datadir}/libalternatives/ld/1.conf <<EOF
binary=%{_bindir}/ld.gold
@ -460,24 +454,24 @@ binary=%{_bindir}/ld.bfd
EOF
%endif
rm -rf $RPM_BUILD_ROOT%{_prefix}/%{HOST}/bin
mkdir -p $RPM_BUILD_ROOT%{_prefix}/%{HOST}/bin
ln -sf ../../bin/{ar,as,ld,nm,ranlib,strip} $RPM_BUILD_ROOT%{_prefix}/%{HOST}/bin
mv $RPM_BUILD_ROOT%{_prefix}/%{HOST}/lib/ldscripts $RPM_BUILD_ROOT%{_libdir}
ln -sf ../../%{_lib}/ldscripts $RPM_BUILD_ROOT%{_prefix}/%{HOST}/lib/ldscripts
rm -rf %{buildroot}%{_prefix}/%{HOST}/bin
mkdir -p %{buildroot}%{_prefix}/%{HOST}/bin
ln -sf ../../bin/{ar,as,ld,nm,ranlib,strip} %{buildroot}%{_prefix}/%{HOST}/bin
mv %{buildroot}%{_prefix}/%{HOST}/lib/ldscripts $RPM_BUILD_ROOT%{_libdir}
ln -sf ../../%{_lib}/ldscripts %{buildroot}%{_prefix}/%{HOST}/lib/ldscripts
# Install header files
make -C libiberty install_to_libdir target_header_dir=/usr/include DESTDIR=$RPM_BUILD_ROOT
make -C libiberty install_to_libdir target_header_dir=/usr/include DESTDIR=%{buildroot}
# We want the PIC libiberty.a
install -m 644 libiberty/pic/libiberty.a $RPM_BUILD_ROOT%{_libdir}
install -m 644 libiberty/pic/libiberty.a %{buildroot}%{_libdir}
#
chmod a+x $RPM_BUILD_ROOT%{_libdir}/libbfd-*
chmod a+x $RPM_BUILD_ROOT%{_libdir}/libopcodes-*
chmod a+x %{buildroot}%{_libdir}/libbfd-*
chmod a+x %{buildroot}%{_libdir}/libopcodes-*
# No shared linking outside binutils
rm $RPM_BUILD_ROOT%{_libdir}/lib{bfd,opcodes}.so
rm $RPM_BUILD_ROOT%{_libdir}/lib{bfd,opcodes}.la
rm %{buildroot}%{_libdir}/lib{bfd,opcodes}.so
rm %{buildroot}%{_libdir}/lib{bfd,opcodes,ctf,ctf-nobfd}.la
# Remove unwanted files to shut up rpm
rm -f $RPM_BUILD_ROOT%{_infodir}/configure* $RPM_BUILD_ROOT%{_infodir}/standards.info*
rm -f $RPM_BUILD_ROOT%{_mandir}/man1/dlltool.1 $RPM_BUILD_ROOT%{_mandir}/man1/windres.1 $RPM_BUILD_ROOT%{_mandir}/man1/windmc.1
rm -f %{buildroot}%{_infodir}/configure* $RPM_BUILD_ROOT%{_infodir}/standards.info*
rm -f %{buildroot}%{_mandir}/man1/dlltool.1 $RPM_BUILD_ROOT%{_mandir}/man1/windres.1 $RPM_BUILD_ROOT%{_mandir}/man1/windmc.1
cd ..
%find_lang binutils
%find_lang bfd binutils.lang
@ -488,45 +482,47 @@ cd ..
%ifarch %gold_archs
%find_lang gold binutils-gold.lang
%endif
mkdir -p $RPM_BUILD_ROOT%{_docdir}/%{name}
install -m 644 binutils/NEWS $RPM_BUILD_ROOT%{_docdir}/%{name}/NEWS-binutils
install -m 644 gas/NEWS $RPM_BUILD_ROOT%{_docdir}/%{name}/NEWS-gas
install -m 644 ld/NEWS $RPM_BUILD_ROOT%{_docdir}/%{name}/NEWS-ld
mkdir -p %{buildroot}%{_docdir}/%{name}
install -m 644 binutils/NEWS %{buildroot}%{_docdir}/%{name}/NEWS-binutils
install -m 644 gas/NEWS %{buildroot}%{_docdir}/%{name}/NEWS-gas
install -m 644 ld/NEWS %{buildroot}%{_docdir}/%{name}/NEWS-ld
%else
# installing cross-TARGET-binutils and TARGET-binutils
make DESTDIR=$RPM_BUILD_ROOT install
make DESTDIR=%{buildroot} install
# Replace hard links by symlinks, so that rpmlint doesn't complain
T=$(basename %buildroot/usr/%{TARGET_OS})
for f in %buildroot/usr/$T/bin/* ; do
T=$(basename %{buildroot}/usr/%{TARGET_OS})
for f in %{buildroot}/usr/$T/bin/* ; do
ln -sf /usr/bin/$T-$(basename $f) $f
done
%if "%{TARGET}" == "arm"
# Instead of building duplicate binutils, add symlinks
for f in %buildroot/usr/$T/bin/* ; do
for f in %{buildroot}%{_bindir}/${T}-* ; do
_toolname=${f##$(dirname $f)/${T}-}
for p in arm-none-eabi; do
ln -sf %{_bindir}/$T-$(basename $f) %buildroot%{_bindir}/$p-$(basename $f)
ln -sf %{_bindir}/$T-${_toolname} %{buildroot}%{_bindir}/$p-${_toolname}
done
done
%endif
%if "%{TARGET}" == "riscv64"
# Instead of building duplicate binutils, add symlinks
for f in %buildroot/usr/$T/bin/* ; do
for f in %{buildroot}/usr/$T/bin/* ; do
for p in riscv64-elf; do
ln -sf %{_bindir}/$T-$(basename $f) %buildroot%{_bindir}/$p-$(basename $f)
ln -sf %{_bindir}/$T-$(basename $f) %{buildroot}%{_bindir}/$p-$(basename $f)
done
done
%endif
%if "%{TARGET}" == "avr"
install -c gas-nesc/as-new $RPM_BUILD_ROOT%{_prefix}/bin/%{TARGET_OS}-nesc-as
ln -sf ../../bin/%{TARGET_OS}-nesc-as $RPM_BUILD_ROOT%{_prefix}/%{TARGET_OS}/bin/nesc-as
install -c gas-nesc/as-new %{buildroot}%{_prefix}/bin/%{TARGET_OS}-nesc-as
ln -sf ../../bin/%{TARGET_OS}-nesc-as %{buildroot}%{_prefix}/%{TARGET_OS}/bin/nesc-as
%endif
rm -rf $RPM_BUILD_ROOT%{_mandir}
rm -rf $RPM_BUILD_ROOT%{_infodir}
rm -rf $RPM_BUILD_ROOT%{_prefix}/lib*
rm -rf $RPM_BUILD_ROOT%{_prefix}/include
rm -f $RPM_BUILD_ROOT%{_prefix}/bin/*-c++filt
rm -rf %{buildroot}%{_mandir}
rm -rf %{buildroot}%{_infodir}
rm -rf %{buildroot}%{_prefix}/lib*
rm -rf %{buildroot}%{_prefix}/include
rm -f %{buildroot}%{_prefix}/bin/*-c++filt
> ../binutils.lang
%endif
%fdupes %{buildroot}%{_prefix}
%if 0%{!?cross:1}
%post
@ -586,8 +582,7 @@ fi;
%postun -n libctf0 -p /sbin/ldconfig
%postun -n libctf-nobfd0 -p /sbin/ldconfig
%postun
/sbin/ldconfig
%postun -p /sbin/ldconfig
%endif
%files -f binutils.lang
@ -641,9 +636,11 @@ fi;
%{_libdir}/libctf-nobfd.so
%files -n libctf0
%defattr(-,root,root)
%{_libdir}/libctf.so.*
%files -n libctf-nobfd0
%defattr(-,root,root)
%{_libdir}/libctf-nobfd.so.*
%endif

View File

@ -1,3 +1,106 @@
-------------------------------------------------------------------
Fri Mar 4 10:44:39 UTC 2022 - Martin Liška <mliska@suse.cz>
- Update binutils-2.38-branch.diff.gz in order to include PR28879.
-------------------------------------------------------------------
Tue Mar 1 12:41:27 UTC 2022 - Michael Matz <matz@suse.com>
- From Stefan Brüns <stefan.bruens@rwth-aachen.de>:
* Install symlinks for all target specific tools on
arm-eabi-none [bsc#1185712]
-------------------------------------------------------------------
Thu Feb 24 09:10:44 UTC 2022 - Martin Liška <mliska@suse.cz>
- Do not re-generate ld/ldlex.c, ld/ldgram.c, ld/ldgram.h and verify
that corresponding flex/bison files are not modified by a patch.
-------------------------------------------------------------------
Thu Feb 24 06:55:14 UTC 2022 - Martin Liška <mliska@suse.cz>
- Use verbose mode for make for cross compilers.
-------------------------------------------------------------------
Wed Feb 23 17:52:15 UTC 2022 - Michael Matz <matz@suse.com>
- Make it build on SLE-11 again.
-------------------------------------------------------------------
Tue Feb 22 09:13:15 UTC 2022 - Martin Liška <mliska@suse.cz>
- Use verbose mode for make.
-------------------------------------------------------------------
Sat Feb 12 19:13:31 UTC 2022 - Martin Liška <mliska@suse.cz>
- Update to binutils 2.38:
* elfedit: Add --output-abiversion option to update ABIVERSION.
* Add support for the LoongArch instruction set.
* Tools which display symbols or strings (readelf, strings, nm, objdump)
have a new command line option which controls how unicode characters are
handled. By default they are treated as normal for the tool. Using
--unicode=locale will display them according to the current locale.
Using --unicode=hex will display them as hex byte values, whilst
--unicode=escape will display them as escape sequences. In addition
using --unicode=highlight will display them as unicode escape sequences
highlighted in red (if supported by the output device).
* readelf -r dumps RELR relative relocations now.
* Support for efi-app-aarch64, efi-rtdrv-aarch64 and efi-bsdrv-aarch64 has been
added to objcopy in order to enable UEFI development using binutils.
* ar: Add --thin for creating thin archives. -T is a deprecated alias without
diagnostics. In many ar implementations -T has a different meaning, as
specified by X/Open System Interface.
* Add support for AArch64 system registers that were missing in previous
releases.
* Add support for the LoongArch instruction set.
* Add a command-line option, -muse-unaligned-vector-move, for x86 target
to encode aligned vector move as unaligned vector move.
* Add support for Cortex-R52+ for Arm.
* Add support for Cortex-A510, Cortex-A710, Cortex-X2 for AArch64.
* Add support for Cortex-A710 for Arm.
* Add support for Scalable Matrix Extension (SME) for AArch64.
* The --multibyte-handling=[allow|warn|warn-sym-only] option tells the
assembler what to when it encoutners multibyte characters in the input. The
default is to allow them. Setting the option to "warn" will generate a
warning message whenever any multibyte character is encountered. Using the
option to "warn-sym-only" will make the assembler generate a warning whenever a
symbol is defined containing multibyte characters. (References to undefined
symbols will not generate warnings).
* Outputs of .ds.x directive and .tfloat directive with hex input from
x86 assembler have been reduced from 12 bytes to 10 bytes to match the
output of .tfloat directive.
* Add support for 'armv8.8-a', 'armv9-a', 'armv9.1-a', 'armv9.2-a' and
'armv9.3-a' for -march in AArch64 GAS.
* Add support for 'armv8.7-a', 'armv8.8-a', 'armv9-a', 'armv9.1-a',
'armv9.2-a' and 'armv9.3-a' for -march in Arm GAS.
* Add support for Intel AVX512_FP16 instructions.
* Add -z pack-relative-relocs/-z no pack-relative-relocs to x86 ELF
linker to pack relative relocations in the DT_RELR section.
* Add support for the LoongArch architecture.
* Add -z indirect-extern-access/-z noindirect-extern-access to x86 ELF
linker to control canonical function pointers and copy relocation.
* Add --max-cache-size=SIZE to set the the maximum cache size to SIZE
bytes.
- Add binutils-2.38-branch.diff.gz.
- Removed deletion of man pages as they should be properly packages
in tarball.
- Rebased patches: aarch64-common-pagesize.patch, add-ulp-section.diff,
binutils-bfd_h.patch, binutils-revert-nm-symversion.diff,
binutils-revert-plt32-in-branches.diff, binutils-skip-rpaths.patch
and binutils-compat-old-behaviour.diff.
-------------------------------------------------------------------
Fri Feb 4 13:13:20 UTC 2022 - Matwey Kornilov <matwey.kornilov@gmail.com>
- Enable PRU architecture for AM335x CPU (Beagle Bone Black board)
-------------------------------------------------------------------
Thu Jan 27 20:36:30 UTC 2022 - Dirk Müller <dmueller@suse.com>
- use fdupes on datadir
- remove RPM_BUILD_ROOT usage and other cleanups
-------------------------------------------------------------------
Fri Nov 12 13:20:09 UTC 2021 - Martin Liška <mliska@suse.cz>

View File

@ -1,7 +1,7 @@
#
# spec file for package cross-s390-binutils
#
# Copyright (c) 2021 SUSE LLC
# Copyright (c) 2022 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@ -23,6 +23,7 @@ ExcludeArch: s390
BuildRequires: bc
BuildRequires: bison
BuildRequires: dejagnu
BuildRequires: fdupes
BuildRequires: flex
BuildRequires: gcc-c++
# for the testsuite
@ -37,7 +38,7 @@ BuildRequires: zlib-devel-static
%else
BuildRequires: zlib-devel
%endif
Version: 2.37
Version: 2.38
Release: 0
# disable libalternatives for now until it's changed to not
@ -75,7 +76,7 @@ Release: 0
%else
%define build_multitarget 0
%endif
%define target_list aarch64 alpha armv5l armv6l armv7l armv8l avr epiphany hppa hppa64 i686 ia64 m68k mips powerpc powerpc64 powerpc64le riscv64 rx s390 s390x sh4 sparc sparc64 x86_64 xtensa
%define target_list aarch64 alpha armv5l armv6l armv7l armv8l avr pru epiphany hppa hppa64 i686 ia64 m68k mips powerpc powerpc64 powerpc64le riscv64 rx s390 s390x sh4 sparc sparc64 x86_64 xtensa
#
#
#
@ -95,7 +96,7 @@ Source5: binutils.keyring
Source1: pre_checkin.sh
Source2: README.First-for.SUSE.packagers
Source3: baselibs.conf
Patch1: binutils-2.37-branch.diff.gz
Patch1: binutils-2.38-branch.diff.gz
Patch3: binutils-skip-rpaths.patch
Patch4: s390-biarch.diff
Patch5: x86-64-biarch.patch
@ -141,7 +142,7 @@ Requires: alts
%else
PreReq: update-alternatives
%endif
%if 0%{!?cross:1}
%if 0%{!?cross:1} && 0%{?suse_version} >= 1310
%define gold_archs %ix86 aarch64 %arm x86_64 ppc ppc64 ppc64le s390x %sparc
%endif
@ -191,6 +192,11 @@ The Compact C Type Format (CTF) is a way of representing information about a bin
%prep
echo "make check will return with %{make_check_handling} in case of testsuite failures."
%setup -q -n binutils-%{version}
# Backup flex and biscon files for later verification.
cp ld/ldlex.l ld/ldlex.l.orig
cp ld/ldgram.y ld/ldgram.y.orig
# Patch is outside test_vanilla because it's supposed to be the
# patch bringing the tarball to the newest upstream version
%patch1 -p1
@ -228,22 +234,11 @@ cp gas/config/tc-avr.h gas/config/tc-avr-nesc.h
#
# test_vanilla
%endif
# in parallel builds, when the flex or bison inputs are patched (possibly
# in the ...-branch.diff) it might happen that the dependency tracking
# of automake is confused and uses the old .c files from srcdir/ld/ while
# also generating the new .c files in builddir/ld leading to trouble.
# I haven't found the right entries to ensure this doesn't happen, so
# simply remove the intermediates
rm -f ld/ldlex.c
rm -f ld/ldgram.c ld/ldgram.h
# The 2.37 released tarball contains wrongly pre-generated (empty) man pages
# so we remove those here as well. Consider removing for later releases.
rm -f binutils/doc/*.1
rm -f binutils/doc/cxxfilt.man
rm -f gprof/*.1
rm -f gas/doc/*.1
rm -f ld/*.1
# Due to legacy flex version present in SLE-12 (and older), we cannot
# re-generate flex and bison files and so we verify that any patch modify these files.
diff -u ld/ldlex.l ld/ldlex.l.orig
diff -u ld/ldgram.y ld/ldgram.y.orig
%build
%define _lto_cflags %{nil}
@ -330,14 +325,14 @@ cd build-dir
# we patch headers (bfd-in.h) that are input to other headers
# which are generated only with --enable-maintainer-mode (which we
# don't do) or explicitely by make headers, so do this:
make %{?_smp_mflags} all-bfd TARGET-bfd=headers
make %{?_smp_mflags} all-bfd TARGET-bfd=headers V=1
# the above interacts with --enable-pgo-build=lto because all-bfd doesn't
# have the PGO handling, hence it's config.cache files are wrong
# remove all of those for reconfigure
rm */config.cache
# force reconfiguring
rm bfd/Makefile
make %{?_smp_mflags}
make %{?_smp_mflags} V=1
%else
# building cross-TARGET-binutils
@ -369,7 +364,7 @@ EXTRA_TARGETS="$EXTRA_TARGETS,arm-suse-linux-gnueabi"
%if "%{TARGET}" == "aarch64"
EXTRA_TARGETS="$EXTRA_TARGETS,aarch64-suse-linux"
%endif
%if "%{TARGET}" == "avr" || "%{TARGET}" == "spu"
%if "%{TARGET}" == "avr" || "%{TARGET}" == "spu" || "%{TARGET}" == "pru"
%define TARGET_OS %{TARGET}
%else
%if "%{TARGET}" == "epiphany" || "%{TARGET}" == "riscv32" || "%{TARGET}" == "rx"
@ -403,11 +398,11 @@ EXTRA_TARGETS="$EXTRA_TARGETS,aarch64-suse-linux"
--enable-default-hash-style=both \
%endif
${EXTRA_TARGETS:+--enable-targets="${EXTRA_TARGETS#,}"}
make %{?_smp_mflags} all-bfd TARGET-bfd=headers
make %{?_smp_mflags} all-bfd TARGET-bfd=headers V=1
rm */config.cache
# force reconfiguring
rm bfd/Makefile
make %{?_smp_mflags}
make %{?_smp_mflags} V=1
%if "%{TARGET}" == "avr"
# build an extra nesC version because nesC requires $'s in identifiers
cp -a gas gas-nesc
@ -431,26 +426,25 @@ cd build-dir
%if 0%{!?cross:1}
# installing native binutils
%ifarch %gold_archs
make DESTDIR=$RPM_BUILD_ROOT install-gold
ln -sf ld.gold $RPM_BUILD_ROOT%{_bindir}/gold
make DESTDIR=%{buildroot} install-gold
ln -sf ld.gold %{buildroot}%{_bindir}/gold
%endif
make DESTDIR=$RPM_BUILD_ROOT install-info install
make -C gas/doc DESTDIR=$RPM_BUILD_ROOT install-info-am install-am
make DESTDIR=$RPM_BUILD_ROOT install-bfd install-opcodes
if [ ! -f "%buildroot/%_bindir/ld.bfd" ]; then
mv "%buildroot/%_bindir"/{ld,ld.bfd};
make DESTDIR=%{buildroot} install-info install
make DESTDIR=%{buildroot} install-bfd install-opcodes
if [ ! -f "%{buildroot}/%_bindir/ld.bfd" ]; then
mv "%{buildroot}/%_bindir"/{ld,ld.bfd};
else
rm -f "%buildroot/%_bindir/ld";
rm -f "%{buildroot}/%_bindir/ld";
fi
%if ! 0%{with libalternatives}
mkdir -p "%buildroot/%_sysconfdir/alternatives";
mkdir -p "%{buildroot}/%_sysconfdir/alternatives";
# Keep older versions of brp-symlink happy
%if %{suse_version} < 1310
ln -s "%_bindir/ld" "%buildroot/%_sysconfdir/alternatives/ld"
ln -s "%_bindir/ld" "%{buildroot}/%_sysconfdir/alternatives/ld"
%endif
ln -s "%_sysconfdir/alternatives/ld" "%buildroot/%_bindir/ld";
ln -s "%_sysconfdir/alternatives/ld" "%{buildroot}/%_bindir/ld";
%else
ln -s %{_bindir}/alts "%buildroot/%_bindir/ld";
ln -s %{_bindir}/alts "%{buildroot}/%_bindir/ld";
mkdir -p %{buildroot}%{_datadir}/libalternatives/ld;
cat > %{buildroot}%{_datadir}/libalternatives/ld/1.conf <<EOF
binary=%{_bindir}/ld.gold
@ -460,24 +454,24 @@ binary=%{_bindir}/ld.bfd
EOF
%endif
rm -rf $RPM_BUILD_ROOT%{_prefix}/%{HOST}/bin
mkdir -p $RPM_BUILD_ROOT%{_prefix}/%{HOST}/bin
ln -sf ../../bin/{ar,as,ld,nm,ranlib,strip} $RPM_BUILD_ROOT%{_prefix}/%{HOST}/bin
mv $RPM_BUILD_ROOT%{_prefix}/%{HOST}/lib/ldscripts $RPM_BUILD_ROOT%{_libdir}
ln -sf ../../%{_lib}/ldscripts $RPM_BUILD_ROOT%{_prefix}/%{HOST}/lib/ldscripts
rm -rf %{buildroot}%{_prefix}/%{HOST}/bin
mkdir -p %{buildroot}%{_prefix}/%{HOST}/bin
ln -sf ../../bin/{ar,as,ld,nm,ranlib,strip} %{buildroot}%{_prefix}/%{HOST}/bin
mv %{buildroot}%{_prefix}/%{HOST}/lib/ldscripts $RPM_BUILD_ROOT%{_libdir}
ln -sf ../../%{_lib}/ldscripts %{buildroot}%{_prefix}/%{HOST}/lib/ldscripts
# Install header files
make -C libiberty install_to_libdir target_header_dir=/usr/include DESTDIR=$RPM_BUILD_ROOT
make -C libiberty install_to_libdir target_header_dir=/usr/include DESTDIR=%{buildroot}
# We want the PIC libiberty.a
install -m 644 libiberty/pic/libiberty.a $RPM_BUILD_ROOT%{_libdir}
install -m 644 libiberty/pic/libiberty.a %{buildroot}%{_libdir}
#
chmod a+x $RPM_BUILD_ROOT%{_libdir}/libbfd-*
chmod a+x $RPM_BUILD_ROOT%{_libdir}/libopcodes-*
chmod a+x %{buildroot}%{_libdir}/libbfd-*
chmod a+x %{buildroot}%{_libdir}/libopcodes-*
# No shared linking outside binutils
rm $RPM_BUILD_ROOT%{_libdir}/lib{bfd,opcodes}.so
rm $RPM_BUILD_ROOT%{_libdir}/lib{bfd,opcodes}.la
rm %{buildroot}%{_libdir}/lib{bfd,opcodes}.so
rm %{buildroot}%{_libdir}/lib{bfd,opcodes,ctf,ctf-nobfd}.la
# Remove unwanted files to shut up rpm
rm -f $RPM_BUILD_ROOT%{_infodir}/configure* $RPM_BUILD_ROOT%{_infodir}/standards.info*
rm -f $RPM_BUILD_ROOT%{_mandir}/man1/dlltool.1 $RPM_BUILD_ROOT%{_mandir}/man1/windres.1 $RPM_BUILD_ROOT%{_mandir}/man1/windmc.1
rm -f %{buildroot}%{_infodir}/configure* $RPM_BUILD_ROOT%{_infodir}/standards.info*
rm -f %{buildroot}%{_mandir}/man1/dlltool.1 $RPM_BUILD_ROOT%{_mandir}/man1/windres.1 $RPM_BUILD_ROOT%{_mandir}/man1/windmc.1
cd ..
%find_lang binutils
%find_lang bfd binutils.lang
@ -488,45 +482,47 @@ cd ..
%ifarch %gold_archs
%find_lang gold binutils-gold.lang
%endif
mkdir -p $RPM_BUILD_ROOT%{_docdir}/%{name}
install -m 644 binutils/NEWS $RPM_BUILD_ROOT%{_docdir}/%{name}/NEWS-binutils
install -m 644 gas/NEWS $RPM_BUILD_ROOT%{_docdir}/%{name}/NEWS-gas
install -m 644 ld/NEWS $RPM_BUILD_ROOT%{_docdir}/%{name}/NEWS-ld
mkdir -p %{buildroot}%{_docdir}/%{name}
install -m 644 binutils/NEWS %{buildroot}%{_docdir}/%{name}/NEWS-binutils
install -m 644 gas/NEWS %{buildroot}%{_docdir}/%{name}/NEWS-gas
install -m 644 ld/NEWS %{buildroot}%{_docdir}/%{name}/NEWS-ld
%else
# installing cross-TARGET-binutils and TARGET-binutils
make DESTDIR=$RPM_BUILD_ROOT install
make DESTDIR=%{buildroot} install
# Replace hard links by symlinks, so that rpmlint doesn't complain
T=$(basename %buildroot/usr/%{TARGET_OS})
for f in %buildroot/usr/$T/bin/* ; do
T=$(basename %{buildroot}/usr/%{TARGET_OS})
for f in %{buildroot}/usr/$T/bin/* ; do
ln -sf /usr/bin/$T-$(basename $f) $f
done
%if "%{TARGET}" == "arm"
# Instead of building duplicate binutils, add symlinks
for f in %buildroot/usr/$T/bin/* ; do
for f in %{buildroot}%{_bindir}/${T}-* ; do
_toolname=${f##$(dirname $f)/${T}-}
for p in arm-none-eabi; do
ln -sf %{_bindir}/$T-$(basename $f) %buildroot%{_bindir}/$p-$(basename $f)
ln -sf %{_bindir}/$T-${_toolname} %{buildroot}%{_bindir}/$p-${_toolname}
done
done
%endif
%if "%{TARGET}" == "riscv64"
# Instead of building duplicate binutils, add symlinks
for f in %buildroot/usr/$T/bin/* ; do
for f in %{buildroot}/usr/$T/bin/* ; do
for p in riscv64-elf; do
ln -sf %{_bindir}/$T-$(basename $f) %buildroot%{_bindir}/$p-$(basename $f)
ln -sf %{_bindir}/$T-$(basename $f) %{buildroot}%{_bindir}/$p-$(basename $f)
done
done
%endif
%if "%{TARGET}" == "avr"
install -c gas-nesc/as-new $RPM_BUILD_ROOT%{_prefix}/bin/%{TARGET_OS}-nesc-as
ln -sf ../../bin/%{TARGET_OS}-nesc-as $RPM_BUILD_ROOT%{_prefix}/%{TARGET_OS}/bin/nesc-as
install -c gas-nesc/as-new %{buildroot}%{_prefix}/bin/%{TARGET_OS}-nesc-as
ln -sf ../../bin/%{TARGET_OS}-nesc-as %{buildroot}%{_prefix}/%{TARGET_OS}/bin/nesc-as
%endif
rm -rf $RPM_BUILD_ROOT%{_mandir}
rm -rf $RPM_BUILD_ROOT%{_infodir}
rm -rf $RPM_BUILD_ROOT%{_prefix}/lib*
rm -rf $RPM_BUILD_ROOT%{_prefix}/include
rm -f $RPM_BUILD_ROOT%{_prefix}/bin/*-c++filt
rm -rf %{buildroot}%{_mandir}
rm -rf %{buildroot}%{_infodir}
rm -rf %{buildroot}%{_prefix}/lib*
rm -rf %{buildroot}%{_prefix}/include
rm -f %{buildroot}%{_prefix}/bin/*-c++filt
> ../binutils.lang
%endif
%fdupes %{buildroot}%{_prefix}
%if 0%{!?cross:1}
%post
@ -586,8 +582,7 @@ fi;
%postun -n libctf0 -p /sbin/ldconfig
%postun -n libctf-nobfd0 -p /sbin/ldconfig
%postun
/sbin/ldconfig
%postun -p /sbin/ldconfig
%endif
%files -f binutils.lang
@ -641,9 +636,11 @@ fi;
%{_libdir}/libctf-nobfd.so
%files -n libctf0
%defattr(-,root,root)
%{_libdir}/libctf.so.*
%files -n libctf-nobfd0
%defattr(-,root,root)
%{_libdir}/libctf-nobfd.so.*
%endif

View File

@ -1,3 +1,106 @@
-------------------------------------------------------------------
Fri Mar 4 10:44:39 UTC 2022 - Martin Liška <mliska@suse.cz>
- Update binutils-2.38-branch.diff.gz in order to include PR28879.
-------------------------------------------------------------------
Tue Mar 1 12:41:27 UTC 2022 - Michael Matz <matz@suse.com>
- From Stefan Brüns <stefan.bruens@rwth-aachen.de>:
* Install symlinks for all target specific tools on
arm-eabi-none [bsc#1185712]
-------------------------------------------------------------------
Thu Feb 24 09:10:44 UTC 2022 - Martin Liška <mliska@suse.cz>
- Do not re-generate ld/ldlex.c, ld/ldgram.c, ld/ldgram.h and verify
that corresponding flex/bison files are not modified by a patch.
-------------------------------------------------------------------
Thu Feb 24 06:55:14 UTC 2022 - Martin Liška <mliska@suse.cz>
- Use verbose mode for make for cross compilers.
-------------------------------------------------------------------
Wed Feb 23 17:52:15 UTC 2022 - Michael Matz <matz@suse.com>
- Make it build on SLE-11 again.
-------------------------------------------------------------------
Tue Feb 22 09:13:15 UTC 2022 - Martin Liška <mliska@suse.cz>
- Use verbose mode for make.
-------------------------------------------------------------------
Sat Feb 12 19:13:31 UTC 2022 - Martin Liška <mliska@suse.cz>
- Update to binutils 2.38:
* elfedit: Add --output-abiversion option to update ABIVERSION.
* Add support for the LoongArch instruction set.
* Tools which display symbols or strings (readelf, strings, nm, objdump)
have a new command line option which controls how unicode characters are
handled. By default they are treated as normal for the tool. Using
--unicode=locale will display them according to the current locale.
Using --unicode=hex will display them as hex byte values, whilst
--unicode=escape will display them as escape sequences. In addition
using --unicode=highlight will display them as unicode escape sequences
highlighted in red (if supported by the output device).
* readelf -r dumps RELR relative relocations now.
* Support for efi-app-aarch64, efi-rtdrv-aarch64 and efi-bsdrv-aarch64 has been
added to objcopy in order to enable UEFI development using binutils.
* ar: Add --thin for creating thin archives. -T is a deprecated alias without
diagnostics. In many ar implementations -T has a different meaning, as
specified by X/Open System Interface.
* Add support for AArch64 system registers that were missing in previous
releases.
* Add support for the LoongArch instruction set.
* Add a command-line option, -muse-unaligned-vector-move, for x86 target
to encode aligned vector move as unaligned vector move.
* Add support for Cortex-R52+ for Arm.
* Add support for Cortex-A510, Cortex-A710, Cortex-X2 for AArch64.
* Add support for Cortex-A710 for Arm.
* Add support for Scalable Matrix Extension (SME) for AArch64.
* The --multibyte-handling=[allow|warn|warn-sym-only] option tells the
assembler what to when it encoutners multibyte characters in the input. The
default is to allow them. Setting the option to "warn" will generate a
warning message whenever any multibyte character is encountered. Using the
option to "warn-sym-only" will make the assembler generate a warning whenever a
symbol is defined containing multibyte characters. (References to undefined
symbols will not generate warnings).
* Outputs of .ds.x directive and .tfloat directive with hex input from
x86 assembler have been reduced from 12 bytes to 10 bytes to match the
output of .tfloat directive.
* Add support for 'armv8.8-a', 'armv9-a', 'armv9.1-a', 'armv9.2-a' and
'armv9.3-a' for -march in AArch64 GAS.
* Add support for 'armv8.7-a', 'armv8.8-a', 'armv9-a', 'armv9.1-a',
'armv9.2-a' and 'armv9.3-a' for -march in Arm GAS.
* Add support for Intel AVX512_FP16 instructions.
* Add -z pack-relative-relocs/-z no pack-relative-relocs to x86 ELF
linker to pack relative relocations in the DT_RELR section.
* Add support for the LoongArch architecture.
* Add -z indirect-extern-access/-z noindirect-extern-access to x86 ELF
linker to control canonical function pointers and copy relocation.
* Add --max-cache-size=SIZE to set the the maximum cache size to SIZE
bytes.
- Add binutils-2.38-branch.diff.gz.
- Removed deletion of man pages as they should be properly packages
in tarball.
- Rebased patches: aarch64-common-pagesize.patch, add-ulp-section.diff,
binutils-bfd_h.patch, binutils-revert-nm-symversion.diff,
binutils-revert-plt32-in-branches.diff, binutils-skip-rpaths.patch
and binutils-compat-old-behaviour.diff.
-------------------------------------------------------------------
Fri Feb 4 13:13:20 UTC 2022 - Matwey Kornilov <matwey.kornilov@gmail.com>
- Enable PRU architecture for AM335x CPU (Beagle Bone Black board)
-------------------------------------------------------------------
Thu Jan 27 20:36:30 UTC 2022 - Dirk Müller <dmueller@suse.com>
- use fdupes on datadir
- remove RPM_BUILD_ROOT usage and other cleanups
-------------------------------------------------------------------
Fri Nov 12 13:20:09 UTC 2021 - Martin Liška <mliska@suse.cz>

View File

@ -1,7 +1,7 @@
#
# spec file for package cross-s390x-binutils
#
# Copyright (c) 2021 SUSE LLC
# Copyright (c) 2022 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@ -23,6 +23,7 @@ ExcludeArch: s390x
BuildRequires: bc
BuildRequires: bison
BuildRequires: dejagnu
BuildRequires: fdupes
BuildRequires: flex
BuildRequires: gcc-c++
# for the testsuite
@ -37,7 +38,7 @@ BuildRequires: zlib-devel-static
%else
BuildRequires: zlib-devel
%endif
Version: 2.37
Version: 2.38
Release: 0
# disable libalternatives for now until it's changed to not
@ -75,7 +76,7 @@ Release: 0
%else
%define build_multitarget 0
%endif
%define target_list aarch64 alpha armv5l armv6l armv7l armv8l avr epiphany hppa hppa64 i686 ia64 m68k mips powerpc powerpc64 powerpc64le riscv64 rx s390 s390x sh4 sparc sparc64 x86_64 xtensa
%define target_list aarch64 alpha armv5l armv6l armv7l armv8l avr pru epiphany hppa hppa64 i686 ia64 m68k mips powerpc powerpc64 powerpc64le riscv64 rx s390 s390x sh4 sparc sparc64 x86_64 xtensa
#
#
#
@ -95,7 +96,7 @@ Source5: binutils.keyring
Source1: pre_checkin.sh
Source2: README.First-for.SUSE.packagers
Source3: baselibs.conf
Patch1: binutils-2.37-branch.diff.gz
Patch1: binutils-2.38-branch.diff.gz
Patch3: binutils-skip-rpaths.patch
Patch4: s390-biarch.diff
Patch5: x86-64-biarch.patch
@ -141,7 +142,7 @@ Requires: alts
%else
PreReq: update-alternatives
%endif
%if 0%{!?cross:1}
%if 0%{!?cross:1} && 0%{?suse_version} >= 1310
%define gold_archs %ix86 aarch64 %arm x86_64 ppc ppc64 ppc64le s390x %sparc
%endif
@ -191,6 +192,11 @@ The Compact C Type Format (CTF) is a way of representing information about a bin
%prep
echo "make check will return with %{make_check_handling} in case of testsuite failures."
%setup -q -n binutils-%{version}
# Backup flex and biscon files for later verification.
cp ld/ldlex.l ld/ldlex.l.orig
cp ld/ldgram.y ld/ldgram.y.orig
# Patch is outside test_vanilla because it's supposed to be the
# patch bringing the tarball to the newest upstream version
%patch1 -p1
@ -228,22 +234,11 @@ cp gas/config/tc-avr.h gas/config/tc-avr-nesc.h
#
# test_vanilla
%endif
# in parallel builds, when the flex or bison inputs are patched (possibly
# in the ...-branch.diff) it might happen that the dependency tracking
# of automake is confused and uses the old .c files from srcdir/ld/ while
# also generating the new .c files in builddir/ld leading to trouble.
# I haven't found the right entries to ensure this doesn't happen, so
# simply remove the intermediates
rm -f ld/ldlex.c
rm -f ld/ldgram.c ld/ldgram.h
# The 2.37 released tarball contains wrongly pre-generated (empty) man pages
# so we remove those here as well. Consider removing for later releases.
rm -f binutils/doc/*.1
rm -f binutils/doc/cxxfilt.man
rm -f gprof/*.1
rm -f gas/doc/*.1
rm -f ld/*.1
# Due to legacy flex version present in SLE-12 (and older), we cannot
# re-generate flex and bison files and so we verify that any patch modify these files.
diff -u ld/ldlex.l ld/ldlex.l.orig
diff -u ld/ldgram.y ld/ldgram.y.orig
%build
%define _lto_cflags %{nil}
@ -330,14 +325,14 @@ cd build-dir
# we patch headers (bfd-in.h) that are input to other headers
# which are generated only with --enable-maintainer-mode (which we
# don't do) or explicitely by make headers, so do this:
make %{?_smp_mflags} all-bfd TARGET-bfd=headers
make %{?_smp_mflags} all-bfd TARGET-bfd=headers V=1
# the above interacts with --enable-pgo-build=lto because all-bfd doesn't
# have the PGO handling, hence it's config.cache files are wrong
# remove all of those for reconfigure
rm */config.cache
# force reconfiguring
rm bfd/Makefile
make %{?_smp_mflags}
make %{?_smp_mflags} V=1
%else
# building cross-TARGET-binutils
@ -369,7 +364,7 @@ EXTRA_TARGETS="$EXTRA_TARGETS,arm-suse-linux-gnueabi"
%if "%{TARGET}" == "aarch64"
EXTRA_TARGETS="$EXTRA_TARGETS,aarch64-suse-linux"
%endif
%if "%{TARGET}" == "avr" || "%{TARGET}" == "spu"
%if "%{TARGET}" == "avr" || "%{TARGET}" == "spu" || "%{TARGET}" == "pru"
%define TARGET_OS %{TARGET}
%else
%if "%{TARGET}" == "epiphany" || "%{TARGET}" == "riscv32" || "%{TARGET}" == "rx"
@ -403,11 +398,11 @@ EXTRA_TARGETS="$EXTRA_TARGETS,aarch64-suse-linux"
--enable-default-hash-style=both \
%endif
${EXTRA_TARGETS:+--enable-targets="${EXTRA_TARGETS#,}"}
make %{?_smp_mflags} all-bfd TARGET-bfd=headers
make %{?_smp_mflags} all-bfd TARGET-bfd=headers V=1
rm */config.cache
# force reconfiguring
rm bfd/Makefile
make %{?_smp_mflags}
make %{?_smp_mflags} V=1
%if "%{TARGET}" == "avr"
# build an extra nesC version because nesC requires $'s in identifiers
cp -a gas gas-nesc
@ -431,26 +426,25 @@ cd build-dir
%if 0%{!?cross:1}
# installing native binutils
%ifarch %gold_archs
make DESTDIR=$RPM_BUILD_ROOT install-gold
ln -sf ld.gold $RPM_BUILD_ROOT%{_bindir}/gold
make DESTDIR=%{buildroot} install-gold
ln -sf ld.gold %{buildroot}%{_bindir}/gold
%endif
make DESTDIR=$RPM_BUILD_ROOT install-info install
make -C gas/doc DESTDIR=$RPM_BUILD_ROOT install-info-am install-am
make DESTDIR=$RPM_BUILD_ROOT install-bfd install-opcodes
if [ ! -f "%buildroot/%_bindir/ld.bfd" ]; then
mv "%buildroot/%_bindir"/{ld,ld.bfd};
make DESTDIR=%{buildroot} install-info install
make DESTDIR=%{buildroot} install-bfd install-opcodes
if [ ! -f "%{buildroot}/%_bindir/ld.bfd" ]; then
mv "%{buildroot}/%_bindir"/{ld,ld.bfd};
else
rm -f "%buildroot/%_bindir/ld";
rm -f "%{buildroot}/%_bindir/ld";
fi
%if ! 0%{with libalternatives}
mkdir -p "%buildroot/%_sysconfdir/alternatives";
mkdir -p "%{buildroot}/%_sysconfdir/alternatives";
# Keep older versions of brp-symlink happy
%if %{suse_version} < 1310
ln -s "%_bindir/ld" "%buildroot/%_sysconfdir/alternatives/ld"
ln -s "%_bindir/ld" "%{buildroot}/%_sysconfdir/alternatives/ld"
%endif
ln -s "%_sysconfdir/alternatives/ld" "%buildroot/%_bindir/ld";
ln -s "%_sysconfdir/alternatives/ld" "%{buildroot}/%_bindir/ld";
%else
ln -s %{_bindir}/alts "%buildroot/%_bindir/ld";
ln -s %{_bindir}/alts "%{buildroot}/%_bindir/ld";
mkdir -p %{buildroot}%{_datadir}/libalternatives/ld;
cat > %{buildroot}%{_datadir}/libalternatives/ld/1.conf <<EOF
binary=%{_bindir}/ld.gold
@ -460,24 +454,24 @@ binary=%{_bindir}/ld.bfd
EOF
%endif
rm -rf $RPM_BUILD_ROOT%{_prefix}/%{HOST}/bin
mkdir -p $RPM_BUILD_ROOT%{_prefix}/%{HOST}/bin
ln -sf ../../bin/{ar,as,ld,nm,ranlib,strip} $RPM_BUILD_ROOT%{_prefix}/%{HOST}/bin
mv $RPM_BUILD_ROOT%{_prefix}/%{HOST}/lib/ldscripts $RPM_BUILD_ROOT%{_libdir}
ln -sf ../../%{_lib}/ldscripts $RPM_BUILD_ROOT%{_prefix}/%{HOST}/lib/ldscripts
rm -rf %{buildroot}%{_prefix}/%{HOST}/bin
mkdir -p %{buildroot}%{_prefix}/%{HOST}/bin
ln -sf ../../bin/{ar,as,ld,nm,ranlib,strip} %{buildroot}%{_prefix}/%{HOST}/bin
mv %{buildroot}%{_prefix}/%{HOST}/lib/ldscripts $RPM_BUILD_ROOT%{_libdir}
ln -sf ../../%{_lib}/ldscripts %{buildroot}%{_prefix}/%{HOST}/lib/ldscripts
# Install header files
make -C libiberty install_to_libdir target_header_dir=/usr/include DESTDIR=$RPM_BUILD_ROOT
make -C libiberty install_to_libdir target_header_dir=/usr/include DESTDIR=%{buildroot}
# We want the PIC libiberty.a
install -m 644 libiberty/pic/libiberty.a $RPM_BUILD_ROOT%{_libdir}
install -m 644 libiberty/pic/libiberty.a %{buildroot}%{_libdir}
#
chmod a+x $RPM_BUILD_ROOT%{_libdir}/libbfd-*
chmod a+x $RPM_BUILD_ROOT%{_libdir}/libopcodes-*
chmod a+x %{buildroot}%{_libdir}/libbfd-*
chmod a+x %{buildroot}%{_libdir}/libopcodes-*
# No shared linking outside binutils
rm $RPM_BUILD_ROOT%{_libdir}/lib{bfd,opcodes}.so
rm $RPM_BUILD_ROOT%{_libdir}/lib{bfd,opcodes}.la
rm %{buildroot}%{_libdir}/lib{bfd,opcodes}.so
rm %{buildroot}%{_libdir}/lib{bfd,opcodes,ctf,ctf-nobfd}.la
# Remove unwanted files to shut up rpm
rm -f $RPM_BUILD_ROOT%{_infodir}/configure* $RPM_BUILD_ROOT%{_infodir}/standards.info*
rm -f $RPM_BUILD_ROOT%{_mandir}/man1/dlltool.1 $RPM_BUILD_ROOT%{_mandir}/man1/windres.1 $RPM_BUILD_ROOT%{_mandir}/man1/windmc.1
rm -f %{buildroot}%{_infodir}/configure* $RPM_BUILD_ROOT%{_infodir}/standards.info*
rm -f %{buildroot}%{_mandir}/man1/dlltool.1 $RPM_BUILD_ROOT%{_mandir}/man1/windres.1 $RPM_BUILD_ROOT%{_mandir}/man1/windmc.1
cd ..
%find_lang binutils
%find_lang bfd binutils.lang
@ -488,45 +482,47 @@ cd ..
%ifarch %gold_archs
%find_lang gold binutils-gold.lang
%endif
mkdir -p $RPM_BUILD_ROOT%{_docdir}/%{name}
install -m 644 binutils/NEWS $RPM_BUILD_ROOT%{_docdir}/%{name}/NEWS-binutils
install -m 644 gas/NEWS $RPM_BUILD_ROOT%{_docdir}/%{name}/NEWS-gas
install -m 644 ld/NEWS $RPM_BUILD_ROOT%{_docdir}/%{name}/NEWS-ld
mkdir -p %{buildroot}%{_docdir}/%{name}
install -m 644 binutils/NEWS %{buildroot}%{_docdir}/%{name}/NEWS-binutils
install -m 644 gas/NEWS %{buildroot}%{_docdir}/%{name}/NEWS-gas
install -m 644 ld/NEWS %{buildroot}%{_docdir}/%{name}/NEWS-ld
%else
# installing cross-TARGET-binutils and TARGET-binutils
make DESTDIR=$RPM_BUILD_ROOT install
make DESTDIR=%{buildroot} install
# Replace hard links by symlinks, so that rpmlint doesn't complain
T=$(basename %buildroot/usr/%{TARGET_OS})
for f in %buildroot/usr/$T/bin/* ; do
T=$(basename %{buildroot}/usr/%{TARGET_OS})
for f in %{buildroot}/usr/$T/bin/* ; do
ln -sf /usr/bin/$T-$(basename $f) $f
done
%if "%{TARGET}" == "arm"
# Instead of building duplicate binutils, add symlinks
for f in %buildroot/usr/$T/bin/* ; do
for f in %{buildroot}%{_bindir}/${T}-* ; do
_toolname=${f##$(dirname $f)/${T}-}
for p in arm-none-eabi; do
ln -sf %{_bindir}/$T-$(basename $f) %buildroot%{_bindir}/$p-$(basename $f)
ln -sf %{_bindir}/$T-${_toolname} %{buildroot}%{_bindir}/$p-${_toolname}
done
done
%endif
%if "%{TARGET}" == "riscv64"
# Instead of building duplicate binutils, add symlinks
for f in %buildroot/usr/$T/bin/* ; do
for f in %{buildroot}/usr/$T/bin/* ; do
for p in riscv64-elf; do
ln -sf %{_bindir}/$T-$(basename $f) %buildroot%{_bindir}/$p-$(basename $f)
ln -sf %{_bindir}/$T-$(basename $f) %{buildroot}%{_bindir}/$p-$(basename $f)
done
done
%endif
%if "%{TARGET}" == "avr"
install -c gas-nesc/as-new $RPM_BUILD_ROOT%{_prefix}/bin/%{TARGET_OS}-nesc-as
ln -sf ../../bin/%{TARGET_OS}-nesc-as $RPM_BUILD_ROOT%{_prefix}/%{TARGET_OS}/bin/nesc-as
install -c gas-nesc/as-new %{buildroot}%{_prefix}/bin/%{TARGET_OS}-nesc-as
ln -sf ../../bin/%{TARGET_OS}-nesc-as %{buildroot}%{_prefix}/%{TARGET_OS}/bin/nesc-as
%endif
rm -rf $RPM_BUILD_ROOT%{_mandir}
rm -rf $RPM_BUILD_ROOT%{_infodir}
rm -rf $RPM_BUILD_ROOT%{_prefix}/lib*
rm -rf $RPM_BUILD_ROOT%{_prefix}/include
rm -f $RPM_BUILD_ROOT%{_prefix}/bin/*-c++filt
rm -rf %{buildroot}%{_mandir}
rm -rf %{buildroot}%{_infodir}
rm -rf %{buildroot}%{_prefix}/lib*
rm -rf %{buildroot}%{_prefix}/include
rm -f %{buildroot}%{_prefix}/bin/*-c++filt
> ../binutils.lang
%endif
%fdupes %{buildroot}%{_prefix}
%if 0%{!?cross:1}
%post
@ -586,8 +582,7 @@ fi;
%postun -n libctf0 -p /sbin/ldconfig
%postun -n libctf-nobfd0 -p /sbin/ldconfig
%postun
/sbin/ldconfig
%postun -p /sbin/ldconfig
%endif
%files -f binutils.lang
@ -641,9 +636,11 @@ fi;
%{_libdir}/libctf-nobfd.so
%files -n libctf0
%defattr(-,root,root)
%{_libdir}/libctf.so.*
%files -n libctf-nobfd0
%defattr(-,root,root)
%{_libdir}/libctf-nobfd.so.*
%endif

View File

@ -1,3 +1,106 @@
-------------------------------------------------------------------
Fri Mar 4 10:44:39 UTC 2022 - Martin Liška <mliska@suse.cz>
- Update binutils-2.38-branch.diff.gz in order to include PR28879.
-------------------------------------------------------------------
Tue Mar 1 12:41:27 UTC 2022 - Michael Matz <matz@suse.com>
- From Stefan Brüns <stefan.bruens@rwth-aachen.de>:
* Install symlinks for all target specific tools on
arm-eabi-none [bsc#1185712]
-------------------------------------------------------------------
Thu Feb 24 09:10:44 UTC 2022 - Martin Liška <mliska@suse.cz>
- Do not re-generate ld/ldlex.c, ld/ldgram.c, ld/ldgram.h and verify
that corresponding flex/bison files are not modified by a patch.
-------------------------------------------------------------------
Thu Feb 24 06:55:14 UTC 2022 - Martin Liška <mliska@suse.cz>
- Use verbose mode for make for cross compilers.
-------------------------------------------------------------------
Wed Feb 23 17:52:15 UTC 2022 - Michael Matz <matz@suse.com>
- Make it build on SLE-11 again.
-------------------------------------------------------------------
Tue Feb 22 09:13:15 UTC 2022 - Martin Liška <mliska@suse.cz>
- Use verbose mode for make.
-------------------------------------------------------------------
Sat Feb 12 19:13:31 UTC 2022 - Martin Liška <mliska@suse.cz>
- Update to binutils 2.38:
* elfedit: Add --output-abiversion option to update ABIVERSION.
* Add support for the LoongArch instruction set.
* Tools which display symbols or strings (readelf, strings, nm, objdump)
have a new command line option which controls how unicode characters are
handled. By default they are treated as normal for the tool. Using
--unicode=locale will display them according to the current locale.
Using --unicode=hex will display them as hex byte values, whilst
--unicode=escape will display them as escape sequences. In addition
using --unicode=highlight will display them as unicode escape sequences
highlighted in red (if supported by the output device).
* readelf -r dumps RELR relative relocations now.
* Support for efi-app-aarch64, efi-rtdrv-aarch64 and efi-bsdrv-aarch64 has been
added to objcopy in order to enable UEFI development using binutils.
* ar: Add --thin for creating thin archives. -T is a deprecated alias without
diagnostics. In many ar implementations -T has a different meaning, as
specified by X/Open System Interface.
* Add support for AArch64 system registers that were missing in previous
releases.
* Add support for the LoongArch instruction set.
* Add a command-line option, -muse-unaligned-vector-move, for x86 target
to encode aligned vector move as unaligned vector move.
* Add support for Cortex-R52+ for Arm.
* Add support for Cortex-A510, Cortex-A710, Cortex-X2 for AArch64.
* Add support for Cortex-A710 for Arm.
* Add support for Scalable Matrix Extension (SME) for AArch64.
* The --multibyte-handling=[allow|warn|warn-sym-only] option tells the
assembler what to when it encoutners multibyte characters in the input. The
default is to allow them. Setting the option to "warn" will generate a
warning message whenever any multibyte character is encountered. Using the
option to "warn-sym-only" will make the assembler generate a warning whenever a
symbol is defined containing multibyte characters. (References to undefined
symbols will not generate warnings).
* Outputs of .ds.x directive and .tfloat directive with hex input from
x86 assembler have been reduced from 12 bytes to 10 bytes to match the
output of .tfloat directive.
* Add support for 'armv8.8-a', 'armv9-a', 'armv9.1-a', 'armv9.2-a' and
'armv9.3-a' for -march in AArch64 GAS.
* Add support for 'armv8.7-a', 'armv8.8-a', 'armv9-a', 'armv9.1-a',
'armv9.2-a' and 'armv9.3-a' for -march in Arm GAS.
* Add support for Intel AVX512_FP16 instructions.
* Add -z pack-relative-relocs/-z no pack-relative-relocs to x86 ELF
linker to pack relative relocations in the DT_RELR section.
* Add support for the LoongArch architecture.
* Add -z indirect-extern-access/-z noindirect-extern-access to x86 ELF
linker to control canonical function pointers and copy relocation.
* Add --max-cache-size=SIZE to set the the maximum cache size to SIZE
bytes.
- Add binutils-2.38-branch.diff.gz.
- Removed deletion of man pages as they should be properly packages
in tarball.
- Rebased patches: aarch64-common-pagesize.patch, add-ulp-section.diff,
binutils-bfd_h.patch, binutils-revert-nm-symversion.diff,
binutils-revert-plt32-in-branches.diff, binutils-skip-rpaths.patch
and binutils-compat-old-behaviour.diff.
-------------------------------------------------------------------
Fri Feb 4 13:13:20 UTC 2022 - Matwey Kornilov <matwey.kornilov@gmail.com>
- Enable PRU architecture for AM335x CPU (Beagle Bone Black board)
-------------------------------------------------------------------
Thu Jan 27 20:36:30 UTC 2022 - Dirk Müller <dmueller@suse.com>
- use fdupes on datadir
- remove RPM_BUILD_ROOT usage and other cleanups
-------------------------------------------------------------------
Fri Nov 12 13:20:09 UTC 2021 - Martin Liška <mliska@suse.cz>

View File

@ -1,7 +1,7 @@
#
# spec file for package cross-sparc-binutils
#
# Copyright (c) 2021 SUSE LLC
# Copyright (c) 2022 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@ -23,6 +23,7 @@ ExcludeArch: sparc
BuildRequires: bc
BuildRequires: bison
BuildRequires: dejagnu
BuildRequires: fdupes
BuildRequires: flex
BuildRequires: gcc-c++
# for the testsuite
@ -37,7 +38,7 @@ BuildRequires: zlib-devel-static
%else
BuildRequires: zlib-devel
%endif
Version: 2.37
Version: 2.38
Release: 0
# disable libalternatives for now until it's changed to not
@ -75,7 +76,7 @@ Release: 0
%else
%define build_multitarget 0
%endif
%define target_list aarch64 alpha armv5l armv6l armv7l armv8l avr epiphany hppa hppa64 i686 ia64 m68k mips powerpc powerpc64 powerpc64le riscv64 rx s390 s390x sh4 sparc sparc64 x86_64 xtensa
%define target_list aarch64 alpha armv5l armv6l armv7l armv8l avr pru epiphany hppa hppa64 i686 ia64 m68k mips powerpc powerpc64 powerpc64le riscv64 rx s390 s390x sh4 sparc sparc64 x86_64 xtensa
#
#
#
@ -95,7 +96,7 @@ Source5: binutils.keyring
Source1: pre_checkin.sh
Source2: README.First-for.SUSE.packagers
Source3: baselibs.conf
Patch1: binutils-2.37-branch.diff.gz
Patch1: binutils-2.38-branch.diff.gz
Patch3: binutils-skip-rpaths.patch
Patch4: s390-biarch.diff
Patch5: x86-64-biarch.patch
@ -141,7 +142,7 @@ Requires: alts
%else
PreReq: update-alternatives
%endif
%if 0%{!?cross:1}
%if 0%{!?cross:1} && 0%{?suse_version} >= 1310
%define gold_archs %ix86 aarch64 %arm x86_64 ppc ppc64 ppc64le s390x %sparc
%endif
@ -191,6 +192,11 @@ The Compact C Type Format (CTF) is a way of representing information about a bin
%prep
echo "make check will return with %{make_check_handling} in case of testsuite failures."
%setup -q -n binutils-%{version}
# Backup flex and biscon files for later verification.
cp ld/ldlex.l ld/ldlex.l.orig
cp ld/ldgram.y ld/ldgram.y.orig
# Patch is outside test_vanilla because it's supposed to be the
# patch bringing the tarball to the newest upstream version
%patch1 -p1
@ -228,22 +234,11 @@ cp gas/config/tc-avr.h gas/config/tc-avr-nesc.h
#
# test_vanilla
%endif
# in parallel builds, when the flex or bison inputs are patched (possibly
# in the ...-branch.diff) it might happen that the dependency tracking
# of automake is confused and uses the old .c files from srcdir/ld/ while
# also generating the new .c files in builddir/ld leading to trouble.
# I haven't found the right entries to ensure this doesn't happen, so
# simply remove the intermediates
rm -f ld/ldlex.c
rm -f ld/ldgram.c ld/ldgram.h
# The 2.37 released tarball contains wrongly pre-generated (empty) man pages
# so we remove those here as well. Consider removing for later releases.
rm -f binutils/doc/*.1
rm -f binutils/doc/cxxfilt.man
rm -f gprof/*.1
rm -f gas/doc/*.1
rm -f ld/*.1
# Due to legacy flex version present in SLE-12 (and older), we cannot
# re-generate flex and bison files and so we verify that any patch modify these files.
diff -u ld/ldlex.l ld/ldlex.l.orig
diff -u ld/ldgram.y ld/ldgram.y.orig
%build
%define _lto_cflags %{nil}
@ -330,14 +325,14 @@ cd build-dir
# we patch headers (bfd-in.h) that are input to other headers
# which are generated only with --enable-maintainer-mode (which we
# don't do) or explicitely by make headers, so do this:
make %{?_smp_mflags} all-bfd TARGET-bfd=headers
make %{?_smp_mflags} all-bfd TARGET-bfd=headers V=1
# the above interacts with --enable-pgo-build=lto because all-bfd doesn't
# have the PGO handling, hence it's config.cache files are wrong
# remove all of those for reconfigure
rm */config.cache
# force reconfiguring
rm bfd/Makefile
make %{?_smp_mflags}
make %{?_smp_mflags} V=1
%else
# building cross-TARGET-binutils
@ -369,7 +364,7 @@ EXTRA_TARGETS="$EXTRA_TARGETS,arm-suse-linux-gnueabi"
%if "%{TARGET}" == "aarch64"
EXTRA_TARGETS="$EXTRA_TARGETS,aarch64-suse-linux"
%endif
%if "%{TARGET}" == "avr" || "%{TARGET}" == "spu"
%if "%{TARGET}" == "avr" || "%{TARGET}" == "spu" || "%{TARGET}" == "pru"
%define TARGET_OS %{TARGET}
%else
%if "%{TARGET}" == "epiphany" || "%{TARGET}" == "riscv32" || "%{TARGET}" == "rx"
@ -403,11 +398,11 @@ EXTRA_TARGETS="$EXTRA_TARGETS,aarch64-suse-linux"
--enable-default-hash-style=both \
%endif
${EXTRA_TARGETS:+--enable-targets="${EXTRA_TARGETS#,}"}
make %{?_smp_mflags} all-bfd TARGET-bfd=headers
make %{?_smp_mflags} all-bfd TARGET-bfd=headers V=1
rm */config.cache
# force reconfiguring
rm bfd/Makefile
make %{?_smp_mflags}
make %{?_smp_mflags} V=1
%if "%{TARGET}" == "avr"
# build an extra nesC version because nesC requires $'s in identifiers
cp -a gas gas-nesc
@ -431,26 +426,25 @@ cd build-dir
%if 0%{!?cross:1}
# installing native binutils
%ifarch %gold_archs
make DESTDIR=$RPM_BUILD_ROOT install-gold
ln -sf ld.gold $RPM_BUILD_ROOT%{_bindir}/gold
make DESTDIR=%{buildroot} install-gold
ln -sf ld.gold %{buildroot}%{_bindir}/gold
%endif
make DESTDIR=$RPM_BUILD_ROOT install-info install
make -C gas/doc DESTDIR=$RPM_BUILD_ROOT install-info-am install-am
make DESTDIR=$RPM_BUILD_ROOT install-bfd install-opcodes
if [ ! -f "%buildroot/%_bindir/ld.bfd" ]; then
mv "%buildroot/%_bindir"/{ld,ld.bfd};
make DESTDIR=%{buildroot} install-info install
make DESTDIR=%{buildroot} install-bfd install-opcodes
if [ ! -f "%{buildroot}/%_bindir/ld.bfd" ]; then
mv "%{buildroot}/%_bindir"/{ld,ld.bfd};
else
rm -f "%buildroot/%_bindir/ld";
rm -f "%{buildroot}/%_bindir/ld";
fi
%if ! 0%{with libalternatives}
mkdir -p "%buildroot/%_sysconfdir/alternatives";
mkdir -p "%{buildroot}/%_sysconfdir/alternatives";
# Keep older versions of brp-symlink happy
%if %{suse_version} < 1310
ln -s "%_bindir/ld" "%buildroot/%_sysconfdir/alternatives/ld"
ln -s "%_bindir/ld" "%{buildroot}/%_sysconfdir/alternatives/ld"
%endif
ln -s "%_sysconfdir/alternatives/ld" "%buildroot/%_bindir/ld";
ln -s "%_sysconfdir/alternatives/ld" "%{buildroot}/%_bindir/ld";
%else
ln -s %{_bindir}/alts "%buildroot/%_bindir/ld";
ln -s %{_bindir}/alts "%{buildroot}/%_bindir/ld";
mkdir -p %{buildroot}%{_datadir}/libalternatives/ld;
cat > %{buildroot}%{_datadir}/libalternatives/ld/1.conf <<EOF
binary=%{_bindir}/ld.gold
@ -460,24 +454,24 @@ binary=%{_bindir}/ld.bfd
EOF
%endif
rm -rf $RPM_BUILD_ROOT%{_prefix}/%{HOST}/bin
mkdir -p $RPM_BUILD_ROOT%{_prefix}/%{HOST}/bin
ln -sf ../../bin/{ar,as,ld,nm,ranlib,strip} $RPM_BUILD_ROOT%{_prefix}/%{HOST}/bin
mv $RPM_BUILD_ROOT%{_prefix}/%{HOST}/lib/ldscripts $RPM_BUILD_ROOT%{_libdir}
ln -sf ../../%{_lib}/ldscripts $RPM_BUILD_ROOT%{_prefix}/%{HOST}/lib/ldscripts
rm -rf %{buildroot}%{_prefix}/%{HOST}/bin
mkdir -p %{buildroot}%{_prefix}/%{HOST}/bin
ln -sf ../../bin/{ar,as,ld,nm,ranlib,strip} %{buildroot}%{_prefix}/%{HOST}/bin
mv %{buildroot}%{_prefix}/%{HOST}/lib/ldscripts $RPM_BUILD_ROOT%{_libdir}
ln -sf ../../%{_lib}/ldscripts %{buildroot}%{_prefix}/%{HOST}/lib/ldscripts
# Install header files
make -C libiberty install_to_libdir target_header_dir=/usr/include DESTDIR=$RPM_BUILD_ROOT
make -C libiberty install_to_libdir target_header_dir=/usr/include DESTDIR=%{buildroot}
# We want the PIC libiberty.a
install -m 644 libiberty/pic/libiberty.a $RPM_BUILD_ROOT%{_libdir}
install -m 644 libiberty/pic/libiberty.a %{buildroot}%{_libdir}
#
chmod a+x $RPM_BUILD_ROOT%{_libdir}/libbfd-*
chmod a+x $RPM_BUILD_ROOT%{_libdir}/libopcodes-*
chmod a+x %{buildroot}%{_libdir}/libbfd-*
chmod a+x %{buildroot}%{_libdir}/libopcodes-*
# No shared linking outside binutils
rm $RPM_BUILD_ROOT%{_libdir}/lib{bfd,opcodes}.so
rm $RPM_BUILD_ROOT%{_libdir}/lib{bfd,opcodes}.la
rm %{buildroot}%{_libdir}/lib{bfd,opcodes}.so
rm %{buildroot}%{_libdir}/lib{bfd,opcodes,ctf,ctf-nobfd}.la
# Remove unwanted files to shut up rpm
rm -f $RPM_BUILD_ROOT%{_infodir}/configure* $RPM_BUILD_ROOT%{_infodir}/standards.info*
rm -f $RPM_BUILD_ROOT%{_mandir}/man1/dlltool.1 $RPM_BUILD_ROOT%{_mandir}/man1/windres.1 $RPM_BUILD_ROOT%{_mandir}/man1/windmc.1
rm -f %{buildroot}%{_infodir}/configure* $RPM_BUILD_ROOT%{_infodir}/standards.info*
rm -f %{buildroot}%{_mandir}/man1/dlltool.1 $RPM_BUILD_ROOT%{_mandir}/man1/windres.1 $RPM_BUILD_ROOT%{_mandir}/man1/windmc.1
cd ..
%find_lang binutils
%find_lang bfd binutils.lang
@ -488,45 +482,47 @@ cd ..
%ifarch %gold_archs
%find_lang gold binutils-gold.lang
%endif
mkdir -p $RPM_BUILD_ROOT%{_docdir}/%{name}
install -m 644 binutils/NEWS $RPM_BUILD_ROOT%{_docdir}/%{name}/NEWS-binutils
install -m 644 gas/NEWS $RPM_BUILD_ROOT%{_docdir}/%{name}/NEWS-gas
install -m 644 ld/NEWS $RPM_BUILD_ROOT%{_docdir}/%{name}/NEWS-ld
mkdir -p %{buildroot}%{_docdir}/%{name}
install -m 644 binutils/NEWS %{buildroot}%{_docdir}/%{name}/NEWS-binutils
install -m 644 gas/NEWS %{buildroot}%{_docdir}/%{name}/NEWS-gas
install -m 644 ld/NEWS %{buildroot}%{_docdir}/%{name}/NEWS-ld
%else
# installing cross-TARGET-binutils and TARGET-binutils
make DESTDIR=$RPM_BUILD_ROOT install
make DESTDIR=%{buildroot} install
# Replace hard links by symlinks, so that rpmlint doesn't complain
T=$(basename %buildroot/usr/%{TARGET_OS})
for f in %buildroot/usr/$T/bin/* ; do
T=$(basename %{buildroot}/usr/%{TARGET_OS})
for f in %{buildroot}/usr/$T/bin/* ; do
ln -sf /usr/bin/$T-$(basename $f) $f
done
%if "%{TARGET}" == "arm"
# Instead of building duplicate binutils, add symlinks
for f in %buildroot/usr/$T/bin/* ; do
for f in %{buildroot}%{_bindir}/${T}-* ; do
_toolname=${f##$(dirname $f)/${T}-}
for p in arm-none-eabi; do
ln -sf %{_bindir}/$T-$(basename $f) %buildroot%{_bindir}/$p-$(basename $f)
ln -sf %{_bindir}/$T-${_toolname} %{buildroot}%{_bindir}/$p-${_toolname}
done
done
%endif
%if "%{TARGET}" == "riscv64"
# Instead of building duplicate binutils, add symlinks
for f in %buildroot/usr/$T/bin/* ; do
for f in %{buildroot}/usr/$T/bin/* ; do
for p in riscv64-elf; do
ln -sf %{_bindir}/$T-$(basename $f) %buildroot%{_bindir}/$p-$(basename $f)
ln -sf %{_bindir}/$T-$(basename $f) %{buildroot}%{_bindir}/$p-$(basename $f)
done
done
%endif
%if "%{TARGET}" == "avr"
install -c gas-nesc/as-new $RPM_BUILD_ROOT%{_prefix}/bin/%{TARGET_OS}-nesc-as
ln -sf ../../bin/%{TARGET_OS}-nesc-as $RPM_BUILD_ROOT%{_prefix}/%{TARGET_OS}/bin/nesc-as
install -c gas-nesc/as-new %{buildroot}%{_prefix}/bin/%{TARGET_OS}-nesc-as
ln -sf ../../bin/%{TARGET_OS}-nesc-as %{buildroot}%{_prefix}/%{TARGET_OS}/bin/nesc-as
%endif
rm -rf $RPM_BUILD_ROOT%{_mandir}
rm -rf $RPM_BUILD_ROOT%{_infodir}
rm -rf $RPM_BUILD_ROOT%{_prefix}/lib*
rm -rf $RPM_BUILD_ROOT%{_prefix}/include
rm -f $RPM_BUILD_ROOT%{_prefix}/bin/*-c++filt
rm -rf %{buildroot}%{_mandir}
rm -rf %{buildroot}%{_infodir}
rm -rf %{buildroot}%{_prefix}/lib*
rm -rf %{buildroot}%{_prefix}/include
rm -f %{buildroot}%{_prefix}/bin/*-c++filt
> ../binutils.lang
%endif
%fdupes %{buildroot}%{_prefix}
%if 0%{!?cross:1}
%post
@ -586,8 +582,7 @@ fi;
%postun -n libctf0 -p /sbin/ldconfig
%postun -n libctf-nobfd0 -p /sbin/ldconfig
%postun
/sbin/ldconfig
%postun -p /sbin/ldconfig
%endif
%files -f binutils.lang
@ -641,9 +636,11 @@ fi;
%{_libdir}/libctf-nobfd.so
%files -n libctf0
%defattr(-,root,root)
%{_libdir}/libctf.so.*
%files -n libctf-nobfd0
%defattr(-,root,root)
%{_libdir}/libctf-nobfd.so.*
%endif

View File

@ -1,3 +1,106 @@
-------------------------------------------------------------------
Fri Mar 4 10:44:39 UTC 2022 - Martin Liška <mliska@suse.cz>
- Update binutils-2.38-branch.diff.gz in order to include PR28879.
-------------------------------------------------------------------
Tue Mar 1 12:41:27 UTC 2022 - Michael Matz <matz@suse.com>
- From Stefan Brüns <stefan.bruens@rwth-aachen.de>:
* Install symlinks for all target specific tools on
arm-eabi-none [bsc#1185712]
-------------------------------------------------------------------
Thu Feb 24 09:10:44 UTC 2022 - Martin Liška <mliska@suse.cz>
- Do not re-generate ld/ldlex.c, ld/ldgram.c, ld/ldgram.h and verify
that corresponding flex/bison files are not modified by a patch.
-------------------------------------------------------------------
Thu Feb 24 06:55:14 UTC 2022 - Martin Liška <mliska@suse.cz>
- Use verbose mode for make for cross compilers.
-------------------------------------------------------------------
Wed Feb 23 17:52:15 UTC 2022 - Michael Matz <matz@suse.com>
- Make it build on SLE-11 again.
-------------------------------------------------------------------
Tue Feb 22 09:13:15 UTC 2022 - Martin Liška <mliska@suse.cz>
- Use verbose mode for make.
-------------------------------------------------------------------
Sat Feb 12 19:13:31 UTC 2022 - Martin Liška <mliska@suse.cz>
- Update to binutils 2.38:
* elfedit: Add --output-abiversion option to update ABIVERSION.
* Add support for the LoongArch instruction set.
* Tools which display symbols or strings (readelf, strings, nm, objdump)
have a new command line option which controls how unicode characters are
handled. By default they are treated as normal for the tool. Using
--unicode=locale will display them according to the current locale.
Using --unicode=hex will display them as hex byte values, whilst
--unicode=escape will display them as escape sequences. In addition
using --unicode=highlight will display them as unicode escape sequences
highlighted in red (if supported by the output device).
* readelf -r dumps RELR relative relocations now.
* Support for efi-app-aarch64, efi-rtdrv-aarch64 and efi-bsdrv-aarch64 has been
added to objcopy in order to enable UEFI development using binutils.
* ar: Add --thin for creating thin archives. -T is a deprecated alias without
diagnostics. In many ar implementations -T has a different meaning, as
specified by X/Open System Interface.
* Add support for AArch64 system registers that were missing in previous
releases.
* Add support for the LoongArch instruction set.
* Add a command-line option, -muse-unaligned-vector-move, for x86 target
to encode aligned vector move as unaligned vector move.
* Add support for Cortex-R52+ for Arm.
* Add support for Cortex-A510, Cortex-A710, Cortex-X2 for AArch64.
* Add support for Cortex-A710 for Arm.
* Add support for Scalable Matrix Extension (SME) for AArch64.
* The --multibyte-handling=[allow|warn|warn-sym-only] option tells the
assembler what to when it encoutners multibyte characters in the input. The
default is to allow them. Setting the option to "warn" will generate a
warning message whenever any multibyte character is encountered. Using the
option to "warn-sym-only" will make the assembler generate a warning whenever a
symbol is defined containing multibyte characters. (References to undefined
symbols will not generate warnings).
* Outputs of .ds.x directive and .tfloat directive with hex input from
x86 assembler have been reduced from 12 bytes to 10 bytes to match the
output of .tfloat directive.
* Add support for 'armv8.8-a', 'armv9-a', 'armv9.1-a', 'armv9.2-a' and
'armv9.3-a' for -march in AArch64 GAS.
* Add support for 'armv8.7-a', 'armv8.8-a', 'armv9-a', 'armv9.1-a',
'armv9.2-a' and 'armv9.3-a' for -march in Arm GAS.
* Add support for Intel AVX512_FP16 instructions.
* Add -z pack-relative-relocs/-z no pack-relative-relocs to x86 ELF
linker to pack relative relocations in the DT_RELR section.
* Add support for the LoongArch architecture.
* Add -z indirect-extern-access/-z noindirect-extern-access to x86 ELF
linker to control canonical function pointers and copy relocation.
* Add --max-cache-size=SIZE to set the the maximum cache size to SIZE
bytes.
- Add binutils-2.38-branch.diff.gz.
- Removed deletion of man pages as they should be properly packages
in tarball.
- Rebased patches: aarch64-common-pagesize.patch, add-ulp-section.diff,
binutils-bfd_h.patch, binutils-revert-nm-symversion.diff,
binutils-revert-plt32-in-branches.diff, binutils-skip-rpaths.patch
and binutils-compat-old-behaviour.diff.
-------------------------------------------------------------------
Fri Feb 4 13:13:20 UTC 2022 - Matwey Kornilov <matwey.kornilov@gmail.com>
- Enable PRU architecture for AM335x CPU (Beagle Bone Black board)
-------------------------------------------------------------------
Thu Jan 27 20:36:30 UTC 2022 - Dirk Müller <dmueller@suse.com>
- use fdupes on datadir
- remove RPM_BUILD_ROOT usage and other cleanups
-------------------------------------------------------------------
Fri Nov 12 13:20:09 UTC 2021 - Martin Liška <mliska@suse.cz>

View File

@ -1,7 +1,7 @@
#
# spec file for package cross-sparc64-binutils
#
# Copyright (c) 2021 SUSE LLC
# Copyright (c) 2022 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@ -23,6 +23,7 @@ ExcludeArch: sparc64
BuildRequires: bc
BuildRequires: bison
BuildRequires: dejagnu
BuildRequires: fdupes
BuildRequires: flex
BuildRequires: gcc-c++
# for the testsuite
@ -37,7 +38,7 @@ BuildRequires: zlib-devel-static
%else
BuildRequires: zlib-devel
%endif
Version: 2.37
Version: 2.38
Release: 0
# disable libalternatives for now until it's changed to not
@ -75,7 +76,7 @@ Release: 0
%else
%define build_multitarget 0
%endif
%define target_list aarch64 alpha armv5l armv6l armv7l armv8l avr epiphany hppa hppa64 i686 ia64 m68k mips powerpc powerpc64 powerpc64le riscv64 rx s390 s390x sh4 sparc sparc64 x86_64 xtensa
%define target_list aarch64 alpha armv5l armv6l armv7l armv8l avr pru epiphany hppa hppa64 i686 ia64 m68k mips powerpc powerpc64 powerpc64le riscv64 rx s390 s390x sh4 sparc sparc64 x86_64 xtensa
#
#
#
@ -95,7 +96,7 @@ Source5: binutils.keyring
Source1: pre_checkin.sh
Source2: README.First-for.SUSE.packagers
Source3: baselibs.conf
Patch1: binutils-2.37-branch.diff.gz
Patch1: binutils-2.38-branch.diff.gz
Patch3: binutils-skip-rpaths.patch
Patch4: s390-biarch.diff
Patch5: x86-64-biarch.patch
@ -141,7 +142,7 @@ Requires: alts
%else
PreReq: update-alternatives
%endif
%if 0%{!?cross:1}
%if 0%{!?cross:1} && 0%{?suse_version} >= 1310
%define gold_archs %ix86 aarch64 %arm x86_64 ppc ppc64 ppc64le s390x %sparc
%endif
@ -191,6 +192,11 @@ The Compact C Type Format (CTF) is a way of representing information about a bin
%prep
echo "make check will return with %{make_check_handling} in case of testsuite failures."
%setup -q -n binutils-%{version}
# Backup flex and biscon files for later verification.
cp ld/ldlex.l ld/ldlex.l.orig
cp ld/ldgram.y ld/ldgram.y.orig
# Patch is outside test_vanilla because it's supposed to be the
# patch bringing the tarball to the newest upstream version
%patch1 -p1
@ -228,22 +234,11 @@ cp gas/config/tc-avr.h gas/config/tc-avr-nesc.h
#
# test_vanilla
%endif
# in parallel builds, when the flex or bison inputs are patched (possibly
# in the ...-branch.diff) it might happen that the dependency tracking
# of automake is confused and uses the old .c files from srcdir/ld/ while
# also generating the new .c files in builddir/ld leading to trouble.
# I haven't found the right entries to ensure this doesn't happen, so
# simply remove the intermediates
rm -f ld/ldlex.c
rm -f ld/ldgram.c ld/ldgram.h
# The 2.37 released tarball contains wrongly pre-generated (empty) man pages
# so we remove those here as well. Consider removing for later releases.
rm -f binutils/doc/*.1
rm -f binutils/doc/cxxfilt.man
rm -f gprof/*.1
rm -f gas/doc/*.1
rm -f ld/*.1
# Due to legacy flex version present in SLE-12 (and older), we cannot
# re-generate flex and bison files and so we verify that any patch modify these files.
diff -u ld/ldlex.l ld/ldlex.l.orig
diff -u ld/ldgram.y ld/ldgram.y.orig
%build
%define _lto_cflags %{nil}
@ -330,14 +325,14 @@ cd build-dir
# we patch headers (bfd-in.h) that are input to other headers
# which are generated only with --enable-maintainer-mode (which we
# don't do) or explicitely by make headers, so do this:
make %{?_smp_mflags} all-bfd TARGET-bfd=headers
make %{?_smp_mflags} all-bfd TARGET-bfd=headers V=1
# the above interacts with --enable-pgo-build=lto because all-bfd doesn't
# have the PGO handling, hence it's config.cache files are wrong
# remove all of those for reconfigure
rm */config.cache
# force reconfiguring
rm bfd/Makefile
make %{?_smp_mflags}
make %{?_smp_mflags} V=1
%else
# building cross-TARGET-binutils
@ -369,7 +364,7 @@ EXTRA_TARGETS="$EXTRA_TARGETS,arm-suse-linux-gnueabi"
%if "%{TARGET}" == "aarch64"
EXTRA_TARGETS="$EXTRA_TARGETS,aarch64-suse-linux"
%endif
%if "%{TARGET}" == "avr" || "%{TARGET}" == "spu"
%if "%{TARGET}" == "avr" || "%{TARGET}" == "spu" || "%{TARGET}" == "pru"
%define TARGET_OS %{TARGET}
%else
%if "%{TARGET}" == "epiphany" || "%{TARGET}" == "riscv32" || "%{TARGET}" == "rx"
@ -403,11 +398,11 @@ EXTRA_TARGETS="$EXTRA_TARGETS,aarch64-suse-linux"
--enable-default-hash-style=both \
%endif
${EXTRA_TARGETS:+--enable-targets="${EXTRA_TARGETS#,}"}
make %{?_smp_mflags} all-bfd TARGET-bfd=headers
make %{?_smp_mflags} all-bfd TARGET-bfd=headers V=1
rm */config.cache
# force reconfiguring
rm bfd/Makefile
make %{?_smp_mflags}
make %{?_smp_mflags} V=1
%if "%{TARGET}" == "avr"
# build an extra nesC version because nesC requires $'s in identifiers
cp -a gas gas-nesc
@ -431,26 +426,25 @@ cd build-dir
%if 0%{!?cross:1}
# installing native binutils
%ifarch %gold_archs
make DESTDIR=$RPM_BUILD_ROOT install-gold
ln -sf ld.gold $RPM_BUILD_ROOT%{_bindir}/gold
make DESTDIR=%{buildroot} install-gold
ln -sf ld.gold %{buildroot}%{_bindir}/gold
%endif
make DESTDIR=$RPM_BUILD_ROOT install-info install
make -C gas/doc DESTDIR=$RPM_BUILD_ROOT install-info-am install-am
make DESTDIR=$RPM_BUILD_ROOT install-bfd install-opcodes
if [ ! -f "%buildroot/%_bindir/ld.bfd" ]; then
mv "%buildroot/%_bindir"/{ld,ld.bfd};
make DESTDIR=%{buildroot} install-info install
make DESTDIR=%{buildroot} install-bfd install-opcodes
if [ ! -f "%{buildroot}/%_bindir/ld.bfd" ]; then
mv "%{buildroot}/%_bindir"/{ld,ld.bfd};
else
rm -f "%buildroot/%_bindir/ld";
rm -f "%{buildroot}/%_bindir/ld";
fi
%if ! 0%{with libalternatives}
mkdir -p "%buildroot/%_sysconfdir/alternatives";
mkdir -p "%{buildroot}/%_sysconfdir/alternatives";
# Keep older versions of brp-symlink happy
%if %{suse_version} < 1310
ln -s "%_bindir/ld" "%buildroot/%_sysconfdir/alternatives/ld"
ln -s "%_bindir/ld" "%{buildroot}/%_sysconfdir/alternatives/ld"
%endif
ln -s "%_sysconfdir/alternatives/ld" "%buildroot/%_bindir/ld";
ln -s "%_sysconfdir/alternatives/ld" "%{buildroot}/%_bindir/ld";
%else
ln -s %{_bindir}/alts "%buildroot/%_bindir/ld";
ln -s %{_bindir}/alts "%{buildroot}/%_bindir/ld";
mkdir -p %{buildroot}%{_datadir}/libalternatives/ld;
cat > %{buildroot}%{_datadir}/libalternatives/ld/1.conf <<EOF
binary=%{_bindir}/ld.gold
@ -460,24 +454,24 @@ binary=%{_bindir}/ld.bfd
EOF
%endif
rm -rf $RPM_BUILD_ROOT%{_prefix}/%{HOST}/bin
mkdir -p $RPM_BUILD_ROOT%{_prefix}/%{HOST}/bin
ln -sf ../../bin/{ar,as,ld,nm,ranlib,strip} $RPM_BUILD_ROOT%{_prefix}/%{HOST}/bin
mv $RPM_BUILD_ROOT%{_prefix}/%{HOST}/lib/ldscripts $RPM_BUILD_ROOT%{_libdir}
ln -sf ../../%{_lib}/ldscripts $RPM_BUILD_ROOT%{_prefix}/%{HOST}/lib/ldscripts
rm -rf %{buildroot}%{_prefix}/%{HOST}/bin
mkdir -p %{buildroot}%{_prefix}/%{HOST}/bin
ln -sf ../../bin/{ar,as,ld,nm,ranlib,strip} %{buildroot}%{_prefix}/%{HOST}/bin
mv %{buildroot}%{_prefix}/%{HOST}/lib/ldscripts $RPM_BUILD_ROOT%{_libdir}
ln -sf ../../%{_lib}/ldscripts %{buildroot}%{_prefix}/%{HOST}/lib/ldscripts
# Install header files
make -C libiberty install_to_libdir target_header_dir=/usr/include DESTDIR=$RPM_BUILD_ROOT
make -C libiberty install_to_libdir target_header_dir=/usr/include DESTDIR=%{buildroot}
# We want the PIC libiberty.a
install -m 644 libiberty/pic/libiberty.a $RPM_BUILD_ROOT%{_libdir}
install -m 644 libiberty/pic/libiberty.a %{buildroot}%{_libdir}
#
chmod a+x $RPM_BUILD_ROOT%{_libdir}/libbfd-*
chmod a+x $RPM_BUILD_ROOT%{_libdir}/libopcodes-*
chmod a+x %{buildroot}%{_libdir}/libbfd-*
chmod a+x %{buildroot}%{_libdir}/libopcodes-*
# No shared linking outside binutils
rm $RPM_BUILD_ROOT%{_libdir}/lib{bfd,opcodes}.so
rm $RPM_BUILD_ROOT%{_libdir}/lib{bfd,opcodes}.la
rm %{buildroot}%{_libdir}/lib{bfd,opcodes}.so
rm %{buildroot}%{_libdir}/lib{bfd,opcodes,ctf,ctf-nobfd}.la
# Remove unwanted files to shut up rpm
rm -f $RPM_BUILD_ROOT%{_infodir}/configure* $RPM_BUILD_ROOT%{_infodir}/standards.info*
rm -f $RPM_BUILD_ROOT%{_mandir}/man1/dlltool.1 $RPM_BUILD_ROOT%{_mandir}/man1/windres.1 $RPM_BUILD_ROOT%{_mandir}/man1/windmc.1
rm -f %{buildroot}%{_infodir}/configure* $RPM_BUILD_ROOT%{_infodir}/standards.info*
rm -f %{buildroot}%{_mandir}/man1/dlltool.1 $RPM_BUILD_ROOT%{_mandir}/man1/windres.1 $RPM_BUILD_ROOT%{_mandir}/man1/windmc.1
cd ..
%find_lang binutils
%find_lang bfd binutils.lang
@ -488,45 +482,47 @@ cd ..
%ifarch %gold_archs
%find_lang gold binutils-gold.lang
%endif
mkdir -p $RPM_BUILD_ROOT%{_docdir}/%{name}
install -m 644 binutils/NEWS $RPM_BUILD_ROOT%{_docdir}/%{name}/NEWS-binutils
install -m 644 gas/NEWS $RPM_BUILD_ROOT%{_docdir}/%{name}/NEWS-gas
install -m 644 ld/NEWS $RPM_BUILD_ROOT%{_docdir}/%{name}/NEWS-ld
mkdir -p %{buildroot}%{_docdir}/%{name}
install -m 644 binutils/NEWS %{buildroot}%{_docdir}/%{name}/NEWS-binutils
install -m 644 gas/NEWS %{buildroot}%{_docdir}/%{name}/NEWS-gas
install -m 644 ld/NEWS %{buildroot}%{_docdir}/%{name}/NEWS-ld
%else
# installing cross-TARGET-binutils and TARGET-binutils
make DESTDIR=$RPM_BUILD_ROOT install
make DESTDIR=%{buildroot} install
# Replace hard links by symlinks, so that rpmlint doesn't complain
T=$(basename %buildroot/usr/%{TARGET_OS})
for f in %buildroot/usr/$T/bin/* ; do
T=$(basename %{buildroot}/usr/%{TARGET_OS})
for f in %{buildroot}/usr/$T/bin/* ; do
ln -sf /usr/bin/$T-$(basename $f) $f
done
%if "%{TARGET}" == "arm"
# Instead of building duplicate binutils, add symlinks
for f in %buildroot/usr/$T/bin/* ; do
for f in %{buildroot}%{_bindir}/${T}-* ; do
_toolname=${f##$(dirname $f)/${T}-}
for p in arm-none-eabi; do
ln -sf %{_bindir}/$T-$(basename $f) %buildroot%{_bindir}/$p-$(basename $f)
ln -sf %{_bindir}/$T-${_toolname} %{buildroot}%{_bindir}/$p-${_toolname}
done
done
%endif
%if "%{TARGET}" == "riscv64"
# Instead of building duplicate binutils, add symlinks
for f in %buildroot/usr/$T/bin/* ; do
for f in %{buildroot}/usr/$T/bin/* ; do
for p in riscv64-elf; do
ln -sf %{_bindir}/$T-$(basename $f) %buildroot%{_bindir}/$p-$(basename $f)
ln -sf %{_bindir}/$T-$(basename $f) %{buildroot}%{_bindir}/$p-$(basename $f)
done
done
%endif
%if "%{TARGET}" == "avr"
install -c gas-nesc/as-new $RPM_BUILD_ROOT%{_prefix}/bin/%{TARGET_OS}-nesc-as
ln -sf ../../bin/%{TARGET_OS}-nesc-as $RPM_BUILD_ROOT%{_prefix}/%{TARGET_OS}/bin/nesc-as
install -c gas-nesc/as-new %{buildroot}%{_prefix}/bin/%{TARGET_OS}-nesc-as
ln -sf ../../bin/%{TARGET_OS}-nesc-as %{buildroot}%{_prefix}/%{TARGET_OS}/bin/nesc-as
%endif
rm -rf $RPM_BUILD_ROOT%{_mandir}
rm -rf $RPM_BUILD_ROOT%{_infodir}
rm -rf $RPM_BUILD_ROOT%{_prefix}/lib*
rm -rf $RPM_BUILD_ROOT%{_prefix}/include
rm -f $RPM_BUILD_ROOT%{_prefix}/bin/*-c++filt
rm -rf %{buildroot}%{_mandir}
rm -rf %{buildroot}%{_infodir}
rm -rf %{buildroot}%{_prefix}/lib*
rm -rf %{buildroot}%{_prefix}/include
rm -f %{buildroot}%{_prefix}/bin/*-c++filt
> ../binutils.lang
%endif
%fdupes %{buildroot}%{_prefix}
%if 0%{!?cross:1}
%post
@ -586,8 +582,7 @@ fi;
%postun -n libctf0 -p /sbin/ldconfig
%postun -n libctf-nobfd0 -p /sbin/ldconfig
%postun
/sbin/ldconfig
%postun -p /sbin/ldconfig
%endif
%files -f binutils.lang
@ -641,9 +636,11 @@ fi;
%{_libdir}/libctf-nobfd.so
%files -n libctf0
%defattr(-,root,root)
%{_libdir}/libctf.so.*
%files -n libctf-nobfd0
%defattr(-,root,root)
%{_libdir}/libctf-nobfd.so.*
%endif

View File

@ -1,3 +1,106 @@
-------------------------------------------------------------------
Fri Mar 4 10:44:39 UTC 2022 - Martin Liška <mliska@suse.cz>
- Update binutils-2.38-branch.diff.gz in order to include PR28879.
-------------------------------------------------------------------
Tue Mar 1 12:41:27 UTC 2022 - Michael Matz <matz@suse.com>
- From Stefan Brüns <stefan.bruens@rwth-aachen.de>:
* Install symlinks for all target specific tools on
arm-eabi-none [bsc#1185712]
-------------------------------------------------------------------
Thu Feb 24 09:10:44 UTC 2022 - Martin Liška <mliska@suse.cz>
- Do not re-generate ld/ldlex.c, ld/ldgram.c, ld/ldgram.h and verify
that corresponding flex/bison files are not modified by a patch.
-------------------------------------------------------------------
Thu Feb 24 06:55:14 UTC 2022 - Martin Liška <mliska@suse.cz>
- Use verbose mode for make for cross compilers.
-------------------------------------------------------------------
Wed Feb 23 17:52:15 UTC 2022 - Michael Matz <matz@suse.com>
- Make it build on SLE-11 again.
-------------------------------------------------------------------
Tue Feb 22 09:13:15 UTC 2022 - Martin Liška <mliska@suse.cz>
- Use verbose mode for make.
-------------------------------------------------------------------
Sat Feb 12 19:13:31 UTC 2022 - Martin Liška <mliska@suse.cz>
- Update to binutils 2.38:
* elfedit: Add --output-abiversion option to update ABIVERSION.
* Add support for the LoongArch instruction set.
* Tools which display symbols or strings (readelf, strings, nm, objdump)
have a new command line option which controls how unicode characters are
handled. By default they are treated as normal for the tool. Using
--unicode=locale will display them according to the current locale.
Using --unicode=hex will display them as hex byte values, whilst
--unicode=escape will display them as escape sequences. In addition
using --unicode=highlight will display them as unicode escape sequences
highlighted in red (if supported by the output device).
* readelf -r dumps RELR relative relocations now.
* Support for efi-app-aarch64, efi-rtdrv-aarch64 and efi-bsdrv-aarch64 has been
added to objcopy in order to enable UEFI development using binutils.
* ar: Add --thin for creating thin archives. -T is a deprecated alias without
diagnostics. In many ar implementations -T has a different meaning, as
specified by X/Open System Interface.
* Add support for AArch64 system registers that were missing in previous
releases.
* Add support for the LoongArch instruction set.
* Add a command-line option, -muse-unaligned-vector-move, for x86 target
to encode aligned vector move as unaligned vector move.
* Add support for Cortex-R52+ for Arm.
* Add support for Cortex-A510, Cortex-A710, Cortex-X2 for AArch64.
* Add support for Cortex-A710 for Arm.
* Add support for Scalable Matrix Extension (SME) for AArch64.
* The --multibyte-handling=[allow|warn|warn-sym-only] option tells the
assembler what to when it encoutners multibyte characters in the input. The
default is to allow them. Setting the option to "warn" will generate a
warning message whenever any multibyte character is encountered. Using the
option to "warn-sym-only" will make the assembler generate a warning whenever a
symbol is defined containing multibyte characters. (References to undefined
symbols will not generate warnings).
* Outputs of .ds.x directive and .tfloat directive with hex input from
x86 assembler have been reduced from 12 bytes to 10 bytes to match the
output of .tfloat directive.
* Add support for 'armv8.8-a', 'armv9-a', 'armv9.1-a', 'armv9.2-a' and
'armv9.3-a' for -march in AArch64 GAS.
* Add support for 'armv8.7-a', 'armv8.8-a', 'armv9-a', 'armv9.1-a',
'armv9.2-a' and 'armv9.3-a' for -march in Arm GAS.
* Add support for Intel AVX512_FP16 instructions.
* Add -z pack-relative-relocs/-z no pack-relative-relocs to x86 ELF
linker to pack relative relocations in the DT_RELR section.
* Add support for the LoongArch architecture.
* Add -z indirect-extern-access/-z noindirect-extern-access to x86 ELF
linker to control canonical function pointers and copy relocation.
* Add --max-cache-size=SIZE to set the the maximum cache size to SIZE
bytes.
- Add binutils-2.38-branch.diff.gz.
- Removed deletion of man pages as they should be properly packages
in tarball.
- Rebased patches: aarch64-common-pagesize.patch, add-ulp-section.diff,
binutils-bfd_h.patch, binutils-revert-nm-symversion.diff,
binutils-revert-plt32-in-branches.diff, binutils-skip-rpaths.patch
and binutils-compat-old-behaviour.diff.
-------------------------------------------------------------------
Fri Feb 4 13:13:20 UTC 2022 - Matwey Kornilov <matwey.kornilov@gmail.com>
- Enable PRU architecture for AM335x CPU (Beagle Bone Black board)
-------------------------------------------------------------------
Thu Jan 27 20:36:30 UTC 2022 - Dirk Müller <dmueller@suse.com>
- use fdupes on datadir
- remove RPM_BUILD_ROOT usage and other cleanups
-------------------------------------------------------------------
Fri Nov 12 13:20:09 UTC 2021 - Martin Liška <mliska@suse.cz>

View File

@ -1,7 +1,7 @@
#
# spec file for package cross-spu-binutils
#
# Copyright (c) 2021 SUSE LLC
# Copyright (c) 2022 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@ -23,6 +23,7 @@ ExcludeArch: spu
BuildRequires: bc
BuildRequires: bison
BuildRequires: dejagnu
BuildRequires: fdupes
BuildRequires: flex
BuildRequires: gcc-c++
# for the testsuite
@ -37,7 +38,7 @@ BuildRequires: zlib-devel-static
%else
BuildRequires: zlib-devel
%endif
Version: 2.37
Version: 2.38
Release: 0
# disable libalternatives for now until it's changed to not
@ -75,7 +76,7 @@ Release: 0
%else
%define build_multitarget 0
%endif
%define target_list aarch64 alpha armv5l armv6l armv7l armv8l avr epiphany hppa hppa64 i686 ia64 m68k mips powerpc powerpc64 powerpc64le riscv64 rx s390 s390x sh4 sparc sparc64 x86_64 xtensa
%define target_list aarch64 alpha armv5l armv6l armv7l armv8l avr pru epiphany hppa hppa64 i686 ia64 m68k mips powerpc powerpc64 powerpc64le riscv64 rx s390 s390x sh4 sparc sparc64 x86_64 xtensa
#
#
#
@ -95,7 +96,7 @@ Source5: binutils.keyring
Source1: pre_checkin.sh
Source2: README.First-for.SUSE.packagers
Source3: baselibs.conf
Patch1: binutils-2.37-branch.diff.gz
Patch1: binutils-2.38-branch.diff.gz
Patch3: binutils-skip-rpaths.patch
Patch4: s390-biarch.diff
Patch5: x86-64-biarch.patch
@ -141,7 +142,7 @@ Requires: alts
%else
PreReq: update-alternatives
%endif
%if 0%{!?cross:1}
%if 0%{!?cross:1} && 0%{?suse_version} >= 1310
%define gold_archs %ix86 aarch64 %arm x86_64 ppc ppc64 ppc64le s390x %sparc
%endif
@ -191,6 +192,11 @@ The Compact C Type Format (CTF) is a way of representing information about a bin
%prep
echo "make check will return with %{make_check_handling} in case of testsuite failures."
%setup -q -n binutils-%{version}
# Backup flex and biscon files for later verification.
cp ld/ldlex.l ld/ldlex.l.orig
cp ld/ldgram.y ld/ldgram.y.orig
# Patch is outside test_vanilla because it's supposed to be the
# patch bringing the tarball to the newest upstream version
%patch1 -p1
@ -228,22 +234,11 @@ cp gas/config/tc-avr.h gas/config/tc-avr-nesc.h
#
# test_vanilla
%endif
# in parallel builds, when the flex or bison inputs are patched (possibly
# in the ...-branch.diff) it might happen that the dependency tracking
# of automake is confused and uses the old .c files from srcdir/ld/ while
# also generating the new .c files in builddir/ld leading to trouble.
# I haven't found the right entries to ensure this doesn't happen, so
# simply remove the intermediates
rm -f ld/ldlex.c
rm -f ld/ldgram.c ld/ldgram.h
# The 2.37 released tarball contains wrongly pre-generated (empty) man pages
# so we remove those here as well. Consider removing for later releases.
rm -f binutils/doc/*.1
rm -f binutils/doc/cxxfilt.man
rm -f gprof/*.1
rm -f gas/doc/*.1
rm -f ld/*.1
# Due to legacy flex version present in SLE-12 (and older), we cannot
# re-generate flex and bison files and so we verify that any patch modify these files.
diff -u ld/ldlex.l ld/ldlex.l.orig
diff -u ld/ldgram.y ld/ldgram.y.orig
%build
%define _lto_cflags %{nil}
@ -330,14 +325,14 @@ cd build-dir
# we patch headers (bfd-in.h) that are input to other headers
# which are generated only with --enable-maintainer-mode (which we
# don't do) or explicitely by make headers, so do this:
make %{?_smp_mflags} all-bfd TARGET-bfd=headers
make %{?_smp_mflags} all-bfd TARGET-bfd=headers V=1
# the above interacts with --enable-pgo-build=lto because all-bfd doesn't
# have the PGO handling, hence it's config.cache files are wrong
# remove all of those for reconfigure
rm */config.cache
# force reconfiguring
rm bfd/Makefile
make %{?_smp_mflags}
make %{?_smp_mflags} V=1
%else
# building cross-TARGET-binutils
@ -369,7 +364,7 @@ EXTRA_TARGETS="$EXTRA_TARGETS,arm-suse-linux-gnueabi"
%if "%{TARGET}" == "aarch64"
EXTRA_TARGETS="$EXTRA_TARGETS,aarch64-suse-linux"
%endif
%if "%{TARGET}" == "avr" || "%{TARGET}" == "spu"
%if "%{TARGET}" == "avr" || "%{TARGET}" == "spu" || "%{TARGET}" == "pru"
%define TARGET_OS %{TARGET}
%else
%if "%{TARGET}" == "epiphany" || "%{TARGET}" == "riscv32" || "%{TARGET}" == "rx"
@ -403,11 +398,11 @@ EXTRA_TARGETS="$EXTRA_TARGETS,aarch64-suse-linux"
--enable-default-hash-style=both \
%endif
${EXTRA_TARGETS:+--enable-targets="${EXTRA_TARGETS#,}"}
make %{?_smp_mflags} all-bfd TARGET-bfd=headers
make %{?_smp_mflags} all-bfd TARGET-bfd=headers V=1
rm */config.cache
# force reconfiguring
rm bfd/Makefile
make %{?_smp_mflags}
make %{?_smp_mflags} V=1
%if "%{TARGET}" == "avr"
# build an extra nesC version because nesC requires $'s in identifiers
cp -a gas gas-nesc
@ -431,26 +426,25 @@ cd build-dir
%if 0%{!?cross:1}
# installing native binutils
%ifarch %gold_archs
make DESTDIR=$RPM_BUILD_ROOT install-gold
ln -sf ld.gold $RPM_BUILD_ROOT%{_bindir}/gold
make DESTDIR=%{buildroot} install-gold
ln -sf ld.gold %{buildroot}%{_bindir}/gold
%endif
make DESTDIR=$RPM_BUILD_ROOT install-info install
make -C gas/doc DESTDIR=$RPM_BUILD_ROOT install-info-am install-am
make DESTDIR=$RPM_BUILD_ROOT install-bfd install-opcodes
if [ ! -f "%buildroot/%_bindir/ld.bfd" ]; then
mv "%buildroot/%_bindir"/{ld,ld.bfd};
make DESTDIR=%{buildroot} install-info install
make DESTDIR=%{buildroot} install-bfd install-opcodes
if [ ! -f "%{buildroot}/%_bindir/ld.bfd" ]; then
mv "%{buildroot}/%_bindir"/{ld,ld.bfd};
else
rm -f "%buildroot/%_bindir/ld";
rm -f "%{buildroot}/%_bindir/ld";
fi
%if ! 0%{with libalternatives}
mkdir -p "%buildroot/%_sysconfdir/alternatives";
mkdir -p "%{buildroot}/%_sysconfdir/alternatives";
# Keep older versions of brp-symlink happy
%if %{suse_version} < 1310
ln -s "%_bindir/ld" "%buildroot/%_sysconfdir/alternatives/ld"
ln -s "%_bindir/ld" "%{buildroot}/%_sysconfdir/alternatives/ld"
%endif
ln -s "%_sysconfdir/alternatives/ld" "%buildroot/%_bindir/ld";
ln -s "%_sysconfdir/alternatives/ld" "%{buildroot}/%_bindir/ld";
%else
ln -s %{_bindir}/alts "%buildroot/%_bindir/ld";
ln -s %{_bindir}/alts "%{buildroot}/%_bindir/ld";
mkdir -p %{buildroot}%{_datadir}/libalternatives/ld;
cat > %{buildroot}%{_datadir}/libalternatives/ld/1.conf <<EOF
binary=%{_bindir}/ld.gold
@ -460,24 +454,24 @@ binary=%{_bindir}/ld.bfd
EOF
%endif
rm -rf $RPM_BUILD_ROOT%{_prefix}/%{HOST}/bin
mkdir -p $RPM_BUILD_ROOT%{_prefix}/%{HOST}/bin
ln -sf ../../bin/{ar,as,ld,nm,ranlib,strip} $RPM_BUILD_ROOT%{_prefix}/%{HOST}/bin
mv $RPM_BUILD_ROOT%{_prefix}/%{HOST}/lib/ldscripts $RPM_BUILD_ROOT%{_libdir}
ln -sf ../../%{_lib}/ldscripts $RPM_BUILD_ROOT%{_prefix}/%{HOST}/lib/ldscripts
rm -rf %{buildroot}%{_prefix}/%{HOST}/bin
mkdir -p %{buildroot}%{_prefix}/%{HOST}/bin
ln -sf ../../bin/{ar,as,ld,nm,ranlib,strip} %{buildroot}%{_prefix}/%{HOST}/bin
mv %{buildroot}%{_prefix}/%{HOST}/lib/ldscripts $RPM_BUILD_ROOT%{_libdir}
ln -sf ../../%{_lib}/ldscripts %{buildroot}%{_prefix}/%{HOST}/lib/ldscripts
# Install header files
make -C libiberty install_to_libdir target_header_dir=/usr/include DESTDIR=$RPM_BUILD_ROOT
make -C libiberty install_to_libdir target_header_dir=/usr/include DESTDIR=%{buildroot}
# We want the PIC libiberty.a
install -m 644 libiberty/pic/libiberty.a $RPM_BUILD_ROOT%{_libdir}
install -m 644 libiberty/pic/libiberty.a %{buildroot}%{_libdir}
#
chmod a+x $RPM_BUILD_ROOT%{_libdir}/libbfd-*
chmod a+x $RPM_BUILD_ROOT%{_libdir}/libopcodes-*
chmod a+x %{buildroot}%{_libdir}/libbfd-*
chmod a+x %{buildroot}%{_libdir}/libopcodes-*
# No shared linking outside binutils
rm $RPM_BUILD_ROOT%{_libdir}/lib{bfd,opcodes}.so
rm $RPM_BUILD_ROOT%{_libdir}/lib{bfd,opcodes}.la
rm %{buildroot}%{_libdir}/lib{bfd,opcodes}.so
rm %{buildroot}%{_libdir}/lib{bfd,opcodes,ctf,ctf-nobfd}.la
# Remove unwanted files to shut up rpm
rm -f $RPM_BUILD_ROOT%{_infodir}/configure* $RPM_BUILD_ROOT%{_infodir}/standards.info*
rm -f $RPM_BUILD_ROOT%{_mandir}/man1/dlltool.1 $RPM_BUILD_ROOT%{_mandir}/man1/windres.1 $RPM_BUILD_ROOT%{_mandir}/man1/windmc.1
rm -f %{buildroot}%{_infodir}/configure* $RPM_BUILD_ROOT%{_infodir}/standards.info*
rm -f %{buildroot}%{_mandir}/man1/dlltool.1 $RPM_BUILD_ROOT%{_mandir}/man1/windres.1 $RPM_BUILD_ROOT%{_mandir}/man1/windmc.1
cd ..
%find_lang binutils
%find_lang bfd binutils.lang
@ -488,45 +482,47 @@ cd ..
%ifarch %gold_archs
%find_lang gold binutils-gold.lang
%endif
mkdir -p $RPM_BUILD_ROOT%{_docdir}/%{name}
install -m 644 binutils/NEWS $RPM_BUILD_ROOT%{_docdir}/%{name}/NEWS-binutils
install -m 644 gas/NEWS $RPM_BUILD_ROOT%{_docdir}/%{name}/NEWS-gas
install -m 644 ld/NEWS $RPM_BUILD_ROOT%{_docdir}/%{name}/NEWS-ld
mkdir -p %{buildroot}%{_docdir}/%{name}
install -m 644 binutils/NEWS %{buildroot}%{_docdir}/%{name}/NEWS-binutils
install -m 644 gas/NEWS %{buildroot}%{_docdir}/%{name}/NEWS-gas
install -m 644 ld/NEWS %{buildroot}%{_docdir}/%{name}/NEWS-ld
%else
# installing cross-TARGET-binutils and TARGET-binutils
make DESTDIR=$RPM_BUILD_ROOT install
make DESTDIR=%{buildroot} install
# Replace hard links by symlinks, so that rpmlint doesn't complain
T=$(basename %buildroot/usr/%{TARGET_OS})
for f in %buildroot/usr/$T/bin/* ; do
T=$(basename %{buildroot}/usr/%{TARGET_OS})
for f in %{buildroot}/usr/$T/bin/* ; do
ln -sf /usr/bin/$T-$(basename $f) $f
done
%if "%{TARGET}" == "arm"
# Instead of building duplicate binutils, add symlinks
for f in %buildroot/usr/$T/bin/* ; do
for f in %{buildroot}%{_bindir}/${T}-* ; do
_toolname=${f##$(dirname $f)/${T}-}
for p in arm-none-eabi; do
ln -sf %{_bindir}/$T-$(basename $f) %buildroot%{_bindir}/$p-$(basename $f)
ln -sf %{_bindir}/$T-${_toolname} %{buildroot}%{_bindir}/$p-${_toolname}
done
done
%endif
%if "%{TARGET}" == "riscv64"
# Instead of building duplicate binutils, add symlinks
for f in %buildroot/usr/$T/bin/* ; do
for f in %{buildroot}/usr/$T/bin/* ; do
for p in riscv64-elf; do
ln -sf %{_bindir}/$T-$(basename $f) %buildroot%{_bindir}/$p-$(basename $f)
ln -sf %{_bindir}/$T-$(basename $f) %{buildroot}%{_bindir}/$p-$(basename $f)
done
done
%endif
%if "%{TARGET}" == "avr"
install -c gas-nesc/as-new $RPM_BUILD_ROOT%{_prefix}/bin/%{TARGET_OS}-nesc-as
ln -sf ../../bin/%{TARGET_OS}-nesc-as $RPM_BUILD_ROOT%{_prefix}/%{TARGET_OS}/bin/nesc-as
install -c gas-nesc/as-new %{buildroot}%{_prefix}/bin/%{TARGET_OS}-nesc-as
ln -sf ../../bin/%{TARGET_OS}-nesc-as %{buildroot}%{_prefix}/%{TARGET_OS}/bin/nesc-as
%endif
rm -rf $RPM_BUILD_ROOT%{_mandir}
rm -rf $RPM_BUILD_ROOT%{_infodir}
rm -rf $RPM_BUILD_ROOT%{_prefix}/lib*
rm -rf $RPM_BUILD_ROOT%{_prefix}/include
rm -f $RPM_BUILD_ROOT%{_prefix}/bin/*-c++filt
rm -rf %{buildroot}%{_mandir}
rm -rf %{buildroot}%{_infodir}
rm -rf %{buildroot}%{_prefix}/lib*
rm -rf %{buildroot}%{_prefix}/include
rm -f %{buildroot}%{_prefix}/bin/*-c++filt
> ../binutils.lang
%endif
%fdupes %{buildroot}%{_prefix}
%if 0%{!?cross:1}
%post
@ -586,8 +582,7 @@ fi;
%postun -n libctf0 -p /sbin/ldconfig
%postun -n libctf-nobfd0 -p /sbin/ldconfig
%postun
/sbin/ldconfig
%postun -p /sbin/ldconfig
%endif
%files -f binutils.lang
@ -641,9 +636,11 @@ fi;
%{_libdir}/libctf-nobfd.so
%files -n libctf0
%defattr(-,root,root)
%{_libdir}/libctf.so.*
%files -n libctf-nobfd0
%defattr(-,root,root)
%{_libdir}/libctf-nobfd.so.*
%endif

View File

@ -1,3 +1,106 @@
-------------------------------------------------------------------
Fri Mar 4 10:44:39 UTC 2022 - Martin Liška <mliska@suse.cz>
- Update binutils-2.38-branch.diff.gz in order to include PR28879.
-------------------------------------------------------------------
Tue Mar 1 12:41:27 UTC 2022 - Michael Matz <matz@suse.com>
- From Stefan Brüns <stefan.bruens@rwth-aachen.de>:
* Install symlinks for all target specific tools on
arm-eabi-none [bsc#1185712]
-------------------------------------------------------------------
Thu Feb 24 09:10:44 UTC 2022 - Martin Liška <mliska@suse.cz>
- Do not re-generate ld/ldlex.c, ld/ldgram.c, ld/ldgram.h and verify
that corresponding flex/bison files are not modified by a patch.
-------------------------------------------------------------------
Thu Feb 24 06:55:14 UTC 2022 - Martin Liška <mliska@suse.cz>
- Use verbose mode for make for cross compilers.
-------------------------------------------------------------------
Wed Feb 23 17:52:15 UTC 2022 - Michael Matz <matz@suse.com>
- Make it build on SLE-11 again.
-------------------------------------------------------------------
Tue Feb 22 09:13:15 UTC 2022 - Martin Liška <mliska@suse.cz>
- Use verbose mode for make.
-------------------------------------------------------------------
Sat Feb 12 19:13:31 UTC 2022 - Martin Liška <mliska@suse.cz>
- Update to binutils 2.38:
* elfedit: Add --output-abiversion option to update ABIVERSION.
* Add support for the LoongArch instruction set.
* Tools which display symbols or strings (readelf, strings, nm, objdump)
have a new command line option which controls how unicode characters are
handled. By default they are treated as normal for the tool. Using
--unicode=locale will display them according to the current locale.
Using --unicode=hex will display them as hex byte values, whilst
--unicode=escape will display them as escape sequences. In addition
using --unicode=highlight will display them as unicode escape sequences
highlighted in red (if supported by the output device).
* readelf -r dumps RELR relative relocations now.
* Support for efi-app-aarch64, efi-rtdrv-aarch64 and efi-bsdrv-aarch64 has been
added to objcopy in order to enable UEFI development using binutils.
* ar: Add --thin for creating thin archives. -T is a deprecated alias without
diagnostics. In many ar implementations -T has a different meaning, as
specified by X/Open System Interface.
* Add support for AArch64 system registers that were missing in previous
releases.
* Add support for the LoongArch instruction set.
* Add a command-line option, -muse-unaligned-vector-move, for x86 target
to encode aligned vector move as unaligned vector move.
* Add support for Cortex-R52+ for Arm.
* Add support for Cortex-A510, Cortex-A710, Cortex-X2 for AArch64.
* Add support for Cortex-A710 for Arm.
* Add support for Scalable Matrix Extension (SME) for AArch64.
* The --multibyte-handling=[allow|warn|warn-sym-only] option tells the
assembler what to when it encoutners multibyte characters in the input. The
default is to allow them. Setting the option to "warn" will generate a
warning message whenever any multibyte character is encountered. Using the
option to "warn-sym-only" will make the assembler generate a warning whenever a
symbol is defined containing multibyte characters. (References to undefined
symbols will not generate warnings).
* Outputs of .ds.x directive and .tfloat directive with hex input from
x86 assembler have been reduced from 12 bytes to 10 bytes to match the
output of .tfloat directive.
* Add support for 'armv8.8-a', 'armv9-a', 'armv9.1-a', 'armv9.2-a' and
'armv9.3-a' for -march in AArch64 GAS.
* Add support for 'armv8.7-a', 'armv8.8-a', 'armv9-a', 'armv9.1-a',
'armv9.2-a' and 'armv9.3-a' for -march in Arm GAS.
* Add support for Intel AVX512_FP16 instructions.
* Add -z pack-relative-relocs/-z no pack-relative-relocs to x86 ELF
linker to pack relative relocations in the DT_RELR section.
* Add support for the LoongArch architecture.
* Add -z indirect-extern-access/-z noindirect-extern-access to x86 ELF
linker to control canonical function pointers and copy relocation.
* Add --max-cache-size=SIZE to set the the maximum cache size to SIZE
bytes.
- Add binutils-2.38-branch.diff.gz.
- Removed deletion of man pages as they should be properly packages
in tarball.
- Rebased patches: aarch64-common-pagesize.patch, add-ulp-section.diff,
binutils-bfd_h.patch, binutils-revert-nm-symversion.diff,
binutils-revert-plt32-in-branches.diff, binutils-skip-rpaths.patch
and binutils-compat-old-behaviour.diff.
-------------------------------------------------------------------
Fri Feb 4 13:13:20 UTC 2022 - Matwey Kornilov <matwey.kornilov@gmail.com>
- Enable PRU architecture for AM335x CPU (Beagle Bone Black board)
-------------------------------------------------------------------
Thu Jan 27 20:36:30 UTC 2022 - Dirk Müller <dmueller@suse.com>
- use fdupes on datadir
- remove RPM_BUILD_ROOT usage and other cleanups
-------------------------------------------------------------------
Fri Nov 12 13:20:09 UTC 2021 - Martin Liška <mliska@suse.cz>

View File

@ -1,7 +1,7 @@
#
# spec file for package cross-x86_64-binutils
#
# Copyright (c) 2021 SUSE LLC
# Copyright (c) 2022 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@ -23,6 +23,7 @@ ExcludeArch: x86_64
BuildRequires: bc
BuildRequires: bison
BuildRequires: dejagnu
BuildRequires: fdupes
BuildRequires: flex
BuildRequires: gcc-c++
# for the testsuite
@ -37,7 +38,7 @@ BuildRequires: zlib-devel-static
%else
BuildRequires: zlib-devel
%endif
Version: 2.37
Version: 2.38
Release: 0
# disable libalternatives for now until it's changed to not
@ -75,7 +76,7 @@ Release: 0
%else
%define build_multitarget 0
%endif
%define target_list aarch64 alpha armv5l armv6l armv7l armv8l avr epiphany hppa hppa64 i686 ia64 m68k mips powerpc powerpc64 powerpc64le riscv64 rx s390 s390x sh4 sparc sparc64 x86_64 xtensa
%define target_list aarch64 alpha armv5l armv6l armv7l armv8l avr pru epiphany hppa hppa64 i686 ia64 m68k mips powerpc powerpc64 powerpc64le riscv64 rx s390 s390x sh4 sparc sparc64 x86_64 xtensa
#
#
#
@ -95,7 +96,7 @@ Source5: binutils.keyring
Source1: pre_checkin.sh
Source2: README.First-for.SUSE.packagers
Source3: baselibs.conf
Patch1: binutils-2.37-branch.diff.gz
Patch1: binutils-2.38-branch.diff.gz
Patch3: binutils-skip-rpaths.patch
Patch4: s390-biarch.diff
Patch5: x86-64-biarch.patch
@ -141,7 +142,7 @@ Requires: alts
%else
PreReq: update-alternatives
%endif
%if 0%{!?cross:1}
%if 0%{!?cross:1} && 0%{?suse_version} >= 1310
%define gold_archs %ix86 aarch64 %arm x86_64 ppc ppc64 ppc64le s390x %sparc
%endif
@ -191,6 +192,11 @@ The Compact C Type Format (CTF) is a way of representing information about a bin
%prep
echo "make check will return with %{make_check_handling} in case of testsuite failures."
%setup -q -n binutils-%{version}
# Backup flex and biscon files for later verification.
cp ld/ldlex.l ld/ldlex.l.orig
cp ld/ldgram.y ld/ldgram.y.orig
# Patch is outside test_vanilla because it's supposed to be the
# patch bringing the tarball to the newest upstream version
%patch1 -p1
@ -228,22 +234,11 @@ cp gas/config/tc-avr.h gas/config/tc-avr-nesc.h
#
# test_vanilla
%endif
# in parallel builds, when the flex or bison inputs are patched (possibly
# in the ...-branch.diff) it might happen that the dependency tracking
# of automake is confused and uses the old .c files from srcdir/ld/ while
# also generating the new .c files in builddir/ld leading to trouble.
# I haven't found the right entries to ensure this doesn't happen, so
# simply remove the intermediates
rm -f ld/ldlex.c
rm -f ld/ldgram.c ld/ldgram.h
# The 2.37 released tarball contains wrongly pre-generated (empty) man pages
# so we remove those here as well. Consider removing for later releases.
rm -f binutils/doc/*.1
rm -f binutils/doc/cxxfilt.man
rm -f gprof/*.1
rm -f gas/doc/*.1
rm -f ld/*.1
# Due to legacy flex version present in SLE-12 (and older), we cannot
# re-generate flex and bison files and so we verify that any patch modify these files.
diff -u ld/ldlex.l ld/ldlex.l.orig
diff -u ld/ldgram.y ld/ldgram.y.orig
%build
%define _lto_cflags %{nil}
@ -330,14 +325,14 @@ cd build-dir
# we patch headers (bfd-in.h) that are input to other headers
# which are generated only with --enable-maintainer-mode (which we
# don't do) or explicitely by make headers, so do this:
make %{?_smp_mflags} all-bfd TARGET-bfd=headers
make %{?_smp_mflags} all-bfd TARGET-bfd=headers V=1
# the above interacts with --enable-pgo-build=lto because all-bfd doesn't
# have the PGO handling, hence it's config.cache files are wrong
# remove all of those for reconfigure
rm */config.cache
# force reconfiguring
rm bfd/Makefile
make %{?_smp_mflags}
make %{?_smp_mflags} V=1
%else
# building cross-TARGET-binutils
@ -369,7 +364,7 @@ EXTRA_TARGETS="$EXTRA_TARGETS,arm-suse-linux-gnueabi"
%if "%{TARGET}" == "aarch64"
EXTRA_TARGETS="$EXTRA_TARGETS,aarch64-suse-linux"
%endif
%if "%{TARGET}" == "avr" || "%{TARGET}" == "spu"
%if "%{TARGET}" == "avr" || "%{TARGET}" == "spu" || "%{TARGET}" == "pru"
%define TARGET_OS %{TARGET}
%else
%if "%{TARGET}" == "epiphany" || "%{TARGET}" == "riscv32" || "%{TARGET}" == "rx"
@ -403,11 +398,11 @@ EXTRA_TARGETS="$EXTRA_TARGETS,aarch64-suse-linux"
--enable-default-hash-style=both \
%endif
${EXTRA_TARGETS:+--enable-targets="${EXTRA_TARGETS#,}"}
make %{?_smp_mflags} all-bfd TARGET-bfd=headers
make %{?_smp_mflags} all-bfd TARGET-bfd=headers V=1
rm */config.cache
# force reconfiguring
rm bfd/Makefile
make %{?_smp_mflags}
make %{?_smp_mflags} V=1
%if "%{TARGET}" == "avr"
# build an extra nesC version because nesC requires $'s in identifiers
cp -a gas gas-nesc
@ -431,26 +426,25 @@ cd build-dir
%if 0%{!?cross:1}
# installing native binutils
%ifarch %gold_archs
make DESTDIR=$RPM_BUILD_ROOT install-gold
ln -sf ld.gold $RPM_BUILD_ROOT%{_bindir}/gold
make DESTDIR=%{buildroot} install-gold
ln -sf ld.gold %{buildroot}%{_bindir}/gold
%endif
make DESTDIR=$RPM_BUILD_ROOT install-info install
make -C gas/doc DESTDIR=$RPM_BUILD_ROOT install-info-am install-am
make DESTDIR=$RPM_BUILD_ROOT install-bfd install-opcodes
if [ ! -f "%buildroot/%_bindir/ld.bfd" ]; then
mv "%buildroot/%_bindir"/{ld,ld.bfd};
make DESTDIR=%{buildroot} install-info install
make DESTDIR=%{buildroot} install-bfd install-opcodes
if [ ! -f "%{buildroot}/%_bindir/ld.bfd" ]; then
mv "%{buildroot}/%_bindir"/{ld,ld.bfd};
else
rm -f "%buildroot/%_bindir/ld";
rm -f "%{buildroot}/%_bindir/ld";
fi
%if ! 0%{with libalternatives}
mkdir -p "%buildroot/%_sysconfdir/alternatives";
mkdir -p "%{buildroot}/%_sysconfdir/alternatives";
# Keep older versions of brp-symlink happy
%if %{suse_version} < 1310
ln -s "%_bindir/ld" "%buildroot/%_sysconfdir/alternatives/ld"
ln -s "%_bindir/ld" "%{buildroot}/%_sysconfdir/alternatives/ld"
%endif
ln -s "%_sysconfdir/alternatives/ld" "%buildroot/%_bindir/ld";
ln -s "%_sysconfdir/alternatives/ld" "%{buildroot}/%_bindir/ld";
%else
ln -s %{_bindir}/alts "%buildroot/%_bindir/ld";
ln -s %{_bindir}/alts "%{buildroot}/%_bindir/ld";
mkdir -p %{buildroot}%{_datadir}/libalternatives/ld;
cat > %{buildroot}%{_datadir}/libalternatives/ld/1.conf <<EOF
binary=%{_bindir}/ld.gold
@ -460,24 +454,24 @@ binary=%{_bindir}/ld.bfd
EOF
%endif
rm -rf $RPM_BUILD_ROOT%{_prefix}/%{HOST}/bin
mkdir -p $RPM_BUILD_ROOT%{_prefix}/%{HOST}/bin
ln -sf ../../bin/{ar,as,ld,nm,ranlib,strip} $RPM_BUILD_ROOT%{_prefix}/%{HOST}/bin
mv $RPM_BUILD_ROOT%{_prefix}/%{HOST}/lib/ldscripts $RPM_BUILD_ROOT%{_libdir}
ln -sf ../../%{_lib}/ldscripts $RPM_BUILD_ROOT%{_prefix}/%{HOST}/lib/ldscripts
rm -rf %{buildroot}%{_prefix}/%{HOST}/bin
mkdir -p %{buildroot}%{_prefix}/%{HOST}/bin
ln -sf ../../bin/{ar,as,ld,nm,ranlib,strip} %{buildroot}%{_prefix}/%{HOST}/bin
mv %{buildroot}%{_prefix}/%{HOST}/lib/ldscripts $RPM_BUILD_ROOT%{_libdir}
ln -sf ../../%{_lib}/ldscripts %{buildroot}%{_prefix}/%{HOST}/lib/ldscripts
# Install header files
make -C libiberty install_to_libdir target_header_dir=/usr/include DESTDIR=$RPM_BUILD_ROOT
make -C libiberty install_to_libdir target_header_dir=/usr/include DESTDIR=%{buildroot}
# We want the PIC libiberty.a
install -m 644 libiberty/pic/libiberty.a $RPM_BUILD_ROOT%{_libdir}
install -m 644 libiberty/pic/libiberty.a %{buildroot}%{_libdir}
#
chmod a+x $RPM_BUILD_ROOT%{_libdir}/libbfd-*
chmod a+x $RPM_BUILD_ROOT%{_libdir}/libopcodes-*
chmod a+x %{buildroot}%{_libdir}/libbfd-*
chmod a+x %{buildroot}%{_libdir}/libopcodes-*
# No shared linking outside binutils
rm $RPM_BUILD_ROOT%{_libdir}/lib{bfd,opcodes}.so
rm $RPM_BUILD_ROOT%{_libdir}/lib{bfd,opcodes}.la
rm %{buildroot}%{_libdir}/lib{bfd,opcodes}.so
rm %{buildroot}%{_libdir}/lib{bfd,opcodes,ctf,ctf-nobfd}.la
# Remove unwanted files to shut up rpm
rm -f $RPM_BUILD_ROOT%{_infodir}/configure* $RPM_BUILD_ROOT%{_infodir}/standards.info*
rm -f $RPM_BUILD_ROOT%{_mandir}/man1/dlltool.1 $RPM_BUILD_ROOT%{_mandir}/man1/windres.1 $RPM_BUILD_ROOT%{_mandir}/man1/windmc.1
rm -f %{buildroot}%{_infodir}/configure* $RPM_BUILD_ROOT%{_infodir}/standards.info*
rm -f %{buildroot}%{_mandir}/man1/dlltool.1 $RPM_BUILD_ROOT%{_mandir}/man1/windres.1 $RPM_BUILD_ROOT%{_mandir}/man1/windmc.1
cd ..
%find_lang binutils
%find_lang bfd binutils.lang
@ -488,45 +482,47 @@ cd ..
%ifarch %gold_archs
%find_lang gold binutils-gold.lang
%endif
mkdir -p $RPM_BUILD_ROOT%{_docdir}/%{name}
install -m 644 binutils/NEWS $RPM_BUILD_ROOT%{_docdir}/%{name}/NEWS-binutils
install -m 644 gas/NEWS $RPM_BUILD_ROOT%{_docdir}/%{name}/NEWS-gas
install -m 644 ld/NEWS $RPM_BUILD_ROOT%{_docdir}/%{name}/NEWS-ld
mkdir -p %{buildroot}%{_docdir}/%{name}
install -m 644 binutils/NEWS %{buildroot}%{_docdir}/%{name}/NEWS-binutils
install -m 644 gas/NEWS %{buildroot}%{_docdir}/%{name}/NEWS-gas
install -m 644 ld/NEWS %{buildroot}%{_docdir}/%{name}/NEWS-ld
%else
# installing cross-TARGET-binutils and TARGET-binutils
make DESTDIR=$RPM_BUILD_ROOT install
make DESTDIR=%{buildroot} install
# Replace hard links by symlinks, so that rpmlint doesn't complain
T=$(basename %buildroot/usr/%{TARGET_OS})
for f in %buildroot/usr/$T/bin/* ; do
T=$(basename %{buildroot}/usr/%{TARGET_OS})
for f in %{buildroot}/usr/$T/bin/* ; do
ln -sf /usr/bin/$T-$(basename $f) $f
done
%if "%{TARGET}" == "arm"
# Instead of building duplicate binutils, add symlinks
for f in %buildroot/usr/$T/bin/* ; do
for f in %{buildroot}%{_bindir}/${T}-* ; do
_toolname=${f##$(dirname $f)/${T}-}
for p in arm-none-eabi; do
ln -sf %{_bindir}/$T-$(basename $f) %buildroot%{_bindir}/$p-$(basename $f)
ln -sf %{_bindir}/$T-${_toolname} %{buildroot}%{_bindir}/$p-${_toolname}
done
done
%endif
%if "%{TARGET}" == "riscv64"
# Instead of building duplicate binutils, add symlinks
for f in %buildroot/usr/$T/bin/* ; do
for f in %{buildroot}/usr/$T/bin/* ; do
for p in riscv64-elf; do
ln -sf %{_bindir}/$T-$(basename $f) %buildroot%{_bindir}/$p-$(basename $f)
ln -sf %{_bindir}/$T-$(basename $f) %{buildroot}%{_bindir}/$p-$(basename $f)
done
done
%endif
%if "%{TARGET}" == "avr"
install -c gas-nesc/as-new $RPM_BUILD_ROOT%{_prefix}/bin/%{TARGET_OS}-nesc-as
ln -sf ../../bin/%{TARGET_OS}-nesc-as $RPM_BUILD_ROOT%{_prefix}/%{TARGET_OS}/bin/nesc-as
install -c gas-nesc/as-new %{buildroot}%{_prefix}/bin/%{TARGET_OS}-nesc-as
ln -sf ../../bin/%{TARGET_OS}-nesc-as %{buildroot}%{_prefix}/%{TARGET_OS}/bin/nesc-as
%endif
rm -rf $RPM_BUILD_ROOT%{_mandir}
rm -rf $RPM_BUILD_ROOT%{_infodir}
rm -rf $RPM_BUILD_ROOT%{_prefix}/lib*
rm -rf $RPM_BUILD_ROOT%{_prefix}/include
rm -f $RPM_BUILD_ROOT%{_prefix}/bin/*-c++filt
rm -rf %{buildroot}%{_mandir}
rm -rf %{buildroot}%{_infodir}
rm -rf %{buildroot}%{_prefix}/lib*
rm -rf %{buildroot}%{_prefix}/include
rm -f %{buildroot}%{_prefix}/bin/*-c++filt
> ../binutils.lang
%endif
%fdupes %{buildroot}%{_prefix}
%if 0%{!?cross:1}
%post
@ -586,8 +582,7 @@ fi;
%postun -n libctf0 -p /sbin/ldconfig
%postun -n libctf-nobfd0 -p /sbin/ldconfig
%postun
/sbin/ldconfig
%postun -p /sbin/ldconfig
%endif
%files -f binutils.lang
@ -641,9 +636,11 @@ fi;
%{_libdir}/libctf-nobfd.so
%files -n libctf0
%defattr(-,root,root)
%{_libdir}/libctf.so.*
%files -n libctf-nobfd0
%defattr(-,root,root)
%{_libdir}/libctf-nobfd.so.*
%endif

View File

@ -1,3 +1,106 @@
-------------------------------------------------------------------
Fri Mar 4 10:44:39 UTC 2022 - Martin Liška <mliska@suse.cz>
- Update binutils-2.38-branch.diff.gz in order to include PR28879.
-------------------------------------------------------------------
Tue Mar 1 12:41:27 UTC 2022 - Michael Matz <matz@suse.com>
- From Stefan Brüns <stefan.bruens@rwth-aachen.de>:
* Install symlinks for all target specific tools on
arm-eabi-none [bsc#1185712]
-------------------------------------------------------------------
Thu Feb 24 09:10:44 UTC 2022 - Martin Liška <mliska@suse.cz>
- Do not re-generate ld/ldlex.c, ld/ldgram.c, ld/ldgram.h and verify
that corresponding flex/bison files are not modified by a patch.
-------------------------------------------------------------------
Thu Feb 24 06:55:14 UTC 2022 - Martin Liška <mliska@suse.cz>
- Use verbose mode for make for cross compilers.
-------------------------------------------------------------------
Wed Feb 23 17:52:15 UTC 2022 - Michael Matz <matz@suse.com>
- Make it build on SLE-11 again.
-------------------------------------------------------------------
Tue Feb 22 09:13:15 UTC 2022 - Martin Liška <mliska@suse.cz>
- Use verbose mode for make.
-------------------------------------------------------------------
Sat Feb 12 19:13:31 UTC 2022 - Martin Liška <mliska@suse.cz>
- Update to binutils 2.38:
* elfedit: Add --output-abiversion option to update ABIVERSION.
* Add support for the LoongArch instruction set.
* Tools which display symbols or strings (readelf, strings, nm, objdump)
have a new command line option which controls how unicode characters are
handled. By default they are treated as normal for the tool. Using
--unicode=locale will display them according to the current locale.
Using --unicode=hex will display them as hex byte values, whilst
--unicode=escape will display them as escape sequences. In addition
using --unicode=highlight will display them as unicode escape sequences
highlighted in red (if supported by the output device).
* readelf -r dumps RELR relative relocations now.
* Support for efi-app-aarch64, efi-rtdrv-aarch64 and efi-bsdrv-aarch64 has been
added to objcopy in order to enable UEFI development using binutils.
* ar: Add --thin for creating thin archives. -T is a deprecated alias without
diagnostics. In many ar implementations -T has a different meaning, as
specified by X/Open System Interface.
* Add support for AArch64 system registers that were missing in previous
releases.
* Add support for the LoongArch instruction set.
* Add a command-line option, -muse-unaligned-vector-move, for x86 target
to encode aligned vector move as unaligned vector move.
* Add support for Cortex-R52+ for Arm.
* Add support for Cortex-A510, Cortex-A710, Cortex-X2 for AArch64.
* Add support for Cortex-A710 for Arm.
* Add support for Scalable Matrix Extension (SME) for AArch64.
* The --multibyte-handling=[allow|warn|warn-sym-only] option tells the
assembler what to when it encoutners multibyte characters in the input. The
default is to allow them. Setting the option to "warn" will generate a
warning message whenever any multibyte character is encountered. Using the
option to "warn-sym-only" will make the assembler generate a warning whenever a
symbol is defined containing multibyte characters. (References to undefined
symbols will not generate warnings).
* Outputs of .ds.x directive and .tfloat directive with hex input from
x86 assembler have been reduced from 12 bytes to 10 bytes to match the
output of .tfloat directive.
* Add support for 'armv8.8-a', 'armv9-a', 'armv9.1-a', 'armv9.2-a' and
'armv9.3-a' for -march in AArch64 GAS.
* Add support for 'armv8.7-a', 'armv8.8-a', 'armv9-a', 'armv9.1-a',
'armv9.2-a' and 'armv9.3-a' for -march in Arm GAS.
* Add support for Intel AVX512_FP16 instructions.
* Add -z pack-relative-relocs/-z no pack-relative-relocs to x86 ELF
linker to pack relative relocations in the DT_RELR section.
* Add support for the LoongArch architecture.
* Add -z indirect-extern-access/-z noindirect-extern-access to x86 ELF
linker to control canonical function pointers and copy relocation.
* Add --max-cache-size=SIZE to set the the maximum cache size to SIZE
bytes.
- Add binutils-2.38-branch.diff.gz.
- Removed deletion of man pages as they should be properly packages
in tarball.
- Rebased patches: aarch64-common-pagesize.patch, add-ulp-section.diff,
binutils-bfd_h.patch, binutils-revert-nm-symversion.diff,
binutils-revert-plt32-in-branches.diff, binutils-skip-rpaths.patch
and binutils-compat-old-behaviour.diff.
-------------------------------------------------------------------
Fri Feb 4 13:13:20 UTC 2022 - Matwey Kornilov <matwey.kornilov@gmail.com>
- Enable PRU architecture for AM335x CPU (Beagle Bone Black board)
-------------------------------------------------------------------
Thu Jan 27 20:36:30 UTC 2022 - Dirk Müller <dmueller@suse.com>
- use fdupes on datadir
- remove RPM_BUILD_ROOT usage and other cleanups
-------------------------------------------------------------------
Fri Nov 12 13:20:09 UTC 2021 - Martin Liška <mliska@suse.cz>

View File

@ -1,7 +1,7 @@
#
# spec file for package cross-xtensa-binutils
#
# Copyright (c) 2021 SUSE LLC
# Copyright (c) 2022 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@ -23,6 +23,7 @@ ExcludeArch: xtensa
BuildRequires: bc
BuildRequires: bison
BuildRequires: dejagnu
BuildRequires: fdupes
BuildRequires: flex
BuildRequires: gcc-c++
# for the testsuite
@ -37,7 +38,7 @@ BuildRequires: zlib-devel-static
%else
BuildRequires: zlib-devel
%endif
Version: 2.37
Version: 2.38
Release: 0
# disable libalternatives for now until it's changed to not
@ -75,7 +76,7 @@ Release: 0
%else
%define build_multitarget 0
%endif
%define target_list aarch64 alpha armv5l armv6l armv7l armv8l avr epiphany hppa hppa64 i686 ia64 m68k mips powerpc powerpc64 powerpc64le riscv64 rx s390 s390x sh4 sparc sparc64 x86_64 xtensa
%define target_list aarch64 alpha armv5l armv6l armv7l armv8l avr pru epiphany hppa hppa64 i686 ia64 m68k mips powerpc powerpc64 powerpc64le riscv64 rx s390 s390x sh4 sparc sparc64 x86_64 xtensa
#
#
#
@ -95,7 +96,7 @@ Source5: binutils.keyring
Source1: pre_checkin.sh
Source2: README.First-for.SUSE.packagers
Source3: baselibs.conf
Patch1: binutils-2.37-branch.diff.gz
Patch1: binutils-2.38-branch.diff.gz
Patch3: binutils-skip-rpaths.patch
Patch4: s390-biarch.diff
Patch5: x86-64-biarch.patch
@ -141,7 +142,7 @@ Requires: alts
%else
PreReq: update-alternatives
%endif
%if 0%{!?cross:1}
%if 0%{!?cross:1} && 0%{?suse_version} >= 1310
%define gold_archs %ix86 aarch64 %arm x86_64 ppc ppc64 ppc64le s390x %sparc
%endif
@ -191,6 +192,11 @@ The Compact C Type Format (CTF) is a way of representing information about a bin
%prep
echo "make check will return with %{make_check_handling} in case of testsuite failures."
%setup -q -n binutils-%{version}
# Backup flex and biscon files for later verification.
cp ld/ldlex.l ld/ldlex.l.orig
cp ld/ldgram.y ld/ldgram.y.orig
# Patch is outside test_vanilla because it's supposed to be the
# patch bringing the tarball to the newest upstream version
%patch1 -p1
@ -228,22 +234,11 @@ cp gas/config/tc-avr.h gas/config/tc-avr-nesc.h
#
# test_vanilla
%endif
# in parallel builds, when the flex or bison inputs are patched (possibly
# in the ...-branch.diff) it might happen that the dependency tracking
# of automake is confused and uses the old .c files from srcdir/ld/ while
# also generating the new .c files in builddir/ld leading to trouble.
# I haven't found the right entries to ensure this doesn't happen, so
# simply remove the intermediates
rm -f ld/ldlex.c
rm -f ld/ldgram.c ld/ldgram.h
# The 2.37 released tarball contains wrongly pre-generated (empty) man pages
# so we remove those here as well. Consider removing for later releases.
rm -f binutils/doc/*.1
rm -f binutils/doc/cxxfilt.man
rm -f gprof/*.1
rm -f gas/doc/*.1
rm -f ld/*.1
# Due to legacy flex version present in SLE-12 (and older), we cannot
# re-generate flex and bison files and so we verify that any patch modify these files.
diff -u ld/ldlex.l ld/ldlex.l.orig
diff -u ld/ldgram.y ld/ldgram.y.orig
%build
%define _lto_cflags %{nil}
@ -330,14 +325,14 @@ cd build-dir
# we patch headers (bfd-in.h) that are input to other headers
# which are generated only with --enable-maintainer-mode (which we
# don't do) or explicitely by make headers, so do this:
make %{?_smp_mflags} all-bfd TARGET-bfd=headers
make %{?_smp_mflags} all-bfd TARGET-bfd=headers V=1
# the above interacts with --enable-pgo-build=lto because all-bfd doesn't
# have the PGO handling, hence it's config.cache files are wrong
# remove all of those for reconfigure
rm */config.cache
# force reconfiguring
rm bfd/Makefile
make %{?_smp_mflags}
make %{?_smp_mflags} V=1
%else
# building cross-TARGET-binutils
@ -369,7 +364,7 @@ EXTRA_TARGETS="$EXTRA_TARGETS,arm-suse-linux-gnueabi"
%if "%{TARGET}" == "aarch64"
EXTRA_TARGETS="$EXTRA_TARGETS,aarch64-suse-linux"
%endif
%if "%{TARGET}" == "avr" || "%{TARGET}" == "spu"
%if "%{TARGET}" == "avr" || "%{TARGET}" == "spu" || "%{TARGET}" == "pru"
%define TARGET_OS %{TARGET}
%else
%if "%{TARGET}" == "epiphany" || "%{TARGET}" == "riscv32" || "%{TARGET}" == "rx"
@ -403,11 +398,11 @@ EXTRA_TARGETS="$EXTRA_TARGETS,aarch64-suse-linux"
--enable-default-hash-style=both \
%endif
${EXTRA_TARGETS:+--enable-targets="${EXTRA_TARGETS#,}"}
make %{?_smp_mflags} all-bfd TARGET-bfd=headers
make %{?_smp_mflags} all-bfd TARGET-bfd=headers V=1
rm */config.cache
# force reconfiguring
rm bfd/Makefile
make %{?_smp_mflags}
make %{?_smp_mflags} V=1
%if "%{TARGET}" == "avr"
# build an extra nesC version because nesC requires $'s in identifiers
cp -a gas gas-nesc
@ -431,26 +426,25 @@ cd build-dir
%if 0%{!?cross:1}
# installing native binutils
%ifarch %gold_archs
make DESTDIR=$RPM_BUILD_ROOT install-gold
ln -sf ld.gold $RPM_BUILD_ROOT%{_bindir}/gold
make DESTDIR=%{buildroot} install-gold
ln -sf ld.gold %{buildroot}%{_bindir}/gold
%endif
make DESTDIR=$RPM_BUILD_ROOT install-info install
make -C gas/doc DESTDIR=$RPM_BUILD_ROOT install-info-am install-am
make DESTDIR=$RPM_BUILD_ROOT install-bfd install-opcodes
if [ ! -f "%buildroot/%_bindir/ld.bfd" ]; then
mv "%buildroot/%_bindir"/{ld,ld.bfd};
make DESTDIR=%{buildroot} install-info install
make DESTDIR=%{buildroot} install-bfd install-opcodes
if [ ! -f "%{buildroot}/%_bindir/ld.bfd" ]; then
mv "%{buildroot}/%_bindir"/{ld,ld.bfd};
else
rm -f "%buildroot/%_bindir/ld";
rm -f "%{buildroot}/%_bindir/ld";
fi
%if ! 0%{with libalternatives}
mkdir -p "%buildroot/%_sysconfdir/alternatives";
mkdir -p "%{buildroot}/%_sysconfdir/alternatives";
# Keep older versions of brp-symlink happy
%if %{suse_version} < 1310
ln -s "%_bindir/ld" "%buildroot/%_sysconfdir/alternatives/ld"
ln -s "%_bindir/ld" "%{buildroot}/%_sysconfdir/alternatives/ld"
%endif
ln -s "%_sysconfdir/alternatives/ld" "%buildroot/%_bindir/ld";
ln -s "%_sysconfdir/alternatives/ld" "%{buildroot}/%_bindir/ld";
%else
ln -s %{_bindir}/alts "%buildroot/%_bindir/ld";
ln -s %{_bindir}/alts "%{buildroot}/%_bindir/ld";
mkdir -p %{buildroot}%{_datadir}/libalternatives/ld;
cat > %{buildroot}%{_datadir}/libalternatives/ld/1.conf <<EOF
binary=%{_bindir}/ld.gold
@ -460,24 +454,24 @@ binary=%{_bindir}/ld.bfd
EOF
%endif
rm -rf $RPM_BUILD_ROOT%{_prefix}/%{HOST}/bin
mkdir -p $RPM_BUILD_ROOT%{_prefix}/%{HOST}/bin
ln -sf ../../bin/{ar,as,ld,nm,ranlib,strip} $RPM_BUILD_ROOT%{_prefix}/%{HOST}/bin
mv $RPM_BUILD_ROOT%{_prefix}/%{HOST}/lib/ldscripts $RPM_BUILD_ROOT%{_libdir}
ln -sf ../../%{_lib}/ldscripts $RPM_BUILD_ROOT%{_prefix}/%{HOST}/lib/ldscripts
rm -rf %{buildroot}%{_prefix}/%{HOST}/bin
mkdir -p %{buildroot}%{_prefix}/%{HOST}/bin
ln -sf ../../bin/{ar,as,ld,nm,ranlib,strip} %{buildroot}%{_prefix}/%{HOST}/bin
mv %{buildroot}%{_prefix}/%{HOST}/lib/ldscripts $RPM_BUILD_ROOT%{_libdir}
ln -sf ../../%{_lib}/ldscripts %{buildroot}%{_prefix}/%{HOST}/lib/ldscripts
# Install header files
make -C libiberty install_to_libdir target_header_dir=/usr/include DESTDIR=$RPM_BUILD_ROOT
make -C libiberty install_to_libdir target_header_dir=/usr/include DESTDIR=%{buildroot}
# We want the PIC libiberty.a
install -m 644 libiberty/pic/libiberty.a $RPM_BUILD_ROOT%{_libdir}
install -m 644 libiberty/pic/libiberty.a %{buildroot}%{_libdir}
#
chmod a+x $RPM_BUILD_ROOT%{_libdir}/libbfd-*
chmod a+x $RPM_BUILD_ROOT%{_libdir}/libopcodes-*
chmod a+x %{buildroot}%{_libdir}/libbfd-*
chmod a+x %{buildroot}%{_libdir}/libopcodes-*
# No shared linking outside binutils
rm $RPM_BUILD_ROOT%{_libdir}/lib{bfd,opcodes}.so
rm $RPM_BUILD_ROOT%{_libdir}/lib{bfd,opcodes}.la
rm %{buildroot}%{_libdir}/lib{bfd,opcodes}.so
rm %{buildroot}%{_libdir}/lib{bfd,opcodes,ctf,ctf-nobfd}.la
# Remove unwanted files to shut up rpm
rm -f $RPM_BUILD_ROOT%{_infodir}/configure* $RPM_BUILD_ROOT%{_infodir}/standards.info*
rm -f $RPM_BUILD_ROOT%{_mandir}/man1/dlltool.1 $RPM_BUILD_ROOT%{_mandir}/man1/windres.1 $RPM_BUILD_ROOT%{_mandir}/man1/windmc.1
rm -f %{buildroot}%{_infodir}/configure* $RPM_BUILD_ROOT%{_infodir}/standards.info*
rm -f %{buildroot}%{_mandir}/man1/dlltool.1 $RPM_BUILD_ROOT%{_mandir}/man1/windres.1 $RPM_BUILD_ROOT%{_mandir}/man1/windmc.1
cd ..
%find_lang binutils
%find_lang bfd binutils.lang
@ -488,45 +482,47 @@ cd ..
%ifarch %gold_archs
%find_lang gold binutils-gold.lang
%endif
mkdir -p $RPM_BUILD_ROOT%{_docdir}/%{name}
install -m 644 binutils/NEWS $RPM_BUILD_ROOT%{_docdir}/%{name}/NEWS-binutils
install -m 644 gas/NEWS $RPM_BUILD_ROOT%{_docdir}/%{name}/NEWS-gas
install -m 644 ld/NEWS $RPM_BUILD_ROOT%{_docdir}/%{name}/NEWS-ld
mkdir -p %{buildroot}%{_docdir}/%{name}
install -m 644 binutils/NEWS %{buildroot}%{_docdir}/%{name}/NEWS-binutils
install -m 644 gas/NEWS %{buildroot}%{_docdir}/%{name}/NEWS-gas
install -m 644 ld/NEWS %{buildroot}%{_docdir}/%{name}/NEWS-ld
%else
# installing cross-TARGET-binutils and TARGET-binutils
make DESTDIR=$RPM_BUILD_ROOT install
make DESTDIR=%{buildroot} install
# Replace hard links by symlinks, so that rpmlint doesn't complain
T=$(basename %buildroot/usr/%{TARGET_OS})
for f in %buildroot/usr/$T/bin/* ; do
T=$(basename %{buildroot}/usr/%{TARGET_OS})
for f in %{buildroot}/usr/$T/bin/* ; do
ln -sf /usr/bin/$T-$(basename $f) $f
done
%if "%{TARGET}" == "arm"
# Instead of building duplicate binutils, add symlinks
for f in %buildroot/usr/$T/bin/* ; do
for f in %{buildroot}%{_bindir}/${T}-* ; do
_toolname=${f##$(dirname $f)/${T}-}
for p in arm-none-eabi; do
ln -sf %{_bindir}/$T-$(basename $f) %buildroot%{_bindir}/$p-$(basename $f)
ln -sf %{_bindir}/$T-${_toolname} %{buildroot}%{_bindir}/$p-${_toolname}
done
done
%endif
%if "%{TARGET}" == "riscv64"
# Instead of building duplicate binutils, add symlinks
for f in %buildroot/usr/$T/bin/* ; do
for f in %{buildroot}/usr/$T/bin/* ; do
for p in riscv64-elf; do
ln -sf %{_bindir}/$T-$(basename $f) %buildroot%{_bindir}/$p-$(basename $f)
ln -sf %{_bindir}/$T-$(basename $f) %{buildroot}%{_bindir}/$p-$(basename $f)
done
done
%endif
%if "%{TARGET}" == "avr"
install -c gas-nesc/as-new $RPM_BUILD_ROOT%{_prefix}/bin/%{TARGET_OS}-nesc-as
ln -sf ../../bin/%{TARGET_OS}-nesc-as $RPM_BUILD_ROOT%{_prefix}/%{TARGET_OS}/bin/nesc-as
install -c gas-nesc/as-new %{buildroot}%{_prefix}/bin/%{TARGET_OS}-nesc-as
ln -sf ../../bin/%{TARGET_OS}-nesc-as %{buildroot}%{_prefix}/%{TARGET_OS}/bin/nesc-as
%endif
rm -rf $RPM_BUILD_ROOT%{_mandir}
rm -rf $RPM_BUILD_ROOT%{_infodir}
rm -rf $RPM_BUILD_ROOT%{_prefix}/lib*
rm -rf $RPM_BUILD_ROOT%{_prefix}/include
rm -f $RPM_BUILD_ROOT%{_prefix}/bin/*-c++filt
rm -rf %{buildroot}%{_mandir}
rm -rf %{buildroot}%{_infodir}
rm -rf %{buildroot}%{_prefix}/lib*
rm -rf %{buildroot}%{_prefix}/include
rm -f %{buildroot}%{_prefix}/bin/*-c++filt
> ../binutils.lang
%endif
%fdupes %{buildroot}%{_prefix}
%if 0%{!?cross:1}
%post
@ -586,8 +582,7 @@ fi;
%postun -n libctf0 -p /sbin/ldconfig
%postun -n libctf-nobfd0 -p /sbin/ldconfig
%postun
/sbin/ldconfig
%postun -p /sbin/ldconfig
%endif
%files -f binutils.lang
@ -641,9 +636,11 @@ fi;
%{_libdir}/libctf-nobfd.so
%files -n libctf0
%defattr(-,root,root)
%{_libdir}/libctf.so.*
%files -n libctf-nobfd0
%defattr(-,root,root)
%{_libdir}/libctf-nobfd.so.*
%endif

View File

@ -5,7 +5,7 @@
rm -f cross-*-binutils.spec cross-*-binutils.changes
# sh4 is stuck in the testsuite
for arch in aarch64 hppa hppa64 arm i386 x86_64 s390 s390x ppc ppc64 ppc64le ia64 sparc sparc64 spu avr mips m68k epiphany rx riscv64 xtensa; do
for arch in aarch64 hppa hppa64 arm i386 x86_64 s390 s390x ppc ppc64 ppc64le ia64 sparc sparc64 spu avr pru mips m68k epiphany rx riscv64 xtensa; do
echo -n "Building package for $arch --> cross-$arch-binutils ..."