Add gbs arm64 build support.
authorMikhail Kurinnoi <m.kurinnoi@samsung.com>
Tue, 7 Jul 2020 14:01:55 +0000 (17:01 +0300)
committer이형주/Common Platform Lab(SR)/Staff Engineer/삼성전자 <leee.lee@samsung.com>
Tue, 14 Jul 2020 10:43:45 +0000 (19:43 +0900)
packaging/netcoredbg.spec
test-suite/sdb_run_tests.sh
test-suite/sdb_run_tizen_tests.sh

index ed88023c005187e69580b9389edd6278a5f3f7d8..7ea667e3000c2d7becf4a14eeaba2c25d974d675 100644 (file)
@@ -8,13 +8,13 @@ Source0:   netcoredbg.tar.gz
 Source1001: netcoredbg.manifest
 AutoReqProv: no
 
-
-ExcludeArch: aarch64
-
 # Accelerate clang
-%ifarch %{arm}
+%ifarch armv7l
 BuildRequires: clang-accel-armv7l-cross-arm
 %endif
+%ifarch aarch64
+BuildRequires: clang-accel-aarch64-cross-aarch64
+%endif
 
 BuildRequires: cmake
 BuildRequires: clang >= 3.8
index 84e053206209fe993655088f460e083e23657f1f..228a0526b31b75429dafd5e5880d881805566c37 100755 (executable)
@@ -102,7 +102,11 @@ fi
 if [[ -z $RPMFILE ]]; then
     # Detect target arch
     if   $SDB shell lscpu | grep -q armv7l;  then ARCH=armv7l;
-    elif $SDB shell lscpu | grep -q aarch64; then ARCH=armv7l;
+    elif $SDB shell lscpu | grep -q aarch64; then
+        # https://superuser.com/questions/791506/how-to-determine-if-a-linux-binary-file-is-32-bit-or-64-bit
+        # The 5th byte of a Linux binary executable file is 1 for a 32 bit executable, 2 for a 64 bit executable.
+        if [ $($SDB shell od -An -t x1 -j 4 -N 1 /bin/od | grep "02") ]; then ARCH=aarch64;
+        else ARCH=armv7l; fi
     elif $SDB shell lscpu | grep -q i686;    then ARCH=i686;
     else echo "Unknown target architecture"; exit 1; fi
 
index f38f66958d08c3f8f1b205a7aa9245576ed538a4..5b534e67887748eabf79c49749006a80da22e422 100755 (executable)
@@ -76,7 +76,11 @@ done
 if [[ -z $RPMFILE ]]; then
     # Detect target arch
     if   $SDB shell lscpu | grep -q armv7l;  then ARCH=armv7l;
-    elif $SDB shell lscpu | grep -q aarch64; then ARCH=armv7l;
+    elif $SDB shell lscpu | grep -q aarch64; then
+        # https://superuser.com/questions/791506/how-to-determine-if-a-linux-binary-file-is-32-bit-or-64-bit
+        # The 5th byte of a Linux binary executable file is 1 for a 32 bit executable, 2 for a 64 bit executable.
+        if [ $($SDB shell od -An -t x1 -j 4 -N 1 /bin/od | grep "02") ]; then ARCH=aarch64;
+        else ARCH=armv7l; fi
     elif $SDB shell lscpu | grep -q i686;    then ARCH=i686;
     else echo "Unknown target architecture"; exit 1; fi