[PATCH, libstdc++] Fix detection of posix_memalig for cross-builds

Bernd Edlinger bernd.edlinger@hotmail.de
Wed Nov 30 19:01:00 GMT 2016


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.

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.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch-libstdc-cross.diff
Type: text/x-patch
Size: 1406 bytes
Desc: patch-libstdc-cross.diff
URL: <http://gcc.gnu.org/pipermail/libstdc++/attachments/20161130/176278ae/attachment.bin>


More information about the Libstdc++ mailing list