[Development] Qt-5.1, qglobal.h and PIC detection
Thiago Macieira
thiago.macieira at intel.com
Wed Nov 6 00:26:46 CET 2013
On quarta-feira, 6 de novembro de 2013 12:17:56, Christian Gagneraud wrote:
> I'm using CLang build-analize tool, and when I switched from Qt 4.8 to
> Qt 5.1 (insalled from Qt project's download area), I got a Qt #error,
> basically the code is built with -fPIC, but CLang doesn't define a PIC
> macro, so the build fails due to a check in qglobal.h (see details below).
Yes it does.
linux $ diff -U0 <(clang -xc++ -dM -E /dev/null) <(clang -fPIC -xc++ -dM -E
/dev/null)
--- /proc/self/fd/11 2013-11-05 15:25:03.872215425 -0800
+++ /proc/self/fd/12 2013-11-05 15:25:03.872215425 -0800
@@ -103,0 +104 @@
+#define __PIC__ 2
@@ -156,0 +158 @@
+#define __pic__ 2
mac $ diff -U0 <(clang -xc++ -dM -E /dev/null) <(clang -fPIC -xc++ -dM -E
/dev/null)
--- /dev/fd/11 2013-11-05 15:25:49.000000000 -0800
+++ /dev/fd/12 2013-11-05 15:25:49.000000000 -0800
@@ -90 +90 @@
-#define __PIC__ 1
+#define __PIC__ 2
@@ -143 +143 @@
-#define __pic__ 1
+#define __pic__ 2
--
Thiago Macieira - thiago.macieira (AT) intel.com
Software Architect - Intel Open Source Technology Center
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 190 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.qt-project.org/pipermail/development/attachments/20131105/e6968953/attachment.sig>
More information about the Development
mailing list