ppisar pushed to perl-Coro (master). "Redefine FORTIFY_SOURCE properly (..more)"

notifications at fedoraproject.org notifications at fedoraproject.org
Mon Jul 13 11:51:11 UTC 2015


From 844e0056ee6c54553aa3b4eac20fbc96150e09c4 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar at redhat.com>
Date: Mon, 13 Jul 2015 13:49:38 +0200
Subject: Redefine FORTIFY_SOURCE properly

Since perl-4:5.22.0-347, we propagate distribution's CFLAGS from
perl's build-time configuration to perl-Coro CFLAGS. So hack for
bug #750805 stopped working and the FORTIFY_SOURCE macro affected
glibc's longjump address assertion.

It turned out that "-Wp,-DFORTIFY_SOURCE=2 -DFORTIFY_SOURCE=0"
produces a warning about redefinition and resulting macro remains
"FORTIFY_SOURCE 2". If macro is defined with -Wp, one has to redefine
it with -Wp too.

diff --git a/perl-Coro.spec b/perl-Coro.spec
index b8c0d39..9b1d010 100644
--- a/perl-Coro.spec
+++ b/perl-Coro.spec
@@ -133,7 +133,7 @@ sed -i -e '/^#!/ s|.*|#!%{__perl}|' %wrong_shbangs
 %build
 # Disable FORTIFY_SOURCE on ARM as it breaks setjmp - RHBZ 750805
 %ifarch %{arm}
-RPM_OPT_FLAGS=$(echo "${RPM_OPT_FLAGS}" | sed -e 's/-Wp,-D_FORTIFY_SOURCE=2/-D_FORTIFY_SOURCE=0/g')
+RPM_OPT_FLAGS="${RPM_OPT_FLAGS} -Wp,-U_FORTIFY_SOURCE -Wp,-D_FORTIFY_SOURCE=0"
 %endif
 
 # Interractive configuration. Use default values.
-- 
cgit v0.10.2


	http://pkgs.fedoraproject.org/cgit/perl-Coro.git/commit/?h=master&id=844e0056ee6c54553aa3b4eac20fbc96150e09c4


More information about the perl-devel mailing list