cons-discuss
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

building files with nasm (#2)


From: Timothee Besset
Subject: building files with nasm (#2)
Date: Fri, 2 Nov 2001 16:34:40 +0100

I am still trying to get some .nasm assembly files to compile using cons.
In the long run I'd like to do that without having to modify cons itself.

I have several .nasm files that I want to turn into an asmstuff.a with the
Library command. It is not very much different from a regular Library
instruction, except that I need to use nasm to process the files into .o
objects.

I'm doing the following:

%nasm_hash = new cons()->copy(
  CC => 'nasm',
  CCCOM => '%CC -f elf -o %> %<'
);
$nasm_hash{SUFMAP}{'.nasm'} = 'build::command::cc';
$nasm_env = new cons(%nasm_hash);

Library $nasm_env 'asmlib', 'file1.nasm', 'file2.nasm';

summing up, I'm overriding the CC command, and I'm telling cons that .nasm
files need to be handled with the usual CCCOM.

but .. this doesn't work!

I grabbed latest cons from cvs, and debugged it .. I traced it to sub
_Object on line 1188, the $suffix is empty when it tries to find out how
to build a .o from a .nasm. I'm attaching a patch I applied to hack to
work .. it would be great if a cons guru could lookup what's borked and
tell me.

regards

TTimo

Attachment: nasm-building.patch
Description: Binary data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]