Problem with main routine during linking
Per Bothner
per@bothner.com
Tue May 8 00:17:00 GMT 2001
Martin Kahlert <martin.kahlert@infineon.com> writes:
> I tried your patch and it works for me, but i do not consider this patch
> a nice one; it's some kind of a quick hack:
> - it makes internal variables of the general build process public just for
> one specific language
Nothing wrong with that. The functions lang_specific_driver and
lang_specific_pre_link are nothing more than hooks to deal with
specific languages. I just added some more hooks by making two static
variables public.
> - it does not solve David Billinghurst's Problem with main in cygwin libs
It doesn't? How come? I understood the problem was that main was getting
picked up because the cygwin libs were searched before the generated
main. If we put the generated main first, we will no longer pick up
main from a library.
> So my question is this: Should there be a general function
> (bryce suggested lang_specific_pre_compile()) for all languages,
> which produces additional objects?
I consider that, but decided that it was best to run jvgenmain *last*
- in case there is an error.
> Does it do any harm, if we sort the -l options towards the end of outfiles
> *inside gcc.c* before linking?
We should not do that - it sounds way too dangerous, at least for gcc 3.0.
--
--Per Bothner
per@bothner.com http://www.bothner.com/per/
More information about the Java
mailing list