View previous topic :: View next topic |
Author |
Message |
Rutcha n00b
Joined: 13 Dec 2019 Posts: 7 Location: Brasil, Latin America
|
Posted: Sun Jan 09, 2022 12:33 pm Post subject: 'Ebuild variable' vanishes during normal portage emerge |
|
|
I'm trying to use 'ebuild Variables' in my make.conf, like ${PN} for package name or ${PF} package full name so that I cant set a PGO (profile guided optimization) directory.
More or less CFLAGS="-fprofile-dir=/var/tmp/pgo/${PN}".
But what I get is a blank, nothing for that variable as if it didn't exist at all. Am I using it in the right place ?
My other solution is to write an script and make custom entries for every single package inside /etc/portage/env/...
So as to avoid this big work, I believe these 'ebuild variables' were made for.
For those not totally aware of PGO, PGO needs a folder for each package to store profiling data. Thanks, all ladies and gentlemen! |
|
Back to top |
|
|
alamahant Advocate
Joined: 23 Mar 2019 Posts: 3918
|
Posted: Sun Jan 09, 2022 3:23 pm Post subject: |
|
|
Is
a file?
Can you post a sample?
Does it contain
Code: |
CFLAGS="..............."
|
I am not sure if portage sources make.conf with every package or just once.
If the former would not
Code: |
. /var/tmp/pgo/${PN}
|
would work?
Or maybe
Code: |
CFLAGS="........."
PGOFLAGS=$(cat /var/tmp/pgo/${PN})
CFLAGS="${CFLAGS} ${PGOFLAGS}"
|
Just a wild guess..... _________________
|
|
Back to top |
|
|
grknight Retired Dev
Joined: 20 Feb 2015 Posts: 1933
|
Posted: Sun Jan 09, 2022 4:22 pm Post subject: Re: 'Ebuild variable' vanishes during normal portage emerge |
|
|
Rutcha wrote: | I'm trying to use 'ebuild Variables' in my make.conf, like ${PN} for package name or ${PF} package full name so that I cant set a PGO (profile guided optimization) directory.
More or less CFLAGS="-fprofile-dir=/var/tmp/pgo/${PN}".
But what I get is a blank, nothing for that variable as if it didn't exist at all. Am I using it in the right place ?
My other solution is to write an script and make custom entries for every single package inside /etc/portage/env/...
So as to avoid this big work, I believe these 'ebuild variables' were made for.
For those not totally aware of PGO, PGO needs a folder for each package to store profiling data. Thanks, all ladies and gentlemen! |
AFAIK, ebuild variables are not available in make.conf as make.conf is read before ebuilds variables are defined.
In addition, it is not valid for a build to write outside of $WORKDIR or $T as it will likely be denied by the sandbox. |
|
Back to top |
|
|
Genone Retired Dev
Joined: 14 Mar 2003 Posts: 9614 Location: beyond the rim
|
Posted: Tue Jan 11, 2022 11:43 am Post subject: Re: 'Ebuild variable' vanishes during normal portage emerge |
|
|
Rutcha wrote: | I'm trying to use 'ebuild Variables' in my make.conf, like ${PN} for package name or ${PF} package full name so that I cant set a PGO (profile guided optimization) directory.
More or less CFLAGS="-fprofile-dir=/var/tmp/pgo/${PN}".
But what I get is a blank, nothing for that variable as if it didn't exist at all. Am I using it in the right place ? |
Nope, ebuild variables, as the name implies, can only be used inside ebuild contexts (ebuilds, eclasses, scripts used within ebuilds, ...). They are not defined when make.conf or other global configuration files are processed. |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|