pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc/lang/clang



Module Name:    pkgsrc
Committed By:   adam
Date:           Sat Apr 18 07:53:38 UTC 2020

Modified Files:
        pkgsrc/lang/clang: Makefile.common PLIST distinfo
        pkgsrc/lang/clang/patches: patch-lib_Driver_ToolChains_Solaris.cpp
Added Files:
        pkgsrc/lang/clang/patches: patch-tools_libclang_FatalErrorHandler.cpp
Removed Files:
        pkgsrc/lang/clang/patches: patch-lib_Driver_ToolChains_NetBSD.cpp

Log Message:
clang: updated to 10.0.0

What’s New in Clang 10.0.0?

Some of the major new features and improvements to Clang are listed here. Generic improvements to Clang as a whole or to its underlying infrastructure are described first, followed by 
language-specific sections with improvements to Clang’s support for those languages.

Major New Features

clang used to run the actual compilation in a subprocess (“clang -cc1”). Now compilations are done in-process by default. -fno-integrated-cc1 restores the former behavior. The -v and -### flags will 
print “(in-process)” when compilations are done in-process.
Concepts support. Clang now supports C++2a Concepts under the -std=c++2a flag.

Improvements to Clang’s diagnostics

-Wtautological-overlap-compare will warn on negative numbers and non-int types.
-Wtautological-compare for self comparisons and -Wtautological-overlap-compare will now look through member and array access to determine if two operand expressions are the same.
-Wtautological-bitwise-compare is a new warning group. This group has the current warning which diagnoses the tautological comparison of a bitwise operation and a constant. The group also has the new 
warning which diagnoses when a bitwise-or with a non-negative value is converted to a bool, since that bool will always be true.
-Wbitwise-conditional-parentheses will warn on operator precedence issues when mixing bitwise-and (&) and bitwise-or (|) operator with the conditional operator (?:).
-Wrange-loop-analysis got several improvements. It no longer warns about a copy being made when the result is bound to an rvalue reference. It no longer warns when an object of a small, trivially 
copyable type is copied. The warning now offers fix-its. Excluding -Wrange-loop-bind-reference it is now part of -Wall. To reduce the number of false positives the diagnostic is disabled in macros 
and template instantiations.
-Wmisleading-indentation has been added. This warning is similar to the GCC warning of the same name. It warns about statements that are indented as if they were part of a if/else/for/while statement 
but are not semantically part of that if/else/for/while.
-Wbitwise-op-parentheses and -Wlogical-op-parentheses are disabled by default.
The new warnings -Wc99-designator and -Wreorder-init-list warn about uses of C99 initializers in C++ mode for cases that are valid in C99 but not in C++20.
The new warning -Wsizeof-array-div catches cases like int arr[10]; ...sizeof(arr) / sizeof(short)... (should be sizeof(arr) / sizeof(int)), and the existing warning -Wsizeof-pointer-div catches more 
cases.
The new warning -Wxor-used-as-pow warns on cases where it looks like the xor operator ^ is used to be mean exponentiation, e.g. 2 ^ 16.
The new warning -Wfinal-dtor-non-final-class warns on classes that have a final destructor but aren’t themselves marked final.
-Wextra now enables -Wdeprecated-copy. The warning deprecates move and copy constructors in classes where an explicit destructor is declared. This is for compatibility with GCC 9, and forward looking 
for a change that’s being considered for C++23. You can disable it with -Wno-deprecated-copy.

Non-comprehensive list of changes in this release

In both C and C++ (C17 6.5.6p8, C++ [expr.add]), pointer arithmetic is only permitted within arrays. In particular, the behavior of a program is not defined if it adds a non-zero offset (or in C, any 
offset) to a null pointer, or if it forms a null pointer by subtracting an integer from a non-null pointer, and the LLVM optimizer now uses those guarantees for transformations. This may lead to 
unintended behavior in code that performs these operations. The Undefined Behavior Sanitizer -fsanitize=pointer-overflow check has been extended to detect these cases, so that code relying on them 
can be detected and fixed.
The Implicit Conversion Sanitizer (-fsanitize=implicit-conversion) has learned to sanitize pre/post increment/decrement of types with bit width smaller than int.
For X86 target, -march=skylake-avx512, -march=icelake-client, -march=icelake-server, -march=cascadelake, -march=cooperlake will default to not using 512-bit zmm registers in vectorized code unless 
512-bit intrinsics are used in the source code. 512-bit operations are known to cause the CPUs to run at a lower frequency which can impact performance. This behavior can be changed by passing 
-mprefer-vector-width=512 on the command line.
Clang now defaults to .init_array on Linux. It used to use .ctors if the found GCC installation is older than 4.7.0. Add -fno-use-init-array to get the old behavior (.ctors).
The behavior of the flag -flax-vector-conversions has been modified to more closely match GCC, as described below. In Clang 10 onwards, command lines specifying this flag do not permit implicit 
vector bitcasts between integer vectors and floating-point vectors. Such conversions are still permitted by default, however, and the default can be explicitly requested with the Clang-specific flag 
-flax-vector-conversions=all. In a future release of Clang, we intend to change the default to -fno-lax-vector-conversions.
Improved support for octeon MIPS-family CPU. Added octeon+ to the list of of CPUs accepted by the driver.
For the WebAssembly target, the wasm-opt tool will now be run if it is found in the PATH, which can reduce code size.
For the RISC-V target, floating point registers can now be used in inline assembly constraints.

New Compiler Flags

The -fgnuc-version= flag now controls the value of __GNUC__ and related macros. This flag does not enable or disable any GCC extensions implemented in Clang. Setting the version to zero causes Clang 
to leave __GNUC__ and other GNU-namespaced macros, such as __GXX_WEAK__, undefined.
vzeroupper insertion on X86 targets can now be disabled with -mno-vzeroupper. You can also force vzeroupper insertion to be used on CPUs that normally wouldn’t with -mvzeroupper.
The -fno-concept-satisfaction-caching can be used to disable caching for satisfactions of Concepts. The C++2a draft standard does not currently permit this caching, but disabling it may incur 
significant compile-time costs. This flag is intended for experimentation purposes and may be removed at any time; please let us know if you encounter a situation where you need to specify this flag 
for correct program behavior.
The -ffixed-xX flags now work on RISC-V. These reserve the corresponding general-purpose registers.
RISC-V has added -mcmodel=medany and -mcmodel=medlow as aliases for -mcmodel=small and -mcmodel=medium respectively. Preprocessor definitions for __riscv_cmodel_medlow and __riscv_cmodel_medany have 
been corrected.
-fmacro-prefix-map=OLD=NEW substitutes directory prefix OLD for NEW in predefined preprocessor macros such as __FILE__. This helps with reproducible builds that are location independent. The new 
-ffile-prefix-map option is equivalent to specifying both -fdebug-prefix-map and -fmacro-prefix-map.
-fpatchable-function-entry=N[,M] is added to generate M NOPs before the function entry and N-M NOPs after the function entry. This is used by AArch64 ftrace in the Linux kernel.
-mbranches-within-32B-boundaries is added as an x86 assembler mitigation for Intel’s Jump Condition Code Erratum.

Deprecated Compiler Flags

