[PATCH] Fix clash of gcc toolchains in hexagon driver regression tests

Samuel F Antao sfantao at us.ibm.com
Wed Nov 5 13:29:20 PST 2014


Hi Rafael,

Thanks for the review. I followed your suggestion and used
getGCCToolchainDir instead. git-clang-format seems not to complain about
any issues now.

The new patch is attached.

Thanks again!
Samuel

(See attached file: clang_hexagon_fix.patch)

Rafael Espíndola <rafael.espindola at gmail.com> wrote on 11/01/2014 01:39:16
AM:

> From: Rafael Espíndola <rafael.espindola at gmail.com>
> To: Samuel F Antao/Watson/IBM at IBMUS
> Cc: llvm cfe <cfe-commits at cs.uiuc.edu>
> Date: 11/01/2014 01:39 AM
> Subject: Re: [PATCH] Fix clash of gcc toolchains in hexagon driver
> regression tests
>
> +  std::string gcc_toolchain( (A) ? A->getValue() : GCC_INSTALL_PREFIX);
> +
> +  if ( !gcc_toolchain.empty() )
> +    return gcc_toolchain;
>
>
> You don't need the () in (A). The formatting is wrong, pleas run
> git-clang-format to format the patch. Even better, can't you just use
> getGCCToolchainDir?
>
>
> On 3 October 2014 17:03, Samuel F Antao <sfantao at us.ibm.com> wrote:
> > Ping!
> >
> > 2014-09-10 19:11 GMT-04:00 Samuel F Antao <sfantao at us.ibm.com>:
> >>
> >> Hi all,
> >>
> >> The driver regression tests for the hexagon target rely on the
> >> minimal/dummy toolchain that comes in the Inputs folder included in
the
> >> clang driver tests’s folder. The path to the right toolchain is
specified
> >> using the -ccc-install-dir switch. However, if clang was configured
with a
> >> custom gcc toolchain (either by using GCC_INSTALL_PREFIX in cmake or
the
> >> equivalent configure command), the path to the custom gcc toolchain
path
> >> takes precedence to the one specified by -ccc-install-dir. This causes
> >> several regression tests to fail as they will be using an unexpected
path.
> >> Adding the switch --gcc-toolchain=“” in each test command is not
enough as
> >> the hexagon toolchain implementation in the driver is not evaluating
this
> >> argument.
> >>
> >> This patch modifies the hexagon toolchain to take the
--gcc-toolchain=“”
> >> argument into account when deciding the toolchain path, similarlyto
what is
> >> already done for other targets’ toolchains. Additionally, the faulty
> >> regression tests are modified in order to --gcc-toolchain=“” be passed
to
> >> the commands.
> >>
> >> The modified files are the following:
> >>
> >> lib/Driver/ToolChains.cpp
> >> lib/Driver/ToolChains.h
> >> lib/Driver/Tools.cpp
> >> test/Driver/hexagon-toolchain-elf.c
> >> test/Driver/hexagon-toolchain.c
> >>
> >> Thanks,
> >>
> >> Sam
> >>
> >> (See attached file: clang_hexagon_toolchain.patch)
> >>
> >>
> >> _______________________________________________
> >> cfe-commits mailing list
> >> cfe-commits at cs.uiuc.edu
> >> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
> >>
> >
> >
> > _______________________________________________
> > cfe-commits mailing list
> > cfe-commits at cs.uiuc.edu
> > http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
> >
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20141105/a2469ba4/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: clang_hexagon_fix.patch
Type: application/octet-stream
Size: 24084 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20141105/a2469ba4/attachment.obj>


More information about the cfe-commits mailing list