Commit Graph

838 Commits

Author SHA1 Message Date
svenbarth
8536abce8a * as the management operator feature is not platform specific using a specific define for it aside from a
version check is unnecessary, thus remove the FPC_HAS_MANAGEMENT_OPERATOR define and instead check for VER3_0

git-svn-id: trunk@39257 -
2018-06-20 19:00:24 +00:00
nickysn
b7bfac11cb + enable using the i8086 internal linker with debug info, if the compiler is
compiled with -di8086_link_intern_debuginfo

git-svn-id: trunk@39221 -
2018-06-14 15:24:39 +00:00
nickysn
9a4a61ab97 * automatically switch to external linking (and show message) when requested to
generate debug info on the i8086 targets

git-svn-id: trunk@39017 -
2018-05-17 16:11:51 +00:00
nickysn
b80642c384 + started implementing support for generating Microsoft CodeView debug
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 -
2018-05-16 15:25:33 +00:00
svenbarth
11f673a991 * also allow a ";"-separated list of namespaces for -FN
+ added test

git-svn-id: trunk@38939 -
2018-05-06 21:16:51 +00:00
svenbarth
760e1f3776 * default namespaces are specified using the new -FN<x> option whereby <x> is the namespace to be added to the
list of default namespaces

git-svn-id: trunk@38919 -
2018-05-05 17:18:47 +00:00
florian
5d17b335a6 * based on patch by Christo Crause: when setting the controller type, set also the sub architecture, resolves #33189
git-svn-id: trunk@38285 -
2018-02-18 21:19:35 +00:00
florian
5c18758b12 + based on a patch by Christo Crause create a define for the selected controller type (FPC_MCU_...), resolves #33191
git-svn-id: trunk@38284 -
2018-02-18 18:30:28 +00:00
pierre
22c4c349a6 force dwarf-2 debug format if used assembler does not support stabs (as indicated by new af_no_stabs flag)
git-svn-id: trunk@38239 -
2018-02-14 15:19:12 +00:00
Károly Balogh
75158d02ca m68k: set palmos to use 68000 and no FPU by default
git-svn-id: trunk@37916 -
2018-01-06 08:43:20 +00:00
pierre
0c3486f6e4 Add 'U' to list of first pass parsing, required to set cs_compilesystem early and avoid false error
git-svn-id: trunk@37908 -
2018-01-04 16:37:13 +00:00
Károly Balogh
6094910917 amiga/m68k: disable dynlibs feature. while the amiga has dynamic libraries, they have a different architecture, which don't mix with this feature. powerpc amiga could support the mainstream-style dynlibs, so keep it enabled there.
git-svn-id: trunk@37880 -
2017-12-30 07:00:15 +00:00
Károly Balogh
05642cd495 atari: switch off threading for atari tos. i think if we'll ever support MiNT, that should be a separate target, with all the advanced features enabled
git-svn-id: trunk@37877 -
2017-12-30 06:49:39 +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
nickysn
1c8b607d92 - disable threading on win16
git-svn-id: trunk@37669 -
2017-12-03 15:37:50 +00:00
florian
7fa9d267e3 * correctly set cpu defines after r37582, even if architecture and cpu type defines are equal (like CPUMIPS32), resolves #32687
git-svn-id: trunk@37590 -
2017-11-13 21:13:53 +00:00
florian
826f208e45 * define CPU and FPU type macros before the second parsing of the parameters so they can be used in config files
git-svn-id: trunk@37582 -
2017-11-12 22:14:18 +00:00
svenbarth
fcc1ce7a08 * fix for Mantis #30344: applied patch by Mario Ray Mahardhika to add new command line option -Sj[-|+] to control writeable typed constants (with a small adjustment to the help text)
+ added test

