Issue description
This is the continuation for the problem in #55998 (comment).
cc @veprbl
The problem is that clang and gcc on macOS doesn't add executable rights if the output file was already created without executable rights.
Steps to reproduce
cd /tmp
touch executableTest
echo "int main() {}" > executableTest.c
nix-shell -p clang --pure --run "clang executableTest.c -o executableTest"
./executableTest
It works with gcc but still not with clang if I checkout nixpkgs master at 84be644 go into the checkout directory and do the following:
cd /tmp
touch executableTest
echo "int main() {}" > executableTest.c
nix-shell -p gcc --pure --run "gcc executableTest.c -o executableTest"
./executableTest
Technical details
Please run nix-shell -p nix-info --run "nix-info -m" and paste the
results.
- system:
"x86_64-darwin"
- host os:
Darwin 18.2.0, macOS 10.14.3
- multi-user?:
no
- sandbox:
no
- version:
nix-env (Nix) 2.1.3
- channels(thomad):
"nixpkgs-19.03pre171497.cc1fa81489e"
- nixpkgs:
/Users/thomad/.nix-defexpr/channels/nixpkgs
Issue description
This is the continuation for the problem in #55998 (comment).
cc @veprbl
The problem is that clang and gcc on macOS doesn't add executable rights if the output file was already created without executable rights.
Steps to reproduce
cd /tmp
touch executableTest
echo "int main() {}" > executableTest.c
nix-shell -p clang --pure --run "clang executableTest.c -o executableTest"
./executableTest
It works with gcc but still not with clang if I checkout nixpkgs master at 84be644 go into the checkout directory and do the following:
cd /tmp
touch executableTest
echo "int main() {}" > executableTest.c
nix-shell -p gcc --pure --run "gcc executableTest.c -o executableTest"
./executableTest
Technical details
Please run
nix-shell -p nix-info --run "nix-info -m"and paste theresults.
"x86_64-darwin"Darwin 18.2.0, macOS 10.14.3nononix-env (Nix) 2.1.3"nixpkgs-19.03pre171497.cc1fa81489e"/Users/thomad/.nix-defexpr/channels/nixpkgs