mgorny 15/06/14 17:56:07 Added: clang-3.6-fbsd-gcc49.patch Log: Apply upstream patch for FreeBSD gcc-4.9 build, bug #548444. https://github.com/gentoo/gentoo-portage-rsync-mirror/pull/140 by nigoro. (Portage version: 2.2.20/cvs/Linux x86_64, signed Manifest commit with key EFB4464E!)
Revision Changes Path 1.1 sys-devel/llvm/files/clang-3.6-fbsd-gcc49.patch file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-devel/llvm/files/clang-3.6-fbsd-gcc49.patch?rev=1.1&view=markup plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-devel/llvm/files/clang-3.6-fbsd-gcc49.patch?rev=1.1&content-type=text/plain Index: clang-3.6-fbsd-gcc49.patch =================================================================== Fix build fails with using gcc-4.9 on Gentoo/FreeBSD https://bugs.gentoo.org/show_bug.cgi?id=548444 diff --git a/llvm-3.6.0.src/tools/clang/lib/Driver/MSVCToolChain.cpp b/llvm-3.6.0.src/tools/clang/lib/Driver/MSVCToolChain.cpp index d6bd5c3..372f76f 100644 --- a/llvm-3.6.0.src/tools/clang/lib/Driver/MSVCToolChain.cpp +++ b/llvm-3.6.0.src/tools/clang/lib/Driver/MSVCToolChain.cpp @@ -22,6 +22,8 @@ #include "llvm/Support/FileSystem.h" #include "llvm/Support/Process.h" +#include <cstdio> + // Include the necessary headers to interface with the Windows registry and // environment. #if defined(LLVM_ON_WIN32) @@ -212,7 +214,7 @@ bool MSVCToolChain::getWindowsSDKDir(std::string &path, int &major, "SOFTWARE\\Microsoft\\Microsoft SDKs\\Windows\\$VERSION", "InstallationFolder", path, &sdkVersion); if (!sdkVersion.empty()) - ::sscanf(sdkVersion.c_str(), "v%d.%d", &major, &minor); + std::sscanf(sdkVersion.c_str(), "v%d.%d", &major, &minor); return hasSDKDir && !path.empty(); }
