[buug] How to tell cc compiler to put -o object file freeBSD_main.o in my ./freeBSD directory ? Or how to tell ld linker to search freeBSD_main.o in my home directory /home/Liu/AOC ?
Liu Wang
liuw at supermicro.com
Fri Sep 23 18:39:47 PDT 2011
Any help would be appreciated !
I am writing a FreeBSD driver module.
How to tell cc compiler to put -o object file freeBSD_main.o in my ./freeBSD directory ?
Or how to tell ld linker to search freeBSD_main.o in my home directory /home/Liu/AOC ?
--------------
[Liuw]# pwd
/home/Liu/AOC
-----------------------
[Liuw]# cat AOCMakefile
#
# Makefile
# AOC
# FreeBSD
# Ver:0.1
# Liu Wang
#
# kernel module
KMOD = AOC
# Enumerate source files for kernel module
SRCS = freeBSD/freeBSD_main.c
.include <bsd.kmod.mk>
--------------------------------------------
[Liuw]# ls freeBSD/
...
freeBSD_main.c
...
-----------------------------------------------------------------
[Liuw]# make -f AOCMakefile
Warning: Object directory not changed from original /home/Liu/AOC
cc -O2 -pipe -fno-strict-aliasing -Werror -D_KERNEL -DKLD_MODULE -nostdinc -I. -I@ -I@/contrib/altq -finline-limit=8000 --param inline-unit-growth=100 --param large-function-growth=1000 -fno-common -mno-align-long-strings -mpreferred-stack-boundary=2 -mno-sse -mno-mmx -msoft-float -ffreestanding -fstack-protector -std=iso9899:1999 -fstack-protector -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual -Wundef -Wno-pointer-sign -fformat-extensions -Wmissing-include-dirs -fdiagnostics-show-option -c freeBSD/freeBSD_main.c
ld -d -warn-common -r -d -o AOC_SAS2LP_MV8.kld freeBSD/freeBSD_main.o
ld: freeBSD/freeBSD_main.o: No such file: No such file or directory
*** Error code 1
Stop in /home/Liu/AOC.
Sincerely,
Liu Wang
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://buug.org/pipermail/buug/attachments/20110923/7233ac16/attachment.html>
More information about the buug
mailing list