YunQiang Su <s...@gcc.gnu.org> 于2024年6月14日周五 20:12写道: > > PR 115416 > > When we build a cross toolchain, while without --with-sysroot, > target headers are expected in > ${test_exec_prefix}/${target_noncanonical}/sys-include > while it is true only with --with-headers option is used. In other > cases, the path should be > ${test_exec_prefix}/${target_noncanonical}/include > such as Debian's cross toolchain. > > Debian's cross toolchain has directory structures like: > /usr/<triple>/lib > /include > /bin/<binutils-exe> > > For this case, we cannot use "--prefix=/usr --with-sysroot=/", as > gcc/configure will use headers of build, aka in /usr/include to detect > features. And fixinclude also uses the headers of build. > > Let's use the `include` if `sys-include` doesn't exist. > > For Makefile.in, the compare @includedir@ and $(prefix)/include is not > correct, as the --includedir option is used to set where the headers > should be installed. > > gcc: > PR 115415. > configure.ac: Set target_header_dir and CROSS_SYSTEM_HEADER_DIR > to ${test_exec_prefix}/${target_noncanonical}/include when cross > and without --with-sysroot and without --with-headers. > configure: Regenerate. > Makefile.in: Set CROSS_SYSTEM_HEADER_DIR as configure, and don't > compare @includedir@ and $(prefix)/include. > --- > gcc/Makefile.in | 6 +----- > gcc/configure | 8 ++++++-- > gcc/configure.ac | 4 ++++ > 3 files changed, 11 insertions(+), 7 deletions(-) >
Gently ping.