Author: jbeich
Date: Fri Feb  8 17:53:29 2013
New Revision: 1162

Log:
try to reduce total build time (here be dragons)

Suggested by:    flo

Modified:
   trunk/Mk/bsd.gecko.mk
   trunk/mail/thunderbird/Makefile
   trunk/www/firefox-nightly/Makefile
   trunk/www/firefox/Makefile
   trunk/www/seamonkey/Makefile

Modified: trunk/Mk/bsd.gecko.mk
==============================================================================
--- trunk/Mk/bsd.gecko.mk       Fri Feb  8 17:53:18 2013        (r1161)
+++ trunk/Mk/bsd.gecko.mk       Fri Feb  8 17:53:29 2013        (r1162)
@@ -551,6 +551,24 @@
 LDFLAGS+=              -Wl,-rpath,${PREFIX}/lib/${MOZ_RPATH}
 .endif
 
+.if ${MOZILLA_VER:R:R} >= 19 || ${MOZILLA:Mseamonkey*}
+# try clang on x86
+. if ${ARCH} == amd64 || ${ARCH} == i386
+.  if ${CC} == "cc" && (exists(/usr/bin/clang) || \
+   exists(${LOCALBASE}/bin/clang))
+CC=                            clang
+.  endif
+.  if ${CXX} == "c++" && (exists(/usr/bin/clang++) || \
+   exists(${LOCALBASE}/bin/clang++))
+CXX=                   clang++
+.  endif
+. endif
+# fallback to gcc otherwise
+. if ${CC} == "cc" || ${CXX} == "c++"
+USE_GCC?=              yes
+. endif
+.endif
+
 .if ${MOZILLA_VER:R:R} >= 16 || exists(${.CURDIR}/files/patch-bug788955)
 .if ${OSVERSION} > 1000011
 # use jemalloc 3.0.0 API in libc
@@ -912,6 +930,10 @@
                ${MOZSRC}/toolkit/xre/nsXREDirProvider.cpp
        @${GREP} -lr 'PR_LoadLibrary.*\.so\.[0-9]' ${WRKSRC} | ${XARGS} \
                ${REINPLACE_CMD} -Ee '/PR_LoadLibrary/s/(\.so)\.[0-9]+/\1/'
+.if ${CXX} == "clang++" && ${OSVERSION} < 900506
+       @${GREP} -Flr -- '-mss' ${WRKSRC} | ${XARGS} \
+               ${REINPLACE_CMD} -e 's/-mss/-mmmx &/'
+.endif
 .if ${MOZILLA} != "kompozer"
        @${REINPLACE_CMD} -e 's|%%LOCALBASE%%|${LOCALBASE}|g' \
                ${MOZSRC}/extensions/spellcheck/hunspell/src/mozHunspell.cpp

Modified: trunk/mail/thunderbird/Makefile
==============================================================================
--- trunk/mail/thunderbird/Makefile     Fri Feb  8 17:53:18 2013        (r1161)
+++ trunk/mail/thunderbird/Makefile     Fri Feb  8 17:53:29 2013        (r1162)
@@ -64,10 +64,6 @@
 
 XPI_LIBDIR=    ${PREFIX}/lib/xpi
 
-.if defined(WITHOUT_CLANG_IS_CC) || ${CXX:Mc++} && ${OSVERSION} < 1000024
-USE_GCC?=      4.7+
-.endif
-
 .if ${ARCH} == amd64
 CONFIGURE_TARGET=x86_64-portbld-freebsd${OSREL}
 .elif ${ARCH} == powerpc64

Modified: trunk/www/firefox-nightly/Makefile
==============================================================================
--- trunk/www/firefox-nightly/Makefile  Fri Feb  8 17:53:18 2013        (r1161)
+++ trunk/www/firefox-nightly/Makefile  Fri Feb  8 17:53:29 2013        (r1162)
@@ -58,10 +58,6 @@
 
 WRKSRC:=       ${WRKSRC}-central-${HGREV:C/.*://}
 
-.if defined(WITHOUT_CLANG_IS_CC) || ${CXX:Mc++} && ${OSVERSION} < 1000024
-USE_GCC?=      4.7+
-.endif
-
 .if ${ARCH} == amd64
 CONFIGURE_TARGET=x86_64-portbld-freebsd${OSREL}
 .elif ${ARCH} == powerpc64

Modified: trunk/www/firefox/Makefile
==============================================================================
--- trunk/www/firefox/Makefile  Fri Feb  8 17:53:18 2013        (r1161)
+++ trunk/www/firefox/Makefile  Fri Feb  8 17:53:29 2013        (r1162)
@@ -56,10 +56,6 @@
 
 WRKSRC:=       ${WRKDIR}/mozilla-beta
 
-.if defined(WITHOUT_CLANG_IS_CC) || ${CXX:Mc++} && ${OSVERSION} < 1000024
-USE_GCC?=      4.7+
-.endif
-
 .if ${ARCH} == amd64
 CONFIGURE_TARGET=x86_64-portbld-freebsd${OSREL}
 .elif ${ARCH} == powerpc64

Modified: trunk/www/seamonkey/Makefile
==============================================================================
--- trunk/www/seamonkey/Makefile        Fri Feb  8 17:53:18 2013        (r1161)
+++ trunk/www/seamonkey/Makefile        Fri Feb  8 17:53:29 2013        (r1162)
@@ -72,10 +72,6 @@
 
 XPI_LIBDIR=    ${PREFIX}/lib/xpi
 
-.if defined(WITHOUT_CLANG_IS_CC) || ${CXX:Mc++} && ${OSVERSION} < 1000024
-USE_GCC?=      4.7+
-.endif
-
 .if ${ARCH} == amd64
 CONFIGURE_TARGET=x86_64-portbld-freebsd${OSREL}
 .elif ${ARCH} == powerpc64
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-gecko
To unsubscribe, send any mail to "[email protected]"

Reply via email to