From 470de711778d64bf4b83f9ab945a5b24158ecc3c Mon Sep 17 00:00:00 2001 From: George Rimar Date: Wed, 9 Nov 2016 16:38:15 +0000 Subject: [PATCH] [ELF] - Add separate form for -R alias. MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit During link of devel/chrpath (FreeBSD port), found next issue: /usr/bin/ld: error: unclosed comment in a linker script /usr/bin/ld: error: line 1: unknown directive: � /usr/bin/ld: error: �� Problem was not obvious and the reason was that we did not accept the separate form of -R. While invocation line contained it: cc -Wl,-R /usr/local/lib -o prog prog.c CPIO file produced contained /usr/local/lib file. Which looks because of reasons above contained inside the content of whole lib folder, and it then was passed as an input and proccessed as linker script. llvm-svn: 286378 --- lld/ELF/Options.td | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lld/ELF/Options.td b/lld/ELF/Options.td index a0ec920..c87c7c5 100644 --- a/lld/ELF/Options.td +++ b/lld/ELF/Options.td @@ -244,7 +244,7 @@ def alias_o_output: Joined<["--"], "output=">, Alias; def alias_o_output2 : Separate<["--"], "output">, Alias; def alias_pie_pic_executable: F<"pic-executable">, Alias; def alias_relocatable_r: Flag<["-"], "r">, Alias; -def alias_rpath_R: Joined<["-"], "R">, Alias; +def alias_rpath_R: JoinedOrSeparate<["-"], "R">, Alias; def alias_rpath_rpath: J<"rpath=">, Alias; def alias_script_T: JoinedOrSeparate<["-"], "T">, Alias