summaryrefslogtreecommitdiff
path: root/defs
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-03-25 01:30:07 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-03-25 01:30:07 +0000
commitb8c376cb9d91854fd40f6e06f07773404899b54f (patch)
tree27d7cbc1cc660084d76d8b1f86b11799486f97e1 /defs
parentc54e268a1f5def2bbf6dadb0485aa1455f98e85d (diff)
defs/gmake.mk: no _FORTIFY_SOURCE unless optimization
* defs/gmake.mk (XCFLAGS): remove _FORTIFY_SOURCE if optimization is disabled as it requires compiling with optimization. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45402 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'defs')
-rw-r--r--defs/gmake.mk4
1 files changed, 4 insertions, 0 deletions
diff --git a/defs/gmake.mk b/defs/gmake.mk
index 0acb88ef57..5c83d9d5f8 100644
--- a/defs/gmake.mk
+++ b/defs/gmake.mk
@@ -5,6 +5,10 @@ TEST_TARGETS := $(patsubst test-%,yes-test-%,$(patsubst btest-%,yes-btest-%,$(TE
TEST_DEPENDS := $(if $(TEST_TARGETS),$(filter all main exts,$(MAKECMDGOALS)))
TEST_DEPENDS += $(TEST_DEPENDS) $(if $(filter check%,$(MAKECMDGOALS)),main)
+ifneq ($(filter -O0 -Od,$(optflags)),)
+override XCFLAGS := $(filter-out -D_FORTIFY_SOURCE=%,$(XCFLAGS))
+endif
+
ifneq ($(filter check% test,$(MAKECMDGOALS)),)
yes-test-knownbug: $(TEST_DEPENDS) yes-btest-ruby
yes-btest-ruby: $(TEST_DEPENDS) yes-test-sample