|Subject:||Re: Cross-compiling GNUstep?|
|Date:||Sun, 29 Dec 2013 17:46:28 +0000|
By no means do I claim to have done things the right way, but it seems that work that I did plus work based on Emmanuel's patches did things right for Android.
It may be worth looking through my commits around April and May 2013 into -make and -base. Then look at:
I never completed the work, but I tried it Thursday and:
- nonupstreamed patches failed to apply due to changes in GNUstep
- there was a linker error, IIRC with sysinfo(), probably because Bionic doesn't expose that.
There have been some warnings and errors from configure scripts mentioning that I am incorrectly trying to cross-compile but I didn't look into that closely yet.
IIRC there wasn't much need for deep 'hacking' of the build process itself (otherwise I wouldn't try to upstream it; Emmanuel's patches tried to hack a lot of things which is why they could not be applied -- they'd break other platforms).
I managed to get -base cross-compiled, at least. I had to hack the GNUmakefile, because even when I tell it that it's cross compiling for a modern runtime, it correctly defines the OBJC2RUNTIME thing in the features header, but not in the GNUmakefile.
I couldn't manage to persuade our autoconf stuff to pass the required [OJB]C[XX]FLAGS when trying to build things, so I had to make little wrapper scripts that invoked clang[++] with the required arguments (-B, --sysroot, -target, and so on).
Note that poor cross-build support makes supporting embedded platforms difficult, and embedded these days can easily mean 1GHz CPU and 256MB of RAM. Unfortunately, this appears to be part of the legacy of autotools / GNUstep Make.
On 29 Dec 2013, at 15:20, Fred Kiefer <address@hidden> wrote:
> On 29.12.2013 13:56, David Chisnall wrote:
>> Hello everyone,
>> I'm trying to cross-compile GNUstep, and since I'm sure I'm not the first person to try this, I wondered if anyone had written up how to do it? I am trying to build from FreeBSD/amd64 for FreeBSD/MIPS64. I have a cross-compiler and sysroot setup. Building the runtime was trivial - just point cmake at the cross-compile toolchain file - what do I need to do for Make / base so that:
>> - It knows that I don't actually want -make on the target platform.
>> - I get an installed version somewhere on my local machine that I can copy to a different location on the remote
>> - All of the correct cross-compile flags are passed to the compiler
>> I think Ivan has been through all of this recently for Android?
> Hi David,
> you probably know about our wiki page on this subject
> that isn't all that helpful.
> I tried to cross compile GNUstep myself years ago but failed in that
> attempt. The two biggest issues I remember where the configure scripts
> and GNUstep make. We rely heavily on our configure scripts to figure out
> how GNUstep core components should be compiled. The best thing you can
> do is copy the configure scripts over to the target system and try to
> run them there. Of course this requires all the development tools to be
> installed there as well. You then have the resulting configuration files
> (different ones for each component when I remember correctly) that you
> copy back to the cross-compilation environment. You could of course rely
> on autoconf to sort things out for you, but it didn't work for me or try
> to guess everything yourself :-(
> The problem with GNUstep make as I remember it was that it had a
> somewhat different view of the host/build/target triple than any other
> cross compilation system I know of. As a result helper tools get
> compiled for the target environment but will get run during the build.
> The best instructions I can find at the moment are in the INSTALL file
> of make.
> Hope this helps,
> Gnustep-dev mailing list
-- Send from my Jacquard Loom
Gnustep-dev mailing list
|[Prev in Thread]||Current Thread||[Next in Thread]|