Commit 9122483a authored by Raymond Toy's avatar Raymond Toy
Browse files

Merge branch 'master' into dynamic-stack-alloc

Conflicts:
	tools/create-target.sh
	tools/load-world.sh
parents d452655e a34b7f0e
Loading
Loading
Loading
Loading
+76 −61
Original line number Diff line number Diff line
@@ -4,8 +4,7 @@
;;; This code was written as part of the CMU Common Lisp project at
;;; Carnegie Mellon University, and has been placed in the public domain.
;;;
(ext:file-comment
  "$Header: src/compiler/main.lisp $")
(ext:file-comment "$Header: src/compiler/main.lisp $")
;;;
;;; **********************************************************************
;;;
@@ -1127,11 +1126,13 @@ in the user USER-INFO slot of STREAM-SOURCE-LOCATIONs.")
	       (setf (default-directory) cwd))))
	 (generate-comment (file-info)
	   (let* ((name (pathname (source-info-stream file-info)))
		  (proc (run-git name)))
	     (if (and proc (zerop (process-exit-code proc)))
		  (proc (run-git name))
		  (comment (and proc (zerop (process-exit-code proc))
				(read-line (process-output proc) nil nil))))
	     (if comment
		 (format nil "$Header: ~A ~A $"
			 (enough-namestring name)
			 (read-line (process-output proc)))
			 comment)
		 (second form)))))
      (cond ((file-info-comment file)
	     (compiler-warning _N"Ignoring extra file comment:~%  ~S." form))
@@ -1800,15 +1801,25 @@ in the user USER-INFO slot of STREAM-SOURCE-LOCATIONs.")
			     *byte-compile-default*)
		            ((:xref *record-xref-info*)
			     *record-xref-info*))
  "Compiles Source, producing a corresponding .FASL file.  Source may be a list
  "Compiles Source, producing a corresponding FASL file.  Source may be a list
  of files, in which case the files are compiled as a unit, producing a single
   .FASL file.  The output file names are defaulted from the first (or only)
   input file name.  Other options available via keywords:
  FASL file.  The output file names are defaulted from the first (or only)
  input file name.  (The use of a list for Source is a CMUCL extension, not
  specified in CLHS.)

  These keywords are supported:

  :Output-File
      The name of the fasl to output, NIL for none, T for the default.
     The name of the FASL to output, NIL for none, T for the default.
     (Note the difference between the treatment of NIL :Output-File
     here and in COMPILE-FILE-PATHNAME.)  The returned pathname of the
     output file may differ from the pathname of the :Output-File
     parameter, e.g. when the latter is a designator for a directory.
  :Load
     Load the compiled file; T here requires :Output-File to be
     non-NIL, as well.  The default for :Load is NIL.
  :Error-File
      The name of the error listing file, NIL for none (the default), T for
      .err.
     The name of the error listing file, NIL for none (the default), T for .err.
  :Trace-File
     If specified, internal data structures are dumped to this file.  T for
     the .trace default.
