From 2ff7ea11649f7d3187312953f1e99d7f3ac43130 Mon Sep 17 00:00:00 2001 From: John Marino Date: Wed, 18 May 2011 07:23:38 +0200 Subject: [PATCH] gold: Local modification to add --relocatable synonym Until a change to the binutils master branch two days ago, the gold linker simply ignored the -i switch, which is considered to be a synonym of the --relocatable (-r) switch by the ld linker. This mainly affects makefiles that use gold directly rather than having it invoked by gcc, and there was a case like this in the DragonFly base. While the base was easily modified to use the -r switch, it was deemed a good idea to apply this modification to the gold of binutils 2.21 in case any pkgsrc software try to use the linker directly. --- contrib/binutils-2.21/gold/options.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/contrib/binutils-2.21/gold/options.h b/contrib/binutils-2.21/gold/options.h index 7a694a95ce..595c438742 100644 --- a/contrib/binutils-2.21/gold/options.h +++ b/contrib/binutils-2.21/gold/options.h @@ -756,9 +756,6 @@ class General_options DEFINE_string(soname, options::ONE_DASH, 'h', NULL, N_("Set shared library name"), N_("FILENAME")); - DEFINE_bool(i, options::EXACTLY_ONE_DASH, '\0', false, - N_("Ignored"), NULL); - DEFINE_double(hash_bucket_empty_fraction, options::TWO_DASHES, '\0', 0.0, N_("Min fraction of empty buckets in dynamic hash"), N_("FRACTION")); @@ -891,6 +888,8 @@ class General_options DEFINE_bool(relocatable, options::EXACTLY_ONE_DASH, 'r', false, N_("Generate relocatable output"), NULL); + DEFINE_bool_alias(i, relocatable, options::EXACTLY_ONE_DASH, '\0', + N_("Synonym for -r"), NULL, false); DEFINE_bool(relax, options::TWO_DASHES, '\0', false, N_("Relax branches on certain targets"), NULL); -- 2.41.0