1 # Copyright 2008 Sun Microsystems, Inc. All rights reserved. |
|
2 # Use subject to license terms. |
|
3 # |
|
4 # Permission is hereby granted, free of charge, to any person obtaining a |
|
5 # copy of this software and associated documentation files (the |
|
6 # "Software"), to deal in the Software without restriction, including |
|
7 # without limitation the rights to use, copy, modify, merge, publish, |
|
8 # distribute, and/or sell copies of the Software, and to permit persons |
|
9 # to whom the Software is furnished to do so, provided that the above |
|
10 # copyright notice(s) and this permission notice appear in all copies of |
|
11 # the Software and that both the above copyright notice(s) and this |
|
12 # permission notice appear in supporting documentation. |
|
13 # |
|
14 # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS |
|
15 # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF |
|
16 # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT |
|
17 # OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR |
|
18 # HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL |
|
19 # INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING |
|
20 # FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, |
|
21 # NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION |
|
22 # WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. |
|
23 # |
|
24 # Except as contained in this notice, the name of a copyright holder |
|
25 # shall not be used in advertising or otherwise to promote the sale, use |
|
26 # or other dealings in this Software without prior written authorization |
|
27 # of the copyright holder. |
|
28 |
|
29 Pass -R flags through to linker, add -lc when building .so files |
|
30 |
|
31 --- bin/mklib 2006-04-20 18:03:51.000000000 -0700 |
|
32 +++ bin/mklib 2006-11-08 15:51:57.924308000 -0800 |
|
33 @@ -61,6 +61,8 @@ |
|
34 echo ' -patch N specifies patch version number (default is 0)' |
|
35 echo ' -lLIBRARY specifies a dependency on LIBRARY' |
|
36 echo ' -LDIR search in DIR for library dependencies' |
|
37 + echo ' -RDIR search in DIR for library dependencies' |
|
38 + echo ' -Wl explicitly pass flags through to linker' |
|
39 echo ' -linker L explicity specify the linker program to use (eg: gcc, g++)' |
|
40 echo ' Not observed on all systems at this time.' |
|
41 echo ' -cplusplus link with C++ runtime' |
|
42 @@ -100,6 +101,9 @@ |
|
43 -L*) |
|
44 DEPS="$DEPS $1" |
|
45 ;; |
|
46 + -R*|-Wl*) |
|
47 + DEPS="$DEPS $1" |
|
48 + ;; |
|
49 '-cplusplus') |
|
50 CPLUSPLUS=1 |
|
51 ;; |
|
52 @@ -288,6 +293,10 @@ |
|
53 fi |
|
54 echo "mklib: Making SunOS shared library: " ${LIBNAME} |
|
55 |
|
56 + # Solaris linker requires expliciting listing libc in shared |
|
57 + # object dependencies |
|
58 + DEPS="${DEPS} -lc" |
|
59 + |
|
60 if [ "x$LINK" = "x" ] ; then |
|
61 # -linker was not specified, choose default linker now |
|
62 if [ $CPLUSPLUS = 1 ] ; then |
|