[llvm-commits] Patch for llvm-ar, llvm-ranlib creating files with wrong? file access rights

Mikael Lepistö mikael.lepisto at tut.fi
Thu May 15 02:57:47 PDT 2008


llvm-ar and llvm-ranlib seems to create files with different file rights 
than ar and ranlib from binutils.

elhigu at mr-lenovo:~/llvm_ar_test$ touch test.c;llvm-gcc test.c -c 
--emit-llvm;rm test_lib.a; llvm-ar cru test_lib.a test.o; echo "llvm-ar 
created archive";ls -la test_lib.a; rm test_lib.a; ar cru test_lib.a 
test.o; echo "default ar created archive";ls -la test_lib.a; llvm-ranlib 
test_lib.a; echo "archive after llvm-ranlib"; ls -la test_lib.a
llvm-ar created archive
-rw------- 1 elhigu elhigu 428 2008-05-15 12:49 test_lib.a
default ar created archive
-rw-r--r-- 1 elhigu elhigu 368 2008-05-15 12:49 test_lib.a
archive after llvm-ranlib
-rw------- 1 elhigu elhigu 428 2008-05-15 12:49 test_lib.a
elhigu at mr-lenovo:~/llvm_ar_test$

After patch all file rights seemed to be right. If I understood the code 
correctly temporary files should be still created with more strict 
access rights.

- Mikael Lepistö
-------------- next part --------------
A non-text attachment was scrubbed...
Name: archive_file_rights.patch
Type: text/x-diff
Size: 561 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20080515/8be0a209/attachment.patch>


More information about the llvm-commits mailing list