Re: LDFLAGS in krb5-config --libs, but not in pkg-config

Greg Hudson <[email protected]> Mon, 2 May 2022 15:38:55 -0400
Newsgroups gmane.comp.encryption.kerberos.devel
Message-ID <[email protected]>
On 5/2/22 14:15, Ken Hornstein wrote:
>> Since apparently not everyone has migrated to pkg-config over time, it
>> might be reasonable to remove LDFLAGS from the krb5-config --libs output.
> 
> FWIW, I kind of depend on the flags being in the --libs output (because
> there's no separate krb5-config --ldflags krb5).  The big thing I need
> from that is the appropriate rpath option.

krb5-config displays part of the value of CC_LINK (as set by configure,
typically from CC_LINK_SHARED as set by config/shlib.conf) with the make
variables substituted via sed:

    lib_flags=`echo $CC_LINK | sed -e 's/\$(CC)//' \

            -e 's/\$(PURE)//' \

            -e 's#\$(PROG_RPATH_FLAGS)#'"$PROG_RPATH_FLAGS"'#' \

            -e 's#\$(PROG_RPATH)#'$libdir'#' \

            -e 's#\$(PROG_LIBPATH)#'$libdirarg'#' \

            -e 's#\$(RPATH_FLAG)#'"$RPATH_FLAG"'#' \

            -e 's#\$(LDFLAGS)#'"$LDFLAGS"'#' \

            -e 's#\$(PTHREAD_CFLAGS)#'"$PTHREAD_CFLAGS"'#' \

            -e 's#\$(CFLAGS)##'`

So we could omit LDFLAGS (substitute it with nothing, like we do for
CFLAGS already) while keeping the rpath options generated by the build
machinery.
_______________________________________________
krbdev mailing list             [email protected]
https://mailman.mit.edu/mailman/listinfo/krbdev