e.g. -XlS-7 to call clang-7 instead of clang)
* IMPORTANT: changed the -CL llvm code generation options to -Cl, for
consistency with the new -Xl option (-XL was already taken)
git-svn-id: trunk@44436 -
contain various bugs and can't even complete "make all", so there is no
point in keeping them
o changed default LLVM target version to 7.0
git-svn-id: trunk@43682 -
globals.pas (size_2_align): ...here.
Change parameter type to asizeuint to avoid overflows.
(var_align_size, const_align_size): Also change parameter type to asizeuint.
i386/cpupara.pas, i8086/cpupara.pas, x86_64/cpupara.pas: Add globals
to implementation uses clause because of size_2_align move.
git-svn-id: trunk@43022 -
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 -
- Clean up handling of CPU/FPU type handling in RISCV.
- Do more fixes to get RISCV32 working.
- Fix most soft multiplication handling for generic RISCV code. Still missing a few.
- Add RISCV embedded targets.
git-svn-id: trunk@42335 -
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 -
may now be used in fpc.cfg, etc. They evaluate to /usr/local and /usr/X11R6 by
default, but may optionally be overriden via the LOCALBASE and X11BASE
environment variables.
* use the new $OPENBSD_LOCALBASE and $OPENBSD_X11BASE variables in the default
library search path on OpenBSD
git-svn-id: trunk@41755 -
o renamed jumpalignmax and coalescealignmax to jumpalignskipmax/
coalescealignskipmax to better reflex the meaning of these setting
(and the difference in meaning to e.g. constalignmax)
git-svn-id: trunk@40682 -
+ support of new alignment control values for GNU AS writer
+ support of new alignment control values for binary writer
* better alignment settings on i386-win32
* improved inserted align directives for if nodes
git-svn-id: trunk@40159 -
Fix float loading.
Fix a number of small issues with wrong operand sizes.
Fixed concatcopy code generation.
Align jump table for case statements.
git-svn-id: branches/laksen/riscv_new@39481 -
sysv_abi_cdecl calling conventions on x86-64 to force using the SYSV/
Microsoft ABI on platforms that don't use it by default (mainly to ease
porting pure assembler routines)
git-svn-id: trunk@35425 -
This was brkoken because the -dHEAPTRC option
adds ppheap unit at top of the uses clause in pp.pas source,
which leads to a change in the loading order of the units.
This order change revealed that initialization of fpkg unit
was supposed to happen after globals unit.
Fixed here by testing if initdoneprocs local variable is assigned,
both in register_initdone_proc and in allocinitdoneprocs,
to avoid double initialization.
git-svn-id: trunk@34361 -
Merged revision(s) 28796, 28837-28845, 28847-28850, 28852, 32135 from branches/svenbarth/packages:
Provide possibility to pass packages and search paths for packages as parameters.
fpkg.pas:
+ new unit which contains the base types related to package files (most importantly "tpackage")
globals.pas:
+ new variable "packagesearchpath" which contains all paths in which package files should be looked for
+ new variable "packagelist" which contains a list of all packages that should be used in a program or library
* InitGlobals & DoneGlobals: initialize/finalize "packagesearchpath" accordingly ("packagelist" is handled in unit fpkg using a init/done-callback)
options.pas:
+ TOption: new fields "parapackagepath" and "parapackages" to keep track of package search paths and package files passed as parameters
* TOption.interpret_option: use '-Fp' for package search paths and '-FP' for package files
* read_arguments: apply the passed package search paths and packages to their respective containers
........
+ add a new unit which will contain basic functions related to handling packages
........
Move package related functions from pmodules to pkgutil.
pmodules.pas => pkgutil.pas:
* createimportlibfromexports
* varexport
* procexport
* insert_export
* RewritePPU
........
* adjust indentation
........
Extract the code to export the symbols of a unit to its own function in pkgutil so that less functions need to be exported.
pmodules.pas, proc_package:
* move code to export the symbols of a unit to new function export_unit
pkgutil.pas:
+ new function export_unit
- remove exports of procexport, varexport and insert_export
........
Some small fixes for package parsing.
pmodules.pas, proc_package:
* use orgpattern instead of pattern to build the module name (like is done in uses sections)
* ignore duplicates when generating exports
- no need to generate an import library for the package; that is done by the program/library that uses the package
........
+ new unit fpcp of which the class tpcppackage handles the reading and writing of package metadata from/to pcp files (equivalant to tppumodule).
........
+ add unit which contains representation of a PCP file (tpcpfile) like tppufile is for units.
........
Improve export generation.
pkgutil.pas:
+ new function exportprocsym to correctly export a procedure with all its aliases
+ new function exportabstractrecordsymproc to export the members of structured types
* insert_export: handle also namespacesym and propertsym (by ignoring them)
* insert_export: correctly export classes, record and objects
* insert_export: use new exportprocsym function to export a procsym
* insert_export: only export public variables of a static symtable
........
+ add entry constants for the name of the package and the package file names, both used by a PCP file
........
* use messages to get rid of most writelns related to package loading
........
Add additional entry types for PCP files
entfile.pas:
+ new entries ibstartrequireds and ibendrequireds to store the list of required packages
+ new entries ibstartcontained and ibendcontained to store the list of contained units
+ new entries ibstartppus and ibendppus to store the list of contained PPU files
........
Generate the PCP file once the package file and the used units were compiled correctly.
pmodules.pas:
* proc_package: generate the PCP file upon successful compilation
........
Add the possibility to load all packages supplied as parameters.
pkgutil.pas:
+ new function load_packages to load all packages supplied as parameters
pmodules.pas, proc_program:
* use load_packages to load all packages before any unit is loaded
........
Add code which tries to load a unit from a package first and only then as usual.
fppu.pas, tppumodule:
+ new method loadfrompackage which searches all available packages for the unit and loads it from there if found
* loadppu: first try to load the unit from a package if any are available
........
Don't link objects files of a unit that is provided by a package.
pmodules.pas, proc_program:
* if a unit has uf_in_library set we must not include it in the units we link against
........
git-svn-id: trunk@33452 -
globtype.pas:
+ tlocalswitch: extend by cs_imported_data
globals.pas:
* default_settings: cs_imported_data is set by default (Delphi compatible)
switches.pas:
* turboSwitchTable: G is used for cs_imported_data
scandir.pas:
+ new directive handler dir_importeddata
* InitScannerDirectives: handle IMPORTEDDATA with dir_importeddata
git-svn-id: trunk@33281 -
CPU target for inline assembler blocks. In addition to the different CPUs
(as listed under 'Supported CPU instruction sets:' in the output of 'fpc -i'),
it also supports the special values 'ANY' and 'CURRENT'. 'ANY' means no
restrictions (i.e. all instructions are available). 'CURRENT' means the
current CPU target (as specified with the '-Cp' command line option). For
backward compatibility, the default value is 'ANY' for all CPU targets, except
i8086, where it defaults to 'CURRENT'.
This directive requires support for the new asd_cpu directive in the assembler
writer. This is currently implemented only for NASM, but will be supported in
some of the other assembler writers as well (incl. the x86 internal assembler
writer).
git-svn-id: trunk@33138 -
Provide possibility to register callbacks that are called from InitGlobals and DoneGlobals.
globals.pas:
+ new function register_initdone_proc which allows to register a callback for InitGlobals and DoneGlobals respectively
+ add functions callinitprocs, calldoneprocs, allocinitdoneprocs, freeinitdoneprocs to manage and access the init/done-callbacks
* InitGlobals: call callinitprocs
* DoneGlobals: call calldoneprocs
........
git-svn-id: trunk@32977 -