Fix gcc14 build on cpuinfo accepted/tizen/unified/toolchain/20240610.172731 accepted/tizen/unified/x/20240610.223313
authorChunseok Lee <chunseok.lee@samsung.com>
Mon, 10 Jun 2024 07:26:46 +0000 (16:26 +0900)
committerChunseok Lee <chunseok.lee@samsung.com>
Mon, 10 Jun 2024 07:27:28 +0000 (16:27 +0900)
Signed-off-by: Chunseok Lee <chunseok.lee@samsung.com>
packaging/nnfw.spec
packaging/syscall.patch [new file with mode: 0644]

index 3d12895..6466196 100644 (file)
@@ -31,6 +31,7 @@ Source3018: XNNPACK.tar.gz
 Source3019: FLATBUFFERS-2.0.tar.gz
 Source3020: NEON2SSE.tar.gz
 Source3021: remove_const.patch
+Source3022: syscall.patch
 
 %{!?build_type:     %define build_type      Release}
 %{!?npud_build:     %define npud_build      1}
@@ -216,9 +217,16 @@ tar -xf %{SOURCE3018} -C ./externals
 tar -xf %{SOURCE3019} -C ./externals
 tar -xf %{SOURCE3020} -C ./externals
 cp  -xf %{SOURCE3021} ./externals
-cd externals/FLATBUFFERS-2.0
-pwd
+cp  -xf %{SOURCE3022} ./externals
+pushd externals/FLATBUFFERS-2.0
 patch -p1 < ../remove_const.patch
+popd
+
+%ifarch riscv64
+pushd externals/CPUINFO
+patch -p1 < ../syscall.patch
+popd
+%endif
 
 %build
 %ifarch arm armv7l armv7hl aarch64 x86_64 %ix86 riscv64
diff --git a/packaging/syscall.patch b/packaging/syscall.patch
new file mode 100644 (file)
index 0000000..09c8167
--- /dev/null
@@ -0,0 +1,7 @@
+--- a/src/api.c
++++ b/src/api.c
+@@ -1,3 +1,4 @@
++#define _GNU_SOURCE
+ #include <stdbool.h>
+ #include <stddef.h>