Lines 39-45
Link Here
|
39 |
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~x86 ~amd64-linux ~x86-linux" |
39 |
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~x86 ~amd64-linux ~x86-linux" |
40 |
SLOT="0" |
40 |
SLOT="0" |
41 |
LICENSE="MPL-2.0 GPL-2 LGPL-2.1" |
41 |
LICENSE="MPL-2.0 GPL-2 LGPL-2.1" |
42 |
IUSE="bindist gstreamer +jit +minimal pgo pulseaudio selinux system-cairo system-jpeg system-sqlite" |
42 |
IUSE="address-sanitizer bindist gstreamer +jit +minimal pgo pulseaudio selinux system-cairo system-jpeg system-sqlite" |
43 |
|
43 |
|
44 |
# More URIs appended below... |
44 |
# More URIs appended below... |
45 |
SRC_URI="${SRC_URI} |
45 |
SRC_URI="${SRC_URI} |
Lines 238-243
Link Here
|
238 |
mozconfig_use_enable jit ion |
238 |
mozconfig_use_enable jit ion |
239 |
mozconfig_use_enable system-cairo |
239 |
mozconfig_use_enable system-cairo |
240 |
|
240 |
|
|
|
241 |
# compiler-dependent settings |
242 |
if [[ $(tc-getCC) =~ clang ]]; then |
243 |
mozconfig_annotate 'from ebuild, CC=clang detected' --enable-llvm-hacks |
244 |
|
245 |
# methodjit causes clang builds to segfault on x86_64 (see bug #462608) |
246 |
# same for ion code.. |
247 |
if use amd64; then |
248 |
sed -e '/javascript.options.methodjit/ s/true/false/' \ |
249 |
-e '/javascript.options.ion/ s/true/false/' \ |
250 |
-i "${S}"/modules/libpref/src/init/all.js |
251 |
fi |
252 |
|
253 |
# https://developer.mozilla.org/en-US/docs/Building_Firefox_with_Address_Sanitizer |
254 |
if use address-sanitizer; then |
255 |
echo "export MOZ_JEMALLOC=0" >> ${S}/.mozconfig |
256 |
mozconfig_annotate '+address-sanitizer' --disable-crash-reporter |
257 |
mozconfig_annotate '+address-sanitizer' --disable-elf-hack |
258 |
mozconfig_annotate '+address-sanitizer' --disable-jemalloc |
259 |
mozconfig_annotate '+address-sanitizer' --disable-replace-malloc |
260 |
|
261 |
echo "export MOZ_DEBUG_SYMBOLS=1" >> ${S}/.mozconfig |
262 |
mozconfig_use_enable address-sanitizer debug-symbols |
263 |
mozconfig_use_enable address-sanitizer |
264 |
append-flags "-fsanitize=address" |
265 |
append-flags "-Dxmalloc=myxmalloc" |
266 |
fi |
267 |
else |
268 |
use address-sanitizer && die "Use flag address-sanitizer can only be \ |
269 |
enabled if CC=clang is set. You're using a different compiler." |
270 |
|
271 |
if [[ $(gcc-major-version) -lt 4 ]]; then |
272 |
append-cxxflags -fno-stack-protector |
273 |
elif [[ $(gcc-major-version) -gt 4 || $(gcc-minor-version) -gt 3 ]]; then |
274 |
if use amd64 || use x86; then |
275 |
append-flags -mno-avx |
276 |
fi |
277 |
fi |
278 |
fi |
279 |
|
280 |
# support EXTRA_ECONF, maybe this should be in mozcoreconf-2.eclass .. |
281 |
for eeopt in $EXTRA_ECONF; do |
282 |
mozconfig_annotate 'from ebuild, passed using EXTRA_ECONF' $eeopt |
283 |
done |
284 |
|
241 |
# Allow for a proper pgo build |
285 |
# Allow for a proper pgo build |
242 |
if use pgo; then |
286 |
if use pgo; then |
243 |
echo "mk_add_options PROFILE_GEN_SCRIPT='\$(PYTHON) \$(OBJDIR)/_profile/pgo/profileserver.py'" >> "${S}"/.mozconfig |
287 |
echo "mk_add_options PROFILE_GEN_SCRIPT='\$(PYTHON) \$(OBJDIR)/_profile/pgo/profileserver.py'" >> "${S}"/.mozconfig |
Lines 245-258
Link Here
|
245 |
|
289 |
|
246 |
# Finalize and report settings |
290 |
# Finalize and report settings |
247 |
mozconfig_final |
291 |
mozconfig_final |
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 |
} |
292 |
} |
257 |
|
293 |
|
258 |
src_compile() { |
294 |
src_compile() { |