Skip to content

Draft: pmb: gcc: add libstdc++ subpackage

Pablo Correa Gomez requested to merge pabloyoyoista/gcc-fix into master

This aims to solve this issue https://gitlab.com/postmarketOS/pmaports/-/jobs/6377953514#L497 Interpretation:

  • Our gcc-aarch64 is outdated
  • Our g++-aarch64 depends on libstdc++ with its same pkgver
  • We don't create a subpackage for libstdc++, so what should be libstdc++-aarch64 lives in gcc-aarch
  • gcc-aarch cannot resolve to itself, so resolves to the libstdc++ provided by alpine
  • The solver goes nuts

This warranties that cross-compilers keep working, even when out-of-sync with alpine. I really don't know why this wasn't added in so many years, so I hope there's no hidden trick

Running with these changes gives me:

pablo@alpine-edge:~/data/Informatica/postmarketOS/pmaports$ git diff
diff --git i/cross/gcc-aarch64/APKBUILD w/cross/gcc-aarch64/APKBUILD
index 86a579bcb..242924e85 100644
--- i/cross/gcc-aarch64/APKBUILD
+++ w/cross/gcc-aarch64/APKBUILD
@@ -43,7 +43,7 @@ _gccrel=$pkgver-r$pkgrel
 depends="binutils-aarch64 mpc1"
 makedepends_build="gcc g++ bison flex texinfo gawk zip gmp-dev mpfr-dev mpc1-dev zlib-dev"
 makedepends_host="linux-headers gmp-dev mpfr-dev mpc1-dev isl-dev zlib-dev musl-dev-aarch64 binutils-aarch64"
-subpackages="g++-aarch64:gpp libstdc++-dev-aarch64:libcxx_dev"
+subpackages="g++-aarch64:gpp libstdc++-aarch64:libcxx libstdc++-dev-aarch64:libcxx_dev"
 [ "$CHOST" = "$CTARGET" ] && subpackages="gcc-gdb gcc-doc$_target"
 replaces="libstdc++ binutils"
 options="!strip"

Merge request reports