From 4b97bf170aa3e99df353512d723b8ad85aff403d Mon Sep 17 00:00:00 2001
From: Erik Verbruggen <erik.verbruggen@nokia.com>
Date: Fri, 22 Jan 2010 10:04:01 +0100
Subject: [PATCH] Define __strong and __weak to be empty macros, so we "handle"
 Apple's GC C extension.

---
 src/plugins/projectexplorer/toolchain.cpp | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/src/plugins/projectexplorer/toolchain.cpp b/src/plugins/projectexplorer/toolchain.cpp
index 0bd82b9f169..5c6d2b1b024 100644
--- a/src/plugins/projectexplorer/toolchain.cpp
+++ b/src/plugins/projectexplorer/toolchain.cpp
@@ -176,11 +176,16 @@ QByteArray GccToolChain::predefinedMacros()
         m_predefinedMacros = cpp.readAllStandardOutput();
 
 #ifdef Q_OS_MAC
+        // Turn off flag indicating Apple's blocks support
         int idx = m_predefinedMacros.indexOf("#define __BLOCKS__ 1");
         if (idx != -1) {
             idx = m_predefinedMacros.indexOf("1", idx);
             m_predefinedMacros[idx] = '0';
         }
+
+        // Define __strong and __weak (used for Apple's GC extension of C) to be empty
+        m_predefinedMacros.append("#define __strong");
+        m_predefinedMacros.append("#define __weak");
 #endif // Q_OS_MAC
     }
     return m_predefinedMacros;
-- 
GitLab