| ... | @@ -39,6 +39,8 @@ pub fn buildCrtFile(comp: *Compilation, in_crt_file: CrtFile, prog_node: std.Pro | ... | @@ -39,6 +39,8 @@ pub fn buildCrtFile(comp: *Compilation, in_crt_file: CrtFile, prog_node: std.Pro |
| 39 | }, | 39 | }, |
| 40 | }; | 40 | }; |
| 41 | return comp.build_crt_file("crti", .Obj, .@"musl crti.o", prog_node, &files, .{ | 41 | return comp.build_crt_file("crti", .Obj, .@"musl crti.o", prog_node, &files, .{ |
| | 42 | .function_sections = true, |
| | 43 | .data_sections = true, |
| 42 | .no_builtin = true, | 44 | .no_builtin = true, |
| 43 | }); | 45 | }); |
| 44 | }, | 46 | }, |
| ... | @@ -53,6 +55,8 @@ pub fn buildCrtFile(comp: *Compilation, in_crt_file: CrtFile, prog_node: std.Pro | ... | @@ -53,6 +55,8 @@ pub fn buildCrtFile(comp: *Compilation, in_crt_file: CrtFile, prog_node: std.Pro |
| 53 | }, | 55 | }, |
| 54 | }; | 56 | }; |
| 55 | return comp.build_crt_file("crtn", .Obj, .@"musl crtn.o", prog_node, &files, .{ | 57 | return comp.build_crt_file("crtn", .Obj, .@"musl crtn.o", prog_node, &files, .{ |
| | 58 | .function_sections = true, |
| | 59 | .data_sections = true, |
| 56 | .no_builtin = true, | 60 | .no_builtin = true, |
| 57 | }); | 61 | }); |
| 58 | }, | 62 | }, |
| ... | @@ -70,6 +74,8 @@ pub fn buildCrtFile(comp: *Compilation, in_crt_file: CrtFile, prog_node: std.Pro | ... | @@ -70,6 +74,8 @@ pub fn buildCrtFile(comp: *Compilation, in_crt_file: CrtFile, prog_node: std.Pro |
| 70 | }, | 74 | }, |
| 71 | }; | 75 | }; |
| 72 | return comp.build_crt_file("crt1", .Obj, .@"musl crt1.o", prog_node, &files, .{ | 76 | return comp.build_crt_file("crt1", .Obj, .@"musl crt1.o", prog_node, &files, .{ |
| | 77 | .function_sections = true, |
| | 78 | .data_sections = true, |
| 73 | .no_builtin = true, | 79 | .no_builtin = true, |
| 74 | }); | 80 | }); |
| 75 | }, | 81 | }, |
| ... | @@ -87,6 +93,8 @@ pub fn buildCrtFile(comp: *Compilation, in_crt_file: CrtFile, prog_node: std.Pro | ... | @@ -87,6 +93,8 @@ pub fn buildCrtFile(comp: *Compilation, in_crt_file: CrtFile, prog_node: std.Pro |
| 87 | }, | 93 | }, |
| 88 | }; | 94 | }; |
| 89 | return comp.build_crt_file("rcrt1", .Obj, .@"musl rcrt1.o", prog_node, &files, .{ | 95 | return comp.build_crt_file("rcrt1", .Obj, .@"musl rcrt1.o", prog_node, &files, .{ |
| | 96 | .function_sections = true, |
| | 97 | .data_sections = true, |
| 90 | .pic = true, | 98 | .pic = true, |
| 91 | .no_builtin = true, | 99 | .no_builtin = true, |
| 92 | }); | 100 | }); |
| ... | @@ -105,6 +113,8 @@ pub fn buildCrtFile(comp: *Compilation, in_crt_file: CrtFile, prog_node: std.Pro | ... | @@ -105,6 +113,8 @@ pub fn buildCrtFile(comp: *Compilation, in_crt_file: CrtFile, prog_node: std.Pro |
| 105 | }, | 113 | }, |
| 106 | }; | 114 | }; |
| 107 | return comp.build_crt_file("Scrt1", .Obj, .@"musl Scrt1.o", prog_node, &files, .{ | 115 | return comp.build_crt_file("Scrt1", .Obj, .@"musl Scrt1.o", prog_node, &files, .{ |
| | 116 | .function_sections = true, |
| | 117 | .data_sections = true, |
| 108 | .pic = true, | 118 | .pic = true, |
| 109 | .no_builtin = true, | 119 | .no_builtin = true, |
| 110 | }); | 120 | }); |
| ... | @@ -201,6 +211,8 @@ pub fn buildCrtFile(comp: *Compilation, in_crt_file: CrtFile, prog_node: std.Pro | ... | @@ -201,6 +211,8 @@ pub fn buildCrtFile(comp: *Compilation, in_crt_file: CrtFile, prog_node: std.Pro |
| 201 | }; | 211 | }; |
| 202 | } | 212 | } |
| 203 | return comp.build_crt_file("c", .Lib, .@"musl libc.a", prog_node, c_source_files.items, .{ | 213 | return comp.build_crt_file("c", .Lib, .@"musl libc.a", prog_node, c_source_files.items, .{ |
| | 214 | .function_sections = true, |
| | 215 | .data_sections = true, |
| 204 | .no_builtin = true, | 216 | .no_builtin = true, |
| 205 | }); | 217 | }); |
| 206 | }, | 218 | }, |
| ... | @@ -448,8 +460,6 @@ fn addCcArgs( | ... | @@ -448,8 +460,6 @@ fn addCcArgs( |
| 448 | "-fomit-frame-pointer", | 460 | "-fomit-frame-pointer", |
| 449 | "-fno-unwind-tables", | 461 | "-fno-unwind-tables", |
| 450 | "-fno-asynchronous-unwind-tables", | 462 | "-fno-asynchronous-unwind-tables", |
| 451 | "-ffunction-sections", | | |
| 452 | "-fdata-sections", | | |
| 453 | | 463 | |
| 454 | "-Qunused-arguments", | 464 | "-Qunused-arguments", |
| 455 | "-w", // disable all warnings | 465 | "-w", // disable all warnings |