Re: [cc65] Fwd: Bug in cl65 (?)

From: Ullrich von Bassewitz <uz1musoftware.de>
Date: 2010-04-22 21:04:39
On Thu, Apr 22, 2010 at 02:23:51PM +0200, Oliver Schmidt wrote:
> AFAIK it would be best, if
>
>   cl65 -c src/aaa.c -o obj/bbb.o

Ok, this is the reason for the "bug" (in your last mail). cl65 (as all other
tools) parse the command line from left to right. As soon as a file name is
reached, the corresponding subcommand is executed. So in your case, -o and its
argument are actually ignored.

The reasoning behind this is that you can apply different switches to
different source files on the command line:

  cl65 -S -o foo/test.s -Oirs test.c -T -g -o bar/test1.s -O test1.c

This generates foo/test.s without debug info but with full optimization and
bar/test1.s with less optimization but with debug info and source lines.
                   
So just remember to place your source files at the end of the line and things
will be fine.

> would translate to
>
>   cc65 src/aaa.c -o obj/bbb.s
>   ca65 obj/bbb.s -o obj/bbb.o
>
> for two reasons:
>
> 1. There would be no write access to the source directory (probably
> even readonly).
> 2. The potentially generated .u file would appear as obj/bbb.u
> (matching best the user's expectation).

It's difficult for a tool to try to read the masters mind, and therefore I'm
not sure if not someone else would argue different.

Regards


        Uz


-- 
Ullrich von Bassewitz                                  uz@musoftware.de
----------------------------------------------------------------------
To unsubscribe from the list send mail to majordomo@musoftware.de with
the string "unsubscribe cc65" in the body(!) of the mail.
Received on Thu Apr 22 21:04:49 2010

This archive was generated by hypermail 2.1.8 : 2010-04-22 21:04:52 CEST