The following options are deprecated and ignored. They will be removed in future versions of Clang.

-mmpx used to enable the __MPX__ preprocessor define for the Intel MPX instructions. There were no MPX intrinsics.
-mno-mpx used to disable -mmpx and is the default behavior.
-fconcepts-ts previously used to enable experimental concepts support. Use -std=c++2a instead to enable Concepts support.

Modified Compiler Flags

RISC-V now sets the architecture (riscv32/riscv64) based on the value provided to the -march flag, overriding the target provided by -triple.
-flax-vector-conversions has been split into three different levels of laxness, and has been updated to match the GCC semantics:
-flax-vector-conversions=all: This is Clang’s current default, and permits implicit vector conversions (performed as bitcasts) between any two vector types of the same overall bit-width. Former 
synonym: -flax-vector-conversions (Clang <= 9).
-flax-vector-conversions=integer: This permits implicit vector conversions (performed as bitcasts) between any two integer vector types of the same overall bit-width. Synonym: 
-flax-vector-conversions (Clang >= 10).
-flax-vector-conversions=none: Do not perform any implicit bitcasts between vector types. Synonym: -fno-lax-vector-conversions.
-debug-info-kind now has an option -debug-info-kind=constructor, which is one level below -debug-info-kind=limited. This option causes debug info for classes to be emitted only when a constructor is 
emitted.
RISC-V now chooses a slightly different sysroot path and defaults to using compiler-rt if no GCC installation is detected.
RISC-V now supports multilibs in baremetal environments. This support does not extend to supporting multilib aliases.

Attribute Changes in Clang

Support was added for function __attribute__((target("branch-protection=...")))


To generate a diff of this commit:
cvs rdiff -u -r1.41 -r1.42 pkgsrc/lang/clang/Makefile.common
cvs rdiff -u -r1.27 -r1.28 pkgsrc/lang/clang/PLIST
cvs rdiff -u -r1.63 -r1.64 pkgsrc/lang/clang/distinfo
cvs rdiff -u -r1.1 -r0 \
    pkgsrc/lang/clang/patches/patch-lib_Driver_ToolChains_NetBSD.cpp
cvs rdiff -u -r1.4 -r1.5 \
    pkgsrc/lang/clang/patches/patch-lib_Driver_ToolChains_Solaris.cpp
cvs rdiff -u -r0 -r1.1 \
    pkgsrc/lang/clang/patches/patch-tools_libclang_FatalErrorHandler.cpp

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/lang/clang/Makefile.common
diff -u pkgsrc/lang/clang/Makefile.common:1.41 pkgsrc/lang/clang/Makefile.common:1.42
--- pkgsrc/lang/clang/Makefile.common:1.41      Thu Mar 26 14:47:46 2020
+++ pkgsrc/lang/clang/Makefile.common   Sat Apr 18 07:53:38 2020
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.common,v 1.41 2020/03/26 14:47:46 nia Exp $
+# $NetBSD: Makefile.common,v 1.42 2020/04/18 07:53:38 adam Exp $
 # used by lang/clang/Makefile
 # used by lang/clang-static-analyzer/Makefile
 # used by lang/clang-tools-extra/Makefile
@@ -6,7 +6,6 @@
 .include "../../lang/llvm/version.mk"
 
 DISTNAME=      clang-${LLVM_VERSION}.src
-PKGREVISION=   1
 CATEGORIES=    lang devel
 
 MAINTAINER=    pkgsrc-users%NetBSD.org@localhost
@@ -17,7 +16,7 @@ LICENSE=      apache-2.0
 CONFIGURE_DIRS=                ${WRKDIR}/build
 CMAKE_ARG_PATH=                ${WRKSRC}
 
-USE_LANGUAGES=         c c++11
+USE_LANGUAGES=         c c++14
 USE_CMAKE=             yes
 GCC_REQD+=             5
 

Index: pkgsrc/lang/clang/PLIST
diff -u pkgsrc/lang/clang/PLIST:1.27 pkgsrc/lang/clang/PLIST:1.28
--- pkgsrc/lang/clang/PLIST:1.27        Sat Oct 19 13:54:29 2019
+++ pkgsrc/lang/clang/PLIST     Sat Apr 18 07:53:38 2020
@@ -1,13 +1,14 @@
-@comment $NetBSD: PLIST,v 1.27 2019/10/19 13:54:29 adam Exp $
+@comment $NetBSD: PLIST,v 1.28 2020/04/18 07:53:38 adam Exp $
 bin/c-index-test
 bin/clang
 bin/clang++
-bin/clang-9
+bin/clang-10
 bin/clang-cl
 bin/clang-cpp
 bin/clang-format
 bin/clang-import-test
 bin/clang-offload-bundler
+bin/clang-offload-wrapper
 bin/clang-refactor
 bin/clang-rename
 bin/clang-scan-deps
@@ -19,6 +20,8 @@ include/clang-c/CXCompilationDatabase.h
 include/clang-c/CXErrorCode.h
 include/clang-c/CXString.h
 include/clang-c/Documentation.h
+include/clang-c/ExternC.h
+include/clang-c/FatalErrorHandler.h
 include/clang-c/Index.h
 include/clang-c/Platform.h
 include/clang/ARCMigrate/ARCMT.h
@@ -26,6 +29,7 @@ include/clang/ARCMigrate/ARCMTActions.h
 include/clang/ARCMigrate/FileRemapper.h
 include/clang/AST/APValue.h
 include/clang/AST/AST.h
+include/clang/AST/ASTConcept.h
 include/clang/AST/ASTConsumer.h
 include/clang/AST/ASTContext.h
 include/clang/AST/ASTContextAllocate.h
@@ -43,6 +47,14 @@ include/clang/AST/ASTStructuralEquivalen
 include/clang/AST/ASTTypeTraits.h
 include/clang/AST/ASTUnresolvedSet.h
 include/clang/AST/ASTVector.h
+include/clang/AST/AbstractBasicReader.h
+include/clang/AST/AbstractBasicReader.inc
+include/clang/AST/AbstractBasicWriter.h
+include/clang/AST/AbstractBasicWriter.inc
+include/clang/AST/AbstractTypeReader.h
+include/clang/AST/AbstractTypeReader.inc
+include/clang/AST/AbstractTypeWriter.h
+include/clang/AST/AbstractTypeWriter.inc
 include/clang/AST/Attr.h
 include/clang/AST/AttrImpl.inc
 include/clang/AST/AttrIterator.h
@@ -55,6 +67,7 @@ include/clang/AST/Availability.h
 include/clang/AST/BaseSubobject.h
 include/clang/AST/BuiltinTypes.def
 include/clang/AST/CXXInheritance.h
+include/clang/AST/CXXRecordDeclDefinitionBits.def
 include/clang/AST/CanonicalType.h
 include/clang/AST/CharUnits.h
 include/clang/AST/Comment.h
@@ -92,6 +105,7 @@ include/clang/AST/DependentDiagnostic.h
 include/clang/AST/EvaluatedExprVisitor.h
 include/clang/AST/Expr.h
 include/clang/AST/ExprCXX.h
+include/clang/AST/ExprConcepts.h
 include/clang/AST/ExprObjC.h
 include/clang/AST/ExprOpenMP.h
 include/clang/AST/ExternalASTMerger.h
@@ -112,6 +126,7 @@ include/clang/AST/OSLog.h
 include/clang/AST/OpenMPClause.h
 include/clang/AST/OperationKinds.def
 include/clang/AST/OperationKinds.h
+include/clang/AST/OptionalDiagnostic.h
 include/clang/AST/ParentMap.h
 include/clang/AST/PrettyDeclStackTrace.h
 include/clang/AST/PrettyPrinter.h
@@ -138,7 +153,7 @@ include/clang/AST/Type.h
 include/clang/AST/TypeLoc.h
 include/clang/AST/TypeLocNodes.def
 include/clang/AST/TypeLocVisitor.h
-include/clang/AST/TypeNodes.def
+include/clang/AST/TypeNodes.inc
 include/clang/AST/TypeOrdering.h
 include/clang/AST/TypeVisitor.h
 include/clang/AST/UnresolvedSet.h
@@ -180,10 +195,12 @@ include/clang/Analysis/ConstructionConte
 include/clang/Analysis/DomainSpecific/CocoaConventions.h
 include/clang/Analysis/DomainSpecific/ObjCNoReturn.h
 include/clang/Analysis/FlowSensitive/DataflowValues.h
+include/clang/Analysis/PathDiagnostic.h
 include/clang/Analysis/ProgramPoint.h
 include/clang/Analysis/RetainSummaryManager.h
 include/clang/Analysis/SelectorExtras.h
 include/clang/Analysis/Support/BumpVector.h
+include/clang/Basic/AArch64SVEACLETypes.def
 include/clang/Basic/ABI.h
 include/clang/Basic/AddressSpaces.h
 include/clang/Basic/AlignedAllocation.h
@@ -193,6 +210,7 @@ include/clang/Basic/AttrKinds.h
 include/clang/Basic/AttrList.inc
 include/clang/Basic/AttrSubMatchRulesList.inc
 include/clang/Basic/AttrSubjectMatchRules.h
+include/clang/Basic/AttributeCommonInfo.h
 include/clang/Basic/Attributes.h
 include/clang/Basic/BitmaskEnum.h
 include/clang/Basic/Builtins.def
@@ -200,6 +218,7 @@ include/clang/Basic/Builtins.h
 include/clang/Basic/BuiltinsAArch64.def
 include/clang/Basic/BuiltinsAMDGPU.def
 include/clang/Basic/BuiltinsARM.def
+include/clang/Basic/BuiltinsBPF.def
 include/clang/Basic/BuiltinsHexagon.def
 include/clang/Basic/BuiltinsLe64.def
 include/clang/Basic/BuiltinsMips.def
@@ -262,6 +281,8 @@ include/clang/Basic/LLVM.h
 include/clang/Basic/Lambda.h
 include/clang/Basic/LangOptions.def
 include/clang/Basic/LangOptions.h
+include/clang/Basic/LangStandard.h
+include/clang/Basic/LangStandards.def
 include/clang/Basic/Linkage.h
 include/clang/Basic/MSP430Target.def
 include/clang/Basic/MacroBuilder.h
@@ -305,6 +326,10 @@ include/clang/Basic/X86Target.def
 include/clang/Basic/XRayInstr.h
 include/clang/Basic/XRayLists.h
 include/clang/Basic/arm_fp16.inc
+include/clang/Basic/arm_mve_builtin_aliases.inc
+include/clang/Basic/arm_mve_builtin_cg.inc
+include/clang/Basic/arm_mve_builtin_sema.inc
+include/clang/Basic/arm_mve_builtins.inc
 include/clang/Basic/arm_neon.inc
 include/clang/CodeGen/BackendUtil.h
 include/clang/CodeGen/CGFunctionInfo.h
@@ -327,6 +352,7 @@ include/clang/Driver/Driver.h
 include/clang/Driver/DriverDiagnostic.h
 include/clang/Driver/Job.h
 include/clang/Driver/Multilib.h
+include/clang/Driver/OptionUtils.h
 include/clang/Driver/Options.h
 include/clang/Driver/Options.inc
 include/clang/Driver/Phases.h
@@ -356,8 +382,6 @@ include/clang/Frontend/FrontendActions.h
 include/clang/Frontend/FrontendDiagnostic.h
 include/clang/Frontend/FrontendOptions.h
 include/clang/Frontend/FrontendPluginRegistry.h
-include/clang/Frontend/LangStandard.h
-include/clang/Frontend/LangStandards.def
 include/clang/Frontend/LayoutOverrideSource.h
 include/clang/Frontend/LogDiagnosticPrinter.h
 include/clang/Frontend/MigratorOptions.h
@@ -374,12 +398,12 @@ include/clang/Frontend/TextDiagnosticPri
 include/clang/Frontend/Utils.h
 include/clang/Frontend/VerifyDiagnosticConsumer.h
 include/clang/FrontendTool/Utils.h
-include/clang/Index/CodegenNameGenerator.h
 include/clang/Index/CommentToXML.h
 include/clang/Index/DeclOccurrence.h
 include/clang/Index/IndexDataConsumer.h
 include/clang/Index/IndexSymbol.h
 include/clang/Index/IndexingAction.h
+include/clang/Index/IndexingOptions.h
 include/clang/Index/USRGeneration.h
 include/clang/Lex/CodeCompletionHandler.h
 include/clang/Lex/DependencyDirectivesSourceMinimizer.h
@@ -402,6 +426,7 @@ include/clang/Lex/PPConditionalDirective
 include/clang/Lex/Pragma.h
 include/clang/Lex/PreprocessingRecord.h
 include/clang/Lex/Preprocessor.h
+include/clang/Lex/PreprocessorExcludedConditionalDirectiveSkipMapping.h
 include/clang/Lex/PreprocessorLexer.h
 include/clang/Lex/PreprocessorOptions.h
 include/clang/Lex/ScratchBuffer.h
@@ -452,6 +477,7 @@ include/clang/Sema/ParsedTemplate.h
 include/clang/Sema/Scope.h
 include/clang/Sema/ScopeInfo.h
 include/clang/Sema/Sema.h
+include/clang/Sema/SemaConcept.h
 include/clang/Sema/SemaConsumer.h
 include/clang/Sema/SemaDiagnostic.h
 include/clang/Sema/SemaFixItUtils.h
@@ -465,17 +491,20 @@ include/clang/Sema/Weak.h
 include/clang/Serialization/ASTBitCodes.h
 include/clang/Serialization/ASTDeserializationListener.h
 include/clang/Serialization/ASTReader.h
+include/clang/Serialization/ASTRecordReader.h
+include/clang/Serialization/ASTRecordWriter.h
 include/clang/Serialization/ASTWriter.h
 include/clang/Serialization/AttrPCHRead.inc
 include/clang/Serialization/AttrPCHWrite.inc
 include/clang/Serialization/ContinuousRangeMap.h
 include/clang/Serialization/GlobalModuleIndex.h
 include/clang/Serialization/InMemoryModuleCache.h
