aboutsummaryrefslogtreecommitdiff
path: root/gcc/hsa-brig.c
diff options
context:
space:
mode:
authorSegher Boessenkool <segher@kernel.crashing.org>2016-04-18 10:57:01 +0200
committerSegher Boessenkool <segher@gcc.gnu.org>2016-04-18 10:57:01 +0200
commit939264d3a37d0645de08143b4c4660637ba2a127 (patch)
tree06f5dd72e531f6acafd81e3d05fac91118f50999 /gcc/hsa-brig.c
parentbd5c7330b590af3c5fcd5f4299d7eef60c4864ab (diff)
downloadgcc-939264d3a37d0645de08143b4c4660637ba2a127.zip
gcc-939264d3a37d0645de08143b4c4660637ba2a127.tar.gz
gcc-939264d3a37d0645de08143b4c4660637ba2a127.tar.bz2
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
Diffstat (limited to 'gcc/hsa-brig.c')
-rw-r--r--gcc/hsa-brig.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/hsa-brig.c b/gcc/hsa-brig.c
index a943e37..9c74b9a 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__