--- firefox-19.0.2.ebuild 2013-03-24 16:32:21.994600938 +0100 +++ firefox-19.0.2.ebuild.new 2013-03-24 16:26:02.000000000 +0100 @@ -210,9 +210,34 @@ mozconfig_use_enable gstreamer mozconfig_use_enable system-sqlite mozconfig_use_with system-jpeg - # Feature is know to cause problems on hardened - mozconfig_use_enable jit methodjit - mozconfig_use_enable jit tracejit + + # compiler-dependent settings + if [[ $(tc-getCC) =~ clang ]]; then + mozconfig_annotate 'from ebuild, CC=clang detected' --enable-address-sanitizer + mozconfig_annotate 'from ebuild, CC=clang detected' --enable-llvm-hacks + + # --enable-methodjit causes clang build to segfault (see bug #462608) + # --enable-llvm-hacks does not fix it, so make sure it is disabled + mozconfig_annotate 'from ebuild, CC=clang detected' --disable-methodjit + mozconfig_use_enable jit tracejit + else + # Feature is know to cause problems on hardened + mozconfig_use_enable jit methodjit + mozconfig_use_enable jit tracejit + + if [[ $(gcc-major-version) -lt 4 ]]; then + append-cxxflags -fno-stack-protector + elif [[ $(gcc-major-version) -gt 4 || $(gcc-minor-version) -gt 3 ]]; then + if use amd64 || use x86; then + append-flags -mno-avx + fi + fi + fi + + # support EXTRA_ECONF, maybe this should be in mozcoreconf-2.eclass .. + for eeopt in $EXTRA_ECONF; do + mozconfig_annotate 'from ebuild, passed using EXTRA_ECONF' $eeopt + done # Allow for a proper pgo build if use pgo; then @@ -221,14 +246,6 @@ # Finalize and report settings mozconfig_final - - if [[ $(gcc-major-version) -lt 4 ]]; then - append-cxxflags -fno-stack-protector - elif [[ $(gcc-major-version) -gt 4 || $(gcc-minor-version) -gt 3 ]]; then - if use amd64 || use x86; then - append-flags -mno-avx - fi - fi } src_compile() {