HaikuPorts
  • Login
  • Preferences
  • Help/Guide
  • Wiki
  • Timeline
  • Roadmap
  • View Tickets
  • Search
  • Port Log
  • Blog

Context Navigation

  • ← Previous Ticket
  • Next Ticket →

Ticket #313 (closed task: fixed)

Opened 5 years ago

Last modified 9 months ago

add llvm and clang [needs testing]

Reported by: scottmc Owned by: omnimancer
Priority: normal Milestone:
Component: sys-devel/llvm Version:
Severity: normal Keywords:
Cc: mdisreali@…

Description (last modified by scottmc) (diff)

llvm and clang .bep files have been added with r1849 and r1850, but these need to be verified still before closing out this ticket.

Attachments

llvm-2.8.bep​ (581 bytes) - added by disreali 5 years ago.
clang-3.0.bep​ (627 bytes) - added by kallisti5 3 years ago.
clang 3 port
llvm-3.0-autoregen.diff​ (641 bytes) - added by kallisti5 3 years ago.
not used patch so Haiku can regenerate configure
llvm-3.0-srcdirv2.diff​ (4.4 KB) - added by kallisti5 3 years ago.
not used patch to 3.0 to backport llvm's new "--with-clang-srcdir" flag to 3.0
clang3.0port.tar.gz​ (1.8 KB) - added by kallisti5 3 years ago.
final clang 3.0 port. rev 2

Download all attachments as: .zip

Change History

Changed 5 years ago by disreali

  • attachment llvm-2.8.bep​ added

comment:1 Changed 5 years ago by disreali

  • Cc mdisreali@… added

Initial llvm.bep file attached. not yet tested.

comment:2 follow-up: ↓ 3 Changed 4 years ago by darkwyrm

disreali's .bep file builds properly under GCC4 Hybrid r41280, so all that is left is clang.

comment:3 in reply to: ↑ 2 ; follow-up: ↓ 4 Changed 4 years ago by disreali

Replying to darkwyrm:

disreali's .bep file builds properly under GCC4 Hybrid r41280, so all that is left is clang.

Clang is tricker because its src needs to be in a subdir of the LLVM tree and I have not been able to figure out how to build clang without building llvm at the same time in the same tree.

comment:4 in reply to: ↑ 3 Changed 4 years ago by omnimancer

Replying to disreali:

Replying to darkwyrm:

disreali's .bep file builds properly under GCC4 Hybrid r41280, so all that is left is clang.

Clang is tricker because its src needs to be in a subdir of the LLVM tree and I have not been able to figure out how to build clang without building llvm at the same time in the same tree.

If Cmake is used instead of the configure/make system then clang can be built outside of the LLVM tree, there is a small patch to the cmake files from llvm needed to allow this though, I will try to submit a patch to llvm for it in future.

Changed 3 years ago by kallisti5

  • attachment clang-3.0.bep​ added

clang 3 port

comment:5 Changed 3 years ago by kallisti5

llvm added a flag to specify a clang source path after 3.0 was released... I backported the patch however:

11:47 <@kallisti5> clang bep has to use  the llvm sources and point llvm to the clang sources
11:47 <@kallisti5> so by that point it makes more sense to just download llvm and extract clang into it
11:48 < Disreali> yeah, that is where I got very confused makeing a clang bep also
11:48 <@kallisti5> to do it the "right" way, the clang bep would need to enter the llvm bep build directory
11:48 < Disreali> exactly
11:49 <+jrabbit> so the clag bep should jsut do both?
11:49 < Disreali> jrabbit: that is the easiest way to do it
11:49 <+jrabbit> is there any reason to not want clang and want llvm?
11:49 < Disreali> sure
11:49 <+jrabbit> like is there a down side besides it being HORRIBLE :P
11:50 <@kallisti5> lol
11:50 < Disreali> lots of projects just use llvm. clag is only a C/C++ frontend
11:50 <@kallisti5> no real point to having llvm withoug clang
11:51 <@kallisti5> there are other frontends
11:51 <@kallisti5> and they should be seperate long term
11:51 <@kallisti5> but llvm is pretty bad at how it build frontends
11:51 <@kallisti5> you should build llvm, then point the clang build system at llvm sources if anything

Changed 3 years ago by kallisti5

  • attachment llvm-3.0-autoregen.diff​ added

not used patch so Haiku can regenerate configure

Changed 3 years ago by kallisti5

  • attachment llvm-3.0-srcdirv2.diff​ added

not used patch to 3.0 to backport llvm's new "--with-clang-srcdir" flag to 3.0

Changed 3 years ago by kallisti5

  • attachment clang3.0port.tar.gz​ added

final clang 3.0 port. rev 2

comment:6 Changed 3 years ago by disreali

Thanks for the new bep. I don't want to sound unappreciative, however, all sorts of stuff still gets created in /share/... I attempted to fix it but was unsuccessful. Hopefully someone with more experience can figure it out.

Thanks again for a working bep. It will be real fun to use clang on Haiku.

comment:7 Changed 3 years ago by disreali

  • Summary changed from add llvm and clang to add llvm and clang [files attached, please review]

comment:8 Changed 3 years ago by scottmc

With r1849 and r1850, I have added an llvm-3.0.bep and a clang-3.0.bep, these have not been tested as I don't have a gcc4 installation on my pc at this time. Please check these over and update to a single patch for each if needed, such that the patch when put into the patches/ directory for llvm and clang in the haikuports tree that they will just build without any issues on a gcc4 install. If you need more than a single patch, please try to combine them down into one if possible. If there are issues with the .bep I just added be sure to post corrected versions here as well. If llvm 3.0 does not work but 2.8 does then let me know that as well. It was not easy figuring out which files were/were not needed here, so a little better direction would be helpful next time.

comment:9 Changed 3 years ago by scottmc

  • Description modified (diff)
  • Summary changed from add llvm and clang [files attached, please review] to add llvm and clang [needs testing]

comment:10 Changed 3 years ago by kallisti5

looking back at this, this bep really should be reworked as much as possible to ensure clang is closer to how gcc is.

For example:
/boot/develop/tools/gnupro/bin/gcc
/boot/develop/tools/gnupro/bin/g++

gnupro is a symlink to /boot/develop/abi/x86/gcc2 or /boot/develop/abi/x86/gcc4

It would be nice clang could be plopped at /boot/develop/abi/x86/clang. setgcc clang would be nice :) (and maybe symlinking setgcc to setcompiler)

comment:11 Changed 9 months ago by pulkomandy

  • Resolution set to fixed
  • Status changed from new to closed

We have recipes that work reasonably well now. Please open separate tickets for each issue you may find at the new haikuports home now.

Note: See TracTickets for help on using tickets.

Download in other formats:

  • Comma-delimited Text
  • Tab-delimited Text
  • RSS Feed

Trac Powered

Powered by Trac 0.13dev-r10686
By Edgewall Software.

Visit the Trac open source project at
http://trac.edgewall.org/