diff --git a/srcpkgs/linux4.9/patches/gcc9.patch b/srcpkgs/linux4.9/patches/gcc9.patch new file mode 100644 index 0000000000..3f7ae5a428 --- /dev/null +++ b/srcpkgs/linux4.9/patches/gcc9.patch @@ -0,0 +1,19 @@ +diff --git a/include/linux/module.h b/include/linux/module.h +index 8fa38d3e7538..f5bc4c046461 100644 +--- a/include/linux/module.h ++++ b/include/linux/module.h +@@ -129,13 +129,13 @@ extern void cleanup_module(void); + #define module_init(initfn) \ + static inline initcall_t __maybe_unused __inittest(void) \ + { return initfn; } \ +- int init_module(void) __attribute__((alias(#initfn))); ++ int init_module(void) __attribute__((__copy__(initfn))) __attribute__((alias(#initfn))); + + /* This is only required if you want to be unloadable. */ + #define module_exit(exitfn) \ + static inline exitcall_t __maybe_unused __exittest(void) \ + { return exitfn; } \ +- void cleanup_module(void) __attribute__((alias(#exitfn))); ++ void cleanup_module(void) __attribute__((__copy__(exitfn))) __attribute__((alias(#exitfn))); + + #endif diff --git a/srcpkgs/linux4.9/template b/srcpkgs/linux4.9/template index 1306f15833..eaac4bb756 100644 --- a/srcpkgs/linux4.9/template +++ b/srcpkgs/linux4.9/template @@ -85,7 +85,6 @@ do_build() { fi export LDFLAGS= make ARCH=$arch ${_version} ${_cross} ${makejobs} prepare - vsed -i Makefile -e "/KBUILD_CFLAGS *:=/s/:= /:= -Wno-error /" make ARCH=$arch ${_version} ${_cross} ${makejobs} ${_args} } do_install() {