This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH, libstdc++] Fix detection of posix_memalig for cross-builds
- From: Christophe Lyon <christophe dot lyon at linaro dot org>
- To: Bernd Edlinger <bernd dot edlinger at hotmail dot de>
- Cc: "libstdc++ at gcc dot gnu dot org" <libstdc++ at gcc dot gnu dot org>, "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>, Jonathan Wakely <jwakely at redhat dot com>
- Date: Wed, 30 Nov 2016 22:32:31 +0100
- Subject: Re: [PATCH, libstdc++] Fix detection of posix_memalig for cross-builds
- Authentication-results: sourceware.org; auth=none
- References: <AM4PR0701MB2162A9E9F378D3BF2D9BE6E6E48C0@AM4PR0701MB2162.eurprd07.prod.outlook.com>
On 30 November 2016 at 20:00, Bernd Edlinger <bernd.edlinger@hotmail.de> wrote:
> Hi,
>
> I noticed that a cross-compiler produces an unusable libstdc++.so
> that contains an unresolved reference to aligned_alloc instead of
> posix_memalign, or whatever is actually available.
>
> Therefore it is impossible to link any C++ programs against the
> libstdc++.so that comes with the cross-compiler.
>
> That happens for instance in the following configuration:
> --target=arm-linux-gnueabihf.
>
How could this be unnoticed so far?
> The attached patch adds a link test for the memalign function
> and fixes the cross-build for me.
>
> Is it OK for trunk?
>
>
> Thanks
> Bernd.