authorgravatar for alex@alexrp.comAlex Rønne Petersen <alex@alexrp.com> 2025-04-22 07:57:45+02:00
committergravatar for alex@alexrp.comAlex Rønne Petersen <alex@alexrp.com> 2025-05-10 12:19:26+02:00
log162b11b250dcd7c31c67438a0bb643c718a2ae90
tree701378f82be5eaed6b1da3e50def53935ec46770
parent610d3cf9deabb06a9729b54df4e9123d98a3c386
signaturebadge-check Signed by SSH key SHA256:7B/LJ7bpR1eX8aCXSr4mtd5M45VMPKcx9zY8e95b5QM

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


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

src/libs/libcxx.zig+1-4
......@@ -397,7 +397,7 @@ pub fn buildLibCxxAbi(comp: *Compilation, prog_node: std.Progress.Node) BuildErr
397397 .optimize_mode = optimize_mode,
398398 .structured_cfg = comp.root_mod.structured_cfg,
399399 .unwind_tables = unwind_tables,
400 .pic = comp.root_mod.pic,
400 .pic = if (target_util.supports_fpic(target)) true else null,
401401 .code_model = comp.root_mod.code_model,
402402 },
403403 .global = config,
......@@ -437,9 +437,6 @@ pub fn buildLibCxxAbi(comp: *Compilation, prog_node: std.Progress.Node) BuildErr
437437 try cflags.append("-fvisibility=hidden");
438438 try cflags.append("-fvisibility-inlines-hidden");
439439
440 if (target_util.supports_fpic(target)) {
441 try cflags.append("-fPIC");
442 }
443440 try cflags.append("-nostdinc++");
444441 try cflags.append("-fstrict-aliasing");
445442 try cflags.append("-std=c++23");