@@ -174,11 +174,7 @@ fn main() {
174174 writeln ! ( cargo_toml, "std = []" ) . unwrap ( ) ;
175175 writeln ! ( cargo_toml, "no_std = []" ) . unwrap ( ) ;
176176 writeln ! ( cargo_toml, "elf = []" ) . unwrap ( ) ;
177- writeln ! (
178- cargo_toml,
179- "rustc-dep-of-std = [\" core\" , \" no_std\" ]"
180- )
181- . unwrap ( ) ;
177+ writeln ! ( cargo_toml, "rustc-dep-of-std = [\" core\" , \" no_std\" ]" ) . unwrap ( ) ;
182178
183179 eprintln ! ( "All bindings generated!" ) ;
184180}
@@ -291,15 +287,16 @@ fn rust_arches(linux_arch: &str) -> &[&str] {
291287 "csky" => & [ "csky" ] ,
292288 "hexagon" => & [ "hexagon" ] ,
293289 "loongarch" => & [ "loongarch64" ] ,
290+ "m68k" => & [ "m68k" ] ,
294291 "mips" => & [ "mips" , "mips64" , "mips32r6" , "mips64r6" ] ,
295292 "powerpc" => & [ "powerpc" , "powerpc64" ] ,
296293 "riscv" => & [ "riscv32" , "riscv64" ] ,
297294 "s390" => & [ "s390x" ] ,
298295 "sparc" => & [ "sparc" , "sparc64" ] ,
299296 "x86" => & [ "x86" , "x86_64" , "x32" ] ,
300- "alpha" | "cris" | "h8300" | "m68k " | "microblaze " | "mn10300 " | "score " | "blackfin "
301- | "frv" | " ia64" | "m32r" | "m68knommu" | "parisc" | "sh" | "um" | "xtensa"
302- | "unicore32" | " c6x" | "nios2" | "openrisc" | "arc" | "nds32" | "metag" | "tile" => & [ ] ,
297+ "alpha" | "cris" | "h8300" | "microblaze " | "mn10300 " | "score " | "blackfin " | "frv "
298+ | "ia64" | "m32r" | "m68knommu" | "parisc" | "sh" | "um" | "xtensa" | "unicore32 "
299+ | "c6x" | "nios2" | "openrisc" | "arc" | "nds32" | "metag" | "tile" => & [ ] ,
303300 _ => panic ! ( "unrecognized arch: {}" , linux_arch) ,
304301 }
305302}
@@ -362,6 +359,13 @@ fn run_bindgen(
362359 builder = builder. blocklist_item ( "^HUGETLB_FLAG_ENCODE_.*" ) ;
363360 builder = builder. blocklist_item ( "^RESOLVE_.*" ) ;
364361 }
362+ if rust_arch == "m68k" {
363+ // Don't emit the `size_t` workaround types for m68k. This should be
364+ // removed when there's a bindgen release with a fix for [1].
365+ //
366+ // [1]: https://github.com/rust-lang/rust-bindgen/issues/3312
367+ builder = builder. blocklist_type ( "^s?size_t$" ) ;
368+ }
365369
366370 let bindings = builder
367371 . use_core ( )
0 commit comments