Commit Graph

196 Commits

Author SHA1 Message Date
florian
3498d78aad * make eabihf/eabi changeable at compilation time
git-svn-id: trunk@44706 -
(cherry picked from commit 9d7261a60b)
2023-04-06 22:02:58 +02:00
Pierre Muller
336d531687 Add /usr/lib64 and /lib64 to default library path list for sparc linux
(cherry picked from commit aca84a8128)
2022-10-05 22:15:45 +02:00
pierre
b64165e0eb Use default linker script and only add FPC specific sections for Linux OS
git-svn-id: trunk@47374 -
(cherry picked from commit bcd52d66ee)
2022-07-20 19:45:25 +00:00
florian
30c6cc295c * newer linux distros might have powerpc64 libraries in /usr/lib or /lib
git-svn-id: trunk@49182 -
(cherry picked from commit 0a99028128)
2021-08-24 00:00:01 +02:00
svenbarth
8a249b2d74 Merged revision(s) 44256-44257, 44746, 45329 from trunk:
* fix for Mantis #36706: only link a library against the dynamic loader if we're not linking against the C library anyway

Note: I did not yet find a case where we *do* need to link a library against the loader; this will have to be investigated further, but for 3.2.0 this is safest
........
* fix for Mantis #36738: when copying a record using its copy operator we assume that we've copied the whole record; this way managed records inside non-managed records are handled correctly
+ added (adjusted) test
........
* when checking for an existing operator overload for the assignment operator, check for the correct variant (explicit or not) matching the overload
+ added tests
........
* GetLoadErrorStr (currently) returns a ShortString, so avoid a useless conversion to AnsiString
........

git-svn-id: branches/fixes_3_2@47771 -
2020-12-13 21:52:13 +00:00
florian
d0f65b36ab --- Recording mergeinfo for merge of r39871 into '.':
U   .
--- Recording mergeinfo for merge of r42891 into '.':
 U   .
--- Merging r43167 into '.':
U    compiler/aarch64/cgcpu.pas
U    rtl/aarch64/aarch64.inc
--- Recording mergeinfo for merge of r43167 into '.':
 U   .
--- Recording mergeinfo for merge of r45788 into '.':
 G   .
--- Merging r46870 into '.':
U    rtl/linux/aarch64/sighnd.inc
U    rtl/linux/aarch64/sighndh.inc
--- Recording mergeinfo for merge of r46870 into '.':
 G   .
--- Merging r46872 into '.':
G    rtl/linux/aarch64/sighnd.inc
--- Recording mergeinfo for merge of r46872 into '.':
 G   .
--- Merging r46913 into '.':
U    compiler/systems/t_linux.pas
--- Recording mergeinfo for merge of r46913 into '.':
 G   .

git-svn-id: branches/fixes_3_2@47037 -
2020-10-03 09:22:40 +00:00
pierre
a037b1931e * Merge commit #46501
------------------------------------------------------------------------
r46501 | pierre | 2020-08-20 05:20:26 +0000 (Thu, 20 Aug 2020) | 1 line

 Also add platformopt to DllCmd[1], as done for ExeCmd[1]
------------------------------------------------------------------------
--- Merging r46501 into '.':
U    compiler/systems/t_linux.pas
--- Recording mergeinfo for merge of r46501 into '.':
 U   .

git-svn-id: branches/fixes_3_2@46680 -
2020-08-24 21:53:51 +00:00
florian
b3dbf75026 -- Zusammenführen von r43651 in ».«:
U    compiler/systems/t_linux.pas
-- Aufzeichnung der Informationen für Zusammenführung von r43651 in ».«:
 U   .

git-svn-id: branches/fixes_3_2@43652 -
2019-12-05 20:11:43 +00:00
florian
a3be76e22f -- Zusammenführen von r43570 in ».«:
U    compiler/systems/t_linux.pas
-- Aufzeichnung der Informationen für Zusammenführung von r43570 in ».«:
 U   .

git-svn-id: branches/fixes_3_2@43571 -
2019-11-24 12:19:23 +00:00
Jonas Maebe
153ddaffc9 --- Merging r43279 into '.':
U    compiler/cfileutl.pas
U    compiler/options.pas
U    compiler/systems/t_bsd.pas
C    compiler/systems/t_linux.pas
--- Merging r43302 into '.':
G    compiler/cfileutl.pas
--- Merging r43306 into '.':
G    compiler/cfileutl.pas
--- Merging r43312 into '.':
G    compiler/cfileutl.pas
G    compiler/options.pas
U    compiler/scandir.pas
U    compiler/systems/t_aix.pas
U    compiler/systems/t_beos.pas
G    compiler/systems/t_bsd.pas
U    compiler/systems/t_haiku.pas
C    compiler/systems/t_linux.pas
U    compiler/systems/t_macos.pas
U    compiler/systems/t_sunos.pas

git-svn-id: branches/fixes_3_2@43421 -
2019-11-09 10:59:39 +00:00
marco
89e051bac9 # revisions: 41828,41830,41831,41832,41833,41834,41835,41836,41837,41838,41839,41841,41842,42025,42031,42032,42033,42034,42035,42036,42065,42066,42067,42068,42069,42070,42071,42072,42073,42089,42150,42151,42181,42182,42183,42184,42185,42219,42220,42221,42222
git-svn-id: branches/fixes_3_2@43400 -
2019-11-05 16:17:53 +00:00
pierre
dee94698c6 ------------------------------------------------------------------------
r40905 | pierre | 2019-01-19 16:06:04 +0000 (Sat, 19 Jan 2019) | 1 line

 Also add /usr/lib/CPU-linux-gnu to link directory list for mips and mipsel
