gm2
[Top][All Lists]
Advanced

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

Re: Once more: -static linking


From: Gaius Mulley
Subject: Re: Once more: -static linking
Date: Thu, 19 Oct 2023 17:14:28 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux)

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]