Skip to content
This repository has been archived by the owner on May 20, 2023. It is now read-only.

Commit

Permalink
upgpkg: gcc 12.1.0-1
Browse files Browse the repository at this point in the history
git-svn-id: file:///srv/repos/svn-packages/svn@444777 eb2447ed-0c53-47e4-bac8-5bc4a241df78
  • Loading branch information
freswa authored and svntogit committed May 6, 2022
1 parent 9c2de9b commit 6ebddb8
Showing 1 changed file with 11 additions and 54 deletions.
65 changes: 11 additions & 54 deletions trunk/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,10 @@
# toolchain build order: linux-api-headers->glibc->binutils->gcc->glibc->binutils->gcc
# NOTE: libtool requires rebuilt with each new gcc version

pkgname=(gcc gcc-libs lib32-gcc-libs gcc-fortran gcc-objc gcc-ada gcc-go gcc-d libgccjit)

This comment has been minimized.

Copy link
@craigbarnes

craigbarnes May 11, 2022

How come gcc-d is being dropped?

This comment has been minimized.

Copy link
@Martchus

Martchus May 11, 2022

Likely due to configure: error: GDC is required to build d.

This comment has been minimized.

Copy link
@ibuclaw

ibuclaw May 11, 2022

So add gcc-d to makedepends then?

This comment has been minimized.

Copy link
@Martchus

Martchus May 12, 2022

gcc-d was previously built as part of this package. This error message sounds like a cyclic dependency to me. There's likely more work to be done for resolving it and official devs (I'm not one, I'm only suspecting) wanted to avoid it. Maybe that error message is even a bug.

This comment has been minimized.

Copy link
@Martchus

Martchus May 12, 2022

By the way, you should likely file a bug about it if you want official devs to do anything. I only saw this comment because I was looking at the diff for a different reason.

This comment has been minimized.

Copy link
@ibuclaw

ibuclaw May 12, 2022

If you remove gcc-ada from makedepends, you'll get the same style error configure: error: GNAT is required to build ada. So it's really just a one line addition instead of this. :-)

Other package maintainers have coped just fine with the transition, Archlinux isn't doing anything special warranting its removal.

This comment has been minimized.

Copy link
@Martchus

Martchus May 12, 2022

Ah, you suggest to use gcc-d from the previous build. That makes sense.

This comment has been minimized.

Copy link
@micwoj92

micwoj92 Jul 21, 2022

@ibuclaw together with @HurricanePootis we were briefly discussing bringing back gcc-d to aur, unfortunately due to the circular depedency it's not really feasible. Is it possible to somehow build gcc-d using dmd? I didn't really look into it seriously.

This comment has been minimized.

Copy link
@ibuclaw

ibuclaw Jul 21, 2022

The same cyclic dependency as C++ and Ada has?

Yes you can use dmd or ldc for bootstrapping, a wrapper script is needed though as they have different option styles.

