50 lines
1.9 KiB
Diff
50 lines
1.9 KiB
Diff
From: Modestas Vainius <modax@debian.org>
|
|
Subject: Restore QtCore ABI compatibility with binaries built with g++ 4.3 on armel
|
|
Once Qt is rebuilt with g++ 4.4, it becomes ABI incompatible with binaries
|
|
built with g++ 4.3 on armel. That's because g++ 4.4 mangles va_list
|
|
differently on armel. As a result, affected symbols are those which have
|
|
va_list type in their argument list. Qt exports 2 such symbols:
|
|
.
|
|
qvsnprintf(char *str, size_t n, const char *fmt, va_list ap);
|
|
QString &QString::vsprintf(const char* cformat, va_list ap);
|
|
.
|
|
The patch uses .symver assembler directive to add aliases for the symbols
|
|
above. Those aliases are mangled in the same way as g++ 4.3 would mangle
|
|
original symbols.
|
|
Forward: not-needed
|
|
|
|
---
|
|
src/corelib/tools/qstring.cpp | 5 +++++
|
|
src/corelib/tools/qvsnprintf.cpp | 6 ++++++
|
|
2 files changed, 11 insertions(+)
|
|
|
|
--- a/src/corelib/tools/qstring.cpp
|
|
+++ b/src/corelib/tools/qstring.cpp
|
|
@@ -5560,6 +5560,11 @@ QString &QString::vsprintf(const char* c
|
|
return *this;
|
|
}
|
|
|
|
+// va_list mangling has been changed in g++ 4.4
|
|
+// Add ABI compatibility hack for g++ 4.3 and below.
|
|
+#if defined __ARM_EABI__ && defined __GNUC__ && (__GNUC__ > 4 || __GNUC__ == 4 && __GNUC_MINOR__ >= 4)
|
|
+__asm__(".symver _ZN7QString8vsprintfEPKcSt9__va_list, _ZN7QString8vsprintfEPKcPv@@");
|
|
+#endif
|
|
/*!
|
|
Returns the string converted to a \c{long long} using base \a
|
|
base, which is 10 by default and must be between 2 and 36, or 0.
|
|
--- a/src/corelib/tools/qvsnprintf.cpp
|
|
+++ b/src/corelib/tools/qvsnprintf.cpp
|
|
@@ -104,6 +104,12 @@ int qvsnprintf(char *str, size_t n, cons
|
|
|
|
#endif
|
|
|
|
+// va_list mangling has been changed in g++ 4.4
|
|
+// Add ABI compatibility hack for g++ 4.3 and below.
|
|
+#if defined __ARM_EABI__ && defined __GNUC__ && (__GNUC__ > 4 || __GNUC__ == 4 && __GNUC_MINOR__ >= 4)
|
|
+__asm__(".symver _Z10qvsnprintfPcjPKcSt9__va_list, _Z10qvsnprintfPcjPKcPv@@");
|
|
+#endif
|
|
+
|
|
/*!
|
|
\relates QByteArray
|
|
|