From 242fdfb1373127331cb229379b50b1dba0f53e49 Mon Sep 17 00:00:00 2001 From: Peter Dimov Date: Wed, 3 Jul 2024 21:32:29 +0300 Subject: [PATCH] Require GCC 8 for __builtin_FILE for reproducible builds. Fixes #38. --- include/boost/assert/source_location.hpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/include/boost/assert/source_location.hpp b/include/boost/assert/source_location.hpp index c4d5f1b..c6eae32 100644 --- a/include/boost/assert/source_location.hpp +++ b/include/boost/assert/source_location.hpp @@ -174,9 +174,12 @@ template std::basic_ostream & operator<<( std::basic_ost # define BOOST_CURRENT_LOCATION ::boost::source_location(__builtin_FILE(), __builtin_LINE(), __builtin_FUNCTION(), __builtin_COLUMN()) -#elif defined(BOOST_GCC) && BOOST_GCC >= 70000 +#elif defined(BOOST_GCC) && BOOST_GCC >= 80000 // The built-ins are available in 4.8+, but are not constant expressions until 7 +// In addition, reproducible builds require -ffile-prefix-map, which is GCC 8 +// https://github.com/boostorg/assert/issues/38 + # define BOOST_CURRENT_LOCATION ::boost::source_location(__builtin_FILE(), __builtin_LINE(), __builtin_FUNCTION()) #elif defined(BOOST_GCC) && BOOST_GCC >= 50000