Commit Graph

123 Commits

Author SHA1 Message Date
Michaël Van Canneyt
e80ce5f61f * Allow to disable monitor 2024-06-18 14:51:34 +02:00
Michaël Van Canneyt
e1b2feac33 * Set monitor structures in place 2024-02-24 18:11:23 +01:00
Pierre Muller
7c9cf75418 Fix syscall unit compilation for i386-linux using -dFPC_USE_LIBC 2024-01-06 17:06:51 +01:00
Michaël Van Canneyt
c09e8778bd * Small improvement in inittls. Fixes issue 40408 2023-08-21 23:19:15 +02:00
Michael VAN CANNEYT
9d6a495c02 * string -> shortstring 2023-07-14 17:26:11 +02:00
Michael VAN CANNEYT
4c2b54ee0d * Char -> AnsiChar 2023-07-14 17:26:09 +02:00
Jinyang He
92e60d2107 add loongarch64 linux rtl support 2023-02-05 19:18:48 +00:00
florian
a06c034189 * cleanup of outdated defines 2023-01-20 23:31:04 +01:00
florian
7baf2461f0 * check paramstr argument for negative values, resolves #39410 2021-10-20 20:04:32 +02:00
pierre
0ed69fc662 Fix compilation with 3.2.2 release for arm and i386 CPUs
git-svn-id: trunk@49411 -
2021-05-29 21:25:16 +00:00
svenbarth
359bb64aed * if the Linux target is compiled with FPC_USE_LIBC the initialization of TLS is not required (according to one comment by Florian), so disable all related code in that case (as for example the syscall numbers are not available then)
git-svn-id: trunk@48120 -
2021-01-09 15:58:13 +00:00
florian
d2b0bcdf1f + linux implementation of System.GetCPUCount
git-svn-id: trunk@48106 -
2021-01-07 22:44:49 +00:00
ondrej
1a0ba60de6 * revert r47598: implement TRandomGenerator
git-svn-id: trunk@47605 -
2020-11-27 04:53:06 +00:00
ondrej
c4dd3b661a * rtl: implement TRandomGenerator for thread-safe random
git-svn-id: trunk@47598 -
2020-11-26 05:59:00 +00:00
florian
1dd914ffc8 + initial xtensa-linux rtl
git-svn-id: trunk@44636 -
2020-04-07 21:01:07 +00:00
florian
3335104da2 * get paramstr(0) only if really needed
git-svn-id: trunk@43898 -
2020-01-09 20:35:37 +00:00
pierre
6929da66a8 + Enable FPU exception handling for m68k processor
git-svn-id: trunk@43894 -
2020-01-08 23:09:21 +00:00
yury
ad6642edc0 * android: Fixed stdio redirection for threads.
git-svn-id: trunk@41400 -
2019-02-20 15:11:45 +00:00
florian
597a23d278 + tls support for x86_64-linux (not yet enabled by default)
git-svn-id: trunk@41081 -
2019-01-27 09:37:25 +00:00
florian
eeadf618b8 + abi tag for i386
* arm abi tag moved into pascal file

git-svn-id: trunk@40454 -
2018-12-02 22:56:12 +00:00
florian
31ae109a31 * properly initialize phdr and phnum
git-svn-id: trunk@40448 -
2018-12-02 08:49:03 +00:00
pierre
04debba9de Fix arm-android compilation by prepending syscall_nr_ prefix also to __ARM_NR_XXX arm specific linux syscalls
git-svn-id: trunk@40300 -
2018-11-13 11:11:49 +00:00
florian
72416edcc4 + support for tlsm_general on i386-linux
git-svn-id: trunk@40281 -
2018-11-11 17:32:20 +00:00
florian
063415fa72 + i386-linux support for tls-based threadvars
git-svn-id: trunk@40272 -
2018-11-07 22:03:02 +00:00
florian
e949276d9d * basic implementation for pure pascal programs to allocate tls space
git-svn-id: trunk@40268 -
2018-11-07 22:02:59 +00:00
yury
78a26e53f8 * Fixed warnings.
git-svn-id: trunk@40187 -
2018-11-02 19:04:52 +00:00
florian
51644f497b * fixes broken compilation after merging
git-svn-id: trunk@39815 -
2018-09-26 20:22:13 +00:00
florian
a34d4e715c Merged riscv_new branch
git-svn-id: trunk@39813 -
2018-09-26 19:49:08 +00:00
pierre
32001975bf * Add PAGESIZE local constant.
+ Set LAST_PAGE_GENERATES_SIGNAL macro for linux powerpc/powerpc64.
  + Use page_size for StackBottom computation.
  + Use LAST_PAGE_GENERATES_SIGNAL in StackBottom computation.

git-svn-id: trunk@39736 -
2018-09-11 13:13:50 +00:00
pierre
b279f24f26 Add FPC_SOFT_FPUX80 and FPC_SOFT_FPU128 define handling
git-svn-id: trunk@39732 -
2018-09-11 08:02:48 +00:00
Jeppe Johansen
ceb38833f2 Added RiscV32/64 target, from a cleaned up version of branches/laksen/riscv/trunk.
git-svn-id: branches/laksen/riscv_new@39474 -
2018-07-20 08:21:15 +00:00
svenbarth
c66daeb69f * forgot to correctly enable bootstrapping from direct to indirect entry for x86_64-linux
git-svn-id: trunk@36695 -
2017-07-08 21:40:50 +00:00
svenbarth
533789777b * prepare Linux RTL for a platform-by-platform switch to indirect entry information, including the capability to bootstrap a direct entry target to an indirect one while using the assembly startup files of the indirect one
git-svn-id: trunk@36689 -
2017-07-08 20:37:43 +00:00
Károly Balogh
78970fa3c4 linux/m68k: enable inlining and compiler mul32to64 in the softfpu
git-svn-id: trunk@36490 -
2017-06-12 13:05:09 +00:00
michael
480d22a4aa * Reallocmem uses installed memory manager
git-svn-id: trunk@34487 -
2016-09-10 17:56:17 +00:00
michael
bd775267ca * Fix bug #30310
git-svn-id: trunk@34484 -
2016-09-10 17:08:07 +00:00
yury
419c6ce61e * android:
+ API to write to the Android system log. 
  + API to redirect standard output and error to the Android system log. The redirection is performed automatically for shared libraries loaded by Java applications.

git-svn-id: trunk@34352 -
2016-08-19 20:21:52 +00:00
yury
c2ba68df44 * android: Added functions GetSystemProperty() and SystemApiLevel().
git-svn-id: trunk@34346 -
2016-08-19 14:50:18 +00:00
yury
63813f3e96 * android: Fixed crash when using writeln during shared library finalization on Android 4.4+.
git-svn-id: trunk@32033 -
2015-10-12 22:35:51 +00:00
svenbarth
2d454dc8fa Move DynLibs support to System unit using a manager approach like for Threads, WideStrings, etc.. This is needed so that we can support features like "delayed" and loading of dynamic packages.
Each port that allows the usage of dynamic libraries should call InitSystemDynLibs during initialization of the System unit.
The DynLibs unit has been adjusted to be a forwarder for the functions that now reside in the System unit (for backwards compatiblity just in case). Additionally the unit will register the DynLibsManager if it doesn't reside in the System unit anyway.
Currently only the Windows targets (Win32, Win64 and WinCE) implement the DynLibsManager inside the System unit. For other systems using the LoadLibrary, etc. functions will lead to a run error/exception.
If a port wants to implement its own DynLibsManager then it needs to define DISABLE_NO_DYNLIBS_MANAGER. TLibHandle, NilHandle and optionally TOrdinalEntry (it's set to SizeUInt otherwise) should be defined in sysdlh.inc which needs to be enabled using the define FPC_SYSTEM_HAS_SYSDLH (because there are targets which have FEATURE_DYNLIBS enabled, but don't support them... e.g. powerpc-wii -.-).
The DynLibsManager contains methods for loading a library based on a RawByteString and based on a UnicodeString. BOTH should be implemented, but internally one can forward to the other.
The loading by ordinal *can* be be implemented. If it is set to Nil then the implementation of GetProcAddress(lib,ordinal) will return Nil.

+ new functions SetDynLibsManager and GetDynLibsManager to set and retrieve the current DynLibsManager
* provide interface of DynLibs unit in unit System

git-svn-id: trunk@29613 -
2015-02-03 20:00:00 +00:00
sergei
3a5e6485b5 - RTL: removed InitVariantManager, it was an empty procedure since day 1.
git-svn-id: trunk@29114 -
2014-11-22 20:35:46 +00:00
sergei
cfd2600b24 - Don't include softfpu code on SPARC, unless bootstrapping with 2.6.
- Atari is never compiled on SPARC or MIPS (and even it does one day, softfpu is not needed).

git-svn-id: trunk@27203 -
2014-03-20 17:20:58 +00:00
sergei
9801288cdc * Removed SysInitFPU/SysResetFPU from (remaining) system units initialization code. It is redundant there because it is called from fpc_cpuinit, or, in case of i386, from fpc_cpucodeinit.
* It fixes regression of tw16283b after r27169. 
* BeOS, Haiku: added fpc_cpucodeinit to compensate for removal of SysInitFPU, it also enables use of CPU features like SSE.

git-svn-id: trunk@27171 -
2014-03-17 10:53:52 +00:00
sergei
3a55c4301e * Since StackTop=StackBottom+StackLength, any two variables are sufficient to describe stack, the third one is redundant.
* As a first part of cleanup, replaced StackTop with function returning StackBottom+StackLength.
* On Win32 and Win64, StackTop returns the stack base from TIB instead.

git-svn-id: trunk@27119 -
2014-03-12 19:48:03 +00:00
sergei
ca445577ff - Linux RTL: MIPS no longer needs the softfloat code, don't compile it.
git-svn-id: trunk@25882 -
2013-10-30 12:25:11 +00:00
nickysn
714ca3a61d * fixed the stack traces under linux (StackTop wasn't initialized)
git-svn-id: trunk@25861 -
2013-10-27 12:37:32 +00:00
yury
2b2a68446d * Added new unit unixcp. It contains stuff from winiconv.inc - a table to map Windows code page identifiers to locale names on unix. Also GetSystemCodePage function in this unit can be used to detect which code page is used currently.
* Build unixcp for all unix-like systems.
* Use the unixcp unit in cwstring instead of winiconv.inc.
- Deleted winiconv.inc
- Reverted r22410,r22411,r22428. The compiler will use the unixcp unit to get a default code page for ansistrings.

git-svn-id: trunk@23670 -
2013-02-28 18:21:28 +00:00
svenbarth
f7c333cee0 Enabled signal handlers
git-svn-id: trunk@22752 -
2012-10-18 20:12:41 +00:00
svenbarth
322dbe5b65 Various adjustments to the RTL for m68k:
* enable the 6 parameter syscall variant (still everything dummied out though)
* add termios constants
* don't change signal handlers for now
* disable assembly set routines as set handling was changed

git-svn-id: trunk@22743 -
2012-10-18 20:12:02 +00:00
paul
f338d5c338 rtl: set DefaultSystemCodePage on linux without cwstrings
git-svn-id: trunk@22411 -
2012-09-17 08:31:37 +00:00