upgrades 02162022

This commit is contained in:
joborun linux 2022-02-16 14:09:51 +02:00
parent e171f98935
commit ffd6c1759d
330 changed files with 6231 additions and 664 deletions

View File

@ -1,7 +1,7 @@
#!/usr/bin/bash
# JOBoRun : Jwm OpenBox Obarun RUNit
# Maintainer : Joe Bo Run <joborun@disroot.org>
# PkgSource : url="https://gittea.disroot.org/joborun/jobcore/$pkgname"
# PkgSource : url="https://gittea.disroot.org/joborun-pkg/jobcore/$pkgname"
#-----------------------------------------| DESCRIPTION |---------------------------------------
pkgname=66

View File

@ -1,7 +1,7 @@
#!/usr/bin/bash
# JOBoRun : Jwm OpenBox Obarun RUNit
# Maintainer : Joe Bo Run <joborun@disroot.org>
# PkgSource : url="https://gittea.disroot.org/joborun/jobcore/$pkgname"
# PkgSource : url="https://gittea.disroot.org/joborun-pkg/jobcore/$pkgname"
#-----------------------------------------| DESCRIPTION |---------------------------------------
pkgname=acl

View File

@ -1,6 +1,6 @@
# JOBoRun : Jwm OpenBox Obarun RUNit
# Maintainer : Joe Bo Run <joborun@disroot.org>
# PkgSource : url="https://gittea.disroot.org/joborun/jobcore/$pkgname"
# PkgSource : url="https://gittea.disroot.org/joborun-pkg/jobcore/$pkgname"
#-----------------------------------------| DESCRIPTION |---------------------------------------
pkgname=archlinux-keyring

View File

@ -1,7 +1,7 @@
#!/usr/bin/bash
# JOBoRun : Jwm OpenBox Obarun RUNit
# Maintainer : Joe Bo Run <joborun@disroot.org>
# PkgSource : url="https://gittea.disroot.org/joborun/jobcore/$pkgname"
# PkgSource : url="https://gittea.disroot.org/joborun-pkg/jobcore/$pkgname"
#-----------------------------------------| DESCRIPTION |---------------------------------------
pkgname=argon2

View File

@ -1,7 +1,7 @@
#!/usr/bin/bash
# JOBoRun : Jwm OpenBox Obarun RUNit
# Maintainer : Joe Bo Run <joborun@disroot.org>
# PkgSource : url="https://gittea.disroot.org/joborun/jobcore/attr"
# PkgSource : url="https://gittea.disroot.org/joborun-pkg/jobcore/attr"
#-----------------------------------------| DESCRIPTION |---------------------------------------
pkgname=attr

View File

@ -1,7 +1,7 @@
#!/usr/bin/bash
# JOBoRun : Jwm OpenBox Obarun RUNit
# Maintainer : Joe Bo Run <joborun@disroot.org>
# PkgSource : url="https://gittea.disroot.org/joborun/jobcore/$pkgname"
# PkgSource : url="https://gittea.disroot.org/joborun-pkg/jobcore/$pkgname"
#-----------------------------------------| DESCRIPTION |---------------------------------------
pkgbase=audit

View File

@ -1,7 +1,7 @@
#!/usr/bin/bash
# JOBoRun : Jwm OpenBox Obarun RUNit
# Maintainer : Joe Bo Run <joborun@disroot.org>
# PkgSource : url="https://gittea.disroot.org/joborun/jobcore/$pkgname"
# PkgSource : url="https://gittea.disroot.org/joborun-pkg/jobcore/$pkgname"
#-----------------------------------------| DESCRIPTION |---------------------------------------
pkgname=autoconf

View File

@ -1,7 +1,7 @@
#!/usr/bin/bash
# JOBoRun : Jwm OpenBox Obarun RUNit
# Maintainer : Joe Bo Run <joborun@disroot.org>
# PkgSource : url="https://gittea.disroot.org/joborun/jobcore/$pkgname"
# PkgSource : url="https://gittea.disroot.org/joborun-pkg/jobcore/$pkgname"
#-----------------------------------------| DESCRIPTION |---------------------------------------
pkgname=automake

View File

@ -1,7 +1,7 @@
#!/usr/bin/bash
# JOBoRun : Jwm OpenBox Obarun RUNit
# Maintainer : Joe Bo Run <joborun@disroot.org>
# PkgSource : url="https://gittea.disroot.org/joborun/jobcore/$pkgname"
# PkgSource : url="https://gittea.disroot.org/joborun-pkg/jobcore/$pkgname"
#-----------------------------------------| DESCRIPTION |---------------------------------------
pkgname=b43-fwcutter

View File

