diff --git a/SOURCES/run-lit-tests b/SOURCES/run-lit-tests
index a0f27d8..11fc0f4 100755
--- a/SOURCES/run-lit-tests
+++ b/SOURCES/run-lit-tests
@@ -49,8 +49,8 @@ esac
 cd $(mktemp -d)
 ln -s /usr/include include
 tar -xzf /usr/share/llvm/src/test.tar.gz
-ln -s $ARCH.site.cfg.py test/lit.site.cfg.py
-ln -s $ARCH.site.cfg.py test/Unit/lit.site.cfg.py
+ln -s /usr/share/llvm/src/$ARCH.site.cfg.py test/lit.site.cfg.py
+ln -s /usr/share/llvm/src/$ARCH.Unit.site.cfg.py test/Unit/lit.site.cfg.py
 lit -v -s $threads_arg test \
 	-Dllvm_obj_root=`pwd` \
 	-Dllvm_test_root=`pwd`/test \
diff --git a/SPECS/llvm.spec b/SPECS/llvm.spec
index 2027a30..c52a9fa 100644
--- a/SPECS/llvm.spec
+++ b/SPECS/llvm.spec
@@ -11,7 +11,7 @@
 %global llvm_libdir %{_libdir}/%{name}
 %global build_llvm_libdir %{buildroot}%{llvm_libdir}
 #%%global rc_ver 6
-%global baserelease 1
+%global baserelease 2
 %global llvm_srcdir llvm-%{version}%{?rc_ver:rc%{rc_ver}}.src
 %global maj_ver 10
 %global min_ver 0
@@ -343,7 +343,12 @@ install -m 0755 %{SOURCE1} %{buildroot}%{_libexecdir}/tests/llvm
 # Install lit tests.  We need to put these in a tarball otherwise rpm will complain
 # about some of the test inputs having the wrong object file format.
 install -d %{buildroot}%{_datadir}/llvm/
-tar -czf %{install_srcdir}/test.tar.gz test/
+
+# The various tar options are there to make sur the archive is the same on 32 and 64 bit arch, i.e.
+# the archive creation is reproducible. Move arch-specific content out of the tarball
+mv %{lit_cfg} %{install_srcdir}/%{_arch}.site.cfg.py
+mv %{lit_unit_cfg} %{install_srcdir}/%{_arch}.Unit.site.cfg.py
+tar --sort=name --mtime='UTC 2020-01-01' -c test/ | gzip -n > %{install_srcdir}/test.tar.gz
 
 # Install the unit test binaries
 mkdir -p %{build_llvm_libdir}
@@ -499,6 +504,8 @@ fi
 %{llvm_libdir}/unittests/
 %{_datadir}/llvm/src/unittests
 %{_datadir}/llvm/src/test.tar.gz
+%{_datadir}/llvm/src/%{_arch}.site.cfg.py
+%{_datadir}/llvm/src/%{_arch}.Unit.site.cfg.py
 %{_datadir}/llvm/lit.fedora.cfg.py
 %{_bindir}/not
 %{_bindir}/count
@@ -517,6 +524,9 @@ fi
 %endif
 
 %changelog
+* Wed Jun 24 2020 sguelton@redhat.com - 10.0.0-2
+- Reproducible build of test.tar.gz, see rhbz#1820319
+
 * Tue Apr 7 2020 sguelton@redhat.com - 10.0.0-1
 - 10.0.0 Release