diff options
author | andrew <andrew@FreeBSD.org> | 2013-01-19 02:24:14 +0000 |
---|---|---|
committer | andrew <andrew@FreeBSD.org> | 2013-01-19 02:24:14 +0000 |
commit | 22ef5193ef80b0ac10e044721a076fa93c1e8742 (patch) | |
tree | 28ad46cbe2cd23b715ded360c500f7ea251ad012 /contrib | |
parent | a3828cafcafb4b83ec86dd76597b91ea2fa9641e (diff) | |
download | FreeBSD-src-22ef5193ef80b0ac10e044721a076fa93c1e8742.zip FreeBSD-src-22ef5193ef80b0ac10e044721a076fa93c1e8742.tar.gz |
Don't use the pcs attribute on compilers that don't support it. We can
revert this when we stop supporting old versions of gcc.
Diffstat (limited to 'contrib')
-rw-r--r-- | contrib/compiler-rt/lib/int_lib.h | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/contrib/compiler-rt/lib/int_lib.h b/contrib/compiler-rt/lib/int_lib.h index 2328a1d..594e812 100644 --- a/contrib/compiler-rt/lib/int_lib.h +++ b/contrib/compiler-rt/lib/int_lib.h @@ -25,7 +25,15 @@ #if __ARM_EABI__ # define ARM_EABI_FNALIAS(aeabi_name, name) \ void __aeabi_##aeabi_name() __attribute__((alias("__" #name))); -# define COMPILER_RT_ABI __attribute__((pcs("aapcs"))) + +# if !defined(__clang__) && defined(__GNUC__) && \ + (__GNUC__ < 4 || __GNUC__ == 4 && __GNUC_MINOR__ < 5) +/* The pcs attribute was introduced in GCC 4.5.0 */ +# define COMPILER_RT_ABI +# else +# define COMPILER_RT_ABI __attribute__((pcs("aapcs"))) +# endif + #else # define ARM_EABI_FNALIAS(aeabi_name, name) # define COMPILER_RT_ABI |