Commit Graph

681 Commits

Author SHA1 Message Date
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