[llvm-commits] [PATCH] LNT: enable parsing of cc1-line on ARM-linux platform.

Daniel Dunbar daniel at zuster.org
Mon Nov 5 13:51:02 PST 2012


LGTM.

Thanks,
  - Daniel


On Thu, Nov 1, 2012 at 10:49 AM, Kristof Beyls <kristof.beyls at arm.com>wrote:

> Hi Daniel,
>
> The attached one-line patch allows me to use LNT to start a run of the test
> suite with GCC as a compiler on an ARMv7-linux platform.
>
> My understanding is that LNT tries to figure out what the cc1 binary is by
> calling the compiler (e.g. /usr/bin/gcc) as follows:
> /usr/bin/gcc -v -E -x c /dev/null -###
>
> On an x86 machine, this seems to print out a number of lines, including the
> following, that is parsed by LNT:
>  "/usr/lib/gcc/x86_64-linux-gnu/4.4.3/cc1" "-E" "-quiet" "-v" "/dev/null"
> "-D_FORTIFY_SOURCE=2" "-mtune=generic" "-fstack-protector"
>
> On the ARMv7-linux machine I tried it on, the above command results in the
> following line containing cc1 to be printed:
>  /usr/lib/gcc/arm-linux-gnueabihf/4.6/cc1 -E -quiet -v -imultilib .
> -imultiarch arm-linux-gnueabihf /dev/null "-march=armv7-a"
> "-mfloat-abi=hard" "-mfpu=vfpv3-d16" -mthumb -fstack-protector
>
> The regular expression used in LNT to extract the cc1 path is the
> following,
> which does expect the double quotes to always be present around cc1:
> r' "([^"]*)".*"-E".*'
>
> The attached patch adapts the regular expression to correctly parse the
> cc1-line whether the double quotes are present or not.
>
> This is my first patch to LNT, so even though it seems trivially simple,
> could you review it before I commit?
>
> Thanks,
>
> Kristof
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20121105/62c1681a/attachment.html>


More information about the llvm-commits mailing list