summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIgor Pashev <pashev.igor@gmail.com>2015-10-18 11:05:50 +0300
committerIgor Pashev <pashev.igor@gmail.com>2015-10-18 11:07:38 +0300
commite783b5c0fd9d30b90207ff67f1a9d705c18f6113 (patch)
tree3edaaa27b01c63b343a88a40b0b4a310e715acef
parent794242f2d5423548a2c501aef9671bf4db5b6488 (diff)
downloaddh-illumos-e783b5c0fd9d30b90207ff67f1a9d705c18f6113.tar.gz
Unset LDFLAGS (for sure) and CFLAGS (just in case)
-rwxr-xr-xdh_illumos_gate8
1 files changed, 6 insertions, 2 deletions
diff --git a/dh_illumos_gate b/dh_illumos_gate
index 76a681e..e639b1c 100755
--- a/dh_illumos_gate
+++ b/dh_illumos_gate
@@ -485,8 +485,9 @@ Define C<LEX> to be C</usr/bin/flex -l>.
Export all C<DEB_*> variables (using C<dpkg-architecture -s>)
to make them available from makefiles.
-Unsets C<CPPFLAGS>. Many related variables are unset by F<bldenv.sh>,
-but this one. It breaks build.
+Unsets C<CPPFLAGS>, C<CFLAGS>, C<LDFLAGS>.
+Many related variables are unset by F<bldenv.sh>,
+but these ones. They break build.
=cut
@@ -527,7 +528,9 @@ if ( open( ENV, '>', $env ) ) {
print ENV "export DEB_USRLIBDIR_32='/$usrlibdir32'\n";
print ENV "export DEB_LIBDIR_64='/$libdir64'\n";
print ENV "export DEB_USRLIBDIR_64='/$usrlibdir64'\n";
+ print ENV "unset CFLAGS\n";
print ENV "unset CPPFLAGS\n";
+ print ENV "unset LDFLAGS\n";
print ENV
"export LDLIBS32=\"-L\$ROOT/\$DEB_LIBDIR_32 -L\$ROOT/\$DEB_USRLIBDIR_32\"\n";
print ENV
@@ -556,6 +559,7 @@ with option C<--without-ctf>.
my $bldenv_sh_orig = $dh{DESTDIR} . '/usr/src/tools/scripts/bldenv.sh';
my $bldenv_sh = $dh{DESTDIR} . '/usr/bldenv.sh';
+
if ( -f $bldenv_sh_orig ) {
doit( 'cp', '-f', $bldenv_sh_orig, $bldenv_sh );
doit(