bug 403224 - build config fixes to build spidermonkey with icc. r=bsmedberg

This commit is contained in:
ted.mielczarek@gmail.com 2008-03-18 10:37:00 -07:00
parent 1ac0a66476
commit 64d5240343
4 changed files with 58 additions and 3 deletions

View File

@ -0,0 +1,16 @@
OBJDIR_ICC = $(MOZ_OBJDIR)/js-icc
OBJDIR_X86 = $(MOZ_OBJDIR)/i386
include $(OBJDIR_X86)/config/autoconf.mk
include $(TOPSRCDIR)/config/config.mk
ifdef MOZ_DEBUG
DBGTAG = Debug
else
DBGTAG =
endif
# Just copy the icc-produced libmozjs.dylib over
postflight_all:
echo "Postflight: copying libmozjs.dylib..."
$(INSTALL) $(OBJDIR_ICC)/dist/bin/libmozjs.dylib $(OBJDIR_X86)/dist/$(MOZ_APP_DISPLAYNAME)$(DBGTAG).app/Contents/MacOS/

View File

@ -52,6 +52,7 @@ ac_add_options --with-macos-sdk=/Developer/SDKs/MacOSX10.4u.sdk
# problem, because the variables it affects only need to be set for # problem, because the variables it affects only need to be set for
# configure. # configure.
if test -n "$MOZ_BUILD_APP" ; then if test -n "$MOZ_BUILD_APP" ; then
if test "$MOZ_BUILD_APP" = "i386" -o "$MOZ_BUILD_APP" = "ppc"; then
TARGET_CPU=$MOZ_BUILD_APP TARGET_CPU=$MOZ_BUILD_APP
GCC_VERSION=4.0 GCC_VERSION=4.0
@ -89,3 +90,4 @@ if test -n "$MOZ_BUILD_APP" ; then
# needs to know to look for universal bits when building the .dmg. # needs to know to look for universal bits when building the .dmg.
UNIVERSAL_BINARY=1 UNIVERSAL_BINARY=1
fi fi
fi

View File

@ -343,6 +343,8 @@ GNU_LD = @GNU_LD@
GNU_CC = @GNU_CC@ GNU_CC = @GNU_CC@
GNU_CXX = @GNU_CXX@ GNU_CXX = @GNU_CXX@
HAVE_GCC3_ABI = @HAVE_GCC3_ABI@ HAVE_GCC3_ABI = @HAVE_GCC3_ABI@
INTEL_CC = @INTEL_CC@
INTEL_CXX = @INTEL_CXX@
HOST_CC = @HOST_CC@ HOST_CC = @HOST_CC@
HOST_CXX = @HOST_CXX@ HOST_CXX = @HOST_CXX@

View File

