public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug middle-end/43602]  New: ___emutls_v.__gcov_indirect_call_[counters|callee] undefined on *-*-darwin*
@ 2010-03-31 13:22 howarth at nitro dot med dot uc dot edu
  2010-03-31 13:30 ` [Bug middle-end/43602] " howarth at nitro dot med dot uc dot edu
                   ` (23 more replies)
  0 siblings, 24 replies; 25+ messages in thread
From: howarth at nitro dot med dot uc dot edu @ 2010-03-31 13:22 UTC (permalink / raw)
  To: gcc-bugs

The commit of...

Author: rguenth
Date: Tue Mar 30 13:10:16 2010
New Revision: 157822

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=157822
Log:
2010-03-30  Seongbae Park <seongbae.park@gmail.com>
            Jack Howarth <howarth@bromo.med.uc.edu>

        * tree-profile.c (tree_init_ic_make_global_vars): Make static
        variables TLS.

Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/tree-profile.c

...resulted in a number of profile related testsuite regressions on darwin.
These are all of the form...

[MacPro:~] howarth%
/sw/src/fink.build/gcc45-4.4.999-20100330/darwin_objdir/gcc/xgcc
-B/sw/src/fink.build/gcc45-4.4.999-20100330/darwin_objdir/gcc/
/sw/src/fink.build/gcc45-4.4.999-20100330/gcc-4.5-20100330/gcc/testsuite/gcc.dg/matrix/transpose-1.c
   -fprofile-generate -O3  -lm   -o
/sw/src/fink.build/gcc45-4.4.999-20100330/darwin_objdir/gcc/testsuite/gcc/transpose-1.x01
Undefined symbols:
  "___emutls_v.__gcov_indirect_call_counters", referenced from:
      _mem_init in cc591Wfh.o
      _main in cc591Wfh.o
      global constructors keyed to 65535_0_transpose_1.c in cc591Wfh.o
  "___emutls_v.__gcov_indirect_call_callee", referenced from:
      _mem_init in cc591Wfh.o
      _mem_init in cc591Wfh.o
      _main in cc591Wfh.o
      _main in cc591Wfh.o
      global constructors keyed to 65535_0_transpose_1.c in cc591Wfh.o
      global constructors keyed to 65535_0_transpose_1.c in cc591Wfh.o
ld: symbol(s) not found
collect2: ld returned 1 exit status

Reverting r157822 eliminates these failures. These are surprising since darwin
should now provide all of the additional emutls symbols via a versioned
libgcc_ext shared library.

On x86_64-apple-darwin10, current gcc trunk produces...

[MacPro:darwin_objdir/x86_64-apple-darwin10.3.0/libgcc] howarth% nm
libgcc_s.1.dylib | grep emutls
00013e70 T ___emutls_get_address
00014070 T ___emutls_register_common
00013e20 t _emutls_destroy
00013de0 t _emutls_init
00015100 b _emutls_key
000150a0 d _emutls_mutex
000150fc b _emutls_size

[MacPro:darwin_objdir/x86_64-apple-darwin10.3.0/libgcc] howarth% nm
libgcc_ext.10.5.dylib | grep emutls
00013e70 T ___emutls_get_address
00014070 T ___emutls_register_common

The undefined ___emutls_v.__gcov_indirect_call_counters and
___emutls_v.__gcov_indirect_call_callee symbols occur for the following
permutations...

1) r157820 with r157822 applied (where libgcc is built with only
-DHAVE_CC_TLS).
2) r157822 (where libgcc is built with both -DHAVE_CC_TLS and -DUSE_EMUTLS)
3) r157822 with the following patch applied to invert the logic of that commit
so that neither -DHAVE_CC_TLS  or -DUSE_EMUTLS are used in building libgcc)

Index: libgcc/Makefile.in
===================================================================
--- libgcc/Makefile.in  (revision 157840)
+++ libgcc/Makefile.in  (working copy)
@@ -226,7 +226,7 @@
 # will usually contain -g, so for the moment CFLAGS goes first.  We must
 # include CFLAGS - that's where multilib options live.
 INTERNAL_CFLAGS = $(CFLAGS) $(LIBGCC2_CFLAGS) $(HOST_LIBGCC2_CFLAGS) \
-                 $(INCLUDES) @set_have_cc_tls@ @set_use_emutls@
+                 $(INCLUDES) @set_have_cc_tls@

 MULTIDIR := $(shell $(CC) $(CFLAGS) -print-multi-directory)
 MULTIOSDIR := $(shell $(CC) $(CFLAGS) -print-multi-os-directory)
Index: libgcc/configure.ac
===================================================================
--- libgcc/configure.ac (revision 157840)
+++ libgcc/configure.ac (working copy)
@@ -232,20 +232,13 @@
 # gcc, which can't be used to build executable due to that libgcc
 # is yet to be built here.
 GCC_CHECK_CC_TLS
+GCC_CHECK_EMUTLS
 set_have_cc_tls=
-if test "$enable_tls $gcc_cv_have_cc_tls" = "yes yes"; then
+if test "$enable_tls $gcc_cv_have_cc_tls $gcc_cv_use_emutls" = "yes yes no";
then
   set_have_cc_tls="-DHAVE_CC_TLS"
 fi
 AC_SUBST(set_have_cc_tls)

-# See if we have emulated thread-local storage.
-GCC_CHECK_EMUTLS
-set_use_emutls=
-if test "$enable_tls $gcc_cv_use_emutls" = "yes yes"; then
-  set_use_emutls="-DUSE_EMUTLS"
-fi
-AC_SUBST(set_use_emutls)
-
 # Conditionalize the makefile for this target machine.
 tmake_file_=
 for f in ${tmake_file}


-- 
           Summary: ___emutls_v.__gcov_indirect_call_[counters|callee]
                    undefined on *-*-darwin*
           Product: gcc
           Version: 4.5.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: middle-end
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: howarth at nitro dot med dot uc dot edu
 GCC build triplet: *-*-darwin*
  GCC host triplet: *-*-darwin*
GCC target triplet: *-*-darwin*


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43602


^ permalink raw reply	[flat|nested] 25+ messages in thread

end of thread, other threads:[~2010-05-24 14:37 UTC | newest]

Thread overview: 25+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-03-31 13:22 [Bug middle-end/43602] New: ___emutls_v.__gcov_indirect_call_[counters|callee] undefined on *-*-darwin* howarth at nitro dot med dot uc dot edu
2010-03-31 13:30 ` [Bug middle-end/43602] " howarth at nitro dot med dot uc dot edu
2010-03-31 13:42 ` howarth at nitro dot med dot uc dot edu
2010-03-31 14:53 ` howarth at nitro dot med dot uc dot edu
2010-03-31 15:19 ` howarth at nitro dot med dot uc dot edu
2010-03-31 15:23 ` howarth at nitro dot med dot uc dot edu
2010-03-31 20:21 ` howarth at nitro dot med dot uc dot edu
2010-03-31 20:40 ` dominiq at lps dot ens dot fr
2010-03-31 20:55 ` dominiq at lps dot ens dot fr
2010-03-31 21:05 ` howarth at nitro dot med dot uc dot edu
2010-03-31 23:30 ` howarth at nitro dot med dot uc dot edu
2010-03-31 23:52 ` howarth at nitro dot med dot uc dot edu
2010-04-01  0:55 ` [Bug middle-end/43602] New: " Auser99
2010-04-01  5:12 ` [Bug middle-end/43602] " howarth at nitro dot med dot uc dot edu
2010-04-01  5:13 ` howarth at nitro dot med dot uc dot edu
2010-04-01 11:28 ` howarth at nitro dot med dot uc dot edu
2010-04-01 13:25 ` rguenth at gcc dot gnu dot org
2010-04-01 13:26 ` rguenth at gcc dot gnu dot org
2010-04-01 15:42 ` bonzini at gnu dot org
2010-04-01 16:00 ` howarth at nitro dot med dot uc dot edu
2010-04-01 16:01 ` bonzini at gnu dot org
2010-04-05  8:32 ` developer at sandoe-acoustics dot co dot uk
2010-05-15 15:40 ` iains at gcc dot gnu dot org
2010-05-19 14:54 ` iains at gcc dot gnu dot org
2010-05-24 14:37 ` iains at gcc dot gnu dot org

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).