[fpc-devel] Porting fpc to linux-sparc64

Karoly Balogh (Charlie/SGR) charlie at scenergy.dfmk.hu
Mon May 29 14:57:51 CEST 2017


Hi,

On Mon, 29 May 2017, Tomas Hajny wrote:

> > It is, but it's *pregenerated*, and committed to the SVN. The build
> > process doesn't generate any Makefiles, actually. (Lets not argue now it
> > is a nice practice or not, it is what it is...) To fix this, one has to
> > regenerate them. But it's complicated. ;) I'm not sure if you actually has
> > to fix inside fpcmake or the submitted Makefile.fpc which fpcmake uses to
> > generate the actual Makefile. But by the time I get there I'll figure it
> > out. One problem at a time.
>
> It shouldn't be that difficult in this case - have a look
> fpcsrc/rtl/linux/Makefile.fpc. Look at lines 147-153 (mips) and modify
> lines 162-166 (sparc) similarly (obviously, not all options used for mips
> are relevant for sparc, but the logic should be similar). Once done, call
> 'fpcmake -Tall' in that directory.

Indeed, this worked. Also, not sure what Adrian was doing wrong, but I
added -32 into sparc/cpugas.pas file as I said, and from then on I started
getting 32 bit object files, and after fixing the Makefile, I got a 32bit
FP executable, crosscompiled. Maybe something on the buildbox will reveal,
why it doesn't work there.

I'm crosscompiling from Darwin, using binutils 2.27, which I built as
sparc64-linux-gnu target.

Charlie



More information about the fpc-devel mailing list