git-svn-id: trunk@37437 -
2017-10-09 19:19:23 +00:00
pierre
fee49a3e40 Disable threading feature for arm-palmos (like it is done for m68k-palmos)
git-svn-id: trunk@37221 -
2017-09-15 20:27:03 +00:00
nickysn
4e489f2b33 + generate faster, branchless code for abs(int64) on i8086
git-svn-id: trunk@37172 -
2017-09-10 18:58:45 +00:00
nickysn
aefa317474 + fast and branchless implementation of abs(int64) for i386
git-svn-id: trunk@37169 -
2017-09-10 17:25:47 +00:00
Károly Balogh
a87df638e7 m68k-atari: reenable threading feature. even if it's technically unsupported, it breaks the build of too many otherwise applicable packages
git-svn-id: trunk@37033 -
2017-08-22 11:07:10 +00:00
Károly Balogh
8db10af841 m68k: palmos and atari doesn't support threading
git-svn-id: trunk@37027 -
2017-08-22 09:06:52 +00:00
florian
7f72c780d8 * cleanup
git-svn-id: trunk@36960 -
2017-08-20 17:20:42 +00:00
pierre
903955f329 Add 's' for sparc64 specific message prefix
git-svn-id: trunk@36744 -
2017-07-18 12:50:47 +00:00
Károly Balogh
eaa769053b m68k: enable 68881 FPU on Linux and NetBSD by default
git-svn-id: trunk@36699 -
2017-07-08 23:54:39 +00:00
Károly Balogh
177a571af8 morphos/amiga/atari: fixed making vlink default based on the host platform
git-svn-id: trunk@36486 -
2017-06-11 23:33:11 +00:00
nickysn
a34f531661 + implemented support for codepage aware compiler messages. It can be enabled
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 -
2017-06-08 16:11:33 +00:00
florian
024481262c + compiler sets SPARC64 defines
git-svn-id: trunk@36427 -
2017-06-05 21:30:58 +00:00
nickysn
fa645dcaf7 + added abs(smallint) and abs(shortint) for cpus with 8-bit or 16-bit alu
git-svn-id: trunk@36327 -
2017-05-25 14:14:18 +00:00
Károly Balogh
a4c40a51ff m68k: also add options.pas to the previous change
git-svn-id: trunk@36303 -
2017-05-23 00:18:13 +00:00
pierre
ae349a3ccc Handle second argument to -Ch option, -Chx,y y is max heap size
git-svn-id: trunk@36260 -
2017-05-19 21:28:24 +00:00
pierre
b7fab7d39c Add -Wh command line option to enable HugeCode (equivalent of $F+)
for msdos memory models that support this.
  Add message to document this new command line option.

