Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

allow passing of CFLAGS and CPPFLAGS #786

Closed
veripoolbot opened this issue Jun 12, 2014 · 2 comments
Closed

allow passing of CFLAGS and CPPFLAGS #786

veripoolbot opened this issue Jun 12, 2014 · 2 comments

Comments

@veripoolbot
Copy link
Collaborator


Author Name: Florian Schlichting
Original Redmine Issue: 786 from https://www.veripool.org
Original Date: 2014-06-12
Original Assignee: Florian Schlichting


Hi,

in Debian, we have a need to pass CFLAGS and CPPFLAGS environment variables in order to automatically enable certain hardening features. For this, we have been using the following patch to Makefile.PL, which I'm forwarding for inclusion upstream:

Description: Makefile.PL override OPTIMIZE, so add back hardening flags manually
Author: gregor herrmann <gregoa@debian.org>
Last-Update: 2012-10-08

--- a/Makefile.PL
+++ b/Makefile.PL
@@ -14,6 +14,8 @@
      # Note OPTIMIZE is passed from upper makefile, so this code needed there too.
      # -O2 optimization seems unreasonably slow on nearly every platform.  I give up.
      my $optimize = $Config{optimize};  $optimize =~ s/(^| )-O2( |$)/\1-O\2/g;
+    # pass hardening flags
+    $optimize .= " $ENV{CFLAGS} $ENV{CPPFLAGS}";
      $out .= "OPTIMIZE = $optimize\n";
      if ($Config{osname} =~ /cygwin/i || $Config{archname} =~ /cygwin/i) {
         # Cygwin ExtUtils::MakeMaker ignores our LIBS declaration and says

thanks,
Florian

@veripoolbot
Copy link
Collaborator Author


Original Redmine Comment
Author Name: Wilson Snyder (@wsnyder)
Original Date: 2014-07-09T12:01:28Z


Fixed in git towards next release. Thanks for patching.

@veripoolbot
Copy link
Collaborator Author


Original Redmine Comment
Author Name: Wilson Snyder (@wsnyder)
Original Date: 2014-09-21T13:01:34Z


In 3.406.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant