mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 464127 - Don't use -Os with Intel C/C++ compilers r=ted.mielczarek
Intel recommends against the use of -Os, and using it seems to produce incorrect code in many recent versions of Intel's compilers. js/src/Makefile.in tries to use -Os only with G++, but it tests INTEL_CC, not INTEL_CXX --- even though almost all the sources are C++. Check INTEL_CXX instead.
This commit is contained in:
parent
26611f0fb3
commit
2798283907
21
configure.in
21
configure.in
@ -1824,22 +1824,29 @@ case "$target" in
|
||||
;;
|
||||
|
||||
*-*linux*)
|
||||
if test "$GNU_CC"; then
|
||||
# Note: both GNU_CC and INTEL_CC are set when using Intel's C compiler.
|
||||
# Similarly for GNU_CXX and INTEL_CXX.
|
||||
if test "$INTEL_CC" || test "$INTEL_CXX"; then
|
||||
# -Os has been broken on Intel's C/C++ compilers for quite a
|
||||
# while; Intel recommends against using it.
|
||||
MOZ_OPTIMIZE_FLAGS="-O2"
|
||||
MOZ_DEBUG_FLAGS="-g -fno-inline"
|
||||
elif test "$GNU_CC" || test "$GNU_CXX"; then
|
||||
GCC_VERSION=`$CC -v 2>&1 | awk '/^gcc version/ { print $3 }'`
|
||||
case $GCC_VERSION in
|
||||
4.1.*|4.2.*)
|
||||
# -Os is broken on gcc 4.1.x and 4.2.x, we need to tweak it to get good results.
|
||||
MOZ_OPTIMIZE_SIZE_TWEAK="-finline-limit=50"
|
||||
esac
|
||||
MOZ_OPTIMIZE_FLAGS="-Os -freorder-blocks -fno-reorder-functions $MOZ_OPTIMIZE_SIZE_TWEAK"
|
||||
MOZ_DEBUG_FLAGS="-g -fno-inline" # most people on linux use gcc/gdb,
|
||||
# and that combo is not yet good at
|
||||
# debugging inlined functions (even
|
||||
# when using DWARF2 as the debugging
|
||||
# format)
|
||||
fi
|
||||
|
||||
TARGET_NSPR_MDCPUCFG='\"md/_linux.cfg\"'
|
||||
MOZ_OPTIMIZE_FLAGS="-Os -freorder-blocks -fno-reorder-functions $MOZ_OPTIMIZE_SIZE_TWEAK"
|
||||
MOZ_DEBUG_FLAGS="-g -fno-inline" # most people on linux use gcc/gdb,
|
||||
# and that combo is not yet good at
|
||||
# debugging inlined functions (even
|
||||
# when using DWARF2 as the debugging
|
||||
# format)
|
||||
|
||||
MOZ_MEMORY=1
|
||||
|
||||
|
@ -56,8 +56,8 @@ PROGRAM = js$(BIN_SUFFIX)
|
||||
PROGOBJS = js.$(OBJ_SUFFIX) $(OBJS)
|
||||
LIBS = $(NSPR_LIBS)
|
||||
|
||||
ifdef GNU_CC
|
||||
ifdef INTEL_CC
|
||||
ifdef GNU_CXX
|
||||
ifdef INTEL_CXX
|
||||
# icc gets special optimize flags
|
||||
ifdef MOZ_PROFILE_GENERATE
|
||||
MODULE_OPTIMIZE_FLAGS = -O0
|
||||
@ -65,12 +65,12 @@ else
|
||||
MODULE_OPTIMIZE_FLAGS = -O2 -ip
|
||||
#XXX: do we want different INTERP_OPTIMIZER flags here?
|
||||
endif
|
||||
else
|
||||
else # not INTEL_CXX
|
||||
MODULE_OPTIMIZE_FLAGS = -Os -fstrict-aliasing $(MOZ_OPTIMIZE_SIZE_TWEAK)
|
||||
# Special optimization flags for jsinterp.c
|
||||
INTERP_OPTIMIZER = -O3 -fstrict-aliasing
|
||||
endif
|
||||
else
|
||||
else # not GNU_CXX
|
||||
ifeq ($(OS_ARCH),SunOS)
|
||||
MODULE_OPTIMIZE_FLAGS = -xO4
|
||||
endif
|
||||
|
@ -1775,23 +1775,28 @@ case "$target" in
|
||||
;;
|
||||
|
||||
*-*linux*)
|
||||
if test "$GNU_CC"; then
|
||||
GCC_VERSION=`$CC -v 2>&1 | awk '/^gcc version/ { print $3 }'`
|
||||
# Note: both GNU_CXX and INTEL_CXX are set when using Intel's C compiler.
|
||||
if test "$INTEL_CXX"; then
|
||||
# -Os has been broken on Intel's C/C++ compilers for quite a
|
||||
# while; Intel recommends against using it.
|
||||
MOZ_OPTIMIZE_FLAGS="-O2"
|
||||
MOZ_DEBUG_FLAGS="-g -fno-inline"
|
||||
elif test "$GNU_CXX"; then
|
||||
GCC_VERSION=`$CXX -v 2>&1 | awk '/^gcc version/ { print $3 }'`
|
||||
case $GCC_VERSION in
|
||||
4.1.*|4.2.*)
|
||||
# -Os is broken on gcc 4.1.x and 4.2.x, we need to tweak it to get good results.
|
||||
MOZ_OPTIMIZE_SIZE_TWEAK="-finline-limit=50"
|
||||
esac
|
||||
MOZ_OPTIMIZE_FLAGS="-Os -freorder-blocks -fno-reorder-functions $MOZ_OPTIMIZE_SIZE_TWEAK"
|
||||
MOZ_DEBUG_FLAGS="-g -fno-inline" # most people on linux use gcc/gdb,
|
||||
# and that combo is not yet good at
|
||||
# debugging inlined functions (even
|
||||
# when using DWARF2 as the debugging
|
||||
# format)
|
||||
fi
|
||||
|
||||
TARGET_NSPR_MDCPUCFG='\"md/_linux.cfg\"'
|
||||
MOZ_OPTIMIZE_FLAGS="-Os -freorder-blocks -fno-reorder-functions $MOZ_OPTIMIZE_SIZE_TWEAK"
|
||||
MOZ_DEBUG_FLAGS="-g -fno-inline" # most people on linux use gcc/gdb,
|
||||
# and that combo is not yet good at
|
||||
# debugging inlined functions (even
|
||||
# when using DWARF2 as the debugging
|
||||
# format)
|
||||
|
||||
|
||||
case "${target_cpu}" in
|
||||
alpha*)
|
||||
|
Loading…
Reference in New Issue
Block a user