[cfe-dev] First shot at Bug 4127 - The clang driver should support cross compilation

James Molloy James.Molloy at arm.com
Tue Jan 10 00:25:14 PST 2012

Hi Sebastian,

Were you at the driver BoF at the conference? We discussed the cross compilation story there (although your solution does look similar to that discussed, so maybe that's not a coincidence...)

I'm actually already working on a patch to do the same. I think the problem is more involved than just setting up target and include dirs - I think the target database should have OS specific information too (which flags are required per OS etc, so a distro maintainer can change whatever he may need at package time without patching the source).

As I say, I'm working on a patch that I think is a superset of yours and would conflict massively. I've been planning it for some time and think I have a viable end goal and route to get there. Would it be possible for you to hold off your patch for a week or so until mine is ready and can be used as a base?



-----Original Message-----
From: Sebastian Pop [mailto:spop at codeaurora.org]
Sent: 09 January 2012 21:01
To: cfe-dev at cs.uiuc.edu Developers; clang-commits at cs.uiuc.edu
Cc: Eric Christopher; James Molloy
Subject: First shot at Bug 4127 - The clang driver should support cross compilation


The attached patch uses the JSON parser to read the target
from a config file.  I would like to get some opinions on this
patch before we go further to fix

In a first implementation, I would like to have at least the following
information registered in the config file:

        "target": "arm-none-linux-gnueabi",
        "c-include-dirs": "/gcc/path:/libc/path",
        "cxx-include-root": "/some/other/path"

In a second step, I would like to add the full explicit path to the
assembler, to the linker, the -L paths, and the -I paths.

I would like the default config file to be created by the configure scripts,
and all the logic that is currently executed at each clang compilation
to be moved to configure time.

One other point to be discussed is the place where to install these
target config files: in the current patch I am looking in targets, a subdir
of the install dir.  Is there a better place to put these config files?

Qualcomm Innovation Center, Inc is a member of Code Aurora Forum

-- IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium.  Thank you.

More information about the cfe-dev mailing list