Re: [PATCH] Fix fixincludes for canadian cross builds - next try

2017-04-28 Thread Jeff Law

On 04/20/2017 01:11 PM, Bernd Edlinger 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.


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.


fixinc.diff


2017-04-18  Bernd Edlinger

* configure.ac (SYSTEM_HEADER_DIR, BUILD_SYSTEM_HEADER_DIR,
target_header_dir): Set correctly.
* configure: Regenerated.
* Makefile.in (BUILD_SYSTEM_HEADER_DIR): New make variabe.
(LIMITS_H_TEST, if_multiarch, stmp-fixinc): Use BUILD_SYSTEM_HEADER_DIR
instead of SYSTEM_HEADER_DIR.
OK.  Please watch for fallout.  I'm not entirely sure mingw is working 
right now, but they're often affected by this stuff.


jeff


Re: [PATCH] Fix fixincludes for canadian cross builds - next try

2017-04-21 Thread Yvan Roux
Hi Bernd,

On 20 April 2017 at 21:11, Bernd Edlinger  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.


RE: [PATCH] Fix fixincludes for canadian cross builds - next try

2017-04-20 Thread Matthew Fortune
Bernd Edlinger  writes:
> 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'll try to test this out for you with MIPS. I have changes I want to make
to further improve the cross builds for the mti and img vendor builds so
if there is a bit of fallout I could deal with it then.

Matthew