summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbehlendo <behlendo@7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c>2008-02-27 00:59:48 +0000
committerbehlendo <behlendo@7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c>2008-02-27 00:59:48 +0000
commit3d4ea0ced6c2400d2b7d62d4f90b1a69d7e1a04e (patch)
tree20203a08fe43cd7855c7b23c9e1ce2f198681d14
parent564f6d1509f71f14e0bd9631363995b7f193d758 (diff)
More build fixes, I have the kernel module almost building and its
feeling a lot more sane, cleaner, and linuxy. I may finish this tonight. git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@4 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c
-rw-r--r--configure.ac6
-rw-r--r--include/linux-callb.h8
-rw-r--r--include/linux-condvar.h6
-rw-r--r--include/linux-cred.h6
-rw-r--r--include/linux-generic.h6
-rw-r--r--include/linux-kmem.h6
-rw-r--r--include/linux-kstat.h8
-rw-r--r--include/linux-mutex.h6
-rw-r--r--include/linux-random.h6
-rw-r--r--include/linux-rwlock.h8
-rw-r--r--include/linux-taskq.h8
-rw-r--r--include/linux-thread.h10
-rw-r--r--include/linux-time.h8
-rw-r--r--include/linux-timer.h6
-rw-r--r--include/linux-types.h10
-rw-r--r--include/spl.h6
-rw-r--r--include/splat-ctl.h6
-rw-r--r--src/spl/Makefile.in10
-rw-r--r--src/spl/linux-thread.c2
-rw-r--r--src/splat/Makefile.in9
20 files changed, 64 insertions, 77 deletions
diff --git a/configure.ac b/configure.ac
index 833514dc1..215b5091c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -9,8 +9,6 @@ AC_PROG_CC
AC_PROG_LIBTOOL
ver=`uname -r`
-KERNELCFLAGS=
-
kernelsrc=
kernelbuild=
AC_ARG_WITH(kernel,
@@ -98,6 +96,10 @@ else
AC_MSG_RESULT([no])
fi
+# Add "V=1" to KERNELMAKE_PARAMS to enable verbose module build
+KERNELMAKE_PARAMS=
+KERNELCPPFLAGS="-I`/bin/pwd`/include"
+
if test "$kernelbuild" != "$kernelsrc"; then
KERNELMAKE_PARAMS="$KERNELMAKE_PARAMS O=$kernelbuild"
fi
diff --git a/include/linux-callb.h b/include/linux-callb.h
index 5ddb678b3..6ffcfb76e 100644
--- a/include/linux-callb.h
+++ b/include/linux-callb.h
@@ -1,11 +1,11 @@
-#ifndef _SYS_LINUX_CALLB_H
-#define _SYS_LINUX_CALLB_H
+#ifndef _LINUX_CALLB_H
+#define _LINUX_CALLB_H
#ifdef __cplusplus
extern "C" {
#endif
-#include <sys/linux-mutex.h>
+#include <linux-mutex.h>
#define DEBUG_CALLB
@@ -41,5 +41,5 @@ typedef struct callb_cpr {
}
#endif
-#endif /* _SYS_LINUX_CALLB_H */
+#endif /* _LINUX_CALLB_H */
diff --git a/include/linux-condvar.h b/include/linux-condvar.h
index 33ad51539..e4a1779a5 100644
--- a/include/linux-condvar.h
+++ b/include/linux-condvar.h
@@ -1,5 +1,5 @@
-#ifndef _SYS_LINUX_CONDVAR_H
-#define _SYS_LINUX_CONDVAR_H
+#ifndef _LINUX_CONDVAR_H
+#define _LINUX_CONDVAR_H
#ifdef __cplusplus
extern "C" {
@@ -198,4 +198,4 @@ cv_broadcast(kcondvar_t *cvp)
if (atomic_read(&cvp->cv_waiters) > 0)
wake_up_all(&cvp->cv_event);
}
-#endif /* _SYS_LINUX_CONDVAR_H */
+#endif /* _LINUX_CONDVAR_H */
diff --git a/include/linux-cred.h b/include/linux-cred.h
index 5f308bace..d342aa016 100644
--- a/include/linux-cred.h
+++ b/include/linux-cred.h
@@ -1,5 +1,5 @@
-#ifndef _SYS_LINUX_CRED_H
-#define _SYS_LINUX_CRED_H
+#ifndef _LINUX_CRED_H
+#define _LINUX_CRED_H
#ifdef __cplusplus
extern "C" {
@@ -36,5 +36,5 @@ typedef struct cred {
}
#endif
-#endif /* _SYS_LINUX_CRED_H */
+#endif /* _LINUX_CRED_H */
diff --git a/include/linux-generic.h b/include/linux-generic.h
index 5c4f9146a..e36baef0e 100644
--- a/include/linux-generic.h
+++ b/include/linux-generic.h
@@ -1,5 +1,5 @@
-#ifndef _SYS_LINUX_GENERIC_H
-#define _SYS_LINUX_GENERIC_H
+#ifndef _LINUX_GENERIC_H
+#define _LINUX_GENERIC_H
#ifdef __cplusplus
extern "C" {
@@ -69,4 +69,4 @@ static int p0 = 0;
}
#endif
-#endif /* _SYS_LINUX_GENERIC_H */
+#endif /* _LINUX_GENERIC_H */
diff --git a/include/linux-kmem.h b/include/linux-kmem.h
index c68344cf3..f08590d1d 100644
--- a/include/linux-kmem.h
+++ b/include/linux-kmem.h
@@ -1,5 +1,5 @@
-#ifndef _SYS_LINUX_KMEM_H
-#define _SYS_LINUX_KMEM_H
+#ifndef _LINUX_KMEM_H
+#define _LINUX_KMEM_H
#ifdef __cplusplus
extern "C" {
@@ -170,4 +170,4 @@ __kmem_cache_destroy(kmem_cache_t *cache);
}
#endif
-#endif /* _SYS_LINUX_KMEM_H */
+#endif /* _LINUX_KMEM_H */
diff --git a/include/linux-kstat.h b/include/linux-kstat.h
index 738dbc867..27aefdb9d 100644
--- a/include/linux-kstat.h
+++ b/include/linux-kstat.h
@@ -1,11 +1,11 @@
-#ifndef _SYS_LINUX_KSTAT_H
-#define _SYS_LINUX_KSTAT_H
+#ifndef _LINUX_KSTAT_H
+#define _LINUX_KSTAT_H
#ifdef __cplusplus
extern "C" {
#endif
-#include <sys/linux-types.h>
+#include <linux-types.h>
/* XXX - The minimum functionality here is stubbed out but nothing works. */
@@ -132,5 +132,5 @@ kstat_delete(kstat_t *ksp)
}
#endif
-#endif /* _SYS_LINUX_KSTAT_H */
+#endif /* _LINUX_KSTAT_H */
diff --git a/include/linux-mutex.h b/include/linux-mutex.h
index 42056617f..1fea2e7d1 100644
--- a/include/linux-mutex.h
+++ b/include/linux-mutex.h
@@ -1,5 +1,5 @@
-#ifndef _SYS_LINUX_MUTEX_H
-#define _SYS_LINUX_MUTEX_H
+#ifndef _LINUX_MUTEX_H
+#define _LINUX_MUTEX_H
#ifdef __cplusplus
extern "C" {
@@ -115,4 +115,4 @@ mutex_owner(kmutex_t *mp)
}
#endif
-#endif /* _SYS_LINUX_MUTEX_H */
+#endif /* _LINUX_MUTEX_H */
diff --git a/include/linux-random.h b/include/linux-random.h
index 51233d48f..78327d0f0 100644
--- a/include/linux-random.h
+++ b/include/linux-random.h
@@ -1,5 +1,5 @@
-#ifndef _SYS_LINUX_RANDOM_H
-#define _SYS_LINUX_RANDOM_H
+#ifndef _LINUX_RANDOM_H
+#define _LINUX_RANDOM_H
#ifdef __cplusplus
extern "C" {
@@ -34,4 +34,4 @@ random_get_pseudo_bytes(uint8_t *ptr, size_t len)
}
#endif
-#endif /* _SYS_LINUX_RANDOM_H */
+#endif /* _LINUX_RANDOM_H */
diff --git a/include/linux-rwlock.h b/include/linux-rwlock.h
index a6a2787d8..6ceafddf8 100644
--- a/include/linux-rwlock.h
+++ b/include/linux-rwlock.h
@@ -1,10 +1,10 @@
-#ifndef _SYS_LINUX_RWLOCK_H
-#define _SYS_LINUX_RWLOCK_H
+#ifndef _LINUX_RWLOCK_H
+#define _LINUX_RWLOCK_H
#include <linux/slab.h>
#include <linux/rwsem.h>
#include <asm/current.h>
-#include <sys/linux-types.h>
+#include <linux-types.h>
#ifdef __cplusplus
extern "C" {
@@ -220,4 +220,4 @@ rw_owner(krwlock_t *rwlp)
}
#endif
-#endif /* _SYS_LINUX_RWLOCK_H */
+#endif /* _LINUX_RWLOCK_H */
diff --git a/include/linux-taskq.h b/include/linux-taskq.h
index 3612f84c0..9680178df 100644
--- a/include/linux-taskq.h
+++ b/include/linux-taskq.h
@@ -1,5 +1,5 @@
-#ifndef _SYS_LINUX_TASKQ_H
-#define _SYS_LINUX_TASKQ_H
+#ifndef _LINUX_TASKQ_H
+#define _LINUX_TASKQ_H
#ifdef __cplusplus
extern "C" {
@@ -23,7 +23,7 @@ extern "C" {
#include <linux/gfp.h>
#include <linux/slab.h>
#include <linux/interrupt.h>
-#include <sys/linux-types.h>
+#include <linux-types.h>
#undef DEBUG_TASKQ_UNIMPLEMENTED
@@ -83,4 +83,4 @@ extern taskq_t *__taskq_create(const char *, int, pri_t, int, int, uint_t);
}
#endif
-#endif /* _SYS_LINUX_TASKQ_H */
+#endif /* _LINUX_TASKQ_H */
diff --git a/include/linux-thread.h b/include/linux-thread.h
index dc9726322..a1e1296a3 100644
--- a/include/linux-thread.h
+++ b/include/linux-thread.h
@@ -1,5 +1,5 @@
-#ifndef _SYS_LINUX_THREAD_H
-#define _SYS_LINUX_THREAD_H
+#ifndef _LINUX_THREAD_H
+#define _LINUX_THREAD_H
#ifdef __cplusplus
extern "C" {
@@ -7,8 +7,8 @@ extern "C" {
#include <linux/mm.h>
#include <linux/spinlock.h>
-#include <sys/linux-types.h>
-#include <sys/linux-generic.h>
+#include <linux-types.h>
+#include <linux-generic.h>
/*
* Thread interfaces
@@ -44,5 +44,5 @@ kthread_t * __thread_create(caddr_t stk, size_t stksize,
}
#endif
-#endif /* _SYS_LINUX_THREAD_H */
+#endif /* _LINUX_THREAD_H */
diff --git a/include/linux-time.h b/include/linux-time.h
index c1105ab6b..792811c69 100644
--- a/include/linux-time.h
+++ b/include/linux-time.h
@@ -1,5 +1,5 @@
-#ifndef _SYS_TIME_H
-#define _SYS_TIME_H
+#ifndef _TIME_H
+#define _TIME_H
#pragma ident "%Z%%M% %I% %E% SMI" /* SVr4.0 1.16 */
@@ -13,7 +13,7 @@ extern "C" {
#endif
#include <linux/time.h>
-#include <sys/linux-types.h>
+#include <linux-types.h>
extern unsigned long long monotonic_clock(void);
typedef struct timespec timestruc_t; /* definition per SVr4 */
@@ -61,4 +61,4 @@ gethrestime_sec(void)
}
#endif
-#endif /* _SYS_TIME_H */
+#endif /* _TIME_H */
diff --git a/include/linux-timer.h b/include/linux-timer.h
index a01579519..0ff296ede 100644
--- a/include/linux-timer.h
+++ b/include/linux-timer.h
@@ -1,5 +1,5 @@
-#ifndef _SYS_LINUX_TIMER_H
-#define _SYS_LINUX_TIMER_H
+#ifndef _LINUX_TIMER_H
+#define _LINUX_TIMER_H
#ifdef __cplusplus
extern "C" {
@@ -17,5 +17,5 @@ extern "C" {
}
#endif
-#endif /* _SYS_LINUX_TIMER_H */
+#endif /* _LINUX_TIMER_H */
diff --git a/include/linux-types.h b/include/linux-types.h
index d2b12a16b..af692e364 100644
--- a/include/linux-types.h
+++ b/include/linux-types.h
@@ -1,11 +1,11 @@
-#ifndef _SYS_LINUX_TYPES_H
-#define _SYS_LINUX_TYPES_H
+#ifndef _LINUX_TYPES_H
+#define _LINUX_TYPES_H
#ifdef __cplusplus
extern "C" {
#endif
-typedef enum { B_FALSE=0, B_TRUE=1 } boolean_t;
+typedef enum { B_FALSE=0, B_TRUE=1 } boolean_t;
typedef unsigned long uintptr_t;
typedef unsigned long intptr_t;
typedef unsigned long ulong_t;
@@ -16,7 +16,7 @@ typedef unsigned long long u_offset_t;
typedef unsigned long long rlim64_t;
typedef long long longlong_t;
typedef long long offset_t;
-typedef struct task_struct kthread_t;
+typedef struct task_struct kthread_t;
typedef struct vmem { } vmem_t;
typedef short pri_t;
@@ -24,4 +24,4 @@ typedef short pri_t;
}
#endif
-#endif /* _SYS_LINUX_TYPES_H */
+#endif /* _LINUX_TYPES_H */
diff --git a/include/spl.h b/include/spl.h
index ba38e8105..26e6b8712 100644
--- a/include/spl.h
+++ b/include/spl.h
@@ -1,4 +1,4 @@
-#ifndef _SYS_SPL_H
-#define _SYS_SPL_H
+#ifndef _SPL_H
+#define _SPL_H
-#endif /* _SYS_SPL_H */
+#endif /* _SPL_H */
diff --git a/include/splat-ctl.h b/include/splat-ctl.h
index b0e2a69eb..89b8eb7b0 100644
--- a/include/splat-ctl.h
+++ b/include/splat-ctl.h
@@ -1,5 +1,5 @@
-#ifndef _SYS_KZT_H
-#define _SYS_KZT_H
+#ifndef _SPLAT_CTL_H
+#define _SPLAY_CTL_H
#ifdef _KERNEL
#include <asm/ioctls.h>
@@ -208,4 +208,4 @@ kzt_subsystem_t * kzt_time_init(void);
#endif /* _KERNEL */
-#endif /* _SYS_KZT_H */
+#endif /* _SPLAY_CTL_H */
diff --git a/src/spl/Makefile.in b/src/spl/Makefile.in
index 8a8674d6e..2a77394d3 100644
--- a/src/spl/Makefile.in
+++ b/src/spl/Makefile.in
@@ -1,17 +1,9 @@
# Makefile.in for spl kernel module
MODULES := spl
-
DISTFILES = Makefile.in \
linux-kmem.c linux-rwlock.c linux-taskq.c linux-thread.c
-
-EXTRA_CFLAGS += -I$(src)
-
-# Removed '-std=gnu99' does to compile issues with i386 SPIN_LOCK_UNLOCKED
-# EXTRA_CFLAGS += -Wall -Wno-unknown-pragmas -Wno-missing-braces \
-# -Wno-sign-compare -Wno-parentheses -Wno-uninitialized \
-# -Wno-implicit-function-declaration -Wno-unused -Wno-trigraphs \
-# -Wno-char-subscripts -Wno-switch
+CPPFLAGS += @KERNELCPPFLAGS@
# Solaris porting layer module
obj-m := spl.o
diff --git a/src/spl/linux-thread.c b/src/spl/linux-thread.c
index ad036471a..f3caa6365 100644
--- a/src/spl/linux-thread.c
+++ b/src/spl/linux-thread.c
@@ -1,4 +1,4 @@
-#include <sys/linux-thread.h>
+#include <linux-thread.h>
/*
* Thread interfaces
diff --git a/src/splat/Makefile.in b/src/splat/Makefile.in
index 758c4be0a..ebc0fb6cf 100644
--- a/src/splat/Makefile.in
+++ b/src/splat/Makefile.in
@@ -1,18 +1,11 @@
# Makefile.in for splat kernel module
MODULES := splat
-
DISTFILES = Makefile.in \
splat-kmem.c splat-random.c splat-taskq.c \
splat-time.c splat-condvar.c splat-mutex.c \
splat-rwlock.c splat-thread.c splat-ctl.c
-
-# Removed '-std=gnu99' does to compile issues with i386 SPIN_LOCK_UNLOCKED
-# EXTRA_CFLAGS += -I$(src)
-# EXTRA_CFLAGS += -Wall -Wno-unknown-pragmas -Wno-missing-braces \
-# -Wno-sign-compare -Wno-parentheses -Wno-uninitialized \
-# -Wno-implicit-function-declaration -Wno-unused -Wno-trigraphs \
-# -Wno-char-subscripts -Wno-switch
+CPPFLAGS += @KERNELCPPFLAGS@
# Solaris porting layer aggressive tests
obj-m := splat.o