rust/src/test/run-make/lto-readonly-lib
Ricardo M. Correia 991f506248 rustc: Fix permission denied error in 'ar' when lto is enabled
The reason that 'ar' can fail with permission denied is that when
link-time optimizations are enabled, rustc copies libraries into a
temporary directory, preserving file permissions, and subsequently
modifies them using 'ar'.

The modification can fail because some package managers may install
libraries in system directories as read-only files, which means the
temporary file also becomes read-only when it is copied.

I have fixed this by giving the temporary file's owner read+write
permissions after the copy.

I have also added a regression test for this issue.
2014-09-29 15:07:14 +02:00
..
lib.rs rustc: Fix permission denied error in 'ar' when lto is enabled 2014-09-29 15:07:14 +02:00
main.rs rustc: Fix permission denied error in 'ar' when lto is enabled 2014-09-29 15:07:14 +02:00
Makefile rustc: Fix permission denied error in 'ar' when lto is enabled 2014-09-29 15:07:14 +02:00