This is an archive of the discontinued LLVM Phabricator instance.

Haiku: support for secondary arch
Needs RevisionPublic

Authored by kallisti5 on Jul 18 2018, 6:53 AM.

Details

Reviewers
joerg
Summary

Enables Haiku to build llvm for secondary architectures.

Diff Detail

Repository
rC Clang

Event Timeline

kallisti5 created this revision.Jul 18 2018, 6:53 AM

Original author is "Jerome Duval <jerome.duval@gmail.com>" I don't have permission to modify this, can author be updated? (I don't have permission to)

joerg requested changes to this revision.Jul 18 2018, 7:34 AM
joerg added a subscriber: joerg.

This is absolutely not how the clang driver is supposed to work. No conditional compilation.

This revision now requires changes to proceed.Jul 18 2018, 7:34 AM
kallisti5 added a comment.EditedJul 18 2018, 8:06 AM

No worries. I was wondering if this one would match llvm's goals.
Do you see any iteration of these changes that would be accepted? (not using define's, etc)

We currently support "hybrid" operating system builds where we compile a secondary toolchain / abi.

A current functional example of this is we offer a gcc2 compiler + support libraries, and then also offer a gcc7 compiler + support libraries.

$ getarch
x86_gcc2
$ gcc --version
~gcc 2.95
$ gcc test.c -o test
$ ./test

test is a functional binary generated by gcc2 and run using the gcc2 ABI + libraries.


$ setarch x86
$ getarch
x86
$ gcc --version
~gcc 7.3
$ gcc test.c -o test
$ ./test

test is now a functional binary generated by gcc7 and run using the gcc7 ABI's + libraries