This is the mail archive of the gcc-patches@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: [Patch libitm] [V2] config-based assessment of weakref capability


Hello Iain,

On 11/21/2011 10:17 AM, Iain Sandoe wrote:
This checked to DTRT on i686-darwin9 (weak ref doesn't behave like
ELF's) and x86-64-darwin10/XCode 3.2.5 (weak ref behaves as per ELF).

It is my understanding from some off-list discussion reported with the
ld64 engineer -
- that Darwin >= 10 should, in principle, support ELF-style weak refs
(as well as the two-level and flat_namespace versions).

I think something is wrong in the configure. Indeed, on apple-darwin10.8.0, weak ref works but it is configure as "no".
I guess it should not try to run it but only compile it (or the symbol should exists).


Patrick.

Part of my config.log

configure:17219: checking whether weak refs work like ELF
configure:17251: /Users/patrick/gcc/trunk-build/./gcc/xgcc -B/Users/patrick/gcc/trunk-build/./gcc/ -B/Users/patrick/gcc/trunk-install/x86_64-apple-darwin10.8.0/bin/ -B/Users/patrick/gcc/trunk-install/x86_64-apple-darwin10.8.0/lib/ -isystem /Users/patrick/gcc/trunk-install/x86_64-apple-darwin10.8.0/include -isystem /Users/patrick/gcc/trunk-install/x86_64-apple-darwin10.8.0/sys-include -o conftest -g -O2 -pthread -Wl,-undefined,dynamic_lookup conftest.c >&5
configure:17251: $? = 0
configure:17251: ./conftest
dyld: Symbol not found: _fNotToBeFound
Referenced from: /Users/patrick/gcc/trunk-build/x86_64-apple-darwin10.8.0/libitm/./conftest
Expected in: flat namespace
in /Users/patrick/gcc/trunk-build/x86_64-apple-darwin10.8.0/libitm/./conftest
/Users/patrick/gcc/trunk/libitm/configure: line 1742: 47745 Trace/BPT trap ./conftest$ac_exeext
configure:17251: $? = 133
configure: program exited with status 133
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME "GNU TM Runtime Library"
| #define PACKAGE_TARNAME "libitm"
| #define PACKAGE_VERSION "1.0"
| #define PACKAGE_STRING "GNU TM Runtime Library 1.0"
| #define PACKAGE_BUGREPORT ""
| #define PACKAGE_URL "http://www.gnu.org/software/libitm/";
| #define PACKAGE "libitm"
| #define VERSION "1.0"
| #define STDC_HEADERS 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_SYS_STAT_H 1
| #define HAVE_STDLIB_H 1
| #define HAVE_STRING_H 1
| #define HAVE_MEMORY_H 1
| #define HAVE_STRINGS_H 1
| #define HAVE_INTTYPES_H 1
| #define HAVE_STDINT_H 1
| #define HAVE_UNISTD_H 1
| #define HAVE_DLFCN_H 1
| #define LT_OBJDIR ".libs/"


| #define STDC_HEADERS 1
| #define TIME_WITH_SYS_TIME 1
| #define STRING_WITH_STRINGS 1
| #define HAVE_UNISTD_H 1
| #define HAVE_SEMAPHORE_H 1
| #define HAVE_SYS_TIME_H 1
| #define HAVE_MMAP_FILE 1
| #define HAVE_MMAP_ANON 1
| #define HAVE_STRTOULL 1
| #define HAVE_POSIX_MEMALIGN 1
| #define HAVE_BROKEN_POSIX_SEMAPHORES 1
| #define HAVE_TLS 1
| #define HAVE_ATTRIBUTE_VISIBILITY 1
| #define MANGLE_SIZE_T m
| #define HAVE_SYNC_BUILTINS 1
| #define HAVE_64BIT_SYNC_BUILTINS 1
| /* end confdefs.h.  */
|
| extern void fNotToBeFound(void) __attribute__((weak));
| int main ()
| {
|   if (fNotToBeFound)
|     return 1;
|   else
|     return 0;
| }
|
configure:17261: result: no


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