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

Collapse All | Expand All

(-)seamonkey-2.17.ebuild.orig (-9 / +43 lines)
Lines 47-53 Link Here
47
47
48
SLOT="0"
48
SLOT="0"
49
LICENSE="MPL-2.0 GPL-2 LGPL-2.1"
49
LICENSE="MPL-2.0 GPL-2 LGPL-2.1"
50
IUSE="+chatzilla +crypt gstreamer +ipc +jit +roaming system-jpeg system-sqlite"
50
IUSE="address-sanitizer +chatzilla +crypt gstreamer +ipc +jit +roaming system-jpeg system-sqlite"
51
51
52
SRC_URI+="${SRC_URI}
52
SRC_URI+="${SRC_URI}
53
	${MOZ_FTP_URI}/source/${MY_MOZ_P}.source.tar.bz2 -> ${P}.source.tar.bz2
53
	${MOZ_FTP_URI}/source/${MY_MOZ_P}.source.tar.bz2 -> ${P}.source.tar.bz2
Lines 232-237 Link Here
232
	mozconfig_use_enable jit methodjit
232
	mozconfig_use_enable jit methodjit
233
	mozconfig_use_enable jit tracejit
233
	mozconfig_use_enable jit tracejit
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
		if use amd64; then
241
			sed -e '/javascript.options.methodjit/ s/true/false/' \
242
				-i "${S}"/mozilla/modules/libpref/src/init/all.js
243
		fi
244
245
		# https://developer.mozilla.org/en-US/docs/Building_Firefox_with_Address_Sanitizer
246
		if use address-sanitizer; then
247
			echo "export MOZ_JEMALLOC=0" >> ${S}/.mozconfig
248
			mozconfig_annotate '+address-sanitizer' --disable-crash-reporter
249
			mozconfig_annotate '+address-sanitizer' --disable-elf-hack
250
			mozconfig_annotate '+address-sanitizer' --disable-jemalloc
251
			mozconfig_annotate '+address-sanitizer' --disable-replace-malloc
252
253
			echo "export MOZ_DEBUG_SYMBOLS=1" >> ${S}/.mozconfig
254
			mozconfig_use_enable address-sanitizer debug-symbols
255
			mozconfig_use_enable address-sanitizer
256
			append-flags "-fsanitize=address"
257
			append-flags "-Dxmalloc=myxmalloc"
258
		fi
259
	else
260
		use address-sanitizer && die "Use flag address-sanitizer can only be \
261
			enabled if CC=clang is set. You're using a different compiler."
262
263
		if [[ $(gcc-major-version) -lt 4 ]]; then
264
			append-cxxflags -fno-stack-protector
265
		elif [[ $(gcc-major-version) -gt 4 || $(gcc-minor-version) -gt 3 ]]; then
266
			if use amd64 || use x86; then
267
				append-flags -mno-avx
268
			fi
269
		fi
270
	fi
271
272
	# support EXTRA_ECONF, maybe this should be in mozcoreconf-2.eclass ..
273
	for eeopt in $EXTRA_ECONF; do
274
		mozconfig_annotate 'from ebuild, passed using EXTRA_ECONF' $eeopt
275
	done
276
235
	# Use an objdir to keep things organized.
277
	# Use an objdir to keep things organized.
236
	echo "mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/seamonk" \
278
	echo "mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/seamonk" \
237
		>> "${S}"/.mozconfig
279
		>> "${S}"/.mozconfig
Lines 241-254 Link Here
241
283
242
	# Work around breakage in makeopts with --no-print-directory
284
	# Work around breakage in makeopts with --no-print-directory
243
	MAKEOPTS="${MAKEOPTS/--no-print-directory/}"
285
	MAKEOPTS="${MAKEOPTS/--no-print-directory/}"
244
245
	if [[ $(gcc-major-version) -lt 4 ]] ; then
246
		append-cxxflags -fno-stack-protector
247
	elif [[ $(gcc-major-version) -gt 4 || $(gcc-minor-version) -gt 3 ]] ; then
248
		if use amd64 || use x86 ; then
249
			append-flags -mno-avx
250
		fi
251
	fi
252
}
286
}
253
287
254
src_compile() {
288
src_compile() {

Return to bug 464882