Login
Username:

Password:

Remember me



Lost Password?

Register now!

Sections

Who's Online
36 user(s) are online (24 user(s) are browsing Forums)

Members: 1
Guests: 35

Amiguy, more...

Headlines

 
  Register To Post

LLVM news?
Not too shy to talk
Not too shy to talk


See User information
Did I hear correctly that at AmiWest ssolie said they have a LLVM cross compiler up and running for OS4? Can anyone validate that? If it's true, do we know which version?

Go to top
Re: LLVM news?
Just popping in
Just popping in


See User information
@NinjaCyborg

I have the LLVM tools compiling and running it is the current development branch. This is not Clang. Right now it is the LLVM libraries which Clang is based upon. The development fork is available on my github.

https://github.com/DStastny/llvm-project

It does require my fork of Clib2 to build that address some issues with data definitions and the latest GCC 11.

I will be creating a separate repo with the configuration parameters for CMAKE required to build as well as some instructions but my I have been bit busy as of late.

Regards
Doug


Go to top
Re: LLVM news?
Just popping in
Just popping in


See User information
Steps to build LLVM
1. Build GCC 11 from adtools
2. Clone my repos for Clib2 and LLVM
3. Build Clib2
4. Build LLVM with bash script below to configure cmake changing variables to point to location appropriate for your cross compiler location.

I suggest reading how to build LLVM with CMAKE located here:
https://llvm.org/docs/CMake.html



#!/bin/bash  
#-DLLVM_EXPERIMENTAL_TARGETS_TO_BUILD="AMDGPU" \  
cmake -DCMAKE_SYSTEM_NAME="Generic" \
  
-DCMAKE_SYSTEM_PROCESSOR="PowerPC" \
  
-DLLVM_HOST_TRIPLE="ppc-amigaos-unknown" \
  
-DCMAKE_C_COMPILER="/opt/adtools/bin/ppc-amigaos-gcc" \
  
-DCMAKE_CXX_COMPILER="/opt/adtools/bin/ppc-amigaos-g++" \
  
-DCROSS_TOOLCHAIN_FLAGS_NATIVE:STRING="-DCMAKE_C_COMPILER=gcc;-DCMAKE_CXX_COMPILER=g++" \
  
-DCMAKE_CXX_FLAGS_INIT="-mcrt=clib2 -athread=native" -DCMAKE_C_FLAGS_INIT="-mcrt=clib2" -DUNIX=1 \
  
-DCMAKE_INSTALL_PREFIX="/opt/adtools/llvm" \
  
-DLLVM_DEFAULT_TARGET_TRIPLE="ppc-amigaos-unknown" \
  
-DLLVM_TARGET_ARCH="PowerPC" \
  
-DLLVM_TARGETS_TO_BUILD="PowerPC" \
  
-DLLVM_ENABLE_THREADS=OFF \
  
-DLLVM_BUILD_EXAMPLES=OFF \
  
-DLLVM_INCLUDE_TESTS=OFF \
  
-DLLVM_INCLUDE_BENCHMARKS=OFF \
  
-DCMAKE_BUILD_TYPE="Release" \
   
/home/dstastny/projects/repos/llvm-project/llvm-project/llvm


Regards
Doug

Go to top
Re: LLVM news?
Not too shy to talk
Not too shy to talk


See User information
Thanks well done. Next obvious question then is, what would be needed to finish to get to the point where you could build Rust stuff?

Go to top
Re: LLVM news?
Just popping in
Just popping in


See User information
I always hoped that someone could write a custom pass manager that would allow each pass of the optimizer to be stored in a separate shared library so they could load in a few at a time and close the unused ones so they could be flushed out of RAM on an Amiga.

I was naieve enough at one point to think that someone would be me. Heh! Weren't those the days!

Go to top
Re: LLVM news?
Just popping in
Just popping in


See User information
@NinjaCyborg

I am not that familiar with Rust and I could not find to straight forward instructions on porting. My understanding the big dependency is the LLVM libraries which should be usable in current state(sans bugs with my code). The next big part to my understanding is the STD library which seems to be the big deal.

Since I am not interested in Rust it would not be something I would do, but would assist anyone who took it on to ensure the LLVM is in good shape.

Regards
Doug

Go to top
Re: LLVM news?
Just popping in
Just popping in


See User information
@Samurai_Crow

I just wish I could get it to build with Shared Libraries. But at moment only the clib2 was close enough to support GCC 11 and std libraries and I had to make a few changes to that.

Right now huge weakness in Amiga toolchains is dated C library support. Clib is ok but only static libraries and has hacks to work around missing bits and bobs.

For AmigaOS4 updated NewLib would be ideal. Its closed source unfortunately and I have no idea if we will ever see a new version publicly available.

Part of what makes Amiga fun is also its greatest weakness its does not have strong POSIX compatibility.

Regards
Doug

Go to top
Re: LLVM news?
Amigans Defender
Amigans Defender


See User information
I have a clib2 version that works with shared libraries but at moment is closed. If someone is interested feel free to contact me. It has some problems but also a lot of improvements

i'm really tired...
Go to top
Re: LLVM news?
Just popping in
Just popping in


See User information
@NinjaCyborg

Regarding Rust, i found a time ago the following information about how to get it ported:

https://www.reddit.com/r/rust/comments ... o_crosscompile_for_a_new/

Go to top
Re: LLVM news?
Not too shy to talk
Not too shy to talk


See User information
@afxgroup

Yes please. Do I remember right you did this for your python 3 port? Or do I confuse you with someone else.

Go to top
Re: LLVM news?
Just popping in
Just popping in


See User information
@MigthyMax
It looks like your Reddit link is about right. It's also about 5 years old.

Re:Rust
I have been using Rust on Haiku for a while now and the syntax highlights are all the editors there have to offer. Tier 3 support means no cross compiler hosting for other platforms to use. The source is hosted on GitHub like any other source and the build recipe on HaikuPorts builds a native Haiku compiler for the HaikuDepot package manager using Haiku's own continuous integration expenses. Fortunately, Haiku Inc. is a non-profit corporation so the CI build bots are probably donated.

If the same thing were done for AmigaOS 4.1fe2, who would maintain the build bots and at whose expense? Neither AEon nor Hyperion are non-profit groups.

Go to top
Re: LLVM news?
Just popping in
Just popping in


See User information
@Samurai_Crow

It was the only source i could find about how to port rust. Nevertheless i think, like you, it is better than nothing. And as long i understand before even thinking about to port rust a working LLVM and clang environment, or at least as a cross compiler, is needed.

If your major issue with porting rust is about the build bots, you've come a long way in porting rust . In my opinion that's an issues to take care about if someone has come that long to build rust locally.

Go to top
Re: LLVM news?
Amigans Defender
Amigans Defender


See User information
@NinjaCyborg

I need an email that is enabled on github

i'm really tired...
Go to top
Re: LLVM news?
Just popping in
Just popping in


See User information
@MigthyMax

The point I was trying to make was that Rust is a fast-moving target and won't stay up-to-date very long.

Go to top
Re: LLVM news?
Just popping in
Just popping in


See User information
@Samurai_Crow

That's probably true, that they move fast.

Go to top

  Register To Post

 




Currently Active Users Viewing This Thread: 1 ( 0 members and 1 Anonymous Users )




Powered by XOOPS 2.0 © 2001-2016 The XOOPS Project