This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Make glibc header feature tests handle --with-build-sysroot
On Fri, 9 Mar 2007, Paolo Bonzini wrote:
>
> > if test "x$with_sysroot" = x; then
> > glibc_header_dir="${exec_prefix}/${target_noncanonical}/sys-include"
> > + elif test "x$with_build_sysroot" != "x"; then
> > + glibc_header_dir="${with_build_sysroot}/usr/include"
> > elif test "x$with_sysroot" = xyes; then
> > glibc_header_dir="${exec_prefix}/${target_noncanonical}/sys-root/usr/include"
>
> I don't pretend to know the code in question well. So, I
> would like to know why this was not added as the first
> "if" condition.
Because the first "if" condition is the case for a non-sysrooted
toolchain. --with-build-sysroot is meaningless in the case of a
non-sysrooted toolchain.
I expect
if build sysroot
else if no sysroot at all
else if sysroot at default path "yes"
else if sysroot at specified path
as you suggest would work, but having "no sysroot" in the middle of
sysroot cases would seem odd.
--
Joseph S. Myers
joseph@codesourcery.com