gm2
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Once more: -static linking


From: rudolf
Subject: Re: Once more: -static linking
Date: Wed, 25 Oct 2023 16:33:17 +0200 (CEST)

Hi Gaius,

a few days ago I sent some 'example files' to you which show
my 'static linking problem'. Did the files reach you or were
you able to reproduce the problem?


Thanks

Rudolf

--
Rudolf Schubert                 \
Kirchstr. 18a                    \  mailto:rudolf@muc.de
82054 Sauerlach                   > http://www.dose.muc.de
Deutschland                      /   (alpine archkiste)
Tel. 08104/908311               /


On Thu, 19 Oct 2023, Gaius Mulley wrote:

rudolf@muc.de writes:

Hi Gaius,

quite some time ago (20 May 2023) I reported problems with static linking
for my 'big squash1 program' (which I sent to you back in April). But I did
not find out how to work around these problems until today.

I played a bit with command line parameters and found that if (additionally)
using '-fm2-whole-program' static linking is working!

As reported, for dynamic linking I use this command:

gm2 -fiso -fsoft-check-all squash1.mod Ctv2.o unix.o -o squash1 -lc -lcrypt -lm

which is working fine.

Then I added '-static' and  got the reported errors:

gm2 -fiso -fsoft-check-all squash1.mod Ctv2.o unix.o -o squash1 -lc -lcrypt -lm 
-static

Now I use:

gm2 -fm2-whole-program -fiso -fsoft-check-all squash1.mod unix.o -o squash1 -lc 
-lcrypt -lm -static

which in fact produces a static binary!

Note that Ctv2.o is missing from the command line. Otherwise I get
'multiple definition' of certain symbols.

My question now is: is this a 'valid workaround' for my problem or should
'-static' also work without '-fm2-whole-program'?

Hi Rudolf,

It should produce a static binary without -fm2-whole-program.  What
commands were used to generate objects Ctvt.o unix.o ?

If you are able to email me the objects or source - I'll investigate,

regards,
Gaius




reply via email to

[Prev in Thread] Current Thread [Next in Thread]