Last Comment Bug 685927 - Make stl-wrappers more lenient when compiling ObjC with GCC
: Make stl-wrappers more lenient when compiling ObjC with GCC
Status: RESOLVED FIXED
[iOS] fixed-in-bs
:
Product: Core
Classification: Components
Component: Build Config (show other bugs)
: Trunk
: x86_64 Windows 7
: -- normal (vote)
: mozilla10
Assigned To: Ted Mielczarek [:ted.mielczarek]
:
Mentors:
Depends on:
Blocks: 682873
  Show dependency treegraph
 
Reported: 2011-09-09 10:31 PDT by Ted Mielczarek [:ted.mielczarek]
Modified: 2011-10-28 06:32 PDT (History)
3 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
make stl-wrappers more lenient when compiling ObjC with GCC (1.34 KB, patch)
2011-09-09 10:34 PDT, Ted Mielczarek [:ted.mielczarek]
no flags Details | Diff | Splinter Review
make stl-wrappers more lenient when compiling ObjC with GCC (1.35 KB, patch)
2011-10-10 12:46 PDT, Ted Mielczarek [:ted.mielczarek]
cjones.bugs: review+
Details | Diff | Splinter Review

Description Ted Mielczarek [:ted.mielczarek] 2011-09-09 10:31:19 PDT
Apple's GCC apparently has a bug where it doesn't honor -fno-exceptions when compiling ObjC, so you wind up with __EXCEPTIONS defined no matter what you do. This blows up in our stl wrappers, of course. We don't hit this on desktop OS X because Apple's GCC has a different bug there related to visibility which causes us to not use the stl wrappers at all.

I have a patch that lets us work around this. I think if we move to clang this will all go away.
Comment 1 Ted Mielczarek [:ted.mielczarek] 2011-09-09 10:34:22 PDT
Created attachment 559506 [details] [diff] [review]
make stl-wrappers more lenient when compiling ObjC with GCC

This skips the #error case when we're compiling ObjC with GCC.
Comment 2 Chris Jones [:cjones] inactive; ni?/f?/r? if you need me 2011-09-19 18:52:23 PDT
Sorry for the review latency, but wasn't the guess last time we talked that there was something iOS-specific (either different compiler build or different build flag) triggering this problem?  If so, could we make this workaround contingent on iOS for the time being?
Comment 3 Ted Mielczarek [:ted.mielczarek] 2011-09-20 07:19:55 PDT
I believe it's probably a slightly different GCC (hard to tell with Apple's GCC versioning), since it passes the visibility test. Is it really worth it? We're unlikely to ever get an Apple GCC for x86/x86-64 that passes the test and hits this bug, we're more likely to switch to clang.
Comment 4 Chris Jones [:cjones] inactive; ni?/f?/r? if you need me 2011-09-20 13:32:19 PDT
All I'm suggesting is to add __iOS__ or whatever to the guard here.
Comment 5 Ted Mielczarek [:ted.mielczarek] 2011-10-10 12:46:15 PDT
Created attachment 565996 [details] [diff] [review]
make stl-wrappers more lenient when compiling ObjC with GCC

Okay, this makes it iOS-specific.
Comment 6 Ted Mielczarek [:ted.mielczarek] 2011-10-11 08:13:01 PDT
http://hg.mozilla.org/projects/build-system/rev/31e8fbc4d5f0
Comment 7 Kyle Huey [:khuey] (Exited; not receiving bugmail, email if necessary) 2011-10-28 06:32:11 PDT
https://hg.mozilla.org/mozilla-central/rev/31e8fbc4d5f0

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