@ -2,7 +2,7 @@
# JOBoRun : Jwm OpenBox Obarun RUNit
# Based on Obarun : git.obarun.org/pkg
# Maintainer : Joe Bo Run <joborun@disroot.org>
# PkgSource : url="https://gittea.disroot.org/joborun"
# PkgSource : url="https://gittea.disroot.org/joborun-pkg"
#-----------------------------------------------------------------------------------------------
# ObarunSource : https://git.obarun.org/pkg/core/none-yet
#-----------------------------------------| DESCRIPTION |---------------------------------------
@ -12,9 +12,9 @@ pkgname=base
pkgdesc='Minimal set of packages to define a basic JOBORun Linux installation'
pkgver=0.1
pkgrel=02
url="https://web.joborun.eu"
pkgrel=03
groups=( jobbot )
url="https://web.pozol.eu"
arch=('x86_64')
source=(README.txt)
depends=(

View File

@ -1,7 +1,7 @@
#!/usr/bin/bash
# JOBoRun : Jwm OpenBox Obarun RUNit
# Maintainer : Joe Bo Run <joborun@disroot.org>
# PkgSource : url="https://gittea.disroot.org/joborun/jobcore/$pkgname"
# PkgSource : url="https://gittea.disroot.org/joborun-pkg/jobcore/$pkgname"
#-----------------------------------------| DESCRIPTION |---------------------------------------
pkgname=bash

View File

@ -1,27 +1,30 @@
#!/usr/bin/bash
# JOBoRun : Jwm OpenBox Obarun RUNit
# Maintainer : Joe Bo Run <joborun@disroot.org>
# PkgSource : url="https://gittea.disroot.org/joborun/jobcore/attr"
# PkgSource : url="https://gittea.disroot.org/joborun-pkg/jobcore/attr"
#-----------------------------------------| DESCRIPTION |---------------------------------------
#
# toolchain build order: linux-api-headers->glibc->binutils->gcc->binutils->glibc
# toolchain build order: linux-api-headers->glibc->binutils->gcc->glibc->binutils->gcc
pkgname=binutils
pkgver=2.36.1
pkgver=2.38
pkgrel=03
pkgdesc='A set of programs to assemble and manipulate binary and object files'
arch=(x86_64)
_url='https://www.gnu.org/software/binutils/'
url='https://ftp.gnu.org/gnu/binutils'
groups=(base-devel)
depends=(glibc zlib elfutils)
makedepends=(elfutils git)
url='https://www.gnu.org/software/binutils/'
#url='https://ftp.gnu.org/gnu/binutils'
groups=( jobbot )
depends=(glibc zlib libelf)
checkdepends=(dejagnu debuginfod bc)
optdepends=('debuginfod: for debuginfod server/client functionality')
conflicts=(binutils-multilib)
replaces=(binutils-multilib)
options=(staticlibs !distcc !ccache)
#options=(staticlibs !distcc !ccache debug)
#_commit=cb5f6a3e146cc70bc2d864989386df80acec5d3e
#source=(git+https://sourceware.org/git/binutils-gdb.git#commit=$_commit)
source=($url/$pkgname-$pkgver.tar.xz{,.sig})
source=($url/$pkgname-$pkgver.tar.xz{,.sig}
fix-incorrect-undefined-symbol.patch)
prepare() {
[[ ! -d binutils-gdb ]] && ln -s binutils-$pkgver binutils-gdb
@ -34,6 +37,11 @@ prepare() {
# hack! - libiberty configure tests for header files using "$CPP $CPPFLAGS"
sed -i "/ac_cpp=/s/\$CPPFLAGS/\$CPPFLAGS -O2/" libiberty/configure
# fix incorrect "undefined reference" errors
# https://sourceware.org/bugzilla/show_bug.cgi?id=28879
patch -Np1 -i "${srcdir}"/fix-incorrect-undefined-symbol.patch
}
build() {
@ -46,29 +54,44 @@ build() {
--enable-cet \
--enable-deterministic-archives \
--enable-gold \
--enable-install-libiberty \
--enable-ld=default \
--enable-lto \
--enable-pgo-build=lto \
--enable-plugins \
--enable-relro \
--enable-shared \
--enable-targets=x86_64-pep \
--enable-threads \
--disable-gdb \
--disable-gdbserver \
--disable-libdecnumber \
--disable-readline \
--disable-sim \
--disable-werror \
--with-debuginfod \
--with-pic \
--with-system-zlib
make configure-host
make tooldir=/usr
make -O tooldir=/usr
}
check() {
cd binutils-build
# unset LDFLAGS as testsuite makes assumptions about which ones are active
# ignore failures in gold testsuite...
make -k LDFLAGS="" check || true
}
#check() {
# cd binutils-build
#
## # current testsuite failure in debuginfod (objdump)
## # https://sourceware.org/bugzilla/show_bug.cgi?id=28029
## sed -i '/test_fetch_debuglink $OBJDUMP/d' \
## $srcdir/binutils-gdb/binutils/testsuite/binutils-all/debuginfod.exp
# # Use minimal flags for testsuite
# # ld testsuite uses CFLAGS_FOR_TARGET and requires -g
# # gold testsuite requires CXXFLAGS/CFLAGS with default PIE/PIC disabled
# make -O CFLAGS_FOR_TARGET="-O2 -g" \
# CXXFLAGS="-O2 -no-pie -fno-PIC" \
# CFLAGS="-O2 -no-pie" \
# LDFLAGS="" \
# check
#}
package() {
cd binutils-build
@ -89,5 +112,6 @@ license=(GPL)
validpgpkeys=(3A24BC1E8FB409FA9F14371813FCEF89DD9E3C4F)
sha512sums=('cc24590bcead10b90763386b6f96bb027d7594c659c2d95174a6352e8b98465a50ec3e4088d0da038428abe059bbc4ae5f37b269f31a40fc048072c8a234f4e9' # binutils-2.36.1.tar.xz
'0cd2c4ab08a15ec2f195fca00e183b8dd8c024fda9be3feaa286dd0a64309f8a5e2a04127ee1ea68e08a273cd29ca31d55c9aa69147a4caea8277ad26b597816') # binutils-2.36.1.tar.xz.sig
sha256sums=(e316477a914f567eccc34d5d29785b8b0f5a10208d36bbacedcc39048ecfe024 # binutils-2.38.tar.xz
41301d67da78df1ad6df04aefe9e7bea8235484b0323cee52caa8f7435385014 # binutils-2.38.tar.xz.sig
fd33b2f8cac7561cecf3fdbb5a50fd2f2dfa6420516cbe57c47784a06fa16bf6) # fix-incorrect-undefined-symbol.patch

View File

@ -1,26 +1,29 @@
# Maintainer: Bartłomiej Piotrowski <bpiotrowski@archlinux.org>
# Contributor: Allan McRae <allan@archlinux.org>
# toolchain build order: linux-api-headers->glibc->binutils->gcc->binutils->glibc
# toolchain build order: linux-api-headers->glibc->binutils->gcc->glibc->binutils->gcc
pkgname=binutils
pkgver=2.36.1
pkgver=2.38
pkgrel=3
pkgdesc='A set of programs to assemble and manipulate binary and object files'
arch=(x86_64)
url='https://www.gnu.org/software/binutils/'
license=(GPL)
groups=(base-devel)
depends=(glibc zlib elfutils)
makedepends=(elfutils git)
depends=(glibc zlib libelf)
checkdepends=(dejagnu debuginfod bc)
optdepends=('debuginfod: for debuginfod server/client functionality')
conflicts=(binutils-multilib)
replaces=(binutils-multilib)
options=(staticlibs !distcc !ccache)
options=(staticlibs !distcc !ccache debug)
#_commit=cb5f6a3e146cc70bc2d864989386df80acec5d3e
#source=(git+https://sourceware.org/git/binutils-gdb.git#commit=$_commit)
source=(https://ftp.gnu.org/gnu/binutils/binutils-$pkgver.tar.xz{,.sig})
sha256sums=('e81d9edf373f193af428a0f256674aea62a9d74dfe93f65192d4eae030b0f3b0'
'SKIP')
source=(https://ftp.gnu.org/gnu/binutils/binutils-$pkgver.tar.xz{,.sig}
fix-incorrect-undefined-symbol.patch)
sha256sums=('e316477a914f567eccc34d5d29785b8b0f5a10208d36bbacedcc39048ecfe024'
'SKIP'
'fd33b2f8cac7561cecf3fdbb5a50fd2f2dfa6420516cbe57c47784a06fa16bf6')
validpgpkeys=(3A24BC1E8FB409FA9F14371813FCEF89DD9E3C4F)
prepare() {
@ -34,6 +37,10 @@ prepare() {
# hack! - libiberty configure tests for header files using "$CPP $CPPFLAGS"
sed -i "/ac_cpp=/s/\$CPPFLAGS/\$CPPFLAGS -O2/" libiberty/configure
# fix incorrect "undefined reference" errors
# https://sourceware.org/bugzilla/show_bug.cgi?id=28879
patch -Np1 -i "${srcdir}"/fix-incorrect-undefined-symbol.patch
}
build() {
@ -46,28 +53,39 @@ build() {
--enable-cet \
--enable-deterministic-archives \
--enable-gold \
--enable-install-libiberty \
--enable-ld=default \
--enable-lto \
--enable-pgo-build=lto \
--enable-plugins \
--enable-relro \
--enable-shared \
--enable-targets=x86_64-pep \
--enable-threads \
--disable-gdb \
--disable-gdbserver \
--disable-libdecnumber \
--disable-readline \
--disable-sim \
--disable-werror \
--with-debuginfod \
--with-pic \
--with-system-zlib
make configure-host
make tooldir=/usr
make -O tooldir=/usr
}
check() {
cd binutils-build
# unset LDFLAGS as testsuite makes assumptions about which ones are active
# ignore failures in gold testsuite...
make -k LDFLAGS="" check || true
# Use minimal flags for testsuite
# ld testsuite uses CFLAGS_FOR_TARGET and requires -g
# gold testsuite requires CXXFLAGS/CFLAGS with default PIE/PIC disabled
make -O CFLAGS_FOR_TARGET="-O2 -g" \
CXXFLAGS="-O2 -no-pie -fno-PIC" \
CFLAGS="-O2 -no-pie" \
LDFLAGS="" \
check
}
package() {

View File

@ -0,0 +1,84 @@
# Maintainer: Bartłomiej Piotrowski <bpiotrowski@archlinux.org>
# Contributor: Allan McRae <allan@archlinux.org>
# toolchain build order: linux-api-headers->glibc->binutils->gcc->glibc->binutils->gcc
pkgname=binutils
pkgver=2.38
pkgrel=1
pkgdesc='A set of programs to assemble and manipulate binary and object files'
arch=(x86_64)
url='https://www.gnu.org/software/binutils/'
license=(GPL)
groups=(base-devel)
depends=(glibc zlib elfutils)
makedepends=(elfutils git)
conflicts=(binutils-multilib)
replaces=(binutils-multilib)
options=(staticlibs !distcc !ccache)
#_commit=cb5f6a3e146cc70bc2d864989386df80acec5d3e
#source=(git+https://sourceware.org/git/binutils-gdb.git#commit=$_commit)
source=(https://ftp.gnu.org/gnu/binutils/binutils-$pkgver.tar.xz{,.sig})
sha256sums=('e316477a914f567eccc34d5d29785b8b0f5a10208d36bbacedcc39048ecfe024'
'SKIP')
validpgpkeys=(3A24BC1E8FB409FA9F14371813FCEF89DD9E3C4F)
prepare() {
[[ ! -d binutils-gdb ]] && ln -s binutils-$pkgver binutils-gdb
mkdir -p binutils-build
cd binutils-gdb
# Turn off development mode (-Werror, gas run-time checks, date in sonames)
sed -i '/^development=/s/true/false/' bfd/development.sh
# hack! - libiberty configure tests for header files using "$CPP $CPPFLAGS"
sed -i "/ac_cpp=/s/\$CPPFLAGS/\$CPPFLAGS -O2/" libiberty/configure
}
build() {
cd binutils-build
"$srcdir/binutils-gdb/configure" \
--prefix=/usr \
--with-lib-path=/usr/lib:/usr/local/lib \
--with-bugurl=https://bugs.archlinux.org/ \
--enable-cet \
--enable-deterministic-archives \
--enable-gold \
--enable-ld=default \
--enable-lto \
--enable-plugins \
--enable-relro \
--enable-targets=x86_64-pep \
--enable-threads \
--disable-gdb \
--disable-werror \
--with-debuginfod \
--with-pic \
--with-system-zlib
make -O configure-host
make -O tooldir=/usr
}
check() {
cd binutils-build
# unset LDFLAGS as testsuite makes assumptions about which ones are active
# ignore failures in gold testsuite...
make -O -k LDFLAGS="" check || true
}
package() {
cd binutils-build
make prefix="$pkgdir/usr" tooldir="$pkgdir/usr" install
# Remove unwanted files
rm -f "$pkgdir"/usr/share/man/man1/{dlltool,nlmconv,windres,windmc}*
# No shared linking to these files outside binutils
rm -f "$pkgdir"/usr/lib/lib{bfd,opcodes}.so
echo 'INPUT( /usr/lib/libbfd.a -liberty -lz -ldl )' > "$pkgdir/usr/lib/libbfd.so"
echo 'INPUT( /usr/lib/libopcodes.a -lbfd )' > "$pkgdir/usr/lib/libopcodes.so"
}

View File

@ -1 +1 @@
rm -rvf {pkg,src,*xz*}
rm -rvf {pkg,src,*tar.xz*}

View File

@ -1 +1,3 @@
git
dejagnu
debuginfod
bc

View File

@ -0,0 +1,114 @@
From 20ea3acc727f3be6322dfbd881e506873535231d Mon Sep 17 00:00:00 2001
From: "H.J. Lu" <hjl.tools@gmail.com>
Date: Fri, 11 Feb 2022 15:13:19 -0800
Subject: [PATCH] ld: Keep indirect symbol from IR if referenced from shared
object
Don't change indirect symbol defined in IR to undefined if it is
referenced from shared object.
bfd/
PR ld/28879
* elflink.c (_bfd_elf_merge_symbol): Don't change indirect
symbol defined in IR to undefined if it is referenced from
shared object.
ld/
PR ld/28879
* testsuite/ld-plugin/lto.exp: Run PR ld/28879 tests.
* testsuite/ld-plugin/pr28879a.cc: New file.
* testsuite/ld-plugin/pr28879b.cc: Likewise.
---
bfd/elflink.c | 5 ++---
ld/testsuite/ld-plugin/lto.exp | 26 ++++++++++++++++++++++++++
ld/testsuite/ld-plugin/pr28879a.cc | 7 +++++++
ld/testsuite/ld-plugin/pr28879b.cc | 8 ++++++++
4 files changed, 43 insertions(+), 3 deletions(-)
create mode 100644 ld/testsuite/ld-plugin/pr28879a.cc
create mode 100644 ld/testsuite/ld-plugin/pr28879b.cc
diff --git a/bfd/elflink.c b/bfd/elflink.c
index 6fa18d92007..f8521426cad 100644
--- a/bfd/elflink.c
+++ b/bfd/elflink.c
@@ -1294,9 +1294,8 @@ _bfd_elf_merge_symbol (bfd *abfd,
h->root.non_ir_ref_dynamic = true;
hi->root.non_ir_ref_dynamic = true;
}
-
- if ((oldbfd->flags & BFD_PLUGIN) != 0
- && hi->root.type == bfd_link_hash_indirect)
+ else if ((oldbfd->flags & BFD_PLUGIN) != 0
+ && hi->root.type == bfd_link_hash_indirect)
{
/* Change indirect symbol from IR to undefined. */
hi->root.type = bfd_link_hash_undefined;
diff --git a/ld/testsuite/ld-plugin/lto.exp b/ld/testsuite/ld-plugin/lto.exp
index a70a84562b8..64b880265ee 100644
--- a/ld/testsuite/ld-plugin/lto.exp
+++ b/ld/testsuite/ld-plugin/lto.exp
@@ -471,6 +471,32 @@ set lto_link_elf_tests [list \
[list {pr27441c.so} \
{-shared -fPIC -Wl,--as-needed tmpdir/pr27441c.o tmpdir/pr27441b.so tmpdir/pr27441a.so} {-fPIC} \
{dummy.c} {{readelf {-dW} pr27441c.d}} {pr27441c.so}] \
+ [list \
+ "Build libpr28879a.so" \
+ "-shared" \
+ "-O0 -fpic" \
+ {pr28879a.cc} \
+ {} \
+ "libpr28879a.so" \
+ "c++" \
+ ] \
+ [list \
+ "Build libpr28879b.so" \
+ "-shared -Wl,--no-as-needed tmpdir/libpr28879a.so" \
+ "-O2 -fpic" \
+ {dummy.c} \
+ {} \
+ "libpr28879b.so" \
+ ] \
+ [list \
+ "Build pr28879" \
+ "-Wl,--no-as-needed tmpdir/libpr28879b.so -Wl,-rpath-link,." \
+ "-O0 -flto -D_GLIBCXX_ASSERTIONS" \
+ {pr28879b.cc} \
+ {} \
+ "pr28879" \
+ "c++" \
+ ] \
]
# PR 14918 checks that libgcc is not spuriously included in a shared link of
diff --git a/ld/testsuite/ld-plugin/pr28879a.cc b/ld/testsuite/ld-plugin/pr28879a.cc
new file mode 100644
index 00000000000..8307a42e2fb
--- /dev/null
+++ b/ld/testsuite/ld-plugin/pr28879a.cc
@@ -0,0 +1,7 @@
+#include <string>
+
+void
+func (std::string *s)
+{
+ delete s;
+}
diff --git a/ld/testsuite/ld-plugin/pr28879b.cc b/ld/testsuite/ld-plugin/pr28879b.cc
new file mode 100644
index 00000000000..02fc351366c
--- /dev/null
+++ b/ld/testsuite/ld-plugin/pr28879b.cc
@@ -0,0 +1,8 @@
+#include <string>
+
+int
+main (void)
+{
+ std::string header;
+ return 0;
+}
--
2.35.1

View File

@ -2,3 +2,8 @@ real 2m47.361s
user 9m4.310s
sys 0m34.455s
real 2m47.361s
user 9m4.310s
sys 0m34.455s

View File

@ -1,7 +1,7 @@
#!/usr/bin/bash
# JOBoRun : Jwm OpenBox Obarun RUNit
# Maintainer : Joe Bo Run <joborun@disroot.org>
# PkgSource : url="https://gittea.disroot.org/joborun/jobcore/$pkgname"
# PkgSource : url="https://gittea.disroot.org/joborun-pkg/jobcore/$pkgname"
#-----------------------------------------| DESCRIPTION |---------------------------------------
pkgname=bison

View File

@ -1,7 +1,7 @@
#!/usr/bin/bash
# JOBoRun : Jwm OpenBox Obarun RUNit
# Maintainer : Joe Bo Run <joborun@disroot.org>
# PkgSource : url="https://gittea.disroot.org/joborun/jobcore/$pkgname"
# PkgSource : url="https://gittea.disroot.org/joborun-pkg/jobcore/$pkgname"
#-----------------------------------------| DESCRIPTION |---------------------------------------
pkgname=boot-66serv

View File

@ -1,7 +1,7 @@
#!/usr/bin/bash
# JOBoRun : Jwm OpenBox Obarun RUNit
# Maintainer : Joe Bo Run <joborun@disroot.org>
# PkgSource : url="https://gittea.disroot.org/joborun/jobcore/$pkgname"
# PkgSource : url="https://gittea.disroot.org/joborun-pkg/jobcore/$pkgname"
#-----------------------------------------| DESCRIPTION |---------------------------------------
pkgname=bootlogd

View File

@ -1,7 +1,7 @@
#!/usr/bin/bash
# JOBoRun : Jwm OpenBox Obarun RUNit
# Maintainer : Joe Bo Run <joborun@disroot.org>
# PkgSource : url="https://gittea.disroot.org/joborun/jobcore/attr"
# PkgSource : url="https://gittea.disroot.org/joborun-pkg/jobcore/attr"
#-----------------------------------------| DESCRIPTION |---------------------------------------
pkgbase=brotli

View File

@ -1,11 +1,11 @@
#!/usr/bin/bash
# JOBoRun : Jwm OpenBox Obarun RUNit
# Maintainer : Joe Bo Run <joborun@disroot.org>
# PkgSource : url="https://gittea.disroot.org/joborun/jobcore/$pkgname"
# PkgSource : url="https://gittea.disroot.org/joborun-pkg/jobcore/$pkgname"
#-----------------------------------------| DESCRIPTION |---------------------------------------
pkgname=btrfs-progs
pkgver=5.16
pkgver=5.16.1
pkgrel=01
pkgdesc='Btrfs filesystem utilities'
arch=('x86_64')
@ -67,7 +67,7 @@ license=('GPL2')
validpgpkeys=('F2B41200C54EFB30380C1756C565D5F9D76D583B')
sha256sums=(fcd74c6838541f653fe4c7df4ad535a40dd11ac4444f98842782bf9e79720a71 # btrfs-progs-v5.16.tar.sign
38ab3cd19d4156226cacd6926972f866a77b76ec3b9677d9888efb9530a31833 # btrfs-progs-v5.16.tar.xz
sha256sums=(660c57e6feedfaa7c7573b75cfa9e98d72cf17fdd229b510446caa22f0eb2ef5 # btrfs-progs-v5.16.1.tar.sign
3da4da5361cf86bddda80edb4c4f30ea076cb4ebec29904fa08afc930ef9e1a8 # btrfs-progs-v5.16.1.tar.xz
bbe60b35d1b1e2efc1308a8f54f1fdc6808240a81c5f5b4d75321b7ee86e41f4 # initcpio-install-btrfs
35efeee8590d6d60c711ae9cdc918e4841ab61d10cb02359e65e36ebff95ffc5) # initcpio-hook-btrfs

View File

@ -3,7 +3,7 @@
# Contributor: Tobias Powalowski <tpowa@archlinux.org>
pkgname=btrfs-progs
pkgver=5.16
pkgver=5.16.1
pkgrel=1
pkgdesc='Btrfs filesystem utilities'
arch=('x86_64')
@ -26,7 +26,7 @@ source=("https://www.kernel.org/pub/linux/kernel/people/kdave/btrfs-progs/btrfs-
install=btrfs-progs.install
options=(!staticlibs)
sha256sums=('SKIP'
'38ab3cd19d4156226cacd6926972f866a77b76ec3b9677d9888efb9530a31833'
'3da4da5361cf86bddda80edb4c4f30ea076cb4ebec29904fa08afc930ef9e1a8'
'bbe60b35d1b1e2efc1308a8f54f1fdc6808240a81c5f5b4d75321b7ee86e41f4'
'35efeee8590d6d60c711ae9cdc918e4841ab61d10cb02359e65e36ebff95ffc5'
'eaa7af92d28bfa8940bb551560fd7be777f9f175292eaa72b5f6ef00fb240252'

View File

@ -1,7 +1,7 @@
#!/usr/bin/bash
# JOBoRun : Jwm OpenBox Obarun RUNit
# Maintainer : Joe Bo Run <joborun@disroot.org>
# PkgSource : url="https://gittea.disroot.org/joborun/jobcore/attr"
# PkgSource : url="https://gittea.disroot.org/joborun-pkg/jobcore/attr"
#-----------------------------------------| DESCRIPTION |---------------------------------------
pkgname=bzip2

View File

@ -1,7 +1,7 @@
#!/usr/bin/bash
# JOBoRun : Jwm OpenBox Obarun RUNit
# Maintainer : Joe Bo Run <joborun@disroot.org>
# PkgSource : url="https://gittea.disroot.org/joborun/jobcore/$pkgname"
# PkgSource : url="https://gittea.disroot.org/joborun-pkg/jobcore/$pkgname"
#-----------------------------------------| DESCRIPTION |---------------------------------------
pkgbase=ca-certificates

View File

@ -1,7 +1,7 @@
#!/usr/bin/bash
# JOBoRun : Jwm OpenBox Obarun RUNit
# Maintainer : Joe Bo Run <joborun@disroot.org>
# PkgSource : url="https://gittea.disroot.org/joborun/jobcore/coreutils"
# PkgSource : url="https://gittea.disroot.org/joborun-pkg/jobcore/coreutils"
#-----------------------------------------| DESCRIPTION |---------------------------------------
pkgname=coreutils

View File

@ -1,7 +1,7 @@
#!/usr/bin/bash
# JOBoRun : Jwm OpenBox Obarun RUNit
# Maintainer : Joe Bo Run <joborun@disroot.org>
# PkgSource : url="https://gittea.disroot.org/joborun/jobcore/$pkgname"
# PkgSource : url="https://gittea.disroot.org/joborun-pkg/jobcore/$pkgname"
#-----------------------------------------| DESCRIPTION |---------------------------------------
pkgname=cracklib

View File

@ -1,7 +1,7 @@
#!/usr/bin/bash
# JOBoRun : Jwm OpenBox Obarun RUNit
# Maintainer : Joe Bo Run <joborun@disroot.org>
# PkgSource : url="https://gittea.disroot.org/joborun/jobcore/$pkgname"
# PkgSource : url="https://gittea.disroot.org/joborun-pkg/jobcore/$pkgname"
#-----------------------------------------| DESCRIPTION |---------------------------------------
pkgname=crda

View File

@ -1,7 +1,7 @@
#!/usr/bin/bash
# JOBoRun : Jwm OpenBox Obarun RUNit
# Maintainer : Joe Bo Run <joborun@disroot.org>
# PkgSource : url="https://gittea.disroot.org/joborun/jobcore/$pkgname"
# PkgSource : url="https://gittea.disroot.org/joborun-pkg/jobcore/$pkgname"
#-----------------------------------------| DESCRIPTION |---------------------------------------
pkgname='cronie'

View File

@ -1,12 +1,12 @@
#!/usr/bin/bash
# JOBoRun : Jwm OpenBox Obarun RUNit
# Maintainer : Joe Bo Run <joborun@disroot.org>
# PkgSource : url="https://gittea.disroot.org/joborun/jobcore/$pkgname"
# PkgSource : url="https://gittea.disroot.org/joborun-pkg/jobcore/$pkgname"
#-----------------------------------------| DESCRIPTION |---------------------------------------
pkgname=cryptsetup
pkgver=2.4.3
pkgrel=01
pkgrel=02
pkgdesc='Userspace setup tool for transparent encryption of block devices using dm-crypt'
arch=(x86_64)
url='https://gitlab.com/cryptsetup/cryptsetup/'
@ -14,6 +14,7 @@ depends=('device-mapper' 'libdevmapper.so' 'openssl' 'popt' 'util-linux-libs'
'libuuid.so' 'json-c' 'libjson-c.so' 'argon2' 'libargon2.so')
makedepends=('util-linux')
provides=('libcryptsetup.so')
#options=('debug' '!emptydirs')
options=('!emptydirs')
source=("https://www.kernel.org/pub/linux/utils/cryptsetup/v${pkgver%.*}/${pkgname}-${pkgver}.tar."{xz,sign}
'hooks-encrypt'

View File

@ -3,7 +3,7 @@
pkgname=cryptsetup
pkgver=2.4.3
pkgrel=1
pkgrel=2
pkgdesc='Userspace setup tool for transparent encryption of block devices using dm-crypt'
arch=(x86_64)
license=('GPL')
@ -12,7 +12,7 @@ depends=('device-mapper' 'libdevmapper.so' 'openssl' 'popt' 'util-linux-libs'
'libuuid.so' 'json-c' 'libjson-c.so' 'argon2' 'libargon2.so')
makedepends=('util-linux')
provides=('libcryptsetup.so')
options=('!emptydirs')
options=('debug' '!emptydirs')
validpgpkeys=('2A2918243FDE46648D0686F9D9B0577BD93E98FC') # Milan Broz <gmazyland@gmail.com>
source=("https://www.kernel.org/pub/linux/utils/cryptsetup/v${pkgver%.*}/${pkgname}-${pkgver}.tar."{xz,sign}
'hooks-encrypt'

View File

@ -1,7 +1,7 @@
#!/usr/bin/bash
# JOBoRun : Jwm OpenBox Obarun RUNit
# Maintainer : Joe Bo Run <joborun@disroot.org>
# PkgSource : url="https://gittea.disroot.org/joborun/jobcore/$pkgname"
# PkgSource : url="https://gittea.disroot.org/joborun-pkg/jobcore/$pkgname"
#-----------------------------------------| DESCRIPTION |---------------------------------------
pkgname=curl

View File

@ -1,7 +1,7 @@
#!/usr/bin/bash
# JOBoRun : Jwm OpenBox Obarun RUNit
# Maintainer : Joe Bo Run <joborun@disroot.org>
# PkgSource : url="https://gittea.disroot.org/joborun/jobcore/$pkgname"
# PkgSource : url="https://gittea.disroot.org/joborun-pkg/jobcore/$pkgname"
#-----------------------------------------| DESCRIPTION |---------------------------------------
pkgname=dash

View File

@ -1,7 +1,7 @@
#!/usr/bin/bash
# JOBoRun : Jwm OpenBox Obarun RUNit
# Maintainer : Joe Bo Run <joborun@disroot.org>
# PkgSource : url="https://gittea.disroot.org/joborun/jobcore/$pkgname"
# PkgSource : url="https://gittea.disroot.org/joborun-pkg/jobcore/$pkgname"
#-----------------------------------------| DESCRIPTION |---------------------------------------
pkgname=db
@ -9,6 +9,7 @@ pkgver=5.3.28
pkgrel=05
pkgdesc="The Berkeley DB embedded database system"
arch=('x86_64')
groups=( jobbot )
url="https://www.oracle.com/technology/software/products/berkeley-db/index.html"
depends=('gcc-libs' 'sh')
source=(https://download.oracle.com/berkeley-db/db-${pkgver}.tar.gz atomic.patch)

View File

@ -1,7 +1,7 @@
#!/usr/bin/bash
# JOBoRun : Jwm OpenBox Obarun RUNit
# Maintainer : Joe Bo Run <joborun@disroot.org>
# PkgSource : url="https://gittea.disroot.org/joborun/jobcore/$pkgname"
# PkgSource : url="https://gittea.disroot.org/joborun-pkg/jobcore/$pkgname"
#-----------------------------------------| DESCRIPTION |---------------------------------------
pkgbase=dbus

View File

@ -1,7 +1,7 @@
#!/usr/bin/bash
# JOBoRun : Jwm OpenBox Obarun RUNit
# Maintainer : Joe Bo Run <joborun@disroot.org>
# PkgSource : url="https://gittea.disroot.org/joborun/jobcore/$pkgname"
# PkgSource : url="https://gittea.disroot.org/joborun-pkg/jobcore/$pkgname"
#-----------------------------------------| DESCRIPTION |---------------------------------------
pkgbase=dhcp

View File

@ -1,7 +1,7 @@
#!/usr/bin/bash
# JOBoRun : Jwm OpenBox Obarun RUNit
# Maintainer : Joe Bo Run <joborun@disroot.org>
# PkgSource : url="https://gittea.disroot.org/joborun/jobcore/$pkgname"
# PkgSource : url="https://gittea.disroot.org/joborun-pkg/jobcore/$pkgname"
#-----------------------------------------| DESCRIPTION |---------------------------------------
pkgname=dhcpcd

View File

@ -1,7 +1,7 @@
#!/usr/bin/bash
# JOBoRun : Jwm OpenBox Obarun RUNit
# Maintainer : Joe Bo Run <joborun@disroot.org>
# PkgSource : url="https://gittea.disroot.org/joborun/jobcore/$pkgname"
# PkgSource : url="https://gittea.disroot.org/joborun-pkg/jobcore/$pkgname"
#-----------------------------------------| DESCRIPTION |---------------------------------------
pkgname=dialog

View File

@ -1,7 +1,7 @@
#!/usr/bin/bash
# JOBoRun : Jwm OpenBox Obarun RUNit
# Maintainer : Joe Bo Run <joborun@disroot.org>
# PkgSource : url="https://gittea.disroot.org/joborun/jobcore/diffutils"
# PkgSource : url="https://gittea.disroot.org/joborun-pkg/jobcore/diffutils"
#-----------------------------------------| DESCRIPTION |---------------------------------------
pkgname=diffutils
@ -9,6 +9,7 @@ pkgver=3.8
pkgrel=01
pkgdesc='Utility programs used for creating patch files'
arch=('x86_64')
groups=( jobbot )
url='https://www.gnu.org/software/diffutils'
depends=('glibc' 'bash')
source=("https://ftp.gnu.org/gnu/$pkgname/$pkgname-$pkgver.tar.xz"{,.sig})

View File

@ -1,7 +1,7 @@
#!/usr/bin/bash
# JOBoRun : Jwm OpenBox Obarun RUNit
# Maintainer : Joe Bo Run <joborun@disroot.org>
# PkgSource : url="https://gittea.disroot.org/joborun/jobcore/$pkgname"
# PkgSource : url="https://gittea.disroot.org/joborun-pkg/jobcore/$pkgname"
#-----------------------------------------| DESCRIPTION |---------------------------------------
pkgname=ding-libs

69
dmraid/PKGBUILD Normal file
View File

@ -0,0 +1,69 @@
#!/usr/bin/bash
# JOBoRun : Jwm OpenBox Obarun RUNit
# Maintainer : Joe Bo Run <joborun@disroot.org>
# PkgSource : url="https://gittea.disroot.org/joborun/jobcore/$pkgname"
#-----------------------------------------| DESCRIPTION |---------------------------------------
pkgname=dmraid
pkgver=1.0.0.rc16.3
_pkgver=1.0.0.rc16-3 ## source has - not allowed for pkgver
pkgrel=013
pkgdesc="Device mapper RAID interface"
url="https://people.redhat.com/~heinzm/sw/dmraid"
conflicts=('mkinitcpio<0.7')
depends=('device-mapper>=2.0.54')
arch=('x86_64')
source=($url/src/$pkgname-$_pkgver.tar.bz2
dmraid_install
dmraid_hook
dmraid_tmpfiles)
install=dmraid.install
# As I get a security format error on my build I am turning those flags off
# just as arch does on gcc and elsewhere
#
prepare() {
cd "$pkgname/$_pkgver/$pkgname/"
CFLAGS=${CFLAGS/-Werror=format-security/} # https://bugs.archlinux.org/task/70701
CXXFLAGS=${CXXFLAGS/-Werror=format-security/}
}
build() {
cd "$pkgname/$_pkgver/$pkgname/"
./configure \
prefix=/usr \
sbindir=/usr/bin \
libdir=/usr/lib \
mandir=/usr/share/man \
includedir=/usr/include \
--enable-led \
--enable-intel_led
make
}
package() {
cd "$pkgname/$_pkgver/$pkgname/"
make DESTDIR="$pkgdir" sbindir=/usr/bin prefix=/usr libdir=/usr/lib mandir=/usr/share/man includedir=/usr/include install
install -D -m644 "$srcdir"/dmraid_install "$pkgdir"/usr/lib/initcpio/install/dmraid
install -D -m644 "$srcdir"/dmraid_hook "$pkgdir"/usr/lib/initcpio/hooks/dmraid
install -D -m644 "$srcdir"/dmraid_tmpfiles "$pkgdir"/usr/lib/tmpfiles.d/dmraid.conf
# fix permissions
chmod 644 "$pkgdir"/usr/include/dmraid/* "$pkgdir"/usr/lib/libdmraid.a
}
#---- license gpg-key sha256sums ----
license=('GPL')
sha256sums=(93421bd169d71ff5e7d2db95b62b030bfa205a12010b6468dcdef80337d6fbd8 # dmraid-1.0.0.rc16-3.tar.bz2
6e74f7e1d66fbe5fc41560dfebb327eb31eb3104fec09985e388c2fe252d6575 # dmraid_install
e74cdc82b59160d079594ce082980a3ae3561b5f6ecbdfdd30b7497b76373a2b # dmraid_hook
f00fa4462d83553d2fb769159a019b4d4898634e52b4a9bf796fe52b3b97f0cc) # dmraid_tmpfiles

43
dmraid/PKGBUILD-arch Normal file
View File

@ -0,0 +1,43 @@
# Maintainer: Tobias Powalowski <tpowa@archlinux.org>
#Contributor: Urs Wolfer <uwolfer @ fwo.ch>
pkgname=dmraid
pkgver=1.0.0.rc16.3
pkgrel=13
pkgdesc="Device mapper RAID interface"
url="https://people.redhat.com/~heinzm/sw/dmraid/"
conflicts=('mkinitcpio<0.7')
depends=('device-mapper>=2.0.54')
arch=('x86_64')
license=('GPL')
source=(#https://sources.archlinux.org/other/dmraid/$pkgname-$pkgver.tar.bz2
https://people.redhat.com/~heinzm/sw/dmraid/src/$pkgname-1.0.0.rc16-3.tar.bz2
dmraid_install
dmraid_hook
dmraid_tmpfiles
dmraid.service)
install=dmraid.install
md5sums=('819338fcef98e8e25819f0516722beeb'
'7a040ebcba305aba1e47dfe6ca8323b5'
'faec669dc85f87187b45b5d3968efe2c'
'56a8bb0ece8d206cd8efb504ee072ddd'
'ea6d280fc6f63fb799abcd882bca53c8')
build() {
cd "$pkgname/1.0.0.rc16-3/$pkgname"
./configure --enable-led --enable-intel_led
make -j1
}
package() {
cd "$pkgname/1.0.0.rc16-3/$pkgname"
make DESTDIR="$pkgdir" sbindir=/usr/bin prefix=/usr libdir=/usr/lib mandir=/usr/share/man includedir=/usr/include install
install -D -m644 "$srcdir"/dmraid_install "$pkgdir"/usr/lib/initcpio/install/dmraid
install -D -m644 "$srcdir"/dmraid_hook "$pkgdir"/usr/lib/initcpio/hooks/dmraid
install -D -m644 "$srcdir"/dmraid_tmpfiles "$pkgdir"/usr/lib/tmpfiles.d/dmraid.conf
# fix permissions
chmod 644 "$pkgdir"/usr/include/dmraid/* "$pkgdir"/usr/lib/libdmraid.a
install -Dm644 "$srcdir/dmraid.service" "$pkgdir/usr/lib/systemd/system/dmraid.service"
}

71
dmraid/PKGBUILD-oba Normal file
View File

@ -0,0 +1,71 @@
# Obarun : 66 init/supervisor
# Maintainer : Eric Vidal <eric@obarun.org>
# Maintainer : Jean-Michel T.Dydak <jean-michel@obarun.org>
# Obarun PkgSrc : https://git.obarun.org/pkg/obcore/dmraid/
#----------------
# Maintainer : Tobias Powalowski <tpowa@archlinux.org>
# Contributor : Urs Wolfer <uwolfer @ fwo.ch>
# Arch PkrSrc : https://www.archlinux.org/packages/core/x86_64/dmraid/
#-----------------------------------------------------------------------
# Website : http://people.redhat.com/~heinzm/sw/dmraid/
#-----------------------------------------------------------------------
pkgname=dmraid
pkgver=1.0.0.rc16.3
pkgrel=13
pkgdesc="Device mapper RAID interface"
arch=('x86_64')
url="https://people.redhat.com/~heinzm/sw/dmraid/src"
license=('GPL')
source=($url/$pkgname-${pkgver/%.3/-3}.tar.bz2
'dmraid_install'
'dmraid_hook')
install=$pkgname.install
conflicts=(
'mkinitcpio<0.7')
depends=(
'device-mapper>=2.0.54')
#--BUILD CONTROL--------------------------------------------------------
path=(
prefix=/usr
sbindir=/usr/bin
libdir=/usr/lib
mandir=/usr/share/man
includedir=/usr/include
)
flags=(
--enable-led
--enable-intel_led
)
#-----------------------------------------------------------------------
build() {
cd $pkgname/${pkgver/%.3/-3}/$pkgname
./configure "${flags[@]}"
make
}
package() {
cd $pkgname/${pkgver/%.3/-3}/$pkgname
make DESTDIR="$pkgdir" "${path[@]}" install
install -D -m0644 "$srcdir"/dmraid_install "$pkgdir"/usr/lib/initcpio/install/dmraid
install -D -m0644 "$srcdir"/dmraid_hook "$pkgdir"/usr/lib/initcpio/hooks/dmraid
## fix permissions
chmod 644 "$pkgdir"/usr/include/dmraid/* "$pkgdir"/usr/lib/libdmraid.a
}
#-----------------------------------------------------------------------
sha512sums=('7c45e5117adc52fc2094b1b2bad4f4c518a46317a2196611966d72085ba3587c4ac8d1080f9d934888c01788f2b2d3d621c6f0d3e2a023c0fb1f9f3fa7fc127e'
'072a146ef843ab3835f4476db5d7891bd718d477b22cbea6dc563487711f91cad227051a25e67528924cd247b0873f4726e33504bc42967344b575972d944a11'
'47dee44d1ad80ed24209e3a39fa58bdf1363a691b160e17586da7034ecf71b03e992955fb24b286898f226948db3198a5fbdb71b5f3bf242bd71a114bcca76ed')

1
dmraid/clean Normal file
View File

@ -0,0 +1 @@
rm -rvf {src,pkg,*tar.bz2}

1
dmraid/deps Normal file
View File

@ -0,0 +1 @@
device-mapper

14
dmraid/dmraid.install Normal file
View File

@ -0,0 +1,14 @@
post_upgrade() {
if [ "$(vercmp $2 1.0.0.rc15)" -lt 0 ]; then
# important upgrade notice
echo ">>>"
echo ">>> IMPORTANT DMRAID UPGRADE NOTICE"
echo ">>> -------------------------------"
echo ">>> Version 1.0.0.rc15 and greater introduce a new name scheme:"
echo ">>> You need to add an additional 'p' in front of your number."
echo ">>> e.g. <yourname><number> --> <yourname>p<number>"
echo ">>> firsthd1 --> firsthdp1"
echo ">>> Please change your bootloader and fstab accordingly."
echo ">>>"
fi
}

14
dmraid/dmraid_hook Normal file
View File

@ -0,0 +1,14 @@
#!/usr/bin/ash
run_hook() {
modprobe -a -q dm-mod dm-mirror >/dev/null 2>&1
msg ":: Activating dmraid arrays..."
# prevent any event monitoring calls with -I
if [ "$quiet" = "y" ]; then
dmraid -ay -I -Z >/dev/null
else
dmraid -ay -I -Z
fi
}
# vim: set ft=sh ts=4 sw=4 et:

24
dmraid/dmraid_install Normal file
View File

@ -0,0 +1,24 @@
#!/bin/bash
build() {
add_module 'dm-mod'
add_module 'dm-mirror'
add_binary 'dmraid'
add_binary 'dmsetup'
add_file "/usr/lib/device-mapper/libdmraid-events-isw.so"
add_file "/usr/lib/udev/rules.d/10-dm.rules"
add_file "/usr/lib/udev/rules.d/13-dm-disk.rules"
add_file "/usr/lib/udev/rules.d/95-dm-notify.rules"
add_file "/usr/lib/initcpio/udev/11-dm-initramfs.rules" "/usr/lib/udev/rules.d/11-dm-initramfs.rules"
add_runscript
}
help() {
cat <<HELPEOF
This hook loads the necessary modules for a dmraid root device.
HELPEOF
}
# vim: set ft=sh ts=4 sw=4 et:

1
dmraid/dmraid_tmpfiles Normal file
View File

@ -0,0 +1 @@
d /run/lock/dmraid 1777 root root

5
dmraid/time Normal file
View File

@ -0,0 +1,5 @@
real 0m17.219s
user 0m12.924s
sys 0m3.021s

View File

@ -1,7 +1,7 @@
#!/usr/bin/bash
# JOBoRun : Jwm OpenBox Obarun RUNit
# Maintainer : Joe Bo Run <joborun@disroot.org>
# PkgSource : url="https://gittea.disroot.org/joborun/jobcore/$pkgname"
# PkgSource : url="https://gittea.disroot.org/joborun-pkg/jobcore/$pkgname"
#-----------------------------------------| DESCRIPTION |---------------------------------------
pkgname=dnssec-anchors

View File

@ -1,7 +1,7 @@
#!/usr/bin/bash
# JOBoRun : Jwm OpenBox Obarun RUNit
# Maintainer : Joe Bo Run <joborun@disroot.org>
# PkgSource : url="https://gittea.disroot.org/joborun/jobcore/$pkgname"
# PkgSource : url="https://gittea.disroot.org/joborun-pkg/jobcore/$pkgname"
#-----------------------------------------| DESCRIPTION |---------------------------------------
pkgname=dosfstools

View File

@ -1,13 +1,13 @@
#!/usr/bin/bash
# JOBoRun : Jwm OpenBox Obarun RUNit
# Maintainer : Joe Bo Run <joborun@disroot.org>
# PkgSource : url="https://gittea.disroot.org/joborun/jobcore/$pkgname"
# PkgSource : url="https://gittea.disroot.org/joborun-pkg/jobcore/$pkgname"
#-----------------------------------------| DESCRIPTION |---------------------------------------
pkgbase=e2fsprogs
pkgname=('e2fsprogs' 'fuse2fs')
pkgver=1.46.5
pkgrel=02
pkgrel=03
pkgdesc='Ext2/3/4 filesystem utilities'
arch=('x86_64')
url='http://e2fsprogs.sourceforge.net'
@ -49,7 +49,8 @@ package_e2fsprogs() {
'libe2p.so'
'libext2fs.so'
'libss.so')
backup=('etc/mke2fs.conf')
backup=('etc/mke2fs.conf'
'etc/e2scrub.conf')
unset MAKEFLAGS

View File

@ -4,7 +4,7 @@
pkgbase=e2fsprogs
pkgname=('e2fsprogs' 'fuse2fs')
pkgver=1.46.5
pkgrel=2
pkgrel=3
pkgdesc='Ext2/3/4 filesystem utilities'
arch=('x86_64')
license=('GPL' 'LGPL' 'MIT')
@ -52,7 +52,8 @@ package_e2fsprogs() {
'libe2p.so'
'libext2fs.so'
'libss.so')
backup=('etc/mke2fs.conf')
backup=('etc/mke2fs.conf'
'etc/e2scrub.conf')
unset MAKEFLAGS

View File

@ -0,0 +1,91 @@
# Maintainer: Ronald van Haren <ronald.archlinux.org>
# Contributor: judd <jvinet@zeroflux.org>
pkgbase=e2fsprogs
pkgname=('e2fsprogs' 'fuse2fs')
pkgver=1.46.5
pkgrel=3
pkgdesc='Ext2/3/4 filesystem utilities'
arch=('x86_64')
license=('GPL' 'LGPL' 'MIT')
url='http://e2fsprogs.sourceforge.net'
options=('debug')
makedepends=('systemd' 'util-linux' 'fuse')
validpgpkeys=('3AB057B7E78D945C8C5591FBD36F769BC11804F0') # Theodore Ts'o <tytso@mit.edu>
source=("https://www.kernel.org/pub/linux/kernel/people/tytso/${pkgbase}/v${pkgver}/${pkgbase}-${pkgver}.tar."{xz,sign}
'MIT-LICENSE')
sha256sums=('2f16c9176704cf645dc69d5b15ff704ae722d665df38b2ed3cfc249757d8d81e'
'SKIP'
'cc45386c1d71f438ad648fd7971e49e3074ad9dbacf9dd3a5b4cb61fd294ecbb')
prepare() {
cd "${srcdir}/${pkgbase}-${pkgver}"
# Remove unnecessary init.d directory
sed -i '/init\.d/s|^|#|' misc/Makefile.in
}
build() {
cd "${srcdir}/${pkgbase}-${pkgver}"
./configure \
--prefix=/usr \
--with-root-prefix='' \
--libdir=/usr/lib \
--sbindir=/usr/bin \
--enable-elf-shlibs \
--disable-fsck \
--disable-uuidd \
--disable-libuuid \
--disable-libblkid
make
# regenerate locale files
find po/ -name '*.gmo' -delete
make -C po update-gmo
}
package_e2fsprogs() {
depends=('sh' 'util-linux-libs')
provides=('libcom_err.so'
'libe2p.so'
'libext2fs.so'
'libss.so')
backup=('etc/mke2fs.conf'
'etc/e2scrub.conf')
unset MAKEFLAGS
cd "${srcdir}/${pkgbase}-${pkgver}"
make DESTDIR="${pkgdir}" install install-libs
sed -i -e 's/^AWK=.*/AWK=awk/' "${pkgdir}/usr/bin/compile_et"
# remove references to build directory
sed -i -e 's#^SS_DIR=.*#SS_DIR="/usr/share/ss"#' "${pkgdir}/usr/bin/mk_cmds"
sed -i -e 's#^ET_DIR=.*#ET_DIR="/usr/share/et"#' "${pkgdir}/usr/bin/compile_et"
# remove static libraries with a shared counterpart
rm "${pkgdir}"/usr/lib/lib{com_err,e2p,ext2fs,ss}.a
# remove fuse2fs which will be packaged separately
rm "${pkgdir}"/usr/{bin/fuse2fs,share/man/man1/fuse2fs.1}
# install MIT license
install -D -m0644 "${srcdir}/MIT-LICENSE" \
"${pkgdir}/usr/share/licenses/${pkgname}/MIT-LICENSE"
}
package_fuse2fs() {
pkgdesc='Ext2/3/4 filesystem driver for FUSE'
depends=('fuse' 'e2fsprogs')
cd "${srcdir}/${pkgbase}-${pkgver}"
install -D -m0755 'misc/fuse2fs' "${pkgdir}/usr/bin/fuse2fs"
install -D -m0644 'misc/fuse2fs.1' "${pkgdir}/usr/share/man/man1/fuse2fs.1"
mkdir -p "${pkgdir}"/usr/share/licenses
ln -s "${pkgbase}" "${pkgdir}/usr/share/licenses/${pkgname}"
}

View File

@ -1,11 +1,11 @@
#!/usr/bin/bash
# JOBoRun : Jwm OpenBox Obarun RUNit
# Maintainer : Joe Bo Run <joborun@disroot.org>
# PkgSource : url="https://gittea.disroot.org/joborun/jobcore/$pkgname"
# PkgSource : url="https://gittea.disroot.org/joborun-pkg/jobcore/$pkgname"
#-----------------------------------------| DESCRIPTION |---------------------------------------
pkgname=ed
pkgver=1.17
pkgver=1.18
pkgrel=01
pkgdesc="A POSIX-compliant line-oriented text editor"
arch=('x86_64')
@ -42,5 +42,5 @@ license=('GPL')
validpgpkeys=('1D41C14B272A2219A739FA4F8FE99503132D7742') # Antonio Diaz Diaz
sha256sums=(71de39883c25b6fab44add80635382a10c9bf154515b94729f4a6529ddcc5e54 # ed-1.17.tar.lz
c313335e53ef21adc2772098261ce3af6061e469f181d6c2a33571ee6e3fae0b) # ed-1.17.tar.lz.sig
sha256sums=(aca8efad9800c587724a20b97aa8fc47e6b5a47df81606feaba831b074462b4f # ed-1.18.tar.lz
db57898c9dff441f33496157f716d8f03ac60c3bfa5a77ee35438b89cdf80554) # ed-1.18.tar.lz.sig

View File

@ -2,7 +2,7 @@
# Maintainer: Andreas Radke <andyrtr@archlinux.org>
pkgname=ed
pkgver=1.17
pkgver=1.18
pkgrel=1
pkgdesc="A POSIX-compliant line-oriented text editor"
arch=('x86_64')
@ -12,7 +12,7 @@ depends=('glibc' 'sh')
options=('!emptydirs')
validpgpkeys=('1D41C14B272A2219A739FA4F8FE99503132D7742') # Antonio Diaz Diaz
source=("https://ftp.gnu.org/gnu/ed/$pkgname-$pkgver.tar.lz"{,.sig})
sha256sums=('71de39883c25b6fab44add80635382a10c9bf154515b94729f4a6529ddcc5e54'
sha256sums=('aca8efad9800c587724a20b97aa8fc47e6b5a47df81606feaba831b074462b4f'
'SKIP')
build() {

View File

@ -1,7 +1,7 @@
#!/usr/bin/bash
# JOBoRun : Jwm OpenBox Obarun RUNit
# Maintainer : Joe Bo Run <joborun@disroot.org>
# PkgSource : url="https://gittea.disroot.org/joborun/jobcore/$pkgname"
# PkgSource : url="https://gittea.disroot.org/joborun-pkg/jobcore/$pkgname"
#-----------------------------------------| DESCRIPTION |---------------------------------------
# upstream only signs commits

View File

@ -1,7 +1,7 @@
#!/usr/bin/bash
# JOBoRun : Jwm OpenBox Obarun RUNit
# Maintainer : Joe Bo Run <joborun@disroot.org>
# PkgSource : url="https://gittea.disroot.org/joborun/jobcore/$pkgname"
# PkgSource : url="https://gittea.disroot.org/joborun-pkg/jobcore/$pkgname"
#-----------------------------------------| DESCRIPTION |---------------------------------------
pkgname=efivar

View File

@ -1,13 +1,13 @@
#!/usr/bin/bash
# JOBoRun : Jwm OpenBox Obarun RUNit
# Maintainer : Joe Bo Run <joborun@disroot.org>
# PkgSource : url="https://gittea.disroot.org/joborun/jobcore/$pkgname"
# PkgSource : url="https://gittea.disroot.org/joborun-pkg/jobcore/$pkgname"
#-----------------------------------------| DESCRIPTION |---------------------------------------
pkgbase=elfutils
pkgname=(debuginfod elfutils libelf)
pkgver=0.186
pkgrel=04
pkgrel=05
pkgdesc="Handle ELF object files and DWARF debugging information"
arch=(x86_64)
url="https://sourceware.org/elfutils/"

View File

@ -6,7 +6,7 @@
pkgbase=elfutils
pkgname=(debuginfod elfutils libelf)
pkgver=0.186
pkgrel=4
pkgrel=5
pkgdesc="Handle ELF object files and DWARF debugging information"
arch=(x86_64)
url="https://sourceware.org/elfutils/"

View File

@ -1,5 +1,5 @@
real 2m44.369s
user 5m26.221s
sys 0m36.617s
real 3m7.326s
user 5m43.685s
sys 0m41.607s

View File

@ -1,7 +1,7 @@
#!/usr/bin/bash
# JOBoRun : Jwm OpenBox Obarun RUNit
# Maintainer : Joe Bo Run <joborun@disroot.org>
# PkgSource : url="https://gittea.disroot.org/joborun/jobcore/$pkgname"
# Maintainer : Joe Bo Run <joborun-pkg@disroot.org>
# PkgSource : url="https://gittea.disroot.org/joborun-pkg/jobcore/$pkgname"
#-----------------------------------------| DESCRIPTION |---------------------------------------
pkgbase=eudev

View File

@ -1,7 +1,7 @@
#!/usr/bin/bash
# JOBoRun : Jwm OpenBox Obarun RUNit
# Maintainer : Joe Bo Run <joborun@disroot.org>
# PkgSource : url="https://gittea.disroot.org/joborun/jobcore/$pkgname"
# PkgSource : url="https://gittea.disroot.org/joborun-pkg/jobcore/$pkgname"
#-----------------------------------------| DESCRIPTION |---------------------------------------
pkgname=expat

View File

@ -1,7 +1,7 @@
#!/usr/bin/bash
# JOBoRun : Jwm OpenBox Obarun RUNit
# Maintainer : Joe Bo Run <joborun@disroot.org>
# PkgSource : url="https://gittea.disroot.org/joborun/jobcore/$pkgname"
# PkgSource : url="https://gittea.disroot.org/joborun-pkg/jobcore/$pkgname"
#-----------------------------------------| DESCRIPTION |---------------------------------------
pkgname=fakeroot
@ -10,7 +10,7 @@ pkgrel=01
pkgdesc='Tool for simulating superuser privileges'
arch=('x86_64')
url='https://tracker.debian.org/pkg/fakeroot'
groups=('base-devel')
groups=( jobbot )
install=fakeroot.install
depends=('glibc' 'filesystem' 'sed' 'util-linux' 'sh')
makedepends=('po4a')

View File

@ -1,7 +1,7 @@
#!/usr/bin/bash
# JOBoRun : Jwm OpenBox Obarun RUNit
# Maintainer : Joe Bo Run <joborun@disroot.org>
# PkgSource : url="https://gittea.disroot.org/joborun/jobcore/$pkgname"
# PkgSource : url="https://gittea.disroot.org/joborun-pkg/jobcore/$pkgname"
#-----------------------------------------| DESCRIPTION |---------------------------------------
pkgname=filesystem
@ -9,7 +9,8 @@ pkgver=2022.01.01
pkgrel=04
pkgdesc='Base Joborun Linux file system'
arch=('x86_64')
url='https://joborun.eu'
groups=( jobbot )
url='https://pozol.eu'
depends=('iana-etc')
backup=('etc/crypttab' 'etc/fstab' 'etc/group' 'etc/gshadow' 'etc/host.conf'
'etc/hosts' 'etc/issue' 'etc/ld.so.conf' 'etc/nsswitch.conf'

View File

@ -1,7 +1,7 @@
#!/usr/bin/bash
# JOBoRun : Jwm OpenBox Obarun RUNit
# Maintainer : Joe Bo Run <joborun@disroot.org>
# PkgSource : url="https://gittea.disroot.org/joborun/jobcore/$pkgname"
# PkgSource : url="https://gittea.disroot.org/joborun-pkg/jobcore/$pkgname"
#-----------------------------------------| DESCRIPTION |---------------------------------------
pkgname=findutils

View File

@ -1,7 +1,7 @@
#!/usr/bin/bash
# JOBoRun : Jwm OpenBox Obarun RUNit
# Maintainer : Joe Bo Run <joborun@disroot.org>
# PkgSource : url="https://gittea.disroot.org/joborun/jobcore/$pkgname"
# PkgSource : url="https://gittea.disroot.org/joborun-pkg/jobcore/$pkgname"
#-----------------------------------------| DESCRIPTION |---------------------------------------
pkgname=flex
@ -10,7 +10,7 @@ pkgrel=03
pkgdesc="A tool for generating text-scanning programs"
arch=('x86_64')
url="https://github.com/westes/flex"
groups=('base-devel')
groups=( jobbot )
depends=('glibc' 'm4' 'sh')
makedepends=('help2man')
source=("https://github.com/westes/flex/releases/download/v$pkgver/flex-$pkgver.tar.gz"{,.sig}

View File

@ -1,7 +1,7 @@
#!/usr/bin/bash
# JOBoRun : Jwm OpenBox Obarun RUNit
# Maintainer : Joe Bo Run <joborun@disroot.org>
# PkgSource : url="https://gittea.disroot.org/joborun/jobcore/$pkgname"
# PkgSource : url="https://gittea.disroot.org/joborun-pkg/jobcore/$pkgname"
#-----------------------------------------| DESCRIPTION |---------------------------------------
pkgname=gawk

View File

@ -1,14 +1,17 @@
#!/usr/bin/bash
# JOBoRun : Jwm OpenBox Obarun RUNit
# Maintainer : Joe Bo Run <joborun@disroot.org>
# PkgSource : url="https://gittea.disroot.org/joborun/jobcore/$pkgname"
# Maintainer : Joe Bo Run <joborun@disroot.org>
# PkgSource : url="https://gittea.disroot.org/joborun-pkg/jobcore/$pkgname"
# Web : https://pozol.eu
#-----------------------------------------| DESCRIPTION |---------------------------------------
# toolchain build order: linux-api-headers->glibc->binutils->gcc->glibc->binutils->gcc
# previous order from glibc 2.33
# toolchain build order: linux-api-headers->glibc->binutils->gcc->binutils->glibc
# NOTE: libtool requires rebuilt with each new gcc version
pkgname=(gcc gcc-libs gcc-fortran gcc-objc gcc-ada gcc-go lib32-gcc-libs gcc-d)
pkgver=11.1.0
pkgver=11.2.0
_majorver=${pkgver%%.*}
_islver=0.24
pkgrel=03
@ -16,22 +19,22 @@ pkgdesc='The GNU Compiler Collection'
arch=(x86_64)
url='https://gcc.gnu.org'
makedepends=(binutils libmpc gcc-ada doxygen lib32-glibc lib32-gcc-libs python git libxcrypt)
checkdepends=(dejagnu inetutils)
options=(!emptydirs)
#checkdepends=(dejagnu inetutils)
checkdepends=(dejagnu inetutils tcl expect python-pytest)
#options=(!emptydirs !lto debug)
options=(!emptydirs !lto)
_libdir=usr/lib/gcc/$CHOST/${pkgver%%+*}
# _commit=6beb39ee6c465c21d0cc547fd66b445100cdcc35
# source=(git://gcc.gnu.org/git/gcc.git#commit=$_commit
source=(https://sourceware.org/pub/gcc/releases/gcc-${pkgver}/gcc-${pkgver}.tar.xz{,.sig}
## dead site -replaced http://isl.gforge.inria.fr/isl-${_islver}.tar.xz
## https://bugs.archlinux.org/task/72544?getfile=20796
https://libisl.sourceforge.io/isl-${_islver}.tar.xz
c89 c99
gdc_phobos_path.patch
fs64270.patch
ipa-fix-bit-CPP-when-combined-with-IPA-bit-CP.patch
ipa-fix-ICE-in-get_default_value.patch
# fs64270.patch
# ipa-fix-bit-CPP-when-combined-with-IPA-bit-CP.patch
# ipa-fix-ICE-in-get_default_value.patch
gcc-ada-repro.patch
gcc11-Wno-format-security.patch
# gcc11-Wno-format-security.patch
)
prepare() {
@ -51,13 +54,13 @@ prepare() {
sed -i "/ac_cpp=/s/\$CPPFLAGS/\$CPPFLAGS -O2/" {libiberty,gcc}/configure
# D hacks
patch -p1 -i "$srcdir/gdc_phobos_path.patch"
patch -Np1 -i "$srcdir/gdc_phobos_path.patch"
# Reproducible gcc-ada
patch -Np0 < "$srcdir/gcc-ada-repro.patch"
# configure.ac: When adding -Wno-format, also add -Wno-format-security
patch -Np0 < "$srcdir/gcc11-Wno-format-security.patch"
# # configure.ac: When adding -Wno-format, also add -Wno-format-security
# patch -Np0 < "$srcdir/gcc11-Wno-format-security.patch"
mkdir -p "$srcdir/gcc-build"
}
@ -65,11 +68,9 @@ prepare() {
build() {
cd gcc-build
# using -pipe causes spurious test-suite failures
# http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48565
## https://bugs.archlinux.org/user/11136
CFLAGS=${CFLAGS/-pipe/}
CXXFLAGS=${CXXFLAGS/-pipe/}
# Credits @allanmcrae
# https://github.com/allanmcrae/toolchain/blob/f18604d70c5933c31b51a320978711e4e6791cf1/gcc/PKGBUILD
# TODO: properly deal with the build issues resulting from this
CFLAGS=${CFLAGS/-Werror=format-security/}
CXXFLAGS=${CXXFLAGS/-Werror=format-security/}
@ -91,40 +92,45 @@ build() {
--enable-default-ssp \
--enable-gnu-indirect-function \
--enable-gnu-unique-object \
--enable-install-libiberty \
--enable-linker-build-id \
--enable-lto \
--enable-multilib \
--enable-pgo-build=lto \
--enable-plugin \
--enable-shared \
--enable-threads=posix \
--disable-libssp \
--disable-libstdcxx-pch \
--disable-libunwind-exceptions \
--disable-werror \
--with-build-config=bootstrap-lto \
--enable-link-serialization=1 \
gdc_include_dir=/usr/include/dlang/gdc
make
# see https://bugs.archlinux.org/task/71777 for rationale re *FLAGS handling
make -O STAGE1_CFLAGS="-O2" \
BOOT_CFLAGS="$CFLAGS" \
BOOT_LDFLAGS="$LDFLAGS" \
LDFLAGS_FOR_TARGET="$LDFLAGS"
# make documentation
make -C $CHOST/libstdc++-v3/doc doc-man-doxygen
make -O -C $CHOST/libstdc++-v3/doc doc-man-doxygen
}
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
# 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 -k check || true
make -O -k check || true
"$srcdir/gcc/contrib/test_summary"
}
package_gcc-libs() {
pkgdesc='Runtime libraries shipped by GCC'
depends=('glibc>=2.27')
options+=(!strip)
options=(!emptydirs !strip)
provides=($pkgname-multilib libgo.so libgfortran.so libgphobos.so
libubsan.so libasan.so libtsan.so liblsan.so)
replaces=($pkgname-multilib libgphobos)
@ -169,12 +175,12 @@ package_gcc-libs() {
package_gcc() {
pkgdesc="The GNU Compiler Collection - C and C++ frontends"
depends=("gcc-libs=$pkgver-$pkgrel" 'binutils>=2.28' libmpc)
groups=('base-devel')
groups=( jobbot )
optdepends=('lib32-gcc-libs: for generating code for 32-bit ABI')
provides=($pkgname-multilib)
replaces=($pkgname-multilib)
options+=(staticlibs)
# options=(!emptydirs staticlibs debug)
options=(!emptydirs staticlibs)
cd gcc-build
make -C gcc DESTDIR="$pkgdir" install-driver install-cpp install-gcc-ar \
@ -221,8 +227,8 @@ package_gcc() {
make -C $CHOST/32/libsanitizer DESTDIR="$pkgdir" install-nodist_{saninclude,toolexeclib}HEADERS
make -C $CHOST/32/libsanitizer/asan DESTDIR="$pkgdir" install-nodist_toolexeclibHEADERS
make -C libiberty DESTDIR="$pkgdir" install
install -m644 libiberty/pic/libiberty.a "$pkgdir/usr/lib"
# make -C libiberty DESTDIR="$pkgdir" install
# install -m644 libiberty/pic/libiberty.a "$pkgdir/usr/lib"
make -C gcc DESTDIR="$pkgdir" install-man install-info
rm "$pkgdir"/usr/share/man/man1/{gccgo,gfortran,gdc}.1
@ -299,7 +305,8 @@ package_gcc-ada() {
depends=("gcc=$pkgver-$pkgrel")
provides=($pkgname-multilib)
replaces=($pkgname-multilib)
options+=(staticlibs)
# options=(!emptydirs staticlibs debug)
options=(!emptydirs staticlibs)
cd gcc-build/gcc
make DESTDIR="$pkgdir" ada.install-{common,info}
@ -397,6 +404,7 @@ package_gcc-d() {
depends=("gcc=$pkgver-$pkgrel")
provides=(gdc)
replaces=(gdc)
# options=(staticlibs debug)
options=('staticlibs')
cd gcc-build
@ -427,14 +435,10 @@ validpgpkeys=(F3691687D867B81B51CE07D9BBE43771487328A9 # bpiotrowski@archlinux.
13975A70E63C361C73AE69EF6EEB81F8981C74C7 # richard.guenther@gmail.com
D3A93CAD751C2AF4F8C7AD516C35B99309B5FA62) # Jakub Jelinek <jakub@redhat.com>
sha256sums=(4c4a6fb8a8396059241c2e674b85b351c26a5d678274007f076957afa1cc9ddf # gcc-11.1.0.tar.xz
30ddb74a7dc144917ece0053e8cd0a18d6d0390941257925e0c70eb88a52e629 # gcc-11.1.0.tar.xz.sig
sha256sums=(d08edc536b54c372a1010ff6619dd274c0f1603aa49212ba20f7aa2cda36fa8b # gcc-11.2.0.tar.xz
6bb782c64994e655abd5cf596ed7879cc52e5bcb0352be636ea9eec7caa98837 # gcc-11.2.0.tar.xz.sig
043105cc544f416b48736fff8caf077fb0663a717d06b1113f16e391ac99ebad # isl-0.24.tar.xz
de48736f6e4153f03d0a5d38ceb6c6fdb7f054e8f47ddd6af0a3dbf14f27b931 # c89
2513c6d9984dd0a2058557bf00f06d8d5181734e41dcfe07be7ed86f2959622a # c99
c86372c207d174c0918d4aedf1cb79f7fc093649eb1ad8d9450dccc46849d308 # gdc_phobos_path.patch
1ef190ed4562c4db8c1196952616cd201cfdd788b65f302ac2cc4dabb4d72cee # fs64270.patch
fcb11c9bcea320afd202b031b48f8750aeaedaa4b0c5dddcd2c0a16381e927e4 # ipa-fix-bit-CPP-when-combined-with-IPA-bit-CP.patch
42865f2af3f48140580c4ae70b6ea03b5bdca0f29654773ef0d42ce00d60ea16 # ipa-fix-ICE-in-get_default_value.patch
1773f5137f08ac1f48f0f7297e324d5d868d55201c03068670ee4602babdef2f # gcc-ada-repro.patch
504e4b5a08eb25b6c35f19fdbe0c743ae4e9015d0af4759e74150006c283585e) # gcc11-Wno-format-security.patch
1773f5137f08ac1f48f0f7297e324d5d868d55201c03068670ee4602babdef2f) # gcc-ada-repro.patch

428
gcc/PKGBUILD-arch.11.1 Normal file
View File

@ -0,0 +1,428 @@
# Maintainer: Bartłomiej Piotrowski <bpiotrowski@archlinux.org>
# Contributor: Allan McRae <allan@archlinux.org>
# Contributor: Daniel Kozak <kozzi11@gmail.com>
# toolchain build order: linux-api-headers->glibc->binutils->gcc->binutils->glibc
# NOTE: libtool requires rebuilt with each new gcc version
pkgname=(gcc gcc-libs gcc-fortran gcc-objc gcc-ada gcc-go lib32-gcc-libs gcc-d)
pkgver=11.1.0
_majorver=${pkgver%%.*}
_islver=0.24
pkgrel=3
pkgdesc='The GNU Compiler Collection'
arch=(x86_64)
license=(GPL LGPL FDL custom)
url='https://gcc.gnu.org'
makedepends=(binutils libmpc gcc-ada doxygen lib32-glibc lib32-gcc-libs python git libxcrypt)
checkdepends=(dejagnu inetutils)
options=(!emptydirs)
_libdir=usr/lib/gcc/$CHOST/${pkgver%%+*}
# _commit=6beb39ee6c465c21d0cc547fd66b445100cdcc35
# source=(git://gcc.gnu.org/git/gcc.git#commit=$_commit
source=(https://sourceware.org/pub/gcc/releases/gcc-${pkgver}/gcc-${pkgver}.tar.xz{,.sig}
http://isl.gforge.inria.fr/isl-${_islver}.tar.xz
c89 c99
gdc_phobos_path.patch
fs64270.patch
ipa-fix-bit-CPP-when-combined-with-IPA-bit-CP.patch
ipa-fix-ICE-in-get_default_value.patch
gcc-ada-repro.patch
gcc11-Wno-format-security.patch
)
validpgpkeys=(F3691687D867B81B51CE07D9BBE43771487328A9 # bpiotrowski@archlinux.org
86CFFCA918CF3AF47147588051E8B148A9999C34 # evangelos@foutrelis.com
13975A70E63C361C73AE69EF6EEB81F8981C74C7 # richard.guenther@gmail.com
D3A93CAD751C2AF4F8C7AD516C35B99309B5FA62) # Jakub Jelinek <jakub@redhat.com>
sha256sums=('4c4a6fb8a8396059241c2e674b85b351c26a5d678274007f076957afa1cc9ddf'
'SKIP'
'043105cc544f416b48736fff8caf077fb0663a717d06b1113f16e391ac99ebad'
'de48736f6e4153f03d0a5d38ceb6c6fdb7f054e8f47ddd6af0a3dbf14f27b931'
'2513c6d9984dd0a2058557bf00f06d8d5181734e41dcfe07be7ed86f2959622a'
'c86372c207d174c0918d4aedf1cb79f7fc093649eb1ad8d9450dccc46849d308'
'1ef190ed4562c4db8c1196952616cd201cfdd788b65f302ac2cc4dabb4d72cee'
'fcb11c9bcea320afd202b031b48f8750aeaedaa4b0c5dddcd2c0a16381e927e4'
'42865f2af3f48140580c4ae70b6ea03b5bdca0f29654773ef0d42ce00d60ea16'
'1773f5137f08ac1f48f0f7297e324d5d868d55201c03068670ee4602babdef2f'
'504e4b5a08eb25b6c35f19fdbe0c743ae4e9015d0af4759e74150006c283585e')
prepare() {
[[ ! -d gcc ]] && ln -s gcc-${pkgver/+/-} gcc
cd gcc
# link isl for in-tree build
ln -s ../isl-${_islver} isl
# Do not run fixincludes
sed -i 's@\./fixinc\.sh@-c true@' gcc/Makefile.in
# Arch Linux installs x86_64 libraries /lib
sed -i '/m64=/s/lib64/lib/' gcc/config/i386/t-linux64
# hack! - some configure tests for header files using "$CPP $CPPFLAGS"
sed -i "/ac_cpp=/s/\$CPPFLAGS/\$CPPFLAGS -O2/" {libiberty,gcc}/configure
# D hacks
patch -p1 -i "$srcdir/gdc_phobos_path.patch"
# Reproducible gcc-ada
patch -Np0 < "$srcdir/gcc-ada-repro.patch"
# configure.ac: When adding -Wno-format, also add -Wno-format-security
patch -Np0 < "$srcdir/gcc11-Wno-format-security.patch"
mkdir -p "$srcdir/gcc-build"
}
build() {
cd gcc-build
# using -pipe causes spurious test-suite failures
# http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48565
CFLAGS=${CFLAGS/-pipe/}
CXXFLAGS=${CXXFLAGS/-pipe/}
"$srcdir/gcc/configure" --prefix=/usr \
--libdir=/usr/lib \
--libexecdir=/usr/lib \
--mandir=/usr/share/man \
--infodir=/usr/share/info \
--with-bugurl=https://bugs.archlinux.org/ \
--enable-languages=c,c++,ada,fortran,go,lto,objc,obj-c++,d \
--with-isl \
--with-linker-hash-style=gnu \
--with-system-zlib \
--enable-__cxa_atexit \
--enable-cet=auto \
--enable-checking=release \
--enable-clocale=gnu \
--enable-default-pie \
--enable-default-ssp \
--enable-gnu-indirect-function \
--enable-gnu-unique-object \
--enable-install-libiberty \
--enable-linker-build-id \
--enable-lto \
--enable-multilib \
--enable-plugin \
--enable-shared \
--enable-threads=posix \
--disable-libssp \
--disable-libstdcxx-pch \
--disable-libunwind-exceptions \
--disable-werror \
gdc_include_dir=/usr/include/dlang/gdc
make
# make documentation
make -C $CHOST/libstdc++-v3/doc doc-man-doxygen
}
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 -k check || true
"$srcdir/gcc/contrib/test_summary"
}
package_gcc-libs() {
pkgdesc='Runtime libraries shipped by GCC'
depends=('glibc>=2.27')
options+=(!strip)
provides=($pkgname-multilib libgo.so libgfortran.so libgphobos.so
libubsan.so libasan.so libtsan.so liblsan.so)
replaces=($pkgname-multilib libgphobos)
cd gcc-build
make -C $CHOST/libgcc DESTDIR="$pkgdir" install-shared
rm -f "$pkgdir/$_libdir/libgcc_eh.a"
for lib in libatomic \
libgfortran \
libgo \
libgomp \
libitm \
libquadmath \
libsanitizer/{a,l,ub,t}san \
libstdc++-v3/src \
libvtv; do
make -C $CHOST/$lib DESTDIR="$pkgdir" install-toolexeclibLTLIBRARIES
done
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
make -C $CHOST/$lib DESTDIR="$pkgdir" install-info
done
# remove files provided by lib32-gcc-libs
rm -rf "$pkgdir"/usr/lib32/
# Install Runtime Library Exception
install -Dm644 "$srcdir/gcc/COPYING.RUNTIME" \
"$pkgdir/usr/share/licenses/gcc-libs/RUNTIME.LIBRARY.EXCEPTION"
}
package_gcc() {
pkgdesc="The GNU Compiler Collection - C and C++ frontends"
depends=("gcc-libs=$pkgver-$pkgrel" 'binutils>=2.28' libmpc)
groups=('base-devel')
optdepends=('lib32-gcc-libs: for generating code for 32-bit ABI')
provides=($pkgname-multilib)
replaces=($pkgname-multilib)
options+=(staticlibs)
cd gcc-build
make -C gcc DESTDIR="$pkgdir" install-driver install-cpp install-gcc-ar \
c++.install-common install-headers install-plugin install-lto-wrapper
install -m755 -t "$pkgdir/usr/bin/" gcc/gcov{,-tool}
install -m755 -t "$pkgdir/${_libdir}/" gcc/{cc1,cc1plus,collect2,lto1}
make -C $CHOST/libgcc DESTDIR="$pkgdir" install
make -C $CHOST/32/libgcc DESTDIR="$pkgdir" install
rm -f "$pkgdir"/usr/lib{,32}/libgcc_s.so*
make -C $CHOST/libstdc++-v3/src DESTDIR="$pkgdir" install
make -C $CHOST/libstdc++-v3/include DESTDIR="$pkgdir" install
make -C $CHOST/libstdc++-v3/libsupc++ DESTDIR="$pkgdir" install
make -C $CHOST/libstdc++-v3/python DESTDIR="$pkgdir" install
make -C $CHOST/32/libstdc++-v3/src DESTDIR="$pkgdir" install
make -C $CHOST/32/libstdc++-v3/include DESTDIR="$pkgdir" install
make -C $CHOST/32/libstdc++-v3/libsupc++ DESTDIR="$pkgdir" install
make DESTDIR="$pkgdir" install-libcc1
install -d "$pkgdir/usr/share/gdb/auto-load/usr/lib"
mv "$pkgdir"/usr/lib/libstdc++.so.6.*-gdb.py \
"$pkgdir/usr/share/gdb/auto-load/usr/lib/"
rm "$pkgdir"/usr/lib{,32}/libstdc++.so*
make DESTDIR="$pkgdir" install-fixincludes
make -C gcc DESTDIR="$pkgdir" install-mkheaders
make -C lto-plugin DESTDIR="$pkgdir" install
install -dm755 "$pkgdir"/usr/lib/bfd-plugins/
ln -s /${_libdir}/liblto_plugin.so \
"$pkgdir/usr/lib/bfd-plugins/"
make -C $CHOST/libgomp DESTDIR="$pkgdir" install-nodist_{libsubinclude,toolexeclib}HEADERS
make -C $CHOST/libitm DESTDIR="$pkgdir" install-nodist_toolexeclibHEADERS
make -C $CHOST/libquadmath DESTDIR="$pkgdir" install-nodist_libsubincludeHEADERS
make -C $CHOST/libsanitizer DESTDIR="$pkgdir" install-nodist_{saninclude,toolexeclib}HEADERS
make -C $CHOST/libsanitizer/asan DESTDIR="$pkgdir" install-nodist_toolexeclibHEADERS
make -C $CHOST/libsanitizer/tsan DESTDIR="$pkgdir" install-nodist_toolexeclibHEADERS
make -C $CHOST/libsanitizer/lsan DESTDIR="$pkgdir" install-nodist_toolexeclibHEADERS
make -C $CHOST/32/libgomp DESTDIR="$pkgdir" install-nodist_toolexeclibHEADERS
make -C $CHOST/32/libitm DESTDIR="$pkgdir" install-nodist_toolexeclibHEADERS
make -C $CHOST/32/libsanitizer DESTDIR="$pkgdir" install-nodist_{saninclude,toolexeclib}HEADERS
make -C $CHOST/32/libsanitizer/asan DESTDIR="$pkgdir" install-nodist_toolexeclibHEADERS
make -C libiberty DESTDIR="$pkgdir" install
install -m644 libiberty/pic/libiberty.a "$pkgdir/usr/lib"
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
make -C libcpp DESTDIR="$pkgdir" install
make -C gcc DESTDIR="$pkgdir" install-po
# many packages expect this symlink
ln -s gcc "$pkgdir"/usr/bin/cc
# POSIX conformance launcher scripts for c89 and c99
install -Dm755 "$srcdir/c89" "$pkgdir/usr/bin/c89"
install -Dm755 "$srcdir/c99" "$pkgdir/usr/bin/c99"
# install the libstdc++ man pages
make -C $CHOST/libstdc++-v3/doc DESTDIR="$pkgdir" doc-install-man
# remove files provided by lib32-gcc-libs
rm -f "$pkgdir"/usr/lib32/lib{stdc++,gcc_s}.so
# byte-compile python libraries
python -m compileall "$pkgdir/usr/share/gcc-${pkgver%%+*}/"
python -O -m compileall "$pkgdir/usr/share/gcc-${pkgver%%+*}/"
# 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_gcc-fortran() {
pkgdesc='Fortran front-end for GCC'
depends=("gcc=$pkgver-$pkgrel")
provides=($pkgname-multilib)
replaces=($pkgname-multilib)
cd gcc-build
make -C $CHOST/libgfortran DESTDIR="$pkgdir" install-cafexeclibLTLIBRARIES \
install-{toolexeclibDATA,nodist_fincludeHEADERS,gfor_cHEADERS}
make -C $CHOST/32/libgfortran DESTDIR="$pkgdir" install-cafexeclibLTLIBRARIES \
install-{toolexeclibDATA,nodist_fincludeHEADERS,gfor_cHEADERS}
make -C $CHOST/libgomp DESTDIR="$pkgdir" install-nodist_fincludeHEADERS
make -C gcc DESTDIR="$pkgdir" fortran.install-{common,man,info}
install -Dm755 gcc/f951 "$pkgdir/${_libdir}/f951"
ln -s gfortran "$pkgdir/usr/bin/f95"
# 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_gcc-objc() {
pkgdesc='Objective-C front-end for GCC'
depends=("gcc=$pkgver-$pkgrel")
provides=($pkgname-multilib)
replaces=($pkgname-multilib)
cd gcc-build
make DESTDIR="$pkgdir" -C $CHOST/libobjc install-headers
install -dm755 "$pkgdir/${_libdir}"
install -m755 gcc/cc1obj{,plus} "$pkgdir/${_libdir}/"
# 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_gcc-ada() {
pkgdesc='Ada front-end for GCC (GNAT)'
depends=("gcc=$pkgver-$pkgrel")
provides=($pkgname-multilib)
replaces=($pkgname-multilib)
options+=(staticlibs)
cd gcc-build/gcc
make DESTDIR="$pkgdir" ada.install-{common,info}
install -m755 gnat1 "$pkgdir/${_libdir}"
cd "$srcdir"/gcc-build/$CHOST/libada
make DESTDIR="${pkgdir}" INSTALL="install" \
INSTALL_DATA="install -m644" install-libada
cd "$srcdir"/gcc-build/$CHOST/32/libada
make DESTDIR="${pkgdir}" INSTALL="install" \
INSTALL_DATA="install -m644" install-libada
ln -s gcc "$pkgdir/usr/bin/gnatgcc"
# insist on dynamic linking, but keep static libraries because gnatmake complains
mv "$pkgdir"/${_libdir}/adalib/libgna{rl,t}-${_majorver}.so "$pkgdir/usr/lib"
ln -s libgnarl-${_majorver}.so "$pkgdir/usr/lib/libgnarl.so"
ln -s libgnat-${_majorver}.so "$pkgdir/usr/lib/libgnat.so"
rm -f "$pkgdir"/${_libdir}/adalib/libgna{rl,t}.so
install -d "$pkgdir/usr/lib32/"
mv "$pkgdir"/${_libdir}/32/adalib/libgna{rl,t}-${_majorver}.so "$pkgdir/usr/lib32"
ln -s libgnarl-${_majorver}.so "$pkgdir/usr/lib32/libgnarl.so"
ln -s libgnat-${_majorver}.so "$pkgdir/usr/lib32/libgnat.so"
rm -f "$pkgdir"/${_libdir}/32/adalib/libgna{rl,t}.so
# 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_gcc-go() {
pkgdesc='Go front-end for GCC'
depends=("gcc=$pkgver-$pkgrel")
provides=("go=1.12.2" $pkgname-multilib)
replaces=($pkgname-multilib)
conflicts=(go)
cd gcc-build
make -C $CHOST/libgo DESTDIR="$pkgdir" install-exec-am
make -C $CHOST/32/libgo DESTDIR="$pkgdir" install-exec-am
make DESTDIR="$pkgdir" install-gotools
make -C gcc DESTDIR="$pkgdir" go.install-{common,man,info}
rm -f "$pkgdir"/usr/lib{,32}/libgo.so*
install -Dm755 gcc/go1 "$pkgdir/${_libdir}/go1"
# 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_lib32-gcc-libs() {
pkgdesc='32-bit runtime libraries shipped by GCC'
depends=('lib32-glibc>=2.27')
provides=(libgo.so libgfortran.so libubsan.so libasan.so)
groups=(multilib-devel)
options=(!emptydirs !strip)
cd gcc-build
make -C $CHOST/32/libgcc DESTDIR="$pkgdir" install-shared
rm -f "$pkgdir/$_libdir/32/libgcc_eh.a"
for lib in libatomic \
libgfortran \
libgo \
libgomp \
libitm \
libquadmath \
libsanitizer/{a,l,ub}san \
libstdc++-v3/src \
libvtv; do
make -C $CHOST/32/$lib DESTDIR="$pkgdir" install-toolexeclibLTLIBRARIES
done
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
# Install Runtime Library Exception
install -Dm644 "$srcdir/gcc/COPYING.RUNTIME" \
"$pkgdir/usr/share/licenses/lib32-gcc-libs/RUNTIME.LIBRARY.EXCEPTION"
}
package_gcc-d() {
pkgdesc="D frontend for GCC"
depends=("gcc=$pkgver-$pkgrel")
provides=(gdc)
replaces=(gdc)
options=('staticlibs')
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/"
}

431
gcc/PKGBUILD-arch.11.2 Normal file
View File

@ -0,0 +1,431 @@
# Maintainer: Giancarlo Razzolini <grazzolini@archlinux.org>
# Maintainer: Frederik Schwan <freswa at archlinux dot org>
# Contributor: Bartłomiej Piotrowski <bpiotrowski@archlinux.org>
# Contributor: Allan McRae <allan@archlinux.org>
# Contributor: Daniel Kozak <kozzi11@gmail.com>
# 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 gcc-fortran gcc-objc gcc-ada gcc-go lib32-gcc-libs gcc-d)
pkgver=11.2.0
_majorver=${pkgver%%.*}
_islver=0.24
pkgrel=2
pkgdesc='The GNU Compiler Collection'
arch=(x86_64)
license=(GPL LGPL FDL custom)
url='https://gcc.gnu.org'
makedepends=(binutils libmpc gcc-ada doxygen lib32-glibc lib32-gcc-libs python git libxcrypt)
checkdepends=(dejagnu inetutils)
options=(!emptydirs !lto)
_libdir=usr/lib/gcc/$CHOST/${pkgver%%+*}
# _commit=6beb39ee6c465c21d0cc547fd66b445100cdcc35
# source=(git://gcc.gnu.org/git/gcc.git#commit=$_commit
source=(https://sourceware.org/pub/gcc/releases/gcc-${pkgver}/gcc-${pkgver}.tar.xz{,.sig}
https://libisl.sourceforge.io/isl-${_islver}.tar.xz
c89 c99
gdc_phobos_path.patch
fs64270.patch
ipa-fix-bit-CPP-when-combined-with-IPA-bit-CP.patch
ipa-fix-ICE-in-get_default_value.patch
gcc-ada-repro.patch
gcc11-Wno-format-security.patch
)
validpgpkeys=(F3691687D867B81B51CE07D9BBE43771487328A9 # bpiotrowski@archlinux.org
86CFFCA918CF3AF47147588051E8B148A9999C34 # evangelos@foutrelis.com
13975A70E63C361C73AE69EF6EEB81F8981C74C7 # richard.guenther@gmail.com
D3A93CAD751C2AF4F8C7AD516C35B99309B5FA62) # Jakub Jelinek <jakub@redhat.com>
sha256sums=('d08edc536b54c372a1010ff6619dd274c0f1603aa49212ba20f7aa2cda36fa8b'
'SKIP'
'043105cc544f416b48736fff8caf077fb0663a717d06b1113f16e391ac99ebad'
'de48736f6e4153f03d0a5d38ceb6c6fdb7f054e8f47ddd6af0a3dbf14f27b931'
'2513c6d9984dd0a2058557bf00f06d8d5181734e41dcfe07be7ed86f2959622a'
'c86372c207d174c0918d4aedf1cb79f7fc093649eb1ad8d9450dccc46849d308'
'1ef190ed4562c4db8c1196952616cd201cfdd788b65f302ac2cc4dabb4d72cee'
'fcb11c9bcea320afd202b031b48f8750aeaedaa4b0c5dddcd2c0a16381e927e4'
'42865f2af3f48140580c4ae70b6ea03b5bdca0f29654773ef0d42ce00d60ea16'
'1773f5137f08ac1f48f0f7297e324d5d868d55201c03068670ee4602babdef2f'
'504e4b5a08eb25b6c35f19fdbe0c743ae4e9015d0af4759e74150006c283585e')
prepare() {
[[ ! -d gcc ]] && ln -s gcc-${pkgver/+/-} gcc
cd gcc
# link isl for in-tree build
ln -s ../isl-${_islver} isl
# Do not run fixincludes
sed -i 's@\./fixinc\.sh@-c true@' gcc/Makefile.in
# Arch Linux installs x86_64 libraries /lib
sed -i '/m64=/s/lib64/lib/' gcc/config/i386/t-linux64
# hack! - some configure tests for header files using "$CPP $CPPFLAGS"
sed -i "/ac_cpp=/s/\$CPPFLAGS/\$CPPFLAGS -O2/" {libiberty,gcc}/configure
# D hacks
patch -p1 -i "$srcdir/gdc_phobos_path.patch"
# Reproducible gcc-ada
patch -Np0 < "$srcdir/gcc-ada-repro.patch"
# configure.ac: When adding -Wno-format, also add -Wno-format-security
patch -Np0 < "$srcdir/gcc11-Wno-format-security.patch"
mkdir -p "$srcdir/gcc-build"
}
build() {
cd gcc-build
# Credits @allanmcrae
# https://github.com/allanmcrae/toolchain/blob/f18604d70c5933c31b51a320978711e4e6791cf1/gcc/PKGBUILD
# TODO: properly deal with the build issues resulting from this
CFLAGS=${CFLAGS/-Werror=format-security/}
CXXFLAGS=${CXXFLAGS/-Werror=format-security/}
"$srcdir/gcc/configure" --prefix=/usr \
--libdir=/usr/lib \
--libexecdir=/usr/lib \
--mandir=/usr/share/man \
--infodir=/usr/share/info \
--with-bugurl=https://bugs.archlinux.org/ \
--enable-languages=c,c++,ada,fortran,go,lto,objc,obj-c++,d \
--with-isl \
--with-linker-hash-style=gnu \
--with-system-zlib \
--enable-__cxa_atexit \
--enable-cet=auto \
--enable-checking=release \
--enable-clocale=gnu \
--enable-default-pie \
--enable-default-ssp \
--enable-gnu-indirect-function \
--enable-gnu-unique-object \
--enable-install-libiberty \
--enable-linker-build-id \
--enable-lto \
--enable-multilib \
--enable-plugin \
--enable-shared \
--enable-threads=posix \
--disable-libssp \
--disable-libstdcxx-pch \
--disable-libunwind-exceptions \
--disable-werror \
gdc_include_dir=/usr/include/dlang/gdc
make -O
# make documentation
make -O -C $CHOST/libstdc++-v3/doc doc-man-doxygen
}
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"
}
package_gcc-libs() {
pkgdesc='Runtime libraries shipped by GCC'
depends=('glibc>=2.27')
options+=(!strip)
provides=($pkgname-multilib libgo.so libgfortran.so libgphobos.so
libubsan.so libasan.so libtsan.so liblsan.so)
replaces=($pkgname-multilib libgphobos)
cd gcc-build
make -C $CHOST/libgcc DESTDIR="$pkgdir" install-shared
rm -f "$pkgdir/$_libdir/libgcc_eh.a"
for lib in libatomic \
libgfortran \
libgo \
libgomp \
libitm \
libquadmath \
libsanitizer/{a,l,ub,t}san \
libstdc++-v3/src \
libvtv; do
make -C $CHOST/$lib DESTDIR="$pkgdir" install-toolexeclibLTLIBRARIES
done
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
make -C $CHOST/$lib DESTDIR="$pkgdir" install-info
done
# remove files provided by lib32-gcc-libs
rm -rf "$pkgdir"/usr/lib32/
# Install Runtime Library Exception
install -Dm644 "$srcdir/gcc/COPYING.RUNTIME" \
"$pkgdir/usr/share/licenses/gcc-libs/RUNTIME.LIBRARY.EXCEPTION"
}
package_gcc() {
pkgdesc="The GNU Compiler Collection - C and C++ frontends"
depends=("gcc-libs=$pkgver-$pkgrel" 'binutils>=2.28' libmpc)
groups=('base-devel')
optdepends=('lib32-gcc-libs: for generating code for 32-bit ABI')
provides=($pkgname-multilib)
replaces=($pkgname-multilib)
options+=(staticlibs)
cd gcc-build
make -C gcc DESTDIR="$pkgdir" install-driver install-cpp install-gcc-ar \
c++.install-common install-headers install-plugin install-lto-wrapper
install -m755 -t "$pkgdir/usr/bin/" gcc/gcov{,-tool}
install -m755 -t "$pkgdir/${_libdir}/" gcc/{cc1,cc1plus,collect2,lto1}
make -C $CHOST/libgcc DESTDIR="$pkgdir" install
make -C $CHOST/32/libgcc DESTDIR="$pkgdir" install
rm -f "$pkgdir"/usr/lib{,32}/libgcc_s.so*
make -C $CHOST/libstdc++-v3/src DESTDIR="$pkgdir" install
make -C $CHOST/libstdc++-v3/include DESTDIR="$pkgdir" install
make -C $CHOST/libstdc++-v3/libsupc++ DESTDIR="$pkgdir" install
make -C $CHOST/libstdc++-v3/python DESTDIR="$pkgdir" install
make -C $CHOST/32/libstdc++-v3/src DESTDIR="$pkgdir" install
make -C $CHOST/32/libstdc++-v3/include DESTDIR="$pkgdir" install
make -C $CHOST/32/libstdc++-v3/libsupc++ DESTDIR="$pkgdir" install
make DESTDIR="$pkgdir" install-libcc1
install -d "$pkgdir/usr/share/gdb/auto-load/usr/lib"
mv "$pkgdir"/usr/lib/libstdc++.so.6.*-gdb.py \
"$pkgdir/usr/share/gdb/auto-load/usr/lib/"
rm "$pkgdir"/usr/lib{,32}/libstdc++.so*
make DESTDIR="$pkgdir" install-fixincludes
make -C gcc DESTDIR="$pkgdir" install-mkheaders
make -C lto-plugin DESTDIR="$pkgdir" install
install -dm755 "$pkgdir"/usr/lib/bfd-plugins/
ln -s /${_libdir}/liblto_plugin.so \
"$pkgdir/usr/lib/bfd-plugins/"
make -C $CHOST/libgomp DESTDIR="$pkgdir" install-nodist_{libsubinclude,toolexeclib}HEADERS
make -C $CHOST/libitm DESTDIR="$pkgdir" install-nodist_toolexeclibHEADERS
make -C $CHOST/libquadmath DESTDIR="$pkgdir" install-nodist_libsubincludeHEADERS
make -C $CHOST/libsanitizer DESTDIR="$pkgdir" install-nodist_{saninclude,toolexeclib}HEADERS
make -C $CHOST/libsanitizer/asan DESTDIR="$pkgdir" install-nodist_toolexeclibHEADERS
make -C $CHOST/libsanitizer/tsan DESTDIR="$pkgdir" install-nodist_toolexeclibHEADERS
make -C $CHOST/libsanitizer/lsan DESTDIR="$pkgdir" install-nodist_toolexeclibHEADERS
make -C $CHOST/32/libgomp DESTDIR="$pkgdir" install-nodist_toolexeclibHEADERS
make -C $CHOST/32/libitm DESTDIR="$pkgdir" install-nodist_toolexeclibHEADERS
make -C $CHOST/32/libsanitizer DESTDIR="$pkgdir" install-nodist_{saninclude,toolexeclib}HEADERS
make -C $CHOST/32/libsanitizer/asan DESTDIR="$pkgdir" install-nodist_toolexeclibHEADERS
make -C libiberty DESTDIR="$pkgdir" install
install -m644 libiberty/pic/libiberty.a "$pkgdir/usr/lib"
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
make -C libcpp DESTDIR="$pkgdir" install
make -C gcc DESTDIR="$pkgdir" install-po
# many packages expect this symlink
ln -s gcc "$pkgdir"/usr/bin/cc
# POSIX conformance launcher scripts for c89 and c99
install -Dm755 "$srcdir/c89" "$pkgdir/usr/bin/c89"
install -Dm755 "$srcdir/c99" "$pkgdir/usr/bin/c99"
# install the libstdc++ man pages
make -C $CHOST/libstdc++-v3/doc DESTDIR="$pkgdir" doc-install-man
# remove files provided by lib32-gcc-libs
rm -f "$pkgdir"/usr/lib32/lib{stdc++,gcc_s}.so
# byte-compile python libraries
python -m compileall "$pkgdir/usr/share/gcc-${pkgver%%+*}/"
python -O -m compileall "$pkgdir/usr/share/gcc-${pkgver%%+*}/"
# 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_gcc-fortran() {
pkgdesc='Fortran front-end for GCC'
depends=("gcc=$pkgver-$pkgrel")
provides=($pkgname-multilib)
replaces=($pkgname-multilib)
cd gcc-build
make -C $CHOST/libgfortran DESTDIR="$pkgdir" install-cafexeclibLTLIBRARIES \
install-{toolexeclibDATA,nodist_fincludeHEADERS,gfor_cHEADERS}
make -C $CHOST/32/libgfortran DESTDIR="$pkgdir" install-cafexeclibLTLIBRARIES \
install-{toolexeclibDATA,nodist_fincludeHEADERS,gfor_cHEADERS}
make -C $CHOST/libgomp DESTDIR="$pkgdir" install-nodist_fincludeHEADERS
make -C gcc DESTDIR="$pkgdir" fortran.install-{common,man,info}
install -Dm755 gcc/f951 "$pkgdir/${_libdir}/f951"
ln -s gfortran "$pkgdir/usr/bin/f95"
# 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_gcc-objc() {
pkgdesc='Objective-C front-end for GCC'
depends=("gcc=$pkgver-$pkgrel")
provides=($pkgname-multilib)
replaces=($pkgname-multilib)
cd gcc-build
make DESTDIR="$pkgdir" -C $CHOST/libobjc install-headers
install -dm755 "$pkgdir/${_libdir}"
install -m755 gcc/cc1obj{,plus} "$pkgdir/${_libdir}/"
# 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_gcc-ada() {
pkgdesc='Ada front-end for GCC (GNAT)'
depends=("gcc=$pkgver-$pkgrel")
provides=($pkgname-multilib)
replaces=($pkgname-multilib)
options+=(staticlibs)
cd gcc-build/gcc
make DESTDIR="$pkgdir" ada.install-{common,info}
install -m755 gnat1 "$pkgdir/${_libdir}"
cd "$srcdir"/gcc-build/$CHOST/libada
make DESTDIR="${pkgdir}" INSTALL="install" \
INSTALL_DATA="install -m644" install-libada
cd "$srcdir"/gcc-build/$CHOST/32/libada
make DESTDIR="${pkgdir}" INSTALL="install" \
INSTALL_DATA="install -m644" install-libada
ln -s gcc "$pkgdir/usr/bin/gnatgcc"
# insist on dynamic linking, but keep static libraries because gnatmake complains
mv "$pkgdir"/${_libdir}/adalib/libgna{rl,t}-${_majorver}.so "$pkgdir/usr/lib"
ln -s libgnarl-${_majorver}.so "$pkgdir/usr/lib/libgnarl.so"
ln -s libgnat-${_majorver}.so "$pkgdir/usr/lib/libgnat.so"
rm -f "$pkgdir"/${_libdir}/adalib/libgna{rl,t}.so
install -d "$pkgdir/usr/lib32/"
mv "$pkgdir"/${_libdir}/32/adalib/libgna{rl,t}-${_majorver}.so "$pkgdir/usr/lib32"
ln -s libgnarl-${_majorver}.so "$pkgdir/usr/lib32/libgnarl.so"
ln -s libgnat-${_majorver}.so "$pkgdir/usr/lib32/libgnat.so"
rm -f "$pkgdir"/${_libdir}/32/adalib/libgna{rl,t}.so
# 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_gcc-go() {
pkgdesc='Go front-end for GCC'
depends=("gcc=$pkgver-$pkgrel")
provides=("go=1.12.2" $pkgname-multilib)
replaces=($pkgname-multilib)
conflicts=(go)
cd gcc-build
make -C $CHOST/libgo DESTDIR="$pkgdir" install-exec-am
make -C $CHOST/32/libgo DESTDIR="$pkgdir" install-exec-am
make DESTDIR="$pkgdir" install-gotools
make -C gcc DESTDIR="$pkgdir" go.install-{common,man,info}
rm -f "$pkgdir"/usr/lib{,32}/libgo.so*
install -Dm755 gcc/go1 "$pkgdir/${_libdir}/go1"
# 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_lib32-gcc-libs() {
pkgdesc='32-bit runtime libraries shipped by GCC'
depends=('lib32-glibc>=2.27')
provides=(libgo.so libgfortran.so libubsan.so libasan.so)
groups=(multilib-devel)
options=(!emptydirs !strip)
cd gcc-build
make -C $CHOST/32/libgcc DESTDIR="$pkgdir" install-shared
rm -f "$pkgdir/$_libdir/32/libgcc_eh.a"
for lib in libatomic \
libgfortran \
libgo \
libgomp \
libitm \
libquadmath \
libsanitizer/{a,l,ub}san \
libstdc++-v3/src \
libvtv; do
make -C $CHOST/32/$lib DESTDIR="$pkgdir" install-toolexeclibLTLIBRARIES
done
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
# Install Runtime Library Exception
install -Dm644 "$srcdir/gcc/COPYING.RUNTIME" \
"$pkgdir/usr/share/licenses/lib32-gcc-libs/RUNTIME.LIBRARY.EXCEPTION"
}
package_gcc-d() {
pkgdesc="D frontend for GCC"
depends=("gcc=$pkgver-$pkgrel")
provides=(gdc)
replaces=(gdc)
options=('staticlibs')
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/"
}

422
gcc/PKGBUILD-arch.new Normal file
View File

@ -0,0 +1,422 @@
# Maintainer: Giancarlo Razzolini <grazzolini@archlinux.org>
# Maintainer: Frederik Schwan <freswa at archlinux dot org>
# Contributor: Bartłomiej Piotrowski <bpiotrowski@archlinux.org>
# Contributor: Allan McRae <allan@archlinux.org>
# Contributor: Daniel Kozak <kozzi11@gmail.com>
# 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 gcc-fortran gcc-objc gcc-ada gcc-go lib32-gcc-libs gcc-d)
pkgver=11.2.0
_majorver=${pkgver%%.*}
_islver=0.24
pkgrel=3
pkgdesc='The GNU Compiler Collection'
arch=(x86_64)
license=(GPL LGPL FDL custom)
url='https://gcc.gnu.org'
makedepends=(binutils libmpc gcc-ada doxygen lib32-glibc lib32-gcc-libs python git libxcrypt zstd)
checkdepends=(dejagnu inetutils tcl expect python-pytest)
options=(!emptydirs !lto debug)
_libdir=usr/lib/gcc/$CHOST/${pkgver%%+*}
# _commit=6beb39ee6c465c21d0cc547fd66b445100cdcc35
# source=(git://gcc.gnu.org/git/gcc.git#commit=$_commit
source=(https://sourceware.org/pub/gcc/releases/gcc-${pkgver}/gcc-${pkgver}.tar.xz{,.sig}
https://libisl.sourceforge.io/isl-${_islver}.tar.xz
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'
'SKIP'
'043105cc544f416b48736fff8caf077fb0663a717d06b1113f16e391ac99ebad'
'de48736f6e4153f03d0a5d38ceb6c6fdb7f054e8f47ddd6af0a3dbf14f27b931'
'2513c6d9984dd0a2058557bf00f06d8d5181734e41dcfe07be7ed86f2959622a'
'c86372c207d174c0918d4aedf1cb79f7fc093649eb1ad8d9450dccc46849d308'
'1773f5137f08ac1f48f0f7297e324d5d868d55201c03068670ee4602babdef2f')
prepare() {
[[ ! -d gcc ]] && ln -s gcc-${pkgver/+/-} gcc
cd gcc
# link isl for in-tree build
ln -s ../isl-${_islver} isl
# Do not run fixincludes
sed -i 's@\./fixinc\.sh@-c true@' gcc/Makefile.in
# Arch Linux installs x86_64 libraries /lib
sed -i '/m64=/s/lib64/lib/' gcc/config/i386/t-linux64
# hack! - some configure tests for header files using "$CPP $CPPFLAGS"
sed -i "/ac_cpp=/s/\$CPPFLAGS/\$CPPFLAGS -O2/" {libiberty,gcc}/configure
# D hacks
patch -Np1 -i "$srcdir/gdc_phobos_path.patch"
# Reproducible gcc-ada
patch -Np0 < "$srcdir/gcc-ada-repro.patch"
mkdir -p "$srcdir/gcc-build"
}
build() {
cd gcc-build
# Credits @allanmcrae
# https://github.com/allanmcrae/toolchain/blob/f18604d70c5933c31b51a320978711e4e6791cf1/gcc/PKGBUILD
# TODO: properly deal with the build issues resulting from this
CFLAGS=${CFLAGS/-Werror=format-security/}
CXXFLAGS=${CXXFLAGS/-Werror=format-security/}
"$srcdir/gcc/configure" --prefix=/usr \
--libdir=/usr/lib \
--libexecdir=/usr/lib \
--mandir=/usr/share/man \
--infodir=/usr/share/info \
--with-bugurl=https://bugs.archlinux.org/ \
--enable-languages=c,c++,ada,fortran,go,lto,objc,obj-c++,d \
--with-isl \
--with-linker-hash-style=gnu \
--with-system-zlib \
--enable-__cxa_atexit \
--enable-cet=auto \
--enable-checking=release \
--enable-clocale=gnu \
--enable-default-pie \
--enable-default-ssp \
--enable-gnu-indirect-function \
--enable-gnu-unique-object \
--enable-linker-build-id \
--enable-lto \
--enable-multilib \
--enable-pgo-build=lto \
--enable-plugin \
--enable-shared \
--enable-threads=posix \
--disable-libssp \
--disable-libstdcxx-pch \
--disable-werror \
--with-build-config=bootstrap-lto \
--enable-link-serialization=1 \
gdc_include_dir=/usr/include/dlang/gdc
# see https://bugs.archlinux.org/task/71777 for rationale re *FLAGS handling
make -O STAGE1_CFLAGS="-O2" \
BOOT_CFLAGS="$CFLAGS" \
BOOT_LDFLAGS="$LDFLAGS" \
LDFLAGS_FOR_TARGET="$LDFLAGS"
# make documentation
make -O -C $CHOST/libstdc++-v3/doc doc-man-doxygen
}
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"
}
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
libubsan.so libasan.so libtsan.so liblsan.so)
replaces=($pkgname-multilib libgphobos)
cd gcc-build
make -C $CHOST/libgcc DESTDIR="$pkgdir" install-shared
rm -f "$pkgdir/$_libdir/libgcc_eh.a"
for lib in libatomic \
libgfortran \
libgo \
libgomp \
libitm \
libquadmath \
libsanitizer/{a,l,ub,t}san \
libstdc++-v3/src \
libvtv; do
make -C $CHOST/$lib DESTDIR="$pkgdir" install-toolexeclibLTLIBRARIES
done
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
make -C $CHOST/$lib DESTDIR="$pkgdir" install-info
done
# remove files provided by lib32-gcc-libs
rm -rf "$pkgdir"/usr/lib32/
# Install Runtime Library Exception
install -Dm644 "$srcdir/gcc/COPYING.RUNTIME" \
"$pkgdir/usr/share/licenses/gcc-libs/RUNTIME.LIBRARY.EXCEPTION"
}
package_gcc() {
pkgdesc="The GNU Compiler Collection - C and C++ frontends"
depends=("gcc-libs=$pkgver-$pkgrel" 'binutils>=2.28' libmpc zstd)
groups=('base-devel')
optdepends=('lib32-gcc-libs: for generating code for 32-bit ABI')
provides=($pkgname-multilib)
replaces=($pkgname-multilib)
options=(!emptydirs staticlibs debug)
cd gcc-build
make -C gcc DESTDIR="$pkgdir" install-driver install-cpp install-gcc-ar \
c++.install-common install-headers install-plugin install-lto-wrapper
install -m755 -t "$pkgdir/usr/bin/" gcc/gcov{,-tool}
install -m755 -t "$pkgdir/${_libdir}/" gcc/{cc1,cc1plus,collect2,lto1}
make -C $CHOST/libgcc DESTDIR="$pkgdir" install
make -C $CHOST/32/libgcc DESTDIR="$pkgdir" install
rm -f "$pkgdir"/usr/lib{,32}/libgcc_s.so*
make -C $CHOST/libstdc++-v3/src DESTDIR="$pkgdir" install
make -C $CHOST/libstdc++-v3/include DESTDIR="$pkgdir" install
make -C $CHOST/libstdc++-v3/libsupc++ DESTDIR="$pkgdir" install
make -C $CHOST/libstdc++-v3/python DESTDIR="$pkgdir" install
make -C $CHOST/32/libstdc++-v3/src DESTDIR="$pkgdir" install
make -C $CHOST/32/libstdc++-v3/include DESTDIR="$pkgdir" install
make -C $CHOST/32/libstdc++-v3/libsupc++ DESTDIR="$pkgdir" install
make DESTDIR="$pkgdir" install-libcc1
install -d "$pkgdir/usr/share/gdb/auto-load/usr/lib"
mv "$pkgdir"/usr/lib/libstdc++.so.6.*-gdb.py \
"$pkgdir/usr/share/gdb/auto-load/usr/lib/"
rm "$pkgdir"/usr/lib{,32}/libstdc++.so*
make DESTDIR="$pkgdir" install-fixincludes
make -C gcc DESTDIR="$pkgdir" install-mkheaders
make -C lto-plugin DESTDIR="$pkgdir" install
install -dm755 "$pkgdir"/usr/lib/bfd-plugins/
ln -s /${_libdir}/liblto_plugin.so \
"$pkgdir/usr/lib/bfd-plugins/"
make -C $CHOST/libgomp DESTDIR="$pkgdir" install-nodist_{libsubinclude,toolexeclib}HEADERS
make -C $CHOST/libitm DESTDIR="$pkgdir" install-nodist_toolexeclibHEADERS
make -C $CHOST/libquadmath DESTDIR="$pkgdir" install-nodist_libsubincludeHEADERS
make -C $CHOST/libsanitizer DESTDIR="$pkgdir" install-nodist_{saninclude,toolexeclib}HEADERS
make -C $CHOST/libsanitizer/asan DESTDIR="$pkgdir" install-nodist_toolexeclibHEADERS
make -C $CHOST/libsanitizer/tsan DESTDIR="$pkgdir" install-nodist_toolexeclibHEADERS
make -C $CHOST/libsanitizer/lsan DESTDIR="$pkgdir" install-nodist_toolexeclibHEADERS
make -C $CHOST/32/libgomp DESTDIR="$pkgdir" install-nodist_toolexeclibHEADERS
make -C $CHOST/32/libitm DESTDIR="$pkgdir" install-nodist_toolexeclibHEADERS
make -C $CHOST/32/libsanitizer DESTDIR="$pkgdir" install-nodist_{saninclude,toolexeclib}HEADERS
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
make -C libcpp DESTDIR="$pkgdir" install
make -C gcc DESTDIR="$pkgdir" install-po
# many packages expect this symlink
ln -s gcc "$pkgdir"/usr/bin/cc
# POSIX conformance launcher scripts for c89 and c99
install -Dm755 "$srcdir/c89" "$pkgdir/usr/bin/c89"
install -Dm755 "$srcdir/c99" "$pkgdir/usr/bin/c99"
# install the libstdc++ man pages
make -C $CHOST/libstdc++-v3/doc DESTDIR="$pkgdir" doc-install-man
# remove files provided by lib32-gcc-libs
rm -f "$pkgdir"/usr/lib32/lib{stdc++,gcc_s}.so
# byte-compile python libraries
python -m compileall "$pkgdir/usr/share/gcc-${pkgver%%+*}/"
python -O -m compileall "$pkgdir/usr/share/gcc-${pkgver%%+*}/"
# 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_gcc-fortran() {
pkgdesc='Fortran front-end for GCC'
depends=("gcc=$pkgver-$pkgrel")
provides=($pkgname-multilib)
replaces=($pkgname-multilib)
cd gcc-build
make -C $CHOST/libgfortran DESTDIR="$pkgdir" install-cafexeclibLTLIBRARIES \
install-{toolexeclibDATA,nodist_fincludeHEADERS,gfor_cHEADERS}
make -C $CHOST/32/libgfortran DESTDIR="$pkgdir" install-cafexeclibLTLIBRARIES \
install-{toolexeclibDATA,nodist_fincludeHEADERS,gfor_cHEADERS}
make -C $CHOST/libgomp DESTDIR="$pkgdir" install-nodist_fincludeHEADERS
make -C gcc DESTDIR="$pkgdir" fortran.install-{common,man,info}
install -Dm755 gcc/f951 "$pkgdir/${_libdir}/f951"
ln -s gfortran "$pkgdir/usr/bin/f95"
# 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_gcc-objc() {
pkgdesc='Objective-C front-end for GCC'
depends=("gcc=$pkgver-$pkgrel")
provides=($pkgname-multilib)
replaces=($pkgname-multilib)
cd gcc-build
make DESTDIR="$pkgdir" -C $CHOST/libobjc install-headers
install -dm755 "$pkgdir/${_libdir}"
install -m755 gcc/cc1obj{,plus} "$pkgdir/${_libdir}/"
# 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_gcc-ada() {
pkgdesc='Ada front-end for GCC (GNAT)'
depends=("gcc=$pkgver-$pkgrel")
provides=($pkgname-multilib)
replaces=($pkgname-multilib)
options=(!emptydirs staticlibs debug)
cd gcc-build/gcc
make DESTDIR="$pkgdir" ada.install-{common,info}
install -m755 gnat1 "$pkgdir/${_libdir}"
cd "$srcdir"/gcc-build/$CHOST/libada
make DESTDIR="${pkgdir}" INSTALL="install" \
INSTALL_DATA="install -m644" install-libada
cd "$srcdir"/gcc-build/$CHOST/32/libada
make DESTDIR="${pkgdir}" INSTALL="install" \
INSTALL_DATA="install -m644" install-libada
ln -s gcc "$pkgdir/usr/bin/gnatgcc"
# insist on dynamic linking, but keep static libraries because gnatmake complains
mv "$pkgdir"/${_libdir}/adalib/libgna{rl,t}-${_majorver}.so "$pkgdir/usr/lib"
ln -s libgnarl-${_majorver}.so "$pkgdir/usr/lib/libgnarl.so"
ln -s libgnat-${_majorver}.so "$pkgdir/usr/lib/libgnat.so"
rm -f "$pkgdir"/${_libdir}/adalib/libgna{rl,t}.so
install -d "$pkgdir/usr/lib32/"
mv "$pkgdir"/${_libdir}/32/adalib/libgna{rl,t}-${_majorver}.so "$pkgdir/usr/lib32"
ln -s libgnarl-${_majorver}.so "$pkgdir/usr/lib32/libgnarl.so"
ln -s libgnat-${_majorver}.so "$pkgdir/usr/lib32/libgnat.so"
rm -f "$pkgdir"/${_libdir}/32/adalib/libgna{rl,t}.so
# 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_gcc-go() {
pkgdesc='Go front-end for GCC'
depends=("gcc=$pkgver-$pkgrel")
provides=("go=1.12.2" $pkgname-multilib)
replaces=($pkgname-multilib)
conflicts=(go)
cd gcc-build
make -C $CHOST/libgo DESTDIR="$pkgdir" install-exec-am
make -C $CHOST/32/libgo DESTDIR="$pkgdir" install-exec-am
make DESTDIR="$pkgdir" install-gotools
make -C gcc DESTDIR="$pkgdir" go.install-{common,man,info}
rm -f "$pkgdir"/usr/lib{,32}/libgo.so*
install -Dm755 gcc/go1 "$pkgdir/${_libdir}/go1"
# 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_lib32-gcc-libs() {
pkgdesc='32-bit runtime libraries shipped by GCC'
depends=('lib32-glibc>=2.27')
provides=(libgo.so libgfortran.so libubsan.so libasan.so)
groups=(multilib-devel)
options=(!emptydirs !strip)
cd gcc-build
make -C $CHOST/32/libgcc DESTDIR="$pkgdir" install-shared
rm -f "$pkgdir/$_libdir/32/libgcc_eh.a"
for lib in libatomic \
libgfortran \
libgo \
libgomp \
libitm \
libquadmath \
libsanitizer/{a,l,ub}san \
libstdc++-v3/src \
libvtv; do
make -C $CHOST/32/$lib DESTDIR="$pkgdir" install-toolexeclibLTLIBRARIES
done
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
# Install Runtime Library Exception
install -Dm644 "$srcdir/gcc/COPYING.RUNTIME" \
"$pkgdir/usr/share/licenses/lib32-gcc-libs/RUNTIME.LIBRARY.EXCEPTION"
}
package_gcc-d() {
pkgdesc="D frontend for GCC"
depends=("gcc=$pkgver-$pkgrel")
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/"
}

View File

@ -6,3 +6,6 @@ git
dejagnu
inetutils
python
tcl
expect
python-pytest

View File

@ -1 +1,2 @@
gpg -v --recv-key 6C35B99309B5FA62
gpg -v --recv-key 3AB00996FC26A641

View File

@ -1,5 +1,5 @@
gcc-11.1.0.tar.xz
gcc-11.1.0.tar.xz.sig
gcc-11.2.0.tar.xz
gcc-11.2.0.tar.xz.sig
isl-0.24.tar.xz
c89
c99

7
gcc/sums.3 Normal file
View File

@ -0,0 +1,7 @@
gcc-11.2.0.tar.xz
gcc-11.2.0.tar.xz.sig
isl-0.24.tar.xz
c89
c99
gdc_phobos_path.patch
gcc-ada-repro.patch

View File

@ -1,3 +1,8 @@
real 307m5.649s
user 980m28.884s
sys 78m37.832s
real 307m5.649s
user 980m28.884s
sys 78m37.832s

View File

@ -1,8 +1,8 @@
#!/usr/bin/bash
# JOBoRun : Jwm OpenBox Obarun RUNit
# Maintainer : Joe Bo Run <joborun@disroot.org>
# PkgSource : url="https://gittea.disroot.org/joborun/jobcore/$pkgname"
# PkgSource : url="https://gittea.disroot.org/joborun/jobextra/$pkgname"
# PkgSource : url="https://gittea.disroot.org/joborun-pkg/jobcore/$pkgname"
# PkgSource : url="https://gittea.disroot.org/joborun-pkg/jobextra/$pkgname"
#-----------------------------------------| DESCRIPTION |---------------------------------------
pkgname=gdbm

View File

@ -1,7 +1,7 @@
#!/usr/bin/bash
# JOBoRun : Jwm OpenBox Obarun RUNit
# Maintainer : Joe Bo Run <joborun@disroot.org>
# PkgSource : url="https://gittea.disroot.org/joborun/jobcore/$pkgname"
# PkgSource : url="https://gittea.disroot.org/joborun-pkg/jobcore/$pkgname"
#-----------------------------------------| DESCRIPTION |---------------------------------------
pkgname=gettext

View File

@ -1,17 +1,17 @@
#!/usr/bin/bash
# JOBoRun : Jwm OpenBox Obarun RUNit
# Maintainer : Joe Bo Run <joborun@disroot.org>
# PkgSource : url="https://gittea.disroot.org/joborun/jobcore/$pkgname"
# PkgSource : url="https://gittea.disroot.org/joborun-pkg/jobcore/$pkgname"
#-----------------------------------------| DESCRIPTION |---------------------------------------
pkgbase=glib2
pkgname=(glib2 glib2-docs)
pkgver=2.70.3
pkgver=2.70.4
pkgrel=01
pkgdesc="Low level core library"
url="https://wiki.gnome.org/Projects/GLib"
arch=(x86_64)
depends=(pcre libffi util-linux-libs zlib libsysprof-capture)
depends=(pcre libffi util-linux-libs zlib) # libsysprof-capture)
makedepends=(gettext gtk-doc shared-mime-info python libelf git util-linux
meson dbus)
checkdepends=(desktop-file-utils)
@ -21,8 +21,13 @@ source=("git+https://gitlab.gnome.org/GNOME/glib.git?signed#tag=$pkgver"
prepare() {
cd glib
# Unicode 14
git cherry-pick -n ab895d91d570a18ac74d6f4f6390488210d8fb15
# Suppress noise from glib-compile-schemas.hook
git apply -3 ../0001-glib-compile-schemas-Remove-noisy-deprecation-warnin.patch
}
build() {
@ -31,15 +36,15 @@ build() {
-D glib_debug=disabled \
-D selinux=disabled \
-D man=true \
-D sysprof=enabled \
-D sysprof=disabled \
-D gtk_doc=true
meson compile -C build
}
check() {
meson test -C build --no-suite flaky --no-suite slow --print-errorlogs
}
#
#check() {
# meson test -C build --no-suite flaky --no-suite slow --print-errorlogs
#}
#
package_glib2() {
depends+=(libmount.so libffi.so)
provides+=(libgio-2.0.so libglib-2.0.so libgmodule-2.0.so libgobject-2.0.so

View File

@ -3,7 +3,7 @@
pkgbase=glib2
pkgname=(glib2 glib2-docs)
pkgver=2.70.3
pkgver=2.70.4
pkgrel=1
pkgdesc="Low level core library"
url="https://wiki.gnome.org/Projects/GLib"
@ -26,6 +26,9 @@ validpgpkeys=('923B7025EE03C1C59F42684CF0942E894B2EAFA0') # Philip Withnall (htt
prepare() {
cd glib
# Unicode 14
git cherry-pick -n ab895d91d570a18ac74d6f4f6390488210d8fb15
# Suppress noise from glib-compile-schemas.hook
git apply -3 ../0001-glib-compile-schemas-Remove-noisy-deprecation-warnin.patch
}

84
glib2/PKGBUILD-tmp Normal file
View File

@ -0,0 +1,84 @@
#!/usr/bin/bash
# JOBoRun : Jwm OpenBox Obarun RUNit
# Maintainer : Joe Bo Run <joborun@disroot.org>
# PkgSource : url="https://gittea.disroot.org/joborun/jobcore/$pkgname"
#-----------------------------------------| DESCRIPTION |---------------------------------------
pkgbase=glib2
pkgname=(glib2 glib2-docs)
pkgver=2.70.3
pkgrel=01
pkgdesc="Low level core library"
url="https://wiki.gnome.org/Projects/GLib"
arch=(x86_64)
depends=(pcre libffi util-linux-libs zlib libsysprof-capture)
makedepends=(gettext gtk-doc shared-mime-info python libelf git util-linux
meson dbus)
checkdepends=(desktop-file-utils)
source=("git+https://gitlab.gnome.org/GNOME/glib.git?signed#tag=$pkgver"
0001-glib-compile-schemas-Remove-noisy-deprecation-warnin.patch
glib-compile-schemas.hook gio-querymodules.{hook,script})
prepare() {
cd glib
# Suppress noise from glib-compile-schemas.hook
git apply -3 ../0001-glib-compile-schemas-Remove-noisy-deprecation-warnin.patch
}
build() {
CFLAGS+=" -DG_DISABLE_CAST_CHECKS"
arch-meson glib build \
-D glib_debug=disabled \
-D selinux=disabled \
-D man=true \
-D sysprof=enabled \
-D gtk_doc=true
meson compile -C build
}
check() {
meson test -C build --no-suite flaky --no-suite slow --print-errorlogs
}
package_glib2() {
depends+=(libmount.so libffi.so)
provides+=(libgio-2.0.so libglib-2.0.so libgmodule-2.0.so libgobject-2.0.so
libgthread-2.0.so)
optdepends=('python: gdbus-codegen, glib-genmarshal, glib-mkenums, gtester-report'
'libelf: gresource inspection tool')
meson install -C build --destdir "$pkgdir"
install -Dt "$pkgdir/usr/share/libalpm/hooks" -m644 *.hook
install -D gio-querymodules.script "$pkgdir/usr/share/libalpm/scripts/gio-querymodules"
python -m compileall -d /usr/share/glib-2.0/codegen \
"$pkgdir/usr/share/glib-2.0/codegen"
python -O -m compileall -d /usr/share/glib-2.0/codegen \
"$pkgdir/usr/share/glib-2.0/codegen"
# Split docs
mkdir -p docs/usr/share
mv {"$pkgdir",docs}/usr/share/gtk-doc
}
package_glib2-docs() {
pkgdesc="Documentation for GLib"
depends=()
license+=(custom)
mv -t "$pkgdir" docs/*
install -Dt "$pkgdir/usr/share/licenses/$pkgname" -m644 glib/docs/reference/COPYING
}
#---- license gpg-key sha256sums ----
license=(LGPL)
validpgpkeys=('923B7025EE03C1C59F42684CF0942E894B2EAFA0') # Philip Withnall (https://endlessos.org/) <pwithnall@endlessos.org>
sha256sums=(SKIP
edb5e34ac0a77431978cab55b98e39754d73455e28a38f5003424e943bbe5fff # 0001-glib-compile-schemas-Remove-noisy-deprecation-warnin.patch
64ae5597dda3cc160fc74be038dbe6267d41b525c0c35da9125fbf0de27f9b25 # glib-compile-schemas.hook
2a9f9b8235f48e3b7d0f6cfcbc76cd2116c45f28692cac4bd61074c495bd5eb7 # gio-querymodules.hook
92d08db5aa30bda276bc3d718e7ff9dd01dc40dcab45b359182dcc290054e24e) # gio-querymodules.script

View File

@ -1 +1,2 @@
disabled checks as some of them fail, will try next edition
Since sysprof is the only pkg needed as a glib2 dependency for the base chroot of Joborun, not even a make dependency possibly to avert tests from failing, glib2 has been rebuilt Feb6-22 wuthout the dependency. Sysprof will not build without systemd present. LFS builds glib2 without it, so why shouldn't we do the same?

5
glib2/time Normal file
View File

@ -0,0 +1,5 @@
real 4m41.537s
user 6m52.058s
sys 0m5.919s

View File

@ -0,0 +1,308 @@
From a64afc225240b2b27129ccfb0516d7c958b98040 Mon Sep 17 00:00:00 2001
From: Florian Weimer <fweimer@redhat.com>
Date: Wed, 21 Apr 2021 11:50:43 +0200
Subject: [PATCH 364/576] nptl_db: Support different libpthread/ld.so load
orders (bug 27744)
libthread_db is loaded once GDB encounters libpthread, and at this
point, ld.so may not have been processed by GDB yet. As a result,
_rtld_global cannot be accessed by regular means from libthread_db.
To make this work until GDB can be fixed, acess _rtld_global through
a pointer stored in libpthread.
The new test does not reproduce bug 27744 with
--disable-hardcoded-path-in-tests, but is still a valid smoke test.
With --enable-hardcoded-path-in-tests, it is necessary to avoid
add-symbol-file because this can tickle a GDB bug.
Fixes commit 1daccf403b1bd86370eb94edca794dc106d02039 ("nptl: Move
stack list variables into _rtld_global").
Tested-by: Emil Velikov <emil.velikov@collabora.com>
---
nptl/Makefile | 19 +++-
nptl/pthread_create.c | 8 ++
nptl/tst-pthread-gdb-attach-static.c | 1 +
nptl/tst-pthread-gdb-attach.c | 143 +++++++++++++++++++++++++++
nptl_db/structs.def | 3 +-
nptl_db/td_init.c | 15 +--
nptl_db/thread_dbP.h | 2 +
7 files changed, 180 insertions(+), 11 deletions(-)
create mode 100644 nptl/tst-pthread-gdb-attach-static.c
create mode 100644 nptl/tst-pthread-gdb-attach.c
diff --git a/nptl/Makefile b/nptl/Makefile
index 8fe92d43fa..e665d37e52 100644
--- a/nptl/Makefile
+++ b/nptl/Makefile
@@ -313,7 +313,8 @@ tests = tst-attr2 tst-attr3 tst-default-attr \
tst-thread-affinity-sched \
tst-pthread-defaultattr-free \
tst-pthread-attr-sigmask \
- tst-pthread-timedlock-lockloop
+ tst-pthread-timedlock-lockloop \
+ tst-pthread-gdb-attach tst-pthread-gdb-attach-static
tests-container = tst-pthread-getattr
@@ -359,6 +360,19 @@ CPPFLAGS-test-cond-printers.c := $(CFLAGS-printers-tests)
CPPFLAGS-test-rwlockattr-printers.c := $(CFLAGS-printers-tests)
CPPFLAGS-test-rwlock-printers.c := $(CFLAGS-printers-tests)
+# Reuse the CFLAGS setting for the GDB attaching test. It needs
+# debugging information.
+CFLAGS-tst-pthread-gdb-attach.c := $(CFLAGS-printers-tests)
+CPPFLAGS-tst-pthread-gdb-attach.c := $(CFLAGS-printers-tests)
+ifeq ($(build-shared)$(build-hardcoded-path-in-tests),yesno)
+CPPFLAGS-tst-pthread-gdb-attach.c += -DDO_ADD_SYMBOL_FILE=1
+else
+CPPFLAGS-tst-pthread-gdb-attach.c += -DDO_ADD_SYMBOL_FILE=0
+endif
+CFLAGS-tst-pthread-gdb-attach-static.c := $(CFLAGS-printers-tests)
+CPPFLAGS-tst-pthread-gdb-attach-static.c := \
+ $(CFLAGS-printers-tests) -DDO_ADD_SYMBOL_FILE=0
+
ifeq ($(build-shared),yes)
tests-printers-libs := $(shared-thread-library)
else
@@ -430,7 +444,8 @@ link-libc-static := $(common-objpfx)libc.a $(static-gnulib) \
tests-static += tst-stackguard1-static \
tst-cancel24-static \
tst-mutex8-static tst-mutexpi8-static tst-sem11-static \
- tst-sem12-static tst-cond11-static
+ tst-sem12-static tst-cond11-static \
+ tst-pthread-gdb-attach-static
tests += tst-cancel24-static
diff --git a/nptl/pthread_create.c b/nptl/pthread_create.c
index 6c645aff48..f13d8e44a4 100644
--- a/nptl/pthread_create.c
+++ b/nptl/pthread_create.c
@@ -51,6 +51,14 @@ static td_thr_events_t __nptl_threads_events __attribute_used__;
/* Pointer to descriptor with the last event. */
static struct pthread *__nptl_last_event __attribute_used__;
+#ifdef SHARED
+/* This variable is used to access _rtld_global from libthread_db. If
+ GDB loads libpthread before ld.so, it is not possible to resolve
+ _rtld_global directly during libpthread initialization. */
+static struct rtld_global *__nptl_rtld_global __attribute_used__
+ = &_rtld_global;
+#endif
+
/* Number of threads running. */
unsigned int __nptl_nthreads = 1;
diff --git a/nptl/tst-pthread-gdb-attach-static.c b/nptl/tst-pthread-gdb-attach-static.c
new file mode 100644
index 0000000000..e159632cac
--- /dev/null
+++ b/nptl/tst-pthread-gdb-attach-static.c
@@ -0,0 +1 @@
+#include "tst-pthread-gdb-attach.c"
diff --git a/nptl/tst-pthread-gdb-attach.c b/nptl/tst-pthread-gdb-attach.c
new file mode 100644
index 0000000000..0603ad844d
--- /dev/null
+++ b/nptl/tst-pthread-gdb-attach.c
@@ -0,0 +1,143 @@
+/* Smoke testing GDB process attach with thread-local variable access.
+ Copyright (C) 2021 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <https://www.gnu.org/licenses/>. */
+
+/* This test runs GDB against a forked copy of itself, to check
+ whether libthread_db can be loaded, and that access to thread-local
+ variables works. */
+
+#include <errno.h>
+#include <stdlib.h>
+#include <support/check.h>
+#include <support/support.h>
+#include <support/temp_file.h>
+#include <support/test-driver.h>
+#include <support/xstdio.h>
+#include <support/xthread.h>
+#include <support/xunistd.h>
+#include <unistd.h>
+
+/* Starts out as zero, changed to 1 or 2 by the debugger, depending on
+ the thread. */
+__thread volatile int altered_by_debugger;
+
+/* Writes the GDB script to run the test to PATH. */
+static void
+write_gdbscript (const char *path, int tested_pid)
+{
+ FILE *fp = xfopen (path, "w");
+ fprintf (fp,
+ "set trace-commands on\n"
+ "set debug libthread-db 1\n"
+#if DO_ADD_SYMBOL_FILE
+ /* Do not do this unconditionally to work around a GDB
+ assertion failure: ../../gdb/symtab.c:6404:
+ internal-error: CORE_ADDR get_msymbol_address(objfile*,
+ const minimal_symbol*): Assertion `(objf->flags &
+ OBJF_MAINLINE) == 0' failed. */
+ "add-symbol-file %1$s/nptl/tst-pthread-gdb-attach\n"
+#endif
+ "set auto-load safe-path %1$s/nptl_db\n"
+ "set libthread-db-search-path %1$s/nptl_db\n"
+ "attach %2$d\n",
+ support_objdir_root, tested_pid);
+ fputs ("break debugger_inspection_point\n"
+ "continue\n"
+ "thread 1\n"
+ "print altered_by_debugger\n"
+ "print altered_by_debugger = 1\n"
+ "thread 2\n"
+ "print altered_by_debugger\n"
+ "print altered_by_debugger = 2\n"
+ "continue\n",
+ fp);
+ xfclose (fp);
+}
+
+/* The test sets a breakpoint on this function and alters the
+ altered_by_debugger thread-local variable. */
+void __attribute__ ((weak))
+debugger_inspection_point (void)
+{
+}
+
+/* Thread function for the test thread in the subprocess. */
+static void *
+subprocess_thread (void *closure)
+{
+ /* Wait until altered_by_debugger changes the value away from 0. */
+ while (altered_by_debugger == 0)
+ {
+ usleep (100 * 1000);
+ debugger_inspection_point ();
+ }
+
+ TEST_COMPARE (altered_by_debugger, 2);
+ return NULL;
+}
+
+/* This function implements the subprocess under test. It creates a
+ second thread, waiting for its value to change to 2, and checks
+ that the main thread also changed its value to 1. */
+static void
+in_subprocess (void)
+{
+ pthread_t thr = xpthread_create (NULL, subprocess_thread, NULL);
+ TEST_VERIFY (xpthread_join (thr) == NULL);
+ TEST_COMPARE (altered_by_debugger, 1);
+ _exit (0);
+}
+
+static int
+do_test (void)
+{
+ pid_t tested_pid = xfork ();
+ if (tested_pid == 0)
+ in_subprocess ();
+ char *tested_pid_string = xasprintf ("%d", tested_pid);
+
+ char *gdbscript;
+ xclose (create_temp_file ("tst-pthread-gdb-attach-", &gdbscript));
+ write_gdbscript (gdbscript, tested_pid);
+
+ pid_t gdb_pid = xfork ();
+ if (gdb_pid == 0)
+ {
+ clearenv ();
+ xdup2 (STDOUT_FILENO, STDERR_FILENO);
+ execlp ("gdb", "gdb", "-nx", "-batch", "-x", gdbscript, NULL);
+ if (errno == ENOENT)
+ _exit (EXIT_UNSUPPORTED);
+ else
+ _exit (1);
+ }
+
+ int status;
+ TEST_COMPARE (xwaitpid (gdb_pid, &status, 0), gdb_pid);
+ if (WIFEXITED (status) && WEXITSTATUS (status) == EXIT_UNSUPPORTED)
+ /* gdb is not installed. */
+ return EXIT_UNSUPPORTED;
+ TEST_COMPARE (status, 0);
+ TEST_COMPARE (xwaitpid (tested_pid, &status, 0), tested_pid);
+ TEST_COMPARE (status, 0);
+
+ free (tested_pid_string);
+ free (gdbscript);
+ return 0;
+}
+
+#include <support/test-driver.c>
diff --git a/nptl_db/structs.def b/nptl_db/structs.def
index 999a9fc35a..8a613dd2f5 100644
--- a/nptl_db/structs.def
+++ b/nptl_db/structs.def
@@ -100,8 +100,7 @@ DB_STRUCT_FIELD (pthread, dtvp)
#endif
#if !(IS_IN (libpthread) && !defined SHARED)
-DB_STRUCT (rtld_global)
-DB_RTLD_VARIABLE (_rtld_global)
+DB_VARIABLE (__nptl_rtld_global)
#endif
DB_RTLD_GLOBAL_FIELD (dl_tls_dtv_slotinfo_list)
DB_RTLD_GLOBAL_FIELD (dl_stack_user)
diff --git a/nptl_db/td_init.c b/nptl_db/td_init.c
index 1d15681228..06b5adc5c2 100644
--- a/nptl_db/td_init.c
+++ b/nptl_db/td_init.c
@@ -33,13 +33,14 @@ td_init (void)
bool
__td_ta_rtld_global (td_thragent_t *ta)
{
- if (ta->ta_addr__rtld_global == 0
- && td_mod_lookup (ta->ph, LD_SO, SYM__rtld_global,
- &ta->ta_addr__rtld_global) != PS_OK)
+ if (ta->ta_addr__rtld_global == 0)
{
- ta->ta_addr__rtld_global = (void*)-1;
- return false;
+ psaddr_t rtldglobalp;
+ if (DB_GET_VALUE (rtldglobalp, ta, __nptl_rtld_global, 0) == TD_OK)
+ ta->ta_addr__rtld_global = rtldglobalp;
+ else
+ ta->ta_addr__rtld_global = (void *) -1;
}
- else
- return ta->ta_addr__rtld_global != (void*)-1;
+
+ return ta->ta_addr__rtld_global != (void *)-1;
}
diff --git a/nptl_db/thread_dbP.h b/nptl_db/thread_dbP.h
index 580a70c471..712fa3aeb6 100644
--- a/nptl_db/thread_dbP.h
+++ b/nptl_db/thread_dbP.h
@@ -108,6 +108,8 @@ struct td_thragent
# undef DB_SYMBOL
# undef DB_VARIABLE
+ psaddr_t ta_addr__rtld_global;
+
/* The method of locating a thread's th_unique value. */
enum
{
--
2.31.1

View File

@ -0,0 +1,135 @@
From f553dc066071a4465321fbc122bed8a75afd996b Mon Sep 17 00:00:00 2001
From: Florian Weimer <fweimer@redhat.com>
Date: Thu, 22 Apr 2021 11:07:43 +0200
Subject: [PATCH 405/576] nptl: Check for compatible GDB in
nptl/tst-pthread-gdb-attach
Also do not clear the subprocess environment, in case running
GDB needs certain environment variables.
---
nptl/tst-pthread-gdb-attach.c | 78 ++++++++++++++++++++++++++++++++++-
1 file changed, 76 insertions(+), 2 deletions(-)
diff --git a/nptl/tst-pthread-gdb-attach.c b/nptl/tst-pthread-gdb-attach.c
index 0603ad844d..901a120034 100644
--- a/nptl/tst-pthread-gdb-attach.c
+++ b/nptl/tst-pthread-gdb-attach.c
@@ -20,8 +20,12 @@
whether libthread_db can be loaded, and that access to thread-local
variables works. */
+#include <elf.h>
#include <errno.h>
+#include <fcntl.h>
+#include <stdbool.h>
#include <stdlib.h>
+#include <string.h>
#include <support/check.h>
#include <support/support.h>
#include <support/temp_file.h>
@@ -35,6 +39,49 @@
the thread. */
__thread volatile int altered_by_debugger;
+/* Common prefix between 32-bit and 64-bit ELF. */
+struct elf_prefix
+{
+ unsigned char e_ident[EI_NIDENT];
+ uint16_t e_type;
+ uint16_t e_machine;
+ uint32_t e_version;
+};
+_Static_assert (sizeof (struct elf_prefix) == EI_NIDENT + 8,
+ "padding in struct elf_prefix");
+
+/* Reads the ELF header from PATH. Returns true if the header can be
+ read, false if the file is too short. */
+static bool
+read_elf_header (const char *path, struct elf_prefix *elf)
+{
+ int fd = xopen (path, O_RDONLY, 0);
+ bool result = read (fd, elf, sizeof (*elf)) == sizeof (*elf);
+ xclose (fd);
+ return result;
+}
+
+/* Searches for "gdb" alongside the path variable. See execvpe. */
+static char *
+find_gdb (void)
+{
+ const char *path = getenv ("PATH");
+ if (path == NULL)
+ return NULL;
+ while (true)
+ {
+ const char *colon = strchrnul (path, ':');
+ char *candidate = xasprintf ("%.*s/gdb", (int) (colon - path), path);
+ if (access (candidate, X_OK) == 0)
+ return candidate;
+ free (candidate);
+ if (*colon == '\0')
+ break;
+ path = colon + 1;
+ }
+ return NULL;
+}
+
/* Writes the GDB script to run the test to PATH. */
static void
write_gdbscript (const char *path, int tested_pid)
@@ -105,6 +152,33 @@ in_subprocess (void)
static int
do_test (void)
{
+ char *gdb_path = find_gdb ();
+ if (gdb_path == NULL)
+ FAIL_UNSUPPORTED ("gdb command not found in PATH: %s", getenv ("PATH"));
+
+ /* Check that libthread_db is compatible with the gdb architecture
+ because gdb loads it via dlopen. */
+ {
+ char *threaddb_path = xasprintf ("%s/nptl_db/libthread_db.so",
+ support_objdir_root);
+ struct elf_prefix elf_threaddb;
+ TEST_VERIFY_EXIT (read_elf_header (threaddb_path, &elf_threaddb));
+ struct elf_prefix elf_gdb;
+ /* If the ELF header cannot be read or "gdb" is not an ELF file,
+ assume this is a wrapper script that can run. */
+ if (read_elf_header (gdb_path, &elf_gdb)
+ && memcmp (&elf_gdb, ELFMAG, SELFMAG) == 0)
+ {
+ if (elf_gdb.e_ident[EI_CLASS] != elf_threaddb.e_ident[EI_CLASS])
+ FAIL_UNSUPPORTED ("GDB at %s has wrong class", gdb_path);
+ if (elf_gdb.e_ident[EI_DATA] != elf_threaddb.e_ident[EI_DATA])
+ FAIL_UNSUPPORTED ("GDB at %s has wrong data", gdb_path);
+ if (elf_gdb.e_machine != elf_threaddb.e_machine)
+ FAIL_UNSUPPORTED ("GDB at %s has wrong machine", gdb_path);
+ }
+ free (threaddb_path);
+ }
+
pid_t tested_pid = xfork ();
if (tested_pid == 0)
in_subprocess ();
@@ -117,9 +191,8 @@ do_test (void)
pid_t gdb_pid = xfork ();
if (gdb_pid == 0)
{
- clearenv ();
xdup2 (STDOUT_FILENO, STDERR_FILENO);
- execlp ("gdb", "gdb", "-nx", "-batch", "-x", gdbscript, NULL);
+ execl (gdb_path, "gdb", "-nx", "-batch", "-x", gdbscript, NULL);
if (errno == ENOENT)
_exit (EXIT_UNSUPPORTED);
else
@@ -137,6 +210,7 @@ do_test (void)
free (tested_pid_string);
free (gdbscript);
+ free (gdb_path);
return 0;
}
--
2.31.1

View File

@ -0,0 +1,26 @@
From 6f3e54d404cfe1ba7d1444e6dfcfd77b102d9287 Mon Sep 17 00:00:00 2001
From: Florian Weimer <fweimer@redhat.com>
Date: Thu, 22 Apr 2021 19:53:15 +0200
Subject: [PATCH 409/576] nptl: Do not build nptl/tst-pthread-gdb-attach as PIE
---
nptl/Makefile | 3 +++
1 file changed, 3 insertions(+)
diff --git a/nptl/Makefile b/nptl/Makefile
index a3d1ef8d66..294bb2faa4 100644
--- a/nptl/Makefile
+++ b/nptl/Makefile
@@ -377,6 +377,9 @@ endif
CFLAGS-tst-pthread-gdb-attach-static.c := $(CFLAGS-printers-tests)
CPPFLAGS-tst-pthread-gdb-attach-static.c := \
$(CFLAGS-printers-tests) -DDO_ADD_SYMBOL_FILE=0
+# As of version 9.2, GDB cannot attach properly to PIE programs that
+# were launched with an explicit ld.so invocation.
+tst-pthread-gdb-attach-no-pie = yes
ifeq ($(build-shared),yes)
tests-printers-libs := $(shared-thread-library)
--
2.31.1

259
glibc/PKGBUILD Normal file
View File

@ -0,0 +1,259 @@
#!/usr/bin/bash
# JOBoRun : Jwm OpenBox Obarun RUNit
# Maintainer : Joe Bo Run <joborun@disroot.org>
# PkgSource : url="https://gittea.disroot.org/joborun-pkg/jobcore/$pkgname"
# PkgSource : url="https://gittea.disroot.org/joborun-pkg/jobextra/$pkgname"
# Website : https://pozol.eu
#-----------------------------------------| DESCRIPTION |---------------------------------------
# toolchain build order: linux-api-headers->glibc->binutils->gcc->glibc->binutils->gcc
# NOTE: valgrind requires rebuilt with each major glibc version
pkgbase=glibc
pkgname=(glibc lib32-glibc)
pkgver=2.35
pkgrel=02
arch=(x86_64)
url='https://www.gnu.org/software/libc'
makedepends=(git gd lib32-gcc-libs python)
optdepends=('perl: for mtrace')
options=(!strip staticlibs !lto)
#_commit=3de512be7ea6053255afed6154db9ee31d4e557a
#source=(git+https://sourceware.org/git/glibc.git#commit=$_commit
source=(https://ftp.gnu.org/gnu/glibc/glibc-$pkgver.tar.xz{,.sig}
locale.gen.txt
locale-gen
lib32-glibc.conf
sdt.h sdt-config.h
disable-clone3.diff)
prepare() {
mkdir -p glibc-build lib32-glibc-build
[[ -d glibc-$pkgver ]] && ln -s glibc-$pkgver glibc
cd glibc
# Disable clone3 syscall for now
# Can be removed when eletron{9,11,12} and discord are removed or patched:
# https://github.com/electron/electron/commit/993ecb5bdd5c57024c8718ca6203a8f924d6d574
# Patch src: https://patchwork.ozlabs.org/project/glibc/patch/87eebkf8ph.fsf@oldenburg.str.redhat.com/
patch -Np1 -i "${srcdir}"/disable-clone3.diff
}
build() {
local _configure_flags=(
--prefix=/usr
--with-headers=/usr/include
--with-bugurl=https://bugs.archlinux.org/
--enable-add-ons
--enable-bind-now
--enable-cet
--enable-kernel=4.4
--enable-lock-elision
--enable-multi-arch
--enable-stack-protector=strong
--enable-stackguard-randomization
--enable-static-pie
--enable-systemtap
--disable-profile
--disable-crypt
--disable-werror
)
cd "$srcdir/glibc-build"
echo "slibdir=/usr/lib" >> configparms
echo "rtlddir=/usr/lib" >> configparms
echo "sbindir=/usr/bin" >> configparms
echo "rootsbindir=/usr/bin" >> configparms
# Credits @allanmcrae
# https://github.com/allanmcrae/toolchain/blob/f18604d70c5933c31b51a320978711e4e6791cf1/glibc/PKGBUILD
# remove fortify for building libraries
CFLAGS=${CFLAGS/-Wp,-D_FORTIFY_SOURCE=2/}
"$srcdir/glibc/configure" \
--libdir=/usr/lib \
--libexecdir=/usr/lib \
"${_configure_flags[@]}"
# build libraries with fortify disabled
echo "build-programs=no" >> configparms
make -O
# re-enable fortify for programs
sed -i "/build-programs=/s#no#yes#" configparms
echo "CFLAGS += -Wp,-D_FORTIFY_SOURCE=2" >> configparms
make -O
# build info pages manually for reprducibility
make info
cd "$srcdir/lib32-glibc-build"
export CC="gcc -m32 -mstackrealign"
export CXX="g++ -m32 -mstackrealign"
echo "slibdir=/usr/lib32" >> configparms
echo "rtlddir=/usr/lib32" >> configparms
echo "sbindir=/usr/bin" >> configparms
echo "rootsbindir=/usr/bin" >> configparms
"$srcdir/glibc/configure" \
--host=i686-pc-linux-gnu \
--libdir=/usr/lib32 \
--libexecdir=/usr/lib32 \
"${_configure_flags[@]}"
# build libraries with fortify disabled
echo "build-programs=no" >> configparms
make -O
# re-enable fortify for programs
sed -i "/build-programs=/s#no#yes#" configparms
echo "CFLAGS += -Wp,-D_FORTIFY_SOURCE=2" >> configparms
make -O
}
# Credits for skip_test() and check() @allanmcrae
# https://github.com/allanmcrae/toolchain/blob/f18604d70c5933c31b51a320978711e4e6791cf1/glibc/PKGBUILD
skip_test() {
test=$1
file=$2
sed -i "s/\b$test\b//" $srcdir/glibc/$file
}
#check() {
# cd glibc-build
#
# # adjust/remove buildflags that cause false-positive testsuite failures
# sed -i '/FORTIFY/d' configparms # failure to build testsuite
# sed -i 's/-Werror=format-security/-Wformat-security/' config.make # failure to build testsuite
# sed -i '/CFLAGS/s/-fno-plt//' config.make # 16 failures
# sed -i '/CFLAGS/s/-fexceptions//' config.make # 1 failure
# LDFLAGS=${LDFLAGS/,-z,now/} # 10 failures
#
# # The following tests fail due to restrictions in the Arch build system
# # The correct fix is to add the following to the systemd-nspawn call:
# # --capability=CAP_IPC_LOCK --system-call-filter="@clock @pkey"
# skip_test test-errno-linux sysdeps/unix/sysv/linux/Makefile
# skip_test tst-ntp_gettime sysdeps/unix/sysv/linux/Makefile
# skip_test tst-ntp_gettimex sysdeps/unix/sysv/linux/Makefile
# skip_test tst-mlock2 sysdeps/unix/sysv/linux/Makefile
# skip_test tst-pkey sysdeps/unix/sysv/linux/Makefile
# skip_test tst-adjtime time/Makefile
# skip_test tst-clock2 time/Makefile
#
# make -O check
#}
package_glibc() {
pkgdesc='GNU C Library'
depends=('linux-api-headers>=4.10' tzdata filesystem)
optdepends=('gd: for memusagestat')
install=glibc.install
backup=(etc/gai.conf
etc/locale.gen
etc/nscd.conf)
install -dm755 "$pkgdir/etc"
touch "$pkgdir/etc/ld.so.conf"
make -C glibc-build install_root="$pkgdir" install
rm -f "$pkgdir"/etc/ld.so.{cache,conf}
# Shipped in tzdata
rm -f "$pkgdir"/usr/bin/{tzselect,zdump,zic}
cd glibc
install -dm755 "$pkgdir"/usr/lib/{locale,tmpfiles.d}
install -m644 nscd/nscd.conf "$pkgdir/etc/nscd.conf"
# install -m644 nscd/nscd.service "$pkgdir/usr/lib/systemd/system"
install -m644 nscd/nscd.tmpfiles "$pkgdir/usr/lib/tmpfiles.d/nscd.conf"
install -dm755 "$pkgdir/var/db/nscd"
install -m644 posix/gai.conf "$pkgdir"/etc/gai.conf
install -m755 "$srcdir/locale-gen" "$pkgdir/usr/bin"
# Create /etc/locale.gen
install -m644 "$srcdir/locale.gen.txt" "$pkgdir/etc/locale.gen"
sed -e '1,3d' -e 's|/| |g' -e 's|\\| |g' -e 's|^|#|g' \
"$srcdir/glibc/localedata/SUPPORTED" >> "$pkgdir/etc/locale.gen"
if check_option 'debug' n; then
find "$pkgdir"/usr/bin -type f -executable -exec strip $STRIP_BINARIES {} + 2> /dev/null || true
find "$pkgdir"/usr/lib -name '*.a' -type f -exec strip $STRIP_STATIC {} + 2> /dev/null || true
# Do not strip these for gdb and valgrind functionality, but strip the rest
find "$pkgdir"/usr/lib \
-not -name 'ld-*.so' \
-not -name 'libc-*.so' \
-not -name 'libpthread-*.so' \
-not -name 'libthread_db-*.so' \
-name '*-*.so' -type f -exec strip $STRIP_SHARED {} + 2> /dev/null || true
fi
# Provide tracing probes to libstdc++ for exceptions, possibly for other
# libraries too. Useful for gdb's catch command.
install -Dm644 "$srcdir/sdt.h" "$pkgdir/usr/include/sys/sdt.h"
install -Dm644 "$srcdir/sdt-config.h" "$pkgdir/usr/include/sys/sdt-config.h"
# Provided by libxcrypt; keep the old shared library for backwards compatibility
rm -f "$pkgdir"/usr/include/crypt.h "$pkgdir"/usr/lib/libcrypt.{a,so}
}
package_lib32-glibc() {
pkgdesc='GNU C Library (32-bit)'
depends=("glibc=$pkgver")
options+=('!emptydirs')
cd lib32-glibc-build
make install_root="$pkgdir" install
rm -rf "$pkgdir"/{etc,sbin,usr/{bin,sbin,share},var}
# We need to keep 32 bit specific header files
find "$pkgdir/usr/include" -type f -not -name '*-32.h' -delete
# Dynamic linker
install -d "$pkgdir/usr/lib"
ln -s ../lib32/ld-linux.so.2 "$pkgdir/usr/lib/"
# Add lib32 paths to the default library search path
install -Dm644 "$srcdir/lib32-glibc.conf" "$pkgdir/etc/ld.so.conf.d/lib32-glibc.conf"
# Symlink /usr/lib32/locale to /usr/lib/locale
ln -s ../lib/locale "$pkgdir/usr/lib32/locale"
if check_option 'debug' n; then
find "$pkgdir"/usr/lib32 -name '*.a' -type f -exec strip $STRIP_STATIC {} + 2> /dev/null || true
find "$pkgdir"/usr/lib32 \
-not -name 'ld-*.so' \
-not -name 'libc-*.so' \
-not -name 'libpthread-*.so' \
-not -name 'libthread_db-*.so' \
-name '*-*.so' -type f -exec strip $STRIP_SHARED {} + 2> /dev/null || true
fi
# Provided by lib32-libxcrypt; keep the old shared library for backwards compatibility
rm -f "$pkgdir"/usr/lib32/libcrypt.{a,so}
}
#---- license gpg-key sha256sums ----
license=(GPL LGPL)
validpgpkeys=(7273542B39962DF7B299931416792B4EA25340F8 # Carlos O'Donell
BC7C7372637EC10C57D7AA6579C43DFBF1CF2187) # Siddhesh Poyarekar
sha256sums=(5123732f6b67ccd319305efd399971d58592122bcc2a6518a1bd2510dd0cf52e # glibc-2.35.tar.xz
853aaaf17d7366817e814057a467625ee7c0b26240e8b878db0f33c389c7bcb6 # glibc-2.35.tar.xz.sig
d42648cea552ba5353a32e264686e992263289d5cc86207314dffc54ab514981 # locale.gen.txt
83f108f915863c7ed0338e2d3e8f2e071a531a090ef8f8b2eb3a956a3c4f04d7 # locale-gen
c27424154a6096ae32c0824b785e05de6acef33d9224fd6147d1936be9b4962b # lib32-glibc.conf
774061aff612a377714a509918a9e0e0aafce708b87d2d7e06b1bd1f6542fe70 # sdt.h
cdc234959c6fdb43f000d3bb7d1080b0103f4080f5e67bcfe8ae1aaf477812f0 # sdt-config.h
f5df8fc95592cce7825744aeb8c9699a5b4b5b7ccf7bcf554355167c3a7e375e) # disable-clone3.diff

251
glibc/PKGBUILD-arch Normal file
View File

@ -0,0 +1,251 @@
# Maintainer: Giancarlo Razzolini <grazzolini@archlinux.org>
# Maintainer: Frederik Schwan <freswa at archlinux dot org>
# Contributor: Bartłomiej Piotrowski <bpiotrowski@archlinux.org>
# Contributor: Allan McRae <allan@archlinux.org>
# toolchain build order: linux-api-headers->glibc->binutils->gcc->glibc->binutils->gcc
# NOTE: valgrind requires rebuilt with each major glibc version
pkgbase=glibc
pkgname=(glibc lib32-glibc)
pkgver=2.35
pkgrel=2
arch=(x86_64)
url='https://www.gnu.org/software/libc'
license=(GPL LGPL)
makedepends=(git gd lib32-gcc-libs python)
optdepends=('perl: for mtrace')
options=(!strip staticlibs !lto)
#_commit=3de512be7ea6053255afed6154db9ee31d4e557a
#source=(git+https://sourceware.org/git/glibc.git#commit=$_commit
source=(https://ftp.gnu.org/gnu/glibc/glibc-$pkgver.tar.xz{,.sig}
locale.gen.txt
locale-gen
lib32-glibc.conf
sdt.h sdt-config.h
disable-clone3.diff)
validpgpkeys=(7273542B39962DF7B299931416792B4EA25340F8 # Carlos O'Donell
BC7C7372637EC10C57D7AA6579C43DFBF1CF2187) # Siddhesh Poyarekar
b2sums=('623c728884f070cd87ffeb9203f74206197c52405ac9bc44f3dd519a3468b8e8ae2536c883e5d17d94417dbd1e91775de2e674314e4ff7424f9720026d6b7063'
'SKIP'
'46d533d25c7a2ce4ae75d452eee7ebb8e3ce4d191af9be3daa43718b78cb81d33cfd8046a117a15d87de9f5e940448c66005b0490515bf731c9e4691c53908d6'
'1f6d927b4972220b1c00abee5329c5d6bc01ed5bee57b20db0c7d7433292f7d666b02baf9968267f8e378b1f3bb273e8eef0ccbf22d21400ac36949d7615a474'
'7c265e6d36a5c0dff127093580827d15519b6c7205c2e1300e82f0fb5b9dd00b6accb40c56581f18179c4fbbc95bd2bf1b900ace867a83accde0969f7b609f8a'
'a6a5e2f2a627cc0d13d11a82458cfd0aa75ec1c5a3c7647e5d5a3bb1d4c0770887a3909bfda1236803d5bc9801bfd6251e13483e9adf797e4725332cd0d91a0e'
'214e995e84b342fe7b2a7704ce011b7c7fc74c2971f98eeb3b4e677b99c860addc0a7d91b8dc0f0b8be7537782ee331999e02ba48f4ccc1c331b60f27d715678'
'edef5f724f68ea95c6b0127bd13a10245f548afc381b2d0a6d1d06ee9f87b7dd89c6becd35d5ae722bf838594eb870a747f67f07f46e7d63f8c8d1a43cce4a52')
prepare() {
mkdir -p glibc-build lib32-glibc-build
[[ -d glibc-$pkgver ]] && ln -s glibc-$pkgver glibc
cd glibc
# Disable clone3 syscall for now
# Can be removed when eletron{9,11,12} and discord are removed or patched:
# https://github.com/electron/electron/commit/993ecb5bdd5c57024c8718ca6203a8f924d6d574
# Patch src: https://patchwork.ozlabs.org/project/glibc/patch/87eebkf8ph.fsf@oldenburg.str.redhat.com/
patch -Np1 -i "${srcdir}"/disable-clone3.diff
}
build() {
local _configure_flags=(
--prefix=/usr
--with-headers=/usr/include
--with-bugurl=https://bugs.archlinux.org/
--enable-add-ons
--enable-bind-now
--enable-cet
--enable-kernel=4.4
--enable-lock-elision
--enable-multi-arch
--enable-stack-protector=strong
--enable-stackguard-randomization
--enable-static-pie
--enable-systemtap
--disable-profile
--disable-crypt
--disable-werror
)
cd "$srcdir/glibc-build"
echo "slibdir=/usr/lib" >> configparms
echo "rtlddir=/usr/lib" >> configparms
echo "sbindir=/usr/bin" >> configparms
echo "rootsbindir=/usr/bin" >> configparms
# Credits @allanmcrae
# https://github.com/allanmcrae/toolchain/blob/f18604d70c5933c31b51a320978711e4e6791cf1/glibc/PKGBUILD
# remove fortify for building libraries
CFLAGS=${CFLAGS/-Wp,-D_FORTIFY_SOURCE=2/}
"$srcdir/glibc/configure" \
--libdir=/usr/lib \
--libexecdir=/usr/lib \
"${_configure_flags[@]}"
# build libraries with fortify disabled
echo "build-programs=no" >> configparms
make -O
# re-enable fortify for programs
sed -i "/build-programs=/s#no#yes#" configparms
echo "CFLAGS += -Wp,-D_FORTIFY_SOURCE=2" >> configparms
make -O
# build info pages manually for reprducibility
make info
cd "$srcdir/lib32-glibc-build"
export CC="gcc -m32 -mstackrealign"
export CXX="g++ -m32 -mstackrealign"
echo "slibdir=/usr/lib32" >> configparms
echo "rtlddir=/usr/lib32" >> configparms
echo "sbindir=/usr/bin" >> configparms
echo "rootsbindir=/usr/bin" >> configparms
"$srcdir/glibc/configure" \
--host=i686-pc-linux-gnu \
--libdir=/usr/lib32 \
--libexecdir=/usr/lib32 \
"${_configure_flags[@]}"
# build libraries with fortify disabled
echo "build-programs=no" >> configparms
make -O
# re-enable fortify for programs
sed -i "/build-programs=/s#no#yes#" configparms
echo "CFLAGS += -Wp,-D_FORTIFY_SOURCE=2" >> configparms
make -O
}
# Credits for skip_test() and check() @allanmcrae
# https://github.com/allanmcrae/toolchain/blob/f18604d70c5933c31b51a320978711e4e6791cf1/glibc/PKGBUILD
skip_test() {
test=$1
file=$2
sed -i "s/\b$test\b//" $srcdir/glibc/$file
}
check() {
cd glibc-build
# adjust/remove buildflags that cause false-positive testsuite failures
sed -i '/FORTIFY/d' configparms # failure to build testsuite
sed -i 's/-Werror=format-security/-Wformat-security/' config.make # failure to build testsuite
sed -i '/CFLAGS/s/-fno-plt//' config.make # 16 failures
sed -i '/CFLAGS/s/-fexceptions//' config.make # 1 failure
LDFLAGS=${LDFLAGS/,-z,now/} # 10 failures
# The following tests fail due to restrictions in the Arch build system
# The correct fix is to add the following to the systemd-nspawn call:
# --capability=CAP_IPC_LOCK --system-call-filter="@clock @pkey"
skip_test test-errno-linux sysdeps/unix/sysv/linux/Makefile
skip_test tst-ntp_gettime sysdeps/unix/sysv/linux/Makefile
skip_test tst-ntp_gettimex sysdeps/unix/sysv/linux/Makefile
skip_test tst-mlock2 sysdeps/unix/sysv/linux/Makefile
skip_test tst-pkey sysdeps/unix/sysv/linux/Makefile
skip_test tst-adjtime time/Makefile
skip_test tst-clock2 time/Makefile
make -O check
}
package_glibc() {
pkgdesc='GNU C Library'
depends=('linux-api-headers>=4.10' tzdata filesystem)
optdepends=('gd: for memusagestat')
install=glibc.install
backup=(etc/gai.conf
etc/locale.gen
etc/nscd.conf)
install -dm755 "$pkgdir/etc"
touch "$pkgdir/etc/ld.so.conf"
make -C glibc-build install_root="$pkgdir" install
rm -f "$pkgdir"/etc/ld.so.{cache,conf}
# Shipped in tzdata
rm -f "$pkgdir"/usr/bin/{tzselect,zdump,zic}
cd glibc
install -dm755 "$pkgdir"/usr/lib/{locale,systemd/system,tmpfiles.d}
install -m644 nscd/nscd.conf "$pkgdir/etc/nscd.conf"
install -m644 nscd/nscd.service "$pkgdir/usr/lib/systemd/system"
install -m644 nscd/nscd.tmpfiles "$pkgdir/usr/lib/tmpfiles.d/nscd.conf"
install -dm755 "$pkgdir/var/db/nscd"
install -m644 posix/gai.conf "$pkgdir"/etc/gai.conf
install -m755 "$srcdir/locale-gen" "$pkgdir/usr/bin"
# Create /etc/locale.gen
install -m644 "$srcdir/locale.gen.txt" "$pkgdir/etc/locale.gen"
sed -e '1,3d' -e 's|/| |g' -e 's|\\| |g' -e 's|^|#|g' \
"$srcdir/glibc/localedata/SUPPORTED" >> "$pkgdir/etc/locale.gen"
if check_option 'debug' n; then
find "$pkgdir"/usr/bin -type f -executable -exec strip $STRIP_BINARIES {} + 2> /dev/null || true
find "$pkgdir"/usr/lib -name '*.a' -type f -exec strip $STRIP_STATIC {} + 2> /dev/null || true
# Do not strip these for gdb and valgrind functionality, but strip the rest
find "$pkgdir"/usr/lib \
-not -name 'ld-*.so' \
-not -name 'libc-*.so' \
-not -name 'libpthread-*.so' \
-not -name 'libthread_db-*.so' \
-name '*-*.so' -type f -exec strip $STRIP_SHARED {} + 2> /dev/null || true
fi
# Provide tracing probes to libstdc++ for exceptions, possibly for other
# libraries too. Useful for gdb's catch command.
install -Dm644 "$srcdir/sdt.h" "$pkgdir/usr/include/sys/sdt.h"
install -Dm644 "$srcdir/sdt-config.h" "$pkgdir/usr/include/sys/sdt-config.h"
# Provided by libxcrypt; keep the old shared library for backwards compatibility
rm -f "$pkgdir"/usr/include/crypt.h "$pkgdir"/usr/lib/libcrypt.{a,so}
}
package_lib32-glibc() {
pkgdesc='GNU C Library (32-bit)'
depends=("glibc=$pkgver")
options+=('!emptydirs')
cd lib32-glibc-build
make install_root="$pkgdir" install
rm -rf "$pkgdir"/{etc,sbin,usr/{bin,sbin,share},var}
# We need to keep 32 bit specific header files
find "$pkgdir/usr/include" -type f -not -name '*-32.h' -delete
# Dynamic linker
install -d "$pkgdir/usr/lib"
ln -s ../lib32/ld-linux.so.2 "$pkgdir/usr/lib/"
# Add lib32 paths to the default library search path
install -Dm644 "$srcdir/lib32-glibc.conf" "$pkgdir/etc/ld.so.conf.d/lib32-glibc.conf"
# Symlink /usr/lib32/locale to /usr/lib/locale
ln -s ../lib/locale "$pkgdir/usr/lib32/locale"
if check_option 'debug' n; then
find "$pkgdir"/usr/lib32 -name '*.a' -type f -exec strip $STRIP_STATIC {} + 2> /dev/null || true
find "$pkgdir"/usr/lib32 \
-not -name 'ld-*.so' \
-not -name 'libc-*.so' \
-not -name 'libpthread-*.so' \
-not -name 'libthread_db-*.so' \
-name '*-*.so' -type f -exec strip $STRIP_SHARED {} + 2> /dev/null || true
fi
# Provided by lib32-libxcrypt; keep the old shared library for backwards compatibility
rm -f "$pkgdir"/usr/lib32/libcrypt.{a,so}
}

48
glibc/bz27343.patch Normal file
View File

@ -0,0 +1,48 @@
From c3479fb7939898ec22c655c383454d6e8b982a67 Mon Sep 17 00:00:00 2001
From: Sergei Trofimovich <slyfox@gentoo.org>
Date: Fri, 5 Feb 2021 07:32:18 +0000
Subject: [PATCH] nsswitch: return result when nss database is locked [BZ
#27343]
Before the change nss_database_check_reload_and_get() did not populate
the '*result' value when it returned success in a case of chroot
detection. This caused initgroups() to use garage pointer in the
following test (extracted from unbound):
```
int main() {
// load some NSS modules
struct passwd * pw = getpwnam("root");
chdir("/tmp");
chroot("/tmp");
chdir("/");
// access nsswitch.conf in a chroot
initgroups("root", 0);
}
```
Reviewed-by: DJ Delorie <dj@redhat.com>
---
nss/nss_database.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/nss/nss_database.c b/nss/nss_database.c
index cf0306adc4..e1bef6bd75 100644
--- a/nss/nss_database.c
+++ b/nss/nss_database.c
@@ -398,8 +398,9 @@ nss_database_check_reload_and_get (struct nss_database_state *local,
&& (str.st_ino != local->root_ino
|| str.st_dev != local->root_dev)))
{
- /* Change detected; disable reloading. */
+ /* Change detected; disable reloading and return current state. */
atomic_store_release (&local->data.reload_disabled, 1);
+ *result = local->data.services[database_index];
__libc_lock_unlock (local->lock);
__nss_module_disable_loading ();
return true;
--
2.27.0

1
glibc/clean Normal file
View File

@ -0,0 +1 @@
rm -rvf {src,pkg,*tar.xz*}

5
glibc/deps Normal file
View File

@ -0,0 +1,5 @@
git
gd
lib32-gcc-libs
python
bison

22
glibc/disable-clone3.diff Normal file
View File

@ -0,0 +1,22 @@
diff --git a/sysdeps/unix/sysv/linux/clone-internal.c b/sysdeps/unix/sysv/linux/clone-internal.c
index 1e7a8f6b35..4046c81180 100644
--- a/sysdeps/unix/sysv/linux/clone-internal.c
+++ b/sysdeps/unix/sysv/linux/clone-internal.c
@@ -48,17 +48,6 @@ __clone_internal (struct clone_args *cl_args,
int (*func) (void *arg), void *arg)
{
int ret;
-#ifdef HAVE_CLONE3_WRAPPER
- /* Try clone3 first. */
- int saved_errno = errno;
- ret = __clone3 (cl_args, sizeof (*cl_args), func, arg);
- if (ret != -1 || errno != ENOSYS)
- return ret;
-
- /* NB: Restore errno since errno may be checked against non-zero
- return value. */
- __set_errno (saved_errno);
-#endif
/* Map clone3 arguments to clone arguments. NB: No need to check
invalid clone3 specific bits in flags nor exit_signal since this

5
glibc/glibc.install Normal file
View File

@ -0,0 +1,5 @@
post_upgrade() {
locale-gen
ldconfig -r .
}

1
glibc/key Normal file
View File

@ -0,0 +1 @@
gpg -v --recv-key 16792B4EA25340F8

1
glibc/lib32-glibc.conf Normal file
View File

@ -0,0 +1 @@
/usr/lib32

42
glibc/locale-gen Executable file
View File

@ -0,0 +1,42 @@
#!/bin/sh
set -e
LOCALEGEN=/etc/locale.gen
LOCALES=/usr/share/i18n/locales
if [ -n "$POSIXLY_CORRECT" ]; then
unset POSIXLY_CORRECT
fi
[ -f $LOCALEGEN -a -s $LOCALEGEN ] || exit 0;
# Remove all old locale dir and locale-archive before generating new
# locale data.
rm -rf /usr/lib/locale/* || true
umask 022
is_entry_ok() {
if [ -n "$locale" -a -n "$charset" ] ; then
true
else
echo "error: Bad entry '$locale $charset'"
false
fi
}
echo "Generating locales..."
while read locale charset; do \
case $locale in \#*) continue;; "") continue;; esac; \
is_entry_ok || continue
echo -n " `echo $locale | sed 's/\([^.\@]*\).*/\1/'`"; \
echo -n ".$charset"; \
echo -n `echo $locale | sed 's/\([^\@]*\)\(\@.*\)*/\2/'`; \
echo -n '...'; \
if [ -f $LOCALES/$locale ]; then input=$locale; else \
input=`echo $locale | sed 's/\([^.]*\)[^@]*\(.*\)/\1\2/'`; fi; \
localedef -i $input -c -f $charset -A /usr/share/locale/locale.alias $locale; \
echo ' done'; \
done < $LOCALEGEN
echo "Generation complete."

23
glibc/locale.gen.txt Normal file
View File

@ -0,0 +1,23 @@
# Configuration file for locale-gen
#
# lists of locales that are to be generated by the locale-gen command.
#
# Each line is of the form:
#
# <locale> <charset>
#
# where <locale> is one of the locales given in /usr/share/i18n/locales
# and <charset> is one of the character sets listed in /usr/share/i18n/charmaps
#
# Examples:
# en_US ISO-8859-1
# en_US.UTF-8 UTF-8
# de_DE ISO-8859-1
# de_DE@euro ISO-8859-15
#
# The locale-gen command will generate all the locales,
# placing them in /usr/lib/locale.
#
# A list of supported locales is included in this file.
# Uncomment the ones you need.
#

Some files were not shown because too many files have changed in this diff Show More