diff options
author | Douglas Mencken <dougmencken@gmail.com> | 2014-07-07 14:18:12 -0400 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2014-07-11 14:42:57 +0000 |
commit | f4beadc6e28b812237e01e6f8f2c4afcf57bb4d5 (patch) | |
tree | 486875e4a66478db581f37a50fb1a21baef38402 /external/nss | |
parent | 96e3a8821d7738ee29dedf9c0c5b0b6f96fae6c7 (diff) |
avoid -arch for bundled OpenSSL, Python3, and nss/nspr on OSX@PowerPC
this fixes gcc: error: unrecognized command line option '-arch'
The '-arch' option is part of Apple's extensions to GCC, and it is uncompatible
with "vanilla" GCC from FSF. Also, we're not building "universal binaries".
Change-Id: I44e7c72bbb1dd4be5ac9cdbc4f210aaccea513b4
Reviewed-on: https://gerrit.libreoffice.org/10117
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'external/nss')
-rw-r--r-- | external/nss/ExternalProject_nss.mk | 5 | ||||
-rw-r--r-- | external/nss/nss_macosx.patch | 47 |
2 files changed, 36 insertions, 16 deletions
diff --git a/external/nss/ExternalProject_nss.mk b/external/nss/ExternalProject_nss.mk index b7e07f7bb56f..cfda1acd593d 100644 --- a/external/nss/ExternalProject_nss.mk +++ b/external/nss/ExternalProject_nss.mk @@ -59,8 +59,9 @@ else # OS!=WNT $(call gb_ExternalProject_get_state_target,nss,build): $(call gb_ExternalProject_get_state_target,nss,configure) $(call gb_ExternalExecutable_get_dependencies,python) $(call gb_ExternalProject_run,build,\ $(if $(filter FREEBSD LINUX MACOSX,$(OS)),$(if $(filter X86_64,$(CPUNAME)),USE_64=1)) \ - $(if $(filter MACOSX,$(OS)),MACOS_SDK_DIR=$(MACOSX_SDK_PATH) \ - $(if $(filter 1050,$(MAC_OS_X_VERSION_MIN_REQUIRED)),,NSS_USE_SYSTEM_SQLITE=1)) \ + $(if $(filter MACOSX,$(OS)),\ + $(if $(filter-out POWERPC,$(CPUNAME)),MACOS_SDK_DIR=$(MACOSX_SDK_PATH)) \ + $(if $(filter-out 1050,$(MAC_OS_X_VERSION_MIN_REQUIRED)),NSS_USE_SYSTEM_SQLITE=1)) \ $(if $(filter SOLARIS,$(OS)),NS_USE_GCC=1) \ $(if $(CROSS_COMPILING),\ $(if $(filter MACOSXPOWERPC,$(OS)$(CPUNAME)),CPU_ARCH=ppc) \ diff --git a/external/nss/nss_macosx.patch b/external/nss/nss_macosx.patch index 853cd34d4f6b..348d42be6d92 100644 --- a/external/nss/nss_macosx.patch +++ b/external/nss/nss_macosx.patch @@ -1,6 +1,6 @@ ---- a/a/nss/Makefile 2008-12-03 00:24:39.000000000 +0100 -+++ b/b/nss/Makefile 2009-11-27 13:36:22.662753328 +0100 -@@ -104,6 +104,9 @@ +--- a/a/nss/Makefile ++++ b/b/nss/Makefile +@@ -69,6 +69,9 @@ ifeq ($(OS_TARGET),WIN95) NSPR_CONFIGURE_OPTS += --enable-win32-target=WIN95 endif @@ -10,9 +10,33 @@ ifdef USE_DEBUG_RTL NSPR_CONFIGURE_OPTS += --enable-debug-rtl endif +--- a/a/nspr/configure.in ++++ b/b/nspr/configure.in +@@ -1374,7 +1374,9 @@ + ;; + esac + if test "`echo $CC | grep -c '\-arch '`" = "0"; then +- CC="$CC -arch $CPU_ARCH" ++ if test "$CPU_ARCH" != "ppc"; then ++ CC="$CC -arch $CPU_ARCH" ++ fi + fi + AC_CHECK_HEADER(crt_externs.h) + DSO_CFLAGS=-fPIC --- a/a/nspr/configure +++ b/b/nspr/configure -@@ -3888,7 +3889,7 @@ +@@ -3864,7 +3864,9 @@ + ;; + esac + if test "`echo $CC | grep -c '\-arch '`" = "0"; then +- CC="$CC -arch $CPU_ARCH" ++ if test "$CPU_ARCH" != "ppc"; then ++ CC="$CC -arch $CPU_ARCH" ++ fi + fi + ac_safe=`echo "crt_externs.h" | sed 'y%./+-%__p_%'` + echo $ac_n "checking for crt_externs.h""... $ac_c" 1>&6 +@@ -3900,7 +3902,7 @@ fi DSO_CFLAGS=-fPIC @@ -23,7 +47,7 @@ STRIP="$STRIP -x -S" --- a/a/nss/coreconf/Darwin.mk +++ b/b/nss/coreconf/Darwin.mk -@@ -39,8 +39,12 @@ +@@ -7,8 +7,12 @@ DEFAULT_COMPILER = gcc @@ -38,7 +62,7 @@ RANLIB = ranlib ifndef CPU_ARCH -@@ -57,19 +57,25 @@ +@@ -19,11 +23,15 @@ ifeq (,$(filter-out i%86,$(CPU_ARCH))) ifdef USE_64 @@ -54,19 +78,14 @@ override CPU_ARCH = x86 endif else - ifeq (arm,$(CPU_ARCH)) +@@ -31,17 +39,20 @@ # Nothing set for arm currently. else OS_REL_CFLAGS = -Dppc -+ifeq (,$(findstring -arch ,$(CC))) - CC += -arch ppc -+endif +-CC += -arch ppc endif endif -@@ -64,12 +64,16 @@ - endif - ifneq (,$(MACOS_SDK_DIR)) + CLANG_VERSION_FULL := $(shell $(CC) -v 2>&1 | grep "clang version" | sed -e "s/^.*clang version[ ]*//" | awk '{ print $$1 }') GCC_VERSION_FULL := $(shell $(CC) -dumpversion) @@ -82,7 +101,7 @@ # GCC <= 3 DARWIN_SDK_FRAMEWORKS = -F$(MACOS_SDK_DIR)/System/Library/Frameworks ifneq (,$(shell find $(MACOS_SDK_DIR)/Library/Frameworks -maxdepth 0)) -@@ -150,7 +150,7 @@ +@@ -104,7 +115,7 @@ # May override this with different compatibility and current version numbers. DARWIN_DYLIB_VERSIONS = -compatibility_version 1 -current_version 1 # May override this with -bundle to create a loadable module. |