Closed GoogleCodeExporter closed 8 years ago
As mentioned in the Makefile:
XVM = sub-projects/allocators/xvmalloc-kmod
EXTRA_CFLAGS := -DCONFIG_RAMZSWAP_STATS \
-I$(PWD)/$(XVM) \
-g -Wall
XVM gives version of xvmalloc to use and extra flags adds it to include search
path.
The compilation works fine on my system. Not yet sure why its failing on your
system.
Original comment by nitingupta910@gmail.com
on 4 Dec 2009 at 1:43
ok I see that now. My problem seem to be with $(PWD), after make -C
$(KERNEL_BUILD_PATH), the $(PWD) is obviously the kernel dir and not compcache
dir.
It seems that my make is not expanding $(PWD) before (see
-I/usr/src/linux-2.6.32/sub-projects/allocators/xvmalloc-kmod below). I have to
hardcode it to get compcache to compile.
make -f /usr/src/linux-2.6.32/scripts/Makefile.build obj=/tmp/compcache
gcc -Wp,-MD,/tmp/compcache/.ramzswap_drv.o.d -nostdinc -isystem
/usr/lib/gcc/x86_64-pc-linux-gnu/4.3.4/include -Iinclude -Iinclude2
-I/usr/src/linux-2.6.32/include -I/usr/src/linux-2.6.32/arch/x86/include
-include
include/linux/autoconf.h -I/tmp/compcache -D__KERNEL__ -Wall -Wundef
-Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common
-Werror-implicit-function-declaration -Wno-format-security
-fno-delete-null-pointer-checks -Os -m64 -march=k8 -mno-red-zone -mcmodel=kernel
-funit-at-a-time -maccumulate-outgoing-args -DCONFIG_AS_CFI=1
-DCONFIG_AS_CFI_SIGNAL_FRAME=1 -pipe -Wno-sign-compare
-fno-asynchronous-unwind-tables -mno-sse -mno-mmx -mno-sse2 -mno-3dnow
-fno-stack-protector -fomit-frame-pointer -Wdeclaration-after-statement
-Wno-pointer-sign -fno-strict-overflow -DCONFIG_RAMZSWAP_STATS
-I/usr/src/linux-2.6.32/sub-projects/allocators/xvmalloc-kmod -g -Wall -DMODULE
-D"KBUILD_STR(s)=#s" -D"KBUILD_BASENAME=KBUILD_STR(ramzswap_drv)"
-D"KBUILD_MODNAME=KBUILD_STR(ramzswap)" -c -o /tmp/compcache/ramzswap_drv.o
/tmp/compcache/ramzswap_drv.c
Original comment by xming...@gmail.com
on 4 Dec 2009 at 10:16
/me wonders whats a more portable way to create such Makefile.
Original comment by nitingupta910@gmail.com
on 12 Dec 2009 at 1:56
I am using gmake on Linux, I suppose you do too. I don't understand what you
mean by
"portable", we are suppose to be on the same platform using the same make (GNU
version), unless the version of gmake does matter.
$ make -v
GNU Make 3.81
Copyright (C) 2006 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
This program built for x86_64-pc-linux-gnu
Original comment by xming...@gmail.com
on 15 Dec 2009 at 6:24
I mentioned/ "portable" in a casual sense -- i meant how to create makefile
that runs
on, at least slightly, different environments. However, it looks like there is
zero
diff here. On my system:
$ make -v
GNU Make 3.81
Copyright (C) 2006 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
This program built for x86_64-redhat-linux-gnu
Original comment by nitingupta910@gmail.com
on 15 Dec 2009 at 6:32
Original comment by nitingupta910@gmail.com
on 12 Jan 2010 at 1:31
Original issue reported on code.google.com by
xming...@gmail.com
on 3 Dec 2009 at 3:20