how to setup makefiles lazarus / 64-FPC development ---------------------------------------------------------------------- Key-Real · 2024-07-26 06:49 I cloned the official fpc source. 1) It's for me not allowed to push my branch. How should I work the right way? I was told to work on an different branch of the source not on main. Push my changes. 2) And I have to setup the makefiles for compilation. ---------------------------------------------------------------------- Key-Real · 2024-07-28 10:39 1) I was told to fork the official FPC source and create an own branch, so it can be easy merged to the source when finally finished 2) I'm parallel writing a doc about porting. The first step: Code: Text  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i 1) Setup the make files          add the new build target to fpcmake:               - You need to extend the ./utils/fpcm/fpcmmain.pp:                       insert the new Target in                                 type TOS=(..., ps1); section. (about line 100)                               don't forget to insert it also to OSStr(about line 135) and OSSufix(about line 144) constants.                                 add at the end of the table OSCpuPossible a new os/cpu entry (about line 207)                          rebuild your native compiler                              $make all                                $sudo make install                         now fpcmake can generate make files.          add to ./compiler/Makefile.fpc:                              NO_NATIVE_COMPILER_OS_LIST (about line 44)                      your target system, ps1                this indicates, there is no native compiler for your target          time to rebuild all make files:           you have to run the fpcmake in all folders of the fpc sources          after that          to build the rtl make files you have to execute ./regenmakefiles.sh in ./rtl          to build the packages you have to execute ./regenmakefiles.sh in ./packages         to simplify all touse steps execute my script                $./mk.sh  this mk.sh: Code: Text  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i  #! /bin/shset -eFPCMAKE=/usr/local/bin/fpcmake find . -name Makefile.fpc | xargs $FPCMAKE -Tall  cd ./rtl./regenmakefiles.shcd ./.. cd ./packages./regenmakefiles.shcd ./.. cd ./utils/build/$FPCMAKE -Tall -s -o Makefile.pkg Makefile.fpccd ./../.. cd ./packages/build/$FPCMAKE -Tall -s -o Makefile.pkg Makefile.fpccd ./../..  are this Steps correct? Did I forgot something? My goal it to achieve the complete build cycle by using: Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i $make all CPU_TARGET=mipsel OS_TARGET=ps1 OPT="-O- -CR -glv" CROSSOPT="-O- -g-" ALLOW_WARNINGS=1 ---------------------------------------------------------------------- Key-Real · 2024-07-28 14:49 I putted the compiler together again, now on this brunch: https://gitlab.com/Key-Real/source/-/tree/ps1 make all CPU_TARGET=mipsel OS_TARGET=ps1 tells me: Code: Text  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i Compiling /run/media/key-real/E3AF-F107/code/source/packages/fcl- process/src/pipes.ppprocess.inc(82,7) Warning: Symbol "TProcess.ApplicationName" is deprecatedprocess.inc(82,34) Warning: Symbol "TProcess.CommandLine" is deprecatedprocess.inc(78,3) Note: Local variable "E2" not usedprocessbody.inc(810,28) Warning: Symbol "TProcess.SetCommandLine" is deprecatedprocessbody.inc(853,28) Warning: Symbol "TProcess.SetCommandLine" is deprecatedprocessbody.inc(256,12) Error: Forward declaration not solved "DetectXTerm:System.AnsiString;"process.pp(103,1) Fatal: There were 1 errors compiling module, stoppingFatal: Compilation aborted  I knew its not a make fault, but somebody has ideas? ---------------------------------------------------------------------- Laksen · 2024-07-28 15:25 https://gitlab.com/Key-Real/source/-/blob/ps1/packages/fcl- process/fpmake.pp#L28 You will likely have to exclude most other packages as well. Look for how it's done for the embedded target Also your makefile regeneration step can be shortened to running "fpcmake -Tall -r" in the fpc root directory ---------------------------------------------------------------------- TRon · 2024-07-28 15:27 Quote from: Key-Real on July 26, 2024, 08:49:04 amI cloned the official fpc source. 1) It's for me not allowed to push my branch. How should I work the right way? I was told to work on an different branch of the source not on main. Push my changes. Indeed you need to make a clone of the official sources in your own repo. Then create a new branch, make your changes in that branch and commit those changes first locally then to your (own) remote repo. Make sure the changes for each commit are clean, clear and made in small steps an which allows for someone else to follow exactly what you did. Accompany your commits with good descriptions. It is best to split up several stages of the porting process into several commits so that in case there is an issue it can be detected early and easily. If you want to then you can also use multiple branches on top of each other but that can over-complicate things. You can then later do a merge request for someone in the team to review your changes and apply them. If there are issues then they usually will be mentioned and that you need to take care of them before the merge request is honoured (that is why it is a good idea to make small merge requests and break up your branch into different smaller commits, or even several branches). The most important part is to try and not break any existing functionality (unless the breakage occurs in/at your own target)  Merge requests will be accepted quicker when they are simple, clean/clear and small. ---------------------------------------------------------------------- Key-Real · 2024-07-28 16:20 Quote from: Laksen on July 28, 2024, 05:25:33 pmhttps://gitlab.com/Key-Real/source/-/blob/ps1/packages/fcl- process/fpmake.pp#L28 You will likely have to exclude most other packages as well. Look for how it's done for the embedded target no effect     still the same message I done: Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i P.OSes:=All OSes- [embedded,msdos,win16,go32v2,nativent,macosclassic,palmos,atari,zxspec trum,msxdos,amstradcpc,sinclairql,wasi,human68k,ps1]; Quote from: Laksen on July 28, 2024, 05:25:33 pmAlso your makefile regeneration step can be shortened to running "fpcmake -Tall -r" in the fpc root directory If I do this the next make all CPU_TARGET=mipsel OS_TARGET=ps1 tells me: Code: Text  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i [key- real@koshka source]$ make all CPU_TARGET=mipsel OS_TARGET=ps1make compiler_cycle RELEASE=1make[1]: Entering directory '/run/media/key- real/E3AF-F107/code/source'make -C compiler cyclemake[2]: Entering directory '/run/media/key-real/E3AF-F107/code/source/compiler'make OS_TARGET=linux CPU_TARGET=x86_64 CROSSBINDIR= BINUTILSPREFIX= CROSSCYCLEBOOTSTRAP=1 CYCLELEVEL=1 rtlcleanmake[3]: Entering directory '/run/media/key-real/E3AF-F107/code/source/compiler'make -C /run/media/key-real/E3AF-F107/code/source/rtl cleanmake[4]: Entering directory '/run/media/key-real/E3AF-F107/code/source/rtl'/usr/bin/rm -f fpcmade.x86_64-linux *x86_64-linux.fpm Package.fpc *.s/usr/bin/rm -f   script*.res link*.res *_script.res *_link.res/usr/bin/rm -f ./ppas.sh *_ppas.sh ppas.sh ppaslink.shmake -C linux cleanmake[5]: Entering directory '/run/media/key- real/E3AF-F107/code/source/rtl/linux'/usr/bin/rm -f /run/media/key- real/E3AF-F107/code/source/rtl/units/x86_64-linux/abitag.o/usr/bin/rm -f /run/media/key- real/E3AF-F107/code/source/rtl/units/x86_64-linux/si_prc.ppu /run/media/key- real/E3AF-F107/code/source/rtl/units/x86_64-linux/si_c.ppu /run/media/key- real/E3AF-F107/code/source/rtl/units/x86_64-linux/si_g.ppu /run/media/key-real/E3AF-F107/code/source/rtl/units/x86_64- linux/si_dll.ppu/usr/bin/rm -f /usr/bin/rm -f fpcmade.x86_64-linux *x86_64-linux.fpm Package.fpc *.s/usr/bin/rm -f   script*.res link*.res *_script.res *_link.res/usr/bin/rm -f ./ppas.sh *_ppas.sh ppas.sh ppaslink.shmake[5]: Leaving directory '/run/media/key- real/E3AF-F107/code/source/rtl/linux'make[4]: Leaving directory '/run/media/key-real/E3AF-F107/code/source/rtl'make[3]: Leaving directory '/run/media/key-real/E3AF-F107/code/source/compiler'make OS_TARGET=linux CPU_TARGET=x86_64 CROSSBINDIR= BINUTILSPREFIX= CROSSCYCLEBOOTSTRAP=1 CYCLELEVEL=1 rtlmake[3]: Entering directory '/run/media/key-real/E3AF-F107/code/source/compiler'make -C /run/media/key-real/E3AF-F107/code/source/rtl 'OPT=' allmake[4]: Entering directory '/run/media/key-real/E3AF-F107/code/source/rtl'make -C linux allmake[5]: Entering directory '/run/media/key- real/E3AF-F107/code/source/rtl/linux'make /run/media/key- real/E3AF-F107/code/source/rtl/units/x86_64-linuxmake[6]: Entering directory '/run/media/key- real/E3AF-F107/code/source/rtl/linux'make[6]: '/run/media/key- real/E3AF-F107/code/source/rtl/units/x86_64-linux' is up to date.make[6]: Leaving directory '/run/media/key- real/E3AF-F107/code/source/rtl/linux'as --64 -o /run/media/key- real/E3AF-F107/code/source/rtl/units/x86_64-linux/abitag.o x86_64/abitag.asmake[5]: *** No rule to make target '.ppu', needed by 'si_prc.ppu'.  Stop.make[5]: Leaving directory '/run/media/key- real/E3AF-F107/code/source/rtl/linux'make[4]: *** [Makefile:2367: linux_all] Error 2make[4]: Leaving directory '/run/media/key- real/E3AF-F107/code/source/rtl'make[3]: *** [Makefile:5511: rtl] Error 2make[3]: Leaving directory '/run/media/key- real/E3AF-F107/code/source/compiler'make[2]: *** [Makefile:5410: cycle] Error 2make[2]: Leaving directory '/run/media/key- real/E3AF-F107/code/source/compiler'make[1]: *** [Makefile:3266: compiler_cycle] Error 2make[1]: Leaving directory '/run/media/key- real/E3AF-F107/code/source'make: *** [Makefile:3298: build- stamp.mipsel-ps1] Error 2  have to do: Code: Text  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i $make clean$./mk.sh only this helps ---------------------------------------------------------------------- Laksen · 2024-07-28 17:38 Have you tried to clean completely before you regenerate the makefiles? ---------------------------------------------------------------------- Key-Real · 2024-07-28 17:47 Quote from: Laksen on July 28, 2024, 07:38:05 pmHave you tried to clean completely before you regenerate the makefiles? Yes, still the same error ---------------------------------------------------------------------- Key-Real · 2024-07-29 20:01 I'm very far progressed with the compiler port. It would be very cool to master this step. I don't really understand the building process, pls help! Need a good guide