|
1 # |
|
2 # Fixes krb5-config to produce correct output on Solaris. |
|
3 # |
|
4 # The krb5-config generated in Userland gate produces some superfluous |
|
5 # output, that can even break some consumers: |
|
6 # |
|
7 # $ /usr/bin/krb5-config --libs krb5 |
|
8 # -L/usr/lib/amd64 -R/usr/lib/amd64 -lc -z defs -lkrb5 -lk5crypto -lcom_err |
|
9 # |
|
10 # - default library path and runpath are not required |
|
11 # - explicit paths are 64-bit specific |
|
12 # - explicit linking with libc is not required for shared libraries |
|
13 # - '-z defs' can break samba modules |
|
14 # |
|
15 # Note that we are adding -lc to LDFLAGS in component Makefile, because |
|
16 # Solaris Studio 12.3 and newer no longer auto-adds it for shared objects. |
|
17 # We need -lc for krb5 libs and plugins, but we shouldn't add -lc to |
|
18 # krb5-config output. |
|
19 # |
|
20 # Also note, that we are adding -z defs to LDFLAGS, to achieve complete |
|
21 # dependency closure of krb5 plugins, so that they can be used with RTLD_GROUP. |
|
22 # Using RTLD_GROUP is motivated by symbol clashes avoidance; using direct |
|
23 # bindings is not possible, because we support plugins from outside of Solaris. |
|
24 # |
|
25 # The patch is not intended for upstream contribution. |
|
26 # Patch source: in-house |
|
27 # |
|
28 diff -pur old/src/build-tools/krb5-config.in new/src/build-tools/krb5-config.in |
|
29 --- old/src/build-tools/krb5-config.in 2015-08-14 08:08:25.045131098 -0700 |
|
30 +++ new/src/build-tools/krb5-config.in 2015-08-19 01:45:24.697166086 -0700 |
|
31 @@ -30,10 +30,11 @@ version_string="Kerberos 5 release @KRB5 |
|
32 prefix=@prefix@ |
|
33 exec_prefix=@exec_prefix@ |
|
34 includedir=@includedir@ |
|
35 -libdir=@libdir@ |
|
36 +libdir=/usr/lib |
|
37 CC_LINK='@CC_LINK@' |
|
38 KDB5_DB_LIB=@KDB5_DB_LIB@ |
|
39 -LDFLAGS='@LDFLAGS@' |
|
40 +# explicitly emptying LDFLAGS |
|
41 +LDFLAGS= |
|
42 RPATH_FLAG='@RPATH_FLAG@' |
|
43 PROG_RPATH_FLAGS='@PROG_RPATH_FLAGS@' |
|
44 PTHREAD_CFLAGS='@PTHREAD_CFLAGS@' |
|
45 @@ -207,6 +208,7 @@ if test -n "$do_libs"; then |
|
46 # Assumes /usr/lib is the standard library directory everywhere... |
|
47 if test "$libdir" = /usr/lib; then |
|
48 libdirarg= |
|
49 + PROG_RPATH_FLAGS= |
|
50 else |
|
51 libdirarg="-L$libdir" |
|
52 fi |