Sign in Join

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

Mailing lists / fpc-devel / 2009-04

adding x86_64-netbsd

5 messages · 2 people · –

Reply by email Subscribe to this list Your subscription

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

Axel Scheepers

Hi List,

I've been fiddling around adding netbsd x86_64 to fpc 2.2.4, I've got it to the point that I can compile both the rtl and the compiler but I'm having difficulties creating the prt0.as file(s).
I can't link anything due to missing symbols;
[...]
Assembling pp
Linking ./pp
/home/axel/Sources/FPC/fpcbuild-2.2.4-netbsd_x86_64/fpcsrc/rtl/units/x86_64-netbsd/prt0.o: In function `___start': crt0.c:(.text+0xc5): undefined reference to `_fini' crt0.c:(.text+0xd0): undefined reference to `_(float, char __restrict *, wchar_t)'
crt0.c:(.text+0xe3): undefined reference to `main' [..snip!..]

The file I created is a somewhat modified .s output from crt0.c from netbsd. Can someone help me a bit with this?
I've included a patch with the things I changed (but there's some build leftovers in it too, sorry)

I used to program a lot in pascal for school about 16yrs ago, it would be fun to start playing with it again :)

Kind regards,
Axel Scheepers

() ascii ribbon campaign - against html e-mail /\ www.asciiribbon.org - against proprietary attachments

Reply by email

Leonardo M. Ramé

Axel, It was difficult to create the port to NetBSD? In my company we have several OpenBSD installs and it would be nice if we could run FPC apps on them.

Leonardo M. Ramé
http://leonardorame.blogspot.com

Axel Scheepers wrote 48 lines
From: Axel Scheepers Subject: [fpc-devel] adding x86_64-netbsd To: Date: Monday, April 20, 2009, 12:59 PM Hi List, I've been fiddling around adding netbsd x86_64 to fpc 2.2.4, I've got it to the point that I can compile both the rtl and the compiler but I'm having difficulties creating the prt0.as file(s). I can't link anything due to missing symbols; [...] Assembling pp Linking ./pp /home/axel/Sources/FPC/fpcbuild-2.2.4-netbsd_x86_64/fpcsrc/rtl/units/x86_64-netbsd/prt0.o: In function `___start': crt0.c:(.text+0xc5): undefined reference to `_fini' crt0.c:(.text+0xd0): undefined reference to `_(float, char __restrict *, wchar_t)' crt0.c:(.text+0xe3): undefined reference to `main' [..snip!..] The file I created is a somewhat modified .s output from crt0.c from netbsd. Can someone help me a bit with this? I've included a patch with the things I changed (but there's some build leftovers in it too, sorry) I used to program a lot in pascal for school about 16yrs ago, it would be fun to start playing with it again :) Kind regards, Axel Scheepers -- ()  ascii ribbon campaign - against html e-mail /\  www.asciiribbon.org   - against proprietary attachments -----Inline Attachment Follows----- _______________________________________________ fpc-devel maillist  -  http://lists.freepascal.org/mailman/listinfo/fpc-devel

Reply by email

Axel Scheepers
to Leonardo M. Ramé
Leonardo M. Ramé wrote
Axel, It was difficult to create the port to NetBSD? In my company we have several OpenBSD installs and it would be nice if we could run FPC apps on them. Leonardo M. Ramé http://leonardorame.blogspot.com

Hi Leonardo,

It's my first try at it, I don't know if I missed something except the obvious prt0.as problems I'm having. From what I saw most of the *bsd is already defined and I even saw an openbsd i386/m68k target, take a look at fpcsrc/compiler/systems.pas,
fpcsrc/compiler/systems/i_bsd.pas
fpcsrc/compiler/systems/t_bsd.pas and
fpcsrc/rtl/openbsd/

Kind regards,

Axel Scheepers

() ascii ribbon campaign - against html e-mail /\ www.asciiribbon.org - against proprietary attachments

Reply by email

Leonardo M. Ramé

That's great!, I'll try to compile it this week.

Leonardo M. Ramé
http://leonardorame.blogspot.com

Axel Scheepers wrote 41 lines
From: Axel Scheepers Subject: Re: [fpc-devel] adding x86_64-netbsd To: "FPC developers' list" Date: Tuesday, April 21, 2009, 2:12 PM On Tue, 2009-04-21 at 05:15 -0700, Leonardo M. Ramé wrote: > Axel, It was difficult to create the port to NetBSD? In my company we have several OpenBSD installs and it would be nice if we could run FPC apps on them. > > Leonardo M. Ramé > http://leonardorame.blogspot.com Hi Leonardo, It's my first try at it, I don't know if I missed something except the obvious prt0.as problems I'm having. From what I saw most of the *bsd is already defined and I even saw an openbsd i386/m68k target, take a look at fpcsrc/compiler/systems.pas, fpcsrc/compiler/systems/i_bsd.pas fpcsrc/compiler/systems/t_bsd.pas and fpcsrc/rtl/openbsd/ Kind regards, Axel Scheepers -- ()  ascii ribbon campaign - against html e-mail /\  www.asciiribbon.org   - against proprietary attachments -----Inline Attachment Follows----- _______________________________________________ fpc-devel maillist  -  http://lists.freepascal.org/mailman/listinfo/fpc-devel

Reply by email

Axel Scheepers
to Leonardo M. Ramé: Axel, It was difficult to create the port to NetBSD? In my company we have several…

Oh, I also had to build a fpcmake beforehand (see
fpcsrc/utils/fpcm/fpcmmain.pp) and did a
find /path/to/toplevel/source/dir -name Makefile.fpc -exec /path/to/new/fpcmake -Tall {} \;

I also had to cross build a binutils and put that in my $PATH.

I have some spare time coming, I should take a better look at the freebsd prt0.as and see if I can work from there to see if my mess can produce a netbsd-/amd64 binary so I can try to build a native fpc for it.

Kind regards,

Axel Scheepers

() ascii ribbon campaign - against html e-mail /\ www.asciiribbon.org - against proprietary attachments

Reply by email