[cfe-dev] GNU-style target triple and -m32 modifier

Joerg Sonnenberger joerg at britannica.bec.de
Tue May 3 09:47:44 PDT 2011


Hi all,
the last issue I have with using $TARGET-clang and associated
$TARGET-ld/$TARGET-as handling for the NetBSD cross-compiling setup is
the interaction with -m32. The current logic modifies the target when
-m32 is found and ends up calling different as/ld instances as a result.
One problem is that at least for NetBSD, the GNU style triple for i386
and x86_64 are different, since i386-netbsd is actually the legacy a.out
target.

The attached part distinguishes between the triple given by the user and
whatever is passed down to different parts of clang (cc1, clang-as).
It does the job, but this is going to duplicate a lot of code for other
platforms. The other issue of course is the XXX comment at the end about
toolchain caching. This would work at the moment, since the primary
triple is the same for all compilations inside clang, but would fail as
soon as a clang daemon was written.

Joerg
-------------- next part --------------
A non-text attachment was scrubbed...
Name: tool-prefix.diff
Type: text/x-diff
Size: 6404 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20110503/142b8529/attachment.diff>


More information about the cfe-dev mailing list