Description: <short summary of the patch>
 TODO: Put a short summary on the line above and replace this paragraph
 with a longer explanation of this change. Complete the meta-information
 with other relevant fields (see below for details). To make it easier, the
 information below has been extracted from the changelog. Adjust it or drop
 it.
 .
 gcl (2.6.10-31) unstable; urgency=medium
 .
   * dpkg-buildflags trial
Author: Camm Maguire <camm@debian.org>

---
The information above should follow the Patch Tagging Guidelines, please
checkout http://dep.debian.net/deps/dep3/ to learn about the format. Here
are templates for supplementary fields that you might want to add:

Origin: <vendor|upstream|other>, <url of original patch>
Bug: <url in upstream bugtracker>
Bug-Debian: http://bugs.debian.org/<bugnumber>
Bug-Ubuntu: https://launchpad.net/bugs/<bugnumber>
Forwarded: <no|not-needed|url proving that it has been forwarded>
Reviewed-By: <name and email of someone who approved the patch>
Last-Update: <YYYY-MM-DD>

--- gcl-2.6.10.orig/h/arm-linux.h
+++ gcl-2.6.10/h/arm-linux.h
@@ -37,3 +37,5 @@
 #define SGC
 
 #define RELOC_H "elf32_arm_reloc.h"
+
+#define NEED_STACK_CHK_GUARD
--- gcl-2.6.10.orig/h/sh4-linux.h
+++ gcl-2.6.10/h/sh4-linux.h
@@ -55,3 +55,5 @@
 }
 #endif
 #define RELOC_H "elf32_sh4_reloc.h"
+
+#define NEED_STACK_CHK_GUARD
--- gcl-2.6.10.orig/man/man1/gcl.1
+++ gcl-2.6.10/man/man1/gcl.1
@@ -1,6 +1,6 @@
 .TH GCL 1L "17 March 1997"
 .SH NAME
