summaryrefslogtreecommitdiff
blob: e44987c071cb3750eaa4a5878c6c7669b2ea5045 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# Copyright 1999-2004 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/eclass/debug.eclass,v 1.21 2004/06/25 00:39:48 vapier Exp $
#
# Author: Spider
#
# A general DEBUG eclass to ease inclusion of debugging information
# and to remove "bad" flags from CFLAGS

# Debug ECLASS
ECLASS="debug"
INHERITED="$INHERITED $ECLASS"
IUSE="debug"

if useq debug; then
	# Do _NOT_ strip symbols in the build! Need both lines for Portage 1.8.9+
	DEBUG="yes"
	RESTRICT="$RESTRICT nostrip"
	# Remove omit-frame-pointer as some useless folks define that all over the place. they should be shot with a 16 gauge slingshot at least :)
	# force debug information
	export CFLAGS="${CFLAGS/-fomit-frame-pointer/} -g"
	export CXXFLAGS="${CXXFLAGS/-fomit-frame-pointer/} -g"
	# einfo "CFLAGS and CXXFLAGS redefined"
fi