Blame fix-fio-globals.patch

Eric Sandeen 3e758d
[PATCH] fio: remove duplicate global definition of tsc_reliable
Eric Sandeen 3e758d
Eric Sandeen 3e758d
From: Eric Sandeen <sandeen@redhat.com>
Eric Sandeen 3e758d
Eric Sandeen 3e758d
Newer gcc v10 complains about globals being defined twice due to
Eric Sandeen 3e758d
a new default -fno-common flag. This causes build failures:
Eric Sandeen 3e758d
Eric Sandeen 3e758d
  LINK t/fio-dedupe
Eric Sandeen 3e758d
/usr/bin/ld: t/arch.o:(.bss+0x4): multiple definition of `tsc_reliable'; gettime.o:(.bss+0x4): first defined here
Eric Sandeen 3e758d
collect2: error: ld returned 1 exit status
Eric Sandeen 3e758d
make: *** [Makefile:499: t/fio-dedupe] Error 1
Eric Sandeen 3e758d
Eric Sandeen 3e758d
Each of the tests which call arch_init() to initialize tsc_reliable:
Eric Sandeen 3e758d
Eric Sandeen 3e758d
  File          Function       Line
Eric Sandeen 3e758d
1 t/dedupe.c    main           536 arch_init(argv);
Eric Sandeen 3e758d
2 t/lfsr-test.c main            37 arch_init(argv);
Eric Sandeen 3e758d
3 t/stest.c     main            86 arch_init(argv);
Eric Sandeen 3e758d
Eric Sandeen 3e758d
already link with gettime.o which defines tsc_reliable,
Eric Sandeen 3e758d
so there is no need to provide it from t/arch.c
Eric Sandeen 3e758d
Eric Sandeen 3e758d
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Eric Sandeen 3e758d
---
Eric Sandeen 3e758d
Eric Sandeen 3e758d
I can't really tell if this is the right fix across all arches, but
Eric Sandeen 3e758d
maybe someone smarter than me can sort it out? 
Eric Sandeen 3e758d
Eric Sandeen 3e758d
diff --git a/t/arch.c b/t/arch.c
Eric Sandeen 3e758d
index bd28a848..a72cef3a 100644
Eric Sandeen 3e758d
--- a/t/arch.c
Eric Sandeen 3e758d
+++ b/t/arch.c
Eric Sandeen 3e758d
@@ -1,5 +1,4 @@
Eric Sandeen 3e758d
 #include "../arch/arch.h"
Eric Sandeen 3e758d
 
Eric Sandeen 3e758d
 unsigned long arch_flags = 0;
Eric Sandeen 3e758d
-bool tsc_reliable;
Eric Sandeen 3e758d
 int arch_random;
Eric Sandeen 3e758d