From owner-freebsd-ports Tue Feb 6 6:10: 6 2001 Delivered-To: freebsd-ports@freebsd.org Received: from m08.alpha-net.ne.jp (m08.alpha-net.ne.jp [210.229.64.38]) by hub.freebsd.org (Postfix) with ESMTP id 385C637B69F; Tue, 6 Feb 2001 06:09:42 -0800 (PST) Received: from kyoto-tc012-p61.alpha-net.ne.jp (kyoto-tc012-p61.alpha-net.ne.jp [210.237.119.189]) by m08.alpha-net.ne.jp (8.9.3/3.7W) with ESMTP id XAA15739; Tue, 6 Feb 2001 23:09:34 +0900 (JST) Received: from souffle.bogus-local.net (localhost [127.0.0.1]) by kyoto-tc012-p61.alpha-net.ne.jp (Postfix) with ESMTP id 54C6C16B3C; Tue, 6 Feb 2001 23:09:36 +0900 (JST) Date: Tue, 06 Feb 2001 23:09:35 +0900 Message-ID: <86vgqn7vj4.wl@cheerful.com> From: FUJISHIMA Satsuki To: Maxim Sobolev Cc: John Polstra , ports@FreeBSD.org, obrien@FreeBSD.org Subject: Re: Strange problems with dynamic linking of libGL.so.1 from XFree86-4.0.2_5 In-Reply-To: <3A755D84.266A80E7@FreeBSD.org> References: <3A6C3D19.E1F56291@FreeBSD.org> <3A6FE52B.AC9970C2@FreeBSD.org> <200101251842.f0PIgTL32394@vashon.polstra.com> <3A70756F.D8A7ED75@FreeBSD.org> <200101251903.f0PJ3qF32488@vashon.polstra.com> <3A755D84.266A80E7@FreeBSD.org> User-Agent: Wanderlust/2.4.0 (Rio) SEMI/1.13.7 (Awazu) FLIM/1.13.2 (Kasanui) Emacs/20.7 (i386--freebsd) MULE/4.1 (AOI) MIME-Version: 1.0 (generated by SEMI 1.13.7 - "Awazu") Content-Type: text/plain; charset=US-ASCII Sender: owner-freebsd-ports@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org At Mon, 29 Jan 2001 14:09:41 +0200, Maxim Sobolev wrote: > Also I've noted > that some ports linking with libGL now need -pthread linker flag for link to succeed > (x11-toolkits/gtkglarea for example), which is strange because libGL.so.1 is already > linked with -pthread and thus should have libc_r recorded as dependency in it, You missed here, libGL.so.1 doesn't have dependency on libc_r. cc -shared -pthread -o libGL.so.1 does nothing related -lc_r. (try cc -v) ==== LD_LIBRARY_PATH=../../exports/lib cc -v -o ./libGL.so.1.2~ -shared -rpath /usr/X11R6/lib -Wl,-soname,libGL.so.1 glx/clientattrib.o glx/compsize.o glx/dispatch.o glx/eval.o glx/g_render.o glx/g_single.o glx/g_vendpriv.o glx/glapi.o glx/glapi_x86.o glx/glapinoop.o glx/glthread.o glx/glxcmds.o glx/glxext.o glx/indirect_init.o glx/pixel.o glx/pixelstore.o glx/render2.o glx/renderpix.o glx/single2.o glx/singlepix.o glx/vertarr.o glx/xfont.o dri/XF86dri.o dri/dri_glx.o -pthread Using builtin specs. gcc version 2.95.3 20010101 (prerelease) /usr/libexec/elf/ld -m elf_i386 -rpath /usr/X11R6/lib -Bshareable -o ./libGL.so.1.2~ /usr/lib/crti.o /usr/lib/crtbeginS.o -L/usr/libexec/elf -L/usr/libexec -L/usr/lib -soname libGL.so.1 glx/clientattrib.o glx/compsize.o glx/dispatch.o glx/eval.o glx/g_render.o glx/g_single.o glx/g_vendpriv.o glx/glapi.o glx/glapi_x86.o glx/glapinoop.o glx/glthread.o glx/glxcmds.o glx/glxext.o glx/indirect_init.o glx/pixel.o glx/pixelstore.o glx/render2.o glx/renderpix.o glx/single2.o glx/singlepix.o glx/vertarr.o glx/xfont.o dri/XF86dri.o dri/dri_glx.o -lgcc -lgcc /usr/lib/crtendS.o /usr/lib/crtn.o ==== As libc_r does not have libc feature now, there's no reason to avoid linking -lc_r against shared libraries, I think. -- FUJISHIMA Satsuki Index: contrib/gcc.295/config/freebsd.h =================================================================== RCS file: /home/ncvs/src/contrib/gcc.295/config/freebsd.h,v retrieving revision 1.31 diff -u -r1.31 freebsd.h --- contrib/gcc.295/config/freebsd.h 2001/01/25 18:57:13 1.31 +++ contrib/gcc.295/config/freebsd.h 2001/02/06 08:54:23 @@ -76,10 +76,8 @@ (like the default, except no -lg, and no -p). */ #undef LIB_SPEC #define LIB_SPEC "\ - %{!shared: \ - %{!pg: %{pthread:-lc_r} -lc} \ - %{pg: %{pthread:-lc_r_p} -lc_p} \ - }" + %{!pg: %{pthread:-lc_r} %{!shared:-lc}} \ + %{pg: %{pthread:-lc_r_p} %{!shared:-lc_p}}" /************************[ Target stuff ]***********************************/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ports" in the body of the message