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-20.0.ebuild.orig (-10 / +44 lines)
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 145-151 Link Here
145
	EPATCH_FORCE="yes" \
145
	EPATCH_FORCE="yes" \
146
	epatch "${WORKDIR}/firefox"
146
	epatch "${WORKDIR}/firefox"
147
147
148
	# Allow user to apply any additional patches without modifing ebuild
148
	# Allow user to apply any additional patches without modifying ebuild
149
	epatch_user
149
	epatch_user
150
150
151
	# Enable gnomebreakpad
151
	# Enable gnomebreakpad
Lines 219-224 Link Here
219
	mozconfig_use_enable jit tracejit
219
	mozconfig_use_enable jit tracejit
220
	mozconfig_use_enable jit ion
220
	mozconfig_use_enable jit ion
221
221
222
	# compiler-dependent settings
223
	if [[ $(tc-getCC) =~ clang ]]; then
224
		mozconfig_annotate 'from ebuild, CC=clang detected' --enable-llvm-hacks
225
226
		# methodjit causes clang builds to segfault on x86_64 (see bug #462608)
227
		if use amd64; then
228
			sed -e '/javascript.options.methodjit/ s/true/false/' \
229
				-i "${S}"/modules/libpref/src/init/all.js
230
		fi
231
232
		# https://developer.mozilla.org/en-US/docs/Building_Firefox_with_Address_Sanitizer
233
		if use address-sanitizer; then
234
			echo "export MOZ_JEMALLOC=0" >> ${S}/.mozconfig
235
			mozconfig_annotate '+address-sanitizer' --disable-crash-reporter
236
			mozconfig_annotate '+address-sanitizer' --disable-elf-hack
237
			mozconfig_annotate '+address-sanitizer' --disable-jemalloc
238
			mozconfig_annotate '+address-sanitizer' --disable-replace-malloc
239
240
			echo "export MOZ_DEBUG_SYMBOLS=1" >> ${S}/.mozconfig
241
			mozconfig_use_enable address-sanitizer debug-symbols
242
			mozconfig_use_enable address-sanitizer
243
			append-flags "-fsanitize=address"
244
			append-flags "-Dxmalloc=myxmalloc"
245
		fi
246
	else
247
		use address-sanitizer && die "Use flag address-sanitizer can only be \
248
			enabled if CC=clang is set. You're using a different compiler."
249
250
		if [[ $(gcc-major-version) -lt 4 ]]; then
251
			append-cxxflags -fno-stack-protector
252
		elif [[ $(gcc-major-version) -gt 4 || $(gcc-minor-version) -gt 3 ]]; then
253
			if use amd64 || use x86; then
254
				append-flags -mno-avx
255
			fi
256
		fi
257
	fi
258
259
	# support EXTRA_ECONF, maybe this should be in mozcoreconf-2.eclass ..
260
	for eeopt in $EXTRA_ECONF; do
261
		mozconfig_annotate 'from ebuild, passed using EXTRA_ECONF' $eeopt
262
	done
263
222
	# Allow for a proper pgo build
264
	# Allow for a proper pgo build
223
	if use pgo; then
265
	if use pgo; then
224
		echo "mk_add_options PROFILE_GEN_SCRIPT='\$(PYTHON) \$(OBJDIR)/_profile/pgo/profileserver.py'" >> "${S}"/.mozconfig
266
		echo "mk_add_options PROFILE_GEN_SCRIPT='\$(PYTHON) \$(OBJDIR)/_profile/pgo/profileserver.py'" >> "${S}"/.mozconfig
Lines 226-239 Link Here
226
268
227
	# Finalize and report settings
269
	# Finalize and report settings
228
	mozconfig_final
270
	mozconfig_final
229
230
	if [[ $(gcc-major-version) -lt 4 ]]; then
231
		append-cxxflags -fno-stack-protector
232
	elif [[ $(gcc-major-version) -gt 4 || $(gcc-minor-version) -gt 3 ]]; then
233
		if use amd64 || use x86; then
234
			append-flags -mno-avx
235
		fi
236
	fi
237
}
271
}
238
272
239
src_compile() {
273
src_compile() {

Return to bug 462608