Patches for NetBSD port and automatic .hc bootstrap (long)

Urban Boquist
Tue, 1 Apr 2003 08:55:52 +0200

>>>>> Simon Marlow writes:

Simon> I've committed most of your patches...

Great, thanks for the quick response!

>> -L/usr/pkg/lib -Wl,-R/usr/pkg/lib

Simon> Incidentally, why are the -Wl,-R<dir> options needed?

Ah, yes, I guess I should have commented on that. In its continuous
quest to do things The Right Way (TM), NetBSD has decided to not do
what many other systems do, i.e., automatically add linker run path
flags for each -L flag. Instead you must give explicit run path flags
for each runtime library location. Really, this makes a lot of sense
if you think about it. There is no reason that a library should be
located at the same place during both build time and run time (think
cross compiling and such).

The NetBSD runtime linker can also use things like /etc/ and
LD_LIBRARY_PATH, for executables that don't have correct rpaths in
them, but you can't trust /usr/pkg/lib to be found that way for all
NetBSD systems.

Simon> Note that HC files can also be platform dependent, since they
Simon> depend in some cases on the values of symbols from config.h.
Simon> We used to try to keep .hc files completely
Simon> platform-independent, but I've come around to the conclusion
Simon> that this isn't a realistic goal.

OK, I figured that it was something like that.

Simon> So, while one set of .hc files might work for all the versions
Simon> of NetBSD you want to build the compiler on, we don't guarantee
Simon> it.

Sure, I understand that. So do you know the reason that the FreeBSD
port was changed to build via this binary kit rather than from .hc

Kind regards,

        -- Urban