View previous topic :: View next topic |
Author |
Message |
cloc3 Advocate
Joined: 13 Jan 2004 Posts: 4788 Location: http://www.gentoo-users.org/user/cloc3/
|
Posted: Tue Mar 24, 2009 8:12 pm Post subject: [emerge] creare pacchetti statici |
|
|
mi punge vaghezza di compilare staticamente dei pacchetti per i quali non è predisposta la flag apposita (per esempio udev).
esiste un modo per farlo? _________________ vu vu vu
gentù
mi piaci tu |
|
Back to top |
|
|
oRDeX Veteran
Joined: 19 Oct 2003 Posts: 1325 Location: Italy
|
Posted: Wed Mar 25, 2009 10:34 pm Post subject: |
|
|
ma per statici intendi "-static"? |
|
Back to top |
|
|
cloc3 Advocate
Joined: 13 Jan 2004 Posts: 4788 Location: http://www.gentoo-users.org/user/cloc3/
|
Posted: Thu Mar 26, 2009 3:46 am Post subject: |
|
|
oRDeX wrote: | ma per statici intendi "-static"? |
si. ma quando spesso la flag non è presente.
in quei casi, temo che l'operazione sia impossibile. _________________ vu vu vu
gentù
mi piaci tu |
|
Back to top |
|
|
oRDeX Veteran
Joined: 19 Oct 2003 Posts: 1325 Location: Italy
|
Posted: Thu Mar 26, 2009 8:31 am Post subject: |
|
|
e se aggiungessi direttamente alle LDFLAGS prima di compilare quel pacchetto?
non sono certo che la cosa sia pulitissima..anche perche` cosi` facendo ogni linking diventa statico a prescindere dal fatto che sia il binari oprincipale o meno..ma magari e` anche cosa giusta |
|
Back to top |
|
|
cloc3 Advocate
Joined: 13 Jan 2004 Posts: 4788 Location: http://www.gentoo-users.org/user/cloc3/
|
Posted: Thu Mar 26, 2009 9:42 am Post subject: |
|
|
oRDeX wrote: | e se aggiungessi direttamente alle LDFLAGS prima di compilare quel pacchetto?
|
--static, ma produce un errore di linking.
con un meno solo è inefficace.
evidentemente, se manca la useflag apposita, quei programmi non sono stati scritti per essere compilati statici.
amen. _________________ vu vu vu
gentù
mi piaci tu |
|
Back to top |
|
|
oRDeX Veteran
Joined: 19 Oct 2003 Posts: 1325 Location: Italy
|
Posted: Thu Mar 26, 2009 9:52 am Post subject: |
|
|
L'opzione di gcc è con un - solo. Inefficace in che senso? Comunque non vorrei che la flag debba essere passata nella CFLAGS e non nelle LDFLAGS, dato che dovrebbe essere utilizzata durante l'esecuzione di gcc. |
|
Back to top |
|
|
cloc3 Advocate
Joined: 13 Jan 2004 Posts: 4788 Location: http://www.gentoo-users.org/user/cloc3/
|
Posted: Fri Mar 27, 2009 7:23 am Post subject: |
|
|
oRDeX wrote: | non vorrei che la flag debba essere passata nella CFLAGS e non nelle LDFLAGS |
no. neppure questo funziona.
pace. _________________ vu vu vu
gentù
mi piaci tu |
|
Back to top |
|
|
djinnZ Advocate
Joined: 02 Nov 2006 Posts: 4831 Location: somewhere in L.O.S.
|
Posted: Fri Mar 27, 2009 11:54 am Post subject: |
|
|
Dai uno sguardo a questo, intuisco che sia proprio quello che serve a te, oppure da qualchde parte c'era un mezzo howto per impostare gli autotools a supportare --static-enable. Il problema è che non basta compilare con -static, anche le librerie devono essere statiche.
A quel che ricordo. _________________ scita et risus abundant in ore stultorum sed etiam semper severi insani sunt
mala tempora currunt...mater stultorum semper pregna est
Murpy'sLaw:If anything can go wrong, it will - O'Toole's Corollary:Murphy was an optimist |
|
Back to top |
|
|
famedoro n00b
Joined: 06 Apr 2009 Posts: 1
|
Posted: Mon Apr 06, 2009 1:22 pm Post subject: eseguibile statico |
|
|
spero possa essere di aiuto. Io ho usato magicErmine ( http://magicermine.com ) per includere staticamente le librerie all'interno del codice eseguibile. |
|
Back to top |
|
|
|