[Top][All Lists]

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

[Gcl-devel] GCL's COMPILE-FILE when :OUTPUT-FILE is specified

From: Gabriel Dos Reis
Subject: [Gcl-devel] GCL's COMPILE-FILE when :OUTPUT-FILE is specified
Date: 19 Aug 2007 13:54:07 -0500

Camm --

GCL-2.6.8pre's COMPILE-FILE seems to partially ignore the value for
:OUTPUT-FILE.  Consider the following testcase:

   address@hidden:~/tmp> cat foo/bar.lisp
   (format t "Hello World~%")
   address@hidden:~/tmp> gcl
   GCL (GNU Common Lisp)  2.6.8 CLtL1    Apr  7 2007 11:02:56
   Source License: LGPL(gcl,gmp), GPL(unexec,bfd,xgcl)
   Binary License:  GPL due to GPL'ed components: (READLINE BFD UNEXEC)
   Modifications of this banner must retain notice of a compatible
   Dedicated to the memory of W. Schelter

   Use (help) to get some basic information on how to use GCL.
   Temporary directory for compiler files set to /tmp/

   >(trace compile-file)

   Warning: COMPILE-FILE is being redefined.

   >(compile-file "foo/bar.lisp" :output-file "bar.o")

     1> (COMPILE-FILE "foo/bar.lisp" :OUTPUT-FILE "bar.o")
   Compiling foo/bar.lisp.
   End of Pass 1.  
   End of Pass 2.  
   OPTIMIZE levels: Safety=0 (No runtime error checking), Space=0,
   Finished compiling bar.o.
     <1 (COMPILE-FILE #p"foo/bar.o")


I would have expected COMPILE-FILE to put the resulting FASL in
bar.o, not foo/bar.o.  SBCL behaves the same.  CLISP respects
the :OUTPUT-FILE value.  ECL also respects the :OUTPUT-FILE value.
So that gives 2-2 -- but I find GCL and SBCL's behaviour "surprising".

ANSI Common Lisp says that the actual pathname of the compiled file to
which compiled code will be output is computed as if by calling
does not follow ANSI Common Lisp API.

What do you suggest for convincing GCL to actually follows the intent
of putting the compiled code in the file specified for :OUTPUT-FILE?
Notice that in many cases, the specified output file will not have a
:directory part.

-- Gaby

reply via email to

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