[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] Make compilation of preloaded module glue -Wstrict-prototypes cl
From: |
Lennart Poettering |
Subject: |
[PATCH] Make compilation of preloaded module glue -Wstrict-prototypes clean |
Date: |
Tue, 11 Aug 2009 20:20:22 +0200 |
User-agent: |
Leviathan/19.8.0 [zh] (Cray 3; I; Solaris 4.711; Console) |
When generating the preloaded module glue code libtool generates invalid
prototypes without argument lists. When compiling with slightly fascist
compiler options (-Wstrict-prototypes) this has the effect of causing
gcc to print gazillions of warnings when the final libtool call is done
-- for each symbol one.
This fix uses GCC's diagnostic pragma to override the
-Wstrict-prototypes setting for the generated code and thus makes GCC
shut up.
I proposed a patch that replaced the invalid prototypes by valid ones
earlier this year, which didn't get accepted. So here's a patch that
leaves all the current code in place but makes sure GCC doesn't complain
anymore about it.
---
libltdl/config/ltmain.m4sh | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/libltdl/config/ltmain.m4sh b/libltdl/config/ltmain.m4sh
index ebd3909..9e4cfdb 100644
--- a/libltdl/config/ltmain.m4sh
+++ b/libltdl/config/ltmain.m4sh
@@ -1946,6 +1946,10 @@ func_generate_dlsyms ()
extern \"C\" {
#endif
+#if defined(__GNUC__) && (((__GNUC__ == 4) && (__GNUC_MINOR__ >= 4)) ||
(__GNUC__ > 4))
+#pragma GCC diagnostic ignored \"-Wstrict-prototypes\"
+#endif
+
/* External symbol declarations for the compiler. */\
"
--
1.6.4
Lennart
--
Lennart Poettering Red Hat, Inc.
lennart [at] poettering [dot] net ICQ# 11060553
http://0pointer.net/lennart/ GnuPG 0x1A015CC4
- [PATCH] Make compilation of preloaded module glue -Wstrict-prototypes clean,
Lennart Poettering <=