Hi,

On Wed, Jun 26, 2002 at 04:57:45PM +0200, Sheldon Hearn wrote:
>    Note that this isn't quite right, because the linking gets done with
>    cc as a front-end, not c++.  But the job gets done, all the same,
>    and I'm not writing a SharedDepCplusplusLibraryTarget rule myself.
>    :-)

How about:

--- config/cf/bsdLib.rules.orig Sun Jun 30 00:30:05 2002
+++ config/cf/bsdLib.rules      Sun Jun 30 00:31:06 2002
@@ -306,6 +306,34 @@
 
 #endif /* SharedDepLibraryTarget */
 
+/*
+ * SharedDepCplusplusLibraryTarget - generate rules to create a shared library.
+ */
+#ifndef SharedDepCplusplusLibraryTarget
+#define SharedDepCplusplusLibraryTarget(libname,rev,deplist,solist,down,up)    @@\
+AllTarget(Concat(lib,libname.so.rev))                                  @@\
+                                                                       @@\
+Concat(lib,libname.so.rev):  deplist                                   @@\
+       $(RM) $@~                                                       @@\
+       @SONAME=`echo $@ | sed 's/\.[^\.]*$$//'`; set -x; \             @@\
+               (cd down; $(CXX) -o up/$@~ $(SHLIBLDFLAGS) -Wl,-soname,$$SONAME solist 
+$(REQUIREDLIBS) BaseShLibReqs); \ @@\
+               $(RM) $$SONAME; $(LN) $@ $$SONAME; \                    @@\
+               LinkBuildSonameLibrary($$SONAME)                        @@\
+       $(RM) $@                                                        @@\
+       $(MV) $@~ $@                                                    @@\
+       $(RM) Concat(lib,libname.so)                                    @@\
+       $(LN) $@ Concat(lib,libname.so)                                 @@\
+       LinkBuildLibrary($@)                                            @@\
+       LinkBuildLibrary(Concat(lib,libname.so))                        @@\
+                                                                       @@\
+clean::                                                                        @@\
+       @SONAME=`echo Concat(lib,libname.so.rev) | sed 's/\.[^\.]*$$//'`; \ @@\
+       set -x; $(RM) $$SONAME                                          @@\
+       $(RM) Concat(lib,libname.so)                                    @@\
+       $(RM) Concat(lib,libname.so.rev)
+
+#endif /* SharedDepCplusplusLibraryTarget */
+
 #ifndef SharedDepModuleTarget
 #define SharedDepModuleTarget(name,deps,solist)                                @@\
 AllTarget(name)                                                                @@\

Just copied from the SharedDepLibraryTarget above it, and replaced the
CC with CXX...  I built libGLU.so.1 with this, and it seemed to fix the
glxinfo linking problem.  I'm currently testing...

Regards,
  -Jeremy

-- 
FreeBSD - Because the best things in life are free...
                                           http://www.freebsd.org/

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message

Reply via email to