@ -375,6 +375,20 @@ if test "$GNU_CC"; then
fi fi
fi fi
INTEL_CC=
INTEL_CXX=
if test "$GCC" = yes; then
if test "`$CC -help 2>&1 | grep -c 'Intel(R) C Compiler'`" != "0"; then
INTEL_CC=1
fi
fi
if test "$GXX" = yes; then
if test "`$CXX -help 2>&1 | grep -c 'Intel(R) C++ Compiler'`" != "0"; then
INTEL_CXX=1
fi
fi
dnl Special win32 checks dnl Special win32 checks
dnl ======================================================== dnl ========================================================
case "$target" in case "$target" in
@ -610,6 +624,8 @@ AC_SUBST(GNU_AS)
AC_SUBST(GNU_LD) AC_SUBST(GNU_LD)
AC_SUBST(GNU_CC) AC_SUBST(GNU_CC)
AC_SUBST(GNU_CXX) AC_SUBST(GNU_CXX)
AC_SUBST(INTEL_CC)
AC_SUBST(INTEL_CXX)
dnl ======================================================== dnl ========================================================
dnl Checks for programs. dnl Checks for programs.
@ -743,6 +759,7 @@ case "$target" in
if test -n "$_MACOSX_DEPLOYMENT_TARGET" ; then if test -n "$_MACOSX_DEPLOYMENT_TARGET" ; then
dnl Use the specified value dnl Use the specified value
export MACOSX_DEPLOYMENT_TARGET=$_MACOSX_DEPLOYMENT_TARGET export MACOSX_DEPLOYMENT_TARGET=$_MACOSX_DEPLOYMENT_TARGET
AC_DEFINE_UNQUOTED(__ENVIRONMENT_MAC_OS_X_VERION_MIN_REQUIRED__,$_MACOSX_DEPLOYMENT_TARGET)
elif test -z "$MACOSX_DEPLOYMENT_TARGET" ; then elif test -z "$MACOSX_DEPLOYMENT_TARGET" ; then
dnl No value specified on the command line or in the environment, dnl No value specified on the command line or in the environment,
dnl use the lesser of the application's minimum or the architecture's dnl use the lesser of the application's minimum or the architecture's
@ -1275,14 +1292,23 @@ if test "$GNU_CC"; then
# -Wconversion - complained when char's or short's were used a function args # -Wconversion - complained when char's or short's were used a function args
# -Wshadow - removed because it generates more noise than help --pete # -Wshadow - removed because it generates more noise than help --pete
_WARNINGS_CFLAGS="${_WARNINGS_CFLAGS} -Wall -W -Wno-unused -Wpointer-arith" _WARNINGS_CFLAGS="${_WARNINGS_CFLAGS} -Wall -W -Wno-unused -Wpointer-arith"
if test "$CPU_ARCH" != "ia64" && test "$CPU_ARCH" != "sparc"; then if test "$CPU_ARCH" != "ia64" && test "$CPU_ARCH" != "sparc" \
&& test -z "$INTEL_CC"; then
# don't use -Wcast-align on ia64 or sparc, it's noisy on those platforms # don't use -Wcast-align on ia64 or sparc, it's noisy on those platforms
# icc doesn't support this flag.
_WARNINGS_CFLAGS="${_WARNINGS_CFLAGS} -Wcast-align" _WARNINGS_CFLAGS="${_WARNINGS_CFLAGS} -Wcast-align"
fi fi
dnl Turn pedantic on but disable the warnings for long long dnl Turn pedantic on but disable the warnings for long long
_PEDANTIC=1 _PEDANTIC=1
_IGNORE_LONG_LONG_WARNINGS=1
if test -z "$INTEL_CC"; then
_IGNORE_LONG_LONG_WARNINGS=1
_WARNINGS_CFLAGS="${_WARNINGS_CFLAGS} -W"
else
_IGNORE_LONG_LONG_WARNINGS=
fi
_DEFINES_CFLAGS='-include $(DEPTH)/mozilla-config.h -DMOZILLA_CLIENT' _DEFINES_CFLAGS='-include $(DEPTH)/mozilla-config.h -DMOZILLA_CLIENT'
_USE_CPP_INCLUDE_FLAG=1 _USE_CPP_INCLUDE_FLAG=1
@ -1306,8 +1332,10 @@ if test "$GNU_CXX"; then
CXXFLAGS="$CXXFLAGS -fno-strict-aliasing" CXXFLAGS="$CXXFLAGS -fno-strict-aliasing"
# Turn on GNU specific features # Turn on GNU specific features
_WARNINGS_CXXFLAGS="${_WARNINGS_CXXFLAGS} -Wall -Wconversion -Wpointer-arith -Woverloaded-virtual -Wsynth -Wno-ctor-dtor-privacy -Wno-non-virtual-dtor" _WARNINGS_CXXFLAGS="${_WARNINGS_CXXFLAGS} -Wall -Wconversion -Wpointer-arith -Woverloaded-virtual -Wsynth -Wno-ctor-dtor-privacy -Wno-non-virtual-dtor"
if test "$CPU_ARCH" != "ia64" && test "$CPU_ARCH" != "sparc"; then if test "$CPU_ARCH" != "ia64" && test "$CPU_ARCH" != "sparc" \
&& test -z "$INTEL_CC"; then
# don't use -Wcast-align on ia64 or sparc, it's noisy on those platforms # don't use -Wcast-align on ia64 or sparc, it's noisy on those platforms
# icc doesn't support this flag.
_WARNINGS_CXXFLAGS="${_WARNINGS_CXXFLAGS} -Wcast-align" _WARNINGS_CXXFLAGS="${_WARNINGS_CXXFLAGS} -Wcast-align"
fi fi
@ -6639,6 +6667,13 @@ fi
CFLAGS="$_SAVE_CFLAGS" CFLAGS="$_SAVE_CFLAGS"
if test -n $INTEL_CC; then
PROFILE_GEN_CFLAGS="-prof-gen -prof-dir ."
PROFILE_GEN_LDFLAGS=
PROFILE_USE_CFLAGS="-prof-use -prof-dir ."
PROFILE_USE_LDFLAGS=
fi
AC_SUBST(PROFILE_GEN_CFLAGS) AC_SUBST(PROFILE_GEN_CFLAGS)
AC_SUBST(PROFILE_GEN_LDFLAGS) AC_SUBST(PROFILE_GEN_LDFLAGS)
AC_SUBST(PROFILE_USE_CFLAGS) AC_SUBST(PROFILE_USE_CFLAGS)