RE: Yasm working with Win32

Simon Marlow <[email protected]>
Newsgroups gmane.comp.lang.haskell.cvs.all
Message-ID <A50988F69402FB47B4D860B67FB51FA14B37F5D3__45517.3479662792$1166199413$gmane$org@EA-EXMSG-C311.europe.corp.microsoft.com>
Peter Tanski wrote:
> On Dec 15, 2006, at 4:19 AM, Simon Marlow wrote:
>> For the native Windows port, we should have a new target, probably
>> i386-unknown-win32 or i386-unknown-windows.  Then we can have an
>> option in config.mk to control whether YASM is used, $(UseYASM),
>> which would be on by default for windows_TARGET_OS.  Later we might
>> want to make it a configure option, but for now I'd leave it as a
>> build.mk option.
>
> Right on.  Would it be good to consolidate the hard-coded build flags
> into one module, i.e., wired-in flags in DriverPipeline.hs should be
> brought together in DynFlags.hs?

Sounds reaonsable.

> To sum up:
>   * new target: i386-unknown-windows (Yasm covers Win64,
> Intel and AMD)

I imagine a Win64 build will look like x86_64-unknown-windows (if/when we support it; cygwin doesn't support Win64 yet, so we don't have a build system).  I don't think it's necessary to change the OS to be -win64, but I could be wrong.

>   * windows_TARGET_OS (new cpp define)

You'll get the CPP defines automatically when you tell configure about the i386-unknown-windows target.  Note that there are *lots* of #ifdef mingw32_blah_blah that around the system that will need to change, it's probably a good idea to grep and look at each one individually.

> Other things may need changing:
>   * add code to DriverPhases.hs to allow ".asm" suffix?  (Not
> necessary)

Don't see why not, if it's easy.

>   * SysTools.lhs:328-329 (as-prog,as-args) are NOT (gcc_prog,gcc_args)

sure

>   * (potential bugger): remove default use of mangler on -O and -fvia-
> C on -fglasgow-exts;

Don't understand this one.  -fvia-C won't be available for i386-unknown-windows, right?  What are you referring to with -fglasgow-exts?

> Yasm chokes on /ARGS, /NO_ARGS gas directives,
> may add to Yasm with special -D macro[=value] options

Could you elaborate?  I don't know what /ARGS is.

Cheers,
        Simon
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.