diff options
Diffstat (limited to 'dev-build/b2/files/b2-4.9.2-odr.patch')
-rw-r--r-- | dev-build/b2/files/b2-4.9.2-odr.patch | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/dev-build/b2/files/b2-4.9.2-odr.patch b/dev-build/b2/files/b2-4.9.2-odr.patch new file mode 100644 index 000000000000..62cbca189640 --- /dev/null +++ b/dev-build/b2/files/b2-4.9.2-odr.patch @@ -0,0 +1,54 @@ +Avoid ODR violations by giving "_stack" internal linkage +https://bugs.gentoo.org/858320 + +--- a/engine/function.cpp ++++ b/engine/function.cpp +@@ -213,11 +213,11 @@ + } JAM_FUNCTION; + + ++namespace ++{ + typedef struct _stack STACK; + typedef STACK* stack_ptr; + +-namespace +-{ + template <typename T> + using remove_cref_t + = typename std::remove_const< +@@ -260,7 +260,6 @@ + typename select_last_impl<(sizeof...(A) == 1), type_list<A...> > + ::template type<A...>; + #endif +-} + + struct _stack + { +@@ -439,6 +438,8 @@ + cleanups_size += n; + } + ++} ++ + static STACK * stack_global() + { + static _stack singleton; +--- a/engine/make1.cpp ++++ b/engine/make1.cpp +@@ -86,6 +86,7 @@ + #define T_STATE_MAKE1B 1 /* make1b() should be called */ + #define T_STATE_MAKE1C 2 /* make1c() should be called */ + ++namespace { + typedef struct _state state; + struct _state + { +@@ -94,6 +95,7 @@ + TARGET * parent; /* parent argument necessary for MAKE1A */ + int32_t curstate; /* current state */ + }; ++} + + static void make1a( state * const ); + static void make1b( state * const ); |