Skip to contentSkip to conversation

compat: fix compile errors when assembly is built into modules

PATCH In review Felix Fietkau 2 participants 2 messages Jan 9, 2013 – Jan 23, 2013

lore
Share & tools
lore
#0 lore raw

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.

---
 include/linux/compat-2.6.h | 4 ++++
 1 file changed, 4 insertions(+)
include/linux/compat-2.6.h +4 -0
index 00a5eda..34c49e6 100644
@@ -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
#1 lore raw
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.

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