#180125 - 22/09/2003 01:30
Re: Cross-compile chain for OS X (not uploaded yet)
[Re: Daria]
|
member
Registered: 12/01/2002
Posts: 192
Loc: Phoenix, AZ
|
Cool, I tried to compile it a while ago but didn't get anywhere with compilation problems, so I just put it on my FreeBSD box instead.
|
Top
|
|
|
|
#180126 - 22/09/2003 06:53
Re: Cross-compile chain for OS X (not uploaded yet)
[Re: Daria]
|
member
Registered: 07/11/2001
Posts: 188
Loc: New Jersey
|
Yay! Excellent news. I'll have to give this one a try. Thanks.
_________________________
-- JD - SN# 040104008 (120GB Blue, Digital Out)
|
Top
|
|
|
|
#180127 - 22/09/2003 07:34
Cross-compile chain for OS X uploaded
[Re: Daria]
|
carpal tunnel
Registered: 24/01/2002
Posts: 3937
Loc: Providence, RI
|
http://empeg.dementia.org/distributions/
There will eventually be some sort of nice html page there, but the absolute path to the binary distribution should stay the same.
The compiled kit is about 32 megs compressed.
|
Top
|
|
|
|
#180128 - 24/09/2003 15:16
Re: Cross-compile chain for OS X (not uploaded yet)
[Re: Daria]
|
pooh-bah
Registered: 31/08/1999
Posts: 1649
Loc: San Carlos, CA
|
Hey cool. This will come in handy, thanks.
-Mike
|
Top
|
|
|
|
#180129 - 18/01/2004 21:13
Re: Cross-compile chain for OS X uploaded
[Re: Daria]
|
member
Registered: 07/11/2001
Posts: 188
Loc: New Jersey
|
Now that I've finally gotten around to downloading this toolchain for darwin, I'm curious: is there any way to tie this gracefully into Xcode (or would I even want to)? Inquiring minds ...
_________________________
-- JD - SN# 040104008 (120GB Blue, Digital Out)
|
Top
|
|
|
|
#346363 - 12/07/2011 17:14
Re: Cross-compile chain for OSX Intel
[Re: Daria]
|
carpal tunnel
Registered: 27/06/1999
Posts: 7058
Loc: Pittsburgh, PA
|
Thanks. Have you by any chance tried to build a kernel using this toolchain? I'm getting this error:
arm-empeg-linux-gcc -D__KERNEL__ -I/Users/tonyc/dev/empeg/kernel/current/include -Wall -Wstrict-prototypes -O2 \
-fno-strict-aliasing -pipe -msoft-float -march=armv4 -mtune=strongarm110 -c -o sock.o sock.c
Assembler messages:
option `-marmv4' is deprecated: use -march=armv4
{standard input}:508: Error: Rn must not overlap other operands -- `swp r3,r2,[r3]'
make[3]: *** [sock.o] Error 1
make[2]: *** [first_rule] Error 2
make[1]: *** [_subdir_core] Error 2
make: *** [_dir_net] Error 2
No idea what's going on there. My next step would be to do build my own toolchain instead of relying on your binaries, but if you've got a quick fix, let me know.
|
Top
|
|
|
|
#346371 - 12/07/2011 21:37
Re: Cross-compile chain for OSX Intel
[Re: Daria]
|
carpal tunnel
Registered: 24/01/2002
Posts: 3937
Loc: Providence, RI
|
(it's going to be an issue like this: http://www.rockbox.org/tracker/task/7972but the simplest way to fix it is just to patch the kernel)
|
Top
|
|
|
|
#346376 - 13/07/2011 00:03
Re: Cross-compile chain for OSX Intel
[Re: Daria]
|
carpal tunnel
Registered: 27/06/1999
Posts: 7058
Loc: Pittsburgh, PA
|
Something's screwing with the line numbers, because that line (and many others) are blank. The only swp instruction I see in there is in this block:
extern const char xchg_str[];
extern __inline__ unsigned long __xchg(unsigned long x, volatile void *ptr, int size)
{
switch (size) {
case 1: __asm__ __volatile__ ("swpb %0, %1, [%2]" : "=r" (x) : "r" (x), "r" (ptr) : "memory");
break;
case 2: abort ();
case 4: __asm__ __volatile__ ("swp %0, %1, [%2]" : "=r" (x) : "r" (x), "r" (ptr) : "memory");
break;
default: arm_invalidptr(xchg_str, size);
}
return x;
}
Here's the full sock.i file.
|
Top
|
|
|
|
#346379 - 13/07/2011 01:16
Re: Cross-compile chain for OSX Intel
[Re: Daria]
|
carpal tunnel
Registered: 27/06/1999
Posts: 7058
Loc: Pittsburgh, PA
|
That wins, but fails further into the build: arm-empeg-linux-ar rcs lib.a changebit.o checksum.o clearbit.o copy_page.o findbit.o memchr.o memcpy.o memset.o memzero.o setbit.o strchr.o strrchr.o testchangebit.o testclearbit.o testsetbit.o semaphore.o system.o uaccess.o io-sa1100.o make -C arch/arm/kernel arm-empeg-linux-gcc -D__KERNEL__ -I/Users/tonyc/dev/empeg/kernel/current/include -D__ASSEMBLY__ -mno-fpu -mapcs-32 -marmv4 -c -o entry-armv.o entry-armv.S entry-armv.S: Assembler messages: entry-armv.S:370: Error: Macro `arm700_bug_check' was already defined entry-armv.S:456: Warning: destination register same as write-back base make[1]: *** [entry-armv.o] Error 1 make: *** [_dir_arch/arm/kernel] Error 2
|
Top
|
|
|
|
#346380 - 13/07/2011 01:38
Re: Cross-compile chain for OSX Intel
[Re: tonyc]
|
carpal tunnel
Registered: 24/01/2002
Posts: 3937
Loc: Providence, RI
|
[pre] --- a/arch/arm/kernel/entry-armv.S +++ b/arch/arm/kernel/entry-armv.S @@ -397,8 +397,6 @@ irq_prio_ebsa110: run on an ARM7 and we can save a couple of instructions. --pb */ .macro arm700_bug_check, instr, temp - .endm - .macro arm700_bug_check, instr, temp #ifndef __ARM_ARCH_4__ and \temp, \instr, #0x0f000000 @ check for SWI teq \temp, #0x0f000000
[/pre]
|
Top
|
|
|
|
#346381 - 13/07/2011 01:54
Re: Cross-compile chain for OSX Intel
[Re: Daria]
|
carpal tunnel
Registered: 27/06/1999
Posts: 7058
Loc: Pittsburgh, PA
|
|
Top
|
|
|
|
#346384 - 13/07/2011 02:54
Re: Cross-compile chain for OSX Intel
[Re: Daria]
|
carpal tunnel
Registered: 27/06/1999
Posts: 7058
Loc: Pittsburgh, PA
|
Gotcha. Now I can build kernels, but I'm getting an undefined reference to fstat error when trying to build GNU gettext: make[5]: Nothing to be done for `all-am'. Making all in src /bin/sh ../libtool --tag=CC --mode=link arm-empeg-linux-gcc -DINSTALLDIR=\"/opt/arm/arm-empeg-linux/bin\" -I/opt/arm/include -I/opt/arm/arm-empeg-linux/include/ -L/opt/arm/lib -L/opt/arm/arm-empeg-linux/lib -o gettext gettext-gettext.o ../gnulib-lib/libgrt.a ../intl/libintl.la libtool: link: arm-empeg-linux-gcc -DINSTALLDIR=\"/opt/arm/arm-empeg-linux/bin\" -I/opt/arm/include -I/opt/arm/arm-empeg-linux/include/ -o .libs/gettext gettext-gettext.o -L/opt/arm/lib -L/opt/arm/arm-empeg-linux/lib ../gnulib-lib/libgrt.a ../intl/.libs/libintl.so -lc -Wl,-rpath -Wl,/opt/arm/arm-empeg-linux/lib ../intl/.libs/libintl.so: undefined reference to `fstat' collect2: ld returned 1 exit status
I've never seen anything like that when cross-compiling on my linux machine.
|
Top
|
|
|
|
#346386 - 13/07/2011 03:09
Re: Cross-compile chain for OSX Intel
[Re: tonyc]
|
carpal tunnel
Registered: 24/01/2002
Posts: 3937
Loc: Providence, RI
|
Gotcha. Now I can build kernels, but I'm getting an undefined reference to fstat error when trying to build GNU gettext: make[5]: Nothing to be done for `all-am'. Making all in src /bin/sh ../libtool --tag=CC --mode=link arm-empeg-linux-gcc -DINSTALLDIR=\"/opt/arm/arm-empeg-linux/bin\" -I/opt/arm/include -I/opt/arm/arm-empeg-linux/include/ -L/opt/arm/lib -L/opt/arm/arm-empeg-linux/lib -o gettext gettext-gettext.o ../gnulib-lib/libgrt.a ../intl/libintl.la libtool: link: arm-empeg-linux-gcc -DINSTALLDIR=\"/opt/arm/arm-empeg-linux/bin\" -I/opt/arm/include -I/opt/arm/arm-empeg-linux/include/ -o .libs/gettext gettext-gettext.o -L/opt/arm/lib -L/opt/arm/arm-empeg-linux/lib ../gnulib-lib/libgrt.a ../intl/.libs/libintl.so -lc -Wl,-rpath -Wl,/opt/arm/arm-empeg-linux/lib ../intl/.libs/libintl.so: undefined reference to `fstat' collect2: ld returned 1 exit status
I've never seen anything like that when cross-compiling on my linux machine. I have. there was some fun in glibc i remember from sparclinux that did that. i'm not (network) near the toolchain; what does arm-empeg-linux-nm libc.a |grep fstat show? you'll need the full path to libc in your install.
|
Top
|
|
|
|
#346392 - 13/07/2011 12:11
Re: Cross-compile chain for OSX Intel
[Re: Daria]
|
carpal tunnel
Registered: 27/06/1999
Posts: 7058
Loc: Pittsburgh, PA
|
Yeah, /opt/local is "owned" by MacPorts, so I didn't like the idea of using /opt/local/arm.
I did, however, end up symlinking /opt/local/armtools to /opt/arm, so the paths inside libc.so are legit. Shouldn't that still work?
|
Top
|
|
|
|
#346395 - 13/07/2011 13:02
Re: Cross-compile chain for OSX Intel
[Re: Daria]
|
carpal tunnel
Registered: 27/06/1999
Posts: 7058
Loc: Pittsburgh, PA
|
No dice. I'll build my own toolchain and see if that fixes it.
|
Top
|
|
|
|
#346396 - 13/07/2011 13:32
Re: Cross-compile chain for OSX Intel
[Re: tonyc]
|
carpal tunnel
Registered: 27/06/1999
Posts: 7058
Loc: Pittsburgh, PA
|
Wonderful, now the toolchain build is failing:
hecking whether to build shared libraries... no
checking whether to build static libraries... yes
checking for objdir... .libs
creating libtool
loading cache ../config.cache
checking whether to enable maintainer-specific portions of Makefiles... no
checking for Cygwin environment... (cached) no
checking for mingw32 environment... (cached) no
checking for executable suffix... (cached) .dSYM
checking for gcc... (cached) gcc
checking whether the C compiler (gcc -g -O2 -W -Wall ) works... no
configure: error: installation or configuration problem: C compiler cannot create executables.
Configure in /Users/tonyc/tmp/armtools-darwin/build-binutils/binutils-2.10.1/bfd failed, exiting.
make: *** [arm-linux-binutils] Error 1
It doesn't like gcc? Earlier in the binutils build it likes it just fine, but once it gets into bfd, it doesn't. Update: From the config.log in the bfd subdirectory:
configure:1850: checking for gcc
configure:1963: checking whether the C compiler (gcc -g -O2 -W -Wall ) works
configure:1979: gcc -o conftest.dSYM -g -O2 -W -Wall conftest.c 1>&5
configure:1976: warning: return type defaults to 'int'
ld: can't open output file for writing: conftest.dSYM, errno=21
collect2: ld returned 1 exit status
configure: failed program was:
#line 1974 "configure"
#include "confdefs.h"
main(){return(0);}
errno 21 appears to be EISDIR. wtf?
Edited by tonyc (13/07/2011 13:41)
|
Top
|
|
|
|
|
|