Last Comment Bug 715872 - Change the order of -framework options when linking XUL so that it works on 10.6 -> 10.5 builds
: Change the order of -framework options when linking XUL so that it works on 1...
Status: RESOLVED FIXED
:
Product: Core
Classification: Components
Component: Build Config (show other bugs)
: 12 Branch
: x86_64 Linux
: -- normal (vote)
: mozilla12
Assigned To: Rafael Ávila de Espíndola (:espindola) (not reading bugmail)
:
Mentors:
Depends on:
Blocks: 715397
  Show dependency treegraph
 
Reported: 2012-01-06 06:12 PST by Rafael Ávila de Espíndola (:espindola) (not reading bugmail)
Modified: 2012-01-10 11:46 PST (History)
1 user (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
Change the order of -framework options when linking XUL so that it works on 10.6 -> 10.5 builds (935 bytes, patch)
2012-01-06 06:24 PST, Rafael Ávila de Espíndola (:espindola) (not reading bugmail)
ted: review+
Details | Diff | Review

Description Rafael Ávila de Espíndola (:espindola) (not reading bugmail) 2012-01-06 06:12:47 PST

    
Comment 1 Rafael Ávila de Espíndola (:espindola) (not reading bugmail) 2012-01-06 06:24:54 PST
Created attachment 586403 [details] [diff] [review]
Change the order of -framework options when linking XUL so that it works on 10.6 -> 10.5 builds

On the 10.6 SDK and newer, the symbol _SCDynamicStoreCreate is visible in multiple freameworks:

$ nm SystemConfiguration  | grep -w _SCDynamicStoreCreate
0000000000002be7 T _SCDynamicStoreCreate

$ nm IOKit  | grep -w _SCDynamicStoreCreate$
00000000000579cc S $ld$hide$os10.7$_SCDynamicStoreCreate
000000000001ed66 T _SCDynamicStoreCreate

This is not a problem when the linker is run with a deployment target of 10.6, because it does the right thing and uses the symbol from SystemConfiguration.

It is also not a problem when using the 10.5 SDK, since _SCDynamicStoreCreate is only visible in SystemConfiguration in there.

The problem is when using the 10.6 SDK and a deployment target of 10.5. The resulting binary will use _SCDynamicStoreCreate from what is first on the command line. The first framework with _SCDynamicStoreCreate in the XUL link is IOKit, so XUL will find that symbol at runtime only when running on 10.6.

To fix this, we just have to make sure that "-framework SystemConfiguration" comes before "-framework IOKit". That is what this patch does.

https://tbpl.mozilla.org/?tree=Try&rev=bfe15ae3738c
Comment 2 Rafael Ávila de Espíndola (:espindola) (not reading bugmail) 2012-01-10 05:51:48 PST
https://tbpl.mozilla.org/?tree=Mozilla-Inbound&rev=25fe3fddc59e
Comment 3 Ed Morley [:emorley] 2012-01-10 11:46:25 PST
https://hg.mozilla.org/mozilla-central/rev/25fe3fddc59e

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