Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 462608 | Differences between
and this patch

Collapse All | Expand All

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

Return to bug 462608