浏览代码

* Add support for libraries with C linking under Haiku
Patch by Olivier, mantis #28558

git-svn-id: trunk@31362 -

marco 10 年之前
父节点
当前提交
f59b88f6f8
共有 2 个文件被更改,包括 10 次插入1 次删除
  1. 6 0
      compiler/systems/t_haiku.pas
  2. 4 1
      rtl/haiku/Makefile.fpc

+ 6 - 0
compiler/systems/t_haiku.pas

@@ -251,7 +251,13 @@ begin
    begin
    begin
      linklibc:=true;
      linklibc:=true;
      cprtobj:='dllprt.o';
      cprtobj:='dllprt.o';
+   end
+  else if makelib then
+   begin
+     // Making a dll with libc linking. Should be always the case under Haiku.
+     cprtobj:='dllcprt0';
    end;
    end;
+   
 
 
   if linklibc then
   if linklibc then
    prtobj:=cprtobj;
    prtobj:=cprtobj;

+ 4 - 1
rtl/haiku/Makefile.fpc

@@ -6,7 +6,7 @@
 main=rtl
 main=rtl
 
 
 [target]
 [target]
-loaders=prt0 cprt0 func dllprt
+loaders=prt0 cprt0 dllcprt0 func dllprt
 units=system uuchar baseunix unixtype ctypes objpas macpas iso7185 strings \
 units=system uuchar baseunix unixtype ctypes objpas macpas iso7185 strings \
 #      beos \
 #      beos \
       errors dos dl \
       errors dos dl \
@@ -99,6 +99,9 @@ prt0$(OEXT) : $(CPU_TARGET)/prt0.as
 cprt0$(OEXT) : $(CPU_TARGET)/cprt0.as
 cprt0$(OEXT) : $(CPU_TARGET)/cprt0.as
         $(AS) -o $(UNITTARGETDIRPREFIX)cprt0$(OEXT) $(CPU_TARGET)/cprt0.as
         $(AS) -o $(UNITTARGETDIRPREFIX)cprt0$(OEXT) $(CPU_TARGET)/cprt0.as
 
 
+dllcprt0$(OEXT) : $(CPU_TARGET)/dllcprt0.as
+        $(AS) -o $(UNITTARGETDIRPREFIX)dllcprt0$(OEXT) $(CPU_TARGET)/dllcprt0.as
+
 func$(OEXT) : $(CPU_TARGET)/func.as
 func$(OEXT) : $(CPU_TARGET)/func.as
         $(AS) -o $(UNITTARGETDIRPREFIX)func$(OEXT) $(CPU_TARGET)/func.as
         $(AS) -o $(UNITTARGETDIRPREFIX)func$(OEXT) $(CPU_TARGET)/func.as