-include/clang/Serialization/Module.h
+include/clang/Serialization/ModuleFile.h
 include/clang/Serialization/ModuleFileExtension.h
 include/clang/Serialization/ModuleManager.h
 include/clang/Serialization/PCHContainerOperations.h
 include/clang/Serialization/SerializationDiagnostic.h
+include/clang/Serialization/TypeBitCodes.def
 include/clang/StaticAnalyzer/Checkers/BuiltinCheckerRegistration.h
 include/clang/StaticAnalyzer/Checkers/Checkers.inc
 include/clang/StaticAnalyzer/Checkers/LocalCheckers.h
@@ -488,7 +517,6 @@ include/clang/StaticAnalyzer/Core/BugRep
 include/clang/StaticAnalyzer/Core/BugReporter/BugReporterVisitors.h
 include/clang/StaticAnalyzer/Core/BugReporter/BugType.h
 include/clang/StaticAnalyzer/Core/BugReporter/CommonBugCategories.h
-include/clang/StaticAnalyzer/Core/BugReporter/PathDiagnostic.h
 include/clang/StaticAnalyzer/Core/Checker.h
 include/clang/StaticAnalyzer/Core/CheckerManager.h
 include/clang/StaticAnalyzer/Core/IssueHash.h
@@ -502,8 +530,9 @@ include/clang/StaticAnalyzer/Core/PathSe
 include/clang/StaticAnalyzer/Core/PathSensitive/CheckerHelpers.h
 include/clang/StaticAnalyzer/Core/PathSensitive/ConstraintManager.h
 include/clang/StaticAnalyzer/Core/PathSensitive/CoreEngine.h
+include/clang/StaticAnalyzer/Core/PathSensitive/DynamicCastInfo.h
+include/clang/StaticAnalyzer/Core/PathSensitive/DynamicType.h
 include/clang/StaticAnalyzer/Core/PathSensitive/DynamicTypeInfo.h
-include/clang/StaticAnalyzer/Core/PathSensitive/DynamicTypeMap.h
 include/clang/StaticAnalyzer/Core/PathSensitive/Environment.h
 include/clang/StaticAnalyzer/Core/PathSensitive/ExplodedGraph.h
 include/clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h
@@ -546,7 +575,11 @@ include/clang/Tooling/CompilationDatabas
 include/clang/Tooling/Core/Diagnostic.h
 include/clang/Tooling/Core/Lookup.h
 include/clang/Tooling/Core/Replacement.h
+include/clang/Tooling/DependencyScanning/DependencyScanningFilesystem.h
+include/clang/Tooling/DependencyScanning/DependencyScanningService.h
+include/clang/Tooling/DependencyScanning/DependencyScanningTool.h
 include/clang/Tooling/DependencyScanning/DependencyScanningWorker.h
+include/clang/Tooling/DependencyScanning/ModuleDepCollector.h
 include/clang/Tooling/DiagnosticsYaml.h
 include/clang/Tooling/Execution.h
 include/clang/Tooling/FileMatchTrie.h
@@ -558,7 +591,7 @@ include/clang/Tooling/Refactoring.h
 include/clang/Tooling/Refactoring/ASTSelection.h
 include/clang/Tooling/Refactoring/AtomicChange.h
 include/clang/Tooling/Refactoring/Extract/Extract.h
-include/clang/Tooling/Refactoring/RangeSelector.h
+include/clang/Tooling/Refactoring/Extract/SourceExtraction.h
 include/clang/Tooling/Refactoring/RecursiveSymbolVisitor.h
 include/clang/Tooling/Refactoring/RefactoringAction.h
 include/clang/Tooling/Refactoring/RefactoringActionRule.h
@@ -577,159 +610,169 @@ include/clang/Tooling/Refactoring/Rename
 include/clang/Tooling/Refactoring/Rename/USRFinder.h
 include/clang/Tooling/Refactoring/Rename/USRFindingAction.h
 include/clang/Tooling/Refactoring/Rename/USRLocFinder.h
-include/clang/Tooling/Refactoring/SourceCode.h
-include/clang/Tooling/Refactoring/Stencil.h
-include/clang/Tooling/Refactoring/Transformer.h
 include/clang/Tooling/RefactoringCallbacks.h
 include/clang/Tooling/ReplacementsYaml.h
 include/clang/Tooling/StandaloneExecution.h
 include/clang/Tooling/Syntax/BuildTree.h
+include/clang/Tooling/Syntax/Mutations.h
 include/clang/Tooling/Syntax/Nodes.h
 include/clang/Tooling/Syntax/Tokens.h
 include/clang/Tooling/Syntax/Tree.h
 include/clang/Tooling/ToolExecutorPluginRegistry.h
 include/clang/Tooling/Tooling.h
-lib/clang/${PKGVERSION}/include/__clang_cuda_builtin_vars.h
-lib/clang/${PKGVERSION}/include/__clang_cuda_cmath.h
-lib/clang/${PKGVERSION}/include/__clang_cuda_complex_builtins.h
-lib/clang/${PKGVERSION}/include/__clang_cuda_device_functions.h
-lib/clang/${PKGVERSION}/include/__clang_cuda_intrinsics.h
-lib/clang/${PKGVERSION}/include/__clang_cuda_libdevice_declares.h
-lib/clang/${PKGVERSION}/include/__clang_cuda_math_forward_declares.h
-lib/clang/${PKGVERSION}/include/__clang_cuda_runtime_wrapper.h
-lib/clang/${PKGVERSION}/include/__stddef_max_align_t.h
-lib/clang/${PKGVERSION}/include/__wmmintrin_aes.h
-lib/clang/${PKGVERSION}/include/__wmmintrin_pclmul.h
-lib/clang/${PKGVERSION}/include/adxintrin.h
-lib/clang/${PKGVERSION}/include/altivec.h
-lib/clang/${PKGVERSION}/include/ammintrin.h
-lib/clang/${PKGVERSION}/include/arm64intr.h
-lib/clang/${PKGVERSION}/include/arm_acle.h
-lib/clang/${PKGVERSION}/include/arm_fp16.h
-lib/clang/${PKGVERSION}/include/arm_neon.h
-lib/clang/${PKGVERSION}/include/armintr.h
-lib/clang/${PKGVERSION}/include/avx2intrin.h
-lib/clang/${PKGVERSION}/include/avx512bf16intrin.h
-lib/clang/${PKGVERSION}/include/avx512bitalgintrin.h
-lib/clang/${PKGVERSION}/include/avx512bwintrin.h
-lib/clang/${PKGVERSION}/include/avx512cdintrin.h
-lib/clang/${PKGVERSION}/include/avx512dqintrin.h
-lib/clang/${PKGVERSION}/include/avx512erintrin.h
-lib/clang/${PKGVERSION}/include/avx512fintrin.h
-lib/clang/${PKGVERSION}/include/avx512ifmaintrin.h
-lib/clang/${PKGVERSION}/include/avx512ifmavlintrin.h
-lib/clang/${PKGVERSION}/include/avx512pfintrin.h
-lib/clang/${PKGVERSION}/include/avx512vbmi2intrin.h
-lib/clang/${PKGVERSION}/include/avx512vbmiintrin.h
-lib/clang/${PKGVERSION}/include/avx512vbmivlintrin.h
-lib/clang/${PKGVERSION}/include/avx512vlbf16intrin.h
-lib/clang/${PKGVERSION}/include/avx512vlbitalgintrin.h
-lib/clang/${PKGVERSION}/include/avx512vlbwintrin.h
-lib/clang/${PKGVERSION}/include/avx512vlcdintrin.h
-lib/clang/${PKGVERSION}/include/avx512vldqintrin.h
-lib/clang/${PKGVERSION}/include/avx512vlintrin.h
-lib/clang/${PKGVERSION}/include/avx512vlvbmi2intrin.h
-lib/clang/${PKGVERSION}/include/avx512vlvnniintrin.h
-lib/clang/${PKGVERSION}/include/avx512vlvp2intersectintrin.h
-lib/clang/${PKGVERSION}/include/avx512vnniintrin.h
-lib/clang/${PKGVERSION}/include/avx512vp2intersectintrin.h
-lib/clang/${PKGVERSION}/include/avx512vpopcntdqintrin.h
-lib/clang/${PKGVERSION}/include/avx512vpopcntdqvlintrin.h
-lib/clang/${PKGVERSION}/include/avxintrin.h
-lib/clang/${PKGVERSION}/include/bmi2intrin.h
-lib/clang/${PKGVERSION}/include/bmiintrin.h
-lib/clang/${PKGVERSION}/include/cetintrin.h
-lib/clang/${PKGVERSION}/include/cldemoteintrin.h
-lib/clang/${PKGVERSION}/include/clflushoptintrin.h
-lib/clang/${PKGVERSION}/include/clwbintrin.h
-lib/clang/${PKGVERSION}/include/clzerointrin.h
-lib/clang/${PKGVERSION}/include/cpuid.h
-lib/clang/${PKGVERSION}/include/cuda_wrappers/algorithm
-lib/clang/${PKGVERSION}/include/cuda_wrappers/complex
-lib/clang/${PKGVERSION}/include/cuda_wrappers/new
-lib/clang/${PKGVERSION}/include/emmintrin.h
-lib/clang/${PKGVERSION}/include/enqcmdintrin.h
-lib/clang/${PKGVERSION}/include/f16cintrin.h
-lib/clang/${PKGVERSION}/include/float.h
-lib/clang/${PKGVERSION}/include/fma4intrin.h
-lib/clang/${PKGVERSION}/include/fmaintrin.h
-lib/clang/${PKGVERSION}/include/fxsrintrin.h
-lib/clang/${PKGVERSION}/include/gfniintrin.h
-lib/clang/${PKGVERSION}/include/htmintrin.h
-lib/clang/${PKGVERSION}/include/htmxlintrin.h
-lib/clang/${PKGVERSION}/include/ia32intrin.h
-lib/clang/${PKGVERSION}/include/immintrin.h
-lib/clang/${PKGVERSION}/include/intrin.h
-lib/clang/${PKGVERSION}/include/inttypes.h
-lib/clang/${PKGVERSION}/include/invpcidintrin.h
-lib/clang/${PKGVERSION}/include/iso646.h
-lib/clang/${PKGVERSION}/include/limits.h
-lib/clang/${PKGVERSION}/include/lwpintrin.h
-lib/clang/${PKGVERSION}/include/lzcntintrin.h
-lib/clang/${PKGVERSION}/include/mm3dnow.h
-lib/clang/${PKGVERSION}/include/mm_malloc.h
-lib/clang/${PKGVERSION}/include/mmintrin.h
-lib/clang/${PKGVERSION}/include/module.modulemap
-lib/clang/${PKGVERSION}/include/movdirintrin.h
-lib/clang/${PKGVERSION}/include/msa.h
-lib/clang/${PKGVERSION}/include/mwaitxintrin.h
-lib/clang/${PKGVERSION}/include/nmmintrin.h
-lib/clang/${PKGVERSION}/include/opencl-c-base.h
-lib/clang/${PKGVERSION}/include/opencl-c.h
-lib/clang/${PKGVERSION}/include/openmp_wrappers/__clang_openmp_math.h
-lib/clang/${PKGVERSION}/include/openmp_wrappers/__clang_openmp_math_declares.h
-lib/clang/${PKGVERSION}/include/openmp_wrappers/cmath
-lib/clang/${PKGVERSION}/include/openmp_wrappers/math.h
-lib/clang/${PKGVERSION}/include/pconfigintrin.h
-lib/clang/${PKGVERSION}/include/pkuintrin.h
-lib/clang/${PKGVERSION}/include/pmmintrin.h
-lib/clang/${PKGVERSION}/include/popcntintrin.h
-lib/clang/${PKGVERSION}/include/ppc_wrappers/emmintrin.h
-lib/clang/${PKGVERSION}/include/ppc_wrappers/mm_malloc.h
-lib/clang/${PKGVERSION}/include/ppc_wrappers/mmintrin.h
-lib/clang/${PKGVERSION}/include/ppc_wrappers/xmmintrin.h
-lib/clang/${PKGVERSION}/include/prfchwintrin.h
-lib/clang/${PKGVERSION}/include/ptwriteintrin.h
-lib/clang/${PKGVERSION}/include/rdseedintrin.h
-lib/clang/${PKGVERSION}/include/rtmintrin.h
-lib/clang/${PKGVERSION}/include/s390intrin.h
-lib/clang/${PKGVERSION}/include/sgxintrin.h
-lib/clang/${PKGVERSION}/include/shaintrin.h
-lib/clang/${PKGVERSION}/include/smmintrin.h
-lib/clang/${PKGVERSION}/include/stdalign.h
-lib/clang/${PKGVERSION}/include/stdarg.h
-lib/clang/${PKGVERSION}/include/stdatomic.h
-lib/clang/${PKGVERSION}/include/stdbool.h
-lib/clang/${PKGVERSION}/include/stddef.h
-lib/clang/${PKGVERSION}/include/stdint.h
-lib/clang/${PKGVERSION}/include/stdnoreturn.h
-lib/clang/${PKGVERSION}/include/tbmintrin.h
-lib/clang/${PKGVERSION}/include/tgmath.h
-lib/clang/${PKGVERSION}/include/tmmintrin.h
-lib/clang/${PKGVERSION}/include/unwind.h
-lib/clang/${PKGVERSION}/include/vadefs.h
-lib/clang/${PKGVERSION}/include/vaesintrin.h
-lib/clang/${PKGVERSION}/include/varargs.h
-lib/clang/${PKGVERSION}/include/vecintrin.h
-lib/clang/${PKGVERSION}/include/vpclmulqdqintrin.h
-lib/clang/${PKGVERSION}/include/waitpkgintrin.h
-lib/clang/${PKGVERSION}/include/wbnoinvdintrin.h
-lib/clang/${PKGVERSION}/include/wmmintrin.h
-lib/clang/${PKGVERSION}/include/x86intrin.h
-lib/clang/${PKGVERSION}/include/xmmintrin.h
-lib/clang/${PKGVERSION}/include/xopintrin.h
-lib/clang/${PKGVERSION}/include/xsavecintrin.h
-lib/clang/${PKGVERSION}/include/xsaveintrin.h
-lib/clang/${PKGVERSION}/include/xsaveoptintrin.h
-lib/clang/${PKGVERSION}/include/xsavesintrin.h
-lib/clang/${PKGVERSION}/include/xtestintrin.h
+include/clang/Tooling/Transformer/MatchConsumer.h
+include/clang/Tooling/Transformer/RangeSelector.h
+include/clang/Tooling/Transformer/RewriteRule.h
+include/clang/Tooling/Transformer/SourceCode.h
+include/clang/Tooling/Transformer/SourceCodeBuilders.h
+include/clang/Tooling/Transformer/Stencil.h
+include/clang/Tooling/Transformer/Transformer.h
+lib/clang/10.0.0/include/__clang_cuda_builtin_vars.h
+lib/clang/10.0.0/include/__clang_cuda_cmath.h
+lib/clang/10.0.0/include/__clang_cuda_complex_builtins.h
+lib/clang/10.0.0/include/__clang_cuda_device_functions.h
+lib/clang/10.0.0/include/__clang_cuda_intrinsics.h
+lib/clang/10.0.0/include/__clang_cuda_libdevice_declares.h
+lib/clang/10.0.0/include/__clang_cuda_math_forward_declares.h
+lib/clang/10.0.0/include/__clang_cuda_runtime_wrapper.h
+lib/clang/10.0.0/include/__stddef_max_align_t.h
+lib/clang/10.0.0/include/__wmmintrin_aes.h
+lib/clang/10.0.0/include/__wmmintrin_pclmul.h
+lib/clang/10.0.0/include/adxintrin.h
+lib/clang/10.0.0/include/altivec.h
+lib/clang/10.0.0/include/ammintrin.h
+lib/clang/10.0.0/include/arm64intr.h
+lib/clang/10.0.0/include/arm_acle.h
+lib/clang/10.0.0/include/arm_cmse.h
+lib/clang/10.0.0/include/arm_fp16.h
+lib/clang/10.0.0/include/arm_mve.h
+lib/clang/10.0.0/include/arm_neon.h
+lib/clang/10.0.0/include/armintr.h
+lib/clang/10.0.0/include/avx2intrin.h
+lib/clang/10.0.0/include/avx512bf16intrin.h
+lib/clang/10.0.0/include/avx512bitalgintrin.h
+lib/clang/10.0.0/include/avx512bwintrin.h
+lib/clang/10.0.0/include/avx512cdintrin.h
+lib/clang/10.0.0/include/avx512dqintrin.h
+lib/clang/10.0.0/include/avx512erintrin.h
+lib/clang/10.0.0/include/avx512fintrin.h
+lib/clang/10.0.0/include/avx512ifmaintrin.h
+lib/clang/10.0.0/include/avx512ifmavlintrin.h
+lib/clang/10.0.0/include/avx512pfintrin.h
+lib/clang/10.0.0/include/avx512vbmi2intrin.h
+lib/clang/10.0.0/include/avx512vbmiintrin.h
+lib/clang/10.0.0/include/avx512vbmivlintrin.h
+lib/clang/10.0.0/include/avx512vlbf16intrin.h
+lib/clang/10.0.0/include/avx512vlbitalgintrin.h
+lib/clang/10.0.0/include/avx512vlbwintrin.h
+lib/clang/10.0.0/include/avx512vlcdintrin.h
+lib/clang/10.0.0/include/avx512vldqintrin.h
+lib/clang/10.0.0/include/avx512vlintrin.h
+lib/clang/10.0.0/include/avx512vlvbmi2intrin.h
+lib/clang/10.0.0/include/avx512vlvnniintrin.h
+lib/clang/10.0.0/include/avx512vlvp2intersectintrin.h
+lib/clang/10.0.0/include/avx512vnniintrin.h
+lib/clang/10.0.0/include/avx512vp2intersectintrin.h
+lib/clang/10.0.0/include/avx512vpopcntdqintrin.h
+lib/clang/10.0.0/include/avx512vpopcntdqvlintrin.h
+lib/clang/10.0.0/include/avxintrin.h
+lib/clang/10.0.0/include/bmi2intrin.h
+lib/clang/10.0.0/include/bmiintrin.h
+lib/clang/10.0.0/include/cetintrin.h
+lib/clang/10.0.0/include/cldemoteintrin.h
+lib/clang/10.0.0/include/clflushoptintrin.h
+lib/clang/10.0.0/include/clwbintrin.h
+lib/clang/10.0.0/include/clzerointrin.h
+lib/clang/10.0.0/include/cpuid.h
+lib/clang/10.0.0/include/cuda_wrappers/algorithm
+lib/clang/10.0.0/include/cuda_wrappers/complex
+lib/clang/10.0.0/include/cuda_wrappers/new
+lib/clang/10.0.0/include/emmintrin.h
+lib/clang/10.0.0/include/enqcmdintrin.h
+lib/clang/10.0.0/include/f16cintrin.h
+lib/clang/10.0.0/include/float.h
+lib/clang/10.0.0/include/fma4intrin.h
+lib/clang/10.0.0/include/fmaintrin.h
+lib/clang/10.0.0/include/fxsrintrin.h
+lib/clang/10.0.0/include/gfniintrin.h
+lib/clang/10.0.0/include/htmintrin.h
+lib/clang/10.0.0/include/htmxlintrin.h
+lib/clang/10.0.0/include/ia32intrin.h
+lib/clang/10.0.0/include/immintrin.h
+lib/clang/10.0.0/include/intrin.h
+lib/clang/10.0.0/include/inttypes.h
+lib/clang/10.0.0/include/invpcidintrin.h
+lib/clang/10.0.0/include/iso646.h
+lib/clang/10.0.0/include/limits.h
+lib/clang/10.0.0/include/lwpintrin.h
+lib/clang/10.0.0/include/lzcntintrin.h
+lib/clang/10.0.0/include/mm3dnow.h
+lib/clang/10.0.0/include/mm_malloc.h
+lib/clang/10.0.0/include/mmintrin.h
+lib/clang/10.0.0/include/module.modulemap
+lib/clang/10.0.0/include/movdirintrin.h
+lib/clang/10.0.0/include/msa.h
+lib/clang/10.0.0/include/mwaitxintrin.h
+lib/clang/10.0.0/include/nmmintrin.h
+lib/clang/10.0.0/include/opencl-c-base.h
+lib/clang/10.0.0/include/opencl-c.h
+lib/clang/10.0.0/include/openmp_wrappers/__clang_openmp_math.h
+lib/clang/10.0.0/include/openmp_wrappers/__clang_openmp_math_declares.h
+lib/clang/10.0.0/include/openmp_wrappers/cmath
+lib/clang/10.0.0/include/openmp_wrappers/math.h
+lib/clang/10.0.0/include/pconfigintrin.h
+lib/clang/10.0.0/include/pkuintrin.h
+lib/clang/10.0.0/include/pmmintrin.h
+lib/clang/10.0.0/include/popcntintrin.h
+lib/clang/10.0.0/include/ppc_wrappers/emmintrin.h
+lib/clang/10.0.0/include/ppc_wrappers/mm_malloc.h
+lib/clang/10.0.0/include/ppc_wrappers/mmintrin.h
+lib/clang/10.0.0/include/ppc_wrappers/pmmintrin.h
+lib/clang/10.0.0/include/ppc_wrappers/smmintrin.h
+lib/clang/10.0.0/include/ppc_wrappers/tmmintrin.h
+lib/clang/10.0.0/include/ppc_wrappers/xmmintrin.h
+lib/clang/10.0.0/include/prfchwintrin.h
+lib/clang/10.0.0/include/ptwriteintrin.h
+lib/clang/10.0.0/include/rdseedintrin.h
+lib/clang/10.0.0/include/rtmintrin.h
+lib/clang/10.0.0/include/s390intrin.h
+lib/clang/10.0.0/include/sgxintrin.h
+lib/clang/10.0.0/include/shaintrin.h
+lib/clang/10.0.0/include/smmintrin.h
+lib/clang/10.0.0/include/stdalign.h
+lib/clang/10.0.0/include/stdarg.h
+lib/clang/10.0.0/include/stdatomic.h
+lib/clang/10.0.0/include/stdbool.h
+lib/clang/10.0.0/include/stddef.h
+lib/clang/10.0.0/include/stdint.h
+lib/clang/10.0.0/include/stdnoreturn.h
+lib/clang/10.0.0/include/tbmintrin.h
+lib/clang/10.0.0/include/tgmath.h
+lib/clang/10.0.0/include/tmmintrin.h
+lib/clang/10.0.0/include/unwind.h
+lib/clang/10.0.0/include/vadefs.h
+lib/clang/10.0.0/include/vaesintrin.h
+lib/clang/10.0.0/include/varargs.h
+lib/clang/10.0.0/include/vecintrin.h
+lib/clang/10.0.0/include/vpclmulqdqintrin.h
+lib/clang/10.0.0/include/waitpkgintrin.h
+lib/clang/10.0.0/include/wbnoinvdintrin.h
+lib/clang/10.0.0/include/wmmintrin.h
+lib/clang/10.0.0/include/x86intrin.h
+lib/clang/10.0.0/include/xmmintrin.h
+lib/clang/10.0.0/include/xopintrin.h
+lib/clang/10.0.0/include/xsavecintrin.h
+lib/clang/10.0.0/include/xsaveintrin.h
+lib/clang/10.0.0/include/xsaveoptintrin.h
+lib/clang/10.0.0/include/xsavesintrin.h
+lib/clang/10.0.0/include/xtestintrin.h
 lib/cmake/clang/ClangConfig.cmake
 lib/cmake/clang/ClangTargets-release.cmake
 lib/cmake/clang/ClangTargets.cmake
 lib/libclang-cpp.${SOEXT}
