[fpc-devel] FPC-JVM: Status report on Android

Jonas Maebe jonas.maebe at elis.ugent.be
Fri Sep 2 11:55:24 CEST 2011


On 02 Sep 2011, at 11:23, Sven Barth wrote:

> Am 02.09.2011 11:04, schrieb Jonas Maebe:
>>
>> I don't see that, all object and unit files are stored under
>> compiler/jvm/units/<fpchostplatform> here. I also don't understand  
>> how
>> that can happen, because the name of the generated compiler binary is
>> also "ppcjvm" and you can't have a file and a directory with the same
>> name in a single directory.
>
> I'll recheck that. Perhaps it's because I once called make by  
> accident with "PPC_TARGET=ppcjvm".

That would indeed cause the makefile to create a directory called  
"ppcjvm". And the compiler binary is always called "pp" and then  
renamed (moved) to "ppc<arch>", so that would indeed put the "pp"  
binary in that ppcjvm directory rather than renaming it to "ppcjvm".

>> I changed fpcmake so that the generated makefiles never pass -XP when
>> targeting the JVM. However, if you compile normally and your
>> /etc/fpc.cfg is used, its standard logic to set the -XP parameter  
>> based
>> on the fact that you are cross-compiling will still be triggered. I
>> haven't modified samplecfg/fpcmkcfg yet to prevent that from  
>> happening
>> in newly generated config files though.
>
> When using ppcjvm I compile using "-n" and when I compile the Java  
> RTL using make I also need to pass "-XP " in OPT.

Strange:

~/fpcjvm/rtl/java$ make FPC=ppcjvm2 OPT="-n -O2 -al" clean all
/bin/rm -f ../../rtl/units/jvm-java/system.ppu ../../rtl/units/jvm- 
java/uuchar.ppu ../../rtl/units/jvm-java/objpas.ppu ../../rtl/units/ 
jvm-java/jdk15.ppu
/bin/rm -f fpcmade.jvm-java Package.fpc ppas.sh script.res link.res
/bin/rm -f *.s *_ppas.bat
ppcjvm2 @rtl.cfg -Tjava -Pjvm -Fi../inc -Fi../jvm -FE. -FU../../rtl/ 
units/jvm-java -n -O2 -al -djvm  -Us -Sg system.pp
Generated: ../../rtl/units/jvm-java/org/freepascal/rtl/$system$ 
$_fpc_nestedvars$4864.class
Generated: ../../rtl/units/jvm-java/org/freepascal/rtl/system.class

> For the second part: Can it be that I need to regenerate the  
> makefiles?

No, but maybe you did regenerate the makefile in rtl/java already with  
an fpcmake from trunk? The patch to prevent BINUTILSPREFIX being set  
in rtl/java/Makefile was applied in r18351


Jonas



More information about the fpc-devel mailing list