Commit Graph

820 Commits

Author SHA1 Message Date
pierre
179390d63d Use script gnu ar for go32v2 target
git-svn-id: trunk@27515 -
2014-04-10 16:20:14 +00:00
pierre
62b3375033 Use slash instead of backslash inside linker script to allow use of cross-linker
git-svn-id: trunk@27509 -
2014-04-10 13:24:42 +00:00
nickysn
510fa9596f * add 'option quiet' to wlink to suppress its info messages
git-svn-id: trunk@27271 -
2014-03-24 18:13:29 +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
florian
2c5a0ffc89 * make windres the default resource compiler on x86_64-win64
git-svn-id: trunk@27041 -
2014-03-09 10:52:10 +00:00
pierre
7b359d06c4 Use GNU ar also for x86_64 solaris
git-svn-id: trunk@27022 -
2014-03-07 12:39:48 +00:00
Jeppe Johansen
e33550b67d Added support for X,Y,and Z register aliases plus low/high forms, and post-incrementation in AVR assembler reader.
Cleaned up parameter and funcretloc information generation in AVR paramanger, and made it closer to GCC's calling convention.
Fixed a number of codegenerator bugs generating invalid or broken instructions: CP operands were swapped, a number of instructions had immediate operands, and stack frame epilogue wasn't complete.
Added a bunch of peephole optimizations that clears the generated code up a lot.

git-svn-id: trunk@26925 -
2014-03-02 15:37:24 +00:00
Károly Balogh
0591caf022 have an explicit define for OS4, so we can easily identify it in shared sources among Amiga-like systems, independent from the CPU define
git-svn-id: trunk@26859 -
2014-02-23 23:49:40 +00:00
yury
e0c8a4701e * Fixed compilation for mips-linux.
git-svn-id: trunk@26732 -
2014-02-08 19:08:21 +00:00
yury
bb269e53ac * mipsel-android: Don't export local symbols from executable.
git-svn-id: trunk@26690 -
2014-02-06 19:11:08 +00:00
yury
56b3287e29 + Added compiler support for mipsel-android target.
git-svn-id: trunk@26686 -
2014-02-06 17:02:43 +00:00
pierre
9fc9f4bdba Use new as_i8086_nasmobj as external assembler for msdos target
git-svn-id: trunk@26549 -
2014-01-21 00:27:42 +00:00
pierre
2a6e592fba Handle link map for msdos wlink
git-svn-id: trunk@26461 -
2014-01-14 21:40:02 +00:00
Jonas Maebe
ca446b4b2a - removed registration of x86_6432 target because it's not supported in any
way by the compiler (and furthermore it would have to be registerd in an
    the x86_64 compiler binary, not an i386 one) (mantis #25525)

git-svn-id: trunk@26460 -
2014-01-14 20:37:18 +00:00
pierre
291124489f Use scripted version of wlib for go32v2 msdos smart library creation
git-svn-id: trunk@26444 -
2014-01-12 23:21:16 +00:00
Jeppe Johansen
d24cbbf9f5 Changed debug information to dwarf for ARM_embedded, and set local minimum alignment to 4.
Fixed a bug where ARMv7M targets would not use the DIV instructions.
Moved many size-optimizing Thumb2 peephole optimizations to PostPeepHoleOptsCpu. Previously those optimizations could make it impossible to reuse the shared arm peephole optimizations.
Reenabled a fixed MLA/MLS peephole optimization.
Refactored some FindRegDealloc+regLoadedWithNewValue into RegEndOfLife calls.
Fixed some broken UXTB/UXTH optimizations. Previously they would also match UXT* instructions with ROR shifter ops.

git-svn-id: trunk@26198 -
2013-12-08 16:50:15 +00:00
florian
4d5119bf1c * fixes several issues which cause warnings by the dfa code when using it to detect uninitialized variables
git-svn-id: trunk@26161 -
2013-12-01 17:02:08 +00:00
florian
c357212b45 + search crt* files also in /usr/lib/x86_64-linux-gnu, multiarch supporting distros require this
git-svn-id: trunk@26158 -
2013-12-01 15:39:05 +00:00
Károly Balogh
34702dbfc5 fixed staticlibprefix for Amiga and MorphOS
git-svn-id: trunk@26127 -
2013-11-24 04:19:59 +00:00
Károly Balogh
da3603e663 introduce HASAMIGA define to easily identify various Amiga flavors (similarly to HASUNIX)
git-svn-id: trunk@26123 -
2013-11-24 01:19:52 +00:00
nickysn
12b1e0cbfd + tell wlink to add dwarf debug info to the executable when -gw2/3/4 is used
git-svn-id: trunk@25874 -
2013-10-27 20:30:00 +00:00
paul
d16606b04c compiler: revert r25852 since 10.9 is already handled
git-svn-id: trunk@25864 -
2013-10-27 14:17:29 +00:00
florian
de2e4632c5 * if a build-id is generated, put it into flash
git-svn-id: trunk@25853 -
2013-10-26 14:19:14 +00:00
paul
43b9308929 compiler: also skip crt1.o for osx 10.9
git-svn-id: trunk@25852 -
2013-10-26 13:36:40 +00:00
Jonas Maebe
40eafc3d82 * don't try to post-process embedded executables when linking is
disabled

git-svn-id: trunk@25851 -
2013-10-26 10:01:05 +00:00
Jonas Maebe
a28917086b * updated *crt1* linking logic for OS X 10.8+:
o don't link by default
   o when generating profiling info, link gcrt1.o and specify "-no_new_main"
     linker parameter
  * don't use version-specific crt1.o files when targetting the
    iPhoneSimulator platform
  * don't link a crt1.o file when targetting iOS 6 or later
  (all info from
   http://llvm.org/svn/llvm-project/cfe/trunk/lib/Driver/Tools.cpp )

git-svn-id: trunk@25789 -
2013-10-14 21:38:38 +00:00
florian
304d7ef7a1 * restores atari support/rtl partially
git-svn-id: trunk@25699 -
2013-10-06 19:36:59 +00:00
nickysn
96a4f8e43b * the staticlibext for i8086-msdos changed from .lib to .a; rationale:
1) less special cases needed in fpmkunit for i8086-msdos
  2) consistency with the naming scheme on the go32v2 target
  3) we didn't follow the DOS naming scheme completely anyway, e.g. we used .o
     for object files, instead of .obj

