* Re: Review of --enable-gold=both patch
[not found] ` <4C28D9F1.6030309@codesourcery.com>
@ 2010-10-27 14:04 ` Matthias Klose
2010-10-29 9:21 ` Nick Clifton
0 siblings, 1 reply; 25+ messages in thread
From: Matthias Klose @ 2010-10-27 14:04 UTC (permalink / raw)
To: Mark Mitchell, Nick Clifton
Cc: Paolo Bonzini, Joseph S. Myers, H.J. Lu, Ian Lance Taylor,
GCC Patches, binutils
[CCing the binutils list]
On 28.06.2010 19:20, Mark Mitchell wrote:
> Paolo Bonzini wrote:
>
>> I'm afraid we do need to "abuse" it to decide what linker will be the
>> default.
>
> OK. I suppose we could also have --with-default-linker=gold -- or
> --enable :-) -- but I'm not worried about that.
>
> Thanks again for your help with this.
the --enable-gold=both option is already in current binutils trunk, which will
soon be released as binutils-2.21. Should this be changed before the binutils
release, or should the binutils patch be kept as it is? Any recommendations how
to update the patch and/or current binutils?
thanks, Matthias
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: Review of --enable-gold=both patch
2010-10-27 14:04 ` Review of --enable-gold=both patch Matthias Klose
@ 2010-10-29 9:21 ` Nick Clifton
2010-10-29 14:55 ` Matthias Klose
0 siblings, 1 reply; 25+ messages in thread
From: Nick Clifton @ 2010-10-29 9:21 UTC (permalink / raw)
To: Matthias Klose
Cc: Mark Mitchell, Paolo Bonzini, Joseph S. Myers, H.J. Lu,
Ian Lance Taylor, GCC Patches, binutils
Hi Matthias,
>> OK. I suppose we could also have --with-default-linker=gold -- or
>> --enable :-) -- but I'm not worried about that.
>>
>> Thanks again for your help with this.
>
> the --enable-gold=both option is already in current binutils trunk,
> which will soon be released as binutils-2.21. Should this be changed
> before the binutils release, or should the binutils patch be kept as it
> is? Any recommendations how to update the patch and/or current binutils?
We should really make the 2.21 release support --with-default-linker=
Would you care to submit a patch for this ?
Cheers
Nick
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: Review of --enable-gold=both patch
2010-10-29 9:21 ` Nick Clifton
@ 2010-10-29 14:55 ` Matthias Klose
2010-10-29 15:00 ` Paolo Bonzini
2010-10-29 15:12 ` Paolo Bonzini
0 siblings, 2 replies; 25+ messages in thread
From: Matthias Klose @ 2010-10-29 14:55 UTC (permalink / raw)
To: Nick Clifton
Cc: Mark Mitchell, Paolo Bonzini, Joseph S. Myers, H.J. Lu,
Ian Lance Taylor, GCC Patches, binutils
On 29.10.2010 11:20, Nick Clifton wrote:
> Hi Matthias,
>
>>> OK. I suppose we could also have --with-default-linker=gold -- or
>>> --enable :-) -- but I'm not worried about that.
>>>
>>> Thanks again for your help with this.
>>
>> the --enable-gold=both option is already in current binutils trunk,
>> which will soon be released as binutils-2.21. Should this be changed
>> before the binutils release, or should the binutils patch be kept as it
>> is? Any recommendations how to update the patch and/or current binutils?
>
> We should really make the 2.21 release support --with-default-linker=
> Would you care to submit a patch for this ?
to summarize:
- in binutils, --with-default-linker= should trigger which linker is
built, and should determine which linker the ld symlink points to.
- if both linkers are built, the non-default linker build has to be
enabled with either --enable-ld or --enable-gold.
- values (other than yes or no) passed to --enable-ld and --enable-gold
are ignored.
Is this the consensus?
Matthias
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: Review of --enable-gold=both patch
2010-10-29 14:55 ` Matthias Klose
@ 2010-10-29 15:00 ` Paolo Bonzini
2010-10-29 15:12 ` Paolo Bonzini
1 sibling, 0 replies; 25+ messages in thread
From: Paolo Bonzini @ 2010-10-29 15:00 UTC (permalink / raw)
To: Matthias Klose
Cc: Nick Clifton, Mark Mitchell, Joseph S. Myers, H.J. Lu,
Ian Lance Taylor, GCC Patches, binutils
On 10/29/2010 04:54 PM, Matthias Klose wrote:
>
> to summarize:
>
> - in binutils, --with-default-linker= should trigger which linker is
> built, and should determine which linker the ld symlink points to.
>
> - if both linkers are built, the non-default linker build has to be
> enabled with either --enable-ld or --enable-gold.
>
> - values (other than yes or no) passed to --enable-ld and --enable-gold
> are ignored.
>
> Is this the consensus?
Looks good, except that I'd use --enable-default-linker (it's an
optional "feature", not an optional "package").
Paolo
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: Review of --enable-gold=both patch
2010-10-29 14:55 ` Matthias Klose
2010-10-29 15:00 ` Paolo Bonzini
@ 2010-10-29 15:12 ` Paolo Bonzini
2010-10-29 15:41 ` Matthias Klose
2010-11-11 0:09 ` Matthias Klose
1 sibling, 2 replies; 25+ messages in thread
From: Paolo Bonzini @ 2010-10-29 15:12 UTC (permalink / raw)
To: Matthias Klose
Cc: Nick Clifton, Mark Mitchell, Joseph S. Myers, H.J. Lu,
Ian Lance Taylor, GCC Patches, binutils
On 10/29/2010 04:54 PM, Matthias Klose wrote:
> On 29.10.2010 11:20, Nick Clifton wrote:
>> Hi Matthias,
>>
>>>> OK. I suppose we could also have --with-default-linker=gold -- or
>>>> --enable :-) -- but I'm not worried about that.
>>>>
>>>> Thanks again for your help with this.
>>>
>>> the --enable-gold=both option is already in current binutils trunk,
>>> which will soon be released as binutils-2.21. Should this be changed
>>> before the binutils release, or should the binutils patch be kept as it
>>> is? Any recommendations how to update the patch and/or current binutils?
>>
>> We should really make the 2.21 release support --with-default-linker=
>> Would you care to submit a patch for this ?
>
> to summarize:
>
> - in binutils, --with-default-linker= should trigger which linker is
> built, and should determine which linker the ld symlink points to.
>
> - if both linkers are built, the non-default linker build has to be
> enabled with either --enable-ld or --enable-gold.
>
> - values (other than yes or no) passed to --enable-ld and --enable-gold
> are ignored.
Uh, actually no. Rereading the thread, the only point on which we had
consensus :) was to remove the current wart of --enable-gold disabling
--enable-ld; you're proposing to double it instead.
This was my proposal:
--disable-gold [--enable-ld]
Build only ld. Default option.
--enable-gold[=default] [--enable-ld]
Build both gold and ld. Install gold as "gold" and "ld", install ld
as "ld.bfd". This is different from the current behavior, in that ld
is currently not installed at all.
--enable-gold[=default] --disable-ld
Build only gold, which is then installed as both "gold" and "ld".
--enable-gold --enable-ld=default
Build both gold (installed as "gold") and ld (installed as "ld").
In other words, ld is default
--enable-gold=default --enable-ld=default
Error.
Paolo
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: Review of --enable-gold=both patch
2010-10-29 15:12 ` Paolo Bonzini
@ 2010-10-29 15:41 ` Matthias Klose
2010-10-29 15:42 ` Paolo Bonzini
2010-11-01 20:21 ` Ralf Wildenhues
2010-11-11 0:09 ` Matthias Klose
1 sibling, 2 replies; 25+ messages in thread
From: Matthias Klose @ 2010-10-29 15:41 UTC (permalink / raw)
To: Paolo Bonzini, Nick Clifton
Cc: Mark Mitchell, Joseph S. Myers, H.J. Lu, Ian Lance Taylor,
GCC Patches, binutils
On 29.10.2010 17:12, Paolo Bonzini wrote:
> On 10/29/2010 04:54 PM, Matthias Klose wrote:
>> On 29.10.2010 11:20, Nick Clifton wrote:
>>> Hi Matthias,
>>>
>>>>> OK. I suppose we could also have --with-default-linker=gold -- or
>>>>> --enable :-) -- but I'm not worried about that.
>>>>>
>>>>> Thanks again for your help with this.
>>>>
>>>> the --enable-gold=both option is already in current binutils trunk,
>>>> which will soon be released as binutils-2.21. Should this be changed
>>>> before the binutils release, or should the binutils patch be kept as it
>>>> is? Any recommendations how to update the patch and/or current binutils?
>>>
>>> We should really make the 2.21 release support --with-default-linker=
>>> Would you care to submit a patch for this ?
>>
>> to summarize:
>>
>> - in binutils, --with-default-linker= should trigger which linker is
>> built, and should determine which linker the ld symlink points to.
>>
>> - if both linkers are built, the non-default linker build has to be
>> enabled with either --enable-ld or --enable-gold.
>>
>> - values (other than yes or no) passed to --enable-ld and --enable-gold
>> are ignored.
>
> Uh, actually no. Rereading the thread, the only point on which we had consensus
> :) was to remove the current wart of --enable-gold disabling --enable-ld; you're
> proposing to double it instead.
>
> This was my proposal:
>
> --disable-gold [--enable-ld]
> Build only ld. Default option.
>
> --enable-gold[=default] [--enable-ld]
> Build both gold and ld. Install gold as "gold" and "ld", install ld
> as "ld.bfd". This is different from the current behavior, in that ld
> is currently not installed at all.
>
> --enable-gold[=default] --disable-ld
> Build only gold, which is then installed as both "gold" and "ld".
>
> --enable-gold --enable-ld=default
> Build both gold (installed as "gold") and ld (installed as "ld").
> In other words, ld is default
>
> --enable-gold=default --enable-ld=default
> Error.
fine with this too, but you should not change "ld.gold" to "gold".
Fine with me to implement this, if there is consensus, but it won't be before
next week.
Matthias
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: Review of --enable-gold=both patch
2010-10-29 15:41 ` Matthias Klose
@ 2010-10-29 15:42 ` Paolo Bonzini
2010-11-01 20:21 ` Ralf Wildenhues
1 sibling, 0 replies; 25+ messages in thread
From: Paolo Bonzini @ 2010-10-29 15:42 UTC (permalink / raw)
To: Matthias Klose
Cc: Nick Clifton, Mark Mitchell, Joseph S. Myers, H.J. Lu,
Ian Lance Taylor, GCC Patches, binutils
On 10/29/2010 05:41 PM, Matthias Klose wrote:
>>
>> --enable-gold[=default] --disable-ld
>> Build only gold, which is then installed as both "gold" and "ld".
>>
>> --enable-gold --enable-ld=default
>> Build both gold (installed as "gold") and ld (installed as "ld").
>> In other words, ld is default
>>
>> --enable-gold=default --enable-ld=default
>> Error.
>
> fine with this too, but you should not change "ld.gold" to "gold".
No problem with that.
Paolo
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: Review of --enable-gold=both patch
2010-10-29 15:41 ` Matthias Klose
2010-10-29 15:42 ` Paolo Bonzini
@ 2010-11-01 20:21 ` Ralf Wildenhues
1 sibling, 0 replies; 25+ messages in thread
From: Ralf Wildenhues @ 2010-11-01 20:21 UTC (permalink / raw)
To: Matthias Klose
Cc: Paolo Bonzini, Nick Clifton, Mark Mitchell, Joseph S. Myers,
H.J. Lu, Ian Lance Taylor, GCC Patches, binutils
* Matthias Klose wrote on Fri, Oct 29, 2010 at 05:41:06PM CEST:
> Fine with me to implement this, if there is consensus, but it won't be
> before next week.
Whatever you end up implementing, it needs updates to gcc/doc.
I'd say that binutils/README and binutils/doc/binutils.texi could also
benefit from seeing information about gold and these switches, but I'm
not sure about the usual policy here.
Thanks,
Ralf
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: Review of --enable-gold=both patch
2010-10-29 15:12 ` Paolo Bonzini
2010-10-29 15:41 ` Matthias Klose
@ 2010-11-11 0:09 ` Matthias Klose
2010-11-11 8:37 ` Paolo Bonzini
2010-11-23 12:24 ` Nick Clifton
1 sibling, 2 replies; 25+ messages in thread
From: Matthias Klose @ 2010-11-11 0:09 UTC (permalink / raw)
To: Paolo Bonzini, Nick Clifton
Cc: Mark Mitchell, Joseph S. Myers, H.J. Lu, Ian Lance Taylor,
GCC Patches, binutils
[-- Attachment #1: Type: text/plain, Size: 2270 bytes --]
On 29.10.2010 17:12, Paolo Bonzini wrote:
> On 10/29/2010 04:54 PM, Matthias Klose wrote:
>> On 29.10.2010 11:20, Nick Clifton wrote:
>>> Hi Matthias,
>>>
>>>>> OK. I suppose we could also have --with-default-linker=gold -- or
>>>>> --enable :-) -- but I'm not worried about that.
>>>>>
>>>>> Thanks again for your help with this.
>>>>
>>>> the --enable-gold=both option is already in current binutils trunk,
>>>> which will soon be released as binutils-2.21. Should this be changed
>>>> before the binutils release, or should the binutils patch be kept as it
>>>> is? Any recommendations how to update the patch and/or current binutils?
>>>
>>> We should really make the 2.21 release support --with-default-linker=
>>> Would you care to submit a patch for this ?
>>
>> to summarize:
>>
>> - in binutils, --with-default-linker= should trigger which linker is
>> built, and should determine which linker the ld symlink points to.
>>
>> - if both linkers are built, the non-default linker build has to be
>> enabled with either --enable-ld or --enable-gold.
>>
>> - values (other than yes or no) passed to --enable-ld and --enable-gold
>> are ignored.
>
> Uh, actually no. Rereading the thread, the only point on which we had consensus
> :) was to remove the current wart of --enable-gold disabling --enable-ld; you're
> proposing to double it instead.
>
> This was my proposal:
>
> --disable-gold [--enable-ld]
> Build only ld. Default option.
>
> --enable-gold[=default] [--enable-ld]
> Build both gold and ld. Install gold as "gold" and "ld", install ld
> as "ld.bfd". This is different from the current behavior, in that ld
> is currently not installed at all.
>
> --enable-gold[=default] --disable-ld
> Build only gold, which is then installed as both "gold" and "ld".
>
> --enable-gold --enable-ld=default
> Build both gold (installed as "gold") and ld (installed as "ld").
> In other words, ld is default
>
> --enable-gold=default --enable-ld=default
> Error.
The attached patch implements this proposal, tested the combinations above, and
disabling ld without gold (leading to an error).
I did choose to always install the bfd linker as ld.bfd and the gold linker as
ld.gold, and pointing the link to one of the above.
Nick, is this ok with you?
Matthias
[-- Attachment #2: gold.diff --]
[-- Type: text/x-diff, Size: 4721 bytes --]
--- binutils-2.20.90.20101105.orig/configure.ac
+++ binutils-2.20.90.20101105/configure.ac
@@ -321,19 +321,27 @@
yes) skipdirs=`echo " ${skipdirs} " | sed -e 's/ target-newlib / /'` ;;
esac
-# Handle --enable-gold.
-# --enable-gold Build only gold
-# --disable-gold [default] Build only ld
-# --enable-gold=both Build both gold and ld, ld is default
-# --enable-gold=both/ld Same
-# --enable-gold=both/gold Build both gold and ld, gold is default, ld is renamed ld.bfd
+# Handle --enable-gold, --enable-ld.
+# --disable-gold [--enable-ld]
+# Build only ld. Default option.
+# --enable-gold[=default] [--enable-ld]
+# Build both gold and ld. Install gold as "ld.gold" and "ld",
+# install ld as "ld.bfd".
+# --enable-gold[=default] --disable-ld
+# Build only gold, which is then installed as both "ld.gold" and "ld".
+# --enable-gold --enable-ld=default
+# Build both gold (installed as "ld.gold") and ld (installed as "ld").
+# In other words, ld is default
+# --enable-gold=default --enable-ld=default
+# Error.
+default_ld=
AC_ARG_ENABLE(gold,
-[[ --enable-gold[=ARG] build gold [ARG={both}[/{gold,ld}]]]],
+[[ --enable-gold[=ARG] build gold [ARG={default,yes,no}]]],
ENABLE_GOLD=$enableval,
ENABLE_GOLD=no)
- case "${ENABLE_GOLD}" in
- yes|both|both/gold|both/ld)
+case "${ENABLE_GOLD}" in
+ yes|default)
# Check for ELF target.
is_elf=no
case "${target}" in
@@ -353,14 +361,10 @@
# Check for target supported by gold.
case "${target}" in
i?86-*-* | x86_64-*-* | sparc*-*-* | powerpc*-*-* | arm*-*-*)
- case "${ENABLE_GOLD}" in
- both*)
- configdirs="$configdirs gold"
- ;;
- *)
- configdirs=`echo " ${configdirs} " | sed -e 's/ ld / gold /'`
- ;;
- esac
+ configdirs="$configdirs gold"
+ if test x${ENABLE_GOLD} = xdefault; then
+ default_ld=gold
+ fi
ENABLE_GOLD=yes
;;
esac
@@ -371,7 +375,31 @@
*)
AC_MSG_ERROR([invalid --enable-gold argument])
;;
- esac
+esac
+
+AC_ARG_ENABLE(ld,
+[[ --enable-ld[=ARG] build ld [ARG={default,yes,no}]]],
+ENABLE_LD=$enableval,
+ENABLE_LD=yes)
+
+case "${ENABLE_LD}" in
+ default)
+ if test x${default_ld} = xgold; then
+ AC_MSG_ERROR([either gold or ld can be the default ld])
+ fi
+ ;;
+ yes)
+ ;;
+ no)
+ if test x${ENABLE_GOLD} != xyes; then
+ AC_MSG_ERROR([gold must be enabled to disable ld])
+ fi
+ configdirs=`echo " ${configdirs} " | sed -e 's/ ld / /'`
+ ;;
+ *)
+ AC_MSG_ERROR([invalid --enable-ld argument])
+ ;;
+esac
# Configure extra directories which are host specific
--- binutils-2.20.90.20101105.orig/ld/configure.in
+++ binutils-2.20.90.20101105/ld/configure.in
@@ -73,13 +73,13 @@
dnl "install_as_default" is set to false if gold is the default linker.
dnl "installed_linker" is the installed BFD linker name.
AC_ARG_ENABLE(gold,
-[[ --enable-gold[=ARG] build gold [ARG={both}[/{gold,ld}]]]],
+[[ --enable-gold[=ARG] build gold [ARG={default,yes,no}]]],
[case "${enableval}" in
- yes|both/gold)
+ default)
install_as_default=no
installed_linker=ld.bfd
;;
- both|both/ld)
+ yes|no)
install_as_default=yes
installed_linker=ld.bfd
;;
@@ -87,8 +87,8 @@
AC_MSG_ERROR([invalid --enable-gold argument])
;;
esac],
-[install_as_default=ld
- installed_linker=ld])
+[install_as_default=yes
+ installed_linker=ld.bfd])
AC_SUBST(install_as_default)
AC_SUBST(installed_linker)
--- binutils-2.20.90.20101105.orig/gold/configure.ac
+++ binutils-2.20.90.20101105/gold/configure.ac
@@ -41,27 +41,33 @@
dnl "install_as_default" is true if the linker to be installed as the
dnl default linker, ld.
dnl "installed_linker" is the installed gold linker name.
-AC_ARG_ENABLE(gold,
-[[ --enable-gold[=ARG] build gold [ARG={both}[/{gold,ld}]]]],
+
+default_ld=
+AC_ARG_ENABLE(ld,
+[[ --enable-ld[=ARG] build ld [ARG={default,yes,no}]]],
[case "${enableval}" in
- yes)
- install_as_default=gold
- installed_linker=ld
- ;;
- both/gold)
- install_as_default=yes
+ default)
+ default_ld=ld.bfd
+ ;;
+esac])
+
+AC_ARG_ENABLE(gold,
+[[ --enable-gold[=ARG] build gold [ARG={default,yes,no}]]],
+[case "${enableval}" in
+ yes|default)
+ if test x${default_ld} = x; then
+ install_as_default=yes
+ fi
installed_linker=ld.gold
;;
- both|both/ld)
- install_as_default=no
- installed_linker=ld.gold
+ no)
;;
*)
AC_MSG_ERROR([invalid --enable-gold argument])
;;
esac],
-[install_as_default=gold
- installed_linker=ld])
+[install_as_default=no
+ installed_linker=ld.gold])
AC_SUBST(install_as_default)
AC_SUBST(installed_linker)
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: Review of --enable-gold=both patch
2010-11-11 0:09 ` Matthias Klose
@ 2010-11-11 8:37 ` Paolo Bonzini
2010-11-12 18:45 ` Matthias Klose
` (3 more replies)
2010-11-23 12:24 ` Nick Clifton
1 sibling, 4 replies; 25+ messages in thread
From: Paolo Bonzini @ 2010-11-11 8:37 UTC (permalink / raw)
To: Matthias Klose
Cc: Nick Clifton, Mark Mitchell, Joseph S. Myers, H.J. Lu,
Ian Lance Taylor, GCC Patches, binutils
On 11/11/2010 01:08 AM, Matthias Klose wrote:
> + if test x${default_ld} = xgold; then
> + AC_MSG_ERROR([either gold or ld can be the default ld])
> + fi
If you test for x${ENABLE_GOLD} = xdefault, the default_ld variable can
go away.
> + no)
> + if test x${ENABLE_GOLD} != xyes; then
> + AC_MSG_ERROR([gold must be enabled to disable ld])
> + fi
I think this is not necessary, you can disable both packages. This
would have the same effect as --without-gnu-ld. Please conditionalize
the message on $use_gnu_ld != no and make it a warning rather than an error.
Ok with this fixed.
Paolo
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: Review of --enable-gold=both patch
2010-11-11 8:37 ` Paolo Bonzini
@ 2010-11-12 18:45 ` Matthias Klose
2010-11-12 19:36 ` Paolo Bonzini
[not found] ` <4CDD8B19.3040909__3908.7257617668$1289587526$gmane$org@ubuntu.com>
` (2 subsequent siblings)
3 siblings, 1 reply; 25+ messages in thread
From: Matthias Klose @ 2010-11-12 18:45 UTC (permalink / raw)
To: Paolo Bonzini
Cc: Nick Clifton, Mark Mitchell, Joseph S. Myers, H.J. Lu,
Ian Lance Taylor, GCC Patches, binutils
On 11.11.2010 09:37, Paolo Bonzini wrote:
> On 11/11/2010 01:08 AM, Matthias Klose wrote:
>> + no)
>> + if test x${ENABLE_GOLD} != xyes; then
>> + AC_MSG_ERROR([gold must be enabled to disable ld])
>> + fi
>
> I think this is not necessary, you can disable both packages. This would have
> the same effect as --without-gnu-ld. Please conditionalize the message on
> $use_gnu_ld != no and make it a warning rather than an error.
in the context of binutils, at least one linker should be built? why not detect
this early?
Matthias
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: Review of --enable-gold=both patch
2010-11-12 18:45 ` Matthias Klose
@ 2010-11-12 19:36 ` Paolo Bonzini
0 siblings, 0 replies; 25+ messages in thread
From: Paolo Bonzini @ 2010-11-12 19:36 UTC (permalink / raw)
To: Matthias Klose
Cc: Nick Clifton, Mark Mitchell, Joseph S. Myers, H.J. Lu,
Ian Lance Taylor, GCC Patches, binutils
On 11/12/2010 07:44 PM, Matthias Klose wrote:
> On 11.11.2010 09:37, Paolo Bonzini wrote:
>> On 11/11/2010 01:08 AM, Matthias Klose wrote:
>>> + no)
>>> + if test x${ENABLE_GOLD} != xyes; then
>>> + AC_MSG_ERROR([gold must be enabled to disable ld])
>>> + fi
>>
>> I think this is not necessary, you can disable both packages. This
>> would have
>> the same effect as --without-gnu-ld. Please conditionalize the message on
>> $use_gnu_ld != no and make it a warning rather than an error.
>
> in the context of binutils, at least one linker should be built?
Not necessarily, if the user wants the rope. Have you tried configuring
binutils --without-gnu-ld?
Paolo
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: Review of --enable-gold=both patch
[not found] ` <4CDD8B19.3040909__3908.7257617668$1289587526$gmane$org@ubuntu.com>
@ 2010-11-12 20:37 ` Andreas Schwab
0 siblings, 0 replies; 25+ messages in thread
From: Andreas Schwab @ 2010-11-12 20:37 UTC (permalink / raw)
To: Matthias Klose
Cc: Paolo Bonzini, Nick Clifton, Mark Mitchell, Joseph S. Myers,
H.J. Lu, Ian Lance Taylor, GCC Patches, binutils
Matthias Klose <doko@ubuntu.com> writes:
> in the context of binutils, at least one linker should be built? why not
> detect this early?
There are still targets without linker support.
Andreas.
--
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: Review of --enable-gold=both patch
2010-11-11 8:37 ` Paolo Bonzini
2010-11-12 18:45 ` Matthias Klose
[not found] ` <4CDD8B19.3040909__3908.7257617668$1289587526$gmane$org@ubuntu.com>
@ 2010-11-13 20:04 ` Matthias Klose
2010-11-13 20:48 ` Paolo Bonzini
[not found] ` <4CDEEEEB.2000905__41684.8152097829$1289678668$gmane$org@ubuntu.com>
3 siblings, 1 reply; 25+ messages in thread
From: Matthias Klose @ 2010-11-13 20:04 UTC (permalink / raw)
To: Paolo Bonzini
Cc: Nick Clifton, Mark Mitchell, Joseph S. Myers, H.J. Lu,
Ian Lance Taylor, GCC Patches, binutils
[-- Attachment #1: Type: text/plain, Size: 923 bytes --]
On 11.11.2010 09:37, Paolo Bonzini wrote:
> On 11/11/2010 01:08 AM, Matthias Klose wrote:
>> + if test x${default_ld} = xgold; then
>> + AC_MSG_ERROR([either gold or ld can be the default ld])
>> + fi
>
> If you test for x${ENABLE_GOLD} = xdefault, the default_ld variable can go away.
no. ENABLE_GOLD is set to yes in the case statement above. The error message
would even trigger if gold is enabled but not the default.
>> + no)
>> + if test x${ENABLE_GOLD} != xyes; then
>> + AC_MSG_ERROR([gold must be enabled to disable ld])
>> + fi
>
> I think this is not necessary, you can disable both packages. This would have
> the same effect as --without-gnu-ld. Please conditionalize the message on
> $use_gnu_ld != no and make it a warning rather than an error.
>
> Ok with this fixed.
made it a warning. Kept the condition. Having $use_gnu_ld != no still prints the
warning for --enable-gold --disable-ld.
Matthias
[-- Attachment #2: gold.diff --]
[-- Type: text/x-diff, Size: 5307 bytes --]
toplevel
2010-11-13 Matthias Klose <doko@ubuntu.com>
* configure.ac: For --enable-gold, handle value `default' instead of
`both*'. New configure option --{en,dis}able-ld.
ld/
2010-11-13 Matthias Klose <doko@ubuntu.com>
* configure.in: For --enable-gold, handle value `default' instead of
`both*'. Always install ld as ld.bfd, install as ld if gold is
not the default.
gold/
2010-11-13 Matthias Klose <doko@ubuntu.com>
* configure.ac: For --enable-gold, handle value `default' instead of
`both*'. Always install ld as ld.gold, install as ld if gold is
the default.
--- binutils-2.20.90.20101105.orig/configure.ac
+++ binutils-2.20.90.20101105/configure.ac
@@ -321,19 +321,27 @@
yes) skipdirs=`echo " ${skipdirs} " | sed -e 's/ target-newlib / /'` ;;
esac
-# Handle --enable-gold.
-# --enable-gold Build only gold
-# --disable-gold [default] Build only ld
-# --enable-gold=both Build both gold and ld, ld is default
-# --enable-gold=both/ld Same
-# --enable-gold=both/gold Build both gold and ld, gold is default, ld is renamed ld.bfd
+# Handle --enable-gold, --enable-ld.
+# --disable-gold [--enable-ld]
+# Build only ld. Default option.
+# --enable-gold[=default] [--enable-ld]
+# Build both gold and ld. Install gold as "ld.gold" and "ld",
+# install ld as "ld.bfd".
+# --enable-gold[=default] --disable-ld
+# Build only gold, which is then installed as both "ld.gold" and "ld".
+# --enable-gold --enable-ld=default
+# Build both gold (installed as "gold") and ld (installed as "ld").
+# In other words, ld is default
+# --enable-gold=default --enable-ld=default
+# Error.
+default_ld=
AC_ARG_ENABLE(gold,
-[[ --enable-gold[=ARG] build gold [ARG={both}[/{gold,ld}]]]],
+[[ --enable-gold[=ARG] build gold [ARG={default,yes,no}]]],
ENABLE_GOLD=$enableval,
ENABLE_GOLD=no)
- case "${ENABLE_GOLD}" in
- yes|both|both/gold|both/ld)
+case "${ENABLE_GOLD}" in
+ yes|default)
# Check for ELF target.
is_elf=no
case "${target}" in
@@ -353,14 +361,10 @@
# Check for target supported by gold.
case "${target}" in
i?86-*-* | x86_64-*-* | sparc*-*-* | powerpc*-*-* | arm*-*-*)
- case "${ENABLE_GOLD}" in
- both*)
- configdirs="$configdirs gold"
- ;;
- *)
- configdirs=`echo " ${configdirs} " | sed -e 's/ ld / gold /'`
- ;;
- esac
+ configdirs="$configdirs gold"
+ if test x${ENABLE_GOLD} = xdefault; then
+ default_ld=gold
+ fi
ENABLE_GOLD=yes
;;
esac
@@ -371,7 +375,31 @@
*)
AC_MSG_ERROR([invalid --enable-gold argument])
;;
- esac
+esac
+
+AC_ARG_ENABLE(ld,
+[[ --enable-ld[=ARG] build ld [ARG={default,yes,no}]]],
+ENABLE_LD=$enableval,
+ENABLE_LD=yes)
+
+case "${ENABLE_LD}" in
+ default)
+ if test x${default_ld} != xgold; then
+ AC_MSG_ERROR([either gold or ld can be the default ld])
+ fi
+ ;;
+ yes)
+ ;;
+ no)
+ if test x${ENABLE_GOLD} != xyes; then
+ AC_MSG_WARN([neither ld nor gold are enabled])
+ fi
+ configdirs=`echo " ${configdirs} " | sed -e 's/ ld / /'`
+ ;;
+ *)
+ AC_MSG_ERROR([invalid --enable-ld argument])
+ ;;
+esac
# Configure extra directories which are host specific
--- binutils-2.20.90.20101105.orig/ld/configure.in
+++ binutils-2.20.90.20101105/ld/configure.in
@@ -73,13 +73,13 @@
dnl "install_as_default" is set to false if gold is the default linker.
dnl "installed_linker" is the installed BFD linker name.
AC_ARG_ENABLE(gold,
-[[ --enable-gold[=ARG] build gold [ARG={both}[/{gold,ld}]]]],
+[[ --enable-gold[=ARG] build gold [ARG={default,yes,no}]]],
[case "${enableval}" in
- yes|both/gold)
+ default)
install_as_default=no
installed_linker=ld.bfd
;;
- both|both/ld)
+ yes|no)
install_as_default=yes
installed_linker=ld.bfd
;;
@@ -87,8 +87,8 @@
AC_MSG_ERROR([invalid --enable-gold argument])
;;
esac],
-[install_as_default=ld
- installed_linker=ld])
+[install_as_default=yes
+ installed_linker=ld.bfd])
AC_SUBST(install_as_default)
AC_SUBST(installed_linker)
--- binutils-2.20.90.20101105.orig/gold/configure.ac
+++ binutils-2.20.90.20101105/gold/configure.ac
@@ -41,27 +41,33 @@
dnl "install_as_default" is true if the linker to be installed as the
dnl default linker, ld.
dnl "installed_linker" is the installed gold linker name.
-AC_ARG_ENABLE(gold,
-[[ --enable-gold[=ARG] build gold [ARG={both}[/{gold,ld}]]]],
+
+default_ld=
+AC_ARG_ENABLE(ld,
+[[ --enable-ld[=ARG] build ld [ARG={default,yes,no}]]],
[case "${enableval}" in
- yes)
- install_as_default=gold
- installed_linker=ld
- ;;
- both/gold)
- install_as_default=yes
+ default)
+ default_ld=ld.bfd
+ ;;
+esac])
+
+AC_ARG_ENABLE(gold,
+[[ --enable-gold[=ARG] build gold [ARG={default,yes,no}]]],
+[case "${enableval}" in
+ yes|default)
+ if test x${default_ld} = x; then
+ install_as_default=yes
+ fi
installed_linker=ld.gold
;;
- both|both/ld)
- install_as_default=no
- installed_linker=ld.gold
+ no)
;;
*)
AC_MSG_ERROR([invalid --enable-gold argument])
;;
esac],
-[install_as_default=gold
- installed_linker=ld])
+[install_as_default=no
+ installed_linker=ld.gold])
AC_SUBST(install_as_default)
AC_SUBST(installed_linker)
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: Review of --enable-gold=both patch
2010-11-13 20:04 ` Matthias Klose
@ 2010-11-13 20:48 ` Paolo Bonzini
0 siblings, 0 replies; 25+ messages in thread
From: Paolo Bonzini @ 2010-11-13 20:48 UTC (permalink / raw)
To: Matthias Klose
Cc: Nick Clifton, Mark Mitchell, Joseph S. Myers, H.J. Lu,
Ian Lance Taylor, GCC Patches, binutils
> made it a warning. Kept the condition. Having $use_gnu_ld != no still
> prints the warning for --enable-gold --disable-ld.
Toplevel bits are okay.
Paolo
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: Review of --enable-gold=both patch
[not found] ` <4CDEEEEB.2000905__41684.8152097829$1289678668$gmane$org@ubuntu.com>
@ 2010-11-14 7:25 ` Ryan Hill
0 siblings, 0 replies; 25+ messages in thread
From: Ryan Hill @ 2010-11-14 7:25 UTC (permalink / raw)
To: binutils
[-- Attachment #1: Type: text/plain, Size: 1056 bytes --]
On Sat, 13 Nov 2010 21:02:51 +0100
Matthias Klose <doko@ubuntu.com> wrote:
> +# Handle --enable-gold, --enable-ld.
> +# --disable-gold [--enable-ld]
> +# Build only ld. Default option.
"...Install ld as "ld.bfd" and "ld"..."
> +# --enable-gold[=default] [--enable-ld]
> +# Build both gold and ld. Install gold as "ld.gold" and "ld",
> +# install ld as "ld.bfd".
> +# --enable-gold[=default] --disable-ld
> +# Build only gold, which is then installed as both "ld.gold" and "ld".
> +# --enable-gold --enable-ld=default
> +# Build both gold (installed as "gold") and ld (installed as "ld").
"...(installed as "ld.gold") and ld (installed as "ld.bfd" and "ld")."
> +# In other words, ld is default
> +# --enable-gold=default --enable-ld=default
> +# Error.
--
fonts, gcc-porting, it makes no sense how it makes no sense
toolchain, wxwidgets but i'll take it free anytime
@ gentoo.org EFFD 380E 047A 4B51 D2BD C64F 8AA8 8346 F9A4 0662
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: Review of --enable-gold=both patch
2010-11-11 0:09 ` Matthias Klose
2010-11-11 8:37 ` Paolo Bonzini
@ 2010-11-23 12:24 ` Nick Clifton
2010-11-23 13:27 ` Matthias Klose
1 sibling, 1 reply; 25+ messages in thread
From: Nick Clifton @ 2010-11-23 12:24 UTC (permalink / raw)
To: Matthias Klose
Cc: Paolo Bonzini, Mark Mitchell, Joseph S. Myers, H.J. Lu,
Ian Lance Taylor, GCC Patches, binutils
Hi Matthias,
[Sorry about the delay in replying - I am in a bit of a muddle right
now].
> The attached patch implements this proposal, tested the combinations
> above, and disabling ld without gold (leading to an error).
>
> I did choose to always install the bfd linker as ld.bfd and the gold
> linker as ld.gold, and pointing the link to one of the above.
>
> Nick, is this ok with you?
Yes, it is fine. Thanks for doing this.
Cheers
Nick
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: Review of --enable-gold=both patch
2010-11-23 12:24 ` Nick Clifton
@ 2010-11-23 13:27 ` Matthias Klose
2010-11-23 13:31 ` Tristan Gingold
2010-11-23 17:09 ` H.J. Lu
0 siblings, 2 replies; 25+ messages in thread
From: Matthias Klose @ 2010-11-23 13:27 UTC (permalink / raw)
To: Nick Clifton
Cc: Paolo Bonzini, Mark Mitchell, Joseph S. Myers, H.J. Lu,
Ian Lance Taylor, GCC Patches, binutils, Tristan Gingold
[-- Attachment #1: Type: text/plain, Size: 602 bytes --]
On 23.11.2010 13:24, Nick Clifton wrote:
> Hi Matthias,
>
> [Sorry about the delay in replying - I am in a bit of a muddle right now].
>
>> The attached patch implements this proposal, tested the combinations
>> above, and disabling ld without gold (leading to an error).
>>
>> I did choose to always install the bfd linker as ld.bfd and the gold
>> linker as ld.gold, and pointing the link to one of the above.
>>
>> Nick, is this ok with you?
>
> Yes, it is fine. Thanks for doing this.
checked in in gcc as r167076. Nick, Tristan, could you check it into binutils
trunk and branch?
Matthias
[-- Attachment #2: gold.diff --]
[-- Type: text/x-diff, Size: 5307 bytes --]
toplevel
2010-11-23 Matthias Klose <doko@ubuntu.com>
* configure.ac: For --enable-gold, handle value `default' instead of
`both*'. New configure option --{en,dis}able-ld.
ld/
2010-11-23 Matthias Klose <doko@ubuntu.com>
* configure.in: For --enable-gold, handle value `default' instead of
`both*'. Always install ld as ld.bfd, install as ld if gold is
not the default.
gold/
2010-11-23 Matthias Klose <doko@ubuntu.com>
* configure.ac: For --enable-gold, handle value `default' instead of
`both*'. Always install ld as ld.gold, install as ld if gold is
the default.
--- binutils-2.20.90.20101105.orig/configure.ac
+++ binutils-2.20.90.20101105/configure.ac
@@ -321,19 +321,27 @@
yes) skipdirs=`echo " ${skipdirs} " | sed -e 's/ target-newlib / /'` ;;
esac
-# Handle --enable-gold.
-# --enable-gold Build only gold
-# --disable-gold [default] Build only ld
-# --enable-gold=both Build both gold and ld, ld is default
-# --enable-gold=both/ld Same
-# --enable-gold=both/gold Build both gold and ld, gold is default, ld is renamed ld.bfd
+# Handle --enable-gold, --enable-ld.
+# --disable-gold [--enable-ld]
+# Build only ld. Default option.
+# --enable-gold[=default] [--enable-ld]
+# Build both gold and ld. Install gold as "ld.gold" and "ld",
+# install ld as "ld.bfd".
+# --enable-gold[=default] --disable-ld
+# Build only gold, which is then installed as both "ld.gold" and "ld".
+# --enable-gold --enable-ld=default
+# Build both gold (installed as "gold") and ld (installed as "ld").
+# In other words, ld is default
+# --enable-gold=default --enable-ld=default
+# Error.
+default_ld=
AC_ARG_ENABLE(gold,
-[[ --enable-gold[=ARG] build gold [ARG={both}[/{gold,ld}]]]],
+[[ --enable-gold[=ARG] build gold [ARG={default,yes,no}]]],
ENABLE_GOLD=$enableval,
ENABLE_GOLD=no)
- case "${ENABLE_GOLD}" in
- yes|both|both/gold|both/ld)
+case "${ENABLE_GOLD}" in
+ yes|default)
# Check for ELF target.
is_elf=no
case "${target}" in
@@ -353,14 +361,10 @@
# Check for target supported by gold.
case "${target}" in
i?86-*-* | x86_64-*-* | sparc*-*-* | powerpc*-*-* | arm*-*-*)
- case "${ENABLE_GOLD}" in
- both*)
- configdirs="$configdirs gold"
- ;;
- *)
- configdirs=`echo " ${configdirs} " | sed -e 's/ ld / gold /'`
- ;;
- esac
+ configdirs="$configdirs gold"
+ if test x${ENABLE_GOLD} = xdefault; then
+ default_ld=gold
+ fi
ENABLE_GOLD=yes
;;
esac
@@ -371,7 +375,31 @@
*)
AC_MSG_ERROR([invalid --enable-gold argument])
;;
- esac
+esac
+
+AC_ARG_ENABLE(ld,
+[[ --enable-ld[=ARG] build ld [ARG={default,yes,no}]]],
+ENABLE_LD=$enableval,
+ENABLE_LD=yes)
+
+case "${ENABLE_LD}" in
+ default)
+ if test x${default_ld} != xgold; then
+ AC_MSG_ERROR([either gold or ld can be the default ld])
+ fi
+ ;;
+ yes)
+ ;;
+ no)
+ if test x${ENABLE_GOLD} != xyes; then
+ AC_MSG_WARN([neither ld nor gold are enabled])
+ fi
+ configdirs=`echo " ${configdirs} " | sed -e 's/ ld / /'`
+ ;;
+ *)
+ AC_MSG_ERROR([invalid --enable-ld argument])
+ ;;
+esac
# Configure extra directories which are host specific
--- binutils-2.20.90.20101105.orig/ld/configure.in
+++ binutils-2.20.90.20101105/ld/configure.in
@@ -73,13 +73,13 @@
dnl "install_as_default" is set to false if gold is the default linker.
dnl "installed_linker" is the installed BFD linker name.
AC_ARG_ENABLE(gold,
-[[ --enable-gold[=ARG] build gold [ARG={both}[/{gold,ld}]]]],
+[[ --enable-gold[=ARG] build gold [ARG={default,yes,no}]]],
[case "${enableval}" in
- yes|both/gold)
+ default)
install_as_default=no
installed_linker=ld.bfd
;;
- both|both/ld)
+ yes|no)
install_as_default=yes
installed_linker=ld.bfd
;;
@@ -87,8 +87,8 @@
AC_MSG_ERROR([invalid --enable-gold argument])
;;
esac],
-[install_as_default=ld
- installed_linker=ld])
+[install_as_default=yes
+ installed_linker=ld.bfd])
AC_SUBST(install_as_default)
AC_SUBST(installed_linker)
--- binutils-2.20.90.20101105.orig/gold/configure.ac
+++ binutils-2.20.90.20101105/gold/configure.ac
@@ -41,27 +41,33 @@
dnl "install_as_default" is true if the linker to be installed as the
dnl default linker, ld.
dnl "installed_linker" is the installed gold linker name.
-AC_ARG_ENABLE(gold,
-[[ --enable-gold[=ARG] build gold [ARG={both}[/{gold,ld}]]]],
+
+default_ld=
+AC_ARG_ENABLE(ld,
+[[ --enable-ld[=ARG] build ld [ARG={default,yes,no}]]],
[case "${enableval}" in
- yes)
- install_as_default=gold
- installed_linker=ld
- ;;
- both/gold)
- install_as_default=yes
+ default)
+ default_ld=ld.bfd
+ ;;
+esac])
+
+AC_ARG_ENABLE(gold,
+[[ --enable-gold[=ARG] build gold [ARG={default,yes,no}]]],
+[case "${enableval}" in
+ yes|default)
+ if test x${default_ld} = x; then
+ install_as_default=yes
+ fi
installed_linker=ld.gold
;;
- both|both/ld)
- install_as_default=no
- installed_linker=ld.gold
+ no)
;;
*)
AC_MSG_ERROR([invalid --enable-gold argument])
;;
esac],
-[install_as_default=gold
- installed_linker=ld])
+[install_as_default=no
+ installed_linker=ld.gold])
AC_SUBST(install_as_default)
AC_SUBST(installed_linker)
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: Review of --enable-gold=both patch
2010-11-23 13:27 ` Matthias Klose
@ 2010-11-23 13:31 ` Tristan Gingold
2010-11-23 17:09 ` H.J. Lu
1 sibling, 0 replies; 25+ messages in thread
From: Tristan Gingold @ 2010-11-23 13:31 UTC (permalink / raw)
To: Matthias Klose
Cc: Nick Clifton, Paolo Bonzini, Mark Mitchell, Joseph S. Myers,
H.J. Lu, Ian Lance Taylor, GCC Patches, binutils
On Nov 23, 2010, at 2:26 PM, Matthias Klose wrote:
> On 23.11.2010 13:24, Nick Clifton wrote:
>> Hi Matthias,
>>
>> [Sorry about the delay in replying - I am in a bit of a muddle right now].
>>
>>> The attached patch implements this proposal, tested the combinations
>>> above, and disabling ld without gold (leading to an error).
>>>
>>> I did choose to always install the bfd linker as ld.bfd and the gold
>>> linker as ld.gold, and pointing the link to one of the above.
>>>
>>> Nick, is this ok with you?
>>
>> Yes, it is fine. Thanks for doing this.
>
> checked in in gcc as r167076. Nick, Tristan, could you check it into binutils trunk and branch?
Ok for the branch if you have the OK for the trunk. Would be nice to have coherent configure options!
Tristan.
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: Review of --enable-gold=both patch
2010-11-23 13:27 ` Matthias Klose
2010-11-23 13:31 ` Tristan Gingold
@ 2010-11-23 17:09 ` H.J. Lu
2010-11-23 18:02 ` H.J. Lu
2010-11-23 18:13 ` H.J. Lu
1 sibling, 2 replies; 25+ messages in thread
From: H.J. Lu @ 2010-11-23 17:09 UTC (permalink / raw)
To: Matthias Klose
Cc: Nick Clifton, Paolo Bonzini, Mark Mitchell, Joseph S. Myers,
Ian Lance Taylor, GCC Patches, binutils, Tristan Gingold
On Tue, Nov 23, 2010 at 5:26 AM, Matthias Klose <doko@ubuntu.com> wrote:
> On 23.11.2010 13:24, Nick Clifton wrote:
>>
>> Hi Matthias,
>>
>> [Sorry about the delay in replying - I am in a bit of a muddle right now].
>>
>>> The attached patch implements this proposal, tested the combinations
>>> above, and disabling ld without gold (leading to an error).
>>>
>>> I did choose to always install the bfd linker as ld.bfd and the gold
>>> linker as ld.gold, and pointing the link to one of the above.
>>>
>>> Nick, is this ok with you?
>>
>> Yes, it is fine. Thanks for doing this.
>
> checked in in gcc as r167076. Nick, Tristan, could you check it into
> binutils trunk and branch?
>
Binutils is broken now:
http://www.sourceware.org/bugzilla/show_bug.cgi?id=12258
--
H.J.
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: Review of --enable-gold=both patch
2010-11-23 17:09 ` H.J. Lu
@ 2010-11-23 18:02 ` H.J. Lu
2010-11-24 10:00 ` Tristan Gingold
2010-11-23 18:13 ` H.J. Lu
1 sibling, 1 reply; 25+ messages in thread
From: H.J. Lu @ 2010-11-23 18:02 UTC (permalink / raw)
To: Matthias Klose
Cc: Nick Clifton, Paolo Bonzini, Mark Mitchell, Joseph S. Myers,
Ian Lance Taylor, GCC Patches, binutils, Tristan Gingold
[-- Attachment #1: Type: text/plain, Size: 2265 bytes --]
On Tue, Nov 23, 2010 at 9:09 AM, H.J. Lu <hjl.tools@gmail.com> wrote:
> On Tue, Nov 23, 2010 at 5:26 AM, Matthias Klose <doko@ubuntu.com> wrote:
>> On 23.11.2010 13:24, Nick Clifton wrote:
>>>
>>> Hi Matthias,
>>>
>>> [Sorry about the delay in replying - I am in a bit of a muddle right now].
>>>
>>>> The attached patch implements this proposal, tested the combinations
>>>> above, and disabling ld without gold (leading to an error).
>>>>
>>>> I did choose to always install the bfd linker as ld.bfd and the gold
>>>> linker as ld.gold, and pointing the link to one of the above.
>>>>
>>>> Nick, is this ok with you?
>>>
>>> Yes, it is fine. Thanks for doing this.
>>
>> checked in in gcc as r167076. Nick, Tristan, could you check it into
>> binutils trunk and branch?
>>
>
> Binutils is broken now:
>
> http://www.sourceware.org/bugzilla/show_bug.cgi?id=12258
>
This change:
case "${ENABLE_LD}" in
default)
if test x${default_ld} != xgold; then
AC_MSG_ERROR([either gold or ld can be the default ld])
fi
;;
is wrong. At this time, default_ld is set to gold only by --enable-gold=default
What we should test is
if test x${default_ld} != x; then
which checks that default_ld isn't set. Also comments are wrong:
# Handle --enable-gold, --enable-ld.
# --disable-gold [--enable-ld]
# Build only ld. Default option.
# --enable-gold[=default] [--enable-ld]
# Build both gold and ld. Install gold as "ld.gold" and "ld",
# install ld as "ld.bfd".
--enable-gold only enables gold, not make it default unless
ld is disabled.
# --enable-gold[=default] --disable-ld
# Build only gold, which is then installed as both "ld.gold" and "ld".
# --enable-gold --enable-ld=default
# Build both gold (installed as "gold") and ld (installed as "ld").
gold is installed as ld.gold. ld is also installed ld.bfd.
# In other words, ld is default
# --enable-gold=default --enable-ld=default
# Error.
I am checking in this patch as an obvious fix.
--
H.J.
---
2010-11-23 H.J. Lu <hongjiu.lu@intel.com>
PR binutils/12258
* configure.ac: Correct comments for --enable-gold/--enable-ld.
Properly check default linker.
* configure: Regnerated.
[-- Attachment #2: binutils-pr12258-1.patch --]
[-- Type: text/plain, Size: 2586 bytes --]
2010-11-23 H.J. Lu <hongjiu.lu@intel.com>
PR binutils/12258
* configure.ac: Correct comments for --enable-gold/--enable-ld.
Properly check default linker.
* configure: Regnerated.
diff --git a/configure b/configure
index 2758ab0..8b67ba3 100755
--- a/configure
+++ b/configure
@@ -2854,13 +2854,17 @@ esac
# Handle --enable-gold, --enable-ld.
# --disable-gold [--enable-ld]
# Build only ld. Default option.
-# --enable-gold[=default] [--enable-ld]
+# --enable-gold [--enable-ld]
+# Build both gold and ld. Install gold as "ld.gold", install ld
+# as "ld.bfd" and "ld".
+# --enable-gold=default [--enable-ld]
# Build both gold and ld. Install gold as "ld.gold" and "ld",
# install ld as "ld.bfd".
# --enable-gold[=default] --disable-ld
# Build only gold, which is then installed as both "ld.gold" and "ld".
# --enable-gold --enable-ld=default
-# Build both gold (installed as "gold") and ld (installed as "ld").
+# Build both gold (installed as "ld.gold") and ld (installed as "ld"
+# and ld.bfd).
# In other words, ld is default
# --enable-gold=default --enable-ld=default
# Error.
@@ -2920,7 +2924,7 @@ fi
case "${ENABLE_LD}" in
default)
- if test x${default_ld} != xgold; then
+ if test x${default_ld} != x; then
as_fn_error "either gold or ld can be the default ld" "$LINENO" 5
fi
;;
diff --git a/configure.ac b/configure.ac
index 626bb4e..294f241 100644
--- a/configure.ac
+++ b/configure.ac
@@ -327,13 +327,17 @@ esac
# Handle --enable-gold, --enable-ld.
# --disable-gold [--enable-ld]
# Build only ld. Default option.
-# --enable-gold[=default] [--enable-ld]
+# --enable-gold [--enable-ld]
+# Build both gold and ld. Install gold as "ld.gold", install ld
+# as "ld.bfd" and "ld".
+# --enable-gold=default [--enable-ld]
# Build both gold and ld. Install gold as "ld.gold" and "ld",
# install ld as "ld.bfd".
# --enable-gold[=default] --disable-ld
# Build only gold, which is then installed as both "ld.gold" and "ld".
# --enable-gold --enable-ld=default
-# Build both gold (installed as "gold") and ld (installed as "ld").
+# Build both gold (installed as "ld.gold") and ld (installed as "ld"
+# and ld.bfd).
# In other words, ld is default
# --enable-gold=default --enable-ld=default
# Error.
@@ -387,7 +391,7 @@ ENABLE_LD=yes)
case "${ENABLE_LD}" in
default)
- if test x${default_ld} != xgold; then
+ if test x${default_ld} != x; then
AC_MSG_ERROR([either gold or ld can be the default ld])
fi
;;
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: Review of --enable-gold=both patch
2010-11-23 17:09 ` H.J. Lu
2010-11-23 18:02 ` H.J. Lu
@ 2010-11-23 18:13 ` H.J. Lu
1 sibling, 0 replies; 25+ messages in thread
From: H.J. Lu @ 2010-11-23 18:13 UTC (permalink / raw)
To: Matthias Klose
Cc: Nick Clifton, Paolo Bonzini, Mark Mitchell, Joseph S. Myers,
Ian Lance Taylor, GCC Patches, binutils, Tristan Gingold
On Tue, Nov 23, 2010 at 9:09 AM, H.J. Lu <hjl.tools@gmail.com> wrote:
> On Tue, Nov 23, 2010 at 5:26 AM, Matthias Klose <doko@ubuntu.com> wrote:
>> On 23.11.2010 13:24, Nick Clifton wrote:
>>>
>>> Hi Matthias,
>>>
>>> [Sorry about the delay in replying - I am in a bit of a muddle right now].
>>>
>>>> The attached patch implements this proposal, tested the combinations
>>>> above, and disabling ld without gold (leading to an error).
>>>>
>>>> I did choose to always install the bfd linker as ld.bfd and the gold
>>>> linker as ld.gold, and pointing the link to one of the above.
>>>>
>>>> Nick, is this ok with you?
>>>
>>> Yes, it is fine. Thanks for doing this.
>>
>> checked in in gcc as r167076. Nick, Tristan, could you check it into
>> binutils trunk and branch?
>>
>
> Binutils is broken now:
>
> http://www.sourceware.org/bugzilla/show_bug.cgi?id=12258
>
It also caused:
http://www.sourceware.org/bugzilla/show_bug.cgi?id=12259
--
H.J.
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: Review of --enable-gold=both patch
2010-11-23 18:02 ` H.J. Lu
@ 2010-11-24 10:00 ` Tristan Gingold
2010-11-24 13:11 ` H.J. Lu
0 siblings, 1 reply; 25+ messages in thread
From: Tristan Gingold @ 2010-11-24 10:00 UTC (permalink / raw)
To: H.J. Lu; +Cc: Matthias Klose, GCC Patches, binutils
On Nov 23, 2010, at 7:02 PM, H.J. Lu wrote:
>
> This change:
>
> case "${ENABLE_LD}" in
> default)
> if test x${default_ld} != xgold; then
> AC_MSG_ERROR([either gold or ld can be the default ld])
> fi
> ;;
>
> is wrong. At this time, default_ld is set to gold only by --enable-gold=default
> What we should test is
>
> if test x${default_ld} != x; then
>
> which checks that default_ld isn't set. Also comments are wrong:
>
> # Handle --enable-gold, --enable-ld.
> # --disable-gold [--enable-ld]
> # Build only ld. Default option.
> # --enable-gold[=default] [--enable-ld]
> # Build both gold and ld. Install gold as "ld.gold" and "ld",
> # install ld as "ld.bfd".
>
> --enable-gold only enables gold, not make it default unless
> ld is disabled.
>
> # --enable-gold[=default] --disable-ld
> # Build only gold, which is then installed as both "ld.gold" and "ld".
> # --enable-gold --enable-ld=default
> # Build both gold (installed as "gold") and ld (installed as "ld").
>
> gold is installed as ld.gold. ld is also installed ld.bfd.
>
> # In other words, ld is default
> # --enable-gold=default --enable-ld=default
> # Error.
>
> I am checking in this patch as an obvious fix.
Looks like this hasn't yet been committed to binutils.
Tristan.
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: Review of --enable-gold=both patch
2010-11-24 10:00 ` Tristan Gingold
@ 2010-11-24 13:11 ` H.J. Lu
2010-11-24 13:25 ` Tristan Gingold
0 siblings, 1 reply; 25+ messages in thread
From: H.J. Lu @ 2010-11-24 13:11 UTC (permalink / raw)
To: Tristan Gingold; +Cc: Matthias Klose, GCC Patches, binutils
On Wed, Nov 24, 2010 at 2:00 AM, Tristan Gingold <gingold@adacore.com> wrote:
>
> On Nov 23, 2010, at 7:02 PM, H.J. Lu wrote:
>
>>
>> This change:
>>
>> case "${ENABLE_LD}" in
>> default)
>> if test x${default_ld} != xgold; then
>> AC_MSG_ERROR([either gold or ld can be the default ld])
>> fi
>> ;;
>>
>> is wrong. At this time, default_ld is set to gold only by --enable-gold=default
>> What we should test is
>>
>> if test x${default_ld} != x; then
>>
>> which checks that default_ld isn't set. Also comments are wrong:
>>
>> # Handle --enable-gold, --enable-ld.
>> # --disable-gold [--enable-ld]
>> # Build only ld. Default option.
>> # --enable-gold[=default] [--enable-ld]
>> # Build both gold and ld. Install gold as "ld.gold" and "ld",
>> # install ld as "ld.bfd".
>>
>> --enable-gold only enables gold, not make it default unless
>> ld is disabled.
>>
>> # --enable-gold[=default] --disable-ld
>> # Build only gold, which is then installed as both "ld.gold" and "ld".
>> # --enable-gold --enable-ld=default
>> # Build both gold (installed as "gold") and ld (installed as "ld").
>>
>> gold is installed as ld.gold. ld is also installed ld.bfd.
>>
>> # In other words, ld is default
>> # --enable-gold=default --enable-ld=default
>> # Error.
>>
>> I am checking in this patch as an obvious fix.
>
> Looks like this hasn't yet been committed to binutils.
>
I don't know what happened to cvs archive. But it is in:
http://sourceware.org/git/?p=binutils.git;a=commit;h=e1cffffd802eb3d50c4f3e0718d1f194c58d8dc0
--
H.J.
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: Review of --enable-gold=both patch
2010-11-24 13:11 ` H.J. Lu
@ 2010-11-24 13:25 ` Tristan Gingold
0 siblings, 0 replies; 25+ messages in thread
From: Tristan Gingold @ 2010-11-24 13:25 UTC (permalink / raw)
To: H.J. Lu; +Cc: Matthias Klose, GCC Patches, binutils
On Nov 24, 2010, at 2:11 PM, H.J. Lu wrote:
> On Wed, Nov 24, 2010 at 2:00 AM, Tristan Gingold <gingold@adacore.com> wrote:
>>
>> On Nov 23, 2010, at 7:02 PM, H.J. Lu wrote:
>>
>>>
>>> This change:
>>>
>>> case "${ENABLE_LD}" in
>>> default)
>>> if test x${default_ld} != xgold; then
>>> AC_MSG_ERROR([either gold or ld can be the default ld])
>>> fi
>>> ;;
>>>
>>> is wrong. At this time, default_ld is set to gold only by --enable-gold=default
>>> What we should test is
>>>
>>> if test x${default_ld} != x; then
>>>
>>> which checks that default_ld isn't set. Also comments are wrong:
>>>
>>> # Handle --enable-gold, --enable-ld.
>>> # --disable-gold [--enable-ld]
>>> # Build only ld. Default option.
>>> # --enable-gold[=default] [--enable-ld]
>>> # Build both gold and ld. Install gold as "ld.gold" and "ld",
>>> # install ld as "ld.bfd".
>>>
>>> --enable-gold only enables gold, not make it default unless
>>> ld is disabled.
>>>
>>> # --enable-gold[=default] --disable-ld
>>> # Build only gold, which is then installed as both "ld.gold" and "ld".
>>> # --enable-gold --enable-ld=default
>>> # Build both gold (installed as "gold") and ld (installed as "ld").
>>>
>>> gold is installed as ld.gold. ld is also installed ld.bfd.
>>>
>>> # In other words, ld is default
>>> # --enable-gold=default --enable-ld=default
>>> # Error.
>>>
>>> I am checking in this patch as an obvious fix.
>>
>> Looks like this hasn't yet been committed to binutils.
>>
>
> I don't know what happened to cvs archive. But it is in:
>
> http://sourceware.org/git/?p=binutils.git;a=commit;h=e1cffffd802eb3d50c4f3e0718d1f194c58d8dc0
Indeed.
Tristan.
^ permalink raw reply [flat|nested] 25+ messages in thread
end of thread, other threads:[~2010-11-24 13:25 UTC | newest]
Thread overview: 25+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <4C27E695.9070802@codesourcery.com>
[not found] ` <4C286200.30402@gnu.org>
[not found] ` <Pine.LNX.4.64.1006281009290.17565@digraph.polyomino.org.uk>
[not found] ` <4C2886C7.4040408@gnu.org>
[not found] ` <4C28CA2A.7060703@codesourcery.com>
[not found] ` <4C28CE9C.9030809@gnu.org>
[not found] ` <4C28D9F1.6030309@codesourcery.com>
2010-10-27 14:04 ` Review of --enable-gold=both patch Matthias Klose
2010-10-29 9:21 ` Nick Clifton
2010-10-29 14:55 ` Matthias Klose
2010-10-29 15:00 ` Paolo Bonzini
2010-10-29 15:12 ` Paolo Bonzini
2010-10-29 15:41 ` Matthias Klose
2010-10-29 15:42 ` Paolo Bonzini
2010-11-01 20:21 ` Ralf Wildenhues
2010-11-11 0:09 ` Matthias Klose
2010-11-11 8:37 ` Paolo Bonzini
2010-11-12 18:45 ` Matthias Klose
2010-11-12 19:36 ` Paolo Bonzini
[not found] ` <4CDD8B19.3040909__3908.7257617668$1289587526$gmane$org@ubuntu.com>
2010-11-12 20:37 ` Andreas Schwab
2010-11-13 20:04 ` Matthias Klose
2010-11-13 20:48 ` Paolo Bonzini
[not found] ` <4CDEEEEB.2000905__41684.8152097829$1289678668$gmane$org@ubuntu.com>
2010-11-14 7:25 ` Ryan Hill
2010-11-23 12:24 ` Nick Clifton
2010-11-23 13:27 ` Matthias Klose
2010-11-23 13:31 ` Tristan Gingold
2010-11-23 17:09 ` H.J. Lu
2010-11-23 18:02 ` H.J. Lu
2010-11-24 10:00 ` Tristan Gingold
2010-11-24 13:11 ` H.J. Lu
2010-11-24 13:25 ` Tristan Gingold
2010-11-23 18:13 ` H.J. Lu
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).