This repository was archived by the owner on Mar 7, 2021. It is now read-only.
File tree Expand file tree Collapse file tree 7 files changed +7
-42
lines changed Expand file tree Collapse file tree 7 files changed +7
-42
lines changed Original file line number Diff line number Diff line change 44
55language : rust
66rust :
7- - nightly-2019-08-15
7+ - nightly-2019-09-11
88cache :
99 - cargo : true
1010
Original file line number Diff line number Diff line change @@ -76,7 +76,7 @@ cd hello-world
76763 . Build the static object with cargo xbuild, pointing it at our custom target
7777
7878```
79- cargo xbuild --target $(pwd)/../ x86_64-linux-kernel-module.json
79+ cargo xbuild --target x86_64-linux-kernel
8080```
8181
82824 . Build the kernel module using the Linux kernel build system (kbuild)
Original file line number Diff line number Diff line change @@ -108,7 +108,7 @@ fn main() {
108108 . derive_default ( true )
109109 . rustfmt_bindings ( true ) ;
110110
111- builder = builder. clang_arg ( "--target=x86_64-linux-kernel-module " ) ;
111+ builder = builder. clang_arg ( "--target=x86_64-linux-kernel" ) ;
112112 for arg in shlex:: split ( std:: str:: from_utf8 ( & output. stdout ) . unwrap ( ) ) . unwrap ( ) {
113113 builder = builder. clang_arg ( arg. to_string ( ) ) ;
114114 }
@@ -140,7 +140,7 @@ fn main() {
140140 let mut builder = cc:: Build :: new ( ) ;
141141 println ! ( "cargo:rerun-if-env-changed=CLANG" ) ;
142142 builder. compiler ( env:: var ( "CLANG" ) . unwrap_or ( "clang" . to_string ( ) ) ) ;
143- builder. target ( "x86_64-linux-kernel-module " ) ;
143+ builder. target ( "x86_64-linux-kernel" ) ;
144144 builder. warnings ( false ) ;
145145 builder. file ( "src/helpers.c" ) ;
146146 for arg in shlex:: split ( std:: str:: from_utf8 ( & output. stdout ) . unwrap ( ) ) . unwrap ( ) {
Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ obj-m := helloworld.o
22helloworld-objs := hello_world.rust.o
33KDIR ?= /lib/modules/$(shell uname -r) /build
44
5- % .rust.o : target/x86_64-linux-kernel-module /debug/lib% .a
5+ % .rust.o : target/x86_64-linux-kernel/debug/lib% .a
66 $(LD ) -r -o $@ --whole-archive $<
77
88all :
Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ obj-m := testmodule.o
22testmodule-objs := $(TEST_NAME ) .rust.o
33KDIR ?= /lib/modules/$(shell uname -r) /build
44
5- % .rust.o : target/x86_64-linux-kernel-module /debug/lib% .a
5+ % .rust.o : target/x86_64-linux-kernel/debug/lib% .a
66 $(LD ) -r -o $@ --whole-archive $<
77
88all :
Original file line number Diff line number Diff line change @@ -27,10 +27,7 @@ def main():
2727 print ("+ [{}]" .format (path ))
2828 run (
2929 "cargo" , "xbuild" ,
30- "--target" ,
31- os .path .join (
32- BASE_DIR , os .path .pardir , "x86_64-linux-kernel-module.json"
33- ),
30+ "--target" , "x86_64-linux-kernel" ,
3431 cwd = os .path .join (BASE_DIR , path ),
3532 environ = dict (
3633 os .environ ,
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments