This issue is resolved in the upstream. https://llvm.org/bugs/show_bug.cgi?id=22302 See also, http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/MSVCToolChain.cpp?r1=223391&r2=226925 The following message is displayed and fails to compile. <snip> llvm[4]: Compiling MSVCToolChain.cpp for Release build if x86_64-gentoo-freebsd10.0-g++ -I/var/tmp/portage/sys-devel/llvm-3.6.0/work/llvm-3.6.0.src-abi_x86_64.amd64_fbsd/include -I/var/tmp/portage/sys-devel/llvm-3.6.0/work/llvm-3.6.0.src-abi_x86_64.amd64_fbsd/tools/clang/lib/Driver -I/var/tmp/portage/sys-devel/llvm-3.6.0/work/llvm-3.6.0.src/include -I/var/tmp/portage/sys-devel/llvm-3.6.0/work/llvm-3.6.0.src/tools/clang/lib/Driver -DNDEBUG -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/var/tmp/portage/sys-devel/llvm-3.6.0/work/llvm-3.6.0.src/tools/clang/lib/Driver/../../include -I/var/tmp/portage/sys-devel/llvm-3.6.0/work/llvm-3.6.0.src-abi_x86_64.amd64_fbsd/tools/clang/lib/Driver/../../include -std=c++11 -fvisibility-inlines-hidden -fno-exceptions -fPIC -ffunction-sections -fdata-sections -Wcast-qual -fno-strict-aliasing -O2 -pipe -O2 -pipe -O2 -pipe -O2 -pipe -O2 -pipe -O2 -pipe -O2 -pipe -O2 -pipe -I/usr/lib/libffi-3.2.1/include -pedantic -Wno-long-long -Wall -W -Wno-unused-parameter -Wwrite-strings -Wno-maybe-uninitialized -Wno-missing-field-initializers -Wno-comment -c -MMD -MP -MF "/var/tmp/portage/sys-devel/llvm-3.6.0/work/llvm-3.6.0.src-abi_x86_64.amd64_fbsd/tools/clang/lib/Driver/Release/MSVCToolChain.d.tmp" -MT "/var/tmp/portage/sys-devel/llvm-3.6.0/work/llvm-3.6.0.src-abi_x86_64.amd64_fbsd/tools/clang/lib/Driver/Release/MSVCToolChain.o" -MT "/var/tmp/portage/sys-devel/llvm-3.6.0/work/llvm-3.6.0.src-abi_x86_64.amd64_fbsd/tools/clang/lib/Driver/Release/MSVCToolChain.d" /var/tmp/portage/sys-devel/llvm-3.6.0/work/llvm-3.6.0.src/tools/clang/lib/Driver/MSVCToolChain.cpp -o /var/tmp/portage/sys-devel/llvm-3.6.0/work/llvm-3.6.0.src-abi_x86_64.amd64_fbsd/tools/clang/lib/Driver/Release/MSVCToolChain.o ; \ then /bin/mv -f "/var/tmp/portage/sys-devel/llvm-3.6.0/work/llvm-3.6.0.src-abi_x86_64.amd64_fbsd/tools/clang/lib/Driver/Release/MSVCToolChain.d.tmp" "/var/tmp/portage/sys-devel/llvm-3.6.0/work/llvm-3.6.0.src-abi_x86_64.amd64_fbsd/tools/clang/lib/Driver/Release/MSVCToolChain.d"; else /bin/rm "/var/tmp/portage/sys-devel/llvm-3.6.0/work/llvm-3.6.0.src-abi_x86_64.amd64_fbsd/tools/clang/lib/Driver/Release/MSVCToolChain.d.tmp"; exit 1; fi /var/tmp/portage/sys-devel/llvm-3.6.0/work/llvm-3.6.0.src/tools/clang/lib/Driver/MSVCToolChain.cpp: In member function 'bool clang::driver::toolchains::MSVCToolChain::getWindowsSDKDir(std::string&, int&, int&) const': /var/tmp/portage/sys-devel/llvm-3.6.0/work/llvm-3.6.0.src/tools/clang/lib/Driver/MSVCToolChain.cpp:215:5: error: '::sscanf' has not been declared ::sscanf(sdkVersion.c_str(), "v%d.%d", &major, &minor); ^ rm: /var/tmp/portage/sys-devel/llvm-3.6.0/work/llvm-3.6.0.src-abi_x86_64.amd64_fbsd/tools/clang/lib/Driver/Release/MSVCToolChain.d.tmp: No such file or directory /var/tmp/portage/sys-devel/llvm-3.6.0/work/llvm-3.6.0.src/Makefile.rules:1514: recipe for target '/var/tmp/portage/sys-devel/llvm-3.6.0/work/llvm-3.6.0.src-abi_x86_64.amd64_fbsd/tools/clang/lib/Driver/Release/MSVCToolChain.o' failed gmake[4]: *** [/var/tmp/portage/sys-devel/llvm-3.6.0/work/llvm-3.6.0.src-abi_x86_64.amd64_fbsd/tools/clang/lib/Driver/Release/MSVCToolChain.o] Error 1 gmake[4]: Leaving directory '/var/tmp/portage/sys-devel/llvm-3.6.0/work/llvm-3.6.0.src-abi_x86_64.amd64_fbsd/tools/clang/lib/Driver' /var/tmp/portage/sys-devel/llvm-3.6.0/work/llvm-3.6.0.src/Makefile.rules:932: recipe for target 'Driver/.makeall' failed gmake[3]: *** [Driver/.makeall] Error 2 gmake[3]: Leaving directory '/var/tmp/portage/sys-devel/llvm-3.6.0/work/llvm-3.6.0.src-abi_x86_64.amd64_fbsd/tools/clang/lib' /var/tmp/portage/sys-devel/llvm-3.6.0/work/llvm-3.6.0.src/Makefile.rules:873: recipe for target 'all' failed gmake[2]: *** [all] Error 1 gmake[2]: Leaving directory '/var/tmp/portage/sys-devel/llvm-3.6.0/work/llvm-3.6.0.src-abi_x86_64.amd64_fbsd/tools/clang' /var/tmp/portage/sys-devel/llvm-3.6.0/work/llvm-3.6.0.src/Makefile.rules:932: recipe for target 'clang/.makeall' failed gmake[1]: *** [clang/.makeall] Error 2 gmake[1]: Leaving directory '/var/tmp/portage/sys-devel/llvm-3.6.0/work/llvm-3.6.0.src-abi_x86_64.amd64_fbsd/tools' /var/tmp/portage/sys-devel/llvm-3.6.0/work/llvm-3.6.0.src/Makefile.rules:873: recipe for target 'all' failed gmake: *** [all] Error 1 * ERROR: sys-devel/llvm-3.6.0::gentoo failed (compile phase): * emake failed
Created attachment 402470 [details, diff] sample patch for llvm-3.6.0.ebuild
Created attachment 402472 [details, diff] files/clang-3.6-fbsd-gcc49.patch
No, I have the same problem compiling llvm-3.6.1 with gcc-4.9.2
+ 14 Jun 2015; Michał Górny <mgorny@gentoo.org> + +files/clang-3.6-fbsd-gcc49.patch, llvm-3.6.1.ebuild: + Apply upstream patch for FreeBSD gcc-4.9 build, bug #548444. + https://github.com/gentoo/gentoo-portage-rsync-mirror/pull/140 by nigoro.