diff options
author | Juergen Schmidt <jsc@openoffice.org> | 2009-11-11 07:23:59 +0000 |
---|---|---|
committer | Juergen Schmidt <jsc@openoffice.org> | 2009-11-11 07:23:59 +0000 |
commit | 0dd3bad2aa2b9f097ff43bbcef7895f28c855ca4 (patch) | |
tree | 28093194a2a4d4b6a56579bd78dd137cfd6b5fea /odk | |
parent | b4a2e03a6bf0e88bc2b6326d5fc9bbd93e468fc7 (diff) |
#i106801# check compiler version and options, Mac OS
Diffstat (limited to 'odk')
-rw-r--r-- | odk/settings/settings.mk | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/odk/settings/settings.mk b/odk/settings/settings.mk index 49614d731927..3f84612e48c3 100644 --- a/odk/settings/settings.mk +++ b/odk/settings/settings.mk @@ -398,12 +398,17 @@ JAVA_PROC_TYPE=ppc endif JAVABIN=Commands +GCC_VERSION =$(shell gcc -dumpversion| cut -d"." -f1,2) +ifeq "$(GCC_VERSION)" "4.2" +GCC_ARCH_OPTION=-arch i386 +endif + OS=MACOSX PS=/ ICL=\$$ -CC=gcc -LINK=g++ -LIB=g++ +CC=gcc-$(GCC_VERSION) +LINK=g++-$(GCC_VERSION) +LIB=g++-$(GCC_VERSION) ECHO=@echo MKDIR=mkdir -p CAT=cat @@ -412,8 +417,6 @@ SHAREDLIB_EXT=dylib SHAREDLIB_PRE=lib SHAREDLIB_OUT=$(OUT_LIB) -GCC_VERSION=$(shell $(CC) -dumpversion) - COMID=gcc3 CPPU_ENV=gcc3 @@ -456,9 +459,9 @@ PATH_SEPARATOR=: # -O is necessary for inlining (see gcc documentation) ifeq "$(DEBUG)" "yes" -CC_FLAGS=-malign-natural -c -g -fPIC -fno-common +CC_FLAGS=-malign-natural -c -g -fPIC -fno-common $(GCC_ARCH_OPTION) else -CC_FLAGS=-malign-natural -c -O -fPIC -fno-common +CC_FLAGS=-malign-natural -c -O -fPIC -fno-common $(GCC_ARCH_OPTION) endif SDK_JAVA_INCLUDES = -I/System/Library/Frameworks/JavaVM.framework/Versions/Current/Headers -I/System/Library/Frameworks/JavaVM.framework/Headers @@ -468,13 +471,13 @@ CC_DEFINES=-DUNX -DGCC -DMACOSX -DCPPU_ENV=$(CPPU_ENV) -DGXX_INCLUDE_PATH=$(SDK_ CC_OUTPUT_SWITCH=-o -LIBRARY_LINK_FLAGS=-dynamiclib -single_module -Wl,-multiply_defined,suppress +LIBRARY_LINK_FLAGS=-dynamiclib -single_module -Wl,-multiply_defined,suppress $(GCC_ARCH_OPTION) #-fPIC -fno-common # install_name '@executable_path$/(@:f)' COMP_LINK_FLAGS=$(LIBRARY_LINK_FLAGS) -Wl,-exported_symbols_list $(COMP_MAPFILE) -#EXE_LINK_FLAGS=-Wl,--allow-shlib-undefined -Wl,-export-dynamic -Wl,-z,defs +EXE_LINK_FLAGS=$(GCC_ARCH_OPTION) -Wl,-multiply_defined,suppress LINK_LIBS=-L$(OUT)/lib -L$(OO_SDK_OUT)/$(PLATFORM)/lib -L"$(OO_SDK_URE_LIB_DIR)" LINK_JAVA_LIBS=-framework JavaVM #LINK_JAVA_LIBS=-L"$(OO_SDK_JAVA_HOME)/Libraries" |