Commit Graph

88 Commits

Author SHA1 Message Date
Jonas Maebe
7c594b0288 + added support for using Clang as an assembler, and make it the default
for all non-ppc(32/64) Darwin platforms
   o pass the macosx-version-min/iphoneos-version-min to clang as an assembler,
     so that it properly sets this information starting with Xcode 7 (solves
     errors when targeting the iOS simulator, and warnings about object files
     being compiled for a different OS X version when targeting (Mac) OS X)
   o the old assembler is still selectable via -Aas-darwin (required with
     Xcode 3.1.x and older)
   o since the first Xcode version that shipped with Clang is Xcode 3.2, which
     is available for Mac OS X 10.6, most users should not encounter any issues
     with the new default (in fact, it fixes some tests for x86 because Clang
     supports some instructions that "as" doesn't). Clang does not support
     Stabs however, so -gs does require the use of -Aas-darwin

git-svn-id: trunk@31830 -
2015-09-25 18:31:54 +00:00
Jonas Maebe
8155d759dc - reverted r31806, it breaks building on non-Darwin (mantis #28716)
git-svn-id: trunk@31807 -
2015-09-24 06:44:12 +00:00
Jonas Maebe
c0b451e788 - removed as_darwin, since there is no difference with as_gas (there is no
GNU as from binutils for Darwin, and Apple's "as" is based on an old
    version of GNU as)
   o this will not cause any backward compatibility problems, as the
     previous identifier for as_darwin was "AS-Darwin" and the compiler
     compared the uppercase value of the -A parameter to the identifier,
     so it was not explicitly selectable earlier. The new name is "AS",
     so it is explicitly selectable via -Aas like on other platforms.

git-svn-id: trunk@31806 -
2015-09-23 21:25:38 +00:00
Jonas Maebe
f05d573391 * changed default debug format for Darwin/i386 from Stabs to DWARF2, as the
oldcctools are no longer shipped with Xcode 7 and Clang assembler doesn't
    support Stabs (and DWARF2 has been working better than Stabs since a long
    time already)

git-svn-id: trunk@31774 -
2015-09-22 12:55:59 +00:00
nickysn
7ff6c2a675 - rm tf_smartlink_library from targets that define tf_smartlink_sections, since
in certain places, the code in the compiler assumes that only one of the two
  is defined, resulting in libraries with missing externals when both are
  defined and there's no much point in supporting both anyway, since section
  based smartlinking achieves the same thing (in a better way) on these
  platforms.

git-svn-id: trunk@30668 -
2015-04-19 18:47:44 +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
165aaea8a4 * made a separate abi entry for powerpc_darwin, as it's not exactly the same
as the AIX abi (especially on ppc64)
   o replaced (for now) all checks for the AIX abi with a check for either the
     AIX or Darwin abi
   o changed the ABI of Darwin/ppc, Darwin/ppc64 and Mac OS/ppc to
     abi_powerpc_darwin

git-svn-id: trunk@30202 -
2015-03-14 18:35:44 +00:00
Jonas Maebe
67b8aceaee * synchronized with privatetrunk till r30095
git-svn-id: branches/hlcgllvm@30101 -
2015-03-05 20:32:15 +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
493b11da06 + Darwin/aarch64 system definition
git-svn-id: trunk@29877 -
2015-02-23 22:50:41 +00:00
marco
2578514853 * first dragonfly patch (existing most). Mantis #27091
git-svn-id: trunk@29213 -
2014-12-07 20:27:02 +00:00
pierre
016666c70f Use pic code by default for x86_64-openbsd
git-svn-id: trunk@29138 -
2014-11-23 22:04:30 +00:00
pierre
82b99d09bd Add tf_smartlink_sections for i386-bsd target
git-svn-id: trunk@29137 -
2014-11-23 22:01:25 +00:00
Jonas Maebe
9573160c1a + llvmdatalayout field for tsysteminfo that contains the encoded data layout
as used by llvm for most targets (taken from clang, adapted in some cases
    where we use a custom stack alignment)

git-svn-id: branches/hlcgllvm@26032 -
2013-11-11 11:14:55 +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
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
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
florian
0e41df598e * merge i8086 branch by Nikolay Nikolov
git-svn-id: trunk@24324 -
2013-04-25 20:23:51 +00:00
marco
e6dc52bac8 * enable sections smartlinking for *BSD, seems to work nowadays.
git-svn-id: trunk@24304 -
2013-04-22 18:03:28 +00:00
nickysn
3a4135c07b ifdef cpu86 replaced with ifdef cpui386
git-svn-id: branches/i8086@23709 -
2013-03-07 22:21:27 +00:00
Jonas Maebe
bd31004fdb + describe for each supported target the default guaranteed stack alignment
git-svn-id: trunk@22278 -
2012-09-02 14:32:12 +00:00
pierre
f0afaef920 Use linux/i386 aligmnents for NetBSD/OpenBSD i386
git-svn-id: trunk@20937 -
2012-04-20 12:09:41 +00:00
pierre
34a4ee46ff Use elf32 binary writer for i386 netbsd target
git-svn-id: trunk@20776 -
2012-04-09 22:00:54 +00:00
pierre
d5dd980efe + Add system_x86_64_ntbsd_info record
git-svn-id: trunk@20731 -
2012-04-06 22:03:37 +00:00
pierre
7dfbc38c68 Mark x86_64 openbsd system as under development
git-svn-id: trunk@20727 -
2012-04-06 21:21:15 +00:00
pierre
7e71e1d3a0 + Add system_x86_64_openbsd_info record
git-svn-id: trunk@20715 -
2012-04-05 21:06:56 +00:00
Jonas Maebe
86265534d0 * fixed misplaced endif that caused the default target not be set when
(hypothetically) running the compiler on Darwin/ARM

git-svn-id: trunk@20662 -
2012-03-29 20:54:38 +00:00
pierre
5b71a7597a i386 NetBSD uses GOT for position independent code
git-svn-id: trunk@20353 -
2012-02-15 13:08:49 +00:00
pierre
0f1a4f94af Modern i386 NetBSD has no underscore prefix, but since when?
git-svn-id: trunk@20292 -
2012-02-09 17:37:40 +00:00
pierre
98c7a5e4b0 * Enable internal elf writer for freebsd x86_64 target
git-svn-id: trunk@19608 -
2011-11-08 14:05:57 +00:00
pierre
4601bca836 * i386 OpenBSD target also uses GOT for pic code
git-svn-id: trunk@19450 -
2011-10-10 21:44:44 +00:00
pierre
94eea3eca7 * Fix source info for openbsd
git-svn-id: trunk@19412 -
2011-10-08 09:53:46 +00:00
pierre
4a8b37016a i386-OpenBSD 4.9 has no underscore prefix
git-svn-id: trunk@19377 -
2011-10-04 22:33:13 +00:00
Jonas Maebe
ec8c7b4888 + when compiling for Darwin/ARM, pass the subarchitecture to the linker.
The old linker option to accept object files from all subarchitecture
    types no longer works.
  + support for subarchitectures in fcl-res/fpcres

git-svn-id: trunk@18070 -
2011-08-02 20:41:39 +00:00
Jonas Maebe
8b0301409a + i386/iphonesim target for the new iPhoneSimulator in Xcode 3.2.4 and
later: the same as i386/darwin, except
      a) uses the non-fragile Objective-C ABI/runtime
      b) does not require stubs for direct calls/jumps (not required for
         i386/darwin under 10.6 and later either, but still generated
         there for backwards compatibility)
      c) only the same packages are enabled as for ARM/Darwin
      d) MacOSAll is compiled specifically for the iPhoneSimulator SDK
    This target also defines the symbol "darwin" apart from the target
    name "iphonesim" for source code compatibility reasons.

