link stdc++ (for physfs on linux) only when targetting 32bit 0.9.19
authorkoda
Tue, 26 Mar 2013 01:18:04 +0100
branch0.9.19
changeset 8926 8fde68cfeb71
parent 8924 13ac59499066
child 8927 3da5182d8682
link stdc++ (for physfs on linux) only when targetting 32bit (grafted from db108c85131501e1ac4ded2758f742836f83f4b5)
hedgewars/uPhysFSLayer.pas
--- a/hedgewars/uPhysFSLayer.pas	Sat Apr 20 02:20:15 2013 +0200
+++ b/hedgewars/uPhysFSLayer.pas	Tue Mar 26 01:18:04 2013 +0100
@@ -9,8 +9,17 @@
 {$IFNDEF WIN32}
     {$linklib physfs}
     {$linklib physlayer}
-    {$IFDEF DARWIN}
-        {$linkframework IOKit}
+
+    {statically linking physfs brings IOKit dependency on OSX and
+     stdc++ under linux 32 bit because divdi3 is not defined}
+    {$IFDEF PHYSFS_INTERNAL}
+        {$IFDEF DARWIN}
+            {$linkframework IOKit}
+        {$ELSE}
+            {$IFDEF CPU32}
+                {$linklib stdc++}
+            {$ENDIF}
+        {$ENDIF}
     {$ENDIF}
 {$ENDIF}