SuperH compile currently fails with:
gettime.o: In function fio_gettime':
/home/thomas/projets/buildroot/output/build/fio-fio-2.7/gettime.c:163: undefined reference to arch_flags'
gettime.o: In function utime_since_now':
/home/thomas/projets/buildroot/output/build/fio-fio-2.7/gettime.c:164: undefined reference to arch_flags'
gettime.o: In function mtime_since_now':
/home/thomas/projets/buildroot/output/build/fio-fio-2.7/gettime.c:164: undefined reference to arch_flags'
gettime.o: In function time_since_now':
/home/thomas/projets/buildroot/output/build/fio-fio-2.7/gettime.c:164: undefined reference to arch_flags'
mutex.o: In function fio_mutex_up':
/home/thomas/projets/buildroot/output/build/fio-fio-2.7/mutex.c:189: undefined reference to arch_flags'
collect2: error: ld returned 1 exit status
Makefile:375: recipe for target 't/stest' failed
make[2]: *** [t/stest] Error 1
make[2]: *** Waiting for unfinished jobs....
Fix that by ensuring we have a stub arch.o with the necessary arch flags
for the standalone test programs.
Signed-off-by: Jens Axboe <axboe@fb.com>
-include $(OBJS:.o=.d)
T_SMALLOC_OBJS = t/stest.o
-include $(OBJS:.o=.d)
T_SMALLOC_OBJS = t/stest.o
-T_SMALLOC_OBJS += gettime.o mutex.o smalloc.o t/log.o t/debug.o
+T_SMALLOC_OBJS += gettime.o mutex.o smalloc.o t/log.o t/debug.o t/arch.o
T_SMALLOC_PROGS = t/stest
T_IEEE_OBJS = t/ieee754.o
T_SMALLOC_PROGS = t/stest
T_IEEE_OBJS = t/ieee754.o
T_AXMAP_PROGS = t/axmap
T_LFSR_TEST_OBJS = t/lfsr-test.o
T_AXMAP_PROGS = t/axmap
T_LFSR_TEST_OBJS = t/lfsr-test.o
-T_LFSR_TEST_OBJS += lib/lfsr.o gettime.o t/log.o t/debug.o
+T_LFSR_TEST_OBJS += lib/lfsr.o gettime.o t/log.o t/debug.o t/arch.o
T_LFSR_TEST_PROGS = t/lfsr-test
T_GEN_RAND_OBJS = t/gen-rand.o
T_LFSR_TEST_PROGS = t/lfsr-test
T_GEN_RAND_OBJS = t/gen-rand.o
T_DEDUPE_OBJS = t/dedupe.o
T_DEDUPE_OBJS += lib/rbtree.o t/log.o mutex.o smalloc.o gettime.o crc/md5.o \
T_DEDUPE_OBJS = t/dedupe.o
T_DEDUPE_OBJS += lib/rbtree.o t/log.o mutex.o smalloc.o gettime.o crc/md5.o \
- lib/memalign.o lib/bloom.o t/debug.o crc/xxhash.o \
+ lib/memalign.o lib/bloom.o t/debug.o crc/xxhash.o t/arch.o \
crc/murmur3.o crc/crc32c.o crc/crc32c-intel.o crc/fnv.o
T_DEDUPE_PROGS = t/fio-dedupe
crc/murmur3.o crc/crc32c.o crc/crc32c-intel.o crc/fnv.o
T_DEDUPE_PROGS = t/fio-dedupe
--- /dev/null
+#include "../arch/arch.h"
+
+unsigned long arch_flags = 0;
+int tsc_reliable;
+int arch_random;
uint64_t nextents = 0, nchunks = 0;
int c, ret;
uint64_t nextents = 0, nchunks = 0;
int c, ret;
debug_init();
while ((c = getopt(argc, argv, "b:t:d:o:c:p:B:")) != -1) {
debug_init();
while ((c = getopt(argc, argv, "b:t:d:o:c:p:B:")) != -1) {
void *v = NULL, *v_start;
double total, mean;
void *v = NULL, *v_start;
double total, mean;
/* Read arguments */
switch (argc) {
case 5: if (strncmp(argv[4], "verify", 7) == 0)
/* Read arguments */
switch (argc) {
case 5: if (strncmp(argv[4], "verify", 7) == 0)
#include "../smalloc.h"
#include "../flist.h"
#include "../smalloc.h"
#include "../flist.h"
+#include "../arch/arch.h"
#include "debug.h"
#define MAGIC1 0xa9b1c8d2
#include "debug.h"
#define MAGIC1 0xa9b1c8d2
int main(int argc, char *argv[])
{
int main(int argc, char *argv[])
{