2018-07-22 08:31:12 UTC
I'm trying to change the build process for target AVR so that different sub architectures end up
in different subfolders. At the moment the default behaviour is that e.g. the RTL object files
are saved to ./rtl/units/avr-embedded, regardless of the subarch specified. This means that if
one rebuild the RTL for AVR with a different subarch, the previous subarch unit files (system,
strings charset etc.) are overwritten.
Since I'm not familiar with makefile syntax or the general build process for FPC I would like a
review of my approach described below.
I've modified the fpcmake.ini file to take the subarch (and ABI if specified; according to
Florian's svn branch target-subdir) into account. The following two new variables are set
according to the SUBARCH and ABI (at the moment for AVR only for testing purposes):
The following variables are passed either via -Fu or -FU to compile instructions and hence where
Update install dirs:
Update file name/extension variables:
This works if I make crossall for AVR and creates the cross compiler, builds the rtl and moves
the compiled units into the correct folder /rtl/units/avr-embedded/avrxx. There is a problem
compiling the package rtl-extra, since the makefile/fpmake system in that folder overrides the
inherited makefile variables. For now I've disabled target embedded for that package and then
the build process for AVR completes without further issues.
So further questions:
1. I would like to know how to tweak the makefile/fpmake settings for this package to also use
the modified subdirs as defined in the default makefile template.
2. How do I test the install and zipinstall targets, I never use them.
3. Is this more or less a feasible route to achieve this behaviour?
fpc-devel maillist - firstname.lastname@example.org