The package rpms/clang8.0.git has added or updated architecture specific content in its
spec file (ExclusiveArch/ExcludeArch or %ifarch/%ifnarch) in commit(s):
https://src.fedoraproject.org/cgit/rpms/clang8.0.git/commit/?id=ce4d40537....
Change:
+%ifarch s390x i686 ppc64le %{arm}
Thanks.
Full change:
============
commit 4ad0d57ff674d85c9059e6fb3e5af555edb1a9aa
Author: Tom Stellard <tstellar(a)redhat.com>
Date: Mon Sep 23 16:55:03 2019 +0000
Rebuild with fc32 dist tag
diff --git a/clang.spec b/clang.spec
index 87b7d5c..34a0906 100644
--- a/clang.spec
+++ b/clang.spec
@@ -4,7 +4,7 @@
%global min_ver 0
%global patch_ver 0
#%%global rc_ver 4
-%global baserelease 3
+%global baserelease 4
%global clang_tools_binaries \
%{_bindir}/clangd \
@@ -429,6 +429,9 @@ false
%endif
%changelog
+* Mon Sep 23 2019 Tom Stellard <tstellar(a)redhat.com> - 8.0.0-4
+- Rebuild with fc32 dist tag
+
* Wed Jul 24 2019 Fedora Release Engineering <releng(a)fedoraproject.org> -
8.0.0-3.1
- Rebuilt for
https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
commit ce4d405379f71e7cbf51091ff6e47bf179707d2e
Author: Tom Stellard <tstellar(a)redhat.com>
Date: Thu Aug 15 03:08:13 2019 +0000
Add missing spec file
diff --git a/clang.spec b/clang.spec
new file mode 100644
index 0000000..87b7d5c
--- /dev/null
+++ b/clang.spec
@@ -0,0 +1,729 @@
+%global compat_build 1
+
+%global maj_ver 8
+%global min_ver 0
+%global patch_ver 0
+#%%global rc_ver 4
+%global baserelease 3
+
+%global clang_tools_binaries \
+ %{_bindir}/clangd \
+ %{_bindir}/clang-apply-replacements \
+ %{_bindir}/clang-change-namespace \
+ %{_bindir}/clang-include-fixer \
+ %{_bindir}/clang-query \
+ %{_bindir}/clang-refactor \
+ %{_bindir}/clang-reorder-fields \
+ %{_bindir}/clang-rename \
+ %{_bindir}/clang-tidy
+
+%global clang_binaries \
+ %{_bindir}/clang \
+ %{_bindir}/clang++ \
+ %{_bindir}/clang-%{maj_ver} \
+ %{_bindir}/clang++-%{maj_ver} \
+ %{_bindir}/clang-check \
+ %{_bindir}/clang-cl \
+ %{_bindir}/clang-cpp \
+ %{_bindir}/clang-extdef-mapping \
+ %{_bindir}/clang-format \
+ %{_bindir}/clang-import-test \
+ %{_bindir}/clang-offload-bundler \
+ %{_bindir}/diagtool \
+ %{_bindir}/hmaptool
+
+%if 0%{?compat_build}
+%global pkg_name clang%{maj_ver}.%{min_ver}
+# Install clang to same prefix as llvm, so that apps that use llvm-config
+# will also be able to find clang libs.
+%global install_prefix %{_libdir}/llvm%{maj_ver}.%{min_ver}
+%global install_bindir %{install_prefix}/bin
+%global install_includedir %{install_prefix}/include
+%global install_libdir %{install_prefix}/lib
+
+%global pkg_bindir %{install_bindir}
+%global pkg_includedir %{_includedir}/llvm%{maj_ver}.%{min_ver}
+%global pkg_libdir %{install_libdir}
+%else
+%global pkg_name clang
+%global install_prefix /usr
+%endif
+
+%if 0%{?fedora} || 0%{?rhel} > 7
+%bcond_without python3
+%else
+%bcond_with python3
+%endif
+
+%global build_install_prefix %{buildroot}%{install_prefix}
+
+%global clang_srcdir cfe-%{version}%{?rc_ver:rc%{rc_ver}}.src
+%global clang_tools_srcdir clang-tools-extra-%{version}%{?rc_ver:rc%{rc_ver}}.src
+
+Name: %pkg_name
+Version: %{maj_ver}.%{min_ver}.%{patch_ver}
+Release: %{baserelease}%{?rc_ver:.rc%{rc_ver}}%{?dist}
+Summary: A C language family front-end for LLVM
+
+License: NCSA
+URL:
http://llvm.org
+Source0: http://%{?rc_ver:pre}releases.llvm.org/%{version}/%{?rc_ver:rc%{rc_ver}}/%{clang_srcdir}.tar.xz
+%if !0%{?compat_build}
+Source1: http://%{?rc_ver:pre}releases.llvm.org/%{version}/%{?rc_ver:rc%{rc_ver}}/%{clang_tools_srcdir}.tar.xz
+%endif
+
+Patch4: 0002-gtest-reorg.patch
+Patch9: 0001-Fix-uninitialized-value-in-ABIArgInfo.patch
+Patch11: 0001-ToolChain-Add-lgcc_s-to-the-linker-flags-when-using-.patch
+Patch12: 0001-Fix-isInSystemMacro-to-handle-pasted-macros.patch
+Patch13: 0002-Format-isInSystemMacro-after-D55782.patch
+Patch14: 0003-Fix-isInSystemMacro-in-presence-of-macro-and-pasted-.patch
+
+BuildRequires: gcc
+BuildRequires: gcc-c++
+BuildRequires: cmake
+BuildRequires: ninja-build
+%if 0%{?compat_build}
+BuildRequires: llvm%{maj_ver}.%{min_ver}-devel = %{version}
+BuildRequires: llvm%{maj_ver}.%{min_ver}-static = %{version}
+%else
+BuildRequires: llvm-devel = %{version}
+BuildRequires: llvm-test = %{version}
+# llvm-static is required, because clang-tablegen needs libLLVMTableGen, which
+# is not included in libLLVM.so.
+BuildRequires: llvm-static = %{version}
+BuildRequires: llvm-googletest = %{version}
+%endif
+
+BuildRequires: libxml2-devel
+BuildRequires: perl-generators
+BuildRequires: ncurses-devel
+# According to
https://fedoraproject.org/wiki/Packaging:Emacs a package
+# should BuildRequires: emacs if it packages emacs integration files.
+BuildRequires: emacs
+
+# These build dependencies are required for the test suite.
+%if %with python3
+# The testsuite uses /usr/bin/lit which is part of the python3-lit package.
+BuildRequires: python3-lit
+%endif
+
+BuildRequires: python3-sphinx
+BuildRequires: libatomic
+
+# We need python3-devel for pathfix.py.
+BuildRequires: python3-devel
+
+# Needed for %%multilib_fix_c_header
+BuildRequires: multilib-rpm-config
+BuildRequires: chrpath
+
+Requires: %{name}-libs%{?_isa} = %{version}-%{release}
+
+# clang requires gcc, clang++ requires libstdc++-devel
+# -
https://bugzilla.redhat.com/show_bug.cgi?id=1021645
+# -
https://bugzilla.redhat.com/show_bug.cgi?id=1158594
+Requires: libstdc++-devel
+Requires: gcc-c++
+
+Requires: emacs-filesystem
+
+Provides: clang(major) = %{maj_ver}
+
+%description
+clang: noun
+ 1. A loud, resonant, metallic sound.
+ 2. The strident call of a crane or goose.
+ 3. C-language family front-end toolkit.
+
+The goal of the Clang project is to create a new C, C++, Objective C
+and Objective C++ front-end for the LLVM compiler. Its tools are built
+as libraries and designed to be loosely-coupled and extensible.
+
+%package libs
+Summary: Runtime library for clang
+Recommends: compiler-rt%{?_isa} = %{version}
+Recommends: libomp%{_isa} = %{version}
+
+%description libs
+Runtime library for clang.
+
+%package devel
+Summary: Development header files for clang
+%if !0%{?compat_build}
+Requires: %{name}%{?_isa} = %{version}-%{release}
+# The clang CMake files reference tools from clang-tools-extra.
+Requires: %{name}-tools-extra%{?_isa} = %{version}-%{release}
+%endif
+
+%description devel
+Development header files for clang.
+
+%if !0%{?compat_build}
+%package analyzer
+Summary: A source code analysis framework
+License: NCSA and MIT
+BuildArch: noarch
+Requires: %{name} = %{version}-%{release}
+
+%description analyzer
+The Clang Static Analyzer consists of both a source code analysis
+framework and a standalone tool that finds bugs in C and Objective-C
+programs. The standalone tool is invoked from the command-line, and is
+intended to run in tandem with a build of a project or code base.
+
+%package tools-extra
+Summary: Extra tools for clang
+Requires: %{name}-libs%{?_isa} = %{version}-%{release}
+Requires: emacs-filesystem
+
+%description tools-extra
+A set of extra tools built using Clang's tooling API.
+
+# Put git-clang-format in its own package, because it Requires git
+# and we don't want to force users to install all those dependenices if they
+# just want clang.
+%package -n git-clang-format
+Summary: Integration of clang-format for git
+Requires: %{name}%{?_isa} = %{version}-%{release}
+Requires: git
+Requires: python3
+
+%description -n git-clang-format
+clang-format integration for git.
+
+
+%package -n python3-clang
+Summary: Python3 bindings for clang
+Requires: %{name}-libs%{?_isa} = %{version}-%{release}
+Requires: python3
+%description -n python3-clang
+%{summary}.
+
+
+%endif
+
+
+%prep
+%if 0%{?compat_build}
+%autosetup -n %{clang_srcdir} -p1
+%else
+%setup -T -q -b 1 -n %{clang_tools_srcdir}
+
+
+pathfix.py -i %{__python3} -pn \
+ clang-tidy/tool/*.py \
+ include-fixer/find-all-symbols/tool/run-find-all-symbols.py
+
+%setup -q -n %{clang_srcdir}
+
+%patch4 -p1 -b .gtest
+%patch9 -p1 -b .abi-arginfo
+%patch11 -p1 -b .libcxx-fix
+%patch12 -p1 -b .double-promotion-0
+%patch13 -p1 -b .double-promotion-1
+%patch14 -p1 -b .double-promotion-2
+
+mv ../%{clang_tools_srcdir} tools/extra
+
+pathfix.py -i %{__python3} -pn \
+ tools/clang-format/*.py \
+ tools/clang-format/git-clang-format \
+ utils/hmaptool/hmaptool \
+ tools/scan-view/bin/scan-view
+%endif
+
+%build
+
+%if 0%{?__isa_bits} == 64
+sed -i 's/\@FEDORA_LLVM_LIB_SUFFIX\@/64/g' test/lit.cfg.py
+%else
+sed -i 's/\@FEDORA_LLVM_LIB_SUFFIX\@//g' test/lit.cfg.py
+%endif
+
+mkdir -p _build
+cd _build
+
+%ifarch s390 s390x %{arm} %ix86
+# Decrease debuginfo verbosity to reduce memory consumption during final library linking
+%global optflags %(echo %{optflags} | sed 's/-g /-g1 /')
+%endif
+
+%cmake .. -G Ninja \
+ -DLLVM_PARALLEL_LINK_JOBS=1 \
+ -DLLVM_LINK_LLVM_DYLIB:BOOL=ON \
+ -DCMAKE_BUILD_TYPE=RelWithDebInfo \
+ -DPYTHON_EXECUTABLE=%{__python3} \
+ -DCMAKE_SKIP_RPATH:BOOL=ON \
+ -DCMAKE_INSTALL_RPATH:BOOL=OFF \
+%if 0%{?compat_build}
+ -DLLVM_CONFIG:FILEPATH=%{_bindir}/llvm-config-%{maj_ver}.%{min_ver}-%{__isa_bits} \
+ -DCMAKE_INSTALL_PREFIX=%{install_prefix} \
+ -DCLANG_INCLUDE_TESTS:BOOL=OFF \
+%else
+ -DCLANG_INCLUDE_TESTS:BOOL=ON \
+ -DLLVM_EXTERNAL_LIT=%{_bindir}/lit \
+ -DLLVM_MAIN_SRC_DIR=%{_datadir}/llvm/src \
+%if 0%{?__isa_bits} == 64
+ -DLLVM_LIBDIR_SUFFIX=64 \
+%else
+ -DLLVM_LIBDIR_SUFFIX= \
+%endif
+%endif
+ \
+%if !0%{compat_build}
+ -DLLVM_TABLEGEN_EXE:FILEPATH=%{_bindir}/llvm-tblgen \
+%else
+ -DLLVM_TABLEGEN_EXE:FILEPATH=%{_bindir}/llvm-tblgen-%{maj_ver}.%{min_ver} \
+%endif
+ -DCLANG_ENABLE_ARCMT:BOOL=ON \
+ -DCLANG_ENABLE_STATIC_ANALYZER:BOOL=ON \
+ -DCLANG_INCLUDE_DOCS:BOOL=ON \
+ -DCLANG_PLUGIN_SUPPORT:BOOL=ON \
+ -DENABLE_LINKER_BUILD_ID:BOOL=ON \
+ -DLLVM_ENABLE_EH=ON \
+ -DLLVM_ENABLE_RTTI=ON \
+ -DLLVM_BUILD_DOCS=ON \
+ -DLLVM_ENABLE_SPHINX=ON \
+ -DSPHINX_WARNINGS_AS_ERRORS=OFF \
+ \
+ -DCLANG_BUILD_EXAMPLES:BOOL=OFF \
+ -DCLANG_REPOSITORY_STRING="%{?fedora:Fedora}%{?rhel:Red Hat}
%{version}-%{release}"
+
+ninja -v
+
+%install
+DESTDIR=%{buildroot} ninja install -C _build
+
+%if 0%{?compat_build}
+
+# Remove binaries/other files
+rm -Rf %{buildroot}%{install_bindir}
+rm -Rf %{buildroot}%{install_prefix}/share
+rm -Rf %{buildroot}%{install_prefix}/libexec
+
+# Move include files
+mkdir -p %{buildroot}%{pkg_includedir}
+mv %{buildroot}/%{install_includedir}/clang %{buildroot}/%{pkg_includedir}/
+mv %{buildroot}/%{install_includedir}/clang-c %{buildroot}/%{pkg_includedir}/
+
+%else
+
+# install clang python bindings
+mkdir -p %{buildroot}%{python3_sitelib}/clang/
+install -p -m644 bindings/python/clang/* %{buildroot}%{python3_sitelib}/clang/
+%py_byte_compile %{__python3} %{buildroot}%{python3_sitelib}/clang
+
+# multilib fix
+%multilib_fix_c_header --file %{_includedir}/clang/Config/config.h
+
+# Move emacs integration files to the correct directory
+mkdir -p %{buildroot}%{_emacs_sitestartdir}
+for f in clang-format.el clang-rename.el clang-include-fixer.el; do
+mv %{buildroot}{%{_datadir}/clang,%{_emacs_sitestartdir}}/$f
+done
+
+# remove editor integrations (bbedit, sublime, emacs, vim)
+rm -vf %{buildroot}%{_datadir}/clang/clang-format-bbedit.applescript
+rm -vf %{buildroot}%{_datadir}/clang/clang-format-sublime.py*
+
+# TODO: Package html docs
+rm -Rvf %{buildroot}%{_pkgdocdir}
+
+# TODO: What are the Fedora guidelines for packaging bash autocomplete files?
+rm -vf %{buildroot}%{_datadir}/clang/bash-autocomplete.sh
+
+# Create Manpage symlinks
+ln -s clang.1.gz %{buildroot}%{_mandir}/man1/clang++.1.gz
+ln -s clang.1.gz %{buildroot}%{_mandir}/man1/clang-%{maj_ver}.1.gz
+ln -s clang.1.gz %{buildroot}%{_mandir}/man1/clang++-%{maj_ver}.1.gz
+
+# Add clang++-{version} symlink
+ln -s clang++ %{buildroot}%{_bindir}/clang++-%{maj_ver}
+
+
+# Fix permission
+chmod u-x %{buildroot}%{_mandir}/man1/scan-build.1*
+
+%endif
+
+%check
+%if !0%{?compat_build}
+# requires lit.py from LLVM utilities
+# FIXME: Fix failing ARM tests, s390x i686 and ppc64le tests
+LD_LIBRARY_PATH=%{buildroot}%{_libdir} ninja check-all -C _build || \
+%ifarch s390x i686 ppc64le %{arm}
+:
+%else
+false
+%endif
+
+%endif
+
+
+%if !0%{?compat_build}
+%files
+%{clang_binaries}
+%{_bindir}/c-index-test
+%{_mandir}/man1/clang.1.gz
+%{_mandir}/man1/clang++.1.gz
+%{_mandir}/man1/clang-%{maj_ver}.1.gz
+%{_mandir}/man1/clang++-%{maj_ver}.1.gz
+%{_mandir}/man1/diagtool.1.gz
+%{_emacs_sitestartdir}/clang-format.el
+%{_datadir}/clang/clang-format.py*
+%{_datadir}/clang/clang-format-diff.py*
+%endif
+
+%files libs
+%if !0%{?compat_build}
+%{_libdir}/clang/
+%{_libdir}/*.so.*
+%else
+%{pkg_libdir}/*.so.*
+%{pkg_libdir}/clang/%{version}
+%endif
+
+%files devel
+%if !0%{?compat_build}
+%{_libdir}/*.so
+%{_includedir}/clang/
+%{_includedir}/clang-c/
+%{_libdir}/cmake/*
+%dir %{_datadir}/clang/
+%else
+%{pkg_libdir}/*.so
+%{pkg_includedir}/clang/
+%{pkg_includedir}/clang-c/
+%{pkg_libdir}/cmake/
+%endif
+
+%if !0%{?compat_build}
+%files analyzer
+%{_bindir}/scan-view
+%{_bindir}/scan-build
+%{_libexecdir}/ccc-analyzer
+%{_libexecdir}/c++-analyzer
+%{_datadir}/scan-view/
+%{_datadir}/scan-build/
+%{_mandir}/man1/scan-build.1.*
+
+%files tools-extra
+%{clang_tools_binaries}
+%{_bindir}/find-all-symbols
+%{_bindir}/modularize
+%{_emacs_sitestartdir}/clang-rename.el
+%{_emacs_sitestartdir}/clang-include-fixer.el
+%{_datadir}/clang/clang-include-fixer.py*
+%{_datadir}/clang/clang-tidy-diff.py*
+%{_datadir}/clang/run-clang-tidy.py*
+%{_datadir}/clang/run-find-all-symbols.py*
+%{_datadir}/clang/clang-rename.py*
+
+%files -n git-clang-format
+%{_bindir}/git-clang-format
+
+%files -n python3-clang
+%{python3_sitelib}/clang/
+
+
+%endif
+%changelog
+* Wed Jul 24 2019 Fedora Release Engineering <releng(a)fedoraproject.org> -
8.0.0-3.1
+- Rebuilt for
https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
+
+* Thu May 16 2019 sguelton(a)redhat.com - 8.0.0-3
+- Fix for rhbz#1674031
+
+* Fri Apr 12 2019 sguelton(a)redhat.com - 8.0.0-2
+- Remove useless patch thanks to GCC upgrade
+
+* Wed Mar 20 2019 sguelton(a)redhat.com - 8.0.0-1
+- 8.0.0 final
+
+* Tue Mar 12 2019 sguelton(a)redhat.com - 8.0.0-0.6.rc4
+- 8.0.0 Release candidate 4
+
+* Mon Mar 4 2019 sguelton(a)redhat.com - 8.0.0-0.5.rc3
+- Cleanup specfile after llvm dependency update
+
+* Mon Mar 4 2019 sguelton(a)redhat.com - 8.0.0-0.4.rc3
+- 8.0.0 Release candidate 3
+
+* Mon Feb 25 2019 tstellar(a)redhat.com - 8.0.0-0.3.rc2
+- Fix compiling with -stdlib=libc++
+
+* Thu Feb 21 2019 sguelton(a)redhat.com - 8.0.0-0.2.rc2
+- 8.0.0 Release candidate 2
+
+* Sat Feb 09 2019 sguelton(a)redhat.com - 8.0.0-0.1.rc1
+- 8.0.0 Release candidate 1
+
+* Tue Feb 05 2019 sguelton(a)redhat.com - 7.0.1-6
+- Update patch for Python3 port of scan-view
+
+* Tue Feb 05 2019 sguelton(a)redhat.com - 7.0.1-5
+- Working CI test suite
+
+* Mon Feb 04 2019 sguelton(a)redhat.com - 7.0.1-4
+- Workaround gcc-9 bug when compiling bitfields
+
+* Fri Feb 01 2019 sguelton(a)redhat.com - 7.0.1-3
+- Fix uninitialized error detected by gcc-9
+
+* Thu Jan 31 2019 Fedora Release Engineering <releng(a)fedoraproject.org> -
7.0.1-2.1
+- Rebuilt for
https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
+
+* Wed Dec 19 2018 Tom Stellard <tstellar(a)redhat.com> - 7.0.1-2
+- Fix for rhbz#1657544
+
+* Tue Dec 18 2018 sguelton(a)redhat.com - 7.0.1-1
+- 7.0.1
+
+* Tue Dec 18 2018 sguelton(a)redhat.com - 7.0.0-10
+- Install proper manpage symlinks for clang/clang++ versions
+
+* Fri Dec 14 2018 sguelton(a)redhat.com - 7.0.0-9
+- No longer Ignore -fstack-clash-protection option
+
+* Tue Dec 04 2018 sguelton(a)redhat.com - 7.0.0-8
+- Ensure rpmlint passes on specfile
+
+* Fri Nov 30 2018 Tom Stellard <tstellar(a)redhat.com> - 7.0.0-7
+- Drop python2 dependency from clang-tools-extra
+
+* Wed Nov 21 2018 sguelton(a)redhat.com - 7.0.0-6
+- Prune unneeded reference to llvm-test-suite sub-package
+
+* Mon Nov 19 2018 Tom Stellard <tstellar(a)redhat.com> - 7.0.0-5
+- Run 'make check-all' instead of 'make check-clang'
+
+* Mon Nov 19 2018 sergesanspaille <sguelton(a)redhat.com> - 7.0.0-4
+- Avoid Python2 + Python3 dependency for clang-analyzer
+
+* Mon Nov 05 2018 Tom Stellard <tstellar(a)redhat.com> - 7.0.0-3
+- User helper macro to fixup config.h for multilib
+
+* Tue Oct 02 2018 Tom Stellard <tstellar(a)redhat.com> - 7.0.0-2
+- Use correct shebang substitution for python scripts
+
+* Mon Sep 24 2018 Tom Stellard <tstellar(a)redhat.com> - 7.0.0-1
+- 7.0.0 Release
+
+* Wed Sep 19 2018 Tom Stellard <tstellar(a)redhat.com> - 7.0.0-0.16.rc3
+- Move builtin headers into clang-libs sub-package
+
+* Wed Sep 19 2018 Tom Stellard <tstellar(a)redhat.com> - 7.0.0-0.15.rc3
+- Remove ambiguous python shebangs
+
+* Thu Sep 13 2018 Tom Stellard <tstellar(a)redhat.com> - 7.0.0-0.14.rc3
+- Move unversioned shared objects to devel package
+
+* Thu Sep 13 2018 Tom Stellard <tstellar(a)redhat.com> - 7.0.0-0.13.rc3
+- Rebuild with new llvm-devel that disables rpath on install
+
+* Thu Sep 13 2018 Tom Stellard <tstellar(a)redhat.com> - 7.0.0-0.12.rc3
+- Fix clang++-7 symlink
+
+* Wed Sep 12 2018 Tom Stellard <tstellar(a)redhat.com> - 7.0.0-0.11.rc3
+- 7.0.0-rc3 Release
+
+* Mon Sep 10 2018 Tom Stellard <tstellar(a)redhat.com> - 7.0.0-0.10.rc2
+- Drop siod from llvm-test-suite
+
+* Fri Sep 07 2018 Tom Stellard <tstellar(a)redhat.com> - 7.0.0-0.9.rc2
+- Drop python2 dependency from clang package
+
+* Thu Sep 06 2018 Tom Stellard <tstellar(a)redhat.com> - 7.0.0-0.8.rc2
+- Drop all uses of python2 from lit tests
+
+* Sat Sep 01 2018 Tom Stellard <tstellar(a)redhat.com> - 7.0.0-0.7.rc2
+- Add Fedora specific version string
+
+* Tue Aug 28 2018 Tom Stellard <tstellar(a)redhat.com> - 7.0.0-0.6.rc2
+- 7.0.0-rc2 Release
+
+* Tue Aug 28 2018 Tom Stellard <tstellar(a)redhat.com> - 7.0.0-0.5.rc1
+- Enable unit tests
+
+* Fri Aug 17 2018 Tom Stellard <tstellar(a)redhat.com> - 7.0.0-0.4.rc1
+- Move llvm-test-suite into a sub-package
+
+* Fri Aug 17 2018 Tom Stellard <tstellar(a)redhat.com> - 7.0.0-0.3.rc1
+- Recommend the same version of compiler-rt
+
+* Wed Aug 15 2018 Tom Stellard <tstellar(a)redhat.com> - 7.0.0-0.2.rc1
+- Rebuild for f30
+
+* Mon Aug 13 2018 Tom Stellard <tstellar(a)redhat.com> - 7.0.0-0.1.rc1
+- 7.0.0-rc1 Release
+
+* Mon Jul 23 2018 Tom Stellard <tstellar(a)redhat.com> - 6.0.1-3
+- Sync spec file with the clang6.0 package
+
+* Thu Jul 12 2018 Fedora Release Engineering <releng(a)fedoraproject.org> - 6.0.1-2
+- Rebuilt for
https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
+
+* Tue Jun 26 2018 Tom Stellard <tstellar(a)redhat.com> - 6.0.1-1
+- 6.0.1 Release
+
+* Wed Jun 13 2018 Tom Stellard <tstellar(a)redhat.com> - 6.0.1-0.2.rc2
+- 6.0.1-rc2
+
+* Fri May 11 2018 Tom Stellard <tstellar(a)redhat.com> - 6.0.1-0.1.rc1
+- 6.0.1-rc1 Release
+
+* Fri Mar 23 2018 Tom Stellard <tstellar(a)redhat.com> - 6.0.0-5
+- Add a clang++-{version} symlink rhbz#1534098
+
+* Thu Mar 22 2018 Tom Stellard <tstellar(a)redhat.com> - 6.0.0-4
+- Use correct script for running lit tests
+
+* Wed Mar 21 2018 Tom Stellard <tstellar(a)redhat.com> - 6.0.0-3
+- Fix toolchain detection so we don't default to using cross-compilers:
+ rhbz#1482491
+
+* Mon Mar 12 2018 Tom Stellard <tstellar(a)redhat.com> - 6.0.0-2
+- Add Provides: clang(major) rhbz#1547444
+
+* Fri Mar 09 2018 Tom Stellard <tstellar(a)redhat.com> - 6.0.0-1
+- 6.0.0 Release
+
+* Mon Feb 12 2018 Tom Stellard <tstellar(a)redhat.com> - 6.0.0-0.6.rc2
+- 6.0.0-rc2 Release
+
+* Wed Feb 07 2018 Fedora Release Engineering <releng(a)fedoraproject.org> -
6.0.0-0.5.rc1
+- Rebuilt for
https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
+
+* Thu Feb 01 2018 Tom Stellard <tstellar(a)redhat.com> - 6.0.0-0.4.rc1
+- Package python helper scripts for tools
+
+* Fri Jan 26 2018 Tom Stellard <tstellar(a)redhat.com> - 6.0.0-0.3.rc1
+- Ignore -fstack-clash-protection option instead of giving an error
+
+* Fri Jan 26 2018 Tom Stellard <tstellar(a)redhat.com> - 6.0.0-0.2.rc1
+- Package emacs integration files
+
+* Wed Jan 24 2018 Tom Stellard <tstellar(a)redhat.com> - 6.0.0-0.1.rc1
+- 6.0.0-rc1 Release
+
+* Wed Jan 24 2018 Tom Stellard <tstellar(a)redhat.com> - 5.0.1-3
+- Rebuild against llvm5.0 compatibility package
+- rhbz#1538231
+
+* Wed Jan 03 2018 Iryna Shcherbina <ishcherb(a)redhat.com> - 5.0.1-2
+- Update Python 2 dependency declarations to new packaging standards
+ (See
https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3)
+
+* Wed Dec 20 2017 Tom Stellard <tstellar(a)redhat.com> - 5.0.1-1
+- 5.0.1 Release
+
+* Wed Dec 13 2017 Tom Stellard <tstellar(a)redhat.com> - 5.0.0-3
+- Make compiler-rt a weak dependency and add a weak dependency on libomp
+
+* Mon Nov 06 2017 Merlin Mathesius <mmathesi(a)redhat.com> - 5.0.0-2
+- Cleanup spec file conditionals
+
+* Mon Oct 16 2017 Tom Stellard <tstellar(a)redhat.com> - 5.0.0-1
+- 5.0.0 Release
+
+* Wed Oct 04 2017 Rex Dieter <rdieter(a)fedoraproject.org> - 4.0.1-6
+- python2-clang subpkg (#1490997)
+- tools-extras: tighten (internal) -libs dep
+- %%install: avoid cd
+
+* Wed Aug 30 2017 Tom Stellard <tstellar(a)redhat.com> - 4.0.1-5
+- Add Requires: python for git-clang-format
+
+* Sun Aug 06 2017 Bjrn Esser <besser82(a)fedoraproject.org> - 4.0.1-4
+- Rebuilt for AutoReq cmake-filesystem
+
+* Wed Aug 02 2017 Fedora Release Engineering <releng(a)fedoraproject.org> - 4.0.1-3
+- Rebuilt for
https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
+
+* Wed Jul 26 2017 Fedora Release Engineering <releng(a)fedoraproject.org> - 4.0.1-2
+- Rebuilt for
https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
+
+* Fri Jun 23 2017 Tom Stellard <tstellar(a)redhat.com> - 4.0.1-1
+- 4.0.1 Release.
+
+* Fri Jun 16 2017 Tom Stellard <tstellar(a)redhat.com> - 4.0.0-8
+- Enable make check-clang
+
+* Mon Jun 12 2017 Tom Stellard <tstellar(a)redhat.com> - 4.0.0-7
+- Package git-clang-format
+
+* Thu Jun 08 2017 Tom Stellard <tstellar(a)redhat.com> - 4.0.0-6
+- Generate man pages
+
+* Thu Jun 08 2017 Tom Stellard <tstellar(a)redhat.com> - 4.0.0-5
+- Ignore test-suite failures until all arches are fixed.
+
+* Mon Apr 03 2017 Tom Stellard <tstellar(a)redhat.com> - 4.0.0-4
+- Run llvm test-suite
+
+* Mon Mar 27 2017 Tom Stellard <tstellar(a)redhat.com> - 4.0.0-3
+- Enable eh/rtti, which are required by lldb.
+
+* Fri Mar 24 2017 Tom Stellard <tstellar(a)redhat.com> - 4.0.0-2
+- Fix clang-tools-extra build
+- Fix install
+
+* Thu Mar 23 2017 Tom Stellard <tstellar(a)redhat.com> - 4.0.0-1
+- clang 4.0.0 final release
+
+* Mon Mar 20 2017 David Goerger <david.goerger(a)yale.edu> - 3.9.1-3
+- add clang-tools-extra rhbz#1328091
+
+* Thu Mar 16 2017 Tom Stellard <tstellar(a)redhat.com> - 3.9.1-2
+- Enable build-id by default rhbz#1432403
+
+* Thu Mar 02 2017 Dave Airlie <airlied(a)redhat.com> - 3.9.1-1
+- clang 3.9.1 final release
+
+* Fri Feb 10 2017 Fedora Release Engineering <releng(a)fedoraproject.org> - 3.9.0-4
+- Rebuilt for
https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
+
+* Mon Nov 14 2016 Nathaniel McCallum <npmccallum(a)redhat.com> - 3.9.0-3
+- Add Requires: compiler-rt to clang-libs.
+- Without this, compiling with certain CFLAGS breaks.
+
+* Tue Nov 1 2016 Peter Robinson <pbrobinson(a)fedoraproject.org> 3.9.0-2
+- Rebuild for new arches
+
+* Fri Oct 14 2016 Dave Airlie <airlied(a)redhat.com> - 3.9.0-1
+- clang 3.9.0 final release
+
+* Fri Jul 01 2016 Stephan Bergmann <sbergman(a)redhat.com> - 3.8.0-2
+- Resolves: rhbz#1282645 add GCC abi_tag support
+
+* Thu Mar 10 2016 Dave Airlie <airlied(a)redhat.com> 3.8.0-1
+- clang 3.8.0 final release
+
+* Thu Mar 03 2016 Dave Airlie <airlied(a)redhat.com> 3.8.0-0.4
+- clang 3.8.0rc3
+
+* Wed Feb 24 2016 Dave Airlie <airlied(a)redhat.com> - 3.8.0-0.3
+- package all libs into clang-libs.
+
+* Wed Feb 24 2016 Dave Airlie <airlied(a)redhat.com> 3.8.0-0.2
+- enable dynamic linking of clang against llvm
+
+* Thu Feb 18 2016 Dave Airlie <airlied(a)redhat.com> - 3.8.0-0.1
+- clang 3.8.0rc2
+
+* Fri Feb 12 2016 Dave Airlie <airlied(a)redhat.com> 3.7.1-4
+- rebuild against latest llvm packages
+- add BuildRequires llvm-static
+
+* Wed Feb 03 2016 Fedora Release Engineering <releng(a)fedoraproject.org> - 3.7.1-3
+- Rebuilt for
https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
+
+* Thu Jan 28 2016 Dave Airlie <airlied(a)redhat.com> 3.7.1-2
+- just accept clang includes moving to /usr/lib64, upstream don't let much else
happen
+
+* Thu Jan 28 2016 Dave Airlie <airlied(a)redhat.com> 3.7.1-1
+- initial build in Fedora.
+
+* Tue Oct 06 2015 Jan Vcelak <jvcelak(a)fedoraproject.org> 3.7.0-100
+- initial version using cmake build system
commit 0e26e50d38d48f6ea9a01837b60449ba333f4a55
Author: Tom Stellard <tstellar(a)redhat.com>
Date: Wed Aug 14 21:43:42 2019 +0000
Pull spec file from clang package
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..526f1ad
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1 @@
+/cfe-8.0.0.src.tar.xz
diff --git a/0001-Fix-isInSystemMacro-to-handle-pasted-macros.patch
b/0001-Fix-isInSystemMacro-to-handle-pasted-macros.patch
new file mode 100644
index 0000000..9480f42
--- /dev/null
+++ b/0001-Fix-isInSystemMacro-to-handle-pasted-macros.patch
@@ -0,0 +1,137 @@
+From cb7fd3caeee52fe94461b717294c4db4056853e3 Mon Sep 17 00:00:00 2001
+From: Serge Guelton <sguelton(a)redhat.com>
+Date: Fri, 1 Feb 2019 06:11:44 +0000
+Subject: [PATCH 1/3] Fix isInSystemMacro to handle pasted macros
+
+Token pasted by the preprocessor (through ##) have a Spelling pointing to scratch
buffer.
+As a result they are not recognized at system macro, even though the pasting happened in
+a system macro. Fix that by looking into the parent macro if the original lookup finds a
+scratch buffer.
+
+Differential Revision:
https://reviews.llvm.org/D55782
+
+This effectively fixes
https://bugs.llvm.org/show_bug.cgi?id=35268,
+
+git-svn-id:
https://llvm.org/svn/llvm-project/cfe/trunk@352838
91177308-0d34-0410-b5e6-96231b3b80d8
+---
+ include/clang/Basic/SourceManager.h | 18 +++++++++++++++++-
+ test/Misc/no-warn-in-system-macro.c | 13 +++++++++++++
+ test/Misc/no-warn-in-system-macro.c.inc | 9 +++++++++
+ test/Misc/warn-in-system-macro-def.c | 21 +++++++++++++++++++++
+ test/Misc/warn-in-system-macro-def.c.inc | 4 ++++
+ 5 files changed, 64 insertions(+), 1 deletion(-)
+ create mode 100644 test/Misc/no-warn-in-system-macro.c
+ create mode 100644 test/Misc/no-warn-in-system-macro.c.inc
+ create mode 100644 test/Misc/warn-in-system-macro-def.c
+ create mode 100644 test/Misc/warn-in-system-macro-def.c.inc
+
+diff --git a/include/clang/Basic/SourceManager.h b/include/clang/Basic/SourceManager.h
+index dcc4a37e23..c6b92f9000 100644
+--- a/include/clang/Basic/SourceManager.h
++++ b/include/clang/Basic/SourceManager.h
+@@ -1441,6 +1441,12 @@ public:
+ return Filename.equals("<command line>");
+ }
+
++ /// Returns whether \p Loc is located in a <scratch space> file.
++ bool isWrittenInScratchSpace(SourceLocation Loc) const {
++ StringRef Filename(getPresumedLoc(Loc).getFilename());
++ return Filename.equals("<scratch space>");
++ }
++
+ /// Returns if a SourceLocation is in a system header.
+ bool isInSystemHeader(SourceLocation Loc) const {
+ return isSystem(getFileCharacteristic(Loc));
+@@ -1453,7 +1459,17 @@ public:
+
+ /// Returns whether \p Loc is expanded from a macro in a system header.
+ bool isInSystemMacro(SourceLocation loc) const {
+- return loc.isMacroID() && isInSystemHeader(getSpellingLoc(loc));
++ if(!loc.isMacroID())
++ return false;
++
++ // This happens when the macro is the result of a paste, in that case
++ // its spelling is the scratch memory, so we take the parent context.
++ if (isWrittenInScratchSpace(getSpellingLoc(loc))) {
++ return isInSystemHeader(getSpellingLoc(getImmediateMacroCallerLoc(loc)));
++ }
++ else {
++ return isInSystemHeader(getSpellingLoc(loc));
++ }
+ }
+
+ /// The size of the SLocEntry that \p FID represents.
+diff --git a/test/Misc/no-warn-in-system-macro.c b/test/Misc/no-warn-in-system-macro.c
+new file mode 100644
+index 0000000000..a319b14c9c
+--- /dev/null
++++ b/test/Misc/no-warn-in-system-macro.c
+@@ -0,0 +1,13 @@
++// RUN: %clang_cc1 -isystem %S -Wdouble-promotion -fsyntax-only %s 2>&1 |
FileCheck -allow-empty %s
++// CHECK-NOT: warning:
++
++#include <no-warn-in-system-macro.c.inc>
++
++int main(void)
++{
++ double foo = 1.0;
++
++ if (isnan(foo))
++ return 1;
++ return 0;
++}
+diff --git a/test/Misc/no-warn-in-system-macro.c.inc
b/test/Misc/no-warn-in-system-macro.c.inc
+new file mode 100644
+index 0000000000..3cbe7dfc16
+--- /dev/null
++++ b/test/Misc/no-warn-in-system-macro.c.inc
+@@ -0,0 +1,9 @@
++extern int __isnanf(float f);
++extern int __isnan(double f);
++extern int __isnanl(long double f);
++#define isnan(x) \
++ (sizeof (x) == sizeof (float) \
++ ? __isnanf (x) \
++ : sizeof (x) == sizeof (double) \
++ ? __isnan (x) : __isnanl (x))
++
+diff --git a/test/Misc/warn-in-system-macro-def.c b/test/Misc/warn-in-system-macro-def.c
+new file mode 100644
+index 0000000000..b295130702
+--- /dev/null
++++ b/test/Misc/warn-in-system-macro-def.c
+@@ -0,0 +1,21 @@
++// RUN: %clang_cc1 -isystem %S -Wdouble-promotion -fsyntax-only %s 2>&1 |
FileCheck -allow-empty %s
++// CHECK: warning:
++// CHECK: expanded from macro 'ISNAN'
++// CHECK: expanded from macro 'isnan'
++
++#include <warn-in-system-macro-def.c.inc>
++
++#define isnan(x) \
++ (sizeof (x) == sizeof (float) \
++ ? __isnanf (x) \
++ : sizeof (x) == sizeof (double) \
++ ? __isnan (x) : __isnanl (x))
++
++int main(void)
++{
++ double foo = 1.0;
++
++ if (ISNAN(foo))
++ return 1;
++ return 0;
++}
+diff --git a/test/Misc/warn-in-system-macro-def.c.inc
b/test/Misc/warn-in-system-macro-def.c.inc
+new file mode 100644
+index 0000000000..5c7e60275a
+--- /dev/null
++++ b/test/Misc/warn-in-system-macro-def.c.inc
+@@ -0,0 +1,4 @@
++extern int __isnanf(float f);
++extern int __isnan(double f);
++extern int __isnanl(long double f);
++#define ISNAN isnan
+--
+2.20.1
+
diff --git a/0001-Fix-uninitialized-value-in-ABIArgInfo.patch
b/0001-Fix-uninitialized-value-in-ABIArgInfo.patch
new file mode 100644
index 0000000..9755200
--- /dev/null
+++ b/0001-Fix-uninitialized-value-in-ABIArgInfo.patch
@@ -0,0 +1,38 @@
+From 565b9633ee68b311c1a954022869d9e99fee7286 Mon Sep 17 00:00:00 2001
+From: serge-sans-paille <sguelton(a)redhat.com>
+Date: Fri, 1 Feb 2019 06:39:13 +0000
+Subject: [PATCH] Fix uninitialized value in ABIArgInfo
+
+GCC-9 takes advantage of this uninitialized values to optimize stuff,
+which ends up in failing validation when compiling clang.
+---
+ include/clang/CodeGen/CGFunctionInfo.h | 11 +++++------
+ 1 file changed, 5 insertions(+), 6 deletions(-)
+
+diff --git a/include/clang/CodeGen/CGFunctionInfo.h
b/include/clang/CodeGen/CGFunctionInfo.h
+index cf64e9f3ee..131eb38393 100644
+--- a/include/clang/CodeGen/CGFunctionInfo.h
++++ b/include/clang/CodeGen/CGFunctionInfo.h
+@@ -112,14 +112,13 @@ private:
+ }
+
+ ABIArgInfo(Kind K)
+- : TheKind(K), PaddingInReg(false), InReg(false), SuppressSRet(false) {
+- }
++ : TypeData(nullptr), PaddingType(nullptr), DirectOffset(0),
++ TheKind(K), PaddingInReg(false), InAllocaSRet(false), IndirectByVal(false),
++ IndirectRealign(false), SRetAfterThis(false), InReg(false),
++ CanBeFlattened(false), SignExt(false), SuppressSRet(false) {}
+
+ public:
+- ABIArgInfo()
+- : TypeData(nullptr), PaddingType(nullptr), DirectOffset(0),
+- TheKind(Direct), PaddingInReg(false), InReg(false),
+- SuppressSRet(false) {}
++ ABIArgInfo() : ABIArgInfo(Direct) {}
+
+ static ABIArgInfo getDirect(llvm::Type *T = nullptr, unsigned Offset = 0,
+ llvm::Type *Padding = nullptr,
+--
+2.19.2
+
diff --git a/0001-ToolChain-Add-lgcc_s-to-the-linker-flags-when-using-.patch
b/0001-ToolChain-Add-lgcc_s-to-the-linker-flags-when-using-.patch
new file mode 100644
index 0000000..f4f0fa3
--- /dev/null
+++ b/0001-ToolChain-Add-lgcc_s-to-the-linker-flags-when-using-.patch
@@ -0,0 +1,50 @@
+From 09ae3ef5710a89505318ec721c65b6c838147276 Mon Sep 17 00:00:00 2001
+From: Tom Stellard <tstellar(a)redhat.com>
+Date: Thu, 7 Feb 2019 21:05:37 -0800
+Subject: [PATCH] ToolChain: Add -lgcc_s to the linker flags when using libc++
+
+The libc++ build for Fedora does not include an implementation of
+libunwind, so we need to explicitly link against something that
+provides this implementation.
+---
+ clang/lib/Driver/ToolChain.cpp | 1 +
+ clang/test/Driver/netbsd.cpp | 4 ++--
+ 2 files changed, 3 insertions(+), 2 deletions(-)
+
+diff --git a/lib/Driver/ToolChain.cpp b/lib/Driver/ToolChain.cpp
+index 88a627e..cb99844 100644
+--- a/lib/Driver/ToolChain.cpp
++++ b/lib/Driver/ToolChain.cpp
+@@ -767,6 +767,7 @@ void ToolChain::AddCXXStdlibLibArgs(const ArgList &Args,
+ switch (Type) {
+ case ToolChain::CST_Libcxx:
+ CmdArgs.push_back("-lc++");
++ CmdArgs.push_back("-lgcc_s");
+ break;
+
+ case ToolChain::CST_Libstdcxx:
+diff --git a/test/Driver/netbsd.cpp b/test/Driver/netbsd.cpp
+index 4af7d83..ff18c62 100644
+--- a/test/Driver/netbsd.cpp
++++ b/test/Driver/netbsd.cpp
+@@ -131,7 +131,7 @@
+ // ARM-7: clang{{.*}}" "-cc1" "-triple"
"armv5e-unknown-netbsd7.0.0-eabi"
+ // ARM-7: ld{{.*}}" "--eh-frame-hdr" "-dynamic-linker"
"/libexec/ld.elf_so"
+ // ARM-7: "-o" "a.out" "{{.*}}/usr/lib{{/|\\\\}}crt0.o"
"{{.*}}/usr/lib{{/|\\\\}}eabi{{/|\\\\}}crti.o"
+-// ARM-7: "{{.*}}/usr/lib{{/|\\\\}}crtbegin.o" "{{.*}}.o"
"-lc++" "-lm" "-lc"
++// ARM-7: "{{.*}}/usr/lib{{/|\\\\}}crtbegin.o" "{{.*}}.o"
"-lc++" "-lgcc_s" "-lm" "-lc"
+ // ARM-7: "{{.*}}/usr/lib{{/|\\\\}}crtend.o"
"{{.*}}/usr/lib{{/|\\\\}}crtn.o"
+
+ // AARCH64: clang{{.*}}" "-cc1" "-triple"
"aarch64-unknown-netbsd"
+@@ -250,7 +250,7 @@
+ // S-ARM-7: clang{{.*}}" "-cc1" "-triple"
"armv5e-unknown-netbsd7.0.0-eabi"
+ // S-ARM-7: ld{{.*}}" "--eh-frame-hdr" "-Bstatic"
+ // S-ARM-7: "-o" "a.out" "{{.*}}/usr/lib{{/|\\\\}}crt0.o"
"{{.*}}/usr/lib{{/|\\\\}}eabi{{/|\\\\}}crti.o"
+-// S-ARM-7: "{{.*}}/usr/lib{{/|\\\\}}crtbegin.o" "{{.*}}.o"
"-lc++" "-lm" "-lc"
++// S-ARM-7: "{{.*}}/usr/lib{{/|\\\\}}crtbegin.o" "{{.*}}.o"
"-lc++" "-lgcc_s" "-lm" "-lc"
+ // S-ARM-7: "{{.*}}/usr/lib{{/|\\\\}}crtend.o"
"{{.*}}/usr/lib{{/|\\\\}}crtn.o"
+
+ // S-AARCH64: clang{{.*}}" "-cc1" "-triple"
"aarch64-unknown-netbsd"
+--
+1.8.3.1
+
diff --git a/0002-Format-isInSystemMacro-after-D55782.patch
b/0002-Format-isInSystemMacro-after-D55782.patch
new file mode 100644
index 0000000..e5004fb
--- /dev/null
+++ b/0002-Format-isInSystemMacro-after-D55782.patch
@@ -0,0 +1,39 @@
+From 49b29ff9feafd8b9041e2a76cbe843115d263ced Mon Sep 17 00:00:00 2001
+From: Fangrui Song <maskray(a)google.com>
+Date: Mon, 11 Feb 2019 13:30:04 +0000
+Subject: [PATCH 2/3] Format isInSystemMacro after D55782
+
+git-svn-id:
https://llvm.org/svn/llvm-project/cfe/trunk@353697
91177308-0d34-0410-b5e6-96231b3b80d8
+---
+ include/clang/Basic/SourceManager.h | 10 ++++------
+ 1 file changed, 4 insertions(+), 6 deletions(-)
+
+diff --git a/include/clang/Basic/SourceManager.h b/include/clang/Basic/SourceManager.h
+index c6b92f9000..f44239d9ce 100644
+--- a/include/clang/Basic/SourceManager.h
++++ b/include/clang/Basic/SourceManager.h
+@@ -1459,17 +1459,15 @@ public:
+
+ /// Returns whether \p Loc is expanded from a macro in a system header.
+ bool isInSystemMacro(SourceLocation loc) const {
+- if(!loc.isMacroID())
++ if (!loc.isMacroID())
+ return false;
+
+ // This happens when the macro is the result of a paste, in that case
+ // its spelling is the scratch memory, so we take the parent context.
+- if (isWrittenInScratchSpace(getSpellingLoc(loc))) {
++ if (isWrittenInScratchSpace(getSpellingLoc(loc)))
+ return isInSystemHeader(getSpellingLoc(getImmediateMacroCallerLoc(loc)));
+- }
+- else {
+- return isInSystemHeader(getSpellingLoc(loc));
+- }
++
++ return isInSystemHeader(getSpellingLoc(loc));
+ }
+
+ /// The size of the SLocEntry that \p FID represents.
+--
+2.20.1
+
diff --git a/0002-gtest-reorg.patch b/0002-gtest-reorg.patch
new file mode 100644
index 0000000..121ac46
--- /dev/null
+++ b/0002-gtest-reorg.patch
@@ -0,0 +1,42 @@
+From 1f26a0284925859b72ee520ce74452d77d822409 Mon Sep 17 00:00:00 2001
+From: serge-sans-paille <sguelton(a)redhat.com>
+Date: Mon, 28 Jan 2019 19:12:27 +0000
+Subject: [PATCH 2/2] [PATCH] gtest reorg
+
+---
+ CMakeLists.txt | 12 +++++-------
+ 1 file changed, 5 insertions(+), 7 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index c2016a45ca..48ea3c3bb9 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -157,12 +157,6 @@ Please install Python or specify the PYTHON_EXECUTABLE CMake
variable.")
+ set(LLVM_UTILS_PROVIDED ON)
+ set(CLANG_TEST_DEPS FileCheck count not)
+ endif()
+- set(UNITTEST_DIR ${LLVM_MAIN_SRC_DIR}/utils/unittest)
+- if(EXISTS ${UNITTEST_DIR}/googletest/include/gtest/gtest.h
+- AND NOT EXISTS
${LLVM_LIBRARY_DIR}/${CMAKE_STATIC_LIBRARY_PREFIX}gtest${CMAKE_STATIC_LIBRARY_SUFFIX}
+- AND EXISTS ${UNITTEST_DIR}/CMakeLists.txt)
+- add_subdirectory(${UNITTEST_DIR} utils/unittest)
+- endif()
+ else()
+ # Seek installed Lit.
+ find_program(LLVM_LIT
+@@ -507,7 +501,11 @@ endif()
+
+
+ if( CLANG_INCLUDE_TESTS )
+- if(EXISTS ${LLVM_MAIN_SRC_DIR}/utils/unittest/googletest/include/gtest/gtest.h)
++ set(UNITTEST_DIR ${LLVM_MAIN_SRC_DIR}/utils/unittest)
++ if(EXISTS ${UNITTEST_DIR}/googletest/include/gtest/gtest.h
++ AND NOT EXISTS
${LLVM_LIBRARY_DIR}/${CMAKE_STATIC_LIBRARY_PREFIX}gtest${CMAKE_STATIC_LIBRARY_SUFFIX}
++ AND EXISTS ${UNITTEST_DIR}/CMakeLists.txt)
++ add_subdirectory(${UNITTEST_DIR} utils/unittest)
+ add_subdirectory(unittests)
+ list(APPEND CLANG_TEST_DEPS ClangUnitTests)
+ list(APPEND CLANG_TEST_PARAMS
+--
+2.19.2
+
diff --git a/0003-Fix-isInSystemMacro-in-presence-of-macro-and-pasted-.patch
b/0003-Fix-isInSystemMacro-in-presence-of-macro-and-pasted-.patch
new file mode 100644
index 0000000..c27dfd9
--- /dev/null
+++ b/0003-Fix-isInSystemMacro-in-presence-of-macro-and-pasted-.patch
@@ -0,0 +1,63 @@
+From a6b7f0946df82ca207b27f1931d4b430ab77e5e0 Mon Sep 17 00:00:00 2001
+From: Serge Guelton <sguelton(a)redhat.com>
+Date: Thu, 16 May 2019 12:40:00 +0000
+Subject: [PATCH 3/3] Fix isInSystemMacro in presence of macro and pasted token
+
+When a warning is raised from the expansion of a system macro that
+involves pasted token, there was still situations were they were not
+skipped, as showcased by this issue:
+https://bugzilla.redhat.com/show_bug.cgi?id=1472437
+
+Differential Revision:
https://reviews.llvm.org/D59413
+
+git-svn-id:
https://llvm.org/svn/llvm-project/cfe/trunk@360885
91177308-0d34-0410-b5e6-96231b3b80d8
+---
+ include/clang/Basic/SourceManager.h | 9 +++++++--
+ test/Misc/no-warn-in-system-macro.c | 7 ++++++-
+ 2 files changed, 13 insertions(+), 3 deletions(-)
+
+diff --git a/include/clang/Basic/SourceManager.h b/include/clang/Basic/SourceManager.h
+index f44239d9ce..c964c64faf 100644
+--- a/include/clang/Basic/SourceManager.h
++++ b/include/clang/Basic/SourceManager.h
+@@ -1464,8 +1464,13 @@ public:
+
+ // This happens when the macro is the result of a paste, in that case
+ // its spelling is the scratch memory, so we take the parent context.
+- if (isWrittenInScratchSpace(getSpellingLoc(loc)))
+- return isInSystemHeader(getSpellingLoc(getImmediateMacroCallerLoc(loc)));
++ // There can be several level of token pasting.
++ if (isWrittenInScratchSpace(getSpellingLoc(loc))) {
++ do {
++ loc = getImmediateMacroCallerLoc(loc);
++ } while (isWrittenInScratchSpace(getSpellingLoc(loc)));
++ return isInSystemMacro(loc);
++ }
+
+ return isInSystemHeader(getSpellingLoc(loc));
+ }
+diff --git a/test/Misc/no-warn-in-system-macro.c b/test/Misc/no-warn-in-system-macro.c
+index a319b14c9c..a351b89256 100644
+--- a/test/Misc/no-warn-in-system-macro.c
++++ b/test/Misc/no-warn-in-system-macro.c
+@@ -3,11 +3,16 @@
+
+ #include <no-warn-in-system-macro.c.inc>
+
++#define MACRO(x) x
++
+ int main(void)
+ {
+ double foo = 1.0;
+
+ if (isnan(foo))
+ return 1;
+- return 0;
++
++ MACRO(isnan(foo));
++
++ return 0;
+ }
+--
+2.20.1
+
diff --git a/sources b/sources
new file mode 100644
index 0000000..3af1223
--- /dev/null
+++ b/sources
@@ -0,0 +1 @@
+SHA512 (cfe-8.0.0.src.tar.xz) =
98e540222719716985e5d8439116e47469cb01201ea91d1da7e46cb6633da099688d9352c3b65e5c5f660cbbae353b3d79bb803fc66b3be663f2b04b1feed1c3