summaryrefslogtreecommitdiff
path: root/build.rs
diff options
context:
space:
mode:
authorDark Kirb <darkkirb@gmail.com>2020-07-29 14:48:13 +0100
committerCharlotte D <darkkirb@darkkirb.de>2020-08-05 08:19:48 +0100
commite9a1268320fb06add835eea8d23ee4c483882c41 (patch)
tree536471152b78d7e92224e6e45efc68d7467baad6 /build.rs
parent510badd75fa5e324a7a0c85aa48baabe84fb1773 (diff)
downloadrust-libc-e9a1268320fb06add835eea8d23ee4c483882c41.tar.gz
Add DevkitPPC support
DevkitPPC does not support unix sockets natively, meaning that bindings to these functions was removed for powerpc targets with "nintendo" as vendor. Suggested target json files: Nintendo Gamecube: ``` { "arch": "powerpc", "data-layout": "E-m:e-p:32:32-i64:64-n32", "dynamic-linking": false, "env": "newlib", "executables": true, "has-elf-tls": false, "has-rpath": true, "linker-flavor": "gcc", "llvm-target": "powerpc-eabi", "max-atomic-width": 32, "os": "dolphin", "target-c-int-width": "32", "target-endian": "big", "target-family": "unix", "target-mcount": "_mcount", "target-pointer-width": "32", "vendor": "nintendo" } ``` Nintendo Wii: ``` { "arch": "powerpc", "data-layout": "E-m:e-p:32:32-i64:64-n32", "dynamic-linking": false, "env": "newlib", "executables": true, "has-elf-tls": false, "has-rpath": true, "linker-flavor": "gcc", "llvm-target": "powerpc-eabi", "max-atomic-width": 32, "os": "revolution", "target-c-int-width": "32", "target-endian": "big", "target-family": "unix", "target-mcount": "_mcount", "target-pointer-width": "32", "vendor": "nintendo" } ```
Diffstat (limited to 'build.rs')
-rw-r--r--build.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/build.rs b/build.rs
index f447c0ef9c..27cfb02401 100644
--- a/build.rs
+++ b/build.rs
@@ -65,9 +65,10 @@ fn main() {
println!("cargo:rustc-cfg=libc_core_cvoid");
}
- // Rust >= 1.33 supports repr(packed(N))
+ // Rust >= 1.33 supports repr(packed(N)) and cfg(target_vendor).
if rustc_minor_ver >= 33 || rustc_dep_of_std {
println!("cargo:rustc-cfg=libc_packedN");
+ println!("cargo:rustc-cfg=libc_cfg_target_vendor");
}
// #[thread_local] is currently unstable