3.3.2 PATCH: Disable .hidden support without GNU ld

Jakub Jelinek jakub@redhat.com
Thu Sep 11 14:49:00 GMT 2003

On Fri, Sep 05, 2003 at 06:40:39PM +0200, Rainer Orth wrote:
> Richard Henderson writes:
> > > 	* configure.in (libgcc_visibility): Disable unless using GNU ld.
> > 
> > Ok.
> Unfortunately, it turned out that the patch was wrong for 3.3: while it
> disabled libgcc_visibility, HAVE_GAS_HIDDEN remained defined, causing
> exactly the libgcc_s.so.1 link fail the patch intended to avoid ;-(
> This one actually works: the compiler bootstrapped (i686-pc-solaris2.9 with
> gas 2.14), currently building libraries.
> Ok if the bootstrap finishes without regressions?

> Thu Sep  4 16:42:20 2003  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
> 	* configure.in (gcc_cv_as_hidden): Disable unless using GNU ld.
> 	* configure: Regenerate.

This patch is broken e.g. on all linux systems.
gnu_ld_flag is != no only if configured --with-gnu-ld or --with-ld (in
the latter case only if the given ld is actually GNU ld).
Nobody is configuring GCC that way though on platforms where
old GNU ld exists.
Moving the test a few lines higher might fix it though:
there is
        ld_ver=`$gcc_cv_ld --version 2>/dev/null | head -1`
        if echo "$ld_ver" | grep GNU > /dev/null; then
test for GNU ld version and if GNU ld is older than 2.12.1,
gcc_cv_as_hidden is set to no.
So, something like:
+        else
+          # non-GNU linkers don't seem to support .hidden yet
+          gcc_cv_as_hidden=no
-# non-GNU linkers don't seem to support .hidden yet
-if test x"$gnu_ld_flag" = x"no"; then
-      gcc_cv_as_hidden=no

is IMHO better.


More information about the Gcc-patches mailing list