From owner-cvs-src@FreeBSD.ORG Mon Aug 1 00:01:57 2005 Return-Path: X-Original-To: cvs-src@FreeBSD.org Delivered-To: cvs-src@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0C6A416A41F; Mon, 1 Aug 2005 00:01:57 +0000 (GMT) (envelope-from tataz@tataz.chchile.org) Received: from postfix4-1.free.fr (postfix4-1.free.fr [213.228.0.62]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6914543D46; Mon, 1 Aug 2005 00:01:56 +0000 (GMT) (envelope-from tataz@tataz.chchile.org) Received: from tatooine.tataz.chchile.org (vol75-8-82-233-239-98.fbx.proxad.net [82.233.239.98]) by postfix4-1.free.fr (Postfix) with ESMTP id 11FE4317D88; Mon, 1 Aug 2005 02:01:49 +0200 (CEST) Received: by tatooine.tataz.chchile.org (Postfix, from userid 1000) id DF29C405B; Mon, 1 Aug 2005 02:02:09 +0200 (CEST) Date: Mon, 1 Aug 2005 02:02:09 +0200 From: Jeremie Le Hen To: "M. Warner Losh" Message-ID: <20050801000209.GZ68965@obiwan.tataz.chchile.org> References: <863bpvmnww.fsf@xps.des.no> <20050731102343.35bc4aa9@Magellan.Leidinger.net> <20050731185925.GU68965@obiwan.tataz.chchile.org> <20050731.164241.119877948.imp@bsdimp.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="5/uDoXvLw7AC5HRs" Content-Disposition: inline In-Reply-To: <20050731.164241.119877948.imp@bsdimp.com> User-Agent: Mutt/1.5.9i Cc: netchild@FreeBSD.org, src-committers@FreeBSD.org, jeremie@le-hen.org, cvs-all@FreeBSD.org, cvs-src@FreeBSD.org Subject: Re: cvs commit: src Makefile.inc1 ObsoleteFiles.inc src/share/man/man7 build.7 X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Aug 2005 00:01:57 -0000 --5/uDoXvLw7AC5HRs Content-Type: text/plain; charset=us-ascii Content-Disposition: inline > : This sounds as a hack, but couldn't you use file(1) on ${DESTDIR}/bin/ls > : to identify the architecture it's running ? It would at least avoid > : breaking POLA. > > Why is this a hack? This sounded to me as a hack because tasting a file is not the usual way to proceed in Makefiles and file(1) doesn't directly output the architecture for which the file has been compiled, which would require a sequence of .if .elif filter. Furthermore, I think that deducing DESTDIR_ARCH from file(1) output is not that easy because it seems to be multiple possible outputs for a single FreeBSD architecture (see the first match of the request [1], this is an example for the "i386" arch, and this could even be "pc98" as well). However, if someone can provide me a list of all possible file(1) output concerning the processor for which a binary has been compiled for, I would be glad to provide a patch. Regards, [1] http://www.google.fr/search?q=file+%22lsb+executable%22+-80386+amd -- Jeremie Le Hen < jeremie at le-hen dot org >< ttz at chchile dot org > --5/uDoXvLw7AC5HRs Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="destdir_arch.diff" Index: Makefile.inc1 =================================================================== RCS file: /donald/repo/FreeBSD/src/Makefile.inc1,v retrieving revision 1.506 diff -u -p -u -r1.506 Makefile.inc1 --- Makefile.inc1 30 Jul 2005 18:02:20 -0000 1.506 +++ Makefile.inc1 31 Jul 2005 23:39:09 -0000 @@ -1057,6 +1057,8 @@ par-${__target}: ${SUBDIR:S/$/.${__targe # check for / delete old files section # +DESTDIR_ARCH!= uname -m + .include "ObsoleteFiles.inc" OLD_LIBS_MESSAGE="Please be sure no application still uses those libraries, \ Index: ObsoleteFiles.inc =================================================================== RCS file: /donald/repo/FreeBSD/src/ObsoleteFiles.inc,v retrieving revision 1.7 diff -u -p -u -r1.7 ObsoleteFiles.inc --- ObsoleteFiles.inc 30 Jul 2005 18:04:17 -0000 1.7 +++ ObsoleteFiles.inc 31 Jul 2005 23:39:30 -0000 @@ -223,7 +223,7 @@ OLD_FILES+=usr/share/man/man1/sasc.1.gz OLD_FILES+=usr/share/man/man1/sgsc.1.gz OLD_FILES+=usr/share/man/man4/i386/stl.4.gz OLD_FILES+=usr/share/man/man8/raidctl.8.gz -.if ${MACHINE_ARCH} != "alpha" && ${MACHINE_ARCH} != "sparc64" +.if ${DESTDIR_ARCH} != "alpha" && ${DESTDIR_ARCH} != "sparc64" # 20040130: libkse renamed to libpthread OLD_FILES+=usr/lib/libkse.a OLD_FILES+=usr/lib/libkse.so @@ -636,7 +636,7 @@ OLD_LIBS+=usr/lib/libpcap.so.2 OLD_LIBS+=usr/lib/libisc.so.1 # 200408XX OLD_LIBS+=usr/lib/snmp_netgraph.so.1 -.if ${MACHINE_ARCH} != "alpha" && ${MACHINE_ARCH} != "sparc64" +.if ${DESTDIR_ARCH} != "alpha" && ${DESTDIR_ARCH} != "sparc64" # 20040130: libkse renamed to libpthread OLD_LIBS+=usr/lib/libkse.so.1 .endif --5/uDoXvLw7AC5HRs--