On Mon, Nov 26, 2012 at 11:15 AM, Andrew Turner <[email protected]> wrote:
> On Sat, 24 Nov 2012 22:23:40 +0200
> Dmitri Gribenko <[email protected]> wrote:
>
>> On Sat, Nov 24, 2012 at 10:47 AM, Andrew Turner
>> <[email protected]> wrote:
>> > Hello,
>> >
>> > The attached patch adds initial support to clang for FreeBSD on ARM.
>> > I've tested this on FreeBSD's integrated clang 3.1 and forward
>> > ported the changes to clang's trunk.
>>
>> Hi Andrew,
>>
>> I am not an expert on this part of Clang, but this definitely needs
>> tests.
>>
> Are you able to point me in the direction of the sort of tests you
> would expect for the patch? I'm not familiar with clang's testing
> framework.

Rafael has already given an advice.  Here's more:

+      Builder.defineMacro("__FreeBSD_ARCH_armv6__");

You might want to add a test to test/Preprocessor/init.c for this.

+  } else if (getToolChain().getArch() == llvm::Triple::arm ||
+             getToolChain().getArch() == llvm::Triple::thumb) {
+    CmdArgs.push_back("-mfpu=softvfp");
+    switch(getToolChain().getTriple().getEnvironment()) {
+    case llvm::Triple::GNUEABI:
+    case llvm::Triple::EABI:
+      break;
+
+    default:
+      CmdArgs.push_back("-matpcs");
+    }

As far as I understand, this could be tested with something like
test/Driver/freebsd-mips-as.c.

Dmitri

-- 
main(i,j){for(i=2;;i++){for(j=2;j<i;j++){if(!(i%j)){j=0;break;}}if
(j){printf("%d\n",i);}}} /*Dmitri Gribenko <[email protected]>*/
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to