Compare commits

...

25 Commits

Author SHA1 Message Date
71500529c9 spec: restored changelog 2023-02-03 14:25:58 +04:00
e7cda0e8f4 Worked around "bad_elf_symbols" pseudo-error
Moved target GCC libs into a noarch subpackage
2023-02-02 22:44:45 +04:00
a73b457758 la64: avoid idiotic "ERROR: static library violation" 2023-01-31 21:34:04 +04:00
58d0441101 spec: fixed build glibc issues with make 4.4 2023-01-31 21:03:46 +04:00
b25632c9ca spec: set packager to make gyle.alt happy 2023-01-31 19:59:56 +04:00
be7fea1d23 spec: enable gold based on target support 2023-01-31 19:59:39 +04:00
1b6ee0ceab spec: use vendored zlib 2023-01-31 19:58:48 +04:00
bc28a5dc67 spec: remove lib/bfd-plugins
These conflict with native ones and are not particularly
useful (for a cross-toolchain)
2023-01-31 17:38:02 +04:00
f3329910f4 loongarch64: apparently glibc has no libanl 2023-01-31 17:36:59 +04:00
c103bec4bb spec: added target_has_gold flag
Apparently gold does not support neither to riscv nor loongarch
2023-01-31 17:36:21 +04:00
1ade77ca76 cross-toolchain.spec: sync with altcross-2stage.sh 2023-01-30 19:08:59 +04:00
717595bbc6 Added GCC prerequisites (gmp, mpc, mpfr, isl) to repo
Since I store GCC tarball anyway, let's add the prerequisites
too so altcross-2stage.sh does not need internet duing the build
2023-01-29 23:35:21 +04:00
0d282996f0 altcross-2stage.sh: disable -Werror, nls
-Werror causes too many spurious build failures
Building NLS requires cryptic tools
2023-01-29 16:14:21 +04:00
d62998a357 altcross-2stage.sh: apply GCC patches only if present 2023-01-29 16:11:26 +04:00
9de3efe06c binutils: use official tarball
Building from a git snapshot fails due to some missing documentation files,
and apparently there's no way to disable building the docs.
2023-01-29 15:08:30 +04:00
9e785c2c03 gcc: use upstream snapshot 20230128 2023-01-28 20:54:35 +04:00
3f690b308c Use upstream binutils 2.40 2023-01-28 20:37:25 +04:00
d2646c4bea Revert "Downgraded binutils to v20220807"
This reverts commit 07e54665b44d9d37e7a4eaeb9f31312b9c1dccfb
for the downgraded version produces the very same error when
compiling recent (6.2-rc) kernel
2023-01-28 02:43:07 +04:00
2a92904f17 altcross-2stage: use in-tree sources 2023-01-28 02:05:10 +04:00
e8dce540b1 Added Linux sources from kernel.org 6.1 2023-01-28 02:04:03 +04:00
087a18bcc7 Added glibc-2.36 sources from yetist
https://github.com/yetist/glibc/releases/download/v20221009/glibc-2.36-20221009.tar.xz
2023-01-28 02:04:02 +04:00
3d5a2e3868 gcc: do use lib64 2023-01-28 02:04:02 +04:00
c8b0db14cf Added gcc sources from yetist
https://github.com/yetist/gcc/releases/download/v20221025/gcc-12.2.1-20221025.tar.xz
2023-01-28 02:04:01 +04:00
07e54665b4 Downgraded binutils to v20220807 2023-01-28 02:04:01 +04:00
2aed7a8d20 Added binutils sources from yetist
https://github.com/yetist/binutils-gdb/releases/download/v20221009/binutils-2.39-20221009.tar.xz
2023-01-28 02:04:00 +04:00
12 changed files with 291 additions and 42 deletions

110
0001_glibc_makeflags.patch Normal file
View File

