develooper Front page | perl.perl6.internals | Postings from October 2002

How to portably link on Win32 (all flavors), OS/2 and VMS?

Thread Next
From:
Andy Dougherty
Date:
October 28, 2002 09:53
Subject:
How to portably link on Win32 (all flavors), OS/2 and VMS?
Message ID:
Pine.SOL.4.10.10210281229360.23168-100000@maxwell.phys.lafayette.edu
I need some portability help.  In config/auto/stackdir.pl (the stack
growth direction test) I want to portably compile and link together three
files.  (The functions are in separate files to prevent compiler
optimizations from fouling up the stack direction test.)

Currently, config/auto/stackdir.pl runs the following commands:

    $cc $ccflags -I./include -c test0.c
    $cc $ccflags -I./include -c test1.c
    $cc $ccflags -I./include -c test2.c
    $link $linkflags ${cc_exe_out}test$exe test0$o test1$o test2$o $libs

Unfortunately, that doesn't work with Microsoft's Visual C because the
cc_exe_out flag is -Fe, and that doesn't work for the linker.  I'd like to
change that last command to 
    $link $linkflags ${link_exe_out}test$exe test0$o test1$o test2$o $libs

but I'm unsure what to put for link_exe_out for each of the three
compilers mentioned in config/init/hints/mswin32.pl, nor for the
compilers used under OS/2 and VMS.

NOTE:  The variable is called $link, but it could be 'cc' or 'cl' or
something like that.  It's whatever command I should call to link together
the three object files to create an executable.

So, my simple request:  What is the correct command line invocation
for each of those systems to link together object files?

-- 
    Andy Dougherty		doughera@lafayette.edu


Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About