-gcl \- GCL Common Lisp interpreter/compiler
+gcl \- GCL Common Lisp interpreter/compiler, CVS snapshot
 .SH SYNOPSIS
 .B gcl
 [
@@ -20,11 +20,11 @@ new standard.
 The best documentation is available in
 .I texinfo/info
 form, with there being three groups of information.
-.I gcl-si
+.I gcl\-si
 for basic common lisp descriptions, and features unique to
 .I gcl
 The
-.I gcl-tk
+.I gcl\-tk
 info refers to the connection with
 .I tk
 window system, allowing all the power of the
@@ -37,17 +37,15 @@ tries to adhere.   It is highly recommen
 which will be in the intersection of gcl and ansi common lisp.
 Unfortunately the Ansi standard is huge, and will require a substantial
 effort, and increase in the size of gcl, to include all of it.
-.RE
 .LP
 When
 .I gcl
 is invoked from the shell, the variable
-.I si::*command-args*
+.I si::*command\-args*
 is set to the list of command line arguments.
 Various
 .I options
 are understood:
-.RE
 .TP
 .BR \-eval\ command 
 .RB
@@ -56,7 +54,7 @@ Call read and then eval on the
 .TP
 .B \-\-
 .RB
-Stop processing arguments, setting si::*command-args* to a list
+Stop processing arguments, setting si::*command\-args* to a list
 containing the arguments after the
 .BR \-\- .
 .TP
@@ -67,27 +65,22 @@ Load the file whose
 is specified after
 .BR \-load .
 .TP
-.BR \-f\ [pathname]
-.RB
 Open the file following
-.B \-f
-for input (or use *standard-input* if not supplied), skip the first line, and
+.BR \-f  for input, skip the first line, and
 then read and eval the rest of the forms in the file.
-Replaces si::*command-args* by the the list starting after
-.B \-f
-switch.  This can be used as with the shells to write small shell
-programs:
+Replaces si::*command\-args* by the the list starting after
+.BR \-f .   This can
+be used as with the shells to write small shell programs:
 
 .LP
 .br
-#!/usr/local/bin/gcl.exe -f
+#!/usr/local/bin/gcl.exe \-f
 .br
-(format t "hello world ~a~%" (nth 1 si::*command-args*))
-.RE
+(format t "hello world ~a~%" (nth 1 si::*command\-args*))
 
 .BR
 The value
-.I si::*command-args*
+.I si::*command\-args*
 will have the appropriate value.
 Thus if the above 2 line file is made executable and called
 .I foo
@@ -99,15 +92,14 @@ then
 tutorial% foo billy
 .br
 hello world billy
-.RE
 
 .BR
 NOTE:  On many systems (eg SunOs) the first line of an executable
 script file such as:
 .BR
-#!/usr/local/bin/gcl.exe -f
+#!/usr/local/bin/gcl.exe \-f
 only reads the first 32 characters!   So if your pathname where
-the executable together with the '-f' amount to more than 32
+the executable together with the '\-f' amount to more than 32
 characters the file will not be recognized.   Also the executable
 must be the actual large binary file, [or a link to it], and not
 just a
@@ -123,10 +115,9 @@ executable:
 .LP
 .LP
 .br
-tutorial% gcl -f foo "from bill"
+tutorial% gcl \-f foo "from bill"
 .br
 hello world from bill
-.RE
 
 .TP
 .B \-batch
@@ -141,104 +132,97 @@ License information, it must print the G
 .RB
 Directory where the executable binary that is running is located.
 Needed by save and friends.  This gets set as
-si::*system-directory*
+si::*system\-directory*
 
 .TP
 .B \-libdir
 .RB
 .BR \-libdir
-.I /d/wfs/gcl-2.0/
+.I /d/wfs/gcl\-2.0/
 .RB
 
-would mean that the files like gcl-tk/tk.o would be found by
+would mean that the files like gcl\-tk/tk.o would be found by
 concatting the path to the libdir path, ie in
-.RB /d/wfs/gcl-2.0/gcl-tk/tk.o
+.RB /d/wfs/gcl\-2.0/gcl\-tk/tk.o
 
 .TP
 .B \-compile
 .RB
 Invoke the compiler on the filename following
 .BR \-compile
-.  Other
-flags affect compilation.
+.
+Other flags affect compilation.
 
 .TP
-.B \-o-file
+.B \-o\-file
 .RB
 If nil follows
-.BR \-o-file
+.BR \-o\-file
 then do not produce an
 .I .o
 file.
 
 .TP
-.B \-c-file
+.B \-c\-file
 .RB
 If
-.BR \-c-file
+.BR \-c\-file
 is specified, leave the intermediate
 .I .c
 file there.
 
 .TP
-.B \-h-file
+.B \-h\-file
 .RB     If
-.BR \-h-file
+.BR \-h\-file
 is specified, leave the intermediate
 .I .h
 file there.
 
 .TP
-.B \-data-file
+.B \-data\-file
 .RB     If
-.BR \-data-file
+.BR \-data\-file
 is specified, leave the intermediate
 .I .data
 file
 there.
 
 .TP
-.B \-system-p
+.B \-system\-p
 .RB     If
-.BR \-system-p
+.BR \-system\-p
 is specified then invoke
-.I compile-file
+.I compile\-file
 with the
-.I :system-p t
+.I :system\-p t
 keyword argument, meaning that the C init function
 will bear a name based on the name of the file, so that it may be
 invoked by name by C code.
 
-
-
-
 This GNU package should not be confused with the proprietary program
-distributed by FRANZ, Inc.
-Nor should it be confused with the public domain \*(Fl or the proprietary
-\*(Li.
-For anything other than program development,
-use of the lisp compiler \fIglc\fP(1L) is strongly
-recommended in preference to use of the interpreter,
-due to much higher speed.
+distributed by FRANZ, Inc.  Nor should it be confused with any public
+domain or proprietary lisp system.  
+
+For anything other than program development, use of the lisp compiler
+is strongly recommended in preference to use of the interpreter, due
+to much higher speed.
 .\".LP
 .\"This program may be used in conjunction with the UCSF
 .\".I batchqueue
 .\"system.
 .\".SH "LOCAL ACCESS"
-.\"Locally, access to all L\s-2ISP\s0 systems is made through a shared
-.\"interactive front-end which assumes that the job is be run in batch mode
+.\"Locally, access to all LISP systems is made through a shared
+.\"interactive front\-end which assumes that the job is be run in batch mode
 .\"unless the \fB\-i\fP option is activated, which starts an interactive session.
 .\"Interactive sessions are limited to 30 cpu minutes.
 .SH FILES
 .TP
-\fI/site/subsys/gcl/bin/gcl
-executable file
-.TP
-\fI/site/subsys/gcl/bin/gclc
-compiler
+\fI/usr/bin/gcl
+executable shell script wrapper
 .TP
-\fI/usr/include/cmpinclude.h
-C library file
+\fI/usr/lib/gcl\-version/unixport/saved[_flavor]_gcl
+executable lisp images
 .SH "SEE ALSO"
 .sp
 \fICommon LISP: The Language\fP, Guy L. Steele, Jr., Digital Press, Bedford, MA,
@@ -248,7 +232,7 @@ C library file
 .SH AUTHORS
 
 The GCL system contains C and Lisp source files to build a Common Lisp
-sytem.  
+system.  
 CGL is derived from Kyoto Common LISP (\fIkcl\fP),
 which was written in 1984 by T. Yuasa and M. Hagiya
 (working under Professor R. Nakajima at the Research
--- gcl-2.6.10.orig/o/package.d
+++ gcl-2.6.10/o/package.d
@@ -743,7 +743,7 @@ delete_package(object n) {
     }
   
     if (type_of(n)!=t_package)	
-       FEpackage_error(n,"No such pachage.");
+       FEpackage_error(n,"No such package.");
 
   return(Cnil);
   
--- gcl-2.6.10.orig/o/prelink.c
+++ gcl-2.6.10/o/prelink.c
@@ -2,6 +2,10 @@
 
 #include "include.h"
 
+#ifdef NEED_STACK_CHK_GUARD
+unsigned long __stack_chk_guard;
+#endif
+
 void
 prelink_init(void) {
   
@@ -15,5 +19,19 @@ prelink_init(void) {
   my_rl_line_buffer=rl_line_buffer;
 #endif
 
+#ifdef NEED_STACK_CHK_GUARD
+  if (!raw_image) {
+    object y;
+    vs_top=vs_base;
+    vs_push(Ct);
+    Lmake_random_state();
+    y=vs_pop;
+    vs_push(number_negate(find_symbol(make_simple_string("MOST-NEGATIVE-FIXNUM"),system_package)->s.s_dbind));
+    vs_push(y);
+    Lrandom();
+    __stack_chk_guard=fixint(vs_pop);
+  }
+#endif
+
 }
 
--- gcl-2.6.10.orig/pcl/gcl_pcl_cache.lisp
+++ gcl-2.6.10/pcl/gcl_pcl_cache.lisp
@@ -1505,7 +1505,7 @@
 		(to-line free))
 	    (declare (type non-negative-fixnum to-line))
 	    (if (line-reserved-p to-line)
-		(error "transfering something into a reserved cache line.")
+		(error "transferring something into a reserved cache line.")
 		(let ((from-loc (line-location from-line))
 		      (to-loc (line-location to-line)))
 		  (declare (type non-negative-fixnum from-loc to-loc))
