Skip to content

Commit c8eeba8

Browse files
committed
Debugging: solve problem due of incomplete implementation of -march=native on arm64 compiler producing SIGILL
1 parent 35fc40f commit c8eeba8

File tree

2 files changed

+28
-1
lines changed

2 files changed

+28
-1
lines changed

.github/workflows/make_ubuntu_amd64_22_04_deb.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,3 +27,19 @@ jobs:
2727
with:
2828
files: deb/tssh_ubuntu_amd64_22_04*.deb
2929

30+
Create_PackagesARM64:
31+
name: Create Package arm64
32+
runs-on: ubuntu-22.04-arm
33+
steps:
34+
- name: Checkout code
35+
uses: actions/checkout@v4
36+
with:
37+
fetch-depth: 0
38+
39+
- name: Deb Builder
40+
run: bash ./scripts/build_ubuntu_arm64.sh
41+
42+
- name: Release the Package
43+
uses: softprops/action-gh-release@v2
44+
with:
45+
files: deb/tssh_ubuntu_arm64_22_04*.deb

configure.ac

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,10 +55,21 @@ case $host_os in
5555
;;
5656
linux*)
5757
OPTIMIZATION="-O3 -march=native "
58+
CPU_OPTIMIZATION=""
59+
CPU_TYPE="$(uname -p)"
60+
case ${CPU_TYPE} in
61+
x86_64)
62+
CPU_OPTIMIZATION="$(g++ -march=native -E - < /dev/null > /dev/null 2>&1 && echo '-march=native')"
63+
;;
64+
aarch64)
65+
CPU_OPTIMIZATION="$(g++ -mcpu=native -E - < /dev/null > /dev/null 2>&1 && echo '-mcpu=native')"
66+
;;
67+
esac
68+
5869
LTO="$([[ "x$WITH_LTO" != "x" ]] && g++ -flto -E - < /dev/null > /dev/null 2>&1 && echo '-flto')"
5970
if test "x$CC" = xgcc; then
6071
CXXFLAGS=" -std=c++20 -g -Wall -Wextra \
61-
-D_FORTIFY_SOURCE=2 ${OPTIMIZATION} ${LTO} -fstack-protector \
72+
-D_FORTIFY_SOURCE=2 ${OPTIMIZATION} ${CPU_OPTIMIZATION} ${LTO} -fstack-protector \
6273
--param=ssp-buffer-size=4 -Wformat -Werror=format-security ${INC_SSL_CUSTOM}"
6374
LDFLAGS="$LDFLAGS ${LIB_SSL_CUSTOM}-Wl,-z,relro"
6475
else

0 commit comments

Comments
 (0)