From: segher Date: Mon, 18 Apr 2016 08:57:01 +0000 (+0000) Subject: hsa: Fix bootstrap with older host compilers X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=cfded69eea33fe75655775dc4bf388f16d54eb4a;p=thirdparty%2Fgcc.git hsa: Fix bootstrap with older host compilers We didn't have __builtin_swap16 on all targets before GCC 4.8; hsa-brig tries to use it if the host GCC is 4.6 or up though, breaking bootstrap. This trivial patch fixes it. Noticed on gcc22. * has-brig.c (lendian16): Don't try to use __builtin_bswap16 unless compiling with at least GCC-4.8. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@235096 138bc75d-0d04-0410-961f-82ee72b054a4 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 40986fb83eb6..ff99971783e1 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2016-04-18 Segher Boessenkool + + * has-brig.c (lendian16): Don't try to use __builtin_bswap16 + unless compiling with at least GCC-4.8. + 2016-04-17 Jan Hubicka PR bootstrap/70706 diff --git a/gcc/hsa-brig.c b/gcc/hsa-brig.c index a943e379f554..9c74b9aa0713 100644 --- a/gcc/hsa-brig.c +++ b/gcc/hsa-brig.c @@ -51,7 +51,7 @@ along with GCC; see the file COPYING3. If not see static uint16_t lendian16 (uint16_t val) { -#if GCC_VERSION >= 4006 +#if GCC_VERSION >= 4008 #if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ return val; #elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__