{$ifdef cpufpemu}
* Add system_arm_freertos and system_xtena_linux to the list
of systems that automatically add cs_fp_emulation to
init_settings.moduleswitches.
+ Do not use controller specfic default fputype for xtensa-linux
target that does not support use of -Wp option to set controller type.
git-svn-id: trunk@45265 -
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 -
instead of the previous 10.4 for i386 and 10.5 for x86-64. This prevents
issues with finding the crt.* files, as starting with 10.8 those files
are no longer required.
git-svn-id: trunk@43374 -
TSearchPathList.AddPath() to AddLibraryPath() to make it clear it's only
to be used for adding library search paths (and replaced one case where
it was used for a source file search path with a call to the
two-argument version)
* also added some missing '=' prefixes to built-in library search paths,
and fixed wrong DirectoryExists checks in t_linux in case of using
a sysroot, cross-compiling or linking on target
git-svn-id: trunk@43312 -
one used by GNU ld: only search for library paths in the sysroot if they
are built into the compiler or start with "=". Previously, all
user-provided library paths were also searched in the sysroot
(mantis #36198)
git-svn-id: trunk@43279 -
- 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 -
(based on patch by Martok)
o enabled by default in ISO and Extended Pascal: compile-time error if not
the case in ISO mode, warning and run-time error in Extended Pascal mode
o warning enabled by default in all other modes for boolean, enumeration and
subrange integer types with ranges different from the default ones
(i.e., different from 0..255, -128..127, 0..65536, etc)
o warnings for all ordinal types can be enabled in all modes with
-CC
git-svn-id: trunk@42047 -
for the system unit, as there are several bugs in the Xcode linkers
that trigger when the system unit is involved:
o Xcode 9.3: the second symbol associated with routines that have multiple
symbols (such as FPC_INTERLOCKED*) gets moved to the next routine (so
e.g. calling InterlockedIncrement results in calling InterlockedExchange)
o Xcode 10.1: the linker does not generate native code for the personality
routine (probably because it's not referenced directly anywhere)
git-svn-id: branches/debug_eh@41911 -
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 -
* adapted string used for macOS/iOS version in triple in llvm IR files to
what clang expects (always a single digit patch version)
git-svn-id: branches/debug_eh@40431 -
o use this flag to set the personality routine of a function if it uses
exception handlinga
o also define FPC_USE_PSABIEH if this target flag is set
o set this target flag for darwin/x86-64 if the compiler is compiled with
-dllvm
git-svn-id: branches/debug_eh@40415 -
+ 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 -
Add hardfloat ABI option for RiscV. Still needs proper implementation though.
Add CG support for profiling.
git-svn-id: branches/laksen/riscv_new@39798 -
information. Only enabled on i8086 (for now). Does not do much yet, but
hopefully, soon it'll start emitting line number information for i8086-msdos
that is usable by DOS debuggers.
git-svn-id: trunk@39006 -
* 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 -
per platform (currently only enabled for win32 and win64). Enabling it forces
code page conversion from the codepage of the .msg file to CP_ACP, before
writing the message to the console. Not enabling it keeps the previous
behaviour of not doing any kind of code page conversion for messages. This
feature should be tested and enabled per platform, because it requires code
page conversion support in the rtl (so it may require adding the appropriate
extra units, such as fpwidestring). When this feature is enabled for all
platforms, we can start keeping only one .msg file per language, because
having extra .msg files for different encodings for the same language becomes
redundant, since the compiler can do code page conversion to whatever code
page the console uses.
git-svn-id: trunk@36450 -
compiler/ncgrtti.pas
+ write_record_operators procedure which fills simple VMT like table for MO.
* recorddef_rtti save MO (if exists)
* objectdef_rtti_fields save nil pointer/entry for objects rtti (have same RTL parts like for records)
compiler/options.pas
+ new define FPC_HAS_MANAGEMENT_OPERATORS
compiler/symconst.pas
+ new item itp_init_record_operators for tinternaltypeprefix enum
+ new entry '$init_record_operators$' in internaltypeprefixName
rtl/inc/rtti.inc
+ new field RecordOp (pointer to MO VMT table) in TRecordInfoInit
+ new types to handle MO VMT: TRTTIRecordOpVMT, PRTTIRecordOpVMT, TRTTIRecCopyOp, TRTTIRecVarOp
rtl/objpas/typinfo.pp
+ RecordOp field for TRecInitData record
git-svn-id: trunk@35445 -
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 -
Note 1: using an older AS might fail anyway if the amount of sections is too high (like in packages\odata\src\sharepoint.pp)
Note 2: it might be an idea to keep track of the created sections in the asmlists and only enable the option if *really* necessary (like with the internal COFF output generator), though this might lead to false positives due to multiple sections with the same name (since I'd prefer to use the KISS principle only a counter would be used)
git-svn-id: trunk@35381 -
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 -
* Fix "-CX -al" use for i8086, because it was currently broken
-al triggered switch to nasm external assembler but with smart linking,
this should also generate a switch to external assembler.
git-svn-id: trunk@34017 -
* FPC_HAS_DYNAMIC_PACKAGES is set if the target does support dynamic packages (currently none, but soon(TM) that should be i386-win32, {i386,x86_64}-linux and all darwin systems)
* FPC_HAS_INDIRECT_VAR_ACCESS is set if assembler code should assume that variables from another unit are accessed indirectly (thus different assembler code should be used)
git-svn-id: trunk@33953 -
Switch Mac OS X to indirect entry information.
compiler/systems/t_bsd.pas, TLinkerBSD:
+ implement InitSysInitUnitName
compiler/system.pas:
* systems_internal_sysinit: add Darwin systems
compiler/hlcgobj.pas, thlcgobj:
* gen_proc_symbol_end: for Darwin systems don't directly call PascalMain for libraries, but FPC_LIBMAIN instead
rtl/darwin:
+ add sysinit.pas unit which contains the executable and library entry points for Darwin
rtl/darwin/Makefile.fpc:
* add sysinit unit
rtl/bsd/sysosh.inc:
+ add a Darwin specific TPlatformEntryInformation (could probably be used for all Unix systems...)
rtl/bsd/system.pp:
* define FPC_HAS_INDIRECT_MAIN_INFORMATION for Darwin systems once we're no longer bootstrapping with 2.6.x
+ add EntryInformation variable (this could maybe moved to system.inc...)
+ add new procedure SysEntry that is called from the entrypoint and which sets up necessary information required by other parts of the RTL
* the old FPC_SYSTEMMAIN is still in place for bootstrapping
rtl/inc/systemh.inc, TEntryInformation:
* PascalMain is cdecl on non-Windows systems (ToDo: really?)
rtl/inc/system.inc:
* initialstklen is provided by the indirect entry information, so no external here
........
Fix bootstrapping.
rtl/darwin/sysinit.pas:
* enable the code only when no longer bootstrapping with 2.6.x
........
Fix bootstrapping.
rtl/objpas/objpas.pp:
* define FPC_HAS_INDIRECT_MAIN_INFORMATION for Darwin only while not bootstrapping with 2.6.x
........
rtl/darwin/sysinit.pas:
* reference PASCALMAIN correctly (I wonder how this even worked previously :/ )
git-svn-id: trunk@33949 -
Keep track whether a package was added directly through a requires section (or the command line) or indirectly.
fpkg.pas, tpackageentry:
+ new field "direct"
pkgutil.pas:
+ add_package: new parameter "direct" which sets the "direct" field of the new package entry
options.pas:
* TOption.interpret_option & read_arguments: adjust call to add_package()
pmodules.pas:
* proc_package: adjust call to add_package()
........
Also load all packages that are required by packages, but that are not part of the directly used packages.
pkgutil.pas, load_packages:
* check the list of required packages for packages that are not yet part of the package list and add these as indirect packages
* establish the links to loaded packages in the required packages once all packages were loaded
........
fpcp.pas, tpcppackage:
+ new method add_required_package() to add a required package while ignoring duplicates
........
pmodules.pas, proc_package:
* add all packages of loaded units as required packages
........
git-svn-id: trunk@33517 -
pmodules.pas, proc_package:
* generate the dummy entry symbol only on Windows systems (ToDo for other systems that might need it)
........
options.pas:
* TOption.interpret_option & read_arguments: use add_package() from pkgutils instead of addpackage() from fpkg
fpkg.pas:
- remove no longer needed addpackage()
........
pkgutil.pas:
+ new procedure add_package_libs() to add all packages as libraries that are also linked against
pmodules.pas:
* proc_package & proc_program: add all package libraries to the linker before creating the final binary
........
pkgutil.pas, add_package:
* package names are case insensitive so add them in uppercase to correctly detect duplicates
........
Keep track of how many units are used from each required/requested package and only link those from which any units are used.
fpkg.pas, tpackageentry:
+ new field usedunits to count how many units of the package are used
pkgutil.pas:
+ new procedure add_package_unit_ref() to increase the amount of used units for the given package
pmodules.pas:
* proc_package & proc_program: check which units of all loaded ones are provided by other packages
........
git-svn-id: trunk@33510 -
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 -
routine is called with the same variable passed as the first and second
parameter, so the first one is not constand (since the second one is a
"var" para) -- this caused errors when compiling the compiler with -gt
git-svn-id: trunk@33202 -