Commit Graph

1588 Commits

Author SHA1 Message Date
Jonas Maebe
2e64c63993 * fixed dependencies for lineinfo unit after r33007
* also made lnfodwrf dependent on lineinfo for all platforms,
    because both units implicitly depend on the exeinfo unit
    and if both are compiled at the same time they can fall
    over each other while writing its .ppu or .s file

git-svn-id: trunk@33039 -
2016-02-01 22:52:50 +00:00
sergei
77285b63eb * i386-linux: reworked and cleaned up libc-related startup code:
* Don't replace intended initialization routines with dummy ones, so libc can properly initialize itself.
  * Profiling support (si_c21g.pp) only needs to contain the __gmon_start__ procedure, so it can reuse the entire si_c21.inc, and separate si_21g.inc file is no longer needed.

git-svn-id: trunk@32984 -
2016-01-22 17:11:08 +00:00
sergei
53d7018482 * removed 'nostackframe' attribute, since on i386 assembler procedures reference non-register parameters relative to ebp.
git-svn-id: trunk@32981 -
2016-01-22 16:35:20 +00:00
sergei
7381c66161 - i386-linux RTL: removed assembler startup files, which are unused since version 2.0.x.
git-svn-id: trunk@32972 -
2016-01-21 15:11:31 +00:00
Jonas Maebe
ec4342cc65 * fixed parallel building after r32857
git-svn-id: trunk@32924 -
2016-01-11 15:27:48 +00:00
sergei
903ddf8403 - Cleaned out some more assembler PIC hacks around ExitCode variable
git-svn-id: trunk@32680 -
2015-12-18 11:49:20 +00:00
pierre
60070169bb Regenerated Makefile's for rtl/linux and rtl/win32, aarch64-linux target was missing
git-svn-id: trunk@32601 -
2015-12-06 11:35:28 +00:00
pierre
42e08b4c01 Set PIC_OPT if -Cg of -fPIC option is used, also use -KPIC for mips and mipsel ASTARGET if PIC_OPT is set
git-svn-id: trunk@32588 -
2015-12-05 11:45:09 +00:00
Jonas Maebe
f65cb5d933 * equivalent of r32525/32526 for the assembler version of the startup code
git-svn-id: trunk@32528 -
2015-11-25 00:10:26 +00:00
Jonas Maebe
2249d95ddb * call external routines via their TOC entry instead of directly
(mantis #29004)

git-svn-id: trunk@32527 -
2015-11-25 00:10:23 +00:00
Jonas Maebe
740f8532df * fixed saving the stack pointer in r32525
git-svn-id: trunk@32526 -
2015-11-25 00:10:19 +00:00
Jonas Maebe
816c66107e * fixed dynamic startup of programs that don't link against libc (they get
argc/argv/envp in r3/r4/r5)

git-svn-id: trunk@32525 -
2015-11-24 23:34:30 +00:00
Jonas Maebe
4d53455379 * the "types" unit depends on "math" since r32333 -> updated Makefiles
git-svn-id: trunk@32337 -
2015-11-15 19:38:49 +00:00
florian
70b8789262 o basic extended pascal support:
+ automatically loaded helper unit
  * Makefiles adapted
  * mode switch
  * mode switches reorganized
+ TimeStamp support

git-svn-id: trunk@32330 -
2015-11-15 15:13:36 +00:00
marco
266ebc351b * remove some deprecated functions. Most have alternatives since at least 2.4, and more often 2.2
I left getdomainname in "unix" for now, I don't know the exact status.

git-svn-id: trunk@32255 -
2015-11-06 14:55:38 +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
Jonas Maebe
d49b69581a * removed fake _init/_fini symbols (patch by Edmund Grimley Evans)
git-svn-id: trunk@31977 -
2015-10-08 18:41:32 +00:00
Jonas Maebe
36c6a190a8 * execute the real libc init/fini routines instead of dummies
(patch by Edmund Grimley Evans)

