This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [Bug middle-end/43602] New: ___emutls_v.__gcov_indirect_call_[counters|callee] undefined on *-*-darwin*


Thanks.

au

http://www.xprad.org/



Bugzilla from gcc-bugzilla@gcc.gnu.org wrote:
> 
> 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
> 
> 
> 

-- 
View this message in context: http://old.nabble.com/-Bug-middle-end-43602---New%3A-___emutls_v.__gcov_indirect_call_-counters%7Ccallee--undefined-on-*-*-darwin*-tp28095803p28103457.html
Sent from the gcc - bugs mailing list archive at Nabble.com.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]