Recent

Author Topic: Sinclair QL Cross Compiler  (Read 1379 times)

derek2210

  • Newbie
  • Posts: 3
Sinclair QL Cross Compiler
« on: April 17, 2023, 01:50:38 pm »
Hi,

I have been trying to generate a Free Pascal Cross Compiler with the Sinclair QL as a Target, on Linux Mint 21.3

I have come across 2 errors in the compiling of crossall with the command:

make crossall OS_TARGET=sinclairql CPU_TARGET=m68k

generates this error:

system.pp(438) Error: Error while assembling exitcode 1
system.pp(438) Fatal: There were 2 errors compiling module, stopping
Fatal: Compilation aborted

Can anyone tell me what the errors mean?

Regards
Derek

marcov

  • Administrator
  • Hero Member
  • *
  • Posts: 12304
  • FPC developer.
Re: Sinclair QL Cross Compiler
« Reply #1 on: April 17, 2023, 09:05:38 pm »
Missing the relevant assembler and linker probably, or misnamed them.

Compiling with -va (lots of output, use pipes) can tell you what it is looking for.

derek2210

  • Newbie
  • Posts: 3
Re: Sinclair QL Cross Compiler
« Reply #2 on: April 18, 2023, 08:09:54 pm »
Hi,

Thank you for the help.

I logged the compile process and there are many warnings in the compilation:

warning 1007 in line 4 of "/home/derek/src/fpc/rtl/units/m68k-sinclairql/system.s": scratch at end of line
>.section .text.n_system_$$_mt_frjob$longint$longint,"awx"

Not sure what is going on.

TRon

  • Hero Member
  • *****
  • Posts: 4377
Re: Sinclair QL Cross Compiler
« Reply #3 on: April 18, 2023, 08:45:07 pm »
What are the version numbers of vasm/vlink that you use ?

I was able to build a sinclair cross-compiler without issues (though, I have not tested compiling an actual project). There are some minor issues with some particular versions of vasm/vlink so that might perhaps be the case for you.
Today is tomorrow's yesterday.

derek2210

  • Newbie
  • Posts: 3
Re: Sinclair QL Cross Compiler
« Reply #4 on: April 18, 2023, 09:02:50 pm »
Hi,

I am using the latest release , which is:

vasm v1.9c
vlink 0.17a

I am using Linux Mint 21.1, is that okay ?

Regards,
Derek
« Last Edit: April 18, 2023, 09:48:46 pm by derek2210 »

TRon

  • Hero Member
  • *****
  • Posts: 4377
Re: Sinclair QL Cross Compiler
« Reply #5 on: April 18, 2023, 10:56:55 pm »
Ok thank you for mentioning the version numbers. I am a bit busy right now but will try these versions for you as well (probably tomorrow). I am currently using an older version of vasm.

I am using Linux Mint 21.1, is that okay ?
yeah, afaik that should not have any impact on the issue that you seem to be experiencing (afaik the only thing that might influence things is that your distro (as is mine) is using a newer glibc but that should be unrelated to the issue).

I'll try if I am able to replicate what you are experiencing.
Today is tomorrow's yesterday.

TRon

  • Hero Member
  • *****
  • Posts: 4377
Re: Sinclair QL Cross Compiler
« Reply #6 on: April 19, 2023, 08:02:56 am »
@derek:
I noticed that you already have this reported. Thank you for that.

The documentation from norman already reflects the current situation that 1.8l is the latest vasm that can currently be used without errors.

I ran into similar issues with cross compiling for/to other 68k/ppc targets showing similar behaviour as you reported.

Since I was able to reproduce the issue, I presume that is enough information for you to be able to continue (e.g. topic closed) ?
Today is tomorrow's yesterday.

TRon

  • Hero Member
  • *****
  • Posts: 4377
Re: Sinclair QL Cross Compiler
« Reply #7 on: April 19, 2023, 11:03:35 am »
BTW: I noticed another issue with fresh trunk.

I need to double verify if I perhaps messed up somewhere along the way but it seems that cross compiling to sinclair target, handles my fpc.cfg differently (which is something that I am not familiar with).

as a small excerpt:
Code: [Select]
[0.000] Reading further options from /media/ram/work/fpc/fpc.cfg
...
[0.004] Interpreting file option "# searchpath for units and other system dependent things"
[0.004] Handling option "-Fu/media/ram/work/fpc/3.3.1/units/sinclairql"
[0.004] Interpreting option "-Fu/media/ram/work/fpc/3.3.1/units/sinclairql"
[0.004] Path "./fpc/3.3.1/units/sinclairql/" not found
To which my (only) response so far has been: yeah, no wonder you are unable to locate that path, as it is not what I wrote in my fpc.cfg file.

At first glance I seem to have no problems of this kind when cross-compiling for other targets.

Is there someone that is familiar with this kind of behaviour and/or has encountered a similar thing  ? (currently I have no idea where to look for in case I did do something wrong)



edit:
Ah, got it. Always when things are staring right in your face but you (me in this  case) isn't actually looking  :)

Ok, so the sinclair target does use the cpu-platform (name) combination when building (and installing) the cross-compiler (e.g. directory names) but $FPCTARGET does not seem to include the CPU part. That is what fpmkcfg uses by default.
« Last Edit: April 19, 2023, 12:14:38 pm by TRon »
Today is tomorrow's yesterday.

 

TinyPortal © 2005-2018