git-svn-id: trunk@31976 -
2015-10-08 18:40:31 +00:00
Jonas Maebe
e0f3296bbb * fixed case of ppuext in r31775, causing the unix unit to be rebuilt all the
time (mantis #28764)

git-svn-id: trunk@31908 -
2015-10-02 05:49:10 +00:00
Jonas Maebe
530a08b779 * added some missing unit dependencies
git-svn-id: trunk@31775 -
2015-09-22 13:48:57 +00:00
yury
e1a0b1204a * Removed unused vars in RTL.
git-svn-id: trunk@31750 -
2015-09-17 16:48:53 +00:00
nickysn
2e3cb70489 * regenerated makefiles after adding the win16 target
git-svn-id: trunk@31525 -
2015-09-05 11:02:54 +00:00
Jonas Maebe
e54d0a41af * fixed ppoll for infinite timeouts (patch by Edmund Grimley Evans)
git-svn-id: trunk@31042 -
2015-06-13 21:02:02 +00:00
Jonas Maebe
3634262437 + Linux/AArch64 gprof-enabled startup code (patch by Edmund Grimley Evans)
git-svn-id: trunk@30934 -
2015-05-29 06:14:27 +00:00
Jonas Maebe
4fa2edc638 + Linux/AArch64 RTL support (patch by Edmund Grimley Evans)
o uses new generic Linux syscall numbers, used for recent architectures

git-svn-id: trunk@30895 -
2015-05-23 21:04:08 +00:00
Jonas Maebe
89418d23e5 * regenerated Makefiles with Linux/AArch64 support
git-svn-id: trunk@30891 -
2015-05-20 20:15:10 +00:00
Jonas Maebe
23254e7ce2 * refactored definition of pthread_mutex_t into single location
(pmutext.inc) like for *BSD; fixes the definition of
    TRTLCriticalSection for MIPS (and AArch64, as found by
    Edmund Grimley Evans)

git-svn-id: trunk@30875 -
2015-05-17 11:08:02 +00:00
Jonas Maebe
0a1b851b5c - removed commented out MIPS mutex size constants
git-svn-id: trunk@30874 -
2015-05-17 11:08:00 +00:00
michael
dd6f45d1d0 * Added setregid and setreuid functions to linux unit (they are not POSIX), bug ID #25403
git-svn-id: trunk@30621 -
2015-04-17 16:48:32 +00:00
nickysn
492101df76 * fixed a race condition during parallel build on linux, when the loaders are
built before mkdir has created the output directory

git-svn-id: trunk@30231 -
2015-03-14 22:27:03 +00:00
Jonas Maebe
82d92dbf50 * call seterrno instead of manually handling the setting setting the errno
threadvar (and having to deal with differences between the ELFv1 and ELFv2
    ABIs regarding indirect function calls, + future ability to have the
    compiler generate PIC for those routines)
   o includes workaround for lack of linkage area size allocation in current
     released PPC64 versions, remove after 3.0.2 has been released

git-svn-id: trunk@30213 -
2015-03-14 18:36:17 +00:00
Jonas Maebe
3ab62dcfed * switched Linux/PowerPC64 to Pascal startup code so that we can used ifdefs
to detect whether we're compiling for ELFv1/SYSV or ELFv2

git-svn-id: trunk@30210 -
2015-03-14 18:36:08 +00:00
Jonas Maebe
53680329d3 * changed type of operatingsystem_parameter_argc from ptruint to longint,
as that's the type of argc in the system unit (which maps onto this
    variable), and even in C it's "int argc". This fixes the use of this
    variable on big endian targets

git-svn-id: trunk@30209 -
2015-03-14 18:36:05 +00:00
nickysn
6bd2ab0ab7 * fixed parallel build for i386-linux and x86_64-linux
git-svn-id: trunk@30122 -
2015-03-07 16:01:06 +00:00
florian
e0c4e0456f * fix parallel building of linux rtl
git-svn-id: trunk@30076 -
2015-03-02 19:46:19 +00:00
Jonas Maebe
3d01d4ceb1 * regenerated with Darwin/AArch64 support
git-svn-id: trunk@29950 -
2015-02-23 22:54:53 +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
florian
c1091e1724 * added more asmmode directives to make compilation more robust in case the asmmode is changed by configuration files, resolves #27255
git-svn-id: trunk@29589 -
2015-01-31 10:37:48 +00:00
Jonas Maebe
16183bebfe * libc's open() function is a varargs function
git-svn-id: trunk@29585 -
2015-01-30 19:31:25 +00:00
sergei
50639d89e7 * x86_64-linux startup: use ABI tag from abitag.o, cleaned out inlined versions.
git-svn-id: trunk@29578 -
2015-01-29 17:07:45 +00:00
sergei
2efa348b19 - Cleaned out more assembler hacks around ExitCode variable
git-svn-id: trunk@29560 -
2015-01-26 20:08:11 +00:00
sergei
d6f5bcee45 - Cleaned out assembler hacks around ExitCode variable
git-svn-id: trunk@29559 -
2015-01-26 19:55:58 +00:00
sergei
e2eb6dffbb + x86_64-linux: build ABI tag separately, the purpose it twofold: 1) it is the only part of startup that cannot be yet handled directly by compiler, 2) it provides a single point to modify whenever necessary.
git-svn-id: trunk@29558 -
2015-01-26 17:15:48 +00:00
pierre
3a9abf75a9 Reset FPU state in SignalToRunError for SIGFPE, fixes tw12214 failure
git-svn-id: trunk@29551 -
2015-01-26 09:00:32 +00:00
sergei
3a3f7859f7 * x86_64-linux: ExitCode is passed as parameter to _haltproc, so assembler hacking with global variable is not necessary.
git-svn-id: trunk@29542 -
2015-01-24 15:28:00 +00:00
marco
d407b668d1 * version updated to 3.1.1
git-svn-id: trunk@29399 -
2015-01-04 21:09:04 +00:00
svenbarth
fe49a4b60c Fix Fp*Stat calls when compiling with FPC_USE_LIBC for x86_64-linux.
rtl/linux/ostypes.inc:
  * correctly define the _STAT_VER_* constants for x86_64 (the ifdefs are based on those in the C header; for other platforms this needs to be checked)

git-svn-id: trunk@29241 -
2014-12-09 21:23:39 +00:00
svenbarth
01278e2800 Fix three warnings when compiling with FPC_USE_LIBC.
osmacro.inc:
  * FpFstat, fpLstat and FpStat: correctly set the result value instead of relying on the result location being the same for cdecl functions as for register functions

git-svn-id: trunk@29240 -
2014-12-09 21:21:45 +00:00
florian
0d717c7e0e * update by newer lazarus version
git-svn-id: trunk@29212 -
2014-12-07 18:44:33 +00:00
sergei
66d735c536 - MIPS: forward declaration of fpc_threadvar_relocate_proc is not needed.
git-svn-id: trunk@29115 -
2014-11-22 20:48:53 +00:00