8
0
mirror of https://github.com/FirebirdSQL/firebird.git synced 2025-01-22 22:43:03 +01:00

Make the build process compatible with MacOSX 10.6 (Snow Leopard) and gcc 4.2.1

This commit is contained in:
paulbeach 2009-09-09 12:31:53 +00:00
parent c9dd8d3375
commit e765e3af12
5 changed files with 34 additions and 28 deletions

View File

@ -92,7 +92,7 @@ lib_ib_util: $(LIBIBUTIL_SO)
$(LIBIBUTIL_SO): $(UTIL_Objects)
ifeq ($(PLATFORM),DARWIN)
$(CLIENTLIB_LINK) $(LIB_LINK_OPTIONS) $(LIB_LINK_RPATH)$(IbUtilLibraryName) $(LIB_LINK_SONAME) \
$(CLIENTLIB_LINK) $(LIB_LINK_OPTIONS) $(LIB_LINK_DYNAMIC)$(IbUtilLibraryName) $(LIB_LINK_SONAME) \
-o $@ $^ @PTHREAD_CFLAGS@ @PTHREAD_LIBS@
else
$(CLIENTLIB_LINK) $(LIB_LINK_OPTIONS) $(LIB_LINK_SONAME)$(IbUtilLibraryName) \

View File

@ -16,6 +16,20 @@
# Contributor(s): ______________________________________.
# Start of file prefix.darwin: $(VERSION) @PLATFORM@
# 2 Oct 2002, Nickolay Samofatov - Major Cleanup
#
# From MacOSX 10.6 (Snow Leopard), 32bit builds are no longer
# the default. To build 32bit Firebird on MacOSX 10.6 you
# need to do the following.
#
# 1. edit configure.in so that MAKEFILE_PREFIX=darwin_i386
# 2. comment the CPU_TYPE
# 3. edit extern/icu/source/config/mh-darwin and set the right 32bit flags (-m32 -arch i386)
# for CFLAGS, CXXFLAGS & LDFLAGS
# 4. export MACOSX_DEPLOYMENT_TARGET=10.4
# 5. export CFLAGS='-m32 -arch i386'
# 6. export CXXFLAGS='-m32 -arch i386'
# 7. export LDFLAGS='-m32 -arch i386'
DYLD_LIBRARY_PATH=$(FIREBIRD)/lib
export DYLD_LIBRARY_PATH
@ -34,8 +48,8 @@ CLIENT_UTIL_TARGETS=gds_drop gds_relay gstat gsec fbguard fbmgr_bin nbackup fb_l
Physical_IO_Module=os/posix/unix.cpp
PLATFORM_PATH=os/darwin
LINK_OPTS:=
LD_FLAGS+=-isysroot /Developer/SDKs/MacOSX10.4u.sdk
LINK_OPTS:=-m32 -arch i386
LD_FLAGS+= -m32 -arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk
LIB_BUNDLE_OPTIONS:=$(LD_FLAGS) -bundle -flat_namespace -undefined suppress
LIB_LINK_OPTIONS:=$(LD_FLAGS) -dynamiclib -flat_namespace
LIB_LINK_SONAME:=-current_version @FIREBIRD_VERSION@ -compatibility_version @FIREBIRD_VERSION@ -seg1addr 0x30000000
@ -44,7 +58,8 @@ LINK_FIREBIRD_EMBED_SYMBOLS=$(LIB_LINK_MAPFILE)$(ROOT)/builds/posix/firebird.dar
LINK_FIREBIRD_CLIENT_SYMBOLS=$(LIB_LINK_MAPFILE)$(ROOT)/builds/posix/firebird.darwin.client.vers
LINK_FBINTL_SYMBOLS=$(LIB_LINK_MAPFILE)$(ROOT)/builds/posix/fbintl.darwin.vers
LIB_LINK_RPATH:=-install_name /Library/Frameworks/Firebird.framework/Versions/A/Libraries/
LIB_LINK_RPATH:=
LIB_LINK_DYNAMIC:=-install_name /Library/Frameworks/Firebird.framework/Versions/A/Libraries/
LIB_EMBED_LINK_OPTIONS:=-install_name /Library/Frameworks/Firebird.framework/Versions/A/Firebird
LIB_CLIENT_LINK_OPTIONS:=-install_name /Library/Frameworks/Firebird.framework/Versions/A/Firebird
FBEMBED_LINK:=-F../gen/firebird -framework Firebird -L$(LIB) -lfbembed

View File

@ -17,16 +17,6 @@
# Start of file prefix.darwin: $(VERSION) @PLATFORM@
# 2 Oct 2002, Nickolay Samofatov - Major Cleanup
# To use this file to build 64bit version of Firebird for MacOS 10.5 (Leopard)
# 1. edit configure.in so that MAKEFILE_PREFIX=darwin_x86_64
# 2. uncomment the CPU_TYPE
# 3. edit extern/icu/source/config/mh-darwin and set the right 64bit flags (-arch x86_64)
# for CFLAGS, CXXFLAGS & LD_FLAGS
# 4. export MACOSX_DEPLOYMENT_TARGET=10.5
# 5. export CFLAGS='-arch x86_64'
# 6. export CXXFLAGS='-arch x86_64'
# 7. export LDFLAGS='-arch x86_64'
DYLD_LIBRARY_PATH=$(FIREBIRD)/lib
export DYLD_LIBRARY_PATH
@ -44,8 +34,7 @@ CLIENT_UTIL_TARGETS=gds_drop gds_relay gstat gsec fbguard fbmgr_bin nbackup fb_l
Physical_IO_Module=os/posix/unix.cpp
PLATFORM_PATH=os/darwin
LINK_OPTS:=-arch x86_64
LD_FLAGS+=-arch x86_64
LINK_OPTS:=
LIB_BUNDLE_OPTIONS:=$(LD_FLAGS) -bundle -flat_namespace -undefined suppress
LIB_LINK_OPTIONS:=$(LD_FLAGS) -dynamiclib -flat_namespace
LIB_LINK_SONAME:=-current_version @FIREBIRD_VERSION@ -compatibility_version @FIREBIRD_VERSION@ -seg1addr 0x30000000
@ -54,7 +43,8 @@ LINK_FIREBIRD_EMBED_SYMBOLS=$(LIB_LINK_MAPFILE)$(ROOT)/builds/posix/firebird.dar
LINK_FIREBIRD_CLIENT_SYMBOLS=$(LIB_LINK_MAPFILE)$(ROOT)/builds/posix/firebird.darwin.client.vers
LINK_FBINTL_SYMBOLS=$(LIB_LINK_MAPFILE)$(ROOT)/builds/posix/fbintl.darwin.vers
LIB_LINK_RPATH:=-install_name /Library/Frameworks/Firebird.framework/Versions/A/Libraries/
LIB_LINK_RPATH:=
LIB_LINK_DYNAMIC:=-install_name /Library/Frameworks/Firebird.framework/Versions/A/Libraries/
LIB_EMBED_LINK_OPTIONS:=-install_name /Library/Frameworks/Firebird.framework/Versions/A/Firebird
LIB_CLIENT_LINK_OPTIONS:=-install_name /Library/Frameworks/Firebird.framework/Versions/A/Firebird
FBEMBED_LINK:=-F../gen/firebird -framework Firebird -L$(LIB) -lfbembed

View File

@ -53,8 +53,9 @@ dnl Test for realtime library presence?
RT_LIB_CHECK=false
case "$target" in
i686-*-darwin*)
MAKEFILE_PREFIX=darwin_i386
i*86-*-darwin*)
dnl MAKEFILE_PREFIX=darwin_i386
MAKEFILE_PREFIX=darwin_x86_64
MAKEFILE_POSTFIX=darwin
PLATFORM=DARWIN
INSTALL_PREFIX=darwin
@ -64,7 +65,7 @@ case "$target" in
EDITLINE_FLG=Y
SHRLIB_EXT=dylib
ICU_PLATFORM=MacOSX
dnl CPU_TYPE=x86_64
CPU_TYPE=x86_64
;;
powerpc-*-darwin*)

View File

@ -17,20 +17,20 @@ LD_FLAGS += -headerpad_max_install_names
# Set CFLAGS and CXXFLAGS for relevant MacOS architecture
# and backwards compatibility. Set accordingly before building.
# 64 bit Leopard - intel (MacOS 10.5)
#CFLAGS += -arch x86_64 -mmacosx-version-min=10.5
#CXXFLAGS += -arch x86_64 -mmacosx-version-min=10.5
# 64bit intel default
CFLAGS += -mmacosx-version-min=10.5
CXXFLAGS += -mmacosx-version-min=10.5
# 64 bit powerpc
# 64bit powerpc
#CFLAGS += -arch ppc64 -mmacosx-version-min=10.5
#CXXFLAGS += -arch ppc64 -mmacosx-version-min=10.5
# 32bit intel default
# 32bit intel
# DARWIN flag added because of problem with putil.c
CFLAGS += -arch i386 -mmacosx-version-min=10.4 -DDARWIN
CXXFLAGS += -arch i386 -mmacosx-version-min=10.4
#CFLAGS += -m32 -arch i386 -mmacosx-version-min=10.4 -DDARWIN
#CXXFLAGS += -m32 -arch i386 -mmacosx-version-min=10.4
# 32 bit powerpc
# 32bit powerpc
#CFLAGS += -arch ppc -mmacosx-version-min=10.2
#CXXFLAGS += -arch ppc -mmacosx-version-min=10.2