Message ID | AANLkTim8CO2L_FnxucveYBT+mGj=MMTcDVW1b_YTEr2s@mail.gmail.com |
---|---|
State | New |
Headers | show |
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.
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
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.
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 ;;