avoid -O default for CFLAGS, and document
authorJoey Hess <joey@gnu.kitenet.net>
Wed, 21 Oct 2009 20:27:44 +0000 (16:27 -0400)
committerJoey Hess <joey@gnu.kitenet.net>
Wed, 21 Oct 2009 20:27:47 +0000 (16:27 -0400)
IkiWiki/Wrapper.pm
debian/changelog
doc/usage.mdwn

index 7a1529119ce76be003564297f76b2ce02cd4f11c..5427a5c80b1f0762775231eadb9663b6f8841d2f 100644 (file)
@@ -142,9 +142,9 @@ $pre_exec
 }
 EOF
 
-       my $cc=exists $ENV{CC} ? possibly_foolish_untaint($ENV{CC}) : 'cc';
-       my $cflags=exists $ENV{CFLAGS} ? possibly_foolish_untaint($ENV{CFLAGS}) : '-O';
-       if (system($cc, $cflags, "$wrapper.c", "-o", "$wrapper.new") != 0) {
+       my @cc=exists $ENV{CC} ? possibly_foolish_untaint($ENV{CC}) : 'cc';
+       push @cc, possibly_foolish_untaint($ENV{CFLAGS}) if exists $ENV{CFLAGS};
+       if (system(@cc, "$wrapper.c", "-o", "$wrapper.new") != 0) {
                #translators: The parameter is a C filename.
                error(sprintf(gettext("failed to compile %s"), "$wrapper.c"));
        }
index f6739952ea8f83df36c23b7bba2925d05c3d4ca8..0ff7a0d13fa9709e0800a87e0a047f6de978f90f 100644 (file)
@@ -5,6 +5,7 @@ ikiwiki (3.20091018) UNRELEASED; urgency=low
   * edittemplate: Work around bug #551499 in CGI::FormBuilder.
   * Fix a bug introduced in the last version that caused ikiwiki
     to skip all files if a sourcedir of "./" was specified.
+  * Support CFLAGS when building wrapper.
 
  -- Joey Hess <joeyh@debian.org>  Sun, 18 Oct 2009 13:44:09 -0400
 
index 0c618de5c1eac91ac31b11407c90cc4585e0cab6..4ee935f73eff2f1ef53be8b4865712c051505e6e 100644 (file)
@@ -345,6 +345,10 @@ also be configured using a setup file.
 
   This controls what C compiler is used to build wrappers. Default is 'cc'.
 
+* CFLAGS
+
+  This can be used to pass options to the C compiler when building wrappers.
+
 # SEE ALSO
 
 * [[ikiwiki-mass-rebuild]](8)