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

This is already handled by build_crt_file().
This commit is contained in:
Alex Rønne Petersen 2024-11-05 12:18:35 +01:00
parent 2a65b84572
commit f973d3e93e
No known key found for this signature in database
3 changed files with 3 additions and 14 deletions

View File

@ -373,7 +373,6 @@ pub fn buildCrtFile(comp: *Compilation, crt_file: CrtFile, prog_node: std.Progre
"-fmerge-all-constants",
"-frounding-math",
"-Wno-unsupported-floating-point-opt", // For targets that don't support -frounding-math.
"-fno-stack-protector",
"-fno-common",
"-fmath-errno",
"-ftls-model=initial-exec",

View File

@ -59,10 +59,7 @@ pub fn buildCrtFile(comp: *Compilation, in_crt_file: CrtFile, prog_node: std.Pro
.crt1_o => {
var args = std.ArrayList([]const u8).init(arena);
try addCcArgs(comp, arena, &args, false);
try args.appendSlice(&[_][]const u8{
"-fno-stack-protector",
"-DCRT",
});
try args.append("-DCRT");
var files = [_]Compilation.CSourceFile{
.{
.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
.rcrt1_o => {
var args = std.ArrayList([]const u8).init(arena);
try addCcArgs(comp, arena, &args, false);
try args.appendSlice(&[_][]const u8{
"-fno-stack-protector",
"-DCRT",
});
try args.append("-DCRT");
var files = [_]Compilation.CSourceFile{
.{
.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
.scrt1_o => {
var args = std.ArrayList([]const u8).init(arena);
try addCcArgs(comp, arena, &args, false);
try args.appendSlice(&[_][]const u8{
"-fno-stack-protector",
"-DCRT",
});
try args.append("-DCRT");
var files = [_]Compilation.CSourceFile{
.{
.src_path = try comp.zig_lib_directory.join(arena, &[_][]const u8{

View File

@ -279,7 +279,6 @@ fn addCCArgs(
try args.appendSlice(&[_][]const u8{
"-std=gnu17",
"-fno-trapping-math",
"-fno-stack-protector",
"-w", // ignore all warnings
o_arg,