This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Fix fixincludes for canadian cross builds
- From: Bruce Korb <bkorb at gnu dot org>
- To: Yvan Roux <yvan dot roux at linaro dot org>
- Cc: Bernd Edlinger <bernd dot edlinger at hotmail dot de>, "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>, Richard Biener <rguenther at suse dot de>
- Date: Wed, 12 Apr 2017 09:21:25 -0700
- Subject: Re: [PATCH] Fix fixincludes for canadian cross builds
- Authentication-results: sourceware.org; auth=none
- References: <AM4PR0701MB216279A16CA1B1D69DCFE1D7E4400@AM4PR0701MB2162.eurprd07.prod.outlook.com> <ae284938-736a-ae50-1380-86a5e03250fa@gnu.org> <HE1PR0701MB2169068DED45045785AED44BE45C0@HE1PR0701MB2169.eurprd07.prod.outlook.com> <4b114aec-1ab7-7054-1086-a06d3b358a27@gnu.org> <CAD57uCdjjVuo4Us=htfO7w-V=nJOa77VfiMoVpD7-hqW+z4S1A@mail.gmail.com>
I will be unable to look at this for a couple of weeks, so I leave
this to others to look at.
On Wed, Apr 12, 2017 at 8:58 AM, Yvan Roux <yvan.roux@linaro.org> wrote:
> Hi,
>
> On 20 February 2017 at 18:53, Bruce Korb <bkorb@gnu.org> wrote:
>> On 02/18/17 01:01, Bernd Edlinger wrote:
>>> On 02/18/17 00:37, Bruce Korb wrote:
>>>> On 02/06/17 10:44, Bernd Edlinger wrote:
>>>>> I tested this change with different arm-linux-gnueabihf cross
>>>>> compilers, and verified that mkheaders still works on the host system.
>>>>>
>>>>> Bootstrapped and reg-tested on x86_64-pc-linux-gnu.
>>>>> Is it OK for trunk?
>>>>
>>>> As long as you certify that this is correct for all systems we care about:
>>>>
>>>> +BUILD_SYSTEM_HEADER_DIR = `
>>>> + echo $(CROSS_SYSTEM_HEADER_DIR) | \
>>>> + sed -e :a -e 's,[^/]*/\.\.\/,,' -e ta`
>>>>
>>>> that is pretty obtuse sed-speak to me. I suggest a comment
>>>> explaining what sed is supposed to be doing. What should
>>>> "$(CROSS_SYSTEM_HEADER_DIR)" look like?
>>>>
>>>
>>> I took it just from a few lines above, so I thought that comment would
>>> sufficiently explain the syntax:
>>
>> I confess, I didn't pull a new copy of gcc, sorry.
>> So it looks good to me.
>
>
> We just noticed that this patch brakes canadian cross builds when
> configured with --with-build-sysroot, since headers are searched into
> the target sysroot instead of the one specified for builds.
>
> Maybe there's a cleaner way to fix this and avoid the duplication but
> I didn't find another to test if --with-build-sysroot is used. The
> attached patch fixes the issue. Tested with a Full canadian cross
> build for i686-w64-mingw32 host and arm-linux-gnueabihf.
>
> Thanks
> Yvan
>
> 2017-04-12 Yvan Roux <yvan.roux@linaro.org>
>
> * Makefile.in (BUILD_SYSTEM_HEADER_DIR): Set to SYSTEM_HEADER_DIR
> when configured with --with-build-sysroot.