Compiling RISC OS gccsdk on Mac OS X 10.2 (Darwin)

Richard Blythe richardb at a35.ph.man.ac.uk
Thu Feb 13 09:15:45 PST 2003


Hi,

As the subject suggests, I'm trying to build the gccsdk for RISC OS on 
Mac OS X 10.2 (Darwin) which I understand to be a BSD derivative.  As 
the existence of this message suggests, I've run into difficulties and
can't see if the solution to my problems is already lurking in the 
mailing list somewhere.

I'd really appreciate it if someone could answer the following 
questions:

(i)   Is this a stupid thing to try and do?

(ii)  Has anyone tried and succeeded?

(iii) Assuming the answers to (i) and (ii) are both "no", can anyone 
offer any advice.

Attached (because my mailer wraps the lines unfavourably if included in 
the email body) are annotated highlights of the compilation session (my 
comments begin with a # character).  The raw version is at 
http://theory.ph.man.ac.uk/~richardb/gccsdk-log.txt

If there's any info I should be supplying please let me know.

Cheers, Richard
-------------- next part --------------
# Create directories

[fry:~] riscos% mkdir gccsdk
[fry:~] riscos% mkdir cross

# Download latest release from CVS

[fry:~] riscos% cd gccsdk
[fry:~/gccsdk] riscos% cvs -z 3 -d :pserver:anoncvs at cvs.hard-mofo.dsvr.net:/usr/local/cvsroot co -r release_2_95_4_v3 gccsdk
cvs server: Updating gccsdk

# Lots of files downloaded, last is...

U gccsdk/unixlib/source/wchar/wmemset.c

# CVS client hangs at this point; but have had this problem before (think it
# might be firewall related) and experience tells me that a simple ^C is
# harmless and lets me continue.

^Ccvs [checkout aborted]: received interrupt signal

# Check I have right software versions

[fry:~/gccsdk/gccsdk] riscos% autoconf --version
autoconf (GNU Autoconf) 2.52
Written by David J. MacKenzie.

Copyright 1992, 1993, 1994, 1996, 1999, 2000, 2001
Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
[fry:~/gccsdk/gccsdk] riscos% bison --version
GNU Bison version 1.28
[fry:~/gccsdk/gccsdk] riscos% gperf --version
GNU gperf 2.7.2
[fry:~/gccsdk/gccsdk] riscos% sed -V
GNU sed version 4.0.5
Copyright (C) 2002 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE,
to the extent permitted by law.

# Follow the instructions

[fry:~/gccsdk/gccsdk] riscos% autoconf; autoheader
[fry:~/gccsdk/gccsdk] riscos% ./configure --prefix=/Users/riscos/cross

# Snip usual configure output

# Convince myself that 'make' is actually GNU make

[fry:~/gccsdk/gccsdk] riscos% make -v
GNU Make version 3.79, by Richard Stallman and Roland McGrath.
Built for powerpc-apple-darwin6.0
Copyright (C) 1988, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99
        Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.

Report bugs to <bug-make at gnu.org>.

# Run the setup script

[fry:~/gccsdk/gccsdk] riscos% make setup

# Lots of mkdirs and perl scripts

# Now the big one:

[fry:~/gccsdk/gccsdk] riscos% make

# Everything's fine until...

gcc -o /Users/riscos/cross/bin/arm-riscos-aof/2_95_4/ld /Users/riscos/gccsdk/gccsdk/arm-riscos-aof/riscos-aof/ld/stage1/ld.o /Users/riscos/gccsdk/gccsdk/arm-riscos-aof/riscos-aof/ld/stage1/rname.o -L/Users/riscos/gccsdk/gccsdk/arm-riscos-aof/libiberty/stage1 -liberty
ld: archive: /Users/riscos/gccsdk/gccsdk/arm-riscos-aof/libiberty/stage1/libiberty.a has no table of contents, add one with ranlib(1) (can't load from it)
make[2]: *** [/Users/riscos/cross/bin/arm-riscos-aof/2_95_4/ld] Error 1
make[1]: *** [ld] Error 2
make: *** [riscos-aof-stg1] Error 2

# OK, easily fixed (but makes me wonder if there's something fishy about ar)

[fry:~/gccsdk/gccsdk] riscos% ranlib /Users/riscos/gccsdk/gccsdk/arm-riscos-aof/libiberty/stage1/libiberty.a
[fry:~/gccsdk/gccsdk] riscos% make

# Some more stuff gets done, but we get stuck on the following which I don't know how to
# resolve.

make -C gcc "STAGE=stage1"
gcc -g -O2 -DTARGET_RISCOSAOF -DCROSS_COMPILE -DHOST__ -DIN_GCC -DHAVE_CONFIG_H -I./ -I../../include -I./config -o /Users/riscos/gccsdk/gccsdk/arm-riscos-aof/gcc-2_95_4/gcc/stage1/gcc.o -c gcc.c \
-DDEFAULT_TARGET_VERSION=\"2_95_4\" \
-DDEFAULT_TARGET_MACHINE=\"arm-riscos-aof\" \
-DSTANDARD_STARTFILE_PREFIX=\"/Users/riscos/cross/startup/\" \
-DSTANDARD_EXEC_PREFIX=\"/Users/riscos/cross/bin/\"
gcc.c:480: `CPP_PREDEFINES' undeclared here (not in a function)
gcc.c: In function `read_specs':
gcc.c:1527: `FALSE' undeclared (first use in this function)
gcc.c:1527: (Each undeclared identifier is reported only once
gcc.c:1527: for each function it appears in.)
gcc.c: In function `build_search_list':
gcc.c:1907: `TRUE' undeclared (first use in this function)
gcc.c:1923: `FALSE' undeclared (first use in this function)
gcc.c: In function `execute':
gcc.c:2356: `FATAL_EXIT_CODE' undeclared (first use in this function)
gcc.c: In function `main':
gcc.c:4756: `FALSE' undeclared (first use in this function)
gcc.c:4766: `TRUE' undeclared (first use in this function)
gcc.c: In function `print_multilib_info':
gcc.c:5874: `TRUE' undeclared (first use in this function)
gcc.c:5886: `FALSE' undeclared (first use in this function)
make[2]: *** [/Users/riscos/gccsdk/gccsdk/arm-riscos-aof/gcc-2_95_4/gcc/stage1/gcc.o] Error 1
make[1]: *** [gcc] Error 2
make: *** [gcc-stg1] Error 2



More information about the gcc mailing list