From owner-freebsd-current Fri Jan 7 17: 9:15 2000 Delivered-To: freebsd-current@freebsd.org Received: from canonware.com (canonware.com [207.20.242.18]) by hub.freebsd.org (Postfix) with SMTP id 37ABA1599D for ; Fri, 7 Jan 2000 17:09:12 -0800 (PST) (envelope-from jasone@canonware.com) Received: (qmail 17992 invoked by uid 1001); 8 Jan 2000 01:08:27 -0000 Date: Fri, 7 Jan 2000 17:08:27 -0800 From: Jason Evans To: Luoqi Chen Cc: current@FreeBSD.ORG Subject: Re: __sigisempty() undefined if "cc -g" used. Message-ID: <20000107170827.S4938@sturm.canonware.com> References: <200001080036.TAA05054@lor.watermarkgroup.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0i In-Reply-To: <200001080036.TAA05054@lor.watermarkgroup.com>; from luoqi@watermarkgroup.com on Fri, Jan 07, 2000 at 07:36:11PM -0500 Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Fri, Jan 07, 2000 at 07:36:11PM -0500, Luoqi Chen wrote: > > In an effort to chase down a libc_r bug, I compiled libc_r with CFLAGS=-g > > (and later CFLAGS=-g3), but ran into linker problems as a result. > > > > blitz:~> gcc poll.c -pthread > > /usr/lib/libc_r.so: undefined reference to `__sigisempty' > > > > Even the simplest of C programs will get this linker error if using the > > -pthread option. > > > > So, __sigisempty is an inline function, defined in > > /usr/include/sys/signalvar.h: > > > > extern __inline int > > __sigisempty(sigset_t *set) > > { > > int i; > > > > for (i = 0; i < _SIG_WORDS; i++) { > > if (set->__bits[i]) > > return (0); > > } > > return (1); > > } > > > It doesn't make much sense to have an "extern" inline function, gcc probably > was confused by this, change "extern" to "static" and try again. Yep, that fixed it. Thanks! I just committed the change. Jason To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message