[PATCH] Win32 executable generation

0 views
Skip to first unread message

Jonathan Worthington

unread,
Jul 22, 2005, 6:33:06 AM7/22/05
to perl6-i...@perl.org
Hi,

The attached patch does some changes to make it possible to generate an EXE
file on Win32.

Firstly, main.c looked for the extension .o to know to make an object file;
on Win32 it's .obj. The fix will work for other platforms where it isn't .o
too.

Secondly, the make exec target in the makefile didn't append the .exe to the
generated file.

Unfortunately, the built exe file does...nothing. Well, maybe not quite
nothing, but I don't get any output. So that's what's next to look at. (I
was originally looking at the "[TODO] exec core testing" task, then
discovered this breakage on Win32).

Jonathan

execfix.diff

Leopold Toetsch

unread,
Jul 22, 2005, 7:19:54 AM7/22/05
to Jonathan Worthington, perl6-i...@perl.org
Jonathan Worthington wrote:
> Hi,

> Unfortunately, the built exe file does...nothing.

Well, I don't know, how exe files on win32 look like, but Parrot
supports these: EXEC_{A_OUT,ELF,MACH_O,COFF} (see src/exec_save.c).

Is any one of these EXEC symbols defined?

(This doesn't imply that the patch shouldn't be applied, though)

> Jonathan

leo

Jonathan Worthington

unread,
Jul 22, 2005, 8:02:13 AM7/22/05
to Leopold Toetsch, perl6-i...@perl.org
"Leopold Toetsch" <l...@toetsch.at> wrote:
> Jonathan Worthington wrote:
>> Hi,
>
>> Unfortunately, the built exe file does...nothing.
>
> Well, I don't know, how exe files on win32 look like, but Parrot supports
> these: EXEC_{A_OUT,ELF,MACH_O,COFF} (see src/exec_save.c).
>
> Is any one of these EXEC symbols defined?
>
Yup. In config.h
#define PARROT_EXEC_OS_MSWIN32 1

In exec.h

# if PARROT_EXEC_OS_MSWIN32
# define EXEC_COFF
# endif

And COFF is correct. If it were not, I'd have expected a linker error
anyway... I'll see if I have time to dig a bit deeper later on this
afternoon.

Thanks for the suggestion,

Jonathan

Leopold Toetsch

unread,
Jul 23, 2005, 7:28:37 AM7/23/05
to Jonathan Worthington, perl6-i...@perl.org
Jonathan Worthington wrote:
> Hi,
>
> The attached patch does some changes to make it possible to generate an
> EXE file on Win32.

Thanks, applied - r8672

leo

Reply all
Reply to author
Forward
0 new messages