| View previous topic :: View next topic |
| Author |
Message |
LinuxTom l33t

Joined: 26 Mar 2006 Posts: 749
|
Posted: Wed Feb 22, 2012 6:19 am Post subject: spezielle CFLAGS für einzelne Pakete |
|
|
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 |
|
 |
Max Steel Veteran


Joined: 12 Feb 2007 Posts: 1938 Location: My own world! I and Gentoo!
|
Posted: Wed Feb 22, 2012 8:21 am Post subject: |
|
|
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 |
|
 |
Christian99 l33t

Joined: 28 May 2009 Posts: 693
|
Posted: Wed Feb 22, 2012 1:07 pm Post subject: |
|
|
| im mv overlay gibt es auch noch app-portage/portage-bashrc-mv das erweitert das ganze ein bisschen. |
|
| Back to top |
|
 |
LinuxTom l33t

Joined: 26 Mar 2006 Posts: 749
|
Posted: Wed Feb 22, 2012 4:25 pm Post subject: |
|
|
| Das scheint genau die Erweiterung zu sein, die ich brauche. Mal sehen. Ist die Aufnahme ins Portage geplant? |
|
| Back to top |
|
 |
mv Advocate


Joined: 20 Apr 2005 Posts: 3140
|
Posted: Thu Feb 23, 2012 10:09 am Post subject: |
|
|
| 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 |
|
 |
kernelOfTruth Watchman


Joined: 20 Dec 2005 Posts: 5489 Location: Vienna, Austria; Germany; hello world :)
|
|
| Back to top |
|
 |
toralf Advocate


Joined: 01 Feb 2004 Posts: 2411 Location: Hamburg/Germany
|
Posted: Tue Feb 28, 2012 4:18 pm Post subject: |
|
|
| 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 |
|
 |
mv Advocate


Joined: 20 Apr 2005 Posts: 3140
|
Posted: Tue Feb 28, 2012 5:33 pm Post subject: |
|
|
| 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 |
|
 |
toralf Advocate


Joined: 01 Feb 2004 Posts: 2411 Location: Hamburg/Germany
|
Posted: Wed Feb 29, 2012 2:26 pm Post subject: |
|
|
| 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 |
|
 |
mv Advocate


Joined: 20 Apr 2005 Posts: 3140
|
Posted: Thu Mar 01, 2012 12:49 am Post subject: |
|
|
| 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 |
|
 |
kernelOfTruth Watchman


Joined: 20 Dec 2005 Posts: 5489 Location: Vienna, Austria; Germany; hello world :)
|
|
| Back to top |
|
 |
Yamakuzure l33t

Joined: 21 Jun 2006 Posts: 951 Location: Bardowick, Germany
|
Posted: Tue Apr 10, 2012 10:53 am Post subject: |
|
|
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 |
|
 |
kernelOfTruth Watchman


Joined: 20 Dec 2005 Posts: 5489 Location: Vienna, Austria; Germany; hello world :)
|
Posted: Tue Apr 10, 2012 11:00 am Post subject: |
|
|
| 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  |
|
| Back to top |
|
 |
toralf Advocate


Joined: 01 Feb 2004 Posts: 2411 Location: Hamburg/Germany
|
Posted: Tue Apr 10, 2012 11:28 am Post subject: |
|
|
| Yamakuzure wrote: | | Habt Ihr mal in eure Build logs geschaut, ob das wirklich funktioniert? | ja |
|
| Back to top |
|
 |
Yamakuzure l33t

Joined: 21 Jun 2006 Posts: 951 Location: Bardowick, Germany
|
Posted: Wed Apr 11, 2012 11:00 am Post subject: |
|
|
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!  _________________ 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 |
|
 |
|