microwatt
microwatt copied to clipboard
GHDL build on native powerpc64le requires explicit LLVM backend selection
Debian doesn't build ghdl for powerpc64/le targets yet as package build results in incorrect mcode backend selection on powerpc64/le architectures. Manual specification of ./configure --with-llvm-config=$(which llvm-config)
results in working native GHDL build which can be used to simulate microwatt according to README instructions natively on powerpc64/le. Suggest modifying README to include instructions and workaround lack of GHDL package availability in powerpc64/le debian and debian derived distros.
Thanks @justinlynn, yes we should add something in the README.
@justinlynn would you be able to summarise the steps needed on Debian? Can we use the distro llvm here?
@antonblanchard More than happy to make a PR with the needed changes for Debian, etc. to save you the trouble of translating. As to system LLVM - Yes, I've had success in building GHDL master with Ubuntu Disco's LLVM development packages. If you'd like I can work on streamlining the build/simulation experience with some of the tooling I've put together and submit as small separated PRs - thoughts?
I'll also have to submit a patch to Debian's GHDL packaging so that it builds for ppc64/le.
For anyone reading this in the future the steps required (on Ubuntu Disco ppc64le, at least) are:
- Clone
https://github.com/ghdl/ghdl.git
into a local dir. - Use apt to install
llvm-8-dev
andgnat
, assuming you already have a basic toolchain and such installed (build-essentials
) - Move into the GHDL checkout.
- Run
./configure --with-llvm-config=/usr/bin/llvm-config-8
, using--prefix
to some location you want to install GHDL, if desired (for example$HOME/.local
). - Fix any issues raised by configure, repeat from 4 until clear.
- Run
make && make install
- Assuming that where you installed GHDL is on your $PATH, microwatt's makefile should now work.
@justinlynn sounds great! We've had a couple of people trip over the issues with Debian and Ubuntu, so something in the README would be very useful. Also interested to see your tooling.
I think @sharkcz was looking at ppc64le distro issues too.
Yes, things work out of the box on Fedora with packaged ghdl
.
Cool. I'll have to try that now.
for the record there is a new ghdl in Rawhide, I don't plan to push this build into the stable releases (like F-30), but will make it available in https://copr.fedorainfracloud.org/coprs/sharkcz/danny/
@justinlynn did you want to contribute those instructions to README.md and create a PR?
Yes, I can do that shortly. Apologies for needing to be tagged on that - thanks for the explicit notice!
No worries, I was just cleaning up the issues and wanted to close this out. Thanks @justinlynn
I am so sorry I let this go for so long :/ At the very least for Ubuntu 20.10 or higher with more recent ghdl builds this now works out of the box. Closing this issue.
Actually, no, that's not the case. My mistake. I'll take care of this ASAP.