summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Olbrich <m.olbrich@pengutronix.de>2020-10-29 16:44:52 +0100
committerMichael Olbrich <m.olbrich@pengutronix.de>2020-10-30 12:48:20 +0100
commit4b4a3f14c173c9978a274a718987675000b1b6b7 (patch)
tree17a0785270d005a320b53d4f7bce0ff66bcec50b
parent7deef67a8c4b261987cef2b2bdb467d3f0124860 (diff)
downloadptxdist-4b4a3f14c173c9978a274a718987675000b1b6b7.tar.gz
ptxdist-4b4a3f14c173c9978a274a718987675000b1b6b7.tar.xz
fio: fix building on ARMv5 and PPC
Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
-rw-r--r--patches/fio-3.23/0001-use-latomic-when-necessary.patch41
-rw-r--r--patches/fio-3.23/series4
2 files changed, 45 insertions, 0 deletions
diff --git a/patches/fio-3.23/0001-use-latomic-when-necessary.patch b/patches/fio-3.23/0001-use-latomic-when-necessary.patch
new file mode 100644
index 000000000..d8265106d
--- /dev/null
+++ b/patches/fio-3.23/0001-use-latomic-when-necessary.patch
@@ -0,0 +1,41 @@
+From: Michael Olbrich <m.olbrich@pengutronix.de>
+Date: Thu, 29 Oct 2020 16:43:00 +0100
+Subject: [PATCH] use -latomic when necessary
+
+Some architectures such as ARMv5 require libatomic for 64 bit atomics.
+Expand the the configure check to add -latomic to $LIBS if necessary.
+
+Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
+---
+ configure | 13 ++++++++-----
+ 1 file changed, 8 insertions(+), 5 deletions(-)
+
+diff --git a/configure b/configure
+index 6d672fe5ebda..4103a5af66ed 100755
+--- a/configure
++++ b/configure
+@@ -578,16 +578,19 @@ cat > $TMPC <<EOF
+ #include <stdatomic.h>
+ int main(void)
+ {
+- _Atomic unsigned v;
++ _Atomic unsigned long long v;
+ atomic_load(&v);
+ return 0;
+ }
+ EOF
+ if ! compile_prog "" "" "C11 atomics"; then
+- echo
+- echo "Your compiler doesn't support C11 atomics. gcc 4.9/clang 3.6 are the"
+- echo "minimum versions with it - perhaps your compiler is too old?"
+- fatal "C11 atomics support not found"
++ if ! compile_prog "" "-latomic" "C11 atomics"; then
++ echo
++ echo "Your compiler doesn't support C11 atomics. gcc 4.9/clang 3.6 are the"
++ echo "minimum versions with it - perhaps your compiler is too old?"
++ fatal "C11 atomics support not found"
++ fi
++ LIBS="-latomic $LIBS"
+ fi
+
+
diff --git a/patches/fio-3.23/series b/patches/fio-3.23/series
new file mode 100644
index 000000000..9d54f50bf
--- /dev/null
+++ b/patches/fio-3.23/series
@@ -0,0 +1,4 @@
+# generated by git-ptx-patches
+#tag:base --start-number 1
+0001-use-latomic-when-necessary.patch
+# 1dd5e6f5d642bbc15e059db1ee3b7489 - git-ptx-patches magic