Commit Graph

1559 Commits

Author SHA1 Message Date
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
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
yury
c40960466a * More correctly scan Elf Auxiliary Vector. Fixes possible crash when the first vector entry is AT_NULL. Issue #26973.
git-svn-id: trunk@29065 -
2014-11-12 14:52:56 +00:00
Károly Balogh
6381280ebd arm-linux: new gprt0 based on cprt0, plus gmon initialization, so profiling output generation actually works now
git-svn-id: trunk@28663 -
2014-09-14 17:07:35 +00:00
sergei
ad2963783e * m68k-linux startup code:
+ initialize __stkptr variable (was missing, causing any stack check to fail)
 + non-executable stack marker.

git-svn-id: trunk@28249 -
2014-07-23 13:55:38 +00:00
sergei
e65c4e13e0 * m68k: updated/fixed dllprt0.as, now able to link a shared library.
git-svn-id: trunk@28189 -
2014-07-09 22:59:13 +00:00
sergei
15ff2c1236 * m68k: Fixed name of ELF interpreter, and updated cprt0.as to somewhat working state. Now a "hello world" program using libc can be linked and launched, but anything more complex needs another round of fixing the parameter passing code, in order to get the stack properly balanced.
git-svn-id: trunk@28181 -
2014-07-07 20:08:50 +00:00
sergei
12e0416323 * m68k-linux: now actually fixed syscall failure conditions.
git-svn-id: trunk@28092 -
2014-06-27 19:41:02 +00:00
sergei
4b4651d298 * m68k-linux: syscalls are expected to return -1 on failure, not -errno. This fixes some of the tests, webtbs/tw2494 is one of them.
git-svn-id: trunk@28089 -
2014-06-27 15:41:51 +00:00
pierre
3d34a8a3b0 Makefiles updated with fpcmake rev 27428
git-svn-id: trunk@27508 -
2014-04-10 09:58:17 +00:00
sergei
7f9c65d4c1 * x86_64-linux: include startup units into build.
git-svn-id: trunk@27415 -
2014-03-31 15:58:22 +00:00
sergei
eb30da60a6 * x86_64-linux: fixed existing Pascal startup code (syntax only, operation not tested yet) and added missing files.
git-svn-id: trunk@27414 -
2014-03-31 15:57:11 +00:00
sergei
1643c175f2 + .so startup code for sparc-linux.
git-svn-id: trunk@27412 -
2014-03-31 15:45:16 +00:00
marco
a818559481 * clocale moved to rtl-extra.
git-svn-id: trunk@27376 -
2014-03-30 15:27:35 +00:00
marco
d6f5ca21b9 * moved units ipc for *BSD, darwin/iphonesim and linux. The others are
makefile cleanups.

git-svn-id: trunk@27373 -
2014-03-30 13:13:13 +00:00
marco
c6424b2e0b * moved unit terminfo to rtl-console
git-svn-id: trunk@27353 -
2014-03-29 21:00:50 +00:00
marco
959ea7f5bb * printer unit moved. Amiga unit also moved but it is not actively used.
git-svn-id: trunk@27351 -
2014-03-29 20:35:28 +00:00
marco
7f8a9bcf6e * serial to rtl-extra
git-svn-id: trunk@27350 -
2014-03-29 20:06:36 +00:00
marco
c465d3d64a * moving 4 cp9* units. These are 16-bit and big.
git-svn-id: trunk@27349 -
2014-03-29 19:43:13 +00:00
marco
ed3a49372d * strutils moved to packages/rtl-objpas
git-svn-id: trunk@27339 -
2014-03-29 17:51:44 +00:00
marco
c376210946 * regenned makefiles which were regennerated with a 2.6.x fpcmake in the rtl-unicode transition
Mantis #25897

git-svn-id: trunk@27231 -
2014-03-22 20:11:13 +00:00
marco
a1351db576 * rtl-unicode package, containing unicodeducet, collation units and *bidi* units
git-svn-id: trunk@27207 -
2014-03-20 18:28:38 +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
7ba4e67564 * Fixed Linux FPU exception mapping for x86_64 and MIPS, might be still incomplete, but at least operations yielding NaNs no longer produce EAccessViolation.
git-svn-id: trunk@27194 -
2014-03-20 01:59:06 +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
marco
2d9aa35d22 * now also stdconv and convutils removed from Makefile.fpc
git-svn-id: trunk@26916 -
2014-03-01 21:07:36 +00:00
marco
48e4555c12 * Removed some redundant rules
git-svn-id: trunk@26915 -
2014-03-01 21:06:16 +00:00
svenbarth
e734ca7a9b M68k: Fix passing of environment variables. Fixes the compiler not being able to execute the external assembler and linker.
* rtl/linux/m68k/prt0.as:
    between the arguments and the environment variables is a NULL; keep this in mind when loading the address of the first environment variable.

git-svn-id: trunk@26851 -
2014-02-23 12:41:05 +00:00
Károly Balogh
c6d60979d2 set errno after syscalls. this fixes tiorte test at least. this code ideally should be in assembly, but it seems the assembler reader needs some fixing first...
git-svn-id: trunk@26828 -
2014-02-22 05:30:04 +00:00