.\" Modifications made 8/20/97 (c) Apple Computer, Inc.
.\" Modifications made 11/12/06 (c) Apple Computer, Inc.
-.Dd November 12, 2006
+.Dd July 8, 2010
.Dt ARCH 1
.Os "Mac OS X"
.Sh NAME
.Sh SYNOPSIS
.Nm arch
.Nm arch
-.Op Fl h
+.Op Fl 32
+.Op Fl 64
.Oo
.Oo Fl Ns Ar arch_name | Fl arch Ar arch_name Oc Ns ...
.Oc
+.Op Fl c
+.Oo Fl d Ar envname Oc Ns ...
+.Oo Fl e Ar envname=value Oc Ns ...
+.Op Fl h
.Ar prog
.Op Ar args No ...
.Sh DESCRIPTION
.Pp
The other use of the
.Nm arch
-command it to run a selected architecture of a universal binary.
+command is to run a selected architecture of a universal binary.
A universal binary contains code that can run on different architectures.
By default, the operating system will select the architecture that most closely
matches the processor type.
even if a 64-bit architecture is available.
.Pp
The
-.Fl h
-option prints a usage message and exits.
-.Pp
-The
.Ar arch_name
argument must be one of the currently supported architectures:
.Bl -tag -width x86_64 -offset indent
.It i386
32-bit intel
-.It ppc
-32-bit powerpc
-.It ppc64
-64-bit powerpc
.It x86_64
64-bit intel
.El
one in order, skipping an architecture that is not supported on the current
processor, or is unavailable in the universal binary.
.Pp
+The other options are:
+.Bl -tag -width ".Fl e Ar envname=value"
+.It Fl 32
+Add the native 32-bit architecture to the list of architectures.
+.It Fl 64
+Add the native 64-bit architecture to the list of architectures.
+.It Fl c
+Clears the environment that will be passed to the command to be run.
+.It Fl d Ar envname
+Deletes the named environment variable from the environment that will be passed
+to the command to be run.
+.It Fl e Ar envname=value
+Assigns the given value to the named environment variable in the environment
+that will be passed to the command to be run.
+Any existing environment variable with the same name will be replaced.
+.It Fl h
+Prints a usage message and exits.
+.El
+.Pp
The
.Ar prog
argument is the command to run, followed by any arguments to pass to the
1234
.Ed
.Pp
-shows the intel little endian byte order, while:
-.Bd -literal -offset indent
-% arch -ppc perl -MConfig -e 'printf "%s\\n", $Config{byteorder}'
-4321
-.Ed
-.Pp
-runs the powerpc architecture, and displays big endian byte order.
+shows the intel little endian byte order.
.Ss Making links to the arch command
When a link is made to
.Nm arch
be looked up in the corresponding property list file.
.Ss Example ARCHPREFERENCE Values
.Bl -tag -width " "
-.It ppc,i386,ppc64,x86_64
+.It i386,x86_64
A specifier that matches any name.
-.It foo:ppc,i386,ppc64,x86_64
+.It foo:i386,x86_64
A specifier that matches the program named
.Nm foo
(the full executable path is in the
.Pa foo.plist
file).
-.It foo:/op/bin/boo:ppc,i386,ppc64,x86_64
+.It foo:/op/bin/boo:i386,x86_64
A specifier with all fields specified.
-.It baz:ppc,i386;i386,ppc
+.It baz:i386;x86_64
A specifier for
.Nm baz
and a second specifier that would match any other name.