* always add the libgcc search directory under Linux, as it is required for

both the LLVM code generator and SEH support (it does _not_ force linking
    libgcc, just adds the search directory so it can be found in case it's
    required)

git-svn-id: trunk@44790 -
This commit is contained in:
Jonas Maebe 2020-04-18 15:44:53 +00:00
parent 468c8fb820
commit 218ca87a3f
5 changed files with 341 additions and 334 deletions

View File

@ -69,6 +69,10 @@ ifneq ($(findstring $(CPU_SOURCE),x86_64 mips mipsel),)
override FPCMAKEOPT+=-Cg
endif
endif
# also add GCCLIBDIR if specified
ifneq ($(GCCLIBDIR),)
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
[rules]
.NOTPARALLEL:

View File

@ -6781,8 +6781,10 @@ begin
Args.Add('-Fi'+AddPathPrefix(APackage,L[i]));
FreeAndNil(L);
// libc-linker path
if APackage.NeedLibC then
// libc-linker path (always for Linux, since required for LLVM and SEH; this does not
// force the linking of anything by itself, but just adds a search directory)
if APackage.NeedLibC or
(Defaults.OS=linux) then
begin
if FCachedlibcPath='' then
begin

File diff suppressed because it is too large Load Diff

View File

@ -1438,6 +1438,7 @@ endif
# Add GCC lib path if asked
ifdef GCCLIBDIR
override FPCOPT+=-Fl$(GCCLIBDIR)
override FPCMAKEOPT+=-Fl$(GCCLIBDIR)
endif
ifdef OTHERLIBDIR
override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))

View File

@ -1157,6 +1157,13 @@ implementation
Result:=true;
exit;
end;
{ for LLVM compiler support, and dwarf eh }
for c:=low(tcpu) to high(tcpu) do
if FIncludeTargets[c,o_linux] then
begin
Result:=true;
exit;
end;
for c:=low(tcpu) to high(tcpu) do
for t:=low(tos) to high(tos) do
if FIncludeTargets[c,t] then