Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
what about a /etc/portage/package.cflags
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Duplicate Threads
View previous topic :: View next topic  
Author Message
peter.oettl
n00b
n00b


Joined: 02 Sep 2003
Posts: 22
Location: Nauders, Tirol, Austria

PostPosted: Sat Sep 02, 2006 7:27 am    Post subject: what about a /etc/portage/package.cflags Reply with quote

Hi,

I finished upgrade to GCC 4.1.1 right now and recompiling world worked well beside two packages.
For one I used too "insane" CFLAGS for the other I still have to find out.

I wonder what you think about a /etc/portage.cflags where I can set cflags on a per package base...

cheers,

pete.

--
"Not only do I not know the answer. I don't even know what the question is!" - James Hetfield
Back to top
View user's profile Send private message
blu3bird
Retired Dev
Retired Dev


Joined: 04 Oct 2003
Posts: 605
Location: Munich, Germany

PostPosted: Sat Sep 02, 2006 9:42 am    Post subject: Reply with quote

Create a file named /etc/portage/bashrc
Code:
if [ -r /etc/portage/package.cflags ]; then
  while read target flags; do
    if [ "${target}" = "${CATEGORY}/${PN}" ]; then
      export CFLAGS="$flags"
      export CXXFLAGS="$CFLAGS"
      break
    fi
  done < /etc/portage/package.cflags
fi


Create a file named /etc/portage/package.cflags
Code:
sys-libs/glibc -march=supercpu -O9 -funroll-really-all-loops -DPERFORMANCE --disable-instructions --fuck-upstream
sys-devel/gcc -march=i686 -Os


You cflags/cxxflags defined in make.conf will be replaced for these packages.

But that does not support different cflags for different versions.
_________________
Black Holes are created when God divides by zero!
Back to top
View user's profile Send private message
drwook
Veteran
Veteran


Joined: 30 Mar 2005
Posts: 1322
Location: London

PostPosted: Sat Sep 02, 2006 10:01 am    Post subject: Reply with quote

blu3bird wrote:
Code:
 --fuck-upstream

But that does not support different cflags for different versions.


ROFL!!! Sorry that just cracked me up.

If you want to fiddle with these things per package/version, why not just edit the ebuilds in an overlay?
Back to top
View user's profile Send private message
Dieter@be
Guru
Guru


Joined: 03 Apr 2005
Posts: 314
Location: Wetteren, Belgium

PostPosted: Sat Sep 02, 2006 11:07 am    Post subject: Reply with quote

drwook wrote:
If you want to fiddle with these things per package/version, why not just edit the ebuilds in an overlay?

cause that's very messy?
_________________
Nothing beats a ride on the Gentoo learning curve.
2 Gentoo Linux boxes - 2 Arch Linux boxes - Love all four
Say no to i386 binaries! -- Adopt an unanswered topic
Back to top
View user's profile Send private message
tomk
Administrator
Administrator


Joined: 23 Sep 2003
Posts: 7219
Location: Sat in front of my computer

PostPosted: Sat Sep 02, 2006 11:13 am    Post subject: Reply with quote

Moved from Gentoo Chat to Duplicate Threads, please see one of the various topics on this issue:

/etc/portage/package.c{,xx}flags features - v1.0_rc1
distclean and per package CFLAGS in portage...
[tool]portage-bashrc-ng - modular portage's bashrc
_________________
Search | Read | Answer | Report | Strip
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Duplicate Threads 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