-${PLIST.notdylib}lib/libclang-cpp.${SOEXT}.9
+${PLIST.notdylib}lib/libclang-cpp.${SOEXT}.10
 lib/libclang.${SOEXT}
-${PLIST.notdylib}lib/libclang.${SOEXT}.9
+${PLIST.notdylib}lib/libclang.${SOEXT}.10
 lib/libclangAST.a
 lib/libclangASTMatchers.a
 lib/libclangAnalysis.a
@@ -759,6 +802,7 @@ lib/libclangToolingCore.a
 lib/libclangToolingInclusions.a
 lib/libclangToolingRefactoring.a
 lib/libclangToolingSyntax.a
+lib/libclangTransformer.a
 share/clang/bash-autocomplete.sh
 share/clang/clang-format-bbedit.applescript
 share/clang/clang-format-diff.py

Index: pkgsrc/lang/clang/distinfo
diff -u pkgsrc/lang/clang/distinfo:1.63 pkgsrc/lang/clang/distinfo:1.64
--- pkgsrc/lang/clang/distinfo:1.63     Sun Dec 29 15:31:22 2019
+++ pkgsrc/lang/clang/distinfo  Sat Apr 18 07:53:38 2020
@@ -1,12 +1,12 @@
-$NetBSD: distinfo,v 1.63 2019/12/29 15:31:22 adam Exp $
+$NetBSD: distinfo,v 1.64 2020/04/18 07:53:38 adam Exp $
 
