authorgravatar for alex@alexrp.comAlex Rønne Petersen <alex@alexrp.com> 2024-11-05 12:18:35+01:00
committergravatar for alex@alexrp.comAlex Rønne Petersen <alex@alexrp.com> 2024-11-05 22:41:09+01:00
logf973d3e93e9bb419212a187e787de94929de928d
tree75e5b300531e5efe5a67beb443337d59586b8174
parent2a65b84572f19369e831d71c513da88a295193c8
signaturebadge-check Signed by SSH key SHA256:7B/LJ7bpR1eX8aCXSr4mtd5M45VMPKcx9zY8e95b5QM

glibc, musl, wasi-libc: Don't explicitly pass -fno-stack-protector.

This is already handled by build_crt_file().

3 files changed, 3 insertions(+), 14 deletions(-)

src/glibc.zig-1
......@@ -373,7 +373,6 @@ pub fn buildCrtFile(comp: *Compilation, crt_file: CrtFile, prog_node: std.Progre
373373 "-fmerge-all-constants",
374374 "-frounding-math",
375375 "-Wno-unsupported-floating-point-opt", // For targets that don't support -frounding-math.
376 "-fno-stack-protector",
377376 "-fno-common",
378377 "-fmath-errno",
379378 "-ftls-model=initial-exec",
src/musl.zig+3-12
......@@ -59,10 +59,7 @@ pub fn buildCrtFile(comp: *Compilation, in_crt_file: CrtFile, prog_node: std.Pro
5959 .crt1_o => {
6060 var args = std.ArrayList([]const u8).init(arena);
6161 try addCcArgs(comp, arena, &args, false);
62 try args.appendSlice(&[_][]const u8{
63 "-fno-stack-protector",
64 "-DCRT",
65 });
62 try args.append("-DCRT");
6663 var files = [_]Compilation.CSourceFile{
6764 .{
6865 .src_path = try comp.zig_lib_directory.join(arena, &[_][]const u8{
......@@ -79,10 +76,7 @@ pub fn buildCrtFile(comp: *Compilation, in_crt_file: CrtFile, prog_node: std.Pro
7976 .rcrt1_o => {
8077 var args = std.ArrayList([]const u8).init(arena);
8178 try addCcArgs(comp, arena, &args, false);
82 try args.appendSlice(&[_][]const u8{
83 "-fno-stack-protector",
84 "-DCRT",
85 });
79 try args.append("-DCRT");
8680 var files = [_]Compilation.CSourceFile{
8781 .{
8882 .src_path = try comp.zig_lib_directory.join(arena, &[_][]const u8{
......@@ -100,10 +94,7 @@ pub fn buildCrtFile(comp: *Compilation, in_crt_file: CrtFile, prog_node: std.Pro
10094 .scrt1_o => {
10195 var args = std.ArrayList([]const u8).init(arena);
10296 try addCcArgs(comp, arena, &args, false);
103 try args.appendSlice(&[_][]const u8{
104 "-fno-stack-protector",
105 "-DCRT",
106 });
97 try args.append("-DCRT");
10798 var files = [_]Compilation.CSourceFile{
10899 .{
109100 .src_path = try comp.zig_lib_directory.join(arena, &[_][]const u8{
src/wasi_libc.zig-1
......@@ -279,7 +279,6 @@ fn addCCArgs(
279279 try args.appendSlice(&[_][]const u8{
280280 "-std=gnu17",
281281 "-fno-trapping-math",
282 "-fno-stack-protector",
283282 "-w", // ignore all warnings
284283
285284 o_arg,