From 62aede9866577e45deae9f6cd255969f398d1249 Mon Sep 17 00:00:00 2001 From: Mikhail Komarov Date: Fri, 24 Jul 2020 19:41:49 +0300 Subject: [PATCH 1/3] Initial target attribute definition implemented #1 --- include/boost/config/compiler/clang.hpp | 3 +++ include/boost/config/compiler/gcc.hpp | 5 ++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/include/boost/config/compiler/clang.hpp b/include/boost/config/compiler/clang.hpp index 9d8ba7d71..0e5905a77 100644 --- a/include/boost/config/compiler/clang.hpp +++ b/include/boost/config/compiler/clang.hpp @@ -351,3 +351,6 @@ // Macro used to identify the Clang compiler. #define BOOST_CLANG 1 +#if (__clang_major__ >= 3) && (__clang_minor__ >= 8) +# define BOOST_ATTRIBUTE_TARGET(isa) __attribute__ ((target(isa))) +#endif \ No newline at end of file diff --git a/include/boost/config/compiler/gcc.hpp b/include/boost/config/compiler/gcc.hpp index da1a43229..a17c91c0d 100644 --- a/include/boost/config/compiler/gcc.hpp +++ b/include/boost/config/compiler/gcc.hpp @@ -242,7 +242,7 @@ // C++0x features in 4.7.n and later // #if (BOOST_GCC_VERSION < 40700) || !defined(BOOST_GCC_CXX11) -// Note that while constexpr is partly supported in gcc-4.6 it's a +// Note that while constexpr is partly supported in gcc-4.6 it's a // pre-std version with several bugs: # define BOOST_NO_CXX11_CONSTEXPR # define BOOST_NO_CXX11_FINAL @@ -373,3 +373,6 @@ # endif #endif +#if (BOOST_GCC_VERSION >= 40800) +# define BOOST_ATTRIBUTE_TARGET(isa) __attribute__ ((target(isa))) +#endif \ No newline at end of file From 9d5de40573dfc4e0830eac815b8a56d9fb8eb435 Mon Sep 17 00:00:00 2001 From: Mikhail Komarov Date: Fri, 24 Jul 2020 20:57:19 +0300 Subject: [PATCH 2/3] Clang version detection fixes #1 --- include/boost/config/compiler/clang.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/boost/config/compiler/clang.hpp b/include/boost/config/compiler/clang.hpp index 0e5905a77..b6c72a6b0 100644 --- a/include/boost/config/compiler/clang.hpp +++ b/include/boost/config/compiler/clang.hpp @@ -351,6 +351,6 @@ // Macro used to identify the Clang compiler. #define BOOST_CLANG 1 -#if (__clang_major__ >= 3) && (__clang_minor__ >= 8) +#if (__clang_major__ >= 4 || (__clang_major__ >= 3 && __clang_minor__ >= 8)) # define BOOST_ATTRIBUTE_TARGET(isa) __attribute__ ((target(isa))) #endif \ No newline at end of file From b532d01d2ad164441c6115b8afb0ec5a5900f468 Mon Sep 17 00:00:00 2001 From: Mikhail Komarov Date: Fri, 24 Jul 2020 23:19:33 +0300 Subject: [PATCH 3/3] Minor changes #1 --- include/boost/config/compiler/clang.hpp | 2 +- include/boost/config/compiler/gcc.hpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/boost/config/compiler/clang.hpp b/include/boost/config/compiler/clang.hpp index b6c72a6b0..148178859 100644 --- a/include/boost/config/compiler/clang.hpp +++ b/include/boost/config/compiler/clang.hpp @@ -353,4 +353,4 @@ #if (__clang_major__ >= 4 || (__clang_major__ >= 3 && __clang_minor__ >= 8)) # define BOOST_ATTRIBUTE_TARGET(isa) __attribute__ ((target(isa))) -#endif \ No newline at end of file +#endif diff --git a/include/boost/config/compiler/gcc.hpp b/include/boost/config/compiler/gcc.hpp index a17c91c0d..624bd3ccb 100644 --- a/include/boost/config/compiler/gcc.hpp +++ b/include/boost/config/compiler/gcc.hpp @@ -375,4 +375,4 @@ #if (BOOST_GCC_VERSION >= 40800) # define BOOST_ATTRIBUTE_TARGET(isa) __attribute__ ((target(isa))) -#endif \ No newline at end of file +#endif