Sophie

Sophie

distrib > Mageia > 9 > armv7hl > by-pkgid > cb56b890d3c1c8a134b8128bb380379b > files > 4

compiler-rt-15.0.6-1.mga9.src.rpm

# Please keep this package sync with FC
%global baserelease 1


%global compiler_rt_version 15.0.6
#global rc_ver 3
%global crt_srcdir compiler-rt-%{compiler_rt_version}%{?rc_ver:rc%{rc_ver}}.src

# see https://sourceware.org/bugzilla/show_bug.cgi?id=25271
%global optflags %(echo %{optflags} -D_DEFAULT_SOURCE)

# see https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93615
%global optflags %(echo %{optflags} -Dasm=__asm__)


Name:		compiler-rt
Version:	%{compiler_rt_version}%{?rc_ver:~rc%{rc_ver}}
Release:	%mkrel %{?rc_ver:0.}%{baserelease}%{?rc_ver:.rc%{rc_ver}}
Summary:	LLVM "compiler-rt" runtime libraries
Group:		Development/Other

License:	NCSA or MIT
URL:		https://llvm.org/
Source0:	https://github.com/llvm/llvm-project/releases/download/llvmorg-%{compiler_rt_version}%{?rc_ver:-rc%{rc_ver}}/%{crt_srcdir}.tar.xz
Source1:	https://github.com/llvm/llvm-project/releases/download/llvmorg-%{compiler_rt_version}%{?rc_ver:-rc%{rc_ver}}/%{crt_srcdir}.tar.xz.sig
Source2:	release-keys.asc

Patch0:		0001-Fix-for-compiler-rt-stand-alone-builds.patch

BuildRequires:	clang
BuildRequires:	cmake
BuildRequires:	ninja-build
BuildRequires:	python3
# We need python3-devel for pathfix.py.
BuildRequires:	python3-devel
BuildRequires:  llvm-devel = %{version}
BuildRequires:	llvm-cmake-devel = %{version}

# For gpg source verification
BuildRequires:	gnupg2

Requires: clang-resource-filesystem%{?isa} = %{version}

%description
The compiler-rt project is a part of the LLVM project. It provides
implementation of the low-level target-specific hooks required by
code generation, sanitizer runtimes and profiling library for code
instrumentation, and Blocks C language extension.

%prep
%{gpgverify} --keyring='%{SOURCE2}' --signature='%{SOURCE1}' --data='%{SOURCE0}'
%autosetup -n %{crt_srcdir} -p2

%py3_shebang_fix lib/hwasan/scripts/hwasan_symbolize

%build
# FC compatibility:
%global _vpath_builddir _build

# Copy CFLAGS into ASMFLAGS, so -fcf-protection is used when compiling assembly files.
export ASMFLAGS=$CFLAGS

%cmake  -GNinja \
	-DCMAKE_BUILD_TYPE=RelWithDebInfo \
	-DCMAKE_MODULE_PATH=%{_libdir}/cmake/llvm \
	-DCMAKE_SKIP_RPATH:BOOL=ON \
 	\
%if 0%{?__isa_bits} == 64
        -DLLVM_LIBDIR_SUFFIX=64 \
%else
        -DLLVM_LIBDIR_SUFFIX= \
%endif
	-DCOMPILER_RT_INCLUDE_TESTS:BOOL=OFF # could be on?

%__cmake --build  %{_vpath_builddir}

%install
DESTDIR="%{buildroot}" %__cmake --install "%{_vpath_builddir}"

