xref: /openbsd/usr.bin/arch/arch.1 (revision 898184e3)
1.\" $OpenBSD: arch.1,v 1.9 2007/05/31 19:20:07 jmc Exp $
2.\"
3.\" Copyright (c) 1994 SigmaSoft, Th. Lockert
4.\" All rights reserved.
5.\"
6.\" Redistribution and use in source and binary forms, with or without
7.\" modification, are permitted provided that the following conditions
8.\" are met:
9.\" 1. Redistributions of source code must retain the above copyright
10.\"    notice, this list of conditions and the following disclaimer.
11.\" 2. Redistributions in binary form must reproduce the above copyright
12.\"    notice, this list of conditions and the following disclaimer in the
13.\"    documentation and/or other materials provided with the distribution.
14.\"
15.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
16.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
17.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
18.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
19.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
20.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
21.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
22.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
23.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
24.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25.\"
26.\"	$OpenBSD: arch.1,v 1.9 2007/05/31 19:20:07 jmc Exp $
27.\"
28.Dd $Mdocdate: May 31 2007 $
29.Dt ARCH 1
30.Os
31.Sh NAME
32.Nm arch ,
33.Nm machine
34.Nd print architecture type
35.Sh SYNOPSIS
36.Nm arch
37.Op Fl ks
38.Nm machine
39.Op Fl a
40.Sh DESCRIPTION
41The
42.Nm arch
43and
44.Nm machine
45commands display the machine's architecture in slightly different ways.
46.Nm arch
47by default displays the application architecture, defined by both the
48operating system and the instruction set architecture, while
49.Nm machine
50displays the kernel architecture (without the operating system part).
51Note that both commands output the target architecture as opposed to
52.Xr uname 1
53which describes the host.
54This is useful for dynamic discovery
55of the target architecture in build or configuration scripts
56needing to work in cross-compilation environments.
57.Pp
58The options for
59.Nm arch
60are as follows:
61.Bl -tag -width indent
62.It Fl k
63Display the kernel architecture instead of application
64architecture.
65.It Fl s
66Display the chosen architecture in a short form, i.e., without the
67operating system prefixed.
68.El
69.Pp
70The options for
71.Nm machine
72are as follows:
73.Bl -tag -width indent
74.It Fl a
75Display the application architecture instead of the kernel architecture.
76.El
77.Sh SEE ALSO
78.Xr uname 1
79