Passing CFLAGS="-fdebug-prefix-map=..=$(readlink -f ..)"

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Passing CFLAGS="-fdebug-prefix-map=..=$(readlink -f ..)"

Joakim Tjernlund
I am trying to add -fdebug-prefix-map to my CFLAGS but cannot get past "$(readlink -f ..)"
Portage will not expand $(anything)

Any way to make portage expand "$(readlink -f ..)" ?

 Jocke
Reply | Threaded
Open this post in threaded view
|

Re: Passing CFLAGS="-fdebug-prefix-map=..=$(readlink -f ..)"

Joakim Tjernlund
On Sat, 2020-06-27 at 14:00 +0000, Joakim Tjernlund wrote:
> CAUTION: This email originated from outside of the organization. Do not click links or open attachments unless you recognize the sender and know the content is safe.
>
>
> I am trying to add -fdebug-prefix-map to my CFLAGS but cannot get past "$(readlink -f ..)"
> Portage will not expand $(anything)
>
> Any way to make portage expand "$(readlink -f ..)" ?
>
>  Jocke

Found it /etc/portage/bashrc add:

if [ $EBUILD_PHASE = configure ]; then
   echo "Adding -fdebug-prefix-map to CFLAGS/CXXFLAGS"
   CFLAGS="$CFLAGS -fdebug-prefix-map=..=$(readlink -f ..)"
   CXXFLAGS="$CXXFLAGS -fdebug-prefix-map=..=$(readlink -f ..)"
fi