Commit c6940867 authored by Timo Teräs's avatar Timo Teräs Committed by Natanael Copa

main/binutils: default to 'gnu' hash style

(cherry picked from commit ecd6d7d1)
parent 1839a2fe
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=binutils
pkgver=2.25
pkgrel=2
pkgrel=3
pkgdesc="Tools necessary to build programs"
url="http://www.gnu.org/software/binutils/"
depends=""
......@@ -18,6 +18,7 @@ fi
source="http://ftp.gnu.org/gnu/binutils/binutils-$pkgver.tar.bz2
binutils-ld-fix-static-linking.patch
hash-style-gnu.patch
"
_builddir="$srcdir/binutils-$pkgver"
......@@ -95,8 +96,11 @@ gold() {
}
md5sums="d9f3303f802a5b6b0bb73a335ab89d66 binutils-2.25.tar.bz2
c9f308494b87c243f121a56d58f2da87 binutils-ld-fix-static-linking.patch"
c9f308494b87c243f121a56d58f2da87 binutils-ld-fix-static-linking.patch
686071a371b6d7aaad86c3a5c09ba6d3 hash-style-gnu.patch"
sha256sums="22defc65cfa3ef2a3395faaea75d6331c6e62ea5dfacfed3e2ec17b08c882923 binutils-2.25.tar.bz2
d5c5581d0ba04ef2e3690f6fb57435bf7ce343f2376fe972a2a693c5429eec9c binutils-ld-fix-static-linking.patch"
d5c5581d0ba04ef2e3690f6fb57435bf7ce343f2376fe972a2a693c5429eec9c binutils-ld-fix-static-linking.patch
d30633153c41f0a59956f4d49ad12c0b53dabfd9f48175d0db0a1a5f2263cdfc hash-style-gnu.patch"
sha512sums="49438970642f379978aba988e3d2e7b63dab6fd0b46d91f4100f083e87a84d242089daca58572245fe620457a77bbbe2d78588ff3fb79314e500d1a39bf96f30 binutils-2.25.tar.bz2
ecee33b0e435aa704af1c334e560f201638ff79e199aa11ed78a72f7c9b46f85fbb227af5748e735fd681d1965fcc42ac81b0c8824e540430ce0c706c81e8b49 binutils-ld-fix-static-linking.patch"
ecee33b0e435aa704af1c334e560f201638ff79e199aa11ed78a72f7c9b46f85fbb227af5748e735fd681d1965fcc42ac81b0c8824e540430ce0c706c81e8b49 binutils-ld-fix-static-linking.patch
24e853bf4b58621a77921087e599da2ace47ba3079e2d50fb5d08ae399be5f060c5fdd7f65257bcc0526aebc66e68b98aafd45d714c035da8ea2bdc3d8d4e375 hash-style-gnu.patch"
# DP: Default to --hash-style=gnu in ld.bfd and ld.gold.
--- a/ld/ldmain.c
+++ b/ld/ldmain.c
@@ -287,6 +288,15 @@
emulation = get_emulation (argc, argv);
ldemul_choose_mode (emulation);
default_target = ldemul_choose_target (argc, argv);
+
+ /* Default to --hash-style=gnu */
+ if (strcmp (default_target, "elf32-tradbigmips") != 0
+ && strcmp (default_target, "elf32-tradlittlemips") != 0)
+ {
+ link_info.emit_gnu_hash = TRUE;
+ link_info.emit_hash = FALSE;
+ }
+
config.maxpagesize = bfd_emul_get_maxpagesize (default_target);
config.commonpagesize = bfd_emul_get_commonpagesize (default_target);
lang_init ();
--- a/gold/options.h
+++ b/gold/options.h
@@ -794,7 +794,7 @@
N_("Min fraction of empty buckets in dynamic hash"),
N_("FRACTION"));
- DEFINE_enum(hash_style, options::TWO_DASHES, '\0', "sysv",
+ DEFINE_enum(hash_style, options::TWO_DASHES, '\0', "gnu",
N_("Dynamic hash style"), N_("[sysv,gnu,both]"),
{"sysv", "gnu", "both"});
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment