@@ -2841,6 +2841,18 @@ toolchain "i686_w64_mingw32"
2841
2841
set_toolset " ar" " i686-w64-mingw32-ar" " ar"
2842
2842
toolchain_end
2843
2843
2844
+ # aarch64 toolchain (aarch64)
2845
+ toolchain " aarch64_linux_gnu"
2846
+ set_toolset " as" " aarch64-linux-gnu-gcc"
2847
+ set_toolset " cc" " aarch64-linux-gnu-gcc"
2848
+ set_toolset " cxx" " aarch64-linux-gnu-gcc" " aarch64-linux-gnu-g++"
2849
+ set_toolset " mm" " aarch64-linux-gnu-gcc"
2850
+ set_toolset " mxx" " aarch64-linux-gnu-gcc" " aarch64-linux-gnu-g++"
2851
+ set_toolset " ld" " aarch64-linux-gnu-g++" " aarch64-linux-gnu-gcc"
2852
+ set_toolset " sh" " aarch64-linux-gnu-g++" " aarch64-linux-gnu-gcc"
2853
+ set_toolset " ar" " aarch64-linux-gnu-ar" " ar"
2854
+ toolchain_end
2855
+
2844
2856
# check platform
2845
2857
_check_platform () {
2846
2858
if test " x${_target_plat} " = " x" ; then
@@ -3157,6 +3169,11 @@ _toolchain_detect() {
3157
3169
else
3158
3170
toolchains=" x86_64_w64_mingw32"
3159
3171
fi
3172
+ elif is_plat " linux" && ! is_arch " ${os_arch} " ; then
3173
+ toolchains=" envs"
3174
+ if is_arch " arm64" ; then
3175
+ toolchains=" ${toolchains} aarch64_linux_gnu"
3176
+ fi
3160
3177
else
3161
3178
toolchains=" envs gcc clang"
3162
3179
fi
@@ -3715,18 +3732,19 @@ _gmake_add_switches() {
3715
3732
echo " INSTALLDIR:=\$ (DESTDIR)" >> " ${xmake_sh_makefile} "
3716
3733
echo " endif" >> " ${xmake_sh_makefile} "
3717
3734
echo " " >> " ${xmake_sh_makefile} "
3735
+ echo " ifeq (\$ (PREFIX),)" >> " ${xmake_sh_makefile} "
3736
+ echo " PREFIX=${_install_prefix_default} " >> " ${xmake_sh_makefile} "
3737
+ echo " endif" >> " ${xmake_sh_makefile} "
3738
+ echo " " >> " ${xmake_sh_makefile} "
3718
3739
echo " ifneq (\$ (PREFIX),)" >> " ${xmake_sh_makefile} "
3719
3740
echo " ifneq (\$ (INSTALLDIR),)" >> " ${xmake_sh_makefile} "
3720
- echo " INSTALLDIR:=\$ (INSTALLDIR)/\$ (PREFIX)" >> " ${xmake_sh_makefile} "
3741
+ echo " PREFIX_:=\$ (patsubst /%,%,\$ (PREFIX))" >> " ${xmake_sh_makefile} "
3742
+ echo " INSTALLDIR:=\$ (INSTALLDIR)/\$ (PREFIX_)" >> " ${xmake_sh_makefile} "
3721
3743
echo " else" >> " ${xmake_sh_makefile} "
3722
3744
echo " INSTALLDIR:=\$ (PREFIX)" >> " ${xmake_sh_makefile} "
3723
3745
echo " endif" >> " ${xmake_sh_makefile} "
3724
3746
echo " endif" >> " ${xmake_sh_makefile} "
3725
3747
echo " " >> " ${xmake_sh_makefile} "
3726
- echo " ifeq (\$ (INSTALLDIR),)" >> " ${xmake_sh_makefile} "
3727
- echo " INSTALLDIR=${_install_prefix_default} " >> " ${xmake_sh_makefile} "
3728
- echo " endif" >> " ${xmake_sh_makefile} "
3729
- echo " " >> " ${xmake_sh_makefile} "
3730
3748
}
3731
3749
3732
3750
_gmake_add_flags () {
@@ -3957,10 +3975,12 @@ _gmake_add_install_target() {
3957
3975
_get_target_item " ${target} " " kind" ; local targetkind=" ${_ret} "
3958
3976
if test_eq " ${targetkind} " " binary" ; then
3959
3977
string_replace " ${_install_bindir_default} " " \$ {prefix}" " ${installdir} " ; _install_bindir_default=" ${_ret} "
3978
+ print " \t@echo installing ${targetfile} to ${_install_bindir_default} " >> " ${xmake_sh_makefile} "
3960
3979
print " \t@mkdir -p ${_install_bindir_default} " >> " ${xmake_sh_makefile} "
3961
3980
print " \t@cp -p ${targetfile} ${_install_bindir_default} /${filename} " >> " ${xmake_sh_makefile} "
3962
3981
elif test_eq " ${targetkind} " " static" || test_eq " ${targetkind} " " shared" ; then
3963
3982
string_replace " ${_install_libdir_default} " " \$ {prefix}" " ${installdir} " ; _install_libdir_default=" ${_ret} "
3983
+ print " \t@echo installing ${targetfile} to ${_install_libdir_default} " >> " ${xmake_sh_makefile} "
3964
3984
print " \t@mkdir -p ${_install_libdir_default} " >> " ${xmake_sh_makefile} "
3965
3985
print " \t@cp -p ${targetfile} ${_install_libdir_default} /${filename} " >> " ${xmake_sh_makefile} "
3966
3986
fi
0 commit comments