git-svn-id: trunk@16065 -
2010-09-29 21:56:47 +00:00
Jonas Maebe
48d7c69aab * set maxCrecordalign to 16 for all x86_64 platforms that follow the
official ABI (records containing a C long double require 16 byte
    alignment)

git-svn-id: trunk@15367 -
2010-06-03 20:02:06 +00:00
Jonas Maebe
b6e4896805 * small typo corrections by Adriaan Van Os (mantis #15652)
git-svn-id: trunk@14844 -
2010-02-02 10:41:38 +00:00
Jonas Maebe
b4058a57ad * maxcrecordalign for darwin/ppc64 is 4 instead of 8 (at least for the types
that we support), fixes webtbs/tw15061a.pp on darwin/ppc64
  * webtbs/tw15061a.pp is only for darwin/ppc and darwin/ppc64

git-svn-id: trunk@14582 -
2010-01-09 11:22:33 +00:00
Jonas Maebe
b4c8c73e70 * changed tf_use_function_relative_addresses into an assembler flag (with
the opposite meaning, af_stabs_use_function_absolute_addresses), because it
    is different on Darwin for the internal and external assembler)

git-svn-id: trunk@14342 -
2009-12-06 13:21:28 +00:00
Jonas Maebe
877c024d4e * added tf_requires_proper_alignment for Darwin/ARM, fixes webtbs/tw7391.pp
with VFP

