Bug 1310168 - fix mac builds, r=bustage
authorFranziskus Kiefer <franziskuskiefer@gmail.com>
Fri, 14 Oct 2016 16:32:09 +0200
changeset 12717 ad2a42aed57a01cfc1d8b14fad8c782f52e17093
parent 12716 e0c174ad96f9fb6a2a15a967d7b3b41e11edf2e0
child 12718 0c845c900217050b8ee6e054655ea130d24480a4
push id1667
push userfranziskuskiefer@gmail.com
push dateFri, 14 Oct 2016 14:32:45 +0000
reviewersbustage
bugs1310168
Bug 1310168 - fix mac builds, r=bustage
Makefile
--- a/Makefile
+++ b/Makefile
@@ -86,16 +86,20 @@ ifdef NS_USE_GCC
 NSPR_CONFIGURE_ENV = CC=gcc CXX=g++
 endif
 ifdef CC
 NSPR_CONFIGURE_ENV = CC=$(CC)
 endif
 ifdef CCC
 NSPR_CONFIGURE_ENV += CXX=$(CCC)
 endif
+# Remove -arch definitions. NSPR can't handle that.
+NSPR_CONFIGURE_ENV := $(filter-out -arch x86_64,$(NSPR_CONFIGURE_ENV))
+NSPR_CONFIGURE_ENV := $(filter-out -arch i386,$(NSPR_CONFIGURE_ENV))
+NSPR_CONFIGURE_ENV := $(filter-out -arch ppc,$(NSPR_CONFIGURE_ENV))
 
 ifdef SANITIZER_CFLAGS
 ifdef BUILD_OPT
 NSPR_CONFIGURE_OPTS += --enable-debug-symbols
 endif
 NSPR_CONFIGURE_ENV += CFLAGS='$(SANITIZER_CFLAGS)' \
                       CXXFLAGS='$(SANITIZER_CFLAGS)' \
                       LDFLAGS='$(SANITIZER_LDFLAGS)'