From owner-freebsd-amd64@FreeBSD.ORG Sat Feb 21 19:43:40 2004 Return-Path: Delivered-To: freebsd-amd64@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id DF58A16A4CE for ; Sat, 21 Feb 2004 19:43:40 -0800 (PST) Received: from mail.wvfiber.com (mail.wvfiber.com [63.223.7.3]) by mx1.FreeBSD.org (Postfix) with ESMTP id C623943D2D for ; Sat, 21 Feb 2004 19:43:40 -0800 (PST) (envelope-from hscholz@raisdorf.net) Received: by mail.wvfiber.com (Postfix, from userid 65534) id 2AC2530282; Sat, 21 Feb 2004 22:43:40 -0500 (EST) Received: from localhost (localhost [127.0.0.1]) by mail.wvfiber.com (Postfix) with ESMTP id 7C01C3769A for ; Sat, 21 Feb 2004 22:43:09 -0500 (EST) Received: from [10.0.1.2] (c-24-30-48-121.mw.client2.attbi.com [24.30.48.121]) by mail.wvfiber.com (Postfix) with ESMTP id 41BBD30282 for ; Sat, 21 Feb 2004 22:43:09 -0500 (EST) Mime-Version: 1.0 (Apple Message framework v612) In-Reply-To: References: Content-Type: text/plain; charset=US-ASCII; format=flowed Message-Id: <4CC57F17-64E9-11D8-ACAA-000A95BAD088@raisdorf.net> Content-Transfer-Encoding: 7bit From: Hendrik Scholz Date: Sat, 21 Feb 2004 22:43:38 -0500 To: freebsd-amd64@freebsd.org X-Mailer: Apple Mail (2.612) X-Virus-Scanned: by AMaViS snapshot-20020531 X-Spam-Status: No, hits=-5.8 required=5.0 tests=AWL,BAYES_01,EMAIL_ATTRIBUTION,IN_REP_TO,QUOTED_EMAIL_TEXT, REFERENCES,REPLY_WITH_QUOTES,USER_AGENT_APPLEMAIL autolearn=ham version=2.55 X-Spam-Level: X-Spam-Checker-Version: SpamAssassin 2.55 (1.174.2.19-2003-05-19-exp) Subject: Re: CFLAGS+= -fPIC per default? X-BeenThere: freebsd-amd64@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Porting FreeBSD to the AMD64 platform List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Feb 2004 03:43:41 -0000 On Feb 21, 2004, at 9:59 PM, Christian Weisgerber wrote: > Why are these shared objects not built with -fPIC in the first place? Ask the authors of the third party applications :) Most architectures don't need -fPIC and/or it slows them down (thanks for the comment Peter!). The ports I've dealt with either use a hand written Makefile without honoring CFLAGS set in the environment or without having -fPIC set since i386 (I guess that is what most of the guys test and run their stuff on) doesn't need it. Ports utilizing GNU configure may check if -fPIC is supported but usually don't set it since it's not needed on the developers system. Btw: Just found this in man gcc on Mac OS 10.3: -fPIC If supported for the target machine, emit position-independent code, suitable for dynamic linking and avoiding any limit on the size of the global offset table. This option makes a difference on the m68k, m88k, and the SPARC. Position-independent code requires special support, and therefore works only on certain machines. -fPIC is the default on Darwin and Mac OS X. This might be the reason why I didn't see all the -fPIC patches in darwinports. Hendrik -- Hendrik Scholz - hscholz@raisdorf.net - http://www.raisdorf.net/ cell phone: 404-606-5324 (US) 0160-1570-272 (DE)