Avoid 'static library packaging violation' pseudo-error
This commit is contained in:
parent
33dd161ab8
commit
e04d5a0bd8
@ -24,7 +24,7 @@ ExclusiveArch: x86_64
|
|||||||
%define sysroot %prefix/lib/%target/sys-root
|
%define sysroot %prefix/lib/%target/sys-root
|
||||||
%define target_ld_linux /lib64/ld-linux-aarch64.so.1
|
%define target_ld_linux /lib64/ld-linux-aarch64.so.1
|
||||||
|
|
||||||
Summary: aarch64-targeted GCC cross-toolchain
|
Summary: %target_arch-targeted GCC cross-toolchain
|
||||||
License: LGPL-2.1-or-later and LGPL-3.0-or-later and GPL-2.0-or-later and GPL-3.0-or-later and GPL-3.0-or-later with GCC-exception-3.1
|
License: LGPL-2.1-or-later and LGPL-3.0-or-later and GPL-2.0-or-later and GPL-3.0-or-later and GPL-3.0-or-later with GCC-exception-3.1
|
||||||
Group: Development/C
|
Group: Development/C
|
||||||
|
|
||||||
@ -40,14 +40,22 @@ BuildRequires: kernel-source-%kernel_version
|
|||||||
BuildRequires: qemu-user-static-%target_qemu_arch
|
BuildRequires: qemu-user-static-%target_qemu_arch
|
||||||
BuildRequires: python3
|
BuildRequires: python3
|
||||||
|
|
||||||
|
Requires: gcc-%target-static = %gcc_version
|
||||||
Requires: binutils-%target = %binutils_version
|
Requires: binutils-%target = %binutils_version
|
||||||
Requires: cross-glibc-%target = %glibc_version
|
Requires: cross-glibc-%target_arch = %glibc_version
|
||||||
|
|
||||||
%define _libexecdir /usr/libexec
|
%define _libexecdir /usr/libexec
|
||||||
|
|
||||||
%description
|
%description
|
||||||
%target_arch-targeted GCC cross-compiler
|
%target_arch-targeted GCC cross-compiler
|
||||||
|
|
||||||
|
%package static
|
||||||
|
Summary: %target_arch-targeted GCC cross-compiler, static libraries
|
||||||
|
Group: Development/C
|
||||||
|
|
||||||
|
%description static
|
||||||
|
%target_arch-targeted GCC cross-compiler, static libraries
|
||||||
|
|
||||||
%package -n binutils-%target
|
%package -n binutils-%target
|
||||||
Version: %binutils_version
|
Version: %binutils_version
|
||||||
Summary: %target_arch-targeted binutils (linker, assembler, etc)
|
Summary: %target_arch-targeted binutils (linker, assembler, etc)
|
||||||
@ -56,15 +64,25 @@ Group: Development/C
|
|||||||
%description -n binutils-%target
|
%description -n binutils-%target
|
||||||
%target_arch-targeted binutils (linker, assembler, objdump, etc)
|
%target_arch-targeted binutils (linker, assembler, objdump, etc)
|
||||||
|
|
||||||
%package -n cross-glibc-%target
|
%package -n cross-glibc-%target_arch
|
||||||
Version: %glibc_version
|
Version: %glibc_version
|
||||||
Summary: %target_arch-targeted cross-glibc
|
Summary: %target_arch-targeted cross-glibc
|
||||||
Group: Development/C
|
Group: Development/C
|
||||||
|
Requires: cross-glibc-static-%target_arch
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
|
|
||||||
%description -n cross-glibc-%target
|
%description -n cross-glibc-%target_arch
|
||||||
glibc for %target_arch. Should be used for cross-compilation only
|
glibc for %target_arch. Should be used for cross-compilation only
|
||||||
|
|
||||||
|
%package -n cross-glibc-static-%target_arch
|
||||||
|
Version: %glibc_version
|
||||||
|
Summary: %target_arch-targeted cross-glibc, static libraries
|
||||||
|
Group: Development/C
|
||||||
|
BuildArch: noarch
|
||||||
|
|
||||||
|
%description -n cross-glibc-static-%target_arch
|
||||||
|
static glibc for %target_arch. Should be used for cross-compilation only
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -cT
|
%setup -cT
|
||||||
mkdir -p -m755 linux binutils gcc glibc
|
mkdir -p -m755 linux binutils gcc glibc
|
||||||
@ -341,6 +359,13 @@ qemu-%target_qemu_arch-static ./bye_asm || exit 13
|
|||||||
%_bindir/%target-gcov*
|
%_bindir/%target-gcov*
|
||||||
%prefix/lib/gcc/%target/%gcc_branch/*
|
%prefix/lib/gcc/%target/%gcc_branch/*
|
||||||
%prefix/libexec/gcc/%target/*
|
%prefix/libexec/gcc/%target/*
|
||||||
|
# avoid 'static library packaging violation' "error"
|
||||||
|
%exclude %prefix/lib/gcc/%target/%gcc_branch/libatomic.a
|
||||||
|
%exclude %prefix/lib/gcc/%target/%gcc_branch/libgomp.a
|
||||||
|
%exclude %prefix/lib/gcc/%target/%gcc_branch/libitm.a
|
||||||
|
%exclude %prefix/lib/gcc/%target/%gcc_branch/libssp.a
|
||||||
|
%exclude %prefix/lib/gcc/%target/%gcc_branch/libstdc++.a
|
||||||
|
# binunitls
|
||||||
%exclude %prefix/libexec/gcc/%target/bin/*
|
%exclude %prefix/libexec/gcc/%target/bin/*
|
||||||
%exclude %prefix/libexec/gcc/%target/lib/*
|
%exclude %prefix/libexec/gcc/%target/lib/*
|
||||||
%prefix/share/man/man1/aarch64-linux-gnu-cpp*
|
%prefix/share/man/man1/aarch64-linux-gnu-cpp*
|
||||||
@ -350,15 +375,40 @@ qemu-%target_qemu_arch-static ./bye_asm || exit 13
|
|||||||
%prefix/share/man/man1/aarch64-linux-gnu-gcov-tool*
|
%prefix/share/man/man1/aarch64-linux-gnu-gcov-tool*
|
||||||
%prefix/share/man/man1/aarch64-linux-gnu-gcov*
|
%prefix/share/man/man1/aarch64-linux-gnu-gcov*
|
||||||
|
|
||||||
%files -n cross-glibc-%target
|
%files static
|
||||||
|
%prefix/lib/gcc/%target/%gcc_branch/libatomic.a
|
||||||
|
%prefix/lib/gcc/%target/%gcc_branch/libgomp.a
|
||||||
|
%prefix/lib/gcc/%target/%gcc_branch/libitm.a
|
||||||
|
%prefix/lib/gcc/%target/%gcc_branch/libssp.a
|
||||||
|
%prefix/lib/gcc/%target/%gcc_branch/libstdc++.a
|
||||||
|
|
||||||
|
%files -n cross-glibc-%target_arch
|
||||||
%sysroot/usr/include/*
|
%sysroot/usr/include/*
|
||||||
# XXX: gcc needs %%sysroot/usr/lib to locate C runtime (crt1.o)
|
# XXX: gcc needs %%sysroot/usr/lib to locate C runtime (crt1.o)
|
||||||
%sysroot/usr/lib
|
%sysroot/usr/lib
|
||||||
%sysroot/lib64/*
|
%sysroot/lib64/*
|
||||||
%sysroot/usr/lib64/*
|
%sysroot/usr/lib64/*
|
||||||
|
%exclude %sysroot/usr/lib64/libBrokenLocale.a
|
||||||
|
%exclude %sysroot/usr/lib64/libanl.a
|
||||||
|
%exclude %sysroot/usr/lib64/libdl.a
|
||||||
|
%exclude %sysroot/usr/lib64/libm.a
|
||||||
|
%exclude %sysroot/usr/lib64/libpthread.a
|
||||||
|
%exclude %sysroot/usr/lib64/libresolv.a
|
||||||
|
%exclude %sysroot/usr/lib64/librt.a
|
||||||
|
%exclude %sysroot/usr/lib64/libutil.a
|
||||||
# Compatibility symlink to ld.so
|
# Compatibility symlink to ld.so
|
||||||
%sysroot/lib/*
|
%sysroot/lib/*
|
||||||
|
|
||||||
|
%files -n cross-glibc-static-%target_arch
|
||||||
|
%sysroot/usr/lib64/libBrokenLocale.a
|
||||||
|
%sysroot/usr/lib64/libanl.a
|
||||||
|
%sysroot/usr/lib64/libdl.a
|
||||||
|
%sysroot/usr/lib64/libm.a
|
||||||
|
%sysroot/usr/lib64/libpthread.a
|
||||||
|
%sysroot/usr/lib64/libresolv.a
|
||||||
|
%sysroot/usr/lib64/librt.a
|
||||||
|
%sysroot/usr/lib64/libutil.a
|
||||||
|
|
||||||
%files -n binutils-%target
|
%files -n binutils-%target
|
||||||
%_bindir/%target-addr2line
|
%_bindir/%target-addr2line
|
||||||
%_bindir/%target-ar
|
%_bindir/%target-ar
|
||||||
|
Loading…
Reference in New Issue
Block a user