How can I using the right triple?

Hi all

When I use
user@ubuntu:/home$ clang -cc1 -triple mips64el-unknown-linux-gnu
-ccc-clang-archs mips64el -mabi=n64 a.c

I get a error:
error: unknown argument: '-ccc-clang-archs'
error: unknown argument: '-mabi=n64'

So I use
user@ubuntu:/home$ clang -ccc-host-triple mips64el-unknown-linux-gnu
-mabi=n64 a.c

I get s error like:
clang: warning: unknown platform, assuming -mfloat-abi=soft
In file included from a.c:1:
In file included from /usr/include/stdio.h:28:
In file included from /usr/include/features.h:388:
/usr/include/gnu/stubs.h:7:11: fatal error: 'gnu/stubs-32.h' file not found
# include <gnu/stubs-32.h>

How can I use the right triple?
Thanks.

--Liu

Hello

How can I use the right triple?
Thanks.

You're using the "right" triplet. However:
1. Your system is unknown to driver (as shown in the warning)
2. You need to "teach" driver to look for paths to the includes for
your platform

Hello

How can I use the right triple?
Thanks.

You're using the "right" triplet. However:
1. Your system is unknown to driver (as shown in the warning)

I'm looking into it.

2. You need to "teach" driver to look for paths to the includes for
your platform

After added -I, I get more errors...

--
With best regards, Anton Korobeynikov
Faculty of Mathematics and Mechanics, Saint Petersburg State University

Thank you.

--Liu

Hi, Liu

> 1. Your system is unknown to driver (as shown in the warning)
I'm looking into it.
> 2. You need to "teach" driver to look for paths to the includes for
> your platform

  I think what Anton means is you should modify clang source
to include path to system header.

  See clang/lib/Frontend/InitHeaderSearch.cpp.

Regards,
chenwj

I have somebody working on this.

You can communicate with him. He just started and does not have his mips account yet.
simon@atanasyan.com

There are many issues related to the driver.

Reed

I have somebody working on this.

You can communicate with him. He just started and does not have his mips
account yet.
simon@atanasyan.com

There are many issues related to the driver.

Reed

You mean he is working on clang driver or llvm be?

--Liu

Yes, Simon is looking into modifying the clang and llvm driver so that we can use it for end to end compilation.

We have our own driver that I wrote in python. That is what we use now.
It's very easy to add new hosts/ports to it whereas it seems to be an overly complex process to understand and make changes to the clang driver. In the end, many things are hard coded into the clang front end that should be configurable without making source changes and this was very disturbing to me. I didn't have the bandwidth to sort all of that out and we urgently needed a gcc compatible driver that could work with normal open source make files.

Reed

Please have him send the ideas you’re working on to the list. I wrote up a very long list of the directions I think it should go a while back in a conversation with the ARM folks (Mr. Malloy) as well.

-eric

Hi,

I'm ahead of you actually Eric and already contacted Reed about it!

I fully intend to put forward a set of patches that implement what we discussed very shortly (in the next 2 weeks). I must admit that after our discussion I feel there was some miscommunication as to who had the action to actually implement the spec - it was only after a prolonged silence that I realised it was me! :slight_smile:

For the list's benefit, the discussion was based around a set of patches I supplied a few months back to ease the cross compilation story and tablegen up the Clang driver to get rid of those horrible switch/cases and -ccc-host-triple. Myself and Eric agreed on pretty much everything, but I want to implement the patch much better so I'm writing from scratch.

I can forward the related emails if there is interest.

Cheers,

James

Hi,

I'm ahead of you actually Eric and already contacted Reed about it!

Excellent.

I fully intend to put forward a set of patches that implement what we discussed very shortly (in the next 2 weeks). I must admit that after our discussion I feel there was some miscommunication as to who had the action to actually implement the spec - it was only after a prolonged silence that I realised it was me! :slight_smile:

Sorry, I've ended up being terribly busy :frowning:

For the list's benefit, the discussion was based around a set of patches I supplied a few months back to ease the cross compilation story and tablegen up the Clang driver to get rid of those horrible switch/cases and -ccc-host-triple. Myself and Eric agreed on pretty much everything, but I want to implement the patch much better so I'm writing from scratch.

Whee! If you can make it somewhat incremental and a series of patches that'd be awesome. Otherwise I'll still review it - it may just take longer :slight_smile:

-eric