[llvm-commits] [PATCH] Makefile.rules: fix broken .map file generation through a non POSIX grep usage

John Spencer maillist-llvm at barfooze.de
Sat Mar 3 14:03:54 PST 2012


ok, let's add a little bit more context...

some Makefiles generate a linker script.
this should have the form
{
global:
symbol1;
symbol2;
local: *;
}
it is generated from a file such as gold.exports, lto.exports which 
contains a plain list of symbol names.
Makefile.rules processes the list using grep, however it uses a 
non-portable GNU extension for grep "\<" to detect whether
the list contains a valid symbol name (or is empty) and only outputs the 
global line in the former case.
this grep usage fails using a grep command which uses only the POSIX 
syntax, such as busybox grep.
it will lead to global: missing, thus producing an incorrect linker script.

the previously attached patch was discussed in #llvm irc channel with 3 
regulars, and all found the patch to be acceptable.

On 03/03/2012 12:58 AM, John Spencer wrote:
> as discussed on IRC, this patch changes the regex to a posix compliant 
> version, which works with busybox' grep.
>
> <echristo> i have no objections. sounds like joe and zygoloid actually 
> have it in their sources if they want to push it.
>
> --JS
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20120303/b44ca336/attachment.html>


More information about the llvm-commits mailing list