Compare commits

...
722 Commits
Author SHA1 Message Date
Oliver Smith bc467ddf90 main/postmarketos-base-ui: depend in postmarketos-release-upgrade-notification
This branch is now EOL. Tested in QEMU, works as expected :)
2026-01-27 16:46:30 +01:00
Achill Gilgenast 95051f8de9 main/postmarketos-release-upgrade-notification: new aport
Previously the process was that once a branch is EOL, the
notification-commit was cherry-picked from the branch before.

However that makes less sense, since the package then doesn't go
through the same mass updates as pmaports master does, e.g. it still
referenced gitlab.com & -gtk3, and doesn't allow changes by contributors
other than the one cherry-picking it.

Adapted from c088d806ea ("main/postmarketos-upgrade-gtk3: new aport")

See https://gitlab.postmarketos.org/postmarketOS/pmaports/-/issues/4197.

Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7769>
(cherry picked from commit 7f8facc9d8)
2026-01-27 16:30:04 +01:00
Stefan Hansson 5cd42c3c49 CI: Set args.ccache in conftest.py
Fixes CI being broken everywhere:

      File "/builds/postmarketOS/pmaports/.ci/testcases/conftest.py", line 32, in args
        init_args(args)
      File "/tmp/pmbootstrap/pmb/helpers/args.py", line 94, in init
        context.ccache = args.ccache
                     ^^^^^^^^^^^
    AttributeError: 'PmbArgs' object has no attribute 'ccache'

Signed-off-by: Stefan Hansson <newbyte@postmarketos.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7670>
(cherry picked from commit a652a6f334)
2025-12-30 09:50:04 +01:00
Oliver Smith 5270ae03d9 main/postmarketos-release-upgrade: upgrade to 1.11.1
Related: https://gitlab.postmarketos.org/postmarketOS/postmarketos-release-upgrade/-/tags/1.11.1
(cherry picked from commit 685f12950a81a7bf7b2ad6627c24a4ef345c23d3)
2025-12-23 16:07:43 +01:00
Oliver Smith e1c5918552 main/postmarketos-release-upgrade: upgrade to 1.11.0
(cherry picked from commit b1cb0ef5b6cae7ff2789840f023fe14f118cbfe7)
2025-12-23 11:10:48 +01:00
Oliver Smith 1efffff994 kconfigcheck: fix architecture typo
Fix for the following error with recent pmbootstrap:
  Invalid architecture: 'x64_64'

Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7616>
2025-12-21 16:25:26 +01:00
Bart Ribbers 5846a8a06d purism-librem5: always install wys rather than only for GNOME
All UI's use ModemManager nowadays and without this calling is broken.

Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7564>
(cherry picked from commit a042ba345b)
2025-12-14 17:20:18 +01:00
Jens Reidel 9f8a87d393 systemd/polkit: fix polkit-elogind provider priority
polkit-elogind has provider priority 10 in Alpine, so it would actually
end up preferred over the systemd polkit. Fix this by increasing the
priority of the provider. This went unnoticed so far because pmbootstrap
always preferred providers with exact name matches so far.

Signed-off-by: Jens Reidel <adrian@postmarketos.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7373>
(cherry picked from commit 7c8101aa9a)
Note by ollieparanoid: cherry-picking this to v25.06 fixes pmbootstrap#2693
2025-11-27 21:11:43 +01:00
Oliver Smith ff2f3ddc0b cross/busybox-static-*: remove
The busybox-static packages were used by devices using the obscure
"isorec" boot method (that I originally introduced with the
samsung-i9100, based on what I saw in the downstream kernel repo at the
time IIRC). This method is fairly limited, e.g. we can't append a
cmdline easily according to MR 6917. After the samsung-i9100 has been
switched over to use u-boot in MR 6921, all users of busybox-static are
now in device/archived/. Let's remove the busybox-static packages so
there are less packages we need to sync with Alpine.

Backport note: no device in v25.06 uses busybox-static-*, so it can
safely be removed.

Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7145>
(cherry picked from commit 38245b028f)
Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7417
2025-11-23 18:15:48 +01:00
panpanpanpan ba898b43e7 linux-postmarketos-qcom-sm8150: Upgrade to v6.17.0
[ci:skip-vercheck]
(cherry picked from commit 1000e405bf)

Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7294>
2025-11-07 14:56:28 +00:00
panpanpanpan 497741c36e device-xiaomi-nabu: Add modules-initfs and a640_zap
(cherry picked from commit a1a3dd3000)

Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7294>
2025-11-07 14:56:28 +00:00
Pan Ortiz 1901aaf0d8 linux-postmarketos-qcom-sm8150: Upgrade to v6.16.0
[ci:skip-build]: already built successfully in CI

(cherry picked from commit f1be4ee17f)

Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7294>
2025-11-07 14:56:28 +00:00
Pan Ortiz bd1050be66 device-xiaomi-nabu: remove cmdline and microphone hacks
(cherry picked from commit 93a38dfccc)

Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7294>
2025-11-07 14:56:28 +00:00
Oliver Smith bcbd165d40 systemd/xorg-server: upgrade to 21.1.19
Related: https://gitlab.alpinelinux.org/alpine/aports/-/commit/9698c31a1eadbdcbb6ed7882792bc3b52ba2cf64
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7305>
2025-11-06 20:15:48 +01:00
Stefan Hansson bd34f9e9f9 linux-purism-librem5: upgrade to 6.6.110
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7238>
(cherry picked from commit 9ed8dd6bda)
2025-10-23 09:20:44 +02:00
May a3597e530a linux-postmarketos-qcom-sm8150: Build kernel module for BT_RFCOMM & BT_BNEP
Fixes several bluetoothd RFCOMM related issues.

Including: Message Notification, Message Access, Phone Book Access, Synchronization, File Transfer, Object Push, Hands-Free Voice gateway & Hands-Free unit
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7113>
2025-10-15 12:28:41 +00:00
Stefan Hansson e142011575 linux-purism-librem5: upgrade to 6.6.101
Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7177
(cherry picked from commit e6fbadb1b0)
2025-10-14 10:28:39 +02:00
Daniel Kulesz 7c71c9d747 linux-purism-librem5: upgrade to 6.6.92pureos1
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6970>
(cherry picked from commit d614b2c4b0)
2025-10-14 10:28:33 +02:00
Raymond Hackley fda8888c60 samsung-a3: drop subpackage phosh
It's already well scaled in 1.5x on a3. Drop unnecessary phoc.ini

Link: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/4541
(cherry picked from commit c01b371d49)

Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7163>
2025-10-11 11:36:27 +00:00
Raymond Hackley 1c500dd782 samsung-a3: Remove _pmb_select="soc-qcom-msm8916-rproc" from APKBUILD
lk2nd does no longer support mode selection based on
/boot/lk2nd_rproc_mode.

Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7163>
2025-10-10 07:20:25 +00:00
Raymond Hackley 6f20f68ade samsung-fortuna: fix deviceinfo_dtb_fortuna3g
Fixes: 053a486241 ("linux-postmarketos-qcom-msm8916: upgrade to 6.12.1 (MR 5847)")
Link: https://lore.kernel.org/r/20240129143147.5058-1-raymondhackley@protonmail.com
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7149>
2025-10-06 14:45:51 +00:00
Achill Gilgenast 450bb79222 systemd/gnome-desktop: upgrade to 44.4
https://gitlab.alpinelinux.org/alpine/aports/-/commit/8bb7b7b7bb981ee0e0a3b52d1291ecb245915602

Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7013>
(cherry picked from commit 3a50ffa5d4)
2025-09-18 19:50:48 +02:00
Achill Gilgenast 1900aef2bb systemd/gnome-shell: upgrade to 48.5
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7053>
2025-09-16 17:27:08 +02:00
Achill Gilgenast 9c060be960 systemd/mutter: upgrade to 48.5
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7053>
2025-09-16 17:27:07 +02:00
BetaRays b45dbb0b39 samsung-j5(x): depend on Samsung modem workaround
This was required to get a working modem on J5 2015 and 2016, see:
 - Closes https://gitlab.postmarketos.org/postmarketOS/pmaports/-/issues/3860
 - https://wiki.postmarketos.org/wiki/Samsung_Galaxy_J5_2015_(samsung-j5)#Modem
 - https://wiki.postmarketos.org/wiki/Samsung_Galaxy_J5_2016_(samsung-j5x)#Modem

[Raymond: add j5]
Co-developed-by: Raymond Hackley <wonderfulShrineMaidenOfParadise@postmarketos.org>
Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7030
[ci:skip-build]: already built successfully in CI
2025-09-11 08:46:55 +00:00
Pablo Correa Gómez a6fd3714cd main/msm-firmware-loader: install openrc init scripts from upstream
These are now included upstream, no need to keep them in pmaports

[ci:skip-build]: already built successfully in CI

Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6880>
2025-08-28 19:22:23 +00:00
Pablo Correa Gómez e1c2077c90 main/msm-firmware-loader: upgrade to 1.8.0
The firmware mountpoint is now created under /run, so no need to
create it

Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6880>
2025-08-28 19:22:23 +00:00
Tomasz Duda 31e95b86eb community/soc-qcom-msm8953: fix modem script
1. /dev/disk/by-partlabel/persist is mounted twice with diffrent dirs.
umount $PERSIST_DEV unmout the other one
2. /lib/firmware/postmarketos does not exist on xiaomi-daisy, use mkdir -p

Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6974>
2025-08-25 16:42:16 +02:00
Oliver Smith e3637cf41d systemd/gnome-shell: upgrade to 48.4
Related: https://gitlab.alpinelinux.org/alpine/aports/-/commit/eeec62033c8e3b01fb26c0edff17be5769aa6144

Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6889
[ci:skip-build]: already built successfully in CI
2025-08-08 17:22:41 +02:00
Oliver Smith f3c8df39f9 cross/busybox-static-*: upgrade to 1.37.0-r19
Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6888

[ci:skip-build]: already built successfully in CI
2025-08-06 21:27:05 +02:00
Oliver Smith b0afccb05e systemd/pipewire: upgrade to 1.4.7
Related: https://gitlab.alpinelinux.org/alpine/aports/-/commit/342116acb74ca90003990de8bd0f5300006850ec

Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6817
[ci:skip-build]: already built successfully in CI

(cherry picked from commit e0a9749818)
2025-07-23 20:11:13 +02:00
fossdd d19b19a968 systemd/pipewire: upgrade to 1.4.6
https://gitlab.alpinelinux.org/alpine/aports/-/merge_requests/86252

Part-of: https://gitlab.postmarketos.org/postmarketos/pmaports/-/merge_requests/6725
[ci:skip-build]: already built successfully in CI

(cherry picked from commit d0d9889cb2)
2025-07-23 20:10:43 +02:00
Barnabás Czémán 4c0aa48890 main/msm-firmware-loader: Upgrade to 1.7.0
Signed-off-by: Barnabás Czémán <barnabas.czeman@postmarketos.org>
Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6800

[ci:skip-build]: already built successfully in CI
2025-07-23 17:54:53 +02:00
Oliver Smith 970b25cdf3 systemd/plasma-workspace: upgrade to 6.3.6
Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6813

[ci:skip-build]: already built successfully in CI
2025-07-23 17:29:33 +02:00
Oliver Smith aab7c6b2a3 systemd/kwin: upgrade to 6.3.6
Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6813
2025-07-23 17:29:33 +02:00
Oliver Smith ed558b773f systemd/kscreenlocker: upgrade to 6.3.6
Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6813
2025-07-23 17:29:33 +02:00
Oliver Smith 2556946971 systemd/drkonqi: upgrade to 6.3.6
Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6813
2025-07-23 17:29:33 +02:00
WeirdTreeThing 643df554b6 linux-postmarketos-mediatek-mt8183: drop aport
Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6552

[ci:skip-build]: already built successfully in CI

(cherry picked from commit bb57bd6b80)
Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6798
2025-07-18 11:49:30 -04:00
WeirdTreeThing 3ed486e4b0 linux-postmarketos-mediatek-mt81xx: drop aport
Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6552
(cherry picked from commit 9539bf687b)
Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6798
2025-07-18 11:49:30 -04:00
WeirdTreeThing 53bce09bd0 device-google-corsola: switch to mt81 kernel
Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6552
(cherry picked from commit 425e5371fb)
Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6798
2025-07-18 11:49:30 -04:00
WeirdTreeThing 15af8aae33 device-google-cherry: switch to mt81 kernel
Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6552
(cherry picked from commit ea63a6fa8f)
Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6798
2025-07-18 11:49:30 -04:00
WeirdTreeThing e49046f404 device-google-asurada: switch to mt81 kernel
Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6552
(cherry picked from commit 34c37be315)
Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6798
2025-07-18 11:49:30 -04:00
WeirdTreeThing fac11248da device-google-kukui: switch to mt81 kernel
Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6552
(cherry picked from commit 0c781ca0d6)
Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6798
2025-07-18 11:49:30 -04:00
WeirdTreeThing 616d8bfc66 linux-postmarketos-mediatek-mt81: new aport
Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6552
(cherry picked from commit 6923fa56e5)
Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6798
2025-07-18 11:49:30 -04:00
Oliver Smith 49ddcc344c main/postmarketos-release-upgrade: upgrade to 1.10.0
Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6772

[ci:skip-build]: already built successfully in CI

(cherry picked from commit 5733a2b81a)
2025-07-14 07:10:30 +02:00
Oliver Smith d9503a6e04 systemd/networkmanager: upgrade to 1.52.1
Related: https://gitlab.alpinelinux.org/alpine/aports/-/commit/a3bde6ff213d1deb283509455ba2cf1ed9538b22

Part-of: https://gitlab.postmarketos.org/postmarketos/pmaports/-/merge_requests/6762
[ci:skip-build]: already built successfully in CI

(cherry picked from commit 4b1148df72)
2025-07-10 23:42:08 +02:00
Richard Acayan af012398aa google-bonito: mirror sargo changes
Mirror some of the changes to the Pixel 3a:

    device-google-sargo: add sensors support (MR 5329)
    google-sargo: add gpi to modules-initfs to fix fde (MR 5347)
    google-sargo: do not enable HexagonRPCD on every upgrade (MR 5400)
    google-sargo: stop HexagonRPCD on suspend (MR 5400)
    google-sargo: make necessary userspace changes for kernel v6.10.2
    device-google-sargo: remove nonfree_firmware subpkg (MR 6107)
    device-google-sargo: Fix hexagonrpcd on systemd (MR 6147)
    device-google-sargo: install hexagonrpcd conf to new location (MR 6217)
    device/*: explicitly depend on openrc if install scripts call rc-update

Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6718
(cherry picked from commit d1f8b4179f)
2025-07-06 14:53:23 +02:00
fossdd 8890db9fc7 systemd/mutter: upgrade to 48.4
https://gitlab.alpinelinux.org/alpine/aports/-/commit/57a98bb6f57871e2feb64515a5ac947d055e2326

Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6729
[ci:skip-build]: already built successfully in CI

(cherry picked from commit f042d2bede)
2025-06-29 22:13:15 +02:00
fossdd 274abeaad0 systemd/gnome-shell: upgrade to 48.3
https://gitlab.alpinelinux.org/alpine/aports/-/commit/8995d05c3f4c243e3610098034cb25e3da3a6cc7

Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6729
(cherry picked from commit 830a4300d6)
2025-06-29 22:13:15 +02:00
LEdoian e3e4acb428 systemd/systemd-services: add service file for hkdm
Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6723

[ci:skip-build]: already built successfully in CI

(cherry picked from commit a41c9c23f6)
2025-06-28 15:43:13 -07:00
Sicelo A. Mhlongo 9ef87a7c46 postmarketos-ui-sway: use bemenu instead of dmenu
dmenu is an X11 application and will thus require the use of Xwayland on
sway, while bemenu has a native wayland backend and is a drop-in replacement
for dmenu.

Part-of: https://gitlab.postmarketos.org/postmarketos/pmaports/-/merge_requests/6697
[ci:skip-build]: already built successfully in CI

(cherry picked from commit adcdd747c4)
2025-06-23 06:02:55 +02:00
Clayton Craft 167acf225f soc-qcom: run systemd splitfunc in pulseaudio-systemd subpkg
Just like when defining custom -openrc subpkgs, or prepare funcs, etc,
we *need* to manually the corresponding abuild function or else things
break.

fixes #3781

Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6690
[ci:skip-build]: already built successfully in CI

(cherry picked from commit 0dc0c9f03e)
2025-06-20 19:53:36 +02:00
Clayton Craft a6d576956f systemd/xorg-server: upgrade to 21.1.18
Part-of: https://gitlab.postmarketos.org/postmarketos/pmaports/-/merge_requests/6686

[ci:skip-build]: already built successfully in CI

(cherry picked from commit 32b1a6d9b6)
2025-06-20 12:39:43 +02:00
Clayton Craft bfde8cf457 main/postmarketos-base-ui: always install sleep-inhibitor.conf
Installing this config only when elogind/openrc is installed means that
systemd versions of pmOS don't get the fix in !6612

Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6682
[ci:skip-build]: already built successfully in CI

(cherry picked from commit a9fe11c77f)
2025-06-18 16:39:33 -07:00
fossdd 99d5823979 systemd/xorg-server: upgrade to 21.1.17
https://gitlab.alpinelinux.org/alpine/aports/-/commit/04b13adec67a1f19be8e228f39bda2d961963bba

Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6680
[ci:skip-build]: already built successfully in CI

(cherry picked from commit b2f0e4f00c)
2025-06-18 10:14:27 +02:00
Oliver Smith 025b7cb92c OP6/OP6T: disable alsa-restore.service
This results in the main speaker not working, so disable it.

Related: issue 3747

Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6674
(cherry picked from commit ba2ec41c96)
2025-06-17 00:17:38 +02:00
Oliver Smith 28d0af4ea1 systemd/postmarketos-base-systemd: remove motd
Remove the systemd-specific MOTD that says it is still in preview.
v25.06 is about to come out, the first stable release with systemd!

Any future adjustments to make it use fancy ascii colors etc. should be
made in postmarketos-base instead.

Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6669
[ci:skip-build]: already built successfully in CI

(cherry picked from commit c8b5872b56)
2025-06-15 21:15:59 +02:00
Oliver Smith c782920a97 temp/codemadness-frontends: drop fork
This is avaliable in Alpine 3.22-stable now:
https://gitlab.alpinelinux.org/alpine/aports/-/merge_requests/85447
2025-06-15 19:49:12 +02:00
Robert Eckelmann d829b5b80a main/postmarketos-base-ui: revert mali workaround for Mediatek SoCs
reverts !6470
to be merged with !6589

Signed-off-by: Robert Eckelmann <longnoserob@postmarketos.org>
Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6595
[ci:skip-build]: already built successfully in CI
(cherry picked from commit 0094f42267)
2025-06-15 18:22:11 +02:00
Jane Rachinger 80ce16bf15 systemd/systemd: upgrade to 257.6
Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6581

[ci:skip-build]: already built successfully in CI

(cherry picked from commit 10b993dc30)
2025-06-15 18:15:36 +02:00
Oliver Smith c5866db3ac main/postmarketos-ui-phosh: Stevia: add arrow keys
Configure the new keyboard Stevia to have arrow keys by default in the
terminal. The previous default terminal Squeekboard had separate arrow
keys as well.

While it is possible to move up/down/left/right with Stevia after
pressing the space bar and moving the finger into a given direction, I
found that it:
* Is less precise (e.g. going up exactly 1 command in the terminal,
  which is my main use case, requires some effort to not go up 2 or 3
  commands by accident).
* Takes longer to do this action vs. having a separate button (you need
  to press space for ~a second until it goes into that special movement
  mode and then take more time to carefully move where you want, a
  simple button press is much quicker).
* I saw other users note on Mastodon that moving down is cumbersome for
  them, given that there is not much space towards the bottom of the
  screen below the space bar.

Having a lot of buttons in the list is fine IMHO, they can be scrolled
through quickly by swiping left and right.

Related: https://fosstodon.org/@phosh/114026426425496074

Part-of: https://gitlab.postmarketos.org/postmarketos/pmaports/-/merge_requests/6609
2025-06-14 20:16:43 +02:00
fossdd 681546c761 main/postmarketos-ui-phosh: actually make p-o-s uninstallable
That's the best i came up with without changing the provider priorities
in Alpine upstream. This would also work but since p-o-s- self-describes
it self as the secondary choice for Phosh's OSK I chose this.

> Stevia is an alternative keyboard for Phosh. It can replace the default OSK
> squeekboard.

To switch from our default away:

	apk add !postmarketos-ui-phosh-default-osk <squeekboard/phosh-osk-stub>

If you then want to switch again:

	apk add <new osk> !<current osk>

Part-of: https://gitlab.postmarketos.org/postmarketos/pmaports/-/merge_requests/6605
2025-06-14 20:16:41 +02:00
Clayton Craft 36ea969f47 systemd: Always install X11 tmpfiles config
This is needed by some(all?) Xwayland implementations too, so don't make
installing it exclusive to having the actual X11 xorg-server installed.

This fixes an issue where Xwayland doesn't work on COSMIC.

Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6658
[ci:skip-build]: already built successfully in CI

(cherry picked from commit 34d62b85da)
2025-06-14 13:02:35 +02:00
fossdd e278220a8b systemd/phosh: backport media player fixes
https://gitlab.alpinelinux.org/alpine/aports/-/commit/e376f4d57a04a06fa73d4103e9790e46872b4aac

Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6654
[ci:skip-build]: already built successfully in CI

(cherry picked from commit 9b03326184)
2025-06-14 13:01:58 +02:00
Federico Amedeo Izzo 4098fba286 community/soc-qcom: Add missing systemd unit for call_audio_idle_suspend_workaround
Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6663

[ci:skip-build]: already built successfully in CI

(cherry picked from commit 93838311aa)
2025-06-14 12:59:21 +02:00
Oliver Smith 607c0e31a9 main/postmarketos-artwork: set v25.06 wallpaper
The new wallpaper is called Evergreen, by Dikasp!

Related: https://social.treehouse.systems/@postmarketOS/114655194291545930
Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6652
(cherry picked from commit f929604351)
2025-06-12 22:11:18 +02:00
fossdd dbbc4e4ea1 systemd/pipewire: upgrade to 1.4.5
https://gitlab.alpinelinux.org/alpine/aports/-/commit/ca3448da95750d93e6bcaa6b1e2c91c3c37fd632

Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6606
(cherry picked from commit 568af58e84)
2025-06-12 20:31:39 +02:00
fossdd 8a260c556b systemd/gnome-desktop: upgrade to 44.3
https://gitlab.alpinelinux.org/alpine/aports/-/commit/e611a2686d92002700bb21b978038d2083393833

Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6606
[ci:skip-build]: already built successfully in CI

(cherry picked from commit 25d47fa572)
2025-06-12 20:31:12 +02:00
Oliver Smith b294dc7e16 systemd/mutter: upgrade to 48.3.1
https://gitlab.alpinelinux.org/alpine/aports/-/commit/cef03054797a30051a5353b4ef0434f469b4a0df

Part-of: https://gitlab.postmarketos.org/postmarketos/pmaports/-/merge_requests/6607
[ci:skip-build]: already built successfully in CI

(cherry picked from commit 06134a113f)
2025-06-12 20:30:50 +02:00
Robert Mader 64c7ff6d10 temp/libcamera: upgrade to 0.5.1
See
https://gitlab.freedesktop.org/camera/libcamera/-/releases/v0.5.1

Additional changes:
 - Adopt build to commit "ipa: Move IPA installations to a subdir"
 - Backport a fix for the simple pipeline

Part-of: https://gitlab.postmarketos.org/postmarketos/pmaports/-/merge_requests/6608
[ci:skip-build]: already built successfully in CI

(cherry picked from commit 5677fe9d6d)
2025-06-12 20:30:31 +02:00
WeirdTreeThing 2cbaceadfe main/postmarketos-base-ui: Add alsa-utils to postmarketos-base-ui-audio
The UCM for some devices, such as MT8192 Chromebooks, relies on the
alsactl save/restore service to initialize default audio mixer settings.
Without this, the audio server is unable to control the sound card.

Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6556
[ci:skip-build]: already built successfully in CI

(cherry picked from commit 34812abec4)
2025-06-11 23:09:01 +02:00
Oliver Smith 050c3d62fd main/postmarketos-release-upgrade: upgrade to 1.9.0
Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6632

[ci:skip-build]: already built successfully in CI

(cherry picked from commit 59341cab2e)
2025-06-11 22:45:49 +02:00
Clayton Craft b18ee35aef main/postmarketos-base-ui: stop inhibiting sleep/suspend during audio playback
This test is apparently wrong a lot now, so let's disable it. Audio
apps should inhibit sleep/suspend on their own, or worst case you can do
something like `systemd-inhibit <audio app>`.

We still want sleep-inhibitor around for now to inhibit sleep/shutdown
when an SSH client is connected or when apk is running.

Fixes #3745

Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6612
[ci:skip-build]: already built successfully in CI

(cherry picked from commit 492fead1ce)
2025-06-10 12:20:27 +02:00
Oliver Smith 053b1f8002 temp/codemadness-frontends: fork from Alpine edge 2025-06-10 06:37:18 +02:00
Oliver Smith 810144ca70 device-*: add missing u-boot-tools makedep
Add the missing makedepend to armv7 devices too.

Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6634
[ci:skip-build]: already built locally
[ci:skip-vercheck]: rebuild not necessary

(cherry picked from commit 6449f2bc92)
2025-06-09 22:34:06 +02:00
Oliver Smith cb614c2fe6 device-apple-tonga: remove
Depends on linux-asahi, which we would need to fork to pmaports for
v25.06 as well. Maybe later, let's finish the initial repo bootstrap
first.
2025-06-09 13:52:10 +02:00
Oliver Smith 9f077def89 temp/lzfse: fork from alpine edge
Needed for asahi stuff.
2025-06-09 13:47:08 +02:00
Oliver Smith 3ac2a49ff4 temp/asahi-fwextract: fork from alpine edge 2025-06-09 13:43:11 +02:00
Oliver Smith bfed3b7494 temp/asahi-scripts: fork from alpine edge 2025-06-09 13:43:07 +02:00
Oliver Smith 483f5b9974 device-inet-a33: remove
u-boot fails to build.

Related: https://builds.sr.ht/~postmarketos/job/1506219
2025-06-09 13:29:51 +02:00
Oliver Smith 713ad6bb79 device-pocketbook-614-plus: remove
u-boot fails to build.

Related: https://builds.sr.ht/~postmarketos/job/1506213
2025-06-09 13:29:18 +02:00
Oliver Smith 10bd9c169c device-lark-freeme-70-2s: remove
u-boot fails to build.

Related: https://builds.sr.ht/~postmarketos/job/1506210
2025-06-09 13:28:38 +02:00
Oliver Smith f1e29f4d8e device-goclever-gcta741l: remove
u-boot fails to build.

Related: https://builds.sr.ht/~postmarketos/job/1506200
2025-06-09 13:27:51 +02:00
Oliver Smith 9ca570368c device-tokio-techbook: remove
Kernel fails to build.

Related: https://builds.sr.ht/~postmarketos/job/1506140
2025-06-09 13:27:19 +02:00
Oliver Smith 32c398e353 temp/speakersafetyd: remove dep on alsa-ucm-conf-asahi 2025-06-09 13:26:00 +02:00
Oliver Smith 4e18398dcf device-samsung-loganrelte: remove
The kernel fails to build.

Related: pmaports#3753
2025-06-09 13:18:22 +02:00
Oliver Smith 7fe2f8633d device-ouya-ouya: remove
The kernel doesn't build.

Related: https://builds.sr.ht/~postmarketos/job/1505992
2025-06-09 13:08:42 +02:00
Oliver Smith 719b80e6e7 device-asus-flo: remove
The kernel doesn't build.

Related: https://builds.sr.ht/~postmarketos/job/1505927
2025-06-09 13:08:05 +02:00
Clayton Craft 487dbc1eac device-generic-x86_64: depend on hwdata
This is useful for having more hardware work OOTB when using
this generic image. On openrc installs, which pulls in eudev-hwids.

Fixes #3744

Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6611
[ci:skip-build]: already built successfully in CI

(cherry picked from commit b524646bde)
2025-06-09 13:00:05 +02:00
Oliver Smith 9d7cf4b2ba temp/speakersafetyd: fork from Alpine edge 2025-06-09 12:45:34 +02:00
Oliver Smith c5b940435f temp/bankstown-lv2: fork from Alpine edge 2025-06-09 12:45:34 +02:00
Oliver Smith 43fdf5727b temp/asahi-audio: fork from Alpine edge 2025-06-09 12:45:29 +02:00
Oliver Smith da6f2ea8dc testing/u-boot-*: add missing SWIG patch
Apply libfdt.i_shipped-use-SWIG_AppendOutput.patch, so the packages
build with modern Alpine.

Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6627
(cherry picked from commit 726a56ff40)
2025-06-09 12:21:31 +02:00
Oliver Smith eede6ee06f device-powkiddy-x55: remove
The u-boot package fails to build.
2025-06-09 12:11:34 +02:00
Oliver Smith 1dfee8cfb2 device/*: fix missing makedepends
These failed to build in v25.06 because they use packages during the
build that are only listed in depends, not in makedepends. pmbootstrap
is more strict about it these days, so fix it.

[ci:skip-vercheck]

Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6626
[ci:skip-build]: already built successfully in CI

(cherry picked from commit c1b3ec05f3)
2025-06-09 12:10:24 +02:00
Oliver Smith 710da82e80 device-pine64-rock64: remove
The u-boot package does not build.
2025-06-09 12:06:03 +02:00
Oliver Smith 6b19e28168 main/tizen-mkdzimage: remove
Related: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/issues/3752
2025-06-09 12:01:22 +02:00
Alexey Minnekhanov 890a772ac6 firmware-xiaomi-whyred: switch firmware URL to more stable
gitflic.ru broke something (due to anti-bot protection?) so that
release download URLs are not accessible for automated services
even though they can be downloaded in a browser. I'll talk to
their support, but for now host file somewhere else.

Signed-off-by: Alexey Minnekhanov <alexeymin@postmarketos.org>
Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6625
[ci:skip-build]: already built successfully in CI
(cherry picked from commit e2a9015897)
2025-06-09 11:46:50 +02:00
Oliver Smith ad67604610 device-samsung-starqltechn: remove
The u-boot package does not build, so remove it.

Related: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/issues/3751
2025-06-09 11:38:33 +02:00
Oliver Smith 75ad67f191 device-sourceparts-pocketpc: remove
The u-boot-sourceparts-pocketpc package doesn't build for some reason.
Let's remove it for now to not unblock v25.06 bringup, we can add it
back if somebody fixes the build. I'll leave the kernel since that has
already built successfully.

Related: https://builds.sr.ht/~postmarketos/job/1505453
2025-06-09 11:26:46 +02:00
Oliver Smith 597d688b8d device-nextbit-robin: remove
This device depends on a downstream kernel, so it should have been in
the downstream category and therefore removed from stable.

Fix for master is in pmaports!6624.
2025-06-09 10:58:57 +02:00
Oliver Smith f7741a5fcb temp/alsa-ucm-conf-asahi: fork from Alpine edge
Fix building device-apple-tonga:
[15:31:04] ERROR: device-apple-tonga: dependency not found: alsa-ucm-conf-asahi

Related: https://builds.sr.ht/~postmarketos/job/1505499
2025-06-09 10:54:02 +02:00
Oliver Smith 91132f6eb9 0001-xiaomi-polaris-remove.patch: remove
I've added this file by mistake, it relates to pmaports MR 6618. Remove
it.
2025-06-09 00:27:37 +02:00
Antoine Martin 766e28f306 pinenote-dbus-service: upgrade to 0.2.3
Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6622

[ci:skip-build]: already built successfully in CI

(cherry picked from commit 9a247e1eb46b0ed6520c7fdcec4bfb9a2091e59d)
2025-06-09 00:26:03 +02:00
Oliver Smith 9d9400a00c firmware-samsung-a6lte: add missing makedep
pmbootstrap only installs makedepends when building packages, not the
depends as it did in the past. Adjust this package to fix:
  >>> firmware-samsung-a6lte: Entering fakeroot...
  /usr/bin/abuild: line 21: can't open /lib/firmware/brcm/brcmfmac43456-sdio.bin.zst: no such file

Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6617
[ci:skip-build]: already built successfully in CI

(cherry picked from commit fa0f9e64f0)
2025-06-08 14:28:02 +02:00
Oliver Smith 1092d8668f firmware-qcom-adreno: switch source mirror
Fix for:
  >>> firmware-qcom-adreno: Fetching https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/snapshot/linux-firmware-20241110.tar.gz
  Connecting to git.kernel.org (172.105.64.184:443)
  wget: server returned error: HTTP/1.1 400 Bad Request

[ci:skip-vercheck]: same checksum

Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6617
(cherry picked from commit de667973e9)
2025-06-08 14:27:57 +02:00
Oliver Smith e5504149f3 xiaomi-polaris: remove
The firmware package fails to build, remove the device from stable for
now. We could bring it back later if somebody fixes the package.
2025-06-08 13:31:00 +02:00
Oliver Smith 17a3e6f15c CI: add test_systemd_stage0_version
Add a test that ensures systemd-stage0 and systemd have the same pkgver.

Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6440
[ci:skip-build]: already built successfully in CI

(cherry picked from commit 8a3b3e8092)
2025-06-04 21:18:18 +02:00
Oliver Smith 0895873d01 pmaports.cfg: remove systemd bootstrap logic
This isn't needed anymore as now we build each package only once:
* Now we build a systemd-stage0 package first, against which we build
  dbus and polkit.
* The proper systemd package gets built against these afterwards.

Doing it this way simplifies things a lot:
* Can do the bootstrap iteratively, instead of only in one go (and if it
  fails having to start all over again).
* Makes pmbootstrap and bpo easier to maintain as we can drop this
  bootstrap logic.
* CI works as expected again when modifying multiple packages that would
  need to be bootstrapped.

Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6440
(cherry picked from commit 991d91e0a5)
2025-06-04 21:18:09 +02:00
Oliver Smith bf4e497b5c systemd: remove previous bootstrap logic
Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6440
(cherry picked from commit f9601f1502)
2025-06-04 21:17:56 +02:00
Oliver Smith 06440449cd systemd/polkit: build with systemd-stage0
Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6440
(cherry picked from commit 6f5d86f3c1)
2025-06-04 21:17:46 +02:00
Oliver Smith bdd26ad550 systemd/dbus: build with systemd-stage0
Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6440
(cherry picked from commit b34ad51f0e)
2025-06-04 21:17:37 +02:00
Oliver Smith fdbc5b4f5a systemd/systemd-stage0: new package
Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6440
(cherry picked from commit e27fce7e65)
2025-06-04 21:17:30 +02:00
fossdd bbe74623b3 main/postmarketos-ui-phosh: switch to phosh-osk-stub
Closes https://gitlab.postmarketos.org/postmarketOS/pmaports/-/issues/2628

Part-of: https://gitlab.postmarketos.org/postmarketos/pmaports/-/merge_requests/6596
[ci:skip-build]: already built successfully in CI

(cherry picked from commit 4af9d991e7)
2025-06-04 21:16:53 +02:00
Icenowy Zheng 4ba9c34fbc linux-postmarketos-mediatek-mt8183: fix Wayland compositors AFBC issue
Some Wayland compositors (tested with GNOME) are broken because of the
mediatek DRM driver wrongly announce AFBC on SoCs w/o AFBC displaying
support.

Pick a patch from mailing list to fix this issue.

Test is done on a kodama with google-kukui generic port and GNOME Shell
recipe.

Signed-off-by: Icenowy Zheng <uwu@icenowy.me>
Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6589
[ci:skip-build]: already built successfully in CI
(cherry picked from commit 92e3b88f6b)
2025-06-04 21:14:00 +02:00
Clayton Craft 6fb49ab893 linux-postmarketos-qcom-laptop: upgrade to 6.15
- Enable boot_delay support (can help with debugging)

Part-of: https://gitlab.postmarketos.org/postmarketos/pmaports/-/merge_requests/6414
[ci:skip-build]: already built successfully in CI

(cherry picked from commit 5747b80ab1)
2025-06-04 21:12:49 +02:00
Luca Weiss d59d3292be linux-postmarketos-qcom-sm6350: upgrade to 6.15.0
Manual kconfig changes:
* SND_SOC_SM8250=m (plus dependencies)
* QCOM_STATS=m

Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6576
[ci:skip-build]: already built successfully in CI

(cherry picked from commit 9f5a636c02)
2025-06-04 21:12:11 +02:00
Luca Weiss cb3d98ec2e linux-postmarketos-qcom-sc7280: upgrade to 6.15.0
Manual kconfig changes:
* SND_SOC_SM8250=y (and disable SND_SOC_SC8280XP)
* SC_LPASS_CORECC_7280=y
* QCOM_STATS=y

Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6577
[ci:skip-build]: already built successfully in CI

(cherry picked from commit 86bfad3b13)
2025-06-04 21:11:48 +02:00
Alistair Francis c8a5368dcf device-purism-librem5: update to 69pureos2
Signed-off-by: Alistair Francis <alistair@alistair23.me>
Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6584

[ci:skip-build]: already built successfully in CI

(cherry picked from commit 8519c1f3f3)
2025-06-04 20:57:32 +02:00
Luca Weiss f247830630 main/hwtest: add missing py3-setuptools makedepend
This is required to build.

Take the opportunity to clean up the APKBUILD a bit.

Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6594
[ci:skip-build]: already built successfully in CI

(cherry picked from commit 3c8552ecc1)
2025-06-04 20:54:48 +02:00
Oliver Smith b4a2cbe8d0 Revert "main/hwtest: drop"
This reverts commit d94aad6a80.
2025-06-04 20:54:44 +02:00
Oliver Smith 20c661d87f Revert "main/postmarketos-boot-hwtest: remove"
This reverts commit b8889e5853.
2025-06-04 20:54:05 +02:00
Clayton Craft 8099b7931c main/postmarketos-qemu-common: disable hw cursors on wlroots
This partially works around #2246

This is setting a var specific to wlroots, BUT many UIs use wlroots and some
(phosh) vendor it so adding a single text file with 1 line in it seems better
than having at least 2 extra subpackages (1 for installing if phoc, 1 for
installing if wlroots, and others?)

Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6508
Part-of: https://gitlab.postmarketos.org/postmarketos/pmaports/-/merge_requests/6508
(cherry picked from commit 97b9d77632)
2025-06-04 20:48:19 +02:00
Clayton Craft 1ff2eac13f device-qemu-*: depend on postmarketos-qemu-common
Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6508
Part-of: https://gitlab.postmarketos.org/postmarketos/pmaports/-/merge_requests/6508
(cherry picked from commit 68ed2f96a1)
2025-06-04 20:48:08 +02:00
Clayton Craft 27989ef4c4 main/postmarketos-qemu-common: new aport
This package contains common config shared between all qemu "devices"

Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6508
Part-of: https://gitlab.postmarketos.org/postmarketos/pmaports/-/merge_requests/6508
(cherry picked from commit 6272fcbf15)
2025-06-04 20:47:58 +02:00
Oliver Smith f4c875e747 device/{archived,downstream}: remove
Remove, at least for the initial v25.06 bringup. We might bring back
downstream to v25.06 later if there is interest, or maybe specific
device ports.
2025-06-04 20:41:44 +02:00
Oliver Smith 43b6790d4d temp/os-installer: fork from Alpine edge
Having this in postmarketOS stable will be useful to provide a nice
installer for laptops and PCs, so let's fork the package for now.

Related: https://gitlab.alpinelinux.org/alpine/aports/-/issues/17225
2025-06-01 16:49:05 +02:00
Oliver Smith f06c90998a main/postmarketos-ui-niri: remove
https://gitlab.alpinelinux.org/alpine/aports/-/issues/17224
2025-06-01 16:41:29 +02:00
Oliver Smith 1d0e28a5c4 main/postmarketos-ui-lomiri: remove
Missing deps:
https://gitlab.alpinelinux.org/alpine/aports/-/issues/17222
2025-06-01 16:34:03 +02:00
Oliver Smith c31b3f0695 main/postmarketos-ui-cosmic: remove
Missing dependencies:
https://gitlab.alpinelinux.org/alpine/aports/-/issues/17223
2025-06-01 16:33:01 +02:00
Oliver Smith 73363f833c main/postmarketos-ui-bananui: remove
Related packages are still in testing:
https://gitlab.alpinelinux.org/alpine/aports/-/issues/17221
2025-06-01 15:35:04 +02:00
Oliver Smith 1196c8df2c device-trekstor-surftabduow1: remove
Depends on grub-x86 too.
2025-06-01 14:42:11 +02:00
Oliver Smith 60bd444edf device-surftab-wintron7.0: remove
Fails to build:
  ERROR: device-surftab-wintron7.0: dependency not found: grub-x86
2025-06-01 14:27:35 +02:00
Oliver Smith 8013e39228 cross/{gcc,musl}-x86: bring back
These are needed for systemd-boot-x86.
2025-06-01 14:23:19 +02:00
Oliver Smith e15b28123d cross/systemd-boot-x86: bring it back
This package is needed for x86_64. I had removed it earlier with other
x86 packages (that are needed for the x86 arch which we don't build in
stable).
2025-06-01 14:20:51 +02:00
Oliver Smith b8889e5853 main/postmarketos-boot-hwtest: remove
Depends on hwtest, which was removed from stable in a previous commit.
2025-06-01 12:52:03 +02:00
Oliver Smith 42fad6d2ae cross/busybox-static-aarch64: upgrade to 1.37.0-r18 2025-06-01 12:52:03 +02:00
Oliver Smith d94aad6a80 main/hwtest: drop
Fails to build, remove it from stable:

Traceback (most recent call last):
  File "/home/pmos/build/src/hwtest-0.7.0/setup.py", line 1, in <module>
    from setuptools import setup
ModuleNotFoundError: No module named 'setuptools'
2025-06-01 12:52:03 +02:00
Oliver Smith dd9d2803c5 main/postmarketos-ui-mediaberry: drop
mbwl depends on wlroots0.17-dev from alpine testing, which isn't
available in alpine stable. Remove it from postmarketOS stable, if
somebody wants to have it in pmOS stable then add it back in a merge
request with all dependencies.
2025-06-01 12:52:02 +02:00
Oliver Smith 370fb5dd49 temp/petitboot: drop
Fails to build, remove it from stable.
2025-06-01 12:52:02 +02:00
Oliver Smith bbc2271dc2 cross/busybox-static-*: regenerate for v25.06 2025-06-01 12:52:01 +02:00
Oliver Smith af86026fd7 cross/musl: regenerate for v25.06 2025-06-01 12:51:26 +02:00
Oliver Smith e26e66ad6a Remove packages not supported in stable 2025-06-01 12:51:23 +02:00
Oliver Smith 251ede03e5 main/postmarketos-base: set version to v25.06 2025-06-01 12:50:32 +02:00
Oliver Smith a632cb30fc === Branch v25.06 from master ===
Related: https://wiki.postmarketos.org/wiki/Create_release_branch
2025-06-01 12:50:29 +02:00
Oliver Smith 3aaaad17cb systemd/abuild: remove
The abuild package has been forked to temp/abuild and
extra-repos/systemd/abuild in the past. The systemd one is legacy from
the initial systemd repo bootstrap method that is currently broken and
will be replaced soon (see MR 6440). While the new one is not ready yet,
this package is currently not useful so remove it to fix the failing
upstream-compat check (currently it is on a different version than
temp/abuild).

[ci:skip-vercheck]: just removing a comment in temp/abuild

Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6573
[ci:skip-build]: already built successfully in CI
2025-06-01 12:47:53 +02:00
Clayton Craft c9c7583282 main/devicepkg-utils: add missing makedepend
pmb is more strict about this

Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6583
[ci:skip-build]: already built successfully in CI
2025-06-01 12:46:01 +02:00
Anjandev Momi 8998931585 main/postmarketos-ui-sxmo-de-dwm: enable systemd
Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/5831
2025-06-01 12:38:46 +02:00
Anjandev Momi af2c2e6b1f main/postmarketos-ui-sxmo-de-sway: enable systemd
Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/5831
2025-06-01 12:38:42 +02:00
Alistair Francis 070f069ebb postmarketos-systemd-base: add preset for Librem5
Signed-off-by: Alistair Francis <alistair@alistair23.me>
Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6563

[ci:skip-build]: already built successfully in CI
2025-05-30 14:43:25 -07:00
Alistair Francis f6e3633aaf device-purism-librem5: add systemd service
Signed-off-by: Alistair Francis <alistair@alistair23.me>
Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6563
2025-05-30 14:43:25 -07:00
Oliver Smith 9358db8346 cross/systemd-boot-x86: upgrade to 257.6
Related: https://gitlab.alpinelinux.org/alpine/aports/-/merge_requests/84963

Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6574
[ci:skip-build]: already built successfully in CI
2025-05-30 14:39:22 -07:00
knuxify 6cf560614a ci: fix wiki CI script detecting non-packaged devices as non-booting
Since non-booting and non-packaged devices were merged into one list, any
device that was listed as booting but wasn't packaged would get detected
as non-booting. That created a loop where to pass CI one would have to set
packaged = yes, which they shouldn't do until the port has actually been
merged, which they can't do unless it passes CI...

Now the section has been split into two sub-sections, thus the non-booting
section is separate once again. This fixes the issue, but we need to tell
the CI script to use that section name.

This effectively reverts commit e9d2ac8021.

Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6579
[ci:skip-build]: already built successfully in CI
2025-05-30 22:21:09 +02:00
fossdd 8ab80c017a systemd/pipewire: upgrade to 1.4.4
Upstream: https://gitlab.alpinelinux.org/alpine/aports/-/merge_requests/84674

Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6575
[ci:skip-build]: already built successfully in CI
2025-05-30 10:25:34 +02:00
postmarketOS CI ce37f31d19 linux-next: upgrade to next-20250530 2025-05-30 04:49:31 +00:00
knuxify e9d2ac8021 ci: fix wiki script after device page change
The script looks for the section with non-booting devices; it just got
renamed to "Non-booting and unavailable devices". Update the script
accordingly.

Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6570
[ci:skip-build]: already built successfully in CI
2025-05-29 23:24:26 +02:00
Clayton Craft fd96e65267 cross/busybox-static-*: upgrade to 1.37.0-r18 2025-05-29 14:18:10 -07:00
Casey Connolly 25b02f40b6 linux-next: enable ZRAM_BACKEND_ZSTD
And enable multi-comp for funsies, seems useful

Signed-off-by: Casey Connolly <kcxt@postmarketos.org>
Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6544
[ci:skip-build]: already built successfully in CI
2025-05-29 21:49:38 +02:00
fossdd 00bbca5738 systemd: move systemd-network-generator into origin package
Closes https://gitlab.postmarketos.org/postmarketOS/pmaports/-/issues/3730

Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6568
[ci:skip-build]: already built successfully in CI
2025-05-29 21:41:36 +02:00
fossdd 6fe7b95c67 main/postmarketos-base-ui-gnome: replace epiphany with firefox in the dash
By default, we ship firefox-esr in place of Epiphany as web browser, so
also show Firefox as Browser in the Dash.

Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6560
[ci:skip-build]: already built successfully in CI
2025-05-29 21:37:38 +02:00
Clayton Craft 2e9e6ddbf9 temp/abuild: upgrade to 3.15.0
APKBUILD was also rebased onto the latest version in aports

Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6569
[ci:skip-build]: already built successfully in CI
2025-05-29 21:35:12 +02:00
Robert Mader cd6ef6e873 temp/libcamera: Enable virtual pipeline
Analog to a recent change in Fedora:
https://src.fedoraproject.org/rpms/libcamera/pull-request/14

This change allows to easily create virtual cameras, which is helpful
for testing and debugging purposes, both for system components like Mesa
and Pipewire as well as various apps.

The virtual cameras can be enabled by:
```
cd /usr/share/libcamera/pipeline/virtual
cp virtual.yaml.example virtual.yaml
systemctl --user restart pipewire
```

Using the test option allows to keep the arch dependent automatic pipeline
selection in place. It also enables building of the vimc pipeline -
which is very small - and all tests, however those don't get included
into the packages.

The new dependency, libyuv, is very small and already installed by
default for DEs like gnome-mobile.

Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6567
[ci:skip-build]: already built successfully in CI
2025-05-29 21:33:29 +02:00
postmarketOS CI d3b642da8e linux-next: upgrade to next-20250529 2025-05-29 15:55:43 +00:00
postmarketOS CI 928f4acd43 linux-next: upgrade to next-20250528 2025-05-29 04:44:47 +00:00
fossdd 2a480d1a58 systemd/mutter: upgrade to 48.2
https://gitlab.gnome.org/GNOME/mutter/-/blob/48.3/NEWS

https://gitlab.alpinelinux.org/alpine/aports/-/merge_requests/84809

Part-of: https://gitlab.postmarketos.org/postmarketos/pmaports/-/merge_requests/6559
2025-05-28 16:36:15 +02:00
fossdd 3965addf72 systemd/gnome-shell: upgrade to 48.2
https://gitlab.gnome.org/GNOME/gnome-shell/-/blob/48.2/NEWS

https://gitlab.alpinelinux.org/alpine/aports/-/merge_requests/84809

Part-of: https://gitlab.postmarketos.org/postmarketos/pmaports/-/merge_requests/6559
2025-05-28 16:36:15 +02:00
adamthiede 4b0b290656 linux-postmarketos-mediatek-mt8173: upgrade to 6.15
Part-of: https://gitlab.postmarketos.org/postmarketos/pmaports/-/merge_requests/6555

[ci:skip-build]: already built successfully in CI
2025-05-27 18:37:50 +02:00
postmarketOS CI 827c4486f4 linux-next: upgrade to next-20250527 2025-05-27 15:45:47 +00:00
Clayton Craft 4edb3d9cbc main/postmarketos-base-ui-gnome: add gapless to pmb_recommends
This seems to be a nice, featureful music player to ship by default for
GNOME-based UIs that works well on mobile and desktop

Fixes #3544

[ci:skip-vercheck] pmb_recommends change

Part-of: https://gitlab.postmarketos.org/postmarketos/pmaports/-/merge_requests/6558
2025-05-27 11:50:42 +02:00
Alistair Francis d06196d49b linux-purism-librem5: upgrade to 6.6.83pureos2
Signed-off-by: Alistair Francis <alistair@alistair23.me>
Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6549
2025-05-26 22:02:08 -07:00
Sicelo A. Mhlongo a0d53ce669 linux-postmarketos-omap: upgrade to 6.15
Some patches are now merged in 6.15. Drop.

Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6557
[ci:skip-build]: already built successfully in CI
2025-05-26 22:25:07 +02:00
Oliver Smith 1c52586bbe channels.cfg: add initial v25.06 branch 2025-05-26 22:11:05 +02:00
fossdd 2d5445b4ee device-apple-tonga: switch to main/mesa
mesa-25.1.0 includes the asahi driver

See also https://gitlab.alpinelinux.org/alpine/aports/-/merge_requests/84245

Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6518
[ci:skip-build]: already built successfully in CI
2025-05-26 21:18:58 +02:00
postmarketOS CI 1d8395d3c2 linux-next: upgrade to next-20250526 2025-05-26 15:44:24 +00:00
fossdd da610ac7a7 main/postmarketos-ui-niri: remove .pre-install hook
Group and user are already added by Alpine aports:
https://gitlab.alpinelinux.org/alpine/aports/-/blob/master/community/greetd/greetd.pre-install

Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6526
[ci:skip-build]: already built successfully in CI
2025-05-26 13:11:21 +02:00
五河 琴里 fb7b7e3b35 device-fairphone-fp5: Add kernel modules for touch screen to modules-initfs
Add kernel modules for touch screen to modules-initfs, mainly for
entering the full disk encryption passphrase.

Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6543
[ci:skip-build]: already built successfully in CI
2025-05-26 13:08:11 +02:00
fossdd 6d05b512a0 systemd/phosh: update force-adaptive list
https://gitlab.alpinelinux.org/alpine/aports/-/merge_requests/84748

Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6554
[ci:skip-build]: already built successfully in CI
2025-05-26 09:49:55 +02:00
Oliver Smith cae33e65a8 main/postmarketos-ui-framebufferphone: remove
fbp has been removed in Alpine testing:
https://gitlab.alpinelinux.org/alpine/aports/-/commit/10434a9f8de50b445483e8640393cbcdf3577e1d

"Abandoned, hasn't been buildable since at least Zig 0.12."

Alpine has Zig 0.14.1 currently.

Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6553
2025-05-25 21:55:55 +02:00
Stefan Hansson f99c508f02 linux-sony-nicki-mainline: install dtbs
Otherwise boot-deploy can't find them. I have no idea how this ever
worked.

Closes https://gitlab.postmarketos.org/postmarketOS/pmaports/-/issues/3724

Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6550
[ci:skip-build]: already built successfully in CI
2025-05-25 19:34:10 +02:00
fossdd 8d0ca1d895 main/postmarketos-welcome: upgrade to 0.9.1
https://gitlab.postmarketos.org/postmarketOS/postmarketos-welcome/-/tags/0.9.1

Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6551
2025-05-25 16:38:38 +02:00
Rudraksha Gupta 5b1e01c15f device-samsung-expressatt: Add linux-lts, linux-edge, & linux-stable
Add more mainline-linux kernels that are more stable that linux-next

Also, let’s not install the firmware Library of Alexandria

Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6507
[ci:skip-build]: already built successfully in CI
2025-05-25 11:20:39 +02:00
George Brooke 31014f740c systemd/postmarketos-base-systemd: enable cros-keyboard-systemd.service in base preset
Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6529

[ci:skip-build]: already built successfully in CI
2025-05-25 11:14:57 +02:00
George Brooke f2982e9fd3 main/cros-keyboard-map: add systemd service and supporting files
Using systemd-tmpfiles to create the directory in /tmp seems to be the most systemd way to do it.
The config file for the systemd has a different format because the format of the openrc file doesn't lend itself to being used in a systemd service.

Thanks to @craftyguy for suggested fix.

Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6529
2025-05-25 11:14:57 +02:00
fossdd 2c8c7c8fee systemd/wireplumber: upgrade to 0.5.10
https://gitlab.alpinelinux.org/alpine/aports/-/merge_requests/84654

Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6546
[ci:skip-build]: already built successfully in CI
2025-05-25 10:26:33 +02:00
fossdd 8f762fa7a3 systemd/pipewire: upgrade to 1.4.3
https://gitlab.alpinelinux.org/alpine/aports/-/merge_requests/84674

Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6546
2025-05-25 10:26:29 +02:00
Clayton Craft 10f9386920 main/swclock-offset: upgrade to 0.2.6
Small bugfix release, see upstream changelog:
https://gitlab.postmarketos.org/postmarketOS/swclock-offset/-/tags/0.2.6

Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6545
[ci:skip-build]: already built successfully in CI
2025-05-24 20:23:39 -07:00
exkc 4e81c720f7 main/postmarketos-ui-buffyboard: rotate the keyboard based on the the rotation of framebuffer
Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6534
2025-05-24 20:07:04 -07:00
Rudraksha Gupta 654d291abd linux-next: msm8960: expressatt: SSH via USB
Enable various USB configs so that we can SSH into the device

Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6540
2025-05-23 20:25:26 -07:00
Alistair FrancisandClayton Craft 3bf8208abe postmarketos-systemd-base: add preset for 81voltd
Signed-off-by: Alistair Francis <alistair@alistair23.me>
Co-authored-by: Clayton Craft <clayton@craftyguy.net>
Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6494

[ci:skip-build]: already built successfully in CI
2025-05-23 16:07:09 -07:00
Alistair Francis e4c95465a2 temp/81voltd: add systemd service
Include 81voltd.service to start 81voltd at boot similar
to the existing initd.

Resolves: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/issues/3698
Signed-off-by: Alistair Francis <alistair@alistair23.me>
Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6494
[ci:skip-build]: already built successfully in CI
2025-05-23 16:04:07 -07:00
postmarketOS CI 0d735e0438 linux-next: upgrade to next-20250523 2025-05-23 15:44:23 +00:00
Val Packett 855a4cf229 device-postmarketos-trailblazer: add more USB drivers for Qualcomm laptops to initfs
Add the new non-qcom name from phy-qcom-snps-eusb2 (only in linux-next so
keep the old name as well for now), and add the missing repeaters for USB
ports on many WoA laptops (ptn3222 for USB-A and ps883x for USB-C).

Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6538
[ci:skip-build]: already built successfully in CI
2025-05-23 14:01:19 +02:00
Val Packett d003ba3bc9 linux-next: hotfix for missing driver in the build for qcom snps usb phy
The current linux-next packages are missing the driver for the eUSB PHY
which breaks USB on Qualcomm laptops. This happened because the driver
was moved out of the Qualcomm subdirectory and the config variable has
changed [1].. but the arm64 defconfig was not yet updated to match!

[1]: https://lore.kernel.org/all/20250504144527.1723980-4-ivo.ivanov.ivanov1@gmail.com/

Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6538
2025-05-23 14:01:17 +02:00
Clayton Craft 891093fd9e linux-wiko-lenny{3,5}: add shared patches to fix build issues
Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6542

[ci:skip-build]: already built successfully in CI
2025-05-22 22:59:46 -07:00
Clayton Craft 3b0f9a1b82 systemd/postmarketos-base-systemd: fix issue with locale.conf being ignored
Shells (and DEs!) that set environment from /etc/profile.d will end
up sourcing 20locale.sh from alpine-baselayout. This file will set
`LANG=C.UTF8`, and this will override whatever systemd-localed/systemd
sets LANG to. In other words, locale.conf is effectively ignored. I
hit this issue when debugging why the date in COSMIC was always `M05`
instead of `May`, and why various COSMIC components failed to detect the
locale (because it was set to C.UTF8)

Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6535
[ci:skip-build]: already built successfully in CI
2025-05-22 17:10:47 -07:00
Luca Weiss a45ad4b1b1 device/testing/*: split downstream ports into new downstream category
[ci:skip-build] # way too many packages changed
[ci:skip-vercheck] # just moving

Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6519
2025-05-22 15:43:23 -07:00
Luca Weiss 63b64868c4 CI: directory-structure: add new downstream device category
Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6519
2025-05-22 23:06:10 +02:00
Luca Weiss 26454d5c4d linux-wiko-lenny5: switch to alive sources
wikogeek.com appears to be down.

Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6519
2025-05-22 23:06:10 +02:00
Luca Weiss 0fae7c397a linux-wiko-lenny3: switch to alive sources
wikogeek.com appears to be down.

Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6519
2025-05-22 23:06:09 +02:00
postmarketOS CI ed5cdcd8ef linux-next: upgrade to next-20250522 2025-05-22 15:53:25 +00:00
Henrik Grimler 3663100868 device-raspberry-pi5: set getty (MR 6536)
We can get to a serial shell without setting the getty in the UIs (for
some reason), but when using console=none we need it to be explicitly
set.

[ci:skip-build]: already built successfully in CI

Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6536
2025-05-21 21:34:14 +02:00
Henrik Grimler 29b28552a0 device-raspberry-pi5: add more modules to initfs to fix fde (MR 6536)
From my testing the different modules are roughly needed due to:

* Without the aes stuff unlock fails with
  trusted_key: encrypted_key: failed to alloc_cipher (-2)

* Without i2c_brcmstb hdmi fails to come up due to
  missing dependencies:
  platform axi:gpu: deferred probe pending: (reason unknown)

* The sound stuff also seems to be a dependency of the drm hdmi driver

Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6536
2025-05-21 21:34:11 +02:00
Henrik Grimler 2fafb5aaf6 device-raspberry-pi5: drop modules from cmdline (MR 6536)
We are already passing a list of modules through the modules-initfs
file.  By dropping modules from cmdline we silence this dmesg warning:

[    0.000000] Unknown kernel command line parameters "modules=loop,squashfs,sd-mod,usb-storage", will be passed to user space.

Out of the listed modules, only squashfs is actually built as a module
by linux-rpi, so most of them do not make sense in any case.

Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6536
2025-05-21 21:34:08 +02:00
postmarketOS CI cde1e93ef5 linux-next: upgrade to next-20250521 2025-05-21 18:50:45 +00:00
Clayton Craft 3592e6dcee main/postmarketos-mkinitfs: upgrade to 2.6.2
Includes an important fix for /usr merged installs

Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6539
[ci:skip-build]: already built successfully in CI
2025-05-20 14:33:07 -07:00
Anjandev Momi 2bd08ccec4 google-bonito: move to community (MR 6485)
[ci:skip-vercheck]

[ci:skip-build]: already built successfully in CI
2025-05-19 14:36:48 +02:00
fossdd 3ce9b5a347 main/postmarketos-ui-gnome-mobile: depend on xdp-gnome (MR 6523)
moved from -base-ui-gnome

[ci:skip-build]: already built successfully in CI
2025-05-19 13:36:14 +02:00
fossdd 7cb69028ec main/postmarketos-ui-gnome: depend on xdp-gnome (MR 6523)
moved from -base-ui-gnome
2025-05-19 13:36:14 +02:00
fossdd 6a0e5b8f89 main/postmarketos-base-ui-gnome: remove xdp-gnome dependency (MR 6523)
shoudn't be installed on phosh where it's useless and just steals boot
time
2025-05-19 13:36:14 +02:00
fossdd fa915e5c3a systemd/phosh: upgrade to 0.47.0
https://gitlab.alpinelinux.org/alpine/aports/-/merge_requests/84018

Part-of: https://gitlab.postmarketos.org/postmarketos/pmaports/-/merge_requests/6532
[ci:skip-build]: already built successfully in CI
2025-05-18 20:24:24 +02:00
postmarketOS CI eccb9f3359 linux-next: upgrade to next-20250516 2025-05-16 15:44:22 +00:00
fossdd 83b5d2271f systemd/gnome-session: remove dependency of _shell subpkg
Fixes https://builds.sr.ht/~postmarketos/job/1490862

Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6524
[ci:skip-build]: build tested locally
2025-05-16 16:55:19 +02:00
Luca Weiss 45fc98843d xiaomi-kenzo: add -downstream suffix for downstream port
Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6516

[ci:skip-build]: already built successfully in CI
2025-05-16 11:05:45 +01:00
Luca Weiss 744a3d15c7 firmware-samsung-espresso10: drop
Unused firmware package, drop it.

Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6516
2025-05-16 11:05:45 +01:00
Luca Weiss 3081ae4c48 linux-samsung-j5y17lte: drop
It's a downstream kernel but there's no (downstream) device port
referencing it. Drop it.

Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6516
2025-05-16 11:05:45 +01:00
Ferass El Hafidi de7b10333e linux-lg-w7: fix build
[ci:skip-build] # verified locally

Signed-off-by: Ferass El Hafidi <funderscore@postmarketos.org>
Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6522
2025-05-16 11:01:04 +01:00
Ferass El Hafidi 84b9b473d6 linux-samsung-s3ve3g: fix build
Signed-off-by: Ferass El Hafidi <funderscore@postmarketos.org>
Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6522
2025-05-16 10:56:27 +01:00
Bhushan Shah 4907fec033 systemd/systemd-services: add CAP_WAKE_ALARM to powerdevil
With systemd 275.x merged, this works as expected and also upstream
changes for this is merged. So, let's enable this here to allow Alarm
clock in Plasma Mobile e.g. to wake up device from suspend.

Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6509
2025-05-16 11:38:04 +05:30
postmarketOS CI 7a01a16ee1 linux-next: upgrade to next-20250515 2025-05-16 04:49:19 +00:00
Clayton Craft d2631ed229 device-generic-x86_64: depend on systemd-boot-x86
Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6506

[ci:skip-build]: already built successfully in CI
2025-05-15 22:48:30 +02:00
Pablo Correa Gómez 6cad7cea9b main/systemd-boot: remove
Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6506
2025-05-15 22:48:30 +02:00
Clayton Craft f80528b498 cross/systemd-boot-x86: new aport
fixes #3711

Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6506
2025-05-15 22:48:30 +02:00
ell1e 22d18cc39b device-raspberry-pi5: Fix firmware not finding the boot partitions
Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6513
2025-05-15 19:52:16 +02:00
fossdd 49d5416123 */*: remove --no-rebuild from meson test
meson 1.7.0 and later don't include test build targets in the default
build target. With --no-rebuild the test targets aren't build at all.
Removing --no-rebuild shouldn't cause any false rebuilds since the files
aren't changed between the build() and check() step.

See upstream https://gitlab.alpinelinux.org/alpine/aports/-/merge_requests/83218
and https://gitlab.alpinelinux.org/alpine/aports/-/issues/16891

[ci:skip-vercheck]
[ci:ignore-count]
[ci:skip-build]

Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6515
2025-05-15 19:25:15 +02:00
fossdd 9a8fce58a4 systemd/gnome-session: move gnome-shell session files into subpackage
Just some change we already have upstream for a while but forgot to copy
over here downstream

Ref: https://gitlab.alpinelinux.org/alpine/aports/-/merge_requests/79185

Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6520
[ci:skip-build]: already built successfully in CI
2025-05-15 19:23:17 +02:00
Luca Weiss 95a7699122 linux-asus-sparrow-downstream: fix build (MR 6491)
[ci:skip-build] # too many devices modified
2025-05-15 16:20:28 +01:00
Luca Weiss 9ce104b3bc linux-htc-m8-downstream: fix build (MR 6491) 2025-05-15 16:20:28 +01:00
Luca Weiss f8882b5807 linux-htc-memul-downstream: fix build (MR 6491) 2025-05-15 16:20:28 +01:00
Luca Weiss 08e7f33cd8 linux-huawei-angler-downstream: fix build (MR 6491) 2025-05-15 16:20:28 +01:00
Luca Weiss 9fab60f585 linux-huawei-sturgeon-downstream: fix build (MR 6491) 2025-05-15 16:20:28 +01:00
Luca Weiss 118f41e16c linux-lg-bullhead-downstream: fix build (MR 6491) 2025-05-15 16:20:28 +01:00
Luca Weiss d235bbfab4 linux-lg-h815-downstream: fix build (MR 6491) 2025-05-15 16:20:28 +01:00
Luca Weiss 8fbdfcff91 linux-lg-lenok-downstream: fix build (MR 6491) 2025-05-15 16:20:28 +01:00
Luca Weiss 806c1e3d82 linux-lg-mako-downstream: fix build (MR 6491) 2025-05-15 16:20:28 +01:00
Luca Weiss 139e39a459 linux-motorola-falcon-downstream: fix build (MR 6491) 2025-05-15 16:20:28 +01:00
Luca Weiss 3d30ba97a4 linux-motorola-peregrine-downstream: fix build (MR 6491) 2025-05-15 16:20:28 +01:00
Luca Weiss 243973dfe2 linux-oneplus-bacon-downstream: fix build (MR 6491) 2025-05-15 16:20:28 +01:00
Luca Weiss e1c66777f0 linux-ouya-ouya-downstream: fix build (MR 6491) 2025-05-15 16:20:27 +01:00
Luca Weiss 3798264c7d linux-samsung-golden-downstream: fix build (MR 6491) 2025-05-15 16:20:27 +01:00
Luca Weiss 05aa43490e linux-samsung-i9100-downstream: fix build (MR 6491) 2025-05-15 16:20:27 +01:00
Luca Weiss 251d72da62 linux-sony-amami-downstream: fix build (MR 6491) 2025-05-15 16:20:27 +01:00
Luca Weiss 1ae2025252 linux-sony-leo-downstream: fix build (MR 6491) 2025-05-15 16:20:27 +01:00
Luca Weiss 816e40a971 linux-sony-nicki-downstream: fix build (MR 6491) 2025-05-15 16:20:27 +01:00
Luca Weiss 0f91538a89 linux-sony-yuga-downstream: fix build (MR 6491) 2025-05-15 16:20:27 +01:00
Luca Weiss 07d7049a1e xiaomi-platina: split downstream into separate package (MR 6491) 2025-05-15 16:20:27 +01:00
Luca Weiss eb8c071479 volla-mimameid: split downstream into separate package (MR 6491) 2025-05-15 16:20:27 +01:00
Luca Weiss 0098501fde sony-yuga: split downstream into separate package (MR 6491) 2025-05-15 16:20:27 +01:00
Luca Weiss f680808f3c sony-nicki: split downstream into separate package (MR 6491) 2025-05-15 16:20:27 +01:00
Luca Weiss 7dc99fff94 sony-leo: split downstream into separate package (MR 6491) 2025-05-15 16:20:27 +01:00
Luca Weiss 2c64f4d602 sony-amami: split downstream into separate package (MR 6491) 2025-05-15 16:20:27 +01:00
Luca Weiss 6ba5b453b8 samsung-v1awifi: split downstream into separate package (MR 6491) 2025-05-15 16:20:27 +01:00
Luca Weiss 2c22a7dcf4 samsung-n2awifi: split downstream into separate package (MR 6491) 2025-05-15 16:20:27 +01:00
Luca Weiss 5c01445385 samsung-klimtlte: split downstream into separate package (MR 6491) 2025-05-15 16:20:27 +01:00
Luca Weiss 10632b07c2 samsung-i9100: split downstream into separate package (MR 6491) 2025-05-15 16:20:27 +01:00
Luca Weiss c48bdd7518 samsung-golden: split downstream into separate package (MR 6491) 2025-05-15 16:20:27 +01:00
Luca Weiss c3866c8813 samsung-chagallwifi: split downstream into separate package (MR 6491) 2025-05-15 16:20:27 +01:00
Luca Weiss 9351355d35 samsung-a6lte: split downstream into separate package (MR 6491) 2025-05-15 16:20:27 +01:00
Luca Weiss dec0c8e50c ouya-ouya: split downstream into separate package (MR 6491) 2025-05-15 16:20:27 +01:00
Luca Weiss 7b9af8330d oneplus-kebab: split downstream into separate package (MR 6491) 2025-05-15 16:20:27 +01:00
Luca Weiss 869f5726de oneplus-instantnoodlep: split downstream into separate package (MR 6491) 2025-05-15 16:20:27 +01:00
Luca Weiss cc3d816cc3 oneplus-bacon: split downstream into separate package (MR 6491) 2025-05-15 16:20:27 +01:00
Luca Weiss b8508b9275 motorola-peregrine: split downstream into separate package (MR 6491) 2025-05-15 16:20:27 +01:00
Luca Weiss ba3c38b51f motorola-falcon: split downstream into separate package (MR 6491) 2025-05-15 16:20:27 +01:00
Luca Weiss 9adacec8f6 lg-mako: split downstream into separate package (MR 6491) 2025-05-15 16:20:27 +01:00
Luca Weiss 10a8699fe7 lg-lenok: split downstream into separate package (MR 6491) 2025-05-15 16:20:27 +01:00
Luca Weiss 0445cab53c lg-h815: split downstream into separate package (MR 6491) 2025-05-15 16:20:27 +01:00
Luca Weiss cd381c6619 lg-bullhead: split downstream into separate package (MR 6491) 2025-05-15 16:20:26 +01:00
Luca Weiss b5fcd384eb huawei-sturgeon: split downstream into separate package (MR 6491) 2025-05-15 16:20:26 +01:00
Luca Weiss 5a0a535b5f huawei-angler: split downstream into separate package (MR 6491) 2025-05-15 16:20:26 +01:00
Luca Weiss 781d03a32b htc-memul: split downstream into separate package (MR 6491) 2025-05-15 16:20:26 +01:00
Luca Weiss fc2e30e70a htc-m8: split downstream into separate package (MR 6491) 2025-05-15 16:20:26 +01:00
Luca Weiss 9cce6b3788 google-crosshatch: split downstream into separate package (MR 6491) 2025-05-15 16:20:26 +01:00
Luca Weiss 8fed9fc30a fairphone-fp2: split downstream into separate package (MR 6491) 2025-05-15 16:20:26 +01:00
Luca Weiss 9993428b64 asus-sparrow: split downstream into separate package (MR 6491) 2025-05-15 16:20:26 +01:00
Luca Weiss 03bd94639f linux: add shared patch to fix section mismatch in msm_pm_boot_probe() (MR 6491)
The same patch is already used on 3 devices, to make it shared.

WARNING: vmlinux.o(.devinit.text+0x1bd4): Section mismatch in reference from the function msm_pm_boot_probe() to the function .init.text:msm_pm_boot_init()
2025-05-15 16:20:26 +01:00
Luca Weiss 06a3fd31a7 main/postmarketos-base-downstream: fix conflict with systemd-udevd (MR 6491)
ERROR: postmarketos-base-downstream-disable-udev-v4l-2-r1: trying to overwrite usr/lib/udev/rules.d/60-persistent-v4l.rules owned by systemd-udevd-257.5-r0.
2025-05-15 16:20:26 +01:00
fossdd 0b6019b013 main/postmarketos-artwork: enable lockscreen background for phosh
By default it is disabled by upstream[1], but if we use a wallpaper
thats adapted to mobile (it is anyways) and g-c-c sets both wallpapers
already.

If users want to change the lockscreen wallpaper only, they have to use
p-m-s.

[1] https://gitlab.gnome.org/World/Phosh/phosh/-/commit/24a255401288e3793a3686bf5c605d1c55bb1176

Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6511
[ci:skip-build]: already built successfully in CI
2025-05-15 16:05:04 +02:00
fossdd 2f55b55832 main/postmarketos-welcome: upgrade to 0.9.0
https://gitlab.postmarketos.org/postmarketOS/postmarketos-welcome/-/tags/0.9.0

Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6510
[ci:skip-build]: already built successfully in CI
2025-05-15 10:29:19 +02:00
Clayton Craft ed19fab2a3 ci/test_provides: make exception for provides with valid versions hardcoded
The APKBUILD reference seems to suggest that versioned provides= can
have any valid version string (e.g. 0.12-r3) in the `provides=` var, and
that it doesn't have to match `$pkgver-r$pkgrel` for the APKBUILD. IIRC
this test intends to catch typos like `provides=foo=$pkgver-$pkgrel`, so
this makes it pass when any valid version string is given.

Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6475
[ci:skip-build]: already built successfully in CI
2025-05-15 10:22:04 +02:00
Pablo Correa Gómez 3fa97cac3e extra-repos/systemd/alpine-base: remove
Since last commit, we no longer depend on it in postmarketos-base, and
this fork is not necessary

Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6475
2025-05-15 10:22:04 +02:00
Pablo Correa Gómez 196748d419 main/postmarketos-base: don't depend on alpine-base
alpine-base directly depends on openrc. We have had different[1]
conversations[2] with upstream. And the main conclussion[3] has been:
if you want to do something different, just depend on things
yourself. This is indeed what docker images do. So let's just get the
things that we want from alpine base (quite some!), and ignore what we
don't want (openrc, busybox openrc and init packages). Up until commit
12d125ab8b72f0249fd6aae000170a4fa78a83ab in pmbootstrap every
postmarketOS installation would have alpine-base in
/etc/apk/world. Therefore, we add a versioned provides to
postmarketos-base with a very high version, which conflicts with the
upstream version but should be chosen instead.

alpine-conf is now a dependency of postmarketos-base-openrc, since it
dependes on openrc for calling setup-*
scripts. postmarketos-base-systemd already implements those needed.

Contrary to the first attempt[4], I have kept the dependency on
alpine-release. Changes to that are independent to the usr-merge, and
can be done as a follow-up.

This should allow to drop the fork of alpine-base currently in the
systemd-extra repository!

To this day, every single pmOS installation will have alpine-base in
the world file, which means that systemd installs will the forked
package until users specifically run "apk del alpine-base". We must
add this to release notes and to an edge blog post. Alternatively we
could have an empty package with a very high version providing
alpine-base. This also means that to get installs to work, we need a
pmbootstrap release with[5] on it.

[1] https://gitlab.alpinelinux.org/alpine/aports/-/merge_requests/63935
[2] https://gitlab.alpinelinux.org/alpine/aports/-/merge_requests/71686
[3] https://gitlab.alpinelinux.org/alpine/aports/-/merge_requests/71686#note_435428
[4] https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/5026
[5] https://gitlab.postmarketos.org/postmarketOS/pmbootstrap/-/merge_requests/2580

Fixes #2806

Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6475
2025-05-15 10:22:04 +02:00
Pablo Correa Gómez a00d027b40 postmarketos-base{-systemd}: provide postmarketos-base-init
Why is this needed?

To be able to test the usr-merge downstream we need to stop
depending on alpine-baselayout. For that, we need to stop depending on
alpine-base. This is a first step to create a "provides" solution
downstream between openrc and systemd systems, so that in a follow-up
commit we can recreate alpine-base downstream without the hard-coded
openrc dependency. The virtual instead of a versioned dependency means
that:
* In theory systemd and openrc could be installed in parallel. In
  practice we avoid that with !openrc in the systemd package and
  !systemd in the postmarketos-base-openrc one. There is a lot more
  work required with provides (both upstream and downstream) regarding
  things like elogind and eudev to be able to even have them
  package-wise ready to be installed in parallel
* There must always be one installed. Here we have 3 scenarios:
  * pmbootstrap install where pmbootstrap will decide which one
  * update from existing install. The virtual makes sure that APK
    won't remove the local package because versions changed
  * Manual APK work, where the provider_priority or the user will
    choose

How does this work? Hypothesis:
* openrc upgrades: the postmarketos-base-openrc remains installed,
  moves from being an "install_if", to be there because it fulfills
  the postmarketos-base-init requirements.
* systemd upgrades: postmarketos-base-systemd is still in
  /etc/apk/world, and it fulfills the new dependency in
  postmarketos-base. Nothing happens.
* openrc installs: pmbootstrap will choose one of
  postmarketos-base-openrc and postmarketos-base-systemd... But which?
  The one with the higher version?
* systemd installs: postmarketos-base-systemd is installed before
  anything else is. That means, postmarketos-base-init will already
  be satisfied when postmarketos-base gets installed, and openrc will
  not be installed

Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6475
2025-05-15 10:22:03 +02:00
Pablo Correa Gómez f1b840646c main/postmarketos-base: remove unnecessary old replaces
Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6475
2025-05-15 10:21:48 +02:00
Pablo Correa Gómez d717031716 main/postmarketos-base{-ui}: move bootsplash dependency to base-ui
Forward port from
https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/5026,
it's a small cleanup, since the bootsplash better belongs to the
base-ui package.

In the process, order alphabetically dependencies for postmarketos-base

Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6475
2025-05-15 10:21:48 +02:00
Pablo Correa Gómez 4a12c98778 main/postmarketos-base-ui: remove "_" from beginning of split functions
This is inconsistent through the file. In addition, the "_" prefix is
often used when a function is not directly a split function from a
subpackage, but a "private" function that others call. So remove it to
make it clear that these are subpackage split functions

Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6475
2025-05-15 10:21:48 +02:00
postmarketOS CI 65505d41eb linux-next: upgrade to next-20250514 2025-05-15 04:45:06 +00:00
George Brooke a467bfd1b1 systemd/postmarketos-base-systemd: enable keyd.service in base preset
Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6499

[ci:skip-build]: already built successfully in CI, except unrelated qemu
runner failures
2025-05-14 14:15:01 -07:00
George Brooke 59f47ddc1e systemd/systemd-services: add keyd service file
Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6499
2025-05-14 20:39:34 +01:00
Henrik Grimler d5ba79031a device-raspberry-pi5: disable dhcpd
Otherwise the ip address 172.42.16.1 is assigned to eth0, preventing
the rpi to get internet access automatically.

Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6504
[ci:skip-build]: already built successfully in CI
2025-05-14 17:34:06 +02:00
Henrik Grimler d460ed9b72 device-raspberry-pi5: use ttyAMA10 for second console
When I test the build the serial console is attached to ttyAMA10, not
ttyAMA0:

  107d001000.serial: ttyAMA10 at MMIO 0x107d001000 (irq = 16, base_baud = 0) is a PL011 rev3

Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6504
2025-05-14 17:34:06 +02:00
Henrik Grimler ccaf9c9d20 device-raspberry-pi5: remove quiet from cmdline
This enable kernel logs over hdmi and serial, and hence simplifies
debugging.

Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6504
2025-05-14 17:34:06 +02:00
Luca Weiss f847873453 device-asus-flo: Rename subpackage of old mainline kernel
Downstream is not the correct label for this, it's v4.11 upstream with
13 patches, so let's rename it.

Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6505
[ci:skip-build]: already built successfully in CI
2025-05-14 17:28:09 +02:00
Alistair Francis 260c54a893 systemd/networkmanager: Support Librem5 WiFi Hotspot
This applies a patch from the Purism tree [1] to ensure that the Librem5
can create a WiFi Hotspot.

Adding a hacky patch to NetworkManager is less then ideal, but there
currently isn't a better way to get WiFi Hotspot working. pmOS already
has a fork of NetworkManager so adding one more patch isn't too much
worse. If the NetworkManager fork disapears I think this patch can also
just be dropped, but while we are maintaing NetworkManager we may as
well support the Librem5.

Hopefully Purism develop a cleaner fix for this in the future, as
Librem5 development seems to have started up again.

1: https://source.puri.sm/pureos/packages/network-manager/-/blob/pureos/latest/debian/patches/pureos/wifi-Disable-WPA-PSK-SHA256-in-AP-mode.patch

Resolves: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/issues/2508
Signed-off-by: Alistair Francis <alistair@alistair23.me>
Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6421
[ci:skip-build]: already built successfully in CI
2025-05-14 11:11:20 +02:00
Pablo Correa Gómez 6622982587 ci: remove global before_script
We should not need to apk upgrade on stable just to check that MR
settings are correct. Simplify that, and remove an anchor only used in
one place.

Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6471
[ci:skip-build]: already built successfully in CI
2025-05-13 09:37:57 -07:00
Pablo Correa Gómez fe2009a846 ci: avoid using alpine:edge on lint CI jobs
It is a lot more prone to breaking than stable, which is the
default. The reason to have them there is also not very clear.
The editor-config has been there since its introduction in
e7a8141113. It might be that at the time
it was not in community or in a stable release. The shellcheck-grep
has been there since 81872a59c1, which
was already 6 years ago. Probably at the time our tooling was a lot
less integrated and stable in alpine as it is today, and everything
was running edge.

Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6471
2025-05-13 09:37:57 -07:00
Pablo Correa Gómez 437edbcce9 ci: simplify rules for running pipelines
We were formerly running pipelines on branches when we directly pushed
or cherry-picked commits. That is no longer the case, and this is just
leftover from that.

Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6471
2025-05-13 09:37:57 -07:00
Pablo Correa Gómez 967b9e5756 ci: add build-jobs.yaml.j2 to all changes that have gitlab-ci.yml
When one applies, the other one does too

Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6399
[ci:skip-build]: already built successfully in CI
2025-05-13 09:34:45 -07:00
Samuel Dionne-Riel 2533d06c90 ci: Always add build jobs, but disable by default
This sounds counter-productive and counter-intuitive, but hear me out:
this allows using `needs` to depend on those jobs, without further
templating downstream jobs.

In turn, those jobs depending on a disabled jobs, while they still exist
in the “graph” of the pipeline, are also transitively disabled.

This change, for all intents and purpose, is a no-op regarding the
amounts of jobs being sent to CI runners.

Also updates the comment for the placeholder job, since the wording
could lead to think that *having jobs* is sufficient. In reality, having
jobs that ran succesfully is necessary for the child pipeline to be
successful.

Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6399
2025-05-13 09:34:45 -07:00
postmarketOS CI 8c0af36541 linux-next: upgrade to next-20250513 2025-05-13 15:44:39 +00:00
Robert Eckelmann 9e4e957840 linux-postmarketos-grate: add myself as co-maintainer
Signed-off-by: Robert Eckelmann <longnoserob@postmarketos.org>
Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6464

[ci:skip-build]: already built successfully in CI
2025-05-13 14:13:46 +02:00
Robert Eckelmann 32ae2f4a1f firmware-nvidia-tegra-armv7: add myself as co-maintainer
Signed-off-by: Robert Eckelmann <longnoserob@postmarketos.org>
Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6464
2025-05-13 14:13:46 +02:00
Robert Eckelmann 45ccc02f31 firmware-nvidia-tegra-armv7: upgrade to latest master
should best be merged after !6379 is merged

Signed-off-by: Robert Eckelmann <longnoserob@postmarketos.org>
Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6464
2025-05-13 14:13:46 +02:00
Rudraksha Gupta b2cdf1e6df device-samsung-expressatt: Use lk2nd and linux-next
The following has changed:
- use lk2nd instead of heimdall
- use linux-next
- drop msm8960 pmOS kernel

Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6133
[ci:skip-build]: already built successfully in CI
2025-05-13 03:51:46 -07:00
Rudraksha Gupta 341d88e8fe .ci/lib: ignore pkgrel checks for linux-next
Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6133
2025-05-13 03:51:00 -07:00
George Brooke 35ded7a2d7 device-google-trogdor: workaround accelerometer issue in buffered mode
Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6495

[ci:skip-build]: already built successfully in CI
2025-05-13 09:46:59 +02:00
Jane Rachinger 655ac6716d systemd/systemd: upgrade to 257.5
Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6441

[ci:skip-build]: already built successfully in CI
2025-05-12 14:53:10 -07:00
fossdd 8257d957f0 main/postmarketos-ui-lomiri: set button-layout override to ":"
"" is not the correct way since applications can't split it by colon and
causes unexpected behaviours like https://gitlab.gnome.org/GNOME/libadwaita/-/issues/1032

Part-of: https://gitlab.postmarketos.org/postmarketos/pmaports/-/merge_requests/6478
2025-05-12 21:15:35 +02:00
Caleb Connolly 4515a2c6ea device-postmarketos-trailblazer: move most depends to recommends
None of the devices running trailblazer actually need all these daemons
or firmware. Move almost everything to recommends so that users can free
up space and so that customised images can be built with
--no-recommends.

Since there are some folks already using trailblazer who DO depend on
these packages, let's try letting users know about this at least.

Signed-off-by: Caleb Connolly <caleb@postmarketos.org>
Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6239
2025-05-12 19:32:08 +02:00
Caleb Connolly f74694ae90 postmarketos-base: move sshd config drop-in from base-ui
Introduce a new postmarketos-base-ssh subpackage to contain this config
file, since we ALWAYS want this when openssh-server-pam is installed,
even if we don't have base-ui (e.g. because someone installed openssh on
top of a "none" install).

Signed-off-by: Caleb Connolly <caleb@postmarketos.org>
Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6239
2025-05-12 19:31:36 +02:00
Ferass El Hafidi bd66d8c9f6 device-amlogic-tvbox: add support for Mi TV Stick
Signed-off-by: Ferass El Hafidi <funderscore@postmarketos.org>
Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6121

[ci:skip-build]: already built successfully in CI
2025-05-12 19:17:27 +02:00
Ferass El Hafidi 4ec35e37d5 device-amlogic-tvbox: rework boot packaging
* add a new `aml_boot_prep` function to setup FIT images and uEnv.ini
   (for legacy U-Boot support)
 * add support for generating a FIT image

Signed-off-by: Ferass El Hafidi <funderscore@postmarketos.org>
Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6121
2025-05-12 19:17:27 +02:00
Ferass El Hafidi 370c78448a soc-amlogic-s905: support booting a uImage or FIT
Signed-off-by: Ferass El Hafidi <funderscore@postmarketos.org>
Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6121
2025-05-12 19:17:27 +02:00
Ferass El Hafidi d236c28c11 linux-postmarketos-amlogic: add patches for Xiaomi Mi TV Stick
These patches have been sent upstream already, and are currently in the
amlogic git tree.

See also:
 - https://lore.kernel.org/linux-amlogic/20250502-aquaman-v6-0-f1af347d9709@postmarketos.org/
 - https://git.kernel.org/amlogic/c/4954ec9300cfe7ab6f1de1c93c56c236ac0a07e5
 - https://git.kernel.org/amlogic/c/f5d4227c6dcab047579cca7b8e31a476ecdebf7b

Signed-off-by: Ferass El Hafidi <funderscore@postmarketos.org>
Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6121
2025-05-12 19:17:27 +02:00
Scott C b7bb10cbe4 linux-postmarketos-omap: add support for barnesnoble-encore
Add device tree and initial stab at panel driver for the new barnesnoble-encore device.

 Changes to be committed:
	new file:   device/community/linux-postmarketos-omap/0013-arm-dts-Add-barnesnoble-encore-support.patch
	new file:   device/community/linux-postmarketos-omap/0014-panel-Add-lg-ld070ws1-for-barnesnoble-encore.patch
	modified:   device/community/linux-postmarketos-omap/APKBUILD
	modified:   device/community/linux-postmarketos-omap/config-postmarketos-omap.armv7

Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6486
[ci:skip-build]: already built successfully in CI
2025-05-12 19:15:15 +02:00
Scott C d3742fc7ee device-barnesnoble-encore: new device
Add device package for barnesnoble-encore, aka Barnes & Noble Nook Color. Device tree and initial stab at panel driver will be added as a separate commit to the mainline omap kernel.

	new file:   device/testing/device-barnesnoble-encore/APKBUILD
	new file:   device/testing/device-barnesnoble-encore/deviceinfo
	new file:   device/testing/device-barnesnoble-encore/modules-initfs

Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6486
2025-05-12 19:15:15 +02:00
Clayton Craft ee13367e22 systemd/systemd-services: add docker-engine/dockerd and containerd unit files
fixes #3679

Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6450
[ci:skip-build]: already built successfully in CI
2025-05-12 19:07:27 +02:00
Jane Rachinger 7bf33125d4 systemd/systemd-services: install tmpfiles into right directory
previously tmpfiles got installed under /usr/lib/tmpfiles.d/tmpfiles.d/.
This omits the tmpfiles.d in the prefix to install files under
/usr/lib/tmpfiles.d/.

Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6502
[ci:skip-build]: already built successfully in CI
2025-05-12 18:49:34 +02:00
postmarketOS CI 7d9350c913 linux-next: upgrade to next-20250512 2025-05-12 15:56:46 +00:00
Bart Ribbers 982e207f85 systemd/systemd-services: disable ddcutil integration of PowerDevil
As mentioned in https://blog.bshah.in/2025/05/07/plasma-sprint-in-graz-2025/ it's
currently broken and causes issues when kwin_wayland restarts for some reason. Better to just disable it until upstream has figured out a proper solution.

Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6487
[ci:skip-build]: already built successfully in CI
2025-05-12 17:15:15 +02:00
fossdd b56d7517c4 systemd/upower: upgrade to 1.90.9
Upstream: https://gitlab.alpinelinux.org/alpine/aports/-/merge_requests/82651

Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6503
[ci:skip-build]: already built successfully in CI
2025-05-12 15:44:32 +02:00
Alexey Minnekhanov 884eeb00ed linux-postmarketos-qcom-sdm660: upgrade to 6.14.6
Included one small fix to sudden reboot when inserting USB cable,
or when booting with cable inserted that only affect some
Xiaomi devices.

Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6498
Signed-off-by: Alexey Minnekhanov <alexeymin@postmarketos.org>
2025-05-12 13:06:56 +03:00
Oliver Smith 3c58ddae78 cross/gcc-x86_64: fix depends line for aarch64
The gcc-x86_64 is only built for aarch64. Set the depends line to
so:libc.musl-aarch64.so.1 as we had it before 42a50731 ("cross/gcc-*:
upgrade to 14.2.0-r6"). I had set it to so:libc.musl-x86_64.so.1 like
the other cross gccs by accident.

[ci:skip-build]: I'll verify it builds locally before merge.
[ci:skip-vercheck]: version not bumped intentionally.

Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6501
2025-05-12 07:20:13 +02:00
Oliver Smith baadc8f89a cross/gcc-*: add depends again
Bring back manually listed soname depends that were removed in 42a50731
("cross/gcc-*: upgrade to 14.2.0-r6 "). Without these we get various
cross compiler errors (issue 3705).

How these were removed: the cross/gcc-* packages are generated from
"pmbootstrap aportgen", and the code in master currently removes those.
There was a WIP MR that adds the depends again, but it was not finished
(pmbootstrap MR 2521). This needs to be fixed in pmbootstrap and we need
a better process that ensures we can't push broken cross compilers to
master anymore if followed correctly. I'll look into all of that, but
first let's get the cross compilers working again in edge.

[ci:skip-vercheck]: for generated gccs we keep the same pkgrel as in
                    alpine. I'll force a rebuild in BPO after merge (not
                    ideal, but fixing this is rather urgent as cross
                    compilation is otherwise broken in pmOS edge)
[ci:skip-build]: tested locally

Related: issue 3705

Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6500
2025-05-11 22:38:20 +02:00
Oliver Smith 7337f3d698 cross/gcc-*: fix conflict with native gcc
Run aportgen again with pmbootstrap MR 2597 to fix the conflict when
installing cross gcc and native gcc at the same time:

  (52/53) Installing gcc-armv7 (14.2.0-r6)
  ERROR: gcc-armv7-14.2.0-r6: trying to overwrite usr/lib/libgcc_s.so.1 owned by libgcc-14.2.0-r6.

[ci:skip-vercheck]: for generated gccs we keep the same pkgrel as in
                    alpine. I'll force a rebuild in BPO after merge (not
		    ideal, but fixing this is rather urgent as cross
		    compilation is otherwise broken in pmOS edge)
[ci:skip-build]: tested locally with gcc-armv7

Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6497
2025-05-11 18:21:59 +02:00
Clayton Craft 905a0683c4 systemd/systemd-services: add avahi-daemon unit files
Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6477

[ci:skip-build]: already built successfully in CI
2025-05-11 17:16:36 +02:00
Bart Ribbers 2b5f35c868 systemd/plasma*: upgrade to 6.3.5
Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6483

[ci:skip-build]: already built successfully in CI
2025-05-11 17:04:56 +02:00
Luca Weiss fe81903cf4 main/gnome-shell-theme-e-ink: move from device/testing/ (and fix build)
This package doesn't really belong into the device/testing/ directory,
it's quite a regular package, so move it to main.

Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6490
[ci:skip-build]: already built successfully in CI
2025-05-11 17:02:04 +02:00
Oliver Smith 17def54246 main/bootrr: fix subpackages line
Fix for:
  >>> ERROR: bootrr: duplicate (sub-)package named bootrr

Looks like this has been a typo from when the APKBUILD was created, but
abuild only started complaining about it recently:
https://gitlab.alpinelinux.org/alpine/abuild/-/commit/d92f75509447011168bc0c71b156c97f06099007

Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6496
[ci:skip-build]: verified locally that it builds
2025-05-11 16:47:53 +02:00
Dzmitry Sankouski e22932b5fb device-samsung-starqltechn: add hexagonfs firmware loader
Add hexagonfs-firmware-loader and hexgonrpcd dependencies. This allows
to use phone's sensors.

Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6492
2025-05-11 14:54:12 +03:00
Robert Eckelmann 97dbb45a3d cross/gcc-*: fix building
this reverts the change of removing !tracedeps from 42a507315b

With that the building of these packages should work again

Signed-off-by: Robert Eckelmann <longnoserob@postmarketos.org>

[ci:skip-vercheck]

Signed-off-by: Robert Eckelmann <longnoserob@postmarketos.org>
Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6489
2025-05-11 16:06:44 +09:00
Clayton Craft 92de2f095a main/postmarketos-base-ui: revert qcom/adreno flatpak workaround
This reverts commit d246f597de.

The Mesa bug was fixed upstream[1] and the fix is in Mesa 25.0.5.

1. https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34628

Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6472
[ci:skip-build]: already built successfully in CI
2025-05-10 22:50:22 -07:00
Casey Connolly 9b3769cced treewide: update my name
[ci:skip-build]

Signed-off-by: Casey Connolly <kcxt@postmarketos.org>
Part-of: https://gitlab.postmarketos.org/postmarketos/pmaports/-/merge_requests/6488
2025-05-10 17:59:34 +02:00
Clayton Craft 42a507315b cross/gcc-*: upgrade to 14.2.0-r6 2025-05-09 13:38:36 -07:00
postmarketOS CI 90a16918dc linux-next: upgrade to next-20250509 2025-05-09 15:56:35 +00:00
Clayton Craft 5d4ff3b1be cross/busybox-static-*: upgrade to 1.37.0-r17 2025-05-08 16:34:02 -07:00
postmarketOS CI f45a677acf linux-next: upgrade to next-20250508 2025-05-08 15:57:05 +00:00
Richard Acayan e562bac43f alsa-ucm-conf-qcom-sdm670: upgrade to 1.2.9_git20250503
Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6452

[ci:skip-build]: already built successfully in CI
2025-05-08 15:47:28 +02:00
Richard Acayan ee67a5204d firmware-google-sargo: add cdsp and hexagon_nn firmware
Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6452
2025-05-08 15:47:28 +02:00
Richard Acayan bac53efa59 linux-postmarketos-qcom-sdm670: upgrade to v6.14.5
Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6452
2025-05-08 15:47:28 +02:00
postmarketOS CI 51da0e4281 linux-next: upgrade to next-20250507 2025-05-08 04:56:27 +00:00
fossdd 43b560f778 main/postmarketos-base-ui-gnome: apply green-accent gsettings override to phosh
The value after the colon is defines to apply only to the
XDG_CURRENT_DESKTOP. Phosh upstream defines it for setting a yellow
accent color and no background image, and therefore takes priority if we
don't enforce it to the XDG_CURRENT_DESKTOP value aswell.

Part-of: https://gitlab.postmarketos.org/postmarketos/pmaports/-/merge_requests/6479
2025-05-07 19:52:32 +02:00
fossdd 6e3a1d838b main/postmarketos-artwork: apply pmOS-wallpaper gsettings override to phosh
The value after the colon is defines to apply only to the
XDG_CURRENT_DESKTOP. Phosh upstream defines it for setting a yellow
accent color and no background image, and therefore takes priority if we
don't enforce it to the XDG_CURRENT_DESKTOP value aswell.

Part-of: https://gitlab.postmarketos.org/postmarketos/pmaports/-/merge_requests/6479
2025-05-07 19:52:32 +02:00
fossdd e704400c1f main/postmarketos-ui-phosh: depend on sound-theme-phosh
Enables the "Sound theme for Phosh" which contains sounds like
cellbroadcast.

Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6480
[ci:skip-build]: already built successfully in CI
2025-05-07 17:59:06 +02:00
Ferass El Hafidi feed256853 device-amlogic-tvbox: remove xiaomi-once port
The DTS patches for it do not apply anymore, and exkc has said that
their device is now broken, so they are unable to continue maintaining
the port.

As a stop-gap solution, xiaomi-once users who still wish to use
postmarketOS can use the p212 port. They are also welcome to fix the
devicetree patches and upstream them.

Signed-off-by: Ferass El Hafidi <funderscore@postmarketos.org>
Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6412
2025-05-07 09:48:26 +00:00
Ferass El Hafidi b332f5854a linux-postmarketos-amlogic: upgrade to 6.12.23
Signed-off-by: Ferass El Hafidi <funderscore@postmarketos.org>
Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6412
2025-05-07 09:48:26 +00:00
Oliver Smith cb918b3286 main/postmarketos-release-upgrade: upgrade to 1.8.1
Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6466
2025-05-06 18:36:24 -07:00
Clayton Craft 7a9acf86ec systemd/postmarketos-base-systemd: add configuration for systemd-resolved
Installing systemd-resolved by default is still probably not a good
idea (e.g. until #1430 is fixed, at least?), but this adds config for
NM and sd-resolved to get the stub resolver set up automatically when
systemd-resolved is installed manually by a user.

Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6250
[ci:skip-build]: already built successfully in CI
2025-05-06 10:19:38 -07:00
postmarketOS CI 187efa9fac linux-next: upgrade to next-20250506 2025-05-06 15:56:28 +00:00
Clayton Craft f84adcd778 main/*: explicitly depend on openrc if install scripts call rc-update
[ci:ignore-count]

Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6476
[ci:skip-build]: already built successfully in CI
2025-05-06 10:49:08 +02:00
Clayton Craft a308720ea9 device-realme-x3: add nonfree-fw-openrc subpkg
This should make it possible to build systemd images for this device. I
don't know if anyone cares, but I couldn't look away when I found this
until I fixed it :D

Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6476
2025-05-06 10:48:44 +02:00
Clayton Craft 469374de6d device/*: explicitly depend on openrc if install scripts call rc-update
Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6476
2025-05-06 10:48:44 +02:00
C-VD 4fafe4406f samsung-chagalllte: new device
Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6457
2025-05-06 13:35:36 +09:00
Robert Eckelmann d38efd838b main/postmarketos-base-ui: add workaround for Mali GPUs w/ mesa 25
This adds 'PAN_MESA_DEBUG=noafbc' to the environment for systems with
Mediatek SoCs

closes #3692

Signed-off-by: Robert Eckelmann <longnoserob@postmarketos.org>
Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6470
2025-05-06 08:50:05 +09:00
Clayton Craft de59cdaa67 device-generic-x86_64: add modules to initfs to support emmc storage
Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6444

[ci:skip-build]: already built successfully in CI
2025-05-05 15:40:08 -07:00
Pablo Correa Gómez 29c5cea80f device-pine64-pinephone: depend on openrc when enabling services
Relates https://gitlab.postmarketos.org/postmarketOS/pmbootstrap/-/merge_requests/2585

Relates https://gitlab.postmarketos.org/postmarketOS/pmaports/-/issues/2097

Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6474
[ci:skip-build]: already built successfully in CI
2025-05-05 14:02:20 -07:00
Clayton Craft a5cefca7b2 Revert: usr merge preparations
pmbootstrap isn't ready yet for these patches, so building systemd
images is broken when they are in pmaports.

This reverts commits:
23894ca89d.
6c78abbde6.
9bcdec3337.
53500854fe.
8639c2c0e4.
9d33e4d812.

Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6473
[ci:skip-build]: already built successfully in CI
2025-05-05 13:13:00 -07:00
Samuel Dionne-Riel be29aa00d7 main/postmarketos-mkinitfs-hook-ci: Print markers many times
This helps ensure the logs are actually flushed.

The numbers chosen are relatively arbitrary, and it might be that using
a longer delay, maybe with more messages too, is desirable.

Right now, it's printing 20 times over a span of 2 seconds.

The whole `precision` schtick is how we can approximate float division,
when using only integer division. Then, the important trick is to shove
the given number back into the correct representation for `sleep`, and
careful `printf` application gives us exactly what we need.

Signed-off-by: Samuel Dionne-Riel <samuel@dionne-riel.com>
Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6335
[ci:skip-build]: already built successfully in CI
2025-05-05 21:01:29 +02:00
Samuel Dionne-Riel a3155b8985 main/postmarketos-mkinitfs-hook-ci: Add message about re-enabling kernel logs
This is not needed, but better mirrors the other call.

Signed-off-by: Samuel Dionne-Riel <samuel@dionne-riel.com>
Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6335
2025-05-05 21:00:50 +02:00
Samuel Dionne-Riel c8b513cc6e main/postmarketos-mkinitfs-hook-ci: Handle shellcheck checks
- Point shellcheck to the files this is sourcing
 - Tell it about the shell in use
 - Drop unused variable (grepped around)

The last change is about how the hooks are ran. The warning shellcheck
was giving was that using `if <command...>; then ...; fi` is preferred,
instead of comparing `$?`.

This is exactly what is now being done, so the branches have been
swapped around, and the command (full path to a hook) is being used
within the if condition.

Signed-off-by: Samuel Dionne-Riel <samuel@dionne-riel.com>
Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6335
2025-05-05 21:00:50 +02:00
Pablo Correa Gómez 23894ca89d extra-repos/systemd/alpine-base: remove
Since last commit, we no longer depend on it in postmarketos-base, and
this fork is not necessary

Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6375
[ci:skip-build]: already built successfully in CI
2025-05-05 19:29:34 +02:00
Pablo Correa Gómez 6c78abbde6 main/postmarketos-base: don't depend on alpine-base
alpine-base directly depends on openrc. We have had different[1]
conversations[2] with upstream. And the main conclussion[3] has been:
if you want to do something different, just depend on things
yourself. This is indeed what docker images do. So let's just get the
things that we want from alpine base (quite some!), and ignore what we
don't want (openrc, busybox openrc and init packages). alpine-conf is
now a dependency of postmarketos-base-openrc, since it dependes on
openrc for calling setup-* scripts. postmarketos-base-systemd already
implements those needed.

Contrary to the first attempt[4], I have kept the dependency on
alpine-release. Changes to that are independent to the usr-merge, and
can be done as a follow-up.

This should allow to drop the fork of alpine-base currently in the
systemd-extra repository!

To this day, every single pmOS installation will have alpine-base in
the world file, which means that systemd installs will the forked
package until users specifically run "apk del alpine-base". We must
add this to release notes and to an edge blog post. Alternatively we
could have an empty package with a very high version providing
alpine-base.

[1] https://gitlab.alpinelinux.org/alpine/aports/-/merge_requests/63935
[2] https://gitlab.alpinelinux.org/alpine/aports/-/merge_requests/71686
[3] https://gitlab.alpinelinux.org/alpine/aports/-/merge_requests/71686#note_435428
[4] https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/5026

Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6375
2025-05-05 19:29:34 +02:00
Pablo Correa Gómez 9bcdec3337 postmarketos-base{-systemd}: provide postmarketos-base-init
Why is this needed?

To be able to test the usr-merge downstream we need to stop
depending on alpine-baselayout. For that, we need to stop depending on
alpine-base. This is a first step to create a "provides" solution
downstream between openrc and systemd systems, so that in a follow-up
commit we can recreate alpine-base downstream without the hard-coded
openrc dependency. The virtual instead of a versioned dependency means
that:
* In theory systemd and openrc could be installed in parallel. In
  practice we avoid that with !openrc in the systemd package and
  !systemd in the postmarketos-base-openrc one. There is a lot more
  work required with provides (both upstream and downstream) regarding
  things like elogind and eudev to be able to even have them
  package-wise ready to be installed in parallel
* There must always be one installed. Here we have 3 scenarios:
  * pmbootstrap install where pmbootstrap will decide which one
  * update from existing install. The virtual makes sure that APK
    won't remove the local package because versions changed
  * Manual APK work, where the provider_priority or the user will
    choose

How does this work? Hypothesis:
* openrc upgrades: the postmarketos-base-openrc remains installed,
  moves from being an "install_if", to be there because it fulfills
  the postmarketos-base-init requirements.
* systemd upgrades: postmarketos-base-systemd is still in
  /etc/apk/world, and it fulfills the new dependency in
  postmarketos-base. Nothing happens.
* openrc installs: pmbootstrap will choose one of
  postmarketos-base-openrc and postmarketos-base-systemd... But which?
  The one with the higher version?
* systemd installs: postmarketos-base-systemd is installed before
  anything else is. That means, postmarketos-base-init will already
  be satisfied when postmarketos-base gets installed, and openrc will
  not be installed

Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6375
2025-05-05 19:29:34 +02:00
Pablo Correa Gómez 53500854fe main/postmarketos-base: remove unnecessary old replaces
Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6375
2025-05-05 19:29:34 +02:00
Pablo Correa Gómez 8639c2c0e4 main/postmarketos-base{-ui}: move bootsplash dependency to base-ui
Forward port from
https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/5026,
it's a small cleanup, since the bootsplash better belongs to the
base-ui package.

In the process, order alphabetically dependencies for postmarketos-base

Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6375
2025-05-05 19:29:34 +02:00
Pablo Correa Gómez 9d33e4d812 main/postmarketos-base-ui: remove "_" from beginning of split functions
This is inconsistent through the file. In addition, the "_" prefix is
often used when a function is not directly a split function from a
subpackage, but a "private" function that others call. So remove it to
make it clear that these are subpackage split functions

Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6375
2025-05-05 19:29:34 +02:00
panpanpanpan 53c1445d65 device-xiaomi-nabu: depend on firmware-xiaomi-nabu instead of msm-firmware-loader
Xiaomi didn't ship some firmware in the vendor partition, so i needed to package that firmware by myself, at that point i had some reports that in some devices (or some android versions) they were missing some firmware, so i would rather go back to package the firmware in a different package

Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6429
2025-05-05 19:43:43 +03:00
panpanpanpan 1bc3c1d898 firmware-xiaomi-nabu: new aport
Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6429
2025-05-05 19:43:43 +03:00
postmarketOS CI 1d2357ddff linux-next: upgrade to next-20250505 2025-05-05 16:02:44 +00:00
Alexey Minnekhanov 5627d617a5 device-xiaomi-whyred: switch to mainline kernel, take maintainership
Mainline port supports all features currently available on the
platform, bringing whyred in line with the best supported devices
on the sdm660 kernel.

Working:

 * framebuffer display
 * regulators
 * volume/power keys
 * gpio hall sensor
 * battery fulegauge & charger
 * PMIC vibrator
 * PMIC WLED backlight
 * notification LED
 * storage: eMMC, SD cards
 * USB (only USB2 and only gadget mode, like the rest of the platform)
 * hardware video enocder/decoder (venus)
 * WCN3990 Bluetooth, Wi-Fi
 * Synaptics rmi4 touchscreen
 * Display (mdss), GPU Adreno 509
 * LCD IPS video mode panel (Tianma TD4310)
 * sensors are automagically supported too

Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6469
Signed-off-by: Alexey Minnekhanov <alexeymin@postmarketos.org>
2025-05-05 04:08:59 +03:00
Alexey Minnekhanov 2831217eb2 firmware-xiaomi-whyred: new aport
Contains Wi-Fi board + metadata file and Qualcomm Adreno zap firmware.

The rest of firmware is handled by msm-firmware-loader.

Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6469
Signed-off-by: Alexey Minnekhanov <alexeymin@postmarketos.org>
2025-05-05 04:08:53 +03:00
Alexey Minnekhanov c2660af703 linux-postmarketos-qcom-sdm660: upgrade to 6.14.5
* Fixed GPUfreq scaling
* Reworked GPU speedbin handling
* new device: sdm636-xiaomi-whyred (Redmi Note 5/Pro)
* new device: sdm630-motorola-beckham (Moto Z3 Play)
* updated SMGR patchset with new types of sensors
* lots of DTB checks warnings fixed

Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6469
Signed-off-by: Alexey Minnekhanov <alexeymin@postmarketos.org>
2025-05-05 04:08:32 +03:00
postmarketOS CI 2c6510b7c9 linux-next: upgrade to next-20250501 2025-05-01 15:56:19 +00:00
Robert Eckelmann 0c8d309324 linux-postmarketos-marvell: upgrade to 6.14.4
Signed-off-by: Robert Eckelmann <longnoserob@postmarketos.org>
Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6456
2025-05-01 20:23:28 +09:00
Eisenbahnfan 8347bbfac8 samsung-v1awifi: add mainline kernel variant
And set myself as maintainer.

Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6453
2025-05-01 02:39:05 +02:00
postmarketOS CI 4c31f80b7e linux-next: upgrade to next-20250430 2025-04-30 15:56:28 +00:00
Aster Boese fc9ca1013a postmarketos-ui-niri: new package
Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6449

[ci:skip-build]: already built successfully in CI
2025-04-30 17:12:10 +02:00
Aster Boese 020ffd888d systemd/postmarketos-base-systemd: add niri presets
Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6449
2025-04-30 17:12:10 +02:00
Aster Boese 83e90ecc8b systemd/systemd-services: add wlgreet service
Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6449
2025-04-30 17:12:05 +02:00
Robert Eckelmann 6a341b8e75 linux-postmarketos-grate: add new defconfig items
more built-in stuff, less modules

see also https://gitlab.com/grate-driver/linux/-/commit/211e8b463bec3b2fae21475d92220cb909dabea8

Signed-off-by: Robert Eckelmann <longnoserob@postmarketos.org>
Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6379
2025-04-30 23:10:11 +09:00
Robert Eckelmann 3ccf292fc9 linux-postmarketos-grate: upgrade to 6.12.5
Signed-off-by: Robert Eckelmann <longnoserob@postmarketos.org>
Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6379
2025-04-30 23:10:11 +09:00
Oliver Smith 7b8aadabb3 systemd: add systemd-stage0 to provides
Prepare to add a systemd-stage0 package that will replace the existing
bootstrap logic. First we need to let systemd provide systemd-stage0 and
wait until the new binary packages are built.

In follow-up patches (MR 6440), a systemd-stage0 package will be
introduced (that does not depend on systemd-enabled dbus or polkit). The
systemd/dbus and systemd/polkit will be changed to use
systemd-stage0-dev and systemd-stage0-libs as makedepends. This makes
the following bootstrap work when building without a binary repository:

1. systemd-stage0
2. dbus
3. polkit
4. systemd

If we already have the binary repository, dbus and polkit will be built
against systemd proper as it provides systemd-stage0 packages with this
patch.

Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6451
[ci:skip-build]: already built successfully in CI
2025-04-29 10:30:35 -07:00
Caleb Connolly 9fbdd4e5cf systemd/*: rebuild with abuild patches
Signed-off-by: Caleb Connolly <caleb@postmarketos.org>
Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6380

[ci:skip-build]: already built successfully in CI
2025-04-29 09:46:30 -07:00
Caleb ConnollyandClayton Craft f0b81c44b6 abuild: systemd fixes
* upgrade/rebased patches onto 3.15-rc3
* don't stop services on removal
* run preset with --force to replace symlinks (like
  display-manager.service alias).

Signed-off-by: Caleb Connolly <caleb@postmarketos.org>
Co-authored-by: Clayton Craft <clayton@craftyguy.net>
Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6380
2025-04-29 09:46:30 -07:00
postmarketOS CI 7f14263f57 linux-next: upgrade to next-20250429 2025-04-29 15:56:06 +00:00
Oliver Smith 992ef34c9d systemd/gnome-session: remove _shell subpackage
Remove the _shell subpackage that Alpine has from our forked package, as
pmbootstrap currently can't handle it. It tries to build the dependency
gnome-shell for armhf even through this, even though it has !armhf.

A WIP fix for this is in pmbootstrap MR 2592. But let's try to get the
upstream compat check green again first.

Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6461
[ci:skip-build]: already built successfully in CI
2025-04-28 19:57:15 +02:00
Oliver Smith 962688a441 systemd/mutter: upgrade to 48.2
Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6461
2025-04-28 19:57:15 +02:00
Oliver Smith ee887bdbfc systemd/gnome-shell: upgrade to 48.1
Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6461
2025-04-28 19:57:15 +02:00
Oliver Smith ef7f756fcd systemd/gnome-settings-daemon: upgrade to 48.1
Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6461
2025-04-28 19:57:15 +02:00
Oliver Smith 0313a5af0e systemd/gnome-session: upgrade to 48.0
Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6461
2025-04-28 19:57:15 +02:00
Oliver Smith d1b63efb7a systemd/gnome-keyring: upgrade to 48.0
Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6461
2025-04-28 19:57:11 +02:00
postmarketOS CI 325bbcddbd linux-next: upgrade to next-20250428 2025-04-28 16:00:11 +00:00
Oliver Smith 02f9a9da4b systemd/upower: upgrade to 1.90.8
Part-of: https://gitlab.postmarketos.org/postmarketos/pmaports/-/merge_requests/6462
2025-04-27 21:10:26 +02:00
Oliver Smith 0ba46961bb systemd/dsme: upgrade to 0.84.6
Part-of: https://gitlab.postmarketos.org/postmarketos/pmaports/-/merge_requests/6462
2025-04-27 21:10:15 +02:00
Oliver Smith 303f1b0052 systemd/drkonqi: upgrade to 6.3.4
Part-of: https://gitlab.postmarketos.org/postmarketos/pmaports/-/merge_requests/6462
2025-04-27 21:10:14 +02:00
Duje Mihanović 638391bb9e linux-samsung-coreprimevelte: use patch files
Bundle patch files with the aport instead of using a custom tarball.
This allows using official tarballs and also gives more transparency.

Besides this, there's other small changes:

* Update to 6.14.4
* Add zstd to makedepends (fixes compile error)
* Drop unneeded CC assignment
* Drop unneeded mkdir call (nitpick from pmaports!6409)

Signed-off-by: Duje Mihanović <duje.mihanovic@skole.hr>
Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6459
[ci:skip-build]: already built successfully in CI
2025-04-27 20:15:13 +02:00
Alexander Martinz 862f6a0919 firmware-shift-otter: add support for 8.0 and 8.1
The currently shipped firmware only worked on early EVT and DVT1
devices, because it is unsigned.

Signed firmware, to enable support for 8.0 was uploaded a long
time ago, but the firmware package was not bumped.

With this bump now all variations of otter are supported:
- EVT
- DVT1
- DVT2
- 8.0 (MP)
- 8.1 (MP)

Signed-off-by: Alexander Martinz <amartinz@shiftphones.com>
Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6454
[ci:skip-build]: already built successfully in CI
2025-04-27 16:06:15 +02:00
Barnabás Czémán 73e6d02c1d xiaomi-kenzo: archive device specific packages
Archive Redmi Note 3 kernel, device and firmware package
in favor of device-qcom-msm8956

Signed-off-by: Barnabás Czémán <barnabas.czeman@postmarketos.org>
[ci:skip-vercheck]
Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/5694
[ci:skip-build]: already built successfully in CI
2025-04-27 16:02:54 +02:00
Barnabás Czémán 9ca4170417 device-qcom-msm8956: new device
Add generic port for MSM8956/MSM8976 based devices.

Signed-off-by: Barnabás Czémán <barnabas.czeman@postmarketos.org>
Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/5694
2025-04-27 16:02:54 +02:00
Barnabás Czémán f87489e471 linux-postmarketos-qcom-msm8956: initial package
Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/5694
2025-04-27 16:02:54 +02:00
Alexander Martinz 95518b7a66 device-shift-otter: remove initfs compression and kernel cmdline
The initfs compression was a leftover from when the device aport
was using the sdm845 mainline kernel (as we played with the otter
bringup there).

This resulted in causing the device to not boot.

Also remove the kernel cmdline as it is already handled by getty.

Signed-off-by: Alexander Martinz <amartinz@shiftphones.com>
Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6455
[ci:skip-build]: already built successfully in CI
2025-04-27 15:59:39 +02:00
Alexander Martinz 383e4bcd1a device-shift-otter: depend on unl0kr-fbforcerefresh
We need to refresh the fb to show unl0kr on bootup.

Signed-off-by: Alexander Martinz <amartinz@shiftphones.com>
Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6455
2025-04-27 15:59:38 +02:00
Duje Mihanović bb34939bc7 samsung-coreprimevelte: move from testing to community
The device has seen a decent amount of work put into it and is usable
on a basic level. Many features unfortunately remain unavailable, but
the device fulfills the wiki requirements to be moved to community, so
let's do that to increase visibility.

The PXA1908 firmware package and the U-Boot package are moved together
with the device packages.

[ci:skip-vercheck]

Signed-off-by: Duje Mihanović <duje.mihanovic@skole.hr>
Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6409
[ci:skip-build]: already built successfully in CI
2025-04-27 15:55:07 +02:00
Duje Mihanović 46a3a0a7ce linux-samsung-coreprimevelte: configure for community
Change the kernel config to pass the community kconfig check.

Also update the local build version to use the flavor instead of just
-postmarketOS.

Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6409
2025-04-27 15:55:02 +02:00
Clayton Craft 85728d6861 main/postmarketos-ui-os-installer: new aport
Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6320

[ci:skip-build]: already built successfully in CI
2025-04-25 15:52:55 -07:00
Caleb Connolly 07e2bf526c linux-next: switch to CONFIG_HZ_1000
250 is not a lot, let's try this out i guess. if it's bad we can switch
back??

Signed-off-by: Caleb Connolly <caleb@postmarketos.org>
Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6393
[ci:skip-build]: already built successfully in CI
[ci:skip-vercheck]
2025-04-25 15:43:56 +03:00
postmarketOS CI ca2f28ec05 linux-next: upgrade to next-20250424 2025-04-25 04:55:43 +00:00
Robert Mader af116e013d systemd/pipewire: upgrade to 1.4.2
And switch the gitlab.freedesktop.org mirror again, see 95a5fc5dff

Release notes:
https://gitlab.freedesktop.org/pipewire/pipewire/-/releases/1.4.2

Notably this updates makes PW reliably stop on logout on systemd.
Logging out and in again previously would often leave cameras unusable.

Part-of: https://gitlab.postmarketos.org/postmarketos/pmaports/-/merge_requests/6448
Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6448
[ci:skip-build]: unable to test armhf, armv7, riscv64 because qemu runner busted, everything else OK
2025-04-24 15:17:31 -07:00
Clayton Craft ec2c2564e0 device-alcatel-ttab: update checksums
[ci:skip-vercheck]

Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6447
2025-04-24 12:35:15 -07:00
Oliver Smith 6530fb7496 linux-alcatel-ttab: fix missing deps
As many other downstream kernels, this needs to depend on linux-headers
to fix:

In file included from /home/pmos/build/src/android_kernel_alcatel_ttab-1795ea3c237773d32616954a03738d67d209a8d7/scripts/sortextable.c:31:
/home/pmos/build/src/android_kernel_alcatel_ttab-1795ea3c237773d32616954a03738d67d209a8d7/tools/include/tools/be_byteshift.h:4:10: fatal error: linux/types.h: No such file or directory
    4 | #include <linux/types.h>
      |          ^~~~~~~~~~~~~~~

It also needs xz:

/home/pmos/build/src/android_kernel_alcatel_ttab-1795ea3c237773d32616954a03738d67d209a8d7/scripts/xz_wrap.sh: exec: line 23: xz: not found

Related: https://builds.sr.ht/~postmarketos/job/1477748#task-pmbootstrap_build-583

Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6446
[ci:skip-build]: already built successfully in CI
2025-04-24 11:48:22 -07:00
Oliver Smith 15465008dc cross/busybox-static-*: upgrade to 1.37.0-r16 2025-04-24 20:39:28 +02:00
Error504TimeOut 1b69da9511 alcatel-ttab: new device
Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6422

[ci:skip-build]: already built successfully in CI
2025-04-24 18:20:34 +02:00
Affe Null 2504124b25 jolla-c2: new device
Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6426

[ci:skip-build]: already built successfully in CI
2025-04-24 18:12:29 +02:00
Affe Null 48bad75444 CI: deviceinfo: add manufacturer exception for Jolla
Some phones sold under the Jolla brand are manufactured by a partner,
e.g. the Jolla C2 is manufactured by Reeder. Although these phones
usually have another name given to them by the manufacturer, the name
used by Jolla is more recognizable. Allow specifying a name that
starts with "Jolla" instead of the manufacturer name.

Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6426
2025-04-24 18:12:29 +02:00
fossdd feacb49148 modem/qrtr: remove
Upstreamed to Alpine already

Ref: https://gitlab.alpinelinux.org/alpine/aports/-/tree/master/community/qrtr

Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6403
[ci:skip-build]: already built successfully in CI
2025-04-24 17:47:21 +02:00
fossdd 84f364fd5a device-google-gru: fix pkgver typo
Fixes https://gitlab.alpinelinux.org/alpine/apk-tools/-/issues/11107

Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6445
[ci:skip-build]: already built successfully in CI
2025-04-24 14:41:16 +02:00
Clayton Craft 60778a8e82 systemd/systemd-services: remove zram-init -s param from zram_swap.service
This causes zram-init to write to a device attr that was dropped from the 6.15 kernel, and fail:

https://github.com/torvalds/linux/commit/4127e13c9302f6892f73793f133ea4b4fffb2964

Reported upstream:
https://github.com/vaeth/zram-init/issues/50

fixes #3677

Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6443
[ci:skip-build]: already built successfully in CI
2025-04-23 13:59:59 -07:00
fossdd 79deaef247 systemd/systemd-services: re-add fbd-alert-slider.service
Was previously added (052b0dc801) and removed (4e0c698208) again.
But since feedbackd from Alpine doesn't provide the service again,
re-add the service.

Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6401
[ci:skip-build]: already built successfully in CI
2025-04-23 10:14:00 -07:00
postmarketOS CI 20c37ca9fd linux-next: upgrade to next-20250423 2025-04-23 15:56:30 +00:00
Anton Bambura 9294392f75 device-amlogic-tvbox: disable dhcpd
These devices have an ethernet port, therefore from the wiki:

Do not set the static ip to the network interface and do not run the
DHCP daemon on it. This makes sense for devices with an ethernet
port, like the Raspberry Pi (!1580).

Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6435
2025-04-23 12:52:26 +00:00
d2 c858786e73 xiaomi-rosemary: new device (Xiaomi Redmi Note 10S)
Wiki page: https://wiki.postmarketos.org/wiki/Xiaomi_Redmi_Note_10S_/_POCO_M5s_(xiaomi-rosemary)

Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6430
[ci:skip-build]: already built successfully in CI
2025-04-23 15:35:28 +03:00
iAboothahir ff3c929a05 firmware-asus-x00td: Clean-ups
* msm-firmware-loader loads fws from partitions and add board-2.bin
* create firmware-5.bin directly in the package

Signed-off-by: iAboothahir <aboothahirpkd@gmail.com>
Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6431
[ci:skip-build]: already built successfully in CI
2025-04-23 15:31:59 +03:00
iAboothahir c805081e64 asus-x00td: move downstream port to unmaintained
device-asus-x00td:
 * Add firmware-qcom-adreno-a530 for adreno fws
 * Add msm-firmware-loader to load fws from device partitions

Signed-off-by: iAboothahir <aboothahirpkd@gmail.com>
Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6431
2025-04-23 15:31:32 +03:00
Henrik Grimler 95fe04886c device-samsung-m3: use msdos partition type
If a custom bl1 is used on sdcard, then it should be embedded at
0x200 (512). If a GPT filesystem is used, then the GPT header uses
roughly the first 0x500 bytes, and hence bl1 overwrites part of the
GPT header in that configuration.

Change to msdos partition type so that the filesystem works fine
whether or not we use stock bl1 or custom one.

Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6442
2025-04-23 10:45:25 +00:00
Henrik Grimler 5d9f009336 device-odroid-xu4: use msdos partition type
bl1 is embedded at 0x200 (512), but the GPT header uses roughly the first
0x500 bytes, and hence bl1 overwrites part of the GPT header.

Fix issue by changing to msdos partition type.

Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6442
2025-04-23 10:45:25 +00:00
Henrik Grimler b42d3861c6 device-odroid-u2: use msdos partition type
bl1 is embedded at 0x200 (512), but the GPT header uses roughly the first
0x500 bytes, and hence bl1 overwrites part of the GPT header.

Fix issue by changing to msdos partition type.

Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6442
2025-04-23 10:45:25 +00:00
jane400 f3659cf8d5 systemd/linux-pam-pmos: drop
Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6229

[ci:skip-build]: already built successfully in CI
2025-04-22 09:38:33 -07:00
jane400 af0127e6cd systemd/postmarketos-base-systemd: use aports linux-pam
https://git.alpinelinux.org/aports/commit/main/linux-pam/APKBUILD?id=7f80c5aed763d12f46a92ea73d5d3ea979dfa7c9

Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6229
2025-04-22 09:38:33 -07:00
postmarketOS CI bc4caf3b2f linux-next: upgrade to next-20250422 2025-04-22 15:56:27 +00:00
Frieder Hannenheim 3a88bde105 device-oneplus-kebab: remove debug kernel args
Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6411

[ci:skip-build]: already built successfully in CI
2025-04-22 15:33:24 +02:00
Frieder Hannenheim b0892d2cbe device-oneplus-kebab: remove weston.ini, only needed for downstream kernel
Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6411
2025-04-22 15:33:24 +02:00
Frieder Hannenheim 4b746b298c device-oneplus-kebab: add mainline kernel
Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6411
2025-04-22 15:33:24 +02:00
Luca Weiss e319a5675b linux-postmarketos-qcom-msm8226: upgrade to 6.13.4
Manual kconfig changes:
* CONFIG_PSI=y (as required by kconfigcheck)

Part-of: https://gitlab.postmarketos.org/postmarketos/pmaports/-/merge_requests/6416
2025-04-22 10:36:33 +02:00
Eisenbahnfan 458952ca0c samsung-n2awifi: enable gpu support
And use modules-initfs and improve Wifi reliability and set myself as maintainer.

Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6433
2025-04-21 21:51:55 -07:00
Oliver Smith a2ccee27f6 Revert "ci/pytest: make sure tests run on correct branch (MR 6418)"
The wrong branch was not only used for pytest, but for all CI tests that
used pmbootstrap. I've fixed the bug in pmbootstrap now and added a
generic check to ensure we would catch a similar bug if we had one in
the future.

This reverts commit 7fd9e01f7f.

Related: pmaports issue 3674
Related: pmbootstrap MR 2586
Related: ci-common MR 14

Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6439
2025-04-21 19:59:37 +02:00
Oliver Smith 6d6f2c4aa1 nokia-n900: move wl1251-cal-openrc dep to openrc
Fix master:nokia-n900:console, which is failing since the console UI was
switched to systemd by default:

  (66/230) Installing wl1251-cal-openrc (1.2-r4)
  Executing wl1251-cal-openrc-1.2-r4.post-install
  lib/apk/exec/wl1251-cal-openrc-1.2-r4.post-install: line 3: rc-update: not found
  ERROR: wl1251-cal-openrc-1.2-r4.post-install: script exited with error 127

Related: https://builds.sr.ht/~postmarketos/job/1474072#task-img-730

Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6436
2025-04-21 19:20:22 +02:00
Dylan Van Assche 6d5ed690bc main/mobile-config-thunderbird: upgrade to v0.1.2
Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6413
2025-04-21 17:14:18 +02:00
revuyd d78d8c6f2b temp/iio-sensor-proxy: upgrade to 3.7
Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6423
2025-04-21 15:13:37 +02:00
postmarketOS CI ac3a8c403e linux-next: upgrade to next-20250417 2025-04-21 13:05:34 +00:00
Nikita Travkin 87ba9776d3 main/dtbloader: upgrade to 1.4.0
Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6428
2025-04-21 14:31:36 +02:00
Alexey Minnekhanov f5c24236f9 device/archived/*: add missing tags
Only non-essential metadata was changed, no need to bump versions.
And no need to build changed packages.

[ci:skip-vercheck]
[ci:skip-build]

Signed-off-by: Alexey Minnekhanov <alexeymin@postmarketos.org>
Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6438
2025-04-21 15:06:37 +03:00
Alexey Minnekhanov c4ae7b17f0 CI: fix test_device_unmaintained -> test_device_archived
The pmbootstrap commit https://gitlab.postmarketos.org/postmarketOS/pmbootstrap/-/commit/0df75422b4c6984ee6e0df23d8feec963ef449c9
renamed few things around, but pmaports CI scripts were forgotten.

Signed-off-by: Alexey Minnekhanov <alexeymin@postmarketos.org>
Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6438
2025-04-21 14:27:10 +03:00
Minecrell d976b06e74 main/postmarketos-base-ui: avoid flatpak workaround conflict with adreno quirks
MR 6417 added a workaround for a GTK4 issue in flatpak by setting
GSK_RENDERER=ngl for all Qualcomm devices. This is now causing crashes on
many of the older Qualcomm devices that specifically avoid usage of the ngl
renderer. These devices already set a custom GSK_RENDERER in /etc/profile.d
(e.g. on MSM8916 devices: gl in v24.12, cairo in edge).

Several device packages install those settings into /etc/profile.d/adreno*
so let's avoid the conflict for now by reducing the priority of the flatpak
workaround and installing it to /etc/profile.d/99-flatpak*. That way the
setting from the device packages takes priority.

Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6434
2025-04-21 10:55:02 +02:00
Luca Weiss 1510e69d9e linux-postmarketos-qcom-sm6350: upgrade to 6.14.0
Manual kconfig changes:
* SM_VIDEOCC_6350=y

User nyl91 in #sm6350-mainline tried this out and they didn't report any (new) problems

Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6388
2025-04-20 22:30:43 -07:00
Alistair Francis cd236af1b3 device-purism-librem5: upgrade to 68pureos1
Update to versino 68 of Librem5 base. As part of this we also add
u-boot-tools to makedepends as we don't install depends for building
anymore. u-boot-tools which provides mkimage does not get installed by
default.

Signed-off-by: Alistair Francis <alistair@alistair23.me>
Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6397
2025-04-20 22:05:27 -07:00
adamthiede dd7e924962 linux-postmarketos-mediatek-mt8173: upgrade to 6.14.3
tested on c330.

Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6400
2025-04-20 21:19:07 -07:00
Stefan Hansson 5d12875a20 systemd: remove duplicated option "wheel-group=true"
This is specified later in the abuild-meson invocation. Remove the extra
one to avoid confusion.

[ci:skip-vercheck]: Doesn't change the built package

Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6406
2025-04-20 21:14:17 -07:00
Henrik Grimler 9ff36d0861 linux-postmarketos-exynos5: update to 6.6.87
This will be the last 6.6.x update, next update will be based on the
6.12 lts.

* Support for exynos5420-samsung-v1awifi is added thanks to
  @Eisenbahnfan

* Several: fixes for usb and charging for Exynos 5250
  devices (manta in particular) has been added thanks to @Alexmrqt

Tested on exynos5250-google-snow, exnyos5420-samsung-klimtlte and
exynos5422-odroid-xu4.

Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6432
[ci:skip-build]: already built successfully in CI
2025-04-20 15:23:15 +03:00
Jens Reidel bfdb04cfc4 main/hexagonfs-firmware-loader: upgrade to 1.1.0
Signed-off-by: Jens Reidel <adrian@travitia.xyz>
Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6402

[ci:skip-build]: already built successfully in CI
2025-04-18 17:29:21 -07:00
Jens Reidel 1da574b0c4 linux-postmarketos-qcom-sm7150: Upgrade to 6.15.0_rc2
Signed-off-by: Jens Reidel <adrian@travitia.xyz>
Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6420

[ci:skip-build]: already built successfully in CI
2025-04-18 17:10:50 -07:00
Oliver Smith 43fd2502a2 device-pine64-pinephonepro: fix openrc install bug
Let the openrc subpackage depend on eg25-manager-openrc to ensure the
latter gets installed first. Otherwise this can happen:

(122/741) Installing device-pine64-pinephonepro-openrc (4-r3)
Executing device-pine64-pinephonepro-openrc-4-r3.post-install
 * rc-update: service `eg25-manager' does not exist
ERROR: device-pine64-pinephonepro-openrc-4-r3.post-install: script exited with error 1
(123/741) Installing eg25-manager-openrc (0.5.2-r0)

Related: https://builds.sr.ht/~postmarketos/job/1472555#task-img-521

Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6424
[ci:skip-build]: already built successfully in CI
2025-04-18 09:58:48 +02:00
Oliver Smith cce5fc272f device-samsung-lt023g: fix call to devicepkg_build
"$pkgname " was pasted in there by mistake.

Fixes: cfac29e5 ("device-samsung-lt023g: add audio subpkg to install pw")
2025-04-18 09:53:56 +02:00
Clayton Craft 5075aa3523 device-xiaomi-nabu: add audio subpkg to install pw
This also relocates some audio-related config into the new audio subpkg
so that it's only installed in cases where a UI requires audio.

Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6408
[ci:skip-build]: already built successfully in CI
2025-04-17 20:50:01 +02:00
Clayton Craft cfac29e5c0 device-samsung-lt023g: add audio subpkg to install pw
This also relocates some audio-related config into the new audio subpkg
so that it's only installed in cases where a UI requires audio.

Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6408
2025-04-17 20:50:01 +02:00
Clayton Craft 01deb2b288 device-pine64-pinephone: add audio subpkg to install pw
This also relocates some audio-related config into the new audio subpkg
so that it's only installed in cases where a UI requires audio.

Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6408
2025-04-17 20:50:01 +02:00
Clayton Craft af9283e9d9 main/postmarketos-ui-*: update relevant UIs to depend on pmos-base-ui-audio
Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6408
2025-04-17 20:49:58 +02:00
Clayton Craft b95fc85cbc main/postmarketos-base-ui: make -audio subpkg
This removes the audio-none subpkg, and the dependency that
postmarketos-base-ui had on it.

This renames the pmos-base-ui-audio virtual that the pw and pa backends
provided to `postmarketos-base-ui-audio-backend`.

To allow UIs to select no audio components, a new pmos-base-ui-audio
subpkg was added. UIs that need audio should depend on the virtual
pkg `postmarketos-base-ui-audio`. UIs that don't want audio can simply
depend on postmarketos-ui-base and no audio stuff will be pulled in.

Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6408
2025-04-17 20:37:14 +02:00
Oliver Smith 20461d317a Revert "main/postmarketos-ui-console: do not install any audio backend by default (MR 6192)"
This reverts commit e2557598d7. The patch
caused installs to fail where the device package explicitly depends on
postmarketos-base-ui-audio-pipewire:

ERROR: unable to select packages:
  postmarketos-base-ui-audio-pipewire-35-r0:
    conflicts: postmarketos-base-ui-audio-none-35-r0[postmarketos-base-ui-audio=35-r0]
    satisfies: device-xiaomi-nabu-5-r0[postmarketos-base-ui-audio-pipewire]
               postmarketos-base-ui-35-r0[postmarketos-base-ui-audio]
  postmarketos-base-ui-audio-none-35-r0:
    conflicts: postmarketos-base-ui-audio-pipewire-35-r0[postmarketos-base-ui-audio=35-r0]
    satisfies: world[postmarketos-base-ui-audio-none]
               postmarketos-base-ui-35-r0[postmarketos-base-ui-audio]

I've also tried to move the postmarketos-base-ui-audio-pipewire
dependency into a subpackage that doesn't get installed when
postmarketos-ui-console gets installed. But that did *not* work:

audio() {
	# This does NOT work!
	install_if="$pkgname=$pkgver-r$pkgrel postmarketos-base-ui !postmarketos-ui-console"
	mkdir "$subpkgdir"
}

It could work if postmarketos-ui-console did not depend on
postmarketos-base-ui, maybe that should be looked at in a follow-up
patch. Or just install the audio stack and require the user to do
UI=none if they want a really minimal system. Let's revert the patch now
to fix failing installs in bpo, e.g. master:xiaomi-nabu:console.

Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6408
2025-04-17 20:37:10 +02:00
Clayton Craft e9c344bf7a main/postmarketos-ui-cosmic: add gnome-keyring to pmb_recommends
This is used by the DE's upstream (popOS), and works reasonably well so
let's install it by default so that apps that depend on secret manager
things work OOTB.

[ci:skip-build]: already built successfully in CI
[ci:skip-vercheck]

Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6410
2025-04-15 16:06:52 -07:00
Clayton Craft 225bb4696e ci: don't run test_kernel on linux-pam-pmos (MR 6418)
The pkg name changed a while back in d3545fc941.

[ci:skip-build]: already built successfully in CI
2025-04-15 14:05:27 -07:00
Clayton Craft 7fd9e01f7f ci/pytest: make sure tests run on correct branch (MR 6418)
This works around a situation where pmbootstrap init checks out the
wrong branch and we end up executing the wrong version of the tests.

For context:
https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6418#note_477266
2025-04-15 14:05:27 -07:00
Caleb Connolly 00919cd2c0 postmarketos-ui-conosle: use systemd
As with ever

Signed-off-by: Casey Connolly <caleb@postmarketos.org>
Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6415
[ci:skip-build]: already built successfully in CI
2025-04-14 13:39:36 -07:00
Oliver Smith d246f597de main/postmarketos-base-ui: add flatpak workaround (MR 6417)
Set GSK_RENDERER=ngl for QCOM devices to fix that GTK4 doesn't work in
flatpak for some of those.

[ci:skip-build]: already built successfully in CI
2025-04-14 21:28:17 +02:00
postmarketOS CI fd23d77201 linux-next: upgrade to next-20250414 2025-04-14 15:59:55 +00:00
fossdd 040111f247 systemd/phosh: upgrade to 0.46.0
https://gitlab.gnome.org/World/Phosh/phosh-mobile-settings/-/blob/v0.46.0/NEWS

Upstream:
- https://gitlab.alpinelinux.org/alpine/aports/-/commit/e1af3dbde45fe4e7713f3fa013814ba63e3ee77a
- https://gitlab.alpinelinux.org/alpine/aports/-/commit/49820f837d41b019dc140b5fc7aac924b3d9e90c

Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6365
[ci:skip-build]: already built successfully in CI
2025-04-13 21:10:37 +02:00
Oliver Smith ff6810f821 device-pine64-pinephone: u-boot-tools in makedeps
Put u-boot-tools into makedepends to fix building the package with
current pmbootstrap master, which has stricter dependency handling.

Related: https://postmarketos.org/blog/2025/03/04/pmOS-update-2025-02/#pmbootstrap

Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6407
2025-04-13 19:58:17 +02:00
Clayton Craft 2d77fa6662 ci: verify_checksums: support packages in systemd repos
In 65038ce26a the logic for also checksum checking pkgs in the systemd
repo was dropped when the logic was moved from build_changed_aports.py,
this re-introduces that logic so that checksums for packages in the
systemd repo are also checked.

Part-of: https://gitlab.postmarketos.org/postmarketos/pmaports/-/merge_requests/6404
2025-04-12 09:17:19 -07:00
Omar Mahboubi 36875d85f2 device-xiaomi-spes: new device
Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6398

[ci:skip-build]: already built successfully in CI
2025-04-12 15:13:11 +03:00
Pablo Correa GómezandClayton Craft 218d0b1745 ci: build packages in a child pipeline instead of in the main one (MR 6366)
Following Alpine's example. This allows some optimizations:
* Don't start one job per architecture simply to skip them after
  rebase and before merge
* If there are no packages, don't start the jobs at all (not true,
  gitlab bug)
* Avoid creating jobs for architectures that don't have changed
  packages, thus further reducing the unnecessary
  jobs and possibly reducing transient failures

Co-authored-by: Clayton Craft <clayton@craftyguy.net>
2025-04-11 12:26:20 -07:00
Pablo Correa Gómez 65038ce26a ci: split verifying package checksums into its own job (MR 6366)
This simplifies the build_changed_aports job, and makes it a lot
easier to use dynamic pipelines in the future
2025-04-11 12:02:24 -07:00
postmarketOS CI 8328a37895 linux-next: upgrade to next-20250411 2025-04-11 15:56:32 +00:00
Bart Ribbers 5598730cb4 systemd/plasma*: upgrade to 6.3.4
Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6374

[ci:skip-build]: already built successfully in CI
2025-04-11 17:03:34 +02:00
Aster Boese 02434fcd88 linux-postmarketos-apple: upgrade to 6.15.0-rc1
Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6392

[ci:skip-build]: already built successfully in CI
2025-04-11 16:41:11 +02:00
Alistair Francis 973e23c251 linux-purism-librem5: upgrade to 6.6.83
Signed-off-by: Alistair Francis <alistair@alistair23.me>
Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6396

[ci:skip-build]: already built successfully in CI
2025-04-11 16:38:20 +02:00
postmarketOS CI 87f71e0265 linux-next: upgrade to next-20250410 2025-04-10 15:59:44 +00:00
postmarketOS CI c54467f9a8 linux-next: upgrade to next-20250409 2025-04-09 15:59:45 +00:00
WeirdTreeThing 7ff5fd8918 modem/msm-cros-efs-loader: upgrade to 1.2
adds support for systemd

Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6378
[ci:skip-build]: already built successfully in CI
2025-04-09 15:35:23 +02:00
Barnabás Czémán 16e38f8760 linux-postmarketos-qcom-msm8953: upgrade to v6.14.0-r1
Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6383

[ci:skip-build]: already built successfully in CI
2025-04-09 15:31:48 +02:00
Luca Weiss b0eb896358 linux-postmarketos-qcom-sc7280: upgrade to 6.14.0
No manual kconfig changes.

Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6386
[ci:skip-build]: already built successfully in CI
2025-04-09 15:26:51 +02:00
fossdd 60b726c56a systemd/pipewire: rebuild against libcamera 0.5.0
Upstream:
- https://gitlab.alpinelinux.org/alpine/aports/-/merge_requests/82452

Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6385
[ci:skip-build]: already built successfully in CI
2025-04-09 14:30:44 +02:00
fossdd 450e347047 temp/libcamera: upgrade to 0.5.0
Upstream:
- https://gitlab.alpinelinux.org/alpine/aports/-/merge_requests/82366

Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6385
2025-04-09 14:30:44 +02:00
Clayton Craft 8fb9f32e44 linux-postmarketos-qcom-laptop: upgrade to 6.14
- Updated kconfig to be compliant with latest kconfigcheck
- Dropped patch for workaround, the issue is now fixed upstream

Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6216
[ci:skip-build]: already built successfully in CI
2025-04-08 15:39:06 -07:00
Caleb Connolly 72de80dd30 postmarketos-initramfs: bump pkgver and fix checksums
Signed-off-by: Caleb Connolly <caleb@postmarketos.org>
Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6182

[ci:skip-build]: already built successfully in CI
2025-04-08 13:35:31 -07:00
Caleb Connolly 959786494a postmarketos-initramfs: add unit tests
Introduce some initial unit tests for the initramfs.

Signed-off-by: Caleb Connolly <caleb@postmarketos.org>
Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6182
2025-04-08 13:35:31 -07:00
Caleb Connolly 2e37d40f84 CI: ignore unreferenced tests/ subdir in packages
These are used for unit testing

Signed-off-by: Caleb Connolly <caleb@postmarketos.org>
Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6182
2025-04-08 13:35:31 -07:00
Caleb Connolly 1e7fe0c4f7 CI: introduce shell unit-test infra
Introduce some basic infrastructure to allow running per-package unit
test jobs, as well as a library to support unit-testing shell scripts.

Packages can provide their own unit tests by adding a tests/
subdirectory to the package, this should contain a .gitlab-ci.yml file
with jobs that extend the .package-test job template as well as any
supporting data and scripts.

Signed-off-by: Caleb Connolly <caleb@postmarketos.org>
Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6182
2025-04-08 13:35:31 -07:00
Caleb Connolly 036c802769 CI: shellcheck: allow informative checks to fail
There are lots of informative checks which are safe to ignore but happen
a lot especially with unit testing scripts. Adjust shellcheck to only
fail on warning or above.

Signed-off-by: Caleb Connolly <caleb@postmarketos.org>
Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6182
2025-04-08 13:35:30 -07:00
Caleb Connolly 9eb1f8d1e7 postmarketos-initramfs: fix caching in find_root/boot_partition
These two functions echo their output, requiring the use of a subshell
to capture it. However they also attempt to cache the output in global
variables.

Unfortunately, we can't do both. Variables set in the subshell aren't
reflected in the parent shell.

Rework these functions so they take a variable to set as a parameter
(like the "read" command). This avoids spawning a subshell and enables
the caching functionality that was added previously.

Signed-off-by: Caleb Connolly <caleb@postmarketos.org>
Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6182
2025-04-08 13:35:30 -07:00
Luca Weiss ac68999ebe kconfigcheck: Require HID_LENOVO only for x86(_64)
Since kernel v6.14-rc3 HID_LENOVO now depends on ACPI which we don't
want to require enabling on various non-ACPI phones.

Move to it x86 & x86_64 since it's anyways apparently only useful for
"Lenovo / Thinkpad devices".

Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6387
[ci:skip-build]: already built successfully in CI
2025-04-08 11:59:40 +02:00
postmarketOS CI 6e8bc38bef linux-next: upgrade to next-20250408 2025-04-08 05:00:09 +00:00
Adam Honse 1c08b6d0ff device-samsung-hlte: enable lk2nd
Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6384

[ci:skip-build]: already built successfully in CI
2025-04-07 16:18:44 +02:00
postmarketOS CI f213b76840 linux-next: upgrade to next-20250407 2025-04-07 04:59:46 +00:00
Barnabás Czémán 8cbef8ecdd device-qcom-msm89x7: enable qm215 ad sdm439
Enable qm215 and sdm439 devices.

Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6368
[ci:skip-build]: already built successfully in CI
2025-04-05 16:44:14 +02:00
Barnabás Czémán a6292e3187 linux-postmarketos-qcom-msm89x7: Upgrade to v6.14-r0
Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6368
2025-04-05 16:44:09 +02:00
WeirdTreeThing c99b9d5f4c linux-postmarketos-mediatek-mt8183: upgrade to 6.12.21
Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6358

[ci:skip-build]: already built successfully in CI
2025-04-04 17:24:14 +02:00
Oliver Smith 602f1a6131 main/mobile-config-firefox: upgrade to 4.6.0
Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6377
2025-04-03 22:00:44 -07:00
postmarketOS CI 3f52ee4eeb linux-next: upgrade to next-20250404 2025-04-04 04:56:28 +00:00
Clayton Craft bc850c6250 abuild: upgrade to 3.15-rc2
We were already running abuild > 3.14.0, but the pkgver for these forked
pkgs was wrong.

Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6376
2025-04-03 13:46:29 -07:00
postmarketOS CI 233e6c8722 linux-next: upgrade to next-20250403 2025-04-03 15:59:45 +00:00
Pablo Correa Gómez 329a69efa7 main/postmarketos-ui-gnome: do not use mobile version
Equivalent for GNOME of 69a4afc838

Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6373
[ci:skip-build]: already built successfully in CI
2025-04-03 11:20:13 +02:00
Sicelo A. Mhlongo 9b19e3e248 main/postmarketos-base: drop udev-based firmware loading
udev no longer supports using userspace to service kernel requests for
firmware. While the kernel can be configured to send such requests to
userspace, udev will not do anything about them.

Reference: https://github.com/eudev-project/eudev/commit/3b717594600fa717cdf9bcfd0c7c1b703b245482

Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6332
[ci:skip-build]: already built successfully in CI
2025-04-03 10:50:28 +02:00
panpanpanpan eb2391f497 linux-postmarketos-qcom-sm8150: Upgrade to v6.14.0
Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6367

[ci:skip-build]: already built successfully in CI
2025-04-02 16:58:47 +02:00
panpanpanpan 9e5298babd device-xiaomi-nabu: Add a640_zap firmware and small fixes
Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6367
2025-04-02 16:58:46 +02:00
David Furey 0c6620f7a2 Allow the USB network host address to be configured rather than random
The USB network host address is used by some hosts to define the interface
name. Making the host address deterministic can simplify host network
configuration.

Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6232
[ci:skip-build]: already built successfully in CI
2025-04-02 12:13:41 +02:00
fossdd 5a65176f72 main/postmarketos-base-ui: remove 50-firefox-wayland.sh
firefox, firefox-esr and thunderbird already default to Wayland.

Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6372
[ci:skip-build]: already built successfully in CI
2025-04-02 12:09:14 +02:00
fossdd d6d96bdd7c main/postmarketos-ui-gnome: remove firefox-wayland.sh
firefox, firefox-esr and thunderbird already default to Wayland.

Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6372
2025-04-02 12:09:14 +02:00
fossdd 4bf90844db main/postmarketos-ui-gnome-mobile: remove firefox-wayland.sh
firefox, firefox-esr and thunderbird already default to Wayland.

Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6372
2025-04-02 12:09:14 +02:00
fossdd dc89a04eec main/postmarketos-ui-gnome-mobile: remove blue accent color override
GNOME Mobile was upgraded to 48

This reverts commit a9e97f5aa6.

Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6372
2025-04-02 12:09:14 +02:00
Connor Eliffe d8b390202b device-amazon-biscuit: add alsa and pulseaudio configs
- Add UCM2 configurations for biscuit
- Add udev rule to switch headphone output
- Add asound config
- Add pulseaudio configs

This commit provides a basic pulseaudio setup for biscuit. The device appears
to only support 48kHz audio. Resampled 44kHz audio crackles and pops currently
due to the buffer underrunning. Some more tweaking may be needed to improve
audio playback quality.

Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6304
[ci:skip-build]: already built successfully in CI
2025-04-02 11:57:29 +02:00
fossdd 9a363671c8 main/postmarketos-ui-kodi: enable pmb:systemd
kodi.service was added in adada180b2

[ci:skip-vercheck]: only "pmb:" options changed

Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6363
[ci:skip-build]: already built successfully in CI
2025-04-02 11:45:26 +02:00
Alexander Baransky b27074b162 device-qcom-sm7150: Add feedbackd udev rules for drv260x haptics
Signed-off-by: Alexander Baransky <alexander.baranskiy@yandex.ru>
Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6364

[ci:skip-build]: already built successfully in CI
2025-04-02 11:40:57 +02:00
Duje Mihanović ca77951c52 device-samsung-coreprimevelte: pull DTBs from /boot/dtbs
Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6362

[ci:skip-build]: already built successfully in CI
2025-04-02 11:36:27 +02:00
Duje Mihanović 9b9d8a82f6 linux-samsung-coreprimevelte: install DTBs in /boot/dtbs
Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6362
2025-04-02 11:36:26 +02:00
Duje Mihanović d935034c1d linux-samsung-coreprimevelte: upgrade to 6.14.0
Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6362
2025-04-02 11:36:26 +02:00
Duje Mihanović 8721693469 device-samsung-coreprimevelte: add UDC driver to initfs
With the UDC driver being modularized, it not probing in the initfs will
cause the NCM gadget to not be set up.

Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6362
2025-04-02 11:36:26 +02:00
Duje Mihanović cc97d8bcfe linux-samsung-coreprimevelte: streamline config
Enable PSI, disable some unneeded options and modularize some other ones.

Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6362
2025-04-02 11:36:26 +02:00
Duje Mihanović b99f4bdfd4 linux-samsung-coreprimevelte: refactor APKBUILD
This also fixes envkernel building.

Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6362
2025-04-02 11:36:26 +02:00
r10nw7fd3 49e036cae0 device-samsung-j1mini3g: Use Samsung's sparse image format
Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6349

[ci:skip-build]: already built successfully in CI
2025-04-02 11:30:36 +02:00
r10nw7fd3 b3534bd5c6 linux-samsung-j1mini3g: Add a few patches to fix build
linux3.4-ARM-8933-1-replace-Sun-Solaris-style-flag-on-section.patch
linux3.4-fix-piggy.gzip.S.patch

Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6349
2025-04-02 11:30:35 +02:00
postmarketOS CI 20f3bd4963 linux-next: upgrade to next-20250402 2025-04-02 04:57:07 +00:00
Robert Mader 9f93a01375 temp/libcamera: Add workaround for black output without tuning files
Works around
https://bugs.libcamera.org/show_bug.cgi?id=259

Disable qcam RISCV because of ongoing Qt/libicuuc issues.

Part-of: https://gitlab.postmarketos.org/postmarketos/pmaports/-/merge_requests/6328
2025-04-02 00:09:58 +02:00
fossdd 0994d42231 systemd/gnome-shell-mobile: strictly depend on mutter-mobile
Even though abuild tracks that gnome-shell-mobile depends on
libmobile.so, don't tempt apk to install the non-mobile variant.

Just like added to temp/gnome-shell-mobile in 4321b29b99

Part-of: https://gitlab.postmarketos.org/postmarketos/pmaports/-/merge_requests/6371
2025-04-01 23:26:43 +02:00
Barnabás Czémán f364e6551d device-xiaomi-clover: update devicetree name
sdm660-xiaomi-clover was renamed to sda660-xiaomi-clover,
update deviceinfo for follow the change.

Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6370
2025-04-02 00:19:40 +03:00
fossdd 7c9a78da22 temp/gnome-shell-mobile: fix missing makedependency
The issue didn't exist locally or in CI because pmb already installed py3-docutils
as a makedependency of mutter-mobile

Part-of: https://gitlab.postmarketos.org/postmarketos/pmaports/-/merge_requests/6369
[ci:skip-build]: already built successfully in CI
2025-04-01 21:00:16 +02:00
fossdd 5f1fee66e8 systemd/gnome-shell-mobile: fix missing makedependency
The issue didn't exist locally or in CI because pmb already installed py3-docutils
as a makedependency of mutter-mobile

Part-of: https://gitlab.postmarketos.org/postmarketos/pmaports/-/merge_requests/6369
2025-04-01 21:00:08 +02:00
EDK 8687aa720f device-apple-tonga: GPU fixed by adding proper mesa and gallium packages (mesa-asahi)
Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6360

[ci:skip-build]: already built successfully in CI
Part-of: https://gitlab.postmarketos.org/postmarketos/pmaports/-/merge_requests/6360
2025-04-01 20:46:46 +02:00
fossdd 1ffebc4599 systemd/gnome-settings-daemon-mobile: provide -lang as g-s-d-lang
The provides is needed that g-s-d-lang doesnt get installed due to
the install_if to g-s-d.

Part-of: https://gitlab.postmarketos.org/postmarketos/pmaports/-/merge_requests/6361
2025-04-01 20:15:27 +02:00
fossdd 06af3bdb82 systemd/gnome-settings-daemon-mobile: split systemd
The provides is needed that g-s-d-systemd doesnt get installed due to
the install_if to g-s-d.

Part-of: https://gitlab.postmarketos.org/postmarketos/pmaports/-/merge_requests/6361
2025-04-01 20:14:43 +02:00
fossdd d2cf05663a systemd/gnome-shell-mobile: upgrade to 48.0
https://gitlab.gnome.org/verdre/gnome-shell-mobile/-/blob/48.mobile.0/CHANGELOG.md

Part-of: https://gitlab.postmarketos.org/postmarketos/pmaports/-/merge_requests/6361
2025-04-01 20:14:43 +02:00
fossdd 2c0fa10988 systemd/mutter-mobile: upgrade to 48.0
Part-of: https://gitlab.postmarketos.org/postmarketos/pmaports/-/merge_requests/6361
2025-04-01 20:14:43 +02:00
fossdd 9aa018e762 systemd/gnome-settings-daemon-mobile: upgrade to 48.0
Part-of: https://gitlab.postmarketos.org/postmarketos/pmaports/-/merge_requests/6361
2025-04-01 20:14:43 +02:00
fossdd 74be50469e temp/gnome-shell-mobile: upgrade to 48.0
https://gitlab.gnome.org/verdre/gnome-shell-mobile/-/blob/48.mobile.0/CHANGELOG.md

Part-of: https://gitlab.postmarketos.org/postmarketos/pmaports/-/merge_requests/6361
2025-04-01 20:14:43 +02:00
fossdd f338ed1c2e temp/mutter-mobile: upgrade to 48.0
Part-of: https://gitlab.postmarketos.org/postmarketos/pmaports/-/merge_requests/6361
2025-04-01 20:14:43 +02:00
fossdd 483ab43906 temp/gnome-settings-daemon-mobile: upgrade to 48.0
Part-of: https://gitlab.postmarketos.org/postmarketos/pmaports/-/merge_requests/6361
2025-04-01 20:14:43 +02:00
postmarketOS CI 0a4d0fe362 linux-next: upgrade to next-20250401 2025-04-01 16:00:03 +00:00
postmarketOS CI 96c6f7b95a linux-next: upgrade to next-20250331 2025-03-31 15:56:08 +00:00
postmarketOS CI 3e440bbc3d linux-next: upgrade to next-20250328 2025-03-28 16:59:33 +00:00
postmarketOS CI 5911cfb597 linux-next: upgrade to next-20250327 2025-03-28 05:56:29 +00:00
Felix Urbasik 4dc833abc2 main/postmarketos-initramfs: add support for multi-device btrfs
This change allows mounting btrfs root filesystems which are spread
across multiple devices or partitions.

Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/5508
[ci:skip-build]: already built successfully in CI
2025-03-27 20:49:25 +01:00
Denys Vitali e018836089 device-google-smaug: use deviceinfo_depthcharge_compression="lzma"
Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6353

[ci:skip-build]: already built successfully in CI
2025-03-27 20:45:24 +01:00
Oliver Smith 9c9c62143b systemd: rework trigger script
* apk-tools passes the directories it triggers on as arguments to the
  trigger script. Use them to only run the relevant parts of the
  triggers.
* Remove "|| :" from commands, as we run the script without "set -e", it
  won't fail if a single command fails. Put explicit "exit 0" at the end
  to ensure this even if the last command beforehand failed.
* Print messages for each action so we know what is happening.

Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6346
[ci:skip-build]: already built successfully in CI
2025-03-27 20:33:05 +01:00
Oliver Smith fe59d6ebc5 main/mobile-config-firefox: upgrade to 4.5.0
Part-of: https://gitlab.postmarketos.org/postmarketos/pmaports/-/merge_requests/6356

[ci:skip-build]: already built successfully in CI
2025-03-26 22:20:22 +01:00
Caleb Connolly f2e83e42eb systemd-services/tailscale: use nftables backend
The iptables frontend for nftables seems to not play nice. Since we use
nftables in postmarketOS anyway, tell tailscale to use it directly. This
fixes routing not working and the following error seen in tailscale status

- adding [-i tailscale0 -j MARK --set-mark 0x40000/0xff0000] in v4/filter/ts-forward: running [/usr/sbin/iptables -t filter -A ts-forward -i tailscale0 -j MARK --set-mark 0x40000/0xff0000 --wait]: exit status 2: Warning: Extension MARK revision 0 not supported, missing kernel module?

Signed-off-by: Caleb Connolly <caleb@postmarketos.org>
Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6344
2025-03-26 20:56:05 +01:00
Clayton Craft 2d103255db systemd/systemd: add patch to install legacy tmpfiles config
This patch is in 257, so we can drop it when upgrading. Without this
patch, we'd have to the enable sysv compat stuff in systemd just to get
this legacy.conf file generated/installed, which totally doesn't seem
worth it (the sysv compat stuff seems to be a lot!)

Fixes #3616

Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6352
[ci:skip-build]: already built successfully in CI
2025-03-26 20:52:30 +01:00
Clayton Craft 55755615c4 device-lenovo-21bx: always resize the root partition
It's common to build installs for this device to flash on USB drives or
whatever, and the rootfs alwys runs out of space fast because it's not
resized on boot. Let's fix that...

Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6340
2025-03-26 20:30:16 +01:00
postmarketOS CI 3c29ead9cc linux-next: upgrade to next-20250326 2025-03-26 17:16:19 +00:00
knuxify 89fe8efd03 device-odroid-hc2: take over maintainership
Part-of: https://gitlab.postmarketos.org/postmarketos/pmaports/-/merge_requests/6350
2025-03-26 08:17:44 +01:00
knuxify ea85ffe451 device-odroid-hc2: disable big.LITTLE switcher by default
The linux-edge kernel enables the BL_SWITCHER kernel option, which enables
an in-kernel big.LITTLE switcher - with it enabled, only 4 cores are enabled
at a time, and the kernel switches between the big and little cores. However,
in a server workload, it's more likely that a user wants all 8 cores to work
simultaneously.

Disable the switcher by default by providing the no_bL_switcher cmdline option.
It can still be re-enabled by writing 1 to /sys/kernel/bL_switcher/active.

Part-of: https://gitlab.postmarketos.org/postmarketos/pmaports/-/merge_requests/6350
2025-03-26 08:17:44 +01:00
postmarketOS CI 0e0046687a linux-next: upgrade to next-20250325 2025-03-25 17:00:03 +00:00
adamthiede 496284b001 linux-postmarketos-mediatek-mt8173: upgrade to 6.14
Part-of: https://gitlab.postmarketos.org/postmarketos/pmaports/-/merge_requests/6355

[ci:skip-build]: already built successfully in CI
2025-03-24 19:29:14 -05:00
postmarketOS CI ffd706aedc linux-next: upgrade to next-20250324 2025-03-24 16:59:37 +00:00
Arnav Singh a28e39b985 linux-postmarketos-allwinner: upgrade to 6.13.8_git20250323
Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6345
2025-03-23 22:14:31 -07:00
Clayton Craft 4e3a7ad0bf systemd/systemd-services: fix install_if, try 2
Typo caused an invalid install_if to be generated, convincing apk to remove pkgs

Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6351
[ci:skip-build]: already built successfully in CI
2025-03-23 10:14:56 -07:00
Oliver Smith a0cc21b80c systemd/systemd-services: fix install_if
It's important to use a versioned constraint so that if the
package is ever removed from the binary repository it will actually be
removed from the users system too.

Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6347
[ci:skip-build]: already built successfully in CI
2025-03-23 16:10:36 +01:00
Oliver Smith c3e868d073 systemd/pipewire: pulse-systemd: add install_if
Fixes: issue 3620

Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6347
2025-03-23 16:10:36 +01:00
Oliver Smith de11b06610 COMMITSTYLE: update for systemd directory
Part-of: https://gitlab.postmarketos.org/postmarketos/pmaports/-/merge_requests/6348
2025-03-23 14:28:11 +01:00
Oliver Smith e6bda25a0b githooks/prepare-commit-msg: add systemd prefixes
Extend the hook to automatically make useful titles for packages in
systemd directories. We had two styles for modifying the systemd package
itself, either "systemd/systemd:" or "systemd:". Pick the shorter one.

Part-of: https://gitlab.postmarketos.org/postmarketos/pmaports/-/merge_requests/6348
2025-03-23 14:28:11 +01:00
Oliver Smith d203541889 githooks/prepare-commit-msg: refactor case...esac
Part-of: https://gitlab.postmarketos.org/postmarketos/pmaports/-/merge_requests/6348
2025-03-23 14:28:07 +01:00
knuxify b8866555b2 device-odroid-hc2: add u-boot-tools to makedepends
Since we don't install depends for building anymore, u-boot-tools which provides
mkimage did not get installed for CI builds. Add it to makedepends.

Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6342
2025-03-23 11:15:00 +01:00
knuxify 8756674afc device-odroid-hc2: Force MBR/msdos partition table type
GPT paritions seem to interfere with the firmware baked into the SD card image;
both U-Boot and various Linux tools report the GPT partition table as broken
and fall back to the backup table. Notably, this makes the card difficult to
mount in another device. "Fixing" the partition table makes it refuse to boot.

Force the msdos partition type in deviceinfo to fix this.

Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6342
2025-03-23 11:15:00 +01:00
Bart Ribbers ed550137da systemd/kjournald: upgrade to 24.12.3
Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6339
[ci:skip-build]: already built successfully in CI
2025-03-23 11:12:40 +01:00
Oliver Smith 250e128249 systemd/plasma-workspace: set !check
As discussed with PureTryOut, let's skip checks in pmaports for this
one.

Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6339
2025-03-23 11:12:23 +01:00
Bart Ribbers dc7736577e systemd/plasma*: upgrade to 6.3.3
Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6339
2025-03-23 11:12:13 +01:00
Caleb Connolly 7e9ed34e9d linux-next: enable USB_SND_CARD
I'd like to use my USB audio interface with my laptop!

Signed-off-by: Caleb Connolly <caleb@postmarketos.org>
Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6343
[ci:skip-build]: already built successfully in CI
2025-03-22 20:41:48 +00:00
Clayton Craft a375ff0451 systemd/systemd: move udevadm into udev subpkg
Fixes a conflict between systemd and systemd-udev where apk thinks they both provide cmd:udevadm:

ERROR: unable to select packages:
  systemd-256.11-r2:
    conflicts: systemd-udevd-256.11-r2[cmd:udevadm=256.11-r2]
  systemd-udevd-256.11-r2:
    conflicts: systemd-256.11-r2[cmd:udevadm=256.11-r2]

[ci:ignore-count]
[ci:skip-build] already built in CI

Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6334
2025-03-22 17:10:33 +00:00
Clayton Craft eb8b32bdaa systemd/pipewire: update install script to match aports
Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6334
2025-03-22 17:10:29 +00:00
Caleb Connolly 46ec88715c systemd/cups: restart on upgrade
Mark cups.service as requiring a restart after package upgrade.
default_systemd will pick this up and generate the post-upgrade script
for us.

Signed-off-by: Caleb Connolly <caleb@postmarketos.org>
Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6334
2025-03-22 17:10:29 +00:00
Caleb ConnollyandClayton Craft a679e5132c systemd/*: use new abuild systemd helpers
Adjust everything to use the new systemd abuild helpers. These generate
the post-install/pre-deinstall and post-upgrade scripts automagically,
and abuild now provides some helpers where it's necessary to finegle
things a bit (e.g. see the pipewire-pulse-systemd subpackage).

Signed-off-by: Caleb Connolly <caleb@postmarketos.org>
Co-authored-by: Clayton Craft <clayton@craftyguy.net>
Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6334
2025-03-22 17:10:29 +00:00
Caleb Connolly 310ce2f500 abuild: switch to reworked systemd support
Switch to the new refactored systemd service support.

Signed-off-by: Caleb Connolly <caleb@postmarketos.org>
Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6334
2025-03-22 17:10:29 +00:00
Caleb Connolly 659b9c4394 systemd: add triggers for reloading/restarting services
What we want is to reload services that need to be reloaded after
upgrade (those that are marked with needs-reload or needs-restart), to
handle systemctl daemon-reload too, and to reload udev, sysusers,
tmpfiles, etc.

This all needs to be done in a particular order, which we would ideally
do with different triggers (and triggers with consistent ordering!), but
apk can't do that so instead we have this inefficient solution which
will probably do a bunch of useless processing. ah well

Signed-off-by: Caleb Connolly <caleb@postmarketos.org>
Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6334
2025-03-22 17:10:29 +00:00
Caleb ConnollyandClayton Craft 0ddba42a61 systemd-services: use systemd funcs from abuild
Use the new default_systemd_install_scripts function from [1]. This
generates the install scripts automatically and detects what services
need to be preset/disabled/reloaded.

default_systemd wasn't used on purpose, see the comment in the patch for
an explanation.

[1]: https://gitlab.alpinelinux.org/calebccff/abuild/-/tree/85969550e41b80c82d90cd07fec7b276e8a1e1ee

Signed-off-by: Caleb Connolly <caleb@postmarketos.org>
Co-authored-by: Clayton Craft <clayton@craftyguy.net>
Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6334
2025-03-22 17:10:28 +00:00
Caleb Connolly 16126b25a4 systemd-services: fix usb-moded-systemd package name
Signed-off-by: Caleb Connolly <caleb@postmarketos.org>
Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6334
2025-03-22 17:10:28 +00:00
Caleb Connolly 5f74dc3f60 systemd: add stub systemd-apk-macros to get packages building
Since we have cyclical dependencies we need this stub for everything to
build, once the binary repo is updated to drop all uses we can remove
it.

This is now all handled in abuild directly

Signed-off-by: Caleb Connolly <caleb@postmarketos.org>
Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6334
2025-03-22 17:10:18 +00:00
postmarketOS CI 8bd95745c2 linux-next: upgrade to next-20250321 2025-03-21 17:03:17 +00:00
postmarketOS CI 92044d2f94 linux-next: upgrade to next-20250320 2025-03-20 16:57:13 +00:00
panpanpanpan d1143376f8 device-xiaomi-nabu: Remove subpackages and hexagonrpcd to simplify the package (MR 6317)
As recommended on matrix, there is no need to keep everything in subpackages,
so they are being removed. Also, hexagonrpcd is being removed as it
doesn't work on this device’s soc yet.

Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6317

[ci:skip-build]: already built successfully in CI
2025-03-20 10:27:38 +01:00
panpanpanpan 1d87d02cb2 firmware-xiaomi-nabu: drop, this is managed by device package instead (MR 6317)
We are now using msm-firmware-loader for most of the firmware, so we can drop this

Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6317
2025-03-20 10:27:34 +01:00
Sicelo A. Mhlongo 5f1119f7bb wl1251-cal: extract nvs into pmos firmware search path
This also allows us to not interfere with the upstream firmware, and thus the
trigger is no longer needed.

Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6333
[ci:skip-build]: already built successfully in CI
2025-03-20 10:22:27 +01:00
fossdd 25c8c04b44 systemd/mutter: upgrade to 48.0
Part-of: https://gitlab.postmarketos.org/postmarketos/pmaports/-/merge_requests/6337

[ci:skip-build]: already built successfully in CI
2025-03-19 22:04:22 +01:00
fossdd 0cfd91bb1a systemd/gdm: upgrade to 48.0
Part-of: https://gitlab.postmarketos.org/postmarketos/pmaports/-/merge_requests/6337
2025-03-19 22:04:18 +01:00
fossdd e14e379824 systemd/gnome-shell: upgrade to 48.0
Part-of: https://gitlab.postmarketos.org/postmarketos/pmaports/-/merge_requests/6337
2025-03-19 22:04:15 +01:00
fossdd 040dda1c24 systemd/gnome-settings-daemon: upgrade to 48.0
Part-of: https://gitlab.postmarketos.org/postmarketos/pmaports/-/merge_requests/6337
2025-03-19 22:04:11 +01:00
Alexey Minnekhanov c1a6d832d6 device-xiaomi-lavender: add battery modules to initfs
Having battery charger and fuelgauge modules in initfs will
allow device battery to be charged e.g. in debug-shell mode,
instead of slowly discharging and dying.

Signed-off-by: Alexey Minnekhanov <alexeymin@postmarketos.org>
Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6336
[ci:skip-build]: already built successfully in CI
2025-03-19 21:16:13 +01:00
Alexey Minnekhanov 12fc6da4a4 device-xiaomi-clover: add battery modules to initfs
Having battery charger and fuelgauge modules in initfs will
allow device battery to be charged e.g. in debug-shell mode,
instead of slowly discharging and dying.

Signed-off-by: Alexey Minnekhanov <alexeymin@postmarketos.org>
Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6336
2025-03-19 21:16:13 +01:00
Alexey Minnekhanov 24ac036659 device-asus-x00td: add missed rradc dependency module to initfs
qcom-spmi-rradc is a dependency of already specified charger and
fuelgauge modules.

Signed-off-by: Alexey Minnekhanov <alexeymin@postmarketos.org>
Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6336
2025-03-19 21:16:13 +01:00
postmarketOS CI 0653b52b34 linux-next: upgrade to next-20250319 2025-03-19 16:59:34 +00:00
Samuel Dionne-Riel 1463902dac CI: Remove vestigial shell function wrapper
This shell function exists only within the scope of the shell. The
python script is entirely unaware of it.

(Introduced in da52dace85).

Signed-off-by: Samuel Dionne-Riel <samuel@dionne-riel.com>
Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6330
[ci:skip-build]: already built successfully in CI
2025-03-19 15:59:43 +01:00
Dzmitry Sankouski eda09407de device-samsung-starqltechn: add alsa ucm profiles dependency (MR 6322)
Starqltechn alsa ucm profiles was included in alsa-ucm-conf-sdm845
repository. Add it to dependency list to get audio working.

This also sorts depends and source lists alphabetically.

[ci:skip-build]: already built successfully in CI
2025-03-18 12:26:55 -07:00
Oliver Smith 3240d9fd57 main/postmarketos-mkinitfs: trigger: add skip hint (MR 6325)
The recent optimization of not running "mkinitfs" during the trigger
script when running in pmbootstrap lead to unexpected behavior for some
use cases: testing initramfs changes and upgrading the initramfs in the
chroot (e.g. with pmbootstrap chroot --image). Let the user know that it
gets skipped and tell them how they can force building a new initramfs,
as discussed with Caleb.

[ci:skip-build]: already built successfully in CI
2025-03-18 11:45:47 -07:00
postmarketOS CI 1cd8b92bb4 linux-next: upgrade to next-20250318 2025-03-18 16:59:51 +00:00
postmarketOS CI e4656cc2ce linux-next: upgrade to next-20250317 2025-03-17 16:59:53 +00:00
Clayton Craft 2beeeca388 systemd/systemd-services: add unit files for alsa-utils
Part-of: https://gitlab.postmarketos.org/postmarketos/pmaports/-/merge_requests/6287
2025-03-17 08:47:11 +01:00
Clayton Craft f0a72fc9e1 systemd/postmarketos-base-systemd: add presets for alsa-utils
Part-of: https://gitlab.postmarketos.org/postmarketos/pmaports/-/merge_requests/6287
2025-03-17 08:46:48 +01:00
Barnabás Czémán 6250f405f6 soc-qcom-msm89x7: Add wireplumber config
Add wireplumber config for fix low volume issue.

Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6327
[ci:skip-build]: already built successfully in CI
2025-03-16 22:20:55 +01:00
Barnabás Czémán 80c5a8df14 linux-postmarketos-msm89x7: Upgrade to v6.13.6-r0
Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6327
2025-03-16 22:20:50 +01:00
Oliver Smith 95a5fc5dff systemd/{pipewire,networkmanager}: use github mirror
The gitlab.freedesktop.org mirror is currently not available:
> Currently planned outage: 2025-03-16 -> 2025-03-22

Let's use the github.com mirror until then. Impressively they have the
same checksum.

Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6290
2025-03-16 21:05:53 +01:00
Oliver Smith a7a53ade27 systemd/multipath-tools: upgrade to 0.11.1
Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6290

[ci:skip-build]: already built successfully in CI
2025-03-16 21:05:53 +01:00
Oliver Smith 3191d49ae0 systemd/drkonqi: upgrade to 6.3.2
Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6290
2025-03-16 21:05:53 +01:00
fossdd 2372400b69 systemd/networkmanager: upgrade to 1.52.0
Upstream:
- https://gitlab.alpinelinux.org/alpine/aports/-/commit/ec41b2fc0fec4d8e98d2c96f319988e402db598a

Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6290
2025-03-16 21:05:53 +01:00
fossdd 49ec30d635 systemd/mutter: upgrade to 47.6
Upstream:
- https://gitlab.alpinelinux.org/alpine/aports/-/commit/b541cbddc6ea52afb782c614f237682c6c7e2781

Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6290
2025-03-16 21:05:53 +01:00
Oliver Smith ea30fd0e26 systemd/xorg-server: upgrade 21.1.16
Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6290
2025-03-16 21:05:53 +01:00
fossdd 3c0cba8a7e systemd/gnome-shell: upgrade to 47.5
Upstream:
- https://gitlab.alpinelinux.org/alpine/aports/-/commit/10392e5e13e9a098dc79b009227d7d1a4cc2bdc8

Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6290
2025-03-16 21:05:53 +01:00
Oliver Smith fda0890ed4 systemd/pipewire: disable tests
One of the tests fails with a timeout when building through pmbootstrap
and our gitlab CI. Disable it for now, as the package is very similar to
the Alpine package this shouldn't be much of a problem.

Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6290
2025-03-16 21:05:53 +01:00
fossdd 05336c554d systemd/pipewire: upgrade to 1.4.1
Upstream:
- https://gitlab.alpinelinux.org/alpine/aports/-/commit/a0b4c813c66f812bba56da6603a11d5bdeba662d
- https://gitlab.alpinelinux.org/alpine/aports/-/commit/a1c2f5b55925d1febc3feb2e6772e63ffb0334c1
- https://gitlab.alpinelinux.org/alpine/aports/-/commit/5f7e0b7cbb6c786ce07a6393c804c7c5cb4d0ea1
- https://gitlab.alpinelinux.org/alpine/aports/-/commit/d93edb2de92923915f04d9420393f64f8b334cd3
- https://gitlab.alpinelinux.org/alpine/aports/-/merge_requests/81346

Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6290
2025-03-16 21:05:53 +01:00
Gianluca Boiano d2bb0c8068 firmware-xiaomi-tulip: remove unused files
Part-of: https://gitlab.postmarketos.org/postmarketos/pmaports/-/merge_requests/6323

[ci:skip-build]: already built successfully in CI
2025-03-16 20:48:04 +01:00
Alexey Minnekhanov dc0c90738d linux-postmarketos-qcom-sdm660: upgrade to 6.13.7
Perhaps the biggest highlight of this release is addition of
Qualcomm Sensor Manager support (thx @Tooniis).

Several little impovements:

 * Notification LED support for clover, laevnder, tulip ( @setotau )
 * missing SDCC block resets were added, several devices ( @alexeymin )
 * missing SD card detect GPIOs were added, several devices ( @alexeymin )
 * SD card instability was fixed, several devices ( @alexeymin )
 * pd_mapper module now supports SDM630/636 ( @alexeymin )
 * numerous dtbs_check warnings fixed, in preparation for upstreaming
 * several commits were dropped, they are now upstream!

Manual config changes:
 * SNS_REG/SMGR modules were enabled
 * LED/QCOM_LPG modules were enabled

FIXME: qrtr as a bus requires some kconfigs to be =y (for SMGR patchset):
 * CONFIG_QRTR=y
 * CONFIG_QRTR_SMD=y

Signed-off-by: Alexey Minnekhanov <alexeymin@postmarketos.org>
Part-of: https://gitlab.postmarketos.org/postmarketos/pmaports/-/merge_requests/6321
[ci:skip-build]: already built successfully in CI
2025-03-16 20:43:19 +01:00
Paul Sajna 2bdcf3dbf1 device-lg-judy{ln,p},linux-postmarketos-qcom-sdm845: backport judy uart to fix getty
Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6324

[ci:skip-build]: already built successfully in CI
2025-03-15 22:02:38 -07:00
postmarketOS CI c5cc2e47bd linux-next: upgrade to next-20250314 2025-03-15 05:59:23 +00:00
Caleb Connolly 6f1862193c linux-next: enable QCOM_CPUCP_MBOX
This isn't used yet but will be required for SCMI cpu frequency scaling
on X1 Elite. Let's get ready for that by enabling it now.

Signed-off-by: Caleb Connolly <caleb@postmarketos.org>

[ci:skip-build] already built in CI
Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/5814
2025-03-14 22:08:01 +00:00
Pablo Correa Gómez 4dbf379cdb main/postmarketos-dev: add openssh-client as dependency
And reorder deps alphabetically. This is a follow-up from
f85eabcca6

Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6305
[ci:skip-build]: already built successfully in CI
2025-03-14 21:55:34 +01:00
Caleb Connolly b7118581dd postmarketos-initramfs: bump pkgver and checksum
Signed-off-by: Caleb Connolly <caleb@postmarketos.org>
Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6172
2025-03-14 20:24:07 +00:00
Caleb Connolly 865653c97d postmarketos-initramfs: log splash messages
log splash messages with the new info log level. This can be useful when
working on headless devices.

Signed-off-by: Caleb Connolly <caleb@postmarketos.org>
Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6172
2025-03-14 20:24:07 +00:00
Caleb Connolly 4d3958c4a5 postmarketos-initramfs: add rd.info arg and reduce logging
Support the rd.info cmdline argument to enable additional info logging,
and reduce the log level of some things to info so we print less
overall.

Signed-off-by: Caleb Connolly <caleb@postmarketos.org>
Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6172
2025-03-14 20:24:07 +00:00
Caleb Connolly 8400fffefb postmarketos-initramfs: refactor cmdline parsing
Currently the initramfs is littered with various code snippets which
read /proc/cmdline. This is error prone and results in more complicated
code especially as we want to standardise all the pmos specific cmdline
arguments, and where some arguments have the same behaviour as
deviceinfo variables.

Let's do the parsing correctly, once, and set global variables to
enable/disable/configure parts of the initramfs. At the same time
introduce namespaced and standard versions of the remaining arguments
which haven't been standardised yet.

Now (for example) to check if the splash is disabled, rather than
grepping /proc/cmdline for PMOS_NOSPLASH AND checking if
deviceinfo_no_framebuffer is true, you can just check if "$nosplash" =
"y".

This will drastically simplify the process of adding additional
configuration options in the future.

Most of the code here was taken from the Arch Linux initramfs and
simplified/adjusted to better fix our use case.

Signed-off-by: Caleb Connolly <caleb@postmarketos.org>
Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6172
2025-03-14 20:24:07 +00:00
Caleb Connolly 91c5784bd4 postmarketos-initramfs: refactor find_root/boot_partition
These functions are almost identical and follow the same logic.
Introduce a generic find_partition function which they can both call
into so we can abstract the logic away from the specific usage and make
everything much cleaner.

Signed-off-by: Caleb Connolly <caleb@postmarketos.org>
Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6172
2025-03-14 20:24:06 +00:00
Caleb Connolly 024422416f postmarketos-initramfs: refactor setup_log
Simplify things by putting all the log targets in one variable, and add
a special-case to log to consoles when pmos.nosplash is set and no
consoles are used by the kernel (e.g. because console=null is set).

Signed-off-by: Caleb Connolly <caleb@postmarketos.org>
Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6172
2025-03-14 20:24:06 +00:00
Caleb Connolly 4133f4aeb5 postmarketos-initramfs: use local for more function-local variables
Signed-off-by: Caleb Connolly <caleb@postmarketos.org>
Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6172
2025-03-14 20:24:06 +00:00
Caleb Connolly acb5d895b3 postmarketos-initramfs: reword debug-shell usb storage info
Make it clearer what is exposed over USB and why rather than just
printing the cmdline option.

Signed-off-by: Caleb Connolly <caleb@postmarketos.org>
Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6172
2025-03-14 20:24:02 +00:00
Clayton Craft 8947f03100 systemd/postmarketos-base-systemd: add some missing user presets 2025-03-14 10:20:42 -07:00
Clayton Craft 8447742b20 systemd/systemd: ship a default user preset
This adds a default preset for user units, that disables them by
default. This behavior is identical to what we do with system presets,
which means that if we want a unit enabled by default then we need
to add a preset for it or rely on some other unit to pull it in
automatically. Without this default preset, user units are enabled by
default when `systemctl preset` is run on them, which may not always be
the desired behavior (i.e. we don't want this behavior with system units).
2025-03-14 10:20:42 -07:00
jane400andClayton Craft d9c21e9058 systemd/postmarketos-base-systemd: run systemctl on preset changes for already installed units (MR 6120)
Co-authored-by: Clayton Craft <clayton@craftyguy.net>

[ci:skip-build]: already built successfully in CI
2025-03-14 10:20:37 -07:00
Dzmitry Sankouski 267126bc8a firmware-samsung-sdm845: delete package
Delete package - it was replaced with msm-firmware-loader.

Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6315
[ci:skip-build]: already built successfully in CI
2025-03-14 17:31:10 +01:00
Dzmitry Sankouski d2430d5b9e device-samsung-starqltechn: firmware: add msm-firmware-loader
Starqltechn required firmware to be pulled out of the particular phone.
Replace starqltechn firmware package dependency with
msm-firmware-loader.

Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6315
2025-03-14 17:31:10 +01:00
J. Neuschäfer 40bb2bc9ca linux-postmarketos-amlogic: fix wifi on Ugoos AM3
Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6319

[ci:skip-build]: already built successfully in CI
2025-03-14 17:24:23 +01:00
Clayton Craft 2679dce766 systemd/dbus: upgrade to 1.16.2
Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6289
2025-03-14 15:41:57 +01:00
Jens Reidel 3c15d13757 linux-postmarketos-qcom-sm7150: Upgrade to 6.13.7
Signed-off-by: Jens Reidel <adrian@travitia.xyz>
Part-of: https://gitlab.postmarketos.org/postmarketos/pmaports/-/merge_requests/6318
2025-03-14 06:23:47 +01:00
Clayton Craft 0faf7b73d1 issue template: add COSMIC UI option (MR 6274)
[ci:skip-build]: already built successfully in CI
2025-03-13 10:57:35 -07:00
Clayton Craft f62fc95d7d main/postmarketos-ui-cosmic: new aport (MR 6274) 2025-03-13 10:57:35 -07:00
Clayton Craft ad6dc88dd7 systemd/systemd-services: add unit files for COSMIC greeter (MR 6274) 2025-03-13 10:57:35 -07:00
Clayton Craft 71df49fd16 systemd/postmarketos-base-systemd: add preset for COSMIC greeter (MR 6274) 2025-03-13 10:57:35 -07:00
postmarketOS CI 94a830e9a2 linux-next: upgrade to next-20250313 2025-03-13 16:59:49 +00:00
Stephanie Bread b3f4741789 main/postmarketos-base-ui-gnome: add gvfs packages (MR 6314)
[ci:skip-build]: already built successfully in CI
2025-03-13 16:35:00 +01:00
Dzmitry Sankouski be40ee69cf device-samsung-starqltechn: add modules-initfs (MR 6310)
Add starqltechn initfs modules, recently enabled in linux kernel.
This provides touchscreen and haptics support when in initramfs.
This allows to use onscreen keyboard in initramfs debug mode.
2025-03-13 11:48:30 +03:00
Caleb Connolly 993429917f HACK: systemd: dbus: disable bootstrap logic (MR 6313)
Get dbus building in edge again. This regressed due to the cross-native2
work in pmb which stopped using abuild to install makedepends and does
it in pmb instead. But pmbootstrap's parsing logic can't handle
conditions in the APKBUILD.

Related: issue 3604
Signed-off-by: Caleb Connolly <caleb@postmarketos.org>
[ci:skip-build]: already built successfully in CI
2025-03-12 22:08:45 +01:00
fossdd 85e415e5e7 systemd/postmarketos-base-systemd: add system preset for kodi (MR 6273)
[ci:skip-build]: already built successfully in CI
2025-03-12 21:11:48 +01:00
fossdd adada180b2 systemd/systemd-services: add kodi service (MR 6273) 2025-03-12 21:11:48 +01:00
fossdd f757629409 main/postmarketos-ui-kodi: enable some architectures (MR 6273)
[ci:skip-vercheck] only $arch changed, doesnt affect APKINDEX or .apk
2025-03-12 21:11:43 +01:00
postmarketOS CI 86313545a6 linux-next: upgrade to next-20250312 2025-03-12 16:56:42 +00:00
fossdd ae7b3c1cdb main/postmarketos-base-ui-gnome: remove epiphany user agent override
Our epiphany got blocked by https://gitlab.gnome.org/ due to their new
AI scraping protection. We used a older User-agent that is not
regocnized by their protection and blocked us with "Access Denied.".

Nowadays Epiphany uses a dynamic user agent by default depending on the
chassis reported by systemd-hostnamed (e.g. mobile or desktop).

Fixes: 2722f6cac5 ("main/postmarketos-ui-{gnome,phosh}: less revealing epiphany user-agent (MR 1402)")

Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6293
[ci:skip-build]: already built successfully in CI
2025-03-12 13:29:08 +01:00
Ermine 80ecf976c3 device-microsoft-dempsey: new device
Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6294

[ci:skip-build]: already built successfully in CI
2025-03-12 13:01:13 +01:00
Aster Boese e520df71bb google-x64cros: Add 'psi=1' to kernel_cmdline
linux-lts from Alpine sets CONFIG_PSI_DEFAULT_DISABLED, so we
     need to enable it manually with the kernel cmdline.

Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6303
[ci:skip-build]: already built successfully in CI
2025-03-12 12:57:05 +01:00
Aster Boese 2b7d848537 generic-x86_64: Add 'psi=1' to kernel_cmdline
linux-lts from Alpine sets CONFIG_PSI_DEFAULT_DISABLED, so we
need to enable it manually with the kernel cmdline.

Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6303
2025-03-12 12:57:05 +01:00
Paul Sajna 7ee4100179 lg-judyp: enable getty on ttyMSM0
Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6302

[ci:skip-build]: already built successfully in CI
2025-03-12 12:53:05 +01:00
Paul Sajna d66f753f74 lg-judyln: enable getty on ttyMSM0
Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6302
2025-03-12 12:53:05 +01:00
Luca Weiss 809be0cfe2 firmware-fairphone-fp5: Drop .mdt symlinks
These are no longer used, remove them.

Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6248
[ci:skip-build]: already built successfully in CI
2025-03-12 12:44:28 +01:00
Richard Acayan 7080a0627b linux-postmarketos-qcom-sdm670: backport the qcom-spmi-adc-tm5 scaling fix (MR 6298)
The thermal monitor measures an NTC thermistor which decreases voltage
when the temperature increases.

When fixing the scaling for the first time, a wrong division by 20 was
removed. The voltage code was still high by a factor of 28900/16384,
enough that the thermal monitor constantly signalled/interrupted at a
low voltage/high temperature trip point. The thermal monitor still
reports the correct temperature so the kernel keeps the wrong trip
points and lets the thermal monitor keep interrupting 1000 times/sec.
Fix the other scaling amount so the thermal monitor sends interrupts at
the right temperature (with some imprecision).
2025-03-12 10:32:33 +03:00
postmarketOS CI d1bbf43ab2 linux-next: upgrade to next-20250311 2025-03-11 16:59:34 +00:00
J. Neuschäfer a8fa909bb7 testing/device-amlogic-tvbox: add Ugoos AM3 support
Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6276
2025-03-11 20:57:32 +09:00
Oliver Smith 6cc823e729 main/postmarketos-mkinitfs: use cross-native2 (MR 6297)
Speed up cross compilation.

Related: https://docs.postmarketos.org/pmbootstrap/cross_compiling.html
[ci:skip-build]: already built successfully in CI
2025-03-10 22:09:26 +01:00
Oliver Smith 79fc4d2cd8 main/postmarketos-mkinitfs: build with cgo (MR 6297)
Set CGO_ENABLED=1 to fix the following when cross compiling with
cross-native2 from x86_64 to (armv7,riscv64,armhf):

  -buildmode=pie requires external (cgo) linking, but cgo is not enabled

Depends: pmbootstrap MR 2565
Related: https://gitlab.alpinelinux.org/alpine/aports/-/issues/15809
2025-03-10 22:09:26 +01:00
Oliver Smith 6b56b58193 main/postmarketos-mkinitfs: trigger: skip in pmb (MR 6297)
Don't run mkinitfs inside "pmbootstrap install" with the trigger
script, as it triggers multiple times as the rootfs gets constructed,
slowing down the process. Instead, pmbootstrap runs "mkinitfs"
explicitly once at the end of "pmbootstrap install".

pmaports master has pmbootstrap_min_version=2.3.2 in pmaports.cfg, which
already runs "mkinitfs" at the end of "pmbootstrap install", see
pmb/install/_install.py, install_system_image().
2025-03-10 22:09:26 +01:00
Oliver Smith 200529afe0 main/postmarketos-mkinitfs: tweak clean print (MR 6297)
Don't print the "Cleaning up old boot files..." message every time in
post-upgrade, only when it actually deletes files.
2025-03-10 22:09:17 +01:00
Jens Reidel eddffe3ec9 soc-qcom-sm7150: Drop, this is in the generic package now
Signed-off-by: Jens Reidel <adrian@travitia.xyz>
Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6286

[ci:skip-build]: already built successfully in CI
2025-03-10 15:09:23 +01:00
Jens Reidel dd2b636f3a device-xiaomi-surya: Drop, we have a generic package now
Signed-off-by: Jens Reidel <adrian@travitia.xyz>
Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6286
2025-03-10 15:09:23 +01:00
Jens Reidel 9642bb2a4b device-xiaomi-davinci: Drop, we have a generic package now
Signed-off-by: Jens Reidel <adrian@travitia.xyz>
Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6286
2025-03-10 15:09:23 +01:00
Jens Reidel 6ca5f01ee4 qcom-sm7150: New device
Signed-off-by: Jens Reidel <adrian@travitia.xyz>
Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6286
2025-03-10 15:09:23 +01:00
Jens Reidel 459fd71186 alsa-ucm-conf-qcom-sm7150: Fix speakers when booting with U-Boot
Signed-off-by: Jens Reidel <adrian@travitia.xyz>
Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6286
2025-03-10 15:09:23 +01:00
Jens Reidel f774ce2648 linux-postmarketos-qcom-sm7150: Update to 6.13.6, prepare for EFI
This also prepares a bunch of our changes for upstream and drops
unsupported devices for now. They will be re-added when they have been
tested to work at all.

Signed-off-by: Jens Reidel <adrian@travitia.xyz>
Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6286
2025-03-10 15:09:23 +01:00
Jens Reidel d8f88307b8 systemd/postmarketos-base-systemd: add hexagonfs-firmware-loader to system preset
Signed-off-by: Jens Reidel <adrian@travitia.xyz>
Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6286
2025-03-10 15:09:22 +01:00
Jens Reidel 17dd7eb87d main/hexagonfs-firmware-loader: New package
Signed-off-by: Jens Reidel <adrian@travitia.xyz>
Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6286
2025-03-10 15:08:12 +01:00
Jens Reidel ffc486b71d main/msm-firmware-loader: Upgrade to 1.6.0
Signed-off-by: Jens Reidel <adrian@travitia.xyz>
Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6286
2025-03-10 15:08:12 +01:00
Stefan Hansson 543f67353b CI: Check all commit messages for string (MR 6301)
This way you can add e.g. [ci:skip-vercheck] to the commit it actually
belongs to instead of having to add it to the last one in the series,
which is unintuitive. It still doesn't only run the check on commits
that contain the message, which might be a nice future improvement.
2025-03-09 14:01:22 +01:00
Stefan Hansson 22d6f312e1 CI: Break out base commit logic from get_changed_files() (MR 6301)
This makes the code more self-documenting and allows re-using this logic
in other parts of the code.
2025-03-09 14:01:18 +01:00
Robert Mader d30dd361ee main/postmarketos-base-ui-gnome: Move fprintd from depends to pmb_recommends
It's an optional service, thus users should be free to remove it.

Fixes: 5cffcf7ea ("main/postmarketos-base-ui-gnome: add fprintd to depends (MR 6206)")

Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6300
[ci:skip-build]: already built successfully in CI
2025-03-09 13:25:05 +01:00
Robert Mader b437864625 main/postmarketos-base-ui-gnome: add ffmpegthumbnailer to pmb_recommends
So that the file managers and choosers - Nautilus by default - show thumbnails
not only for images but also videos. Apart from being a nice-to-have, it
can help prevent privacy issues like uploading/sending wrong videos - an
increasingly realistic scenario as camera recording becomes more usable.

Note that Gnome usually uses totem-video-thumbnailer for that job,
but ffmpegthumbnailer has fewer dependencies, seems to be more stable,
is slightly faster - and pmOS already comes with ffmpeg, so there are
no additional licensing issues.

Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6300
2025-03-09 13:25:05 +01:00
Clayton Craft fcf2b87a26 systemd/postmarketos-base-systemd: enable systemd-oomd by default (MR 6246)
This enables systemd-oomd by default and provides some default
configuration for system.slice and for all slices that run under user.

This default slice config is inspired by what Fedora ships,
which seems like a sensible default for us to start with. Units/slices
within these two top-ish level slices can set their own limits and
actions if they want.
2025-03-09 00:14:20 -08:00
Clayton Craft a398d7c069 kconfigcheck: require PSI by default (MR 6246) 2025-03-09 00:08:51 -08:00
Anjandev Momi 71bd7963a6 main/postmarketos-base-ui: drop redundant dependency on openssh-server-pam (MR 6244)
It's now a dependency of postmarketos-base, which is always installed on .
2025-03-08 23:59:05 -08:00
Anjandev Momi f85eabcca6 main/postmarketos-base: depend on openssh-server-pam (MR 6244)
Always make sure openssh server w/ PAM support is installed. This also
drops an implicit dependency on `openssh-client`, this was pulled in
previously by `depends="openssh"`.

fixes #3570
2025-03-08 23:58:17 -08:00
Daniel Fancsali cc855d8812 community/linux-google-veyron: upgrade to 6.6.74 (MR 6201)
Upgrading from the old LTS (6.1.y) to the latest LTS (6.6.y) version.
Kept most of the defaults, except where the current/previous config dictated another logical decision.
2025-03-08 23:10:47 -08:00
Robert Mader 250904dd1d temp/libcamera: Add tuning files for IMX371 and IMX376 (MR 6299)
Only containing black levels for now.

This should only slightly increase image quality, but apparently also
works around a bug in libcamera making the output all black, with
occasional purple or red flashes.
[ci:skip-build]: already built successfully in CI
2025-03-08 18:24:26 +01:00
postmarketOS CI b9d048b672 linux-next: upgrade to next-20250307 2025-03-07 16:59:14 +00:00
Jakob Hauser 4ebe03a264 main/swclock-offset: upgrade to 0.2.5 (MR 6295)
Changelog:
- Support busybox 'date' command
  BB's `date` doesn't support the long form for args (e.g. `--utc`), only
  the short form, while coreutils supports both versions. By using the
  short form swclock-offset can support both versions of `date`

Fixes #3585
[ci:skip-build]: already built successfully in CI
2025-03-07 16:31:03 +01:00
Joel Selvaraj 5b1d92a999 linux-postmarketos-qcom-sdm845: update to 6.14-rc5 and add cameras for op6 (MR 6291)
[ci:skip-build]: already built successfully in CI
2025-03-06 16:33:40 -08:00
postmarketOS CI 6ecff66a58 linux-next: upgrade to next-20250306 2025-03-06 16:59:23 +00:00
Devin Lin fc2dfa0dd7 systemd/systemd-services: fix polkit-kde-agent-1-systemd name (MR 6288)
The package name was missing the -systemd suffix, causing it to conflict
with the real polkit-kde-agent-1 package.

[ci:skip-build]: already built successfully in CI
2025-03-05 10:50:40 -08:00
fossdd 9eb5dfcbf0 main/postmarketos-base: enable apk --cache-pre-download (MR 5921)
This allows safer installation of packages, since the upgrade doesn't
fail with a half-installed system if the download fails while installing.

Note that this will only take effect when Alpine upgrades to apk-tools 3.

Closes: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/issues/3383
See: https://gitlab.alpinelinux.org/alpine/apk-tools/-/issues/10891
2025-03-05 19:16:27 +01:00
postmarketOS CI e4088c9370 linux-next: upgrade to next-20250305 2025-03-05 16:56:35 +00:00
David Furey 7606236702 postmarketos-base-ui: honour deviceinfo_disable_dhcpd flag in NetworkManager scripts (MR 6230)
deviceinfo_disable_dhcpd only disables dhcpd during init, but it should
also be disabled in other contexts.

[ci:skip-build]: already built successfully in CI
2025-03-05 14:14:22 +01:00
Luca Weiss 2123dec738 linux-postmarketos-qcom-sm6350: upgrade to 6.13.4 (MR 6261)
Add some patches which finally fix mobile data on this SoC!

https://lore.kernel.org/netdev/20250227-ipa-v4-7-fixes-v1-0-a88dd8249d8a@fairphone.com/T/
[ci:skip-build]: already built successfully in CI
2025-03-05 14:08:09 +01:00
Clayton Craft d60a83adaf systemd/systemd-services: add localsearch unit files (MR 6194)
[ci:skip-build]: already built successfully in CI
2025-03-05 11:22:51 +01:00
postmarketOS CI ec89ceffe9 linux-next: upgrade to next-20250304 2025-03-05 05:59:26 +00:00
Pablo Correa Gómez 5d881843a3 mrhlpr.json: remove (MR 6284)
The regex has not been working for a long while, there have been
previous attempts to try fix it, but it's still failing. There is
also common understanding in the team, that the regex is not terribly
useful. So remove it.
2025-03-04 17:31:42 +01:00
faveoled a1be8ba3ab linux-samsung-a30: update source and fix build (MR 6267)
[ci:skip-build]: already built successfully in CI
2025-03-04 16:13:23 +01:00
Bart Ribbers dcf2e557e0 systemd/kwin: upgrade to 6.3.2.1 (MR 6283)
[ci:skip-build]: already built successfully in CI
2025-03-04 15:45:29 +01:00
panpanpanpan 38f0780bc3 firmware-xiaomi-nabu: add mantainer (MR 6224)
[ci:skip-vercheck]

[ci:skip-build]: already built successfully in CI
2025-03-04 15:37:58 +01:00
panpanpanpan c36df7fc93 device-xiaomi-nabu: replace device specific kernel in favor of generic sm8150 kernel (MR 6224) 2025-03-04 15:37:58 +01:00
panpanpanpan 80a2f5186f linux-postmarketos-qcom-sm8150: upgrade to 6.13.0 (MR 6224) 2025-03-04 15:37:58 +01:00
Pablo Correa Gómez eb18caefb5 Update APKBUILDS to use Maintainer and Co-Maintainer instead of CODEOWNERS (MR 6272)
We now have a bot that reads those lines from APKBUILD files, instead
of using a proprietary gitlab feature. Relevant changes:

* Change @ollieparanoid for @Newbyte as maintainer for GNOME packages
  where Oliver was listed.
* Don't add @craftyguy as Librem5 maintainer, as he dropped it long
  ago
* Remove entries referencing archived ports
* Don't touch jenneron's maintainership. That's a task for another day
* Don't add "balejk" as maintainer. We have tried pinging them, but
  seem to be currently idle
  person is. Help figuring it out would be welcomed.
* Don't add "binarycraft" as maintainer. Last contribution was years
  ago: https://gitlab.com/binarycraft
* Don't add more maintainers to linux-postmarketos-qcom-msm8953, as it
  would have ended up with 7, which might be a bit too much
* Don't add more maintainers to the PinePhone. The current ones seem
  to actually be the most active
* Don't add Danct12 to N900. Sicelo has been single-handedly managing
  it for a long while
* Update maintainer emails for Nikita Travkin, Alexey Minnekhanov, and
  Barnabás Czémán

[ci:skip-vercheck] Co-Maintainer changes require no pkgrel updates
since the names do not make it to the package itself

[ci:ignore-count]

Fixes #3530
[ci:skip-build]: already built successfully in CI
2025-03-04 12:50:09 +01:00
Pablo Correa Gómez bffa50ed34 firmware-samsung-espresso10: move to archived (MR 6272)
Fixes 85f9a49ad6
2025-03-04 12:49:19 +01:00
postmarketOS CI af6020694c linux-next: upgrade to next-20250303 2025-03-04 06:00:17 +00:00
Kidd Lee d269ac20bf linux-xiaomi-ido: upgrade kernel to 3.10.108 (MR 6256)
[ci:skip-build]: already built successfully in CI
2025-03-03 21:25:48 +01:00
Caleb Connolly 5cfcb8545f linux-next: add BINFMT_MISC (MR 6275)
Signed-off-by: Caleb Connolly <caleb@postmarketos.org>

[ci:skip-build]: already built successfully in CI
2025-03-03 21:21:53 +01:00
Clayton Craft 7ee9d24cf2 systemd/systemd-services: add power-profiles-daemon unit file (MR 6265)
[ci:skip-build]: already built successfully in CI
2025-03-03 19:01:51 +01:00
Clayton Craft 57678bf70a systemd/systemd-services: fix path in fnott.service (MR 6254)
[ci:skip-build]: already built successfully in CI
2025-03-03 18:56:46 +01:00
Bart Ribbers 4ba6a06771 systemd/plasma*: upgrade to 6.3.2 (MR 6266)
[ci:skip-build]: already built successfully in CI
2025-03-03 09:49:27 -08:00
Bart Ribbers 51fdc0ae3e systemd/plasma*: upgrade to 6.3.1 (MR 6240)
[ci:skip-build]: already built successfully in CI
2025-03-03 18:38:51 +01:00
Devin Lin 5b620c3d4f main/postmarketos-ui-plasma-mobile: switch to Dolphin from Index (MR 6255)
[ci:skip-vercheck]

Dolphin is now mobile friendly, we can use it instead of Index as the
default file manager.
2025-03-03 18:32:39 +01:00
Richard Acayan e18c9fb2b2 device-google-bonito: add unl0kr quirk for full display drivers (MR 6281)
[ci:skip-build]: already built successfully in CI
2025-03-03 09:28:41 -08:00
Bart Ribbers 9ba315de93 main/postmarketos-ui-asteroid: enable systemd support (MR 6160)
[ci:skip-build]: already built successfully in CI
2025-03-03 18:20:08 +01:00
Bart Ribbers 986b312ab9 systemd/postmarketos-base-systemd: enable AsteroidUI-related services (MR 6160) 2025-03-03 18:20:08 +01:00
Bart Ribbers 98962e40c8 systemd/systemd-services: add AsteroidUI-related unit files (MR 6160) 2025-03-03 18:20:08 +01:00
Bart Ribbers b7ac3683ad systemd/dsme: fork from Alpine to add systemd support (MR 6160) 2025-03-03 18:20:07 +01:00
r00t dcf72bea5c samsung-crownlte: workaround for touchscreen not working when booted by plugging charger (MR 6219)
[ci:skip-build]: already built successfully in CI
2025-03-03 18:16:39 +01:00
Yahia Shamaa 05a6b40e65 samsung-lt023g: Fix audio (MR 6260)
[ci:skip-build]: already built successfully in CI
2025-03-03 09:12:02 -08:00
jane400 bec405cddf systemd/linux-pam-pmos: upgrade to 1.7.0 (MR 6137)
pam_dump_runtime_dir isn't needed with systemd. if a user install this
module, this might break with logind integration..

[ci:skip-build]: already built successfully in CI
2025-03-03 18:06:19 +01:00
David Heidelberg f127ff6540 temp/iio-sensor-proxy: re-enable tests (MR 6126)
As we compile package only for aarch64

Signed-off-by: David Heidelberg <david@ixit.cz>
2025-03-03 18:00:03 +01:00
vboxuser c43f2078ed samsung-beyond2lte: new device (MR 6161)
[ci:skip-build]: already built successfully in CI
2025-03-03 17:37:03 +01:00
Ferass El Hafidi e087403c1f device-amlogic-tvbox: add support for Amlogic P241 reference board (MR 6099)
(S805X)

Tested on Xiaomi Mi TV Stick (S805Y).

Signed-off-by: Ferass El Hafidi <funderscore@postmarketos.org>
[ci:skip-build]: already built successfully in CI
2025-03-03 17:33:48 +01:00
Sicelo A. Mhlongo 3044830032 device-nokia-n900: minor packaging improvements (for i3) (MR 6258)
1. dependencies useful for all X11 DEs/WMs moved to x11 subpackage
2. add dmenu-based power key menu with options for shutdown, reboot, and
    screenshot
3. handle power and screenlock keys using i3 directly, instead of acpi/evtest
4. add mouse key emulation via Shift+keyboard-keys

[ci:skip-build]: already built successfully in CI
2025-03-03 17:05:39 +01:00
adamthiede 1fa198e2bf main/mobile-config-firefox: add subpackage for librewolf (MR 6270)
[ci:skip-build]: already built successfully in CI
2025-03-02 13:09:39 +01:00
Connor Eliffe b046aebbbb linux-amazon-biscuit: remove dummy mmap from pcm audio driver (MR 6233)
More detail in the included patch but tl;dr patches a dummy mmap
function in the PCM audio driver that causes a kernel panic
when used by pulse.

[ci:skip-build]: already built successfully in CI
2025-03-01 19:42:36 +01:00
Teemu Ikonen 413070a04d systemd/phosh: upgrade to 0.45.0 (MR 6277) 2025-03-01 17:47:54 +01:00
Devin Lin ca37436209 systemd/systemd-services: add plasma-polkit-agent (MR 6252)
kde-polkit-agent-1 needs a systemd unit file to be started up on session
login, so that we have a polkit greeter.
2025-03-01 06:57:39 +00:00
Richard Acayan fc122c6fe1 device-google-sargo: remove kernel modules for display (MR 6241)
These kernel modules are now built-in.

[ci:skip-build]: already built successfully in CI
2025-02-28 20:40:09 -08:00
Richard Acayan 79a1c66789 linux-postmarketos-qcom-sdm670: upgrade to v6.13.3 (MR 6241) 2025-02-28 20:40:09 -08:00
Oliver Smith 09965ce877 device-nokia-n900: fix missing makedepend (MR 6268)
pmbootstrap > 3.3.1 is stricter with the dependencies, it will only
install packages that are in makedepends during builds. Before it also
installed packages from depends.

Add postmarketos-mvcfg to makedepends, as it gets used in build().

postmarketos-mvcfg will be removed in the future (see issue 3580), but
let's unbreak the build first.

Related: pmbootstrap issue 2574
[ci:skip-build]: already built successfully in CI
2025-02-28 20:35:47 -08:00
postmarketOS CI b9c187b890 linux-next: upgrade to next-20250228 2025-02-28 16:57:02 +00:00
adamthiede 4af4a32b2f linux-postmarketos-mediatek-mt8173: upgrade to 6.13.5 (MR 6262) 2025-02-27 23:39:19 +01:00
Sicelo A. Mhlongo 6589a57e26 device-nokia-n900: force SD card partition resizing (MR 6257)
Reverts 82a8d55197 (device-nokia-n900: drop partition resize cmdline option
(MR 6164)) since it seems resizing does not actually take place automatically,
at least as far as the N900 is concerned

[ci:skip-build]: already built successfully in CI
2025-02-27 12:06:55 -08:00
jane400 6da432b150 systemd/systemd: upgrade to 256.11 (MR 6145)
There are some notable changes:
- systemd-journal-upload is now available, but not tested
- pam files now live under `/usr/lib/pam.d`. users can easily override
  configuration by putting files under /etc/pam.d with the same name.
- journalctl should now work for `wheel` groups without privilege
  esclation to root. ACLs' for /var/log/journal should hopefully be
  set correctly now.
- /bin/udevadm /sbin/{init,udevd} are now provided by the APKBUILD itself
- The split-usr backport lives now in the downstream release.
2025-02-27 09:57:13 -08:00
jane400 ec84571f9b systemd/phosh: use abuild's systemd splitfunc and launch dbus via socket-activation (MR 6243)
The current -systemd subpackage isn't getting installed due to the
invalid install_if statement. As abuild's fork in pmOS for systemd
specifies a default_systemd() and systemd() function, overriding it
here isn't needed.

The -systemd subpackage contains configuration for gnome-session in
systemd mode.
- By placing a file into systemd/user/gnome-session@phosh.target.d,
  we generate a valid gnome-session@phosh.target.
- The first invokation of gnome-session by phosh-session includes
  the arg `--session phosh`. When gnome-session sees a running
  systemd user manager via dbus, it will signal to systemd to start
  `gnome-session@phosh.target`.

As we switched to tinydm/autologin for phosh on systemd-edge, this
will only work when autologin also tries to load pam_systemd.so.
[ci:skip-build]: already built successfully in CI
2025-02-27 09:48:03 -08:00
postmarketOS CI 99b062b484 linux-next: upgrade to next-20250227 2025-02-27 17:00:24 +00:00
4627 changed files with 23315 additions and 1554481 deletions

No files matched your search

-8
View File
@@ -11,12 +11,4 @@ if [ "$(id -u)" = 0 ]; then
exec su "${TESTUSER:-pmos}" -c "sh -e $0"
fi
# Wrap pmbootstrap to use this repository for --aports
pmaports="$(cd "$(dirname "$0")"/..; pwd -P)"
_pmbootstrap="$(command -v pmbootstrap)"
pmbootstrap() {
"$_pmbootstrap" --aports="$pmaports" "$@"
}
.ci/lib/apkbuild_linting.py
-1
View File
@@ -1 +0,0 @@
lib/build_changed_aports.sh
+64
View File
@@ -0,0 +1,64 @@
image: alpine:latest
stages:
- build
workflow:
rules:
- if: $CI_PIPELINE_SOURCE == "parent_pipeline"
{% if archs|length == 0 %}
# Needed because gitlab fails if no jobs are ran:
# - https://gitlab.com/gitlab-org/gitlab/-/issues/368248
# This applies to `when: manual` is used on all jobs.
placeholder:
stage: build
script:
- 'true'
{% endif %}
.build:
# Create jobs, but don't run them unless this is
# overriden in jobs that extend it
when: manual
stage: build
interruptible: true
before_script:
# upgrade is mostly needed for "qemu" runners that run edge based on a VM
# The other build jobs run natively in docker on latest alpine stable and
# those should always have whatever we need
- apk upgrade -U
- .ci/lib/gitlab_prepare_ci.sh
after_script:
- cp -r /home/pmos/.local/var/pmbootstrap/packages/ packages/ || true
- .ci/lib/move_logs.sh $CI_PROJECT_DIR
artifacts:
expire_in: 1 week
paths:
- packages/
timeout: 10 h
build-x86_64:
{% if ('x86_64' in archs) %}
when: always
{% endif %}
extends: .build
script:
- .ci/build-x86_64.sh
build-aarch64:
{% if ('aarch64' in archs) %}
when: always
{% endif %}
extends: .build
tags: [arm64]
script:
- .ci/build-aarch64.sh
build-armv7:
{% if ('armv7' in archs) %}
when: always
{% endif %}
extends: .build
tags: [qemu]
script:
- .ci/build-armv7.sh
-1
View File
@@ -1 +0,0 @@
lib/build_changed_aports.sh
-1
View File
@@ -1 +0,0 @@
lib/build_changed_aports.sh
-43
View File
@@ -1,43 +0,0 @@
#!/bin/sh -e
# Description: verify CODEOWNERS file is sane
# https://postmarketos.org/pmb-ci
# TODO Future improvements:
# * Check that all devices in main/community have someone in CODEOWNERS
# * Check that GitLab user actually exists (e.g. deleted account, account with
# changed user name)
if grep -q " " CODEOWNERS; then
echo
echo "ERROR: Found space indentation in CODEOWNERS."
echo "ERROR: Please indent with tab characters."
grep " " CODEOWNERS
echo
exit 1
fi
fail=0
tmppipe=$(mktemp -u)
mkfifo "$tmppipe"
grep -v "^#" CODEOWNERS | cut -d' ' -f1 > "$tmppipe" &
while IFS= read -r line; do
[ -z "$line" ] && continue
# Check if entry generally exists
# shellcheck disable=SC2086
ls $line >/dev/null 2>&1 || { fail=1; echo "Non-existing: $line"; }
# Check that directories end with a slash
# shellcheck disable=SC2086
if test -d "$(ls -d $line)"; then
echo "$line" | grep -q '/$' || { fail=1; echo "Missing trailing slash: $line"; }
fi
done < "$tmppipe"
rm "$tmppipe"
if [ "$fail" = 1 ]; then
echo
echo "ERROR: Invalid CODEOWNERS entries, see above."
echo
exit 1
fi
+4 -39
View File
@@ -24,23 +24,6 @@ def build_strict(packages, arch):
"--arch", arch, ] + list(packages))
def verify_checksums(packages, arch):
# Only do this with one build-{arch} job
arch_verify = "x86_64"
if arch != arch_verify:
print(f"NOTE: doing checksum verification in build-{arch_verify} job,"
" not here.")
return
if len(packages) == 0:
print("no packages changed, not doing any checksums verification")
return
common.run_pmbootstrap(["build_init"])
common.run_pmbootstrap(["--details-to-stdout", "checksum", "--verify"] +
list(packages))
if __name__ == "__main__":
# Architecture to build for (as in build-{arch})
if len(sys.argv) != 2:
@@ -93,18 +76,9 @@ if __name__ == "__main__":
# No packages: skip build
if len(packages) == 0:
print(f"no packages changed, which can be built for {arch}")
sys.exit(0)
else:
verify_only = common.commit_message_has_string("[ci:skip-build]")
if verify_only:
# [ci:skip-build]: verify checksums and stop
print("WARNING: not building changed packages ([ci:skip-build])!")
print("verifying checksums: " + ", ".join(packages))
verify_checksums(packages, arch)
else:
# Build packages
print(f"building in strict mode for {arch}: {', '.join(packages)}")
build_strict(packages, arch)
build_strict(packages, arch)
# Build packages in extra-repos/systemd
# FIXME: this should probably be more generic, if other repos are added later?
@@ -127,15 +101,6 @@ if __name__ == "__main__":
# No packages: skip build
if len(systemd_pkgs) == 0:
print(f"no packages changed, which can be built for {arch}")
sys.exit(0)
else:
verify_only = common.commit_message_has_string("[ci:skip-build]")
if verify_only:
# [ci:skip-build]: verify checksums
print("WARNING: not building changed packages for extra-repos/systemd: ([ci:skip-build])!")
print("verifying checksums: " + ", ".join(systemd_pkgs))
verify_checksums(systemd_pkgs, arch)
else:
# Build packages
print(f"building in strict mode for {arch}, from extra-repos/systemd: {', '.join(systemd_pkgs)}")
build_strict(systemd_pkgs, arch)
build_strict(systemd_pkgs, arch)
+8
View File
@@ -111,6 +111,14 @@ def check_versions(packages):
" HEAD against HEAD~1.")
commit = "HEAD~1"
# Exclude linux-next from pkgrel checks, as it is updated automatically.
#
# Without this, .ci/commits.sh complains about the following:
# ERROR: Modified package(s) don't have an increased version or a new
# package has a nonzero pkgrel!
if "linux-next" in packages:
packages.remove("linux-next")
for package in packages:
# Get versions, skip new packages
head = get_package_version(package, "HEAD")
+18 -7
View File
@@ -41,7 +41,9 @@ def add_upstream_git_remote():
def commit_message_has_string(needle):
return needle in run_git(["show", "-s", "--format=full", "HEAD"])
base_commit = get_base_commit()
return needle in run_git(["log", "--pretty=format:%B", f"{base_commit}..HEAD"])
def run_pmbootstrap(parameters):
@@ -86,12 +88,10 @@ def get_upstream_branch():
return ret
def get_changed_files(removed=True):
""" Get all changed files and print them, as well as the branch and the
commit that was used for the diff.
:param removed: also return removed files (default: True)
:returns: set of changed files
"""
def get_base_commit() -> str:
"""Get the base commit that can be compared with HEAD to get all commits in the
given branch/merge request."""
branch_upstream = f"upstream/{get_upstream_branch()}"
commit_head = run_git(["rev-parse", "HEAD"])[:-1]
commit_upstream = run_git(["rev-parse", branch_upstream])[:-1]
@@ -107,6 +107,17 @@ def get_changed_files(removed=True):
commit = run_git(["merge-base", branch_upstream, "HEAD"])[:-1]
print("comparing HEAD with: " + commit)
return commit
def get_changed_files(removed=True):
""" Get all changed files and print them, as well as the branch and the
commit that was used for the diff.
:param removed: also return removed files (default: True)
:returns: set of changed files
"""
commit = get_base_commit()
# Changed files
ret = set()
print("changed file(s):")
+56
View File
@@ -0,0 +1,56 @@
#!/usr/bin/env python3
# Copyright 2025 Pablo Correa Gomez
# SPDX-License-Identifier: GPL-3.0-or-later
from pathlib import Path
import shutil
import sys
from jinja2 import Template
import add_pmbootstrap_to_import_path
import pmb.parse
import pmb.helpers.logging
from pmb.core.arch import Arch
# Same dir
import common
if __name__ == "__main__":
# Needs input to output if we should create the jobs
if len(sys.argv) != 3:
print("usage: generate_build_jobs.py TEMPLATE CHILD_PIPELINE")
print(sys.argv)
sys.exit(1)
template = sys.argv[1]
child_pipeline = sys.argv[2]
# pmb logging has to be initialized for later pmb commands to work, setting
# to /dev/null since we don't care about the output. Later this could
# be changed to a file and added as a CI artifact if we need to debug
# something.
pmb.logging.init(Path("/dev/null"), False)
archs = set()
# Get and print modified packages
common.add_upstream_git_remote()
for file in common.get_changed_files():
path = Path(file)
if path.name != "APKBUILD":
continue
elif not path.exists():
continue # APKBUILD was deleted
apkbuild = pmb.parse.apkbuild(path)
archs.update(apkbuild["arch"])
if common.commit_message_has_string("[ci:skip-build]"):
print("User requested skipping build, not creating child pipeline file")
archs = set()
# This ignores things like !armv7, that could be a follow-up optimization
if 'noarch' in archs or 'all' in archs:
archs = set([str(arch) for arch in Arch.supported()])
print(archs)
with open(template) as f:
rendered = Template(f.read()).render(archs=archs)
with open(child_pipeline, "w") as fw:
fw.write(rendered)
+199
View File
@@ -0,0 +1,199 @@
#!/bin/sh
# Unit testing framework for shell scripts
# Invoke with the path to a tests/ subdir of a package and the
# package name as arguments. Or source it with the following
# variables set:
# * results_dir - second argument to the test script
set -e
# Colors :D
RED="\e[31m"
GREEN="\e[32m"
YELLOW="\e[33m"
BLUE="\e[34m"
BOLDBLUE="\e[1;34m"
RESET="\e[0m"
testlib_path="$(realpath "$0")"
_test_assert_failed=""
_test_testn=1
_test_passedn=0
_test_failedn=0
_test_current_test=""
_test_statefile="$(mktemp)"
# Set by each test
results_dir="${results_dir:-}"
test_log() {
# ash supports echo -e
# shellcheck disable=SC3037
echo -e "$*" >&2
}
test_info() {
# shellcheck disable=SC3037
echo -e "${BLUE}$*${RESET}" >&2
}
test_debug() {
# shellcheck disable=SC3037
echo -e "${YELLOW}$*${RESET}" >&2
}
assert_strequal() {
# $1: first string
# $2: second string
if [ -z "$1" ] || [ -z "$2" ]; then
test_log "ERROR: assert_equal: not enough arguments given"
exit 1
fi
if [ "$1" != "$2" ]; then
_test_assert_failed="$1 != $2"
test_log " ❌ $_test_assert_failed"
return
fi
test_log " ✅ $1 == $2"
}
assert_equal() {
# $1: name of variable
# $2: value to compare
if [ -z "$1" ] || [ -z "$2" ]; then
test_log "ERROR: assert_equal: not enough arguments given"
exit 1
fi
val="$(eval echo "\$$1")"
if [ "$val" != "$2" ]; then
_test_assert_failed="\$$1 != $2 (got $val)"
test_log " ❌ $_test_assert_failed"
return
fi
test_log " ✅ \$$1 == $2"
}
assert_unset() {
if [ -z "$1" ]; then
test_log "ERROR: assert_unset: not enough arguments given"
exit 1
fi
val="$(eval echo \$"$1")"
if [ -n "$val" ]; then
_test_assert_failed="\$$1 should be unset (has value '$val')"
test_log " ❌ $_test_assert_failed"
return
fi
test_log " ✅ \$$1 is unset"
}
# Log some expression and evaluate it
logeval() {
eval "$*"
test_log "${YELLOW}+ $*${RESET}"
}
# Start a test. Shell scripts involved in the test should be sourced AFTER calling this function!
start_test() {
if [ -n "$_test_current_test" ]; then
test_log "ERROR: multiple calls to start_test without calling end_test first!"
test_log "Current test: $_test_current_test"
exit 1
fi
test_log "==> Test $_test_testn: $1"
_test_current_test="$1"
set > "$_test_statefile"
}
# End a test and reset the environment.
end_test() {
local msg
local save_assert_failed
# Restore environment
save_assert_failed="$_test_assert_failed"
# Splitting is intentional
# shellcheck disable=SC2046
unset $(set | grep "='" | cut -d= -f1 | grep -vE "(PATH|IFS|TERM|LANG|HOME|PWD|SHELL|USER|save_assert_failed|_test_statefile)" )
# shellcheck disable=SC1090
. "$_test_statefile"
_test_assert_failed="$save_assert_failed"
if [ -n "$_test_assert_failed" ]; then
msg="${RED}Failed! ❌ ${_test_assert_failed}${RESET}"
echo "Test $_test_testn: $_test_assert_failed" >> "$results_dir/failed"
_test_failedn=$((_test_failedn+1))
echo "$_test_failedn" > "$results_dir/failedn"
unset _test_assert_failed
else
msg="${GREEN}Passed!${RESET}"
_test_passedn=$((_test_passedn+1))
echo "$_test_passedn" > "$results_dir/passedn"
fi
test_log "<== Test $_test_testn: $msg $_test_current_test\n"
_test_testn=$((_test_testn+1))
_test_current_test=""
}
# Call at the end of each testsuite shell script
end_testsuite() {
if [ -n "$_test_current_test" ]; then
test_log "${RED}ERROR: end_testsuite called without calling end_test first!${RESET}"
test_log "${RED}Current test: $_test_current_test${RESET}"
exit 1
fi
if [ -f "$results_dir/failed" ]; then
exit 1
fi
exit 0
}
run_tests() {
local failed test_results_base
local test name total passedn failedn t_passed t_failed
test_results_base="$(mktemp -d)"
test_log "Running tests for $2"
# FIXME: yeah this isn't quite the best way to iterate the files
# shellcheck disable=SC2010
for name in $(ls "$1" | grep "\.sh$"); do
test="$1/$name"
mkdir "$test_results_base/$name"
echo 0 > "$test_results_base/$name/passedn"
echo 0 > "$test_results_base/$name/failedn"
test_log
test_log "${BOLDBLUE}# Test suite ${name}${RESET}"
$test "$testlib_path" "$test_results_base/$name" || failed="$failed $name"
t_passed=$(cat "$test_results_base/$name/passedn")
t_failed=$(cat "$test_results_base/$name/failedn")
passedn=$((passedn+t_passed))
failedn=$((failedn+t_failed))
total=$((total+t_passed+t_failed))
done
if [ -n "$failed" ]; then
test_log
test_log "Some tests failed:"
for test in $failed; do
test_log "❌ $test"
test_log " ${RED}$(cat "$test_results_base/$test/failed")${RESET}"
done
fi
if [ $passedn -lt $total ]; then
test_log "[${RED}$passedn/$total tests passed${RESET}]"
else
test_log "[${GREEN}$passedn/$total tests passed!${RESET}]"
fi
test_log
if [ -n "$failed" ]; then exit 1; else exit 0; fi
}
# FIXME: probably not the best way to determine if this was sourced
if [ $# -gt 0 ]; then
run_tests "$1" "$2"
fi
+82
View File
@@ -0,0 +1,82 @@
#!/usr/bin/env python3
# Copyright 2025 Pablo Correa Gomez
# SPDX-License-Identifier: GPL-3.0-or-later
import os
import sys
# Same dir
import common
# pmbootstrap
import add_pmbootstrap_to_import_path
import pmb.core
from pmb.core.context import get_context
def verify_checksums(packages):
if len(packages) == 0:
print("no packages changed, not doing any checksums verification")
return
print("verifying checksums: " + ", ".join(packages))
common.run_pmbootstrap(["build_init"])
common.run_pmbootstrap(["--details-to-stdout", "checksum", "--verify"] +
list(packages))
if __name__ == "__main__":
# Get and print modified packages
common.add_upstream_git_remote()
packages = common.get_changed_packages()
# Load context
sys.argv = ["pmbootstrap.py", "chroot"]
args = pmb.parse.arguments()
context = get_context()
# Get set of all buildable packages for the enabled repos, for skipping unbuildable
# aports later. We might be given a changed aport from e.g. extra-repos/systemd when
# that repo is not enabled
buildable_pkgs = set()
for path in pmb.core.pkgrepo.pkgrepo_iter_package_dirs():
buildable_pkgs.add(os.path.basename(path))
# To store a list of packages from extra-repos/systemd for special handling
# later:
systemd_pkgs = list()
# Filter out packages are not found in enabled repos
# (Iterate over copy of packages, because we modify it in this loop)
for package in packages.copy():
if package not in buildable_pkgs:
print(f"{package}: not in current repo, skipping")
packages.remove(package)
# FIXME: this should probably be more generic, if other repos are added
# later?
# This just tosses the package into the list of packages to try
# building later w/ systemd enabled, and assumes it'll be found
# there.
print(f"{package}: adding to list of packages to check in systemd repo")
systemd_pkgs.append(package)
continue
# No packages: skip build
if len(packages) == 0:
print("no packages to check for the current repo")
else:
verify_checksums(packages)
# FIXME: this should probably be more generic, if other repos are added later?
if systemd_pkgs:
common.run_pmbootstrap(["config", "systemd", "always"])
# To fix the ERROR: Chroot 'native' is for the 'edge' channel, but you are on the
# 'systemd-edge' channel. Run 'pmbootstrap zap' to delete your chroots and try again.
# To do this automatically, run 'pmbootstrap config auto_zap_misconfigured_chroots yes'.
common.run_pmbootstrap(["config", "auto_zap_misconfigured_chroots", "yes"])
# No packages: skip build
if len(systemd_pkgs) == 0:
print("no packages to check for the systemd repo")
else:
verify_checksums(systemd_pkgs)
+2 -2
View File
@@ -15,7 +15,6 @@ fi
# Shell: shellcheck
sh_files="
./main/mdss-fb-init-hack/mdss-fb-init-hack.sh
./main/postmarketos-base/rootfs-usr-lib-firmwareload.sh
./main/postmarketos-base-ui/rootfs-usr-lib-NetworkManager-dispatcher.d-50-dns-filter.sh
./main/postmarketos-base-ui/rootfs-usr-lib-NetworkManager-dispatcher.d-50-tethering.sh
./main/postmarketos-installkernel/installkernel-pmos
@@ -39,10 +38,11 @@ sh_files="
$(find . -path './main/postmarketos-mvcfg/*.sh')
$(find . -path './.ci/**.sh')
$(find . -path '**/tests/*.sh')
"
for file in $sh_files; do
echo "Test with shellcheck: $file"
cd "$DIR/$(dirname "$file")"
shellcheck -e SC1008 -e SC3043 -x "$(basename "$file")"
shellcheck -S warning -e SC1008 -e SC3043 -x "$(basename "$file")"
done
+1
View File
@@ -27,6 +27,7 @@ def args(request):
args.offline = False
args.action = "init"
args.cross = False
args.ccache = False
args.log = None
init_args(args)
+7 -7
View File
@@ -120,13 +120,13 @@ def test_aports_maintained():
assert maintainers, f"{path} in community needs at least 1 Maintainer"
def test_aports_unmaintained():
def test_aports_archived():
"""
Ensure that aports in /device/unmaintained have an "Unmaintained:" comment
that describes why the aport is unmaintained.
Ensure that aports in /device/archived have an "Archived:" comment
that describes why the aport is archived.
"""
for path in pkgrepo_iglob("device/unmaintained/*/APKBUILD"):
unmaintained = pmb.parse._apkbuild.unmaintained(path)
assert unmaintained, f"{path} should have an Unmaintained: " +\
"comment that describes why the package is unmaintained"
for path in pkgrepo_iglob("device/archived/*/APKBUILD"):
archived = pmb.parse._apkbuild.archived(path)
assert archived, f"{path} should have an Archived: " +\
"comment that describes why the package is archived"
+2 -1
View File
@@ -74,7 +74,8 @@ def test_deviceinfo():
name = info.name
manufacturer = info.manufacturer
if not name.startswith(manufacturer) and \
not name.startswith("Google"):
not name.startswith("Google") and \
not name.startswith("Jolla"):
raise RuntimeError("Please add the manufacturer in front of"
" the deviceinfo_name, e.g.: '" +
manufacturer + " " + name + "'")
@@ -8,6 +8,7 @@ expected_directories = [
"cross",
"device/archived",
"device/community",
"device/downstream",
"device/main",
"device/testing",
"extra-repos/systemd",
+1 -1
View File
@@ -23,7 +23,7 @@ def test_aports_kernel():
apkbuild = pmb.parse.apkbuild(path)
aport_name = os.path.basename(os.path.dirname(path))
if aport_name == "linux-pam":
if aport_name == "linux-pam-pmos":
continue # This package isn't a linux kernel!
if "pmb:cross-native" not in apkbuild["options"]:
+24 -19
View File
@@ -6,6 +6,7 @@ import logging
import os
import pytest
import sys
import re
import add_pmbootstrap_to_import_path
import pmb.parse
@@ -44,25 +45,29 @@ def apkbuild_check_provides(path, apkbuild, version, pkgname, subpkgname=None):
# already replaces the variables, so we check against the inserted
# values here.
if not provide.endswith(f"={version}"):
provide_no_ver = provide.split("=", 1)[0]
error = f"error in {path}:\n"
if subpkgname:
error += f"in subpackage:\n {subpkgname}\n"
else:
error += f"in package:\n {pkgname}\n"
error += f"broken provides entry:\n {provide_no_ver}\n"
error += "\n"
error += "This provides entry needs to be changed to"
error += f" '{provide_no_ver}=$pkgver-r$pkgrel'"
error += " (do not replace the variables, without '').\n"
error += "\n"
error += "If you know what you are doing and didn't add the"
error += " version on purpose, you also need to set a"
error += " provider_priority (pma#1766).\n"
error += "Reference:"
error += " https://wiki.alpinelinux.org/wiki/APKBUILD_Reference#provides"
ret += [error]
# Valid version strings, per the APKBUILD reference, are fine. This regex
# attempts to detect those.
pattern = r'^\d+(\.\d+)*[a-z]?(_(?:alpha|beta|pre|rc|cvs|svn|git|hg|p)\d*)*-r\d+$'
[provide_no_ver, provide_ver] = provide.split("=", 1)
if not re.match(pattern, provide_ver):
error = f"error in , provide_ver{path}:\n"
if subpkgname:
error += f"in subpackage:\n {subpkgname}\n"
else:
error += f"in package:\n {pkgname}\n"
error += f"broken provides entry:\n {provide_no_ver}\n"
error += "\n"
error += "This provides entry needs to be changed to"
error += f" '{provide_no_ver}=$pkgver-r$pkgrel'"
error += " (do not replace the variables, without '').\n"
error += "\n"
error += "If you know what you are doing and didn't add the"
error += " version on purpose, you also need to set a"
error += " provider_priority (pma#1766).\n"
error += "Reference:"
error += " https://wiki.alpinelinux.org/wiki/APKBUILD_Reference#provides"
error += f"\nVERSION: {provide_no_ver}"
ret += [error]
return ret
+2 -1
View File
@@ -105,7 +105,8 @@ def test_aports_unreferenced_files():
if os.path.basename(rel_file_path) not in sources_chk \
and rel_file_path not in apkbuild["install"] \
and rel_file_path not in subpackage_installs \
and rel_file_path not in trigger_sources:
and rel_file_path not in trigger_sources \
and not rel_file_path.startswith("tests/"):
raise RuntimeError(f"{apkbuild_path}: found unreferenced file: {rel_file_path}")
+25
View File
@@ -0,0 +1,25 @@
#!/usr/bin/env python3
# Copyright 2025 Oliver Smith
# SPDX-License-Identifier: GPL-3.0-or-later
import logging
import os
import pmb.parse
from pmb.core.context import get_context
from pathlib import Path
def test_systemd_stage0_version():
"""Ensure systemd-stage0 and systemd have the same pkgver."""
# Don't clutter output with verbose APKBUILD parsing messages
logging.getLogger().setLevel(logging.DEBUG)
config = get_context().config
pma_systemd = os.path.join(config.aports[0], "extra-repos/systemd")
sd0 = pmb.parse.apkbuild(Path(os.path.join(pma_systemd, "systemd-stage0/APKBUILD")))
sd1 = pmb.parse.apkbuild(Path(os.path.join(pma_systemd, "systemd/APKBUILD")))
assert sd0["pkgver"] == sd1["pkgver"], (
f"systemd-stage0 pkgver ({sd0['pkgver']}) doesn't match systemd pkgver ({sd1['pkgver']})!"
)
+19
View File
@@ -0,0 +1,19 @@
#!/bin/sh -e
# Description: run unit-tests for packages
# https://postmarketos.org/pmb-ci
#
# This script only exists to allow running unit-tests locally.
# In actual CI the package tests/ subdir has it's own YAML
# fine defining a job which calls testlib for that package.
# This way we can run all the package unit-tests locally but
# have them be individual jobs in GitLab.
if [ "$(id -u)" = 0 ]; then
set -x
exec su "${TESTUSER:-build}" -c "sh -e $0"
fi
find . -type d -name "tests" | while read -r testdir; do
pkg="$(basename "$(dirname "$testdir")")"
.ci/lib/testlib.sh "$testdir" "$pkg"
done
+16
View File
@@ -0,0 +1,16 @@
#!/bin/sh -e
# Description: verify checksums of modified packages
# Options: native
# Use 'native' because it requires running pmbootstrap.
# https://postmarketos.org/pmb-ci
if [ "$(id -u)" = 0 ]; then
set -x
wget "https://gitlab.postmarketos.org/postmarketOS/ci-common/-/raw/master/install_pmbootstrap.sh"
sh ./install_pmbootstrap.sh
exec su "${TESTUSER:-pmos}" -c "sh -e $0"
fi
export PYTHONUNBUFFERED=1
.ci/lib/verify_checksums.py
+22 -5
View File
@@ -37,13 +37,30 @@ prepend_msg() {
[ -z "$SOURCE" ] || exit 0
lcp=$(git diff-index --name-only --cached HEAD | longest_common_prefix)
prefix=""
case "$lcp" in
device/*/*) prepend_msg "$(echo "$lcp" | cut -d/ -f3): ";;
# Multiple packages touched for same device category
# More logic could be added to detect if they all belong to same device
device/*) ;;
[^.]*/*) prepend_msg "$(echo "$lcp" | cut -d/ -f1-2): ";;
extra-repos/systemd/systemd/*)
prefix="systemd"
;;
extra-repos/systemd/*)
prefix="systemd/$(echo "$lcp" | cut -d/ -f3)"
;;
device/*/*)
prefix="$(echo "$lcp" | cut -d/ -f3)"
;;
device/*)
# Multiple packages touched for same device category. More
# logic could be added to detect if they all belong to same
# device.
;;
[^.]*/*)
prefix="$(echo "$lcp" | cut -d/ -f1-2)"
;;
esac
if [ -n "$prefix" ]; then
prepend_msg "$prefix: "
fi
exit 0
+3
View File
@@ -118,3 +118,6 @@ ENV/
# Allow having untracked packages in aports using a custom-something directory
/custom-*/
# child pipeline
.ci/build-jobs.yaml
+62 -57
View File
@@ -2,38 +2,40 @@
# global settings
image: alpine:latest
before_script: &global_before_scripts
- apk upgrade -U
after_script:
- .ci/lib/move_logs.sh $CI_PROJECT_DIR
stages:
- lint
- prepare
- build
- autoupdate
- test
variables:
# Default of 20 is pretty small, sometimes MRs have >20 commits in them. 100
# seems like a reasonable balance. If this is too low, git merge-base (from ci/
# common.py) can fail
GIT_DEPTH: 100
# This defines the rules for when a pipeline should run.
workflow:
rules:
# Don't run branch pipeline if an MR is open (only the MR pipeline will run)
- if: $CI_COMMIT_BRANCH && $CI_OPEN_MERGE_REQUESTS && $CI_PIPELINE_SOURCE == "push"
when: never
# Run for merge requests
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
# Run scheduled pipeline for autoupdate or manually triggered pipeline
- if: $CI_PIPELINE_SOURCE == "schedule" || $CI_PIPELINE_SOURCE == "web"
# Some packages have their own yaml files defining tests. All of these should contain
# only jobs which extend the .package-test job!
include: "**/.gitlab-ci.yml"
# device documentation
wiki:
stage: lint
rules:
- if: &mr_rule $CI_PIPELINE_SOURCE == "merge_request_event" || $CI_COMMIT_REF_PROTECTED == "false"
- if: &mr_rule $CI_PIPELINE_SOURCE == "merge_request_event"
changes:
- .ci/**/*
- .ci/build-jobs.yaml.j2
- .gitlab-ci.yml
- device/*/device-*/*
script:
@@ -48,6 +50,7 @@ ruff:
changes:
- .ci/*
- .ci/*/*
- .ci/build-jobs.yaml.j2
- .gitlab-ci.yml
script:
- .ci/lib/gitlab_prepare_ci.sh
@@ -56,18 +59,15 @@ ruff:
# shellcheck and various grep checks
shellcheck-grep:
stage: lint
image: alpine:edge
rules:
- if: *mr_rule
script:
- .ci/lib/gitlab_prepare_ci.sh
- .ci/shellcheck.sh
- .ci/grep.sh
- .ci/codeowners.sh
editor-config:
stage: lint
image: alpine:edge
rules:
- if: *mr_rule
script:
@@ -116,6 +116,15 @@ kernel-kconfig:
- .ci/lib/gitlab_prepare_ci.sh
- .ci/kconfig.sh
# Verify checksums
verify-checksums:
stage: lint
rules:
- if: *mr_rule
script:
- .ci/lib/gitlab_prepare_ci.sh
- .ci/verify-checksums.sh
# MR settings
# (Checks for "Allow commits from members who can merge to the target branch")
mr-settings:
@@ -123,61 +132,49 @@ mr-settings:
rules:
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
before_script:
- *global_before_scripts
- apk -q add python3
script:
- wget -q "https://gitlab.postmarketos.org/postmarketOS/ci-common/-/raw/master/check_mr_settings.py"
- python3 ./check_mr_settings.py
# build changed aports
.build:
stage: build
# Calculate build of changed aports using a dynamic downstream pipelines:
# https://docs.gitlab.com/ci/pipelines/downstream_pipelines/#dynamic-child-pipelines
# For those to work, we need two jobs:
# * First one (this one) that generates a valid yaml file with the job yaml as
# an artifact
# * Second one (build-jobs) that has a "trigger" key with the yaml file from
# which to trigger pipelines
# To avoid reworking the whole CI file, for now we are re-using this same file
# to trigger the downstream pipeline. In that case, $CI_PIPELINE_SOURCE will
# be set to "parent_pipeline", and only the jobs that extend .build will run
generate-build-jobs:
stage: prepare
before_script:
- .ci/lib/gitlab_prepare_ci.sh
needs: []
script:
- wget "https://gitlab.postmarketos.org/postmarketOS/ci-common/-/raw/master/install_pmbootstrap.sh"
- sh ./install_pmbootstrap.sh py3-jinja2
- .ci/lib/generate_build_jobs.py .ci/build-jobs.yaml.j2 .ci/build-jobs.yaml
artifacts:
paths:
- .ci/build-jobs.yaml
rules:
- if: *mr_rule
before_script:
- *global_before_scripts
- .ci/lib/gitlab_prepare_ci.sh
after_script:
- cp -r /home/pmos/.local/var/pmbootstrap/packages/ packages/ || true
artifacts:
expire_in: 1 week
paths:
- packages/
timeout: 10 h
build-x86_64:
extends: .build
script:
- .ci/build-x86_64.sh
build-x86:
extends: .build
script:
- .ci/build-x86.sh
build-aarch64:
extends: .build
tags: [arm64]
script:
- .ci/build-aarch64.sh
build-armv7:
extends: .build
tags: [qemu]
script:
- .ci/build-armv7.sh
build-armhf:
extends: .build
tags: [qemu]
script:
- .ci/build-armhf.sh
build-riscv64:
extends: .build
tags: [qemu]
script:
- .ci/build-riscv64.sh
build-jobs:
stage: build
trigger:
include:
- artifact: .ci/build-jobs.yaml
job: generate-build-jobs
strategy: depend
forward:
# So that we don't have to duplicate GIT_DEPTH
pipeline_variables: true
rules:
- if: *mr_rule
auto-update:
stage: autoupdate
@@ -197,3 +194,11 @@ auto-update:
- log.txt
- log_testsuite_pmaports.txt
- pmbootstrap.cfg
# Template for package test jobs defined per-package
.package-test:
stage: test
rules:
- if: *mr_rule
before_script:
- .ci/lib/gitlab_prepare_ci.sh
+1
View File
@@ -34,6 +34,7 @@
### On what environment did you encounter the issue?
#### Environments
* [ ] COSMIC
* [ ] GNOME Shell on Mobile
* [ ] Phosh
* [ ] Plasma Mobile
+3
View File
@@ -0,0 +1,3 @@
Casey Connolly <casey.connolly@linaro.org> <caleb.connolly@linaro.org>
Casey Connolly <kcxt@postmarketos.org> <caleb@postmarketos.org>
-10
View File
@@ -1,10 +0,0 @@
{
"subject_format": {
"pass": [
"^(([a-z]+\\/\\)?\\([a-z\\-0-9*{}]+),?)+: [a-z][A-Za-z\\/\\-0-9*{}\\.,_&:=' ]+( \\(MR \\d+\\)|)$",
"^CI: [a-z-0-9*{}\\(\\)\\.,_ ][A-Za-z\\/\\-0-9*{}\\.,_ ]+( \\(MR \\d+\\)|)$",
"^mrhlpr.json: [a-z-0-9*{}\\(\\)\\.,_ ][A-Za-z\\/\\-0-9*{}\\.,_ ]+( \\(MR \\d+\\)|)$",
"^pmaports.cfg: [a-z-0-9*{}\\(\\)\\.,_ ][A-Za-z\\/\\-0-9*{}\\.,_ ]+( \\(MR \\d+\\)|)$"
]
}
}
-160
View File
@@ -1,160 +0,0 @@
# https://docs.gitlab.com/ee/user/project/code_owners.html
# Put groups like @sdm845-mainline into test_device.py:gitlab_groups.
# Order lines alphabetically!
device/*/*-amlogic-s905*/ @funderscore
device/*/*-arrow-db410c/ @Minecrell
device/*/*-asus-me176c/ @Minecrell
device/*/*-ayn-odin/ @jenneron
device/*/*-bq-paella/ @Minecrell
device/*/*-bq-tenshi/ @fossdd
device/*/*-google-gru/ @jenneron
device/*/*-google-kukui/ @jenneron @binarycraft
device/*/*-google-oak/ @jenneron @adamthiede
device/*/*-google-trogdor/ @jenneron
device/*/*-google-veyron/ @jenneron
device/*/*-google-x64cros/ @jenneron @JustSoup321 @alpernebbi
device/*/*-htc-golfu/ @Newbyte
device/*/*-htc-m8qlul/ @Newbyte
device/*/*-kobo-clara/ @akemnade
device/*/*-lenovo-21bx/ @craftyguy @jane400
device/*/*-lenovo-a6000/ @jenneron @Minecrell
device/*/*-lenovo-a6010/ @jenneron @Minecrell
device/*/*-librecomputer-lafrite/ @funderscore
device/*/*-librecomputer-lepotato/ @funderscore
device/*/*-librecomputer-solitude/ @Newbyte @funderscore
device/*/*-motorola-harpia/ @Minecrell
device/*/*-nokia-n900/ @sicelo @Danct12
device/*/*-pine64-pinebookpro/ @QC8086
device/*/*-pine64-pinephone/ @craftyguy @milesalan @proycon @anjandev @StacyHarper @Arnavion @PsychoGame
device/*/*-pine64-pinephonepro/ @PsychoGame
device/*/*-pine64-rockpro64/ @PureTryOut
device/*/*-purism-librem5/ @craftyguy @alistair23 @Newbyte
device/*/*-qcom-msm8916/ @Minecrell @TravMurav
device/*/*-qcom-msm8953/ @barni2000 @alikates @vipaoL @jiaxyga
device/*/*-qcom-sdm670/ @flamingradian
device/*/*-qcom-sdm845/ @sdm845-mainline
device/*/*-qcom-sm7150/ @Adrian @jiaxyga @ungeskriptet
device/*/*-qcom-sm8250/ @jianhua
device/*/*-qcom/ @calebccff
device/*/*-samsung-a3/ @Mis012 @TravMurav @Minecrell
device/*/*-samsung-a5/ @Minecrell @minlexx
device/*/*-samsung-a51/ @manoedinata
device/*/*-samsung-e7/ @wonderfulShrineMaidenOfParadise
device/*/*-samsung-espresso10/ @MightyM17
device/*/*-samsung-espresso7/ @MightyM17 @antoni.aloytorrens
device/*/*-samsung-fortuna/ @wonderfulShrineMaidenOfParadise
device/*/*-samsung-fortunaltezt/ @bolilingmeng89006
device/*/*-samsung-grandmax/ @wonderfulShrineMaidenOfParadise
device/*/*-samsung-gt510/ @TravMurav
device/*/*-samsung-gt58/ @TravMurav
device/*/*-samsung-j3ltetw/ @bolilingmeng89006
device/*/*-samsung-j4lte/ @manoedinata
device/*/*-samsung-j5/ @wonderfulShrineMaidenOfParadise
device/*/*-samsung-j5x/ @wonderfulShrineMaidenOfParadise
device/*/*-samsung-rossa/ @wonderfulShrineMaidenOfParadise
device/*/*-samsung-serranove/ @Minecrell
device/*/*-tolino-shine2hd/ @akemnade
device/*/*-videostrong-kii-pro/ @funderscore
device/*/*-wileyfox-crackling/ @TravMurav @Minecrell
device/*/*-xiaomi-beryllium/ @joelselvaraj
device/*/*-xiaomi-daisy/ @joelselvaraj @alikates
device/*/*-xiaomi-davinci/ @Adrian @ArianK16a
device/*/*-xiaomi-elish/ @jianhua
device/*/*-xiaomi-markw/ @vipaoL
device/*/*-xiaomi-mido/ @barni2000
device/*/*-xiaomi-scorpio/ @Tooniis
device/*/*-xiaomi-surya/ @jiaxyga @ungeskriptet
device/*/*-xiaomi-tissot/ @jiaxyga @barni2000
device/*/*-xiaomi-vince/ @M0Rf30
device/*/*-xiaomi-wt88047/ @Minecrell
device/*/*-xiaomi-ysl/ @barni2000
device/*/alsa-ucm-conf-cros/ @WeirdTreeThing
device/*/alsa-ucm-conf-qcom-sdm670/ @flamingradian
device/*/device-apple-n61/ @JustSoup321
device/*/device-generic-x86_64/ @craftyguy @ollieparanoid
device/*/device-google-nyan-big/ @jenneron
device/*/device-google-nyan-blaze/ @jenneron
device/*/device-google-peach-pi/ @jenneron
device/*/device-google-peach-pit/ @jenneron
device/*/device-google-sargo/ @flamingradian
device/*/device-google-snow/ @jenneron
device/*/device-huawei-plank/ @gtrxAC
device/*/device-lg-judyln/ @Newbyte
device/*/device-lg-judyp/ @jenneron
device/*/device-microsoft-surface-rt/ @jenneron @jethrob
device/*/device-nvidia-tegra-armv7/ @clamor-s @okias @mschwalm @nokun
device/*/device-odroid-xu4/ @Grimler
device/*/device-oneplus-enchilada/ @calebccff
device/*/device-oneplus-fajita/ @calebccff
device/*/device-postmarketos-trailblazer/ @calebccff
device/*/device-qcom-msm8909/ @wonderfulShrineMaidenOfParadise
device/*/device-qemu-aarch64/ @Minecrell @ollieparanoid
device/*/device-qemu-amd64/ @Minecrell @ollieparanoid
device/*/device-qemu-riscv64/ @Minecrell
device/*/device-qualcomm-sdm845/ @calebccff
device/*/device-raspberry-pi3/ @fossdd
device/*/device-samsung-chagallwifi/ @Grimler
device/*/device-samsung-coreprimevelte/ @legolivesmatter @balejk
device/*/device-samsung-j5y17lte/ @andrisas
device/*/device-samsung-klimtlte/ @Grimler
device/*/device-samsung-lt01/ @knuxify
device/*/device-samsung-m0/ @Newbyte
device/*/device-samsung-manta/ @jenneron @alexmrqt
device/*/device-shift-axolotl/ @amartinz @calebccff @dylanvanassche
device/*/device-solidrun-cubox/ @longnoserob
device/*/firmware-google-sargo/ @flamingradian
device/*/firmware-google-veyron-brcm/ @jenneron
device/*/firmware-motorola-osprey/ @Minecrell
device/*/firmware-odroid-xu4/ @Grimler
device/*/firmware-oneplus-sdm845/ @calebccff
device/*/firmware-powervr-gx6250/ @jenneron
device/*/kobo-epdc-extractor/ @akemnade
device/*/linux-google-nyan/ @jenneron
device/*/linux-google-veyron/ @jenneron
device/*/linux-huawei-plank/ @gtrxAC
device/*/linux-next/ @calebccff
device/*/linux-postmarketos-allwinner/ @Arnavion @PsychoGame
device/*/linux-postmarketos-amlogic/ @funderscore @exkc
device/*/linux-postmarketos-apple/ @JustSoup321
device/*/linux-postmarketos-exynos4/ @Newbyte @Grimler @knuxify
device/*/linux-postmarketos-exynos5/ @jenneron @Grimler
device/*/linux-postmarketos-grate/ @clamor-s @jenneron @jethrob
device/*/linux-postmarketos-imx-ereader/ @akemnade
device/*/linux-postmarketos-marvell/ @longnoserob @exkc
device/*/linux-postmarketos-mediatek-mt8173/ @jenneron @adamthiede
device/*/linux-postmarketos-mediatek-mt8183/ @jenneron @binarycraft
device/*/linux-postmarketos-omap/ @MightyM17 @Sicelo
device/*/linux-postmarketos-qcom-laptop/ @craftyguy @calebccff
device/*/linux-postmarketos-qcom-msm8939/ @Newbyte
device/*/linux-postmarketos-qcom-msm8953/ @M0Rf30 @Ultra-azu @barni2000
device/*/linux-postmarketos-qcom-msm8996/ @Tooniis
device/*/linux-postmarketos-qcom-sc7180/ @jenneron
device/*/linux-postmarketos-rockchip/ @QC8086
device/*/linux-postmarketos-stericsson/ @Newbyte
device/*/linux-samsung-chagallwifi/ @Grimler
device/*/linux-samsung-coreprimevelte/ @legolivesmatter @balejk
device/*/linux-samsung-j5y17lte/ @andrisas
device/*/linux-samsung-klimtlte/ @Grimler
device/*/oem-amd/ @craftyguy
device/*/oem-intel/ @craftyguy
device/*/oem-nvidia/ @craftyguy
device/*/soc-mediatek-mt8183/ @jenneron
device/*/soc-qcom-msm8953/ @barni2000
device/*/soc-qcom-msm8996/ @Tooniis
device/*/soc-qcom-sc7180/ @jenneron
device/*/soc-rockchip-rk3399/ @jenneron
device/*/soc-samsung-exynos4412/ @Newbyte
device/*/u-boot-librem5/ @craftyguy @alistair23 @Newbyte
device/*/u-boot-pinebookpro/ @QC8086
device/*/u-boot-pinephone/ @Arnavion @PsychoGame
device/*/wl1251-cal/ @Danct12
main/postmarketos*gnome*/ @pabloyoyoista @Newbyte @fossdd
main/postmarketos-initramfs/ @calebccff @craftyguy
main/postmarketos-ui-i3wm/ @fossdd
main/postmarketos-ui-phosh/ @pabloyoyoista @Newbyte @fossdd
main/postmarketos-ui-plasma-bigscreen/ @PureTryOut
main/postmarketos-ui-plasma-desktop/ @PureTryOut
main/postmarketos-ui-plasma-mobile/ @PureTryOut
main/shutdown-clear-rtc-wakealarm/ @Arnavion
main/ttyescape/ @calebccff
+13
View File
@@ -42,6 +42,19 @@ commit title can opt to use the following format:
manufacturer-codename: description of change
### Changes to packages inside of the systemd directory
We also shorten the prefixes for packages in `extra-repos/systemd`.
When the `systemd` package itself gets changed, use `systemd: ` as
prefix. For example:
systemd: add triggers for reloading/restarting services
When another package inside the systemd directory gets changed, use
`systemd/$pkgname: ` as prefix. For example:
systemd/cups: restart on upgrade
### Moving devices between categories
As we do not include directory prefixes in device-related commits,
-69
View File
@@ -1,69 +0,0 @@
# Reference: https://postmarketos.org/channels.cfg
[channels.cfg]
recommended=edge
[edge]
description=Rolling release / Most devices / Occasional breakage: https://postmarketos.org/edge
branch_pmaports=master
branch_aports=master
mirrordir_alpine=edge
[v24.12]
description=Latest release / Recommended for best stability
branch_pmaports=v24.12
branch_aports=3.21-stable
mirrordir_alpine=v3.21
[v24.06]
description=Old release (unsupported)
branch_pmaports=v24.06
branch_aports=3.20-stable
mirrordir_alpine=v3.20
[v23.12]
description=Old release (unsupported)
branch_pmaports=v23.12
branch_aports=3.19-stable
mirrordir_alpine=v3.19
[v23.06]
description=Old release (unsupported)
branch_pmaports=v23.06
branch_aports=3.18-stable
mirrordir_alpine=v3.18
[v22.12]
description=Old release (unsupported)
branch_pmaports=v22.12
branch_aports=3.17-stable
mirrordir_alpine=v3.17
[v22.06]
description=Old release (unsupported)
branch_pmaports=v22.06
branch_aports=3.16-stable
mirrordir_alpine=v3.16
[v21.12]
description=Old release (unsupported)
branch_pmaports=v21.12
branch_aports=3.15-stable
mirrordir_alpine=v3.15
[v21.06]
description=Old release (unsupported)
branch_pmaports=v21.06
branch_aports=3.14-stable
mirrordir_alpine=v3.14
[v21.03]
description=Old release (unsupported)
branch_pmaports=v21.03
branch_aports=3.13-stable
mirrordir_alpine=v3.13
[v20.05]
description=Old release (unsupported)
branch_pmaports=v20.05
branch_aports=3.12-stable
mirrordir_alpine=v3.12
-36
View File
@@ -1,36 +0,0 @@
# Automatically generated aport, do not edit!
# Generator: pmbootstrap aportgen busybox-static-aarch64
# Stub for apkbuild-lint
if [ -z "$(type -t arch_to_hostspec)" ]; then
arch_to_hostspec() { :; }
fi
pkgname=busybox-static-aarch64
pkgver=1.37.0
pkgrel=14
_arch="aarch64"
_mirror="http://dl-4.alpinelinux.org/alpine/"
url="http://busybox.net"
license="GPL2"
arch="x86_64"
options="!check !strip"
pkgdesc="Statically linked Busybox for $_arch"
_target="$(arch_to_hostspec $_arch)"
source="
busybox-static-$pkgver-r$pkgrel-$_arch-edge.apk::$_mirror/edge/main/$_arch/busybox-static-$pkgver-r$pkgrel.apk
"
package() {
mkdir -p "$pkgdir/usr/$_target"
cd "$pkgdir/usr/$_target"
tar -xf $srcdir/busybox-static-$pkgver-r$pkgrel-$_arch-edge.apk
rm .PKGINFO .SIGN.*
}
sha512sums="
8f1f521eceb24a5f66e18e022b1151e96b40378051aaed911dc22e68dbffc5998c8f2bac3935423371c7e707f8931e97873c91c39d56dc2e34292567b3caceaf busybox-static-1.37.0-r14-aarch64-edge.apk
"
-36
View File
@@ -1,36 +0,0 @@
# Automatically generated aport, do not edit!
# Generator: pmbootstrap aportgen busybox-static-armhf
# Stub for apkbuild-lint
if [ -z "$(type -t arch_to_hostspec)" ]; then
arch_to_hostspec() { :; }
fi
pkgname=busybox-static-armhf
pkgver=1.37.0
pkgrel=14
_arch="armhf"
_mirror="http://dl-4.alpinelinux.org/alpine/"
url="http://busybox.net"
license="GPL2"
arch="x86_64"
options="!check !strip"
pkgdesc="Statically linked Busybox for $_arch"
_target="$(arch_to_hostspec $_arch)"
source="
busybox-static-$pkgver-r$pkgrel-$_arch-edge.apk::$_mirror/edge/main/$_arch/busybox-static-$pkgver-r$pkgrel.apk
"
package() {
mkdir -p "$pkgdir/usr/$_target"
cd "$pkgdir/usr/$_target"
tar -xf $srcdir/busybox-static-$pkgver-r$pkgrel-$_arch-edge.apk
rm .PKGINFO .SIGN.*
}
sha512sums="
ce7dfd41a149faed98ae5ae08695223b57e8104a47c9c4c0e956a8c7cbd7fbc6b53b247f2c0f0633d72aa0aba8688f6ecfdd9784722b655f3c29dc1a2557f3e1 busybox-static-1.37.0-r14-armhf-edge.apk
"
-36
View File
@@ -1,36 +0,0 @@
# Automatically generated aport, do not edit!
# Generator: pmbootstrap aportgen busybox-static-armv7
# Stub for apkbuild-lint
if [ -z "$(type -t arch_to_hostspec)" ]; then
arch_to_hostspec() { :; }
fi
pkgname=busybox-static-armv7
pkgver=1.37.0
pkgrel=14
_arch="armv7"
_mirror="http://dl-4.alpinelinux.org/alpine/"
url="http://busybox.net"
license="GPL2"
arch="x86_64"
options="!check !strip"
pkgdesc="Statically linked Busybox for $_arch"
_target="$(arch_to_hostspec $_arch)"
source="
busybox-static-$pkgver-r$pkgrel-$_arch-edge.apk::$_mirror/edge/main/$_arch/busybox-static-$pkgver-r$pkgrel.apk
"
package() {
mkdir -p "$pkgdir/usr/$_target"
cd "$pkgdir/usr/$_target"
tar -xf $srcdir/busybox-static-$pkgver-r$pkgrel-$_arch-edge.apk
rm .PKGINFO .SIGN.*
}
sha512sums="
2f7003d0de894299a0260efd97bddfabd8d14d0e4b624445a77367036ad33c7ad65a85ee758969e671599ded5ee5674bda755c570ca4d9e95bba9c02b5788b8f busybox-static-1.37.0-r14-armv7-edge.apk
"
@@ -0,0 +1,82 @@
From 4d0a333ef13e2da140cd44c4941b20f48a80dc0f Mon Sep 17 00:00:00 2001
From: Hannes Braun <hannes@hannesbraun.net>
Date: Thu, 20 Feb 2025 15:09:41 +0100
Subject: [PATCH] arm: Fix signedness of vld1q intrinsic parms [PR118942]
vld1q_s8_x3, vld1q_s16_x3, vld1q_s8_x4 and vld1q_s16_x4 were expecting
pointers to unsigned integers. These parameters should be pointers to
signed integers.
gcc/ChangeLog:
PR target/118942
* config/arm/arm_neon.h (vld1q_s8_x3): Use int8_t instead of
uint16_t.
(vld1q_s16_x3): Use int16_t instead of uint16_t.
(vld1q_s8_x4): Likewise.
(vld1q_s16_x4): Likewise.
gcc/testsuite/ChangeLog:
PR target/118942
* gcc.target/arm/simd/vld1q_base_xN_1.c: Add -Wpointer-sign.
Signed-off-by: Hannes Braun <hannes@hannesbraun.net>
---
gcc/config/arm/arm_neon.h | 8 ++++----
gcc/testsuite/gcc.target/arm/simd/vld1q_base_xN_1.c | 2 +-
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/gcc/config/arm/arm_neon.h b/gcc/config/arm/arm_neon.h
index 5b1c55c8d9f..578ada88fa6 100644
--- a/gcc/config/arm/arm_neon.h
+++ b/gcc/config/arm/arm_neon.h
@@ -10854,7 +10854,7 @@ vld1q_s64_x2 (const int64_t * __a)
__extension__ extern __inline int8x16x3_t
__attribute__ ((__always_inline__, __gnu_inline__, __artificial__))
-vld1q_s8_x3 (const uint8_t * __a)
+vld1q_s8_x3 (const int8_t * __a)
{
union { int8x16x3_t __i; __builtin_neon_ci __o; } __rv;
__rv.__o = __builtin_neon_vld1q_x3v16qi ((const __builtin_neon_qi *) __a);
@@ -10863,7 +10863,7 @@ vld1q_s8_x3 (const uint8_t * __a)
__extension__ extern __inline int16x8x3_t
__attribute__ ((__always_inline__, __gnu_inline__, __artificial__))
-vld1q_s16_x3 (const uint16_t * __a)
+vld1q_s16_x3 (const int16_t * __a)
{
union { int16x8x3_t __i; __builtin_neon_ci __o; } __rv;
__rv.__o = __builtin_neon_vld1q_x3v8hi ((const __builtin_neon_hi *) __a);
@@ -10890,7 +10890,7 @@ vld1q_s64_x3 (const int64_t * __a)
__extension__ extern __inline int8x16x4_t
__attribute__ ((__always_inline__, __gnu_inline__, __artificial__))
-vld1q_s8_x4 (const uint8_t * __a)
+vld1q_s8_x4 (const int8_t * __a)
{
union { int8x16x4_t __i; __builtin_neon_xi __o; } __rv;
__rv.__o = __builtin_neon_vld1q_x4v16qi ((const __builtin_neon_qi *) __a);
@@ -10899,7 +10899,7 @@ vld1q_s8_x4 (const uint8_t * __a)
__extension__ extern __inline int16x8x4_t
__attribute__ ((__always_inline__, __gnu_inline__, __artificial__))
-vld1q_s16_x4 (const uint16_t * __a)
+vld1q_s16_x4 (const int16_t * __a)
{
union { int16x8x4_t __i; __builtin_neon_xi __o; } __rv;
__rv.__o = __builtin_neon_vld1q_x4v8hi ((const __builtin_neon_hi *) __a);
diff --git a/gcc/testsuite/gcc.target/arm/simd/vld1q_base_xN_1.c b/gcc/testsuite/gcc.target/arm/simd/vld1q_base_xN_1.c
index 01b29b60084..c73afe2b723 100644
--- a/gcc/testsuite/gcc.target/arm/simd/vld1q_base_xN_1.c
+++ b/gcc/testsuite/gcc.target/arm/simd/vld1q_base_xN_1.c
@@ -1,6 +1,6 @@
/* { dg-do assemble } */
/* { dg-require-effective-target arm_neon_ok } */
-/* { dg-options "-save-temps -O2" } */
+/* { dg-options "-save-temps -O2 -Wpointer-sign" } */
/* { dg-add-options arm_neon } */
#include "arm_neon.h"
--
2.48.1
+5 -2
View File
@@ -34,7 +34,7 @@ _pkgsnap="${pkgver##*_git}"
[ "$CHOST" != "$CTARGET" ] && _target="-$CTARGET_ARCH" || _target=""
pkgname=gcc-aarch64
pkgrel=5
pkgrel=6
pkgdesc="Stage2 cross-compiler for aarch64"
url="https://gcc.gnu.org"
arch="x86_64"
@@ -229,7 +229,6 @@ fi
if $LANG_JIT; then
subpackages="$subpackages libgccjit:jit libgccjit-dev:jitdev"
fi
makedepends="$makedepends_build $makedepends_host"
# when using upstream releases, use this URI template
# https://gcc.gnu.org/pub/gcc/releases/gcc-$_pkgbase/gcc-$_pkgbase.tar.xz
@@ -279,6 +278,7 @@ source="https://gcc.gnu.org/pub/gcc/releases/gcc-$_pkgbase/gcc-$_pkgbase.tar.xz
0034-libgo-fix-lfs64-use.patch
0035-loongarch-disable-multilib-support.patch
0036-libphobos-add-riscv64-and-loongarch64-support.patch
0037-arm-fix-signedness-of-vld1q-intrinsic-parms.patch
fix-arm64.patch
ppc64le-quadmath.patch
riscv64-improve-build-time.patch
@@ -487,6 +487,8 @@ package() {
# libcc1 does not depend on target, don't ship it
rm -rf "$pkgdir"/usr/lib/libcc1.so*
# These are moved into packages with arch=$CTARGET_ARCH so remove
# cross prefix (doesn't exist when BOOTSTRAP=nolibc)
# fixup gcc library symlinks to be linker scripts so
# linker finds the libs from relocated sysroot
@@ -782,6 +784,7 @@ c474f34e6f9a4239d486a65141a133dbe8ce91427d502a57a9fd6eb403478a2b5715ba74f24c1cc0
c4482ffc36e7894b2140800159f4cbc9a3e9011e43a69b69f4fa92d5a11e2ee645c7e21df4423dd1e0636e8890849a5719647bfbdf84f951d638f8f488cb718c 0034-libgo-fix-lfs64-use.patch
65df1d489e8d07a811f39e27fd29e3b2b4164fbc2c5fdc16a5142886d94a96e3fb28ccf4f20dd297ba6540ef8ea1ac3eb65a4279494639bf2f0f8376a3896cc3 0035-loongarch-disable-multilib-support.patch
06f64544fd8bc4b6c8b06410c5198aa8fb4e82c232afc0cad83b2c69ac5d39399968206defa78297222700cd18e7fd7e8244afa76d343406a01f657c86306453 0036-libphobos-add-riscv64-and-loongarch64-support.patch
a30148fb2cfa9a5800df4aed73f6b1b3b5d5817d768835a2574216f5818e6d6070199bacfe964f0d15b70eab7e2310c40b55e354f65360efce90e15d40287639 0037-arm-fix-signedness-of-vld1q-intrinsic-parms.patch
00319c9770362520e8e93bd03fda1769dfa3622eba77d620e11d8af45a38e6d804a5e924046ae388e1cfaea605696e89c343fca507aaaa5edd58d80744fff14f fix-arm64.patch
815265826742400f86336f0c2d3e4edc37398dbc6505ee81107c0103c13ac0f406cff851438d2323033c6c6d0c0323765ee15b975eab8d1dd465f9e988168fb9 ppc64le-quadmath.patch
ea55e0fa6813fc95c4ca2e87f059182edc54dc61515ebb92bf6eb31dbbd176d0fe81edcc7ea28d32f84ca37e8d48a544623d3d9bc94aa41ffc0859326a616aa2 riscv64-improve-build-time.patch
-42
View File
@@ -1,42 +0,0 @@
From 47b4bd4deb2c356bb07d2a96f22127aefafec3a4 Mon Sep 17 00:00:00 2001
From: Szabolcs Nagy <nsz@port70.net>
Date: Fri, 26 Jan 2018 20:32:50 +0000
Subject: [PATCH 01/35] posix_memalign
---
gcc/config/i386/pmm_malloc.h | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/gcc/config/i386/pmm_malloc.h b/gcc/config/i386/pmm_malloc.h
index 3527283693b..c4071b64b53 100644
--- a/gcc/config/i386/pmm_malloc.h
+++ b/gcc/config/i386/pmm_malloc.h
@@ -27,12 +27,13 @@
#include <stdlib.h>
/* We can't depend on <stdlib.h> since the prototype of posix_memalign
- may not be visible. */
+ may not be visible and we can't pollute the namespace either. */
#ifndef __cplusplus
-extern int posix_memalign (void **, size_t, size_t);
+extern int _mm_posix_memalign (void **, size_t, size_t)
#else
-extern "C" int posix_memalign (void **, size_t, size_t) throw ();
+extern "C" int _mm_posix_memalign (void **, size_t, size_t) throw ()
#endif
+__asm__("posix_memalign");
static __inline void *
_mm_malloc (size_t __size, size_t __alignment)
@@ -42,7 +43,7 @@ _mm_malloc (size_t __size, size_t __alignment)
return malloc (__size);
if (__alignment == 2 || (sizeof (void *) == 8 && __alignment == 4))
__alignment = sizeof (void *);
- if (posix_memalign (&__ptr, __alignment, __size) == 0)
+ if (_mm_posix_memalign (&__ptr, __alignment, __size) == 0)
return __ptr;
else
return NULL;
--
2.41.0
@@ -1,203 +0,0 @@
From 4fa620d8c3e6730211bfb071eb4c817320491bd0 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Fri, 29 Mar 2013 08:59:00 +0400
Subject: [PATCH 02/35] gcc: poison-system-directories
Add /sw/include and /opt/include based on the original
zecke-no-host-includes.patch patch. The original patch checked for
/usr/include, /sw/include and /opt/include and then triggered a failure and
aborted.
Instead, we add the two missing items to the current scan. If the user
wants this to be a failure, they can add "-Werror=poison-system-directories".
Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Upstream-Status: Pending
---
gcc/common.opt | 4 ++++
gcc/config.in | 6 ++++++
gcc/configure | 16 ++++++++++++++++
gcc/configure.ac | 10 ++++++++++
gcc/doc/invoke.texi | 9 +++++++++
gcc/gcc.cc | 2 ++
gcc/incpath.cc | 21 +++++++++++++++++++++
7 files changed, 68 insertions(+)
diff --git a/gcc/common.opt b/gcc/common.opt
index 862c474d3c8..64c4277c991 100644
--- a/gcc/common.opt
+++ b/gcc/common.opt
@@ -711,6 +711,10 @@ Wreturn-local-addr
Common Var(warn_return_local_addr) Init(1) Warning
Warn about returning a pointer/reference to a local or temporary variable.
+Wpoison-system-directories
+Common Var(flag_poison_system_directories) Init(1) Warning
+Warn for -I and -L options using system directories if cross compiling
+
Wshadow
Common Var(warn_shadow) Warning
Warn when one variable shadows another. Same as -Wshadow=global.
diff --git a/gcc/config.in b/gcc/config.in
index 4cad077bfbe..0679fbbf4c6 100644
--- a/gcc/config.in
+++ b/gcc/config.in
@@ -236,6 +236,12 @@
#endif
+/* Define to warn for use of native system header directories */
+#ifndef USED_FOR_TARGET
+#undef ENABLE_POISON_SYSTEM_DIRECTORIES
+#endif
+
+
/* Define if you want all operations on RTL (the basic data structure of the
optimizer and back end) to be checked for dynamic type safety at runtime.
This is quite expensive. */
diff --git a/gcc/configure b/gcc/configure
index c7b26d1927d..8c46369f73f 100755
--- a/gcc/configure
+++ b/gcc/configure
@@ -1026,6 +1026,7 @@ enable_maintainer_mode
enable_link_mutex
enable_link_serialization
enable_version_specific_runtime_libs
+enable_poison_system_directories
enable_plugin
enable_host_shared
enable_libquadmath_support
@@ -1788,6 +1789,8 @@ Optional Features:
--enable-version-specific-runtime-libs
specify that runtime libraries should be installed
in a compiler-specific directory
+ --enable-poison-system-directories
+ warn for use of native system header directories
--enable-plugin enable plugin support
--enable-host-shared build host code as shared libraries
--disable-libquadmath-support
@@ -31753,6 +31756,19 @@ if test "${enable_version_specific_runtime_libs+set}" = set; then :
fi
+# Check whether --enable-poison-system-directories was given.
+if test "${enable_poison_system_directories+set}" = set; then :
+ enableval=$enable_poison_system_directories;
+else
+ enable_poison_system_directories=no
+fi
+
+if test "x${enable_poison_system_directories}" = "xyes"; then
+
+$as_echo "#define ENABLE_POISON_SYSTEM_DIRECTORIES 1" >>confdefs.h
+
+fi
+
# Substitute configuration variables
diff --git a/gcc/configure.ac b/gcc/configure.ac
index 09082e8ccae..5504bf6eb01 100644
--- a/gcc/configure.ac
+++ b/gcc/configure.ac
@@ -7292,6 +7292,16 @@ AC_ARG_ENABLE(version-specific-runtime-libs,
[specify that runtime libraries should be
installed in a compiler-specific directory])])
+AC_ARG_ENABLE([poison-system-directories],
+ AS_HELP_STRING([--enable-poison-system-directories],
+ [warn for use of native system header directories]),,
+ [enable_poison_system_directories=no])
+if test "x${enable_poison_system_directories}" = "xyes"; then
+ AC_DEFINE([ENABLE_POISON_SYSTEM_DIRECTORIES],
+ [1],
+ [Define to warn for use of native system header directories])
+fi
+
# Substitute configuration variables
AC_SUBST(subdirs)
AC_SUBST(srcdir)
diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
index af0e5933fdb..b6731a4673c 100644
--- a/gcc/doc/invoke.texi
+++ b/gcc/doc/invoke.texi
@@ -384,6 +384,7 @@ Objective-C and Objective-C++ Dialects}.
-Wpacked -Wno-packed-bitfield-compat -Wpacked-not-aligned -Wpadded
-Wparentheses -Wno-pedantic-ms-format
-Wpointer-arith -Wno-pointer-compare -Wno-pointer-to-int-cast
+-Wno-poison-system-directories
-Wno-pragmas -Wno-prio-ctor-dtor -Wredundant-decls
-Wrestrict -Wno-return-local-addr -Wreturn-type
-Wno-scalar-storage-order -Wsequence-point
@@ -8426,6 +8427,14 @@ made up of data only and thus requires no special treatment. But, for
most targets, it is made up of code and thus requires the stack to be
made executable in order for the program to work properly.
+@opindex Wno-poison-system-directories
+@item -Wno-poison-system-directories
+Do not warn for @option{-I} or @option{-L} options using system
+directories such as @file{/usr/include} when cross compiling. This
+option is intended for use in chroot environments when such
+directories contain the correct headers and libraries for the target
+system rather than the host.
+
@opindex Wfloat-equal
@opindex Wno-float-equal
@item -Wfloat-equal
diff --git a/gcc/gcc.cc b/gcc/gcc.cc
index 16bb07f2cdc..33b56e721d2 100644
--- a/gcc/gcc.cc
+++ b/gcc/gcc.cc
@@ -1177,6 +1187,8 @@ proper position among the other output files. */
"-z now " \
"%X %{o*} %{e*} %{N} %{n} %{r}\
%{s} %{t} %{u*} %{z} %{Z} %{!nostdlib:%{!r:%{!nostartfiles:%S}}} \
+ %{Wno-poison-system-directories:--no-poison-system-directories} \
+ %{Werror=poison-system-directories:--error-poison-system-directories} \
%{static|no-pie|static-pie:} %@{L*} %(link_libgcc) " \
VTABLE_VERIFICATION_SPEC " " SANITIZER_EARLY_SPEC " %o "" \
%{fopenacc|fopenmp|%:gt(%{ftree-parallelize-loops=*:%*} 1):\
diff --git a/gcc/incpath.cc b/gcc/incpath.cc
index 4d44321183f..0f3f071b44c 100644
--- a/gcc/incpath.cc
+++ b/gcc/incpath.cc
@@ -26,6 +26,7 @@
#include "intl.h"
#include "incpath.h"
#include "cppdefault.h"
+#include "diagnostic-core.h"
/* Microsoft Windows does not natively support inodes.
VMS has non-numeric inodes. */
@@ -399,6 +400,26 @@ merge_include_chains (const char *sysroot, cpp_reader *pfile, int verbose)
}
fprintf (stderr, _("End of search list.\n"));
}
+
+#ifdef ENABLE_POISON_SYSTEM_DIRECTORIES
+ if (flag_poison_system_directories)
+ {
+ struct cpp_dir *p;
+
+ for (p = heads[INC_QUOTE]; p; p = p->next)
+ {
+ if ((!strncmp (p->name, "/usr/include", 12))
+ || (!strncmp (p->name, "/usr/local/include", 18))
+ || (!strncmp (p->name, "/usr/X11R6/include", 18))
+ || (!strncmp (p->name, "/sw/include", 11))
+ || (!strncmp (p->name, "/opt/include", 12)))
+ warning (OPT_Wpoison_system_directories,
+ "include location \"%s\" is unsafe for "
+ "cross-compilation",
+ p->name);
+ }
+ }
+#endif
}
/* Use given -I paths for #include "..." but not #include <...>, and
--
2.41.0
@@ -1,44 +0,0 @@
From ff4dd4ce33133e675b7bedc86b73357c04631cb9 Mon Sep 17 00:00:00 2001
From: Ariadne Conill <ariadne@dereferenced.org>
Date: Fri, 21 Aug 2020 06:45:49 +0000
Subject: [PATCH 03/35] specs: turn on -Wl,-z,now by default
Previously, we also used to turn on -z relro here, but we now build
binutils with --enable-relro, which is functionally equivalent.
Binutils does not appear to have a similar option for enabling -z
now by default.
---
gcc/doc/invoke.texi | 3 +++
gcc/gcc.cc | 1 +
2 files changed, 4 insertions(+)
diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
index b6731a4673c..f393c7846c6 100644
--- a/gcc/doc/invoke.texi
+++ b/gcc/doc/invoke.texi
@@ -17961,6 +17961,9 @@ For example, @option{-Wl,-Map,output.map} passes @option{-Map output.map} to the
linker. When using the GNU linker, you can also get the same effect with
@option{-Wl,-Map=output.map}.
+NOTE: In Alpine Linux, for LDFLAGS, the option
+@option{-Wl,-z,now} is used. To disable, use @option{-Wl,-z,nonow}.
+
@opindex u
@item -u @var{symbol}
Pretend the symbol @var{symbol} is undefined, to force linking of
diff --git a/gcc/gcc.cc b/gcc/gcc.cc
index 33b56e721d2..f82fae23c22 100644
--- a/gcc/gcc.cc
+++ b/gcc/gcc.cc
@@ -1144,6 +1144,7 @@ proper position among the other output files. */
"%{flto|flto=*:%<fcompare-debug*} \
%{flto} %{fno-lto} %{flto=*} %l " LINK_PIE_SPEC \
"%{fuse-ld=*:-fuse-ld=%*} " LINK_COMPRESS_DEBUG_SPEC \
+ "-z now " \
"%X %{o*} %{e*} %{N} %{n} %{r}\
%{s} %{t} %{u*} %{z} %{Z} %{!nostdlib:%{!r:%{!nostartfiles:%S}}} \
%{Wno-poison-system-directories:--no-poison-system-directories} \
--
2.41.0
@@ -1,46 +0,0 @@
From 1b315235433701e4a974da259b8d651169ddc7ac Mon Sep 17 00:00:00 2001
From: Ariadne Conill <ariadne@dereferenced.org>
Date: Fri, 21 Aug 2020 06:46:22 +0000
Subject: [PATCH 04/35] Turn on -D_FORTIFY_SOURCE=2 by default for C, C++,
ObjC, ObjC++, if the optimization level is > 0
---
gcc/c-family/c-cppbuiltin.cc | 4 ++++
gcc/doc/invoke.texi | 6 ++++++
2 files changed, 10 insertions(+)
diff --git a/gcc/c-family/c-cppbuiltin.cc b/gcc/c-family/c-cppbuiltin.cc
index 5d64625fcd7..868d69506e4 100644
--- a/gcc/c-family/c-cppbuiltin.cc
+++ b/gcc/c-family/c-cppbuiltin.cc
@@ -1546,6 +1546,10 @@ c_cpp_builtins (cpp_reader *pfile)
builtin_define_with_value ("__REGISTER_PREFIX__", REGISTER_PREFIX, 0);
builtin_define_with_value ("__USER_LABEL_PREFIX__", user_label_prefix, 0);
+ /* Fortify Source enabled by default for optimization levels > 0 */
+ if (optimize)
+ builtin_define_with_int_value ("_FORTIFY_SOURCE", 2);
+
/* Misc. */
if (flag_gnu89_inline)
cpp_define (pfile, "__GNUC_GNU_INLINE__");
diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
index f393c7846c6..ef3c14a189e 100644
--- a/gcc/doc/invoke.texi
+++ b/gcc/doc/invoke.texi
@@ -11868,6 +11868,12 @@ also turns on the following optimization flags:
Please note the warning under @option{-fgcse} about
invoking @option{-O2} on programs that use computed gotos.
+NOTE: In Alpine Linux, @option{-D_FORTIFY_SOURCE=2} is
+set by default, and is activated when @option{-O} is set to 2 or higher.
+This enables additional compile-time and run-time checks for several libc
+functions. To disable, specify either @option{-U_FORTIFY_SOURCE} or
+@option{-D_FORTIFY_SOURCE=0}.
+
@opindex O3
@item -O3
Optimize yet more. @option{-O3} turns on all optimizations specified
--
2.41.0
@@ -1,272 +0,0 @@
From 67c0f5789630b27149f60ff831999ef7c1dba5d5 Mon Sep 17 00:00:00 2001
From: Ariadne Conill <ariadne@dereferenced.org>
Date: Fri, 21 Aug 2020 06:46:56 +0000
Subject: [PATCH 05/35] On linux targets pass --as-needed by default to the
linker, but always link the sanitizer libraries with --no-as-needed.
---
gcc/config/aarch64/aarch64-linux.h | 1 +
gcc/config/alpha/linux-elf.h | 2 +-
gcc/config/arm/linux-elf.h | 1 +
gcc/config/gnu-user.h | 6 +++---
gcc/config/i386/gnu-user.h | 2 +-
gcc/config/i386/gnu-user64.h | 1 +
gcc/config/ia64/linux.h | 2 +-
gcc/config/mips/gnu-user.h | 1 +
gcc/config/riscv/linux.h | 1 +
gcc/config/rs6000/linux64.h | 4 ++--
gcc/config/rs6000/sysv4.h | 2 +-
gcc/config/s390/linux.h | 2 +-
gcc/config/sparc/linux.h | 2 +-
gcc/gcc.cc | 28 ++++++++++++++++++++--------
14 files changed, 36 insertions(+), 19 deletions(-)
diff --git a/gcc/config/aarch64/aarch64-linux.h b/gcc/config/aarch64/aarch64-linux.h
index 4277f03da2a..b131983a546 100644
--- a/gcc/config/aarch64/aarch64-linux.h
+++ b/gcc/config/aarch64/aarch64-linux.h
@@ -35,6 +35,7 @@
#define CPP_SPEC "%{pthread:-D_REENTRANT}"
#define LINUX_TARGET_LINK_SPEC "%{h*} \
+ --as-needed \
%{static:-Bstatic} \
%{shared:-shared} \
%{symbolic:-Bsymbolic} \
diff --git a/gcc/config/alpha/linux-elf.h b/gcc/config/alpha/linux-elf.h
index 03f783f2ad1..d946e700dda 100644
--- a/gcc/config/alpha/linux-elf.h
+++ b/gcc/config/alpha/linux-elf.h
@@ -37,7 +37,7 @@ along with GCC; see the file COPYING3. If not see
#define ELF_DYNAMIC_LINKER GNU_USER_DYNAMIC_LINKER
-#define LINK_SPEC "-m elf64alpha %{G*} %{relax:-relax} \
+#define LINK_SPEC "-m elf64alpha --as-needed %{G*} %{relax:-relax} \
%{O*:-O3} %{!O*:-O1} \
%{shared:-shared} \
%{!shared: \
diff --git a/gcc/config/arm/linux-elf.h b/gcc/config/arm/linux-elf.h
index 7b7b7cbbe14..49c050c6f2c 100644
--- a/gcc/config/arm/linux-elf.h
+++ b/gcc/config/arm/linux-elf.h
@@ -70,6 +70,7 @@
%{rdynamic:-export-dynamic} \
%{!shared:-dynamic-linker " GNU_USER_DYNAMIC_LINKER "}} \
-X \
+ --as-needed \
%{mbig-endian:-EB} %{mlittle-endian:-EL}" \
SUBTARGET_EXTRA_LINK_SPEC
diff --git a/gcc/config/gnu-user.h b/gcc/config/gnu-user.h
index eda8010b133..b26b17f2f2a 100644
--- a/gcc/config/gnu-user.h
+++ b/gcc/config/gnu-user.h
@@ -136,7 +136,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
#define LIBASAN_EARLY_SPEC "%{!shared:libasan_preinit%O%s} " \
"%{static-libasan:%{!shared:" \
LD_STATIC_OPTION " --whole-archive -lasan --no-whole-archive " \
- LD_DYNAMIC_OPTION "}}%{!static-libasan:-lasan}"
+ LD_DYNAMIC_OPTION "}}%{!static-libasan:%{!fuse-ld=gold:--push-state} --no-as-needed -lasan %{fuse-ld=gold:--as-needed;:--pop-state}}"
#undef LIBHWASAN_EARLY_SPEC
#define LIBHWASAN_EARLY_SPEC "%{!shared:libhwasan_preinit%O%s} " \
"%{static-libhwasan:%{!shared:" \
@@ -146,12 +146,12 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
#define LIBTSAN_EARLY_SPEC "%{!shared:libtsan_preinit%O%s} " \
"%{static-libtsan:%{!shared:" \
LD_STATIC_OPTION " --whole-archive -ltsan --no-whole-archive " \
- LD_DYNAMIC_OPTION "}}%{!static-libtsan:-ltsan}"
+ LD_DYNAMIC_OPTION "}}%{!static-libtsan:%{!fuse-ld=gold:--push-state} --no-as-needed -ltsan %{fuse-ld=gold:--as-needed;:--pop-state}}"
#undef LIBLSAN_EARLY_SPEC
#define LIBLSAN_EARLY_SPEC "%{!shared:liblsan_preinit%O%s} " \
"%{static-liblsan:%{!shared:" \
LD_STATIC_OPTION " --whole-archive -llsan --no-whole-archive " \
- LD_DYNAMIC_OPTION "}}%{!static-liblsan:-llsan}"
+ LD_DYNAMIC_OPTION "}}%{!static-liblsan:%{!fuse-ld=gold:--push-state} --no-as-needed -llsan %{fuse-ld=gold:--as-needed;:--pop-state}}"
#endif
#undef TARGET_F951_OPTIONS
diff --git a/gcc/config/i386/gnu-user.h b/gcc/config/i386/gnu-user.h
index a79b739089d..e0752673dff 100644
--- a/gcc/config/i386/gnu-user.h
+++ b/gcc/config/i386/gnu-user.h
@@ -68,7 +68,7 @@ along with GCC; see the file COPYING3. If not see
{ "link_emulation", GNU_USER_LINK_EMULATION },\
{ "dynamic_linker", GNU_USER_DYNAMIC_LINKER }
-#define GNU_USER_TARGET_LINK_SPEC "-m %(link_emulation) %{shared:-shared} \
+#define GNU_USER_TARGET_LINK_SPEC "-m %(link_emulation) --as-needed %{shared:-shared} \
%{!shared: \
%{!static: \
%{!static-pie: \
diff --git a/gcc/config/i386/gnu-user64.h b/gcc/config/i386/gnu-user64.h
index 3b63b99acf6..759bf0db86f 100644
--- a/gcc/config/i386/gnu-user64.h
+++ b/gcc/config/i386/gnu-user64.h
@@ -56,6 +56,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
"%{" SPEC_64 ":-m " GNU_USER_LINK_EMULATION64 "} \
%{" SPEC_32 ":-m " GNU_USER_LINK_EMULATION32 "} \
%{" SPEC_X32 ":-m " GNU_USER_LINK_EMULATIONX32 "} \
+ --as-needed \
%{shared:-shared} \
%{!shared: \
%{!static: \
diff --git a/gcc/config/ia64/linux.h b/gcc/config/ia64/linux.h
index 5dfd428aa17..02656dad7fc 100644
--- a/gcc/config/ia64/linux.h
+++ b/gcc/config/ia64/linux.h
@@ -58,7 +58,7 @@ do { \
#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux-ia64.so.2"
#undef LINK_SPEC
-#define LINK_SPEC "\
+#define LINK_SPEC " --as-needed \
%{shared:-shared} \
%{!shared: \
%{!static: \
diff --git a/gcc/config/mips/gnu-user.h b/gcc/config/mips/gnu-user.h
index a4e5380b589..3cc61bce69f 100644
--- a/gcc/config/mips/gnu-user.h
+++ b/gcc/config/mips/gnu-user.h
@@ -55,6 +55,7 @@ along with GCC; see the file COPYING3. If not see
#undef GNU_USER_TARGET_LINK_SPEC
#define GNU_USER_TARGET_LINK_SPEC "\
%{G*} %{EB} %{EL} %{mips*} %{shared} \
+ -as-needed \
%{!shared: \
%{!static: \
%{rdynamic:-export-dynamic} \
diff --git a/gcc/config/riscv/linux.h b/gcc/config/riscv/linux.h
index 3e625e0f867..f8c2c351e5a 100644
--- a/gcc/config/riscv/linux.h
+++ b/gcc/config/riscv/linux.h
@@ -48,6 +48,7 @@ along with GCC; see the file COPYING3. If not see
"%{mabi=ilp32:_ilp32}"
#define LINK_SPEC "\
+-as-needed \
-melf" XLEN_SPEC DEFAULT_ENDIAN_SPEC "riscv" LD_EMUL_SUFFIX " \
%{mno-relax:--no-relax} \
%{mbig-endian:-EB} \
diff --git a/gcc/config/rs6000/linux64.h b/gcc/config/rs6000/linux64.h
index 9e457033d11..08016bf224d 100644
--- a/gcc/config/rs6000/linux64.h
+++ b/gcc/config/rs6000/linux64.h
@@ -377,13 +377,13 @@ extern int dot_symbols;
" -m elf64ppc")
#endif
-#define LINK_OS_LINUX_SPEC32 LINK_OS_LINUX_EMUL32 " %{!shared: %{!static: \
+#define LINK_OS_LINUX_SPEC32 LINK_OS_LINUX_EMUL32 " --as-needed %{!shared: %{!static: \
%{!static-pie: \
%{rdynamic:-export-dynamic} \
-dynamic-linker " GNU_USER_DYNAMIC_LINKER32 "}}} \
%(link_os_extra_spec32)"
-#define LINK_OS_LINUX_SPEC64 LINK_OS_LINUX_EMUL64 " %{!shared: %{!static: \
+#define LINK_OS_LINUX_SPEC64 LINK_OS_LINUX_EMUL64 " --as-needed %{!shared: %{!static: \
%{!static-pie: \
%{rdynamic:-export-dynamic} \
-dynamic-linker " GNU_USER_DYNAMIC_LINKER64 "}}} \
diff --git a/gcc/config/rs6000/sysv4.h b/gcc/config/rs6000/sysv4.h
index ae932fc22f0..c8ff0c6dc8e 100644
--- a/gcc/config/rs6000/sysv4.h
+++ b/gcc/config/rs6000/sysv4.h
@@ -780,7 +780,7 @@ GNU_USER_TARGET_CC1_SPEC
#define GNU_USER_DYNAMIC_LINKER GLIBC_DYNAMIC_LINKER
#endif
-#define LINK_OS_LINUX_SPEC "-m elf32ppclinux %{!shared: %{!static: \
+#define LINK_OS_LINUX_SPEC "-m elf32ppclinux --as-needed %{!shared: %{!static: \
%{rdynamic:-export-dynamic} \
-dynamic-linker " GNU_USER_DYNAMIC_LINKER "}}"
diff --git a/gcc/config/s390/linux.h b/gcc/config/s390/linux.h
index 02aa1edaff8..64df5801134 100644
--- a/gcc/config/s390/linux.h
+++ b/gcc/config/s390/linux.h
@@ -82,7 +82,7 @@ along with GCC; see the file COPYING3. If not see
#undef LINK_SPEC
#define LINK_SPEC \
- "%{m31:-m elf_s390}%{m64:-m elf64_s390} \
+ "%{m31:-m elf_s390}%{m64:-m elf64_s390} --as-needed \
%{shared:-shared} \
%{!shared: \
%{static:-static} \
diff --git a/gcc/config/sparc/linux.h b/gcc/config/sparc/linux.h
index 0e33b3cac2c..c2f44546e62 100644
--- a/gcc/config/sparc/linux.h
+++ b/gcc/config/sparc/linux.h
@@ -81,7 +81,7 @@ extern const char *host_detect_local_cpu (int argc, const char **argv);
#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2"
#undef LINK_SPEC
-#define LINK_SPEC "-m elf32_sparc %{shared:-shared} \
+#define LINK_SPEC "-m elf32_sparc --as-needed %{shared:-shared} \
%{!mno-relax:%{!r:-relax}} \
%{!shared: \
%{!static: \
diff --git a/gcc/gcc.cc b/gcc/gcc.cc
index f82fae23c22..da6417dd0d1 100644
--- a/gcc/gcc.cc
+++ b/gcc/gcc.cc
@@ -754,8 +754,11 @@ proper position among the other output files. */
#ifdef LIBASAN_EARLY_SPEC
#define LIBASAN_SPEC STATIC_LIBASAN_LIBS
#elif defined(HAVE_LD_STATIC_DYNAMIC)
-#define LIBASAN_SPEC "%{static-libasan:" LD_STATIC_OPTION \
- "} -lasan %{static-libasan:" LD_DYNAMIC_OPTION "}" \
+#define LIBASAN_SPEC "%{static-libasan:" LD_STATIC_OPTION "}" \
+ " %{!static-libasan:%{!fuse-ld=gold:--push-state }--no-as-needed}" \
+ " -lasan " \
+ " %{static-libasan:" LD_DYNAMIC_OPTION "}" \
+ " %{!static-libasan:%{fuse-ld=gold:--as-needed;:--pop-state}}" \
STATIC_LIBASAN_LIBS
#else
#define LIBASAN_SPEC "-lasan" STATIC_LIBASAN_LIBS
@@ -790,8 +793,11 @@ proper position among the other output files. */
#ifdef LIBTSAN_EARLY_SPEC
#define LIBTSAN_SPEC STATIC_LIBTSAN_LIBS
#elif defined(HAVE_LD_STATIC_DYNAMIC)
-#define LIBTSAN_SPEC "%{static-libtsan:" LD_STATIC_OPTION \
- "} -ltsan %{static-libtsan:" LD_DYNAMIC_OPTION "}" \
+#define LIBTSAN_SPEC "%{static-libtsan:" LD_STATIC_OPTION "}" \
+ " %{!static-libtsan:%{!fuse-ld=gold:--push-state }--no-as-needed}" \
+ " -ltsan " \
+ " %{static-libtsan:" LD_DYNAMIC_OPTION "}" \
+ " %{!static-libtsan:%{fuse-ld=gold:--as-needed;:--pop-state}}" \
STATIC_LIBTSAN_LIBS
#else
#define LIBTSAN_SPEC "-ltsan" STATIC_LIBTSAN_LIBS
@@ -808,8 +814,11 @@ proper position among the other output files. */
#ifdef LIBLSAN_EARLY_SPEC
#define LIBLSAN_SPEC STATIC_LIBLSAN_LIBS
#elif defined(HAVE_LD_STATIC_DYNAMIC)
-#define LIBLSAN_SPEC "%{static-liblsan:" LD_STATIC_OPTION \
- "} -llsan %{static-liblsan:" LD_DYNAMIC_OPTION "}" \
+#define LIBLSAN_SPEC "%{static-liblsan:" LD_STATIC_OPTION "}" \
+ " %{!static-liblsan:%{!fuse-ld=gold:--push-state }--no-as-needed}" \
+ " -llsan " \
+ " %{static-liblsan:" LD_DYNAMIC_OPTION "}" \
+ " %{!static-liblsan:%{fuse-ld=gold:--as-needed;:--pop-state}}" \
STATIC_LIBLSAN_LIBS
#else
#define LIBLSAN_SPEC "-llsan" STATIC_LIBLSAN_LIBS
@@ -824,8 +833,11 @@ proper position among the other output files. */
#define STATIC_LIBUBSAN_LIBS \
" %{static-libubsan|static:%:include(libsanitizer.spec)%(link_libubsan)}"
#ifdef HAVE_LD_STATIC_DYNAMIC
-#define LIBUBSAN_SPEC "%{static-libubsan:" LD_STATIC_OPTION \
- "} -lubsan %{static-libubsan:" LD_DYNAMIC_OPTION "}" \
+#define LIBUBSAN_SPEC "%{static-libubsan:" LD_STATIC_OPTION "}" \
+ " %{!static-libubsan:%{!fuse-ld=gold:--push-state }--no-as-needed}" \
+ " -lubsan " \
+ " %{static-libubsan:" LD_DYNAMIC_OPTION "}" \
+ " %{!static-libubsan:%{fuse-ld=gold:--as-needed;:--pop-state}}" \
STATIC_LIBUBSAN_LIBS
#else
#define LIBUBSAN_SPEC "-lubsan" STATIC_LIBUBSAN_LIBS
--
2.41.0
@@ -1,34 +0,0 @@
From bb25e8489384504cd59e4a2538720863da1fb29c Mon Sep 17 00:00:00 2001
From: Ariadne Conill <ariadne@dereferenced.org>
Date: Fri, 21 Aug 2020 06:47:43 +0000
Subject: [PATCH 06/35] Enable -Wformat and -Wformat-security by default.
---
gcc/c-family/c.opt | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/gcc/c-family/c.opt b/gcc/c-family/c.opt
index a75038930ae..b98726f33ed 100644
--- a/gcc/c-family/c.opt
+++ b/gcc/c-family/c.opt
@@ -704,7 +704,7 @@ Warn about function calls with format strings that write past the end
of the destination region. Same as -Wformat-overflow=1.
Wformat-security
-C ObjC C++ ObjC++ Var(warn_format_security) Warning LangEnabledBy(C ObjC C++ ObjC++,Wformat=, warn_format >= 2, 0)
+C ObjC C++ ObjC++ Var(warn_format_security) Init(1) Warning LangEnabledBy(C ObjC C++ ObjC++,Wformat=, warn_format >= 2, 0)
Warn about possible security problems with format functions.
Wformat-signedness
@@ -725,7 +725,7 @@ C ObjC C++ ObjC++ Var(warn_format_zero_length) Warning LangEnabledBy(C ObjC C++
Warn about zero-length formats.
Wformat=
-C ObjC C++ ObjC++ Joined RejectNegative UInteger Var(warn_format) Warning LangEnabledBy(C ObjC C++ ObjC++,Wall, 1, 0) IntegerRange(0, 2)
+C ObjC C++ ObjC++ Joined RejectNegative UInteger Var(warn_format) Init(1) Warning LangEnabledBy(C ObjC C++ ObjC++,Wall, 1, 0) IntegerRange(0, 2)
Warn about printf/scanf/strftime/strfmon format string anomalies.
Wformat-overflow=
--
2.41.0
@@ -1,25 +0,0 @@
From 4a728ad48a7b437cc6f2697e26603bf648149f86 Mon Sep 17 00:00:00 2001
From: Ariadne Conill <ariadne@dereferenced.org>
Date: Fri, 21 Aug 2020 06:48:24 +0000
Subject: [PATCH 07/35] Enable -Wtrampolines by default.
---
gcc/common.opt | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gcc/common.opt b/gcc/common.opt
index 64c4277c991..c24839d32bc 100644
--- a/gcc/common.opt
+++ b/gcc/common.opt
@@ -803,7 +803,7 @@ Common Var(warn_system_headers) Warning
Do not suppress warnings from system headers.
Wtrampolines
-Common Var(warn_trampolines) Warning
+Common Var(warn_trampolines) Init(1) Warning
Warn whenever a trampoline is generated.
Wtrivial-auto-var-init
--
2.41.0
@@ -1,53 +0,0 @@
From 32f24560d0602f7735d5e9efd92fe3151bd72cea Mon Sep 17 00:00:00 2001
From: Ariadne Conill <ariadne@dereferenced.org>
Date: Fri, 21 Aug 2020 06:49:40 +0000
Subject: [PATCH 08/35] Disable ssp on -nostdlib, -nodefaultlibs and
-ffreestanding Change the buffer size.
---
gcc/gcc.cc | 8 +++++++-
gcc/params.opt | 2 +-
2 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/gcc/gcc.cc b/gcc/gcc.cc
index da6417dd0d1..b5a6f200635 100644
--- a/gcc/gcc.cc
+++ b/gcc/gcc.cc
@@ -983,6 +983,12 @@ proper position among the other output files. */
#define LINK_GCC_C_SEQUENCE_SPEC "%G %{!nolibc:%L %G}"
#endif
+#ifdef ENABLE_DEFAULT_SSP
+#define NO_SSP_SPEC "%{nostdlib|nodefaultlibs|ffreestanding:-fno-stack-protector} "
+#else
+#define NO_SSP_SPEC ""
+#endif
+
#ifndef LINK_SSP_SPEC
#ifdef TARGET_LIBC_PROVIDES_SSP
#define LINK_SSP_SPEC "%{fstack-protector|fstack-protector-all" \
@@ -1282,7 +1288,7 @@ static const char *cc1_options =
%{-version:--version}\
%{-help=*:--help=%*}\
%{!fsyntax-only:%{S:%W{o*}%{!o*:-o %w%b.s}}}\
- %{fsyntax-only:-o %j} %{-param*}\
+ %{fsyntax-only:-o %j} %{-param*} " NO_SSP_SPEC "\
%{coverage:-fprofile-arcs -ftest-coverage}\
%{fprofile-arcs|fprofile-generate*|coverage:\
%{!fprofile-update=single:\
diff --git a/gcc/params.opt b/gcc/params.opt
index 823cdb2ff85..5b096899b40 100644
--- a/gcc/params.opt
+++ b/gcc/params.opt
@@ -1006,7 +1006,7 @@ Common Joined UInteger Var(param_ssa_name_def_chain_limit) Init(512) Param Optim
The maximum number of SSA_NAME assignments to follow in determining a value.
-param=ssp-buffer-size=
-Common Joined UInteger Var(param_ssp_buffer_size) Init(8) IntegerRange(1, 65536) Param Optimization
+Common Joined UInteger Var(param_ssp_buffer_size) Init(4) IntegerRange(1, 65536) Param Optimization
The lower bound for a buffer to be considered for stack smashing protection.
-param=stack-clash-protection-guard-size=
--
2.41.0
@@ -1,54 +0,0 @@
From c7ec8da7280d7f97f5543eb9ddeca7600aafc43c Mon Sep 17 00:00:00 2001
From: Ariadne Conill <ariadne@dereferenced.org>
Date: Fri, 21 Aug 2020 06:50:33 +0000
Subject: [PATCH 09/35] Ensure that msgfmt doesn't encounter problems during
gcc bootstrapping.
Solves error messages like the following:
msgfmt: /var/tmp/portage/sys-devel/gcc-4.1.2/work/build/./gcc/libgcc_s.so.1: version `GCC_4.2.0' not found (required by /usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/libstdc++.so.6)
The libgcc_s.so used during build doesn't satisfy the needs of the
libstdc++.so that msgfmt is linked against. On the other hand, msgfmt
is used as a stand-alone application here, and what library it uses
behind the scenes is of no concern to the gcc build process.
Therefore, simply invoking it "as usual", i.e. without any special
library path, will make it work as expected here.
2011-09-19 Martin von Gagern
References:
https://bugs.gentoo.org/372377
https://bugs.gentoo.org/295480
---
libstdc++-v3/po/Makefile.am | 1 +
libstdc++-v3/po/Makefile.in | 1 +
2 files changed, 2 insertions(+)
diff --git a/libstdc++-v3/po/Makefile.am b/libstdc++-v3/po/Makefile.am
index 12d34910830..61b13762b71 100644
--- a/libstdc++-v3/po/Makefile.am
+++ b/libstdc++-v3/po/Makefile.am
@@ -38,6 +38,7 @@ MSGFMT = msgfmt
EXTRA_DIST = string_literals.cc POTFILES.in $(PACKAGE).pot $(LOCALE_IN)
.po.mo:
+ env --unset=LD_LIBRARY_PATH \
$(MSGFMT) -o $@ $<
all-local: all-local-$(USE_NLS)
diff --git a/libstdc++-v3/po/Makefile.in b/libstdc++-v3/po/Makefile.in
index 8e93445acd2..d6ff06e5ddb 100644
--- a/libstdc++-v3/po/Makefile.in
+++ b/libstdc++-v3/po/Makefile.in
@@ -561,6 +561,7 @@ uninstall-am:
.po.mo:
+ env --unset=LD_LIBRARY_PATH \
$(MSGFMT) -o $@ $<
all-local: all-local-$(USE_NLS)
--
2.41.0
@@ -1,28 +0,0 @@
From aaa029bcee68298695b7c4278c90b6bc320d098c Mon Sep 17 00:00:00 2001
From: Ariadne Conill <ariadne@dereferenced.org>
Date: Fri, 21 Aug 2020 06:52:07 +0000
Subject: [PATCH 10/35] Don't declare asprintf if defined as a macro.
---
include/libiberty.h | 3 +++
1 file changed, 3 insertions(+)
diff --git a/include/libiberty.h b/include/libiberty.h
index 1d5c779fcff..19e3cb1e31c 100644
--- a/include/libiberty.h
+++ b/include/libiberty.h
@@ -652,8 +652,11 @@ extern void *bsearch_r (const void *, const void *,
/* Like sprintf but provides a pointer to malloc'd storage, which must
be freed by the caller. */
+/* asprintf may be declared as a macro by glibc with __USE_FORTIFY_LEVEL. */
+#ifndef asprintf
extern int asprintf (char **, const char *, ...) ATTRIBUTE_PRINTF_2;
#endif
+#endif
/* Like asprintf but allocates memory without fail. This works like
xmalloc. */
--
2.41.0
@@ -1,24 +0,0 @@
From 65e01e749205c9af218b01233cebd0077538d0ee Mon Sep 17 00:00:00 2001
From: Ariadne Conill <ariadne@dereferenced.org>
Date: Fri, 21 Aug 2020 06:53:00 +0000
Subject: [PATCH 11/35] libiberty: copy PIC objects during build process
---
libiberty/Makefile.in | 1 +
1 file changed, 1 insertion(+)
diff --git a/libiberty/Makefile.in b/libiberty/Makefile.in
index 72608f3e4a7..58356884728 100644
--- a/libiberty/Makefile.in
+++ b/libiberty/Makefile.in
@@ -265,6 +265,7 @@ $(TARGETLIB): $(REQUIRED_OFILES) $(EXTRA_OFILES) $(LIBOBJS)
$(AR) $(AR_FLAGS) $(TARGETLIB) \
$(REQUIRED_OFILES) $(EXTRA_OFILES) $(LIBOBJS); \
$(RANLIB) $(TARGETLIB); \
+ cp $(TARGETLIB) ../ ; \
cd ..; \
else true; fi
--
2.41.0
-57
View File
@@ -1,57 +0,0 @@
From 453a815bf2844971a91eaef800af188d9e86b784 Mon Sep 17 00:00:00 2001
From: Szabolcs Nagy <nsz@port70.net>
Date: Sat, 24 Oct 2015 20:09:53 +0000
Subject: [PATCH 12/35] libgcc_s
---
gcc/config/i386/i386-expand.cc | 4 ++--
libgcc/config/i386/cpuinfo.c | 6 +++---
libgcc/config/i386/t-linux | 2 +-
3 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/gcc/config/i386/i386-expand.cc b/gcc/config/i386/i386-expand.cc
index 0d817fc3f3b..2e99db00db9 100644
--- a/gcc/config/i386/i386-expand.cc
+++ b/gcc/config/i386/i386-expand.cc
@@ -12691,10 +12691,10 @@ ix86_expand_builtin (tree exp, rtx target, rtx subtarget,
{
case IX86_BUILTIN_CPU_INIT:
{
- /* Make it call __cpu_indicator_init in libgcc. */
+ /* Make it call __cpu_indicator_init in libgcc.a. */
tree call_expr, fndecl, type;
type = build_function_type_list (integer_type_node, NULL_TREE);
- fndecl = build_fn_decl ("__cpu_indicator_init", type);
+ fndecl = build_fn_decl ("__cpu_indicator_init_local", type);
call_expr = build_call_expr (fndecl, 0);
return expand_expr (call_expr, target, mode, EXPAND_NORMAL);
}
diff --git a/libgcc/config/i386/cpuinfo.c b/libgcc/config/i386/cpuinfo.c
index 50b6d8248a2..724ced402a1 100644
--- a/libgcc/config/i386/cpuinfo.c
+++ b/libgcc/config/i386/cpuinfo.c
@@ -63,7 +63,7 @@ __cpu_indicator_init (void)
__cpu_features2);
}
-#if defined SHARED && defined USE_ELF_SYMVER
-__asm__ (".symver __cpu_indicator_init, __cpu_indicator_init@GCC_4.8.0");
-__asm__ (".symver __cpu_model, __cpu_model@GCC_4.8.0");
+#ifndef SHARED
+int __cpu_indicator_init_local (void)
+ __attribute__ ((weak, alias ("__cpu_indicator_init")));
#endif
diff --git a/libgcc/config/i386/t-linux b/libgcc/config/i386/t-linux
index 8506a635790..564296f788e 100644
--- a/libgcc/config/i386/t-linux
+++ b/libgcc/config/i386/t-linux
@@ -3,5 +3,5 @@
# t-slibgcc-elf-ver and t-linux
SHLIB_MAPFILES = libgcc-std.ver $(srcdir)/config/i386/libgcc-glibc.ver
-HOST_LIBGCC2_CFLAGS += -mlong-double-80 -DUSE_ELF_SYMVER $(CET_FLAGS)
+HOST_LIBGCC2_CFLAGS += -mlong-double-80 $(CET_FLAGS)
CRTSTUFF_T_CFLAGS += $(CET_FLAGS)
--
2.41.0
-85
View File
@@ -1,85 +0,0 @@
From 7d7d12137c666761a8dd61179c9651b85dae9b41 Mon Sep 17 00:00:00 2001
From: Szabolcs Nagy <nsz@port70.net>
Date: Sat, 7 Nov 2015 02:08:05 +0000
Subject: [PATCH 13/35] nopie
---
gcc/configure | 27 +++++++++++++++++++++++++++
gcc/configure.ac | 13 +++++++++++++
2 files changed, 40 insertions(+)
diff --git a/gcc/configure b/gcc/configure
index 23da7d55d..f38732bb2 100755
--- a/gcc/configure
+++ b/gcc/configure
@@ -34534,6 +34534,29 @@ rm -f core conftest.err conftest.$ac_objext \
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_no_pie" >&5
$as_echo "$gcc_cv_no_pie" >&6; }
+# Check if -nopie works.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -nopie option" >&5
+$as_echo_n "checking for -nopie option... " >&6; }
+if ${gcc_cv_nopie+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ saved_LDFLAGS="$LDFLAGS"
+ LDFLAGS="$LDFLAGS -nopie"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+int main(void) {return 0;}
+_ACEOF
+if ac_fn_cxx_try_link "$LINENO"; then :
+ gcc_cv_nopie=yes
+else
+ gcc_cv_nopie=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ LDFLAGS="$saved_LDFLAGS"
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_nopie" >&5
+$as_echo "$gcc_cv_nopie" >&6; }
if test x$enable_host_shared = xyes; then
PICFLAG=-fPIC
@@ -34551,6 +34574,8 @@ if test x$enable_host_pie = xyes; then
LD_PICFLAG=-pie
elif test x$gcc_cv_no_pie = xyes; then
LD_PICFLAG=-no-pie
+elif test x$gcc_cv_nopie = xyes; then
+ LD_PICFLAG=-nopie
else
LD_PICFLAG=
fi
diff --git a/gcc/configure.ac b/gcc/configure.ac
index d7cf0b92c..db2e2c802 100644
--- a/gcc/configure.ac
+++ b/gcc/configure.ac
@@ -7781,6 +7781,15 @@ AC_CACHE_CHECK([for -no-pie option],
[gcc_cv_no_pie=yes],
[gcc_cv_no_pie=no])
LDFLAGS="$saved_LDFLAGS"])
+# Check if -nopie works.
+AC_CACHE_CHECK([for -nopie option],
+ [gcc_cv_nopie],
+ [saved_LDFLAGS="$LDFLAGS"
+ LDFLAGS="$LDFLAGS -nopie"
+ AC_LINK_IFELSE([AC_LANG_SOURCE([int main(void) {return 0;}])],
+ [gcc_cv_nopie=yes],
+ [gcc_cv_nopie=no])
+ LDFLAGS="$saved_LDFLAGS"])
if test x$enable_host_shared = xyes; then
PICFLAG=-fPIC
@@ -7798,6 +7807,8 @@ if test x$enable_host_pie = xyes; then
LD_PICFLAG=-pie
elif test x$gcc_cv_no_pie = xyes; then
LD_PICFLAG=-no-pie
+elif test x$gcc_cv_nopie = xyes; then
+ LD_PICFLAG=-nopie
else
LD_PICFLAG=
fi
--
2.41.0
@@ -1,42 +0,0 @@
From dd5bb97c31a9f57034c70a7a18ba6e2e133084c7 Mon Sep 17 00:00:00 2001
From: Ariadne Conill <ariadne@dereferenced.org>
Date: Fri, 21 Aug 2020 06:59:16 +0000
Subject: [PATCH 14/35] ada: fix shared linking
---
gcc/ada/link.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/gcc/ada/link.c b/gcc/ada/link.c
index f2126441208..22cfa9c641f 100644
--- a/gcc/ada/link.c
+++ b/gcc/ada/link.c
@@ -107,9 +107,9 @@ const char *__gnat_default_libgcc_subdir = "lib";
|| defined (__NetBSD__) || defined (__OpenBSD__) \
|| defined (__QNX__)
const char *__gnat_object_file_option = "-Wl,@";
-const char *__gnat_run_path_option = "-Wl,-rpath,";
-char __gnat_shared_libgnat_default = STATIC;
-char __gnat_shared_libgcc_default = STATIC;
+const char *__gnat_run_path_option = "";
+char __gnat_shared_libgnat_default = SHARED;
+char __gnat_shared_libgcc_default = SHARED;
int __gnat_link_max = 8192;
unsigned char __gnat_objlist_file_supported = 1;
const char *__gnat_object_library_extension = ".a";
@@ -129,9 +129,9 @@ const char *__gnat_default_libgcc_subdir = "lib";
#elif defined (__linux__) || defined (__GLIBC__)
const char *__gnat_object_file_option = "-Wl,@";
-const char *__gnat_run_path_option = "-Wl,-rpath,";
-char __gnat_shared_libgnat_default = STATIC;
-char __gnat_shared_libgcc_default = STATIC;
+const char *__gnat_run_path_option = "";
+char __gnat_shared_libgnat_default = SHARED;
+char __gnat_shared_libgcc_default = SHARED;
int __gnat_link_max = 8192;
unsigned char __gnat_objlist_file_supported = 1;
const char *__gnat_object_library_extension = ".a";
--
2.41.0
@@ -1,24 +0,0 @@
From 6bb5b7d9161d05f31b001d8211a9c63caf63fd2f Mon Sep 17 00:00:00 2001
From: Ariadne Conill <ariadne@dereferenced.org>
Date: Fri, 21 Aug 2020 06:59:43 +0000
Subject: [PATCH 15/35] build: fix CXXFLAGS_FOR_BUILD passing
---
Makefile.in | 1 +
1 file changed, 1 insertion(+)
diff --git a/Makefile.in b/Makefile.in
index 06a9398e172..6ff2b3f9925 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -178,6 +178,7 @@ BUILD_EXPORTS = \
# built for the build system to override those in BASE_FLAGS_TO_PASS.
EXTRA_BUILD_FLAGS = \
CFLAGS="$(CFLAGS_FOR_BUILD)" \
+ CXXFLAGS="$(CXXFLAGS_FOR_BUILD)" \
LDFLAGS="$(LDFLAGS_FOR_BUILD)"
# This is the list of directories to built for the host system.
--
2.41.0
@@ -1,25 +0,0 @@
From f0d9e00cac06689f64b214de7aee80d7116ef084 Mon Sep 17 00:00:00 2001
From: Ariadne Conill <ariadne@dereferenced.org>
Date: Fri, 21 Aug 2020 07:01:06 +0000
Subject: [PATCH 16/35] add fortify-headers paths
---
gcc/config/linux.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/gcc/config/linux.h b/gcc/config/linux.h
index e3aca79cccc..b3537b8fbeb 100644
--- a/gcc/config/linux.h
+++ b/gcc/config/linux.h
@@ -159,6 +159,8 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
#ifdef NATIVE_SYSTEM_HEADER_DIR
#define INCLUDE_DEFAULTS_MUSL_NATIVE \
+ { NATIVE_SYSTEM_HEADER_DIR "/fortify", 0, 0, 0, 1, 2 }, \
+ { NATIVE_SYSTEM_HEADER_DIR "/fortify", 0, 0, 0, 1, 0 }, \
{ NATIVE_SYSTEM_HEADER_DIR, 0, 0, 0, 1, 2 }, \
{ NATIVE_SYSTEM_HEADER_DIR, 0, 0, 0, 1, 0 },
#else
--
2.41.0
@@ -1,31 +0,0 @@
From 857db04f4f1a06e866551b4172fe8f27363f4a92 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Timo=20Ter=C3=A4s?= <timo.teras@iki.fi>
Date: Fri, 21 Aug 2020 07:03:00 +0000
Subject: [PATCH 17/35] Alpine musl package provides libssp_nonshared.a. We
link to it unconditionally, as otherwise we get link failures if some objects
are -fstack-protector built and final link happens with -fno-stack-protector.
This seems to be the common case when bootstrapping gcc, the piepatches do
not seem to fully fix the crosstoolchain and bootstrap sequence wrt.
stack-protector flag usage.
---
gcc/gcc.cc | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/gcc/gcc.cc b/gcc/gcc.cc
index b5a6f200635..6cbb726599b 100644
--- a/gcc/gcc.cc
+++ b/gcc/gcc.cc
@@ -991,8 +991,7 @@ proper position among the other output files. */
#ifndef LINK_SSP_SPEC
#ifdef TARGET_LIBC_PROVIDES_SSP
-#define LINK_SSP_SPEC "%{fstack-protector|fstack-protector-all" \
- "|fstack-protector-strong|fstack-protector-explicit:}"
+#define LINK_SSP_SPEC "-lssp_nonshared"
#else
#define LINK_SSP_SPEC "%{fstack-protector|fstack-protector-all" \
"|fstack-protector-strong|fstack-protector-explicit" \
--
2.41.0
@@ -1,69 +0,0 @@
From 5a8347e23ab13912b6edec2c6c6e3a101b017c79 Mon Sep 17 00:00:00 2001
From: Ariadne Conill <ariadne@dereferenced.org>
Date: Fri, 21 Aug 2020 07:03:42 +0000
Subject: [PATCH 18/35] DP: Use --push-state/--pop-state for gold as well when
linking libtsan.
---
gcc/gcc.cc | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/gcc/gcc.cc b/gcc/gcc.cc
index 6cbb726599b..59390fd39d6 100644
--- a/gcc/gcc.cc
+++ b/gcc/gcc.cc
@@ -755,10 +755,10 @@ proper position among the other output files. */
#define LIBASAN_SPEC STATIC_LIBASAN_LIBS
#elif defined(HAVE_LD_STATIC_DYNAMIC)
#define LIBASAN_SPEC "%{static-libasan:" LD_STATIC_OPTION "}" \
- " %{!static-libasan:%{!fuse-ld=gold:--push-state }--no-as-needed}" \
+ " %{!static-libasan:--push-state --no-as-needed}" \
" -lasan " \
" %{static-libasan:" LD_DYNAMIC_OPTION "}" \
- " %{!static-libasan:%{fuse-ld=gold:--as-needed;:--pop-state}}" \
+ " %{!static-libasan:--pop-state}" \
STATIC_LIBASAN_LIBS
#else
#define LIBASAN_SPEC "-lasan" STATIC_LIBASAN_LIBS
@@ -794,10 +794,10 @@ proper position among the other output files. */
#define LIBTSAN_SPEC STATIC_LIBTSAN_LIBS
#elif defined(HAVE_LD_STATIC_DYNAMIC)
#define LIBTSAN_SPEC "%{static-libtsan:" LD_STATIC_OPTION "}" \
- " %{!static-libtsan:%{!fuse-ld=gold:--push-state }--no-as-needed}" \
+ " %{!static-libtsan:--push-state --no-as-needed}" \
" -ltsan " \
" %{static-libtsan:" LD_DYNAMIC_OPTION "}" \
- " %{!static-libtsan:%{fuse-ld=gold:--as-needed;:--pop-state}}" \
+ " %{!static-libtsan:--pop-state}" \
STATIC_LIBTSAN_LIBS
#else
#define LIBTSAN_SPEC "-ltsan" STATIC_LIBTSAN_LIBS
@@ -815,10 +815,10 @@ proper position among the other output files. */
#define LIBLSAN_SPEC STATIC_LIBLSAN_LIBS
#elif defined(HAVE_LD_STATIC_DYNAMIC)
#define LIBLSAN_SPEC "%{static-liblsan:" LD_STATIC_OPTION "}" \
- " %{!static-liblsan:%{!fuse-ld=gold:--push-state }--no-as-needed}" \
+ " %{!static-liblsan:--push-state --no-as-needed}" \
" -llsan " \
" %{static-liblsan:" LD_DYNAMIC_OPTION "}" \
- " %{!static-liblsan:%{fuse-ld=gold:--as-needed;:--pop-state}}" \
+ " %{!static-liblsan:--pop-state}" \
STATIC_LIBLSAN_LIBS
#else
#define LIBLSAN_SPEC "-llsan" STATIC_LIBLSAN_LIBS
@@ -834,10 +834,10 @@ proper position among the other output files. */
" %{static-libubsan|static:%:include(libsanitizer.spec)%(link_libubsan)}"
#ifdef HAVE_LD_STATIC_DYNAMIC
#define LIBUBSAN_SPEC "%{static-libubsan:" LD_STATIC_OPTION "}" \
- " %{!static-libubsan:%{!fuse-ld=gold:--push-state }--no-as-needed}" \
+ " %{!static-libubsan:--push-state --no-as-needed}" \
" -lubsan " \
" %{static-libubsan:" LD_DYNAMIC_OPTION "}" \
- " %{!static-libubsan:%{fuse-ld=gold:--as-needed;:--pop-state}}" \
+ " %{!static-libubsan:--pop-state}" \
STATIC_LIBUBSAN_LIBS
#else
#define LIBUBSAN_SPEC "-lubsan" STATIC_LIBUBSAN_LIBS
--
2.41.0
@@ -1,26 +0,0 @@
From 41d00a2eb0754acf71958808bd17dbebeb517b84 Mon Sep 17 00:00:00 2001
From: Ariadne Conill <ariadne@dereferenced.org>
Date: Thu, 6 Jan 2022 03:12:55 +0000
Subject: [PATCH 19/35] aarch64: disable multilib support
multilib is unsupported on Alpine GCC
---
gcc/config/aarch64/t-aarch64-linux | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gcc/config/aarch64/t-aarch64-linux b/gcc/config/aarch64/t-aarch64-linux
index 57bf4100fcd..172894b57ef 100644
--- a/gcc/config/aarch64/t-aarch64-linux
+++ b/gcc/config/aarch64/t-aarch64-linux
@@ -22,7 +22,7 @@ LIB1ASMSRC = aarch64/lib1funcs.asm
LIB1ASMFUNCS = _aarch64_sync_cache_range
AARCH_BE = $(if $(findstring TARGET_BIG_ENDIAN_DEFAULT=1, $(tm_defines)),_be)
-MULTILIB_OSDIRNAMES = mabi.lp64=../lib64$(call if_multiarch,:aarch64$(AARCH_BE)-linux-gnu)
+MULTILIB_OSDIRNAMES = mabi.lp64=../lib
MULTIARCH_DIRNAME = $(call if_multiarch,aarch64$(AARCH_BE)-linux-gnu)
MULTILIB_OSDIRNAMES += mabi.ilp32=../libilp32$(call if_multiarch,:aarch64$(AARCH_BE)-linux-gnu_ilp32)
--
2.41.0
@@ -1,25 +0,0 @@
From 85b42bfbba71616831d14360b16998acb28790fd Mon Sep 17 00:00:00 2001
From: Ariadne Conill <ariadne@dereferenced.org>
Date: Thu, 6 Jan 2022 03:13:59 +0000
Subject: [PATCH 20/35] s390x: disable multilib support
multilib is not supported on Alpine GCC at present
---
gcc/config/s390/t-linux64 | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/gcc/config/s390/t-linux64 b/gcc/config/s390/t-linux64
index cc6ab367072..7f498ee1cdc 100644
--- a/gcc/config/s390/t-linux64
+++ b/gcc/config/s390/t-linux64
@@ -7,5 +7,5 @@
MULTILIB_OPTIONS = m64/m31
MULTILIB_DIRNAMES = 64 32
-MULTILIB_OSDIRNAMES = ../lib64$(call if_multiarch,:s390x-linux-gnu)
-MULTILIB_OSDIRNAMES += $(if $(wildcard $(shell echo $(SYSTEM_HEADER_DIR))/../../usr/lib32),../lib32,../lib)$(call if_multiarch,:s390-linux-gnu)
+MULTILIB_OSDIRNAMES = m64=../lib
+MULTILIB_OSDIRNAMES+= m32=../lib32
--
2.41.0
@@ -1,81 +0,0 @@
From 7b53df284242638e940c0155b6c21e88cea1f55b Mon Sep 17 00:00:00 2001
From: Ariadne Conill <ariadne@dereferenced.org>
Date: Thu, 6 Jan 2022 03:14:33 +0000
Subject: [PATCH 21/35] ppc64[le]: disable multilib support
multilib is not presently supported on Alpine GCC
---
gcc/config/rs6000/t-linux | 6 ++++--
gcc/config/rs6000/t-linux64 | 4 ++--
gcc/config/rs6000/t-linux64bele | 4 ++--
gcc/config/rs6000/t-linux64lebe | 4 ++--
4 files changed, 10 insertions(+), 8 deletions(-)
diff --git a/gcc/config/rs6000/t-linux b/gcc/config/rs6000/t-linux
index 4e371255533..128c75c7d39 100644
--- a/gcc/config/rs6000/t-linux
+++ b/gcc/config/rs6000/t-linux
@@ -2,7 +2,8 @@
# or soft-float.
ifeq (,$(filter $(with_cpu),$(SOFT_FLOAT_CPUS))$(findstring soft,$(with_float)))
ifneq (,$(findstring powerpc64,$(target)))
-MULTILIB_OSDIRNAMES := .=../lib64$(call if_multiarch,:powerpc64-linux-gnu)
+MULTILIB_OSDIRNAMES := m64=../lib
+MULTILIB_OSDIRNAMES += m32=../lib32
else
MULTIARCH_DIRNAME := $(call if_multiarch,powerpc-linux-gnu)
endif
@@ -10,7 +11,8 @@ ifneq (,$(findstring powerpcle,$(target)))
MULTIARCH_DIRNAME := $(subst -linux,le-linux,$(MULTIARCH_DIRNAME))
endif
ifneq (,$(findstring powerpc64le,$(target)))
-MULTILIB_OSDIRNAMES := $(subst -linux,le-linux,$(MULTILIB_OSDIRNAMES))
+MULTILIB_OSDIRNAMES := m64=../lib
+MULTILIB_OSDIRNAMES += m32=../lib32
endif
endif
diff --git a/gcc/config/rs6000/t-linux64 b/gcc/config/rs6000/t-linux64
index 01a94242308..b3a76379c03 100644
--- a/gcc/config/rs6000/t-linux64
+++ b/gcc/config/rs6000/t-linux64
@@ -28,8 +28,8 @@
MULTILIB_OPTIONS := m64/m32
MULTILIB_DIRNAMES := 64 32
MULTILIB_EXTRA_OPTS :=
-MULTILIB_OSDIRNAMES := m64=../lib64$(call if_multiarch,:powerpc64-linux-gnu)
-MULTILIB_OSDIRNAMES += m32=$(if $(wildcard $(shell echo $(SYSTEM_HEADER_DIR))/../../usr/lib32),../lib32,../lib)$(call if_multiarch,:powerpc-linux-gnu)
+MULTILIB_OSDIRNAMES := m64=../lib
+MULTILIB_OSDIRNAMES += m32=../lib32
rs6000-linux.o: $(srcdir)/config/rs6000/rs6000-linux.cc
$(COMPILE) $<
diff --git a/gcc/config/rs6000/t-linux64bele b/gcc/config/rs6000/t-linux64bele
index 97c1ee6fb4d..08d72639cb6 100644
--- a/gcc/config/rs6000/t-linux64bele
+++ b/gcc/config/rs6000/t-linux64bele
@@ -2,6 +2,6 @@
MULTILIB_OPTIONS += mlittle
MULTILIB_DIRNAMES += le
-MULTILIB_OSDIRNAMES += $(subst =,.mlittle=,$(subst lible32,lib32le,$(subst lible64,lib64le,$(subst lib,lible,$(subst -linux,le-linux,$(MULTILIB_OSDIRNAMES))))))
-MULTILIB_OSDIRNAMES += $(subst $(if $(findstring 64,$(target)),m64,m32).,,$(filter $(if $(findstring 64,$(target)),m64,m32).mlittle%,$(MULTILIB_OSDIRNAMES)))
+MULTILIB_OSDIRNAMES = m64=../lib
+MULTILIB_OSDIRNAMES+= m32=../lib32
MULTILIB_MATCHES := ${MULTILIB_MATCHES_ENDIAN}
diff --git a/gcc/config/rs6000/t-linux64lebe b/gcc/config/rs6000/t-linux64lebe
index 2e63bdb9fc9..c6e1c5db65d 100644
--- a/gcc/config/rs6000/t-linux64lebe
+++ b/gcc/config/rs6000/t-linux64lebe
@@ -2,6 +2,6 @@
MULTILIB_OPTIONS += mbig
MULTILIB_DIRNAMES += be
-MULTILIB_OSDIRNAMES += $(subst =,.mbig=,$(subst libbe32,lib32be,$(subst libbe64,lib64be,$(subst lib,libbe,$(subst le-linux,-linux,$(MULTILIB_OSDIRNAMES))))))
-MULTILIB_OSDIRNAMES += $(subst $(if $(findstring 64,$(target)),m64,m32).,,$(filter $(if $(findstring 64,$(target)),m64,m32).mbig%,$(MULTILIB_OSDIRNAMES)))
+MULTILIB_OSDIRNAMES := m64=../lib
+MULTILIB_OSDIRNAMES += m32=../lib32
MULTILIB_MATCHES := ${MULTILIB_MATCHES_ENDIAN}
--
2.41.0
@@ -1,26 +0,0 @@
From 96e7e1e9a899d9bb5fcbdf788bd529d0390c626f Mon Sep 17 00:00:00 2001
From: Ariadne Conill <ariadne@dereferenced.org>
Date: Thu, 6 Jan 2022 03:14:54 +0000
Subject: [PATCH 22/35] x86_64: disable multilib support
multilib is not presently supported on Alpine GCC
---
gcc/config/i386/t-linux64 | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/gcc/config/i386/t-linux64 b/gcc/config/i386/t-linux64
index 138956b0962..bc03dab874f 100644
--- a/gcc/config/i386/t-linux64
+++ b/gcc/config/i386/t-linux64
@@ -33,6 +33,6 @@
comma=,
MULTILIB_OPTIONS = $(subst $(comma),/,$(TM_MULTILIB_CONFIG))
MULTILIB_DIRNAMES = $(patsubst m%, %, $(subst /, ,$(MULTILIB_OPTIONS)))
-MULTILIB_OSDIRNAMES = m64=../lib64$(call if_multiarch,:x86_64-linux-gnu)
-MULTILIB_OSDIRNAMES+= m32=$(if $(wildcard $(shell echo $(SYSTEM_HEADER_DIR))/../../usr/lib32),../lib32,../lib)$(call if_multiarch,:i386-linux-gnu)
+MULTILIB_OSDIRNAMES = m64=../lib
+MULTILIB_OSDIRNAMES+= m32=../lib32
MULTILIB_OSDIRNAMES+= mx32=../libx32$(call if_multiarch,:x86_64-linux-gnux32)
--
2.41.0
@@ -1,76 +0,0 @@
From b26224acf342eacb33491f6ea0da1faf73d35715 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?S=C3=B6ren=20Tempel?= <soeren+git@soeren-tempel.net>
Date: Mon, 3 Jan 2022 07:14:48 +0100
Subject: [PATCH 23/35] riscv: disable multilib support
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
From the musl wiki [1]:
musl does not support sharing an include directory between archs
[…], and thus is not compatible with GCC-style multilib. It is
recommended that distributions build GCC with multilib disabled,
and use library directories named lib, not lib64 or lib32.
For this reason, we patch existing GCC configuration files (gcc/config)
to pin MULTILIB_OSDIRNAMES to lib, there is also a corresponding GCC
upstream bug about this issue [2]. Avoiding the use of lib64 and lib32
directories is a bit more difficult on the RISC-V architecture. This is
due to the fact that the default RISC-V configuration does not only use
the lib64 and lib32 directories but also subdirectories within these
directories for different RISC-V ABIs (e.g. lp64d, lp64, …) [3].
This patch aligns the RISC-V configuration with other architectures by
pinning MULTILIB_OSDIRNAMES to lib for rv64gc (our default RISC-V
-march). Furthermore, this patch removes the ABI-specific startfile
prefix spec. Since both of these impact the default LIBRARY_PATH [4]
this patch thereby aligns the default RISC-V LIBRARY_PATH with that from
other Alpine architectures and thereby fixes #13369 [5].
Incidentally, this also fixes gccgo on riscv64, as without this patch
gccgo is otherwise not able to find the *.gox files for the Go standard
library.
[1]: https://wiki.musl-libc.org/guidelines-for-distributions.html#Multilib/multi_arch
[2]: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90077
[3]: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103889#c14
[4]: https://gcc.gnu.org/git/?p=gcc.git;a=blob;f=gcc/gcc.c;h=d4c8746b0aa322286decf92aa72a12f0a393b655;hb=HEAD#l9122
[5]: https://gitlab.alpinelinux.org/alpine/aports/-/issues/13369
---
gcc/config/riscv/linux.h | 8 --------
gcc/config/riscv/t-linux | 7 +++++--
2 files changed, 5 insertions(+), 10 deletions(-)
diff --git a/gcc/config/riscv/linux.h b/gcc/config/riscv/linux.h
index f8c2c351e5a..8d9881eadeb 100644
--- a/gcc/config/riscv/linux.h
+++ b/gcc/config/riscv/linux.h
@@ -60,11 +60,3 @@ along with GCC; see the file COPYING3. If not see
%{rdynamic:-export-dynamic} \
-dynamic-linker " GNU_USER_DYNAMIC_LINKER "}} \
%{static:-static} %{static-pie:-static -pie --no-dynamic-linker -z text}}"
-
-#define STARTFILE_PREFIX_SPEC \
- "/lib" XLEN_SPEC "/" ABI_SPEC "/ " \
- "/usr/lib" XLEN_SPEC "/" ABI_SPEC "/ " \
- "/lib/ " \
- "/usr/lib/ "
-
-#define RISCV_USE_CUSTOMISED_MULTI_LIB select_by_abi
diff --git a/gcc/config/riscv/t-linux b/gcc/config/riscv/t-linux
index 216d2776a18..1a8a863853e 100644
--- a/gcc/config/riscv/t-linux
+++ b/gcc/config/riscv/t-linux
@@ -1,3 +1,6 @@
-# Only XLEN and ABI affect Linux multilib dir names, e.g. /lib32/ilp32d/
-MULTILIB_DIRNAMES := $(patsubst rv32%,lib32,$(patsubst rv64%,lib64,$(MULTILIB_DIRNAMES)))
+MULTILIB_OPTIONS := march=rv64gc
+MULTILIB_DIRNAMES := rv64gc
+
+MULTILIB_DIRNAMES := $(patsubst rv32%,lib32,$(patsubst rv64%,lib,$(MULTILIB_DIRNAMES)))
MULTILIB_OSDIRNAMES := $(patsubst lib%,../lib%,$(MULTILIB_DIRNAMES))
+MULTILIB_MATCHES := march?rv64gc=march?rv64imafdc
--
2.41.0
@@ -1,51 +0,0 @@
From a72e0613f79f6b6867819317accb7a714031a08c Mon Sep 17 00:00:00 2001
From: Ariadne Conill <ariadne@dereferenced.org>
Date: Fri, 21 Aug 2020 07:05:41 +0000
Subject: [PATCH 24/35] always build libgcc_eh.a
highly inspired by:
http://landley.net/hg/aboriginal/file/7e0747a665ab/sources/patches/gcc-core-libgcceh.patch
---
libgcc/Makefile.in | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/libgcc/Makefile.in b/libgcc/Makefile.in
index 6c4dc79ab71..023cede18a7 100644
--- a/libgcc/Makefile.in
+++ b/libgcc/Makefile.in
@@ -960,8 +960,9 @@ ifneq ($(LIBUNWIND),)
all: libunwind.a
endif
+all: libgcc_eh.a
ifeq ($(enable_shared),yes)
-all: libgcc_eh.a libgcc_s$(SHLIB_EXT)
+all: libgcc_s$(SHLIB_EXT)
ifneq ($(LIBUNWIND),)
all: libunwind$(SHLIB_EXT)
libgcc_s$(SHLIB_EXT): libunwind$(SHLIB_EXT)
@@ -1163,10 +1164,6 @@ install-libunwind:
install-shared:
$(mkinstalldirs) $(DESTDIR)$(inst_libdir)
- $(INSTALL_DATA) libgcc_eh.a $(DESTDIR)$(inst_libdir)/
- chmod 644 $(DESTDIR)$(inst_libdir)/libgcc_eh.a
- $(RANLIB) $(DESTDIR)$(inst_libdir)/libgcc_eh.a
-
$(subst @multilib_dir@,$(MULTIDIR),$(subst \
@shlib_base_name@,libgcc_s,$(subst \
@shlib_slibdir_qual@,$(MULTIOSSUBDIR),$(SHLIB_INSTALL))))
@@ -1183,6 +1180,10 @@ ifeq ($(enable_gcov),yes)
$(RANLIB) $(DESTDIR)$(inst_libdir)/libgcov.a
endif
+ $(INSTALL_DATA) libgcc_eh.a $(DESTDIR)$(inst_libdir)/
+ chmod 644 $(DESTDIR)$(inst_libdir)/libgcc_eh.a
+ $(RANLIB) $(DESTDIR)$(inst_libdir)/libgcc_eh.a
+
parts="$(INSTALL_PARTS)"; \
for file in $$parts; do \
rm -f $(DESTDIR)$(inst_libdir)/$$file; \
--
2.41.0
@@ -1,135 +0,0 @@
From 3ee8cbc1cad261b30d4a7a66d31496d5f243ce2f Mon Sep 17 00:00:00 2001
From: Ariadne Conill <ariadne@dereferenced.org>
Date: Fri, 21 Aug 2020 07:06:30 +0000
Subject: [PATCH 25/35] ada: libgnarl compatibility for musl
---
gcc/ada/libgnarl/s-osinte__linux.ads | 11 ------
gcc/ada/libgnarl/s-taprop__linux.adb | 53 ++--------------------------
2 files changed, 3 insertions(+), 61 deletions(-)
diff --git a/gcc/ada/libgnarl/s-osinte__linux.ads b/gcc/ada/libgnarl/s-osinte__linux.ads
index a5e645d334d..32165347071 100644
--- a/gcc/ada/libgnarl/s-osinte__linux.ads
+++ b/gcc/ada/libgnarl/s-osinte__linux.ads
@@ -403,12 +403,6 @@ package System.OS_Interface is
PTHREAD_RWLOCK_PREFER_WRITER_NP : constant := 1;
PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP : constant := 2;
- function pthread_rwlockattr_setkind_np
- (attr : access pthread_rwlockattr_t;
- pref : int) return int;
- pragma Import
- (C, pthread_rwlockattr_setkind_np, "pthread_rwlockattr_setkind_np");
-
function pthread_rwlock_init
(mutex : access pthread_rwlock_t;
attr : access pthread_rwlockattr_t) return int;
@@ -470,11 +464,6 @@ package System.OS_Interface is
protocol : int) return int;
pragma Import (C, pthread_mutexattr_setprotocol);
- function pthread_mutexattr_setprioceiling
- (attr : access pthread_mutexattr_t;
- prioceiling : int) return int;
- pragma Import (C, pthread_mutexattr_setprioceiling);
-
type struct_sched_param is record
sched_priority : int; -- scheduling priority
end record;
diff --git a/gcc/ada/libgnarl/s-taprop__linux.adb b/gcc/ada/libgnarl/s-taprop__linux.adb
index 821ceef30e4..ae95b58e01e 100644
--- a/gcc/ada/libgnarl/s-taprop__linux.adb
+++ b/gcc/ada/libgnarl/s-taprop__linux.adb
@@ -198,9 +198,6 @@ package body System.Task_Primitives.Operations is
pragma Import
(C, GNAT_pthread_condattr_setup, "__gnat_pthread_condattr_setup");
- function GNAT_has_cap_sys_nice return C.int;
- pragma Import
- (C, GNAT_has_cap_sys_nice, "__gnat_has_cap_sys_nice");
-- We do not have pragma Linker_Options ("-lcap"); here, because this
-- library is not present on many Linux systems. 'libcap' is the Linux
-- "capabilities" library, called by __gnat_has_cap_sys_nice.
@@ -210,38 +207,6 @@ package body System.Task_Primitives.Operations is
-- Convert Ada priority to Linux priority. Priorities are 1 .. 99 on
-- GNU/Linux, so we map 0 .. 98 to 1 .. 99.
- function Get_Ceiling_Support return Boolean;
- -- Get the value of the Ceiling_Support constant (see below).
- -- Note well: If this function or related code is modified, it should be
- -- tested by hand, because automated testing doesn't exercise it.
-
- -------------------------
- -- Get_Ceiling_Support --
- -------------------------
-
- function Get_Ceiling_Support return Boolean is
- Ceiling_Support : Boolean := False;
- begin
- if Locking_Policy /= 'C' then
- return False;
- end if;
-
- declare
- function geteuid return Integer;
- pragma Import (C, geteuid, "geteuid");
- Superuser : constant Boolean := geteuid = 0;
- Has_Cap : constant C.int := GNAT_has_cap_sys_nice;
- pragma Assert (Has_Cap in 0 | 1);
- begin
- Ceiling_Support := Superuser or else Has_Cap = 1;
- end;
-
- return Ceiling_Support;
- end Get_Ceiling_Support;
-
- pragma Warnings (Off, "non-preelaborable call not allowed*");
- Ceiling_Support : constant Boolean := Get_Ceiling_Support;
- pragma Warnings (On, "non-preelaborable call not allowed*");
-- True if the locking policy is Ceiling_Locking, and the current process
-- has permission to use this policy. The process has permission if it is
-- running as 'root', or if the capability was set by the setcap command,
@@ -344,7 +309,9 @@ package body System.Task_Primitives.Operations is
-- Init_Mutex --
----------------
+ pragma Warnings (Off, "formal parameter * is not referenced");
function Init_Mutex (L : RTS_Lock_Ptr; Prio : Any_Priority) return C.int is
+ pragma Warnings (On, "formal parameter * is not referenced");
Mutex_Attr : aliased pthread_mutexattr_t;
Result, Result_2 : C.int;
@@ -356,16 +323,7 @@ package body System.Task_Primitives.Operations is
return Result;
end if;
- if Ceiling_Support then
- Result := pthread_mutexattr_setprotocol
- (Mutex_Attr'Access, PTHREAD_PRIO_PROTECT);
- pragma Assert (Result = 0);
-
- Result := pthread_mutexattr_setprioceiling
- (Mutex_Attr'Access, Prio_To_Linux_Prio (Prio));
- pragma Assert (Result = 0);
-
- elsif Locking_Policy = 'I' then
+ if Locking_Policy = 'I' then
Result := pthread_mutexattr_setprotocol
(Mutex_Attr'Access, PTHREAD_PRIO_INHERIT);
pragma Assert (Result = 0);
@@ -405,11 +363,6 @@ package body System.Task_Primitives.Operations is
Result := pthread_rwlockattr_init (RWlock_Attr'Access);
pragma Assert (Result = 0);
- Result := pthread_rwlockattr_setkind_np
- (RWlock_Attr'Access,
- PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP);
- pragma Assert (Result = 0);
-
Result := pthread_rwlock_init (L.RW'Access, RWlock_Attr'Access);
pragma Assert (Result in 0 | ENOMEM);
--
2.41.0
@@ -1,247 +0,0 @@
From 3df4788c79c7429b196c7b284af2b4cf9a4b4f8d Mon Sep 17 00:00:00 2001
From: Ariadne Conill <ariadne@dereferenced.org>
Date: Fri, 21 Aug 2020 07:07:48 +0000
Subject: [PATCH 26/35] ada: musl support fixes
---
gcc/ada/Makefile.rtl | 16 ++++++++--------
gcc/ada/adaint.c | 34 +++++++++++++++++++---------------
gcc/ada/adaint.h | 10 ++++------
gcc/ada/terminals.c | 8 ++++----
4 files changed, 35 insertions(+), 33 deletions(-)
diff --git a/gcc/ada/Makefile.rtl b/gcc/ada/Makefile.rtl
index 32cbdb692..463028fbe 100644
--- a/gcc/ada/Makefile.rtl
+++ b/gcc/ada/Makefile.rtl
@@ -1558,7 +1558,7 @@ ifeq ($(strip $(filter-out %86 linux%,$(target_cpu) $(target_os))),)
s-intman.adb<libgnarl/s-intman__posix.adb \
s-tpopsp.adb<libgnarl/s-tpopsp__tls.adb \
$(TRASYM_DWARF_UNIX_PAIRS) \
- s-tsmona.adb<libgnat/s-tsmona__linux.adb \
+ s-tsmona.adb<libgnat/s-tsmona.adb \
a-exetim.adb<libgnarl/a-exetim__posix.adb \
a-exetim.ads<libgnarl/a-exetim__default.ads \
s-linux.ads<libgnarl/s-linux.ads \
@@ -2144,7 +2144,7 @@ ifeq ($(strip $(filter-out loongarch% linux%,$(target_cpu) $(target_os))),)
g-sercom.adb<libgnat/g-sercom__linux.adb \
$(TRASYM_DWARF_UNIX_PAIRS) \
$(GNATRTL_128BIT_PAIRS) \
- s-tsmona.adb<libgnat/s-tsmona__linux.adb \
+ s-tsmona.adb<libgnat/s-tsmona.adb \
$(ATOMICS_TARGET_PAIRS) \
$(ATOMICS_BUILTINS_TARGET_PAIRS) \
system.ads<libgnat/system-linux-loongarch.ads
@@ -2232,7 +2232,7 @@ ifeq ($(strip $(filter-out powerpc% linux%,$(target_cpu) $(target_os))),)
s-tasinf.adb<libgnarl/s-tasinf__linux.adb \
s-taspri.ads<libgnarl/s-taspri__posix.ads \
$(TRASYM_DWARF_UNIX_PAIRS) \
- s-tsmona.adb<libgnat/s-tsmona__linux.adb \
+ s-tsmona.adb<libgnat/s-tsmona.adb \
$(ATOMICS_TARGET_PAIRS) \
$(ATOMICS_BUILTINS_TARGET_PAIRS) \
system.ads<libgnat/system-linux-ppc.ads
@@ -2267,7 +2267,7 @@ ifeq ($(strip $(filter-out powerpc% linux%,$(target_cpu) $(target_os))),)
endif
# ARM linux, GNU eabi
-ifeq ($(strip $(filter-out arm% linux-gnueabi%,$(target_cpu) $(target_os))),)
+ifeq ($(strip $(filter-out arm% linux-gnueabi% linux-musleabi% linux-muslgnueabi%,$(target_cpu) $(target_os))),)
LIBGNAT_TARGET_PAIRS = \
a-intnam.ads<libgnarl/a-intnam__linux.ads \
s-inmaop.adb<libgnarl/s-inmaop__posix.adb \
@@ -2311,7 +2311,7 @@ ifeq ($(strip $(filter-out aarch64% linux%,$(target_cpu) $(target_os))),)
s-intman.adb<libgnarl/s-intman__posix.adb \
s-linux.ads<libgnarl/s-linux.ads \
$(TRASYM_DWARF_UNIX_PAIRS) \
- s-tsmona.adb<libgnat/s-tsmona__linux.adb \
+ s-tsmona.adb<libgnat/s-tsmona.adb \
s-mudido.adb<libgnarl/s-mudido__affinity.adb \
s-osinte.ads<libgnarl/s-osinte__linux.ads \
s-osinte.adb<libgnarl/s-osinte__posix.adb \
@@ -2488,7 +2488,7 @@ ifeq ($(strip $(filter-out %ia64 linux%,$(target_cpu) $(target_os))),)
s-tpopsp.adb<libgnarl/s-tpopsp__tls.adb \
s-taspri.ads<libgnarl/s-taspri__posix-noaltstack.ads \
$(TRASYM_DWARF_UNIX_PAIRS) \
- s-tsmona.adb<libgnat/s-tsmona__linux.adb \
+ s-tsmona.adb<libgnat/s-tsmona.adb \
$(ATOMICS_TARGET_PAIRS) \
$(ATOMICS_BUILTINS_TARGET_PAIRS) \
$(GNATRTL_128BIT_PAIRS) \
@@ -2592,7 +2592,7 @@ ifeq ($(strip $(filter-out %x86_64 linux%,$(target_cpu) $(target_os))),)
s-tpopsp.adb<libgnarl/s-tpopsp__tls.adb \
s-taspri.ads<libgnarl/s-taspri__posix.ads \
$(TRASYM_DWARF_UNIX_PAIRS) \
- s-tsmona.adb<libgnat/s-tsmona__linux.adb \
+ s-tsmona.adb<libgnat/s-tsmona.adb \
$(ATOMICS_TARGET_PAIRS) \
$(X86_64_TARGET_PAIRS) \
$(SIMD_PATH_TARGET_PAIRS) \
@@ -2637,7 +2637,7 @@ ifeq ($(strip $(filter-out %x32 linux%,$(target_cpu) $(target_os))),)
s-tpopsp.adb<libgnarl/s-tpopsp__tls.adb \
s-taspri.ads<libgnarl/s-taspri__posix.ads \
$(TRASYM_DWARF_UNIX_PAIRS) \
- s-tsmona.adb<libgnat/s-tsmona__linux.adb \
+ s-tsmona.adb<libgnat/s-tsmona.adb \
$(ATOMICS_TARGET_PAIRS) \
$(X86_64_TARGET_PAIRS) \
$(SIMD_PATH_TARGET_PAIRS) \
diff --git a/gcc/ada/adaint.c b/gcc/ada/adaint.c
index 74aa3c412..ef6118f37 100644
--- a/gcc/ada/adaint.c
+++ b/gcc/ada/adaint.c
@@ -94,6 +94,11 @@
#include <sys/param.h>
#include <sys/pstat.h>
#endif
+
+#if defined (linux) || defined(__linux__)
+#define _GNU_SOURCE 1
+#include <sched.h>
+#endif
#ifdef __PikeOS__
#define __BSD_VISIBLE 1
@@ -3465,7 +3470,6 @@ __gnat_lwp_self (void)
#endif
#if defined (__linux__)
-#include <sched.h>
/* glibc versions earlier than 2.7 do not define the routines to handle
dynamically allocated CPU sets. For these targets, we use the static
@@ -3475,7 +3479,7 @@ __gnat_lwp_self (void)
/* Dynamic cpu sets */
-cpu_set_t *
+void *
__gnat_cpu_alloc (size_t count)
{
return CPU_ALLOC (count);
@@ -3488,33 +3492,33 @@ __gnat_cpu_alloc_size (size_t count)
}
void
-__gnat_cpu_free (cpu_set_t *set)
+__gnat_cpu_free (void *set)
{
- CPU_FREE (set);
+ CPU_FREE ((cpu_set_t *) set);
}
void
-__gnat_cpu_zero (size_t count, cpu_set_t *set)
+__gnat_cpu_zero (size_t count, void *set)
{
- CPU_ZERO_S (count, set);
+ CPU_ZERO_S (count, (cpu_set_t *) set);
}
void
-__gnat_cpu_set (int cpu, size_t count, cpu_set_t *set)
+__gnat_cpu_set (int cpu, size_t count, void *set)
{
/* Ada handles CPU numbers starting from 1, while C identifies the first
CPU by a 0, so we need to adjust. */
- CPU_SET_S (cpu - 1, count, set);
+ CPU_SET_S (cpu - 1, count, (cpu_set_t *) set);
}
#else /* !CPU_ALLOC */
/* Static cpu sets */
-cpu_set_t *
+void *
__gnat_cpu_alloc (size_t count ATTRIBUTE_UNUSED)
{
- return (cpu_set_t *) xmalloc (sizeof (cpu_set_t));
+ return xmalloc (sizeof (cpu_set_t));
}
size_t
@@ -3524,23 +3528,23 @@ __gnat_cpu_alloc_size (size_t count ATTRIBUTE_UNUSED)
}
void
-__gnat_cpu_free (cpu_set_t *set)
+__gnat_cpu_free (void *set)
{
free (set);
}
void
-__gnat_cpu_zero (size_t count ATTRIBUTE_UNUSED, cpu_set_t *set)
+__gnat_cpu_zero (size_t count ATTRIBUTE_UNUSED, void *set)
{
- CPU_ZERO (set);
+ CPU_ZERO ((cpu_set_t *) set);
}
void
-__gnat_cpu_set (int cpu, size_t count ATTRIBUTE_UNUSED, cpu_set_t *set)
+__gnat_cpu_set (int cpu, size_t count ATTRIBUTE_UNUSED, void *set)
{
/* Ada handles CPU numbers starting from 1, while C identifies the first
CPU by a 0, so we need to adjust. */
- CPU_SET (cpu - 1, set);
+ CPU_SET (cpu - 1, (cpu_set_t *) set);
}
#endif /* !CPU_ALLOC */
#endif /* __linux__ */
diff --git a/gcc/ada/adaint.h b/gcc/ada/adaint.h
index 0cbfd0e15..f97ed905b 100644
--- a/gcc/ada/adaint.h
+++ b/gcc/ada/adaint.h
@@ -319,13 +319,11 @@ extern void *__gnat_lwp_self (void);
/* Routines for interface to required CPU set primitives */
-#include <sched.h>
-
-extern cpu_set_t *__gnat_cpu_alloc (size_t);
+extern void * __gnat_cpu_alloc (size_t);
extern size_t __gnat_cpu_alloc_size (size_t);
-extern void __gnat_cpu_free (cpu_set_t *);
-extern void __gnat_cpu_zero (size_t, cpu_set_t *);
-extern void __gnat_cpu_set (int, size_t, cpu_set_t *);
+extern void __gnat_cpu_free (void *);
+extern void __gnat_cpu_zero (size_t, void *);
+extern void __gnat_cpu_set (int, size_t, void *);
#endif
#if defined (_WIN32)
diff --git a/gcc/ada/terminals.c b/gcc/ada/terminals.c
index 05af82c27..626ac35bc 100644
--- a/gcc/ada/terminals.c
+++ b/gcc/ada/terminals.c
@@ -1134,7 +1134,7 @@ __gnat_setup_winsize (void *desc ATTRIBUTE_UNUSED,
/* POSIX does not specify how to open the master side of a terminal.Several
methods are available (system specific):
1- using a cloning device (USE_CLONE_DEVICE)
- 2- getpt (USE_GETPT)
+ 2- posix_openpt (USE_POSIX_OPENPT)
3- openpty (USE_OPENPTY)
When using the cloning device method, the macro USE_CLONE_DEVICE should
@@ -1148,7 +1148,7 @@ __gnat_setup_winsize (void *desc ATTRIBUTE_UNUSED,
#if defined (__APPLE__) || defined (BSD)
#define USE_OPENPTY
#elif defined (__linux__)
-#define USE_GETPT
+#define USE_POSIX_OPENPT
#elif defined (__sun__)
#define USE_CLONE_DEVICE "/dev/ptmx"
#elif defined (_AIX)
@@ -1197,8 +1197,8 @@ allocate_pty_desc (pty_desc **desc) {
int master_fd = -1;
char *slave_name = NULL;
-#ifdef USE_GETPT
- master_fd = getpt ();
+#if defined(USE_POSIX_OPENPT)
+ master_fd = posix_openpt(O_RDWR | O_NOCTTY);
#elif defined (USE_OPENPTY)
status = openpty (&master_fd, &slave_fd, NULL, NULL, NULL);
#elif defined (USE_CLONE_DEVICE)
@@ -1,256 +0,0 @@
From 7b50823d8a4131e5a55d2499a0f5a52b3d91eed2 Mon Sep 17 00:00:00 2001
From: Drew DeVault <sir@cmpwn.com>
Date: Wed, 9 Dec 2020 07:42:06 +0000
Subject: [PATCH 27/35] configure: Add --enable-autolink-libatomic, use in
LINK_GCC_C_SEQUENCE_SPEC [PR81358]
This fixes issues with RISC-V.
---
Makefile.in | 1 +
gcc/config.in | 6 ++++++
gcc/config/gnu-user.h | 12 +++++++++++-
gcc/configure | 31 ++++++++++++++++++++++++++++++-
gcc/configure.ac | 21 +++++++++++++++++++++
gcc/doc/install.texi | 8 ++++++++
gcc/doc/tm.texi | 8 +++++++-
gcc/doc/tm.texi.in | 8 +++++++-
gcc/gcc.cc | 12 +++++++++++-
9 files changed, 102 insertions(+), 5 deletions(-)
diff --git a/Makefile.in b/Makefile.in
index 6ff2b3f9925..394b105b271 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -235,6 +235,7 @@ HOST_EXPORTS = \
RANLIB_FOR_TARGET="$(RANLIB_FOR_TARGET)"; export RANLIB_FOR_TARGET; \
READELF_FOR_TARGET="$(READELF_FOR_TARGET)"; export READELF_FOR_TARGET; \
TOPLEVEL_CONFIGURE_ARGUMENTS="$(TOPLEVEL_CONFIGURE_ARGUMENTS)"; export TOPLEVEL_CONFIGURE_ARGUMENTS; \
+ TARGET_CONFIGDIRS="$(TARGET_CONFIGDIRS)"; export TARGET_CONFIGDIRS; \
HOST_LIBS="$(STAGE1_LIBS)"; export HOST_LIBS; \
GMPLIBS="$(HOST_GMPLIBS)"; export GMPLIBS; \
GMPINC="$(HOST_GMPINC)"; export GMPINC; \
diff --git a/gcc/config.in b/gcc/config.in
index 0679fbbf4c6..ee81139b385 100644
--- a/gcc/config.in
+++ b/gcc/config.in
@@ -118,6 +118,12 @@
#endif
+/* Define if libatomic should always be linked. */
+#ifndef USED_FOR_TARGET
+#undef ENABLE_AUTOLINK_LIBATOMIC
+#endif
+
+
/* Define to 1 to specify that we are using the BID decimal floating point
format instead of DPD */
#ifndef USED_FOR_TARGET
diff --git a/gcc/config/gnu-user.h b/gcc/config/gnu-user.h
index b26b17f2f2a..3f64ea46180 100644
--- a/gcc/config/gnu-user.h
+++ b/gcc/config/gnu-user.h
@@ -109,8 +109,18 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
#define LINK_EH_SPEC "%{!static|static-pie:--eh-frame-hdr} "
#endif
+#if !defined(LINK_LIBATOMIC_SPEC) && defined(ENABLE_AUTOLINK_LIBATOMIC)
+# ifdef LD_AS_NEEDED_OPTION
+# define LINK_LIBATOMIC_SPEC LD_AS_NEEDED_OPTION " -latomic " LD_NO_AS_NEEDED_OPTION
+# else
+# define LINK_LIBATOMIC_SPEC "-latomic"
+# endif
+#elif !defined(LINK_LIBATOMIC_SPEC)
+# define LINK_LIBATOMIC_SPEC ""
+#endif
+
#define GNU_USER_TARGET_LINK_GCC_C_SEQUENCE_SPEC \
- "%{static|static-pie:--start-group} %G %{!nolibc:%L} \
+ "%{static|static-pie:--start-group} %G %{!nolibc:" LINK_LIBATOMIC_SPEC " %L} \
%{static|static-pie:--end-group}%{!static:%{!static-pie:%G}}"
#undef LINK_GCC_C_SEQUENCE_SPEC
diff --git a/gcc/configure b/gcc/configure
index e59cbee1767..787c35d4e25 100755
--- a/gcc/configure
+++ b/gcc/configure
@@ -984,6 +984,7 @@ with_changes_root_url
enable_languages
with_multilib_list
with_multilib_generator
+enable_autolink_libatomic
with_zstd
with_zstd_include
with_zstd_lib
@@ -1713,6 +1714,9 @@ Optional Features:
--disable-shared don't provide a shared libgcc
--disable-gcov don't provide libgcov and related host tools
--enable-languages=LIST specify which front-ends to build
+ --enable-autolink-libatomic
+ enable automatic linking of libatomic (ignored if
+ not built)
--disable-rpath do not hardcode runtime library paths
--enable-sjlj-exceptions
arrange to use setjmp/longjmp exception handling
@@ -8329,7 +8333,6 @@ else
fi
-
# Check whether --with-multilib-generator was given.
if test "${with_multilib_generator+set}" = set; then :
withval=$with_multilib_generator; :
@@ -8337,6 +8340,32 @@ else
with_multilib_generator=default
fi
+# If libatomic is available, whether it should be linked automatically
+# Check whether --enable-autolink-libatomic was given.
+if test "${enable_autolink_libatomic+set}" = set; then :
+ enableval=$enable_autolink_libatomic;
+ case $enable_autolink_libatomic in
+ yes | no) ;;
+ *) as_fn_error $? "'$enable_autolink_libatomic' is an invalid value for
+--enable-autolink-libatomic. Valid choices are 'yes' and 'no'." "$LINENO" 5 ;;
+ esac
+
+else
+ enable_autolink_libatomic=''
+fi
+
+
+if test x$enable_autolink_libatomic = xyes; then
+ if echo " ${TARGET_CONFIGDIRS} " | grep " libatomic " > /dev/null 2>&1 ; then
+
+$as_echo "#define ENABLE_AUTOLINK_LIBATOMIC 1" >>confdefs.h
+
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libatomic is not build for this target, --enable-autolink-libatomic ignored" >&5
+$as_echo "$as_me: WARNING: libatomic is not build for this target, --enable-autolink-libatomic ignored" >&2;}
+ fi
+fi
+
# -------------------------
# Checks for other programs
diff --git a/gcc/configure.ac b/gcc/configure.ac
index 57268319de1..56bcaa87620 100644
--- a/gcc/configure.ac
+++ b/gcc/configure.ac
@@ -1199,6 +1199,27 @@ AC_ARG_WITH(multilib-generator,
:,
with_multilib_generator=default)
+# If libatomic is available, whether it should be linked automatically
+AC_ARG_ENABLE(autolink-libatomic,
+[AS_HELP_STRING([--enable-autolink-libatomic],
+ [enable automatic linking of libatomic (ignored if not built)])],
+[
+ case $enable_autolink_libatomic in
+ yes | no) ;;
+ *) AC_MSG_ERROR(['$enable_autolink_libatomic' is an invalid value for
+--enable-autolink-libatomic. Valid choices are 'yes' and 'no'.]) ;;
+ esac
+], [enable_autolink_libatomic=''])
+
+if test x$enable_autolink_libatomic = xyes; then
+ if echo " ${TARGET_CONFIGDIRS} " | grep " libatomic " > /dev/null 2>&1 ; then
+ AC_DEFINE(ENABLE_AUTOLINK_LIBATOMIC, 1,
+ [Define if libatomic should always be linked.])
+ else
+ AC_MSG_WARN([libatomic is not build for this target, --enable-autolink-libatomic ignored])
+ fi
+fi
+
# -------------------------
# Checks for other programs
# -------------------------
diff --git a/gcc/doc/install.texi b/gcc/doc/install.texi
index b30d3691fe6..ccc8e5dbb00 100644
--- a/gcc/doc/install.texi
+++ b/gcc/doc/install.texi
@@ -2377,6 +2377,14 @@ files, but these changed header paths may conflict with some compilation
environments. Enabled by default, and may be disabled using
@option{--disable-canonical-system-headers}.
+@item --enable-autolink-libatomic
+@itemx --disable-autolink-libatomic
+Tell GCC that it should automatically link libatomic; if supported by
+the linker, the file is only linked as needed. This flag is ignored
+when libatomic is not built. Note that this conigure flag is in particular
+useful when building an offloading-target compiler; as for those, a
+user had to specify @code{-foffload=target=-latomic} otherwise.
+
@item --with-glibc-version=@var{major}.@var{minor}
Tell GCC that when the GNU C Library (glibc) is used on the target it
will be version @var{major}.@var{minor} or later. Normally this can
diff --git a/gcc/doc/tm.texi b/gcc/doc/tm.texi
index a660e33739b..6183c407a2b 100644
--- a/gcc/doc/tm.texi
+++ b/gcc/doc/tm.texi
@@ -381,7 +381,13 @@ the argument @option{-lgcc} to tell the linker to do the search.
@defmac LINK_GCC_C_SEQUENCE_SPEC
The sequence in which libgcc and libc are specified to the linker.
-By default this is @code{%G %L %G}.
+By default this is @code{%G LINK_LIBATOMIC_SPEC %L %G}.
+@end defmac
+
+@defmac LINK_LIBATOMIC_SPEC
+This macro is used in the default @code{LINK_GCC_C_SEQUENCE_SPEC} to link
+libatomic. By default, it is unset unless @code{ENABLE_AUTOLINK_LIBATOMIC}
+is set.
@end defmac
@defmac POST_LINK_SPEC
diff --git a/gcc/doc/tm.texi.in b/gcc/doc/tm.texi.in
index f7ab5d48a63..281540aba68 100644
--- a/gcc/doc/tm.texi.in
+++ b/gcc/doc/tm.texi.in
@@ -381,7 +381,13 @@ the argument @option{-lgcc} to tell the linker to do the search.
@defmac LINK_GCC_C_SEQUENCE_SPEC
The sequence in which libgcc and libc are specified to the linker.
-By default this is @code{%G %L %G}.
+By default this is @code{%G LINK_LIBATOMIC_SPEC %L %G}.
+@end defmac
+
+@defmac LINK_LIBATOMIC_SPEC
+This macro is used in the default @code{LINK_GCC_C_SEQUENCE_SPEC} to link
+libatomic. By default, it is unset unless @code{ENABLE_AUTOLINK_LIBATOMIC}
+is set.
@end defmac
@defmac POST_LINK_SPEC
diff --git a/gcc/gcc.cc b/gcc/gcc.cc
index 59390fd39d6..dae1dd4cf79 100644
--- a/gcc/gcc.cc
+++ b/gcc/gcc.cc
@@ -974,13 +974,23 @@ proper position among the other output files. */
# define ASM_DEBUG_OPTION_SPEC ""
#endif
+#if !defined(LINK_LIBATOMIC_SPEC) && defined(ENABLE_AUTOLINK_LIBATOMIC)
+# ifdef LD_AS_NEEDED_OPTION
+# define LINK_LIBATOMIC_SPEC LD_AS_NEEDED_OPTION " -latomic " LD_NO_AS_NEEDED_OPTION
+# else
+# define LINK_LIBATOMIC_SPEC "-latomic"
+# endif
+#elif !defined(LINK_LIBATOMIC_SPEC)
+# define LINK_LIBATOMIC_SPEC ""
+#endif
+
/* Here is the spec for running the linker, after compiling all files. */
/* This is overridable by the target in case they need to specify the
-lgcc and -lc order specially, yet not require them to override all
of LINK_COMMAND_SPEC. */
#ifndef LINK_GCC_C_SEQUENCE_SPEC
-#define LINK_GCC_C_SEQUENCE_SPEC "%G %{!nolibc:%L %G}"
+#define LINK_GCC_C_SEQUENCE_SPEC "%G %{!nolibc:" LINK_LIBATOMIC_SPEC " %L %G}"
#endif
#ifdef ENABLE_DEFAULT_SSP
--
2.41.0
@@ -1,57 +0,0 @@
From 5bbbd320e54ab5341cfba83e8af98685131caba1 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?S=C3=B6ren=20Tempel?= <soeren+git@soeren-tempel.net>
Date: Sun, 29 Aug 2021 12:23:34 +0200
Subject: [PATCH 28/35] configure: fix detection of atomic builtins in
libatomic configure script
Alpine's --enable-autolink-libatomic (which is enabled for riscv64 by
default) causes the libatomic configure script to incorrectly detect
which builtins are available on riscv64. This then causes incorrect code
generation for libatomic since it assumes compiler builtins to be
available which are not actually available on riscv64.
This commit fixes this issue by disabling linking of libatomic configure
test code entirely, thereby preventing linking against libatomic.
See:
* https://gitlab.alpinelinux.org/alpine/aports/-/issues/12948
* https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101996#c6
---
libatomic/configure.tgt | 20 ++++++++++++++++++++
1 file changed, 20 insertions(+)
diff --git a/libatomic/configure.tgt b/libatomic/configure.tgt
index a92ae9e8309..90b579ca4d8 100644
--- a/libatomic/configure.tgt
+++ b/libatomic/configure.tgt
@@ -30,6 +30,26 @@
# on ${target_cpu}. For example to allow proper use of multilibs.
configure_tgt_pre_target_cpu_XCFLAGS="${XCFLAGS}"
+# The libatomic configure script performs several checks to determine
+# whether builtins for atomic operations are available. When compiling
+# with --enable-autolink-libatomic the test code compiled by the
+# configure script is also linked against libatomic. This causes it
+# to think that builtins are available, even if there are not, since
+# the tested symbols are provided by libatomic.
+#
+# This is a hack to ensure that we don't link against libatomic by not
+# linking any configure test code at all when --enable-autolink-libatomic
+# is given.
+#
+# See:
+#
+# * https://gitlab.alpinelinux.org/alpine/aports/-/issues/12817
+# * https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101996#c4
+#
+if test x$enable_autolink_libatomic = xyes; then
+ gcc_no_link=yes
+fi
+
case "${target_cpu}" in
alpha*)
# fenv.c needs this option to generate inexact exceptions.
--
2.41.0
@@ -1,27 +0,0 @@
From 430c701a3cefbe09a9c7c8a2f5bbe957f9b2ecb2 Mon Sep 17 00:00:00 2001
From: Samuel Holland <samuel@sholland.org>
Date: Thu, 30 Jun 2022 16:44:51 +0000
Subject: [PATCH 29/35] libstdc++: do not throw exceptions for non-C locales on
musl targets
---
libstdc++-v3/config/locale/generic/c_locale.cc | 3 ---
1 file changed, 3 deletions(-)
diff --git a/libstdc++-v3/config/locale/generic/c_locale.cc b/libstdc++-v3/config/locale/generic/c_locale.cc
index 8849d78fdfa..aff467f98fe 100644
--- a/libstdc++-v3/config/locale/generic/c_locale.cc
+++ b/libstdc++-v3/config/locale/generic/c_locale.cc
@@ -242,9 +242,6 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
// Currently, the generic model only supports the "C" locale.
// See http://gcc.gnu.org/ml/libstdc++/2003-02/msg00345.html
__cloc = 0;
- if (strcmp(__s, "C"))
- __throw_runtime_error(__N("locale::facet::_S_create_c_locale "
- "name not valid"));
}
void
--
2.41.0
@@ -1,27 +0,0 @@
From 05f0043755f341a2ff4f845379327076b3e0203d Mon Sep 17 00:00:00 2001
From: Mathias LANG <pro.mathias.lang@gmail.com>
Date: Mon, 17 Jan 2022 03:49:21 +0000
Subject: [PATCH 30/35] gdc: unconditionally link libgphobos against
libucontext
ref: alpine/aports#13422
---
Makefile.in | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Makefile.in b/Makefile.in
index 394b105b271..bc4a77fc300 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -52809,7 +52809,7 @@ configure-target-libphobos:
esac; \
module_srcdir=libphobos; \
rm -f no-such-file || : ; \
- CONFIG_SITE=no-such-file $(SHELL) \
+ CONFIG_SITE=no-such-file LIBS="-lucontext $$LIBS" $(SHELL) \
$$s/$$module_srcdir/configure \
--srcdir=$${topdir}/$$module_srcdir \
$(TARGET_CONFIGARGS) --build=${build_alias} --host=${target_alias} \
--
2.41.0
@@ -1,54 +0,0 @@
From 0b89a74fbf77ae6917f043c79cd03db0d6ef0212 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?S=C3=B6ren=20Tempel?= <soeren+git@soeren-tempel.net>
Date: Sat, 16 Jul 2022 09:21:11 +0200
Subject: [PATCH 31/35] druntime: link against libucontext on all platforms
On musl-based Linux distributions, swapcontext etc. are not provided by
musl but instead by libucontext. Hence, we _always_ need to link against
an external library for these functions.
---
libphobos/configure | 8 --------
libphobos/m4/druntime/libraries.m4 | 8 --------
2 files changed, 16 deletions(-)
diff --git a/libphobos/configure b/libphobos/configure
index 925c53c5f5e..60c2a0c11c6 100755
--- a/libphobos/configure
+++ b/libphobos/configure
@@ -15216,14 +15216,6 @@ fi
# Keep this in sync with core/thread.d, set druntime_fiber_asm_external to
# "yes" for targets that have 'version = AsmExternal'.
druntime_fiber_asm_external=no
- case "$target_cpu" in
- aarch64* | \
- arm* | \
- i[34567]86|x86_64 | \
- powerpc)
- druntime_fiber_asm_external=yes
- ;;
- esac
if test "$druntime_fiber_asm_external" = no; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing swapcontext" >&5
$as_echo_n "checking for library containing swapcontext... " >&6; }
diff --git a/libphobos/m4/druntime/libraries.m4 b/libphobos/m4/druntime/libraries.m4
index 45a56f6f76a..fef6e890b1e 100644
--- a/libphobos/m4/druntime/libraries.m4
+++ b/libphobos/m4/druntime/libraries.m4
@@ -220,14 +220,6 @@ AC_DEFUN([DRUNTIME_LIBRARIES_UCONTEXT],
# Keep this in sync with core/thread.d, set druntime_fiber_asm_external to
# "yes" for targets that have 'version = AsmExternal'.
druntime_fiber_asm_external=no
- case "$target_cpu" in
- aarch64* | \
- arm* | \
- i[[34567]]86|x86_64 | \
- powerpc)
- druntime_fiber_asm_external=yes
- ;;
- esac
if test "$druntime_fiber_asm_external" = no; then
AC_SEARCH_LIBS([swapcontext], [c ucontext], [],
AC_MSG_ERROR([swapcontext required but not found]))
--
2.41.0
@@ -1,25 +0,0 @@
From eeec799f43fbd0bfffc13594585b39d708972511 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?S=C3=B6ren=20Tempel?= <soeren+git@soeren-tempel.net>
Date: Tue, 19 Jul 2022 14:54:07 +0200
Subject: [PATCH 32/35] libgnat: time_t is always 64-bit on musl libc
---
gcc/ada/libgnat/s-parame.ads | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gcc/ada/libgnat/s-parame.ads b/gcc/ada/libgnat/s-parame.ads
index 3d6e345a1ba..cfe0b4d3ca6 100644
--- a/gcc/ada/libgnat/s-parame.ads
+++ b/gcc/ada/libgnat/s-parame.ads
@@ -102,7 +102,7 @@ package System.Parameters is
-- Characteristics of time_t type --
------------------------------------
- time_t_bits : constant := Long_Integer'Size;
+ time_t_bits : constant := Long_Long_Integer'Size;
-- Number of bits in type time_t
----------------------------------------------
--
2.41.0
@@ -1,44 +0,0 @@
From b71d21b87e6946c763edad5e420bf22d8a453077 Mon Sep 17 00:00:00 2001
From: psykose <alice@ayaya.dev>
Date: Mon, 29 May 2023 15:33:11 +0000
Subject: [PATCH 33/35] libphobos: do not use LFS64 symbols
musl does not have these since 1.2.4, we can't use the compat interfaces.
---
libphobos/libdruntime/core/sys/posix/config.d | 2 +-
libphobos/libdruntime/core/sys/posix/sys/mman.d | 6 +-----
2 files changed, 2 insertions(+), 6 deletions(-)
diff --git a/libphobos/libdruntime/core/sys/posix/config.d b/libphobos/libdruntime/core/sys/posix/config.d
index ae6752f220e..6b80d1ff0e6 100644
--- a/libphobos/libdruntime/core/sys/posix/config.d
+++ b/libphobos/libdruntime/core/sys/posix/config.d
@@ -88,7 +88,7 @@ else version (CRuntime_Musl)
enum __REDIRECT = false;
// Those three are irrelevant for Musl as it always uses 64 bits off_t
- enum __USE_FILE_OFFSET64 = _FILE_OFFSET_BITS == 64;
+ enum __USE_FILE_OFFSET64 = false;
enum __USE_LARGEFILE = __USE_FILE_OFFSET64 && !__REDIRECT;
enum __USE_LARGEFILE64 = __USE_FILE_OFFSET64 && !__REDIRECT;
diff --git a/libphobos/libdruntime/core/sys/posix/sys/mman.d b/libphobos/libdruntime/core/sys/posix/sys/mman.d
index 0d3d517d69a..323aa0af72d 100644
--- a/libphobos/libdruntime/core/sys/posix/sys/mman.d
+++ b/libphobos/libdruntime/core/sys/posix/sys/mman.d
@@ -293,11 +293,7 @@ else version (CRuntime_Bionic)
}
else version (CRuntime_Musl)
{
- static if (__USE_LARGEFILE64) void* mmap64(void*, size_t, int, int, int, off_t);
- static if (__USE_FILE_OFFSET64)
- alias mmap = mmap64;
- else
- void* mmap(void*, size_t, int, int, int, off_t);
+ void* mmap(void*, size_t, int, int, int, off_t);
int munmap(void*, size_t);
}
else version (CRuntime_UClibc)
--
2.41.0
@@ -1,195 +0,0 @@
From 4bfcb35bc43d3e3b7510620362d7c28d9e4c17ca Mon Sep 17 00:00:00 2001
From: psykose <alice@ayaya.dev>
Date: Mon, 10 Jul 2023 23:23:29 +0000
Subject: [PATCH 34/35] libgo: fix lfs64 use
---
.../go/internal/syscall/unix/at_largefile.go | 2 +-
libgo/go/os/dir_largefile.go | 2 +-
libgo/go/syscall/libcall_glibc.go | 2 +-
libgo/go/syscall/libcall_linux.go | 4 +--
libgo/go/syscall/libcall_posix_largefile.go | 26 +++++++++----------
libgo/runtime/go-varargs.c | 2 +-
libgo/sysinfo.c | 9 +++----
7 files changed, 22 insertions(+), 25 deletions(-)
diff --git a/libgo/go/internal/syscall/unix/at_largefile.go b/libgo/go/internal/syscall/unix/at_largefile.go
index 82e0dcfd074..16151ecad1b 100644
--- a/libgo/go/internal/syscall/unix/at_largefile.go
+++ b/libgo/go/internal/syscall/unix/at_largefile.go
@@ -10,5 +10,5 @@ import (
"syscall"
)
-//extern fstatat64
+//extern fstatat
func fstatat(int32, *byte, *syscall.Stat_t, int32) int32
diff --git a/libgo/go/os/dir_largefile.go b/libgo/go/os/dir_largefile.go
index 1fc5ee0771f..0c6dffe1a75 100644
--- a/libgo/go/os/dir_largefile.go
+++ b/libgo/go/os/dir_largefile.go
@@ -11,5 +11,5 @@ package os
import "syscall"
-//extern readdir64
+//extern readdir
func libc_readdir(*syscall.DIR) *syscall.Dirent
diff --git a/libgo/go/syscall/libcall_glibc.go b/libgo/go/syscall/libcall_glibc.go
index 5c1ec483c75..5a1245ed44b 100644
--- a/libgo/go/syscall/libcall_glibc.go
+++ b/libgo/go/syscall/libcall_glibc.go
@@ -114,7 +114,7 @@ func Pipe2(p []int, flags int) (err error) {
}
//sys sendfile(outfd int, infd int, offset *Offset_t, count int) (written int, err error)
-//sendfile64(outfd _C_int, infd _C_int, offset *Offset_t, count Size_t) Ssize_t
+//sendfile(outfd _C_int, infd _C_int, offset *Offset_t, count Size_t) Ssize_t
func Sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) {
if race.Enabled {
diff --git a/libgo/go/syscall/libcall_linux.go b/libgo/go/syscall/libcall_linux.go
index 03ca7261b59..ad21fd0b3ac 100644
--- a/libgo/go/syscall/libcall_linux.go
+++ b/libgo/go/syscall/libcall_linux.go
@@ -158,7 +158,7 @@ func Reboot(cmd int) (err error) {
//adjtimex(buf *Timex) _C_int
//sys Fstatfs(fd int, buf *Statfs_t) (err error)
-//fstatfs64(fd _C_int, buf *Statfs_t) _C_int
+//fstatfs(fd _C_int, buf *Statfs_t) _C_int
func Gettid() (tid int) {
r1, _, _ := Syscall(SYS_GETTID, 0, 0, 0)
@@ -245,7 +245,7 @@ func Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n i
}
//sys Statfs(path string, buf *Statfs_t) (err error)
-//statfs64(path *byte, buf *Statfs_t) _C_int
+//statfs(path *byte, buf *Statfs_t) _C_int
//sysnb Sysinfo(info *Sysinfo_t) (err error)
//sysinfo(info *Sysinfo_t) _C_int
diff --git a/libgo/go/syscall/libcall_posix_largefile.go b/libgo/go/syscall/libcall_posix_largefile.go
index f90055bb29a..334212f0af1 100644
--- a/libgo/go/syscall/libcall_posix_largefile.go
+++ b/libgo/go/syscall/libcall_posix_largefile.go
@@ -10,40 +10,40 @@
package syscall
//sys Creat(path string, mode uint32) (fd int, err error)
-//creat64(path *byte, mode Mode_t) _C_int
+//creat(path *byte, mode Mode_t) _C_int
//sys Fstat(fd int, stat *Stat_t) (err error)
-//fstat64(fd _C_int, stat *Stat_t) _C_int
+//fstat(fd _C_int, stat *Stat_t) _C_int
//sys Ftruncate(fd int, length int64) (err error)
-//ftruncate64(fd _C_int, length Offset_t) _C_int
+//ftruncate(fd _C_int, length Offset_t) _C_int
//sysnb Getrlimit(resource int, rlim *Rlimit) (err error)
-//getrlimit64(resource _C_int, rlim *Rlimit) _C_int
+//getrlimit(resource _C_int, rlim *Rlimit) _C_int
//sys Lstat(path string, stat *Stat_t) (err error)
-//lstat64(path *byte, stat *Stat_t) _C_int
+//lstat(path *byte, stat *Stat_t) _C_int
//sys mmap(addr uintptr, length uintptr, prot int, flags int, fd int, offset int64) (xaddr uintptr, err error)
-//mmap64(addr *byte, length Size_t, prot _C_int, flags _C_int, fd _C_int, offset Offset_t) *byte
+//mmap(addr *byte, length Size_t, prot _C_int, flags _C_int, fd _C_int, offset Offset_t) *byte
//sys Open(path string, mode int, perm uint32) (fd int, err error)
-//__go_open64(path *byte, mode _C_int, perm Mode_t) _C_int
+//__go_open(path *byte, mode _C_int, perm Mode_t) _C_int
//sys Pread(fd int, p []byte, offset int64) (n int, err error)
-//pread64(fd _C_int, buf *byte, count Size_t, offset Offset_t) Ssize_t
+//pread(fd _C_int, buf *byte, count Size_t, offset Offset_t) Ssize_t
//sys Pwrite(fd int, p []byte, offset int64) (n int, err error)
-//pwrite64(fd _C_int, buf *byte, count Size_t, offset Offset_t) Ssize_t
+//pwrite(fd _C_int, buf *byte, count Size_t, offset Offset_t) Ssize_t
//sys Seek(fd int, offset int64, whence int) (off int64, err error)
-//lseek64(fd _C_int, offset Offset_t, whence _C_int) Offset_t
+//lseek(fd _C_int, offset Offset_t, whence _C_int) Offset_t
//sysnb Setrlimit(resource int, rlim *Rlimit) (err error)
-//setrlimit64(resource int, rlim *Rlimit) _C_int
+//setrlimit(resource int, rlim *Rlimit) _C_int
//sys Stat(path string, stat *Stat_t) (err error)
-//stat64(path *byte, stat *Stat_t) _C_int
+//stat(path *byte, stat *Stat_t) _C_int
//sys Truncate(path string, length int64) (err error)
-//truncate64(path *byte, length Offset_t) _C_int
+//truncate(path *byte, length Offset_t) _C_int
diff --git a/libgo/runtime/go-varargs.c b/libgo/runtime/go-varargs.c
index f84860891e6..7efc9615985 100644
--- a/libgo/runtime/go-varargs.c
+++ b/libgo/runtime/go-varargs.c
@@ -84,7 +84,7 @@ __go_ioctl_ptr (int d, int request, void *arg)
int
__go_open64 (char *path, int mode, mode_t perm)
{
- return open64 (path, mode, perm);
+ return open (path, mode, perm);
}
#endif
diff --git a/libgo/sysinfo.c b/libgo/sysinfo.c
index 180f5c31d74..1d717d55c0e 100644
--- a/libgo/sysinfo.c
+++ b/libgo/sysinfo.c
@@ -366,7 +366,7 @@ typedef loff_t libgo_loff_t_type;
#endif
#if defined(HAVE_OFF64_T)
-typedef off64_t libgo_off_t_type;
+typedef off_t libgo_off_t_type;
#else
typedef off_t libgo_off_t_type;
#endif
@@ -398,13 +398,11 @@ typedef off_t libgo_off_t_type;
// From dirent.h
SREF(dirent);
-SREF(dirent64);
OTREF(DIR);
EREF(DT_UNKNOWN);
// From fcntl.h
SREF(flock);
-SREF(flock64);
// From ffi headers
SREF(_ffi_type);
@@ -485,11 +483,10 @@ EREF(SS_ONSTACK);
EREF(SEGV_MAPERR);
// From stat.h
-SREF(stat64);
+SREF(stat);
// From statfs.h
SREF(statfs);
-SREF(statfs64);
// From sysinfo.h
SREF(sysinfo);
@@ -519,7 +516,7 @@ EREF(PTRACE_PEEKTEXT);
// From sys/resource.h
SREF(rusage);
-SREF(rlimit64);
+SREF(rlimit);
EREF(RLIMIT_NOFILE);
EREF(PRIO_USER);
EREF(RUSAGE_SELF);
--
2.41.0
@@ -1,32 +0,0 @@
From c4f484f465a32e796ae384aa3f90e79fa218b4e9 Mon Sep 17 00:00:00 2001
From: Jingyun Hua <huajingyun@loongson.cn>
Date: Mon, 7 Aug 2023 15:25:58 +0800
Subject: [PATCH] loongarch disable multilib support
Signed-off-by: Jingyun Hua <huajingyun@loongson.cn>
---
gcc/config/loongarch/t-linux | 11 +++--------
1 file changed, 3 insertions(+), 8 deletions(-)
diff --git a/gcc/config/loongarch/t-linux b/gcc/config/loongarch/t-linux
index 23e1fb979..c2753abb8 100644
--- a/gcc/config/loongarch/t-linux
+++ b/gcc/config/loongarch/t-linux
@@ -21,11 +21,6 @@ MULTIOSDIR_lp64f := ../lib64/f32$(call if_multiarch,:loongarch64-linux-gnuf32)
MULTIOSDIR_lp64s := ../lib64/sf$(call if_multiarch,:loongarch64-linux-gnusf)
# Don't define MULTILIB_OSDIRNAMES if multilib is disabled.
-ifeq ($(filter LA_DISABLE_MULTILIB,$(tm_defines)),)
-
- MULTILIB_OSDIRNAMES = .=$(MULTIOSDIR_$(mlib_default))
- MULTILIB_OSDIRNAMES += mabi.lp64d=$(MULTIOSDIR_lp64d)
- MULTILIB_OSDIRNAMES += mabi.lp64f=$(MULTIOSDIR_lp64f)
- MULTILIB_OSDIRNAMES += mabi.lp64s=$(MULTIOSDIR_lp64s)
-
-endif
+ MULTILIB_OSDIRNAMES = mabi.lp64d=../lib
+ MULTILIB_OSDIRNAMES += mabi.lp64f=../lib
+ MULTILIB_OSDIRNAMES += mabi.lp64s=../lib
--
2.41.0
@@ -1,87 +0,0 @@
From: Celeste <cielesti@protonmail.com>
Date: Mon, 2 Sep 2024 02:54:17 +0000
Subject: [PATCH] libphobos: add riscv64 and loongarch64 support
Add musl support for these 2 architectures based on fenv.h and signal.h from:
https://git.musl-libc.org/cgit/musl/tree/arch/riscv64/bits?h=v1.2.5
https://git.musl-libc.org/cgit/musl/tree/arch/loongarch64/bits?h=v1.2.5
---
libphobos/libdruntime/core/stdc/fenv.d | 13 +++++++++++++
libphobos/libdruntime/core/sys/posix/signal.d | 10 ++++++++++
2 files changed, 23 insertions(+)
diff --git a/libphobos/libdruntime/core/stdc/fenv.d b/libphobos/libdruntime/core/stdc/fenv.d
index a7364c0a..5b327e4a 100644
--- a/libphobos/libdruntime/core/stdc/fenv.d
+++ b/libphobos/libdruntime/core/stdc/fenv.d
@@ -436,20 +436,33 @@ else version (CRuntime_Musl)
ushort __cs_selector;
ushort __opcode;
uint __data_offset;
ushort __data_selector;
ushort __unused5;
version (X86_64)
uint __mxcsr;
}
alias ushort fexcept_t;
}
+ else version (RISCV64)
+ {
+ alias uint fenv_t;
+ alias uint fexcept_t;
+ }
+ else version (LoongArch64)
+ {
+ struct fenv_t
+ {
+ uint __cw;
+ }
+ alias uint fexcept_t;
+ }
else
{
static assert(false, "Architecture not supported.");
}
}
else version (CRuntime_Newlib)
{
version (AArch64)
{
alias fenv_t = ulong;
diff --git a/libphobos/libdruntime/core/sys/posix/signal.d b/libphobos/libdruntime/core/sys/posix/signal.d
index a8b7f751..78d8b3cd 100644
--- a/libphobos/libdruntime/core/sys/posix/signal.d
+++ b/libphobos/libdruntime/core/sys/posix/signal.d
@@ -2751,20 +2751,30 @@ else version (CRuntime_Musl)
else version (PPC_Any)
{
enum MINSIGSTKSZ = 4096;
enum SIGSTKSZ = 10240;
}
else version (X86_Any)
{
enum MINSIGSTKSZ = 2048;
enum SIGSTKSZ = 8192;
}
+ else version (RISCV64)
+ {
+ enum MINSIGSTKSZ = 2048;
+ enum SIGSTKSZ = 8192;
+ }
+ else version (LoongArch64)
+ {
+ enum MINSIGSTKSZ = 4096;
+ enum SIGSTKSZ = 16384;
+ }
else
static assert(0, "unimplemented");
//ucontext_t (defined in core.sys.posix.ucontext)
//mcontext_t (defined in core.sys.posix.ucontext)
version (MIPS_Any)
{
struct stack_t
{
-788
View File
@@ -1,788 +0,0 @@
# Automatically generated aport, do not edit!
# Generator: pmbootstrap aportgen gcc-armhf
# Based on: main/gcc (from Alpine)
CTARGET_ARCH=armhf
CTARGET="$(arch_to_hostspec ${CTARGET_ARCH})"
LANG_D=false
LANG_OBJC=false
LANG_JAVA=false
LANG_GO=false
LANG_FORTRAN=false
LANG_ADA=false
options="!strip"
# abuild doesn't try to tries to install "build-base-$CTARGET_ARCH"
# when this variable matches "no*"
BOOTSTRAP="nobuildbase"
# abuild will only cross compile when this variable is set, but it
# needs to find a valid package database in there for dependency
# resolving, so we set it to /.
CBUILDROOT="/"
_cross_configure="--disable-bootstrap --with-sysroot=/usr/$CTARGET"
pkgname=gcc-armhf
pkgver=14.2.0
# i.e. 13.2.1, must match gcc/BASE-VER
_pkgbase="${pkgver%%_git*}"
# date component from snapshots
_pkgsnap="${pkgver##*_git}"
[ "$BOOTSTRAP" = "nolibc" ] && pkgname="gcc-pass2"
[ "$CBUILD" != "$CHOST" ] && _cross="-$CARCH" || _cross=""
[ "$CHOST" != "$CTARGET" ] && _target="-$CTARGET_ARCH" || _target=""
pkgname=gcc-armhf
pkgrel=5
pkgdesc="Stage2 cross-compiler for armhf"
url="https://gcc.gnu.org"
arch="x86_64"
license="GPL-2.0-or-later AND LGPL-2.1-or-later"
_gccrel=$pkgver-r$pkgrel
depends="binutils-armhf mpc1 so:libc.musl-x86_64.so.1 so:libgcc_s.so.1 so:libgmp.so.10 so:libisl.so.23 so:libmpc.so.3 so:libmpfr.so.6 so:libstdc++.so.6 so:libz.so.1"
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-armhf binutils-armhf"
subpackages="g++-armhf:gpp libstdc++-dev-armhf:libcxx_dev"
[ "$CHOST" = "$CTARGET" ] && subpackages="gcc-gdb gcc-doc"
replaces="libstdc++ binutils"
options="!strip !tracedeps"
: "${LANG_CXX:=true}"
: "${LANG_D:=true}"
: "${LANG_OBJC:=true}"
: "${LANG_GO:=true}"
: "${LANG_FORTRAN:=true}"
: "${LANG_ADA:=true}"
: "${LANG_JIT:=true}"
_libgomp=true
_libgcc=false
_libatomic=true
_libitm=true
if [ "$CHOST" != "$CTARGET" ]; then
if [ "$BOOTSTRAP" = nolibc ]; then
LANG_CXX=false
LANG_D=false
LANG_ADA=false
_libgcc=false
_builddir="$srcdir/build-cross-pass2"
else
_builddir="$srcdir/build-cross-final"
fi
LANG_OBJC=false
LANG_GO=false
LANG_FORTRAN=false
LANG_JIT=false
_libgomp=false
_libatomic=false
_libitm=false
# format-sec: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100431
CPPFLAGS="${CPPFLAGS/-Werror=format-security/}"
# reset target flags (should be set in crosscreate abuild)
# fixup flags. seems gcc treats CPPFLAGS as global without
# _FOR_xxx variants. wrap it in CFLAGS and CXXFLAGS.
export CFLAGS="$CPPFLAGS -g0 ${CFLAGS/-Werror=format-security/}"
export CXXFLAGS="$CPPFLAGS -g0 ${CXXFLAGS/-Werror=format-security/}"
unset CPPFLAGS
export CFLAGS_FOR_TARGET=" "
export CXXFLAGS_FOR_TARGET=" "
export LDFLAGS_FOR_TARGET=" "
STRIP_FOR_TARGET="$CTARGET-strip"
elif [ "$CBUILD" != "$CHOST" ]; then
# format-sec: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100431
CPPFLAGS="${CPPFLAGS/-Werror=format-security/}"
# fixup flags. seems gcc treats CPPFLAGS as global without
# _FOR_xxx variants. wrap it in CFLAGS and CXXFLAGS.
export CFLAGS="$CPPFLAGS -g0 ${CFLAGS/-Werror=format-security/}"
export CXXFLAGS="$CPPFLAGS -g0 ${CXXFLAGS/-Werror=format-security/}"
unset CPPFLAGS
# reset flags and cc for build
export CC_FOR_BUILD="gcc"
export CXX_FOR_BUILD="g++"
export CFLAGS_FOR_BUILD=" "
export CXXFLAGS_FOR_BUILD=" "
export LDFLAGS_FOR_BUILD=" "
export CFLAGS_FOR_TARGET=" "
export CXXFLAGS_FOR_TARGET=" "
export LDFLAGS_FOR_TARGET=" "
# Languages that do not need bootstrapping
LANG_OBJC=false
LANG_GO=false
LANG_FORTRAN=false
LANG_JIT=false
STRIP_FOR_TARGET=${CROSS_COMPILE}strip
_builddir="$srcdir/build-cross-native"
else
STRIP_FOR_TARGET=${CROSS_COMPILE}strip
_builddir="$srcdir/build"
# format-sec: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100431
CPPFLAGS="${CPPFLAGS/-Werror=format-security/}"
# pass -g0 by default to bypass -g, since we don't do debug
# if -dbg added, the -g is appended and overrides this
export CFLAGS="$CPPFLAGS -g0 ${CFLAGS/-Werror=format-security/} -O2"
export CXXFLAGS="$CPPFLAGS -g0 ${CXXFLAGS/-Werror=format-security/} -O2"
unset CPPFLAGS
# https://gcc.gnu.org/install/build.html
export CFLAGS_FOR_TARGET="$CFLAGS"
export CXXFLAGS_FOR_TARGET="$CXXFLAGS"
export LDFLAGS_FOR_TARGET="$LDFLAGS"
export BOOT_CFLAGS="$CFLAGS"
export BOOT_LDFLAGS="$LDFLAGS"
fi
case "$CTARGET_ARCH" in
# GDC hasn't been ported to PowerPC
# See libphobos/configure.tgt in GCC sources for supported targets
# riscv fails with: error: static assert "unimplemented"
ppc64le|riscv64) LANG_D=false ;;
# GDC does currently not work on 32-bit musl architectures.
# This is a known upstream issue.
# See: https://github.com/dlang/druntime/pull/3383
armhf|armv7|x86) LANG_D=false ;;
esac
# libitm has TEXTRELs in ARM build, so disable for now
case "$CTARGET_ARCH" in
arm*) _libitm=false ;;
mips*) _libitm=false ;;
riscv64) _libitm=false ;;
loongarch64) _libitm=false ;;
esac
# Internal libffi fails to build on MIPS at the moment, need to
# investigate further. We disable LANG_GO on mips64 as it requires
# the internal libffi.
case "$CTARGET_ARCH" in
mips*) LANG_GO=false ;;
loongarch64) LANG_GO=false ;;
esac
# Fortran uses libquadmath if toolchain has __float128
# currently on x86, x86_64 and ia64
_libquadmath=$LANG_FORTRAN
case "$CTARGET_ARCH" in
x86 | x86_64 | ppc64le) ;;
*) _libquadmath=false ;;
esac
# libatomic is a dependency for openvswitch
$_libatomic && subpackages="$subpackages libatomic::$CTARGET_ARCH"
$_libgcc && subpackages="$subpackages libgcc::$CTARGET_ARCH"
$_libquadmath && subpackages="$subpackages libquadmath::$CTARGET_ARCH"
if $_libgomp; then
depends="$depends libgomp=$_gccrel"
subpackages="$subpackages libgomp::$CTARGET_ARCH"
fi
case "$CTARGET_ARCH" in
riscv64|loongarch64)
LANG_ADA=false;;
esac
_languages=c
if $LANG_CXX; then
_languages="$_languages,c++"
fi
if $LANG_D; then
subpackages="$subpackages gcc-gdc$_target:gdc"
_languages="$_languages,d"
makedepends_build="$makedepends_build libucontext-dev"
if [ "$CBUILD" = "$CTARGET" ]; then
makedepends_build="$makedepends_build gcc-gdc-bootstrap"
subpackages="$subpackages libgphobos::$CTARGET_ARCH"
else
# shared libgphobos is for D programs to link against, so
# skip building that while cross-compiling the GDC compiler
makedepends_build="$makedepends_build gcc-gdc gcc-gdc$_cross"
fi
fi
if $LANG_OBJC; then
subpackages="$subpackages libobjc::$CTARGET_ARCH gcc-objc$_target:objc"
_languages="$_languages,objc"
fi
if $LANG_GO; then
subpackages="$subpackages libgo::$CTARGET_ARCH gcc-go$_target:go"
_languages="$_languages,go"
fi
if $LANG_FORTRAN; then
subpackages="$subpackages libgfortran::$CTARGET_ARCH gfortran$_target:gfortran"
_languages="$_languages,fortran"
fi
if $LANG_ADA; then
subpackages="$subpackages gcc-gnat$_target:gnat libgnat::$CTARGET_ARCH"
_languages="$_languages,ada"
if [ "$CBUILD" = "$CTARGET" ]; then
makedepends_build="$makedepends_build gcc-gnat-bootstrap"
subpackages="$subpackages libgnat-static:libgnatstatic:$CTARGET_ARCH"
else
makedepends_build="$makedepends_build gcc-gnat gcc-gnat$_cross"
fi
fi
if $LANG_JIT; then
subpackages="$subpackages libgccjit:jit libgccjit-dev:jitdev"
fi
makedepends="$makedepends_build $makedepends_host"
# when using upstream releases, use this URI template
# https://gcc.gnu.org/pub/gcc/releases/gcc-$_pkgbase/gcc-$_pkgbase.tar.xz
#
# right now, we are using a git snapshot. snapshots are taken from gcc.gnu.org/pub/gcc/snapshots.
# However, since they are periodically deleted from the GCC mirrors the utilized snapshots are
# mirrored on dev.alpinelinux.org. Please ensure that the snapshot Git commit (as stated in the
# README) matches the base commit on the version-specific branch in the Git repository below.
#
# PLEASE submit all patches to gcc to https://gitlab.alpinelinux.org/kaniini/alpine-gcc-patches,
# so that they can be properly tracked and easily rebased if needed.
#source="https://dev.alpinelinux.org/archive/gcc/${_pkgbase%%.*}-$_pkgsnap/gcc-${_pkgbase%%.*}-$_pkgsnap.tar.xz
source="https://gcc.gnu.org/pub/gcc/releases/gcc-$_pkgbase/gcc-$_pkgbase.tar.xz
0001-posix_memalign.patch
0002-gcc-poison-system-directories.patch
0003-specs-turn-on-Wl-z-now-by-default.patch
0004-Turn-on-D_FORTIFY_SOURCE-2-by-default-for-C-C-ObjC-O.patch
0005-On-linux-targets-pass-as-needed-by-default-to-the-li.patch
0006-Enable-Wformat-and-Wformat-security-by-default.patch
0007-Enable-Wtrampolines-by-default.patch
0008-Disable-ssp-on-nostdlib-nodefaultlibs-and-ffreestand.patch
0009-Ensure-that-msgfmt-doesn-t-encounter-problems-during.patch
0010-Don-t-declare-asprintf-if-defined-as-a-macro.patch
0011-libiberty-copy-PIC-objects-during-build-process.patch
0012-libgcc_s.patch
0013-nopie.patch
0014-ada-fix-shared-linking.patch
0015-build-fix-CXXFLAGS_FOR_BUILD-passing.patch
0016-add-fortify-headers-paths.patch
0017-Alpine-musl-package-provides-libssp_nonshared.a.-We-.patch
0018-DP-Use-push-state-pop-state-for-gold-as-well-when-li.patch
0019-aarch64-disable-multilib-support.patch
0020-s390x-disable-multilib-support.patch
0021-ppc64-le-disable-multilib-support.patch
0022-x86_64-disable-multilib-support.patch
0023-riscv-disable-multilib-support.patch
0024-always-build-libgcc_eh.a.patch
0025-ada-libgnarl-compatibility-for-musl.patch
0026-ada-musl-support-fixes.patch
0027-configure-Add-enable-autolink-libatomic-use-in-LINK_.patch
0028-configure-fix-detection-of-atomic-builtins-in-libato.patch
0029-libstdc-do-not-throw-exceptions-for-non-C-locales-on.patch
0030-gdc-unconditionally-link-libgphobos-against-libucont.patch
0031-druntime-link-against-libucontext-on-all-platforms.patch
0032-libgnat-time_t-is-always-64-bit-on-musl-libc.patch
0033-libphobos-do-not-use-LFS64-symbols.patch
0034-libgo-fix-lfs64-use.patch
0035-loongarch-disable-multilib-support.patch
0036-libphobos-add-riscv64-and-loongarch64-support.patch
fix-arm64.patch
ppc64le-quadmath.patch
riscv64-improve-build-time.patch
"
# secfixes:
# 13.2.1_git20231014-r0:
# - CVE-2023-4039
# we build out-of-tree
#builddir="$srcdir"/gcc-${_pkgbase%%.*}-$_pkgsnap
builddir="$srcdir"/gcc-$_pkgbase
_gcclibdir="/usr/lib/gcc/$CTARGET/$_pkgbase"
_gcclibexec="/usr/libexec/gcc/$CTARGET/$_pkgbase"
prepare() {
default_prepare
echo $_pkgbase > gcc/BASE-VER
}
build() {
local _arch_configure=
local _bootstrap_configure=
local _jit_configure=
case "$CTARGET" in
aarch64-*-*-*) _arch_configure="--with-arch=armv8-a --with-abi=lp64";;
armv5-*-*-*eabi) _arch_configure="--with-arch=armv5te --with-tune=arm926ej-s --with-float=soft --with-abi=aapcs-linux";;
armv6-*-*-*eabihf) _arch_configure="--with-arch=armv6kz --with-tune=arm1176jzf-s --with-fpu=vfpv2 --with-float=hard --with-abi=aapcs-linux";;
armv7-*-*-*eabihf) _arch_configure="--with-arch=armv7-a --with-tune=generic-armv7-a --with-fpu=vfpv3-d16 --with-float=hard --with-abi=aapcs-linux --with-mode=thumb";;
mips-*-*-*) _arch_configure="--with-arch=mips32 --with-mips-plt --with-float=soft --with-abi=32";;
mips64-*-*-*) _arch_configure="--with-arch=mips3 --with-tune=mips64 --with-mips-plt --with-float=soft --with-abi=64";;
mips64el-*-*-*) _arch_configure="--with-arch=mips3 --with-tune=mips64 --with-mips-plt --with-float=soft --with-abi=64";;
mipsel-*-*-*) _arch_configure="--with-arch=mips32 --with-mips-plt --with-float=soft --with-abi=32";;
powerpc-*-*-*) _arch_configure="--enable-secureplt --enable-decimal-float=no";;
powerpc64*-*-*-*) _arch_configure="--with-abi=elfv2 --enable-secureplt --enable-decimal-float=no --enable-targets=powerpcle-linux";;
i486-*-*-*) _arch_configure="--with-arch=i486 --with-tune=generic --enable-cld";;
i586-*-*-*) _arch_configure="--with-arch=pentium-m --with-fpmath=sse --with-tune=generic --enable-cld";;
s390x-*-*-*) _arch_configure="--with-arch=z196 --with-tune=zEC12 --with-zarch --with-long-double-128 --enable-decimal-float";;
riscv64-*-*-*) _arch_configure="--with-arch=rv64gc --with-abi=lp64d --enable-autolink-libatomic";;
loongarch64-*-*-*) _arch_configure="--with-arch=la64v1.0 --with-abi=lp64d";;
esac
case "$CTARGET_ARCH" in
mips*) _hash_style_configure="--with-linker-hash-style=sysv" ;;
*) _hash_style_configure="--with-linker-hash-style=gnu" ;;
esac
export libat_cv_have_ifunc=no
case "$BOOTSTRAP" in
nolibc) _bootstrap_configure="--with-newlib --disable-shared --enable-threads=no" ;;
*)
# cross-bootstrap GDC with a static libphobos: due to GCC's
# ./configure not having a --disable-shared=libphobos option,
# we have to use --enable-shared with everything else instead.
if $LANG_D && [ "$CBUILD" != "$CTARGET" ]; then
_bootstrap_configure="--enable-shared=libgcc,libstdc++,libffi,zlib,boehm-gc,ada,libada,libgo,libobjc,libatomic,libgomp,libitm,libgfortran,libquadmath"
else
_bootstrap_configure="--enable-shared"
fi
_bootstrap_configure="$_bootstrap_configure --enable-threads --enable-tls"
;;
esac
$_libgomp || _bootstrap_configure="$_bootstrap_configure --disable-libgomp"
$_libatomic || _bootstrap_configure="$_bootstrap_configure --disable-libatomic"
$_libitm || _bootstrap_configure="$_bootstrap_configure --disable-libitm"
$_libquadmath || _arch_configure="$_arch_configure --disable-libquadmath"
msg "Building the following:"
echo ""
echo " CBUILD=$CBUILD"
echo " CHOST=$CHOST"
echo " CTARGET=$CTARGET"
echo " CTARGET_ARCH=$CTARGET_ARCH"
echo " languages=$_languages"
echo " arch_configure=$_arch_configure"
echo " cross_configure=$_cross_configure"
echo " bootstrap_configure=$_bootstrap_configure"
echo " hash_style_configure=$_hash_style_configure"
echo ""
local version="Alpine $pkgver"
local gccconfiguration="
--prefix=/usr
--mandir=/usr/share/man
--infodir=/usr/share/info
--build=$CBUILD
--host=$CHOST
--target=$CTARGET
--enable-checking=release
--disable-cet
--disable-fixed-point
--disable-libstdcxx-pch
--disable-multilib
--disable-nls
--disable-werror
--disable-symvers
--enable-__cxa_atexit
--enable-default-pie
--enable-default-ssp
--enable-languages=$_languages
--enable-link-serialization=2
--enable-linker-build-id
$_arch_configure
--disable-libssp
--disable-libsanitizer
$_cross_configure
$_bootstrap_configure
--with-bugurl=https://gitlab.alpinelinux.org/alpine/aports/-/issues
--with-system-zlib
$_hash_style_configure
"
mkdir -p "$_builddir"
cd "$_builddir"
"$builddir"/configure $gccconfiguration \
--with-pkgversion="$version"
msg "building gcc"
if $LANG_D && [ "$CBUILD" != "$CTARGET" ]; then
# cross-compiling libphobos with parallel make fails
make all-target-libphobos
fi
make
# we build gccjit separate to not build all of gcc with --enable-host-shared
# as doing so slows it down a few %, so for some quick if's here we gain
# free performance
if $LANG_JIT; then
mkdir -p "$_builddir"/libgccjit-build
cd "$_builddir"/libgccjit-build
"$builddir"/configure $gccconfiguration \
--disable-bootstrap \
--enable-host-shared \
--enable-languages=jit \
--with-pkgversion="$version"
msg "building libgccjit"
make all-gcc
fi
}
package() {
cd "$_builddir"
make -j1 DESTDIR="$pkgdir" install
[ "$CHOST" = "$CTARGET" ] && ln -s gcc "$pkgdir"/usr/bin/cc
ln -s ${CTARGET}-gcc "$pkgdir"/usr/bin/${CTARGET}-cc
if $LANG_JIT; then
make -C "$_builddir"/libgccjit-build/gcc DESTDIR="$pkgdir" jit.install-common
fi
# we dont support gcj -static
# and saving 35MB is not bad.
find "$pkgdir" \( -name libgtkpeer.a \
-o -name libgjsmalsa.a \
-o -name libgij.a \) \
-delete
# strip debug info from some static libs
find "$pkgdir" \( -name libgfortran.a -o -name libobjc.a -o -name libgomp.a \
-o -name libgphobos.a -o -name libgdruntime.a \
-o -name libgcc.a -o -name libgcov.a -o -name libquadmath.a \
-o -name libitm.a -o -name libgo.a -o -name libcaf\*.a \
-o -name libatomic.a -o -name libasan.a -o -name libtsan.a \) \
-a -type f \
-exec $STRIP_FOR_TARGET -g {} +
if $_libgomp; then
mv "$pkgdir"/usr/lib/libgomp.spec "$pkgdir"/$_gcclibdir
fi
if $_libitm; then
mv "$pkgdir"/usr/lib/libitm.spec "$pkgdir"/$_gcclibdir
fi
# remove ffi
rm -f "$pkgdir"/usr/lib/libffi* "$pkgdir"/usr/share/man/man3/ffi*
find "$pkgdir" -name 'ffi*.h' -delete
local gdblib=${_target:+$CTARGET/}lib
if [ -d "$pkgdir"/usr/$gdblib/ ]; then
for i in $(find "$pkgdir"/usr/$gdblib/ -type f -maxdepth 1 -name "*-gdb.py"); do
mkdir -p "$pkgdir"/usr/share/gdb/python/auto-load/usr/$gdblib
mv "$i" "$pkgdir"/usr/share/gdb/python/auto-load/usr/$gdblib/
done
fi
# move ada runtime libs
if $LANG_ADA; then
local libgnat_static=
[ "$CHOST" = "$CTARGET" ] && libgnat_static="libgna*.a"
for i in $(find "$pkgdir"/$_gcclibdir/adalib/ -type f -maxdepth 1 \( -name "libgna*.so" -o -name "$libgnat_static" \) ); do
mv "$i" "$pkgdir"/usr/lib/
ln -s ../../../../${i##*/} $i
done
fi
if [ "$CHOST" != "$CTARGET" ]; then
# cross-gcc: remove any files that would conflict with the
# native gcc package
rm -rf "$pkgdir"/usr/include "${pkgdir:?}"/usr/share
# libcc1 does not depend on target, don't ship it
rm -rf "$pkgdir"/usr/lib/libcc1.so*
# fixup gcc library symlinks to be linker scripts so
# linker finds the libs from relocated sysroot
for so in "$pkgdir"/usr/"$CTARGET"/lib/*.so; do
if [ -h "$so" ]; then
local _real=$(basename "$(readlink "$so")")
rm -f "$so"
echo "GROUP ($_real)" > "$so"
fi
done
else
# add c89/c99 wrapper scripts
cat >"$pkgdir"/usr/bin/c89 <<'EOF'
#!/bin/sh
_flavor="-std=c89"
for opt; do
case "$opt" in
-ansi|-std=c89|-std=iso9899:1990) _flavor="";;
-std=*) echo "$(basename $0) called with non ANSI/ISO C option $opt" >&2
exit 1;;
esac
done
exec gcc $_flavor ${1+"$@"}
EOF
cat >"$pkgdir"/usr/bin/c99 <<'EOF'
#!/bin/sh
_flavor="-std=c99"
for opt; do
case "$opt" in
-std=c99|-std=iso9899:1999) _flavor="";;
-std=*) echo "$(basename $0) called with non ISO C99 option $opt" >&2
exit 1;;
esac
done
exec gcc $_flavor ${1+"$@"}
EOF
chmod 755 "$pkgdir"/usr/bin/c?9
# install lto plugin so regular binutils may use it
mkdir -p "$pkgdir"/usr/lib/bfd-plugins
ln -s /$_gcclibexec/liblto_plugin.so "$pkgdir/usr/lib/bfd-plugins/"
fi
}
libatomic() {
pkgdesc="GCC Atomic library"
depends=
replaces="gcc"
amove usr/lib/libatomic.so.*
}
libcxx() {
pkgdesc="GNU C++ standard runtime library"
depends=
if [ "$CHOST" = "$CTARGET" ]; then
# verify that we are using clock_gettime rather than doing direct syscalls
# so we dont break 32 bit arches due to time64.
nm -D "$pkgdir"/usr/lib/libstdc++.so.* | grep clock_gettime
fi
amove usr/lib/libstdc++.so.*
}
libcxx_dev() {
pkgdesc="GNU C++ standard runtime library (development files)"
depends=
replaces="g++"
amove usr/${_target:+$CTARGET/}lib/libstdc++.a \
usr/${_target:+$CTARGET/}lib/libstdc++exp.a \
usr/${_target:+$CTARGET/}lib/libstdc++.so \
usr/${_target:+$CTARGET/}lib/libstdc++fs.a \
usr/${_target:+$CTARGET/}lib/libsupc++.a \
usr/${_target:+$CTARGET/}include/c++
}
gpp() {
pkgdesc="GNU C++ standard library and compiler"
depends="libstdc++-dev$_target=$_gccrel gcc$_target=$_gccrel musl-dev"
[ "$CHOST" = "$CTARGET" ] && depends="$depends libstdc++=$_gccrel"
depends="$depends so:libc.musl-x86_64.so.1 so:libgmp.so.10 so:libisl.so.23 so:libmpc.so.3 so:libmpfr.so.6 so:libz.so.1"
amove $_gcclibexec/cc1plus
amove usr/bin/*++
}
jit() {
pkgdesc="GCC JIT Library"
depends=
amove usr/lib/libgccjit.so*
}
jitdev() {
pkgdesc="GCC JIT Library (development files)"
depends="libgccjit"
amove usr/include/libgccjit*.h
}
libobjc() {
pkgdesc="GNU Objective-C runtime"
replaces="objc"
depends=
amove usr/lib/libobjc.so.*
}
objc() {
pkgdesc="GNU Objective-C"
replaces="gcc"
depends="musl-dev gcc=$_gccrel libobjc=$_gccrel"
amove $_gcclibexec/cc1obj
amove $_gcclibdir/include/objc
amove usr/lib/libobjc.so
amove usr/lib/libobjc.a
}
libgcc() {
pkgdesc="GNU C compiler runtime libraries"
depends=
amove usr/lib/libgcc_s.so.*
}
libgomp() {
pkgdesc="GCC shared-memory parallel programming API library"
depends=
replaces="gcc"
amove usr/lib/libgomp.so.*
}
libgphobos() {
pkgdesc="D programming language standard library for GCC"
depends=
amove usr/lib/libgdruntime.so.*
amove usr/lib/libgphobos.so.*
}
gdc() {
pkgdesc="GCC-based D language compiler"
depends="gcc$_target=$_gccrel musl-dev libucontext-dev"
[ "$CBUILD" = "$CTARGET" ] && depends="$depends libgphobos=$_gccrel"
[ "$CHOST" = "$CTARGET" ] && provides="gcc-gdc-bootstrap=$_gccrel"
# Copy: The installed '.d' files, the static lib, the binary itself
# The shared libs are part of 'libgphobos' so one can run program
# without installing the compiler
amove $_gcclibexec/d21
amove $_gcclibdir/include/d
if [ "$CBUILD" = "$CTARGET" ]; then
amove usr/lib/libgdruntime.so
amove usr/lib/libgphobos.so
fi
amove usr/${_target:+$CTARGET/}lib/libgdruntime.a
amove usr/${_target:+$CTARGET/}lib/libgphobos.a
amove usr/${_target:+$CTARGET/}lib/libgphobos.spec
amove usr/bin/*gdc
}
libgo() {
pkgdesc="Go runtime library for GCC"
depends=
amove usr/lib/libgo.so.*
}
go() {
pkgdesc="GCC Go frontend (intended for bootstrapping community/go)"
depends="gcc=$_gccrel libgo=$_gccrel !go"
install="$pkgname-go.post-install"
amove usr/lib/go
amove usr/bin/*go
amove usr/bin/*gofmt
amove $_gcclibexec/go1
amove $_gcclibexec/cgo
amove $_gcclibexec/buildid
amove $_gcclibexec/test2json
amove $_gcclibexec/vet
amove usr/lib/libgo.a
amove usr/lib/libgo.so
amove usr/lib/libgobegin.a
amove usr/lib/libgolibbegin.a
}
libgfortran() {
pkgdesc="Fortran runtime library for GCC"
depends=
amove usr/lib/libgfortran.so.*
}
libquadmath() {
replaces="gcc"
pkgdesc="128-bit math library for GCC"
depends=
amove usr/lib/libquadmath.so.*
}
gfortran() {
pkgdesc="GNU Fortran Compiler"
depends="gcc=$_gccrel libgfortran=$_gccrel"
$_libquadmath && depends="$depends libquadmath=$_gccrel"
replaces="gcc"
amove usr/bin/*gfortran
amove usr/lib/libgfortran.a
amove usr/lib/libgfortran.so
if $_libquadmath; then
amove usr/lib/libquadmath.a
amove usr/lib/libquadmath.so
fi
amove $_gcclibdir/finclude
amove $_gcclibexec/f951
mv -v "$pkgdir"/usr/lib/libgfortran.spec "$subpkgdir"/$_gcclibdir/
}
libgnat() {
pkgdesc="GNU Ada runtime shared libraries"
depends=
amove usr/lib/libgna*.so
}
libgnatstatic() {
pkgdesc="GNU Ada static libraries"
depends=
amove usr/lib/libgna*.a
}
gnat() {
pkgdesc="Ada support for GCC"
depends="gcc=$_gccrel"
provides="$pkgname-gnat-bootstrap=$_gccrel"
[ "$CHOST" = "$CTARGET" ] && depends="$depends libgnat=$_gccrel"
amove $_gcclibexec/*gnat*
amove $_gcclibdir/*ada*
amove usr/bin/*gnat*
}
gdb() {
pkgdesc="$pkgdesc (gdb printers)"
install_if="$pkgname=$pkgver-r$pkgrel gdb"
amove \
usr/share/gdb/python/ \
usr/share/gcc-*/python/
}
sha512sums="
932bdef0cda94bacedf452ab17f103c0cb511ff2cec55e9112fc0328cbf1d803b42595728ea7b200e0a057c03e85626f937012e49a7515bc5dd256b2bf4bc396 gcc-14.2.0.tar.xz
1ecffba1b07d60e1b4422302b032bbea918b674c8e12b30aa6965b544d700ce86b61e9f7b8d402c6caf59257f491a394dd0912f0948565d6eae9335ee54f3b35 0001-posix_memalign.patch
1d102a7b17683909dde4d8591dd889149299e77a2b2003cdc0635dc816666be940e41ae534b469485391a9bed183cd5cd337f130e4e1ecb62cb9ad86c4a081db 0002-gcc-poison-system-directories.patch
3f24bb6a50d3c45b71ea05590e32fe3e69b91377ab185352891d5035c76ed193117c6d0b314a4c364bcf136b9a9dd5c926d6c7c30ab436976c121ebfea8d3ddd 0003-specs-turn-on-Wl-z-now-by-default.patch
17a2993027d3ddf8595952ebcae425695ddc7b1cf73b384d2e55fddecb9cbf3f6482860a502ff69b14075e12badf27300fd3039f3a9005e851fd8d121d258c2b 0004-Turn-on-D_FORTIFY_SOURCE-2-by-default-for-C-C-ObjC-O.patch
444550e55491ff89fe8cbbb4b73d017c9c147cdce1ad5c0561fe7d6ab3834515a814c7676c408cfeec18e1aaace27b3c26a2ffe4a75042285df5124976c38672 0005-On-linux-targets-pass-as-needed-by-default-to-the-li.patch
5a5f57e4e45745bb4d9d63d7d410fe9dd56ce12dbd70c376dd45015909307faf02391e75368e4e7404591614a874cee41b20652cf27be234765d6db97ceb4e7e 0006-Enable-Wformat-and-Wformat-security-by-default.patch
3a2b22388398a93dae7787e794cd580b9c577326f286241e086120c1fcfdd9228c2e00407088ebb163fb1acc21722c199071343551c989a958dc3c845b15132d 0007-Enable-Wtrampolines-by-default.patch
7535de1c552544e3a51cbb00b5e08ac59edbf3bdcfce2a63b9f319fada3f3676f47e3a00c75d91bcefd14500555ea0844f18c130ff46b20f416ea76071e5af39 0008-Disable-ssp-on-nostdlib-nodefaultlibs-and-ffreestand.patch
93d03afd83dee5f7129c36a7b81fa8fd323476507e2f53a4fbe40a026037e7dfafa23591145d7af5848d9a322d212497947a0f58ef828734552e6a6dabd00cfa 0009-Ensure-that-msgfmt-doesn-t-encounter-problems-during.patch
da9eaf2f0ddbec5ee14dc26053936587e6c76fbf16846db804a18cf4d318579426ebcc566aed02daf8e34f60c08b61f5d3959305886dca9bbcdc84db057258d9 0010-Don-t-declare-asprintf-if-defined-as-a-macro.patch
35b9aafe7eee8138cb7aad7164a8f77c15ccdce26843cee78b5871ef91d76cad22ed0871b20f51c4b89b71afd9cfe4ba4227086e158c466558513708fe7d2a1a 0011-libiberty-copy-PIC-objects-during-build-process.patch
9d43f844fad0ac6e1c35a2b6f461f9278ae09e468f2c9ae8adc43accbe6934994aa10d3a433644d1393a4a76e3caed69e3191db7f3c0c24b4e7a0a0a0cbac3f1 0012-libgcc_s.patch
91dde3079c1400c124ab5604597f5857185d075809649603aa3641a4581b34029bfcbd4281a5bd925d1c5e6e3b1f5f3322efda34345c6930652d685a6c9525f4 0013-nopie.patch
0b50ad15115192699efa9fda3d4fb1c2fa95da06d7880ba34615b40c19a8256e1fe364da39f5c70dc22fbccf21db2de5900932afef68948722eeb25e435262f8 0014-ada-fix-shared-linking.patch
00097c7106625ccf02149a757366f434c48f2abe824bb8b4bf067d29308889cb6039a5e5b2d3bd2683617693b47707d549252c56eea6bc3cdc2450a8d14f46a7 0015-build-fix-CXXFLAGS_FOR_BUILD-passing.patch
7f0bc42b93a389b614054e700b851abfbc53db391aa10cbdf6990d41396b293af78980bb39f1cf0967184d3fbf3d46ac7c7f096717b8f193ea34cbf7f37d7e91 0016-add-fortify-headers-paths.patch
0841acbce81250f8cb140a75ff62958dfcab3bed792822baf1fe4193dd62633648343f4b66df886c12338eed88a98e591b968131416460f9f0274046019bb8ef 0017-Alpine-musl-package-provides-libssp_nonshared.a.-We-.patch
589d538bdf692559e475e53c79869734dede0eb15228cab9ca901c9db81b0e78a0e532b20dfb05ca584ea19ff4bedd83e139ddca912a26b446c5eb6905180536 0018-DP-Use-push-state-pop-state-for-gold-as-well-when-li.patch
2213e07bab6f5d8d3d39c732f5385f46cc8f0c84e35054139fdaf13051252d7bf11f647f54aa8456b532166b008fff0656d8f41278e34ba868dd6fe427427a3a 0019-aarch64-disable-multilib-support.patch
a9567947471c3ba8a547a79c55e183974554bf823d9a97a165c966d7b3caad8789980e096e3b78452ece5de062bd9bb006af464bbf0c5a35b689eac3ee21e5c5 0020-s390x-disable-multilib-support.patch
f382eb5f7c2c60c5a23fac587c9629a3059d7be0898e97a1feaf9b9cbe1ef4693cc1177eb29333e8b7944fa17487478e73958be45d5782ccb9ef501961fb9a96 0021-ppc64-le-disable-multilib-support.patch
44ab86feb8e41e7c2b2e27accdf46194c9b80ee6a39543303dc04824f669d9fad182aabd40c9c7f6c265cf9bb71be830c257be115dc9d701d54eca3aa9ef174e 0022-x86_64-disable-multilib-support.patch
abf845792433a21fed5dd06167b9f6cf5e8f8026a409acce93824e466c5148e192bf5f404a271931fe4b65283499329bf67bb01019f2f3e02501f20619404e6c 0023-riscv-disable-multilib-support.patch
ab88a2f63e3545bbc36537aa9a86f2c6c35e41bbf702d6e13743a405cdac4f901eed5737189b780da96647fea9f5d863fdc76373f25a00064106dcb5514d6d87 0024-always-build-libgcc_eh.a.patch
8fdbe0c8bf4ca60f458a33e59027de03d15ac91933fe46d8ca62119346d20b9bc2447c0bf22bceb63d0cf8613ab61512d9197f4e6c2224af473b63ef9f254295 0025-ada-libgnarl-compatibility-for-musl.patch
684bf2db12aa45e8db7a895ab0f227b4e4351f611b4fcc6e1745d7ad94d31b3554f39d8cf9e2203520b3c6ee35cf309b417d4a842e7a8cd55a2b2accb23f2f24 0026-ada-musl-support-fixes.patch
3f9a406d7d2ce34951215ffbcadb49a45e55ad5c24ab9097c0e5e92383e43b876872ccd2a7e7def2833ab204975ee5733f8bcf90934db9fa9c4f6f56c62081f6 0027-configure-Add-enable-autolink-libatomic-use-in-LINK_.patch
720a4001f9a1fa4122e456077ecff8d3eb8af7c83d0a81f9da6a6cca05b23664206a82a349e34482c48bfe40e99aa5f21567613d0913f6a24f282bc84a994496 0028-configure-fix-detection-of-atomic-builtins-in-libato.patch
2044c23b23726965c0a6fd39f616cc464badd650947cb40495eeabd906a3af629878c1d28b403b8eb46b30a1a0ba39083023290d62f0c99ccf070063226e3f8f 0029-libstdc-do-not-throw-exceptions-for-non-C-locales-on.patch
58e8415612e1042329ad114471852c19f6bf15bf3bfd7cd81ceeafa75778bcc28410a01071a7c8cbf12b8f549acd85723215772813deedb8f266e28b9e01a353 0030-gdc-unconditionally-link-libgphobos-against-libucont.patch
d47b559075f40d526235f47b91da1d0cf6bfe6c5b7311bbfe08af9dd6e8f27e6c7cd82e3b2d529aab0536246fc56e2d42c089b22cacb0e7f09ca4a9d07556994 0031-druntime-link-against-libucontext-on-all-platforms.patch
b325035cb7122d79c6b42ca6d3fc9e02319ed2f7cddb0639dff25d2798d2ce63812cd623462cdf95e21c9ffbf2412193f8b9fc89a4c36fa5a6a041661ac7399d 0032-libgnat-time_t-is-always-64-bit-on-musl-libc.patch
c474f34e6f9a4239d486a65141a133dbe8ce91427d502a57a9fd6eb403478a2b5715ba74f24c1cc0761e16eec77ba2c1ca921fb7d7bc1e040fc3703fc9559e75 0033-libphobos-do-not-use-LFS64-symbols.patch
c4482ffc36e7894b2140800159f4cbc9a3e9011e43a69b69f4fa92d5a11e2ee645c7e21df4423dd1e0636e8890849a5719647bfbdf84f951d638f8f488cb718c 0034-libgo-fix-lfs64-use.patch
65df1d489e8d07a811f39e27fd29e3b2b4164fbc2c5fdc16a5142886d94a96e3fb28ccf4f20dd297ba6540ef8ea1ac3eb65a4279494639bf2f0f8376a3896cc3 0035-loongarch-disable-multilib-support.patch
06f64544fd8bc4b6c8b06410c5198aa8fb4e82c232afc0cad83b2c69ac5d39399968206defa78297222700cd18e7fd7e8244afa76d343406a01f657c86306453 0036-libphobos-add-riscv64-and-loongarch64-support.patch
00319c9770362520e8e93bd03fda1769dfa3622eba77d620e11d8af45a38e6d804a5e924046ae388e1cfaea605696e89c343fca507aaaa5edd58d80744fff14f fix-arm64.patch
815265826742400f86336f0c2d3e4edc37398dbc6505ee81107c0103c13ac0f406cff851438d2323033c6c6d0c0323765ee15b975eab8d1dd465f9e988168fb9 ppc64le-quadmath.patch
ea55e0fa6813fc95c4ca2e87f059182edc54dc61515ebb92bf6eb31dbbd176d0fe81edcc7ea28d32f84ca37e8d48a544623d3d9bc94aa41ffc0859326a616aa2 riscv64-improve-build-time.patch
"
-544
View File
@@ -1,544 +0,0 @@
From 2894660df1292153632edbc2a5b66eaf6a864660 Mon Sep 17 00:00:00 2001
From: Richard Sandiford <richard.sandiford@arm.com>
Date: Thu, 13 Jun 2024 12:48:21 +0100
Subject: [PATCH 1/4] aarch64: Fix invalid nested subregs [PR115464]
The testcase extracts one arm_neon.h vector from a pair (one subreg)
and then reinterprets the result as an SVE vector (another subreg).
Each subreg makes sense individually, but we can't fold them together
into a single subreg: it's 32 bytes -> 16 bytes -> 16*N bytes,
but the interpretation of 32 bytes -> 16*N bytes depends on
whether N==1 or N>1.
Since the second subreg makes sense individually, simplify_subreg
should bail out rather than ICE on it. simplify_gen_subreg will
then do the same (because it already checks validate_subreg).
This leaves simplify_gen_subreg returning null, requiring the
caller to take appropriate action.
I think this is relatively likely to occur elsewhere, so the patch
adds a helper for forcing a subreg, allowing a temporary pseudo to
be created where necessary.
I'll follow up by using force_subreg in more places. This patch
is intended to be a minimal backportable fix for the PR.
gcc/
PR target/115464
* simplify-rtx.cc (simplify_context::simplify_subreg): Don't try
to fold two subregs together if their relationship isn't known
at compile time.
* explow.h (force_subreg): Declare.
* explow.cc (force_subreg): New function.
* config/aarch64/aarch64-sve-builtins-base.cc
(svset_neonq_impl::expand): Use it instead of simplify_gen_subreg.
gcc/testsuite/
PR target/115464
* gcc.target/aarch64/sve/acle/general/pr115464.c: New test.
(cherry picked from commit 0970ff46ba6330fc80e8736fc05b2eaeeae0b6a0)
---
gcc/config/aarch64/aarch64-sve-builtins-base.cc | 2 +-
gcc/explow.cc | 15 +++++++++++++++
gcc/explow.h | 2 ++
gcc/simplify-rtx.cc | 5 +++++
.../aarch64/sve/acle/general/pr115464.c | 13 +++++++++++++
5 files changed, 36 insertions(+), 1 deletion(-)
create mode 100644 gcc/testsuite/gcc.target/aarch64/sve/acle/general/pr115464.c
diff --git a/gcc/config/aarch64/aarch64-sve-builtins-base.cc b/gcc/config/aarch64/aarch64-sve-builtins-base.cc
index 0d2edf3f19e..c9182594bc1 100644
--- a/gcc/config/aarch64/aarch64-sve-builtins-base.cc
+++ b/gcc/config/aarch64/aarch64-sve-builtins-base.cc
@@ -1174,7 +1174,7 @@ public:
Advanced SIMD argument as an SVE vector. */
if (!BYTES_BIG_ENDIAN
&& is_undef (CALL_EXPR_ARG (e.call_expr, 0)))
- return simplify_gen_subreg (mode, e.args[1], GET_MODE (e.args[1]), 0);
+ return force_subreg (mode, e.args[1], GET_MODE (e.args[1]), 0);
rtx_vector_builder builder (VNx16BImode, 16, 2);
for (unsigned int i = 0; i < 16; i++)
diff --git a/gcc/explow.cc b/gcc/explow.cc
index 8e5f6b8e680..f6843398c4b 100644
--- a/gcc/explow.cc
+++ b/gcc/explow.cc
@@ -745,6 +745,21 @@ force_reg (machine_mode mode, rtx x)
return temp;
}
+/* Like simplify_gen_subreg, but force OP into a new register if the
+ subreg cannot be formed directly. */
+
+rtx
+force_subreg (machine_mode outermode, rtx op,
+ machine_mode innermode, poly_uint64 byte)
+{
+ rtx x = simplify_gen_subreg (outermode, op, innermode, byte);
+ if (x)
+ return x;
+
+ op = copy_to_mode_reg (innermode, op);
+ return simplify_gen_subreg (outermode, op, innermode, byte);
+}
+
/* If X is a memory ref, copy its contents to a new temp reg and return
that reg. Otherwise, return X. */
diff --git a/gcc/explow.h b/gcc/explow.h
index 16aa02cfb68..cbd1fcb7eb3 100644
--- a/gcc/explow.h
+++ b/gcc/explow.h
@@ -42,6 +42,8 @@ extern rtx copy_to_suggested_reg (rtx, rtx, machine_mode);
Args are mode (in case value is a constant) and the value. */
extern rtx force_reg (machine_mode, rtx);
+extern rtx force_subreg (machine_mode, rtx, machine_mode, poly_uint64);
+
/* Return given rtx, copied into a new temp reg if it was in memory. */
extern rtx force_not_mem (rtx);
diff --git a/gcc/simplify-rtx.cc b/gcc/simplify-rtx.cc
index dceaa13333c..729d408aa55 100644
--- a/gcc/simplify-rtx.cc
+++ b/gcc/simplify-rtx.cc
@@ -7612,6 +7612,11 @@ simplify_context::simplify_subreg (machine_mode outermode, rtx op,
poly_uint64 innermostsize = GET_MODE_SIZE (innermostmode);
rtx newx;
+ /* Make sure that the relationship between the two subregs is
+ known at compile time. */
+ if (!ordered_p (outersize, innermostsize))
+ return NULL_RTX;
+
if (outermode == innermostmode
&& known_eq (byte, 0U)
&& known_eq (SUBREG_BYTE (op), 0))
diff --git a/gcc/testsuite/gcc.target/aarch64/sve/acle/general/pr115464.c b/gcc/testsuite/gcc.target/aarch64/sve/acle/general/pr115464.c
new file mode 100644
index 00000000000..d728d1325ed
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/sve/acle/general/pr115464.c
@@ -0,0 +1,13 @@
+/* { dg-options "-O2" } */
+
+#include <arm_neon.h>
+#include <arm_sve.h>
+#include <arm_neon_sve_bridge.h>
+
+svuint16_t
+convolve4_4_x (uint16x8x2_t permute_tbl)
+{
+ return svset_neonq_u16 (svundef_u16 (), permute_tbl.val[1]);
+}
+
+/* { dg-final { scan-assembler {\tmov\tz0\.d, z1\.d\n} } } */
--
2.46.0
From 7edecb21012d88902c60d38f5865bc254eaa9c55 Mon Sep 17 00:00:00 2001
From: Richard Sandiford <richard.sandiford@arm.com>
Date: Tue, 18 Jun 2024 12:22:30 +0100
Subject: [PATCH 2/4] aarch64: Use force_subreg in more places
This patch makes the aarch64 code use force_subreg instead of
simplify_gen_subreg in more places. The criteria were:
(1) The code is obviously specific to expand (where new pseudos
can be created).
(2) The value is obviously an rvalue rather than an lvalue.
(3) The offset wasn't a simple lowpart or highpart calculation;
a later patch will deal with those.
gcc/
* config/aarch64/aarch64-builtins.cc (aarch64_expand_fcmla_builtin):
Use force_subreg instead of simplify_gen_subreg.
* config/aarch64/aarch64-simd.md (ctz<mode>2): Likewise.
* config/aarch64/aarch64-sve-builtins-base.cc
(svget_impl::expand): Likewise.
(svget_neonq_impl::expand): Likewise.
* config/aarch64/aarch64-sve-builtins-functions.h
(multireg_permute::expand): Likewise.
(cherry picked from commit 1474a8eead4ab390e59ee014befa8c40346679f4)
---
gcc/config/aarch64/aarch64-builtins.cc | 4 ++--
gcc/config/aarch64/aarch64-simd.md | 4 ++--
gcc/config/aarch64/aarch64-sve-builtins-base.cc | 8 +++-----
gcc/config/aarch64/aarch64-sve-builtins-functions.h | 6 +++---
4 files changed, 10 insertions(+), 12 deletions(-)
diff --git a/gcc/config/aarch64/aarch64-builtins.cc b/gcc/config/aarch64/aarch64-builtins.cc
index 75d21de1401..b2e46a073a8 100644
--- a/gcc/config/aarch64/aarch64-builtins.cc
+++ b/gcc/config/aarch64/aarch64-builtins.cc
@@ -2510,12 +2510,12 @@ aarch64_expand_fcmla_builtin (tree exp, rtx target, int fcode)
rtx temp2 = gen_reg_rtx (DImode);
temp1 = simplify_gen_subreg (d->mode, op2, quadmode,
subreg_lowpart_offset (d->mode, quadmode));
- temp1 = simplify_gen_subreg (V2DImode, temp1, d->mode, 0);
+ temp1 = force_subreg (V2DImode, temp1, d->mode, 0);
if (BYTES_BIG_ENDIAN)
emit_insn (gen_aarch64_get_lanev2di (temp2, temp1, const0_rtx));
else
emit_insn (gen_aarch64_get_lanev2di (temp2, temp1, const1_rtx));
- op2 = simplify_gen_subreg (d->mode, temp2, GET_MODE (temp2), 0);
+ op2 = force_subreg (d->mode, temp2, GET_MODE (temp2), 0);
/* And recalculate the index. */
lane -= nunits / 4;
diff --git a/gcc/config/aarch64/aarch64-simd.md b/gcc/config/aarch64/aarch64-simd.md
index 33ab0741e87..5b9efe0b165 100644
--- a/gcc/config/aarch64/aarch64-simd.md
+++ b/gcc/config/aarch64/aarch64-simd.md
@@ -412,8 +412,8 @@
"TARGET_SIMD"
{
emit_insn (gen_bswap<mode>2 (operands[0], operands[1]));
- rtx op0_castsi2qi = simplify_gen_subreg(<VS:VSI2QI>mode, operands[0],
- <MODE>mode, 0);
+ rtx op0_castsi2qi = force_subreg (<VS:VSI2QI>mode, operands[0],
+ <MODE>mode, 0);
emit_insn (gen_aarch64_rbit<VS:vsi2qi> (op0_castsi2qi, op0_castsi2qi));
emit_insn (gen_clz<mode>2 (operands[0], operands[0]));
DONE;
diff --git a/gcc/config/aarch64/aarch64-sve-builtins-base.cc b/gcc/config/aarch64/aarch64-sve-builtins-base.cc
index c9182594bc1..2c95da79572 100644
--- a/gcc/config/aarch64/aarch64-sve-builtins-base.cc
+++ b/gcc/config/aarch64/aarch64-sve-builtins-base.cc
@@ -1121,9 +1121,8 @@ public:
expand (function_expander &e) const override
{
/* Fold the access into a subreg rvalue. */
- return simplify_gen_subreg (e.vector_mode (0), e.args[0],
- GET_MODE (e.args[0]),
- INTVAL (e.args[1]) * BYTES_PER_SVE_VECTOR);
+ return force_subreg (e.vector_mode (0), e.args[0], GET_MODE (e.args[0]),
+ INTVAL (e.args[1]) * BYTES_PER_SVE_VECTOR);
}
};
@@ -1157,8 +1156,7 @@ public:
e.add_fixed_operand (indices);
return e.generate_insn (icode);
}
- return simplify_gen_subreg (e.result_mode (), e.args[0],
- GET_MODE (e.args[0]), 0);
+ return force_subreg (e.result_mode (), e.args[0], GET_MODE (e.args[0]), 0);
}
};
diff --git a/gcc/config/aarch64/aarch64-sve-builtins-functions.h b/gcc/config/aarch64/aarch64-sve-builtins-functions.h
index 3b8e575e98e..7d06a57ff83 100644
--- a/gcc/config/aarch64/aarch64-sve-builtins-functions.h
+++ b/gcc/config/aarch64/aarch64-sve-builtins-functions.h
@@ -639,9 +639,9 @@ public:
{
machine_mode elt_mode = e.vector_mode (0);
rtx arg = e.args[0];
- e.args[0] = simplify_gen_subreg (elt_mode, arg, GET_MODE (arg), 0);
- e.args.safe_push (simplify_gen_subreg (elt_mode, arg, GET_MODE (arg),
- GET_MODE_SIZE (elt_mode)));
+ e.args[0] = force_subreg (elt_mode, arg, GET_MODE (arg), 0);
+ e.args.safe_push (force_subreg (elt_mode, arg, GET_MODE (arg),
+ GET_MODE_SIZE (elt_mode)));
}
return e.use_exact_insn (icode);
}
--
2.46.0
From 0ab664f41762803a72e5e99025b0512cad493985 Mon Sep 17 00:00:00 2001
From: Richard Sandiford <richard.sandiford@arm.com>
Date: Tue, 18 Jun 2024 12:22:31 +0100
Subject: [PATCH 3/4] aarch64: Add some uses of force_lowpart_subreg
This patch makes more use of force_lowpart_subreg, similarly
to the recent patch for force_subreg. The criteria were:
(1) The code is obviously specific to expand (where new pseudos
can be created).
(2) The value is obviously an rvalue rather than an lvalue.
gcc/
PR target/115464
* config/aarch64/aarch64-builtins.cc (aarch64_expand_fcmla_builtin)
(aarch64_expand_rwsr_builtin): Use force_lowpart_subreg instead of
simplify_gen_subreg and lowpart_subreg.
* config/aarch64/aarch64-sve-builtins-base.cc
(svset_neonq_impl::expand): Likewise.
* config/aarch64/aarch64-sve-builtins-sme.cc
(add_load_store_slice_operand): Likewise.
* config/aarch64/aarch64.cc (aarch64_sve_reinterpret): Likewise.
(aarch64_addti_scratch_regs, aarch64_subvti_scratch_regs): Likewise.
gcc/testsuite/
PR target/115464
* gcc.target/aarch64/sve/acle/general/pr115464_2.c: New test.
(cherry picked from commit 6bd4fbae45d11795a9a6f54b866308d4d7134def)
---
gcc/config/aarch64/aarch64-builtins.cc | 11 +++++------
gcc/config/aarch64/aarch64-sve-builtins-base.cc | 2 +-
gcc/config/aarch64/aarch64-sve-builtins-sme.cc | 2 +-
gcc/config/aarch64/aarch64.cc | 14 +++++---------
.../aarch64/sve/acle/general/pr115464_2.c | 11 +++++++++++
5 files changed, 23 insertions(+), 17 deletions(-)
create mode 100644 gcc/testsuite/gcc.target/aarch64/sve/acle/general/pr115464_2.c
diff --git a/gcc/config/aarch64/aarch64-builtins.cc b/gcc/config/aarch64/aarch64-builtins.cc
index b2e46a073a8..264b9560709 100644
--- a/gcc/config/aarch64/aarch64-builtins.cc
+++ b/gcc/config/aarch64/aarch64-builtins.cc
@@ -2497,8 +2497,7 @@ aarch64_expand_fcmla_builtin (tree exp, rtx target, int fcode)
int lane = INTVAL (lane_idx);
if (lane < nunits / 4)
- op2 = simplify_gen_subreg (d->mode, op2, quadmode,
- subreg_lowpart_offset (d->mode, quadmode));
+ op2 = force_lowpart_subreg (d->mode, op2, quadmode);
else
{
/* Select the upper 64 bits, either a V2SF or V4HF, this however
@@ -2508,8 +2507,7 @@ aarch64_expand_fcmla_builtin (tree exp, rtx target, int fcode)
gen_highpart_mode generates code that isn't optimal. */
rtx temp1 = gen_reg_rtx (d->mode);
rtx temp2 = gen_reg_rtx (DImode);
- temp1 = simplify_gen_subreg (d->mode, op2, quadmode,
- subreg_lowpart_offset (d->mode, quadmode));
+ temp1 = force_lowpart_subreg (d->mode, op2, quadmode);
temp1 = force_subreg (V2DImode, temp1, d->mode, 0);
if (BYTES_BIG_ENDIAN)
emit_insn (gen_aarch64_get_lanev2di (temp2, temp1, const0_rtx));
@@ -2754,7 +2752,7 @@ aarch64_expand_rwsr_builtin (tree exp, rtx target, int fcode)
case AARCH64_WSR64:
case AARCH64_WSRF64:
case AARCH64_WSR128:
- subreg = lowpart_subreg (sysreg_mode, input_val, mode);
+ subreg = force_lowpart_subreg (sysreg_mode, input_val, mode);
break;
case AARCH64_WSRF:
subreg = gen_lowpart_SUBREG (SImode, input_val);
@@ -2789,7 +2787,8 @@ aarch64_expand_rwsr_builtin (tree exp, rtx target, int fcode)
case AARCH64_RSR64:
case AARCH64_RSRF64:
case AARCH64_RSR128:
- return lowpart_subreg (TYPE_MODE (TREE_TYPE (exp)), target, sysreg_mode);
+ return force_lowpart_subreg (TYPE_MODE (TREE_TYPE (exp)),
+ target, sysreg_mode);
case AARCH64_RSRF:
subreg = gen_lowpart_SUBREG (SImode, target);
return gen_lowpart_SUBREG (SFmode, subreg);
diff --git a/gcc/config/aarch64/aarch64-sve-builtins-base.cc b/gcc/config/aarch64/aarch64-sve-builtins-base.cc
index 2c95da79572..3c970e9c5f8 100644
--- a/gcc/config/aarch64/aarch64-sve-builtins-base.cc
+++ b/gcc/config/aarch64/aarch64-sve-builtins-base.cc
@@ -1183,7 +1183,7 @@ public:
if (BYTES_BIG_ENDIAN)
return e.use_exact_insn (code_for_aarch64_sve_set_neonq (mode));
insn_code icode = code_for_vcond_mask (mode, mode);
- e.args[1] = lowpart_subreg (mode, e.args[1], GET_MODE (e.args[1]));
+ e.args[1] = force_lowpart_subreg (mode, e.args[1], GET_MODE (e.args[1]));
e.add_output_operand (icode);
e.add_input_operand (icode, e.args[1]);
e.add_input_operand (icode, e.args[0]);
diff --git a/gcc/config/aarch64/aarch64-sve-builtins-sme.cc b/gcc/config/aarch64/aarch64-sve-builtins-sme.cc
index f4c91bcbb95..b66b35ae60b 100644
--- a/gcc/config/aarch64/aarch64-sve-builtins-sme.cc
+++ b/gcc/config/aarch64/aarch64-sve-builtins-sme.cc
@@ -112,7 +112,7 @@ add_load_store_slice_operand (function_expander &e, insn_code icode,
rtx base = e.args[argno];
if (e.mode_suffix_id == MODE_vnum)
{
- rtx vnum = lowpart_subreg (SImode, e.args[vnum_argno], DImode);
+ rtx vnum = force_lowpart_subreg (SImode, e.args[vnum_argno], DImode);
base = simplify_gen_binary (PLUS, SImode, base, vnum);
}
e.add_input_operand (icode, base);
diff --git a/gcc/config/aarch64/aarch64.cc b/gcc/config/aarch64/aarch64.cc
index 1beec94629d..a064aeecbc0 100644
--- a/gcc/config/aarch64/aarch64.cc
+++ b/gcc/config/aarch64/aarch64.cc
@@ -3284,7 +3284,7 @@ aarch64_sve_reinterpret (machine_mode mode, rtx x)
/* can_change_mode_class must only return true if subregs and svreinterprets
have the same semantics. */
if (targetm.can_change_mode_class (GET_MODE (x), mode, FP_REGS))
- return lowpart_subreg (mode, x, GET_MODE (x));
+ return force_lowpart_subreg (mode, x, GET_MODE (x));
rtx res = gen_reg_rtx (mode);
x = force_reg (GET_MODE (x), x);
@@ -26979,9 +26979,8 @@ aarch64_addti_scratch_regs (rtx op1, rtx op2, rtx *low_dest,
rtx *high_in2)
{
*low_dest = gen_reg_rtx (DImode);
- *low_in1 = gen_lowpart (DImode, op1);
- *low_in2 = simplify_gen_subreg (DImode, op2, TImode,
- subreg_lowpart_offset (DImode, TImode));
+ *low_in1 = force_lowpart_subreg (DImode, op1, TImode);
+ *low_in2 = force_lowpart_subreg (DImode, op2, TImode);
*high_dest = gen_reg_rtx (DImode);
*high_in1 = gen_highpart (DImode, op1);
*high_in2 = simplify_gen_subreg (DImode, op2, TImode,
@@ -27013,11 +27012,8 @@ aarch64_subvti_scratch_regs (rtx op1, rtx op2, rtx *low_dest,
rtx *high_in2)
{
*low_dest = gen_reg_rtx (DImode);
- *low_in1 = simplify_gen_subreg (DImode, op1, TImode,
- subreg_lowpart_offset (DImode, TImode));
-
- *low_in2 = simplify_gen_subreg (DImode, op2, TImode,
- subreg_lowpart_offset (DImode, TImode));
+ *low_in1 = force_lowpart_subreg (DImode, op1, TImode);
+ *low_in2 = force_lowpart_subreg (DImode, op2, TImode);
*high_dest = gen_reg_rtx (DImode);
*high_in1 = simplify_gen_subreg (DImode, op1, TImode,
diff --git a/gcc/testsuite/gcc.target/aarch64/sve/acle/general/pr115464_2.c b/gcc/testsuite/gcc.target/aarch64/sve/acle/general/pr115464_2.c
new file mode 100644
index 00000000000..f561c34f732
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/sve/acle/general/pr115464_2.c
@@ -0,0 +1,11 @@
+/* { dg-options "-O2" } */
+
+#include <arm_neon.h>
+#include <arm_sve.h>
+#include <arm_neon_sve_bridge.h>
+
+svuint16_t
+convolve4_4_x (uint16x8x2_t permute_tbl, svuint16_t a)
+{
+ return svset_neonq_u16 (a, permute_tbl.val[1]);
+}
--
2.46.0
From e21a377dea6edfaaa494f07974135e58ff66eef1 Mon Sep 17 00:00:00 2001
From: Richard Sandiford <richard.sandiford@arm.com>
Date: Tue, 18 Jun 2024 12:22:31 +0100
Subject: [PATCH 4/4] Add force_lowpart_subreg
optabs had a local function called lowpart_subreg_maybe_copy
that is very similar to the lowpart version of force_subreg.
This patch adds a force_lowpart_subreg wrapper around
force_subreg and uses it in optabs.cc.
The only difference between the old and new functions is that
the old one asserted success while the new one doesn't.
It's common not to assert elsewhere when taking subregs;
normally a null result is enough.
Later patches will make more use of the new function.
gcc/
* explow.h (force_lowpart_subreg): Declare.
* explow.cc (force_lowpart_subreg): New function.
* optabs.cc (lowpart_subreg_maybe_copy): Delete.
(expand_absneg_bit): Use force_lowpart_subreg instead of
lowpart_subreg_maybe_copy.
(expand_copysign_bit): Likewise.
(cherry picked from commit 5f40d1c0cc6ce91ef28d326b8707b3f05e6f239c)
---
gcc/explow.cc | 14 ++++++++++++++
gcc/explow.h | 1 +
gcc/optabs.cc | 24 ++----------------------
3 files changed, 17 insertions(+), 22 deletions(-)
diff --git a/gcc/explow.cc b/gcc/explow.cc
index f6843398c4b..5fdfa81f69b 100644
--- a/gcc/explow.cc
+++ b/gcc/explow.cc
@@ -760,6 +760,20 @@ force_subreg (machine_mode outermode, rtx op,
return simplify_gen_subreg (outermode, op, innermode, byte);
}
+/* Try to return an rvalue expression for the OUTERMODE lowpart of OP,
+ which has mode INNERMODE. Allow OP to be forced into a new register
+ if necessary.
+
+ Return null on failure. */
+
+rtx
+force_lowpart_subreg (machine_mode outermode, rtx op,
+ machine_mode innermode)
+{
+ auto byte = subreg_lowpart_offset (outermode, innermode);
+ return force_subreg (outermode, op, innermode, byte);
+}
+
/* If X is a memory ref, copy its contents to a new temp reg and return
that reg. Otherwise, return X. */
diff --git a/gcc/explow.h b/gcc/explow.h
index cbd1fcb7eb3..dd654649b06 100644
--- a/gcc/explow.h
+++ b/gcc/explow.h
@@ -43,6 +43,7 @@ extern rtx copy_to_suggested_reg (rtx, rtx, machine_mode);
extern rtx force_reg (machine_mode, rtx);
extern rtx force_subreg (machine_mode, rtx, machine_mode, poly_uint64);
+extern rtx force_lowpart_subreg (machine_mode, rtx, machine_mode);
/* Return given rtx, copied into a new temp reg if it was in memory. */
extern rtx force_not_mem (rtx);
diff --git a/gcc/optabs.cc b/gcc/optabs.cc
index ce91f94ed43..804c0dc73ba 100644
--- a/gcc/optabs.cc
+++ b/gcc/optabs.cc
@@ -3096,26 +3096,6 @@ expand_ffs (scalar_int_mode mode, rtx op0, rtx target)
return 0;
}
-/* Extract the OMODE lowpart from VAL, which has IMODE. Under certain
- conditions, VAL may already be a SUBREG against which we cannot generate
- a further SUBREG. In this case, we expect forcing the value into a
- register will work around the situation. */
-
-static rtx
-lowpart_subreg_maybe_copy (machine_mode omode, rtx val,
- machine_mode imode)
-{
- rtx ret;
- ret = lowpart_subreg (omode, val, imode);
- if (ret == NULL)
- {
- val = force_reg (imode, val);
- ret = lowpart_subreg (omode, val, imode);
- gcc_assert (ret != NULL);
- }
- return ret;
-}
-
/* Expand a floating point absolute value or negation operation via a
logical operation on the sign bit. */
@@ -3204,7 +3184,7 @@ expand_absneg_bit (enum rtx_code code, scalar_float_mode mode,
gen_lowpart (imode, op0),
immed_wide_int_const (mask, imode),
gen_lowpart (imode, target), 1, OPTAB_LIB_WIDEN);
- target = lowpart_subreg_maybe_copy (mode, temp, imode);
+ target = force_lowpart_subreg (mode, temp, imode);
set_dst_reg_note (get_last_insn (), REG_EQUAL,
gen_rtx_fmt_e (code, mode, copy_rtx (op0)),
@@ -4043,7 +4023,7 @@ expand_copysign_bit (scalar_float_mode mode, rtx op0, rtx op1, rtx target,
temp = expand_binop (imode, ior_optab, op0, op1,
gen_lowpart (imode, target), 1, OPTAB_LIB_WIDEN);
- target = lowpart_subreg_maybe_copy (mode, temp, imode);
+ target = force_lowpart_subreg (mode, temp, imode);
}
return target;
--
2.46.0
-8
View File
@@ -1,8 +0,0 @@
#!/bin/sh
cat 1>&2 <<EOF
*
* gcc-go is used in Alpine for bootstrapping Go.
* It is currently discouraged to use it for other purposes.
*
EOF
-56
View File
@@ -1,56 +0,0 @@
Patch-Source: https://gcc.gnu.org/git/?p=gcc.git;a=patch;h=3fe5720430a9ba61ed7562aac4d758cc77d49a28
--
From 3fe5720430a9ba61ed7562aac4d758cc77d49a28 Mon Sep 17 00:00:00 2001
From: Jakub Jelinek <jakub@redhat.com>
Date: Sat, 3 Aug 2024 20:37:54 +0200
Subject: [PATCH] libquadmath: Fix up libquadmath/math/sqrtq.c compilation in
some powerpc* configurations [PR116007]
My PR114623 change started using soft-fp.h and quad.h for the sqrtq implementation.
Unfortunately, that seems to fail building in some powerpc* configurations, where
TFmode isn't available.
quad.h has:
#ifndef TFtype
typedef float TFtype __attribute__ ((mode (TF)));
#endif
and uses TFtype. quad.h has:
/* Define the complex type corresponding to __float128
("_Complex __float128" is not allowed) */
#if (!defined(_ARCH_PPC)) || defined(__LONG_DOUBLE_IEEE128__)
typedef _Complex float __attribute__((mode(TC))) __complex128;
#else
typedef _Complex float __attribute__((mode(KC))) __complex128;
#endif
with the conditional and KCmode use added during porting of libquadmath
to powerpc*, so I've just defined TFtype for powerpc when __LONG_DOUBLE_IEEE128__
isn't defined; I could define it to float __attribute__ ((mode (KF))) but it
seemed easier to just define it to __float128 which should do the same thing.
2024-08-03 Jakub Jelinek <jakub@redhat.com>
PR target/116007
* math/sqrtq.c (TFtype): For PowerPC without __LONG_DOUBLE_IEEE128__
define to __float128 before including soft-fp.h and quad.h.
(cherry picked from commit 3ac02e67503ccffa3dfeeffc0a60fce6bdaca43b)
---
libquadmath/math/sqrtq.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/libquadmath/math/sqrtq.c b/libquadmath/math/sqrtq.c
index 8ca2828d42ce..a58998a06670 100644
--- a/libquadmath/math/sqrtq.c
+++ b/libquadmath/math/sqrtq.c
@@ -9,6 +9,9 @@
&& defined(FE_TOWARDZERO) \
&& defined(FE_INEXACT)
#define USE_SOFT_FP 1
+#if defined(_ARCH_PPC) && !defined(__LONG_DOUBLE_IEEE128__)
+#define TFtype __float128
+#endif
#include "../../libgcc/soft-fp/soft-fp.h"
#include "../../libgcc/soft-fp/quad.h"
#endif
--
2.43.5
@@ -1,149 +0,0 @@
Patch-Source: https://gcc.gnu.org/git/?p=gcc.git;a=patch;h=2cf89ae83225f932b226cd57ef2d083a59bcf8a3
--
From 2cf89ae83225f932b226cd57ef2d083a59bcf8a3 Mon Sep 17 00:00:00 2001
From: Richard Biener <rguenther@suse.de>
Date: Tue, 6 Aug 2024 14:56:26 +0200
Subject: [PATCH] tree-optimization/116166 - forward jump-threading going wild
Currently the forward threader isn't limited as to the search space
it explores and with it now using path-ranger for simplifying
conditions it runs into it became pretty slow for degenerate cases
like compiling insn-emit.cc for RISC-V esp. when compiling for
a host with LOGICAL_OP_NON_SHORT_CIRCUIT disabled.
The following makes the forward threader honor the search space
limit I introduced for the backward threader. This reduces
compile-time from minutes to seconds for the testcase in PR116166.
Note this wasn't necessary before we had ranger but with ranger
the work we do is quadatic in the length of the threading path
we build up (the same is true for the backwards threader).
PR tree-optimization/116166
* tree-ssa-threadedge.h (jump_threader::thread_around_empty_blocks):
Add limit parameter.
(jump_threader::thread_through_normal_block): Likewise.
* tree-ssa-threadedge.cc (jump_threader::thread_around_empty_blocks):
Honor and decrement limit parameter.
(jump_threader::thread_through_normal_block): Likewise.
(jump_threader::thread_across_edge): Initialize limit from
param_max_jump_thread_paths and pass it down to workers.
---
gcc/tree-ssa-threadedge.cc | 30 ++++++++++++++++++++++--------
gcc/tree-ssa-threadedge.h | 4 ++--
2 files changed, 24 insertions(+), 10 deletions(-)
diff --git a/gcc/tree-ssa-threadedge.cc b/gcc/tree-ssa-threadedge.cc
index 7f82639b8ecc..0aa2aa851430 100644
--- a/gcc/tree-ssa-threadedge.cc
+++ b/gcc/tree-ssa-threadedge.cc
@@ -786,13 +786,17 @@ propagate_threaded_block_debug_into (basic_block dest, basic_block src)
bool
jump_threader::thread_around_empty_blocks (vec<jump_thread_edge *> *path,
edge taken_edge,
- bitmap visited)
+ bitmap visited, unsigned &limit)
{
basic_block bb = taken_edge->dest;
gimple_stmt_iterator gsi;
gimple *stmt;
tree cond;
+ if (limit == 0)
+ return false;
+ --limit;
+
/* The key property of these blocks is that they need not be duplicated
when threading. Thus they cannot have visible side effects such
as PHI nodes. */
@@ -830,7 +834,8 @@ jump_threader::thread_around_empty_blocks (vec<jump_thread_edge *> *path,
m_registry->push_edge (path, taken_edge, EDGE_NO_COPY_SRC_BLOCK);
m_state->append_path (taken_edge->dest);
bitmap_set_bit (visited, taken_edge->dest->index);
- return thread_around_empty_blocks (path, taken_edge, visited);
+ return thread_around_empty_blocks (path, taken_edge, visited,
+ limit);
}
}
@@ -872,7 +877,7 @@ jump_threader::thread_around_empty_blocks (vec<jump_thread_edge *> *path,
m_registry->push_edge (path, taken_edge, EDGE_NO_COPY_SRC_BLOCK);
m_state->append_path (taken_edge->dest);
- thread_around_empty_blocks (path, taken_edge, visited);
+ thread_around_empty_blocks (path, taken_edge, visited, limit);
return true;
}
@@ -899,8 +904,13 @@ jump_threader::thread_around_empty_blocks (vec<jump_thread_edge *> *path,
int
jump_threader::thread_through_normal_block (vec<jump_thread_edge *> *path,
- edge e, bitmap visited)
+ edge e, bitmap visited,
+ unsigned &limit)
{
+ if (limit == 0)
+ return 0;
+ limit--;
+
m_state->register_equivs_edge (e);
/* PHIs create temporary equivalences.
@@ -989,7 +999,7 @@ jump_threader::thread_through_normal_block (vec<jump_thread_edge *> *path,
visited. This may be overly conservative. */
bitmap_set_bit (visited, dest->index);
bitmap_set_bit (visited, e->dest->index);
- thread_around_empty_blocks (path, taken_edge, visited);
+ thread_around_empty_blocks (path, taken_edge, visited, limit);
return 1;
}
}
@@ -1075,9 +1085,12 @@ jump_threader::thread_across_edge (edge e)
bitmap_set_bit (visited, e->src->index);
bitmap_set_bit (visited, e->dest->index);
+ /* Limit search space. */
+ unsigned limit = param_max_jump_thread_paths;
+
int threaded = 0;
if ((e->flags & EDGE_DFS_BACK) == 0)
- threaded = thread_through_normal_block (path, e, visited);
+ threaded = thread_through_normal_block (path, e, visited, limit);
if (threaded > 0)
{
@@ -1148,11 +1161,12 @@ jump_threader::thread_across_edge (edge e)
m_registry->push_edge (path, e, EDGE_START_JUMP_THREAD);
m_registry->push_edge (path, taken_edge, EDGE_COPY_SRC_JOINER_BLOCK);
- found = thread_around_empty_blocks (path, taken_edge, visited);
+ found = thread_around_empty_blocks (path, taken_edge, visited, limit);
if (!found)
found = thread_through_normal_block (path,
- path->last ()->e, visited) > 0;
+ path->last ()->e, visited,
+ limit) > 0;
/* If we were able to thread through a successor of E->dest, then
record the jump threading opportunity. */
diff --git a/gcc/tree-ssa-threadedge.h b/gcc/tree-ssa-threadedge.h
index 9f6cbfe93307..245b3506a550 100644
--- a/gcc/tree-ssa-threadedge.h
+++ b/gcc/tree-ssa-threadedge.h
@@ -101,9 +101,9 @@ private:
unsigned limit);
bool thread_around_empty_blocks (vec<class jump_thread_edge *> *path,
- edge, bitmap visited);
+ edge, bitmap visited, unsigned &limit);
int thread_through_normal_block (vec<jump_thread_edge *> *path,
- edge, bitmap visited);
+ edge, bitmap visited, unsigned &limit);
void thread_across_edge (edge);
bool record_temporary_equivalences_from_phis (edge);
gimple *record_temporary_equivalences_from_stmts_at_dest (edge);
--
2.43.5
@@ -0,0 +1,82 @@
From 4d0a333ef13e2da140cd44c4941b20f48a80dc0f Mon Sep 17 00:00:00 2001
From: Hannes Braun <hannes@hannesbraun.net>
Date: Thu, 20 Feb 2025 15:09:41 +0100
Subject: [PATCH] arm: Fix signedness of vld1q intrinsic parms [PR118942]
vld1q_s8_x3, vld1q_s16_x3, vld1q_s8_x4 and vld1q_s16_x4 were expecting
pointers to unsigned integers. These parameters should be pointers to
signed integers.
gcc/ChangeLog:
PR target/118942
* config/arm/arm_neon.h (vld1q_s8_x3): Use int8_t instead of
uint16_t.
(vld1q_s16_x3): Use int16_t instead of uint16_t.
(vld1q_s8_x4): Likewise.
(vld1q_s16_x4): Likewise.
gcc/testsuite/ChangeLog:
PR target/118942
* gcc.target/arm/simd/vld1q_base_xN_1.c: Add -Wpointer-sign.
Signed-off-by: Hannes Braun <hannes@hannesbraun.net>
---
gcc/config/arm/arm_neon.h | 8 ++++----
gcc/testsuite/gcc.target/arm/simd/vld1q_base_xN_1.c | 2 +-
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/gcc/config/arm/arm_neon.h b/gcc/config/arm/arm_neon.h
index 5b1c55c8d9f..578ada88fa6 100644
--- a/gcc/config/arm/arm_neon.h
+++ b/gcc/config/arm/arm_neon.h
@@ -10854,7 +10854,7 @@ vld1q_s64_x2 (const int64_t * __a)
__extension__ extern __inline int8x16x3_t
__attribute__ ((__always_inline__, __gnu_inline__, __artificial__))
-vld1q_s8_x3 (const uint8_t * __a)
+vld1q_s8_x3 (const int8_t * __a)
{
union { int8x16x3_t __i; __builtin_neon_ci __o; } __rv;
__rv.__o = __builtin_neon_vld1q_x3v16qi ((const __builtin_neon_qi *) __a);
@@ -10863,7 +10863,7 @@ vld1q_s8_x3 (const uint8_t * __a)
__extension__ extern __inline int16x8x3_t
__attribute__ ((__always_inline__, __gnu_inline__, __artificial__))
-vld1q_s16_x3 (const uint16_t * __a)
+vld1q_s16_x3 (const int16_t * __a)
{
union { int16x8x3_t __i; __builtin_neon_ci __o; } __rv;
__rv.__o = __builtin_neon_vld1q_x3v8hi ((const __builtin_neon_hi *) __a);
@@ -10890,7 +10890,7 @@ vld1q_s64_x3 (const int64_t * __a)
__extension__ extern __inline int8x16x4_t
__attribute__ ((__always_inline__, __gnu_inline__, __artificial__))
-vld1q_s8_x4 (const uint8_t * __a)
+vld1q_s8_x4 (const int8_t * __a)
{
union { int8x16x4_t __i; __builtin_neon_xi __o; } __rv;
__rv.__o = __builtin_neon_vld1q_x4v16qi ((const __builtin_neon_qi *) __a);
@@ -10899,7 +10899,7 @@ vld1q_s8_x4 (const uint8_t * __a)
__extension__ extern __inline int16x8x4_t
__attribute__ ((__always_inline__, __gnu_inline__, __artificial__))
-vld1q_s16_x4 (const uint16_t * __a)
+vld1q_s16_x4 (const int16_t * __a)
{
union { int16x8x4_t __i; __builtin_neon_xi __o; } __rv;
__rv.__o = __builtin_neon_vld1q_x4v8hi ((const __builtin_neon_hi *) __a);
diff --git a/gcc/testsuite/gcc.target/arm/simd/vld1q_base_xN_1.c b/gcc/testsuite/gcc.target/arm/simd/vld1q_base_xN_1.c
index 01b29b60084..c73afe2b723 100644
--- a/gcc/testsuite/gcc.target/arm/simd/vld1q_base_xN_1.c
+++ b/gcc/testsuite/gcc.target/arm/simd/vld1q_base_xN_1.c
@@ -1,6 +1,6 @@
/* { dg-do assemble } */
/* { dg-require-effective-target arm_neon_ok } */
-/* { dg-options "-save-temps -O2" } */
+/* { dg-options "-save-temps -O2 -Wpointer-sign" } */
/* { dg-add-options arm_neon } */
#include "arm_neon.h"
--
2.48.1
+5 -2
View File
@@ -34,7 +34,7 @@ _pkgsnap="${pkgver##*_git}"
[ "$CHOST" != "$CTARGET" ] && _target="-$CTARGET_ARCH" || _target=""
pkgname=gcc-armv7
pkgrel=5
pkgrel=6
pkgdesc="Stage2 cross-compiler for armv7"
url="https://gcc.gnu.org"
arch="x86_64"
@@ -229,7 +229,6 @@ fi
if $LANG_JIT; then
subpackages="$subpackages libgccjit:jit libgccjit-dev:jitdev"
fi
makedepends="$makedepends_build $makedepends_host"
# when using upstream releases, use this URI template
# https://gcc.gnu.org/pub/gcc/releases/gcc-$_pkgbase/gcc-$_pkgbase.tar.xz
@@ -279,6 +278,7 @@ source="https://gcc.gnu.org/pub/gcc/releases/gcc-$_pkgbase/gcc-$_pkgbase.tar.xz
0034-libgo-fix-lfs64-use.patch
0035-loongarch-disable-multilib-support.patch
0036-libphobos-add-riscv64-and-loongarch64-support.patch
0037-arm-fix-signedness-of-vld1q-intrinsic-parms.patch
fix-arm64.patch
ppc64le-quadmath.patch
riscv64-improve-build-time.patch
@@ -487,6 +487,8 @@ package() {
# libcc1 does not depend on target, don't ship it
rm -rf "$pkgdir"/usr/lib/libcc1.so*
# These are moved into packages with arch=$CTARGET_ARCH so remove
# cross prefix (doesn't exist when BOOTSTRAP=nolibc)
# fixup gcc library symlinks to be linker scripts so
# linker finds the libs from relocated sysroot
@@ -782,6 +784,7 @@ c474f34e6f9a4239d486a65141a133dbe8ce91427d502a57a9fd6eb403478a2b5715ba74f24c1cc0
c4482ffc36e7894b2140800159f4cbc9a3e9011e43a69b69f4fa92d5a11e2ee645c7e21df4423dd1e0636e8890849a5719647bfbdf84f951d638f8f488cb718c 0034-libgo-fix-lfs64-use.patch
65df1d489e8d07a811f39e27fd29e3b2b4164fbc2c5fdc16a5142886d94a96e3fb28ccf4f20dd297ba6540ef8ea1ac3eb65a4279494639bf2f0f8376a3896cc3 0035-loongarch-disable-multilib-support.patch
06f64544fd8bc4b6c8b06410c5198aa8fb4e82c232afc0cad83b2c69ac5d39399968206defa78297222700cd18e7fd7e8244afa76d343406a01f657c86306453 0036-libphobos-add-riscv64-and-loongarch64-support.patch
a30148fb2cfa9a5800df4aed73f6b1b3b5d5817d768835a2574216f5818e6d6070199bacfe964f0d15b70eab7e2310c40b55e354f65360efce90e15d40287639 0037-arm-fix-signedness-of-vld1q-intrinsic-parms.patch
00319c9770362520e8e93bd03fda1769dfa3622eba77d620e11d8af45a38e6d804a5e924046ae388e1cfaea605696e89c343fca507aaaa5edd58d80744fff14f fix-arm64.patch
815265826742400f86336f0c2d3e4edc37398dbc6505ee81107c0103c13ac0f406cff851438d2323033c6c6d0c0323765ee15b975eab8d1dd465f9e988168fb9 ppc64le-quadmath.patch
ea55e0fa6813fc95c4ca2e87f059182edc54dc61515ebb92bf6eb31dbbd176d0fe81edcc7ea28d32f84ca37e8d48a544623d3d9bc94aa41ffc0859326a616aa2 riscv64-improve-build-time.patch
@@ -1,42 +0,0 @@
From 47b4bd4deb2c356bb07d2a96f22127aefafec3a4 Mon Sep 17 00:00:00 2001
From: Szabolcs Nagy <nsz@port70.net>
Date: Fri, 26 Jan 2018 20:32:50 +0000
Subject: [PATCH 01/35] posix_memalign
---
gcc/config/i386/pmm_malloc.h | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/gcc/config/i386/pmm_malloc.h b/gcc/config/i386/pmm_malloc.h
index 3527283693b..c4071b64b53 100644
--- a/gcc/config/i386/pmm_malloc.h
+++ b/gcc/config/i386/pmm_malloc.h
@@ -27,12 +27,13 @@
#include <stdlib.h>
/* We can't depend on <stdlib.h> since the prototype of posix_memalign
- may not be visible. */
+ may not be visible and we can't pollute the namespace either. */
#ifndef __cplusplus
-extern int posix_memalign (void **, size_t, size_t);
+extern int _mm_posix_memalign (void **, size_t, size_t)
#else
-extern "C" int posix_memalign (void **, size_t, size_t) throw ();
+extern "C" int _mm_posix_memalign (void **, size_t, size_t) throw ()
#endif
+__asm__("posix_memalign");
static __inline void *
_mm_malloc (size_t __size, size_t __alignment)
@@ -42,7 +43,7 @@ _mm_malloc (size_t __size, size_t __alignment)
return malloc (__size);
if (__alignment == 2 || (sizeof (void *) == 8 && __alignment == 4))
__alignment = sizeof (void *);
- if (posix_memalign (&__ptr, __alignment, __size) == 0)
+ if (_mm_posix_memalign (&__ptr, __alignment, __size) == 0)
return __ptr;
else
return NULL;
--
2.41.0
@@ -1,203 +0,0 @@
From 4fa620d8c3e6730211bfb071eb4c817320491bd0 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Fri, 29 Mar 2013 08:59:00 +0400
Subject: [PATCH 02/35] gcc: poison-system-directories
Add /sw/include and /opt/include based on the original
zecke-no-host-includes.patch patch. The original patch checked for
/usr/include, /sw/include and /opt/include and then triggered a failure and
aborted.
Instead, we add the two missing items to the current scan. If the user
wants this to be a failure, they can add "-Werror=poison-system-directories".
Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Upstream-Status: Pending
---
gcc/common.opt | 4 ++++
gcc/config.in | 6 ++++++
gcc/configure | 16 ++++++++++++++++
gcc/configure.ac | 10 ++++++++++
gcc/doc/invoke.texi | 9 +++++++++
gcc/gcc.cc | 2 ++
gcc/incpath.cc | 21 +++++++++++++++++++++
7 files changed, 68 insertions(+)
diff --git a/gcc/common.opt b/gcc/common.opt
index 862c474d3c8..64c4277c991 100644
--- a/gcc/common.opt
+++ b/gcc/common.opt
@@ -711,6 +711,10 @@ Wreturn-local-addr
Common Var(warn_return_local_addr) Init(1) Warning
Warn about returning a pointer/reference to a local or temporary variable.
+Wpoison-system-directories
+Common Var(flag_poison_system_directories) Init(1) Warning
+Warn for -I and -L options using system directories if cross compiling
+
Wshadow
Common Var(warn_shadow) Warning
Warn when one variable shadows another. Same as -Wshadow=global.
diff --git a/gcc/config.in b/gcc/config.in
index 4cad077bfbe..0679fbbf4c6 100644
--- a/gcc/config.in
+++ b/gcc/config.in
@@ -236,6 +236,12 @@
#endif
+/* Define to warn for use of native system header directories */
+#ifndef USED_FOR_TARGET
+#undef ENABLE_POISON_SYSTEM_DIRECTORIES
+#endif
+
+
/* Define if you want all operations on RTL (the basic data structure of the
optimizer and back end) to be checked for dynamic type safety at runtime.
This is quite expensive. */
diff --git a/gcc/configure b/gcc/configure
index c7b26d1927d..8c46369f73f 100755
--- a/gcc/configure
+++ b/gcc/configure
@@ -1026,6 +1026,7 @@ enable_maintainer_mode
enable_link_mutex
enable_link_serialization
enable_version_specific_runtime_libs
+enable_poison_system_directories
enable_plugin
enable_host_shared
enable_libquadmath_support
@@ -1788,6 +1789,8 @@ Optional Features:
--enable-version-specific-runtime-libs
specify that runtime libraries should be installed
in a compiler-specific directory
+ --enable-poison-system-directories
+ warn for use of native system header directories
--enable-plugin enable plugin support
--enable-host-shared build host code as shared libraries
--disable-libquadmath-support
@@ -31753,6 +31756,19 @@ if test "${enable_version_specific_runtime_libs+set}" = set; then :
fi
+# Check whether --enable-poison-system-directories was given.
+if test "${enable_poison_system_directories+set}" = set; then :
+ enableval=$enable_poison_system_directories;
+else
+ enable_poison_system_directories=no
+fi
+
+if test "x${enable_poison_system_directories}" = "xyes"; then
+
+$as_echo "#define ENABLE_POISON_SYSTEM_DIRECTORIES 1" >>confdefs.h
+
+fi
+
# Substitute configuration variables
diff --git a/gcc/configure.ac b/gcc/configure.ac
index 09082e8ccae..5504bf6eb01 100644
--- a/gcc/configure.ac
+++ b/gcc/configure.ac
@@ -7292,6 +7292,16 @@ AC_ARG_ENABLE(version-specific-runtime-libs,
[specify that runtime libraries should be
installed in a compiler-specific directory])])
+AC_ARG_ENABLE([poison-system-directories],
+ AS_HELP_STRING([--enable-poison-system-directories],
+ [warn for use of native system header directories]),,
+ [enable_poison_system_directories=no])
+if test "x${enable_poison_system_directories}" = "xyes"; then
+ AC_DEFINE([ENABLE_POISON_SYSTEM_DIRECTORIES],
+ [1],
+ [Define to warn for use of native system header directories])
+fi
+
# Substitute configuration variables
AC_SUBST(subdirs)
AC_SUBST(srcdir)
diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
index af0e5933fdb..b6731a4673c 100644
--- a/gcc/doc/invoke.texi
+++ b/gcc/doc/invoke.texi
@@ -384,6 +384,7 @@ Objective-C and Objective-C++ Dialects}.
-Wpacked -Wno-packed-bitfield-compat -Wpacked-not-aligned -Wpadded
-Wparentheses -Wno-pedantic-ms-format
-Wpointer-arith -Wno-pointer-compare -Wno-pointer-to-int-cast
+-Wno-poison-system-directories
-Wno-pragmas -Wno-prio-ctor-dtor -Wredundant-decls
-Wrestrict -Wno-return-local-addr -Wreturn-type
-Wno-scalar-storage-order -Wsequence-point
@@ -8426,6 +8427,14 @@ made up of data only and thus requires no special treatment. But, for
most targets, it is made up of code and thus requires the stack to be
made executable in order for the program to work properly.
+@opindex Wno-poison-system-directories
+@item -Wno-poison-system-directories
+Do not warn for @option{-I} or @option{-L} options using system
+directories such as @file{/usr/include} when cross compiling. This
+option is intended for use in chroot environments when such
+directories contain the correct headers and libraries for the target
+system rather than the host.
+
@opindex Wfloat-equal
@opindex Wno-float-equal
@item -Wfloat-equal
diff --git a/gcc/gcc.cc b/gcc/gcc.cc
index 16bb07f2cdc..33b56e721d2 100644
--- a/gcc/gcc.cc
+++ b/gcc/gcc.cc
@@ -1177,6 +1187,8 @@ proper position among the other output files. */
"-z now " \
"%X %{o*} %{e*} %{N} %{n} %{r}\
%{s} %{t} %{u*} %{z} %{Z} %{!nostdlib:%{!r:%{!nostartfiles:%S}}} \
+ %{Wno-poison-system-directories:--no-poison-system-directories} \
+ %{Werror=poison-system-directories:--error-poison-system-directories} \
%{static|no-pie|static-pie:} %@{L*} %(link_libgcc) " \
VTABLE_VERIFICATION_SPEC " " SANITIZER_EARLY_SPEC " %o "" \
%{fopenacc|fopenmp|%:gt(%{ftree-parallelize-loops=*:%*} 1):\
diff --git a/gcc/incpath.cc b/gcc/incpath.cc
index 4d44321183f..0f3f071b44c 100644
--- a/gcc/incpath.cc
+++ b/gcc/incpath.cc
@@ -26,6 +26,7 @@
#include "intl.h"
#include "incpath.h"
#include "cppdefault.h"
+#include "diagnostic-core.h"
/* Microsoft Windows does not natively support inodes.
VMS has non-numeric inodes. */
@@ -399,6 +400,26 @@ merge_include_chains (const char *sysroot, cpp_reader *pfile, int verbose)
}
fprintf (stderr, _("End of search list.\n"));
}
+
+#ifdef ENABLE_POISON_SYSTEM_DIRECTORIES
+ if (flag_poison_system_directories)
+ {
+ struct cpp_dir *p;
+
+ for (p = heads[INC_QUOTE]; p; p = p->next)
+ {
+ if ((!strncmp (p->name, "/usr/include", 12))
+ || (!strncmp (p->name, "/usr/local/include", 18))
+ || (!strncmp (p->name, "/usr/X11R6/include", 18))
+ || (!strncmp (p->name, "/sw/include", 11))
+ || (!strncmp (p->name, "/opt/include", 12)))
+ warning (OPT_Wpoison_system_directories,
+ "include location \"%s\" is unsafe for "
+ "cross-compilation",
+ p->name);
+ }
+ }
+#endif
}
/* Use given -I paths for #include "..." but not #include <...>, and
--
2.41.0
@@ -1,44 +0,0 @@
From ff4dd4ce33133e675b7bedc86b73357c04631cb9 Mon Sep 17 00:00:00 2001
From: Ariadne Conill <ariadne@dereferenced.org>
Date: Fri, 21 Aug 2020 06:45:49 +0000
Subject: [PATCH 03/35] specs: turn on -Wl,-z,now by default
Previously, we also used to turn on -z relro here, but we now build
binutils with --enable-relro, which is functionally equivalent.
Binutils does not appear to have a similar option for enabling -z
now by default.
---
gcc/doc/invoke.texi | 3 +++
gcc/gcc.cc | 1 +
2 files changed, 4 insertions(+)
diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
index b6731a4673c..f393c7846c6 100644
--- a/gcc/doc/invoke.texi
+++ b/gcc/doc/invoke.texi
@@ -17961,6 +17961,9 @@ For example, @option{-Wl,-Map,output.map} passes @option{-Map output.map} to the
linker. When using the GNU linker, you can also get the same effect with
@option{-Wl,-Map=output.map}.
+NOTE: In Alpine Linux, for LDFLAGS, the option
+@option{-Wl,-z,now} is used. To disable, use @option{-Wl,-z,nonow}.
+
@opindex u
@item -u @var{symbol}
Pretend the symbol @var{symbol} is undefined, to force linking of
diff --git a/gcc/gcc.cc b/gcc/gcc.cc
index 33b56e721d2..f82fae23c22 100644
--- a/gcc/gcc.cc
+++ b/gcc/gcc.cc
@@ -1144,6 +1144,7 @@ proper position among the other output files. */
"%{flto|flto=*:%<fcompare-debug*} \
%{flto} %{fno-lto} %{flto=*} %l " LINK_PIE_SPEC \
"%{fuse-ld=*:-fuse-ld=%*} " LINK_COMPRESS_DEBUG_SPEC \
+ "-z now " \
"%X %{o*} %{e*} %{N} %{n} %{r}\
%{s} %{t} %{u*} %{z} %{Z} %{!nostdlib:%{!r:%{!nostartfiles:%S}}} \
%{Wno-poison-system-directories:--no-poison-system-directories} \
--
2.41.0
@@ -1,46 +0,0 @@
From 1b315235433701e4a974da259b8d651169ddc7ac Mon Sep 17 00:00:00 2001
From: Ariadne Conill <ariadne@dereferenced.org>
Date: Fri, 21 Aug 2020 06:46:22 +0000
Subject: [PATCH 04/35] Turn on -D_FORTIFY_SOURCE=2 by default for C, C++,
ObjC, ObjC++, if the optimization level is > 0
---
gcc/c-family/c-cppbuiltin.cc | 4 ++++
gcc/doc/invoke.texi | 6 ++++++
2 files changed, 10 insertions(+)
diff --git a/gcc/c-family/c-cppbuiltin.cc b/gcc/c-family/c-cppbuiltin.cc
index 5d64625fcd7..868d69506e4 100644
--- a/gcc/c-family/c-cppbuiltin.cc
+++ b/gcc/c-family/c-cppbuiltin.cc
@@ -1546,6 +1546,10 @@ c_cpp_builtins (cpp_reader *pfile)
builtin_define_with_value ("__REGISTER_PREFIX__", REGISTER_PREFIX, 0);
builtin_define_with_value ("__USER_LABEL_PREFIX__", user_label_prefix, 0);
+ /* Fortify Source enabled by default for optimization levels > 0 */
+ if (optimize)
+ builtin_define_with_int_value ("_FORTIFY_SOURCE", 2);
+
/* Misc. */
if (flag_gnu89_inline)
cpp_define (pfile, "__GNUC_GNU_INLINE__");
diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
index f393c7846c6..ef3c14a189e 100644
--- a/gcc/doc/invoke.texi
+++ b/gcc/doc/invoke.texi
@@ -11868,6 +11868,12 @@ also turns on the following optimization flags:
Please note the warning under @option{-fgcse} about
invoking @option{-O2} on programs that use computed gotos.
+NOTE: In Alpine Linux, @option{-D_FORTIFY_SOURCE=2} is
+set by default, and is activated when @option{-O} is set to 2 or higher.
+This enables additional compile-time and run-time checks for several libc
+functions. To disable, specify either @option{-U_FORTIFY_SOURCE} or
+@option{-D_FORTIFY_SOURCE=0}.
+
@opindex O3
@item -O3
Optimize yet more. @option{-O3} turns on all optimizations specified
--
2.41.0
@@ -1,272 +0,0 @@
From 67c0f5789630b27149f60ff831999ef7c1dba5d5 Mon Sep 17 00:00:00 2001
From: Ariadne Conill <ariadne@dereferenced.org>
Date: Fri, 21 Aug 2020 06:46:56 +0000
Subject: [PATCH 05/35] On linux targets pass --as-needed by default to the
linker, but always link the sanitizer libraries with --no-as-needed.
---
gcc/config/aarch64/aarch64-linux.h | 1 +
gcc/config/alpha/linux-elf.h | 2 +-
gcc/config/arm/linux-elf.h | 1 +
gcc/config/gnu-user.h | 6 +++---
gcc/config/i386/gnu-user.h | 2 +-
gcc/config/i386/gnu-user64.h | 1 +
gcc/config/ia64/linux.h | 2 +-
gcc/config/mips/gnu-user.h | 1 +
gcc/config/riscv/linux.h | 1 +
gcc/config/rs6000/linux64.h | 4 ++--
gcc/config/rs6000/sysv4.h | 2 +-
gcc/config/s390/linux.h | 2 +-
gcc/config/sparc/linux.h | 2 +-
gcc/gcc.cc | 28 ++++++++++++++++++++--------
14 files changed, 36 insertions(+), 19 deletions(-)
diff --git a/gcc/config/aarch64/aarch64-linux.h b/gcc/config/aarch64/aarch64-linux.h
index 4277f03da2a..b131983a546 100644
--- a/gcc/config/aarch64/aarch64-linux.h
+++ b/gcc/config/aarch64/aarch64-linux.h
@@ -35,6 +35,7 @@
#define CPP_SPEC "%{pthread:-D_REENTRANT}"
#define LINUX_TARGET_LINK_SPEC "%{h*} \
+ --as-needed \
%{static:-Bstatic} \
%{shared:-shared} \
%{symbolic:-Bsymbolic} \
diff --git a/gcc/config/alpha/linux-elf.h b/gcc/config/alpha/linux-elf.h
index 03f783f2ad1..d946e700dda 100644
--- a/gcc/config/alpha/linux-elf.h
+++ b/gcc/config/alpha/linux-elf.h
@@ -37,7 +37,7 @@ along with GCC; see the file COPYING3. If not see
#define ELF_DYNAMIC_LINKER GNU_USER_DYNAMIC_LINKER
-#define LINK_SPEC "-m elf64alpha %{G*} %{relax:-relax} \
+#define LINK_SPEC "-m elf64alpha --as-needed %{G*} %{relax:-relax} \
%{O*:-O3} %{!O*:-O1} \
%{shared:-shared} \
%{!shared: \
diff --git a/gcc/config/arm/linux-elf.h b/gcc/config/arm/linux-elf.h
index 7b7b7cbbe14..49c050c6f2c 100644
--- a/gcc/config/arm/linux-elf.h
+++ b/gcc/config/arm/linux-elf.h
@@ -70,6 +70,7 @@
%{rdynamic:-export-dynamic} \
%{!shared:-dynamic-linker " GNU_USER_DYNAMIC_LINKER "}} \
-X \
+ --as-needed \
%{mbig-endian:-EB} %{mlittle-endian:-EL}" \
SUBTARGET_EXTRA_LINK_SPEC
diff --git a/gcc/config/gnu-user.h b/gcc/config/gnu-user.h
index eda8010b133..b26b17f2f2a 100644
--- a/gcc/config/gnu-user.h
+++ b/gcc/config/gnu-user.h
@@ -136,7 +136,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
#define LIBASAN_EARLY_SPEC "%{!shared:libasan_preinit%O%s} " \
"%{static-libasan:%{!shared:" \
LD_STATIC_OPTION " --whole-archive -lasan --no-whole-archive " \
- LD_DYNAMIC_OPTION "}}%{!static-libasan:-lasan}"
+ LD_DYNAMIC_OPTION "}}%{!static-libasan:%{!fuse-ld=gold:--push-state} --no-as-needed -lasan %{fuse-ld=gold:--as-needed;:--pop-state}}"
#undef LIBHWASAN_EARLY_SPEC
#define LIBHWASAN_EARLY_SPEC "%{!shared:libhwasan_preinit%O%s} " \
"%{static-libhwasan:%{!shared:" \
@@ -146,12 +146,12 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
#define LIBTSAN_EARLY_SPEC "%{!shared:libtsan_preinit%O%s} " \
"%{static-libtsan:%{!shared:" \
LD_STATIC_OPTION " --whole-archive -ltsan --no-whole-archive " \
- LD_DYNAMIC_OPTION "}}%{!static-libtsan:-ltsan}"
+ LD_DYNAMIC_OPTION "}}%{!static-libtsan:%{!fuse-ld=gold:--push-state} --no-as-needed -ltsan %{fuse-ld=gold:--as-needed;:--pop-state}}"
#undef LIBLSAN_EARLY_SPEC
#define LIBLSAN_EARLY_SPEC "%{!shared:liblsan_preinit%O%s} " \
"%{static-liblsan:%{!shared:" \
LD_STATIC_OPTION " --whole-archive -llsan --no-whole-archive " \
- LD_DYNAMIC_OPTION "}}%{!static-liblsan:-llsan}"
+ LD_DYNAMIC_OPTION "}}%{!static-liblsan:%{!fuse-ld=gold:--push-state} --no-as-needed -llsan %{fuse-ld=gold:--as-needed;:--pop-state}}"
#endif
#undef TARGET_F951_OPTIONS
diff --git a/gcc/config/i386/gnu-user.h b/gcc/config/i386/gnu-user.h
index a79b739089d..e0752673dff 100644
--- a/gcc/config/i386/gnu-user.h
+++ b/gcc/config/i386/gnu-user.h
@@ -68,7 +68,7 @@ along with GCC; see the file COPYING3. If not see
{ "link_emulation", GNU_USER_LINK_EMULATION },\
{ "dynamic_linker", GNU_USER_DYNAMIC_LINKER }
-#define GNU_USER_TARGET_LINK_SPEC "-m %(link_emulation) %{shared:-shared} \
+#define GNU_USER_TARGET_LINK_SPEC "-m %(link_emulation) --as-needed %{shared:-shared} \
%{!shared: \
%{!static: \
%{!static-pie: \
diff --git a/gcc/config/i386/gnu-user64.h b/gcc/config/i386/gnu-user64.h
index 3b63b99acf6..759bf0db86f 100644
--- a/gcc/config/i386/gnu-user64.h
+++ b/gcc/config/i386/gnu-user64.h
@@ -56,6 +56,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
"%{" SPEC_64 ":-m " GNU_USER_LINK_EMULATION64 "} \
%{" SPEC_32 ":-m " GNU_USER_LINK_EMULATION32 "} \
%{" SPEC_X32 ":-m " GNU_USER_LINK_EMULATIONX32 "} \
+ --as-needed \
%{shared:-shared} \
%{!shared: \
%{!static: \
diff --git a/gcc/config/ia64/linux.h b/gcc/config/ia64/linux.h
index 5dfd428aa17..02656dad7fc 100644
--- a/gcc/config/ia64/linux.h
+++ b/gcc/config/ia64/linux.h
@@ -58,7 +58,7 @@ do { \
#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux-ia64.so.2"
#undef LINK_SPEC
-#define LINK_SPEC "\
+#define LINK_SPEC " --as-needed \
%{shared:-shared} \
%{!shared: \
%{!static: \
diff --git a/gcc/config/mips/gnu-user.h b/gcc/config/mips/gnu-user.h
index a4e5380b589..3cc61bce69f 100644
--- a/gcc/config/mips/gnu-user.h
+++ b/gcc/config/mips/gnu-user.h
@@ -55,6 +55,7 @@ along with GCC; see the file COPYING3. If not see
#undef GNU_USER_TARGET_LINK_SPEC
#define GNU_USER_TARGET_LINK_SPEC "\
%{G*} %{EB} %{EL} %{mips*} %{shared} \
+ -as-needed \
%{!shared: \
%{!static: \
%{rdynamic:-export-dynamic} \
diff --git a/gcc/config/riscv/linux.h b/gcc/config/riscv/linux.h
index 3e625e0f867..f8c2c351e5a 100644
--- a/gcc/config/riscv/linux.h
+++ b/gcc/config/riscv/linux.h
@@ -48,6 +48,7 @@ along with GCC; see the file COPYING3. If not see
"%{mabi=ilp32:_ilp32}"
#define LINK_SPEC "\
+-as-needed \
-melf" XLEN_SPEC DEFAULT_ENDIAN_SPEC "riscv" LD_EMUL_SUFFIX " \
%{mno-relax:--no-relax} \
%{mbig-endian:-EB} \
diff --git a/gcc/config/rs6000/linux64.h b/gcc/config/rs6000/linux64.h
index 9e457033d11..08016bf224d 100644
--- a/gcc/config/rs6000/linux64.h
+++ b/gcc/config/rs6000/linux64.h
@@ -377,13 +377,13 @@ extern int dot_symbols;
" -m elf64ppc")
#endif
-#define LINK_OS_LINUX_SPEC32 LINK_OS_LINUX_EMUL32 " %{!shared: %{!static: \
+#define LINK_OS_LINUX_SPEC32 LINK_OS_LINUX_EMUL32 " --as-needed %{!shared: %{!static: \
%{!static-pie: \
%{rdynamic:-export-dynamic} \
-dynamic-linker " GNU_USER_DYNAMIC_LINKER32 "}}} \
%(link_os_extra_spec32)"
-#define LINK_OS_LINUX_SPEC64 LINK_OS_LINUX_EMUL64 " %{!shared: %{!static: \
+#define LINK_OS_LINUX_SPEC64 LINK_OS_LINUX_EMUL64 " --as-needed %{!shared: %{!static: \
%{!static-pie: \
%{rdynamic:-export-dynamic} \
-dynamic-linker " GNU_USER_DYNAMIC_LINKER64 "}}} \
diff --git a/gcc/config/rs6000/sysv4.h b/gcc/config/rs6000/sysv4.h
index ae932fc22f0..c8ff0c6dc8e 100644
--- a/gcc/config/rs6000/sysv4.h
+++ b/gcc/config/rs6000/sysv4.h
@@ -780,7 +780,7 @@ GNU_USER_TARGET_CC1_SPEC
#define GNU_USER_DYNAMIC_LINKER GLIBC_DYNAMIC_LINKER
#endif
-#define LINK_OS_LINUX_SPEC "-m elf32ppclinux %{!shared: %{!static: \
+#define LINK_OS_LINUX_SPEC "-m elf32ppclinux --as-needed %{!shared: %{!static: \
%{rdynamic:-export-dynamic} \
-dynamic-linker " GNU_USER_DYNAMIC_LINKER "}}"
diff --git a/gcc/config/s390/linux.h b/gcc/config/s390/linux.h
index 02aa1edaff8..64df5801134 100644
--- a/gcc/config/s390/linux.h
+++ b/gcc/config/s390/linux.h
@@ -82,7 +82,7 @@ along with GCC; see the file COPYING3. If not see
#undef LINK_SPEC
#define LINK_SPEC \
- "%{m31:-m elf_s390}%{m64:-m elf64_s390} \
+ "%{m31:-m elf_s390}%{m64:-m elf64_s390} --as-needed \
%{shared:-shared} \
%{!shared: \
%{static:-static} \
diff --git a/gcc/config/sparc/linux.h b/gcc/config/sparc/linux.h
index 0e33b3cac2c..c2f44546e62 100644
--- a/gcc/config/sparc/linux.h
+++ b/gcc/config/sparc/linux.h
@@ -81,7 +81,7 @@ extern const char *host_detect_local_cpu (int argc, const char **argv);
#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2"
#undef LINK_SPEC
-#define LINK_SPEC "-m elf32_sparc %{shared:-shared} \
+#define LINK_SPEC "-m elf32_sparc --as-needed %{shared:-shared} \
%{!mno-relax:%{!r:-relax}} \
%{!shared: \
%{!static: \
diff --git a/gcc/gcc.cc b/gcc/gcc.cc
index f82fae23c22..da6417dd0d1 100644
--- a/gcc/gcc.cc
+++ b/gcc/gcc.cc
@@ -754,8 +754,11 @@ proper position among the other output files. */
#ifdef LIBASAN_EARLY_SPEC
#define LIBASAN_SPEC STATIC_LIBASAN_LIBS
#elif defined(HAVE_LD_STATIC_DYNAMIC)
-#define LIBASAN_SPEC "%{static-libasan:" LD_STATIC_OPTION \
- "} -lasan %{static-libasan:" LD_DYNAMIC_OPTION "}" \
+#define LIBASAN_SPEC "%{static-libasan:" LD_STATIC_OPTION "}" \
+ " %{!static-libasan:%{!fuse-ld=gold:--push-state }--no-as-needed}" \
+ " -lasan " \
+ " %{static-libasan:" LD_DYNAMIC_OPTION "}" \
+ " %{!static-libasan:%{fuse-ld=gold:--as-needed;:--pop-state}}" \
STATIC_LIBASAN_LIBS
#else
#define LIBASAN_SPEC "-lasan" STATIC_LIBASAN_LIBS
@@ -790,8 +793,11 @@ proper position among the other output files. */
#ifdef LIBTSAN_EARLY_SPEC
#define LIBTSAN_SPEC STATIC_LIBTSAN_LIBS
#elif defined(HAVE_LD_STATIC_DYNAMIC)
-#define LIBTSAN_SPEC "%{static-libtsan:" LD_STATIC_OPTION \
- "} -ltsan %{static-libtsan:" LD_DYNAMIC_OPTION "}" \
+#define LIBTSAN_SPEC "%{static-libtsan:" LD_STATIC_OPTION "}" \
+ " %{!static-libtsan:%{!fuse-ld=gold:--push-state }--no-as-needed}" \
+ " -ltsan " \
+ " %{static-libtsan:" LD_DYNAMIC_OPTION "}" \
+ " %{!static-libtsan:%{fuse-ld=gold:--as-needed;:--pop-state}}" \
STATIC_LIBTSAN_LIBS
#else
#define LIBTSAN_SPEC "-ltsan" STATIC_LIBTSAN_LIBS
@@ -808,8 +814,11 @@ proper position among the other output files. */
#ifdef LIBLSAN_EARLY_SPEC
#define LIBLSAN_SPEC STATIC_LIBLSAN_LIBS
#elif defined(HAVE_LD_STATIC_DYNAMIC)
-#define LIBLSAN_SPEC "%{static-liblsan:" LD_STATIC_OPTION \
- "} -llsan %{static-liblsan:" LD_DYNAMIC_OPTION "}" \
+#define LIBLSAN_SPEC "%{static-liblsan:" LD_STATIC_OPTION "}" \
+ " %{!static-liblsan:%{!fuse-ld=gold:--push-state }--no-as-needed}" \
+ " -llsan " \
+ " %{static-liblsan:" LD_DYNAMIC_OPTION "}" \
+ " %{!static-liblsan:%{fuse-ld=gold:--as-needed;:--pop-state}}" \
STATIC_LIBLSAN_LIBS
#else
#define LIBLSAN_SPEC "-llsan" STATIC_LIBLSAN_LIBS
@@ -824,8 +833,11 @@ proper position among the other output files. */
#define STATIC_LIBUBSAN_LIBS \
" %{static-libubsan|static:%:include(libsanitizer.spec)%(link_libubsan)}"
#ifdef HAVE_LD_STATIC_DYNAMIC
-#define LIBUBSAN_SPEC "%{static-libubsan:" LD_STATIC_OPTION \
- "} -lubsan %{static-libubsan:" LD_DYNAMIC_OPTION "}" \
+#define LIBUBSAN_SPEC "%{static-libubsan:" LD_STATIC_OPTION "}" \
+ " %{!static-libubsan:%{!fuse-ld=gold:--push-state }--no-as-needed}" \
+ " -lubsan " \
+ " %{static-libubsan:" LD_DYNAMIC_OPTION "}" \
+ " %{!static-libubsan:%{fuse-ld=gold:--as-needed;:--pop-state}}" \
STATIC_LIBUBSAN_LIBS
#else
#define LIBUBSAN_SPEC "-lubsan" STATIC_LIBUBSAN_LIBS
--
2.41.0
@@ -1,34 +0,0 @@
From bb25e8489384504cd59e4a2538720863da1fb29c Mon Sep 17 00:00:00 2001
From: Ariadne Conill <ariadne@dereferenced.org>
Date: Fri, 21 Aug 2020 06:47:43 +0000
Subject: [PATCH 06/35] Enable -Wformat and -Wformat-security by default.
---
gcc/c-family/c.opt | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/gcc/c-family/c.opt b/gcc/c-family/c.opt
index a75038930ae..b98726f33ed 100644
--- a/gcc/c-family/c.opt
+++ b/gcc/c-family/c.opt
@@ -704,7 +704,7 @@ Warn about function calls with format strings that write past the end
of the destination region. Same as -Wformat-overflow=1.
Wformat-security
-C ObjC C++ ObjC++ Var(warn_format_security) Warning LangEnabledBy(C ObjC C++ ObjC++,Wformat=, warn_format >= 2, 0)
+C ObjC C++ ObjC++ Var(warn_format_security) Init(1) Warning LangEnabledBy(C ObjC C++ ObjC++,Wformat=, warn_format >= 2, 0)
Warn about possible security problems with format functions.
Wformat-signedness
@@ -725,7 +725,7 @@ C ObjC C++ ObjC++ Var(warn_format_zero_length) Warning LangEnabledBy(C ObjC C++
Warn about zero-length formats.
Wformat=
-C ObjC C++ ObjC++ Joined RejectNegative UInteger Var(warn_format) Warning LangEnabledBy(C ObjC C++ ObjC++,Wall, 1, 0) IntegerRange(0, 2)
+C ObjC C++ ObjC++ Joined RejectNegative UInteger Var(warn_format) Init(1) Warning LangEnabledBy(C ObjC C++ ObjC++,Wall, 1, 0) IntegerRange(0, 2)
Warn about printf/scanf/strftime/strfmon format string anomalies.
Wformat-overflow=
--
2.41.0
@@ -1,25 +0,0 @@
From 4a728ad48a7b437cc6f2697e26603bf648149f86 Mon Sep 17 00:00:00 2001
From: Ariadne Conill <ariadne@dereferenced.org>
Date: Fri, 21 Aug 2020 06:48:24 +0000
Subject: [PATCH 07/35] Enable -Wtrampolines by default.
---
gcc/common.opt | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gcc/common.opt b/gcc/common.opt
index 64c4277c991..c24839d32bc 100644
--- a/gcc/common.opt
+++ b/gcc/common.opt
@@ -803,7 +803,7 @@ Common Var(warn_system_headers) Warning
Do not suppress warnings from system headers.
Wtrampolines
-Common Var(warn_trampolines) Warning
+Common Var(warn_trampolines) Init(1) Warning
Warn whenever a trampoline is generated.
Wtrivial-auto-var-init
--
2.41.0
@@ -1,53 +0,0 @@
From 32f24560d0602f7735d5e9efd92fe3151bd72cea Mon Sep 17 00:00:00 2001
From: Ariadne Conill <ariadne@dereferenced.org>
Date: Fri, 21 Aug 2020 06:49:40 +0000
Subject: [PATCH 08/35] Disable ssp on -nostdlib, -nodefaultlibs and
-ffreestanding Change the buffer size.
---
gcc/gcc.cc | 8 +++++++-
gcc/params.opt | 2 +-
2 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/gcc/gcc.cc b/gcc/gcc.cc
index da6417dd0d1..b5a6f200635 100644
--- a/gcc/gcc.cc
+++ b/gcc/gcc.cc
@@ -983,6 +983,12 @@ proper position among the other output files. */
#define LINK_GCC_C_SEQUENCE_SPEC "%G %{!nolibc:%L %G}"
#endif
+#ifdef ENABLE_DEFAULT_SSP
+#define NO_SSP_SPEC "%{nostdlib|nodefaultlibs|ffreestanding:-fno-stack-protector} "
+#else
+#define NO_SSP_SPEC ""
+#endif
+
#ifndef LINK_SSP_SPEC
#ifdef TARGET_LIBC_PROVIDES_SSP
#define LINK_SSP_SPEC "%{fstack-protector|fstack-protector-all" \
@@ -1282,7 +1288,7 @@ static const char *cc1_options =
%{-version:--version}\
%{-help=*:--help=%*}\
%{!fsyntax-only:%{S:%W{o*}%{!o*:-o %w%b.s}}}\
- %{fsyntax-only:-o %j} %{-param*}\
+ %{fsyntax-only:-o %j} %{-param*} " NO_SSP_SPEC "\
%{coverage:-fprofile-arcs -ftest-coverage}\
%{fprofile-arcs|fprofile-generate*|coverage:\
%{!fprofile-update=single:\
diff --git a/gcc/params.opt b/gcc/params.opt
index 823cdb2ff85..5b096899b40 100644
--- a/gcc/params.opt
+++ b/gcc/params.opt
@@ -1006,7 +1006,7 @@ Common Joined UInteger Var(param_ssa_name_def_chain_limit) Init(512) Param Optim
The maximum number of SSA_NAME assignments to follow in determining a value.
-param=ssp-buffer-size=
-Common Joined UInteger Var(param_ssp_buffer_size) Init(8) IntegerRange(1, 65536) Param Optimization
+Common Joined UInteger Var(param_ssp_buffer_size) Init(4) IntegerRange(1, 65536) Param Optimization
The lower bound for a buffer to be considered for stack smashing protection.
-param=stack-clash-protection-guard-size=
--
2.41.0
@@ -1,54 +0,0 @@
From c7ec8da7280d7f97f5543eb9ddeca7600aafc43c Mon Sep 17 00:00:00 2001
From: Ariadne Conill <ariadne@dereferenced.org>
Date: Fri, 21 Aug 2020 06:50:33 +0000
Subject: [PATCH 09/35] Ensure that msgfmt doesn't encounter problems during
gcc bootstrapping.
Solves error messages like the following:
msgfmt: /var/tmp/portage/sys-devel/gcc-4.1.2/work/build/./gcc/libgcc_s.so.1: version `GCC_4.2.0' not found (required by /usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/libstdc++.so.6)
The libgcc_s.so used during build doesn't satisfy the needs of the
libstdc++.so that msgfmt is linked against. On the other hand, msgfmt
is used as a stand-alone application here, and what library it uses
behind the scenes is of no concern to the gcc build process.
Therefore, simply invoking it "as usual", i.e. without any special
library path, will make it work as expected here.
2011-09-19 Martin von Gagern
References:
https://bugs.gentoo.org/372377
https://bugs.gentoo.org/295480
---
libstdc++-v3/po/Makefile.am | 1 +
libstdc++-v3/po/Makefile.in | 1 +
2 files changed, 2 insertions(+)
diff --git a/libstdc++-v3/po/Makefile.am b/libstdc++-v3/po/Makefile.am
index 12d34910830..61b13762b71 100644
--- a/libstdc++-v3/po/Makefile.am
+++ b/libstdc++-v3/po/Makefile.am
@@ -38,6 +38,7 @@ MSGFMT = msgfmt
EXTRA_DIST = string_literals.cc POTFILES.in $(PACKAGE).pot $(LOCALE_IN)
.po.mo:
+ env --unset=LD_LIBRARY_PATH \
$(MSGFMT) -o $@ $<
all-local: all-local-$(USE_NLS)
diff --git a/libstdc++-v3/po/Makefile.in b/libstdc++-v3/po/Makefile.in
index 8e93445acd2..d6ff06e5ddb 100644
--- a/libstdc++-v3/po/Makefile.in
+++ b/libstdc++-v3/po/Makefile.in
@@ -561,6 +561,7 @@ uninstall-am:
.po.mo:
+ env --unset=LD_LIBRARY_PATH \
$(MSGFMT) -o $@ $<
all-local: all-local-$(USE_NLS)
--
2.41.0
@@ -1,28 +0,0 @@
From aaa029bcee68298695b7c4278c90b6bc320d098c Mon Sep 17 00:00:00 2001
From: Ariadne Conill <ariadne@dereferenced.org>
Date: Fri, 21 Aug 2020 06:52:07 +0000
Subject: [PATCH 10/35] Don't declare asprintf if defined as a macro.
---
include/libiberty.h | 3 +++
1 file changed, 3 insertions(+)
diff --git a/include/libiberty.h b/include/libiberty.h
index 1d5c779fcff..19e3cb1e31c 100644
--- a/include/libiberty.h
+++ b/include/libiberty.h
@@ -652,8 +652,11 @@ extern void *bsearch_r (const void *, const void *,
/* Like sprintf but provides a pointer to malloc'd storage, which must
be freed by the caller. */
+/* asprintf may be declared as a macro by glibc with __USE_FORTIFY_LEVEL. */
+#ifndef asprintf
extern int asprintf (char **, const char *, ...) ATTRIBUTE_PRINTF_2;
#endif
+#endif
/* Like asprintf but allocates memory without fail. This works like
xmalloc. */
--
2.41.0
@@ -1,24 +0,0 @@
From 65e01e749205c9af218b01233cebd0077538d0ee Mon Sep 17 00:00:00 2001
From: Ariadne Conill <ariadne@dereferenced.org>
Date: Fri, 21 Aug 2020 06:53:00 +0000
Subject: [PATCH 11/35] libiberty: copy PIC objects during build process
---
libiberty/Makefile.in | 1 +
1 file changed, 1 insertion(+)
diff --git a/libiberty/Makefile.in b/libiberty/Makefile.in
index 72608f3e4a7..58356884728 100644
--- a/libiberty/Makefile.in
+++ b/libiberty/Makefile.in
@@ -265,6 +265,7 @@ $(TARGETLIB): $(REQUIRED_OFILES) $(EXTRA_OFILES) $(LIBOBJS)
$(AR) $(AR_FLAGS) $(TARGETLIB) \
$(REQUIRED_OFILES) $(EXTRA_OFILES) $(LIBOBJS); \
$(RANLIB) $(TARGETLIB); \
+ cp $(TARGETLIB) ../ ; \
cd ..; \
else true; fi
--
2.41.0
-57
View File
@@ -1,57 +0,0 @@
From 453a815bf2844971a91eaef800af188d9e86b784 Mon Sep 17 00:00:00 2001
From: Szabolcs Nagy <nsz@port70.net>
Date: Sat, 24 Oct 2015 20:09:53 +0000
Subject: [PATCH 12/35] libgcc_s
---
gcc/config/i386/i386-expand.cc | 4 ++--
libgcc/config/i386/cpuinfo.c | 6 +++---
libgcc/config/i386/t-linux | 2 +-
3 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/gcc/config/i386/i386-expand.cc b/gcc/config/i386/i386-expand.cc
index 0d817fc3f3b..2e99db00db9 100644
--- a/gcc/config/i386/i386-expand.cc
+++ b/gcc/config/i386/i386-expand.cc
@@ -12691,10 +12691,10 @@ ix86_expand_builtin (tree exp, rtx target, rtx subtarget,
{
case IX86_BUILTIN_CPU_INIT:
{
- /* Make it call __cpu_indicator_init in libgcc. */
+ /* Make it call __cpu_indicator_init in libgcc.a. */
tree call_expr, fndecl, type;
type = build_function_type_list (integer_type_node, NULL_TREE);
- fndecl = build_fn_decl ("__cpu_indicator_init", type);
+ fndecl = build_fn_decl ("__cpu_indicator_init_local", type);
call_expr = build_call_expr (fndecl, 0);
return expand_expr (call_expr, target, mode, EXPAND_NORMAL);
}
diff --git a/libgcc/config/i386/cpuinfo.c b/libgcc/config/i386/cpuinfo.c
index 50b6d8248a2..724ced402a1 100644
--- a/libgcc/config/i386/cpuinfo.c
+++ b/libgcc/config/i386/cpuinfo.c
@@ -63,7 +63,7 @@ __cpu_indicator_init (void)
__cpu_features2);
}
-#if defined SHARED && defined USE_ELF_SYMVER
-__asm__ (".symver __cpu_indicator_init, __cpu_indicator_init@GCC_4.8.0");
-__asm__ (".symver __cpu_model, __cpu_model@GCC_4.8.0");
+#ifndef SHARED
+int __cpu_indicator_init_local (void)
+ __attribute__ ((weak, alias ("__cpu_indicator_init")));
#endif
diff --git a/libgcc/config/i386/t-linux b/libgcc/config/i386/t-linux
index 8506a635790..564296f788e 100644
--- a/libgcc/config/i386/t-linux
+++ b/libgcc/config/i386/t-linux
@@ -3,5 +3,5 @@
# t-slibgcc-elf-ver and t-linux
SHLIB_MAPFILES = libgcc-std.ver $(srcdir)/config/i386/libgcc-glibc.ver
-HOST_LIBGCC2_CFLAGS += -mlong-double-80 -DUSE_ELF_SYMVER $(CET_FLAGS)
+HOST_LIBGCC2_CFLAGS += -mlong-double-80 $(CET_FLAGS)
CRTSTUFF_T_CFLAGS += $(CET_FLAGS)
--
2.41.0
-85
View File
@@ -1,85 +0,0 @@
From 7d7d12137c666761a8dd61179c9651b85dae9b41 Mon Sep 17 00:00:00 2001
From: Szabolcs Nagy <nsz@port70.net>
Date: Sat, 7 Nov 2015 02:08:05 +0000
Subject: [PATCH 13/35] nopie
---
gcc/configure | 27 +++++++++++++++++++++++++++
gcc/configure.ac | 13 +++++++++++++
2 files changed, 40 insertions(+)
diff --git a/gcc/configure b/gcc/configure
index 23da7d55d..f38732bb2 100755
--- a/gcc/configure
+++ b/gcc/configure
@@ -34534,6 +34534,29 @@ rm -f core conftest.err conftest.$ac_objext \
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_no_pie" >&5
$as_echo "$gcc_cv_no_pie" >&6; }
+# Check if -nopie works.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -nopie option" >&5
+$as_echo_n "checking for -nopie option... " >&6; }
+if ${gcc_cv_nopie+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ saved_LDFLAGS="$LDFLAGS"
+ LDFLAGS="$LDFLAGS -nopie"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+int main(void) {return 0;}
+_ACEOF
+if ac_fn_cxx_try_link "$LINENO"; then :
+ gcc_cv_nopie=yes
+else
+ gcc_cv_nopie=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ LDFLAGS="$saved_LDFLAGS"
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_nopie" >&5
+$as_echo "$gcc_cv_nopie" >&6; }
if test x$enable_host_shared = xyes; then
PICFLAG=-fPIC
@@ -34551,6 +34574,8 @@ if test x$enable_host_pie = xyes; then
LD_PICFLAG=-pie
elif test x$gcc_cv_no_pie = xyes; then
LD_PICFLAG=-no-pie
+elif test x$gcc_cv_nopie = xyes; then
+ LD_PICFLAG=-nopie
else
LD_PICFLAG=
fi
diff --git a/gcc/configure.ac b/gcc/configure.ac
index d7cf0b92c..db2e2c802 100644
--- a/gcc/configure.ac
+++ b/gcc/configure.ac
@@ -7781,6 +7781,15 @@ AC_CACHE_CHECK([for -no-pie option],
[gcc_cv_no_pie=yes],
[gcc_cv_no_pie=no])
LDFLAGS="$saved_LDFLAGS"])
+# Check if -nopie works.
+AC_CACHE_CHECK([for -nopie option],
+ [gcc_cv_nopie],
+ [saved_LDFLAGS="$LDFLAGS"
+ LDFLAGS="$LDFLAGS -nopie"
+ AC_LINK_IFELSE([AC_LANG_SOURCE([int main(void) {return 0;}])],
+ [gcc_cv_nopie=yes],
+ [gcc_cv_nopie=no])
+ LDFLAGS="$saved_LDFLAGS"])
if test x$enable_host_shared = xyes; then
PICFLAG=-fPIC
@@ -7798,6 +7807,8 @@ if test x$enable_host_pie = xyes; then
LD_PICFLAG=-pie
elif test x$gcc_cv_no_pie = xyes; then
LD_PICFLAG=-no-pie
+elif test x$gcc_cv_nopie = xyes; then
+ LD_PICFLAG=-nopie
else
LD_PICFLAG=
fi
--
2.41.0
@@ -1,42 +0,0 @@
From dd5bb97c31a9f57034c70a7a18ba6e2e133084c7 Mon Sep 17 00:00:00 2001
From: Ariadne Conill <ariadne@dereferenced.org>
Date: Fri, 21 Aug 2020 06:59:16 +0000
Subject: [PATCH 14/35] ada: fix shared linking
---
gcc/ada/link.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/gcc/ada/link.c b/gcc/ada/link.c
index f2126441208..22cfa9c641f 100644
--- a/gcc/ada/link.c
+++ b/gcc/ada/link.c
@@ -107,9 +107,9 @@ const char *__gnat_default_libgcc_subdir = "lib";
|| defined (__NetBSD__) || defined (__OpenBSD__) \
|| defined (__QNX__)
const char *__gnat_object_file_option = "-Wl,@";
-const char *__gnat_run_path_option = "-Wl,-rpath,";
-char __gnat_shared_libgnat_default = STATIC;
-char __gnat_shared_libgcc_default = STATIC;
+const char *__gnat_run_path_option = "";
+char __gnat_shared_libgnat_default = SHARED;
+char __gnat_shared_libgcc_default = SHARED;
int __gnat_link_max = 8192;
unsigned char __gnat_objlist_file_supported = 1;
const char *__gnat_object_library_extension = ".a";
@@ -129,9 +129,9 @@ const char *__gnat_default_libgcc_subdir = "lib";
#elif defined (__linux__) || defined (__GLIBC__)
const char *__gnat_object_file_option = "-Wl,@";
-const char *__gnat_run_path_option = "-Wl,-rpath,";
-char __gnat_shared_libgnat_default = STATIC;
-char __gnat_shared_libgcc_default = STATIC;
+const char *__gnat_run_path_option = "";
+char __gnat_shared_libgnat_default = SHARED;
+char __gnat_shared_libgcc_default = SHARED;
int __gnat_link_max = 8192;
unsigned char __gnat_objlist_file_supported = 1;
const char *__gnat_object_library_extension = ".a";
--
2.41.0
@@ -1,24 +0,0 @@
From 6bb5b7d9161d05f31b001d8211a9c63caf63fd2f Mon Sep 17 00:00:00 2001
From: Ariadne Conill <ariadne@dereferenced.org>
Date: Fri, 21 Aug 2020 06:59:43 +0000
Subject: [PATCH 15/35] build: fix CXXFLAGS_FOR_BUILD passing
---
Makefile.in | 1 +
1 file changed, 1 insertion(+)
diff --git a/Makefile.in b/Makefile.in
index 06a9398e172..6ff2b3f9925 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -178,6 +178,7 @@ BUILD_EXPORTS = \
# built for the build system to override those in BASE_FLAGS_TO_PASS.
EXTRA_BUILD_FLAGS = \
CFLAGS="$(CFLAGS_FOR_BUILD)" \
+ CXXFLAGS="$(CXXFLAGS_FOR_BUILD)" \
LDFLAGS="$(LDFLAGS_FOR_BUILD)"
# This is the list of directories to built for the host system.
--
2.41.0
@@ -1,25 +0,0 @@
From f0d9e00cac06689f64b214de7aee80d7116ef084 Mon Sep 17 00:00:00 2001
From: Ariadne Conill <ariadne@dereferenced.org>
Date: Fri, 21 Aug 2020 07:01:06 +0000
Subject: [PATCH 16/35] add fortify-headers paths
---
gcc/config/linux.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/gcc/config/linux.h b/gcc/config/linux.h
index e3aca79cccc..b3537b8fbeb 100644
--- a/gcc/config/linux.h
+++ b/gcc/config/linux.h
@@ -159,6 +159,8 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
#ifdef NATIVE_SYSTEM_HEADER_DIR
#define INCLUDE_DEFAULTS_MUSL_NATIVE \
+ { NATIVE_SYSTEM_HEADER_DIR "/fortify", 0, 0, 0, 1, 2 }, \
+ { NATIVE_SYSTEM_HEADER_DIR "/fortify", 0, 0, 0, 1, 0 }, \
{ NATIVE_SYSTEM_HEADER_DIR, 0, 0, 0, 1, 2 }, \
{ NATIVE_SYSTEM_HEADER_DIR, 0, 0, 0, 1, 0 },
#else
--
2.41.0
@@ -1,31 +0,0 @@
From 857db04f4f1a06e866551b4172fe8f27363f4a92 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Timo=20Ter=C3=A4s?= <timo.teras@iki.fi>
Date: Fri, 21 Aug 2020 07:03:00 +0000
Subject: [PATCH 17/35] Alpine musl package provides libssp_nonshared.a. We
link to it unconditionally, as otherwise we get link failures if some objects
are -fstack-protector built and final link happens with -fno-stack-protector.
This seems to be the common case when bootstrapping gcc, the piepatches do
not seem to fully fix the crosstoolchain and bootstrap sequence wrt.
stack-protector flag usage.
---
gcc/gcc.cc | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/gcc/gcc.cc b/gcc/gcc.cc
index b5a6f200635..6cbb726599b 100644
--- a/gcc/gcc.cc
+++ b/gcc/gcc.cc
@@ -991,8 +991,7 @@ proper position among the other output files. */
#ifndef LINK_SSP_SPEC
#ifdef TARGET_LIBC_PROVIDES_SSP
-#define LINK_SSP_SPEC "%{fstack-protector|fstack-protector-all" \
- "|fstack-protector-strong|fstack-protector-explicit:}"
+#define LINK_SSP_SPEC "-lssp_nonshared"
#else
#define LINK_SSP_SPEC "%{fstack-protector|fstack-protector-all" \
"|fstack-protector-strong|fstack-protector-explicit" \
--
2.41.0
@@ -1,69 +0,0 @@
From 5a8347e23ab13912b6edec2c6c6e3a101b017c79 Mon Sep 17 00:00:00 2001
From: Ariadne Conill <ariadne@dereferenced.org>
Date: Fri, 21 Aug 2020 07:03:42 +0000
Subject: [PATCH 18/35] DP: Use --push-state/--pop-state for gold as well when
linking libtsan.
---
gcc/gcc.cc | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/gcc/gcc.cc b/gcc/gcc.cc
index 6cbb726599b..59390fd39d6 100644
--- a/gcc/gcc.cc
+++ b/gcc/gcc.cc
@@ -755,10 +755,10 @@ proper position among the other output files. */
#define LIBASAN_SPEC STATIC_LIBASAN_LIBS
#elif defined(HAVE_LD_STATIC_DYNAMIC)
#define LIBASAN_SPEC "%{static-libasan:" LD_STATIC_OPTION "}" \
- " %{!static-libasan:%{!fuse-ld=gold:--push-state }--no-as-needed}" \
+ " %{!static-libasan:--push-state --no-as-needed}" \
" -lasan " \
" %{static-libasan:" LD_DYNAMIC_OPTION "}" \
- " %{!static-libasan:%{fuse-ld=gold:--as-needed;:--pop-state}}" \
+ " %{!static-libasan:--pop-state}" \
STATIC_LIBASAN_LIBS
#else
#define LIBASAN_SPEC "-lasan" STATIC_LIBASAN_LIBS
@@ -794,10 +794,10 @@ proper position among the other output files. */
#define LIBTSAN_SPEC STATIC_LIBTSAN_LIBS
#elif defined(HAVE_LD_STATIC_DYNAMIC)
#define LIBTSAN_SPEC "%{static-libtsan:" LD_STATIC_OPTION "}" \
- " %{!static-libtsan:%{!fuse-ld=gold:--push-state }--no-as-needed}" \
+ " %{!static-libtsan:--push-state --no-as-needed}" \
" -ltsan " \
" %{static-libtsan:" LD_DYNAMIC_OPTION "}" \
- " %{!static-libtsan:%{fuse-ld=gold:--as-needed;:--pop-state}}" \
+ " %{!static-libtsan:--pop-state}" \
STATIC_LIBTSAN_LIBS
#else
#define LIBTSAN_SPEC "-ltsan" STATIC_LIBTSAN_LIBS
@@ -815,10 +815,10 @@ proper position among the other output files. */
#define LIBLSAN_SPEC STATIC_LIBLSAN_LIBS
#elif defined(HAVE_LD_STATIC_DYNAMIC)
#define LIBLSAN_SPEC "%{static-liblsan:" LD_STATIC_OPTION "}" \
- " %{!static-liblsan:%{!fuse-ld=gold:--push-state }--no-as-needed}" \
+ " %{!static-liblsan:--push-state --no-as-needed}" \
" -llsan " \
" %{static-liblsan:" LD_DYNAMIC_OPTION "}" \
- " %{!static-liblsan:%{fuse-ld=gold:--as-needed;:--pop-state}}" \
+ " %{!static-liblsan:--pop-state}" \
STATIC_LIBLSAN_LIBS
#else
#define LIBLSAN_SPEC "-llsan" STATIC_LIBLSAN_LIBS
@@ -834,10 +834,10 @@ proper position among the other output files. */
" %{static-libubsan|static:%:include(libsanitizer.spec)%(link_libubsan)}"
#ifdef HAVE_LD_STATIC_DYNAMIC
#define LIBUBSAN_SPEC "%{static-libubsan:" LD_STATIC_OPTION "}" \
- " %{!static-libubsan:%{!fuse-ld=gold:--push-state }--no-as-needed}" \
+ " %{!static-libubsan:--push-state --no-as-needed}" \
" -lubsan " \
" %{static-libubsan:" LD_DYNAMIC_OPTION "}" \
- " %{!static-libubsan:%{fuse-ld=gold:--as-needed;:--pop-state}}" \
+ " %{!static-libubsan:--pop-state}" \
STATIC_LIBUBSAN_LIBS
#else
#define LIBUBSAN_SPEC "-lubsan" STATIC_LIBUBSAN_LIBS
--
2.41.0
@@ -1,26 +0,0 @@
From 41d00a2eb0754acf71958808bd17dbebeb517b84 Mon Sep 17 00:00:00 2001
From: Ariadne Conill <ariadne@dereferenced.org>
Date: Thu, 6 Jan 2022 03:12:55 +0000
Subject: [PATCH 19/35] aarch64: disable multilib support
multilib is unsupported on Alpine GCC
---
gcc/config/aarch64/t-aarch64-linux | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gcc/config/aarch64/t-aarch64-linux b/gcc/config/aarch64/t-aarch64-linux
index 57bf4100fcd..172894b57ef 100644
--- a/gcc/config/aarch64/t-aarch64-linux
+++ b/gcc/config/aarch64/t-aarch64-linux
@@ -22,7 +22,7 @@ LIB1ASMSRC = aarch64/lib1funcs.asm
LIB1ASMFUNCS = _aarch64_sync_cache_range
AARCH_BE = $(if $(findstring TARGET_BIG_ENDIAN_DEFAULT=1, $(tm_defines)),_be)
-MULTILIB_OSDIRNAMES = mabi.lp64=../lib64$(call if_multiarch,:aarch64$(AARCH_BE)-linux-gnu)
+MULTILIB_OSDIRNAMES = mabi.lp64=../lib
MULTIARCH_DIRNAME = $(call if_multiarch,aarch64$(AARCH_BE)-linux-gnu)
MULTILIB_OSDIRNAMES += mabi.ilp32=../libilp32$(call if_multiarch,:aarch64$(AARCH_BE)-linux-gnu_ilp32)
--
2.41.0
@@ -1,25 +0,0 @@
From 85b42bfbba71616831d14360b16998acb28790fd Mon Sep 17 00:00:00 2001
From: Ariadne Conill <ariadne@dereferenced.org>
Date: Thu, 6 Jan 2022 03:13:59 +0000
Subject: [PATCH 20/35] s390x: disable multilib support
multilib is not supported on Alpine GCC at present
---
gcc/config/s390/t-linux64 | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/gcc/config/s390/t-linux64 b/gcc/config/s390/t-linux64
index cc6ab367072..7f498ee1cdc 100644
--- a/gcc/config/s390/t-linux64
+++ b/gcc/config/s390/t-linux64
@@ -7,5 +7,5 @@
MULTILIB_OPTIONS = m64/m31
MULTILIB_DIRNAMES = 64 32
-MULTILIB_OSDIRNAMES = ../lib64$(call if_multiarch,:s390x-linux-gnu)
-MULTILIB_OSDIRNAMES += $(if $(wildcard $(shell echo $(SYSTEM_HEADER_DIR))/../../usr/lib32),../lib32,../lib)$(call if_multiarch,:s390-linux-gnu)
+MULTILIB_OSDIRNAMES = m64=../lib
+MULTILIB_OSDIRNAMES+= m32=../lib32
--
2.41.0
Loaded 100 of 4627 files, more files were not shown because too many files have changed in this diff. Show more