Ticket #4053: GCC6.5.patch

File GCC6.5.patch, 2.0 KB (added by Itms, 8 years ago)
  • libraries/source/spidermonkey/build.sh

     
    2929
    3030CONF_OPTS="--enable-shared-js --disable-tests --without-intl-api"
    3131
     32# Bug 1269319
     33# When compiled with GCC 6 (or later), SpiderMonkey 38 (and versions up to 49) is
     34# subject to segfaults. Disabling a few optimizations fixes that.
     35# See also #4053
     36if [ "${OS}" != "Windows_NT" -a "`${CXX:=g++} -dumpversion | cut -f1 -d.`" -ge "6" ]
     37then
     38  CXXFLAGS="${CXXFLAGS} -fno-schedule-insns2 -fno-delete-null-pointer-checks"
     39fi
     40
    3241# Change the default location where the tracelogger should store its output.
    3342# The default location is . on Windows and /tmp/ on *nix.
    3443TLCXXFLAGS='-DTRACE_LOG_DIR="\"../../source/tools/tracelogger/\""'
     
    91100perl -i.bak -pe 's/(SHARED_LIBRARY_NAME\s+=).*/$1 '\''mozjs38-ps-debug'\''/' moz.build
    92101mkdir -p build-debug
    93102cd build-debug
    94 CXXFLAGS="${TLCXXFLAGS}" ../configure ${CONF_OPTS} --with-nspr-libs="$NSPR_LIBS" --with-nspr-cflags="$NSPR_INCLUDES" --enable-debug --disable-optimize --enable-js-diagnostics --enable-gczeal
     103CXXFLAGS="${CXXFLAGS} ${TLCXXFLAGS}" ../configure ${CONF_OPTS} --with-nspr-libs="$NSPR_LIBS" --with-nspr-cflags="$NSPR_INCLUDES" --enable-debug --disable-optimize --enable-js-diagnostics --enable-gczeal
    95104${MAKE} ${MAKE_OPTS}
    96105cd ..
    97106
     
    98107perl -i.bak -pe 's/(SHARED_LIBRARY_NAME\s+=).*/$1 '\''mozjs38-ps-release'\''/' moz.build
    99108mkdir -p build-release
    100109cd build-release
    101 CXXFLAGS="${TLCXXFLAGS}" ../configure ${CONF_OPTS} --with-nspr-libs="$NSPR_LIBS" --with-nspr-cflags="$NSPR_INCLUDES" --enable-optimize  # --enable-gczeal --enable-debug-symbols
     110CXXFLAGS="${CXXFLAGS} ${TLCXXFLAGS}" ../configure ${CONF_OPTS} --with-nspr-libs="$NSPR_LIBS" --with-nspr-cflags="$NSPR_INCLUDES" --enable-optimize  # --enable-gczeal --enable-debug-symbols
    102111${MAKE} ${MAKE_OPTS}
    103112cd ..
    104113