mold/bundled_lib_system_flags.patch

31 lines
1.1 KiB
Diff

From 06537164083e0af844224651bf7e7c7340a47675 Mon Sep 17 00:00:00 2001
Message-Id: <06537164083e0af844224651bf7e7c7340a47675.1642950243.git.github@sicherha.de>
From: Christoph Erhardt <github@sicherha.de>
Date: Sun, 23 Jan 2022 14:28:45 +0100
Subject: [PATCH] Pass `CXXFLAGS` to bundled tbb
This makes work easier for distributions that specify custom hardened
compiler flags.
Signed-off-by: Christoph Erhardt <github@sicherha.de>
---
Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Makefile b/Makefile
index e2d7cd97..913ac97a 100644
--- a/Makefile
+++ b/Makefile
@@ -147,7 +147,7 @@ $(MIMALLOC_LIB):
$(TBB_LIB):
mkdir -p out/tbb
- (cd out/tbb; cmake -G'Unix Makefiles' -DBUILD_SHARED_LIBS=OFF -DTBB_TEST=OFF -DCMAKE_CXX_FLAGS=-D__TBB_DYNAMIC_LOAD_ENABLED=0 -DTBB_STRICT=OFF ../../third-party/tbb)
+ (cd out/tbb; cmake -G'Unix Makefiles' -DBUILD_SHARED_LIBS=OFF -DTBB_TEST=OFF -DCMAKE_CXX_FLAGS="$(CXXFLAGS) -D__TBB_DYNAMIC_LOAD_ENABLED=0" -DTBB_STRICT=OFF ../../third-party/tbb)
$(MAKE) -C out/tbb tbb
(cd out/tbb; ln -sf *_relwithdebinfo libs)
--
2.34.1