# HG changeset patch # User mduigou # Date 1407972813 0 # Node ID 7ab032af2835378a21f52c36590d88f4f5f91ef0 # Parent ddd28cb3f2b9db47c0027ad8f80b7bdb0ea0a439 8047952: Remove _FORTIFY_SOURCE from fastdebug and slowdebug builds Reviewed-by: dholmes diff -r ddd28cb3f2b9 -r 7ab032af2835 hotspot/make/bsd/makefiles/gcc.make --- a/hotspot/make/bsd/makefiles/gcc.make Wed Aug 13 13:05:04 2014 -0700 +++ b/hotspot/make/bsd/makefiles/gcc.make Wed Aug 13 23:33:33 2014 +0000 @@ -508,13 +508,9 @@ ifeq ($(USE_CLANG),) # Enable bounds checking. - # _FORTIFY_SOURCE appears in GCC 4.0+ ifeq "$(shell expr \( $(CC_VER_MAJOR) \> 3 \) )" "1" - # compile time size bounds checks - FASTDEBUG_CFLAGS += -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1 - - # and runtime size bounds checks and paranoid stack smashing checks. - DEBUG_CFLAGS += -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -fstack-protector-all --param ssp-buffer-size=1 + # stack smashing checks. + DEBUG_CFLAGS += -fstack-protector-all --param ssp-buffer-size=1 endif endif diff -r ddd28cb3f2b9 -r 7ab032af2835 hotspot/make/linux/makefiles/gcc.make --- a/hotspot/make/linux/makefiles/gcc.make Wed Aug 13 13:05:04 2014 -0700 +++ b/hotspot/make/linux/makefiles/gcc.make Wed Aug 13 23:33:33 2014 +0000 @@ -365,16 +365,13 @@ ifeq ($(USE_CLANG),) # Enable bounds checking. - # _FORTIFY_SOURCE appears in GCC 4.0+ ifeq "$(shell expr \( $(CC_VER_MAJOR) \> 3 \) )" "1" - # compile time size bounds checks - FASTDEBUG_CFLAGS += -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1 - - # and runtime size bounds checks and paranoid stack smashing checks. - DEBUG_CFLAGS += -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -fstack-protector-all --param ssp-buffer-size=1 + # stack smashing checks. + DEBUG_CFLAGS += -fstack-protector-all --param ssp-buffer-size=1 endif endif + # If we are building HEADLESS, pass on to VM # so it can set the java.awt.headless property ifdef HEADLESS diff -r ddd28cb3f2b9 -r 7ab032af2835 hotspot/make/solaris/makefiles/gcc.make --- a/hotspot/make/solaris/makefiles/gcc.make Wed Aug 13 13:05:04 2014 -0700 +++ b/hotspot/make/solaris/makefiles/gcc.make Wed Aug 13 23:33:33 2014 +0000 @@ -240,11 +240,7 @@ endif # Enable bounds checking. -# _FORTIFY_SOURCE appears in GCC 4.0+ ifeq "$(shell expr \( $(CC_VER_MAJOR) \> 3 \) )" "1" - # compile time size bounds checks - FASTDEBUG_CFLAGS += -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1 - - # and runtime size bounds checks and paranoid stack smashing checks. - DEBUG_CFLAGS += -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -fstack-protector-all --param ssp-buffer-size=1 + # stack smashing checks. + DEBUG_CFLAGS += -fstack-protector-all --param ssp-buffer-size=1 endif