Cross-Compiling and libs
Hi folks,
Another probably-basic question because I'm not very familiar with cross compiling under gcc (I've been using vbcc). On a bit of a whim I thought I'd see whether I could get ruby building for the classic amiga. The source is downloadable and its a standard configure/make process on most unixy platforms (I'm on an intel Mac). I have bebbos gcc toolchain installed and working very well for building stuff I wrote myself, no configure step necessary. It lives in /opt/amiga and the /opt/amiga/bin contains eg m68k-amigaos-gcc I go into the ruby source dir and type ./configure --source m68k-amigaos and I get pretty far through...until. Code:
configure: error: clock_gettime() or gettimeofday() must exist I know its a bit of a niche question, but I figure there's a lot of people here used to doing this kind of stuff :-). Thanks in advance for any suggestions, Alan |
Just remembered this other post http://eab.abime.net/showthread.php?t=105897 which also had a problem with gettimeofday() :-/. So...
Code:
CFLAGS=-mcrt=clib2 ./configure --host m68k-amigaos Code:
m68k-amigaos/bin/nm: sorry - this program has been built without plugin support |
Final update of the evening is that I'm now stuck getting it to recognise /opt/amiga/m68k-amigaos/lib/libpthread.a
Code:
checking for pthread_create in -lthr... no |
Quote:
I recommend using -libnix aka -mcrt=nix20 instead of clib2. Quote:
use the prefixed programs in $PREFIX/bin -> $PREFIX/bin/m68k-amigaos-nm |
@bebbo
I tried -mcrt=nix20 and configure stopped dead at "checking your c compiler is working" :-/. I hate that I can't find useful information to help me debug this stuff beyond a "it didn't work" error message. I feel like a 5 year old :-) As regards a different nm I'm not sure how to point at those binaries beyond the --host m68k-amigaos that I am already using ? |
I think the nm problem is just a bad error message, it has managed to auto-translate ranlib -> m68k-amigaos-ranlib for example. My thought is that it *is* using the correct binary but in the amiga-gcc/Makefile I see --disable-plugins
https://github.com/bebbo/amiga-gcc/b.../Makefile#L335 hence "this program has been built without plugin support" |
So I changed that line in the amiga-gcc Makefile and rebuilt everything with --enable-plugins. On a whim I tried mcrt=nix20 so I could get the right error message to paste here, and I'll be damed but it worked right the way through.
Code:
CFLAGS=-mcrt=nix20 ./configure --host m68k-amigaos --enable-threads=posix Code:
checking for m68k-amigaos-gcc-nm... m68k-amigaos-gcc-nm |
Notes mostly for myself and anyone else who tries this later.
First thing I needed to do was define HAVE_GCC_ATOMIC_BUILTINS=1 to make include/ruby/atomic.h happy. Have now hit an issue where coroutine/ucontext/Context.h is looking for <ucontext.h> which appears to be part of glibc but isn't present in opt/amiga. Investigations continue. :-) https://github.com/lattera/glibc/blo...sys/ucontext.h |
Have you ever figured it out? Curious as I am looking around to see who has accomplished what with regards to Ruby on the Amiga. @alancfrancis
|
All times are GMT +2. The time now is 14:09. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.