This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
3.4 PATCH: Disable .hidden on IRIX 6 without GNU ld
- From: Rainer Orth <ro at TechFak dot Uni-Bielefeld dot DE>
- To: gcc-patches at gcc dot gnu dot org
- Date: Mon, 2 Jun 2003 16:07:48 +0200 (MEST)
- Subject: 3.4 PATCH: Disable .hidden on IRIX 6 without GNU ld
Bootstrapping mainline for mips-sgi-irix6.5o32 with gas 2.13.91 failed
since gcjh didn't link:
real-ld: ERROR 33 : Unresolved data symbol "__clz_tab" -- 1st referenced by stage1/libgcc.a(_umoddi3.o).
It turned out that while __clz_tab is present in libgcc.a, it is marked
hidden because gas supports the .hidden directive. Unfortunately, the
native O32 ld does not and the link fails.
Therefore, I've completely disabled .hidden support in configure unless
both the assembler supports .hidden and GNU ld is used, like
libgcc_visibility was already disabled for the same reason.
With this patch, the compiler bootstrapped with one additional change:
generation of the libstdc++ pch files failed, and I had to disable it
manually. I'll further investigate this.
Ok for mainline? (The 3.3 branch is not affected because it doesn't use
__visibility__("hidden") in libgcc2.c.)
Rainer
Fri May 30 20:07:33 2003 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
* configure.in (gcc_cv_as_hidden): Disable .hidden completely on
IRIX 6 without GNU ld.
* configure: Regenerate.
Index: gcc/configure.in
===================================================================
RCS file: /cvs/gcc/gcc/gcc/configure.in,v
retrieving revision 1.668
diff -u -p -r1.668 configure.in
--- gcc/configure.in 12 May 2003 22:30:24 -0000 1.668
+++ gcc/configure.in 2 Jun 2003 14:02:42 -0000
@@ -1874,12 +1874,6 @@ changequote(,)dnl
changequote([,])dnl
fi
fi
-if test x"$gcc_cv_as_hidden" = xyes; then
- AC_DEFINE(HAVE_GAS_HIDDEN, 1,
- [Define if your assembler supports .hidden.])
-fi
-AC_MSG_RESULT($gcc_cv_as_hidden)
-libgcc_visibility=$gcc_cv_as_hidden
case "$target" in
mips-sgi-irix6*)
if test x"$gnu_ld_flag" = x"no"; then
@@ -1889,10 +1883,16 @@ case "$target" in
# -call_shared (passed by default to the linker) and -r (used to
# link the object file generated without .hidden directives with
# one that hides symbols), so we also lose.
- libgcc_visibility=no
+ gcc_cv_as_hidden=no
fi
;;
esac
+if test x"$gcc_cv_as_hidden" = xyes; then
+ AC_DEFINE(HAVE_GAS_HIDDEN, 1,
+ [Define if your assembler supports .hidden.])
+fi
+AC_MSG_RESULT($gcc_cv_as_hidden)
+libgcc_visibility=$gcc_cv_as_hidden
AC_SUBST(libgcc_visibility)
AC_MSG_CHECKING(assembler leb128 support)