# move blacklist/abilist files to where clang expect them
mkdir -p %{buildroot}%{_libdir}/clang/%{compiler_rt_version}/share
mv -v %{buildroot}%{_datadir}/*list.txt  %{buildroot}%{_libdir}/clang/%{compiler_rt_version}/share/

# move sanitizer libs to better place
%global libclang_rt_installdir lib/linux
mkdir -p %{buildroot}%{_libdir}/clang/%{compiler_rt_version}/lib
mv -v %{buildroot}%{_prefix}/%{libclang_rt_installdir}/*clang_rt* %{buildroot}%{_libdir}/clang/%{compiler_rt_version}/lib
mkdir -p %{buildroot}%{_libdir}/clang/%{compiler_rt_version}/lib/linux/
pushd %{buildroot}%{_libdir}/clang/%{compiler_rt_version}/lib
for i in *.a *.so
do
	ln -s ../$i linux/$i
done

# multilib support: also create symlink from lib to lib64, fixes rhbz#1678240
# the symlinks will be dangling if the 32 bits version is not installed, but that should be fine
%ifarch x86_64

mkdir -p %{buildroot}/%{_exec_prefix}/lib/clang/%{compiler_rt_version}/lib/linux
for i in *.a *.so
do
	target=`echo "$i" | sed -e 's/x86_64/i386/'`
	ln -s ../../../../../lib/clang/%{compiler_rt_version}/lib/$target ../../../../%{_lib}/clang/%{compiler_rt_version}/lib/linux/ || :
done

%endif

popd

%check
#%%cmake_build --target check-compiler-rt

%files
%license LICENSE.TXT
%{_includedir}/*
%{_libdir}/clang/%{compiler_rt_version}/lib/*
%{_libdir}/clang/%{compiler_rt_version}/share/*
%ifarch x86_64 aarch64
%{_bindir}/hwasan_symbolize
%endif



%changelog
* Thu Dec 08 2022 tv <tv> 15.0.6-1.mga9
+ Revision: 1919224
- Update to LLVM 15.0.4
- Switch to building with clang

* Tue Nov 15 2022 tv <tv> 15.0.4-1.mga9
+ Revision: 1907442
- Update to LLVM 15.0.4
- Switch to building with clang

* Wed Sep 21 2022 tv <tv> 15.0.0-1.mga9
+ Revision: 1891060
- Update to LLVM 15.0.0
- Make sure asm files are built with -fcf-protection

* Fri Jun 17 2022 tv <tv> 14.0.5-1.mga9
+ Revision: 1864664
- Update to LLVM 14.0.5

* Wed Mar 30 2022 tv <tv> 14.0.0-1.mga9
+ Revision: 1834513
- Update to LLVM 14.0.0

* Thu Feb 03 2022 tv <tv> 13.0.1-1.mga9
+ Revision: 1771214
- Update to 13.0.1 final

* Wed Oct 20 2021 tv <tv> 13.0.0-1.mga9
+ Revision: 1752275
- 13.0.0 Release

* Mon Jul 19 2021 tv <tv> 12.0.1-6.2.mga9
+ Revision: 1737060
- 12.0.1 Release
- Fix installation paths

* Fri Apr 16 2021 tv <tv> 12.0.0-6.1.mga9
+ Revision: 1715987
- 12.0.0 final

* Fri Apr 09 2021 tv <tv> 12.0.0-6.rc5.mga9
+ Revision: 1714248
- 12.0.0 RC5

* Fri Apr 02 2021 tv <tv> 12.0.0-3.rc4.mga9
+ Revision: 1712618
- 12.0.0 RC4

* Sun Feb 28 2021 tv <tv> 12.0.0-3.rc2.mga9
+ Revision: 1693571
- 12.0.0-rc2 release

* Thu Jan 07 2021 tv <tv> 11.0.1-3.mga8
+ Revision: 1669443
- LLVM 11.0.1 final

* Tue Dec 22 2020 tv <tv> 11.0.1-2.rc2.mga8
+ Revision: 1662970
- llvm 11.0.1-rc2

* Wed Dec 02 2020 tv <tv> 11.0.1-1.rc1.mga8
+ Revision: 1651721
- llvm 11.0.1-rc1

* Wed Nov 25 2020 tv <tv> 11.0.0-2.mga8
+ Revision: 1649334
- 11.0.0

* Thu Oct 08 2020 akien <akien> 10.0.1-1.mga8
+ Revision: 1632744
- Version 10.0.1

* Mon Jul 20 2020 tv <tv> 10.0.0-6.mga8
+ Revision: 1607467
- adjust for %%cmake_build/install being different from FC's one
- Use modern cmake macros
- Fix multilib runtime links (rhbz#185537)
- Correctly use gpg verification

* Wed Jul 15 2020 tv <tv> 10.0.0-3.mga8
+ Revision: 1606352
- Drop dependency on llvm-static

* Fri Jun 12 2020 tv <tv> 10.0.0-2.mga8
+ Revision: 1593047
- Fix msan compilation warnings, see af38074874c605f9 upstream

* Tue Mar 24 2020 tv <tv> 10.0.0-1.mga8
+ Revision: 1559504
- 10.0.0 final

* Thu Mar 19 2020 tv <tv> 10.0.0-0.5.rc5.mga8
+ Revision: 1558097
- 10.0.0 rc5

* Sun Mar 15 2020 tv <tv> 10.0.0-0.4.rc4.mga8
+ Revision: 1556554
- 10.0.0 rc4

* Mon Feb 17 2020 tv <tv> 10.0.0-0.1.rc2.mga8
+ Revision: 1536893
- 10.0.0 rc2
- Ship blacklist files in the proper directory (rhbz#1794936)

* Wed Feb 12 2020 tv <tv> 10.0.0-0.1.rc1.mga8
+ Revision: 1508955
- 10.0.0 rc1
+ wally <wally>
- build with new cmake macros

* Sat Sep 21 2019 tv <tv> 9.0.0-1.mga8
+ Revision: 1444190
- 9.0.0 Release

* Mon Sep 16 2019 tv <tv> 9.0.0-0.1.rc3.mga8
+ Revision: 1442669
- 9.0.0-rc3 Release

* Sat Apr 13 2019 tv <tv> 8.0.0-1.mga7
+ Revision: 1389621
- 8.0.0 final

* Fri Dec 21 2018 tv <tv> 7.0.1-1.mga7
+ Revision: 1344329
- 7.0.1

* Tue Sep 25 2018 tv <tv> 7.0.0-2.mga7
+ Revision: 1304825
- switch from python2 to python3

* Sun Sep 23 2018 tv <tv> 7.0.0-1.mga7
+ Revision: 1297161
- new release

* Sun Sep 23 2018 umeabot <umeabot> 6.0.1-2.mga7
+ Revision: 1296744
- Mageia 7 Mass Rebuild

* Thu Jun 28 2018 tv <tv> 6.0.1-1.mga7
+ Revision: 1240606
- 6.0.1

* Wed Mar 21 2018 tv <tv> 6.0.0-1.mga7
+ Revision: 1210855
- new release

* Wed Jan 10 2018 pterjan <pterjan> 5.0.1-2.mga7
+ Revision: 1192117
- Enable bootstrap again as new llvm was not yet there on armv7hl

* Tue Dec 26 2017 tv <tv> 5.0.1-1.mga7
+ Revision: 1185125
- disable bootstrap foor libFuzzer

* Thu Oct 19 2017 tv <tv> 5.0.0-2.mga7
+ Revision: 1172728
- disable bootstrap foor libFuzzer

* Thu Oct 19 2017 tv <tv> 5.0.0-1.mga7
+ Revision: 1172717
- enable bootstrap
- new release
- Fix AArch64 build with glibc 2.26
- disable bootstrap

* Thu Sep 21 2017 tv <tv> 4.0.1-5.mga7
+ Revision: 1156893
+ rebuild (emptylog)

* Thu Sep 21 2017 tv <tv> 4.0.1-4.mga7
+ Revision: 1156891
- bootstrap w/o libfuzzer
- new release

* Tue Mar 28 2017 tmb <tmb> 3.9.1-4.mga6
+ Revision: 1095073
- dont try to build on armv5tl

* Tue Mar 28 2017 tmb <tmb> 3.9.1-3.mga6
+ Revision: 1095068
- try to build on armv5tl

* Tue Mar 28 2017 tmb <tmb> 3.9.1-2.mga6
+ Revision: 1095061
- rebuild with new llvm

* Sat Jan 07 2017 ghibo <ghibo> 3.9.1-1.mga6
+ Revision: 1080450
- Update to release 3.9.1

* Sat Dec 03 2016 pterjan <pterjan> 3.8.1-3.mga6
+ Revision: 1071813
- Exclude armv5tl

* Tue Oct 04 2016 tv <tv> 3.8.1-2.mga6
+ Revision: 1058313
- make symlinks to where the linker thinks these libs are (mga#19510)

* Thu Jul 14 2016 tmb <tmb> 3.8.1-1.mga6
+ Revision: 1042078
- update to 3.8.1 (maintenance release)

* Mon Mar 14 2016 tv <tv> 3.8.0-2.mga6
+ Revision: 990521
- submit to core/release

* Wed Mar 09 2016 tv <tv> 3.8.0-1.mga6
+ Revision: 988412
- new release
- imported package compiler-rt