Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
per-package CFLAGS / beecrypt and pentium-m [SOLVED]
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
depontius
Advocate
Advocate


Joined: 05 May 2004
Posts: 3509

PostPosted: Tue Aug 15, 2006 1:32 pm    Post subject: per-package CFLAGS / beecrypt and pentium-m [SOLVED] Reply with quote

I can't emerge beecrypt today. Looking in bugzilla I see that it doesn't work with march=pentium-m in CFLAGS, and that the fix is to set march=pentium3.

I've edited make.conf, and am emerging beecrypt now. Then I'll change it back, and emerge rpm. I also find that at home on my hardened box, I can't emerge busybox, and suspect that march=k6-3 might be part of the problem. I have yet to try this, file a bug, and for that matter, even check bugzilla. (need to do this)

So the question at hand...

We have package.use in order to specify a USE flag on a package-by-package basis, when the USE flags in make.conf don't quite do it, or I prefer this for 'local' USE flags.
ISTHERE and equivalent mechanism to package.use for CFLAGS? There are any number of packages that don't like specific CFLAGS, and such a beast would be generally useful. A quick search shows "portage toys", which looks like a .bashrc script for the portage account, which seems a bit intrusive and likely to break with portage releases. It also dates back to 2004, which means that maybe there's something better, by now.
_________________
.sigs waste space and bandwidth


Last edited by depontius on Thu Aug 17, 2006 2:17 pm; edited 1 time in total
Back to top
View user's profile Send private message
lnxz
Guru
Guru


Joined: 03 Jul 2005
Posts: 472
Location: Earth

PostPosted: Tue Aug 15, 2006 2:41 pm    Post subject: Reply with quote

take a look at this
Back to top
View user's profile Send private message
depontius
Advocate
Advocate


Joined: 05 May 2004
Posts: 3509

PostPosted: Thu Aug 17, 2006 12:38 pm    Post subject: Reply with quote

lnxz wrote:
take a look at this


That was the thing that I saw "dates back to 2004" and mentioned earlier. It looks scarily bolted-on and intrusive, so for the moment, I've got some commented lines in my make.conf for when the need arises.

Incidentally, going from "-march=pentium-m" to "-march=pentium3" fixed my beecrypt problem, but taking the "-march=k6-3" out on my SELinux box did not fix the busybox emerge. I guess it's time to do bugzilla on that one.

It would be good to see some sort of support for this integrated into Portage. (So for the moment, I won't mark this "[SOLVED]")
_________________
.sigs waste space and bandwidth
Back to top
View user's profile Send private message
truc
Advocate
Advocate


Joined: 25 Jul 2005
Posts: 3199

PostPosted: Thu Aug 17, 2006 1:20 pm    Post subject: Reply with quote

modo put the thread into duplicate ones although it doesn't seem to be a well known way of setting perpackage env:

see here
or read this:)
truc wrote:
Assuming you want to set CFLAGS="blah blih blouh -full-speed-on" then you can do this

Code:
mkdirhier /etc/portage/env/category
echo 'CFLAGS="blah blih blouh -full-speed-on"' >> /etc/portage/env/category/packagename



Note this is not restrictive to CFLAGS.

for example (for this tip that you can find in that thread: Get aMSN to use anti-aliased fonts (with ebuilds) :
Code:
for pkg in {dev-lang/tk,dev-lang/tcl,net-im/amsn} ; do mkdirhier /etc/portage/env/${pkg%/*} ; echo "EXTRA_ECONF=\"--enable-xft\"" >> /etc/portage/env/$pkg ; done

Back to top
View user's profile Send private message
depontius
Advocate
Advocate


Joined: 05 May 2004
Posts: 3509

PostPosted: Thu Aug 17, 2006 2:16 pm    Post subject: Reply with quote

Trying it out, now. So I've made the directory "/etc/portage/env/dev-libs" and the file "beecrypt" contains my new CFLAGS. In addition, I've symlinked beecrypt to beecrypt-3.1.0-r2.

Which file was used, the real file or the symlink?

By the way, the emerge just finished successfully, so I'll mark this as [SOLVED]. IMHO this capability should be more prominently featured, here and in the Portage documentation. Come to think of it, it's been a while since I've read the Portage docs.

Thanks.
_________________
.sigs waste space and bandwidth
Back to top
View user's profile Send private message
truc
Advocate
Advocate


Joined: 25 Jul 2005
Posts: 3199

PostPosted: Thu Aug 17, 2006 2:26 pm    Post subject: Reply with quote

depontius wrote:
Which file was used, the real file or the symlink?


I've never tested if it also works with package version ( I mean ${PF} (man 5 ebuild) ) but I'm sure it works with your real file "beecrypt",

That would be good to know if it works if you delete the symlink, and rename the real file so that it also contains the package version&revision.

:?:
Back to top
View user's profile Send private message
depontius
Advocate
Advocate


Joined: 05 May 2004
Posts: 3509

PostPosted: Thu Aug 17, 2006 3:38 pm    Post subject: Reply with quote

Remove the symlink and it compiles for "-march=pentium3"
Rename the file to add the release number and it compiles for "-march=pentium3"
Rename the file to the wrong release number, and it compiles for "-march=pentium-m"

Just did another quick check...
Using (pkgname) will generally override /etc/make.conf
If you also have (pkgname)-(version) will override both (pkgname) and /etc/make.conf

This is just the behavior I'd like to see.
_________________
.sigs waste space and bandwidth
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Page 1 of 1

 
Jump to:  
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