@@ -1842,10 +1853,10 @@ in the user USER-INFO slot of STREAM-SOURCE-LOCATIONs.")
     If non-NIL, enable recording of cross-reference information.  The default
     is the value of C:*RECORD-XREF-INFO*
  :External-Format
      The external format to use when opening the source file
     The external format to use when opening the source file.
  :Decoding-Error
     How to handle decoding errors in the external format when reading the
      source file.  Default (T) is to signal an error.  Nil means silently
     source file.  Default (T) is to signal an error.  NIL means silently
     continue, replacing the invalid sequence with a suitable replacment
     character."
  (let* ((fasl-file nil)
@@ -1998,7 +2009,7 @@ in the user USER-INFO slot of STREAM-SOURCE-LOCATIONs.")
  be compiled.  IF NAME names a macro, then the compiled expression
  replaces the existing macro-function.  If NAME names a function, the
  compiled expression is placed in the function cell of NAME.  If NAME
  is Nil, the compiled code object is returned."
  is NIL, the compiled code object is returned."
  (with-compilation-unit ()
    (with-ir1-namespace
      (let* ((*backend* *native-backend*)
@@ -2125,8 +2136,12 @@ in the user USER-INFO slot of STREAM-SOURCE-LOCATIONs.")
			      (byte-compile *byte-compile-default*)
			      (output-file t output-file-supplied-p)
			      &allow-other-keys)
  "Return a pathname describing what file COMPILE-FILE would write to given
   these arguments."
  "Return a pathname describing what file COMPILE-FILE would write to
  given these arguments.  The returned pathname of the output file may
  differ from the pathname of the :Output-File parameter, e.g. when
  the latter is a designator for a directory. The CMUCL caveat: NIL is
  accepted for :Output-File there but not here, which is probably not
  in line with CLHS."
  (declare (type (or string pathname stream) input-file)
	   (type (or string pathname stream (member t)) output-file)
	   (values (or null pathname)))
+14 −12
Original line number Diff line number Diff line
@@ -6,7 +6,7 @@

usage ()
{
    echo "build-all.sh [bBCvU] [-o old] [-8 old8bit]"
    echo "build-all.sh [-bBCvUP] [-o old] [-8 old8bit]"
    echo ""
    echo "Build all variants of cmucl for a specific architecture."
    echo "This means build the unicode and non-unicode variants."
@@ -24,20 +24,21 @@ usage ()
    echo '    -C [l m]  Create the build directories.  The args are what'
    echo '               you would give to create-target.sh for the lisp'
    echo '               and motif variant.'
    echo '    -v v      Use the given string as the version.  Default is'
    echo "               today's date"
    echo '    -v v      Use the given string as the version.'
    echo "    -o x      Use specified Lisp to build unicode version."
    echo "               (only applicable for build 1)"
    echo "    -8 x      Use specified Lisp to build 8-bit version."
    echo "               (only applicable for build 1)"
    echo "    -U        Update and overwite the CVS translations files."
    echo "    -U        Update and overwite the translations files."
    echo "    -P        On the last build, (re)generate cmucl.pot and the"
    echo "               translations"
}

VERSION="`date '+%Y-%m-%d %H:%M:%S'`"
BASE=build
CREATE_OPT=""
UPDATE_POT="-P"

while getopts "UB:b:v:C:o:8:?" arg
while getopts "PUB:b:v:C:o:8:?" arg
do
    case $arg in
      b) BASE="$OPTARG" ;;
@@ -47,6 +48,7 @@ do
      8) OLD8="$OPTARG" ;;
      v) VERSION="$OPTARG" ;;
      U) UPDATE_TRANS="-U" ;;
      P) UPDATE_POT="" ;;
      \?) usage ;;
    esac
