Date: Thu, 23 Aug 2012 21:04:17 +0000 (UTC) From: Brooks Davis <brooks@FreeBSD.org> To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r303040 - in head: devel/llvm-devel devel/llvm-devel/files lang/clang-devel lang/clang-devel/files Message-ID: <201208232104.q7NL4HoY094683@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: brooks Date: Thu Aug 23 21:04:16 2012 New Revision: 303040 URL: http://svn.freebsd.org/changeset/ports/303040 Log: Update LLVM and Clang to r162438 plus a couple patchs to make it possible to target MIPS with FreeBSD's base binutils. Added: head/devel/llvm-devel/files/patch-lib_Target_Mips_MipsTargetMachine.cpp (contents, props changed) head/lang/clang-devel/files/mips-long-double-hack.diff (contents, props changed) head/lang/clang-devel/files/patch-tools_clang_lib_Driver_Tools.cpp (contents, props changed) Modified: head/devel/llvm-devel/Makefile.svn_rev head/devel/llvm-devel/distinfo head/devel/llvm-devel/pkg-plist head/lang/clang-devel/Makefile head/lang/clang-devel/distinfo head/lang/clang-devel/files/patch-tools_clang_lib_Sema_SemaChecking.cpp head/lang/clang-devel/pkg-plist Modified: head/devel/llvm-devel/Makefile.svn_rev ============================================================================== --- head/devel/llvm-devel/Makefile.svn_rev Thu Aug 23 21:02:09 2012 (r303039) +++ head/devel/llvm-devel/Makefile.svn_rev Thu Aug 23 21:04:16 2012 (r303040) @@ -1 +1 @@ -SVN_REV= 160283 +SVN_REV= 162438 Modified: head/devel/llvm-devel/distinfo ============================================================================== --- head/devel/llvm-devel/distinfo Thu Aug 23 21:02:09 2012 (r303039) +++ head/devel/llvm-devel/distinfo Thu Aug 23 21:04:16 2012 (r303040) @@ -1,2 +1,2 @@ -SHA256 (llvm-3.2.r160283.tar.bz2) = 3dfae804e7765bfacfb4347ada59e174fa9f4a272ee86b17ae6882e5f3e56ca7 -SIZE (llvm-3.2.r160283.tar.bz2) = 8961712 +SHA256 (llvm-3.2.r162438.tar.bz2) = 6e5bd1121b6af1e89ace5f799febeec8278fa2e24fce6f69f5d840a42ac75617 +SIZE (llvm-3.2.r162438.tar.bz2) = 8851337 Added: head/devel/llvm-devel/files/patch-lib_Target_Mips_MipsTargetMachine.cpp ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/devel/llvm-devel/files/patch-lib_Target_Mips_MipsTargetMachine.cpp Thu Aug 23 21:04:16 2012 (r303040) @@ -0,0 +1,17 @@ + +$FreeBSD$ + +--- lib/Target/Mips/MipsTargetMachine.cpp.orig ++++ lib/Target/Mips/MipsTargetMachine.cpp +@@ -54,6 +54,11 @@ + FrameLowering(MipsFrameLowering::create(*this, Subtarget)), + TLInfo(*this), TSInfo(*this), JITInfo(), + ELFWriterInfo(false, isLittle) { ++ ++ // The system as doesn't understand CFI on FreeBSD ++#if defined(__FreeBSD__) ++ setMCUseCFI(false); ++#endif + } + + void MipsebTargetMachine::anchor() { } Modified: head/devel/llvm-devel/pkg-plist ============================================================================== --- head/devel/llvm-devel/pkg-plist Thu Aug 23 21:02:09 2012 (r303039) +++ head/devel/llvm-devel/pkg-plist Thu Aug 23 21:04:16 2012 (r303040) @@ -295,7 +295,6 @@ include/llvm/IntrinsicsHexagon.td include/llvm/IntrinsicsMips.td include/llvm/IntrinsicsNVVM.td include/llvm/IntrinsicsPowerPC.td -include/llvm/IntrinsicsR600.td include/llvm/IntrinsicsX86.td include/llvm/IntrinsicsXCore.td include/llvm/LLVMContext.h @@ -319,6 +318,7 @@ include/llvm/MC/MCDwarf.h include/llvm/MC/MCELFObjectWriter.h include/llvm/MC/MCELFSymbolFlags.h include/llvm/MC/MCExpr.h +include/llvm/MC/MCFixedLenDisassembler.h include/llvm/MC/MCFixup.h include/llvm/MC/MCFixupKindInfo.h include/llvm/MC/MCInst.h @@ -409,6 +409,7 @@ include/llvm/Support/Endian.h include/llvm/Support/Errno.h include/llvm/Support/ErrorHandling.h include/llvm/Support/FEnv.h +include/llvm/Support/FileOutputBuffer.h include/llvm/Support/FileSystem.h include/llvm/Support/FileUtilities.h include/llvm/Support/Format.h @@ -423,6 +424,7 @@ include/llvm/Support/InstIterator.h include/llvm/Support/InstVisitor.h include/llvm/Support/IntegersSubset.h include/llvm/Support/IntegersSubsetMapping.h +include/llvm/Support/LEB128.h include/llvm/Support/LICENSE.TXT include/llvm/Support/LeakDetector.h include/llvm/Support/Locale.h @@ -532,6 +534,7 @@ include/llvm/Transforms/Utils/ValueMappe include/llvm/Transforms/Vectorize.h include/llvm/Type.h include/llvm/TypeBuilder.h +include/llvm/TypeFinder.h include/llvm/Use.h include/llvm/User.h include/llvm/Value.h @@ -540,9 +543,6 @@ lib/BugpointPasses.so lib/LLVMHello.so lib/libLLVM-%%LLVM_RELEASE%%svn.so lib/libLLVM-%%LLVM_RELEASE%%svn.so.0 -lib/libLLVMAMDGPUCodeGen.a -lib/libLLVMAMDGPUDesc.a -lib/libLLVMAMDGPUInfo.a lib/libLLVMARMAsmParser.a lib/libLLVMARMAsmPrinter.a lib/libLLVMARMCodeGen.a @@ -629,6 +629,7 @@ lib/libLTO.a lib/libLTO.so lib/libprofile_rt.a lib/libprofile_rt.so +%%PORTDOCS%%%%DOCSDIR%%/html.tar.gz %%PORTDOCS%%%%DOCSDIR%%/html/.buildinfo %%PORTDOCS%%%%DOCSDIR%%/html/AliasAnalysis.html %%PORTDOCS%%%%DOCSDIR%%/html/AliasAnalysis.txt @@ -643,9 +644,11 @@ lib/libprofile_rt.so %%PORTDOCS%%%%DOCSDIR%%/html/CMake.html %%PORTDOCS%%%%DOCSDIR%%/html/CMake.txt %%PORTDOCS%%%%DOCSDIR%%/html/CodeGenerator.html +%%PORTDOCS%%%%DOCSDIR%%/html/CodeGenerator.txt %%PORTDOCS%%%%DOCSDIR%%/html/CodingStandards.html %%PORTDOCS%%%%DOCSDIR%%/html/CodingStandards.txt %%PORTDOCS%%%%DOCSDIR%%/html/CommandLine.html +%%PORTDOCS%%%%DOCSDIR%%/html/CommandLine.txt %%PORTDOCS%%%%DOCSDIR%%/html/CompilerWriterInfo.html %%PORTDOCS%%%%DOCSDIR%%/html/DebuggingJITedCode.html %%PORTDOCS%%%%DOCSDIR%%/html/DeveloperPolicy.html @@ -724,6 +727,7 @@ lib/libprofile_rt.so %%PORTDOCS%%%%DOCSDIR%%/html/doctools.js %%PORTDOCS%%%%DOCSDIR%%/html/down-pressed.png %%PORTDOCS%%%%DOCSDIR%%/html/down.png +%%PORTDOCS%%%%DOCSDIR%%/html/doxygen.css %%PORTDOCS%%%%DOCSDIR%%/html/file.png %%PORTDOCS%%%%DOCSDIR%%/html/genindex.html %%PORTDOCS%%%%DOCSDIR%%/html/index.html @@ -791,8 +795,8 @@ lib/libprofile_rt.so %%PORTDOCS%%%%DOCSDIR%%/html/userguides.html %%PORTDOCS%%%%DOCSDIR%%/html/userguides.txt %%PORTDOCS%%%%DOCSDIR%%/html/websupport.js -%%PORTDOCS%%%%DOCSDIR%%/html/doxygen.css -%%PORTDOCS%%%%DOCSDIR%%/html.tar.gz +%%PORTDOCS%%%%DOCSDIR%%/html/yaml2obj.html +%%PORTDOCS%%%%DOCSDIR%%/html/yaml2obj.txt @dirrm include/llvm/Transforms/Utils @dirrm include/llvm/Transforms/IPO @dirrm include/llvm/Transforms Modified: head/lang/clang-devel/Makefile ============================================================================== --- head/lang/clang-devel/Makefile Thu Aug 23 21:02:09 2012 (r303039) +++ head/lang/clang-devel/Makefile Thu Aug 23 21:04:16 2012 (r303040) @@ -7,7 +7,6 @@ PORTNAME= clang PORTVERSION= 3.2.r${SVN_REV} -PORTREVISION= 2 CATEGORIES= lang devel MASTER_SITES= ${MASTER_SITE_LOCAL} MASTER_SITE_SUBDIR= brooks @@ -54,9 +53,10 @@ MAKE_ARGS= CLANG_TBLGEN=${WRKSRC}/${RELT LLVMToolDir=${LOCALBASE}/bin \ LLVMLibDir=${LOCALBASE}/lib -OPTIONS_DEFINE= ASSERTS DOCS +OPTIONS_DEFINE= ASSERTS DOCS MIPS_FPHACK ASSERTS_DESC= Enable assertions (thread unsafe) +MIPS_FPHACK_DESC= MIPS long double hack (breaks ABI) MAN1= clang.1 @@ -84,6 +84,10 @@ CONFIGURE_ARGS+= --disable-assertions RELTYPE= Release .endif +.if ${PORT_OPTIONS:MMIPS_FPHACK} +EXTRA_PATCHES= ${FILESDIR}/mips-long-double-hack.diff +.endif + .include <bsd.port.pre.mk> .include "${.CURDIR}/../../devel/llvm-devel/Makefile.svn_rev" @@ -170,7 +174,6 @@ PLIST_FILE_LIST= bin/ccc-analyzer \ bin/clang \ bin/clang++ \ bin/clang-tblgen \ - bin/c-index-test \ bin/scan-build \ bin/scan-view \ lib/libclang* Modified: head/lang/clang-devel/distinfo ============================================================================== --- head/lang/clang-devel/distinfo Thu Aug 23 21:02:09 2012 (r303039) +++ head/lang/clang-devel/distinfo Thu Aug 23 21:04:16 2012 (r303040) @@ -1,4 +1,4 @@ -SHA256 (clang-3.2.r160283.tar.bz2) = 953054836d50c2621e8e3268f8348c787e1b4f37377cb7808cd985e5e1be09dd -SIZE (clang-3.2.r160283.tar.bz2) = 7027147 -SHA256 (llvm-3.2.r160283.tar.bz2) = 3dfae804e7765bfacfb4347ada59e174fa9f4a272ee86b17ae6882e5f3e56ca7 -SIZE (llvm-3.2.r160283.tar.bz2) = 8961712 +SHA256 (clang-3.2.r162438.tar.bz2) = 477e78674c428218ddd717e3faa798daf040ba43e26c538ef0f733dab1d4fbe1 +SIZE (clang-3.2.r162438.tar.bz2) = 7193019 +SHA256 (llvm-3.2.r162438.tar.bz2) = 6e5bd1121b6af1e89ace5f799febeec8278fa2e24fce6f69f5d840a42ac75617 +SIZE (llvm-3.2.r162438.tar.bz2) = 8851337 Added: head/lang/clang-devel/files/mips-long-double-hack.diff ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lang/clang-devel/files/mips-long-double-hack.diff Thu Aug 23 21:04:16 2012 (r303040) @@ -0,0 +1,15 @@ + +$FreeBSD$ + +--- tools/clang/lib/Basic/Targets.cpp.orig ++++ tools/clang/lib/Basic/Targets.cpp +@@ -3957,6 +3957,9 @@ + PointerWidth = PointerAlign = 64; + LongDoubleWidth = LongDoubleAlign = 128; + LongDoubleFormat = &llvm::APFloat::IEEEquad; ++ // FIXME: Ugly ABI-Breaking hack until the back end supports 128-bit floats ++ LongDoubleWidth = LongDoubleAlign = 64; ++ LongDoubleFormat = &llvm::APFloat::IEEEdouble; + SuitableAlign = 128; + } + virtual bool setABI(const std::string &Name) { Added: head/lang/clang-devel/files/patch-tools_clang_lib_Driver_Tools.cpp ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lang/clang-devel/files/patch-tools_clang_lib_Driver_Tools.cpp Thu Aug 23 21:04:16 2012 (r303040) @@ -0,0 +1,62 @@ + +$FreeBSD$ + +--- tools/clang/lib/Driver/Tools.cpp.orig ++++ tools/clang/lib/Driver/Tools.cpp +@@ -5119,17 +5119,48 @@ + + // When building 32-bit code on FreeBSD/amd64, we have to explicitly + // instruct as in the base system to assemble 32-bit code. +- if (getToolChain().getArchName() == "i386") ++ if (getToolChain().getArch() == llvm::Triple::x86) + CmdArgs.push_back("--32"); +- +- if (getToolChain().getArchName() == "powerpc") ++ else if (getToolChain().getArch() == llvm::Triple::ppc) + CmdArgs.push_back("-a32"); ++ else if (getToolChain().getArch() == llvm::Triple::mips || ++ getToolChain().getArch() == llvm::Triple::mipsel || ++ getToolChain().getArch() == llvm::Triple::mips64 || ++ getToolChain().getArch() == llvm::Triple::mips64el) { ++ StringRef CPUName; ++ StringRef ABIName; ++ getMipsCPUAndABI(Args, getToolChain(), CPUName, ABIName); + +- // Set byte order explicitly +- if (getToolChain().getArchName() == "mips") +- CmdArgs.push_back("-EB"); +- else if (getToolChain().getArchName() == "mipsel") +- CmdArgs.push_back("-EL"); ++ CmdArgs.push_back("-march"); ++ CmdArgs.push_back(CPUName.data()); ++ ++ // Convert ABI name to the GNU tools acceptable variant. ++ if (ABIName == "o32") ++ ABIName = "32"; ++ else if (ABIName == "n64") ++ ABIName = "64"; ++ ++ CmdArgs.push_back("-mabi"); ++ CmdArgs.push_back(ABIName.data()); ++ ++ if (getToolChain().getArch() == llvm::Triple::mips || ++ getToolChain().getArch() == llvm::Triple::mips64) ++ CmdArgs.push_back("-EB"); ++ else ++ CmdArgs.push_back("-EL"); ++ ++ Arg *LastPICArg = Args.getLastArg(options::OPT_fPIC, options::OPT_fno_PIC, ++ options::OPT_fpic, options::OPT_fno_pic, ++ options::OPT_fPIE, options::OPT_fno_PIE, ++ options::OPT_fpie, options::OPT_fno_pie); ++ if (LastPICArg && ++ (LastPICArg->getOption().matches(options::OPT_fPIC) || ++ LastPICArg->getOption().matches(options::OPT_fpic) || ++ LastPICArg->getOption().matches(options::OPT_fPIE) || ++ LastPICArg->getOption().matches(options::OPT_fpie))) { ++ CmdArgs.push_back("-KPIC"); ++ } ++ } + + Args.AddAllArgValues(CmdArgs, options::OPT_Wa_COMMA, + options::OPT_Xassembler); Modified: head/lang/clang-devel/files/patch-tools_clang_lib_Sema_SemaChecking.cpp ============================================================================== --- head/lang/clang-devel/files/patch-tools_clang_lib_Sema_SemaChecking.cpp Thu Aug 23 21:02:09 2012 (r303039) +++ head/lang/clang-devel/files/patch-tools_clang_lib_Sema_SemaChecking.cpp Thu Aug 23 21:04:16 2012 (r303040) @@ -16,8 +16,8 @@ $FreeBSD: /tmp/pcvs/ports/lang/clang-dev + // format specifier. + const Expr *Ex = getDataArg(argIndex); + QualType type = (CS.getKind() == ConversionSpecifier::bArg) ? S.Context.IntTy : S.Context.getPointerType(S.Context.UnsignedCharTy); -+ //const analyze_printf::ArgTypeResult &ATR = S.Context.IntTy; -+ const analyze_printf::ArgTypeResult &ATR = type; ++ //const analyze_printf::ArgType &ATR = S.Context.IntTy; ++ const analyze_printf::ArgType &ATR = type; + if (ATR.isValid() && !ATR.matchesType(S.Context, Ex->getType())) + S.Diag(getLocationOfByte(CS.getStart()), + diag::warn_printf_conversion_argument_type_mismatch) @@ -28,7 +28,7 @@ $FreeBSD: /tmp/pcvs/ports/lang/clang-dev + // Now type check the data expression that matches the + // format specifier. + Ex = getDataArg(argIndex + 1); -+ const analyze_printf::ArgTypeResult &ATR2 = ArgTypeResult::CStrTy; ++ const analyze_printf::ArgType &ATR2 = ArgType::CStrTy; + if (ATR2.isValid() && !ATR2.matchesType(S.Context, Ex->getType())) + S.Diag(getLocationOfByte(CS.getStart()), + diag::warn_printf_conversion_argument_type_mismatch) Modified: head/lang/clang-devel/pkg-plist ============================================================================== --- head/lang/clang-devel/pkg-plist Thu Aug 23 21:02:09 2012 (r303039) +++ head/lang/clang-devel/pkg-plist Thu Aug 23 21:04:16 2012 (r303040) @@ -1,5 +1,4 @@ bin/c++-analyzer -bin/c-index-test bin/ccc-analyzer bin/clang bin/clang++ @@ -31,6 +30,7 @@ include/clang/AST/CanonicalType.h include/clang/AST/CharUnits.h include/clang/AST/Comment.h include/clang/AST/CommentBriefParser.h +include/clang/AST/CommentCommandTraits.h include/clang/AST/CommentDiagnostic.h include/clang/AST/CommentLexer.h include/clang/AST/CommentNodes.inc @@ -92,7 +92,6 @@ include/clang/ASTMatchers/ASTMatchFinder include/clang/ASTMatchers/ASTMatchers.h include/clang/ASTMatchers/ASTMatchersInternal.h include/clang/ASTMatchers/ASTMatchersMacros.h -include/clang/ASTMatchers/RefactoringCallbacks.h include/clang/Analysis/Analyses/CFGReachabilityAnalysis.h include/clang/Analysis/Analyses/Dominators.h include/clang/Analysis/Analyses/FormatString.h @@ -327,7 +326,6 @@ include/clang/Serialization/ModuleManage include/clang/Serialization/SerializationDiagnostic.h include/clang/StaticAnalyzer/Checkers/ClangCheckers.h include/clang/StaticAnalyzer/Checkers/CommonBugCategories.h -include/clang/StaticAnalyzer/Checkers/DereferenceChecker.h include/clang/StaticAnalyzer/Checkers/LocalCheckers.h include/clang/StaticAnalyzer/Core/BugReporter/BugReporter.h include/clang/StaticAnalyzer/Core/BugReporter/BugReporterVisitor.h @@ -342,7 +340,7 @@ include/clang/StaticAnalyzer/Core/PathSe include/clang/StaticAnalyzer/Core/PathSensitive/AnalysisManager.h include/clang/StaticAnalyzer/Core/PathSensitive/BasicValueFactory.h include/clang/StaticAnalyzer/Core/PathSensitive/BlockCounter.h -include/clang/StaticAnalyzer/Core/PathSensitive/Calls.h +include/clang/StaticAnalyzer/Core/PathSensitive/CallEvent.h include/clang/StaticAnalyzer/Core/PathSensitive/CheckerContext.h include/clang/StaticAnalyzer/Core/PathSensitive/CheckerHelpers.h include/clang/StaticAnalyzer/Core/PathSensitive/ConstraintManager.h @@ -368,9 +366,10 @@ include/clang/StaticAnalyzer/Core/PathSe include/clang/StaticAnalyzer/Frontend/CheckerRegistration.h include/clang/StaticAnalyzer/Frontend/FrontendActions.h include/clang/Tooling/ArgumentsAdjusters.h -include/clang/Tooling/CommandLineClangTool.h +include/clang/Tooling/CommonOptionsParser.h include/clang/Tooling/CompilationDatabase.h include/clang/Tooling/Refactoring.h +include/clang/Tooling/RefactoringCallbacks.h include/clang/Tooling/Tooling.h lib/clang/%%CLANG_RELEASE%%/include/ammintrin.h lib/clang/%%CLANG_RELEASE%%/include/arm_neon.h @@ -414,11 +413,14 @@ lib/libclangTooling.a %%PORTDOCS%%%%DOCSDIR%%/html/AnalyzerRegions.html %%PORTDOCS%%%%DOCSDIR%%/html/AutomaticReferenceCounting.html %%PORTDOCS%%%%DOCSDIR%%/html/ClangPlugins.html +%%PORTDOCS%%%%DOCSDIR%%/html/ClangTools.html %%PORTDOCS%%%%DOCSDIR%%/html/DriverInternals.html %%PORTDOCS%%%%DOCSDIR%%/html/HowToSetupToolingForLLVM.html %%PORTDOCS%%%%DOCSDIR%%/html/InternalsManual.html +%%PORTDOCS%%%%DOCSDIR%%/html/IntroductionToTheClangAST.html %%PORTDOCS%%%%DOCSDIR%%/html/JSONCompilationDatabase.html %%PORTDOCS%%%%DOCSDIR%%/html/LanguageExtensions.html +%%PORTDOCS%%%%DOCSDIR%%/html/LibASTMatchersReference.html %%PORTDOCS%%%%DOCSDIR%%/html/LibTooling.html %%PORTDOCS%%%%DOCSDIR%%/html/ObjectiveCLiterals.html %%PORTDOCS%%%%DOCSDIR%%/html/PCHInternals.html
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201208232104.q7NL4HoY094683>