File gcc14.spec of Package gcc14
%define build_arch aarch64
%define optflags -O2 -g -march=armv8-a
Name: gcc14
Version: 14.3.0
Release: 1%{?dist}
Summary: GNU Compiler Collection
License: GPLv3+
URL: https://gcc.gnu.org
Source0: gcc-14.3.0_git11799.tar.xz
Source1: newlib-4.4.0.20231231.tar.xz
BuildRequires: gmp-devel
BuildRequires: mpfr-devel
BuildRequires: libmpc-devel
BuildRequires: zlib-devel
BuildRequires: flex
BuildRequires: bison
BuildRequires: make
BuildRequires: glibc-devel
BuildRequires: binutils
BuildRequires: libstdc++-devel
%description
The GNU Compiler Collection includes front ends for C, C++, Objective-C, Fortran, Java, and Ada, as well as libraries for these languages.
%prep
%setup -q -n gcc-14.3.0
%setup -q -T -D -n newlib-4.4.0.20231231 -a 1
%build
mkdir -p build
cd build
../configure \
--target=aarch64-linux-gnu \
--prefix=%{_prefix} \
--enable-languages=c,c++,fortran \
--disable-multilib \
--with-system-zlib \
--enable-shared \
--enable-threads=posix \
--enable-checking=release \
--enable-__cxa_atexit \
--with-newlib \
--with-sysroot=%{_prefix}/aarch64-linux-gnu/sysroot \
--with-arch=armv8-a \
--with-tune=cortex-a72 \
--with-fpu=neon-fp-armv8 \
--with-float=hard \
--with-mode=arm
make %{?_smp_mflags}
%install
cd build
make DESTDIR=%{buildroot} install
%files
%{_bindir}/aarch64-linux-gnu-*
%{_libdir}/gcc/aarch64-linux-gnu/%{version}
%{_infodir}/gcc*
%{_mandir}/man1/*
%changelog
* Tue Jun 11 2024 Your Name <your.email@example.com> - 14.3.0-1
- Initial build for aarch64