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
signature.asc
Description: PGP signature