pkgver=11.2.0
pkgname=(gcc gcc-libs lib32-gcc-libs gcc-fortran gcc-objc gcc-ada gcc-go libgccjit)
pkgver=12.1.0
_majorver=${pkgver%%.*}
_islver=0.24
pkgrel=4
pkgrel=1
pkgdesc='The GNU Compiler Collection'
arch=(x86_64)
license=(GPL3 LGPL FDL custom)
Expand Down Expand Up @@ -42,18 +41,16 @@ _libdir=usr/lib/gcc/$CHOST/${pkgver%%+*}
# source=(git://gcc.gnu.org/git/gcc.git#commit=$_commit
source=(https://sourceware.org/pub/gcc/releases/gcc-${pkgver}/gcc-${pkgver}.tar.xz{,.sig}
c89 c99
gdc_phobos_path.patch
gcc-ada-repro.patch
)
validpgpkeys=(F3691687D867B81B51CE07D9BBE43771487328A9 # bpiotrowski@archlinux.org
86CFFCA918CF3AF47147588051E8B148A9999C34 # evangelos@foutrelis.com
13975A70E63C361C73AE69EF6EEB81F8981C74C7 # richard.guenther@gmail.com
D3A93CAD751C2AF4F8C7AD516C35B99309B5FA62) # Jakub Jelinek <jakub@redhat.com>
sha256sums=('d08edc536b54c372a1010ff6619dd274c0f1603aa49212ba20f7aa2cda36fa8b'
sha256sums=('62fd634889f31c02b64af2c468f064b47ad1ca78411c45abe6ac4b5f8dd19c7b'
'SKIP'
'de48736f6e4153f03d0a5d38ceb6c6fdb7f054e8f47ddd6af0a3dbf14f27b931'
'2513c6d9984dd0a2058557bf00f06d8d5181734e41dcfe07be7ed86f2959622a'
'c86372c207d174c0918d4aedf1cb79f7fc093649eb1ad8d9450dccc46849d308'
'1773f5137f08ac1f48f0f7297e324d5d868d55201c03068670ee4602babdef2f')

prepare() {
Expand All @@ -66,9 +63,6 @@ prepare() {
# Arch Linux installs x86_64 libraries /lib
sed -i '/m64=/s/lib64/lib/' gcc/config/i386/t-linux64

# D hacks
patch -Np1 -i "$srcdir/gdc_phobos_path.patch"

# Reproducible gcc-ada
patch -Np0 < "$srcdir/gcc-ada-repro.patch"

Expand Down Expand Up @@ -103,8 +97,7 @@ build() {
--disable-libstdcxx-pch \
--disable-werror \
--with-build-config=bootstrap-lto \
--enable-link-serialization=1 \
gdc_include_dir=/usr/include/dlang/gdc"
--enable-link-serialization=1"

cd gcc-build

Expand All @@ -115,7 +108,7 @@ build() {
CXXFLAGS=${CXXFLAGS/-Werror=format-security/}

"$srcdir/gcc/configure" \
--enable-languages=c,c++,ada,fortran,go,lto,objc,obj-c++,d \
--enable-languages=c,c++,ada,fortran,go,lto,objc,obj-c++ \
--enable-bootstrap \
$_confflags

Expand Down Expand Up @@ -152,9 +145,6 @@ build() {
check() {
cd gcc-build

# disable libphobos test to avoid segfaults and other unfunny ways to waste my time
sed -i '/maybe-check-target-libphobos \\/d' Makefile

# do not abort on error as some are "expected"
make -O -k check || true
"$srcdir/gcc/contrib/test_summary"
Expand All @@ -164,9 +154,9 @@ package_gcc-libs() {
pkgdesc='Runtime libraries shipped by GCC'
depends=('glibc>=2.27')
options=(!emptydirs !strip)
provides=($pkgname-multilib libgo.so libgfortran.so libgphobos.so
provides=($pkgname-multilib libgo.so libgfortran.so
libubsan.so libasan.so libtsan.so liblsan.so)
replaces=($pkgname-multilib libgphobos)
replaces=($pkgname-multilib)

cd gcc-build
make -C $CHOST/libgcc DESTDIR="$pkgdir" install-shared
Expand All @@ -187,10 +177,6 @@ package_gcc-libs() {
make -C $CHOST/libobjc DESTDIR="$pkgdir" install-libs
make -C $CHOST/libstdc++-v3/po DESTDIR="$pkgdir" install

make -C $CHOST/libphobos DESTDIR="$pkgdir" install
rm -rf "$pkgdir"/$_libdir/include/d/
rm -f "$pkgdir"/usr/lib/libgphobos.spec

for lib in libgomp \
libitm \
libquadmath; do
Expand Down Expand Up @@ -261,8 +247,8 @@ package_gcc() {
make -C $CHOST/32/libsanitizer/asan DESTDIR="$pkgdir" install-nodist_toolexeclibHEADERS

make -C gcc DESTDIR="$pkgdir" install-man install-info
rm "$pkgdir"/usr/share/man/man1/{gccgo,gfortran,gdc}.1
rm "$pkgdir"/usr/share/info/{gccgo,gfortran,gnat-style,gnat_rm,gnat_ugn,gdc}.info
rm "$pkgdir"/usr/share/man/man1/{gccgo,gfortran}.1
rm "$pkgdir"/usr/share/info/{gccgo,gfortran,gnat-style,gnat_rm,gnat_ugn}.info

make -C libcpp DESTDIR="$pkgdir" install
make -C gcc DESTDIR="$pkgdir" install-po
Expand Down Expand Up @@ -372,7 +358,7 @@ package_gcc-ada() {
package_gcc-go() {
pkgdesc='Go front-end for GCC'
depends=("gcc=$pkgver-$pkgrel" libisl.so)
provides=("go=1.12.2" $pkgname-multilib)
provides=("go=1.18" $pkgname-multilib)
replaces=($pkgname-multilib)
conflicts=(go)

Expand Down Expand Up @@ -417,9 +403,6 @@ package_lib32-gcc-libs() {

make -C $CHOST/32/libobjc DESTDIR="$pkgdir" install-libs

make -C $CHOST/libphobos DESTDIR="$pkgdir" install
rm -f "$pkgdir"/usr/lib32/libgphobos.spec

# remove files provided by gcc-libs
rm -rf "$pkgdir"/usr/lib

Expand All @@ -428,32 +411,6 @@ package_lib32-gcc-libs() {
"$pkgdir/usr/share/licenses/lib32-gcc-libs/RUNTIME.LIBRARY.EXCEPTION"
}

package_gcc-d() {
pkgdesc="D frontend for GCC"
depends=("gcc=$pkgver-$pkgrel" libisl.so)
provides=(gdc)
replaces=(gdc)
options=(staticlibs debug)

cd gcc-build
make -C gcc DESTDIR="$pkgdir" d.install-{common,man,info}

install -Dm755 gcc/gdc "$pkgdir"/usr/bin/gdc
install -Dm755 gcc/d21 "$pkgdir"/"$_libdir"/d21

make -C $CHOST/libphobos DESTDIR="$pkgdir" install
rm -f "$pkgdir/usr/lib/"lib{gphobos,gdruntime}.so*
rm -f "$pkgdir/usr/lib32/"lib{gphobos,gdruntime}.so*

install -d "$pkgdir"/usr/include/dlang
ln -s /"${_libdir}"/include/d "$pkgdir"/usr/include/dlang/gdc

# Install Runtime Library Exception
install -d "$pkgdir/usr/share/licenses/$pkgname/"
ln -s /usr/share/licenses/gcc-libs/RUNTIME.LIBRARY.EXCEPTION \
"$pkgdir/usr/share/licenses/$pkgname/"
}

package_libgccjit() {
pkgdesc="Just-In-Time Compilation with GCC backend"
depends=("gcc=$pkgver-$pkgrel" libisl.so)
Expand Down

0 comments on commit 6ebddb8

Please sign in to comment.