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
This commit is contained in:
behlendo 2008-02-27 00:59:48 +00:00
parent 564f6d1509
commit 3d4ea0ced6
20 changed files with 64 additions and 77 deletions

View File

@ -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

View File

@ -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 */

View File

@ -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 */

View File

@ -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 */

View File

@ -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 */

View File

@ -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 */

View File

@ -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 */

View File

@ -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 */

View File

@ -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 */

View File

@ -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 */

View File

@ -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 */

View File

@ -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 */

View File

@ -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 */

View File

@ -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 */

View File

@ -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 */

View File

@ -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 */

View File

@ -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 */

View File

@ -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

View File

@ -1,4 +1,4 @@
#include <sys/linux-thread.h>
#include <linux-thread.h>
/*
* Thread interfaces

View File

@ -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