From owner-freebsd-arch@FreeBSD.ORG Wed Mar 26 13:04:50 2003 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B2E1037B404 for ; Wed, 26 Mar 2003 13:04:50 -0800 (PST) Received: from mail.pcnet.com (mail.pcnet.com [204.213.232.4]) by mx1.FreeBSD.org (Postfix) with ESMTP id 083A143F75 for ; Wed, 26 Mar 2003 13:04:50 -0800 (PST) (envelope-from eischen@pcnet1.pcnet.com) Received: from pcnet1.pcnet.com (localhost [127.0.0.1]) by mail.pcnet.com (8.12.8/8.12.1) with ESMTP id h2QL4hBg024111; Wed, 26 Mar 2003 16:04:43 -0500 (EST) Received: from localhost (eischen@localhost)h2QL4gpQ024108; Wed, 26 Mar 2003 16:04:42 -0500 (EST) Date: Wed, 26 Mar 2003 16:04:42 -0500 (EST) From: Daniel Eischen To: Warner Losh In-Reply-To: <200303262030.h2QKU6A7089578@harmony.village.org> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Spam-Status: No, hits=-25.4 required=5.0 tests=AWL,EMAIL_ATTRIBUTION,IN_REP_TO,QUOTED_EMAIL_TEXT, REPLY_WITH_QUOTES,USER_AGENT_PINE autolearn=ham version=2.50 X-Spam-Level: X-Spam-Checker-Version: SpamAssassin 2.50 (1.173-2003-02-20-exp) cc: arch@freebsd.org cc: kse@elischer.org Subject: Re: Not providing static libraries (libkse/libpthread) X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 26 Mar 2003 21:04:51 -0000 On Wed, 26 Mar 2003, Warner Losh wrote: > In message <3E81F6BB.BFFE3F33@vigrid.com> Daniel Eischen writes: > : Is there a good reason for providing static libraries for > : libpthread/libkse? I'd like to not support them to get > : rid of some hacks to make sure certain symbols are present > : in the static library case. > > That would be a big hassle for the company I work for. We have many > static binaries that are threaded and providing a dynamic one has a > performance impact of a few percent. While we have done dynamic > linking in the past, and have the infrastructure to do so in the > future in our build process, this may cause us problems in the future > if we need to deploy a static binary (which tends to be safer to do > once a long period of time has passed between the generation of the > system and the deployment of the updated binary). > > How gross are the hacks? See libc_r/uthread/uthread_init.c (references[] and libgcc_references[]). Also, in a lot of functions, there are: if (_thread_initial == NULL) _thread_init(); I'd like to be able to get rid of these eventually and perhaps have some magical way of getting it called automatically when the library is loaded. If it was possible, I'm not sure that it would work in both static and shared. -- Dan Eischen