Change test to see whether -fcheck-new must be used on Darwin
This commit is contained in:
parent
e13255de24
commit
53caa9ca78
1 changed files with 5 additions and 3 deletions
|
|
@ -540,8 +540,8 @@ endif
|
||||||
|
|
||||||
# On OSX we try to build fat binaries by default. It is assumed that OSX i386
|
# On OSX we try to build fat binaries by default. It is assumed that OSX i386
|
||||||
# can build for ppc and OSX x86_64 can't. TODO: try to refine this condition.
|
# can build for ppc and OSX x86_64 can't. TODO: try to refine this condition.
|
||||||
# LLVM-clang doesn't support -fcheck-new, therefore this flag is omitted for
|
# LLVM-clang doesn't support -fcheck-new, therefore this flag is only used when
|
||||||
# OSX x86_64.
|
# compiling with g++.
|
||||||
|
|
||||||
|
|
||||||
ifeq ($(system), Darwin)
|
ifeq ($(system), Darwin)
|
||||||
|
|
@ -559,9 +559,11 @@ ifeq ($(system), Darwin)
|
||||||
shared.ldflags = -dynamiclib -undefined dynamic_lookup \
|
shared.ldflags = -dynamiclib -undefined dynamic_lookup \
|
||||||
-install_name @loader_path/$(shared.lib) \
|
-install_name @loader_path/$(shared.lib) \
|
||||||
-compatibility_version 1 -current_version 1.0
|
-compatibility_version 1 -current_version 1.0
|
||||||
|
ifneq ($(filter %g++, $(CXX)),)
|
||||||
|
cxx.flags := -fcheck-new
|
||||||
|
endif
|
||||||
version.flag := $(filter $(cflags), -mmacosx-version-min=%)
|
version.flag := $(filter $(cflags), -mmacosx-version-min=%)
|
||||||
ifeq ($(target.arch), i386)
|
ifeq ($(target.arch), i386)
|
||||||
cxx.flags := -fcheck-new
|
|
||||||
arch := ppc i386 x86_64
|
arch := ppc i386 x86_64
|
||||||
version.flag = -mmacosx-version-min=10.4
|
version.flag = -mmacosx-version-min=10.4
|
||||||
endif
|
endif
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue