Commit Graph

678 Commits

Author SHA1 Message Date
ccrause
181ee30174 Update build and link requirements for esp-idf v4.4. Refactor the version dependent linker fragments list into an array of version specific array of strings for easier updating in future. 2022-01-30 08:14:07 +00:00
ccrause
a9d883ada1 Add link unit for esp-idf v4.1. Version checks to allow for different patch levels in idf_version. 2022-01-18 21:34:26 +00:00
ccrause
985e8d3d13 Remove fall-through logic and separate idf_version checks of esp32 and esp8266. Also warn if idf_version is below the supported range. 2022-01-10 21:53:01 +02:00
ccrause
ea345f34aa Use different library link lists for esp8266-rtos-sdk v3.3 and v3.4. 2022-01-05 09:35:02 +00:00
ccrause
ab00794343 Keep esp32 and esp8266 version specific tweaks separate. 2021-11-29 22:42:49 +01:00
ccrause
e86d3af7e0 The linklib list for esp-idf v4.2 is also needed for v4.3 2021-11-29 22:42:49 +01:00
florian
54f2308d2a + draft for esp-idf version specific rtl unit which contains the necessery linklib statements 2021-11-29 22:42:49 +01:00
nickysn
ea5ffd597f * set self to nil in current_module.deflist for registered defs in the
tstoreddef.destroy destructor, instead of doing it after each call to
  x.owner.deletedef(x)

git-svn-id: trunk@49417 -
2021-05-30 21:27:57 +00:00
nickysn
1a71ca4106 * prevention of dangling pointers and use after free after free_unregistered_localsymtable_elements
git-svn-id: trunk@49262 -
2021-04-25 15:58:59 +00:00
pierre
e6045673ee Handle NIL entries in deflist after commit 48986
git-svn-id: trunk@49230 -
2021-04-18 15:44:07 +00:00
florian
d9784412a4 * patch by Cyrax: forbid to use heaptrc and valgrind at the same time, resolves #36529
* load cmem before line* units as they might allocate memory

git-svn-id: trunk@47390 -
2020-11-11 20:55:03 +00:00
Jonas Maebe
e7d1a77f9a * rename the ARM/AArch64-Darwin targets to ARM/AArch64-iOS
* rename the m68k/PowerPC-MacOS targets to m68k/PowerPC-MacOSClassic
  * repurpose the AArch64/Darwin target for AArch64/macOS
   o make AArch64-Darwin default target for a hosted AArch64-Darwin compiler

git-svn-id: trunk@45758 -
2020-07-10 21:52:24 +00:00
svenbarth
40633835dc * Windows on Aarch64 requires a relocation section
git-svn-id: trunk@44918 -
2020-04-21 06:04:37 +00:00
florian
391512546e + initial FreeRTOS RTL support, largely based on the Embedded target, limited to Xtensa so far
git-svn-id: trunk@44400 -
2020-03-29 17:13:45 +00:00
svenbarth
40c11baaac * use a different name for the packages' entry point and use _DLLMainCRTStartup as an alias to avoid problems with the C-prefix
git-svn-id: trunk@43551 -
2019-11-21 21:45:18 +00:00
svenbarth
bb3b1b06a7 * fix condition for including a unit's object files or not when compiling with packages
git-svn-id: trunk@43550 -
2019-11-21 21:45:15 +00:00
florian
13ab35e3ef * fix usage of ppumove generated shared libraries
git-svn-id: trunk@43495 -
2019-11-16 14:07:32 +00:00
Jonas Maebe
a051b8d225 - remmoved doregister parameter from t*sym constructors, as the registration
is handled automatically nowadays

git-svn-id: trunk@42998 -
2019-09-14 17:30:45 +00:00
svenbarth
ced3885dbb * generate construction function for the attributes used in a unit using a more straight forward approach
ToDo: "collect" attributes of same type and same argument list and generate constructor only once for them

git-svn-id: trunk@42394 -
2019-07-12 22:07:20 +00:00
svenbarth
e296b26e9e - remove unit info and related code again as that will be handled similar, but differently with dynamic packages
git-svn-id: trunk@42369 -
2019-07-12 22:05:47 +00:00
svenbarth
b2932393df Reintegration of Custom Attributes branch by Joost van der Sluis with patches reworked by Svetozar Belic [patch 1/3]
Implemented attributes for class types and properties (based on work by Joost van der Sluis). Added TCustomAttribute - a base class for attributes. Added TUnitInfo record to RTTI. It contains the unit name and unit options (for now only a flag which specifies if the unit contains attributes). Added several tests for attributes.

git-svn-id: trunk@42356 -
2019-07-12 22:04:48 +00:00
pierre
243c967967 Commit of new debug feature implemented by J. Gareth Moreton
Allows compilation of compiler using -dDEBUG_NODE_XML
  which will generate a NAME-node-dump.xml file for each 
  unit, program or library compiled,
  containing a XML description of the nodes handled during
  compilation of the unit, program or library.

git-svn-id: trunk@42271 -
2019-06-22 14:08:47 +00:00
Jonas Maebe
0cd0e1614b * synchronised with trunk till r42105
git-svn-id: branches/debug_eh@42106 -
2019-05-19 19:24:25 +00:00
Jonas Maebe
aad87820e6 * abstracted registration of library init/fini routines (to be able to add
LLVM support)

git-svn-id: trunk@42104 -
2019-05-19 19:20:47 +00:00
Jonas Maebe
9e9a982bfe * synchronised with trunk till r42095
git-svn-id: branches/debug_eh@42096 -
2019-05-18 18:43:51 +00:00
Jonas Maebe
8ec3cd6390 * append rather than insert the alias symbols for the program/procedure
initialisation/finalisation routines
   o this ensures the procdef's mangled name and its first symbol match,
     which is required for Darwin when generating debug information and
     using ".set" directives to define alias symbols, because a symbol
     defined via ".set" cannot be used in a data relocations (and the DWARF
     debug generator uses the default mangled name, which used to correspond
     to the alias symbol due to the "insert" instead of "append")

git-svn-id: trunk@42094 -
2019-05-18 18:41:33 +00:00
Jonas Maebe
fc60ec2ea4 + support for LLVM LTO: compile units with -CLflto -> when compiling a main
program/library also with -Clflto, all units compiled with that option
    will be linked using their bitcode files and LTO
   o compiling with -CLflto will compile all units twice: once for normal
     (static or smart) linking, and once for LTO. So the result can be
     used both with and without LTO.

git-svn-id: branches/debug_eh@41910 -
2019-04-20 18:56:11 +00:00
Jonas Maebe
0b61b5d4cf * added extra header to ppu inside a subsection, so we won't run into
trouble when the ppu version hits 255
  * also moved several ppu flags to a set inside that section

git-svn-id: trunk@41846 -
2019-04-06 21:28:43 +00:00
Jonas Maebe
91d5457b38 * moved around/replaced the following procedures to stop nflw from depending
on pdecsub (node units should not depend on parser units):
   o maybe_add_public_default_java_constructor()
   o handle_calling_convention()
   o create_finalizer_procdef() (replaced with create_outline_procdef())
   o insert_record_hidden_paras()
   o handle_calling_convention()
   o proc_add_definition()
   o build_parentfpstruct()
   o maybe_guarantee_record_typesym()
   o get_first_proc_str()
  * factored out the creation of a procinfo for a nested procdef based on a
    subnodetree of the current procdef into tprocinfo.create_for_outlining()

git-svn-id: trunk@40773 -
2019-01-05 16:26:33 +00:00
Jonas Maebe
28df55fe08 * moved handle_calling_convention() to pparautl
git-svn-id: trunk@40772 -
2019-01-05 16:26:29 +00:00
marco
dd52e79089 * two comment spelling fixes. Mantis #34092 & #34097
git-svn-id: trunk@39593 -
2018-08-08 08:39:20 +00:00
svenbarth
35bddf6fb1 * correctly update the (now unregistered) unit symbol if the unit was found with the help of a default namespace
(this is needed to trigger the correct creation of the namespace symbols)

git-svn-id: trunk@38917 -
2018-05-05 17:18:42 +00:00
svenbarth
c0dcb505e2 * use the module's filename instead of the passed in name (we assume all units added that way don't use the
ability to have a different module name to their filename)

git-svn-id: trunk@38912 -
2018-05-05 17:18:29 +00:00
svenbarth
e59e9e2a0a * extend tunitsym to be created as registered or not (for now all are created as registered)
git-svn-id: trunk@38911 -
2018-05-05 17:18:26 +00:00
florian
8eb885de91 * better error message if a unit is not found
git-svn-id: trunk@37868 -
2017-12-29 17:27:44 +00:00
pierre
5780c608be Also generate FPC_HAS_FEATURE_XXX macros for programs, libraries and packages
git-svn-id: trunk@37732 -
2017-12-14 22:53:32 +00:00
florian
b41cb26727 + write selected features in ppu of the system unit and load them further on
* ppu version update
* -Sf might be used only during system unit compilation
* loadsystemunit factored out so the system unit can be loaded earlier than other units to get features set

git-svn-id: trunk@37708 -
2017-12-10 16:32:56 +00:00
pierre
4c3d8d422a Add _GLOBAL_OFFSET_TABLE_ for sparc64 if -Cg is used
git-svn-id: trunk@36743 -
2017-07-18 12:49:26 +00:00
svenbarth
c90fbe1bf0 * fix for Mantis #31795: append a $ to internal functions init, finalize, init_implicit and finalize_implicit as their section names otherwise look the same as those of user declared functions with the same name
+ added test

git-svn-id: trunk@36194 -
2017-05-12 13:32:37 +00:00
florian
b1dff29cbf * removed unused units
git-svn-id: trunk@36165 -
2017-05-09 19:53:14 +00:00
svenbarth
cc42bb8a7a * generate the package stub for all Windows and NativeNT targets
git-svn-id: trunk@35373 -
2017-01-29 22:39:34 +00:00
svenbarth
48bddbbc43 * use new potype_pkgstub instead of gen_fpc_dummy() as the former works on all platforms that needs it
With this dynamic packages are starting to work on x86_64-win64

git-svn-id: trunk@35372 -
2017-01-29 22:39:06 +00:00
svenbarth
1a6a8b7c9f + introduce a new potype for the main stub of a package library (which on Windows is simply a DLLMain returning True)
git-svn-id: trunk@35371 -
2017-01-29 22:37:40 +00:00
Jonas Maebe
048666a25c * when freeing a procdef that hasn't been registered for writing to the ppu
at the end of compiling a unit, also remove it from its owning procsym
    in case the procsym does get written to the ppu (possible because you
    can have extra overloads in the implementation) (mantis #25283)
   o also fixes webtbf/tw4103 on the platforms where this still failed
     (on the platforms where it worked, it worked by accedent since the
      compiler was accessing memory of a freed procdef)

git-svn-id: trunk@35309 -
2017-01-15 17:41:27 +00:00
florian
42cde51805 * ignore warnings caused by boolean expression simplification
git-svn-id: trunk@35231 -
2017-01-04 16:33:31 +00:00
svenbarth
246de84ef3 * ensure that a finalization section is parsed before the generation of specializations as otherwise specializations in such sections would result in unresolved forward declarations
git-svn-id: trunk@34582 -
2016-09-30 15:41:35 +00:00
svenbarth
da5bc92ae0 * pmodules.finish_unit: fix condition that would lead to no implicit initialization code being generated if no explicit one is available, but an implicit one would be required
git-svn-id: trunk@34581 -
2016-09-30 15:11:16 +00:00
pierre
4d09dfca95 Remember usage of checkpointer (-gc) option:
Use new cs_checkpointer_called moduleswitches set element.
     Use new uf_checkpointer_called PPU flag (reusing obsolete uf_local_browser flag value)
     Emit warning if compiled library/program has any code using checkpointer.
  
 * ppu.pas: New constant: uf_checkpointer_called
 * globtype.pas: New constant: cs_checkpointer_called
 * fppu.pas: Set uf_checkpointer_called flag if cs_checkpointer_called is set in current_settings.module_switches
 * i8086/n8086mem.pas: Include cs_checkpointer_called in current_settings.moduleswitches
 *  ncgmem.pas: Likewise.
 * msg/errore.msg: Add new message saying that -gc and -Ur options are incompatible
   Add description to -gc option, saying it is experimental.
   Add warning at link time for program/library if checkpointer is used in any unit or main code.
 * options.pas: if -gc and -Ur options are used, never enable checkpointer code,
   instead output a warning that release is incompatible with -gc option.
 * pmodules.pas: proc_program: Check all modules for uf_checkpointer_called flag,
   emit a warning if checkpointer is used.
 * utils/ppuutils/ppudump.pp: Add code for uf_codepointer_called option.

git-svn-id: trunk@34567 -
2016-09-27 14:46:09 +00:00
pierre
3a9f2f55f4 -gc or {$CHECKPOINTER ON} requires heaptrc unit loading even for units
git-svn-id: trunk@34261 -
2016-08-10 09:44:01 +00:00
svenbarth
296b7dbaf5 * explicitely load the system unit if we have at least one required package (as one of those *must* contain the system unit); but don't add it to the used units of the package module as otherwise we'd detect the package to contain the system unit as well
git-svn-id: trunk@34254 -
2016-08-05 14:45:40 +00:00