@ -0,0 +1,110 @@
From: Sergei Trofimovich <slyich@gmail.com>
Date: Tue, 13 Sep 2022 17:39:13 +0000 (-0400)
Subject: Makerules: fix MAKEFLAGS assignment for upcoming make-4.4 [BZ# 29564]
X-Git-Tag: 2.35.0.6.491f2e-alt2~1^2~1
X-Git-Url: http://git.altlinux.org/gears/g/glibc.git?p=glibc.git;a=commitdiff_plain;h=49ad8fd10963d42811a1dce28e2e77876e3054b0
Makerules: fix MAKEFLAGS assignment for upcoming make-4.4 [BZ# 29564]
make-4.4 will add long flags to MAKEFLAGS variable:
* WARNING: Backward-incompatibility!
Previously only simple (one-letter) options were added to the MAKEFLAGS
variable that was visible while parsing makefiles. Now, all options
are available in MAKEFLAGS.
This causes locale builds to fail when long options are used:
$ make --shuffle
...
make -C localedata install-locales
make: invalid shuffle mode: '1662724426r'
The change fixes it by passing eash option via whitespace and dashes.
That way option is appended to both single-word form and whitespace
separated form.
While at it fixed --silent mode detection in $(MAKEFLAGS) by filtering
out --long-options. Otherwise options like --shuffle flag enable silent
mode unintentionally. $(silent-make) variable consolidates the checks.
Resolves: BZ# 29564
CC: Paul Smith <psmith@gnu.org>
CC: Siddhesh Poyarekar <siddhesh@gotplt.org>
Signed-off-by: Sergei Trofimovich <slyich@gmail.com>
Reviewed-by: Siddhesh Poyarekar <siddhesh@sourceware.org>
(cherry picked from commit 2d7ed98add14f75041499ac189696c9bd3d757fe)
---
diff --git a/Makeconfig b/Makeconfig
index 46e008b..d615c4c 100644
--- a/Makeconfig
+++ b/Makeconfig
@@ -43,6 +43,22 @@ else
$(error objdir must be defined by the build-directory Makefile)
endif
+# Did we request 'make -s' run? "yes" or "no".
+# Starting from make-4.4 MAKEFLAGS now contains long
+# options like '--shuffle'. To detect presence of 's'
+# we pick first word with short options. Long options
+# are guaranteed to come after whitespace. We use '-'
+# prefix to always have a word before long options
+# even if no short options were passed.
+# Typical MAKEFLAGS values to watch for:
+# "rs --shuffle=42" (silent)
+# " --shuffle" (not silent)
+ifeq ($(findstring s, $(firstword -$(MAKEFLAGS))),)
+silent-make := no
+else
+silent-make := yes
+endif
+
# Root of the sysdeps tree.
sysdep_dir := $(..)sysdeps
export sysdep_dir := $(sysdep_dir)
@@ -920,7 +936,7 @@ endif
# umpteen zillion filenames along with it (we use `...' instead)
# but we don't want this echoing done when the user has said
# he doesn't want to see commands echoed by using -s.
-ifneq "$(findstring s,$(MAKEFLAGS))" "" # if -s
+ifeq ($(silent-make),yes) # if -s
+cmdecho := echo >/dev/null
else # not -s
+cmdecho := echo
diff --git a/Makerules b/Makerules
index 12f2ed7..301c501 100644
--- a/Makerules
+++ b/Makerules
@@ -802,7 +802,7 @@ endif
# Maximize efficiency by minimizing the number of rules.
.SUFFIXES: # Clear the suffix list. We don't use suffix rules.
# Don't define any builtin rules.
-MAKEFLAGS := $(MAKEFLAGS)r
+MAKEFLAGS := $(MAKEFLAGS) -r
# Generic rule for making directories.
%/:
@@ -819,7 +819,7 @@ MAKEFLAGS := $(MAKEFLAGS)r
.PRECIOUS: $(foreach l,$(libtypes),$(patsubst %,$(common-objpfx)$l,c))
# Use the verbose option of ar and tar when not running silently.
-ifeq "$(findstring s,$(MAKEFLAGS))" "" # if not -s
+ifeq ($(silent-make),no) # if not -s
verbose := v
else # -s
verbose :=
diff --git a/elf/rtld-Rules b/elf/rtld-Rules
index ca00dd1..3c5e273 100644
--- a/elf/rtld-Rules
+++ b/elf/rtld-Rules
@@ -52,7 +52,7 @@ $(objpfx)rtld-libc.a: $(foreach dir,$(rtld-subdirs),\
mv -f $@T $@
# Use the verbose option of ar and tar when not running silently.
-ifeq "$(findstring s,$(MAKEFLAGS))" "" # if not -s
+ifeq ($(silent-make),no) # if not -s
verbose := v
else # -s
verbose :=

View File

@ -1,18 +1,31 @@
#!/bin/bash
set -e
set -x
MYDIR="${0%/*}"
TARGET=aarch64-linux-gnu
ARCH=aarch64
LINUX_ARCH=arm64
QEMU_ARCH=aarch64
TARGET='loongarch64-linux-gnu'
ARCH=loongarch64
LINUX_ARCH=loongarch
QEMU_ARCH=loongarch64
TARGET_LD_LINUX='/lib64/ld-linux-loongarch-lp64d.so.1'
TARGET_LIBDIR=lib64
unset NIL
KERNEL_SOURCE="`find /usr/src/kernel/sources -type f -name 'kernel-source-*.tar'`"
BINUTILS_SOURCE="`find /usr/src/binutils-source -type f -name 'binutils-*.tar'`"
GCC_SOURCE="`find /usr/src/gcc-source -type f -name 'gcc-*.tar'`"
GLIBC_SOURCE="`find /usr/src/glibc-source -type f -name 'glibc-*.tar'`"
cd "$MYDIR"
MYDIR=`pwd`
BUILDDIR="`pwd`/build"
SRCDIR="`pwd`/src"
KERNEL_SOURCE="`find $(pwd) -maxdepth 1 -type f -name 'kernel-source-*.tar*'`"
BINUTILS_SOURCE="`find $(pwd) -maxdepth 1 -type f -name 'binutils-*.tar*'`"
GCC_SOURCE="`find $(pwd) -maxdepth 1 -type f -name 'gcc-*.tar*'`"
GLIBC_SOURCE="`find $(pwd) -maxdepth 1 -type f -name 'glibc-*.tar*'`"
GCC_PATCHES=''
gcc_patches_dir="`pwd`/patches/gcc"
if [ -d "$gcc_patches_dir" ]; then
GCC_PATCHES="`find $gcc_patches_dir -maxdepth 1 -type f -name '*.patch'`"
fi
getversion() {
local fname="${1##*/}"
@ -21,11 +34,21 @@ getversion() {
echo "$ver"
}
unpack_to() {
local tarball="$1"
local destdir="$2"
local name="${tarball##*/}"
name="${name%%-*}"
destdir="${destdir}/${name}"
mkdir -p "$destdir"
tar --strip-components=1 -x -a -f "$tarball" -C "$destdir"
}
GCC_VERSION=`getversion $GCC_SOURCE`
GCC_MAJOR_VERSION="${GCC_VERSION%%.*}"
GCC_PREREQS="gmp-6.2.1.tar.bz2 mpc-1.2.1.tar.gz mpfr-4.1.0.tar.bz2 isl-0.24.tar.bz2"
BUILDDIR="`pwd`/build"
SRCDIR="`pwd`/src"
INSTALLDIR="`pwd`/inst/altcross-gcc-${GCC_VERSION}"
BOOTSTRAP_INSTALLDIR="`pwd`/stage1/altcross-gcc-${GCC_VERSION}"
SYSROOT=/$TARGET/libc
@ -35,14 +58,18 @@ mkdir -p -m755 "$SRCDIR"
cd "$SRCDIR"
mkdir -p -m755 linux binutils gcc glibc
tar -x --strip-components=1 -f "$KERNEL_SOURCE" -C linux
tar -x --strip-components=1 -f "$BINUTILS_SOURCE" -C binutils
tar -x --strip-components=1 -f "$GCC_SOURCE" -C gcc
tar -x --strip-components=1 -f "$GLIBC_SOURCE" -C glibc
tar -x -a --strip-components=1 -f "$KERNEL_SOURCE" -C linux
tar -x -a --strip-components=1 -f "$BINUTILS_SOURCE" -C binutils
tar -x -a --strip-components=1 -f "$GCC_SOURCE" -C gcc
tar -x -a --strip-components=1 -f "$GLIBC_SOURCE" -C glibc
cd "gcc"
sed -i contrib/download_prerequisites -e '/base_url=/s/ftp/http/'
./contrib/download_prerequisites
for p in $GCC_PATCHES; do
patch -p1 -i $p
done
for tarball in $GCC_PREREQS; do
unpack_to "$MYDIR/$tarball" "."
done
mkdir -p -m755 "$INSTALLDIR/bin" "$BOOTSTRAP_INSTALLDIR/bin"
save_PATH="$PATH"
@ -65,7 +92,10 @@ cd "$BUILDDIR/obj_binutils"
--prefix= \
--with-sysroot="$SYSROOT" \
--with-build-sysroot="$SYSROOTDIR" \
--disable-nls \
--disable-multilib \
--disable-gdb \
--disable-werror \
${NIL}
make -j$(nproc)
@ -90,6 +120,8 @@ cd "$BUILDDIR/obj_gcc_bootstrap"
--disable-libvtv \
--disable-libatomic \
--disable-libcilkrts \
--disable-nls \
--disable-werror \
--with-newlib \
--without-headers \
--with-sysroot="$SYSROOT" \
@ -124,6 +156,7 @@ cd "$BUILDDIR/obj_glibc"
--with-lib="$SYSROOTDIR"/usr/lib \
--disable-multilib \
--disable-crypt \
--disable-werror \
libc_cv_forced_unwind=yes \
${NIL}
@ -149,6 +182,8 @@ cd "$BUILDDIR/obj_gcc"
--with-gcc-major-version-only \
--disable-libsanitizer \
--disable-multilib \
--disable-nls \
--disable-werror \
${NIL}
make -j$(nproc)
@ -167,10 +202,12 @@ sed -e "s; objcopy ; ../../../../bin/${TARGET}-objcopy ;" -i $BUILDDIR/specs
mv $BUILDDIR/specs "$INSTALLDIR/lib/gcc/$TARGET/${GCC_MAJOR_VERSION}/"
# relocate libgcc_s
mv $INSTALLDIR/lib/gcc/$TARGET/lib64/libgcc_s.so* "$INSTALLDIR/lib/gcc/$TARGET/${GCC_MAJOR_VERSION}/"
rmdir "$INSTALLDIR/lib/gcc/$TARGET/lib64"
if [ -d "$INSTALLDIR/lib/gcc/$TARGET/lib64" ]; then
mv $INSTALLDIR/lib/gcc/$TARGET/lib64/libgcc_s.so* "$INSTALLDIR/lib/gcc/$TARGET/${GCC_MAJOR_VERSION}/"
rmdir "$INSTALLDIR/lib/gcc/$TARGET/lib64"
fi
cd "$MYDIR"
$INSTALLDIR/bin/${TARGET}-gcc -o ${BUILDDIR}/hello_c hello.c || exit 2
$INSTALLDIR/bin/${TARGET}-g++ -o ${BUILDDIR}/hello_cpp hello.cpp || exit 3
$INSTALLDIR/bin/${TARGET}-gcc -o ${BUILDDIR}/bye_asm -static -nostdlib bye-${LINUX_ARCH}.S || exit 11

BIN
binutils-2.40.tar.xz Normal file

Binary file not shown.

20
bye-loongarch.S Normal file
View File

@ -0,0 +1,20 @@
#include <sys/syscall.h>
.data
message: .asciz "bye-bye ...\n"
.text
.global _start
_start:
li.w $a7, __NR_write
li.w $a0, 1 # stdout file descriptor
la $a1, message
li.w $a2, 12 # message length
syscall 0x0
li.w $a7, __NR_exit
li.w $a0, 0
syscall 0x0
.section .note.GNU-stack,"",@progbits

View File

@ -3,8 +3,7 @@
# %%define target_arch arm
# %%define target_arch mipsel
# %%define target_arch riscv64
%define target_arch @targetarch@
%define target_arch loongarch64
%if "%target_arch" == "aarch64"
%define target_kernel arm64
@ -12,6 +11,7 @@
%define target_ld_linux /lib64/ld-linux-aarch64.so.1
%define target_libdir lib64
%define target_has_itm 1
%define target_has_gold 1
%endif
%if "%target_arch" == "arm"
@ -20,6 +20,7 @@
%define target_ld_linux /lib/ld-linux-armhf.so.3
%define target_libdir lib
%define target_has_itm 1
%define target_has_gold 1
# armhf: use the same arch/fp instruction set as the native compiler
%define arm_arch armv7-a
%define arm_fp_isa vfpv3-d16
@ -31,6 +32,7 @@
%define target_qemu_arch mipsel
%define target_ld_linux /lib/ld.so.1
%define target_libdir lib
%define target_has_gold 1
%endif
@ -46,6 +48,7 @@
%define target_qemu_arch loongarch64
%define target_ld_linux /lib64/ld-linux-loongarch-lp64d.so.1
%define target_libdir lib64
%define target_has_itm 1
%endif
%if "%target_arch" != "arm"
@ -59,34 +62,40 @@
%brp_strip_none %sysroot/* %prefix/lib/gcc/*.a %prefix/lib/gcc/*.o
Name: cross-toolchain-%target
Version: 20220605
Version: 20230202
Release: alt1
Packager: Alexey Sheplyakov <asheplyakov@altlinux.org>
Summary: GCC cross-toolchain for %target
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
ExclusiveArch: x86_64
%define gcc_version %{get_version gcc-source}
%define gcc_version 13.0.0.20230128.gfe4608efc15
%define gcc_branch %(v=%gcc_version; v=${v%%%%.*}; echo $v)
%define binutils_version %{get_version binutils-source}
%define glibc_version %{get_version glibc-source}
%define binutils_version 2.40
%define glibc_version 2.36.20221009
%if "%target_arch" == "loongarch64"
%define kernel_version 6.0
%else
%define kernel_version 5.10
%endif
Source0: gcc-13.0.0-20230128-gfe4608efc15.tar
Source1: binutils-2.40.tar
Source2: glibc-2.36-20221009.tar
Source3: kernel-source-6.1.0.tar
Source4: gmp-6.2.1.tar
Source5: isl-0.24.tar
Source6: mpc-1.2.1.tar
Source7: mpfr-4.1.0.tar
Patch0: 0001_glibc_makeflags.patch
BuildPreReq: gcc-c++
BuildPreReq: libmpc-devel libmpfr-devel libgmp-devel zlib-devel
BuildPreReq: coreutils flex bison makeinfo perl-Pod-Parser findutils
# Linux' headers_install uses rsync
BuildPreReq: rsync
BuildRequires(pre): gcc-source
BuildRequires(pre): binutils-source
BuildRequires(pre): glibc-source
BuildPreReq: kernel-source-%kernel_version
BuildRequires: /usr/bin/qemu-%target_qemu_arch-static
BuildRequires: python3
@ -100,19 +109,30 @@ Version: %gcc_version
Summary: %target_arch-targeted GCC cross-compiler
Group: Development/C
Requires: gcc-%target-static = %gcc_version
Requires: cross-gcc-libs-%target = %gcc_version
Requires: binutils-%target = %binutils_version
Requires: cross-glibc-%target_arch = %glibc_version
%description -n gcc-%target
%target_arch-targeted GCC cross-compiler
%package -n cross-gcc-libs-%target
Version: %gcc_version
Summary: %target_arch-targeted GCC cross-compiler, target libraries
Group: Development/C
BuildArch: noarch
%description -n cross-gcc-libs-%target
%target_arch-targeted GCC cross-compiler, shared libraries for target
%package -n gcc-%target-static
Version: %gcc_version
Summary: %target_arch-targeted GCC cross-compiler, static libraries
Group: Development/C
BuildArch: noarch
%description -n gcc-%target-static
%target_arch-targeted GCC cross-compiler, static libraries
%target_arch-targeted GCC cross-compiler, static libraries for target
%package -n binutils-%target
Version: %binutils_version
@ -145,10 +165,19 @@ static glibc for %target_arch. Should be used for cross-compilation only
%setup -cT
mkdir -p -m755 linux binutils gcc glibc
find /usr/src/gcc-source -type f -name 'gcc-*.tar' | xargs -I {} -n1 tar -x --strip-components=1 -f {} -C gcc
find /usr/src/binutils-source -type f -name 'binutils-*.tar' | xargs -I {} -n1 tar -x --strip-components=1 -f {} -C binutils
find /usr/src/kernel/sources -type f -name 'kernel-source-*.tar' | xargs -I {} -n1 tar -x --strip-components=1 -f {} -C linux
find /usr/src/glibc-source -type f -name 'glibc-*.tar' | xargs -I {} -n1 tar -x --strip-components=1 -f {} -C glibc
tar -x --strip-components=1 -f %SOURCE0 -C gcc
tar -x --strip-components=1 -f %SOURCE1 -C binutils
tar -x --strip-components=1 -f %SOURCE2 -C glibc
tar -x --strip-components=1 -f %SOURCE3 -C linux
mkdir -p -m755 gcc/gmp gcc/mpc gcc/mpfr gcc/isl
tar -x --strip-components=1 -f %SOURCE4 -C gcc/gmp
tar -x --strip-components=1 -f %SOURCE5 -C gcc/isl
tar -x --strip-components=1 -f %SOURCE6 -C gcc/mpc
tar -x --strip-components=1 -f %SOURCE7 -C gcc/mpfr
# glibc makeflags + make 4.4 hiccup
patch -d glibc -p1 -i %PATCH0
rm -rf stage
@ -161,7 +190,11 @@ mkdir -p obj_glibc
mkdir -p -m755 stage%prefix/bin
mkdir -p -m755 stage1%prefix/bin
save_PATH="$PATH"
export PATH=`pwd`/stage1%prefix/bin:$PATH
if [ -d "/usr/lib/ccache" ]; then
export PATH=`pwd`/stage1%prefix/bin:/usr/lib/ccache:$PATH
else
export PATH=`pwd`/stage1%prefix/bin:$PATH
fi
stagedir=`pwd`/stage
stage1dir=`pwd`/stage1
@ -193,9 +226,10 @@ cd obj_binutils
--disable-nls \
--with-sysroot=%sysroot \
--with-build-sysroot=${stagedir}%sysroot \
--with-system-zlib \
--enable-plugins \
%if 0%{?target_has_gold}
--enable-gold=yes \
%endif
--enable-ld=default \
%if "%target_arch" != "mipsel"
--enable-64-bit-bfd \
@ -244,7 +278,6 @@ cd ../obj_gcc_bootstrap
--disable-libcilkrts \
--enable-version-specific-runtime-libs \
--with-gcc-major-version-only \
--with-system-zlib \
%if "%target_arch" == "mipsel"
--with-arch-32=mips32r2 \
--with-fp-32=xx \
@ -281,6 +314,9 @@ cd ../obj_glibc
--with-lib=${stagedir}%sysroot/usr/lib \
--disable-multilib \
--disable-crypt \
%if "%target_arch" == "loongarch64"
--disable-werror \
%endif
libc_cv_forced_unwind=yes \
%nil
@ -319,7 +355,6 @@ cd ../obj_gcc
--enable-version-specific-runtime-libs \
--disable-nls \
--disable-libsanitizer \
--with-system-zlib \
%if "%target_arch" == "mipsel"
--with-arch-32=mips32r2 \
--with-fp-32=xx \
@ -416,8 +451,10 @@ rm -rf %buildroot%prefix/share/info
rm -rf %buildroot%prefix/share/man/man7
# python pretty-printers conflict with native compiler
rm -rf %buildroot%prefix/share/gcc-%gcc_branch/python
# conficts with the native compiler and is not particularly useful
# conflicts with the native compiler and is not particularly useful
rm -f %buildroot%prefix/%_lib/libcc1.so*
# conflicts with the native bfd and is not particularly useful
rm -rf %buildroot%prefix/lib/bfd-plugins
# Useless for Linux targets
rm -f %buildroot%_man1dir/%target-windmc*
rm -f %buildroot%_man1dir/%target-windres*
@ -573,6 +610,7 @@ _start:
.section .note.GNU-stack,"",@progbits
EOF
%endif
env PATH=%buildroot%prefix/bin:$PATH \
%buildroot%prefix/bin/%target-gcc -static -nostdlib -o bye_asm bye.S || exit 11
@ -589,12 +627,28 @@ qemu-%target_qemu_arch-static ./bye_asm || exit 13
%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/libgcc.a
%exclude %prefix/lib/gcc/%target/%gcc_branch/libgcc_eh.a
%exclude %prefix/lib/gcc/%target/%gcc_branch/libgcov.a
%exclude %prefix/lib/gcc/%target/%gcc_branch/libgomp.a
%if 0%{?target_has_itm}
%exclude %prefix/lib/gcc/%target/%gcc_branch/libitm.a
%endif
%exclude %prefix/lib/gcc/%target/%gcc_branch/libssp.a
%exclude %prefix/lib/gcc/%target/%gcc_branch/libssp_nonshared.a
%exclude %prefix/lib/gcc/%target/%gcc_branch/libstdc++.a
%exclude %prefix/lib/gcc/%target/%gcc_branch/libstdc++fs.a
%exclude %prefix/lib/gcc/%target/%gcc_branch/libsupc++.a
# avoid 'NEW bad_elf_symbols detected' "error"
%exclude %prefix/lib/gcc/%target/%gcc_branch/crt*.o
%exclude %prefix/lib/gcc/%target/%gcc_branch/libatomic.so*
%exclude %prefix/lib/gcc/%target/%gcc_branch/libgcc_s.so*
%exclude %prefix/lib/gcc/%target/%gcc_branch/libgomp.so*
%if 0%{?target_has_itm}
%exclude %prefix/lib/gcc/%target/%gcc_branch/libitm.so*
%endif
%exclude %prefix/lib/gcc/%target/%gcc_branch/libssp.so*
%exclude %prefix/lib/gcc/%target/%gcc_branch/libstdc++.so*
# binunitls
%exclude %prefix/libexec/gcc/%target/bin/*
%exclude %prefix/libexec/gcc/%target/lib/*
@ -606,12 +660,29 @@ qemu-%target_qemu_arch-static ./bye_asm || exit 13
%files -n gcc-%target-static
%prefix/lib/gcc/%target/%gcc_branch/libatomic.a
%prefix/lib/gcc/%target/%gcc_branch/libgcc.a
%prefix/lib/gcc/%target/%gcc_branch/libgcc_eh.a
%prefix/lib/gcc/%target/%gcc_branch/libgcov.a
%prefix/lib/gcc/%target/%gcc_branch/libgomp.a
%if 0%{?target_has_itm}
%prefix/lib/gcc/%target/%gcc_branch/libitm.a
%endif
%prefix/lib/gcc/%target/%gcc_branch/libssp.a
%prefix/lib/gcc/%target/%gcc_branch/libssp_nonshared.a
%prefix/lib/gcc/%target/%gcc_branch/libstdc++.a
%prefix/lib/gcc/%target/%gcc_branch/libstdc++fs.a
%prefix/lib/gcc/%target/%gcc_branch/libsupc++.a
%files -n cross-gcc-libs-%target
%prefix/lib/gcc/%target/%gcc_branch/crt*.o
%prefix/lib/gcc/%target/%gcc_branch/libatomic.so*
%prefix/lib/gcc/%target/%gcc_branch/libgcc_s.so*
%prefix/lib/gcc/%target/%gcc_branch/libgomp.so*
%if 0%{?target_has_itm}
%prefix/lib/gcc/%target/%gcc_branch/libitm.so*
%endif
%prefix/lib/gcc/%target/%gcc_branch/libssp.so*
%prefix/lib/gcc/%target/%gcc_branch/libstdc++.so*
%files -n cross-glibc-%target_arch
%sysroot/usr/include/*
@ -627,7 +698,9 @@ qemu-%target_qemu_arch-static ./bye_asm || exit 13
%sysroot/usr/lib
%endif
%exclude %sysroot/usr/%target_libdir/libBrokenLocale.a
%if %target_arch != "loongarch64"
%exclude %sysroot/usr/%target_libdir/libanl.a
%endif
%exclude %sysroot/usr/%target_libdir/libdl.a
%exclude %sysroot/usr/%target_libdir/libm.a
%exclude %sysroot/usr/%target_libdir/libpthread.a
@ -637,7 +710,9 @@ qemu-%target_qemu_arch-static ./bye_asm || exit 13
%files -n cross-glibc-static-%target_arch
%sysroot/usr/%target_libdir/libBrokenLocale.a
%if %target_arch != "loongarch64"
%sysroot/usr/%target_libdir/libanl.a
%endif
%sysroot/usr/%target_libdir/libdl.a
%sysroot/usr/%target_libdir/libm.a
%sysroot/usr/%target_libdir/libpthread.a
@ -650,14 +725,14 @@ qemu-%target_qemu_arch-static ./bye_asm || exit 13
%_bindir/%target-ar
%_bindir/%target-as
%_bindir/%target-c++filt
%if "%target_arch" != "riscv64"
%if 0%{?target_has_gold}
%_bindir/%target-dwp
%endif
%_bindir/%target-elfedit
%_bindir/%target-gprof
%_bindir/%target-ld
%_bindir/%target-ld.bfd
%if "%target_arch" != "riscv64"
%if 0%{?target_has_gold}
%_bindir/%target-ld.gold
%endif
%_bindir/%target-nm
@ -690,6 +765,13 @@ qemu-%target_qemu_arch-static ./bye_asm || exit 13
%changelog
* Thu Feb 02 2023 Alexey Sheplyakov <asheplyakov@altlinux.org> 20230202-alt1
- Moved GCC target libraries to a noarch subpackage to avoid spurious
'bad ELF symbols' errors.
* Mon Jan 30 2023 Alexey Sheplyakov <asheplyakov@altlinux.org> 20230130-alt1
- Added loongarch64 cross-toolchain
* Sun Jun 05 2022 Alexey Sheplyakov <asheplyakov@altlinux.org> 20220605-alt1
- Use slow 2-stage bootstrap to avoid a build failure with GCC 12

Binary file not shown.

BIN
glibc-2.36-20221009.tar.xz Normal file

Binary file not shown.

BIN
gmp-6.2.1.tar.bz2 Normal file

Binary file not shown.

BIN
isl-0.24.tar.bz2 Normal file

Binary file not shown.

BIN
kernel-source-6.1.0.tar.xz Normal file

Binary file not shown.

BIN
mpc-1.2.1.tar.gz Normal file

Binary file not shown.

BIN
mpfr-4.1.0.tar.bz2 Normal file

Binary file not shown.