libtool-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] libtool.m4: Handle "/" as a sysroot more correctly


From: Mike Frysinger
Subject: Re: [PATCH] libtool.m4: Handle "/" as a sysroot more correctly
Date: Tue, 16 Jan 2024 21:14:50 -0500

On 16 Jan 2024 21:47, Richard Purdie wrote:
> If $CC has --sysroot=/, it is a valid configuration however libtool will
> then set lt_sysroot to "/".
> 
> This means references like $lt_sysroot$libdir become //usr/lib instead
> of the more normally expected /usr/lib. This may or may not break something
> but certainly is confusing to the user and gives confusing output. Making
> "/" simply unset lt_sysroot is much cleaner.

could the same argument be made if the returned value is "/opt/sysroot/"
and not just "/opt/sysroot" ?  not sure if gcc forces normalization on its
side.  but we could "simplify" this with:

# Trim trailing / since we'll always append absolute paths and we want
# to avoid //, if only for less confusing output for the user.
lt_sysroot=`$CC --print-sysroot 2>/dev/null | $SED 's:/\+$::'`
-mike

Attachment: signature.asc
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]