From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from lists.gentoo.org ([140.105.134.102] helo=robin.gentoo.org) by nuthatch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1GaDzV-0007FV-FF for garchives@archives.gentoo.org; Wed, 18 Oct 2006 16:10:01 +0000 Received: from robin.gentoo.org (localhost [127.0.0.1]) by robin.gentoo.org (8.13.8/8.13.6) with SMTP id k9IG841m032118; Wed, 18 Oct 2006 16:08:04 GMT Received: from buggy.blubb.ch (cable-static-87-245-102-53.shinternet.ch [87.245.102.53]) by robin.gentoo.org (8.13.8/8.13.6) with ESMTP id k9IG839T022983 for ; Wed, 18 Oct 2006 16:08:04 GMT Received: from [192.168.10.5] (helo=[192.168.10.5]) by buggy.blubb.ch with esmtp (Exim 4.54) id 1GaDuS-00052C-6l for gentoo-amd64@lists.gentoo.org; Wed, 18 Oct 2006 18:04:48 +0200 Message-ID: <45365164.8000206@gentoo.org> Date: Wed, 18 Oct 2006 18:08:04 +0200 From: Simon Stelling User-Agent: Thunderbird 1.5.0.7 (X11/20060926) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-amd64@gentoo.org Reply-to: gentoo-amd64@lists.gentoo.org MIME-Version: 1.0 To: gentoo-amd64@lists.gentoo.org Subject: Re: [gentoo-amd64] -fPIC - Toolchain broken? References: <45364363.3010601@getdesigned.at> <45364DF8.9000803@gentoo.org> In-Reply-To: <45364DF8.9000803@gentoo.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Archives-Salt: 8aec0420-b9d7-4515-84da-d5239ffa595c X-Archives-Hash: 765b08c697b789cacb2a92aeb096b489 Simon Stelling wrote: >> /usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/../../../../x86_64-pc-linux-gnu/bin/ld: >> >> warning: creating a DT_TEXTREL in object. >> /usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/../../../../x86_64-pc-linux-gnu/bin/ld: >> >> ucol_wgt.o: relocation R_X86_64_PC32 against `compareRanges' can not be >> used when making a shared object; recompile with -fPIC >> /usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/../../../../x86_64-pc-linux-gnu/bin/ld: >> >> final link failed: Bad value >> collect2: ld returned 1 exit status > > I didn't look at the code yet, but I guess it has some #ifndef > __OPTIMIZED__. __OPTIMIZED__ is set by gcc with -O2 and above. I guess > if you switch back to your -O3 CFLAGS it will compile. Actually, it would be __OPTIMIZE__, but that wasn't the culprit. The function compareRanges is declared as follows: static U_INLINE int32_t U_CALLCONV compareRanges(const void *context, const void *left, const void *right); And in another function used as an argument to a third function, i.e. pointed at with a pointer, but as it's inline you can't point at it. Now the only thing left is to find out why the heck it fails with -O{0,1} but not >= -02... -- Kind Regards, Simon Stelling Gentoo/AMD64 developer -- gentoo-amd64@gentoo.org mailing list