Date: Mon, 1 Aug 2005 02:02:09 +0200 From: Jeremie Le Hen <jeremie@le-hen.org> To: "M. Warner Losh" <imp@bsdimp.com> 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 Message-ID: <20050801000209.GZ68965@obiwan.tataz.chchile.org> In-Reply-To: <20050731.164241.119877948.imp@bsdimp.com> References: <863bpvmnww.fsf@xps.des.no> <20050731102343.35bc4aa9@Magellan.Leidinger.net> <20050731185925.GU68965@obiwan.tataz.chchile.org> <20050731.164241.119877948.imp@bsdimp.com>
next in thread | previous in thread | raw e-mail | index | archive | help
--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--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20050801000209.GZ68965>