lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Mon, 4 Oct 2010 10:03:57 +0800
From:	Américo Wang <xiyou.wangcong@...il.com>
To:	Frank Coldwell <junkdnaseq@...il.com>
Cc:	linux-kernel@...r.kernel.org
Subject: Re: gcc compile kernel 2.6 module

On Sun, Oct 03, 2010 at 03:31:01PM +0400, Frank Coldwell wrote:
>Hi all,
>
>Does anybody know how should look gcc compilation line
>to compile kernel module for kernel 2.6
>
>In 2.4 it looks like this:
>----------------------------------------------------
>TARGET := hello-1
>WARN := -W -Wall -Wstrict-prototypes -Wmissing-prototypes
>INCLUDE := -isystem /lib/modules/`uname -r`/build/include
>CFLAGS := -O2 -DMODULE -D__KERNEL__ ${WARN} ${INCLUDE}
>CC := gcc-3.0
>
>${TARGET}.o: ${TARGET}.c
>
>.PHONY: clean
>
>clean:
>rm -rf ${TARGET}.o

In 2.6, it would be much simpiler, kbuild has some pre-defined
variables for you to use, so you don't need to, e.g. specify
INCLUDE and CFLAGS in this way.

Please read Documentation/kbuild/*.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