From owner-freebsd-ports@FreeBSD.ORG Tue Feb 10 14:36:27 2004 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5BDD716A4CE for ; Tue, 10 Feb 2004 14:36:27 -0800 (PST) Received: from mailhost.stack.nl (vaak.stack.nl [131.155.140.140]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3103743D31 for ; Tue, 10 Feb 2004 14:36:27 -0800 (PST) (envelope-from marcov@stack.nl) Received: from toad.stack.nl (zen.stack.nl [2001:610:1108:5010::130]) by mailhost.stack.nl (Postfix) with ESMTP id 40295CE9#EF2BF1F373 for ; Tue, 10 Feb 2004 23:36:25 +0100 (CET) Received: by toad.stack.nl (Postfix, from userid 816) id C6F4C83; Tue, 10 Feb 2004 23:36:25 +0100 (CET) To: freebsd-ports@freebsd.org Date: Tue, 10 Feb 2004 23:36:25 +0100 (CET) X-Mailer: ELM [version 2.4ME+ PL88 (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII Message-Id: <20040210223625.C6F4C83@toad.stack.nl> From: marcov@stack.nl (Marco van de Voort) Subject: How to determine which pthread, was: Re: last libc_r dependenciesleft on current X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Feb 2004 22:36:27 -0000 (Oops, sorry Fritz, now to the list :-) > after removing libc_r.so and rebuilding my ports (gettext port upgrade) > there here are three ports left with "hardcoded" libc_r dependency and > therefore failed to build: > > x11-toolkits/qt32, lang/gcc34 (not so important) and java/jdk13 Btw, lang/fpc-devel (and to a lesser degree lang/fpc) are not libc_r dependant themselves, but generate libc_r programs when language threading is used. I'll fix this in the coming weeks, but rather like to do this runtime. How can I detect (in a non C/libc program, iow without using headers or libraries, so in the general FreeBSD environment), whether I should pass -lc_r to the linker or -lc -lpthread ? (sysctl or uname based solutions come to mind) If this isn't possible I'll use a compile conditional and test the freebsd version in the port Makefile, but I prefer runtime detection if doable.