NixOS / nixpkgs

Nix Packages collection & NixOS
MIT License
18.06k stars 14.1k forks source link

Wrapper's handling of @ for response files isn't sound #46434

Open copumpkin opened 6 years ago

copumpkin commented 6 years ago

I just tried calling ld -install_name @rpath/foo/bar in a macOS build and was surprised to see the cc wrapper treat it as a response file. Can we pick a more unique prefix that is less likely to collide with legitimate usages? How disruptive of a change would that be?

cc @Ericson2314 @orivej who have recently touched that code

Ericson2314 commented 6 years ago

So to be clear response files aren't our own invention, but the underlying tools'. Maybe macOS's ld never supported them so this parser ambiguity didn't arise? Not sure what the fix should be.

Alternatively it's possible '\@blah' works as an escape already.

stale[bot] commented 4 years ago

Thank you for your contributions.

This has been automatically marked as stale because it has had no activity for 180 days.

If this is still important to you, we ask that you leave a comment below. Your comment can be as simple as "still important to me". This lets people see that at least one person still cares about this. Someone will have to do this at most twice a year if there is no other activity.

Here are suggestions that might help resolve this more quickly:

  1. Search for maintainers and people that previously touched the related code and @ mention them in a comment.
  2. Ask on the NixOS Discourse.
  3. Ask on the #nixos channel on irc.freenode.net.