Adding a MACHINE_ARCH note

Andrew Turner andrew at fubar.geek.nz
Tue Jul 9 08:07:53 UTC 2013


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).

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.

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?

Andrew
-------------- next part --------------
A non-text attachment was scrubbed...
Name: machine_arch_note.diff
Type: text/x-patch
Size: 960 bytes
Desc: not available
URL: <http://lists.freebsd.org/pipermail/freebsd-arch/attachments/20130709/56df0c75/attachment.bin>


More information about the freebsd-arch mailing list