build: Normalise amd64 CC_MACHINE to x86_64

This commit is contained in:
mintsuki 2022-06-30 07:07:44 +02:00
parent 0fac035a34
commit b0af0ac013
1 changed files with 7 additions and 2 deletions

View File

@ -9,6 +9,7 @@ if test -f "$BUILDDIR/$ARCHITECTURE-toolchain.mk"; then
fi fi
AC_PROG_GREP AC_PROG_GREP
AC_PROG_SED
ENFORCE_TOOLCHAIN=no ENFORCE_TOOLCHAIN=no
if test "x$TOOLCHAIN" = "x"; then if test "x$TOOLCHAIN" = "x"; then
@ -70,9 +71,13 @@ if ! $LIMINE_CC -dumpmachine >/dev/null 2>&1; then
CC_ERROR_MSG CC_ERROR_MSG
fi fi
CC_MACHINE="$($LIMINE_CC -dumpmachine | dd bs=${#ARCHITECTURE} count=1 2>/dev/null)" CC_MACHINE="$($LIMINE_CC -dumpmachine | $SED 's/-.*//g')"
if test "x$CC_MACHINE" = "xx86_"; then if test "x$CC_MACHINE" = "xamd64"; then
CC_MACHINE=x86_64
fi
if test "x$CC_MACHINE" = "xx86_64"; then
case "$ARCHITECTURE" in case "$ARCHITECTURE" in
i?86) i?86)
CC_MACHINE="$ARCHITECTURE" CC_MACHINE="$ARCHITECTURE"