Bug 1429282 - Explicitly link against a bunch of OSX frameworks we end up linking. r?build draft
authorMike Hommey <mh+mozilla@glandium.org>
Wed, 10 Jan 2018 11:22:10 +0900
changeset 718333 31c40849ebf75c6f334eee4fcbedb4c892c5c38f
parent 718290 e4de69553e3faf8136eb9bb7f2f741e1b7e6f866
child 718337 1ca2651edb2020cce166ffa0f8cd3a58a887b50e
push id94890
push userbmo:mh+mozilla@glandium.org
push dateWed, 10 Jan 2018 04:01:50 +0000
reviewersbuild
bugs1429282
milestone59.0a1
Bug 1429282 - Explicitly link against a bunch of OSX frameworks we end up linking. r?build The OSX linker apparently decides on its own to link against system frameworks. We end up with libxul linked to 6 frameworks that were never given on the command line, and we do use symbols from those. Interestingly, for those frameworks that don't appear on the command line, there is no determinism in how stubs for lazy bindings (equivalent to Linux's PLT, AIUI) are laid out in the binary. But for those that do appear on the command line, the layout is deterministic. So add those frameworks to the command line. With this change, the remaining difference between two builds of the same changeset on try is due to symbol tables for profiling. Stripping those (like we do on beta/release) produces no differences.
old-configure.in
--- a/old-configure.in
+++ b/old-configure.in
@@ -2160,17 +2160,17 @@ dnl = Enable the toolkit as needed      
 dnl ========================================================
 
 case "$MOZ_WIDGET_TOOLKIT" in
 
 cocoa)
     LDFLAGS="$LDFLAGS -framework Cocoa -lobjc"
     # Use -Wl as a trick to avoid -framework and framework names from
     # being separated by AC_SUBST_LIST.
-    TK_LIBS='-Wl,-framework,CoreLocation -Wl,-framework,QuartzCore -Wl,-framework,Carbon -Wl,-framework,CoreAudio -Wl,-framework,AudioToolbox -Wl,-framework,AudioUnit -Wl,-framework,AddressBook -Wl,-framework,OpenGL -Wl,-framework,Security -Wl,-framework,ServiceManagement'
+    TK_LIBS='-Wl,-framework,Foundation -Wl,-framework,CoreFoundation -Wl,-framework,CoreLocation -Wl,-framework,QuartzCore -Wl,-framework,Carbon -Wl,-framework,CoreAudio -Wl,-framework,CoreVideo -Wl,-framework,AudioToolbox -Wl,-framework,AudioUnit -Wl,-framework,AddressBook -Wl,-framework,OpenGL -Wl,-framework,Security -Wl,-framework,ServiceManagement -Wl,-framework,CoreServices -Wl,-framework,ApplicationServices -Wl,-framework,AppKit'
     TK_CFLAGS=""
     CFLAGS="$CFLAGS $TK_CFLAGS"
     CXXFLAGS="$CXXFLAGS $TK_CFLAGS"
     MOZ_USER_DIR="Mozilla"
     MOZ_FS_LAYOUT=bundle
     ;;
 
 uikit)