wip/threadingbuildingblocks: Work around aggressive DSE causing a SEGV under g++.

Switch to clang, which doesn't do the aggressive DSE in this case.
The Makefiles aleady assume we're using clang, in any case.
See:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71388

SEGV crash is like (from PrusaSlicer):
    parent=parent@entry=0x0, context=context@entry=0x79966ba4ab40 <tbb::internal::the_dummy_context>)
    at ../../src/tbb/scheduler.cpp:352
    genuine=genuine@entry=true) at ../../src/tbb/scheduler.cpp:99
    m=..., this=0x799632fe7e80) at ../../src/tbb/custom_scheduler.h:55
    at ../../src/tbb/custom_scheduler.h:140
This commit is contained in:
Paul Ripke 2020-10-15 16:14:13 +11:00
parent 65ce81589c
commit e590769db4
1 changed files with 9 additions and 0 deletions

View File

@ -20,6 +20,15 @@ USE_TOOLS+= gmake pax
BUILD_TARGET= default
TEST_TARGET= test
# Work around old TBB bug, we'll force using clang++, which appears to
# have less agressive Dead-Store Elimination (DSE).
# The makefiles already assume we're using clang, and hence fail to pass
# "-flifetime-dse=1" to g++.
# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71388
PKGSRC_COMPILER= clang
PKG_CC= clang
PKG_CXX= clang++
.include "../../mk/bsd.prefs.mk"
.if ${OPSYS} == Linux