git-svn-id: trunk@36199 -
2017-05-12 22:49:50 +00:00
pierre
65fadcaa53 Disable threading and dynlibs features for msdos OS target by default
git-svn-id: trunk@36123 -
2017-05-05 15:03:47 +00:00
florian
fc4a8c0daa * more z80 support for the compiler
git-svn-id: branches/z80@35678 -
2017-03-28 20:21:03 +00:00
maciej-izak
af8e0efe57 * Rtti info about Management Operators (MO) in init table for records. Note: commit contains minimal changes for RTL (for proper "make") no functional changes. More RTL changes for fully functionally MO in next commits.
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 -
2017-02-19 00:22:59 +00:00
Jonas Maebe
265c8e7bbc + support for specifying ms_abi_default, ms_abi_cdelc, sysv_abi_default, and
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 -
2017-02-11 19:57:12 +00:00
svenbarth
a9888eba70 * also generate Big Obj COFF files with the GNU utilities (needs 2.25 or newer), at least as long as the new option -a5 isn't given, which disables this
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 -
2017-02-03 22:45:32 +00:00
Jonas Maebe
9cd707a27a * give an error if -Pxxx is specified to the compiler binary and xxx is not
the target architecture this compiler binary supports (mantis #30098)

git-svn-id: trunk@35299 -
2017-01-14 13:50:41 +00:00
florian
29a2c433f7 * -Sr option for iso mode: in case no command line parameter is passed, the file name for program parameters is derived from their variable name
git-svn-id: trunk@35257 -
2017-01-07 14:50:58 +00:00
florian
42cde51805 * ignore warnings caused by boolean expression simplification
git-svn-id: trunk@35231 -
2017-01-04 16:33:31 +00:00
Károly Balogh
d8f7fd008e atari: enable vlink for native builds as default
git-svn-id: trunk@35222 -
2017-01-03 13:58:49 +00:00
florian
7f375ac7bc * white space fixes
git-svn-id: trunk@35189 -
2016-12-23 17:04:30 +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
13076a3580 Use NO prefix to disable a feature (-Sfnoheap) instead of '-' prefix
git-svn-id: trunk@34018 -
2016-06-25 05:27:09 +00:00
pierre
270a574d6a + Allow to disable specific feature with -Sf-FEATURE_NAME
* 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 -
2016-06-24 15:55:10 +00:00
nickysn
c2305809dc + added an i8086-embedded target support to the compiler (RTL and makefile
support are not done yet)

git-svn-id: trunk@33999 -
2016-06-17 19:15:24 +00:00
svenbarth
18e6ea0ec8 Fix compilation by fixing typo -.-
git-svn-id: trunk@33954 -
2016-06-12 09:18:26 +00:00
svenbarth
614c4f47a6 Add two more defines related to packages:
* 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 -
2016-06-12 09:14:51 +00:00
svenbarth
535621faaa Rename FPC_HAS_INDIRECT_MAIN_INFORMATION to FPC_HAS_INDIRECT_ENTRY_INFORMATION which is more logical considering the record's name
git-svn-id: trunk@33950 -
2016-06-11 20:38:22 +00:00
svenbarth
f406867100 Merged revision(s) 31929-31931,32547 from branches/svenbarth/packages:
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 -
2016-06-11 20:29:51 +00:00
svenbarth
17bb29ddc3 Check for tf_winlikewidestring in the target's flags instead of relying on the target being a Windows system when determining whether the system as the WideString type that's separate from UnicodeString
git-svn-id: trunk@33900 -
2016-06-04 08:45:22 +00:00
pierre
e1814305bd Fix default CPU for assembler blocks (init_settings.asmcputype) to be the same as init_settings.cputype
git-svn-id: trunk@33612 -
2016-05-02 11:57:22 +00:00
Károly Balogh
510c3456d6 m68k: define CPUCOLDFIRE on the CF family targets
git-svn-id: trunk@33531 -
2016-04-18 02:17:25 +00:00
svenbarth
e8ede4c3e2 Merged revision(s) 32508-32510, 32512 from branches/svenbarth/packages:
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 -
2016-04-15 14:42:24 +00:00
Károly Balogh
fca1a74244 * reenable VLink as default linker for PowerPC Amiga, now that the support is fixed
git-svn-id: trunk@33512 -
2016-04-14 21:44:34 +00:00
svenbarth
c5bdc11cb2 Merged revision(s) 31924, 31934-31937 from branches/svenbarth/packages:
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 -
2016-04-14 21:35:47 +00:00
Károly Balogh
a73404a88c * disable default VLink for AmigaOS/PowerPC, as current VLink internalerrors while tries to link FPC-generated objects on this platform, for unknow reasons
git-svn-id: trunk@33494 -
2016-04-13 03:16:58 +00:00
Károly Balogh
9dae10b8ba * enable VLink when running on Amiga/MorphOS targets earlier so it can even be disabled afterwards
git-svn-id: trunk@33489 -
2016-04-12 16:52:47 +00:00
svenbarth
f8e9b33f99 Merge first batch of package handling related revisions from the packages branch
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 -
2016-04-08 15:40:27 +00:00
yury
af1ea62ff7 * i386-android: By default set CPU type to PentiumM and FPU to SSSE3 according to Android x86 ABI.
git-svn-id: trunk@33309 -
2016-03-21 09:53:18 +00:00
yury
cac16fa60e * Small refactor of the arm defaults for better readability.
git-svn-id: trunk@33307 -
2016-03-21 09:19:02 +00:00
florian
4e64fe77ac + define macros with information about the memory sizes of a MCU: FPC_FLASHBASE, FPC_FLASHSIZE, FPC_SRAMBASE, FPC_SRAMSIZE, FPC_EEPROMBASE, FPC_EEPROMSIZE, FPC_BOOTBASE, FPC_BOOTSIZE, resolves issue #29365
git-svn-id: trunk@33236 -
2016-03-13 15:50:55 +00:00
Jonas Maebe
741c91275a - removed "const" from first parameter of check_configfile(), because that
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 -
2016-03-07 19:58:59 +00:00
florian
1c067e96bf * fix VFPv4 support
git-svn-id: trunk@33182 -
2016-03-06 13:33:16 +00:00
florian
ddad3b3166 * allow very small heaps for avr
git-svn-id: trunk@33071 -
2016-02-07 18:28:13 +00:00
florian
fd61d65313 * handle controller type already in the first options pass_1
* set heapsize for the avrsim controller target to a reasonable size

git-svn-id: trunk@33068 -
2016-02-07 11:24:47 +00:00
nickysn
c2b0256869 - don't define 'CPU8086' on the i8086 target, because it clashes with the
selected instruction set define (CPU8086/CPU80186/CPU80286, etc.)
  For a generic i8086 target define, 'CPUI8086' should be used instead of
  'CPU8086'.

git-svn-id: trunk@33006 -
2016-01-26 00:33:02 +00:00
Károly Balogh
3675fc75cb VLink Support:
* fixed for MorphOS, added for Amiga/m68k
* enabled as default when running natively on these systems (cross still defaults to GNU LD)
* added -XV command line switch to enable/disable it
* dropped the 'fpc' prefix from vlink binary name on MorphOS

git-svn-id: trunk@32324 -
2015-11-15 01:18:30 +00:00
yury
36622eaba9 * arm-android: Compile for ARMv5T by default to be compatible with all versions of Android.
git-svn-id: trunk@32078 -
2015-10-17 16:27:53 +00:00
Jonas Maebe
2cf8e50771 * fixed unwanted disabling of a codepage set via -FcXXX/{$codepage XXX}
when {$modeswitch systemcodepage} gets disabled without having been
    enabled first (such as when initially setting the syntax mode)
    (mantis #28718)

git-svn-id: trunk@31831 -
2015-09-25 18:31:58 +00:00
yury
432248cbf1 * Removed lot of unused vars.
git-svn-id: trunk@31732 -
2015-09-17 12:48:58 +00:00
yury
67758f450e * Set ARMv6 as default CPU for arm-android to eliminate multi-threading issues on multi-core CPUs.
git-svn-id: trunk@31718 -
2015-09-16 16:11:36 +00:00
Jonas Maebe
c7aabaa3b6 - removed FPC_OBJFPC_EXTENDED_IF-related code, FPC 2.6.4 has it
git-svn-id: trunk@31696 -
2015-09-15 11:52:02 +00:00
Jonas Maebe
28bc3bb294 - removed FPC_STRTOSHORTSTRINGPROC-related checks, FPC 2.6.4 has it
git-svn-id: trunk@31695 -
2015-09-15 11:51:58 +00:00
Jonas Maebe
ad66b06222 - removed FPC_STRTOCHARARRAYPROC-related checks, FPC 2.6.4 had it
git-svn-id: trunk@31694 -
2015-09-15 11:51:55 +00:00
Jonas Maebe
9ab80874cc - removed FPC_REAL2REAL_FIXED-related checks, FPC 2.6.4 has it
git-svn-id: trunk@31693 -
2015-09-15 11:51:51 +00:00
Jonas Maebe
2afd8eb802 - removed FPC_HAS_STR_CURRENCY-related code, FPC 2.6.4 has it
git-svn-id: trunk@31692 -
2015-09-15 11:51:48 +00:00
Jonas Maebe
12030f904a - removed FPC_HAS_VALGRINDBOOL-related checks, FPC 2.6.4 has it
git-svn-id: trunk@31691 -
2015-09-15 11:51:45 +00:00
Jonas Maebe
1c2bac7608 - removed FPC_HAS_VARSETS-related checks, FPC 2.6.4 has it
git-svn-id: trunk@31690 -
2015-09-15 11:51:42 +00:00
Jonas Maebe
858fd37483 - removed FPC_HASINTERNALOLEVARIANT2VARIANTCAST-related checks, FPC 2.6.4
has it

git-svn-id: trunk@31689 -
2015-09-15 11:51:38 +00:00
Jonas Maebe
da6382db2a - removed FPC_HASFIXED64BITVARIANT-related checks, FPC 2.6.4 has it
git-svn-id: trunk@31688 -
2015-09-15 11:51:35 +00:00
Jonas Maebe
4494565a15 - removed RESSTRSECTIONS-related checks, FPC 2.6.4 has it
git-svn-id: trunk@31687 -
2015-09-15 11:51:32 +00:00
Jonas Maebe
4564bffb85 * use binutils 2.19+ linker script "augmentation" functionality to specify
how the fpc sections have to be linked *on Linux*. This prevents the
    "did you forget -T" warnings from ld, and in general is more correct than
    our previous approach of specifying a complete linker script without -T
    and hoping that there won't be any unexpected interactions with ld's
    built-in linker script (fixed version of r31664, thanks to Alan Modra)
   o use the new -X9 command line option to generate linker scripts that
     are compatible with binutils older than 2.19 (reverts to the old
     behaviour)

git-svn-id: trunk@31675 -
2015-09-14 07:24:54 +00:00
Jonas Maebe
e06a759e20 - reverted r31664, it causes crashes with some ld versions :/
git-svn-id: trunk@31670 -
2015-09-13 20:14:46 +00:00
Jonas Maebe
cd41bf672c * use binutils 2.19+ linker script "augmentation" functionality to specify
how the fpc sections have to be linked *on Linux*. This prevents the
    "did you forget -T" warnings from ld, and in general is more correct than
    our previous approach of specifying a complete linker script without -T
    and hoping that there won't be any unexpected interactions with ld's
    built-in linker script
   o use the new -X9 command line option to generate linker scripts that
     are compatible with binutils older than 2.19 (reverts to the old
     behaviour)

git-svn-id: trunk@31664 -
2015-09-13 19:06:14 +00:00
Jonas Maebe
c813e024ee * support non-section-based threadvars on the LLVM target
git-svn-id: trunk@31645 -
2015-09-12 23:33:14 +00:00
nickysn
bdfd23cc2e + new target switch "FarProcsPushOddBP", which causes the i8086 compiler to push
odd values of BP if the procedure is far. Enabled this by default for Win16.

git-svn-id: trunk@31569 -
2015-09-07 19:05:18 +00:00
nickysn
839ab714cc + started implementing a win16 target :)
git-svn-id: trunk@31521 -
2015-09-05 02:47:42 +00:00
nickysn
8458bbfaf6 + enabled the huge memory model command line option
git-svn-id: trunk@31495 -
2015-09-03 17:31:41 +00:00
Jonas Maebe
3f9f498e0d - removed leftover alpha, ia64 and vis code
git-svn-id: trunk@31446 -
2015-08-28 22:31:29 +00:00
Jonas Maebe
21066ba3f3 * changed LinkTypeSetExplicitly from a global variable into a field of toption
git-svn-id: trunk@31444 -
2015-08-28 22:31:21 +00:00
Jonas Maebe
0d74e4f719 * changed paratargetdbg from a global variable into a field of toption
git-svn-id: trunk@31443 -
2015-08-28 22:31:17 +00:00
Jonas Maebe
84bd523867 * changed paratargetasm from a global variable into a field of toption
git-svn-id: trunk@31442 -
2015-08-28 22:31:12 +00:00
Jonas Maebe
13638d958d * changed paratarget from a global variable into a field of toption
git-svn-id: trunk@31441 -
2015-08-28 22:31:08 +00:00
Jonas Maebe
7a8921a060 * define CPULLVM when using the LLVM backend (in addtion to the CPUXXX define
for the actual target architecture)

git-svn-id: trunk@31405 -
2015-08-24 22:06:50 +00:00
Jonas Maebe
2cf17c0487 * don't generate DWARF cfi when targeting LLVM, it will do that itself
git-svn-id: trunk@31343 -
2015-08-18 16:09:44 +00:00
Jonas Maebe
0d87df71a9 * default to ARMv7/VFPv3 for Darwin/ARM (since that's what most iOS devices
use nowadays)

git-svn-id: trunk@31302 -
2015-08-09 09:08:26 +00:00
florian
29ba426fcc * call DefaultReplacements for #WRITE and #INCLUDE, resolves #28315
git-svn-id: trunk@31263 -
2015-08-02 20:45:49 +00:00
florian
73c0422997 + create defines for CPU ALU size
git-svn-id: trunk@30441 -
2015-04-05 19:09:28 +00:00
Jonas Maebe
201121d7c9 * synchronised with trunk till r30345
git-svn-id: branches/hlcgllvm@30349 -
2015-03-28 12:28:15 +00:00
florian
3396e2e1f4 * interpret -daaa:=bbb after -Sm was passed as a macro definition, resolves #27529
git-svn-id: trunk@30271 -
2015-03-22 10:20:37 +00:00
Jonas Maebe
bd203a5b57 * synchronised with trunk till r30240
git-svn-id: branches/hlcgllvm@30241 -
2015-03-15 19:44:58 +00:00
Jonas Maebe
cc071ded4b * define _CALL_ELF=1 or _CALL_ELF=2 symbol when targeting ppc(64)
ELFv1/ELFv2, like GCC

git-svn-id: trunk@30195 -
2015-03-14 18:35:22 +00:00
Jonas Maebe
3946971c73 * default to ppc64le/elfv2 when compiling on a ppc64le platform
* default to elfv2 abi when targeting ppc64le and no abi has been specified

git-svn-id: trunk@30193 -
2015-03-14 18:35:16 +00:00
Jonas Maebe
d4bc74ecc0 * support for -WM10.XX (for 10.10) and defining the correct associated
version macro

git-svn-id: trunk@30178 -
2015-03-13 08:35:30 +00:00
Jonas Maebe
6a70c84258 + internal bsr/bsf support for ppc32 and ppc64
git-svn-id: trunk@30152 -
2015-03-09 16:48:34 +00:00
Jonas Maebe
67b8aceaee * synchronized with privatetrunk till r30095
git-svn-id: branches/hlcgllvm@30101 -
2015-03-05 20:32:15 +00:00
Tomas Hajny
1ecf8dcfa1 * improved paging of help pages so that lines are not missed with 80x25 windows due to lines overflowing the window width
git-svn-id: trunk@30026 -
2015-02-27 19:26:23 +00:00
Jonas Maebe
dcb6f2baae + print Darwin/AArch64-specific command line options in the help
git-svn-id: trunk@29981 -
2015-02-23 22:57:09 +00:00
Jonas Maebe
a8d05b66e2 + AArch64 internal bsf/bsr support
git-svn-id: trunk@29979 -
2015-02-23 22:57:02 +00:00
Jonas Maebe
0a0e74342f * AArch64 doesn't need the software int64 to double code
git-svn-id: trunk@29976 -
2015-02-23 22:56:53 +00:00
Jonas Maebe
b7fb862f4a * enable internal handling of abs(int64) on AArch64
git-svn-id: trunk@29975 -
2015-02-23 22:56:50 +00:00
Jonas Maebe
79a06b1514 + iphonesim/x86_64 target (64 bit iOS simulator)
git-svn-id: trunk@29970 -
2015-02-23 22:56:09 +00:00
Jonas Maebe
f421e83c9a - don't allow setting the OS X version (-WM) for Darwin/ARM or Darwin/AArch64
for now (it's all iOS)

git-svn-id: trunk@29969 -
2015-02-23 22:56:06 +00:00
Jonas Maebe
b0112fa63f + initial AArch64 support in systemh.inc, options.pas, version.pas and
psystem.pas

git-svn-id: trunk@29903 -
2015-02-23 22:52:04 +00:00
Jonas Maebe
665a5e509e * default iOS deployment version for AArch64 is iOS 7
git-svn-id: trunk@29894 -
2015-02-23 22:51:34 +00:00
Jonas Maebe
f886fe49d6 * only prepend the sysroot path to -Fl paths if these paths are absolute;
if they are not, they should be interpreted relative to the current
    directory instead (solves compiling tests that depend on a library
    when cross-testing for a platform with a sysroot)

git-svn-id: trunk@29825 -
2015-02-23 22:48:02 +00:00
florian
d20116cd07 * really set alignment as intended when -Os is passed
* align consts to 1 Byte boundaries on x86 as well

git-svn-id: trunk@29651 -
2015-02-08 11:22:17 +00:00
florian
bb01872821 + handle -CPPACKENUM and -CPPACKRECORD, resolves #27153
git-svn-id: trunk@29283 -
2014-12-13 21:08:18 +00:00
pierre
5c48eb2d96 Fix problem in handling of tf_pic_default
git-svn-id: trunk@29140 -
2014-11-23 22:05:42 +00:00
florian
a237648545 + handle -Cp in the first options processing pass
git-svn-id: trunk@29125 -
2014-11-23 17:30:18 +00:00
Tomas Hajny
75c61150d9 * option -m made conditional (-dPREPROCWRITE) like its processing
git-svn-id: trunk@29098 -
2014-11-21 13:52:10 +00:00
Tomas Hajny
fc17e318b0 * add some previously missing options to the help page, add support for listing recognized compiler and RTL features in -i and allow skipping an empty section (controllertypes) in -i listing by providing support of multiple output lines based on one source line in the msg file using $\n as newline
git-svn-id: trunk@29097 -
2014-11-21 13:03:24 +00:00
Tomas Hajny
3ee3542744 * boolean constant instead of IFDEFs for detection of microcontroller support
git-svn-id: trunk@29052 -
2014-11-10 12:34:59 +00:00
pierre
d9d5fd0647 Assume link native for AIX compiled binary
git-svn-id: trunk@29046 -
2014-11-09 22:21:45 +00:00
Tomas Hajny
f7e6ea56d9 * support for machine-parseable output of information in fpc -i plus improvements in help (including previously missing information for some less used platforms
git-svn-id: trunk@29032 -
2014-11-09 14:55:31 +00:00
sergei
ba324b1bf0 * Set default CPU type to cpu_pic32mx and FPU type to fpu_soft when compiling for mipsel-embedded, patch from Michael Ring.
git-svn-id: trunk@28692 -
2014-09-19 15:58:56 +00:00
Károly Balogh
739c66291d ARM: first naive attempt to get gprofiling work for arm-linux. (Work-In-Progress, but at least for me it doesn't explode)
git-svn-id: trunk@28645 -
2014-09-12 18:51:02 +00:00
Jonas Maebe
b18ba8e85b * syncrhonised with trunk up till r28471
git-svn-id: branches/hlcgllvm@28495 -
2014-08-19 20:23:11 +00:00
Károly Balogh
4431ba2c08 merged/updated AROS/i386 target to trunk from AROS branch, to support Marcus Sackrow's work on AROS support which will hopefully benefit all Amiga-like targets (classic, MorphOS) on the long run. Compiler only, RTL comes in the next run.
git-svn-id: trunk@28432 -
2014-08-17 18:18:07 +00:00
Jonas Maebe
5c75b6dd6b * synchronised with trunk up till r28402
git-svn-id: branches/hlcgllvm@28403 -
2014-08-13 16:04:30 +00:00
Jonas Maebe
082c81a191 * for now disable internal bsr/bsf for LLVM (can be implemented later
based on llvm.ctlz/cttz intrinsics)

git-svn-id: branches/hlcgllvm@28366 -
2014-08-10 19:40:03 +00:00
Jonas Maebe
575911dcb0 + support for (section-based) threadvars for LLVM
git-svn-id: branches/hlcgllvm@28352 -
2014-08-10 13:18:46 +00:00
Tomas Hajny
dfb44e1642 * improve identation of long options and add support for displaying parameter @
git-svn-id: trunk@28186 -
2014-07-08 22:30:43 +00:00
Jonas Maebe
7949bebb8d * synchronised with r28168 of trunk
git-svn-id: branches/hlcgllvm@28169 -
2014-07-05 21:30:28 +00:00
nickysn
ce87e72721 * show an error if the user attempts to create a dos .com file in an i8086
memory model other than tiny

git-svn-id: trunk@28081 -
2014-06-26 22:52:57 +00:00
sergei
04d8e8a5dc * On 64-bit targets, handle abs(int64) internally, using the same code as for abs(longint), i.e. without branching. Both generic and x86-specific pass 2 code is already suitable for different operand sizes, only type checking needs removal of excessive conversions to 32 bits.
git-svn-id: trunk@27989 -
2014-06-17 18:45:11 +00:00
nickysn
d7f9265eba * limit the stack size set by the -Cs option to 65520 bytes on i8086 and other
CPUs with a 16-bit address space

git-svn-id: trunk@27960 -
2014-06-14 22:48:09 +00:00
sergei
217ab9879c * Enabled internal handling of Abs(longint) for all targets. It has been implemented in cross-platform way ages ago (see tcginlinenode.second_abs_long), but not enabled on MIPS,SPARC and m68k.
- RTL: removed MIPS,SPARC and m68k-specific implementations of Abs(longint), and marked the generic one as  required for bootstrapping purposes only.

git-svn-id: trunk@27857 -
2014-06-05 10:35:51 +00:00
Jonas Maebe
bacd303208 * synchronized with trunk up to r27758
git-svn-id: branches/hlcgllvm@27779 -
2014-05-12 16:12:34 +00:00
florian
a6ad604207 * compilation fixed
git-svn-id: trunk@27771 -
2014-05-11 13:57:28 +00:00
florian
0bce584bae + set defines if fast fma is available
git-svn-id: trunk@27768 -
2014-05-11 12:15:27 +00:00
Jonas Maebe
724a6e9019 * fixed -Sx (mantis #25930)
git-svn-id: trunk@27697 -
2014-04-30 19:43:34 +00:00
nickysn
015c3269a7 * don't print a 'smart link requires external linker' warning in _any_ of the
following cases:
  1) external linking is already enabled
  2) target does not support an internal linker
  3) the 'omit linking stage' option is used

git-svn-id: trunk@27543 -
2014-04-12 08:19:23 +00:00
pierre
ca156aa64a Force external linker for nasm smartlinking
git-svn-id: trunk@27512 -
2014-04-10 15:02:04 +00:00
florian
b2b26f84cf * partially merged the mips-embedded branch of Michael Ring:
- startup code/controller units are not merged yet
  - assembler call does not pass the needed CPU type yet

git-svn-id: trunk@27188 -
2014-03-19 21:25:38 +00:00
Jonas Maebe
9420a5d7a7 * also check for targets not supporting -gc/checkpointer functionality in
compiler directives, not just on the command line (mantis #25862)

git-svn-id: trunk@27128 -
2014-03-13 20:42:18 +00:00
Jonas Maebe
e9268a0a14 * synchronised with trunk up till r26975
git-svn-id: branches/hlcgllvm@26976 -
2014-03-06 21:36:58 +00:00
nickysn
a7117a6157 + enabled the compact and large i8086 memory models (they don't work yet, so
that's why they're not added to the compiler help screen yet)

git-svn-id: trunk@26927 -
2014-03-02 19:26:49 +00:00