Sign in Join

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

Mailing lists / fpc-pascal / 2018-10

Add assembler source file to fpmake package?

5 messages · 2 people · –

Reply by email Subscribe to this list Your subscription

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

christo

I'm trying to build a fpmake project for the RTL.  One problem I'm struggling with is how to add an assembler file to the package and assign a custom command to be executed instead of calling the compiler.  I've tried the following, which does call "as" but then it follows with an error because the compiler gets called with the assembler file which then generates an error:

   T := TTarget(P.Targets.Add);
   T.Name := 'linux/'+CPUToString(Defaults.CPU)+'/prt0.as';
   T.CPUs := [x86_64];
   T.OSes := [linux];
   T.Commands.AddCommand('as', '--64 -o ' + 'prt0.o ' +
'linux/'+CPUToString(Defaults.CPU)+'/prt0.as', 'prt0.o', 'prt0.as');

Looking at the various methods of TTarget (addUnit, addFPDoc, addProgram, addImplicitUnit) seems to suggest that functionality for adding a generic file and calling an external custom command is lacking.

Any ideas or suggestions on how to get this case working?

Reply by email

Sven Barth
to christo

christo schrieb am Mo., 15. Okt. 2018, 18:22:

I'm trying to build a fpmake project for the RTL.

Are you aware that the RTL already has a fpmake project? It might not be entirely up to date, but it exists.

Regards,
Sven

Reply by email

christo
to Sven Barth
Sven Barth wrote 8 lines
christo < > schrieb am Mo., 15. Okt. 2018, 18:22: I'm trying to build a fpmake project for the RTL. Are you aware that the RTL already has a fpmake project? It might not be entirely up to date, but it exists.

I somehow did not notice the existing fpmake before, it seems impossible to miss now! Anyway, seems like some more work is still required to make the existing fpmake usable.  It also doesn't have support for assembling assembler source files, so my original question remains.

Reply by email

Sven Barth
to christo

christo schrieb am Mo., 15. Okt. 2018, 21:41:

Show quoted text 16 lines
On 15/10/2018 20:07, Sven Barth via fpc-pascal wrote: christo schrieb am Mo., 15. Okt. 2018, 18:22: > I'm trying to build a fpmake project for the RTL. Are you aware that the RTL already has a fpmake project? It might not be entirely up to date, but it exists. I somehow did not notice the existing fpmake before, it seems impossible to miss now! Anyway, seems like some more work is still required to make the existing fpmake usable. It also doesn't have support for assembling assembler source files, so my original question remains.

Did you look at the rtl/linux/fpmake.inc file? It adds the loaders there. Though I have not tested it and don't know if it works.

Regards,
Sven

Reply by email

christo
to Sven Barth
Sven Barth wrote 23 lines
christo < > schrieb am Mo., 15. Okt. 2018, 21:41: On 15/10/2018 20:07, Sven Barth via fpc-pascal wrote: > christo < > > schrieb am Mo., 15. Okt. 2018, > 18:22: > > I'm trying to build a fpmake project for the RTL. > > > Are you aware that the RTL already has a fpmake project? It might > not be entirely up to date, but it exists. I somehow did not notice the existing fpmake before, it seems impossible to miss now! Anyway, seems like some more work is still required to make the existing fpmake usable.  It also doesn't have support for assembling assembler source files, so my original question remains. Did you look at the rtl/linux/fpmake.inc file? It adds the loaders there. Though I have not tested it and don't know if it works.

Thanks for the hint Sven, my mistake seems to be creating a new target for the loaders.

Reply by email