瀏覽代碼

* 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 -

Jonas Maebe 5 年之前
父節點
當前提交
218ca87a3f
共有 5 個文件被更改,包括 259 次插入250 次删除
  1. 4 0
      packages/fpmkunit/Makefile.fpc
  2. 4 2
      packages/fpmkunit/src/fpmkunit.pp
  3. 243 248
      utils/fpcm/fpcmake.inc
  4. 1 0
      utils/fpcm/fpcmake.ini
  5. 7 0
      utils/fpcm/fpcmmain.pp

+ 4 - 0
packages/fpmkunit/Makefile.fpc

@@ -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:

+ 4 - 2
packages/fpmkunit/src/fpmkunit.pp

@@ -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
+ 243 - 248
utils/fpcm/fpcmake.inc


+ 1 - 0
utils/fpcm/fpcmake.ini

@@ -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))

+ 7 - 0
utils/fpcm/fpcmmain.pp

@@ -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

Some files were not shown because too many files changed in this diff