[fpc-devel] More info on Bug 4430

Andrew Haines AndrewD207 at aol.com
Thu Oct 13 03:54:18 CEST 2005


I submitted a bug (4430) and after doing so, found some more information.

I'll paste the bug contents here so you know what I'm talking about.

Here's the scenario:

I've copied /usr/lib from my MacOSX computer to $HOME/darwin-root

I've compiled the binutils for target apple-darwin (see odcctools)

now from linux I execute in fpc/ :
make CPU_TARGET=powerpc OS_TARGET=darwin OPT=-Fl$HOME/darwin-root/usr/lib

which causes the error:
/usr/local/odcctools/bin/powerpc-darwin-ld: /usr/lib/crt1.o bad magic 
number (not a Mach-O file)

in compiler/systems/t_bsd.pas on line 362 is the line:

so it is hardcoded to /usr/lib.

I've tried changing this line to:
but it finds /usr/lib/crt1.o


The line:
DOES work if I supply OPT='-Xd -Xr/home/andrew/darwin-root/usr/lib' to make.

I'm not sure if the -Xr part helps it out any or not...

I do know that -Xd didn't work when the line was : prtobj:='/usr/lib/crt1.o'


Andrew Haines

More information about the fpc-devel mailing list