linker, because in OpenBSD 6.5, it has been replaced with the LLVM linker and
the LLVM linker produces broken position independent executables with FPC.
git-svn-id: trunk@42127 -
program/library also with -Clflto, all units compiled with that option
will be linked using their bitcode files and LTO
o compiling with -CLflto will compile all units twice: once for normal
(static or smart) linking, and once for LTO. So the result can be
used both with and without LTO.
git-svn-id: branches/debug_eh@41910 -
pass them to the linker so it does not reorder them
o fixes resource strings on Darwin when using LTO (this used to reorder the
resource string symbols, so they no longer all appeared between the START
and END symbols for their compilation module)
git-svn-id: trunk@41907 -
may now be used in fpc.cfg, etc. They evaluate to /usr/local and /usr/X11R6 by
default, but may optionally be overriden via the LOCALBASE and X11BASE
environment variables.
* use the new $OPENBSD_LOCALBASE and $OPENBSD_X11BASE variables in the default
library search path on OpenBSD
git-svn-id: trunk@41755 -
normal OpenBSD programs (not shared libraries) that link to the C library,
even when PIC code generation has been turned on. This is what gcc and clang
do on this platform.
git-svn-id: trunk@41740 -
because the sysinit unit name depends on whether libc is linked or not.
Helper function ModulesLinkToLibc copied from t_linux.pas
git-svn-id: trunk@41698 -
on OpenBSD, because that seems to be needed in order to produce a static
position independent executable in the correct format for that platform
git-svn-id: trunk@41668 -
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 -
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 -
* 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 -
(older) version of the parameter is still supported by current linker
versions, but the older version isn't supported by older linker
versions
git-svn-id: trunk@22954 -
rather than with single/double quotes depending on the target platform
(ld only supports double quotes), and rather than only quoting when
necessary (wastes time since quotes are always allowed, and double
quotes inside a directory name cannot be escaped for ld; they are
simply not supported by the program) (mantis #22059, follow-up to
r21069 and r21208)
git-svn-id: trunk@21343 -
that deal with paths/filenames with TPathStr (= ansistring) to prevent
cutting off long paths (no change in speed when compiling the compiler,
1% extra memory usage)
git-svn-id: trunk@21120 -