[Slackbuilds-users] ARCH determination
Marco Moock
mm at dorfdsl.de
Wed Jul 15 10:23:09 UTC 2026
Hello!
Various SlackBuilds include something like this:
# Automatically determine the architecture we're building on:
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
i?86) ARCH=i486 ;;
arm*) ARCH=arm ;;
# Unless $ARCH is already set, use uname -m for all other archs:
*) ARCH=$( uname -m ) ;;
esac
fi
Which purpose does it have?
I understand that defining an architecture is sometimes used to produce
builds specific for a CPU (e.g. to use x86_64-v3 instructions etc.).
Although, which purpose do the other values have?
$ARCH is not set by default.
If it gets the value of uname -m, that should be fine, or is that guess
wrong?
--
kind regards
Marco
Junk-Mail bitte an trashcan at stinkedores.dorfdsl.de
-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP_signature.asc
Type: application/pgp-signature
Size: 665 bytes
Desc: OpenPGP digital signature
URL: <http://lists.slackbuilds.org/pipermail/slackbuilds-users/attachments/20260715/e0e65abc/attachment.asc>
More information about the SlackBuilds-users
mailing list