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 / +37 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
		# https://developer.mozilla.org/en-US/docs/Building_Firefox_with_Address_Sanitizer
240
		if use address-sanitizer; then
241
			echo "export MOZ_JEMALLOC=0" >> ${S}/.mozconfig
242
			mozconfig_annotate '+address-sanitizer' --disable-crash-reporter
243
			mozconfig_annotate '+address-sanitizer' --disable-elf-hack
244
			mozconfig_annotate '+address-sanitizer' --disable-jemalloc
245
			mozconfig_annotate '+address-sanitizer' --disable-replace-malloc
246
247
			echo "export MOZ_DEBUG_SYMBOLS=1" >> ${S}/.mozconfig
248
			mozconfig_use_enable address-sanitizer debug-symbols
249
			mozconfig_use_enable address-sanitizer
250
			append-flags "-fsanitize=address"
251
			append-flags "-Dxmalloc=myxmalloc"
252
		fi
253
	else
254
		use address-sanitizer && \
255
			die "use flag address-sanitizer may only be used with CC=clang"
256
257
		if [[ $(gcc-major-version) -lt 4 ]]; then
258
			append-cxxflags -fno-stack-protector
259
		elif [[ $(gcc-major-version) -gt 4 || $(gcc-minor-version) -gt 3 ]]; then
260
			if use amd64 || use x86; then
261
				append-flags -mno-avx
262
			fi
263
		fi
264
	fi
265
266
	# support EXTRA_ECONF, maybe this should be in mozcoreconf-2.eclass ..
267
	for eeopt in $EXTRA_ECONF; do
268
		mozconfig_annotate 'from ebuild, passed using EXTRA_ECONF' $eeopt
269
	done
270
235
	# Allow for a proper pgo build
271
	# Allow for a proper pgo build
236
	if use pgo; then
272
	if use pgo; then
237
		echo "mk_add_options PROFILE_GEN_SCRIPT='\$(PYTHON) \$(OBJDIR)/_profile/pgo/profileserver.py'" >> "${S}"/.mozconfig
273
		echo "mk_add_options PROFILE_GEN_SCRIPT='\$(PYTHON) \$(OBJDIR)/_profile/pgo/profileserver.py'" >> "${S}"/.mozconfig
Lines 239-252 Link Here
239
275
240
	# Finalize and report settings
276
	# Finalize and report settings
241
	mozconfig_final
277
	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
}
278
}
251
279
252
src_compile() {
280
src_compile() {

Return to bug 462608