You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[[ "$(wc -w <<<"${os_version_id//\./ }")"-eq"2" ]] && alpine_min_version="310"# Account for variation in the versioning 3.1 or 3.1.0 to make sure the check works correctly
103
103
[[ "${os_id}"=~ ^(alpine)$ ]] && os_version_codename="alpine"# If alpine, set the codename to alpine. We check for min v3.10 later with codenames.
104
104
105
+
if [[ "${os_id}"=~ ^(debian|ubuntu)$ ]];then
106
+
os_arch="$(dpkg --print-architecture)"
107
+
elif [[ "${os_id}"=~ ^(alpine)$ ]];then
108
+
os_arch="$(apk info --print-arch)"
109
+
fi
110
+
105
111
# Check against allowed codenames or if the codename is alpine version greater than 3.10
printf'\n%b\n'"${unicode_green_circle}${text_bold} Using multiarch:${color_end}${color_yellow_light}arch:${color_end}${color_blue_light}${qbt_cross_name}${color_end}${color_yellow_light}host:${color_end}${color_blue_light}${os_arch}${os_id}${color_end}${color_yellow_light}target:${color_end}${color_blue_light}${qbt_cross_name}${qbt_cross_target}${color_end}"
1460
+
fi
1452
1461
case"${qbt_cross_name}"in
1453
1462
armel)
1454
1463
case"${qbt_cross_target}"in
@@ -1695,7 +1704,7 @@ _multi_arch() {
1695
1704
qbt_zlib_arch="riscv64"
1696
1705
;;&
1697
1706
debian)
1698
-
printf'\n%b\n\n'"${unicode_red_circle} The arch ${color_yellow_light}${qbt_cross_name}${color_end} can only be cross built on and Alpine OS Host"
1707
+
printf'\n%b\n\n'"${unicode_red_circle} The arch ${color_yellow_light}${qbt_cross_name}${color_end} can only be cross built on an Alpine or Ubuntu OS Host"
1699
1708
exit 1
1700
1709
;;
1701
1710
ubuntu)
@@ -1710,6 +1719,30 @@ _multi_arch() {
1710
1719
;;
1711
1720
esac
1712
1721
;;
1722
+
loongarch64)
1723
+
case"${qbt_cross_target}"in
1724
+
alpine)
1725
+
if [[ "${qbt_qt_version}"=='6' ]];then
1726
+
cross_arch="loongarch64"
1727
+
qbt_cross_host="loongarch64-linux-musl"
1728
+
qbt_zlib_arch="loongarch64"
1729
+
else
1730
+
printf'\n%b\n\n'"${unicode_red_circle} The arch ${color_yellow_light}${qbt_cross_name}${color_end} can only be cross built on and Alpine Host with qt6"
1731
+
exit 1
1732
+
fi
1733
+
;;&
1734
+
debian | ubuntu)
1735
+
printf'\n%b\n\n'"${unicode_red_circle} The arch ${color_yellow_light}${qbt_cross_name}${color_end} can only be cross built on and Alpine Host with qt6"
[[ "$(wc -w <<<"${os_version_id//\./ }")"-eq"2" ]] && alpine_min_version="310"# Account for variation in the versioning 3.1 or 3.1.0 to make sure the check works correctly
107
107
[[ "${os_id}"=~ ^(alpine)$ ]] && os_version_codename="alpine"# If alpine, set the codename to alpine. We check for min v3.10 later with codenames.
108
108
109
+
if [[ "${os_id}"=~ ^(debian|ubuntu)$ ]];then
110
+
os_arch="$(dpkg --print-architecture)"
111
+
elif [[ "${os_id}"=~ ^(alpine)$ ]];then
112
+
os_arch="$(apk info --print-arch)"
113
+
fi
114
+
109
115
# Check against allowed codenames or if the codename is alpine version greater than 3.10
printf'\n%b\n'"${unicode_green_circle}${text_bold} Using multiarch:${color_end}${color_yellow_light}arch:${color_end}${color_blue_light}${qbt_cross_name}${color_end}${color_yellow_light}host:${color_end}${color_blue_light}${os_arch}${os_id}${color_end}${color_yellow_light}target:${color_end}${color_blue_light}${qbt_cross_name}${qbt_cross_target}${color_end}"
1684
+
fi
1676
1685
case"${qbt_cross_name}"in
1677
1686
armel)
1678
1687
case"${qbt_cross_target}"in
@@ -1919,7 +1928,7 @@ _multi_arch() {
1919
1928
qbt_zlib_arch="riscv64"
1920
1929
;;&
1921
1930
debian)
1922
-
printf'\n%b\n\n'"${unicode_red_circle} The arch ${color_yellow_light}${qbt_cross_name}${color_end} can only be cross built on and Alpine OS Host"
1931
+
printf'\n%b\n\n'"${unicode_red_circle} The arch ${color_yellow_light}${qbt_cross_name}${color_end} can only be cross built on an Alpine or Ubuntu OS Host"
1923
1932
exit 1
1924
1933
;;
1925
1934
ubuntu)
@@ -1934,6 +1943,30 @@ _multi_arch() {
1934
1943
;;
1935
1944
esac
1936
1945
;;
1946
+
loongarch64)
1947
+
case"${qbt_cross_target}"in
1948
+
alpine)
1949
+
if [[ "${qbt_qt_version}"=='6' ]];then
1950
+
cross_arch="loongarch64"
1951
+
qbt_cross_host="loongarch64-linux-musl"
1952
+
qbt_zlib_arch="loongarch64"
1953
+
else
1954
+
printf'\n%b\n\n'"${unicode_red_circle} The arch ${color_yellow_light}${qbt_cross_name}${color_end} can only be cross built on and Alpine Host with qt6"
1955
+
exit 1
1956
+
fi
1957
+
;;&
1958
+
debian | ubuntu)
1959
+
printf'\n%b\n\n'"${unicode_red_circle} The arch ${color_yellow_light}${qbt_cross_name}${color_end} can only be cross built on and Alpine Host with qt6"
0 commit comments