Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
spezielle CFLAGS für einzelne Pakete
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Deutsches Forum (German)
View previous topic :: View next topic  
Author Message
LinuxTom
l33t
l33t


Joined: 26 Mar 2006
Posts: 749

PostPosted: Wed Feb 22, 2012 6:19 am    Post subject: spezielle CFLAGS für einzelne Pakete Reply with quote

Hallo Leute,

der Titel sagt alles. Bei USE-Flags ist das ja kein Problem, doch geht das auch vom System her, so dass ich diese einzelnen Pakete nicht immer extra per Hand emergen muss? Ich finde dazu leider nichts.
Back to top
View user's profile Send private message
Max Steel
Veteran
Veteran


Joined: 12 Feb 2007
Posts: 1938
Location: My own world! I and Gentoo!

PostPosted: Wed Feb 22, 2012 8:21 am    Post subject: Reply with quote

Hmmm...

So sieht es bei mir aus:
Code:
$ cat /etc/portage/env/sys-libs/glibc

CFLAGS="${CFLAGS/-fstack-protector/-fno-stack-protector}"
CXXFLAGS="${CXXFLAGS/-fstack-protector/-fno-stack-protector}"
FEATURES="${FEATURES/distcc/-distcc}"
MAKEOPTS="-j6"



Reicht dir das als Antwort?

(Ich habe keine Ahnung ob man bestimmten Versionen auch noch verschiedene Parameter mitgeben kann.)
_________________
mfg
Steel
___________________
Big sorry for my bad English.

My System:
  • AMD Phenom II X4 3,2Ghz
  • 16384MB RAM
  • Gentoo AMD64 10.0
  • Kernel 3.8.4 gentoo-sources
  • NVidia Geforce GTX 550 Ti


Version 0.3d
Back to top
View user's profile Send private message
Christian99
l33t
l33t


Joined: 28 May 2009
Posts: 688

PostPosted: Wed Feb 22, 2012 1:07 pm    Post subject: Reply with quote

im mv overlay gibt es auch noch app-portage/portage-bashrc-mv das erweitert das ganze ein bisschen.
Back to top
View user's profile Send private message
LinuxTom
l33t
l33t


Joined: 26 Mar 2006
Posts: 749

PostPosted: Wed Feb 22, 2012 4:25 pm    Post subject: Reply with quote

Das scheint genau die Erweiterung zu sein, die ich brauche. Mal sehen. Ist die Aufnahme ins Portage geplant?
Back to top
View user's profile Send private message
mv
Advocate
Advocate


Joined: 20 Apr 2005
Posts: 3134

PostPosted: Thu Feb 23, 2012 10:09 am    Post subject: Reply with quote

LinuxTom wrote:
Ist die Aufnahme ins Portage geplant?

Kaum. Dazu ist das Ganze viel zu "hackish" und Missbrauch bei Bugreports kaum überschaubar.
Back to top
View user's profile Send private message
kernelOfTruth
Watchman
Watchman


Joined: 20 Dec 2005
Posts: 5488
Location: Vienna, Austria; Germany; hello world :)

PostPosted: Sat Feb 25, 2012 1:06 pm    Post subject: Reply with quote

*subscribe*

das wollte ich schon lange anwenden (besonders bei glibc) ^^
_________________
Unofficial minimal livecd x86/amd64 w/reiser4+truecrypt (by Neo2)
2.6.37.2_plus_v1: BFS, CFS,THP,compaction, zcache or TOI
Hardcore Linux user since 2004 :D
Back to top
View user's profile Send private message
toralf
Advocate
Advocate


Joined: 01 Feb 2004
Posts: 2406
Location: Hamburg/Germany

PostPosted: Tue Feb 28, 2012 4:18 pm    Post subject: Reply with quote

kernelOfTruth wrote:
*subscribe*

das wollte ich schon lange anwenden (besonders bei glibc) ^^
Cool wird das Ganze, wenn Du Templates definierstg, z.B.:
Code:
# tail -v *
==> noparallel <==
MAKEOPTS="${MAKEOPTS} -j 1"


==> nosandbox <==
FEATURES="${FEATURES} -sandbox"


==> notest <==
FEATURES="${FEATURES} -test"


==> splitdebug <==
CFLAGS="-O2 -march=native -pipe -g -ggdb"                                               
CXXFLAGS="${CFLAGS}"                                                                     
FEATURES="${FEATURES} splitdebug"


