[z88dk-dev] [z80asm] bug with making libraries?

Bridge to the z88dk-developers mailing list
Post Reply
alvin
Well known member
Posts: 1872
Joined: Mon Jul 16, 2007 7:39 pm

[z88dk-dev] [z80asm] bug with making libraries?

Post by alvin »

There seems to be a bug with z80asm when making libraries (-x). If I give it object files (.o) as input, z80asm seems to want to look for .asm files instead. Is it not possible to making libraries out of already existing .o?



------------------------------------------------------------------------------
pscust
Well known member
Posts: 194
Joined: Thu Jun 23, 2011 3:34 pm

Post by pscust »

Both this problem (not being able to generate a library from .o files) and
the removal of sym files stem from the design decision that z80asm should
ignore the input file extension and always try to open a .asm file first.

There is a work-around hardcoded that I assume was done to circumvent this
problem: if -d is given on the command line, and a .asm file is not found,
z80asm uses the existing .o and, since my patch of yesterday, no longer
removes the sym file.

In my opinion, that design decision should be reverted. z80asm should use
whatever the user supplies as input and not try to guess. The existing
project files that now only mention the source file basename will need to
be changed to contain the extension.

If there are no objections, I can fix this over the week-end.


On Thu, Sep 1, 2016 at 2:16 AM, alvin (alvin_albrecht@...) <
lists@...> wrote:
There seems to be a bug with z80asm when making libraries (-x). If I give
it object files (.o) as input, z80asm seems to want to look for .asm files
instead. Is it not possible to making libraries out of already existing .o?



------------------------------------------------------------
------------------
alvin
Well known member
Posts: 1872
Joined: Mon Jul 16, 2007 7:39 pm

Post by alvin »

Both this problem (not being able to generate a library from .o files) and the removal of sym files stem from the design decision that z80asm should ignore the input file extension and always try to open a .asm file first.

There is a work-around hardcoded that I assume was done to circumvent this problem: if -d is given on the command line, and a .asm file is not found, z80asm uses the existing .o and, since my patch of yesterday, no longer removes the sym file.

In my opinion, that design decision should be reverted. z80asm should use whatever the user supplies as input and not try to guess. The existing project files that now only mention the source file basename will need to be changed to contain the extension.

If there are no objections, I can fix this over the week-end.
Adding -d to z80asm when making the library solved the problem. "zcc -x .... @proj.lst ..." will now generate a library out of all the input source files. This will be very useful for users I think.

I agree it should be fixed so that z80asm uses the actual input files being provided on the command line. There will be cases where z80asm uses a file different than what it is being handed.



------------------------------------------------------------------------------
Post Reply