
Sven Panne
On Thursday 01 March 2007 17:15, Malcolm Wallace wrote:
Since $LD is already defined to equal $CC, I'm thinking to replace ld -r ... with $LD -Wl,-r ...
What doesn't work: gcc is not aware that we only want to do a partial linking, despite of the -Wl,r option, and tries to link things like -lc, -lgcc, ... :-(
Hmm. How about telling gcc -nostdlib and/or -nodefaultlibs?
Is this partial linking really necessary? Or can the driver script be adapted to handle 2 .o files explicitly when dealing with *.gc files?
I can't remember exactly why the partial linking was introduced, but have a feeling it was to make things cleaner, not dirtier. :-) Possibly because hmake only needs to look for one object file. Or possibly because the ghc version of greencard only generated a single object. Regards, Malcolm