compat: fix compile errors when assembly is built into modules
PATCH 1/1 compat: fix compile errors when assembly is built into modules
On powerpc, modules can be compiled and linked with an assembly file, adding missing symbols that the compiler references when using -Os.
Signed-off-by Felix Fietkau <[email protected]>
--- include/linux/compat-2.6.h | 4 ++++ 1 file changed, 4 insertions(+)
include/linux/compat-2.6.h +4 -0
@@ -1,6 +1,8 @@#ifndef LINUX_26_COMPAT_H #define LINUX_26_COMPAT_H +#ifndef __ASSEMBLY__ +#include <linux/version.h> #if (LINUX_VERSION_CODE >=KERNEL_VERSION (3 ,1 ,0 ))#include <linux/kconfig.h>
@@ -68,4 +70,6 @@ void compat_dependency_symbol(void);#include <linux/compat-3.7.h> #include <linux/compat-3.8.h> +#endif /* __ASSEMBLY__ */ +#endif /* LINUX_26_COMPAT_H */
Signature · 1 line
1.8.0.2
Quoted 4 lines · Felix Fietkau
On powerpc, modules can be compiled and linked with an assembly file, adding missing symbols that the compiler references when using -Os.
Signed-off-by Felix Fietkau <[email protected]>
Thanks, I've applied this into my tree but I will send a respective annotated patch with ckmake result to Hauke now that he's maintaining compat / compat-drivers. I'll submit this patch and the backported versions to Hauke / the list.
Luis