aboutsummaryrefslogtreecommitdiff
path: root/IkiWiki/Wrapper.pm
diff options
context:
space:
mode:
authorGiulio Eulisse <giulio.eulisse@cern.ch>2009-10-19 09:40:45 +0200
committerJoey Hess <joey@gnu.kitenet.net>2009-10-21 16:10:14 -0400
commit990a4b99b00c162da218f951041fed50c4259049 (patch)
treeeb854a1f4f912015284bfd0f2bef082501eeed21 /IkiWiki/Wrapper.pm
parent037d5d5296ad0073a1acbb05c4cfd6461b49d1fd (diff)
downloadikiwiki-990a4b99b00c162da218f951041fed50c4259049.tar
ikiwiki-990a4b99b00c162da218f951041fed50c4259049.tar.gz
Pick up user specified CFLAGS when compiling the wrapper.
(cherry picked from commit 13e9383b48857daa206387f3486eb00e3b171a68)
Diffstat (limited to 'IkiWiki/Wrapper.pm')
-rw-r--r--IkiWiki/Wrapper.pm3
1 files changed, 2 insertions, 1 deletions
diff --git a/IkiWiki/Wrapper.pm b/IkiWiki/Wrapper.pm
index ff110b5ff..7a1529119 100644
--- a/IkiWiki/Wrapper.pm
+++ b/IkiWiki/Wrapper.pm
@@ -143,7 +143,8 @@ $pre_exec
EOF
my $cc=exists $ENV{CC} ? possibly_foolish_untaint($ENV{CC}) : 'cc';
- if (system($cc, "$wrapper.c", "-o", "$wrapper.new") != 0) {
+ my $cflags=exists $ENV{CFLAGS} ? possibly_foolish_untaint($ENV{CFLAGS}) : '-O';
+ if (system($cc, $cflags, "$wrapper.c", "-o", "$wrapper.new") != 0) {
#translators: The parameter is a C filename.
error(sprintf(gettext("failed to compile %s"), "$wrapper.c"));
}