==> userpriv <==
FEATURES="${FEATURES} userpriv"
und dann eine Datei(en) definierst in der Art :
Code:
# head /etc/portage/package.env/misc
#       package.env
#
app-emulation/qemu-kvm                                          noparallel
app-emulation/virtualbox                                        noparallel
=app-office/akonadi-server-1.7.0                notest
app-office/akonadi-server       splitdebug
#       too long
dev-db/mysql                                    notest          userpriv
dev-lang/python                 splitdebug
=dev-lang/python-2.7.2-r3       splitdebug      notest
Back to top
View user's profile Send private message
mv
Advocate
Advocate


Joined: 20 Apr 2005
Posts: 3134

PostPosted: Tue Feb 28, 2012 5:33 pm    Post subject: Reply with quote

toralf wrote:
Cool wird das Ganze, wenn Du Templates definierstg, z.B.:
Code:
# tail -v *
==> nosandbox <==
FEATURES="${FEATURES} -sandbox"
[...]

Drei Anmerkungen:
  • Anscheinend geht das neuerdings auch ohne die Endung ".conf" in den Filenamen; aus Portabilitätsgründen würde ich aber trotzdem .conf anhängen, weil /etc/portage/env ja ggf. auch noch anderweitig genutzt werden kann.
  • FEATURES ist eine additive Variable. Es reicht also, FEATURES="-sandbox" oder FEATURES="splitdebug" (ohne "${FEATURES} ...").
  • Für CFLAGS ist das trotzdem nur bedingt geeignet, weil Du dann für jedes, das Du verändern willst, eine eigene Datei brauchst. Zudem: Da Du keine Garantie hast, in welcher Reihenfolge die Files ausgeführt werden, funktionieren Kombinationen wie
    /etc/portage/package.env wrote:
    foo/bar experimentelle_cflags.conf noflto.conf
    nicht unbedingt. Außerdem kannst Du das dann nicht mehr schnell bequem von der Kommandozeile aus überschreiben.
Back to top
View user's profile Send private message
toralf
Advocate
Advocate


Joined: 01 Feb 2004
Posts: 2406
Location: Hamburg/Germany

PostPosted: Wed Feb 29, 2012 2:26 pm    Post subject: Reply with quote

mv wrote:
FEATURES ist eine additive Variable. Es reicht also, FEATURES="-sandbox" oder FEATURES="splitdebug" (ohne "${FEATURES} ...")
Gilt das auch für MAKEOPTS ?
Back to top
View user's profile Send private message
mv
Advocate
Advocate


Joined: 20 Apr 2005
Posts: 3134

PostPosted: Thu Mar 01, 2012 12:49 am    Post subject: Reply with quote

toralf wrote:
mv wrote:
FEATURES ist eine additive Variable. Es reicht also, FEATURES="-sandbox" oder FEATURES="splitdebug" (ohne "${FEATURES} ...")
Gilt das auch für MAKEOPTS ?

Nein. Die einzigen additiven Variablen sind FEATURES, USE, ACCEPT_KEYWORDS, und CONFIG_*. Und für USE und ACCEPT_KEYWORDS gibt es ja ohnehin eigene Files.
Back to top
View user's profile Send private message
kernelOfTruth
Watchman
Watchman


Joined: 20 Dec 2005
Posts: 5488
Location: Vienna, Austria; Germany; hello world :)

PostPosted: Mon Apr 09, 2012 6:39 pm    Post subject: Reply with quote

@toralf, mv:

danke !

ich hab es jetzt schon einmal auf ein paar Pakete (darunter pulseaudio) angewendet und funktioniert ziemlich gut :)
_________________
Unofficial minimal livecd x86/amd64 w/reiser4+truecrypt (by Neo2)
2.6.37.2_plus_v1: BFS, CFS,THP,compaction, zcache or TOI
Hardcore Linux user since 2004 :D
Back to top
View user's profile Send private message
Yamakuzure
l33t
l33t


Joined: 21 Jun 2006
Posts: 945
Location: Bardowick, Germany

PostPosted: Tue Apr 10, 2012 10:53 am    Post subject: Reply with quote

Habt Ihr mal in eure Build logs geschaut, ob das wirklich funktioniert? Ich habe früher mit /etc/portage/package.env einige Änderungen gemacht (-O3 bei sqlite und Python, ein paar Anwendungen mit Graphite und sowas) und mit portage-2.2* funktionierte das laut Build Logs auf einmal nicht mehr.
Bevor ich das Ganze mit dem sehr viel Arbeitsintensiveren weg /etc/portage/env/<Kategorie>/<Package> versuche, wüsste ich gerne, ob das auch wirklich hinhaut.
_________________
I *do* know that I easily aggravate people due to my condensed writing. Rule of thumb: If I wrote anything that can be understood in two different ways, and one way offends you, then I meant the other! ;)
Back to top
View user's profile Send private message
kernelOfTruth
Watchman
Watchman


Joined: 20 Dec 2005
Posts: 5488
Location: Vienna, Austria; Germany; hello world :)

PostPosted: Tue Apr 10, 2012 11:00 am    Post subject: Reply with quote

Yamakuzure wrote:
Habt Ihr mal in eure Build logs geschaut, ob das wirklich funktioniert? Ich habe früher mit /etc/portage/package.env einige Änderungen gemacht (-O3 bei sqlite und Python, ein paar Anwendungen mit Graphite und sowas) und mit portage-2.2* funktionierte das laut Build Logs auf einmal nicht mehr.
Bevor ich das Ganze mit dem sehr viel Arbeitsintensiveren weg /etc/portage/env/<Kategorie>/<Package> versuche, wüsste ich gerne, ob das auch wirklich hinhaut.


ich hab das ganze mit pulseaudio einmal ausprobiert und da funktioniert das ganze

das log wird kaum lügen, denke ich einmal:

Quote:
---{ pulseaudio 1.99.2 }---

prefix: /usr
sysconfdir: /etc
localstatedir: /var
modlibexecdir: /usr/lib64/pulse-1.99/modules
System Runtime Path: /var/run/pulse
System State Path: /var/lib/pulse
System Config Path: /var/lib/pulse
Compiler: x86_64-pc-linux-gnu-gcc -std=gnu99
CFLAGS: -O2 -march=corei7 -pipe -mno-align-stringops -minline-stringops-dynamically -mno-push-args -Wall -W -Wextra -Wno-long-long -Wvla -Wno-overlength-strings -Wunsafe-loop-optimizations -Wundef -Wformat=2 -Wlogical-op -Wsign-compare -Wformat-security -Wmissing-include-dirs -Wformat-nonliteral -Wpointer-arith -Winit-self -Wdeclaration-after-statement -Wfloat-equal -Wmissing-prototypes -Wredundant-decls -Wmissing-declarations -Wmissing-noreturn -Wshadow -Wendif-labels -Wcast-align -Wstrict-aliasing -Wwrite-strings -Wno-unused-parameter -ffast-math -Wp,-D_FORTIFY_SOURCE=2 -fno-common -fdiagnostics-show-option



eine elegante Variante ist auch: http://iquark.wordpress.com/2008/10/23/gentoo-per-package-flags/

so mach ich das zumindest (per symlinks)


portage: 2.2.0_alpha96
_________________
Unofficial minimal livecd x86/amd64 w/reiser4+truecrypt (by Neo2)
2.6.37.2_plus_v1: BFS, CFS,THP,compaction, zcache or TOI
Hardcore Linux user since 2004 :D
Back to top
View user's profile Send private message
toralf
Advocate
Advocate


Joined: 01 Feb 2004
Posts: 2406
Location: Hamburg/Germany

PostPosted: Tue Apr 10, 2012 11:28 am    Post subject: Reply with quote

Yamakuzure wrote:
Habt Ihr mal in eure Build logs geschaut, ob das wirklich funktioniert?
ja
Back to top
View user's profile Send private message
Yamakuzure
l33t
l33t


Joined: 21 Jun 2006
Posts: 945
Location: Bardowick, Germany

PostPosted: Wed Apr 11, 2012 11:00 am    Post subject: Reply with quote

Ah fein, dann scheint ja nur der Weg über package.env nciht mehr zu funktionieren.

Der link ist auch gut, so ist der Aufwand nur noch etwas höher. Vielen Dank! :D
_________________
I *do* know that I easily aggravate people due to my condensed writing. Rule of thumb: If I wrote anything that can be understood in two different ways, and one way offends you, then I meant the other! ;)
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Deutsches Forum (German) 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