From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1MxN5v-0007pK-Fo for mharc-grub-devel@gnu.org; Mon, 12 Oct 2009 11:45:55 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MxN5s-0007nN-54 for grub-devel@gnu.org; Mon, 12 Oct 2009 11:45:52 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MxN5n-0007ki-K9 for grub-devel@gnu.org; Mon, 12 Oct 2009 11:45:51 -0400 Received: from [199.232.76.173] (port=53374 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MxN5n-0007kc-7k for grub-devel@gnu.org; Mon, 12 Oct 2009 11:45:47 -0400 Received: from mail-ew0-f228.google.com ([209.85.219.228]:57721) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MxN5k-00036B-MM; Mon, 12 Oct 2009 11:45:44 -0400 Received: by mail-ew0-f228.google.com with SMTP id 28so16228283ewy.42 for ; Mon, 12 Oct 2009 08:45:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from :user-agent:mime-version:to:cc:subject:references:in-reply-to :content-type:content-transfer-encoding; bh=i114RQxcO3+c7rSRZXkAdvmRhXYO6vDJ00pePnd0O/Q=; b=D7RUgYWKFRxOSsJJ9LmkJ0FriXRYfHEW/EHTU+Y8KXMtrENQGmzTvPpmbywqZDehVa q+G2KokqLRFNJ7ruZpzQNDnknpzzAY0iJTMWvCG2B58A6HDWXxUwv0CnAvcjOFMGv9jc wn8KsG9egPSW89w4Kp8v9qCcANB6fFlcKZul0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; b=kdT7AWai1a3ZPG1h5lBvydraBaDc3jdzbcXwG7jgB3IW6TO7b5fbxA9x+xA6V2dQOH L+9kXGAWglLvbcZj47uSKmVYZ3ekgcpxloUCftdRMDeEML5PwkG9IZPv1PmiszomS2YU maRrIrLFXR57tku552Y5mwaYYMinxlESfjLQ8= Received: by 10.211.130.15 with SMTP id h15mr4321442ebn.82.1255362342690; Mon, 12 Oct 2009 08:45:42 -0700 (PDT) Received: from debian.bg45.phnet (gprs13.swisscom-mobile.ch [193.247.250.13]) by mx.google.com with ESMTPS id 23sm618835eya.26.2009.10.12.08.45.38 (version=TLSv1/SSLv3 cipher=RC4-MD5); Mon, 12 Oct 2009 08:45:41 -0700 (PDT) Message-ID: <4AD34F1D.2060009@gmail.com> Date: Mon, 12 Oct 2009 17:45:33 +0200 From: Vladimir 'phcoder' Serbinenko User-Agent: Mozilla-Thunderbird 2.0.0.22 (X11/20090701) MIME-Version: 1.0 To: Pavel Roskin References: <20091012.031430.106385568.davem@davemloft.net> <4AD3043C.10204@gmail.com> <20091012.032838.82254107.davem@davemloft.net> <1255361384.27987.8.camel@mj> In-Reply-To: <1255361384.27987.8.camel@mj> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) Cc: grub-devel@gnu.org, bean123ch@gmail.com, David Miller Subject: Re: powerpc/sparc problems X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: The development of GRUB 2 List-Id: The development of GRUB 2 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Oct 2009 15:45:52 -0000 Pavel Roskin wrote: > On Mon, 2009-10-12 at 03:28 -0700, David Miller wrote: > >>> Do you think we should just revert it? >>> >> Probably. >> > > The purpose of the patch was to remove the requirement that the target > libc development package is present. That's a common situation for > x86_64 systems that may have a 32-bit capable compiler, and maybe the > 32-bit libc installed as a dependency of a 32-bit package (e.g. wine), > but no the files necessary to link against the 32-bit libc. > > I don't know why the checks need to be reinstated, but if it's really > needed to be done, we could use the trick described in the gcc manual: > > `-print-libgcc-file-name' > Same as `-print-file-name=libgcc.a'. > > This is useful when you use `-nostdlib' or `-nodefaultlibs' but > you do want to link with `libgcc.a'. You can do > > gcc -nostdlib FILES... `gcc -print-libgcc-file-name` > > This way, it should be possible to check if the functions are in libgcc > without requiring libc. > On sparc64, ppc and mips we compile using -nostdlib -lgcc -static-libgcc. I would prefer to use the same method in check and actual compile. Another idea: we could use nm to generate list of functions in libgcc. This way we acquire robustness against new functions in gcc but it may increase the kernel size. PPC and sparc are less used and hence more prone to problems and size on them doesn't matter so much as it does on i386-pc. So I would prefer to buy robustness at cost of size I haven't made up my mind for mips(el) yet since the target is to be burned in flash where space is limited. Another solution would be to enumerate symbols in all modules and compare them to libgcc symbols and include only needed ones but it has a major drawback of potentially breaking external and separately compiled modules which is especially problematic if core is burned in flash. -- Regards Vladimir 'phcoder' Serbinenko Personal git repository: http://repo.or.cz/w/grub2/phcoder.git