summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIgor Pashev <pashev.igor@gmail.com>2012-07-08 00:00:33 +0000
committerIgor Pashev <pashev.igor@gmail.com>2012-07-08 00:00:33 +0000
commit0bc9be1576ecf0d7e76843ef19ee66f0c4574295 (patch)
treeb5d022bb0fc6811384c829ab01212a0eb16c5e04
parentc1cfa3c81cb7b516d82a2491bb01456416537dcd (diff)
downloaddh-illumos-0bc9be1576ecf0d7e76843ef19ee66f0c4574295.tar.gz
Use CFLAGS for linking shared libs
-rwxr-xr-xdh_illumos_gate20
1 files changed, 20 insertions, 0 deletions
diff --git a/dh_illumos_gate b/dh_illumos_gate
index a186b17..b57ad99 100755
--- a/dh_illumos_gate
+++ b/dh_illumos_gate
@@ -113,6 +113,26 @@ doit('sed', '-r', '-i', '
', $Makefile_master
);
+
+=item Changes to F<illumos-gate/usr/src/lib/Makefile.lib>:
+
+Append C<CFLAGS> to C<BUILD.SO> command, because C<BUILD.SO>
+by default uses C compiler to create shared library.
+
+=cut
+
+my $Makefile_lib = 'illumos-gate/usr/src/lib/Makefile.lib';
+my $Makefile_lib_orig = $Makefile_lib . '.orig';
+if (-f $Makefile_lib) {
+ if (! -e $Makefile_lib_orig) {
+ doit('cp', '-f', $Makefile_lib, $Makefile_lib_orig);
+ }
+ doit('sed', '-r', '-i', '
+ /^BUILD.SO/ s,\$\(CC\),$(CC) $(CFLAGS),;
+ ', $Makefile_lib
+ );
+}
+
=item Create F<illumos-gate/env.sh>
Set C<CODEMGR_WS> to be C<current_dir/illumos-gate>.