toolchain-funcs.eclass: tweak comment
[gentoo.git] / eclass / mozcoreconf-v4.eclass
index 3a43905ff3216b28adf45d575a8a048c602378e1..eef1b5e7da70286d08f1472b19c3b900d62de0ac 100644 (file)
@@ -1,6 +1,5 @@
 # Copyright 1999-2015 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Id$
 #
 # @ECLASS: mozcoreconf-v4.eclass
 # @MAINTAINER:
@@ -97,7 +96,7 @@ moz_pkgsetup() {
        export USE_PTHREADS=1
        export ALDFLAGS=${LDFLAGS}
        # ensure MOZCONFIG is not defined
-       eval unset MOZCONFIG
+       unset MOZCONFIG
 
        # set MOZILLA_FIVE_HOME
        export MOZILLA_FIVE_HOME="/usr/$(get_libdir)/${PN}"
@@ -167,6 +166,8 @@ mozconfig_init() {
                        mozconfig_annotate "from CFLAGS" --enable-optimize=-O0
                elif [[ ${ARCH} == ppc ]] && has_version '>=sys-libs/glibc-2.8'; then
                        mozconfig_annotate "more than -O1 segfaults on ppc with glibc-2.8" --enable-optimize=-O1
+               elif is-flag -O4; then
+                       mozconfig_annotate "from CFLAGS" --enable-optimize=-O4
                elif is-flag -O3; then
                        mozconfig_annotate "from CFLAGS" --enable-optimize=-O3
                elif is-flag -O1; then
@@ -206,8 +207,10 @@ mozconfig_init() {
                ;;
        esac
 
-       # Go a little faster; use less RAM
-       append-flags "$MAKEEDIT_FLAGS"
+       # We need to append flags for gcc-6 support
+       if [[ $(gcc-major-version) -ge 6 ]]; then
+               append-cxxflags -fno-delete-null-pointer-checks -fno-lifetime-dse -fno-schedule-insns2
+       fi
 
        # Use the MOZILLA_FIVE_HOME for the rpath
        append-ldflags -Wl,-rpath="${MOZILLA_FIVE_HOME}",--enable-new-dtags
@@ -225,17 +228,6 @@ mozconfig_init() {
                --disable-strip \
                --disable-install-strip
 
-       # Here is a strange one...
-       if is-flag '-mcpu=ultrasparc*' || is-flag '-mtune=ultrasparc*'; then
-               mozconfig_annotate "building on ultrasparc" --enable-js-ultrasparc
-       fi
-
-       # Currently --enable-elf-dynstr-gc only works for x86,
-       # thanks to Jason Wever <weeve@gentoo.org> for the fix.
-       if use x86 && [[ ${enable_optimize} != -O0 ]]; then
-               mozconfig_annotate "${ARCH} optimized build" --enable-elf-dynstr-gc
-       fi
-
        # jemalloc won't build with older glibc
        ! has_version ">=sys-libs/glibc-2.4" && mozconfig_annotate "we have old glibc" --disable-jemalloc
 }