diff options
| author | 童宗振 <[email protected]> | 2024-08-06 02:13:16 +0000 |
|---|---|---|
| committer | 童宗振 <[email protected]> | 2024-08-06 02:13:16 +0000 |
| commit | e279579397030323cb451cba23660ac823b3fab0 (patch) | |
| tree | 3687f0df72b291dbed01bb7e26d5cb3c6d8d5a10 /tools | |
| parent | cb4c34cf1904910b622b36454f378630e11731b3 (diff) | |
Build in aarch64
Diffstat (limited to 'tools')
| -rw-r--r-- | tools/monit_device/CMakeLists.txt | 2 | ||||
| -rw-r--r-- | tools/monit_obp/CMakeLists.txt | 2 | ||||
| -rw-r--r-- | tools/monit_stream/CMakeLists.txt | 2 | ||||
| -rwxr-xr-x | tools/mrmarch/mrmarch.in | 26 |
4 files changed, 21 insertions, 11 deletions
diff --git a/tools/monit_device/CMakeLists.txt b/tools/monit_device/CMakeLists.txt index daa742c..562e793 100644 --- a/tools/monit_device/CMakeLists.txt +++ b/tools/monit_device/CMakeLists.txt @@ -1,7 +1,7 @@ set(PI_DIST_PATH ${CMAKE_CURRENT_BINARY_DIR}/pi_dist) add_custom_command(OUTPUT ${PI_DIST_PATH}/monit_device - COMMAND nuitka3 --standalone --onefile + COMMAND ${NUITKA_COMMAND} --standalone --onefile --product-name=${MACHINE} --output-dir=${PI_DIST_PATH} -o monit_device diff --git a/tools/monit_obp/CMakeLists.txt b/tools/monit_obp/CMakeLists.txt index 4476e38..32e3c2f 100644 --- a/tools/monit_obp/CMakeLists.txt +++ b/tools/monit_obp/CMakeLists.txt @@ -1,7 +1,7 @@ set(PI_DIST_PATH ${CMAKE_CURRENT_BINARY_DIR}/pi_dist) add_custom_command(OUTPUT ${PI_DIST_PATH}/monit_obp - COMMAND nuitka3 --standalone --onefile + COMMAND ${NUITKA_COMMAND} --standalone --onefile --product-name=${MACHINE} --output-dir=${PI_DIST_PATH} -o monit_obp diff --git a/tools/monit_stream/CMakeLists.txt b/tools/monit_stream/CMakeLists.txt index 77c435e..eef43b4 100644 --- a/tools/monit_stream/CMakeLists.txt +++ b/tools/monit_stream/CMakeLists.txt @@ -1,7 +1,7 @@ set(PI_DIST_PATH ${CMAKE_CURRENT_BINARY_DIR}/pi_dist) add_custom_command(OUTPUT ${PI_DIST_PATH}/monit_stream - COMMAND nuitka3 --standalone --onefile + COMMAND ${NUITKA_COMMAND} --standalone --onefile --product-name=${MACHINE} --output-dir=${PI_DIST_PATH} -o monit_stream diff --git a/tools/mrmarch/mrmarch.in b/tools/mrmarch/mrmarch.in index 99f3a9a..4b9b2c3 100755 --- a/tools/mrmarch/mrmarch.in +++ b/tools/mrmarch/mrmarch.in @@ -6,6 +6,7 @@ set_flag=false display_flag=false config_flag=false help_flag=false +arch=$(uname -m) march="" # Handle command-line arguments @@ -70,16 +71,25 @@ if [ "$config_flag" = true ]; then fi if [ "$auto_flag" = true ]; then - march=$(gcc -march=native -Q --help=target | grep -- '-march=' | cut -f3) + # march=$(gcc -march=native -Q --help=target | grep -- '-march=' | cut -f3) + march=$(gcc -march=native -Q --help=target | grep -- '-march=' | head -n 1 | awk -F '-march=' '{print $2}' | awk '{$1=$1};1') fi -if [ "$march" == "icelake-server" ]; then - update-alternatives --set mrzcpd /opt/tsg/mrzcpd/icelake-server/bin/mrzcpd --altdir @CMAKE_INSTALL_PREFIX@/altdir - exit -elif [ "$march" == "znver1" ]; then - update-alternatives --set mrzcpd /opt/tsg/mrzcpd/znver1/bin/mrzcpd --altdir @CMAKE_INSTALL_PREFIX@/altdir +echo "current CPU architecture is $arch." +echo "current CPU micro architecture is $march." + +if [ "$arch" == "aarch64" ]; then + update-alternatives --set mrzcpd /opt/tsg/mrzcpd/aarch64/bin/mrzcpd --altdir @CMAKE_INSTALL_PREFIX@/altdir exit else - update-alternatives --set mrzcpd /opt/tsg/mrzcpd/corei7/bin/mrzcpd --altdir @CMAKE_INSTALL_PREFIX@/altdir - exit + if [ "$march" == "icelake-server" ]; then + update-alternatives --set mrzcpd /opt/tsg/mrzcpd/icelake-server/bin/mrzcpd --altdir @CMAKE_INSTALL_PREFIX@/altdir + exit + elif [ "$march" == "znver1" ]; then + update-alternatives --set mrzcpd /opt/tsg/mrzcpd/znver1/bin/mrzcpd --altdir @CMAKE_INSTALL_PREFIX@/altdir + exit + else + update-alternatives --set mrzcpd /opt/tsg/mrzcpd/corei7/bin/mrzcpd --altdir @CMAKE_INSTALL_PREFIX@/altdir + exit + fi fi |