done
@@ -66,15 +68,15 @@ buildx86 ()
    if [ -n "$OLD8" ]; then
	# Build non-unicode versions
	set -x
	src/tools/build.sh -f x87 -b ${BASE}-8bit $bootfiles -v "$VERSION" -C "${CREATE_OPT}" ${UPDATE_TRANS} -o "$OLD8"
	src/tools/build.sh -f sse2 -b ${BASE}-8bit $bootfiles -v "$VERSION" -C "${CREATE_OPT}" ${UPDATE_TRANS} -o "$OLD8"
	src/tools/build.sh -f x87 -b ${BASE}-8bit $bootfiles ${VERSION:+-v "$VERSION"} -C "${CREATE_OPT}" ${UPDATE_TRANS} ${UPDATE_POT} -o "$OLD8"
	src/tools/build.sh -f sse2 -b ${BASE}-8bit $bootfiles ${VERSION:+-v "$VERSION"} -C "${CREATE_OPT}" ${UPDATE_TRANS} ${UPDATE_POT} -o "$OLD8"
	set +x
    fi
    # Build the unicode versions
    if [ -n "$OLDLISP" ]; then
	set -x
	src/tools/build.sh -f x87 -b ${BASE} $bootfiles -v "$VERSION" -C "${CREATE_OPT}" ${UPDATE_TRANS} -o "$OLDLISP"
	src/tools/build.sh -f sse2 -b ${BASE} $bootfiles -v "$VERSION" -C "${CREATE_OPT}" ${UPDATE_TRANS} -o "$OLDLISP"
	src/tools/build.sh -f x87 -b ${BASE} $bootfiles ${VERSION:+-v "$VERSION"} -C "${CREATE_OPT}" ${UPDATE_TRANS} ${UPDATE_POT} -o "$OLDLISP"
	src/tools/build.sh -f sse2 -b ${BASE} $bootfiles ${VERSION:+-v "$VERSION"} -C "${CREATE_OPT}" ${UPDATE_TRANS} ${UPDATE_POT} -o "$OLDLISP"
	set +x
    fi
}
@@ -84,13 +86,13 @@ buildsun4 ()
    # Build non-unicode versions
    if [ -n "$OLD8" ]; then
	set -x
	src/tools/build.sh -b ${BASE}-8bit $bootfiles -v "$VERSION" -C "$CREATE_OPT" ${UPDATE_TRANS} -o "$OLD8"
	src/tools/build.sh -b ${BASE}-8bit $bootfiles ${VERSION:+-v "$VERSION"} -C "$CREATE_OPT" ${UPDATE_TRANS} ${UPDATE_POT} -o "$OLD8"
	set +x
    fi
    # Build the unicode version.
    if [ -n "$OLDLISP" ]; then
	set -x
	src/tools/build.sh -b ${BASE} $bootfiles -v "$VERSION" -C "$CREATE_OPT" ${UPDATE_TRANS} -o "$OLDLISP"
	src/tools/build.sh -b ${BASE} $bootfiles ${VERSION:+-v "$VERSION"} -C "$CREATE_OPT" ${UPDATE_TRANS} ${UPDATE_POT} -o "$OLDLISP"
	set +x
    fi
}
+1 −1
Original line number Diff line number Diff line
@@ -92,7 +92,7 @@ cd $bld_dir/lisp || quit "Can't cd $bld_dir/lisp"
ln -s ../../src/lisp/GNUmakefile ../../src/lisp/Config.$lisp_variant ../../src/lisp/Config.*_common .
ln -s Config.$lisp_variant Config
[ -n "$motif_variant" ] && (
    cd motif/server || quit "Can't cd motif/server" # We will still continue in the outer shell
    cd ../motif/server || quit "Can't cd motif/server" # We will still continue in the outer shell
    ln -s ../../../src/motif/server/GNUmakefile ./Makefile
    ln -s ../../../src/motif/server/Config.$motif_variant ./Config
)
+4 −4
Original line number Diff line number Diff line
@@ -11,9 +11,9 @@ usage()

SKIP_PCL=
NO_PCL_FEATURE=
# Default version is the date and the git hash
# Default version is the date with the git hash.
GIT_HASH="`(cd src; git describe --dirty 2>/dev/null)`"
VERSION="`date '+%Y-%m-%d %H:%M:%S'`"
VERSION="`date '+%Y-%m-%d %H:%M:%S'`${GIT_HASH:+ $GIT_HASH}"

while getopts "p" arg
do
@@ -41,7 +41,7 @@ fi

# If version string give, use it, otherwise use the default.
if [ -n "$2" ]; then
    VERSION=$2
    VERSION="$2"
fi

$TARGET/lisp/lisp -core $TARGET/lisp/kernel.core <<EOF
@@ -58,6 +58,6 @@ $TARGET/lisp/lisp -core $TARGET/lisp/kernel.core <<EOF
$NO_PCL_FEATURE

(load "target:tools/worldload")
$VERSION $GIT_HASH
$VERSION

EOF