linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* make gcc 3.4 compilation work
@ 2004-01-13  1:43 David Mosberger
  0 siblings, 0 replies; only message in thread
From: David Mosberger @ 2004-01-13  1:43 UTC (permalink / raw)
  To: akpm; +Cc: linux-kernel

I still need the attached "attribute((used))" declarations to get
"make modules_install" to work with the GCC pre-3.4.
Patch is relative to 2.6.1.

	--david

# This is a BitKeeper generated diff -Nru style patch.
#
# ChangeSet
#   2004/01/12 17:40:34-08:00 davidm@tiger.hpl.hp.com 
#   Add back __attribute_unused__ declarations which really are needed.
# 
# include/linux/moduleparam.h
#   2004/01/12 17:40:28-08:00 davidm@tiger.hpl.hp.com +1 -0
#   Add back __attribute_unused__ declarations which really are needed.
# 
# include/linux/module.h
#   2004/01/12 17:40:28-08:00 davidm@tiger.hpl.hp.com +3 -0
#   Add back __attribute_unused__ declarations which really are needed.
# 
diff -Nru a/include/linux/module.h b/include/linux/module.h
--- a/include/linux/module.h	Mon Jan 12 17:41:33 2004
+++ b/include/linux/module.h	Mon Jan 12 17:41:33 2004
@@ -60,6 +60,7 @@
 #define __module_cat(a,b) ___module_cat(a,b)
 #define __MODULE_INFO(tag, name, info)					  \
 static const char __module_cat(name,__LINE__)[]				  \
+  __attribute_used__							  \
   __attribute__((section(".modinfo"),unused)) = __stringify(tag) "=" info
 
 #define MODULE_GENERIC_TABLE(gtype,name)			\
@@ -142,6 +143,7 @@
 #define __CRC_SYMBOL(sym, sec)					\
 	extern void *__crc_##sym __attribute__((weak));		\
 	static const unsigned long __kcrctab_##sym		\
+	__attribute_used__					\
 	__attribute__((section("__kcrctab" sec), unused))	\
 	= (unsigned long) &__crc_##sym;
 #else
@@ -155,6 +157,7 @@
 	__attribute__((section("__ksymtab_strings")))		\
 	= MODULE_SYMBOL_PREFIX #sym;                    	\
 	static const struct kernel_symbol __ksymtab_##sym	\
+	__attribute_used__					\
 	__attribute__((section("__ksymtab" sec), unused))	\
 	= { (unsigned long)&sym, __kstrtab_##sym }
 
diff -Nru a/include/linux/moduleparam.h b/include/linux/moduleparam.h
--- a/include/linux/moduleparam.h	Mon Jan 12 17:41:33 2004
+++ b/include/linux/moduleparam.h	Mon Jan 12 17:41:33 2004
@@ -52,6 +52,7 @@
 #define __module_param_call(prefix, name, set, get, arg, perm)		\
 	static char __param_str_##name[] __initdata = prefix #name;	\
 	static struct kernel_param const __param_##name			\
+	__attribute_used__						\
     __attribute__ ((unused,__section__ ("__param"),aligned(sizeof(void *)))) \
 	= { __param_str_##name, perm, set, get, arg }
 

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2004-01-13  1:43 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-01-13  1:43 make gcc 3.4 compilation work David Mosberger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).