git-svn-id: trunk@14329 -
2009-12-04 19:56:00 +00:00
Tomas Hajny
54f3d28ce8 * prefix for import libraries now configurable rather than hardcoded, plus fixed issue with name of OS/2 import libraries
git-svn-id: trunk@12727 -
2009-02-09 00:01:15 +00:00
florian
24fe46b3a3 + missing includes of fpcdefs.inc added
git-svn-id: trunk@11916 -
2008-10-18 14:07:42 +00:00
Jonas Maebe
253ae0c33e * changed abi for darwin/arm from eabi to default, as it appears to be
more closely related to the old abi
  * make sure softfloat is still default for darwin/arm after this change

git-svn-id: trunk@11861 -
2008-10-04 14:06:09 +00:00
Jonas Maebe
d4c2f52090 * disabled pic default for arm/darwin (pic isn't supported yet for arm)
git-svn-id: trunk@11852 -
2008-10-02 21:32:53 +00:00
Jonas Maebe
afa14de20d + some generic changes preparing for darwin/arm support
git-svn-id: trunk@11849 -
2008-10-02 15:10:13 +00:00
florian
9fb21f5c9b * target flags for x86_64-freebsd fixed
* use external assembler on x86_64-freebsd for now because dwarf doesn't work with the internal one

git-svn-id: trunk@11769 -
2008-09-13 15:50:32 +00:00
michael
174de3eab1 Merged revisions 9693-10480 via svnmerge from
svn+ssh://svn.freepascal.org/FPC/svn/fpc/branches/resources

........
  r9694 | michael | 2008-01-09 21:31:18 +0100 (Wed, 09 Jan 2008) | 1 line
  
  * Initial check-in
........
  r9695 | michael | 2008-01-09 21:35:58 +0100 (Wed, 09 Jan 2008) | 1 line
  
  * New version from Giulio Bernardi
........
  r9697 | michael | 2008-01-09 21:41:54 +0100 (Wed, 09 Jan 2008) | 1 line
  
  * Patch from Giulio Bernardi with resource support
........
  r9698 | michael | 2008-01-09 21:46:33 +0100 (Wed, 09 Jan 2008) | 1 line
  
  * Patch from Giulio Bernardi to add more resource testing
........
  r9699 | michael | 2008-01-09 21:57:26 +0100 (Wed, 09 Jan 2008) | 1 line
  
  * New tool from Giulio Bernardi
........
  r9700 | michael | 2008-01-09 21:58:23 +0100 (Wed, 09 Jan 2008) | 1 line
  
  * New tool from Giulio Bernardi
........
  r9701 | michael | 2008-01-09 22:01:54 +0100 (Wed, 09 Jan 2008) | 1 line
  
  * Added fcl-res
........
  r9702 | michael | 2008-01-09 22:01:58 +0100 (Wed, 09 Jan 2008) | 1 line
  
  * Added fcl-res
........
  r9703 | michael | 2008-01-10 08:54:26 +0100 (Thu, 10 Jan 2008) | 1 line
  
  * Fixed double code
........
  r9704 | jonas | 2008-01-10 10:59:20 +0100 (Thu, 10 Jan 2008) | 2 lines
  
    - removed duplicate code
........
  r9705 | jonas | 2008-01-10 11:25:21 +0100 (Thu, 10 Jan 2008) | 2 lines
  
    + added missing fcl-res dependencies
........
  r9706 | jonas | 2008-01-10 11:58:30 +0100 (Thu, 10 Jan 2008) | 2 lines
  
    + dependencies for fpintres and fpextres
........
  r9707 | yury | 2008-01-10 12:47:51 +0100 (Thu, 10 Jan 2008) | 3 lines
  
  * Fixed compilation of resource, which is included in a unit located in different folder than main source.
  * .res files must be copied to units output folder, otherwise .res files will not be found when only compiled units path is available and compiler does not know anything about sources folder.
  * Improved resource related error messages.
........
  r9708 | michael | 2008-01-10 12:52:13 +0100 (Thu, 10 Jan 2008) | 1 line
  
  * Removed double source after end.
........
  r9709 | michael | 2008-01-10 12:52:48 +0100 (Thu, 10 Jan 2008) | 1 line
  
  * No longer needed
........
  r9710 | tom_at_work | 2008-01-10 22:09:08 +0100 (Thu, 10 Jan 2008) | 1 line
  
  * properly align FPC_RESLOCATION so that linking does not fail on some architectures (e.g. ppc64)
........
  r9711 | tom_at_work | 2008-01-10 23:53:12 +0100 (Thu, 10 Jan 2008) | 1 line
  
  * fix splitting of 64 bit load/stores from/to unaligned memory locations into multiple load/stores, which in some cases generated wrong code
........
  r9712 | michael | 2008-01-11 11:00:08 +0100 (Fri, 11 Jan 2008) | 1 line
  
  * Fixed bug in BSS section on 64-bit platforms
........
  r9720 | giulio | 2008-01-12 10:02:04 +0100 (Sat, 12 Jan 2008) | 1 line
  
  Updated fcl-res documentation: occurrences of reslib changed to fcl-res.
........
  r9740 | giulio | 2008-01-13 19:36:44 +0100 (Sun, 13 Jan 2008) | 3 lines
  
   - Don't try to compile resources on systems with a non windows-like resource support.
   - Don't add the .or file to the list of object files if resource compiling failed.
........
  r10201 | giulio | 2008-02-04 11:35:44 +0100 (Mon, 04 Feb 2008) | 5 lines
  
  * resource compiling supported on OS/2 via wrc
  * CompileResourceFiles and CollectResourceFiles don't do target-specific checks anymore
  * refactored a bit
........
  r10389 | giulio | 2008-02-25 21:32:52 +0100 (Mon, 25 Feb 2008) | 2 lines
  
  Deleted test file which was committed by mistake
........
  r10472 | giulio | 2008-03-10 12:22:18 +0100 (Mon, 10 Mar 2008) | 2 lines
  
  changed define FPC_HAS_RESOURCES to FPC_HAS_WINLIKERESOURCES
........

git-svn-id: trunk@10481 -
2008-03-12 21:33:48 +00:00
Jonas Maebe
032352d98b + darwin/x86_64 support
git-svn-id: trunk@9180 -
2007-11-10 18:33:09 +00:00
Jonas Maebe
920a626c17 * mark darwin as case sensitive, because the dircache isn't always used
anymore (the dircache masks the effects of case-sensitive file
    systems on targets marked as case-aware)

git-svn-id: trunk@8946 -
2007-10-26 13:01:01 +00:00
Jonas Maebe
1121002c7c * generate PIC by default for darwin/ppc64
git-svn-id: trunk@8873 -
2007-10-21 10:36:05 +00:00