Add assembler source file to fpmake package?

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Add assembler source file to fpmake package?

Christo Crause
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?

_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: Add assembler source file to fpmake package?

Free Pascal - General mailing list
christo <[hidden email]> 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 

_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: Add assembler source file to fpmake package?

Christo Crause
On 15/10/2018 20:07, Sven Barth via fpc-pascal wrote:
christo <[hidden email]> 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.

_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: Add assembler source file to fpmake package?

Free Pascal - General mailing list
christo <[hidden email]> schrieb am Mo., 15. Okt. 2018, 21:41:
On 15/10/2018 20:07, Sven Barth via fpc-pascal wrote:
christo <[hidden email]> 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 

_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: Add assembler source file to fpmake package?

Christo Crause
On 15/10/2018 23:56, Sven Barth via fpc-pascal wrote:
christo <[hidden email]> schrieb am Mo., 15. Okt. 2018, 21:41:
On 15/10/2018 20:07, Sven Barth via fpc-pascal wrote:
christo <[hidden email]> 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.

_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal