[PATCH] StackGuard patch for 2.4.0

Greg KH (greg@kroah.com)
Thu, 4 Jan 2001 22:02:41 -0800


--n8g4imXOkfNTN/H1
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

Just because I _know_ someone will ask me if I don't send this out, here
is the patch to allow the kernel to compile with the StackGuard version
of gcc.

thanks,

greg k-h

-- 
greg@(kroah|wirex).com

--n8g4imXOkfNTN/H1 Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="canary-2.4.0.patch"

diff -Naur -X dontdiff linux-2.4.0/Makefile linux-2.4.0-greg/Makefile --- linux-2.4.0/Makefile Thu Jan 4 13:48:13 2001 +++ linux-2.4.0-greg/Makefile Thu Jan 4 21:40:49 2001 @@ -228,6 +228,10 @@ include arch/$(ARCH)/Makefile +# if we have a StackGuard compiler, then we need to turn off the canary death handler stuff +CFLAGS += $(shell if $(CC) -fno-canary-all-functions -S -o /dev/null -xc /dev/null >/dev/null 2>&1; then echo "-fno-canary-all-functions"; fi) +CFLAGS += $(shell if $(CC) -mno-terminator-canary -S -o /dev/null -xc /dev/null >/dev/null 2>&1; then echo "-mno-terminator-canary"; fi) + export CPPFLAGS CFLAGS AFLAGS export NETWORKS DRIVERS LIBS HEAD LDFLAGS LINKFLAGS MAKEBOOT ASFLAGS diff -Naur -X dontdiff linux-2.4.0/arch/i386/boot/compressed/Makefile linux-2.4.0-greg/arch/i386/boot/compressed/Makefile --- linux-2.4.0/arch/i386/boot/compressed/Makefile Tue Mar 7 11:04:12 2000 +++ linux-2.4.0-greg/arch/i386/boot/compressed/Makefile Thu Jan 4 21:40:49 2001 @@ -12,6 +12,12 @@ CFLAGS = $(CPPFLAGS) -O2 -DSTDC_HEADERS ZLDFLAGS = -e startup_32 +# if we have a StackGuard compiler, then we need to turn off the canary death handler stuff +CFLAGS += $(shell if $(CC) -fno-canary-all-functions -S -o /dev/null -xc /dev/null >/dev/null 2>&1; then echo "-fno-canary-all-functions"; fi) +CFLAGS += $(shell if $(CC) -mno-terminator-canary -S -o /dev/null -xc /dev/null >/dev/null 2>&1; then echo "-mno-terminator-canary"; fi) + + + # # ZIMAGE_OFFSET is the load offset of the compression loader # BZIMAGE_OFFSET is the load offset of the high loaded compression loader

--n8g4imXOkfNTN/H1-- - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org Please read the FAQ at http://www.tux.org/lkml/