[fpc-devel] fpc libraries do not work in freeBSD...

Fred van Stappen fiens at hotmail.com
Thu Aug 7 20:55:49 CEST 2014


Date: Wed, 6 Aug 2014 15:37:19 -0500
From: michal.wallace at gmail.com
To: fpc-devel at lists.freepascal.org
Subject: Re: [fpc-devel] fpc libraries do not work in freeBSD...

It looks like my old post had an error when I tried to copy and paste the text.The last line that is repeated 3 times should be three separate lines with anhave an offset for each variable.

For what it's worth, here is the actual patch I used. (I haven't re-tested ittoday. If it doesn't work, I would have originally used the latest version ofthe svn trunk on the day I posted, so you might try that...)

######### BEGIN PATCH ############################

diff --git a/rtl/freebsd/x86_64/dllprt0.as b/rtl/freebsd/x86_64/dllprt0.as
index 7213eae..2a68c6f 100644--- a/rtl/freebsd/x86_64/dllprt0.as+++ b/rtl/freebsd/x86_64/dllprt0.as@@ -68,8 +68,20 @@ _haltproc:
         movzwl  (%rbx),%edi         syscall         jmp     _haltproc at PLT-       /* Do not fail linkage if argc, argv and envp are not found. */-       .weak   operatingsystem_parameter_argc
-       .weak   operatingsystem_parameter_argv-       .weak   operatingsystem_parameter_envp+//     /* Do not fail linkage if argc, argv and envp are not found. */+//     .weak   operatingsystem_parameter_argc
+//     .weak   operatingsystem_parameter_argv+//     .weak   operatingsystem_parameter_envp
+/* Although these variables are useless, they actually do need to be declared
+ * to create shared libraries usable from other environments. (eg, python).+ */+operatingsystem_parameters:+        .skip 3*8++        .global operatingsystem_parameter_envp
+        .global operatingsystem_parameter_argc+        .global operatingsystem_parameter_argv+        .set operatingsystem_parameter_envp,operatingsystem_parameters+0+        .set operatingsystem_parameter_argc,operatingsystem_parameters+8
+        .set operatingsystem_parameter_argv,operatingsystem_parameters+16
########### END PATCH #############################
Hello Michal.

Many thanks to help us.

I will try your patch now.

Write you lat.

Fred
 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-devel/attachments/20140807/261954db/attachment.html>


More information about the fpc-devel mailing list