Opened 9 years ago

Closed 5 years ago

#6389 closed enhancement (fixed)

[patch] support for clang compiler

Reported by: kaliber Owned by: bonefish
Priority: normal Milestone: R1
Component: Build System Version: R1/Development
Keywords: clang Cc: mdisreali@…
Blocked By: Blocking:
Has a Patch: no Platform: All

Description

This patch allows to use clang compiler (native only, no cross compiler). Note that clang still uses gcc for linking, assembler and stdc++ library.

Attachments (1)

haiku-clang.patch (4.9 KB ) - added by kaliber 9 years ago.

Download all attachments as: .zip

Change History (10)

by kaliber, 9 years ago

Attachment: haiku-clang.patch added

comment:1 by kaliber, 9 years ago

Has a Patch: set

comment:2 by tqh, 9 years ago

Note that clang still uses gcc for linking, assembler and stdc++ library.

Is this why HAIKU_GCC is introduced? In that case it looks fine to me, but I'm still a bit unexperienced here so I want a second opinion.

in reply to:  2 comment:3 by kaliber, 9 years ago

Replying to tqh:

Note that clang still uses gcc for linking, assembler and stdc++ library.

Is this why HAIKU_GCC is introduced?

Yes.

comment:4 by stippi, 9 years ago

Looks fine to me as well. Ingo may know more about any unwanted implications or side effects.

comment:5 by tqh, 9 years ago

Tested the configure changes with this:

$ ./configure --build-cross-tools-gcc4 x86 ../buildtools/ --include-gpl-addons --include-patented-code -j3

Unfortunatly it fails after configuring with:

$ jam -a -j3 -q @disk
No `BuildConfig' found in generated/build! 
Run ./configure in the source tree's root directory first! 

Also the help for configure shows clang flag and its description misaligned. Since its only native I suggest it is also mentioned in the description.

comment:6 by bonefish, 9 years ago

Sorry for the late response. It certainly doesn't harm to have the patch available here for people who are interested in trying it, but ATM I don't see any benefit in actually applying it, particularly because I find the clang/gcc mix not so clean. I'd rather see clang support being added in what I think is the right order, i.e. starting with cross compilation support, and ideally without mixing and matching gcc components.

comment:7 by Disreali, 9 years ago

Cc: mdisreali@… added

comment:8 by bonefish, 8 years ago

Has a Patch: unset

comment:9 by waddlesplash, 5 years ago

Resolution: fixed
Status: newclosed

Clang support has been merged to master.

Note: See TracTickets for help on using tickets.