------------------------------------------------------------------------
--- Merging r40905 into '.':
U    compiler/systems/t_linux.pas
--- Recording mergeinfo for merge of r40905 into '.':
 U   .

git-svn-id: branches/fixes_3_2@41077 -
2019-01-26 21:02:52 +00:00
michael
f6867cbd63 * Patch by Cyrax to allow creating map file on linux (bug ID 33982)
git-svn-id: trunk@39449 -
2018-07-14 08:12:38 +00:00
pierre
6cab9fd7db Add replacement of $GCSECTIONS for shared libraries
git-svn-id: trunk@39403 -
2018-07-07 07:22:51 +00:00
marco
2a80eb3fdd * patch from #31920, pass gc-sections to .so's
git-svn-id: trunk@39392 -
2018-07-06 08:17:10 +00:00
florian
35d49f804c * search also the "lib" path variants on x86-64 if the "lib64" ones are not
found, some distros use lib instead of lib64 for x86-64

git-svn-id: trunk@38557 -
2018-03-17 21:58:24 +00:00
pierre
dcc6a20d22 Call RegisterTarget for system_x86_6432_linux_info
git-svn-id: trunk@37891 -
2018-01-02 16:52:41 +00:00
Károly Balogh
e6aed467b5 renamed script unit to cscript to avoid namespace conflict with univint package on Darwin. this makes it possible to build the textmode IDE on Darwin
git-svn-id: trunk@37598 -
2017-11-17 11:27:19 +00:00
florian
13801bebfe * pass debian specific path to c init files to ld for sparc64 as it is done on other targets as well
git-svn-id: trunk@36676 -
2017-07-07 22:33:42 +00:00
Károly Balogh
8a22807efa m68k: also add Debian's custom library path like on other CPUs
git-svn-id: trunk@36645 -
2017-07-04 22:51:08 +00:00
florian
ac16c90357 * linker command for sparc64-linux fixed
git-svn-id: trunk@36517 -
2017-06-18 15:45:32 +00:00
florian
21e5f99faa + some basic compiler support for sparc64-linux
git-svn-id: trunk@36418 -
2017-06-04 22:07:24 +00:00
florian
1f4432af6b * sparc64 compiler can be build, not working yet
git-svn-id: trunk@36399 -
2017-06-02 20:13:30 +00:00
Károly Balogh
1252aefb86 t_linux: whitespace and tab 2 space fix. no functional change.
git-svn-id: trunk@36370 -
2017-05-29 16:11:24 +00:00
florian
b1dff29cbf * removed unused units
git-svn-id: trunk@36165 -
2017-05-09 19:53:14 +00:00
florian
f274e316fe + search /usr/lib/powerpc-linux-gnu for powerpc startup files
git-svn-id: trunk@34365 -
2016-08-22 10:01:47 +00:00
Jonas Maebe
5cb2d10c9a * add aarch64 multi-arch library directory (patch by Edmund Grimley Evans)
git-svn-id: trunk@31981 -
2015-10-08 18:56:35 +00:00
Jonas Maebe
21d6b45020 * add i386 multi-arch library directory (patch by Edmund Grimley Evans)
git-svn-id: trunk@31980 -
2015-10-08 18:55:56 +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
4f38317bd2 * fixed small linker script syntax error in r31459
git-svn-id: trunk@31460 -
2015-08-30 15:45:57 +00:00
Jonas Maebe
6d29ad44f7 * always use a minimal linker script when we are not using -T, so that the
chance of conflicts with the built-in linkerscript is minimised
   o removed special case for AArch64 which that already
   o check the diff without whitespace changes, most is indentation

git-svn-id: trunk@31459 -
2015-08-30 15:25:44 +00:00
Jonas Maebe
6bb430e97c * also use the ARM/EABI linker script when targeting armhf
git-svn-id: trunk@31451 -
2015-08-29 13:00:03 +00:00
Jonas Maebe
882421a3ad * also use -T when cross-compiling a shared library using a sysroot on
Linux (we want to replace the entire built-in linker script in that case)

git-svn-id: trunk@31450 -
2015-08-29 12:26:12 +00:00
Jonas Maebe
e391a37b30 * add the sysrootpath to the path of the dynamic linker in the INPUT()
section for Linux

git-svn-id: trunk@31449 -
2015-08-29 12:26:08 +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
nickysn
d4a4b9a57b * refactored the internal linker ar object reader object creation to allow using
different 'ar' implementations under different platforms
* use the omflib reader instead of the ar reader in the msdos internal linker

git-svn-id: trunk@31322 -
2015-08-14 13:52:45 +00:00
Jonas Maebe
8628d50aba + Linux/AArch64 compiler support (patch by Edmund Grimley Evans)
git-svn-id: trunk@30893 -
2015-05-22 09:25:05 +00:00
Jonas Maebe
05f6660a25 * set the correct dynamic linker for the ppc64 ELFv2 abi
* specify the correct linker emulation to use for ppc64 ELFv2 little endian
  * specify the correct default library directories to search for ELFv2 little
    endian

git-svn-id: trunk@30194 -
2015-03-14 18:35:19 +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
marco
1b85962ef3 * put default libgcc path under if Dontlinkstdlibpath...
git-svn-id: trunk@29447 -
2015-01-12 10:34:39 +00:00
sergei
15ff2c1236 * m68k: Fixed name of ELF interpreter, and updated cprt0.as to somewhat working state. Now a "hello world" program using libc can be linked and launched, but anything more complex needs another round of fixing the parameter passing code, in order to get the stack properly balanced.
git-svn-id: trunk@28181 -
2014-07-07 20:08:50 +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
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
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
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