Commit 939264d3 by Segher Boessenkool Committed by Segher Boessenkool

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.

From-SVN: r235096
parent bd5c7330
2016-04-18 Segher Boessenkool <segher@kernel.crashing.org>
* has-brig.c (lendian16): Don't try to use __builtin_bswap16
unless compiling with at least GCC-4.8.
2016-04-17 Jan Hubicka <jh@suse.cz>
PR bootstrap/70706
......
......@@ -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__
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment