Em 02-06-2011 13:27, Junio C Hamano escreveu:
Does the output from $WINDRES define any external symbol the rest of the
code can refer to? If so, you could throw resource.o into one of the .a
file and make sure that the symbol is referred to from main(); perhaps the
definition of main in compat/mingw.h can refer to it.
Unfortunately no:
$ i686-pc-mingw32-nm compat/win32/resource.o
00000000 d .rsrc
The only thing it has is the .rsrc section.
I could perhaps create a dummy C file with a dummy variable, compile it,
and use incremental linking (ld -r) to bolt both object files together.
I am not sure this hack wouldn't be uglier than the Makefile changes.
Another possibility would be a linker script (like /usr/lib/libc.so on
modern distributions). This might be the most elegant option if it
works. I will have to take a look on how it works to see if it is a
viable alternative.
If you can do that, you wouldn't need any change to the Makefile other
than the rule to build compat/win32/resource.o and conditionally add that
object to LIB_OBJS, perhaps like this (obviously untested as I do not have
access to windows boxes).
You do not need access to Windows boxes, you can always use Wine ;-)
(msysgit even has a script to open a shell under Wine with everything
set up).
--
Cesar Eduardo Barros
cesarb@xxxxxxxxxx
cesar.barros@xxxxxxxxx
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html