From 576c80d5c39d4bbe657a30c3d2fd77505aa786d9 Mon Sep 17 00:00:00 2001 From: jgabry Date: Wed, 14 Oct 2026 10:32:00 -0600 Subject: [PATCH] Add --disable-new-dtags when linking the bundled TBB --- make/compiler_flags | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/make/compiler_flags b/make/compiler_flags index 7774648737f..ce87c22c2d3 100644 --- a/make/compiler_flags +++ b/make/compiler_flags @@ -288,6 +288,14 @@ else TBB_LIBRARIES ?= tbb endif +# --disable-new-dtags only matters alongside -rpath, which Windows skips +# below; MacOS ld does not support it +ifneq ($(OS), Windows_NT) + ifneq ($(OS),Darwin) + LDFLAGS_TBB_DTAGS ?= -Wl,--disable-new-dtags + endif +endif + ifdef TBB_LIB ifdef TBB_INC @@ -299,11 +307,6 @@ endif # Windows LLVM/Clang does not support -rpath, but is not needed on Windows anyway ifneq ($(OS), Windows_NT) LDFLAGS_TBB_RPATH ?= -Wl,-rpath,"$(TBB_LIB)" - # --disable-new-dtags only matters alongside -rpath; MacOS ld does not - # support it - ifneq ($(OS),Darwin) - LDFLAGS_TBB_DTAGS ?= -Wl,--disable-new-dtags - endif endif LDFLAGS_TBB ?= -Wl,-L,"$(TBB_LIB)" $(LDFLAGS_TBB_DTAGS) $(LDFLAGS_TBB_RPATH) @@ -329,7 +332,7 @@ LDFLAGS_TBB ?= -Wl,-L,"$(TBB_BIN_ABSOLUTE_PATH)" $(LDFLAGS_FLTO_FLTO) $(LDFLAGS_ # Windows LLVM/Clang does not support -rpath, but is not needed on Windows anyway ifneq ($(OS), Windows_NT) - LDFLAGS_TBB += -Wl,-rpath,"$(TBB_BIN_ABSOLUTE_PATH)" + LDFLAGS_TBB += $(LDFLAGS_TBB_DTAGS) -Wl,-rpath,"$(TBB_BIN_ABSOLUTE_PATH)" endif LDLIBS_TBB ?= -ltbb