Compare commits

..

21 Commits

Author SHA1 Message Date
Marshall Clow
8df65862c7 Fix typo 2021-08-11 10:02:29 -07:00
Marshall Clow
01f00de731 Bump version to 1.78.0 2021-08-11 08:45:47 -07:00
jzmaddock
47614564ec Merge pull request #393 from boostorg/issue392
Patch for noinline attribute on the HIP compiler.
2021-08-09 19:07:38 +01:00
jzmaddock
76d4eaf4be Patch for noinline attribute on the HIP compiler.
Fixes https://github.com/boostorg/config/issues/392.
2021-08-08 11:53:57 +01:00
jzmaddock
c3de80c2ef Merge pull request #387 from boostorg/issue382
Correct boost_no_ctype_functions.ipp for C++20.
2021-07-07 09:44:38 +01:00
jzmaddock
a8bdf6ae2f Merge pull request #388 from boostorg/gcc4-4-fixes
Try and fix gcc-4.4 -fno-rtti failure.
2021-07-07 09:44:15 +01:00
jzmaddock
42cff96876 Try and fix gcc-4.4 -fno-rtti failure. 2021-07-06 19:56:50 +01:00
jzmaddock
73557f7766 Correct boost_no_ctype_functions.ipp for C++20.
See https://github.com/boostorg/config/issues/382.
2021-07-06 19:48:15 +01:00
jzmaddock
cfc6545ce9 Merge pull request #385 from boostorg/pr/boost-clang-version
Add BOOST_CLANG_VERSION macro
2021-07-06 12:48:31 +01:00
jzmaddock
eb3a0a98ae Merge pull request #380 from xantares/mingw_tls
Allow thread_local on mingw with gcc>=11
2021-07-04 19:11:36 +01:00
Peter Dimov
b80c25f474 Print __apple_build_version__ in config_info 2021-07-04 20:06:09 +03:00
Peter Dimov
8595667b36 Fix spelling of __APPLE__ 2021-07-04 20:02:20 +03:00
jzmaddock
a5b2dbdcf1 Merge pull request #384 from boostorg/pr/detail-workaround-guard
Update detail/workaround.hpp include guard
2021-07-04 17:21:44 +01:00
jzmaddock
f1b4a51cea Merge pull request #383 from boostorg/pr/clang-major-workaround
Define __clang_major___WORKAROUND_GUARD
2021-07-04 17:20:59 +01:00
Peter Dimov
098ca4a3cf Document BOOST_CLANG_VERSION 2021-07-04 19:12:16 +03:00
Peter Dimov
0148ea5ea2 Print BOOST_CLANG, BOOST_CLANG_VERSION in config_info 2021-07-04 19:08:00 +03:00
Peter Dimov
1e63c7729d Define BOOST_CLANG_VERSION_WORKAROUND_GUARD 2021-07-04 18:51:25 +03:00
Peter Dimov
f6fdfb9291 Define BOOST_CLANG_VERSION 2021-07-04 18:49:01 +03:00
Peter Dimov
e52aa58652 Update detail/workaround.hpp include guard 2021-07-04 18:04:03 +03:00
Peter Dimov
9e80993844 Define __clang_major___WORKAROUND_GUARD 2021-07-04 17:59:32 +03:00
Michel Zou
98c3ac8158 Allow thread_local on mingw with gcc>=11 2021-06-09 15:36:20 +02:00
15 changed files with 154 additions and 73 deletions

View File

