diff options
author | Igor Pashev <pashev.igor@gmail.com> | 2012-07-08 00:00:33 +0000 |
---|---|---|
committer | Igor Pashev <pashev.igor@gmail.com> | 2012-07-08 00:00:33 +0000 |
commit | 0bc9be1576ecf0d7e76843ef19ee66f0c4574295 (patch) | |
tree | b5d022bb0fc6811384c829ab01212a0eb16c5e04 | |
parent | c1cfa3c81cb7b516d82a2491bb01456416537dcd (diff) | |
download | dh-illumos-0bc9be1576ecf0d7e76843ef19ee66f0c4574295.tar.gz |
Use CFLAGS for linking shared libs
-rwxr-xr-x | dh_illumos_gate | 20 |
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>. |