Skip to content
Snippets Groups Projects
Commit 9309cc90 authored by Wilson Snyder's avatar Wilson Snyder
Browse files

Pass CFLAGS/CPPFLAGS for easier packaging, bug786.

parent c1b1a48c
No related branches found
No related tags found
No related merge requests found
...@@ -5,6 +5,8 @@ indicates the contributor was also the author of the fix; Thanks! ...@@ -5,6 +5,8 @@ indicates the contributor was also the author of the fix; Thanks!
* Verilog::Language 3.405 devel * Verilog::Language 3.405 devel
**** Pass CFLAGS/CPPFLAGS for easier packaging, bug786. [Florian Schlichting]
* Verilog::Language 3.404 2014-06-08 * Verilog::Language 3.404 2014-06-08
......
...@@ -14,6 +14,8 @@ sub MY::postamble { ...@@ -14,6 +14,8 @@ sub MY::postamble {
# Note OPTIMIZE is passed from upper makefile, so this code needed there too. # 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. # -O2 optimization seems unreasonably slow on nearly every platform. I give up.
my $optimize = $Config{optimize}; $optimize =~ s/(^| )-O2( |$)/\1-O\2/g; my $optimize = $Config{optimize}; $optimize =~ s/(^| )-O2( |$)/\1-O\2/g;
# pass hardening flags
$optimize .= " $ENV{CFLAGS} $ENV{CPPFLAGS}";
$out .= "OPTIMIZE = $optimize\n"; $out .= "OPTIMIZE = $optimize\n";
if ($Config{osname} =~ /cygwin/i || $Config{archname} =~ /cygwin/i) { if ($Config{osname} =~ /cygwin/i || $Config{archname} =~ /cygwin/i) {
# Cygwin ExtUtils::MakeMaker ignores our LIBS declaration and says # Cygwin ExtUtils::MakeMaker ignores our LIBS declaration and says
......
...@@ -19,6 +19,8 @@ sub MY::postamble { ...@@ -19,6 +19,8 @@ sub MY::postamble {
} }
# Note OPTIMIZE is passed from upper makefile, so this code needed there too. # Note OPTIMIZE is passed from upper makefile, so this code needed there too.
my $optimize = $Config{optimize}; $optimize =~ s/(^| )-O2( |$)/\1-O\2/g; my $optimize = $Config{optimize}; $optimize =~ s/(^| )-O2( |$)/\1-O\2/g;
# pass hardening flags
$optimize .= " $ENV{CFLAGS} $ENV{CPPFLAGS}";
$out .= "OPTIMIZE = $optimize\n"; $out .= "OPTIMIZE = $optimize\n";
if ($Config{osname} =~ /cygwin/i || $Config{archname} =~ /cygwin/i) { if ($Config{osname} =~ /cygwin/i || $Config{archname} =~ /cygwin/i) {
# Cygwin ExtUtils::MakeMaker ignores our LIBS declaration and says # Cygwin ExtUtils::MakeMaker ignores our LIBS declaration and says
......
...@@ -19,6 +19,8 @@ sub MY::postamble { ...@@ -19,6 +19,8 @@ sub MY::postamble {
} }
# Note OPTIMIZE is passed from upper makefile, so this code needed there too. # Note OPTIMIZE is passed from upper makefile, so this code needed there too.
my $optimize = $Config{optimize}; $optimize =~ s/(^| )-O2( |$)/\1-O\2/g; my $optimize = $Config{optimize}; $optimize =~ s/(^| )-O2( |$)/\1-O\2/g;
# pass hardening flags
$optimize .= " $ENV{CFLAGS} $ENV{CPPFLAGS}";
$out .= "OPTIMIZE = $optimize\n"; $out .= "OPTIMIZE = $optimize\n";
if ($Config{osname} =~ /cygwin/i || $Config{archname} =~ /cygwin/i) { if ($Config{osname} =~ /cygwin/i || $Config{archname} =~ /cygwin/i) {
# Cygwin ExtUtils::MakeMaker ignores our LIBS declaration and says # Cygwin ExtUtils::MakeMaker ignores our LIBS declaration and says
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment