@@ -22,8 +22,17 @@ opt_xattrdb=false
opt_profile=false
opt_passwd_fallback='""'
+UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=x86
+case $UNAME_MACHINE in
+ i*86|x86_64) opt_arch=x86 ;;
+ arm|arm64) opt_arch=arm ;;
+ loongarch32|loongarch64) opt_arch=loongarch ;;
+esac
+
compile_x86_32=-m32
compile_x86_64=-m64
+compile_loongarch_32=
+compile_loongarch_64=
usage()
{
@@ -170,7 +179,7 @@ do
done
case $opt_arch in
-'' | x86 | arm )
+'' | x86 | arm | loongarch)
;;
*) echo >&2 "Untested arch $opt_arch."
;;
Set the default architecture based on the current machine Signed-off-by: Xiaotian Wu <wuxiaotian@loongson.cn> --- configure | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-)