# HG changeset patch # User Hub Figuiere # Date 1321307028 28800 # Node ID 624d6bdf496a582a3ba1324474a5a8a4b0692036 # Parent eb84780783ed7204a54af564e3f226304ba44506 Bug 702997 - Fix nsprpub CPU_ARCH on x86_64. r=ted The configure script for nsprpub sets -arch ppc on darwin if $target_cpu doesn't match i?86. Some 64 bit builds set this to x86_64, causing us to try to build for an unsupported architecture. This resolves the build issue on osx64 described in https://bugzilla.mozilla.org/show_bug.cgi?id=697881#c7 diff --git a/nsprpub/configure b/nsprpub/configure --- a/nsprpub/configure +++ b/nsprpub/configure @@ -3818,16 +3818,19 @@ EOF ;; i*86*) if test -n "$USE_64"; then CPU_ARCH=x86_64 else CPU_ARCH=i386 fi ;; + x86_64*) + CPU_ARCH=x86_64 + ;; *) CPU_ARCH=ppc ;; esac if test "`echo $CC | grep -c '\-arch '`" = "0"; then CC="$CC -arch $CPU_ARCH" fi ac_safe=`echo "crt_externs.h" | sed 'y%./+-%__p_%'` diff --git a/nsprpub/configure.in b/nsprpub/configure.in --- a/nsprpub/configure.in +++ b/nsprpub/configure.in @@ -1353,16 +1353,19 @@ case "$target" in ;; i*86*) if test -n "$USE_64"; then CPU_ARCH=x86_64 else CPU_ARCH=i386 fi ;; + x86_64*) + CPU_ARCH=x86_64 + ;; *) CPU_ARCH=ppc ;; esac if test "`echo $CC | grep -c '\-arch '`" = "0"; then CC="$CC -arch $CPU_ARCH" fi AC_CHECK_HEADER(crt_externs.h) --- mozilla-release/.mozconfig-orig 2011-11-24 07:19:22.000000000 -0500 +++ mozilla-release/.mozconfig 2011-11-24 07:19:51.000000000 -0500 @@ -37,7 +37,7 @@ ac_add_options --with-system-jpeg=@FINKPREFIX@/lib/libjpeg8.2-turbo ac_add_options --disable-system-cairo ac_add_options --enable-system-sqlite -ac_add_options --with-system-nspr -ac_add_options --with-nspr-prefix=@FINKPREFIX@ -ac_add_options --with-system-nss -ac_add_options --with-nss-prefix=@FINKPREFIX@ +#ac_add_options --with-system-nspr +#ac_add_options --with-nspr-prefix=@FINKPREFIX@ +#ac_add_options --with-system-nss +#ac_add_options --with-nss-prefix=@FINKPREFIX@ diff -ruN -U 8 mozilla-release-orig/security/nss/lib/softoken/config.mk mozilla-release/security/nss/lib/softoken/config.mk --- mozilla-release-orig/security/nss/lib/softoken/config.mk 2011-08-11 17:41:33.000000000 -0400 +++ mozilla-release/security/nss/lib/softoken/config.mk 2011-08-16 09:15:05.000000000 -0400 @@ -75,16 +75,17 @@ endif # NS_USE_GCC else # $(PROGRAM) has NO explicit dependencies on $(EXTRA_SHARED_LIBS) # $(EXTRA_SHARED_LIBS) come before $(OS_LIBS), except on AIX. EXTRA_SHARED_LIBS += \ -L$(DIST)/lib \ + -L@FINKPREFIX@/lib \ -l$(SQLITE_LIB_NAME) \ -L$(NSSUTIL_LIB_DIR) \ -lnssutil3 \ -L$(NSPR_LIB_DIR) \ -lplc4 \ -lplds4 \ -lnspr4 \ $(NULL)