Commit Graph

34389 Commits

Author SHA1 Message Date
sergei
5c3aca5148 * thread.inc, DoneThread: allow CurrentTM.ReleaseThreadVars to be unassigned and reset ThreadID (in preparation to support Windows native threadvars)
* win/systhrd.inc: added error checking in several places. Fail with code 226 if resources cannot be allocated, as Delphi does.
* win/syswin.inc, Dll_entry: Don't call DoneThread in PROCESS_DETACH callback, it is redundant because the main thread is finalized by FPC_DO_EXIT. SysReleaseThreadVars is still necessary. Also removed redundant assignments to return value.

git-svn-id: trunk@17992 -
2011-07-15 23:57:23 +00:00
sekelsenmat
e21749d6d4 fpvectorial: Finishes fixing the colors in the PostScript reader
git-svn-id: trunk@17991 -
2011-07-15 11:12:51 +00:00
sekelsenmat
d37d0ae1a4 fpvectorial: Fixes some bugs in the PostScript interpreter, previously it didnt run some procedures, and adds more commands to it
git-svn-id: trunk@17990 -
2011-07-15 10:19:21 +00:00
sergei
ae4cdf25f8 + aggas.pas: Write section attributes when long section names are used for smart linking (enabled for win32 and win64). It is needed because GAS does not understand that '.text.something' is part of '.text' and assigns default attributes (writable data) to all such sections, which is not the desired behavior.
git-svn-id: trunk@17989 -
2011-07-13 23:45:28 +00:00
sergei
35a2ed9a6c - Removed unused variable
- Removed inline directive (formal arguments are unsupported and only cause compiler noise)

git-svn-id: trunk@17988 -
2011-07-13 22:14:39 +00:00
joost
b156dc5ad9 * Use new fpmake distclean command. After all targets are cleaned by fpmake distclean, cleanup the fpmake executable
git-svn-id: trunk@17987 -
2011-07-13 21:07:23 +00:00
joost
08ee418513 * Reverted r17969, now fpmake distclean is implemented
git-svn-id: trunk@17986 -
2011-07-13 20:25:02 +00:00
joost
25a9052ced * Implemented distclean command, which cleans up all targets
git-svn-id: trunk@17985 -
2011-07-12 20:45:52 +00:00
sergei
e32317bca4 * Fixed x86_64 compilation further (rev. 17940 was not enough).
git-svn-id: trunk@17983 -
2011-07-12 13:42:27 +00:00
marco
ad60e9a467 * some notes I had in an old checkout.
git-svn-id: trunk@17982 -
2011-07-12 09:50:04 +00:00
marco
d2ccb1f564 * added fpvectorial -> fcl-base -j 2 deps, and regenned packages/ and fpvectorial makefile with up to date fpcmake
fpvectorial makefile had deps on fcl-process instead of fcl-base?

git-svn-id: trunk@17981 -
2011-07-12 09:34:31 +00:00
joost
c0d54a0fb2 * Added fcl-base dependency (epsvectorialreader.pas depends on contnrs)
git-svn-id: trunk@17980 -
2011-07-12 07:31:00 +00:00
marco
1e9733d2d7 * several virtual* and heap* functions checked for 64-bit issues.
git-svn-id: trunk@17979 -
2011-07-11 20:38:37 +00:00
joost
584ac69bff * Several fpmake-file updates
git-svn-id: trunk@17976 -
2011-07-11 19:24:28 +00:00
sergei
02a5efc619 * win/systhrd.inc, clean up:
- removed assembler from SysRelocateThreadVars: never actually worked, and this file is shared between different CPUs - not a proper place for assembler anyway.
- Obtain handle of kernel32.dll using GetModuleHandle, allows to get rid of UnloadLibrary call.

git-svn-id: trunk@17975 -
2011-07-11 17:18:48 +00:00
florian
b0cef1693a * compilation of system unit was broken
git-svn-id: trunk@17972 -
2011-07-10 21:03:55 +00:00
florian
f276177c44 + build atmega128 mcu unit
git-svn-id: trunk@17971 -
2011-07-10 21:03:05 +00:00
florian
4f08d148ea * unique internal errors
git-svn-id: trunk@17970 -
2011-07-10 20:54:48 +00:00
joost
595eadccb6 * Do not cleanup fpmake executable on distclean anymore. To make it possible
to cleanup more than one target using distclean.
 * Added new fpmakeclean target to makefiles which does a cleanall and clears
the fpmake executables

git-svn-id: trunk@17969 -
2011-07-10 14:27:49 +00:00
sergei
6a2e87121b * ogcoff.pas: sort all objsections having '$' in the name, not just .idata$*. This is a documented PECOFF feature and it is required for tls callback stuff to link correctly regardless of the order of declarations in source files.
git-svn-id: trunk@17968 -
2011-07-10 12:24:35 +00:00
joost
eae9ef6529 * Do not mark packages as installed, if they are compiled within this fpmake
git-svn-id: trunk@17967 -
2011-07-10 09:08:59 +00:00
marco
4163c8fb51 * assume callback is cdecl
git-svn-id: trunk@17966 -
2011-07-09 21:34:32 +00:00
joost
28fb5b21a3 * Always add -n when compiling fpmake when not cross-compiling
git-svn-id: trunk@17965 -
2011-07-09 16:08:06 +00:00
Mattias Gaertner
5ca0871033 instantfpc: example for mode directive
git-svn-id: trunk@17964 -
2011-07-09 08:40:27 +00:00
sergei
50952945e1 * Moved WideString-related code, which is identical for Win32 and Win64, into syswin.inc
* Defined HAS_WIDESTRINGMANAGER for Win32 and Win64, this allows to smartlink away part of generic widestring routines.

git-svn-id: trunk@17963 -
2011-07-08 20:07:51 +00:00
pierre
5a2d6c0429 Fix constant pointer reading for 64 bit CPU
git-svn-id: trunk@17962 -
2011-07-08 16:28:24 +00:00
pierre
0ca127b97e * Fix length size for non-short string types
git-svn-id: trunk@17961 -
2011-07-08 16:21:28 +00:00
pierre
f23b265ce1 + Add global testppudump rule
git-svn-id: trunk@17960 -
2011-07-08 16:01:28 +00:00
pierre
efb0193cb2 Add ./utils/ppudump prerequisite to log-ppu files
git-svn-id: trunk@17959 -
2011-07-08 15:57:27 +00:00
pierre
d4372a7ac5 * Add ppudump testing rules
git-svn-id: trunk@17958 -
2011-07-08 15:47:27 +00:00
pierre
b94cdd4881 * Handled real constants of different size
git-svn-id: trunk@17957 -
2011-07-08 15:39:04 +00:00
pierre
322e3f8a16 * More fixes for ppudump use
git-svn-id: trunk@17956 -
2011-07-08 15:38:14 +00:00
pierre
3017132268 * Remove triple sources
git-svn-id: trunk@17955 -
2011-07-08 15:37:23 +00:00
pierre
2f7a57fcab * Use extended for bestreal type if GENERIC_CPU is defined
git-svn-id: trunk@17954 -
2011-07-08 15:36:29 +00:00
pierre
eb4798238d * Display hexadecimal values of wide strings
* Set has_errors on more locations
  + Add has_more_infos boolean
  * Add -M option to set ExitCode to 2 if more info is available.
  * Support constnil type.

