From b8c376cb9d91854fd40f6e06f07773404899b54f Mon Sep 17 00:00:00 2001 From: nobu Date: Tue, 25 Mar 2014 01:30:07 +0000 Subject: [PATCH] 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 --- defs/gmake.mk | 4 ++++ 1 file changed, 4 insertions(+) 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