Pick up user specified CFLAGS when compiling the wrapper.

(cherry picked from commit 13e9383b48857daa206387f3486eb00e3b171a68)
master
Giulio Eulisse 2009-10-19 09:40:45 +02:00 committed by Joey Hess
parent 037d5d5296
commit 990a4b99b0
1 changed files with 2 additions and 1 deletions

View File

@ -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"));
}