Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[ebuild] Wie strip und Optimierungen entfernen?
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) Diskussionsforum
View previous topic :: View next topic  
Author Message
3PO
Veteran
Veteran


Joined: 26 Nov 2006
Posts: 1110
Location: Schwabenländle

PostPosted: Sun May 18, 2014 11:13 am    Post subject: [ebuild] Wie strip und Optimierungen entfernen? Reply with quote

Hallo Zusammen,

Wie kann ich in einem ebuild strip und Optimierungen entfernen?

Hintergrund ist folgender:

Ich will wenn das USEflag "debug" gesetzt ist, dass dann mit "-O0" gebaut wird und hinterher nicht gestript wird.

Quasi:

Code:
use debug && .......
Back to top
View user's profile Send private message
l3u
Advocate
Advocate


Joined: 26 Jan 2005
Posts: 2540
Location: Konradsreuth (Germany)

PostPosted: Sun May 18, 2014 7:10 pm    Post subject: Reply with quote

Man müsste doch die CFLAGS in einem ebuild setzen (und so -Ox durch -O0 ersetzen) können? Z. B. gibt es doch beim mplayer-ebuild den USE-Flag "custom-cflags", der das genaue Gegenteil davon macht. Vielleicht kannst du dir das mal anschauen?
Back to top
View user's profile Send private message
3PO
Veteran
Veteran


Joined: 26 Nov 2006
Posts: 1110
Location: Schwabenländle

PostPosted: Mon May 19, 2014 3:52 pm    Post subject: Reply with quote

Zum Thema strip habe ich HIER etwas gefunden.

Code:
RESTRICT="strip"


HIER wird etwa zum Thema "Flag Replacement" geschrieben, allerdings verstehe nicht so ganz, was mit "-Os" gemeint ist?

Code:
# Seems to have issues with -Os, switch to -O2
    replace-flags -Os -O2


Ich würde das dann im ebuild so lösen:

Code:
   if use debug; then
     RESTRICT="strip"
     replace-flags -Os -O2
   fi
Back to top
View user's profile Send private message
l3u
Advocate
Advocate


Joined: 26 Jan 2005
Posts: 2540
Location: Konradsreuth (Germany)

PostPosted: Mon May 19, 2014 7:47 pm    Post subject: Reply with quote

-Os optimiert für möglichst kleine Binaries, nicht für Ausführungsgeschwindigkeit (vermutlich „s“ wie „size“).
Back to top
View user's profile Send private message
3PO
Veteran
Veteran


Joined: 26 Nov 2006
Posts: 1110
Location: Schwabenländle

PostPosted: Tue May 20, 2014 5:29 pm    Post subject: Reply with quote

Habe es jetzt so gelöst: ;)

Code:
.....

RDEPEND="${DEPEND}"

if use debug ; then
  RESTRICT="strip"
  append-flags "-O0 -ggdb"
fi

src_prepare() {

.....
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Deutsches Forum (German) Diskussionsforum 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