Lines 38-44
Link Here
|
38 |
KEYWORDS="~alpha ~amd64 ~arm ~ia64 ~ppc ~ppc64 ~x86 ~amd64-linux ~x86-linux" |
38 |
KEYWORDS="~alpha ~amd64 ~arm ~ia64 ~ppc ~ppc64 ~x86 ~amd64-linux ~x86-linux" |
39 |
SLOT="0" |
39 |
SLOT="0" |
40 |
LICENSE="MPL-2.0 GPL-2 LGPL-2.1" |
40 |
LICENSE="MPL-2.0 GPL-2 LGPL-2.1" |
41 |
IUSE="bindist gstreamer +jit +minimal pgo selinux system-jpeg system-sqlite" |
41 |
IUSE="address-sanitizer bindist gstreamer +jit +minimal pgo selinux system-jpeg system-sqlite" |
42 |
|
42 |
|
43 |
# More URIs appended below... |
43 |
# More URIs appended below... |
44 |
SRC_URI="${SRC_URI} |
44 |
SRC_URI="${SRC_URI} |
Lines 213-222
Link Here
|
213 |
mozconfig_use_enable gstreamer |
213 |
mozconfig_use_enable gstreamer |
214 |
mozconfig_use_enable system-sqlite |
214 |
mozconfig_use_enable system-sqlite |
215 |
mozconfig_use_with system-jpeg |
215 |
mozconfig_use_with system-jpeg |
|
|
216 |
|
216 |
# Feature is know to cause problems on hardened |
217 |
# Feature is know to cause problems on hardened |
217 |
mozconfig_use_enable jit methodjit |
218 |
mozconfig_use_enable jit methodjit |
218 |
mozconfig_use_enable jit tracejit |
219 |
mozconfig_use_enable jit tracejit |
219 |
|
220 |
|
|
|
221 |
# compiler-dependent settings |
222 |
if [[ $(tc-getCC) =~ clang ]]; then |
223 |
mozconfig_annotate 'from ebuild, CC=clang detected' --enable-llvm-hacks |
224 |
|
225 |
# methodjit causes clang builds to segfault on x86_64 (see bug #462608) |
226 |
if use amd64; then |
227 |
sed -e '/javascript.options.methodjit/ s/true/false/' \ |
228 |
-i "${S}"/modules/libpref/src/init/all.js |
229 |
fi |
230 |
|
231 |
# https://developer.mozilla.org/en-US/docs/Building_Firefox_with_Address_Sanitizer |
232 |
if use address-sanitizer; then |
233 |
echo "export MOZ_JEMALLOC=0" >> ${S}/.mozconfig |
234 |
mozconfig_annotate '+address-sanitizer' --disable-crash-reporter |
235 |
mozconfig_annotate '+address-sanitizer' --disable-elf-hack |
236 |
mozconfig_annotate '+address-sanitizer' --disable-jemalloc |
237 |
mozconfig_annotate '+address-sanitizer' --disable-replace-malloc |
238 |
|
239 |
echo "export MOZ_DEBUG_SYMBOLS=1" >> ${S}/.mozconfig |
240 |
mozconfig_use_enable address-sanitizer debug-symbols |
241 |
mozconfig_use_enable address-sanitizer |
242 |
append-flags "-fsanitize=address" |
243 |
append-flags "-Dxmalloc=myxmalloc" |
244 |
fi |
245 |
else |
246 |
use address-sanitizer && die "Use flag address-sanitizer can only be \ |
247 |
enabled if CC=clang is set. You're using a different compiler." |
248 |
|
249 |
if [[ $(gcc-major-version) -lt 4 ]]; then |
250 |
append-cxxflags -fno-stack-protector |
251 |
elif [[ $(gcc-major-version) -gt 4 || $(gcc-minor-version) -gt 3 ]]; then |
252 |
if use amd64 || use x86; then |
253 |
append-flags -mno-avx |
254 |
fi |
255 |
fi |
256 |
fi |
257 |
|
258 |
# support EXTRA_ECONF, maybe this should be in mozcoreconf-2.eclass .. |
259 |
for eeopt in $EXTRA_ECONF; do |
260 |
mozconfig_annotate 'from ebuild, passed using EXTRA_ECONF' $eeopt |
261 |
done |
262 |
|
220 |
# Allow for a proper pgo build |
263 |
# Allow for a proper pgo build |
221 |
if use pgo; then |
264 |
if use pgo; then |
222 |
echo "mk_add_options PROFILE_GEN_SCRIPT='\$(PYTHON) \$(OBJDIR)/_profile/pgo/profileserver.py'" >> "${S}"/.mozconfig |
265 |
echo "mk_add_options PROFILE_GEN_SCRIPT='\$(PYTHON) \$(OBJDIR)/_profile/pgo/profileserver.py'" >> "${S}"/.mozconfig |
Lines 224-237
Link Here
|
224 |
|
267 |
|
225 |
# Finalize and report settings |
268 |
# Finalize and report settings |
226 |
mozconfig_final |
269 |
mozconfig_final |
227 |
|
|
|
228 |
if [[ $(gcc-major-version) -lt 4 ]]; then |
229 |
append-cxxflags -fno-stack-protector |
230 |
elif [[ $(gcc-major-version) -gt 4 || $(gcc-minor-version) -gt 3 ]]; then |
231 |
if use amd64 || use x86; then |
232 |
append-flags -mno-avx |
233 |
fi |
234 |
fi |
235 |
} |
270 |
} |
236 |
|
271 |
|
237 |
src_compile() { |
272 |
src_compile() { |