| ... | ... | @@ -2,7 +2,7 @@ |
| 2 | 2 | //! ./gen_stubs /path/to/musl/build-all >libc.S |
| 3 | 3 | //! |
| 4 | 4 | //! The directory 'build-all' is expected to contain these subdirectories: |
| 5 | | //! arm x86 mips mips64 powerpc powerpc64 riscv32 riscv64 x86_64 |
| 5 | //! arm x86 mips mips64 powerpc powerpc64 riscv32 riscv64 x86_64 loongarch64 |
| 6 | 6 | //! |
| 7 | 7 | //! ...each with 'lib/libc.so' inside of them. |
| 8 | 8 | //! |
| ... | ... | @@ -18,6 +18,7 @@ |
| 18 | 18 | //! - `-DARCH_powerpc` |
| 19 | 19 | //! - `-DARCH_powerpc64` |
| 20 | 20 | //! - `-DARCH_aarch64` |
| 21 | //! - `-DARCH_loongarch64` |
| 21 | 22 | |
| 22 | 23 | // TODO: pick the best index to put them into instead of at the end |
| 23 | 24 | // - e.g. find a common previous symbol and put it after that one |
| ... | ... | @@ -77,7 +78,8 @@ const MultiSym = struct { |
| 77 | 78 | ms.present[archIndex(.x86_64)] == false and |
| 78 | 79 | ms.present[archIndex(.powerpc)] == true and |
| 79 | 80 | ms.present[archIndex(.powerpc64)] == false and |
| 80 | | ms.present[archIndex(.aarch64)] == false; |
| 81 | ms.present[archIndex(.aarch64)] == false and |
| 82 | ms.present[archIndex(.loongarch64)] == false; |
| 81 | 83 | } |
| 82 | 84 | |
| 83 | 85 | fn commonSize(ms: MultiSym) ?u64 { |
| ... | ... | @@ -121,6 +123,7 @@ const MultiSym = struct { |
| 121 | 123 | .{ .powerpc, 4 }, |
| 122 | 124 | .{ .powerpc64, 8 }, |
| 123 | 125 | .{ .aarch64, 8 }, |
| 126 | .{ .loongarch64, 8 }, |
| 124 | 127 | }; |
| 125 | 128 | inline for (map) |item| { |
| 126 | 129 | const arch = item[0]; |
| ... | ... | @@ -144,6 +147,7 @@ const MultiSym = struct { |
| 144 | 147 | .{ .powerpc, 8 }, |
| 145 | 148 | .{ .powerpc64, 16 }, |
| 146 | 149 | .{ .aarch64, 16 }, |
| 150 | .{ .loongarch64, 16 }, |
| 147 | 151 | }; |
| 148 | 152 | inline for (map) |item| { |
| 149 | 153 | const arch = item[0]; |
| ... | ... | @@ -167,6 +171,7 @@ const MultiSym = struct { |
| 167 | 171 | .{ .powerpc, 1 }, |
| 168 | 172 | .{ .powerpc64, 2 }, |
| 169 | 173 | .{ .aarch64, 2 }, |
| 174 | .{ .loongarch64, 2 }, |
| 170 | 175 | }; |
| 171 | 176 | inline for (map) |item| { |
| 172 | 177 | const arch = item[0]; |