1 |
Pacho Ramos wrote: |
2 |
> Hello, I would want to always merge xorg-server, libdrm, and intel |
3 |
> driver (that likes to crash a lot) to be always compiled with debugging |
4 |
> symbols and FEATURES="${FEATURES} splitdebug" |
5 |
> |
6 |
> Searching in google seems that there are some available hacks done by |
7 |
> some forums users, but they seem to be a bit old and, before trying |
8 |
> them, I would want to know if there is an "official" way of doing it. |
9 |
> |
10 |
> Thanks a lot :-) |
11 |
|
12 |
I use pre_pkg_setup hooks defined in /etc/portage/env. For example: |
13 |
|
14 |
cat /etc/portage/env/sys-libs/glibc |
15 |
|
16 |
pre_pkg_setup() { |
17 |
local x |
18 |
for x in installsources splitdebug ; do |
19 |
if ! has $x $FEATURES ; then |
20 |
elog "bashrc is adding $x to FEATURES for $PN" |
21 |
FEATURES="$FEATURES $x" |
22 |
fi |
23 |
done |
24 |
|
25 |
if ! hasq -ggdb $CFLAGS ; then |
26 |
elog "bashrc is adding \"-ggdb\" to CFLAGS for $PN" |
27 |
CFLAGS="$CFLAGS -ggdb" |
28 |
fi |
29 |
} |
30 |
|
31 |
|
32 |
-- |
33 |
Thanks, |
34 |
Zac |