gcc: backport upstream patch for sync_8 in !glibc
authorArnout Vandecappelle <arnout@mind.be>
Mon, 21 Nov 2016 23:43:39 +0000 (00:43 +0100)
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Sat, 26 Nov 2016 14:17:09 +0000 (15:17 +0100)
commit16a4241cb7829e5bf3a010329d38fef992d123ee
treea4bafca025b7d1514e1c4bdd0be72afb9f7547da
parent1938ad4efa3a78275979467b521fb3545c5c6f9e
gcc: backport upstream patch for sync_8 in !glibc

gcc 4.7 introduced the sync_8 builtin functions for ARM. For ARM < v7,
this requires calling into the kernel. However, the failure path of
that call reports an error with the __write() function, which is a
glibc internal function. Therefore, it fails to link with uClibc or
musl. This was fixed in gcc 5.2.0, by replacing the __write() with
a plain write().

For sync_8 itself we have solved this with the conditions on
BR2_TOOLCHAIN_ARM_HAS_SYNC_8. However, the same function is also used
for the implementation of atomics.

For the internal toolchain, we can fix this by backporting the patch
to 4.9.4 and 4.8.5.

Fixes:
http://autobuild.buildroot.net/results/1db64b4830f499621e44523e0ef68191505e2ce9

Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
package/gcc/4.8.5/0001-ARM-PR-target-68059-libgcc-should-not-use-__write-fo.patch [new file with mode: 0644]
package/gcc/4.9.4/0001-ARM-PR-target-68059-libgcc-should-not-use-__write-fo.patch [new file with mode: 0644]