git-svn-id: trunk@17953 -
2011-07-08 10:32:28 +00:00
pierre
dd96bfb3dd * fix ppu dumping with ppudump utility for cross CPU
git-svn-id: trunk@17952 -
2011-07-08 08:57:24 +00:00
michael
6ad0a9cc26 * Improved interpretation of shebang line under linux. Added --set-cache argument
git-svn-id: trunk@17951 -
2011-07-07 19:03:08 +00:00
sergei
5d5ddbbe3e * Revert rounding section data size, it should be done in a more sophisticated way
git-svn-id: trunk@17950 -
2011-07-07 11:34:57 +00:00
sergei
2d96c34b06 * Improvements to PE executable output:
* Clear bits in section flags, that are only valid for object files
  * Round section datasize up to filealignment (PECOFF v8 documentation requires this)
  * Zero datapos and datasize for all sections w/o data, not just for .bss
  * Produce IMPORT_ADDRESS_TABLE directory in exe header
  * Entirely smartlink away unused DLLs (these used to have two terminating thunks left)

git-svn-id: trunk@17949 -
2011-07-06 20:55:57 +00:00
sergei
cd94bb5edf * tls_index must be renamed everywhere, forgotten part of r17943.
git-svn-id: trunk@17948 -
2011-07-06 20:33:45 +00:00
michael
718fc1ccd1 * Force .pas extension if extension not in .pas .pp .lpr
git-svn-id: trunk@17947 -
2011-07-06 20:16:45 +00:00
michael
31df8d516b * Allow .cgi as extension
git-svn-id: trunk@17946 -
2011-07-06 20:14:30 +00:00
michael
1726c0b14d * Force an extension on cache filename, so extension can be skipped in script name.
git-svn-id: trunk@17945 -
2011-07-06 19:47:47 +00:00
sergei
d9c399f6a1 * Partially reverted rev.17798: printing the runtime error message must remain in InternalExit.
Moving it to SysFlushStdIo causes a multithreaded program to print several messages with meaningless stack traces.

git-svn-id: trunk@17944 -
2011-07-06 17:40:34 +00:00
sergei
ea1e44c036 * Hacking TLS callbacks into proper shape, part 2:
- Completely removed DLL_PROCESS_DETACH callback for executables. Reason: 1) it is executed after RTL has been shut down and called ExitProcess(), at which point it is really not a good idea to do the cleanup. 2) In executable (in contrast with DLL) it is just fine to leave remaining resources alone and let OS reclaim them.
* Using 'cvar' for _tls_used and _tls_index to get proper prefixing without $ifdef's.

git-svn-id: trunk@17943 -
2011-07-06 16:43:13 +00:00
pierre
c529921fc8 * clarify environment processing
git-svn-id: trunk@17942 -
2011-07-06 16:23:10 +00:00
pierre
51b867e6c3 Fix USEENV, export DOTESTENV was missing
git-svn-id: trunk@17941 -
2011-07-06 16:18:05 +00:00
sergei
c32e4b291e * Fixed compilation for x86_64-win64
git-svn-id: trunk@17940 -
2011-07-06 09:39:50 +00:00
sergei
59ac157b50 sysinit*.pp: Factored common code into include file.
git-svn-id: trunk@17939 -
2011-07-05 13:25:51 +00:00
sergei
138c2b6b0a * Hacking TLS callbacks into proper shape:
- Do not call DLL hooks from exe callback handler.
  - Do not call SysInitMultitheading from DLL_THREAD_ATTACH handler, it may only be called from the main thread. See comments in syswin.inc for details. Reverts rev. 17892.
  + To guarantee that SysInitMultithreading is called from the main thread, assume executables always multithreaded, just like DLLs are.
  - Also removed all checks with MainThreadIdWin32, except checks for double DLL_PROCESS_DETACH in DLLs. They duplicate what Windows already does (the main thread invokes only PROCESS_ATTACH/PROCESS_DETACH and never THREAD_ATTACH/THREAD_DETACH callbacks).
  * Attempts to avoid double initialization/finalization (once in callback, second time in normal control flow).
  * Net result: webtbs/tw2423 and webtbs/tw15530 fixed, webtbs/tw3661 broken (because heaptrc does not support checking pointers in TLS area, and with 'always multithreaded' apps the Output varible moves into TLS).

git-svn-id: trunk@17938 -
2011-07-05 11:57:11 +00:00