From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from hulk.biessmann.org ([62.75.166.25]) by metis.ext.pengutronix.de with esmtp (Exim 4.72) (envelope-from ) id 1RxYdz-00067s-7N for ptxdist@pengutronix.de; Wed, 15 Feb 2012 07:47:12 +0100 Message-ID: <4F3B54E8.8070202@biessmann.de> Date: Wed, 15 Feb 2012 07:47:04 +0100 From: =?ISO-8859-1?Q?Andreas_Bie=DFmann?= MIME-Version: 1.0 References: <2236550.JcqvJ5vtdt@ws-stein> <1449371.MGWo599kFb@ws-stein> <20120131141208.GA32382@pengutronix.de> <10381918.aAGBVVShah@ws-stein> In-Reply-To: <10381918.aAGBVVShah@ws-stein> Subject: Re: [ptxdist] Detect if x86 target is 32 or 64bit? Reply-To: ptxdist@pengutronix.de List-Id: PTXdist Development Mailing List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Sender: ptxdist-bounces@pengutronix.de Errors-To: ptxdist-bounces@pengutronix.de To: ptxdist@pengutronix.de Dear Alexander Stein, On 01.02.12 13:49, Alexander Stein wrote: > On Tuesday 31 January 2012 15:12:08 Michael Olbrich wrote: >> On Tue, Jan 31, 2012 at 09:21:30AM +0100, Alexander Stein wrote: >>> On Wednesday 04 January 2012 17:59:57 Michael Olbrich wrote: >>>> On Wed, Jan 04, 2012 at 03:27:46PM +0100, Alexander Stein wrote: >>>>> how can I detect if a x86 target is 32 or 64bit? I'm working on a pac= kage = >>> rule = >>>>> for gnu-efi and elilo which need to know if it should generate ia32, = >>> x86_64 = >>>>> (or ia64) binaries. >>>>> I just know about PTXCONF_ARCH_X86 but this does not show what I want= . = >>> There = >>>>> is also PTXCONF_KERNEL_ARCH_X86_64 for 64bit but this needs a linux k= ernel = >>>>> configured. Any other ideas? >>>> >>>> This is not yet supported. You'll need to add ARCH_X86_64 and ARCH_IA6= 4 to >>>> platforms/architecture.in and set the correct defaults for HAS_HARDFLO= AT >>>> etc. >>>> Send patches :-) >>> >>> I doubt it's the best way to just add ARCH_X86_64 (and maybe ARCH_IA64)= . A lot = >>> of rules files use "ifdef PTXCONF_ARCH_X86". So this has to be reworked= to be = >>> useable in X86_64, as most cases don't make a difference to 32 or 64 Bi= t. >>> Maybe it's better, to add a 64Bit entry in the optimization. Thoughts? >> >> I have no idea which way will be easier to implement. But I don't think >> adding to the optimization is the best. There will be places where you n= eed >> to separate 32 vs 64 bit (e.g. SIZEOF_LONG_DOUBLE). >> So I guess you should start with a (ARCH_X86_32|ARCH_X86_64) choice and >> check if any "ifdef PTXCONF_ARCH_X86" need to be changed. >> If there are few/no uses of ARCH_X86 left then we can rename ARCH_X86_32= to >> ARCH_X86. is there any conclusion to this discussion? I startet to build a x86_64 rootfs (on top of i586-qemu-bsp) and failed to build sylinux due to some wrong decisions in syslinux.make (another discussion ..). I started defining ARCH_X86_64 as optimization of ARCH_X86. Alexander, are you building x86_64 stuff too ore did you only ask cause of the ability to build gnu-efi for ia32, x86_32 and ia64? > Another problem prio to this is a 64bit toolchain in ptxdist. Up to now t= here is no OSELAStoolchain for x86_64. Can you please test my OSELAS.Toolchain x86_64 patches? > So I tried to use my host toolchain, but ptxdist cannot detect the sysroo= t in ptxd_init_sysroot_toolchain. > At least my host toolchain has no --sysroot configure option set. I will = assume an application is for 32bit, at the moment. best regards Andreas Bie=DFmann -- = ptxdist mailing list ptxdist@pengutronix.de