Last Comment Bug 788270 - Fix TLS detection with clang on OpenBSD (port bug 778414)
: Fix TLS detection with clang on OpenBSD (port bug 778414)
Status: RESOLVED FIXED
:
Product: MailNews Core
Classification: Components
Component: Build Config (show other bugs)
: unspecified
: x86 OpenBSD
: -- normal (vote)
: Thunderbird 18.0
Assigned To: Landry Breuil (:gaston)
:
:
Mentors:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-09-04 13:54 PDT by Landry Breuil (:gaston)
Modified: 2012-11-29 02:13 PST (History)
1 user (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---


Attachments
OpenBSD doesn't support TLS yet (1.02 KB, patch)
2012-09-04 14:00 PDT, Landry Breuil (:gaston)
standard8: review+
Details | Diff | Splinter Review

Description Landry Breuil (:gaston) 2012-09-04 13:54:48 PDT
Atm configuring c-c with clang on OpenBSD wrongly thinks openbsd supports TLS, while it doesn't (see https://bugzilla.mozilla.org/show_bug.cgi?id=778414#c0).

$grep HAVE_THREAD_TLS_KEYWORD /usr/obj/c-c/* 
/usr/obj/c-c/comm-config.h:#define HAVE_THREAD_TLS_KEYWORD 1

It builds but fails linking libxul.so :

../../../mailnews/imap/src/nsSyncRunnableHelpers.o(.text._ZN12_GLOBAL__N_120DispatchSyncRunnableEPNS_16SyncRunnableBaseE+0xa): In function `(anonymous namespace)::Dispatc
hSyncRunnable((anonymous namespace)::SyncRunnableBase*)':
../../../mozilla/dist/include/nsAtomicRefcnt.h:46: undefined reference to `gTLSThreadID'
../../../mailnews/addrbook/src/nsAbManager.o(.text._ZN11nsAbManager4InitEv+0x10): In function `nsAbManager::Init()':
../../../mozilla/dist/include/mozilla/HashFunctions.h:65: undefined reference to `gTLSThreadID'
../../../ldap/xpcom/src/nsLDAPSyncQuery.o(.text._ZN15nsLDAPSyncQuery14InitConnectionEv+0x1a): In function `nsLDAPSyncQuery::InitConnection()':
/home/landry/src/comm-central/ldap/xpcom/src/nsLDAPSyncQuery.cpp:163: undefined reference to `gTLSThreadID'
^N/usr/bin/ld: libxul.so.1.0: hidden symbol `gTLSThreadID' isn't defined
clang-3: error: linker command failed with exit code 1 (use -v to see invocation)

We should port the configure.in chunk of https://bug778414.bugzilla.mozilla.org/attachment.cgi?id=646831 to c-c to fix that.
Comment 1 Landry Breuil (:gaston) 2012-09-04 14:00:17 PDT
Created attachment 658219 [details] [diff] [review]
OpenBSD doesn't support TLS yet
Comment 2 Mark Banner (:standard8, limited time in Dec) 2012-09-24 09:36:14 PDT
Comment on attachment 658219 [details] [diff] [review]
OpenBSD doesn't support TLS yet

Sorry for the delay. r=me
Comment 3 Landry Breuil (:gaston) 2012-09-24 09:48:17 PDT
https://hg.mozilla.org/comm-central/rev/c3caa58362dc

Note You need to log in before you can comment on or make changes to this bug.