-SHA1 (clang-9.0.1.src.tar.xz) = 0d72ce018c85c54fc709c7da71d3dd1463af0bfc
-RMD160 (clang-9.0.1.src.tar.xz) = 424b98b3b6252f119fc06c8dfbc8fb1344531e88
-SHA512 (clang-9.0.1.src.tar.xz) = 3bcdcfd1ebb20a2cb15d57c608106b6e6e9c2eda4b781f573e84e0600b775bb7609f6df9edcf819ee5d91cc01a28ee089353c29fd57c23b867afbf6ad2f5cd13
-Size (clang-9.0.1.src.tar.xz) = 13452780 bytes
+SHA1 (clang-10.0.0.src.tar.xz) = cfaa4c4e89a45b604e6f3057f984d73365074727
+RMD160 (clang-10.0.0.src.tar.xz) = 7a2a0b3fd1b6b0d9c59a506f99d628417a565724
+SHA512 (clang-10.0.0.src.tar.xz) = b1cccc13c46abcda3d689f51d486fa613ecec40c581c72d8b15951715100a2b8fb24370161601e6716cdba5a784337439e99ec2f0766f988e9cce92de6d775da
+Size (clang-10.0.0.src.tar.xz) = 14190012 bytes
 SHA1 (patch-lib_Basic_Targets_OSTargets.h) = 02533d1de2c92a431d9c5d4567f348deff056b99
 SHA1 (patch-lib_Driver_ToolChain.cpp) = b49a6032d75e33ffe2606012addd826e9fdbb1db
-SHA1 (patch-lib_Driver_ToolChains_NetBSD.cpp) = 139daaafefeb23101b74a89cb6a932d4ec460c8e
-SHA1 (patch-lib_Driver_ToolChains_Solaris.cpp) = a704f038f98adf4e92baaf9058bd801921af9ede
+SHA1 (patch-lib_Driver_ToolChains_Solaris.cpp) = 797af9f730bcbcf47c374152861964d745634d21
 SHA1 (patch-lib_Driver_ToolChains_Solaris.h) = 94968d0de0972ff832727822fbdc02442be74ab8
 SHA1 (patch-lib_Frontend_InitHeaderSearch.cpp) = 497ddbe1eac8726d736bed58557a795dce207d1a
+SHA1 (patch-tools_libclang_FatalErrorHandler.cpp) = 5761b54b493587272667d3f79388e98e37a4b1fb

Index: pkgsrc/lang/clang/patches/patch-lib_Driver_ToolChains_Solaris.cpp
diff -u pkgsrc/lang/clang/patches/patch-lib_Driver_ToolChains_Solaris.cpp:1.4 pkgsrc/lang/clang/patches/patch-lib_Driver_ToolChains_Solaris.cpp:1.5
--- pkgsrc/lang/clang/patches/patch-lib_Driver_ToolChains_Solaris.cpp:1.4       Sat Oct 19 13:54:29 2019
+++ pkgsrc/lang/clang/patches/patch-lib_Driver_ToolChains_Solaris.cpp   Sat Apr 18 07:53:38 2020
@@ -1,4 +1,4 @@
-$NetBSD: patch-lib_Driver_ToolChains_Solaris.cpp,v 1.4 2019/10/19 13:54:29 adam Exp $
+$NetBSD: patch-lib_Driver_ToolChains_Solaris.cpp,v 1.5 2020/04/18 07:53:38 adam Exp $
 
 Use compiler-rt instead of libgcc.
 Pull in libcxx correctly.
