authorgravatar for alex@alexrp.comAlex Rønne Petersen <alex@alexrp.com> 2024-11-05 15:25:43+01:00
committergravatar for alex@alexrp.comAlex Rønne Petersen <alex@alexrp.com> 2024-11-05 22:41:09+01:00
logeb14fd8806885b43dd98492f0a6720038d8176c8
treeedf38a324dcebd5939151c01b5832dbd6e65c8d3
parent796d4845ff6747611c0061f8fe5c3c1c5b967226
signaturebadge-check Signed by SSH key SHA256:7B/LJ7bpR1eX8aCXSr4mtd5M45VMPKcx9zY8e95b5QM

libcxx: Pass -fPIC via module options instead of CFLAGS.


1 files changed, 1 insertions(+), 4 deletions(-)

src/libcxx.zig+1-4
......@@ -195,7 +195,7 @@ pub fn buildLibCXX(comp: *Compilation, prog_node: std.Progress.Node) BuildError!
195195 .valgrind = false,
196196 .optimize_mode = optimize_mode,
197197 .structured_cfg = comp.root_mod.structured_cfg,
198 .pic = comp.root_mod.pic,
198 .pic = if (target_util.supports_fpic(target)) true else null,
199199 },
200200 .global = config,
201201 .cc_argv = &.{},
......@@ -278,9 +278,6 @@ pub fn buildLibCXX(comp: *Compilation, prog_node: std.Progress.Node) BuildError!
278278 try cflags.append("-faligned-allocation");
279279 }
280280
281 if (target_util.supports_fpic(target)) {
282 try cflags.append("-fPIC");
283 }
284281 try cflags.append("-nostdinc++");
285282 try cflags.append("-std=c++23");
286283 try cflags.append("-Wno-user-defined-literals");