Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-devel / 2005-10

More info on Bug 4430

4 messages · 4 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Andrew Haines

Hi,

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.

http://www.freepascal.org/bugs/showrec.php3?ID=4430 <bug>
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:
prtobj:='/usr/lib/crt1.o'

so it is hardcoded to /usr/lib.

I've tried changing this line to:
LibrarySearchPath.FindFile('crt1.o',prtobj)
but it finds /usr/lib/crt1.o

</bug>

The line:
LibrarySearchPath.FindFile('crt1.o',prtobj)
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'

Regards,

Andrew Haines

Reply by email

Ozerski Pavel
to Andrew Haines

Hi all,

It seems that an using the "with" operator inside of procedures/funcctions which are declared as inline causes AVs or internal errors (depend on compiler 2.x.x versions) at compiling stage. Is it a real problem?

Reply by email

Gerhard Scholz
to Ozerski Pavel

I also found it a while ago, and then I was told it was already an open bug. Still it seems to be an open bug.

-----Ursprungliche Nachricht-----
Von: "Ozerski Pavel"
An: "FPC developers' list"
Gesendet: Donnerstag, 13. Oktober 2005 08:16
Betreff: [fpc-devel] 'with' operator in inlined functions

Hi all, It seems that an using the "with" operator inside of procedures/funcctions

which are declared as inline causes AVs or internal errors (depend on compiler 2.x.x versions) at compiling stage. Is it a real problem?

Show quoted text 5 lines
_______________________________________________ fpc-devel maillist - http://lists.freepascal.org/mailman/listinfo/fpc-devel

Reply by email

Peter Vreman
to Gerhard Scholz
Show quoted text 8 lines
> It seems that an using the "with" operator inside of > procedures/funcctions which are declared as inline causes AVs or internal errors (depend on compiler 2.x.x versions) at compiling stage. Is it a real problem? I also found it a while ago, and then I was told it was already an open bug. Still it seems to be an open bug.

Seems logical, if it is not closed in the bugs database it is still open. Don't expect anything soon as it is not a simple fix.

Reply by email