[20366] in Kerberos_V5_Development

home help back first fref pref prev next nref lref last post

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

daemon@ATHENA.MIT.EDU (Greg Hudson)
Mon May 2 15:40:21 2022

Message-ID: <021888ad-1c54-d10b-fb4a-0b46576fa153@mit.edu>
Date: Mon, 2 May 2022 15:38:55 -0400
MIME-Version: 1.0
Content-Language: en-US
To: Ken Hornstein <kenh@cmf.nrl.navy.mil>
CC: <krbdev@mit.edu>
From: Greg Hudson <ghudson@mit.edu>
In-Reply-To: <202205021815.242IF8Ad013091@hedwig.cmf.nrl.navy.mil>
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Errors-To: krbdev-bounces@mit.edu

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             krbdev@mit.edu
https://mailman.mit.edu/mailman/listinfo/krbdev

home help back first fref pref prev next nref lref last post