mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-05 20:20:07 +00:00
Fix build problem on OS X Mountain Lion (10.8)
For about forever, our build flags for OS X have been slightly off, but good enough to build and run. Apparently they aren't good enough any more. Previously, we would compile with macosx-version-min unset and link with it set. This combination, using GCC 4.8, on Mountain Lion, would create a bad executable ("Illegal Instruction: 4", or something like that) This patch consistently sets macosx-version-min for both compiling and linking, which makes everything happy enough to build and run. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@392279 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
4
Makefile
4
Makefile
@@ -251,8 +251,8 @@ MOD_SUBDIRS_EMBED_LIBS:=$(MOD_SUBDIRS:%=%-embed-libs)
|
|||||||
MOD_SUBDIRS_MENUSELECT_TREE:=$(MOD_SUBDIRS:%=%-menuselect-tree)
|
MOD_SUBDIRS_MENUSELECT_TREE:=$(MOD_SUBDIRS:%=%-menuselect-tree)
|
||||||
|
|
||||||
ifneq ($(findstring darwin,$(OSARCH)),)
|
ifneq ($(findstring darwin,$(OSARCH)),)
|
||||||
_ASTCFLAGS+=-D__Darwin__
|
_ASTCFLAGS+=-D__Darwin__ -mmacosx-version-min=10.6
|
||||||
_SOLINK=-Xlinker -macosx_version_min -Xlinker 10.6 -Xlinker -undefined -Xlinker dynamic_lookup
|
_SOLINK=-mmacosx-version-min=10.6 -Xlinker -undefined -Xlinker dynamic_lookup
|
||||||
_SOLINK+=/usr/lib/bundle1.o
|
_SOLINK+=/usr/lib/bundle1.o
|
||||||
SOLINK=-bundle $(_SOLINK)
|
SOLINK=-bundle $(_SOLINK)
|
||||||
DYLINK=-Xlinker -dylib $(_SOLINK)
|
DYLINK=-Xlinker -dylib $(_SOLINK)
|
||||||
|
@@ -56,7 +56,7 @@ endif
|
|||||||
|
|
||||||
ifneq ($(findstring darwin,$(OSARCH)),)
|
ifneq ($(findstring darwin,$(OSARCH)),)
|
||||||
AST_LIBS+=-lresolv
|
AST_LIBS+=-lresolv
|
||||||
ASTLINK=-Xlinker -macosx_version_min -Xlinker 10.6 -Xlinker -undefined -Xlinker dynamic_lookup -force_flat_namespace
|
ASTLINK=-mmacosx-version-min=10.6 -Xlinker -undefined -Xlinker dynamic_lookup -force_flat_namespace
|
||||||
ASTLINK+=/usr/lib/bundle1.o
|
ASTLINK+=/usr/lib/bundle1.o
|
||||||
else
|
else
|
||||||
# These are used for all but Darwin
|
# These are used for all but Darwin
|
||||||
|
Reference in New Issue
Block a user