# Copyright 1999-2015 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Id$
#
# @ECLASS: mozcoreconf-v4.eclass
# @MAINTAINER:
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}"
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
;;
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
--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
}