Description: rtl/linux and rtl/unix
This file as text.
(active) Revisions in this set:
e949276d9d91fa49e88f014bbb97b8cbf0ea39cd,9c041afc7c11e9d47a1f866e09881237f0817a71,31ae109a317d480dec469a000603d82f58d813b7
32121de8aea0dfd64109f73696ed7530285fdbe1,dc681a75ecdd001fe5f3ce6d245f3c83651e35e5,f0213a2c46a9fd1ea047da6c8f54b78823ef9c71
693e72ade31fda191fac405b81dd5f28afc6e47a,bd35c02257c37ef18d28df181583205ce126fa69,c189af0e3d8e1c5293e9b3f0aa11092cd262d976
9bd19b050b3b5edce7d6d1cb98c6ec87528e3620,6929da66a87b0185fe1f2d3762a189ed5b44fbf2,3335104da26fd1750f200cbdcbd815a56856b217
3b39ec84e46f32eba0d2d328391f7b67595f8e9a,7b4ef925f0502e4627d3a7a4bcfa8846be89852c,4888c379c433c51d7dfa68adff8d69d785cff9a0
4d25558519f9662785c16ef3717f11e1716c1617,eb6f503badb9d8f5475ad81f1146466090c98b09,9f60f5093d0754474dfb49550a3842dbbcc431f6
04cbf32b1ba789ff52f5669af195cffddfc39ff3,48cc5250f9c17a1dafa3ecb4ec6b43501d557566,313790502da4de79b8c7b67c1d5e5df59025e923
b49aa071ca8e4d2396afee7a85cdf34695a664d8,277d98431c0aa3a72664b639fcc02124bf870a14,288c7e3c9eeea0b079dafe0f73c98c23426eb968
2b023c62c5bd7877c890a7701b38fd3275d0af93,f316121d53dcb540390ca8fcda64a67e53cf0f17,8a543dbc8ad339c0a2693a2df1848a5bb070a06a
f80bd9b034171030819d9ff7efb0f45de375c1e4,1fdf940d0b2937969df7ce2c7fa14a27bef30e62,a36caf90435ae9ebdf620d75efffcbea057c0e07
7ad4694e4bd4f2b369b0599b880ad0b9b3031aca,e154b9933fc030f4f4e894c48c91b026f688f8c0,7b88d1127ff9e4d011b4ad4cab8dac70e190811f
a33256c1fbd5896ef346b95fb95ef966361afd92,91229dcee9f6b783f7268da54aec3fe416735657,6854f171d1ab1e7bbe3916d29b0e379e21e75f4e
f982317ebd3fbbd180f354b72dad502d8e5f694b,d2b0bcdf1fbc5426b6f4c2331f3ea34cb38f99cc,359bb64aedafca34fee136e053b69a897b9c428a
efe6b32638c26cdd511b8ed35ffa9074817dcf20,83a1f5fbc3f60760e36fa2832648b82690543b45,0055023394e23271b641f9bcfc38606b6b4e4f36
91586331b550f102ee2a90e460807b75177ceb2d,3a0eb110ec513fad178844309b16d66347f7525d,71c314d7d498c6c346f11f5f703272a2307bac1e
5e7a512777b6c1ca9aa544fedcf5c28c7f42b87c,5afa26ddd1e80d78959af421ff64edf756e5ab13,bb97c5ab693b170a31bb7844d2bcff1e809da1f0
b7fe338bbee54f18f2ed4e7bb44883972a5e2fbc,d0b1402e103cec251219270215591240103d8bd3,0ed69fc662821756b873ad3bf9e81fd0c26ca9e4
aca327d7873f16e89b3ed89846c1a91b6e2cf0ca,f8c92914c2f33be7a3f53b4278b50792c9c73b13,7baf2461f06eb90429c07950459801e93d286b05
e1a739d15d6e344727b196890e8afb0b0bd235ea,d5b368988f34e631d2e065971713690fb691ebf3,644263277fe49d9be901527f02d8aa0170c840a2
0b2a58027c3171a3ba2962d472653e2f8839e1f2,d42f577a3ff2bd02b6ce709b6c89bf6fc08b32ae,1fce64fa0a780d4b0753eae79c2ae172ca8fb58e
727e25e93eea38a44e493722a9aa74aeb7333f6a,1f328cf362768d56dfe6101661209e6aeffdded5,8c251db2c1bb15d4f9ee8ef84a6998babca199f1
fd83fd5779e5f19373202c57209f648bae072640,0758aa1143a6498532b3d100ed15edd63ca878b6,75c252fd8f754788a4ab2f9ca8da110f6dd6aa86
f1abd2c2f00c69ae25a02df3d06d394c8dfdb546,88ae6721c65e5eb62e16627c6ec9555674c6f04c,1ded960fc8da793f1339ad7cb2a752b0a7af6f97
45b5f58c4ae667abe3541fc213540ab9922743f2,4c2b54ee0d9c3ced0b6ed6d8e9f1535fec82add9,4c529287c66689ee5e750abf4e34acab9d439511
9d6a495c0272124f134dbe93ae0c7f9ee0f09b38,0d0317b3af32e7d366acb8000607a1797fa6c5af,96c83e7f39d2f02d5ab26a18fc5031e22c6e139e
bf3ced76b244385edbadeea1c9d2c7c19f48c5a5,a06c034189304457633b01adbc978231674b7498,3e3b96e08878da9b828a3530b0f70bfd2bcf376f
a304962ea04633be422527bbe64c44cf635450b1,0efa4cbc678f8c9fd6baa09eb9386858522bacb4,bcf7701887088598606eca13de251f7d0eab60c7
bad62d51fa1eb41ea7ab811df5b12617abb433a7,2928837225267b3fc95acffe029712c61a6a8c48,f202dda5c5d9c2f8dd82c4d36c376659017eccb4
6ef31c643abc5ce46651ef4f6ddb3ba4ff1e8621,a3a827eba5593f57bae6d0131b18bdd5cd7b071c,fcb5cf42bfd26e076628902778c65f7d6cc3b7ec
75338da133a5c278bab44a4acb85076912fe0abe,c09e8778bdfc30e9dd669a6ba6d18de952befcaf,bc641cc76be7375eba14e343c300476d5af95f4c
0f0454a0921b31cbf80dc52b83a06f8860d1cd06,25c75b1784d0a0d37337c15810fc7fe462a96bbe,ab3b7f8f69bad57e6ff9e664ac60f326d390bb6d
f0b714d5adaa8a660aeaad55d73d6bdbc9805804,95dce3c5a81679ca919411aec27b6fb94199aaef,c11772decaa00925feb543aac383c01da0ad918b
2cb7e44a1bd86b4a43e7fa777acd8a5d21798d9a,7c9cf75418b9fc60c968820df62a77f162e4d213,37ffd4051a1a31acdd8735ddd4758a8172a9b422
774e0f912213dcba17d6f0e0a876d0b243f47df4,9dc75c300538a724d4dcf61b5a9b763dbcedcb7e,3edd92dab1e1aa6968985903761bceaa879b14e5
f506df022e10bbba50e997c925c93b9e750bb39a,654d75b777565fa55c9694c0c67e16e44e8e00ea,9ee2eee293a157ca05a90344feb82518ed7d7ebe
Clicking a revision will expand files
* basic implementation for pure pascal programs to allocate tls space
* disable generic threadvar handling if section thread vars are available
* properly initialize phdr and phnum
* do not call InitTLS when a compiler is used which does not include the abi tag section
* properly return from the signal handler on ARM/Linux instead of calling
HandleErrorAddrFrame directly (fixes psabieh exception handling, and
generally is cleaner)
+ make use of the mremap syscall of linux to re-allocate large memory blocks faster
* Darwin now uses Mach VM calls for memory allocation instead of mmap/munmap
+ added sysrealloc support for Darwin (Darwin does not have mremap)
* improved software floating point exception handling in the rtl
Also use syscall_nr_fstatat for FpStat function for riscv32 cpu
+ Enable FPU exception handling for m68k processor
* get paramstr(0) only if really needed
Examine all exception bits in m68k fpsr register to decide which into which run time error it is converted
* attempt at crt1 translation to get freebsd 12 running.
Use same field type and name as in /ust/include/sys/stat.h
* Use off_t type for l_start and l_end fields instead of kernel_off_t
+ Distinguish rlim_t type depending on fs32bit macro being set or not.
* fix O_LARGEFILE for Aarch64, RISC-V 32-bit and RISC-V 64-bit
F_GetLk/SetLk have different values for sparc/sparc64
* rename local import of fpc_geteipasebx
* fpc_geteipasebx and fpc_geteipasecx are used as procedures, not functions, so declare them as such
* linux-m68k: depend on FPU defines to compile FPU code, instead of CPU68020. also, minor cosmetics
* linux: fix some formatting in ostypes.inc, no functional change
* linux: use ugetrlimit syscall on m68k for rlimits retrieval. this fixes fpgetrlimit() call, and stack checking on Linux/m68k (tstack.pp test), at least on anything newer than kernel 2.4+ (2001)
* Do_IsDevice treats pipes and sockets the same way as character devices
Do not set __USE_LARGEFILE64 macro for sparc CPU, as it does not seem to be used for regular linux kernels
Add handling of extra parameters, using eval if equal sign is found.
+ Add TMP_DIR variable and use it.
* Only remove temp files if verbose is not set.
Use RTE 207 for FPU_Invalid and FPU_Denormal exceptions on i386/x86_64 beos/haiku/*bsd as for Linux
Fix typo in script comment
Fix compilation failure of i386-netbsd target after last commit
Unix LocalToEpoch: fix typo
* remove the BaseUnix dependency added by mistake
Add some types and records to rtl/linux/t_linux.h2paschk and set macro _LARGEFILE64_SOURCE for __i386__ C code
* cwstring: try to load the iconv library with .6 suffix as well
* cwstring: open iconv with the transliterate flag instead of setting it later with iconvctl because it may be unavailable
* revert
0047631: cwstring: open iconv with the transliterate flag instead of setting it later with iconvctl because it may be unavailable
* cwstring: open iconv with the transliterate flag if iconvctl is not available
+ linux implementation of System.GetCPUCount
* 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)
+ add declaration of FpSchedGetAffinity when the Linux target is compiled with FPC_USE_LIBC
Also set __stkptr inside cprt0.as startup assembly source
Also set __stkptr inside cprt0.as and dllprt0.as startup assembly sources
* x86_64-linux: assembler helpers syscalls do not need a stackframe
* FPC_VERSION => FPC_FULLVERSION
* another FPC_VERSION => FPC_FULLVERSIOn fix
* switch back to 32 Bit mode if no thumb code is generated
* arm-linux: sighnd.inc must check for CPUTHUMB and CPUTHUMB2
* fix compilation for CPUs without thumb
+ RiscV: set threadvarblocksize
* sanity check if threadvarblocksize is really set
* mips and xtensa compilation fixed
* fix for Mantis
0037252: apply patch by Bi0T1N to implement TThread.NameThreadForDebugging for Mac OS X 10.6 and newer (older versions don't provide the required functions)
Fix compilation with 3.2.2 release for arm and i386 CPUs
+ added baud rate constants for arm as proposed by Piotr Kardasz in
0039101
* check paramstr argument for negative values, resolves
gitlab 0039410
FreeBSD CSU fixes
* Assembler blocks in non-pure assembler functions must always declare all
changed registers
* argc is read as *(long*) in C -> changed plongint to pptrint
* fixed ident section
LLVM: add Read/WritePort* implementations
Fixes Unix graph compilation on x86 with LLVM
* clean up of assembler files not used anymore
* powerpc64-linux: unused assembler loader files removed
+ additional skeleton files for mips64
Disable range and overflow checks inside detect_linuxvcs procedure
* make __lib_csu* weak symbols on m68k-linux
Darwin: use recent versions of stat(fs) records when available
When the RTL is built for Mac OS X 10.6 or newer, use the new versions
and the corresponding alternate system library functions.
Also extracted the Darwin stat record definition to reduce the
ifdef hell.
Darwin: fix compilation on macOS/AArch64 after 1f328cf3
No function suffixes there since there's no backward compatibility issue.
m68k-linux: try to be as ColdFire compatible in the startup code as possible, so explicitly use jsr, otherwise this might compile to a long bsr, that is not CF compatible (except cfv4)
FPU exception mask: generlised system unit interface
* Extra linux fcntl constants
Linux: fix pthread types
Remove legacy implementation-specific fields (they don't match the current
glibc fields anymore since a long time) and fix alignment fields (they are
union fields that overlap with the rest of the record).
All platforms now use the modern opaque array-based definitions.
Linux mutex: restored the __m_kind field
This particular field is at the same offset on all architectures with the same
bit width, and is guaranteed by glibc to remain at this offset for backward
compatibility with static initialisers.
Resolves
gitlab 0040021
* Remove use of internal conversion routines
* cleanup of outdated defines
* fix of Erroneous reading of the value of the StackLength variable at program start based on issue report by Sergey Larin, resolves
gitlab 0040211
Try to implement linux si_uc.inc for xtensa CPU
Attempt to use local _init and _fini procedures
Support use statx syscall in fpstat and fpfstat
fix when FPC_USE_LIBC is disabled not call PASCALMAIN
fix store stacklength but not its addr in info
Use prlimit64 in FpSetRLimit and FpSetRLimit
Set STACK_MARGIN_MAX to four times of pagesize on LoongArch64
It fixed a test named tstack. Actually, Linux user get the stacktop is
incorrect in current. The value of stack pointer when enter the procedure
is thought as it is in the highest stack page. But if the parameters is
enough large, lager than 16k, most of arch will also fail this test.
Since the LoongArch default pagesize is 16k, it fail often because
stack-layout-randomization causes the stackpointer underflow to next page.
I had tried fixed it in rtl/linux/[arch]/si_*. But because the codes is
unworthy and hardly the parameters is enough large, just expand
STACK_MARGIN_MAX for simplicity.
* Fix for i386 breakage after merge request !433
Sockets errors redefined as regular Berkeley error constants also for Linux + add EINTR for Win
* Small improvement in inittls. Fixes issue 40408
Use frame register $r22 (aliased as $fp) inside SignalToRunerror for loongarch64 CPU to fix backtrace dumps
Modify references to old syslinux unit in comments
* Ensure null-terminated strings. Patch by modersohn, fixes issue
gitlab 0040499
* Do not use namespace prefix for lnfodwarf
* Add pthread_mutex_timedlock, sem_timedwait may be needed in future
* ensure that the SysCall unit is also usable when FPC_USE_LIBC is defined
Fix compilation of syscall unit for Linux with -dFPC_USE_LIBC option
Fix syscall unit compilation for i386-linux using -dFPC_USE_LIBC
Add dependency on objpas unit for syscall unit compiled with -dFPC_USE_LIBC
+ support for fputimens on non-linux OSes
* reworked fputimens support on linux
+ FileSetDate for all unix OSes
Avoid double declaration of seterrno
Examinc OPT and CROSSOPT instead of FPCOPT in [prerules] to check if syscall unit needs objpas dependency
Add missing syscall_nr_futimens for NetBSD OS
* fix bootstrapping with with 3.2.2 and -dFPC_USE_LIBC
* fix utimensat and utimensat if the rtl is compiled with -dFPC_USE_LIBC
(inactive) Revisions in this set 0641ea33d1fea5499d414dd8d4e95c509bb3270a
Both _STAT_VER_KERNEL and _STAT_VER_LINUX are equal to zero for aarch64-linux