Hi Bernd, On 20 April 2017 at 21:11, Bernd Edlinger <bernd.edlin...@hotmail.de> wrote: > Hi! > > This is my new attempt to clean up the different cross compiler > configurations. It turned out to be a very complicated matter, > so I thought it would be better to postpone it to the stage1. > > In a canadian cross compiler setup we have a different header dir path > for use in the build and later on the target, which is written to > install-tools/mkheaders.conf, so I propose to export SYSTEM_HEADER_DIR > and BUILD_SYSTEM_HEADER_DIR from configure.ac to be used in Makefile.in. > > I also removed unnecessary handling of --with-headers, because > the headers are copied to sys-include and thus it is not necessary to > use the original path here. > > If --with-sysroot or --with-build-sysroot is used the SYSTEM_HEADER_DIR > or BUILD_SYSTEM_HEADER_DIR contain $${sysroot_headers_suffix}, > which is normally an empty string, but on mips it may be something > like "mips-r2" which gets appended to the sysroot for use of fixincludes > but "target_header_dir" which is used in configure to find things like > the GLIBC version it is not used. I assume that that either does > not create problems and is silently ignored, or that people have a > work around, my patch should not change that, however I have not been > able to setup a sysroot for mips*-img-linux* or mips*-mti-linux* which > seem to be the only targets where this might make a difference. > > I have tested all different combinations of --with-sysroot / > --with-build-sysroot. Even a native build with --with-sysroot works. > Except go of course: cross-builds are a no-go area for the go language > in general ;) > > As before I would appreciate your kind help with testing the many > different build setups.
Canadian cross build for i686-w64-mingw32 host and arm-linux-gnueabihf target configured with both --with-sysroot and --with-build-sysroot is okay (with SYSTEM_HEADER_DIR, BUILD_SYSTEM_HEADER_DIR and TARGET_SYSTEM_ROOT containing the good paths). > > So far I have tested native x86_64-pc-linux-gnu and arm-linux-gnueabihf > cross build configurations. And everything looks sane. > > Is it OK for trunk? > > > Thanks > Bernd.