{"action":"closed","issue":{"url":"https://api.github.com/repos/rust-lang/libc/issues/375","repository_url":"https://api.github.com/repos/rust-lang/libc","labels_url":"https://api.github.com/repos/rust-lang/libc/issues/375/labels{/name}","comments_url":"https://api.github.com/repos/rust-lang/libc/issues/375/comments","events_url":"https://api.github.com/repos/rust-lang/libc/issues/375/events","html_url":"https://github.com/rust-lang/libc/issues/375","id":174633696,"node_id":"MDU6SXNzdWUxNzQ2MzM2OTY=","number":375,"title":"The thumb* target family (which have newlib libc) are not supported","user":{"login":"SimonSapin","id":291359,"node_id":"MDQ6VXNlcjI5MTM1OQ==","avatar_url":"https://avatars0.githubusercontent.com/u/291359?v=4","gravatar_id":"","url":"https://api.github.com/users/SimonSapin","html_url":"https://github.com/SimonSapin","followers_url":"https://api.github.com/users/SimonSapin/followers","following_url":"https://api.github.com/users/SimonSapin/following{/other_user}","gists_url":"https://api.github.com/users/SimonSapin/gists{/gist_id}","starred_url":"https://api.github.com/users/SimonSapin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SimonSapin/subscriptions","organizations_url":"https://api.github.com/users/SimonSapin/orgs","repos_url":"https://api.github.com/users/SimonSapin/repos","events_url":"https://api.github.com/users/SimonSapin/events{/privacy}","received_events_url":"https://api.github.com/users/SimonSapin/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":31,"created_at":"2016-09-01T21:46:00Z","updated_at":"2018-11-22T18:35:15Z","closed_at":"2018-11-22T18:35:15Z","author_association":"CONTRIBUTOR","body":"I have embedded hardware without an OS. I build Rust code for it with `--target thumbv7em-none-eabi` and this `thumbv7em-none-eabi.json` file:\n\n``` json\n{\n    \"arch\": \"arm\",\n    \"cpu\": \"cortex-m4\",\n    \"data-layout\": \"e-m:e-p:32:32-i64:64-v128:64:128-a:0:32-n32-S64\",\n    \"disable-redzone\": true,\n    \"executables\": true,\n    \"llvm-target\": \"thumbv7em-none-eabi\",\n    \"morestack\": false,\n    \"os\": \"none\",\n    \"relocation-model\": \"static\",\n    \"target-endian\": \"little\",\n    \"target-pointer-width\": \"32\",\n    \"no-compiler-rt\": true,\n    \"pre-link-args\": [\n        \"-mcpu=cortex-m4\", \"-mthumb\",\n        \"-Tlayout.ld\"\n    ],\n    \"post-link-args\": [\n        \"-lm\", \"-lgcc\", \"-lnosys\"\n    ]\n}\n```\n\nIf I add a Cargo dependency on the `libc` crate and build with this target, I get many build errors. The first and last are below. The entire thing is at https://gist.github.com/anonymous/780fe74b2ae2834fc9c738dbff60acc0\n\n``` rust\n   Compiling libc v0.2.15\nerror[E0412]: type name `c_char` is undefined or not in scope\n   --> /home/simon/tmp/cargo-home/registry/src/github.com-1ecc6299db9ec823/libc-0.2.15/src/lib.rs:153:35\n    |\n153 |     pub fn fopen(filename: *const c_char,\n    |                                   ^^^^^^ undefined or not in scope\n    |\n    = help: no candidates by the name of `c_char` found in your project; maybe you misspelled the name or forgot to import an external crate?\n\n\n// Removed: ~4000 more lines\n\n\nerror[E0204]: the trait `Copy` may not be implemented for this type\n   --> /home/simon/tmp/cargo-home/registry/src/github.com-1ecc6299db9ec823/libc-0.2.15/src/macros.rs:44:9\n    |\n44  |         impl ::dox::Copy for $i {}\n    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^ field `rlim_cur` does not implement `Copy`\n    | \n   ::: /home/simon/tmp/cargo-home/registry/src/github.com-1ecc6299db9ec823/libc-0.2.15/src/lib.rs\n    |\n261 | cfg_if! {\n    | - in this macro invocation\n\nerror: aborting due to 5 previous errors\n\nerror: Could not compile `libc`.\n\n```\n"}}
{"actor":{"display_login":"gnzlbg"}}