Skip to content

Commit

Permalink
use gcc -dumpmachine to detect target machine, instead of using uname…
Browse files Browse the repository at this point in the history
… -m.

'uname -m' returns 'aarch64' when using armhf container on arm64 hosts. this cause compile error on asm code in eval.c
  • Loading branch information
k-okada committed Feb 24, 2022
1 parent a7c9cb9 commit 4381230
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lisp/Makefile.LinuxARM
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@ XVERSION=X_V11R6_1

#MACHINE=armv6
#MACHINE=armv5te
MACHINE=$(shell uname -m | sed 's/\(armv[0-9]\).*/\1/')
# gcc -dumpmachine retruns target triplet consists of three fields separated by a hyphen (-).
MACHINE=$(shell gcc -dumpmachine | sed 's/\(.*\)-.*-.*/\1/')

GCC_MAJOR_VERSION=$(shell gcc -dumpversion | sed -e 's/\([0-9]\)\.\([0-9]\)\([\.0-9]*\)/\1/')
GCC_MINOR_VERSION=$(shell gcc -dumpversion | sed -e 's/\([0-9]\)\.\([0-9]\)\([\.0-9]*\)/\2/')
Expand Down

0 comments on commit 4381230

Please sign in to comment.