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: Roumen Petrov
Subject: Re: [PATCH] libtool.m4: Handle "/" as a sysroot more correctly
Date: Wed, 17 Jan 2024 09:32:56 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Firefox/91.0 SeaMonkey/2.53.18

Hi All,

Mike Frysinger wrote:
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:

I cannot see reason /path/ vs /path1 to be considered as critical.

But / vs empty is another story.
Prefix // means UNC name in some build environments.

# 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:/\+$::'`

May be issues is from cygwin build environment.

-mike

Regards,
Roumen



reply via email to

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