@@ -7,9 +7,9 @@ Don't specify --dynamic-linker, makes it
 Ensure we reset to -zdefaultextract prior to adding compiler-rt.
 Test removing -Bdynamic for golang.
 
---- lib/Driver/ToolChains/Solaris.cpp.orig     2019-07-16 11:06:43.000000000 +0000
+--- lib/Driver/ToolChains/Solaris.cpp.orig     2020-03-19 09:19:04.000000000 +0000
 +++ lib/Driver/ToolChains/Solaris.cpp
-@@ -48,8 +48,29 @@ void solaris::Linker::ConstructJob(Compi
+@@ -49,8 +49,29 @@ void solaris::Linker::ConstructJob(Compi
                                     const InputInfoList &Inputs,
                                     const ArgList &Args,
                                     const char *LinkingOutput) const {
@@ -39,7 +39,7 @@ Test removing -Bdynamic for golang.
    // Demangle C++ names in errors
    CmdArgs.push_back("-C");
  
-@@ -62,7 +83,6 @@ void solaris::Linker::ConstructJob(Compi
+@@ -63,7 +84,6 @@ void solaris::Linker::ConstructJob(Compi
      CmdArgs.push_back("-Bstatic");
      CmdArgs.push_back("-dn");
    } else {
@@ -47,7 +47,7 @@ Test removing -Bdynamic for golang.
      if (Args.hasArg(options::OPT_shared)) {
        CmdArgs.push_back("-shared");
      }
-@@ -83,13 +103,11 @@ void solaris::Linker::ConstructJob(Compi
+@@ -84,9 +104,9 @@ void solaris::Linker::ConstructJob(Compi
    if (!Args.hasArg(options::OPT_nostdlib, options::OPT_nostartfiles)) {
      if (!Args.hasArg(options::OPT_shared))
        CmdArgs.push_back(
@@ -56,15 +56,30 @@ Test removing -Bdynamic for golang.
  
 -    CmdArgs.push_back(Args.MakeArgString(getToolChain().GetFilePath("crti.o")));
 +    CmdArgs.push_back(Args.MakeArgString(SysPath + "crti.o"));
+ 
+     const Arg *Std = Args.getLastArg(options::OPT_std_EQ, options::OPT_ansi);
+     bool HaveAnsi = false;
+@@ -101,16 +121,16 @@ void solaris::Linker::ConstructJob(Compi
+     // Use values-Xc.o for -ansi, -std=c*, -std=iso9899:199409.
+     if (HaveAnsi || (LangStd && !LangStd->isGNUMode()))
+       values_X = "values-Xc.o";
+-    CmdArgs.push_back(Args.MakeArgString(getToolChain().GetFilePath(values_X)));
++    CmdArgs.push_back(Args.MakeArgString(SysPath + values_X));
+ 
+     const char *values_xpg = "values-xpg6.o";
+     // Use values-xpg4.o for -std=c90, -std=gnu90, -std=iso9899:199409.
+     if (LangStd && LangStd->getLanguage() == Language::C && !LangStd->isC99())
+       values_xpg = "values-xpg4.o";
+     CmdArgs.push_back(
+-        Args.MakeArgString(getToolChain().GetFilePath(values_xpg)));
++        Args.MakeArgString(SysPath + values_xpg));
      CmdArgs.push_back(
--        Args.MakeArgString(getToolChain().GetFilePath("values-Xa.o")));
--    CmdArgs.push_back(
 -        Args.MakeArgString(getToolChain().GetFilePath("crtbegin.o")));
-+        Args.MakeArgString(SysPath + "values-Xa.o"));
++        Args.MakeArgString(SysPath + "crtbegin.o"));
    }
  
    getToolChain().AddFilePathLibArgs(Args, CmdArgs);
-@@ -101,30 +119,23 @@ void solaris::Linker::ConstructJob(Compi
+@@ -122,30 +142,23 @@ void solaris::Linker::ConstructJob(Compi
    AddLinkerInputs(getToolChain(), Inputs, Args, CmdArgs, JA);
  
    if (!Args.hasArg(options::OPT_nostdlib, options::OPT_nodefaultlibs)) {
@@ -106,7 +121,7 @@ Test removing -Bdynamic for golang.
  
    getToolChain().addProfileRTLibs(Args, CmdArgs);
  
-@@ -153,26 +164,9 @@ Solaris::Solaris(const Driver &D, const 
+@@ -174,26 +187,9 @@ Solaris::Solaris(const Driver &D, const 
                   const ArgList &Args)
      : Generic_ELF(D, Triple, Args) {
  
@@ -136,7 +151,7 @@ Test removing -Bdynamic for golang.
  }
  
  SanitizerMask Solaris::getSupportedSanitizers() const {
-@@ -194,6 +188,32 @@ Tool *Solaris::buildAssembler() const {
+@@ -218,6 +214,32 @@ Tool *Solaris::buildAssembler() const {
  
  Tool *Solaris::buildLinker() const { return new tools::solaris::Linker(*this); }
  
@@ -169,7 +184,7 @@ Test removing -Bdynamic for golang.
  void Solaris::AddClangSystemIncludeArgs(const ArgList &DriverArgs,
                                          ArgStringList &CC1Args) const {
    const Driver &D = getDriver();
-@@ -226,40 +246,20 @@ void Solaris::AddClangSystemIncludeArgs(
+@@ -250,40 +272,20 @@ void Solaris::AddClangSystemIncludeArgs(
      return;
    }
  

Added files:

Index: pkgsrc/lang/clang/patches/patch-tools_libclang_FatalErrorHandler.cpp
diff -u /dev/null pkgsrc/lang/clang/patches/patch-tools_libclang_FatalErrorHandler.cpp:1.1
--- /dev/null   Sat Apr 18 07:53:38 2020
+++ pkgsrc/lang/clang/patches/patch-tools_libclang_FatalErrorHandler.cpp        Sat Apr 18 07:53:38 2020
@@ -0,0 +1,22 @@
+$NetBSD: patch-tools_libclang_FatalErrorHandler.cpp,v 1.1 2020/04/18 07:53:38 adam Exp $
+
+Fix error: no member named 'abort' in the global namespace.
+
+--- tools/libclang/FatalErrorHandler.cpp.orig  2020-03-21 13:07:00.218249876 +0000
++++ tools/libclang/FatalErrorHandler.cpp
+@@ -9,13 +9,14 @@
+ 
+ #include "clang-c/FatalErrorHandler.h"
+ #include "llvm/Support/ErrorHandling.h"
++#include <cstdlib>
+ 
+ static void aborting_fatal_error_handler(void *, const std::string &reason,
+                                          bool) {
+   // Write the result out to stderr avoiding errs() because raw_ostreams can
+   // call report_fatal_error.
+   fprintf(stderr, "LIBCLANG FATAL ERROR: %s\n", reason.c_str());
+-  ::abort();
++  abort();
+ }
+ 
+ extern "C" {



Home | Main Index | Thread Index | Old Index