diff options
author | 2001-12-26 18:08:09 +0000 | |
---|---|---|
committer | 2001-12-26 18:08:09 +0000 | |
commit | 019b4e949d99a38a46082ec390e5162a394237aa (patch) | |
tree | 7b8843decf83bc26b9fa9e257f387536e60a5707 | |
parent | ba8ec88e0e194f2dc5928b043ee8a5a2d338afe9 (diff) |
cross compilation fixes
-rw-r--r-- | configure.in | 16 | ||||
-rw-r--r-- | kernel/Makefile.am | 3 | ||||
-rw-r--r-- | lib/fuse.c | 1 | ||||
-rw-r--r-- | util/fusermount.c | 2 |
4 files changed, 20 insertions, 2 deletions
diff --git a/configure.in b/configure.in index a6f94c8..98c88d2 100644 --- a/configure.in +++ b/configure.in @@ -5,6 +5,11 @@ AM_CONFIG_HEADER(include/config.h) AC_PROG_CC AC_PROG_RANLIB +if test -z "$LD"; then + LD=ld +fi +AC_SUBST(LD) + CFLAGS="-Wall -W -g -O2" AC_MSG_CHECKING([kernel source directory]) @@ -25,6 +30,14 @@ if test -z "$kernelsrc"; then fi fi AC_MSG_RESULT([$kernelsrc]) + +oldcc=$CC +oldcross_compiling=$cross_compiling +if test "$cross_compiling" = yes; then + CC=gcc + cross_compiling=no +fi + AC_MSG_CHECKING([kernel source version]) kernsrcver=`AC_TRY_RUN([ #include "$kernelsrc/include/linux/version.h" @@ -44,6 +57,9 @@ if test -z "$kernsrcver"; then fi AC_MSG_RESULT([$kernsrcver]) +CC=$oldcc +cross_compiling=$oldcross_compiling + KERNINCLUDE=$kernelsrc/include AC_SUBST(KERNINCLUDE) kmoduledir=/lib/modules/$kernsrcver diff --git a/kernel/Makefile.am b/kernel/Makefile.am index 033c8cb..86d0e9f 100644 --- a/kernel/Makefile.am +++ b/kernel/Makefile.am @@ -3,6 +3,7 @@ EXTRA_DIST = dev.c dir.c file.c inode.c util.c fuse_i.h CC = @CC@ +LD = @LD@ CFLAGS = -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -pipe CPPFAGS = -I@KERNINCLUDE@ -I../include -D__KERNEL__ -DMODULE -D_LOOSE_KERNEL_NAMES INSTALL = @INSTALL@ @@ -31,7 +32,7 @@ clean-local: fuse_objs = dev.o dir.o file.o inode.o util.o fuse.o: $(fuse_objs) - ld -r -o fuse.o $(fuse_objs) + $(LD) -r -o fuse.o $(fuse_objs) fuse_headers = fuse_i.h ../include/linux/fuse.h @@ -14,6 +14,7 @@ #include <unistd.h> #include <limits.h> #include <errno.h> +#include <sys/param.h> #define FUSE_MAX_PATH 4096 diff --git a/util/fusermount.c b/util/fusermount.c index 94f435f..b3f46cf 100644 --- a/util/fusermount.c +++ b/util/fusermount.c @@ -24,7 +24,7 @@ #include <fcntl.h> #include <pwd.h> #include <mntent.h> -#include <limits.h> +#include <sys/param.h> #include <sys/wait.h> #include <sys/stat.h> #include <sys/mount.h> |