Skip to content

Fix build of rust-install

Mark Harris requested to merge markh/redox:prefix-fix into master

Problem: When building prefix from source (on macOS or with BINARY_PREFIX=0) the rust-install build fails during compilation of compiler-builtins for Redox:

error: failed to run custom build command for `compiler_builtins v0.1.18`
...
prefix/x86_64-unknown-redox/rust-install.partial/lib/gcc/x86_64-unknown-redox/8.2.0/include-fixed/limits.h:194:15: fatal error: limits.h: No such file or directory
 #include_next <limits.h>  /* recurse down to the real one */
               ^~~~~~~~~~
compilation terminated.

Solution: It appears that the issue was introduced in 52b8045f where it was changed to copy from gcc-install instead of relibc-freestanding-install. However the Redox header files that are needed to build rust, such as limits.h, are in relibc-freestanding-install and aren't in gcc-install. Copying from both directories avoids the build failure.

An alternative would be to copy the contents of relibc-freestanding-install into gcc-install during the build of gcc-install, before gcc-install is copied.

Merge request reports