Messages in this thread Patch in this message | | | Date | Fri, 11 Aug 2000 16:29:16 -0700 | From | Greg KH <> | Subject | [patch] 2.4.0-pre6 StackGuard gcc makefile fix |
| |
Here's a patch against 2.4.0-pre6 that enables you to compile the kernel if you have either of the two released version of the StackGuard compiler. If you are not using a StackGuard version of gcc, then this patch does nothing (i.e. no matter which compiler you are using, your kernel build will just work.)
If anyone has any questions about it, please let me know.
thanks,
greg k-h
-- greg@(kroah|wirex).com diff -Naur -X dontdiff linux-2.4.0-test6/Makefile linux-2.4.0-test6-greg/Makefile --- linux-2.4.0-test6/Makefile Wed Aug 9 22:28:50 2000 +++ linux-2.4.0-test6-greg/Makefile Fri Aug 11 15:54:23 2000 @@ -91,6 +91,15 @@ AFLAGS := -D__ASSEMBLY__ $(CPPFLAGS) # +# 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) + + + +# # ROOT_DEV specifies the default root-device when making the image. # This can be either FLOPPY, CURRENT, /dev/xxxx or empty, in which case # the default of FLOPPY is used by 'build'. diff -Naur -X dontdiff linux-2.4.0-test6/arch/i386/boot/compressed/Makefile linux-2.4.0-test6-greg/arch/i386/boot/compressed/Makefile --- linux-2.4.0-test6/arch/i386/boot/compressed/Makefile Tue Mar 7 11:04:12 2000 +++ linux-2.4.0-test6-greg/arch/i386/boot/compressed/Makefile Fri Aug 11 15:54:23 2000 @@ -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 | |