From owner-freebsd-arch@FreeBSD.ORG Tue Jul 9 14:19:51 2013 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 148E8A3B for ; Tue, 9 Jul 2013 14:19:51 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from mail-ie0-f179.google.com (mail-ie0-f179.google.com [209.85.223.179]) by mx1.freebsd.org (Postfix) with ESMTP id DC50E1285 for ; Tue, 9 Jul 2013 14:19:50 +0000 (UTC) Received: by mail-ie0-f179.google.com with SMTP id c10so13132058ieb.10 for ; Tue, 09 Jul 2013 07:19:50 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=sender:subject:mime-version:content-type:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to:x-mailer :x-gm-message-state; bh=FQYksdRycXuZ2tFBrvntgCgQxP0JDgiDmEZbXoED+xQ=; b=UcMIylhXO0qR/WNNY4QV5byl2uGUekXWfq3rzpB/JF3D3SkRmkbzPpx3wG8dt348+t u9oeNPGDnIaj+75rLyiGNdvrN7G6d6PznfxoUy47HcNS2ZkgCzKwyerKV4uoDiwH4Spj pJF0YSk0k+FfA9ecrDcQlSeblEu8M3lSBOkeZXok03JKZJzP59Sii+25cvGshLfJtEzP MFoFim89hJHRZXwhLaVb+8pHHBspBin9YlDLOrRh5kehUG71K8WFOAfmjHQtwXNxwcO0 xO0gNNU3R/Ru/hHcqn3BgMfwOfonrcnPKxFIEUooUFgI4tQLS7EXY6BnyVFJT6Me6qhE nbfw== X-Received: by 10.50.80.9 with SMTP id n9mr10281634igx.42.1373379590307; Tue, 09 Jul 2013 07:19:50 -0700 (PDT) Received: from 53.imp.bsdimp.com (50-78-194-198-static.hfc.comcastbusiness.net. [50.78.194.198]) by mx.google.com with ESMTPSA id ht10sm10450349igb.2.2013.07.09.07.19.47 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 09 Jul 2013 07:19:48 -0700 (PDT) Sender: Warner Losh Subject: Re: Adding a MACHINE_ARCH note Mime-Version: 1.0 (Apple Message framework v1085) Content-Type: text/plain; charset=us-ascii From: Warner Losh In-Reply-To: <20130709090744.0e497e7e@bender.Home> Date: Tue, 9 Jul 2013 08:19:46 -0600 Content-Transfer-Encoding: quoted-printable Message-Id: <32F979BD-FB5C-4111-9586-4C5E7C6DFA71@bsdimp.com> References: <20130709090744.0e497e7e@bender.Home> To: Andrew Turner X-Mailer: Apple Mail (2.1085) X-Gm-Message-State: ALoCoQnvE5X5OJP0rqCBQdjaFiE6Dno5ZqMXMxYRaqWvM1B/9J/vT9qZFgbPdBANDHm0DcJswTM3 Cc: freebsd-arch@freebsd.org X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Jul 2013 14:19:51 -0000 On Jul 9, 2013, at 2:07 AM, Andrew Turner wrote: > I have been looking into an issue where it would be useful to know the > value of MACHINE_ARCH a binary was built with, for example on ARM it > could be arm or armv6 (or the big endian variants). >=20 > The reason for this is to teach pkg which arch the package is built = for > as there are a few differences between arm and armv6 that mean > an executable built for one may not run on the other. >=20 > The attached patch stores the value of MACHINE_ARCH in a note so it = can > be read later to get this value. Does anyone have any objections to > this patch, e.g. there is a better way of doing this? I thought that the ELF headers gave us all the data we needed to know = how things were built... Warner