cvs commit: src Makefile.inc1 ObsoleteFiles.inc
src/share/man/man7 build.7
Jeremie Le Hen
jeremie at le-hen.org
Mon Aug 1 00:01:57 GMT 2005
> : 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 >
-------------- next part --------------
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
More information about the cvs-src
mailing list