From owner-freebsd-amd64@FreeBSD.ORG Sat Feb 21 11:47:19 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 5E50816A4CE for ; Sat, 21 Feb 2004 11:47:19 -0800 (PST) Received: from mail.wvfiber.com (mail.wvfiber.com [63.223.7.3]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4624143D1D for ; Sat, 21 Feb 2004 11:47:19 -0800 (PST) (envelope-from hscholz@raisdorf.net) Received: by mail.wvfiber.com (Postfix, from userid 65534) id 2910B37550; Sat, 21 Feb 2004 14:47:15 -0500 (EST) Received: from localhost (localhost [127.0.0.1]) by mail.wvfiber.com (Postfix) with ESMTP id 924A237542 for ; Sat, 21 Feb 2004 14:46:44 -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 5CFFD3750C for ; Sat, 21 Feb 2004 14:46:44 -0500 (EST) Mime-Version: 1.0 (Apple Message framework v612) Content-Transfer-Encoding: 7bit Message-Id: Content-Type: text/plain; charset=US-ASCII; format=flowed To: From: Hendrik Scholz Date: Sat, 21 Feb 2004 14:47:11 -0500 X-Mailer: Apple Mail (2.612) X-Virus-Scanned: by AMaViS snapshot-20020531 X-Spam-Status: No, hits=-5.1 required=5.0 tests=AWL,BAYES_01,USER_AGENT_APPLEMAIL version=2.55 X-Spam-Level: X-Spam-Checker-Version: SpamAssassin 2.55 (1.174.2.19-2003-05-19-exp) Subject: 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: Sat, 21 Feb 2004 19:47:19 -0000 Hi! I'm just fixing a bunch of ports reported broken on amd64 by bento. Most of these errors are related to a common linker problem: ld: foo.o: relocation R_X86_64_32 can not be used when making a shared object; recompile with -fPIC Passing -fPIC via CFLAGS fixes the problem in 80% of the cases (the remaining ports need proper CFLAGS handling in the third party application). Adding CFLAGS= -fPIC to /etc/make.conf may be a local solution but are there any drawbacks by adding something like .if ${ARCH} == "amd64" CFLAGS+= -fPIC .endif to ports/Mk/bsd.port.mk? Remaining apps that need fixing then can be patched properly without the amd64 statement, thus making future additions easier, i.e. when the yet-to-be-announced 128Bit architecture needs -fVANILLA_COKE to compile stuff a similar statement can be added to bsd.port.mk and all the ports running on amd64 should automatically be fixed on the new arch. Just my $0.02, Hendrik -- Hendrik Scholz - hscholz@raisdorf.net - http://www.raisdorf.net/ cell phone: 404-606-5324 (US) 0160-1570-272 (DE)