git-svn-id: trunk@25641 -
2013-10-05 10:01:59 +00:00
marco
2a9916baba * fix mantis #25129 for non OS X BSD systems. Patch by A. Cardenas Marquez
- crtbegin and crtend suffix handling
     - crti before crtbegin

git-svn-id: trunk@25620 -
2013-10-02 09:05:32 +00:00
nickysn
a48b44cfe5 + added a new tsystemflag tf_cld, which indicates that ts_cld should be enabled
by default on this target
+ tf_cld enabled for i8086-msdos (for Turbo Pascal compatibility)

git-svn-id: trunk@25595 -
2013-09-28 14:57:12 +00:00
Jonas Maebe
2c664ac6ae * fix compatibility with new Package Management system under Haiku
(patch by Olivier Coursiere, mantis #25051)

git-svn-id: trunk@25573 -
2013-09-25 20:57:41 +00:00
nickysn
52a5ffc386 * use apptype to indicate that the target is a DOS .COM file, instead of introducing a new field in tsettings (as suggested by Sven)
git-svn-id: trunk@25544 -
2013-09-24 12:13:47 +00:00
nickysn
567cdf875b + added new i8086 compiler options -Wtexe and -Wtcom for specifying the MS-DOS
binary format (.exe or .com)
* the default format for i8086 tiny model binaries changed to .exe

git-svn-id: trunk@25528 -
2013-09-21 16:44:14 +00:00
Jonas Maebe
1af312c129 * don't overwrite result of librarysearchpath.FindFile() in
GetDarwinPrtobjName() if it found something

git-svn-id: trunk@25330 -
2013-08-22 21:37:06 +00:00
Jonas Maebe
528f5d1096 * initialise result of GetDarwinPrtobjName() in case GetDarwinCrt1ObjName()
returns an empty string

git-svn-id: trunk@25328 -
2013-08-22 19:55:57 +00:00
Jonas Maebe
4ec9ec2009 + PIC support for Darwin/ARM:
o does not use GOT
   o enabled by default like for other Darwin platforms
  - removed Darwin/ARM call stub support: no longer needed with current
    Xcode versions (at least Xcode 4.2+), and we didn't support PIC
    in them yet

git-svn-id: trunk@25325 -
2013-08-22 08:14:24 +00:00
florian
6606955b88 + basic support for pic on arm-linux
git-svn-id: trunk@25297 -
2013-08-19 21:35:37 +00:00
sergei
38058505ba * Changed linking infrastructure to look like assembler one:
* Changed direct references to linker classes in TSystemInfo records to enumerated ids.
  * RegisterExtennalLinker and RegisterInternalLinker procedures replaced by single RegisterLinker procedure and moved to link.pas.
  - TAbstractLinker is no longer necessary, removed.

This change allows to register linker once per id, rather than once per target, and also allows TSystemInfo records to be read-only.

git-svn-id: trunk@25279 -
2013-08-18 12:01:21 +00:00
sergei
eec8129738 * TInternalLinker.Load_ReadStaticLibrary: exit if error has occurred while opening a static library or dynamic object, continuing can cause other errors/crashes in this case.
* t_linux.pas: use sysrootpath when specifying dynamic interpreter (for cross-linking).

git-svn-id: trunk@25277 -
2013-08-18 09:14:16 +00:00
sergei
1f8a67f552 + Property TObjSymbol.ObjData, allows to access owning TObjData for external/common symbols, i.e. ones with ObjSection=nil.
* For common symbols, report objdata of the original ObjSymbol, not of the resolving one, so the map file shows where it comes from.
+ TElfExeOutput.OrderOrphanSections method, handles object sections not mentioned in script similar to ld.
- t_linux.pas: removed sections that are not part of ld scripts, they are now handled by OrderOrphanSections.

git-svn-id: trunk@25184 -
2013-07-30 09:23:48 +00:00
sergei
dddc78514d * Internal ELF linker: for MIPS targets, place .got section after .data. This corresponds to behavior of ld, and reduces amount of processing when adding GOT slots for local symbols (which requires re-doing layout for all sections that come after .got)
git-svn-id: trunk@25154 -
2013-07-21 13:10:57 +00:00
pierre
277ae481b8 Add passing of -k option to linker for msdos and go32v2 targets
git-svn-id: trunk@24981 -
2013-06-26 22:27:16 +00:00
nickysn
f5a9442910 + added the appropriate startup code names for each memory model
git-svn-id: trunk@24832 -
2013-06-09 12:44:03 +00:00
nickysn
e28852d07d * prt0 startup code file for small model renamed to prt0s
git-svn-id: trunk@24809 -
2013-06-05 16:41:39 +00:00
nickysn
b409d600ee + implemented the tiny memory model for i8086-msdos; we now produce working dos .com files as well
git-svn-id: trunk@24793 -
2013-06-02 23:02:10 +00:00
Károly Balogh
af1f84892c try to do VLink support semi-properly, so cross compilation is possible
git-svn-id: trunk@24664 -
2013-05-31 13:04:44 +00:00
Jonas Maebe
b16677a75b * only pass --gc-sections to the linker if smart linking is enabled
(mantis #24396)

git-svn-id: trunk@24465 -
2013-05-07 20:28:54 +00:00
marco
09e742f243 * add a -dfpc define to the resource compiler commandlines, which allows to make FPC specific exceptions in resource scripts. Mantis #24044
git-svn-id: trunk@24438 -
2013-05-04 21:25:36 +00:00
svenbarth
930b76e8fb Fix compilation of WinCE. Change the fixed UNICODE define of WinCE to FPC_OS_UNICODE, so that it won't be undefined when changing the mode/string type and that the usage of a UNICODE API is independant of the mode.
Also adjusted all Windows (Win32/64/CE) units to define a "UNICODE" if "FPC_OS_UNICODE" is defined (except the Jedi units).
Also the common RTL units that checked for UNICODE now check for FPC_OS_UNICODE.

git-svn-id: trunk@24420 -
2013-05-04 11:06:32 +00:00
florian
5e0585c0d0 + introduce tf_no_objectfiles_when_smartlinking so object file generation on i8086-msdos can be turned off
* object file generation on i8086-msdos can be turned off if smartlinking is enabled

git-svn-id: trunk@24396 -
2013-04-30 19:11:55 +00:00