From e42abc641966570528522d61ba625e926e979ac7 Mon Sep 17 00:00:00 2001 From: Andrew Hsieh Date: Wed, 12 Dec 2012 17:09:03 +0800 Subject: Fix ARM GCC 4.6/4.7 fail to links code using 64-bit atomic built-in For ARM w/o dmb a helper function is called for 64-bit atomic built-in, which call __write when helper version is too old. Change to call write instead for Android. See http://code.google.com/p/android/issues/detail?id=41297 Change-Id: I98218576c5223628c0c76870623788f07675f6e5 --- gcc-4.6/gcc/config/arm/linux-atomic-64bit.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'gcc-4.6') diff --git a/gcc-4.6/gcc/config/arm/linux-atomic-64bit.c b/gcc-4.6/gcc/config/arm/linux-atomic-64bit.c index af94c7f4a..90e2ac0e3 100644 --- a/gcc-4.6/gcc/config/arm/linux-atomic-64bit.c +++ b/gcc-4.6/gcc/config/arm/linux-atomic-64bit.c @@ -56,7 +56,11 @@ static void __check_for_sync8_kernelhelper (void) for the user - I'm not sure I can rely on much else being available at this point, so do the same as generic-morestack.c write () and abort (). */ +#if !defined(__ANDROID__) __write (2 /* stderr. */, err, sizeof (err)); +#else + write (2 /* stderr. */, err, sizeof (err)); +#endif abort (); } }; -- cgit v1.2.3