This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Why are libgcc.a and libgcc_eh.a compiled with -fvisibility=hidden?
- From: Ian Lance Taylor <iant at google dot com>
- To: Ollie Wild <aaw at google dot com>
- Cc: GCC Development <gcc at gcc dot gnu dot org>, jakub at redhat dot com
- Date: Wed, 07 Mar 2012 22:38:50 -0800
- Subject: Re: Why are libgcc.a and libgcc_eh.a compiled with -fvisibility=hidden?
- References: <CAFOgFcQwBnZR6SQ_kODmBQpY1x4FTrqyUGoZ1oDqSUVAj+_vvw@mail.gmail.com>
Ollie Wild <aaw@google.com> writes:
> So ... is there a valid reason for this, or is this just an accident
> of history? AFICT, this behavior dates back to 2007 as of r120429
> (http://gcc.gnu.org/viewcvs/trunk/libgcc/static-object.mk?view=markup&pathrev=120429).
No, that's not right. That change just moves the libgcc build out of
gcc over to libgcc as a top-level directory. It didn't introduce the
visibility hiding. I think that dates back to revision 50063.
2002-02-26 Jakub Jelinek <jakub@redhat.com>
* configure.in (libgcc_visibility): Substitute.
* configure: Rebuilt.
* mklibgcc.in: If libgcc_visibility = yes, make libgcc.a global
defined symbols .hidden.
The patch was discussed here:
http://gcc.gnu.org/ml/gcc-patches/2002-02/msg01856.html .
However, I don't see any discussion of why this change was made.
CC'ed Jakub to see if he remembers.
Ian