mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-07 17:47:56 +02:00
+ minimal Java rtl (based on embedded rtl, but with all code and most
declarations removed) git-svn-id: branches/jvmbackend@18320 -
This commit is contained in:
parent
6e82417a51
commit
d840d99231
6
.gitattributes
vendored
6
.gitattributes
vendored
@ -7331,6 +7331,12 @@ rtl/inc/videoh.inc svneol=native#text/plain
|
||||
rtl/inc/wstringh.inc svneol=native#text/plain
|
||||
rtl/inc/wstrings.inc svneol=native#text/plain
|
||||
rtl/inc/wustrings.inc svneol=native#text/plain
|
||||
rtl/java/Makefile svneol=native#text/plain
|
||||
rtl/java/Makefile.fpc svneol=native#text/plain
|
||||
rtl/java/objpas.pp svneol=native#text/plain
|
||||
rtl/java/rtl.cfg svneol=native#text/plain
|
||||
rtl/java/system.pp svneol=native#text/plain
|
||||
rtl/jvm/makefile.cpu svneol=native#text/plain
|
||||
rtl/linux/Makefile svneol=native#text/plain
|
||||
rtl/linux/Makefile.fpc svneol=native#text/plain
|
||||
rtl/linux/arm/bsyscall.inc svneol=native#text/plain
|
||||
|
@ -2,7 +2,7 @@
|
||||
# Don't edit, this file is generated by FPCMake Version 2.0.0 [2011/08/11]
|
||||
#
|
||||
default: all
|
||||
MAKEFILETARGETS=i386-linux i386-go32v2 i386-win32 i386-os2 i386-freebsd i386-beos i386-haiku i386-netbsd i386-solaris i386-qnx i386-netware i386-openbsd i386-wdosx i386-darwin i386-emx i386-watcom i386-netwlibc i386-wince i386-embedded i386-symbian i386-nativent i386-iphonesim m68k-linux m68k-freebsd m68k-netbsd m68k-amiga m68k-atari m68k-openbsd m68k-palmos m68k-embedded powerpc-linux powerpc-netbsd powerpc-amiga powerpc-macos powerpc-darwin powerpc-morphos powerpc-embedded powerpc-wii sparc-linux sparc-netbsd sparc-solaris sparc-embedded x86_64-linux x86_64-freebsd x86_64-solaris x86_64-darwin x86_64-win64 x86_64-embedded arm-linux arm-palmos arm-darwin arm-wince arm-gba arm-nds arm-embedded arm-symbian powerpc64-linux powerpc64-darwin powerpc64-embedded avr-embedded armeb-linux armeb-embedded mipsel-linux
|
||||
MAKEFILETARGETS=i386-linux i386-go32v2 i386-win32 i386-os2 i386-freebsd i386-beos i386-haiku i386-netbsd i386-solaris i386-qnx i386-netware i386-openbsd i386-wdosx i386-darwin i386-emx i386-watcom i386-netwlibc i386-wince i386-embedded i386-symbian i386-nativent i386-iphonesim m68k-linux m68k-freebsd m68k-netbsd m68k-amiga m68k-atari m68k-openbsd m68k-palmos m68k-embedded powerpc-linux powerpc-netbsd powerpc-amiga powerpc-macos powerpc-darwin powerpc-morphos powerpc-embedded powerpc-wii sparc-linux sparc-netbsd sparc-solaris sparc-embedded x86_64-linux x86_64-freebsd x86_64-solaris x86_64-darwin x86_64-win64 x86_64-embedded arm-linux arm-palmos arm-darwin arm-wince arm-gba arm-nds arm-embedded arm-symbian powerpc64-linux powerpc64-darwin powerpc64-embedded avr-embedded armeb-linux armeb-embedded mipsel-linux jvm-java
|
||||
BSDs = freebsd netbsd openbsd darwin
|
||||
UNIXs = linux $(BSDs) solaris qnx haiku
|
||||
LIMIT83fs = go32v2 os2 emx watcom
|
||||
@ -821,6 +821,10 @@ EXEEXT=.dol
|
||||
SHAREDLIBEXT=.so
|
||||
SHORTSUFFIX=wii
|
||||
endif
|
||||
ifeq ($(OS_TARGET),java)
|
||||
SHAREDLIBEXT=.jar
|
||||
SHORTSUFFIX=java
|
||||
endif
|
||||
else
|
||||
ifeq ($(OS_TARGET),go32v1)
|
||||
PPUEXT=.pp1
|
||||
|
2186
rtl/java/Makefile
Normal file
2186
rtl/java/Makefile
Normal file
File diff suppressed because it is too large
Load Diff
161
rtl/java/Makefile.fpc
Normal file
161
rtl/java/Makefile.fpc
Normal file
@ -0,0 +1,161 @@
|
||||
#
|
||||
# Makefile.fpc for Free Pascal JVM (Embedded) RTL
|
||||
#
|
||||
|
||||
[package]
|
||||
main=rtl
|
||||
|
||||
[target]
|
||||
loaders=
|
||||
units=$(SYSTEMUNIT) objpas
|
||||
|
||||
[require]
|
||||
nortl=y
|
||||
|
||||
[install]
|
||||
fpcpackage=y
|
||||
|
||||
[default]
|
||||
fpcdir=../..
|
||||
target=java
|
||||
|
||||
[compiler]
|
||||
includedir=$(INC) $(PROCINC)
|
||||
sourcedir=$(INC) $(PROCINC) $(COMMON) $(ARCH)
|
||||
|
||||
[prerules]
|
||||
RTL=..
|
||||
INC=$(RTL)/inc
|
||||
COMMON=$(RTL)/common
|
||||
PROCINC=$(RTL)/$(CPU_TARGET)
|
||||
UNITPREFIX=rtl
|
||||
SYSTEMUNIT=system
|
||||
override FPCOPT+=@rtl.cfg
|
||||
|
||||
ifdef RELEASE
|
||||
override FPCOPT+=-Ur
|
||||
endif
|
||||
|
||||
CPU_UNITS=
|
||||
SYSINIT_UNITS=
|
||||
|
||||
ifeq ($(ARCH),arm)
|
||||
CPU_UNITS=lpc21x4 at91sam7x256 stellaris stm32f103
|
||||
endif
|
||||
|
||||
# Paths
|
||||
GRAPHDIR=$(INC)/graph
|
||||
|
||||
[rules]
|
||||
.NOTPARALLEL:
|
||||
# Get the system independent include file names.
|
||||
# This will set the following variables :
|
||||
# SYSINCNAMES
|
||||
include $(INC)/makefile.inc
|
||||
SYSINCDEPS=$(addprefix $(INC)/,$(SYSINCNAMES))
|
||||
|
||||
# Get the processor dependent include file names.
|
||||
# This will set the following variables :
|
||||
# CPUINCNAMES
|
||||
include $(PROCINC)/makefile.cpu
|
||||
SYSCPUDEPS=$(addprefix $(PROCINC)/,$(CPUINCNAMES))
|
||||
|
||||
# Put system unit dependencies together.
|
||||
SYSDEPS=$(SYSINCDEPS) $(SYSCPUDEPS)
|
||||
|
||||
|
||||
#
|
||||
# Base Units (System, strings, os-dependent-base-unit)
|
||||
#
|
||||
|
||||
$(SYSTEMUNIT)$(PPUEXT) : $(SYSTEMUNIT).pp $(SYSDEPS)
|
||||
$(COMPILER) -Us -Sg $(SYSTEMUNIT).pp $(REDIR)
|
||||
|
||||
objpas$(PPUEXT): objpas.pp
|
||||
$(COMPILER) objpas.pp $(REDIR)
|
||||
|
||||
strings$(PPUEXT) : $(INC)/strings.pp $(INC)/stringsi.inc \
|
||||
$(PROCINC)/strings.inc $(PROCINC)/stringss.inc \
|
||||
$(SYSTEMUNIT)$(PPUEXT)
|
||||
|
||||
#
|
||||
# System Dependent Units
|
||||
#
|
||||
|
||||
#ports$(PPUEXT) : ports.pas objpas$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
|
||||
|
||||
#doscalls$(PPUEXT) : doscalls.pas strings$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
|
||||
|
||||
#
|
||||
# TP7 Compatible RTL Units
|
||||
#
|
||||
|
||||
dos$(PPUEXT) : dos.pp $(INC)/filerec.inc $(INC)/textrec.inc strings$(PPUEXT) \
|
||||
$(SYSTEMUNIT)$(PPUEXT)
|
||||
|
||||
#crt$(PPUEXT) : crt.pas $(INC)/textrec.inc $(SYSTEMUNIT)$(PPUEXT)
|
||||
|
||||
objects$(PPUEXT) : $(INC)/objects.pp dos$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
|
||||
|
||||
#printer$(PPUEXT) : printer.pas $(INC)/textrec.inc $(SYSTEMUNIT)$(PPUEXT)
|
||||
|
||||
#graph$(PPUEXT) : graph.pp
|
||||
|
||||
#
|
||||
# Delphi Compatible Units
|
||||
#
|
||||
|
||||
sysutils$(PPUEXT) : sysutils.pp $(wildcard $(OBJPASDIR)/sysutils/*.inc) \
|
||||
objpas$(PPUEXT) dos$(PPUEXT) sysconst$(PPUEXT)
|
||||
$(COMPILER) -Fi$(OBJPASDIR)/sysutils sysutils.pp
|
||||
|
||||
classes$(PPUEXT) : classes.pp $(wildcard $(OBJPASDIR)/classes/*.inc) \
|
||||
sysutils$(PPUEXT) typinfo$(PPUEXT) rtlconsts$(PPUEXT) types$(PPUEXT)
|
||||
$(COMPILER) -Fi$(OBJPASDIR)/classes classes.pp
|
||||
|
||||
typinfo$(PPUEXT): $(OBJPASDIR)/typinfo.pp objpas$(PPUEXT)
|
||||
$(COMPILER) -Sg $(OBJPASDIR)/typinfo.pp $(REDIR)
|
||||
|
||||
math$(PPUEXT): $(OBJPASDIR)/math.pp objpas$(PPUEXT) sysutils$(PPUEXT)
|
||||
$(COMPILER) $(OBJPASDIR)/math.pp $(REDIR)
|
||||
|
||||
varutils$(PPUEXT) : $(OBJPASDIR)/cvarutil.inc $(OBJPASDIR)/varutils.inc \
|
||||
$(OBJPASDIR)/varutilh.inc varutils.pp
|
||||
$(COMPILER) -I$(OBJPASDIR) varutils.pp $(REDIR)
|
||||
|
||||
fmtbcd$(PPUEXT) : $(OBJPASDIR)/fmtbcd.pp objpas$(PPUEXT) sysutils$(PPUEXT) variants$(PPUEXT) classes$(PPUEXT) system$(PPUEXT)
|
||||
$(COMPILER) $(OBJPASDIR)/fmtbcd.pp
|
||||
|
||||
types$(PPUEXT) : $(OBJPASDIR/types.pp objpas$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
|
||||
$(COMPILER) $(OBJPASDIR)/types.pp
|
||||
|
||||
rtlconsts$(PPUEXT) : $(OBJPASDIR)/rtlconsts.pp
|
||||
$(COMPILER) $(OBJPASDIR)/rtlconsts.pp
|
||||
|
||||
sysconst$(PPUEXT) : $(OBJPASDIR)/sysconst.pp objpas$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
|
||||
$(COMPILER) $(OBJPASDIR)/sysconst.pp
|
||||
|
||||
dateutil$(PPUEXT) : $(OBJPASDIR)/dateutil.pp
|
||||
$(COMPILER) -I$(OBJPASDIR) $(OBJPASDIR)/dateutil.pp
|
||||
|
||||
#
|
||||
# Mac Pascal Model
|
||||
#
|
||||
|
||||
macpas$(PPUEXT) : $(INC)/macpas.pp objpas$(PPUEXT) math$(PPUEXT)
|
||||
$(COMPILER) $(INC)/macpas.pp $(REDIR)
|
||||
|
||||
#
|
||||
# Other system-independent RTL Units
|
||||
#
|
||||
|
||||
ucomplex$(PPUEXT): $(INC)/ucomplex.pp math$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
|
||||
|
||||
getopts$(PPUEXT) : $(INC)/getopts.pp $(SYSTEMUNIT)$(PPUEXT)
|
||||
|
||||
heaptrc$(PPUEXT) : $(INC)/heaptrc.pp $(SYSTEMUNIT)$(PPUEXT)
|
||||
$(COMPILER) -Sg $(INC)/heaptrc.pp $(REDIR)
|
||||
|
||||
#lineinfo$(PPUEXT) : $(INC)/lineinfo.pp $(SYSTEMUNIT)$(PPUEXT)
|
||||
|
||||
charset$(PPUEXT) : $(INC)/charset.pp $(SYSTEMUNIT)$(PPUEXT)
|
29
rtl/java/objpas.pp
Normal file
29
rtl/java/objpas.pp
Normal file
@ -0,0 +1,29 @@
|
||||
{
|
||||
This file is part of the Free Pascal run time library.
|
||||
Copyright (c) 1999-2000 by the Free Pascal development team
|
||||
|
||||
This unit makes Free Pascal as much as possible Delphi compatible
|
||||
|
||||
See the file COPYING.FPC, included in this distribution,
|
||||
for details about the copyright.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
**********************************************************************}
|
||||
{$Mode ObjFpc}
|
||||
{$I-,S-}
|
||||
unit objpas;
|
||||
|
||||
interface
|
||||
|
||||
{ first, in object pascal, the integer type must be redefined }
|
||||
const
|
||||
MaxInt = MaxLongint;
|
||||
type
|
||||
Integer = longint;
|
||||
|
||||
implementation
|
||||
|
||||
end.
|
35
rtl/java/rtl.cfg
Normal file
35
rtl/java/rtl.cfg
Normal file
@ -0,0 +1,35 @@
|
||||
# first, disable all
|
||||
-Sf-
|
||||
# uncomment to enable the stuff you want to use
|
||||
|
||||
# include full heap management into the rtl
|
||||
# -SfHEAP
|
||||
|
||||
# include support for init final code of units into the rtl
|
||||
# -SfINITFINAL
|
||||
|
||||
# -SfCLASSES
|
||||
# -SfEXCEPTIONS
|
||||
# -SfEXITCODE
|
||||
# -SfANSISTRINGS
|
||||
# -SfWIDESTRINGS
|
||||
# -SfTEXTIO
|
||||
# -SfCONSOLEIO
|
||||
# -SfFILEIO
|
||||
# -SfRANDOM
|
||||
# -SfVARIANTS
|
||||
# -SfOBJECTS
|
||||
# -SfDYNARRAYS
|
||||
# -SfTHREADING
|
||||
# -SfCOMMANDARGS
|
||||
# -SfPROCESSES
|
||||
# -SfSTACKCHECK
|
||||
# -SfDYNLIBS
|
||||
|
||||
# include exit code support
|
||||
-SfEXITCODE
|
||||
|
||||
# arm is powerful enough to handle a softfpu
|
||||
#ifdef CPUARM
|
||||
-SfSOFTFPU
|
||||
#endif CPUARM
|
73
rtl/java/system.pp
Normal file
73
rtl/java/system.pp
Normal file
@ -0,0 +1,73 @@
|
||||
{
|
||||
This file is part of the Free Pascal run time library.
|
||||
Copyright (c) 2006 by Florian Klaempfl
|
||||
member of the Free Pascal development team.
|
||||
|
||||
System unit for embedded systems
|
||||
|
||||
See the file COPYING.FPC, included in this distribution,
|
||||
for details about the copyright.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
**********************************************************************}
|
||||
|
||||
Unit System;
|
||||
|
||||
{*****************************************************************************}
|
||||
interface
|
||||
{*****************************************************************************}
|
||||
|
||||
{$define FPC_IS_SYSTEM}
|
||||
|
||||
{$I-,Q-,H-,R-,V-}
|
||||
{$mode objfpc}
|
||||
|
||||
Type
|
||||
{ The compiler has all integer types defined internally. Here
|
||||
we define only aliases }
|
||||
DWord = LongWord;
|
||||
Cardinal = LongWord;
|
||||
Integer = SmallInt;
|
||||
UInt64 = QWord;
|
||||
|
||||
ValReal = Double;
|
||||
|
||||
{ map comp to int64, }
|
||||
Comp = Int64;
|
||||
|
||||
HResult = type longint;
|
||||
|
||||
const
|
||||
{ max. values for longint and int}
|
||||
maxLongint = $7fffffff;
|
||||
maxSmallint = 32767;
|
||||
|
||||
maxint = maxsmallint;
|
||||
|
||||
type
|
||||
{ Java base class type }
|
||||
TObject = class external 'java.lang' name 'Object'
|
||||
protected
|
||||
function clone: TObject;
|
||||
public
|
||||
constructor create;
|
||||
function equals(obj: TObject): boolean;
|
||||
function hashcode: longint;
|
||||
end;
|
||||
|
||||
{*****************************************************************************}
|
||||
implementation
|
||||
{*****************************************************************************}
|
||||
|
||||
{*****************************************************************************
|
||||
Misc. System Dependent Functions
|
||||
*****************************************************************************}
|
||||
|
||||
{*****************************************************************************
|
||||
SystemUnit Initialization
|
||||
*****************************************************************************}
|
||||
|
||||
end.
|
0
rtl/jvm/makefile.cpu
Normal file
0
rtl/jvm/makefile.cpu
Normal file
Loading…
Reference in New Issue
Block a user