@@ -1481,6 +1481,12 @@ compiler version macro.
[[`BOOST_CLANG`][`<boost/config.hpp>`][
Defined to 1 if the compiler is the Clang compiler.
]]
[[`BOOST_CLANG_VERSION`][`<boost/config.hpp>`][
Defined to the version of the Clang compiler, usually
`__clang_major__ * 10000 + __clang_minor__ * 100 + __clang_patchlevel__`. On
Apple Clang, has a best-effort value reflecting the upstream version, rather
than the Apple version.
]]
[[`BOOST_BORLANDC`][`<boost/config.hpp>`][
Defined to the value of __BORLANDC__ if the compiler is the Embarcadero
non-clang based compiler.

View File

@@ -1,23 +0,0 @@
// This file was automatically generated on Wed Mar 3 08:46:11 2021
// by libs/config/tools/generate.cpp
// Copyright John Maddock 2002-4.
// Use, modification and distribution are subject to the
// Boost Software License, Version 1.0. (See accompanying file
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
// See http://www.boost.org/libs/config for the most recent version.//
// Revision $Id$
//
#include <boost/config.hpp>
#include <boost/config/assert_cxx17.hpp>
#ifdef BOOST_NO_CXX98_BINDERS
# error "Your compiler appears not to be fully C++98 compliant. Detected via defect macro BOOST_NO_CXX98_BINDERS."
#endif
#ifdef BOOST_NO_CXX98_FUNCTION_BASE
# error "Your compiler appears not to be fully C++98 compliant. Detected via defect macro BOOST_NO_CXX98_FUNCTION_BASE."
#endif
#ifdef BOOST_NO_CXX98_RANDOM_SHUFFLE
# error "Your compiler appears not to be fully C++98 compliant. Detected via defect macro BOOST_NO_CXX98_RANDOM_SHUFFLE."
#endif

View File

@@ -351,3 +351,5 @@
// Macro used to identify the Clang compiler.
#define BOOST_CLANG 1
// BOOST_CLANG_VERSION
#include <boost/config/compiler/clang_version.hpp>

View File

@@ -0,0 +1,77 @@
// Copyright 2021 Peter Dimov
// Distributed under the Boost Software License, Version 1.0.
// https://www.boost.org/LICENSE_1_0.txt)
#if !defined(__APPLE__)
# define BOOST_CLANG_VERSION (__clang_major__ * 10000 + __clang_minor__ * 100 + __clang_patchlevel__)
#else
# define BOOST_CLANG_REPORTED_VERSION (__clang_major__ * 10000 + __clang_minor__ * 100 + __clang_patchlevel__)
// https://en.wikipedia.org/wiki/Xcode#Toolchain_versions
# if BOOST_CLANG_REPORTED_VERSION >= 130000
# define BOOST_CLANG_VERSION 120000
# elif BOOST_CLANG_REPORTED_VERSION >= 120005
# define BOOST_CLANG_VERSION 110100
# elif BOOST_CLANG_REPORTED_VERSION >= 120000
# define BOOST_CLANG_VERSION 100000
# elif BOOST_CLANG_REPORTED_VERSION >= 110003
# define BOOST_CLANG_VERSION 90000
# elif BOOST_CLANG_REPORTED_VERSION >= 110000
# define BOOST_CLANG_VERSION 80000
# elif BOOST_CLANG_REPORTED_VERSION >= 100001
# define BOOST_CLANG_VERSION 70000
# elif BOOST_CLANG_REPORTED_VERSION >= 100000
# define BOOST_CLANG_VERSION 60001
# elif BOOST_CLANG_REPORTED_VERSION >= 90100
# define BOOST_CLANG_VERSION 50002
# elif BOOST_CLANG_REPORTED_VERSION >= 90000
# define BOOST_CLANG_VERSION 40000
# elif BOOST_CLANG_REPORTED_VERSION >= 80000
# define BOOST_CLANG_VERSION 30900
# elif BOOST_CLANG_REPORTED_VERSION >= 70300
# define BOOST_CLANG_VERSION 30800
# elif BOOST_CLANG_REPORTED_VERSION >= 70000
# define BOOST_CLANG_VERSION 30700
# elif BOOST_CLANG_REPORTED_VERSION >= 60100
# define BOOST_CLANG_VERSION 30600
# elif BOOST_CLANG_REPORTED_VERSION >= 60000
# define BOOST_CLANG_VERSION 30500
# elif BOOST_CLANG_REPORTED_VERSION >= 50100
# define BOOST_CLANG_VERSION 30400
# elif BOOST_CLANG_REPORTED_VERSION >= 50000
# define BOOST_CLANG_VERSION 30300
# elif BOOST_CLANG_REPORTED_VERSION >= 40200
# define BOOST_CLANG_VERSION 30200
# elif BOOST_CLANG_REPORTED_VERSION >= 30100
# define BOOST_CLANG_VERSION 30100
# elif BOOST_CLANG_REPORTED_VERSION >= 20100
# define BOOST_CLANG_VERSION 30000
# else
# define BOOST_CLANG_VERSION 20900
# endif
# undef BOOST_CLANG_REPORTED_VERSION
#endif

View File

@@ -323,9 +323,10 @@
# define BOOST_FALLTHROUGH __attribute__((fallthrough))
#endif
#if defined(__MINGW32__) && !defined(__MINGW64__)
// Currently (March 2019) thread_local is broken on mingw for all current 32bit compiler releases, see
#if (__GNUC__ < 11) && defined(__MINGW32__) && !defined(__MINGW64__)
// thread_local was broken on mingw for all 32bit compiler releases prior to 11.x, see
// https://sourceforge.net/p/mingw-w64/bugs/527/
// https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83562
// Not setting this causes program termination on thread exit.
#define BOOST_NO_CXX11_THREAD_LOCAL
#endif

View File

@@ -288,3 +288,4 @@
// Macro used to identify the Clang compiler.
#define BOOST_CLANG 1
#define BOOST_CLANG_VERSION (__clang_major__ * 10000 + __clang_minor__ * 100 + __clang_patchlevel__)

View File

@@ -629,6 +629,9 @@ namespace std{ using ::type_info; }
// nvcc doesn't always parse __noinline__,
// see: https://svn.boost.org/trac/boost/ticket/9392
# define BOOST_NOINLINE __attribute__ ((noinline))
# elif defined(HIP_VERSION)
// See https://github.com/boostorg/config/issues/392
# define BOOST_NOINLINE __attribute__ ((noinline))
# else
# define BOOST_NOINLINE __attribute__ ((__noinline__))
# endif
@@ -1204,18 +1207,6 @@ namespace std{ using ::type_info; }
# define BOOST_CXX_VERSION __cplusplus
#endif
//
// Define composite agregate macros:
//
#include <boost/config/detail/cxx_composite.hpp>
//
// Define the std level that the compiler claims to support:
//
#ifndef BOOST_CXX_VERSION
# define BOOST_CXX_VERSION __cplusplus
#endif
//
// Finish off with checks for macros that are depricated / no longer supported,
// if any of these are set then it's very likely that much of Boost will no

View File

@@ -184,16 +184,6 @@
#endif
#if (BOOST_LIBSTDCXX_VERSION >= 100000) && defined(BOOST_HAS_HASH)
//
// hash_set/hash_map deprecated and have terminal bugs:
//
#undef BOOST_HAS_HASH
#undef BOOST_HAS_SET_HEADER
#undef BOOST_HAS_MAP_HEADER
#endif
#if (BOOST_LIBSTDCXX_VERSION < 50100)
// libstdc++ does not define this function as it's deprecated in C++11, but clang still looks for it,
// defining it here is a terrible cludge, but should get things working:

View File

@@ -192,6 +192,11 @@
#else
#define _COMPILER_VERSION_WORKAROUND_GUARD 0
#endif
#ifndef __clang_major__
#define __clang_major___WORKAROUND_GUARD 1
#else
#define __clang_major___WORKAROUND_GUARD 0
#endif
#ifndef _RWSTD_VER
#define _RWSTD_VER_WORKAROUND_GUARD 1
@@ -254,6 +259,12 @@
#else
#define BOOST_INTEL_WORKAROUND_GUARD 0
#endif
#ifndef BOOST_CLANG_VERSION
#define BOOST_CLANG_VERSION_WORKAROUND_GUARD 1
#else
#define BOOST_CLANG_VERSION_WORKAROUND_GUARD 0
#endif
// Always define to zero, if it's used it'll be defined my MPL:
#define BOOST_MPL_CFG_GCC_WORKAROUND_GUARD 0

View File

@@ -2,9 +2,9 @@
// Distributed under the Boost Software License, Version 1.0. (See
// accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
#ifndef WORKAROUND_DWA2002126_HPP
#define WORKAROUND_DWA2002126_HPP
#ifndef BOOST_WORKAROUND_DWA2002126_HPP
#define BOOST_WORKAROUND_DWA2002126_HPP
#include <boost/config/workaround.hpp>
#endif // WORKAROUND_DWA2002126_HPP
#endif // BOOST_WORKAROUND_DWA2002126_HPP

View File

@@ -19,7 +19,7 @@
// BOOST_VERSION / 100 % 1000 is the minor version
// BOOST_VERSION / 100000 is the major version
#define BOOST_VERSION 107700
#define BOOST_VERSION 107800
//
// BOOST_LIB_VERSION must be defined to be the same as BOOST_VERSION
@@ -27,6 +27,6 @@
// number, y is the minor version number, and z is the patch level if not 0.
// This is used by <config/auto_link.hpp> to select which library version to link to.
#define BOOST_LIB_VERSION "1_77"
#define BOOST_LIB_VERSION "1_78"
#endif

View File

@@ -32,6 +32,8 @@ exe has_pthread_lib : config_info.cpp pthread ;
explicit has_pthread_lib ;
exe has_rt_lib : config_info.cpp rt ;
explicit has_rt_lib ;
obj check_memory : check_memory.cpp ;
explicit check_memory ;
test-suite config
:
@@ -65,6 +67,7 @@ test-suite config
[ check-target-builds has_atomic_lib : <source>atomic ]
[ check-target-builds has_pthread_lib : <source>pthread ]
[ check-target-builds has_rt_lib : <source>rt ]
[ check-target-builds check_memory : : <build>no ]
: config_test_no_rtti
]
[ run config_test.cpp

View File

@@ -12,32 +12,40 @@
// macros and don't provide functions. Under C++ it's an error
// to provide the macros at all, but that's a separate issue.
#include <ctype.h>
#include <cctype>
namespace boost_no_ctype_functions {
extern "C" {
typedef int (* character_classify_function)(int);
}
void pass_function(character_classify_function)
{
}
int test()
{
pass_function(isalpha);
pass_function(isalnum);
pass_function(iscntrl);
pass_function(isdigit);
pass_function(isgraph);
pass_function(islower);
pass_function(isprint);
pass_function(ispunct);
pass_function(isspace);
pass_function(isupper);
pass_function(isxdigit);
return 0;
using std::isalpha;
using std::isalnum;
using std::iscntrl;
using std::isdigit;
using std::isgraph;
using std::islower;
using std::isprint;
using std::ispunct;
using std::isspace;
using std::isupper;
using std::isxdigit;
int r = 0;
char c = 'a';
r |= (isalpha)(c);
r |= (isalnum)(c);
r |= (iscntrl)(c);
r |= (isdigit)(c);
r |= (isgraph)(c);
r |= (islower)(c);
r |= (isprint)(c);
r |= (ispunct)(c);
r |= (isspace)(c);
r |= (isupper)(c);
r |= (isxdigit)(c);
return r == 0 ? 1 : 0;
}
}

11
test/check_memory.cpp Normal file
View File

@@ -0,0 +1,11 @@
// (C) Copyright John Maddock 2021.
// Use, modification and distribution are subject to the
// Boost Software License, Version 1.0. (See accompanying file
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
//
// Quick santity check that <memory> is OK. It was broken for some old gcc versions and -fno-rtti
//
#include <memory>

View File

@@ -380,6 +380,7 @@ void print_compiler_macros()
PRINT_MACRO(__clang_minor__);
PRINT_MACRO(__clang_version__);
PRINT_MACRO(__clang_patchlevel__);
PRINT_MACRO(__apple_build_version__);
// misc compilers not covered so far:
PRINT_MACRO(__USLC__);
@@ -1268,6 +1269,8 @@ void print_boost_macros()
PRINT_MACRO(BOOST_INTEL);
PRINT_MACRO(BOOST_MSVC);
PRINT_MACRO(BOOST_GCC);
PRINT_MACRO(BOOST_CLANG);
PRINT_MACRO(BOOST_CLANG_VERSION);
PRINT_MACRO(BOOST_LIBSTDCXX_VERSION);
PRINT_MACRO(BOOST_STD_EXTENSION_NAMESPACE);
PRINT_MACRO(BOOST_UNREACHABLE_RETURN(0));