8047952: Remove _FORTIFY_SOURCE from fastdebug and slowdebug builds
Reviewed-by: dholmes
--- 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
--- 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
--- 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