Compare commits

..
534 Commits
Author SHA1 Message Date
Dylan Van Assche 19ab7e6e65 temp/libssc: patch 103 threading
DO NOT MERGE
2025-12-05 19:43:07 +01:00
Antoine Martin a948683136 device-pine64-pinenote: drop phosh subpackage as not needed
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7470>
2025-12-05 17:56:39 +00:00
Luca Weiss 8624b297e6 device/*: Resolve deviceinfo errors highlighted by dint
A large scripted cleanup to fix the errors, each with the sed command
used.

**Renamed variables**

[Error!!!] deviceinfo_gpu_accelerated: gpu_accelerated was renamed to drm: More accurately describes its function; see pmaports#1481 for the reasoning.
sed -i 's/^deviceinfo_gpu_accelerated=/deviceinfo_drm=/' device/*/*/deviceinfo

[Error!!!] deviceinfo_flash_heimdall_partition_system: flash_heimdall_partition_system was renamed to flash_heimdall_partition_rootfs: Renamed to avoid confusion
sed -i 's/^deviceinfo_flash_heimdall_partition_system=/deviceinfo_flash_heimdall_partition_rootfs=/' device/*/*/deviceinfo

[Error!!!] deviceinfo_flash_fastboot_partition_system: flash_fastboot_partition_system was renamed to flash_fastboot_partition_rootfs: Renamed to avoid confusion
sed -i 's/^deviceinfo_flash_fastboot_partition_system=/deviceinfo_flash_fastboot_partition_rootfs=/' device/*/*/deviceinfo

**Obsolete variables**

[Error!!!] deviceinfo_keyboard: This property is obsolete: Programs should automatically detect if the device currently has a keyboard or not (often it can be hotplugged anyway).
sed -i '/^deviceinfo_keyboard=/d' device/*/*/deviceinfo

[Error!!!] deviceinfo_framebuffer_landscape: This property is obsolete: Removed by the switch to pbsplash with no apparent replacement
sed -i '/^deviceinfo_framebuffer_landscape=/d' device/*/*/deviceinfo

[Error!!!] deviceinfo_mesa_driver: This property is obsolete: This was used by osk-sdl, which has been replaced by unl0kr.
sed -i '/^deviceinfo_mesa_driver=/d' device/*/*/deviceinfo

**Default values**

[Warning!] deviceinfo_flash_method: Property is set to its default value ("none") and can be removed.
sed -i '/^deviceinfo_flash_method="none"/d' device/*/*/deviceinfo

[Warning!] deviceinfo_drm: Property is set to its default value (false) and can be removed.
sed -i '/^deviceinfo_drm="false"/d' device/*/*/deviceinfo

[Warning!] deviceinfo_bootimg_dtb_second: Property is set to its default value (false) and can be removed.
sed -i '/^deviceinfo_bootimg_dtb_second="false"/d' device/*/*/deviceinfo

[Warning!] deviceinfo_generate_bootimg: Property is set to its default value (false) and can be removed.
sed -i '/^deviceinfo_generate_bootimg="false"/d' device/*/*/deviceinfo

[Warning!] deviceinfo_flash_heimdall_partition_rootfs: Property is set to its default value ("SYSTEM") and can be removed.
sed -i '/^deviceinfo_flash_heimdall_partition_rootfs="SYSTEM"/d' device/*/*/deviceinfo

[Warning!] deviceinfo_flash_heimdall_partition_kernel: Property is set to its default value ("KERNEL") and can be removed.
sed -i '/^deviceinfo_flash_heimdall_partition_kernel="KERNEL"/d' device/*/*/deviceinfo

[Warning!] deviceinfo_flash_heimdall_partition_initfs: Property is set to its default value ("RECOVERY") and can be removed.
sed -i '/^deviceinfo_flash_heimdall_partition_initfs="RECOVERY"/d' device/*/*/deviceinfo

[Warning!] deviceinfo_flash_offset_base: Property is set to its default value ("0x10000000") and can be removed.
sed -i '/^deviceinfo_flash_offset_base="0x10000000"/d' device/*/*/deviceinfo

[Warning!] deviceinfo_flash_kernel_on_update: Property is set to its default value (false) and can be removed.
sed -i '/^deviceinfo_flash_kernel_on_update="false"/d' device/*/*/deviceinfo

[Warning!] deviceinfo_flash_fastboot_partition_rootfs: Property is set to its default value ("userdata") and can be removed.
sed -i '/^deviceinfo_flash_fastboot_partition_rootfs="userdata"/d' device/*/*/deviceinfo

[Warning!] deviceinfo_flash_fastboot_partition_kernel: Property is set to its default value ("boot") and can be removed.
sed -i '/^deviceinfo_flash_fastboot_partition_kernel="boot"/d' device/*/*/deviceinfo

[Warning!] deviceinfo_partition_type: Property is set to its default value ("gpt") and can be removed.
sed -i '/^deviceinfo_partition_type="gpt"/d' device/*/*/deviceinfo

[Warning!] deviceinfo_sd_embed_firmware_step_size: Property is set to its default value (1024) and can be removed.
sed -i '/^deviceinfo_sd_embed_firmware_step_size="1024"/d' device/*/*/deviceinfo

[Warning!] deviceinfo_boot_part_start: Property is set to its default value (2048) and can be removed.
sed -i '/^deviceinfo_boot_part_start="2048"/d' device/*/*/deviceinfo

[Warning!] deviceinfo_generate_legacy_uboot_initfs: Property is set to its default value (false) and can be removed.
sed -i '/^deviceinfo_generate_legacy_uboot_initfs="false"/d' device/*/*/deviceinfo

All were bumped using "pmbootstrap pkgver_bump".

[ci:ignore-count]

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

Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7403>
2025-12-05 16:57:35 +00:00
Achill Gilgenast ace38b27b6 temp/xkeyboard-config: include fork reason
[ci:skip-vercheck]: just comments

Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7490>
2025-12-05 16:42:54 +00:00
Achill Gilgenast cac5710561 temp/81voltd: include package reason
Fixes: 5f68d24452 ("temp/81voltd: new aport (MR 5387)")
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7490>
2025-12-05 16:42:54 +00:00
Achill Gilgenast 260f82a84a temp/libvdpau-tegra: remove
Merged in
<https://gitlab.alpinelinux.org/alpine/aports/-/merge_requests/57900>

Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7488>
2025-12-05 16:16:30 +00:00
Luca Weiss 3251144858 device/*: Add deviceinfo_year where missing
Take where available from the "Released" field from the postmarketOS
wiki page.

For others:
* https://en.wikipedia.org/wiki/RISC-V Introduced: 2014
* https://en.wikipedia.org/wiki/Loongson "Loongson moved to their own
  processor instruction set architecture (ISA) in 2021 [...]"
* https://en.wikipedia.org/wiki/AArch64 Introduced: 2011
* https://en.wikipedia.org/wiki/Chromebook "The first Chromebooks were
  shipped on June 15, 2011."
* https://en.wikipedia.org/wiki/POWER8 Launched: 2014

[ci:ignore-count]
[ci:skip-dint] # remaining occurances fixed in pma!7403

Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7480>
2025-12-05 16:13:36 +00:00
Luca Weiss 05c4cd8e06 device/*: Remove invalid deviceinfo variables
* deviceinfo_flash_heimdall_partition_boot was likely supposed to be
  deviceinfo_flash_heimdall_partition_kernel, but drop it because it
  might just be wrong

* deviceinfo_partition_table was likely supposed to be
  deviceinfo_partition_type, but drop it because it might just be wrong

* deviceinfo_disable_usb_gadget is used in
  https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6166
  but that MR has been open for 9 months, so remove the variable for
  now.

Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7480>
2025-12-05 16:13:36 +00:00
Luca Weiss 9968990d0b device/*: Remove 0x prefix from deviceinfo_legacy_uboot_load_address
While mkimage seems to also accept the address with a 0x prefix, remove
it to satisfy 'dint' and ensure consistency.

[Error!!!] deviceinfo_legacy_uboot_load_address: Failed to parse "0x1080000" as integer: invalid digit found in string

Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7480>
2025-12-05 16:13:36 +00:00
Jens Reidel 99996db6f0 linux-postmarketos-qcom-sm6350: Build with LLVM
[ci:skip-kconfigcheck]: bulk toolchain change

Signed-off-by: Jens Reidel <adrian@postmarketos.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7306>
2025-12-05 13:57:08 +01:00
Pablo Correa Gómez fbd0ab3bd7 device-qemu-aarch64: run unl0kr tests under ci-tron
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7481>
2025-12-05 07:26:24 +01:00
Pablo Correa Gómez c2c19a85d6 device-qemu-amd64: run unl0kr tests under ci-tron
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7481>
2025-12-05 07:26:24 +01:00
postmarketOS CI 1662a4fa29 linux-next: upgrade to next-20251205 2025-12-05 05:50:36 +00:00
postmarketOS CI 4d7c295af2 linux-next: upgrade to next-20251204 2025-12-04 22:41:01 +00:00
adamthiede 8c7412aa98 device-sqfmi-beepy: fix kernel module builds on updates
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7475>
2025-12-04 14:41:56 +00:00
Luca Weiss 70c0a00926 device/*: Bring remaining device packages to integer pkgver
We switched to using integer pkgver versions a long time ago. Bring the
remaining 4 packages in line so that "pmbootstrap pkgver_bump" can also
work properly on these (and not fail with these, given they're not
integers).

[ci:ignore-count]
[ci:skip-dint] # remaining occurances fixed in pma!7403
[ci:skip-vercheck] # intentionally bumping pkgver when not needed

Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7480>
2025-12-04 21:36:48 +09:00
Luca Weiss 627ba80058 device/*: Remove leftover _mainline / _downstream deviceinfo variables
They were forgotten during the testing/downstream split it seems. Clean
them up.

Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7480>
2025-12-04 21:36:48 +09:00
Luca Weiss 13f234e09b device-samsung-janice: Rename kernel_cmdline deviceinfo variable
While this package doesn't have a mainline kernel subpackage, it looks
like this cmdline should indeed be used. Remove the suffix.

Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7480>
2025-12-04 21:36:48 +09:00
Luca Weiss b21fe7ad23 device-motorola-maserati: Remove invalid deviceinfo variables
Move one that's used through 10-safestrap-maserati.sh to the script
itself.

Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7480>
2025-12-04 21:36:48 +09:00
Luca Weiss 28548ba440 device-clockworkpi-uconsole-radxa-cm5: move to archived
linux-radxa-dev packages x86_64 binaries in aarch64 package which makes
akms part of this device fail when built on aarch64.

Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7480>
2025-12-04 21:36:48 +09:00
Luca Weiss 486a726a2d device-clockworkpi-uconsole-radxa-cm5: Align deviceinfo header comment
Bring this file in line with the expected style, and fix a 'dint'
failure. There's no Maintainer line in deviceinfo either, just in the
APKBUILD.

[Error!!!]: Second comment was not an instruction to only use double quotes:

Actual: "# Maintainer: Antoine Martin (ayakael) <dev@ayakael.net>"
Expected: "# Please use double quotes only. You can source this file in shell scripts."
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7480>
2025-12-04 21:10:55 +09:00
Luca Weiss 210b56e4d9 device-samsung-loganrelte: Don't add comment after property in deviceinfo
There shouldn't be a comment in the same line as a variable.

Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7480>
2025-12-04 21:01:17 +09:00
Luca Weiss cabfabb88c ci: build_changed_aports: Skip packages in 'archived' category
Per definition, those might not be buildable anymore, so stop trying to
validate building them.

Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7480>
2025-12-04 21:00:29 +09:00
Jens Reidel 2f017acbb2 mt6735-bootshim: Use LLD to link
We're building in cross-native, but binutils LD cannot link for ARM on
x86. LLD is already in makedepends, just use it to be able to cross
compile natively.

Signed-off-by: Jens Reidel <adrian@postmarketos.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7438>
2025-12-03 19:59:22 +00:00
postmarketOS CI a16a10b5aa linux-next: upgrade to next-20251203 2025-12-03 05:51:39 +00:00
Andreas Kemnade e8832229da linux-epson-embt2ws: Update to 6.18.0
- fix hanging during boot
- fix sound sample rate error
- use llvm
- fix iio irq handling
- clean up the APKBUILD

Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7472>
2025-12-03 00:24:21 +00:00
Aster Boese 7900cad579 systemd/mutter: upgrade to 49.2
Signed-off-by: Aster Boese <asterboese@mailbox.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7474>
2025-12-02 16:03:45 -05:00
Aster Boese 58eb7800c0 systemd/multipath-tools: upgrade to 0.13.0
Signed-off-by: Aster Boese <asterboese@mailbox.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7474>
2025-12-02 16:03:32 -05:00
Aster Boese e56e1afa51 systemd/gnome-shell: upgrade to 49.2
Signed-off-by: Aster Boese <asterboese@mailbox.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7474>
2025-12-02 15:55:00 -05:00
Aster Boese c3ff559d5c main/devicepkg-dev: edit comment to avoid triggering grep ci error
Signed-off-by: Aster Boese <asterboese@mailbox.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6939>
2025-12-02 10:31:35 -05:00
Aster Boese 5943d80843 blackberry-key2-generic: move /etc/modules-load.d/ to /usr/lib/modules-load.d/
Signed-off-by: Aster Boese <asterboese@mailbox.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6939>
2025-12-02 10:31:35 -05:00
Aster Boese 112fcb5110 pine64-pinenote: workaround unnecessary error in grep ci check
The modules-load.d and modprobe.d files come from the `etc/...`
directories in the builddir, which causes in a false positive in the
grep CI check. This works around that to prevent having to disable
checking the entire device.

[ci:ignore-count]

Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6939>
2025-12-02 10:31:35 -05:00
Aster Boese 2115bee6b7 ci: disallow installing to /etc/modprobe.d and /etc/modules-load.d
Prevents having to occasionally fix packages installing to these directories instead of their
`/usr/lib` counterparts on accident. Catches these issues in CI instead of manually.

Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6939>
2025-12-02 10:31:35 -05:00
Aster Boese b5687e81b4 nokia-n900: /lib/{modprobe, modules-load}.d -> /usr/lib/{modprobe, modules-load}.d
The previous commit moving these to only `/lib/` was an error on my part for
misreading the manpages of kmod. Alpine *does* correctly handle modules under
`/usr/lib/`, so this is fine.

Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6939>
2025-12-02 10:31:35 -05:00
Aster Boese 02f900d6b1 purism-librem5: /etc/modules-load.d -> /usr/lib/modules-load.d
Signed-off-by: Aster Boese <asterboese@mailbox.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6939>
2025-12-02 10:31:35 -05:00
Aster Boese 5c72ff0919 zuk-z2-row: rebuild for devicepkg-dev 0.18.2
Signed-off-by: Aster Boese <asterboese@mailbox.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6939>
2025-12-02 10:31:35 -05:00
Aster Boese 4d8f7e310f sony-sirius: rebuild for devicepkg-dev 0.18.2
Signed-off-by: Aster Boese <asterboese@mailbox.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6939>
2025-12-02 10:31:35 -05:00
Aster Boese b0e143df1a sony-castor: rebuild for devicepkg-dev 0.18.2
Signed-off-by: Aster Boese <asterboese@mailbox.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6939>
2025-12-02 10:31:35 -05:00
Aster Boese 1eefc6bc46 semc-anzu: rebuild for devicepkg-dev 0.18.2
Signed-off-by: Aster Boese <asterboese@mailbox.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6939>
2025-12-02 10:31:35 -05:00
Aster Boese 05146b06f2 samsung-t0lte: rebuild for devicepkg-dev 0.18.2
Signed-off-by: Aster Boese <asterboese@mailbox.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6939>
2025-12-02 10:31:35 -05:00
Aster Boese ee3be81b8d samsung-t03g: rebuild for devicepkg-dev 0.18.2
Signed-off-by: Aster Boese <asterboese@mailbox.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6939>
2025-12-02 10:31:35 -05:00
Aster Boese 44bca0ed92 samsung-p4wifi: rebuild for devicepkg-dev 0.18.2
Signed-off-by: Aster Boese <asterboese@mailbox.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6939>
2025-12-02 10:31:35 -05:00
Aster Boese 161dbcb69b samsung-m3: rebuild for devicepkg-dev 0.18.2
Signed-off-by: Aster Boese <asterboese@mailbox.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6939>
2025-12-02 10:31:35 -05:00
Aster Boese 19be714e75 samsung-m0: rebuild for devicepkg-dev 0.18.2
Signed-off-by: Aster Boese <asterboese@mailbox.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6939>
2025-12-02 10:31:35 -05:00
Aster Boese 1c3eef6715 samsung-logands: rebuild for devicepkg-dev 0.18.2
Signed-off-by: Aster Boese <asterboese@mailbox.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6939>
2025-12-02 10:31:34 -05:00
Aster Boese 70421dfa81 samsung-i927: rebuild for devicepkg-dev 0.18.2
Signed-off-by: Aster Boese <asterboese@mailbox.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6939>
2025-12-02 10:31:34 -05:00
Aster Boese fe715bb201 samsung-i9105p: rebuild for devicepkg-dev 0.18.2
Signed-off-by: Aster Boese <asterboese@mailbox.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6939>
2025-12-02 10:31:34 -05:00
Aster Boese b568481606 samsung-baffinlite: rebuild for devicepkg-dev 0.18.2
Signed-off-by: Aster Boese <asterboese@mailbox.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6939>
2025-12-02 10:31:34 -05:00
Aster Boese 89dd36b60c medion-kai: rebuild for devicepkg-dev 0.18.2
Signed-off-by: Aster Boese <asterboese@mailbox.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6939>
2025-12-02 10:31:34 -05:00
Aster Boese 37bd741339 bananapi-bpi-m2-zero: rebuild for devicepkg-dev 0.18.2
Signed-off-by: Aster Boese <asterboese@mailbox.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6939>
2025-12-02 10:31:34 -05:00
Aster Boese 6353f048a4 amazon-soho: rebuild for devicepkg-dev 0.18.2
Signed-off-by: Aster Boese <asterboese@mailbox.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6939>
2025-12-02 10:31:34 -05:00
Aster Boese fcb246731a samsung-p4wifi: rebuild for devicepkg-dev 0.18.2
Signed-off-by: Aster Boese <asterboese@mailbox.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6939>
2025-12-02 10:31:34 -05:00
Aster Boese 0777acefb2 purism-librem5: /etc/modprobe.d -> /usr/lib/modprobe.d
Signed-off-by: Aster Boese <asterboese@mailbox.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6939>
2025-12-02 10:06:28 -05:00
Antoine Martin b19251b19f linux-pine64-pinenote: package efistub
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7462>
2025-12-02 01:00:47 +00:00
Antoine Martin 62602b55f6 device-pine64-pinenote: boot with systemd instead of extlinux
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7462>
2025-12-02 01:00:47 +00:00
Jens Reidel c65827d3c9 linux-postmarketos-qcom-sm7150: Upgrade to 6.18.0
Signed-off-by: Jens Reidel <adrian@postmarketos.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7463>
2025-12-01 23:27:43 +00:00
adamthiede d91751f2ad linux-postmarketos-mediatek-mt8173: upgrade to 6.18
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7467>
2025-12-01 22:02:51 +00:00
Jens Reidel 6e819c7e01 temp/iio-sensor-proxy: sync with Alpine
Signed-off-by: Jens Reidel <adrian@postmarketos.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7469>
2025-12-01 17:03:24 +00:00
Achill Gilgenast 461114fa69 systemd/systemd-services: remove zram-init-systemd
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7444>
2025-12-01 17:00:26 +00:00
Achill Gilgenast dc4c489534 main/postmarketos-base: move zram_swap deviceinfo source to a systemd override
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7444>
2025-12-01 17:00:26 +00:00
Clayton Craft 5cbd09c81c kconfigcheck: rust: disable DEBUG_INFO_BTF
When this config is enabled along with LTO (from the "hardening"
category), the kernel build system disables rust support.

These options are added to a new category, "rust" since it's only
necessary for kernels with rust support enabled.

Signed-off-by: Clayton Craft <craftyguy@postmarketos.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7466>
2025-12-01 08:27:17 -08:00
Jens Reidel 5800491bb1 {device,firmware,linux}-samsung-coreprimeve3g: move to downstream
Putting this into testing in the first place was not correct, the device
uses a downstream kernel. This was correctly pointed out by knuxify in
the MR that added the device already.

Signed-off-by: Jens Reidel <adrian@postmarketos.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7465>
2025-12-01 16:00:58 +00:00
Clayton Craft 06ba129102 linux-postmarketos-asahi: upgrade to 6.17.9-1
Also updates kconfig based on latest toml

Signed-off-by: Clayton Craft <craftyguy@postmarketos.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7460>
2025-12-01 15:57:38 +00:00
Francesco D'Alessano b382f13fbf firmware-samsung-a50: fix maintainer line
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7037>
2025-12-01 15:49:19 +00:00
Francesco D'Alessano bdcf9edc78 samsung-a50: new device
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7037>
2025-12-01 15:49:19 +00:00
Jens Reidel a0a9374f07 device-qcom-sm7150: Build image with subpartitions again
Turns out U-Boot is actually capable of reading loop devices, so this
simplifies things quite a bit for users during install.

Signed-off-by: Jens Reidel <adrian@postmarketos.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7257>
2025-12-01 16:39:01 +01:00
Antoine Martin 602c4e22b6 linux-pine64-pinenote: move to LLVM, introduce community kconfig changes
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7461>
2025-12-01 15:22:13 +00:00
Antoine Martin 74b1878dc7 linux-pine64-pinenote: upgrade to 6.17.9
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7461>
2025-12-01 15:22:13 +00:00
Sebastian Fleer 1e1ebb002a device/community/alsa-ucm-conf-google-gru: remove package
and make device-google-gru depend on alsa-ucm-conf instead

Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7464>
2025-12-01 13:37:26 +01:00
Sebastian Fleer ab93ea8c20 linux-postmarketos-rockchip: upgrade to 6.18
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7449>
2025-12-01 07:28:10 +01:00
postmarketOS CI e4dd0d1dd0 linux-next: upgrade to next-20251201 2025-12-01 05:54:24 +00:00
Oliver Smith da01755a87 systemd/plasma-workspace: upgrade to 6.5.3
Related: https://gitlab.alpinelinux.org/alpine/aports/-/commit/2a1715886bc006910a5821269b479c7a07c81dad
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7446>
2025-11-30 20:52:32 +00:00
Oliver Smith 4152e5d468 systemd/kwin: upgrade to 6.5.3
Related: https://gitlab.alpinelinux.org/alpine/aports/-/commit/2a1715886bc006910a5821269b479c7a07c81dad
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7446>
2025-11-30 20:52:32 +00:00
Oliver Smith 89b66b4032 systemd/kscreenlocker: upgrade to 6.5.3
Related: https://gitlab.alpinelinux.org/alpine/aports/-/commit/2a1715886bc006910a5821269b479c7a07c81dad
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7446>
2025-11-30 20:52:32 +00:00
Achill Gilgenast e1f0962c62 systemd/systemd-services: remove watchdog-kick-systemd
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7443>
2025-11-30 20:57:55 +01:00
Achill Gilgenast 30e495bbf0 main/watchdog-kick: fix typo in pkgdesc
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7443>
2025-11-30 19:21:10 +01:00
Achill Gilgenast be53edf1b0 main/watchdog-kick: move install= into top-level scope
and run default_openrc which will move watchdog-kick.init to the right
subpkg

Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7443>
2025-11-30 19:21:10 +01:00
Achill Gilgenast 8fa9f9548f main/watchdog-kick: subpackage -systemd
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7443>
2025-11-30 19:21:10 +01:00
Qs315490 416017bd34 xiaomi-latte: new device (Xiaomi Mi Pad 2)
The kernel version has been updated to mainline 6.16.0 and successfully compiled and tested.

Due to the device's specific requirements, it enforces the use of Secure Boot.
Disabling Secure Boot will reset it back to enabled after several reboots or DNX Fastboot sessions.

I had to resort to using shim and a self-signed certificate.

https://wiki.postmarketos.org/wiki/Xiaomi_Pad_2_(xiaomi-latte)

Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7286>
2025-11-30 18:01:56 +00:00
WeirdTreeThing 19de3b02bf alsa-ucm-conf-cros: upgrade to 0.8
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7454>
2025-11-30 17:57:25 +00:00
Achill Gilgenast b4c55cbd90 systemd/systemd-services: remove a few upstreamed services
Should be pretty safe. It just removes subpackages where all
containing files are upstreamed in Alpine. It also doesn't contain
removals that are still in other MRs by me, that might need related
changes.

The only thing that technically could break is differences between our
services and upstream, I tried to look that they are very similar but I
could missed the one or another, but most were upstream's anyway.

See https://gitlab.postmarketos.org/postmarketOS/pmaports/-/work_items/4099

Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7448>
2025-11-30 17:24:56 +00:00
Arnav Singh 4c64bbd428 linux-postmarketos-allwinner: add patch to increase minimum screen backlight brightness
Ref: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7441
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7452>
2025-11-30 17:22:15 +00:00
Jens Reidel 22d9d86b1d linux-postmarketos-omap: Build with LLVM
[ci:skip-kconfigcheck]: Bulk toolchain change

Signed-off-by: Jens Reidel <adrian@postmarketos.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7229>
2025-11-30 16:42:44 +00:00
Casey Connolly eaf6ff6567 CI: don't deploy docs from scheduled pipelines
The package auto-update runs in a scheduled pipeline, it should be
the only job that runs however a discrepency in the rules for the
deploy-docs job results in it running as well.

To mitigate this, add an additional rule to never run the job in a
scheduled pipeline.

Signed-off-by: Casey Connolly <kcxt@postmarketos.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7457>
2025-11-30 16:47:54 +01:00
Jens Reidel b0a87bf9f4 pmaports.cfg: Sort architectures, add riscv64
Signed-off-by: Jens Reidel <adrian@postmarketos.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7456>
2025-11-30 16:34:37 +01:00
postmarketOS CI e52dea50ff linux-next: upgrade to next-20251128 2025-11-30 15:31:27 +00:00
Oliver Smith ea9364e58e main/postmarketos-base-nofde: set provides version
Let postmarketos-base-nofde provide a specific version of
postmarketos-fde-unlocker, so pmbootstrap considers the package for
installation. From pmb/helpers/pmaports.py:_find_package_in_apkbuild():

  # Ignore provides without version, they shall never be
  # automatically selected
  if "=" not in provides_i:
      continue

Fix for bootstrapping new repositories, which currently fails with:

  ERROR: postmarketos-initramfs: dependency not found: postmarketos-fde-unlocker

...when trying to build postmarketos-cros-common or
device-valve-jupiter.

Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7455>
2025-11-30 15:50:26 +01:00
Jens ReidelandPablo Correa Gómez cdea3b1578 keepfileopen: fix builddir
Signed-off-by: Jens Reidel <adrian@postmarketos.org>
Co-authored-by: Pablo Correa Gómez <pabloyoyoista@postmarketos.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7436>
2025-11-30 14:35:49 +01:00
Robert Mader 09c4ba9e21 systemd/pipewire: Rebuild against libcamera 0.6.0
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7445>
2025-11-29 02:31:28 +01:00
Robert Mader aa9eb76406 temp/libcamera: upgrade to 0.6.0
See https://gitlab.freedesktop.org/camera/libcamera/-/releases/v0.6.0

Remove various upstreamed and move downstream tuning files into a
folder instead of wrapping them in patches.

Also sync up a bit to the alpine package by adding dependencies and the
python package.

Note: unfortunately this release does not contain the GPU-ISP. There
are various improvements to the SW-ISP, the simple pipeline handler and
other areas which should improve the experience on various devices with
pmOS, though.

Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7445>
2025-11-29 02:31:28 +01:00
Sebastian Fleer 52de048665 systemd/systemd-services: update waydroid-container.service
option -w was dropped in v1.6.0

Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7447>
2025-11-28 22:26:52 +01:00
Luca Weiss 98587c72b9 device-tokio-techbook: add missing u-boot-tools makedependendency
During build, only makedepends are installed so this is missing.

    /usr/bin/abuild: line 21: mkimage: not found
    >>> ERROR: device-tokio-techbook: build failed

Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7442>
2025-11-28 16:05:34 +00:00
ukloclo cb811af8b2 samsung-coreprimeve3g: new device
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7007>
2025-11-28 16:02:13 +00:00
Jens Reidel 30f790e67e linux-valve-jupiter: fix build with GCC 15
Signed-off-by: Jens Reidel <adrian@postmarketos.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7440>
2025-11-28 10:38:15 +00:00
Jens Reidel e3e4459e7a postmarketos-cros-common: fix build with new abuild
Signed-off-by: Jens Reidel <adrian@postmarketos.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7439>
2025-11-28 10:35:49 +00:00
Jens Reidel 1baaa21ee7 modem/msmipc-dev: fix unpack paths
Signed-off-by: Jens Reidel <adrian@postmarketos.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7437>
2025-11-28 10:33:13 +00:00
Luca Weiss f208372359 device/*: fix build due to abuild breaking changes
Since abuild 3.16.0_rc1 split functions are executed in $pkgdir. And
built files in build() are no longer showing up in "$srcdir" but are in
$pkgdir now apparently.

[ci:skip-vercheck] # just build fixes, no change in final package

Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7428>
2025-11-28 10:30:30 +00:00
Luca Weiss a21e1717fe device-samsung-starqltechn: update checksums
Somehow the different order of checksums breaks the checksum
verification?

    /home/pmos/build/boot_image.its: FAILED
    sha512sum: WARNING: 1 of 1 computed checksums did NOT match

Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7428>
2025-11-28 10:30:30 +00:00
Jens Reidel 7d65005f30 linux-postmarketos-qcom-sc7180: Build with LLVM
See https://postmarketos.org/edge/2025/11/11/kernels-llvm/ for the
background behind this change and how we're handling these MRs.

[ci:skip-kconfigcheck]: many changes across many kernels

Signed-off-by: Jens Reidel <adrian@postmarketos.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7349>
2025-11-28 06:31:53 +00:00
Jens Reidel f78d620dc6 linux-samsung-coreprimevelte: Build with LLVM
See https://postmarketos.org/edge/2025/11/11/kernels-llvm/ for the
background behind this change and how we're handling these MRs.

[ci:skip-kconfigcheck]: large change across many packages, we leave
kconfig fixes to kernel maintainers

Signed-off-by: Jens Reidel <adrian@postmarketos.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7348>
2025-11-28 06:27:45 +00:00
Jens Reidel a7254e9bac firmware-b43xx: fix source URL
Old one is down, checksum is identical.

Signed-off-by: Jens Reidel <adrian@postmarketos.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7434>
2025-11-28 01:39:41 +00:00
Jens Reidel 7f8b19868f main/dtbtool-sprd: fix build
Signed-off-by: Jens Reidel <adrian@postmarketos.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7435>
2025-11-27 23:22:09 +01:00
Oliver Smith 462ed59916 channels.cfg: add v25.12 2025-11-27 22:14:35 +01:00
Achill Gilgenast 7d3e9351e8 systemd/systemd-services: remove qcom-diag-systemd
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7421>
2025-11-26 21:44:45 +01:00
Achill Gilgenast d68bbc98f4 modem/qcom-diag: subpackage -systemd
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7421>
2025-11-26 21:37:14 +01:00
Jens Reidel 6a984c485c kconfigcheck: Fix version requirement for hardening configs
Since CONFIG_CFI exists since 6.18rc1, the requirement must be
>=6.18_rc1. This went unnoticed in my testing because my kernel
incorrectly had a version of 6.18.0_rc1, which is greater than 6.18.0,
but the correct version would be 6.18_rc1, which is lower than 6.18.0.

Signed-off-by: Jens Reidel <adrian@postmarketos.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7430>
2025-11-26 20:08:22 +01:00
Jens Reidel 9d83ec7d1f main/gcc6: fix build
See the GCC 4 MR. This is basically the same changes, but we also need
one extra backport to build this version of GCC.

Signed-off-by: Jens Reidel <adrian@postmarketos.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7426>
2025-11-26 18:25:03 +00:00
Jens Reidel bf57c094e4 main/gcc4: upgrade to 4.9.4, fix build
This upgrade GCC 4 to 4.9.4, the last release in the GCC 4 series. This
lets us drop one of the patches, which was included in 4.9.4.

We need to get rid of 3 flags that are set globally for compiling such
an old version of GCC (it doesn't know two of them, and
-Werror=format-security cannot be used with GCC).

Signed-off-by: Jens Reidel <adrian@postmarketos.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7423>
2025-11-26 18:22:31 +00:00
Pablo Correa Gómez 80a7481259 wl1251-cal: rebuild to kick CI 2025-11-26 14:24:05 +01:00
Stefan Hansson a324a84519 device: move local install to global install for some devices
This doesn't cover all devices, but I intend to do more of them in the
future.

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

Signed-off-by: Stefan Hansson <newbyte@postmarketos.org>

[ci:ignore-count]: Intentionally changes a lot of packages.

Signed-off-by: Stefan Hansson <newbyte@postmarketos.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7384>
2025-11-26 12:13:25 +00:00
Stefan Hansson d945124004 CI: Don't stop on first Pytest failure
This makes it easier to see everything that needs to be fixed in case of
multiple issues.

Signed-off-by: Stefan Hansson <newbyte@postmarketos.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7384>
2025-11-26 12:13:25 +00:00
Jens Reidel 6e0d8aa09a ci: Raise pmb timeout to 1 hour
Signed-off-by: Jens Reidel <adrian@postmarketos.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7391>
2025-11-26 12:05:05 +00:00
Jens Reidel b59e6adaf5 kconfigcheck: Add hardening category
For now, this category requires CFI and SCS to be enabled and ensures
that CFI is compatible with Rust. More options can be added in the
future.

Signed-off-by: Jens Reidel <adrian@postmarketos.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7391>
2025-11-26 12:05:05 +00:00
Stefan Hansson 72869873df device-oneplus-fajita: fix build
Maybe something has changed in abuild, I don't know.

Signed-off-by: Stefan Hansson <newbyte@postmarketos.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7406>
2025-11-26 11:30:27 +00:00
Stefan Hansson c4a617bca4 device-oneplus-enchilada: fix build
Maybe something has changed in abuild, I don't know.

Signed-off-by: Stefan Hansson <newbyte@postmarketos.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7406>
2025-11-26 11:30:27 +00:00
Sebastian Fleer fbaeffab6b linux-postmarketos-rockchip: upgrade to 6.12.59
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7425>
2025-11-26 06:41:23 +00:00
Sebastian Fleer 628b7a656e linux-postmarketos-rockchip: resolve all kconfigcheck infos
and one small formatting fix

Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7425>
2025-11-26 06:41:23 +00:00
Aster Boese c9bd85695e systemd/xorg-server: upgrade to 21.1.21
Signed-off-by: Aster Boese <asterboese@mailbox.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7427>
2025-11-25 20:22:48 -05:00
Aster Boese c0b64e186c systemd/upower: upgrade to 1.91.0
Signed-off-by: Aster Boese <asterboese@mailbox.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7427>
2025-11-25 20:22:27 -05:00
Achill Gilgenast 55fec507c0 systemd/systemd-services: remove msm-modem-systemd & msm-modem-wwan-port-systemd
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7424>
2025-11-25 22:31:05 +00:00
Achill Gilgenast d249c693b2 modem/msm-modem-wwan-port: add systemd service file
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7424>
2025-11-25 22:31:05 +00:00
Achill Gilgenast 05fb3681bc modem/msm-modem: add systemd service file
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7424>
2025-11-25 22:31:05 +00:00
Alexey Minnekhanov 0af1e1e7b5 linux-postmarketos-qcom-sdm660: Comply with new kconfig requirements
Immutable category was added to community kconfigcheck requirements.
Enable some new options (like erofs) to satisfy checks and avoid ERRORs.

Signed-off-by: Alexey Minnekhanov <alexeymin@postmarketos.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7422>
2025-11-25 20:14:36 +00:00
Pablo Correa Gómez ff95dd7abc device-xiami-scorpio: move from community to testing
[ci:skip-vercheck]
[ci:skip-build]
[ci:skip-dint]
[ci:skip-kconfigcheck]

Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7420>
2025-11-25 07:34:00 +00:00
Bart Ribbers 6ddc546289 systemd/systemd-services: remove upstreamed KDE -systemd subpackages
These are all in Alpine now!

Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7419>
2025-11-24 22:13:21 +00:00
Clayton Craft 1448a6cc3e main/boot-deploy: upgrade to 0.20.4
Fixes:
* Remove boot image header v2 spaghetti

Signed-off-by: Clayton Craft <craftyguy@postmarketos.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7418>
2025-11-24 09:22:30 -08:00
Stefan Hansson 7b7c3a3636 main/postmarketos-ui-plasma-desktop: disable on ppc64le
Signed-off-by: Stefan Hansson <newbyte@postmarketos.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7412>
2025-11-24 14:03:05 +01:00
Stefan Hansson ff5add0aaa main/postmarketos-ui-plasma-mobile: clean up pkgdesc
The pmb:drm property already communicates this information and hides the
UI on devices where it won't run.

Signed-off-by: Stefan Hansson <newbyte@postmarketos.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7412>
2025-11-23 21:26:49 +00:00
Stefan Hansson 5ace0ecab7 main/postmarketos-ui-plasma-mobile: move install to global scope
See https://gitlab.postmarketos.org/postmarketOS/pmaports/-/issues/4032

Signed-off-by: Stefan Hansson <newbyte@postmarketos.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7412>
2025-11-23 21:26:49 +00:00
Stefan Hansson 31b9f2fd87 main/postmarketos-ui-plasma-desktop: Don't advertise X11 support
While Plasma Desktop upstream supports this, the version packaged in
Alpine does not.

Signed-off-by: Stefan Hansson <newbyte@postmarketos.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7412>
2025-11-23 21:26:46 +00:00
Stefan Hansson 1e2cfb4e1a main/postmarketos-ui-plasma-desktop: move install to global scope
See https://gitlab.postmarketos.org/postmarketOS/pmaports/-/issues/4032

Signed-off-by: Stefan Hansson <newbyte@postmarketos.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7412>
2025-11-23 21:26:46 +00:00
Stefan Hansson 433454329b main/postmarketos-base-ui-plasma: move install to global scope
See https://gitlab.postmarketos.org/postmarketOS/pmaports/-/issues/4032

Signed-off-by: Stefan Hansson <newbyte@postmarketos.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7412>
2025-11-23 21:26:42 +00:00
Pablo Correa Gómez 6d879111b1 docs: add auto-generated deviceinfo reference
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7414>
2025-11-23 20:26:30 +00:00
Pablo Correa Gómez 05efd122f2 docs: remove unused addition to path
This was copied from pmbootstrap, here we're not using anything
outside the "docs" folder.

Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7414>
2025-11-23 20:26:30 +00:00
Pablo Correa Gómez c70d9c10d8 systemd/systemd-services: remove flatpak subpackage
The missing tempfile is now upstream:
https://gitlab.alpinelinux.org/alpine/aports/-/commit/b3da694af2b8de59b9e51317521fdbaf0e619d54

Fixes #4111

Superseeds !7415

Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7416>
2025-11-23 14:23:58 +01:00
Pavel Zakopaylo 39967a32ed device-xunlong-orangepi-zero3: fixed device tree name
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7411>
2025-11-22 19:37:16 +11:00
Stefan Hansson 93840bab2c systemd/systemd-services: remove lots of services now in aports
I manually checked that all of these are in aports and part of a proper
-systemd subpackage and not e.g. superd-services.

Signed-off-by: Stefan Hansson <newbyte@postmarketos.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7410>
2025-11-22 01:57:04 +00:00
Rudraksha Gupta 8a820295a4 linux-next: expressatt: Add more peripherals
Got the following working:
- NFC
- Accelerometer
- Magnetometer
- Lux Sensor

Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7399>
2025-11-21 23:18:55 +00:00
Stefan Hansson 25e3143b39 systemd/systemd-services: remove xdg-desktop-portal-gnome.service
This has been upstreamed to aports and is now part of the
xdg-desktop-portal-gnome-systemd package. Remove it to fix conflicts.

Signed-off-by: Stefan Hansson <newbyte@postmarketos.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7409>
2025-11-21 21:45:20 +01:00
Stefan Hansson b2a99ae4ff systemd/systemd-services: remove xfconfd.service
This has been upstreamed to aports now and is part of the
xfconf-systemd package. Remove it to fix conflicts.

Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7408>
2025-11-21 20:35:47 +01:00
Stefan Hansson cea9dd076d main/dint: upgrade to 0.0.4
Signed-off-by: Stefan Hansson <newbyte@postmarketos.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7407>
2025-11-21 20:13:50 +01:00
Clayton Craft 287331de80 kconfigcheck: require immutable category for community kernels
This will make testing immutable images easier, because currently I
suspect most kernels aren't enabling things like erofs...

Signed-off-by: Clayton Craft <craftyguy@postmarketos.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7395>
2025-11-21 17:14:02 +00:00
Achill Gilgenast a16aa558a6 systemd/systemd-services: remove wireguard-tools-wg-quick-systemd
Superseeded by the wireguard-tools-systemd package upstream in Alpine:
https://gitlab.alpinelinux.org/alpine/aports/-/commit/6bce751d41855ba46c2e6bb2a7cf419c7454d29f

Otherwise upgrade fails with:

	ERROR: wireguard-tools-systemd-1.0.20250521-r1: trying to overwrite usr/lib/systemd/system/wg-quick@.service owned by wireguard-tools-wg-quick-systemd-101-r0.

Closes: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/issues/4105
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7401>
2025-11-21 16:09:52 +00:00
Achill Gilgenast 62c2e0ca04 modem/pd-mapper: subpackage -systemd
Part of https://gitlab.postmarketos.org/postmarketOS/pmaports/-/work_items/4099

Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7400>
2025-11-21 11:36:31 +00:00
Pavel Zakopaylo f34692d224 xunlong-orangepi-zero3: new device
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7325>
2025-11-21 11:31:14 +00:00
Jonas Heinrich 3deafab416 device-oneplus-billie2: new device
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7300>
2025-11-21 11:25:08 +00:00
Jonas Heinrich 2475ed461c oneplus-billie2-downstream: move to archived
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7300>
2025-11-21 11:25:08 +00:00
Jens Reidel a499fc6a80 kconfigcheck: Resolve some more warnings
CRYPTO_MD5 and ZSMALLOC are enabled as builtin by the default defconfigs
for x86_64, ppc64le and loongarch64, amongst others.

To avoid warnings on mismatches, just make them builtin for all
architectures.

Signed-off-by: Jens Reidel <adrian@postmarketos.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7397>
2025-11-20 16:10:39 +00:00
Jens Reidel cd62959335 kconfigcheck: EFI is not available on ppc64le
Signed-off-by: Jens Reidel <adrian@postmarketos.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7397>
2025-11-20 16:10:39 +00:00
Jens Reidel 8cfaff88c8 kconfigcheck: Fix ConfigFS gadget dependencies
Signed-off-by: Jens Reidel <adrian@postmarketos.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7397>
2025-11-20 16:10:36 +00:00
Jens Reidel c0e981b059 kconfigcheck: SPI drivers depend on SPI
Signed-off-by: Jens Reidel <adrian@postmarketos.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7397>
2025-11-20 16:10:32 +00:00
Jens Reidel 37abd842fb kconfigcheck: HID sensors depend on IIO
Signed-off-by: Jens Reidel <adrian@postmarketos.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7397>
2025-11-20 16:10:29 +00:00
Jens Reidel f4bd887fb6 kconfigcheck: GPIOLIB is required by some HID configs
Signed-off-by: Jens Reidel <adrian@postmarketos.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7397>
2025-11-20 16:10:25 +00:00
Jens Reidel 81504cb5e8 kconfigcheck: NETFILTER_ADVANCED is required by some configs
Signed-off-by: Jens Reidel <adrian@postmarketos.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7397>
2025-11-20 16:10:22 +00:00
Jens Reidel df583a8cb0 kconfigcheck: KVM is not available on 32-bit ARM
Signed-off-by: Jens Reidel <adrian@postmarketos.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7397>
2025-11-20 16:10:18 +00:00
Jens Reidel 4e956c0f15 kconfigcheck: BLK_DEV_DM requires MD
Signed-off-by: Jens Reidel <adrian@postmarketos.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7397>
2025-11-20 16:10:15 +00:00
Jens Reidel 9b27b4a0f7 linux-purism-librem5: Build with LLVM
Signed-off-by: Jens Reidel <adrian@postmarketos.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7227>
2025-11-20 09:26:24 +00:00
Clayton Craft 0268336968 main/postmarketos-initramfs: fix bug with booting from usb
This fixes a weird race that I observed when booting from usb, where
mount_subpartitons was called and:

1) rootfs on USB wasn't available so the first find_root_partition found nothing

2) the loop was entered to search for subpartitions

3) after a few iterations, the USB block device showed up along with its
partitions and the for loop was started

4) kpartx -afs created mappings for partitions on the disk (e.g.
/dev/sda), the rootfs was found by find_root_partition but the mappings
were never removed

5) Later when things like e2fsck or mount tried to operate on /dev/sda2,
they would fail with "in use" or "resource busy" errors

The fix for this is two parts:

* Don't try to look for subpartitions on whole disks (e.g /dev/sda),
it tests for this by assuming that partitions have a `partition` thing
under sysfs

* Running find_root_partition on each iteration of the while loop just
in case the real partition showed up so we can bail out of the while
loop entirely. This is janky af, but since we have no idea if we're in
mount_subpartitions because we need to actually search for subpartitions
OR if we're here because of a slow-to-init block device, I'm not sure we
have any other choice.

Signed-off-by: Clayton Craft <craftyguy@postmarketos.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7246>
2025-11-19 16:10:57 +00:00
Antoine Martin bde521a2aa linux-pine64-pinenote: upgrade to 6.17.8
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7364>
2025-11-19 15:40:13 +00:00
Stefan Hansson 68c5f9a516 device-purism-librem5: depend on bash
We package the lockdown-support.sh script from Purism's librem5-base
package. This script has a bash shebang[1] and so won't work with any
other shell. It also uses some bashisms that Ash doesn't support, so we
can't just change the shebang to be /bin/sh or such as that will break
the script.

As such, just solve this in the simplest way for now and depend on bash.
If someone feels motivated to replace the bashisms in the upstream
script they're very welcome to do so.

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

 [1]: https://source.puri.sm/Librem5/librem5-base/-/blob/07a4105dd4d96158e11d6796a25768926c7a3f30/default/lockdown-support/lockdown-support.sh#L1

Signed-off-by: Stefan Hansson <newbyte@postmarketos.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7376>
2025-11-19 15:36:11 +00:00
postmarketOS CI f4ef862f5e linux-next: upgrade to next-20251119 2025-11-19 05:42:26 +00:00
adamthiede c9e62b46f9 linux-postmarketos-mediatek-mt8173: upgrade to 6.17.8
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7394>
2025-11-18 21:46:59 +00:00
Achill Gilgenast 8132c148f1 systemd/networkmanager: upgrade to 1.54.2
Upstream:
- https://gitlab.alpinelinux.org/alpine/aports/-/commit/f897a08267c31b0f7ebff67f28c9a062d6ecae91
- https://gitlab.alpinelinux.org/alpine/aports/-/commit/5e6737e5422fafff5b812ff338275e35d7699497

Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7396>
2025-11-18 20:33:00 +01:00
Lukas Timmermann db593b9d23 device-samsung-manta: Switch to u-boot
Signed-off-by: Lukas Timmermann <lukas@timmermann.space>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7208>
2025-11-18 05:56:01 +00:00
Lukas Timmermann c087973349 u-boot-manta: Introduce u-boot package for device-samsung-manta
Signed-off-by: Lukas Timmermann <lukas@timmermann.space>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7208>
2025-11-18 05:56:01 +00:00
Lukas Timmermann 2b8e664a33 linux-postmarketos-exynos5: Enable EFI booting
Signed-off-by: Lukas Timmermann <linux@timmermann.space>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7208>
2025-11-18 05:56:01 +00:00
Lukas Timmermann 4265586b81 device-samsung-manta: Fix obsolete deviceinfo
Signed-off-by: Lukas Timmermann <linux@timmermann.space>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7208>
2025-11-18 05:56:01 +00:00
postmarketOS CI 29271848b7 linux-next: upgrade to next-20251118 2025-11-18 05:50:09 +00:00
Jens Reidel 9121a7afbb linux-postmarketos-qcom-sdm670: Build with LLVM
See https://postmarketos.org/edge/2025/11/11/kernels-llvm/ for the
background behind this change and how we're handling these MRs.

Signed-off-by: Jens Reidel <adrian@postmarketos.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7347>
2025-11-18 02:05:50 +00:00
postmarketOS CI 2c16cc2615 linux-next: upgrade to next-20251117 2025-11-17 16:48:37 +00:00
Jens Reidel 619a2af680 kconfigcheck: Enable EFI_ZBOOT for RISC-V
Signed-off-by: Jens Reidel <adrian@postmarketos.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7392>
2025-11-17 10:13:44 +00:00
Jens Reidel bed66181bb kconfigcheck: Add missing dependencies
I am working on a RISC-V kernel that uses fragments and ran into a
couple of warnings / errors due to missing configs that resulted in some
other kconfigchecks failing. This fixes all of the errors I ran into.

Signed-off-by: Jens Reidel <adrian@postmarketos.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7392>
2025-11-17 10:13:44 +00:00
smallsolar c1590308f1 linux-samsung-a5y17lte: upgrade to 3.18.140
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7389>
2025-11-17 09:02:42 +00:00
David Buchanan 484b4aa79b linux-samsung-nevisp: fix build
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7390>
2025-11-17 09:59:02 +01:00
Jens Reidel 8dc1e78cf7 linux-pine64-pinephonepro: Use llvm-strip for modules_install
I had originally overlooked that this was necessary. If
INSTALL_MOD_STRIP=1 is set when invoking modules_install, we need to set
LLVM=1 to ensure that llvm-strip is used instead of GNU binutils strip.

Signed-off-by: Jens Reidel <adrian@postmarketos.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7350>
2025-11-16 17:48:23 +00:00
Jens Reidel 34ea519d4b linux-postmarketos-qcom-sm8250: Use llvm-strip for modules_install
I had originally overlooked that this was necessary. If
INSTALL_MOD_STRIP=1 is set when invoking modules_install, we need to set
LLVM=1 to ensure that llvm-strip is used instead of GNU binutils strip.

Signed-off-by: Jens Reidel <adrian@postmarketos.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7360>
2025-11-16 17:44:41 +00:00
Jens Reidel 8ff084d29e linux-postmarketos-qcom-sdm845: Use llvm-strip for modules_install
I had originally overlooked that this was necessary. If
INSTALL_MOD_STRIP=1 is set when invoking modules_install, we need to set
LLVM=1 to ensure that llvm-strip is used instead of GNU binutils strip.

Signed-off-by: Jens Reidel <adrian@postmarketos.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7358>
2025-11-16 17:20:54 +00:00
Aster Boese bcaa488e8c kconfigcheck: remove HID_BPF and its dependencies
HID_BPF conflicts with CLANG_CFI, which we want to enable in the near future.
It also doesn't seem that HID_BPF is particularly useful for postmarketOS as
a whole, so it should be fine to remove.

Signed-off-by: Aster Boese <asterboese@mailbox.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7370>
2025-11-16 16:29:59 +00:00
Achill Gilgenast 3ae47735b5 systemd/phosh: remove
systemd split func got added in Alpine with
<https://gitlab.alpinelinux.org/alpine/aports/-/merge_requests/93135>.

Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7387>
2025-11-16 12:05:00 +00:00
Clayton Craft 97e0b9644a linux-postmarketos-asahi: upgrade to 6.17.8-1
Signed-off-by: Clayton Craft <craftyguy@postmarketos.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7380>
2025-11-16 11:38:27 +00:00
Barnabás Czémán 89aa5da1c9 linux-postmarketos-qcom-msm89x7: Upgrade to v6.17.8-r0
Upgrade kernel to v6.17.8-r0 and adjust config to community target.

Signed-off-by: Barnabás Czémán <barnabas.czeman@postmarketos.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7383>
2025-11-16 11:35:35 +00:00
Bart Ribbers 795ff77a2d main/postmarketos-base-ui-plasma: depend on polkit systemd for systemd installations
Since 23e7b54acd488afbf30c666e2b17b8fa2f37970d in aports
polkit-kde-agent-1 doesn't pull in polkit-elogind anymore which seems to
also have caused the systemd installations in postmarketOS to not pull
in polkit-systemd anymore. Since that's a package that should be pulled
in from a meta package anyway (so they can differ per init system
properly) we should pull it in now as otherwise the keyboard input does
not work on SDDM (and there are probably more problems without it as
well).

Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7385>
2025-11-16 11:33:00 +00:00
Bart Ribbers 83bb9428a5 systemd/kwin: rebuild against Qt 6.10
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7385>
2025-11-16 11:33:00 +00:00
Rudraksha Gupta 72dbafa432 Remove apq8064 kernel
This kernel shouldn't exist. msm8960 devices, like the expressatt,
already use the linux-* mainline kernels and the apq8064 is very related
to the msm8960. Let's deprecate this kernel and shift the devices that
depend on the apq8064 kernel onto the mainline kernels.

Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7334>
2025-11-16 09:12:14 +00:00
Jens Reidel 7c8101aa9a 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>
2025-11-15 23:11:28 +00:00
Jens Reidel b8b88ac7fd systemd/networkmanager: Disable crossdirect for now
Signed-off-by: Jens Reidel <adrian@postmarketos.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7375>
2025-11-15 18:16:18 +00:00
Stefan Hansson 41f26f2942 main/postmarketos-ui-lomiri: disable on ppc64le
Signed-off-by: Stefan Hansson <newbyte@postmarketos.org>

[ci:skip-vercheck]: These packages only change options read by
pmbootstrap, nothing that actually affects built packages.

Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7365>
2025-11-15 18:10:06 +00:00
Stefan Hansson c44545a8b7 main/postmarketos-ui-moonlight: set pmb:drm
This UI uses Cage as compositor which depends on wlroots and thus won't
work without DRM.

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

Signed-off-by: Stefan Hansson <newbyte@postmarketos.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7365>
2025-11-15 18:10:06 +00:00
Stefan Hansson 92e5569199 main/postmarketos-ui-mediaberry: set pmb:drm
Mediaberry seems to use a wlroots-based Wayland compositor forked from
tinywl. As wlroots doesn't support running without DRM unless you do
some funny workarounds like running inside an X.Org session, I'm
confident our Mediaberry UI won't work without DRM as-is.

Signed-off-by: Stefan Hansson <newbyte@postmarketos.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7365>
2025-11-15 18:10:06 +00:00
Stefan Hansson 34a4c68365 main/postmarketos-ui-lomiri: set pmb:drm
It seems like Mir, Lomiri's compositor, does require DRM based on a
quick web search[1]. I didn't actually attempt to verify it beyond that.
While it probably doesn't require DRM if you use whatever backend Ubuntu
Touch uses for its non-mainline devices, we probably don't have the
userspace required for that to work anyway. So given the lack of
evidence that it would work without DRM, let's just assume that's the
case unless someone finds out otherwise.

 [1]: https://forum.snapcraft.io/t/run-mir-kiosk-in-hyper-v-no-drm-devices-detected/25924

Signed-off-by: Stefan Hansson <newbyte@postmarketos.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7365>
2025-11-15 18:10:06 +00:00
Stefan Hansson b47edd33af CI: Remove obsolete deviceinfo validation
This functionality is now handled by dint.

Signed-off-by: Stefan Hansson <newbyte@postmarketos.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7378>
2025-11-15 18:06:12 +00:00
Stefan Hansson 87b6b9b9fa main/dint: upgrade to 0.0.3
Signed-off-by: Stefan Hansson <newbyte@postmarketos.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7378>
2025-11-15 18:06:12 +00:00
Jens Reidel 85dc98b0c1 postmarketos-ui-cosmic: Enable for loongarch64
COSMIC works fine on loongarch64.

[ci:skip-vercheck]: enable package for architecture

Signed-off-by: Jens Reidel <adrian@postmarketos.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7374>
2025-11-15 18:02:30 +00:00
Achill Gilgenast 101fa7ac5d systemd/systemd-services: remove phosh services
Upstreamed in Alpine: https://gitlab.alpinelinux.org/alpine/aports/-/merge_requests/93087

Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7377>
2025-11-15 16:01:08 +00:00
Affe Null c0dd84ed1a linux-postmarketos-unisoc-ums9230: upgrade to 6.18.0_rc5_git20251114
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7371>
2025-11-15 12:44:37 +00:00
Jens Reidel 4971cffa24 cross/systemd-boot-x86: upgrade to 258.2
Signed-off-by: Jens Reidel <adrian@postmarketos.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7372>
2025-11-15 00:08:53 +00:00
Jens Reidel 5858265e40 linux-postmarketos-qcom-sm7150: Use llvm-strip for modules_install
I had originally overlooked that this was necessary. If
INSTALL_MOD_STRIP=1 is set when invoking modules_install, we need to set
LLVM=1 to ensure that llvm-strip is used instead of GNU binutils strip.

Signed-off-by: Jens Reidel <adrian@postmarketos.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7359>
2025-11-14 23:51:16 +00:00
Jens Reidel e43ffcdd6f linux-postmarketos-rockchip: Use llvm-strip for modules_install
I had originally overlooked that this was necessary. If
INSTALL_MOD_STRIP=1 is set when invoking modules_install, we need to set
LLVM=1 to ensure that llvm-strip is used instead of GNU binutils strip.

Signed-off-by: Jens Reidel <adrian@postmarketos.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7361>
2025-11-14 23:48:24 +00:00
Robert Eckelmann 37cdda5adb kconfigcheck: adjust requirements for IP_NF_IPTABLES_LEGACY & IP6_NF_IPTABLES_LEGACY
These legacy options fail the kconfig check of `linux-google-nyan` which
is currently at 6.6.17. This was discovered during the step to update
the kconfig during !7273.

According to
https://cateee.net/lkddb/web-lkddb/IP_NF_IPTABLES_LEGACY.html and
https://cateee.net/lkddb/web-lkddb/IP6_NF_IPTABLES_LEGACY.html were
introduced with Kernel version 6.9

Signed-off-by: Robert Eckelmann <longnoserob@postmarketos.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7367>
2025-11-14 22:49:04 +00:00
Jens Reidel b4dea23916 postmarketos-ui-cosmic: Enable for ppc64le
[ci:skip-vercheck]: enabling package for architecture

Signed-off-by: Jens Reidel <adrian@postmarketos.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7337>
2025-11-14 20:30:57 +00:00
Dang Huynh 9b2fd4ce5a linux-pine64-pinetab2: Upgrade to 6.17.8
This kernel version includes BES2600 Bluetooth UART driver and also
fixes black box around the cursor on KDE Plasma[1].

[1]: https://bugs.kde.org/show_bug.cgi?id=511274

Signed-off-by: Dang Huynh <dang.huynh@mainlining.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7366>
2025-11-14 16:20:57 +00:00
Jens Reidel 65f5257ce6 linux-postmarketos-mediatek-mt8173: Use llvm-strip for modules_install
I had originally overlooked that this was necessary. If
INSTALL_MOD_STRIP=1 is set when invoking modules_install, we need to set
LLVM=1 to ensure that llvm-strip is used instead of GNU binutils strip.

Signed-off-by: Jens Reidel <adrian@postmarketos.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7356>
2025-11-14 12:22:58 +00:00
Luca Weiss 04303b8978 linux-postmarketos-qcom-sm6350: upgrade to 6.17.6
Manual kconfig changes:
* BATTERY_QCOM_QG=y
* CHARGER_QCOM_SMB2=y
* VIDEO_QCOM_CAMSS=m
* VIDEO_IMX576=m (FP4)
* VIDEO_IMX582=m (FP4)
* DRM_PANEL_SAMSUNG_SOFEF01=m (sm6350-lena)
* SYN_COOKIES=y (category:default)
* BTRFS_FS_POSIX_ACL=y (category:filesystems)

Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7281>
2025-11-14 11:08:44 +00:00
Robert Eckelmann 8f25b85583 linux-postmarketos-marvell: upgrade to 6.17.8 and use llvm-strip
Signed-off-by: Robert Eckelmann <longnoserob@postmarketos.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7354>
2025-11-14 10:47:35 +00:00
Robert Eckelmann 267a6d8fa2 linux-postmarketos-grate: use llvm-strip for modules_install
Signed-off-by: Robert Eckelmann <longnoserob@postmarketos.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7351>
2025-11-14 10:33:08 +00:00
Robert Eckelmann b2187c73f1 linux-postmarketos-grate: adjust config to match latest kconfig checks
Signed-off-by: Robert Eckelmann <longnoserob@postmarketos.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7351>
2025-11-14 10:33:08 +00:00
Jens Reidel 606b7a130c linux-postmarketos-asahi: Use llvm-strip for modules_install
I had originally overlooked that this was necessary. If
INSTALL_MOD_STRIP=1 is set when invoking modules_install, we need to set
LLVM=1 to ensure that llvm-strip is used instead of GNU binutils strip.

Signed-off-by: Jens Reidel <adrian@postmarketos.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7363>
2025-11-14 10:08:03 +00:00
Jens Reidel e3f69f08c9 linux-postmarketos-mediatek-mt81: Use llvm-strip for modules_install
I had originally overlooked that this was necessary. If
INSTALL_MOD_STRIP=1 is set when invoking modules_install, we need to set
LLVM=1 to ensure that llvm-strip is used instead of GNU binutils strip.

Signed-off-by: Jens Reidel <adrian@postmarketos.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7355>
2025-11-14 10:05:18 +00:00
Jens Reidel 759fa43e38 linux-postmarketos-allwinner: Use llvm-strip for modules_install
I had originally overlooked that this was necessary. If
INSTALL_MOD_STRIP=1 is set when invoking modules_install, we need to set
LLVM=1 to ensure that llvm-strip is used instead of GNU binutils strip.

Signed-off-by: Jens Reidel <adrian@postmarketos.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7352>
2025-11-14 10:02:56 +00:00
Jens Reidel 144140d69e linux-google-veyron: Build with LLVM
See https://postmarketos.org/edge/2025/11/11/kernels-llvm/ for the
background behind this change and how we're handling these MRs.

Signed-off-by: Jens Reidel <adrian@postmarketos.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7343>
2025-11-14 09:59:49 +00:00
Jens Reidel 487bd929f8 linux-postmarketos-exynos4: Build with LLVM
See https://postmarketos.org/edge/2025/11/11/kernels-llvm/ for the
background behind this change and how we're handling these MRs.

[ci:skip-kconfigcheck]: large change across many packages, we leave
kconfig fixes to kernel maintainers

Signed-off-by: Jens Reidel <adrian@postmarketos.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7346>
2025-11-14 09:56:48 +00:00
Jens Reidel 541ebb2465 linux-postmarketos-exynos5: Use llvm-strip for modules_install
I had originally overlooked that this was necessary. If
INSTALL_MOD_STRIP=1 is set when invoking modules_install, we need to set
LLVM=1 to ensure that llvm-strip is used instead of GNU binutils strip.

Signed-off-by: Jens Reidel <adrian@postmarketos.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7353>
2025-11-14 05:58:45 +00:00
postmarketOS CI 3a564a1ad6 linux-next: upgrade to next-20251114 2025-11-14 05:48:28 +00:00
Jens Reidel 22a2a44ecf linux-postmarketos-qcom-laptop: Use llvm-strip for modules_install
I had originally overlooked that this was necessary. If
INSTALL_MOD_STRIP=1 is set when invoking modules_install, we need to set
LLVM=1 to ensure that llvm-strip is used instead of GNU binutils strip.

Signed-off-by: Jens Reidel <adrian@postmarketos.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7357>
2025-11-14 04:18:13 +00:00
Ingo Reitz c88f45c2d8 linux-postmarketos-gs101: switch to LLVM
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7345>
2025-11-14 01:40:29 +01:00
Sebastian Fleer 19e6e1e5ad postmarketos-ui-plasma-mobile: switch to plasma-keyboard
plasma-mobile already did that change:
https://gitlab.alpinelinux.org/alpine/aports/-/merge_requests/92862

Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7341>
2025-11-13 20:11:56 +00:00
Bart Ribbers eab37a8f47 systemd/plasma-workspace: replace patch to fix crash for a proper one from upstream
Same as 6afd6efed92708058f3d2b1a52e83a9315387c3c in aports.

Rather than basically disabling the fuzzy search function this actually
fixes the problem and fuzzy search works again.

Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7344>
2025-11-13 20:02:50 +00:00
Sebastian Fleer 58f93cc935 device-google-gru: add install_if to systemd subpackage
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7340>
2025-11-13 09:13:53 +01:00
postmarketOS CI 887b0be6dc linux-next: upgrade to next-20251113 2025-11-13 05:48:42 +00:00
Jens Reidel b9102ac571 linux-next: Build with clang instead of GCC
As far as I can tell, the intent was always to use clang, but building
with LLVM=1 CC=gcc will result in building with GCC and LLVM binutils
and LLD.

Signed-off-by: Jens Reidel <adrian@postmarketos.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7335>
2025-11-13 00:47:48 +00:00
Stefan Hansson 9f355d95a2 CI: Don't check kconfig for archived kernels
It doesn't make any sense to require people to fix the kconfig just
because they want to move a device into archived or fix some minor issue
in an archived device. So, let's not enforce this on archived devices
since that's supposed to be where broken devices go.

Signed-off-by: Stefan Hansson <newbyte@postmarketos.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7338>
2025-11-12 23:52:42 +00:00
Stefan Hansson 53a56f7c37 CI: Allow skipping archived in get_changed_packages()
Packages can be moved to archive because they don't meet a certain
quality standard, so it is useful to be able to exclude them from
certain checks as to not block packages from being moved there just
because they don't comply with our standards.

Signed-off-by: Stefan Hansson <newbyte@postmarketos.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7338>
2025-11-12 23:52:42 +00:00
Barnabás Czémán 6c1ac78138 soc-qcom-msm8953: Change GSK_RENDERER to cairo
Switch cairo from ngl to avoid slow context switches.

Signed-off-by: Barnabás Czémán <barnabas.czeman@postmarketos.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7331>
2025-11-12 21:59:48 +00:00
Barnabás Czémán b4c127fb60 soc-qcom-msm8953: Add wireplumber config
Add wireplumber config for fix low volume issue.

Signed-off-by: Barnabás Czémán <barnabas.czeman@postmarketos.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7331>
2025-11-12 21:59:48 +00:00
Barnabás Czémán 1df8f3e7ee device-qcom-msm8953: Add motorola-ocean panels
Add motorola-ocean panels to modules-initfs.

Signed-off-by: Barnabás Czémán <barnabas.czeman@postmarketos.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7331>
2025-11-12 21:59:48 +00:00
Jens Reidel 5c7301af2f docs: Clarify process for demoting devices
Signed-off-by: Jens Reidel <adrian@postmarketos.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7327>
2025-11-12 21:34:26 +00:00
Clayton CraftandJens Reidel 64d6432ae2 linux-postmarketos-asahi: update to 6.17.7-2
This also migrates the config in this package to use kconfig generate

Signed-off-by: Clayton Craft <craftyguy@postmarketos.org>
Co-authored-by: Jens Reidel <adrian@postmarketos.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7324>
2025-11-12 20:09:42 +00:00
Pablo Correa Gómez 9b02cdac75 docs: add section on ci tags available in pmaports
Fixes https://gitlab.postmarketos.org/postmarketOS/docs.postmarketos.org/-/issues/13

Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7336>
2025-11-12 19:13:25 +00:00
Raymond Hackley 5a265cacbe samsung-matissewifi-downstream: fix deviceinfo
Fix the following:
[Warning!] deviceinfo_flash_heimdall_partition_rootfs: Property is set to its default value ("SYSTEM") and can be removed.
[Error!!!] deviceinfo_keyboard: This property is obsolete: Programs should automatically detect if the device currently has a keyboard or not (often it can be hotplugged anyway).

Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7301>
2025-11-12 18:20:45 +00:00
Raymond Hackley c83c7c6a6c samsung-matissewifi-downstream: move to archived
[ci:skip-build]
[ci:skip-kconfigcheck]
[ci:skip-vercheck]

Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7301>
2025-11-12 18:20:45 +00:00
Casey Connolly 762aad880c linux-next: enable some more useful options
Enable qcserial, iso9660 filesystem support and UHID.

Signed-off-by: Casey Connolly <kcxt@postmarketos.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7316>
2025-11-12 18:18:14 +00:00
Sebastian Fleer dc36719103 linux-postmarketos-rockchip: switch to LLVM
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7332>
2025-11-12 18:08:44 +00:00
Sebastian Fleer 3a48826f15 linux-postmarketos-rockchip: add a few more rockchip-specific drivers
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7332>
2025-11-12 18:08:44 +00:00
postmarketOS CI c657f55ea7 linux-next: upgrade to next-20251112 2025-11-12 16:41:41 +00:00
Sebastian Fleer c49c00d09d device-google-gru: add watchdog configuration for systemd
ensures that dw_wdt will receive keep-alive pings after resume from
suspend.

Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7330>
2025-11-12 16:26:27 +00:00
Richard Acayan e1a93ee134 linux-postmarketos-qcom-sdm670: upgrade to v6.17.6
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7209>
2025-11-12 16:19:15 +00:00
Sebastian Fleer 9cec75d325 kconfigcheck: only check NETFILTER_XTABLES_LEGACY on >=6.17
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7333>
2025-11-12 16:16:25 +01:00
adamthiede 3bd8549aff linux-postmarketos-mediatek-mt81: upgrade to 6.12.57 and enable SYN_COOKIES
- enabling CONFIG_SYN_COOKIES to get rid of some tty error messages
- enable CONFIG_NETFILTER_XTABLES_LEGACY for CI

Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7328>
2025-11-12 03:03:40 +00:00
Clayton Craft 6d52a314b7 main/postmarketos-initramfs: enforce usage of busybox ash for init
It's possible some other (more strict) shells might provide /bin/sh and
get pulled into the initramfs, if that happens they may fail from our
usage of `local`. By explicitly listing busybox ash in the shebang, we
guarantee that we'll always use the shell we expect.

fixes #3518

Signed-off-by: Clayton Craft <craftyguy@postmarketos.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7313>
2025-11-12 01:19:12 +00:00
Jens Reidel 6ae9319ac4 device-raspberry-pi: Drop deviceinfo_keyboard
[ci:skip-vercheck]: Only moving packages across categories

Signed-off-by: Jens Reidel <adrian@postmarketos.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7319>
2025-11-10 21:32:47 +00:00
Jens Reidel 6acbc6980b device-raspberry-pi: Use linux-rpi for Pi 1 and 2
Alpine does not distinguish between them anymore.

Signed-off-by: Jens Reidel <adrian@postmarketos.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7319>
2025-11-10 21:32:47 +00:00
Jens Reidel b5b4a46891 device-raspberry-pi: Move to downstream
linux-rpi is a downstream Linux kernel provided by the vendor and
differs a lot from mainline. As such, this device does not qualify for
testing.

Signed-off-by: Jens Reidel <adrian@postmarketos.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7319>
2025-11-10 21:32:43 +00:00
Jens Reidel 560f1ae233 device-raspberry-pi0: Drop deviceinfo_keyboard
Signed-off-by: Jens Reidel <adrian@postmarketos.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7319>
2025-11-10 21:32:43 +00:00
Jens Reidel 27498ecdec device-raspberry-pi0: Move to downstream
linux-rpi is a downstream Linux kernel provided by the vendor and
differs a lot from mainline. As such, this device does not qualify for
testing.

Signed-off-by: Jens Reidel <adrian@postmarketos.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7319>
2025-11-10 21:32:43 +00:00
Jens Reidel e14241502c device-raspberry-pi3: Rename deviceinfo_gpu_accelerated, drop deviceinfo_keyboard
Signed-off-by: Jens Reidel <adrian@postmarketos.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7319>
2025-11-10 21:32:43 +00:00
Jens Reidel 508ccecacb device-raspberry-pi3: Move to downstream
linux-rpi is a downstream Linux kernel provided by the vendor and
differs a lot from mainline. As such, this device does not qualify for
testing.

Signed-off-by: Jens Reidel <adrian@postmarketos.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7319>
2025-11-10 21:32:43 +00:00
Jens Reidel 662d76a7b9 device-raspberry-pi4: Rename deviceinfo_gpu-accelerated, drop deviceinfo_keyboard
Signed-off-by: Jens Reidel <adrian@postmarketos.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7319>
2025-11-10 21:32:43 +00:00
Jens Reidel eca0bf5d23 device-raspberry-pi4: Move to downstream
linux-rpi is a downstream Linux kernel provided by the vendor and
differs a lot from mainline. As such, this device does not qualify for
testing.

Signed-off-by: Jens Reidel <adrian@postmarketos.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7319>
2025-11-10 21:32:43 +00:00
Jens Reidel 663a2a9ac9 device-raspberry-pi5: Rename deviceinfo_gpu_accelerated, drop deviceinfo_keyboard
Signed-off-by: Jens Reidel <adrian@postmarketos.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7319>
2025-11-10 21:32:43 +00:00
Jens Reidel 544e4b6bd3 device-raspberry-pi5: Move to downstream
linux-rpi is a downstream Linux kernel provided by the vendor and
differs a lot from mainline. As such, this device does not qualify for
testing.

Signed-off-by: Jens Reidel <adrian@postmarketos.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7319>
2025-11-10 21:32:43 +00:00
Jens Reidel d7706d6c21 device-cutiepi-tablet: Fix build
Signed-off-by: Jens Reidel <adrian@postmarketos.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7319>
2025-11-10 21:32:43 +00:00
Jens Reidel 7f5fb209aa device-cutiepi-tablet: Drop deviceinfo_keyboard
Signed-off-by: Jens Reidel <adrian@postmarketos.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7319>
2025-11-10 21:32:43 +00:00
Jens Reidel fe96277937 device-cutiepi-tablet: Depend on linux-rpi
linux-rpi4 was replaced by linux-rpi for all aarch64 Raspberry Pi
devices in Alpine a while ago and does not exist anymore.

Signed-off-by: Jens Reidel <adrian@postmarketos.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7319>
2025-11-10 21:32:40 +00:00
Jens Reidel 034eccb08a device-cutiepi-tablet: Move to downstream
linux-rpi is a downstream Linux kernel provided by the vendor and
differs a lot from mainline. As such, this device does not qualify for
testing.

Signed-off-by: Jens Reidel <adrian@postmarketos.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7319>
2025-11-10 21:32:36 +00:00
Jens Reidel d6128809d2 device-sqfmi-beepy: Move to downstream
linux-rpi is a downstream Linux kernel provided by the vendor and
differs a lot from mainline. As such, this device does not qualify for
testing.

Signed-off-by: Jens Reidel <adrian@postmarketos.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7319>
2025-11-10 21:32:33 +00:00
Jens Reidel 6cbc76720a device-clockworkpi-uconsole-rpi: Rename deviceinfo_gpu_accelerated, drop deviceinfo_keyboard
Also fixup comments to make dint happy.

Signed-off-by: Jens Reidel <adrian@postmarketos.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7319>
2025-11-10 21:32:33 +00:00
Jens Reidel b687c74cfd device-clockworkpi-uconsole-rpi: Move to downstream
linux-rpi is a downstream Linux kernel provided by the vendor and
differs a lot from mainline. As such, this device does not qualify for
testing.

Signed-off-by: Jens Reidel <adrian@postmarketos.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7319>
2025-11-10 21:32:33 +00:00
Clayton Craft 30e0f6d779 ci: deviceinfo_linting: add support for ci:skip-dint
Sometimes we just want to merge when deviceinfo is failing linting (e.g.
when moving a device pkg from a higher category to a lower one)

This should be used sparingly...

Signed-off-by: Clayton Craft <craftyguy@postmarketos.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7311>
2025-11-10 19:54:29 +00:00
Nikita Travkin e165e34660 linux-postmarketos-qcom-msm8916: Move from community to testing
The msm8916 kernel no longer meets the requirements for community
devices. Demote them to testing.


[ci:skip-dint]
[ci:skip-kconfigcheck]
[ci:skip-vercheck]
[ci:skip-build]: moving device categories

Signed-off-by: Clayton Craft <craftyguy@postmarketos.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7311>
2025-11-10 19:54:29 +00:00
Oreeeee 8478c81581 device-lenovo-a8-50f: switch to mtkclient as the flashing method
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7291>
2025-11-10 16:13:11 +01:00
Aster Boese 499b98276c main/devicepkg-dev: /etc/modprobe.d,modules-load.d -> /usr/lib
Relates #2184

Signed-off-by: Aster Boese <asterboese@mailbox.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7304>
2025-11-10 13:57:33 +00:00
Stefan Hansson f38e43e3b3 main/dint: upgrade to 0.0.2
Signed-off-by: Stefan Hansson <newbyte@postmarketos.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7326>
2025-11-10 13:35:53 +00:00
Willow Barraco 7ef1962a69 postmarketos-ui-sxmo-de-{river,i3}: new pmaport
Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7310
2025-11-09 21:42:58 -08:00
Willow Barraco c5ab9e3ef4 postmarketos-ui-sxmo-*: upgrade to 1.18.0
Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7310
2025-11-09 21:42:58 -08:00
Antoine Martin 6a94a5bb74 linux-pine64-pinenote: upgrade to 6.17.7
Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7317
2025-11-09 20:47:40 -08:00
Rudraksha Gupta 3ec6569b21 device-pine64-pinephonepro: Fix pmbootstrap build device-pine64-pinephonepro --force
Fixes pma#4078

```
$ pmbootstrap build device-pine64-pinephonepro --force fails with:

>>> device-pine64-pinephonepro: Entering fakeroot...
install: can't stat '/home/pmos/build/src/bootaa64.efi': No such file or directory
>>> ERROR: device-pine64-pinephonepro*: package failed
>>> ERROR: device-pine64-pinephonepro: rootpkg failed
```

Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7308>
2025-11-10 02:46:27 +00:00
Clayton Craft 8670cf46dd kconfigcheck: enable missing deps for NF and FW compression
Without these, generated config doesn't have FW compression enabled, and
a few other NF/IP -related options.

Signed-off-by: Clayton Craft <craftyguy@postmarketos.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7323>
2025-11-10 01:46:05 +00:00
Barnabás Czémán 32c118b188 firmware-qcom-msm8953: Updated the maintainers of the package
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/7314>
2025-11-09 23:20:19 +00:00
Barnabás Czémán 897d349c2e soc-qcom-msm8953: Update the maintainers of the package
Signed-off-by: Barnabás Czémán <barnabas.czeman@postmarketos.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7314>
2025-11-09 23:20:19 +00:00
Barnabás Czémán 9d73726f28 device-qcom-msm8953: Update the maintainers of the package
Signed-off-by: Barnabás Czémán <barnabas.czeman@postmarketos.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7314>
2025-11-09 23:20:19 +00:00
Barnabás Czémán 340ed59a16 linux-postmarketos-qcom-msm8953: Upgrade to v6.17.7-r0
Upgrade to v6.17.7-r0 and updated the maintainers of the package.

Signed-off-by: Barnabás Czémán <barnabas.czeman@postmarketos.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7314>
2025-11-09 23:20:19 +00:00
Jan Jasper de Kroon 305cddc07f systemd/postmarketos-base-systemd: enable irqbalance.service
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7081>
2025-11-09 18:07:12 +01:00
Jan Jasper de Kroon 394c20d8b8 systemd/irqbalance: add irqbalance unit
This package provides the systemd service file for irqbalance,
enabling proper IRQ balancing on postmarketOS devices using
systemd.

This allows for better performance and power management by
distributing IRQs across CPU cores.

Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7081>
2025-11-09 17:57:22 +01:00
Antoine Martin bdd4b04b4c u-boot-pine64-pinenote: upgrade to 2025.10
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7318>
2025-11-09 12:40:41 +00:00
Dylan Van Assche b12807c8e0 device-pine64-pinetab: drop maintainership
Pine64 Pinetab is unmaintained for years.

Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7322>
2025-11-09 10:09:50 +01:00
Sebastian Fleer 5149ff2fdd linux-postmarketos-rockchip: upgrade to 6.12.57
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7321>
2025-11-09 06:08:39 +00:00
Alexandre Marquet 4d146769f5 systemd/wireplumber: compile with qemu-only
Compilation of wireplumber with crossdirect yields corrupted binaries
in armv7.

Signed-off-by: Alexandre Marquet <tb@a-marquet.fr>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7284>
2025-11-09 05:56:12 +00:00
Clayton Craft 381903df5e device-apple-mac-aarch64: add vulkan subpkg
For installing vk support for Apple GPUs

Signed-off-by: Clayton Craft <craftyguy@postmarketos.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7309>
2025-11-08 15:54:28 +00:00
Nikita Travkin dcd6eef2d4 main/dtbloader: upgrade to 1.5.2
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7315>
2025-11-08 18:07:37 +05:00
Bart Ribbers 7998b8a72f systemd/plasma*: upgrade to 6.5.2
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7307>
2025-11-08 05:47:47 +00:00
Lin, Meng-Bo 2c88eb4329 samsung-j3ltetw: rename gpu_accelerated to drm in deviceinfo
Link: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/commit/1a8ab415b0d8fe68c8fea0a585e45c781b03a7e8
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7277>
2025-11-08 05:27:59 +00:00
Lin, Meng-Bo 1f2ae1220a samsung-j3ltetw: drop deviceinfo_keyboard
This property is obsolete:
Programs should automatically detect if the device currently has
a keyboard or not (often it can be hotplugged anyway).

Link: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/issues/3145
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7277>
2025-11-08 05:27:59 +00:00
postmarketOS CI af9526d931 linux-next: upgrade to next-20251107 2025-11-07 05:46:52 +00:00
Paul Sajna 4b1d2b0e58 xkeyboard-config: Add BlackBerry KEY2 patch
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6830>
2025-11-07 02:49:34 +00:00
Paul Sajna 455d51ae86 new package: device-blackberry-key2-generic: generic device port for BlackBerry KEY2 and KEY2 LE
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6830>
2025-11-07 02:49:34 +00:00
Paul Sajna 7e513f5a93 new package: firmware-blackberry-key2-generic: firmware for BlackBerry KEY2 and KEY2 LE
contains only the wifi firmware that isn't managed by msm-fw-loader
wifi firmware for both devices is combined into a single board-2.bin

Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6830>
2025-11-07 02:49:34 +00:00
Clayton Craft c628fe7c6c linux-postmarketos-asahi: upgrade to 6.17.7
Signed-off-by: Clayton Craft <craftyguy@postmarketos.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7302>
2025-11-06 17:34:38 +00:00
adamthiede 71bff99930 device-sqfmi-beepy: new device port
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7296>
2025-11-06 12:18:03 +00:00
postmarketOS CI cc6cf99d96 linux-next: upgrade to next-20251106 2025-11-06 05:48:26 +00:00
Eisenbahnfan 9f0f1ee5ca firmware-samsung-v1awifi: Fix error during package installation
During installation, the configuration file is attempted to be installed in
a directory called maxtouch.cfg instead of being installed as maxtouch.cfg
due to the -t flag being used by mistake.

Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7278>
2025-11-05 22:35:47 +00:00
postmarketOS CI d0021c159b linux-next: upgrade to next-20251105 2025-11-05 16:48:32 +00:00
Jens Reidel a9be71b496 ci: Build docs with Sphinx
Signed-off-by: Jens Reidel <adrian@postmarketos.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7295>
2025-11-05 11:21:33 +00:00
Jens Reidel fad7a5050d docs: Add kernel version packaging recommendations
Signed-off-by: Jens Reidel <adrian@postmarketos.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7295>
2025-11-05 11:21:33 +00:00
Jens Reidel 35eb5c61cb docs: Replace Antora with Sphinx
See https://gitlab.postmarketos.org/postmarketOS/docs.postmarketos.org/-/issues/4

Signed-off-by: Jens Reidel <adrian@postmarketos.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7295>
2025-11-05 11:21:33 +00:00
Pablo Correa Gómez 85f542bc64 editorconfig: use spaces instead of tabs for markdown
For consistency with the postmarketos.org repo, and to prepare for the
future documentation.

Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7295>
2025-11-05 11:21:30 +00:00
postmarketOS CI ba2d22a3c4 linux-next: upgrade to next-20251104 2025-11-04 17:01:51 +00:00
Jan Jasper de Kroon 98cd4a69f2 linux-pine64-pinephonepro: upgrade to 6.17.3
Notable changes:
- Added Rockchip video decoder HEVC driver for H.265 support
- Fixup of kernel configuration according to recommends

Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7121>
2025-11-04 16:29:52 +00:00
small solar 369b75e2d6 linux-samsung-a5y17lte: increased pkgrel
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7271>
2025-11-04 16:25:55 +00:00
small solar 5bd1fd6804 added newline
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7271>
2025-11-04 16:25:55 +00:00
small solar e97f01a611 linux-samsung-a5y17lte: reorder checksums in APKBUILD
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7271>
2025-11-04 16:25:51 +00:00
Raymond Hackley 679f6f7827 qcom-msm8226: add touchscreens
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7297>
2025-11-04 15:27:35 +00:00
Raymond Hackley 812a11c65e qcom-msm8226: add drm panel and gpu support
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7297>
2025-11-04 15:27:35 +00:00
Alistair Francis ad3117d9df temp/81voltd: upgrade to 1.1.0
Upgrade to the latest release with the new URL:
https://gitlab.postmarketos.org/modem/81voltd/-/tags

Signed-off-by: Alistair Francis <alistair@alistair23.me>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7298>
2025-11-04 21:58:11 +10:00
panpanpanpan 1000e405bf linux-postmarketos-qcom-sm8150: Upgrade to v6.17.0
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7275>
2025-11-03 23:51:58 +00:00
panpanpanpan a1a3dd3000 device-xiaomi-nabu: Add modules-initfs and a640_zap
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7275>
2025-11-03 23:51:58 +00:00
Jianhua Lu f46add6dff linux-postmarketos-qcom-sm8250: switch to LLVM toolchain 2025-11-03 07:06:05 +00:00
Richard Almanza 740819acc4 device-motorola-titan: remove deprecated property deviceinfo_keyboard
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7283>
2025-11-03 00:46:53 +00:00
Richard Almanza c9c4dfd3bc motorola-titan-downstream: fix deviceinfo
- Add the `deviceinfo_create_initfs_extra="true"` property to fix the `Generated boot/kernel image too large for boot partition` based on the wiki guideline

> $ pmbootstrap flasher flash-kernel
> ...
> Warning: skip copying boot image avb footer (boot partition size: 0, boot image size: 14862336).
> Sending 'boot' (14514 KB)                          OKAY [  0.515s]
> Writing 'boot'                                     (bootloader) Image size exeeded partition limits
> (bootloader) Preflash validation failed
> FAILED (remote: '')
> ...

Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7283>
2025-11-03 00:46:53 +00:00
Alexandre Marquet 44c69fc957 device-samsung-manta: disable gsd-color
Disable gsd-color that uses a whole CPU at 100% doing nothing.

Signed-off-by: Alexandre Marquet <tb@a-marquet.fr>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6854>
2025-11-03 00:42:11 +00:00
Oliver Smith 1f18c9a29e cross/gcc-*: upgrade to 15.2.0-r2
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7289>
2025-11-02 13:28:40 +01:00
Raymond Hackley 396654d0c4 qcom-msm8226: new device
With the new changes in lk2nd that allow us to support extlinux.conf,
we can now generate image that would be generic to these devices.

Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7279>
2025-11-01 06:08:54 +00:00
postmarketOS CI 39a15d7e9a linux-next: upgrade to next-20251031 2025-10-31 16:49:48 +00:00
Raymond Hackley c2b7629c34 samsung-ms013g-downstream: fix deviceinfo
Fix the following:
[Warning!] deviceinfo_flash_heimdall_partition_rootfs: Property is set to its default value ("SYSTEM") and can be removed.
[Warning!] deviceinfo_bootimg_dtb_second: Property is set to its default value (false) and can be removed.
[Error!!!] deviceinfo_keyboard: This property is obsolete: Programs should automatically detect if the device currently has a keyboard or not (often it can be hotplugged anyway).

Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7280>
2025-10-31 14:03:55 +00:00
Raymond Hackley 68597ebfaa samsung-ms013g-downstream: move to archived
[ci:skip-build]
[ci:skip-kconfigcheck]
[ci:skip-vercheck]

Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7280>
2025-10-31 14:03:55 +00:00
knuxify e79e48346d device-odroid-hc2: Load sec-i2c module
Commit 680ef57915db0f715e99a683c15f0f9f7c700e64 upstream[1] split the sec_core
driver into two drivers: sec_core and sec_i2c, the latter now handling support
for I2C-based Samsung PMICs. This included the S2MPS11 used in the Odroid HC1
and HC2.

Update modules-initfs to include the new module.

[1] https://github.com/torvalds/linux/commit/680ef57915db0f715e99a683c15f0f9f7c700e64

Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7250>
2025-10-31 13:43:14 +00:00
Sebastian Fleer b9bce48e38 linux-postmarketos-rockchip: Add zstd support for ramdisk
While at it, move nftables support from module to built-in and add `pmb:kconfigcheck-nftables`.

fixes !7269

Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7274>
2025-10-30 20:48:26 +00:00
Bart Ribbers f9d9dfa730 systemd/plasma-workspace: apply workaround to prevent krunner from crashing
Same as downstream, https://gitlab.alpinelinux.org/alpine/aports/-/merge_requests/92351

Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7266>
2025-10-30 19:50:39 +00:00
Aster Boese 3db8696b57 main/postmarketos-ui-cosmic: enable tuned-ppd service for OpenRC
Signed-off-by: Aster Boese <asterboese@mailbox.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7190>
2025-10-30 13:10:39 -04:00
postmarketOS CI 2ba8cd454f linux-next: upgrade to next-20251030 2025-10-30 16:53:46 +00:00
Sebastian Fleer eb1c03a854 device-google-gru: Update deviceinfo and maintainer
Remove/replace obsolete or unnecessary variables.

Add myself as maintainer.

Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7269>
2025-10-29 23:48:16 +00:00
Devin Lin 7abeaca6ac main/postmarketos-ui-plasma-mobile: Use feedbackd instead of hfd-service
Starting from Plasma 6.5, Plasma Mobile uses feedbackd instead of
hfd-service as its haptics backend.

Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7268>
2025-10-29 17:28:18 -04:00
Oliver Smith fdaae1376a systemd/xorg-server: upgrade to 21.1.20
Related: https://gitlab.alpinelinux.org/alpine/aports/-/commit/e6cbfad8d5f83371064c2b00a85b19df40b438a9
Related: https://gitlab.alpinelinux.org/alpine/aports/-/commit/38da9ffe035ba97583fbee3c0b8824c4749ffeb7
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7267>
2025-10-29 18:17:35 +00:00
Luca Weiss 6cd1c895fb linux-postmarketos-qcom-sc7280: upgrade to 6.17.0
Manual kconfig changes:
* VIDEO_DW9719=m (Fairphone 5)
* PCI=y (Tachyon)
* PCIE_QCOM=y (Tachyon)
* LEDS_GPIO=m (Tachyon)
* SYN_COOKIES=y (category:default)
* BTRFS_FS_POSIX_ACL=y (category:filesystems)

Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7107>
2025-10-29 18:14:30 +01:00
Bart Ribbers 0861e39386 systemd/plasma*: upgrade to 6.5.1
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7263>
2025-10-29 13:47:09 +00:00
andrey gerasimob 67e437160c samsung-grandpplte: edit deviceinfo and modernize for success flash boot
keyboard is removed and gpu_accelerated has been overshadowed

Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7175>
2025-10-29 11:16:38 +01:00
Markus Göllnitz c7722700dc soc-qcom-sc7280: replace with soc-qcom
With the addition of 81voltd the difference between
soc-qcom-sc7280 and soc-qcom shrank. With the unreliable
hardware en- and decoder and a workaround in soc-qcom,
it would shrink even further.

As such, it makes sense to replace the former with the
latter.

With q6voiced and a call audio wireplumber config,
soc-qcom adds two more things untestable on the two
devices currently using soc-qcom-sc7280 (Fairphone 5 and
Shiftphone 8).

Besides that, it is only a UPower.conf replacing suspend
with shutdown in case of critically low battery levels
and setting the low level from 20 % to 10 %, which makes
sense on these two devices as well.

Link: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7044#note_501998
Link: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7107#note_508712

Signed-off-by: Markus Göllnitz <camelcasenick@bewares.it>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7254>
2025-10-29 10:11:30 +00:00
postmarketOS CI b3942cfeb4 linux-next: upgrade to next-20251029 2025-10-29 05:51:02 +00:00
coca ae0284088f Revert "Increased pkgver for samsung-gts210velte"
This reverts commit 24e36c32d6733b83113133fef028df345ed8e618

Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7214>
2025-10-28 20:45:13 +00:00
coca 2cb4a9cb11 Increased pkgver for samsung-gts210velte
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7214>
2025-10-28 20:45:13 +00:00
coca 58608ca074 deviceinfo: Added create_initfs_extra with true for the samsung-gts210velte
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7214>
2025-10-28 20:45:09 +00:00
Stefan Hansson 0cb3cf0897 device-samsung-gtaxlwifi: remove obsolete and invalid properties
While I haven't verified it personally, the wiki entry for this device
states that neither Weston nor Plasma Mobile work on the device,
indicating that DRM probably doesn't actually work. Furthermore, it is a
downstream port, so it working would be a miracle regardless. As for the
keyboard property, it is obsolete.

Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7243>
2025-10-28 20:32:02 +00:00
Stefan Hansson 0be8af7d77 device-samsung-gtaxlwifi: set create_initfs_extra="true"
According to Pascal Dietrich on fedi, this fixes the initramfs being too
big for the boot partition[1].

 [1]: https://rheinneckar.social/@cameo007/115429480475704448

Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7243>
2025-10-28 20:32:02 +00:00
Stefan Hansson dcae02a2a0 device-samsung-gtaxlwifi: depend on msm-fb-refresher and postmarketos-base-downstream
The wiki article has stated that msm-fb-refresher is necessary for
working display from the start, so let's just fix this in packaging
instead of having it as a hint in the wiki. As for
postmarketos-base-downstream, this was confirmed to fix booting into UI
by Pascal Dietrich on fedi[1].

 [1]: https://rheinneckar.social/@cameo007/115430128243717720

Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7243>
2025-10-28 20:31:58 +00:00
Sebastian Fleer aea53bf284 linux-postmarketos-rockchip: upgrade to 6.12.55
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7260>
2025-10-28 20:21:47 +00:00
Eisenbahnfan 6afab4b72e firmware-samsung-v1awifi: Move downstream firmware into own package
And use config hosted on gitlab

Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7231>
2025-10-28 20:03:06 +00:00
Arnav Singh 993592fe3c firmware-pine64-rtl8723bt: drop
This was being kept around because linux-firmware's rtl8723cs_xx_config.bin
was broken. This was fixed upstream in
https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/commit/?id=e39831b1a9d75eb91af5c1711082edea5e259d3f
to carry the same file that we were carrying, so we don't need to any more.

Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7262>
2025-10-28 10:12:21 -07:00
Eisenbahnfan f792611613 samsung-n1awifi: Add mainline variant
And move downstream variant to archived

Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7211>
2025-10-28 16:10:35 +00:00
Eisenbahnfan 593d71f0c8 samsung-n1awifi: Rename downstream port to samsung-n1awifi-downstream
And fix ci errors

Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7211>
2025-10-28 16:10:35 +00:00
Eisenbahnfan 860afb1160 firmware-samsung-n2awifi: Move downstream firmware into own package
And use config hosted on gitlab

Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7232>
2025-10-28 16:03:58 +00:00
exkc 23fa126eeb device-wd-glacier: new device
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7259>
2025-10-28 15:59:54 +00:00
Ingo Reitz f492d6fa9d device-google-{bluejay,oriole,raven}: add regulator_ignore_unused to cmdline
workaround for deadlock/crash due to dts TODOs

Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7261>
2025-10-28 13:03:38 +01:00
Eric Anderson 83977c895f device-google-veyron: Set Eric Anderson as maintainer
Updating the device after becoming the maintainer of linux-google-veyron

Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7258>
2025-10-28 09:41:35 +00:00
Clayton Craft 7c137628be ci: shellcheck: add device-apple-mac-aarch64 scripts
There are a few of these, and they're probably complicated enough to
justify shellchecking them.

Signed-off-by: Clayton Craft <craftyguy@postmarketos.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7112>
2025-10-28 09:38:56 +00:00
Clayton Craft 671da45525 ci: shellcheck: add os-installer's setup script
Signed-off-by: Clayton Craft <craftyguy@postmarketos.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7112>
2025-10-28 09:38:56 +00:00
Clayton Craft 557772ebd4 device-apple-mac-aarch64: add support for os-installer
This also sneaks in a change to add 'quiet' on the kernel cmdline, to
remove some kernel msg noise on the screen that overwrites the splash
sometimes on boot.

Signed-off-by: Clayton Craft <craftyguy@postmarketos.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7112>
2025-10-28 09:38:53 +00:00
Clayton Craft 923c4ab36e main/postmarketos-ui-os-installer: add custom install/deploy mode
This adds support for having a custom install/deploy, where if
`/etc/os-installer/deploy.sh` exists then pmbootstrap generates an
image, exports it, then calls deploy.sh with the path to the image it
created, and does NOT call pmbootstrap install with --disk. deploy.sh
comes from device packages that need to implement custom image
deployment stuff, when using --disk is not appropriate.

If deploy.sh doesn't exist then the standard install (using --disk) will
take place.

Signed-off-by: Clayton Craft <craftyguy@postmarketos.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7112>
2025-10-28 09:38:53 +00:00
Sicelo A. Mhlongo 52f23a780c wl1251-cal: extract nvs to /run
Running the service for wl1251-cal before udev is partly responsible for very
slow boot observed on the N900 when using systemd. This is likely because of
the dependency on /lib/firmware.

Provide the NVS in /run instead, an idea borrowed from msm-firmware-loader. It
is safe to permanently overwrite the user-defined firmware search path since
the N900 does not need firmware that would be expected to be in
/lib/firmware/postmarketos.

Signed-off-By: Sicelo A. Mhlongo <absicsz@gmail.com>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7234>
2025-10-28 09:32:20 +00:00
Ingo Reitz ea9dcad2df linux-postmarketos-gs101: upgrade to 6.18_rc2
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7226>
2025-10-28 09:29:36 +00:00
postmarketOS CI f4214fd496 linux-next: upgrade to next-20251028 2025-10-28 05:50:03 +00:00
Clayton Craft 6b51d3c9da main/postmarketos-ui-cosmic: disable audio over-amp by default
COSMIC is configured by default to allow "over amplification" of audio,
which is probably going to drive systems with sensitive speaker setups
(like macbooks, and the x13s) too hard. 100% on these is already plenty
loud. Users can override this default by flipping the switch in COSMIC
Settings app if they really want it.

Signed-off-by: Clayton Craft <craftyguy@postmarketos.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7251>
2025-10-28 04:46:57 +00:00
Jianhua Lu b5e0ae4742 device-xiaomi-elish: use soc-qcom to replace qcom common dependencies
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6867>
2025-10-28 07:35:28 +08:00
Jianhua Lu ac2648a2b8 device-xiaomi-elish: update deviceinfo
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6867>
2025-10-28 07:35:28 +08:00
Jianhua Lu 0e6c46c96b linux-postmarketos-qcom-sm8250: upgrade to 6.17.0
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6867>
2025-10-28 07:35:28 +08:00
Kamal Chandra Upreti 3680615e8d linux-xiaomi-spes: increment pkgrel
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7256>
2025-10-27 15:05:50 +05:45
Kamal Chandra Upreti 410044c30a linux-xiaomi-spes: update checksums
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7256>
2025-10-27 14:57:53 +05:45
Kamal Chandra Upreti 315c46b655 linux-xiaomi-spes: fix repo name
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7256>
2025-10-27 08:52:39 +00:00
Jens Reidel 40ca119a46 alsa-ucm-conf-qcom-sm7150: upgrade to 1.2.14_git20251026
Properly declares the speaker on surya as mono and prepares us for the
separation of davinci into two panel variants.

Signed-off-by: Jens Reidel <adrian@postmarketos.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7252>
2025-10-27 08:14:51 +00:00
Arnav Singh 63cd5bebb9 linux-postmarketos-allwinner: upgrade to 6.17.5_git20251026
Also switch to building with LLVM,
per https://gitlab.postmarketos.org/postmarketOS/postmarketos/-/issues/123

Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7255>
2025-10-27 08:07:48 +00:00
postmarketOS CI 0994d10522 linux-next: upgrade to next-20251027 2025-10-27 05:51:02 +00:00
Sebastian Fleer cb407b4aec linux-postmarketos-rockchip: upgrade to 6.6.114
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7253>
2025-10-26 19:43:37 +01:00
Achill Gilgenast 533fa35119 systemd/gnome-shell: enable on riscv64
[ci:skip-vercheck]: just enabling architectures

Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7063>
2025-10-26 14:56:10 +00:00
Raymond Hackley b902e346e7 samsung-j5(x): rename gpu_accelerated to drm in deviceinfo
Link: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/commit/1a8ab415b0d8fe68c8fea0a585e45c781b03a7e8
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7249>
2025-10-26 14:54:11 +00:00
Raymond Hackley 49e41e6fc3 samsung-j5(x): drop deviceinfo_keyboard
This property is obsolete:
Programs should automatically detect if the device currently has
a keyboard or not (often it can be hotplugged anyway).

Link: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/issues/3145
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7249>
2025-10-26 14:54:11 +00:00
Raymond Hackley 925d32594e samsung-grandmax: depend on ModemManager "facility lock" workaround
It seems that samsung-grandmax needs the same "facility lock" workaround
as samsung-j5(x), otherwise ModemManager cannot unlock the SIM card correctly.

Link: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/issues/3860
Link: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/commit/6c628d66ed3a21ea05f6a1688f3ddfe09ab0fd0a
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7248>
2025-10-26 14:52:01 +00:00
Raymond Hackley ec12959a2b samsung-rossa: rename gpu_accelerated to drm in deviceinfo
Link: https://gitlab.postmarketos.org/postmarketOS/pmbootstrap/-/commit/d7b12d98e67d6eb9b5813cb9e8f15578317e490f
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7247>
2025-10-26 14:23:23 +00:00
Raymond Hackley abfa1c36dd samsung-rossa: drop deviceinfo_keyboard
This property is obsolete:
Programs should automatically detect if the device currently has
a keyboard or not (often it can be hotplugged anyway).

Link: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/issues/3145
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7247>
2025-10-26 14:23:23 +00:00
Raymond Hackley bbe58de176 samsung-rossa: depend on ModemManager "facility lock" workaround
It seems that samsung-rossa needs the same "facility lock" workaround as
samsung-j5(x), otherwise ModemManager cannot unlock the SIM card
correctly.

Link: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/issues/3860
Link: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/commit/6c628d66ed3a21ea05f6a1688f3ddfe09ab0fd0a
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7247>
2025-10-26 14:23:19 +00:00
user0-07161 fdd329a16a linux-bananapi-bpi-m2-zero: upgrade to 6.18.0_rc1
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7187>
2025-10-26 13:19:05 +01:00
Eric Anderson c520d51978 linux-google-veyron: upgrade to 6.12.54
Upgrading from an older LTS (6.6.y) to the latest LTS (6.12.y) version.
The config updates are simply "make olddefconfig" along with kconfig
check fixes.

6.12.y appears to behave identically to 6.6.y on veyron-minnie and
mickey. All feature testing showed the same results between the kernels.

I used a GNOME image. Appears to be working on minnie: battery, screen,
touchscreen, keyboard, touchpad, audio (headphones), camera, lid sensor.
Appears to be working on both: 3d acceleration, wifi, bluetooth, FDE,
USB-A, HDMI. HDMI audio worked on mickey. Speakers and HDMI audio didn't
work on minnie.

Audio was tested using "aplay -D sysdefault", because pipewire is
failing with a LUA incompatibility. But I didn't spend too much time
fiddling with alsamixer.

Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7225>
2025-10-26 10:42:40 +00:00
Clayton Craft 3bbbf6cd9a device-apple-mac-aarch64: update initramfs modules list
6.17 kernel config builds many things as modules now

Audio is pretty much broken on pulseaudio and I don't care to debug it.
It works with pipewire/pw-pulse, so let's use that by default.

Signed-off-by: Clayton Craft <craftyguy@postmarketos.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7224>
2025-10-25 21:29:41 +00:00
Clayton Craft ac433eed9c linux-postmarketos-asahi: upgrade to 6.17.5-1
Upstream now has a fragment so we no longer need 'device.config', but
there are some bugs with it (reported upstream) so we need to patch it
for now.

pmos.config fragment was also re-sync'd with kconfigcheck.toml

Signed-off-by: Clayton Craft <craftyguy@postmarketos.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7224>
2025-10-25 21:29:41 +00:00
Pablo Correa Gómez ae140cb6b8 main/postmarketos-base: install fwupd-efi if fwupd and systemd-boot available
So that firmware can be upgraded via fwupd EFI built-in methods

Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7244>
2025-10-24 20:41:52 +00:00
Robert Eckelmann 1e8dda341a linux-postmarketos-exynos5: Build with LLVM
Config was migrated with pmbootstrap!2705.

Signed-off-by: Robert Eckelmann <longnoserob@postmarketos.org>
Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7172
2025-10-24 21:52:50 +02:00
Markus Göllnitz 9d6bee6dc4 soc-qcom-sc7280: add 81voltd daemon as dependency
This daemon configures the modem manager bearers. And
while, due to audio not yet working, this might not yet
be that interesting for VoLTE/VoNR, this configures the
XTRA source and hence increases the chance of a working
GPS with A-GPS and a quick location fix.

Signed-off-by: Markus Göllnitz <camelcasenick@bewares.it>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7044>
2025-10-24 16:58:52 +00:00
postmarketOS CI bb59aac12c linux-next: upgrade to next-20251024 2025-10-24 15:50:32 +00:00
Oreeeee 147a436c02 lenovo-a8-50f: new device
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7215>
2025-10-24 15:32:59 +02:00
Robert Mader 3f6919e62d temp/libcamera: Add tuning files for IMX838 and s5kjn1
Used by the Fairphone 5. Only containing black levels for now, however
adding those already makes the colors look less washed out, in
particular for the front camera.

Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7241>
2025-10-24 11:57:50 +00:00
Clayton Craft 8d854127cc kconfigcheck: add BTRFS_FS_POSIX_ACL
This is required for running journalctl without root, see:
https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6145#note_470989

Signed-off-by: Clayton Craft <craftyguy@postmarketos.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6263>
2025-10-24 05:23:48 +00:00
Pablo Correa Gómez 2115a3ed2b main/postmarketos-config-nftables: remove unecessary function names
for subpackages. abuild picks them up automatically. They are only
needed when using "-" within the subpackage suffix, as that is not a
valid character in shell scripts function names

Signed-off-by: Clayton Craft <craftyguy@postmarketos.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6221>
2025-10-23 21:53:04 -07:00
Pablo Correa Gómez 9150a760c2 main/postmarketos-config-nftables: add rule for ausweisapp2
In the process, bump the pkgver to 1 similarly to what we do with
device packages where version numbers don't have a meaning. We
specifically don't create a subpackage, since the app is in flathub,
which is officially supported by the provider, and is a common way for
most non-technical users to ust it, since it's offically endorsed.

Unconditionally opening this really high port should also not increase
the attack area in any remarkable way.

Signed-off-by: Clayton Craft <craftyguy@postmarketos.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6221>
2025-10-23 21:53:04 -07:00
Achill Gilgenast 0478fbe24e systemd/mutter: upgrade to 49.1.1
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7242>
2025-10-23 22:58:31 +02:00
Bart Ribbers c114f54ed2 systemd/plasma*: upgrade to 6.5.0
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7233>
2025-10-23 16:01:04 +00:00
Sicelo A. Mhlongo 386583c5ea device-nokia-n900: use lzo-rle zram compression, drop obsolete deviceinfo var
zstd might have slightly higher CPU usage on the N900's weak CPU, resulting in
slower compression and decompression. lzo-rle strikes a good enough balance.

Also drop deviceinfo_keyboard, which is marked obsolete.

Signed-off-By: Sicelo A. Mhlongo <absicsz@gmail.com>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7239>
2025-10-23 10:10:26 +02:00
Sicelo A. Mhlongo d60f557c4a zram-swap: support custom compression algorithm via deviceinfo
Some devices would benefit from using compression algorithms besides zstd.
Allow device maintainers to specify a more suitable algorithm using
`zram_swap_algo` deviceinfo variable.

Signed-off-By: Sicelo A. Mhlongo <absicsz@gmail.com>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7239>
2025-10-23 09:53:06 +02:00
Stefan Hansson 9ed8dd6bda linux-purism-librem5: upgrade to 6.6.110
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7238>
2025-10-23 07:15:58 +00:00
postmarketOS CI 1eccf4e5af linux-next: upgrade to next-20251023 2025-10-23 04:51:18 +00:00
Achill Gilgenast 19fcbc17be systemd/phosh: upgrade to 0.50.1
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7236>
2025-10-22 13:04:15 +02:00
postmarketOS CI 21114e996d linux-next: upgrade to next-20251022 2025-10-22 04:52:27 +00:00
Jane Rachinger 15317d34dd systemd/systemd{,-stage0}: upgrade to 257.10
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7230>
2025-10-21 13:34:13 +02:00
Jens Reidel 370474e36e linux-pine64-pinephonepro: Build with LLVM
Signed-off-by: Jens Reidel <adrian@postmarketos.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7189>
2025-10-21 10:08:51 +00:00
Barnabás Czémán e6aa0c6119 device-qcom-msm89x7: Update properties in deviceinfo
Change deviceinfo_chassis from embedded to handset.
Replace deviceinfo_gpu_accelerated with deviceinfo_drm.
Remove obsolete deviceinfo_keyboard.

Signed-off-by: Barnabás Czémán <barnabas.czeman@postmarketos.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7217>
2025-10-21 05:58:24 +00:00
Barnabás Czémán bf41607cac device-qcom-msm8956: Update properties in deviceinfo
Change deviceinfo_chassis from embedded to handset.
Replace deviceinfo_gpu_accelerated with deviceinfo_drm.
Remove obsolete deviceinfo_keyboard.

Signed-off-by: Barnabás Czémán <barnabas.czeman@postmarketos.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7217>
2025-10-21 05:58:24 +00:00
Barnabás Czémán b7c1e50325 device-qcom-msm8916: Update properties in deviceinfo
Change deviceinfo_chassis from embedded to handset.
Replace deviceinfo_gpu_accelerated with deviceinfo_drm.
Remove obsolete deviceinfo_keyboard.

Signed-off-by: Barnabás Czémán <barnabas.czeman@postmarketos.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7217>
2025-10-21 05:58:24 +00:00
Barnabás Czémán d5fe6e1736 device-qcom-msm8953: Update properties in deviceinfo
Change deviceinfo_chassis from embedded to handset.
Replace deviceinfo_gpu_accelerated with deviceinfo_drm.
Remove obsolete deviceinfo_keyboard.

Signed-off-by: Barnabás Czémán <barnabas.czeman@postmarketos.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7217>
2025-10-21 05:58:24 +00:00
postmarketOS CI 36418ded0c linux-next: upgrade to next-20251021 2025-10-21 04:51:39 +00:00
Alexandre Marquet 5eec34ee2e device-samsung-manta: add audio support
Signed-off-by: Alexandre Marquet <tb@a-marquet.fr>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7222>
2025-10-21 01:10:57 +00:00
Jens Reidel 3960d31623 cross/gcc-*: upgrade to 15.2.0-r1
Signed-off-by: Jens Reidel <adrian@postmarketos.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7221>
2025-10-20 23:41:02 +00:00
Alexey Minnekhanov f811b0e427 device-xiaomi-whyred: updates for kernel 6.17
Update modules names to the ones used in kernel 6.17.

Fix deviceinfo linting issues.

[ci:ignore-count]

Signed-off-by: Alexey Minnekhanov <alexeymin@postmarketos.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7180>
2025-10-20 23:48:01 +03:00
Alexey Minnekhanov a824d53414 device-xiaomi-tulip: updates for kernel 6.17
Update modules names to the ones used in kernel 6.17.

Fix deviceinfo linting issues.

Signed-off-by: Alexey Minnekhanov <alexeymin@postmarketos.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7180>
2025-10-20 23:48:00 +03:00
Alexey Minnekhanov 57afee9937 device-xiaomi-platina: updates for kernel 6.17
Update modules names to the ones used in kernel 6.17.

Fix deviceinfo linting issues.

Signed-off-by: Alexey Minnekhanov <alexeymin@postmarketos.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7180>
2025-10-20 23:48:00 +03:00
Alexey Minnekhanov c117f5f95c device-xiaomi-jasmine_sprout: updates for kernel 6.17
Update modules names to the ones used inkernel 6.17.

Fix deviceinfo linting issues.

Signed-off-by: Alexey Minnekhanov <alexeymin@postmarketos.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7180>
2025-10-20 23:48:00 +03:00
Alexey Minnekhanov efc2dd5540 device-xiaomi-clover: updates for kernel 6.17
Update modules names to the ones used in kernel 6.17.

Fix deviceinfo linting issues.

Signed-off-by: Alexey Minnekhanov <alexeymin@postmarketos.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7180>
2025-10-20 23:48:00 +03:00
Alexey Minnekhanov 555cc1c5eb device-asus-x00td: updates for kernel 6.17
Update modules names to the ones in kernel 6.17.

Fix deviceinfo linting issues.

Signed-off-by: Alexey Minnekhanov <alexeymin@postmarketos.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7180>
2025-10-20 23:48:00 +03:00
Alexey Minnekhanov d701fd5ca4 device-xiaomi-lavender: add Shenchao variant, updates to kernel 6.17
Add variant with Shenchao panel. This variant is using the same panel
driver as Tianma one, so its modules-initfs file is symlink to
modules-initfs.tianma.

Switch to DPU driver (instead of MDP5) for display.

Update modules names to the ones used in 6.17 kernel.

Fix deviceinfo linter issues.

Signed-off-by: Alexey Minnekhanov <alexeymin@postmarketos.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7180>
2025-10-20 23:48:00 +03:00
Alexey Minnekhanov 3f295fd2af soc-qcom-sdm660, sony-pioneer: get rid of nonfree-firmware subpackages
Remove nonfree-firmware subpackage from soc-qcom-sdm660.

The only cosumer of it was nonfree-firmware subpackage in
device-sony-pioneer. So remove nonfree-firmware subpackage
from device-sony-pioneer and put original contents of
soc-qcom-sdm660-nonfree-firmware into firmware-sony-ninges.

In firmware-sony-ninges replace too big linux-firmware-qcom
dependency (150 Mb) by much smaller (42 Kb) package with
only GPU firmware (firmware-qcom-adreno-a530).

While we are fixing device-sony-pioneer, drop phoc.ini and
related -phosh subpackage from it as well.

And Xperia XA2 is actually GPU accelerated, mark it as such.

Signed-off-by: Alexey Minnekhanov <alexeymin@postmarketos.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7180>
2025-10-20 23:47:59 +03:00
Alexey Minnekhanov 2708a4dcee soc-qcom-sdm660: depend on alsa-ucm-conf-qcom-sdm660
In order for all devices on SDM630/660 platform to easily obtain
ALSA use case configs, add newly added alsa-ucm-conf-qcom-sdm660
to dependencies of common SoC package.

Haven't seen maxnet for a long time, so promote myself to
maintainer.

Signed-off-by: Alexey Minnekhanov <alexeymin@postmarketos.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7180>
2025-10-20 23:47:24 +03:00
Nickolay Goppen e8ae1ec3c2 alsa-ucm-conf-qcom-sdm660: new aport
Inspired by similar package from sdm670.

Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7180>
2025-10-20 23:46:14 +03:00
Alexey Minnekhanov dbd50aa6e4 linux-postmarketos-qcom-sdm660: upgrade to 6.17.4
NEW/HOT:
* Initial audio support for xiaomi-lavender, xiaomi-clover (only headphones and mic) ( rdacayan, setotau )
* New devices: Blackberry KEY2 (athena) and KEY2 LE (luna) ( sajattack )
* CDSP/ADSP fastrpc support for SDM630/636/660 ( setotau )

Significant:
* Proper panel drivers for xiaomi-lavender, xiaomi-tulip, xiaomi-jasmine, asus-x00td ( alexeymin, iAboothahir )
* Big downstream-y nt36xxx touch driver was dropped in favor of upstream nvt-ts and made folower to nt36672a panels ( alexeymin )
* Support for 3rd variation of xiaomi-lavender with shenchao panel ( rdacayan )
* Kernel configs enabled to support booting using EFI ( sajattack )

Smaller fixes:
* Use proper modem firmware for regular xiaomi-clover ( barni2000 )
* Fixes and updates for charger driver (like ability to stop charging from sysfs) ( kcxt )
* fuelgauge driver rework ( Tooniis, barni2000 )
* Make nokia-pl2 booting again ( nexus_chebykin )
* xiaomi-clover-plus can now load firmware for its Goodix touchscreen ( setotau )
* sns-reg driver knows more config group mappings (no more scary warnings in dmesg) ( lucaweiss )
* Fix for WLED OVP interrupt backtrace in dmesg ( joelselvaraj )
* Potential Wi-Fi driver stability increase ( rdacayan )
* Small fixes for stability of touchscreen on sony-pioneer, xiaomi-whyred ( alexeymin )
* LOTS of dtbs_check warnings were fixed. We are now down to only 3 of them.

Signed-off-by: Alexey Minnekhanov <alexeymin@postmarketos.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7180>
2025-10-20 23:44:14 +03:00
Jens Reidel 5d45751d38 ci: Add tag to skip kconfig checks
Signed-off-by: Jens Reidel <adrian@postmarketos.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7220>
2025-10-20 19:26:35 +02:00
adamthiede edef8326f6 linux-postmarketos-mediatek-mt8173: upgrade to 6.17.4
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7218>
2025-10-20 10:16:38 +00:00
postmarketOS CI 1a2f16008b linux-next: upgrade to next-20251020 2025-10-20 04:49:53 +00:00
Clayton Craft 4e3743b99e kconfigcheck: fix typo in nftables version constraint
Fixes 7829e6c

The old pmb config that was migrated to pmaports had "<5.17"

Signed-off-by: Clayton Craft <craftyguy@postmarketos.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7136>
2025-10-18 14:16:07 +00:00
Clayton Craft 5e452bf41c kconfigcheck: switch many options to modules
Based on running kconfig check against a few kernel configs in pmaports
(which presumably already work/boot), and fixing the INFO messages when
it complained about an option should be builtin.

This also:

- removes some options that were in the default category that were
redefined/duplicated elsewhere, in order to avoid confusion later.

- moves CONFIG_CBC to the default category (used by FDE and a few other
things)

Signed-off-by: Clayton Craft <craftyguy@postmarketos.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7136>
2025-10-18 14:16:07 +00:00
Henrik Grimler a6761951ff linux-postmarketos-exynos5: update to 6.12.53
Notable changes since 6.12.36 are roughly:

- Add support for n1awifi (@Eisenbahnfan)
- Add more features for n2a and v1a (@Eisenbahnfan)
- Fix wacom w9000 pen always being active until re-inserted (@Eisenbahnfan)
- Change ARM_EXYNOS_BUS_DEVFREQ to module (@Eisenbahnfan)
- Add sound support, and other improvements, for manta (@Alexmrqt)

Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7207>
2025-10-18 10:35:43 +00:00
user0-07161andClayton Craft 13649dbb71 amazon-checkers: enable wifi, fix crashes
I've also added myself as a maintainer everywhere as I forgot to do that
in the initial MR.

Co-authored-by: Clayton Craft <craftyguy@postmarketos.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7203>
2025-10-18 10:03:55 +00:00
Clayton Craft 34c32fe958 main/postmarketos-ui-os-installer: add support for os-installer 0.5.x
There were a number of config changes in 0.5.x (vs 0.4.x), this updates
our config to use the latest options/format.

Note: language selection is enabled by default, so no need to list
languages.

Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7206>
2025-10-17 16:29:24 +00:00
postmarketOS CI 591cf04f8a linux-next: upgrade to next-20251017 2025-10-17 15:49:54 +00:00
adamthiede e087139b30 kconfigcheck: add SYN_COOKIES
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7002>
2025-10-17 14:59:42 +00:00
Clayton Craft ba2199528e main/postmarketos-ui-plasma-mobile: drop systemd unit file
This should come from the package providing the daemon run by the unit
file (and in our case, at least temporarily, from the vendored unit file
in systemd-services)

This also adds an install script for post-upgrade that makes sure that
the alias for display-manager.service is created for plasma-mobile on
existing installs where we were missing the alias definition in the
tinydm unit file.
Without this workaround, existing installs will miss the alias and we
won't be able to run things that are associated with this alias (like
stopping pbsplash.)
Note: this is a post-install script since this subpkg is new, and on
existing systems affected by the issue it resolves the subpkg would be
'installed' not 'upgraded'.

Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7202>
2025-10-16 13:00:04 -07:00
Clayton Craft d92884c0d6 systemd/systemd-services: add display-manager alias to plasma-mobile unit file
This also drops the WantedBy param, to match what's upstream.

Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7202>
2025-10-16 12:57:05 -07:00
Clayton Craft a8707f9565 main/postmarketos-bootsplash: kill pbsplash with full privileges
This fixes an issue where pbsplash was not killed when the override is
attached to a service that runs as a non-root user (e.g.
tinydm.service). The tiny `+` tells systemd to run this command with
full privileges, the other stuff in the service's ExecStart and so on
are unaffected by this change.

This also adds the kill pbsplash override to getty@.service, fixes #4018

Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7202>
2025-10-16 12:57:05 -07:00
postmarketOS CI a576b6be2d linux-next: upgrade to next-20251016 2025-10-16 15:49:45 +00:00
Clayton Craft 91f4af5217 systemd/mutter: upgrade to 49.1
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7205>
2025-10-16 05:54:18 +00:00
Clayton Craft 65d43efd4f systemd/gnome-shell: upgrade to 49.1
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7205>
2025-10-16 05:54:18 +00:00
Clayton Craft 26892b9475 main/postmarketos-initramfs: drop overlayfs modules
overlayfs support has been included in the initrmafs since the beginning of pmOS: https://gitlab.postmarketos.org/postmarketOS/pmbootstrap/-/commit/ed9fc7f

But I have no clue why, because nothing seems to use it in the initramfs, at least not within recent history. By removing it, we save ~300KB, which might help small boot partition devices a bit.

Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7201>
2025-10-16 05:14:58 +00:00
Clayton Craft e74d238f88 main/postmarketos-ui-plasma-mobile: disable ppc64le
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7204>
2025-10-15 13:38:15 -07:00
Clayton Craft 4baab6de09 temp/abuild: drop aport
No longer needed since the latest abuild in aports has support for
-systemd split packages now

Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7200>
2025-10-15 18:45:11 +00:00
postmarketOS CI e96041ffaf linux-next: upgrade to next-20251015 2025-10-15 15:49:51 +00:00
user0-07161 2ecb487043 amazon-checkers: new device
[ci:skip-build]: already built successfully in CI

Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7195>
2025-10-15 08:49:21 +00:00
Aster Boese 9bcf50d248 main/postmarketos-base: install openrc-user-pam in openrc subpackage
Signed-off-by: Aster Boese <asterboese@mailbox.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7197>
2025-10-15 03:40:18 +00:00
Jens Reidel 4436968a2b linux-postmarketos-qcom-laptop: Build with LLVM
Signed-off-by: Jens Reidel <adrian@postmarketos.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7191>
2025-10-15 03:37:30 +00:00
Augis 726f8f7525 xiaomi-monet: update kernel and device
Updates linux-xiaomi-monet to 4.19.325

Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7100>
2025-10-15 03:34:47 +00:00
Alexander Baransky 7039ad14cd alsa-ucm-conf-qcom-sm7150: fix tucana audio channels
Signed-off-by: Alexander Baransky <sanyapilot496@gmail.com>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7198>
2025-10-15 01:10:43 +03:00
Alexander Baransky c4de4666cd firmware-qcom-sm7150: use packaged firmware for xiaomi-tucana
Signed-off-by: Alexander Baransky <sanyapilot496@gmail.com>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7198>
2025-10-15 01:10:43 +03:00
Alexander Baransky f3527f0028 firmware-xiaomi-tucana: new aport
Signed-off-by: Alexander Baransky <sanyapilot496@gmail.com>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7198>
2025-10-15 01:10:34 +03:00
Jens Reidel 672374d066 linux-postmarketos-mediatek-mt8173: Build with LLVM
Signed-off-by: Jens Reidel <adrian@postmarketos.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7193>
2025-10-14 20:26:31 +00:00
postmarketOS CI d06751767d linux-next: upgrade to next-20251014 2025-10-14 16:17:25 +00:00
Stefan Hansson e6fbadb1b0 linux-purism-librem5: upgrade to 6.6.101
Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7177
2025-10-14 03:36:40 +00:00
Jens Reidel 20261cb654 cross/systemd-boot-x86: upgrade to 258.1
Signed-off-by: Jens Reidel <adrian@postmarketos.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7194>
2025-10-14 02:21:30 +02:00
Oliver Smith a326582cd6 cross/musl-*: downgrade to 1.2.5
[ci:skip-vercheck]: Follow Alpine's downgrade to 1.2.5

Related: https://gitlab.alpinelinux.org/alpine/aports/-/commit/e4b8c67bb1d2d22e98f0c00b50b7fb0b71eee6c9
Related: https://gitlab.alpinelinux.org/alpine/aports/-/commit/28eb815e5d8bacf7467aed9db0fc6ac026e97cea
Related: https://gitlab.alpinelinux.org/alpine/aports/-/commit/f2036bfe000ab05e1f300c6fce57be3da9db426e
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7188>
2025-10-14 00:08:14 +00:00
Jens Reidel e710e26cbb device-qemu-ppc64le: fix console name
This was already working previously, but hvc0 is the more correct name
for the serial console.

Signed-off-by: Jens Reidel <adrian@postmarketos.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7192>
2025-10-13 23:59:57 +00:00
Robert Eckelmann 96e8b07819 linux-postmarketos-qcom-sdm845: Build with LLVM
Config was migrated with pmbootstrap!2705.

Signed-off-by: Robert Eckelmann <longnoserob@postmarketos.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7176>
2025-10-13 23:02:49 +00:00
Robert Eckelmann 22af602b95 linux-postmarketos-marvell: Build with LLVM
Config was migrated with pmbootstrap!2705.

Signed-off-by: Robert Eckelmann <longnoserob@postmarketos.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7173>
2025-10-13 19:18:53 +00:00
postmarketOS CI 06f8d463de linux-next: upgrade to next-20251013 2025-10-13 15:51:28 +00:00
Arnav Singh d2778cc698 linux-postmarketos-grate: fix WiFi on microsoft-surface-rt
Ref: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/issues/3786
2025-10-12 14:15:22 -07:00
Jens Reidel 87edfd6bb0 device-generic-loongarch64: New device
Signed-off-by: Jens Reidel <adrian@postmarketos.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7116>
2025-10-12 16:36:48 +00:00
Jens Reidel ccb4f6d525 device-qemu-loongarch64: New device
Signed-off-by: Jens Reidel <adrian@postmarketos.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7116>
2025-10-12 16:36:48 +00:00
Jens Reidel c7ad397297 main/postmarketos-qemu-common: Support loongarch64
[ci:skip-vercheck]

Signed-off-by: Jens Reidel <adrian@postmarketos.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7116>
2025-10-12 16:36:48 +00:00
Jens Reidel 3632851500 cross/crossdirect: Add support for loongarch64
Signed-off-by: Jens Reidel <adrian@postmarketos.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7116>
2025-10-12 16:36:48 +00:00
Jens Reidel b3500aaa5b cross/{gcc,musl}-loongarch64: Generate with aportgen
Signed-off-by: Jens Reidel <adrian@postmarketos.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7116>
2025-10-12 16:36:48 +00:00
Stefan Hansson b28e97b3e0 main/dint: upgrade to 0.0.1
[ci:skip-vercheck]: Due to me misunderstanding how apk deals with the
_git suffix, this is a downgrade. But I don't think it matters much
given that we expect users to use `apk upgrade -a` generally and since
dint mostly is used in CI.

Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7183>
2025-10-12 16:30:25 +00:00
smallsolar 0007041862 linux-samsung-a5y17lte: alphabetised dependencies in APKBUILD
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7162>
2025-10-12 12:47:56 +00:00
smallsolar 309329907e linux-samsung-a5y17lte: fixed build issues using inspired by a0d79b92
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7162>
2025-10-12 12:47:56 +00:00
smallsolar 2209a90da2 linux-samsung-a5y17lte: incremented pkgrel
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7162>
2025-10-12 12:47:53 +00:00
smallsolar cfe49ffdfd linux-samsung-a5y17lte: add modules.order to package to fix build error
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7162>
2025-10-12 12:47:49 +00:00
Oliver Smith cc70c2550a systemd/wireplumber: upgrade to 0.5.12
Related: https://gitlab.alpinelinux.org/alpine/aports/-/commit/dc657c75e776736050539c2ce09a97e4fdb5d0e8
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7184>
2025-10-12 13:26:39 +02:00
Jens Reidel e5b378b65f cross/musl-*: upgrade to 1.2.6_git20250919
Signed-off-by: Jens Reidel <adrian@postmarketos.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7182>
2025-10-12 10:10:59 +00:00
André Apitzsch 74c3749568 bq-piccolo: archive device specific packages
Archive BQ M5 device and firmware package in favor of
device-qcom-msm8916.

Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7174>
2025-10-12 10:36:11 +02:00
André Apitzsch ba39a4ac5e bq-piccolo: drop subpackage phosh
It's already well scaled. Drop unnecessary phoc.ini.

Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7174>
2025-10-12 10:36:11 +02:00
André Apitzsch 9b1f86e727 bq-piccolo: drop keyboard and rename gpu_accelerated to drm in deviceinfo
Property deviceinfo_keyboard is obsolete:
Programs should automatically detect if the device currently has a
keyboard or not (often it can be hotplugged anyway).

Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7174>
2025-10-12 10:35:59 +02:00
Jens Reidel 882b3807aa device-qemu-ppc64le: support proper OF boot
Signed-off-by: Jens Reidel <adrian@postmarketos.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7153>
2025-10-11 22:57:14 +02:00
Jens Reidel 8410d344cc main/boot-deploy: upgrade to 0.20.3
Signed-off-by: Jens Reidel <adrian@postmarketos.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7153>
2025-10-11 22:57:14 +02:00
Jens Reidel 12f3380e78 main/postmarketos-base: disable GRUB trigger
Signed-off-by: Jens Reidel <adrian@postmarketos.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7153>
2025-10-11 22:57:14 +02:00
Bart Ribbers 78eed6fc98 systemd/plasma-workspace: install the Wayland SDDM session config
Makes SDDM use KWin as it's compositor and thus run on Wayland rather
than X11. This is what the Alpine packaging has done for quite a while
now and actually fixes my PC just showing a black screen until I've
logged in (by just starting to type my password blindly).

Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7170>
2025-10-10 21:40:28 +00:00
Bart Ribbers c124ebd33e systemd/sddm: sync packaging with Alpine
Installs a config file to use the Weston compositor if none other is
specified.

Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7170>
2025-10-10 21:40:28 +00:00
Robert Eckelmann ae7fb037f7 linux-postmarketos-grate: clean-up and sort depends
Signed-off-by: Robert Eckelmann <longnoserob@postmarketos.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7165>
2025-10-10 21:30:30 +00:00
Robert Eckelmann d92a944a4c linux-postmarketos-grate: Build with LLVM
Config was migrated with pmbootstrap!2705.

Signed-off-by: Robert Eckelmann <longnoserob@postmarketos.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7165>
2025-10-10 21:30:30 +00:00
postmarketOS CI 3858f6164c linux-next: upgrade to next-20251010 2025-10-10 15:50:08 +00:00
Robert Eckelmann 095c34886a linux-postmarketos-mediatek-mt81: Build with LLVM
Config was migrated with pmbootstrap!2705.

Signed-off-by: Robert Eckelmann <longnoserob@postmarketos.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7167>
2025-10-10 14:33:54 +00:00
Jens Reidel d1561c23c1 linux-postmarketos-qcom-sm7150: Build with LLVM
Signed-off-by: Jens Reidel <adrian@postmarketos.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7161>
2025-10-10 14:10:11 +00:00
Robert Mader 21aa622d00 systemd/pipewire: upgade to 1.4.9
Notably including a build fix for the upcoming libcamera 0.6 and lots of
libcamera-plugin fixes, including autofocus getting enabled when
available.

https://gitlab.freedesktop.org/pipewire/pipewire/-/releases/1.4.9

Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7164>
2025-10-10 10:30:54 +02:00
Luca Weiss c8a8a0cfcf linux-postmarketos-qcom-sm6350: upgrade to 6.17.0
Manual kconfig changes:
* EEPROM_AT24=m
* REGULATOR_QCOM_REFGEN=y
* NVMEM_SPMI_SDAM=y
* IP_NF_FILTER (category:containers)
* IP_NF_TARGET_MASQUERADE (category:containers)
* IP_NF_NAT (category:containers)
* IP_NF_TARGET_REDIRECT (category:containers)
* IP6_NF_TARGET_MASQUERADE (category:containers)
* IP_NF_FILTER (category:nftables)
* IP_NF_NAT (category:nftables)
* IP6_NF_FILTER (category:nftables)
* IP6_NF_NAT (category:nftables)
* IP_NF_MANGLE (category:waydroid)

Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7106>
2025-10-10 06:48:20 +00:00
Raymond Hackley d6f65d3bde samsung-{a3,a5,a7,e7,grandmax}: rename gpu_accelerated to drm in deviceinfo
Link: https://gitlab.postmarketos.org/postmarketOS/pmbootstrap/-/commit/d7b12d98e67d6eb9b5813cb9e8f15578317e490f
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7160>
2025-10-09 18:53:17 +00:00
Raymond Hackley 51e7f0f821 samsung-{a3,a5,a7,e7,grandmax}: drop deviceinfo_keyboard
This property is obsolete:
Programs should automatically detect if the device currently has
a keyboard or not (often it can be hotplugged anyway).

Link: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/issues/3145
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7160>
2025-10-09 18:53:17 +00:00
Raymond Hackley c01b371d49 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
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7160>
2025-10-09 18:53:14 +00:00
postmarketOS CI a58141085d linux-next: upgrade to next-20251009 2025-10-09 15:49:42 +00:00
Aster Boese 9c0b5a9396 main/postmarketos-ui-cosmic: add openrc support
Signed-off-by: Aster Boese <asterboese@mailbox.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7156>
2025-10-09 10:42:39 -04:00
postmarketOS CI 9c6d20dadf linux-next: upgrade to next-20251008 2025-10-09 04:49:45 +00:00
Biswapriyo Nath 574a4b76ad linux-postmarketos-qcom-msm89x7: Enable ntsync driver for wine
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7150>
2025-10-09 00:16:05 +00:00
Jens Reidel a396bbc559 main/dint: upgrade to 0.0.1_git20251003
Signed-off-by: Jens Reidel <adrian@postmarketos.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7154>
2025-10-08 15:53:53 +02:00
Jack Knightly 8fb51f4dc2 firmware-samsung-midas: t0{3g,lte} duplicate nvram files for each
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7152>
2025-10-08 11:47:02 +00:00
Jack Knightly 02d1dda310 samsung-t0{3g,lte}: deviceinfo tidyup and dtb alignment
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7152>
2025-10-08 11:47:02 +00:00
Henrik Grimler c08842e994 linux-postmarketos-exynos4: update to 6.16.10
Some notable changes are:

- Add qcom mdm9x15 modem dts nodes for midas (@jack_kekzoz)
- Add hack with possibility to power cycle ehci usb controller
- Split p4note into wifi and lte variants (@viciouss)
- Add Imagis ISA1200 haptic driver (@viciouss)
- Drop custom initramfs from kernel. Was only needed by 4210 and
  they can use u-boot now.
- Add wacom9000 stylus driver (by @eisenbahnfan, taken from exynos5 kernel)
- .. and some general cleanup to make dtbs_check happy

Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7152>
2025-10-08 11:47:02 +00:00
Martin Juecker 796fbdee57 device-samsung-p4note: adjust sensor mount matrix for iio-sensor-proxy
There is currently two different ways to handle sensors, the Linux way
which is taking earth as a starting point and then drawing a vector
through the device, as well as the Windows way which takes the device as
a starting point and drawing a vector towards earth. iio-sensor-proxy
decided to go the Windows way, therefor the configuration needs to be
flipped for the readings to produce the expected result.

I created an issue with iio-sensor-proxy that goes into a bit more
details, see #375.

Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7085>
2025-10-07 22:35:43 +00:00
Jens Reidel 0dc41491eb docs/device-categorization: add kernel upgrading requirement
As per
https://gitlab.postmarketos.org/postmarketOS/postmarketos/-/issues/119,
we want to require kernel packages used by community devices to be
upgraded regularly, so add the proposed requirement in our
categorization requirements.

Signed-off-by: Jens Reidel <adrian@postmarketos.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7104>
2025-10-07 22:33:21 +00:00
postmarketOS CI 0055341870 linux-next: upgrade to next-20251007 2025-10-07 15:49:47 +00:00
Robert Eckelmann d251d507d1 CI: correct description of docs build tools
Signed-off-by: Robert Eckelmann <longnoserob@postmarketos.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7151>
2025-10-07 14:30:44 +00:00
Robert Eckelmann 0b2a826aa1 docs: fix template URI
this should fix the docs CI issue discovered in !7104

Signed-off-by: Robert Eckelmann <longnoserob@postmarketos.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7151>
2025-10-07 14:30:44 +00:00
Raymond Hackley 4626b4567c samsung-fortuna: rename gpu_accelerated to drm in deviceinfo
Link: https://gitlab.postmarketos.org/postmarketOS/pmbootstrap/-/commit/d7b12d98e67d6eb9b5813cb9e8f15578317e490f
2025-10-07 09:34:32 +00:00
Raymond Hackley 9647ccc81b samsung-fortuna: drop deviceinfo_keyboard
This property is obsolete:
Programs should automatically detect if the device currently has
a keyboard or not (often it can be hotplugged anyway).

Link: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/issues/3145
2025-10-07 09:34:31 +00:00
Raymond Hackley e26721e74f samsung-fortuna: fix deviceinfo_dtb_fortuna3g
Closes: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/issues/4011
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
2025-10-07 09:34:17 +00:00
Jane Rachinger b43fe351da systemd/postmarketos-base-systemd: add shutdown-splash preset
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6926>
2025-10-06 20:30:56 -07:00
Jane RachingerandClayton Craft 085729e888 main/postmarketos-bootsplash: fix start/stop conditions
This should now match behavior with plymouth. Some annoyances were
previously splash that is started multiple times or which isn't killed
when a rescue/emergency target requires.

Co-authored-by: Clayton Craft <clayton@craftyguy.net>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6926>
2025-10-06 20:30:27 -07:00
postmarketOS CI c4edf061a5 linux-next: upgrade to next-20251006 2025-10-06 15:49:50 +00:00
Devon Lutz 9d83dc8f86 qcom-msm89{05,09,16,39}: Remove _pmb_select="soc-qcom-msm8916-rproc" from APKBUILD
Fix "pmbootstrap init" (provider package was removed).
postmarketOS/pmaports!7075 dropped support for selecting the msm8916
rproc option during "pmbootstrap init".

Fixes: 7a29af043c ("soc-qcom-msm8916: drop non-functional rproc selection")
[ci:ignore-count]
[Raymond: drop it everywhere]
Co-developed-by: Raymond Hackley <wonderfulShrineMaidenOfParadise@postmarketos.org>
2025-10-06 11:48:57 +00:00
Clayton Craft 66fcd0230d main/postmarketos-initramfs: handle reboot/poweroff
Needed in both init stages since they both can call fail_halt_boot.

fixes #4003

Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7128
2025-10-05 21:22:40 -04:00
Oliver Smith 38245b028f 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.

Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7145>
2025-10-05 22:48:50 +00:00
Eisenbahnfan d25acebd38 firmware-samsung-n2awifi: Fix pkgdesc and add myself as maintainer
[ci:skip-vercheck]

Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7142>
2025-10-05 17:19:02 +00:00
Achill Gilgenast cb8c5a0c57 systemd/phosh: upgrade to 0.50.0
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7143>
2025-10-05 17:53:18 +02:00
Vasiliy Doylov edbf3776c0 systemd/wireplumber: enable gobject introspectgion
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7141>
2025-10-05 17:27:04 +03:00
dabao1955 11ff09a6be linux-xiaomi-raphael: upgrade to 6.16.9
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7133>
2025-10-05 13:59:57 +00:00
Clayton Craft b4b65df84c main/postmarketos-ui-os-installer: use pmb's shallow clone option
This option was added in pmb 3.6, so the dependency is constrained to
that version and later

Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7109>
2025-10-05 02:36:51 +00:00
Leah 74ae0e3867 linux-samsung-hero: Disable camera
Squashed with:
 - linux-samsung-herolte: Fix checksum

Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7108>
2025-10-05 02:34:20 +00:00
Leah fd24da6e65 firmware-samsung-hero: Add missing firmware files
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7108>
2025-10-05 02:34:20 +00:00
Jens Reidel d173406ed9 ci: lib: Run jobs for ppc64le
Signed-off-by: Jens Reidel <adrian@postmarketos.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7140>
2025-10-04 15:53:42 +00:00
Jens Reidel b69cbb5367 pmaports.cfg: Mark ppc64le as supported
Now that the repositories are built and published, we can mark it as
supported.

Signed-off-by: Jens Reidel <adrian@postmarketos.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7140>
2025-10-04 15:53:42 +00:00
Casey Connolly de53a5c455 linux-next: enable UCLAMP
Allows us to fix UI stutters with uclampset cli tool

Signed-off-by: Casey Connolly <kcxt@postmarketos.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7139>
2025-10-04 15:27:20 +02:00
Jens Reidel b69e4a50c8 systemd/systemd: enable for ppc64le and s390x
There is no reason to restrict this based on pmbootstrap support for
architectures. Also, both ppc64le and s390x are now supported in
pmbootstrap.

[ci:skip-vercheck]

Signed-off-by: Jens Reidel <adrian@postmarketos.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7134>
2025-10-03 20:18:29 +00:00
Oliver Smith 86b5702a7c temp/xkeyboard-config: upgrade to 2.46
Upgrade to the latest upstream version and sync with Alpine's APKBUILD.
Previously this was on a git commit in order to prepare upstreaming the
N900 config, which was not merged yet.

Related: https://gitlab.alpinelinux.org/alpine/aports/-/commit/e41306ff207a0d0a580c88ab8a9e7d6258281392
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7132>
2025-10-03 17:23:07 +00:00
postmarketOS CI 26a6bb521b linux-next: upgrade to next-20251003 2025-10-03 15:50:26 +00:00
Jens Reidel bde0d7ab17 systemd/systemd: use LLVM 21 instead of 15
Signed-off-by: Jens Reidel <adrian@postmarketos.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7130>
2025-10-03 11:59:31 +02:00
Bart Ribbers bbc4d2c9c7 systemd/postmarketos-base-systemd: enable xdg-user-dirs by default
xdg-user-dirs defines the location of default user folders like
~/Documents, ~/Downloads, ~/Music, etc, and when they don't exist it'll
make sure they're created.
These are folders people will expect to exist on any installation.

Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7129>
2025-10-02 23:33:35 +02:00
Clayton Craft 7b710e42f8 temp/petitboot: drop aport
This is now packaged in aports:
https://gitlab.alpinelinux.org/alpine/aports/-/merge_requests/90929

Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7127>
2025-10-02 08:48:14 -07:00
Jens Reidel 4fafe35201 main/dint: fix and enable for all architectures
Signed-off-by: Jens Reidel <adrian@postmarketos.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7114>
2025-10-01 23:33:20 +00:00
Jens Reidel 948a5da202 mt6735-bootshim: Build with cross-native
This package hardcodes a --target for clang, so it can be built just
fine with the native clang and doesn't need to run in QEMU.

Signed-off-by: Jens Reidel <adrian@postmarketos.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7124>
2025-10-01 23:13:43 +00:00
Jens Reidel 28d2a166f3 modem/libsamsung-ipc: fix build with GCC 15
Signed-off-by: Jens Reidel <adrian@postmarketos.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7125>
2025-10-01 23:11:38 +00:00
Jens Reidel c63615b9a6 main/f0rmz: fix build for ppc64le
Signed-off-by: Jens Reidel <adrian@postmarketos.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7126>
2025-10-01 23:04:04 +00:00
Jens Reidel 85c4e40ea8 main/unixbench: Upgrade to 6.0.0, fix build errors
Signed-off-by: Jens Reidel <adrian@postmarketos.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7123>
2025-10-01 23:34:17 +02:00
Oliver Smith 904e59fbc2 Reapply "main/bootchart2: upgrade to 0.14.9_git20220807"
This reverts commit e48304b386.

Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7120>
2025-10-01 19:56:10 +02:00
Oliver Smith fca3e7d7ee cross/crossdirect: fix "unsupported relocation"
Crossdirect redirects archivers (gz, bzip2, ...) to their native
versions when cross compiling. This works e.g. when extracting sources or
packing the .apks at the end of the build. But it currently fails when
such an archiver gets called during package().

For example with bootchart2:

  >>> bootchart2: Entering fakeroot...
  ...
  gzip -c bootchart2.1 > /home/pmos/build/pkg/bootchart2/usr/share/man/man1/bootchart2.1.gz
  Error relocating /native/usr/lib/libfakeroot.so: unsupported relocation type 6
  Error relocating /native/usr/lib/libfakeroot.so: unsupported relocation type 6
  Error relocating /native/usr/lib/libfakeroot.so: unsupported relocation type 1
  Error relocating /native/usr/lib/libfakeroot.so: unsupported relocation type 6

Fix this by running the foreign arch version when it gets called in a
fakeroot.

Fixes: 8a7c9ce7 ("cross/crossdirect: run archivers natively too")
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7120>
2025-10-01 19:56:10 +02:00
Oliver Smith e59bbc4d6e main/make3.81: remove
This package isn't used by anything and fails to build with current GCC
in Alpine. Let's drop it.

Related: https://builds.sr.ht/~postmarketos/job/1579283
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7119>
2025-10-01 17:22:12 +00:00
Oliver Smith 126a700fe6 main/postmarketos-initramfs: add postmarketos-base-nofde to makedepends
Fix bootstrapping a new repository by ensuring postmarketos-base-nofde
gets built by BPO beforehand, which now provides
postmarketos-fde-unlocker (as it should have all along).

Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7118>
2025-10-01 16:40:23 +00:00
Oliver Smith e8fcd51ce2 main/postmarketos-base-nofde: provide postmarketos-fde-unlocker
This package was supposed to be a provider for postmarketos-fde-unlocker
(see description "Dummy unlocker package for systems without FDE") and
provider_priority=1 (whereas unl0kr has 1000)).

Fix this, so it is in theory possible to install pmOS without unl0kr
again if you want to save a little space and don't need FDE. More
importantly this also fixes bootstrapping a new reposiotry, as we can
now let postmarketos-initramfs makedepend on this package to ensure that
there is one provider for postmarketos-fde-unlocker.

Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7118>
2025-10-01 16:40:23 +00:00
Jens Reidel 58b529eb34 main/gcc{4,6}: disable on ppc64le and loongarch64
Neither ppc64le nor loongarch64 use vendor kernels, so the old GCCs
packages are not required.

They currently don't build either because of a couple of problems when
building with GCC 15. If we really want to, ppc64le can be re-enabled
once those problems are resolved, since it is supported since GCC 4.9.
loongarch64 needs a much newer GCC.

[ci:skip-vercheck]

Signed-off-by: Jens Reidel <adrian@postmarketos.org>
Part-of: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7117
[ci:skip-build]: just disabling some arches
2025-10-01 18:36:45 +02:00
Casey Connolly baa1376e80 linux-next: enable USB_SERIAL_SIMPLE
Signed-off-by: Casey Connolly <kcxt@postmarketos.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7105>
2025-10-01 14:48:49 +00:00
Casey Connolly d09c0bd7e8 kconfigcheck: enable USB simple serial console
Support for simple USB serial devices like those exposed by the Suzy-Q
cable.

Signed-off-by: Casey Connolly <kcxt@postmarketos.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7105>
2025-10-01 14:48:48 +00:00
Clayton Craft 6180adfdf2 temp/iio-sensor-proxy: upgrade to 3.8
I dropped 2 patches that seem to have been merged upstream.
I also updated the pkgver format to follow what we do for other forked
pkgs, so hopefully the upstream compat monitoring thing will detect when
this pkg is out of date again

This adds a new patch to fix #3787

Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7099>
2025-10-01 14:46:19 +00:00
Clayton Craft c5ca2e756a kconfigcheck: add 'immutable' category
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/6949>
2025-10-01 14:14:05 +02:00
Clayton Craft bde9dca58c ci: apkbuild lint: allow all valid kconfigcheck categories
This only allowed categories that were aliases (and only categories
under those), but stuff like `pmb:kconfigcheck-uefi` was flagged as an
invalid option by the linting.

This change parses aliases AND all categories in the kconfigcheck and
allows those as options.

Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7101>
2025-10-01 12:11:05 +00:00
Stefan Hansson 6e75e62302 CI: dint: don't mark job as failed if only warnings were raised
In the case of there being warnings but no errors, dint will set its
exit code to 2. We don't want the pipeline to fail in this case, so have
2 be an allowed failure exit code.

Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7083>
2025-10-01 12:03:26 +00:00
Clayton Craft fef14737eb kconfigcheck: use tristate values for options
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7080>
2025-09-30 14:00:12 -07:00
Luca Weiss 6890536ff6 main/mtk-mkimage: update url
The URL is dead, so link to an archive.org version of that page instead.

Fixes #3981

Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7111>
2025-09-30 20:51:22 +00:00
Clayton Craft 3c93972ece apple-mac-aarch64: new device
I chose this device pkg name because it's descriptive, this pkg doesn't
support the 'idevice' things or x86_64 or PPC Macs. I didn't include
"generic" because, while it supports Macbooks, (in theory) Mac Minis
and something called Mac Studio, it's not really *that* generic for Mac
computers AND by having the manufacturer be "Apple" it'll show up in pmb
init under "apple." This will make it more intuitive to find, I think.

Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7048>
2025-09-30 20:32:09 +00:00
Clayton Craft eddbe346c9 linux-postmarketos-asahi: new aport
Alpine's linux-asahi kernel is missing some config for booting on the
macbook M2, and is missing config for supporting other pmOS features /
kconfig checks. It's easier to maintain this kernel downstream for now
so changes can be made easily to support this hardware and functionality
we need.

Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7048>
2025-09-30 20:32:09 +00:00
2045 changed files with 75553 additions and 18778 deletions

No files matched your search

+6 -8
View File
@@ -1,7 +1,7 @@
#!/bin/sh -e
# Copyright 2025 Pablo Correa Gomez
# SPDX-License-Identifier: GPL-3.0-or-later
# Description: create documentation with sphinx
# Description: create documentation with antora
# Options: with-dot-git
# Artifacts: build/site
# https://postmarketos.org/pmb-ci
@@ -10,13 +10,11 @@
# Install dependencies
if [ "$(id -u)" = 0 ]; then
set -x
apk -q add git nodejs npm
apk -q add py3-pip make git
apk add dint --allow-untrusted --repository=https://mirror.postmarketos.org/postmarketos/master
exec su "${TESTUSER:-build}" -c "sh -e $0"
fi
npm install antora
npx antora -v
# FIXME: https://gitlab.com/antora/antora/-/issues/1183
git clone --depth 1 https://gitlab.postmarketos.org/postmarketOS/handbook
npx antora --clean antora-test.yml
cd docs/
make venv
make
+1
View File
@@ -0,0 +1 @@
lib/build_changed_aports.sh
+16
View File
@@ -94,4 +94,20 @@ if grep -qEr '^deviceinfo_kernel_cmdline.*[\"\s]console=null' -- device/; then
exit_code=1
fi
# Disallow installation of files to /etc/modules-load.d and /etc/modprobe.d
if grep -qr '/etc/modules-load.d' --exclude-dir='device-samsung-golden-downstream' -- *; then
echo "ERROR: Please replace '/etc/modules-load.d' with '/usr/lib/modules-load.d' in the following files:"
grep --color=always -r '/etc/modules-load.d' --exclude-dir='device-samsung-golden-downstream' -- *
exit_code=1
fi
# n900 is excluded because the string is in a comment linking to a repo.
# No other non-archived devices should be excluded.
if grep -qr '/etc/modprobe.d' --exclude-dir='archived' \
--exclude-dir='device-nokia-n900' -- *; then
echo "ERROR: Please replace '/etc/modprobe.d' with '/usr/lib/modprobe.d' in the following files:"
grep --color=always -r '/etc/modprobe.d' --exclude-dir='device-nokia-n900' \
--exclude-dir='archived' -- *
exit_code=1
fi
exit "$exit_code"
+6 -5
View File
@@ -21,16 +21,17 @@ custom_valid_options = [
]
def get_kconfigcheck_categories() -> None:
def get_kconfigcheck_categories() -> list [str]:
with open("kconfigcheck.toml", "rb") as kconfigcheck_config:
kconfigcheck_data = tomllib.load(kconfigcheck_config)
kconfigcheck_categories = []
for alias_name in kconfigcheck_data["aliases"]:
kconfigcheck_categories.append(f"pmb:kconfigcheck-{alias_name}")
for category_name in kconfigcheck_data["aliases"][alias_name]:
for category_name in kconfigcheck_data:
if category_name == "aliases":
for alias_name in kconfigcheck_data["aliases"]:
kconfigcheck_categories.append(f"pmb:kconfigcheck-{alias_name}")
else:
kconfigcheck_categories.append(category_name)
return [item.replace("category:", "pmb:kconfigcheck-") for item in kconfigcheck_categories]
+6 -2
View File
@@ -19,7 +19,11 @@ from pmb.core.context import get_context
def build_strict(packages, arch):
common.run_pmbootstrap(["build_init"])
common.run_pmbootstrap(["--details-to-stdout", "--no-ccache", "build",
# We set the timeout to 1 hour because linking the Linux kernel with
# ThinLTO on our aarch64 runners takes slightly over 30 minutes
common.run_pmbootstrap(["--details-to-stdout", "--no-ccache",
"--timeout", "3600",
"build",
"--strict", "--force",
"--arch", arch, ] + list(packages))
@@ -32,7 +36,7 @@ if __name__ == "__main__":
arch = sys.argv[1]
# Get and print modified packages
packages = common.get_changed_packages()
packages = common.get_changed_packages(skip_archived=True)
# Load context
sys.argv = ["pmbootstrap.py", "chroot"]
+4 -1
View File
@@ -82,12 +82,15 @@ if __name__ == "__main__":
exit(1)
exit(0)
pkgnames = common.get_changed_kernels()
pkgnames = common.get_changed_kernels(skip_archived=True)
print(f"Changed kernels: {pkgnames}")
if len(pkgnames) == 0:
print("No kernels changed in this branch")
exit(0)
elif common.commit_message_has_string("[ci:skip-kconfigcheck]"):
print("WARNING: not checking kernel configs ([ci:skip-kconfigcheck])")
exit(0)
last_failed = check_kconfig(pkgnames)
+4 -4
View File
@@ -141,7 +141,7 @@ def get_changed_files(removed=True):
return ret
def get_changed_packages():
def get_changed_packages(skip_archived: bool = False):
ret = set()
for file in get_changed_files():
dirname, filename = os.path.split(file)
@@ -149,7 +149,7 @@ def get_changed_packages():
# Skip files:
# * in the root dir of pmaports (e.g. README.md)
# * path with a dot (e.g. .ci/, device/.shared-patches/)
if not dirname or file.startswith(".") or "/." in file:
if not dirname or file.startswith(".") or "/." in file or skip_archived and dirname.startswith("device/archived"):
continue
if filename != "APKBUILD":
@@ -178,9 +178,9 @@ def get_changed_packages():
return ret
def get_changed_kernels():
def get_changed_kernels(skip_archived: bool = False):
ret = []
for pkgname in get_changed_packages():
for pkgname in get_changed_packages(skip_archived):
if pkgname.startswith("linux-"):
ret += [pkgname]
return ret
+3
View File
@@ -8,6 +8,9 @@ import subprocess
import sys
if __name__ == "__main__":
if common.commit_message_has_string("[ci:skip-dint]"):
print("WARNING: not linting deviceinfo files ([ci:skip-dint])")
exit(0)
deviceinfo_files = {file for file in common.get_changed_files(removed=False)
if os.path.basename(file) == "deviceinfo"}
+2
View File
@@ -149,6 +149,7 @@ class ArchTagSet(set):
Arch.armv7,
Arch.armhf,
Arch.riscv64,
Arch.ppc64le,
]
def update(self, iterable):
@@ -231,6 +232,7 @@ if __name__ == "__main__":
Arch.armv7: "qemu",
Arch.armhf: "qemu",
Arch.riscv64: "qemu",
Arch.ppc64le: "ppc64le",
},
)
with open(child_pipeline, "w") as fw:
+1 -1
View File
@@ -29,4 +29,4 @@ pmbootstrap -q shutdown
# Needed to import "common"
export PYTHONPATH=".ci/lib"
# Run testcases
pytest -vv -x --tb=native "$pmaports/.ci/testcases" "$@"
pytest -vv --tb=native "$pmaports/.ci/testcases" "$@"
+2
View File
@@ -21,9 +21,11 @@ sh_files="
./main/postmarketos-initramfs/init.sh
./main/postmarketos-initramfs/init_functions.sh
./main/postmarketos-mkinitfs-hook-netboot/netboot.sh
./main/postmarketos-ui-os-installer/rootfs-usr-bin-pmos_setup.sh
./main/ttyescape/*.post-install
./main/unl0kr/unlock.sh
./device/community/soc-qcom/call_audio_idle_suspend_workaround.sh
./device/testing/device-apple-mac-aarch64/*.sh
./extra-repos/systemd/postmarketos-base-systemd/rootfs-usr-libexec-systemd-apk-trigger
$(find . -path './main/postmarketos-ui-*/*.sh')
-26
View File
@@ -13,22 +13,6 @@ import pmb.parse
from pmb.core.pkgrepo import pkgrepo_iglob
def deviceinfo_obsolete(info):
"""
Test for obsolete options used in the deviceinfo file. They must still be
defined in pmbootstrap's config/__init__.py.
"""
obsolete_options = [
"usb_rndis_function",
"weston_pixman_type",
]
for option in obsolete_options:
if getattr(info, option, None):
raise RuntimeError(f"option {option} is obsolete, please rename"
" or remove it (see reasons for removal of at"
" https://postmarketos.org/deviceinfo)")
def test_deviceinfo():
"""
Parse all deviceinfo files successfully and run checks on the parsed data.
@@ -47,19 +31,10 @@ def test_deviceinfo():
try:
for line in lines:
# Require space after # for comments
if line.startswith("#") and not line.startswith("# "):
raise RuntimeError("Comment style: please change '#' to"
f" '# ': {line}")
# Skip empty lines and comments
if not line or line.startswith("# "):
continue
# Variable can not be empty
if '=""' in line:
raise RuntimeError("Please remove the empty variable: " + line)
# Check line against regex (can't use multiple lines etc.)
if not pattern.match(line) or line.endswith("\\\""):
raise RuntimeError("Line looks invalid, maybe missing"
@@ -68,7 +43,6 @@ def test_deviceinfo():
# Successful deviceinfo parsing / obsolete options
info = pmb.parse.deviceinfo(device)
deviceinfo_obsolete(info)
# deviceinfo_name must start with manufacturer
name = info.name
+8 -1
View File
@@ -7,12 +7,19 @@
# Top-most EditorConfig file.
root = true
[{**.{md,ini,sh,rules,nft},**/APKBUILD,CODEOWNERS}]
[{**.{ini,sh,rules,nft},**/APKBUILD,CODEOWNERS}]
indent_style = tab
end_of_line = lf
trim_trailing_whitespace = true
insert_final_newline = true
[**.md]
# No indent_size since space size has meaning in markdown
indent_style = space
end_of_line = lf
trim_trailing_whitespace = true
insert_final_newline = true
# Forked from Alpine
[extra-repos/systemd/networkmanager/networkmanager.rules]
indent_style = space
+2 -2
View File
@@ -66,8 +66,8 @@ instance/
.scrapy
# Documentation
docs/_build/
build/site
public
docs/deviceinfo-reference.md
# PyBuilder
target/
+8 -3
View File
@@ -116,6 +116,9 @@ dint:
script:
- .ci/lib/gitlab_prepare_ci.sh
- .ci/dint.sh
allow_failure:
exit_codes:
- 2 # returned by dint on non-fatal warning
# kernel kconfig check
kernel-kconfig:
@@ -205,17 +208,19 @@ build-docs:
rules:
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
changes:
- docs/**/*
- docs/**
deploy-docs:
stage: deploy
trigger:
project: postmarketOS/handbook
project: postmarketOS/docs.postmarketos.org
strategy: depend
rules:
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH && $CI_PROJECT_NAMESPACE == "postmarketOS"
changes:
- docs/**/*
- docs/**
- if: $CI_PIPELINE_SOURCE == "schedule"
when: never
auto-update:
stage: autoupdate
+7 -7
View File
@@ -31,16 +31,16 @@ subfolders of the device directory. As such, commits changing
packages inside of the device directory should omit the directory
prefix, for example:
device-pine64-pinephone: description of change
device-pine64-pinephone: description of change
Or:
soc-qcom-msm8996: description of change
soc-qcom-msm8996: description of change
If the commit only makes device-specific changes, the
commit title can opt to use the following format:
manufacturer-codename: description of change
manufacturer-codename: description of change
### Changes to packages inside of the systemd directory
@@ -48,12 +48,12 @@ 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
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
systemd/cups: restart on upgrade
### Moving devices between categories
@@ -61,11 +61,11 @@ As we do not include directory prefixes in device-related commits,
Alpine's commit style for moving packages does not apply. Instead,
we do the following:
manufacturer-codename: move from category to category
manufacturer-codename: move from category to category
For example:
samsung-m0: move from testing to community
samsung-m0: move from testing to community
## Additions
-16
View File
@@ -1,16 +0,0 @@
site:
title: Device ports
start_page: pmaports::index.adoc
content:
sources:
- url: .
start_path: docs
branches: HEAD
- url: https://gitlab.postmarketos.org/postmarketOS/handbook
branches: HEAD
ui:
bundle:
url: ./handbook/ui-bundle
snapshot: true
+6
View File
@@ -8,6 +8,12 @@ branch_pmaports=master
branch_aports=master
mirrordir_alpine=edge
[v25.12]
description=Upcoming stable release (DO NOT USE)
branch_pmaports=v25.12
branch_aports=master
mirrordir_alpine=v3.23
[v25.06]
description=Latest release / Recommended for best stability
branch_pmaports=v25.06
-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=23
_arch="aarch64"
_mirror="http://dl-4.alpinelinux.org/alpine/"
url="http://busybox.net"
license="GPL-2.0-only"
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="
9fac4146a4b274e5611d4f14719dd26a3a2cc95f3558f59275b91792e74f1259aad4d1223ff471cb714b3fa05c12eb8861656fdfd70c07e4ae75fede63270f56 busybox-static-1.37.0-r23-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=23
_arch="armhf"
_mirror="http://dl-4.alpinelinux.org/alpine/"
url="http://busybox.net"
license="GPL-2.0-only"
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="
cb90cf2cc85d1f94238d7e7c260edfeef97dd053c69e28eb5d02a86026808d000e5b017d4349bcd72dde10f18cdfaee6a7fe9528cdc8a776c12423a5544d3f44 busybox-static-1.37.0-r23-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=23
_arch="armv7"
_mirror="http://dl-4.alpinelinux.org/alpine/"
url="http://busybox.net"
license="GPL-2.0-only"
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="
cedd976e793833b3fa27192800c0e281b701aee121a2b453f30d4ac26de57792e317a6749000440684a8708e1b7527b8e6839e8dfd7ab86298c67b903fb7d6ef busybox-static-1.37.0-r23-armv7-edge.apk
"
+2 -2
View File
@@ -5,7 +5,7 @@
pkgname=ccache-cross-symlinks
pkgver=3
pkgrel=2
pkgrel=3
pkgdesc="Enable ccache for cross-compilers with symlinks"
url="https://ccache.samba.org/"
arch="noarch"
@@ -15,7 +15,7 @@ options="!check"
package() {
# Keep in sync with pmb.config.build_device_architectures
local _archs="armhf armv7 aarch64 x86_64 x86 riscv64 ppc64le"
local _archs="armhf armv7 aarch64 x86_64 x86 riscv64 ppc64le loongarch64"
local _bins="c++ cc cpp g++ gcc clang clang++"
mkdir -p "$pkgdir/usr/lib/ccache/bin"
+4 -3
View File
@@ -20,7 +20,7 @@
# as simple shell wrappers.
pkgname=crossdirect
pkgver=5.3.0
pkgver=5.3.1
pkgrel=1
pkgdesc="Wrappers to launch native programs (e.g. cross compilers) in foreign chroots"
url="https://postmarketOS.org"
@@ -38,7 +38,7 @@ source="
build() {
cd "$srcdir"
# Architectures and binaries
_archs="x86_64 armhf armv7 aarch64 ppc64le riscv64"
_archs="x86_64 armhf armv7 aarch64 loongarch64 ppc64le riscv64"
for _arch in $_archs; do
[ "$_arch" == "$CARCH" ] && continue
_hostspec="$(arch_to_hostspec $_arch)"
@@ -59,6 +59,7 @@ package() {
aarch64
armhf
armv7
loongarch64
ppc64le
riscv64
x86_64
@@ -128,7 +129,7 @@ package() {
sha512sums="
0f4b48f250425dc57f63955fc8b38477d23db793bee367c3fbe03c3d2a559ba576434d07518310db4cae9d90d501af4051b80038b10fae94b980e537fc9374ad cargo.sh
b2e602b7fc95ed403d29f0d754879d5f773c39ee33e726bb10cff17b3c088406dac84f2ca6d8ad563c64370007d98af805d6ee9cd4a06fe3d4c61c0cb90c5c0c crossdirect.c
a87d91b6e3286ce29fb1f487954e7154f282194691a1bf19b4cd80cca07a9c36aa96306883b1a6671ffbc2b503575a8c9484dccde8c55431845056c6f377bec5 exec_native.sh
73e2b5d2d8ef7c6002b3a787d14945586991493b8d81f59e5c0beda0d3b290543e1fdc6f288da726c5dd121c0861d2a894410b7b749a537df0df5b409e102330 exec_native.sh
ea9bf8db3810d03d0a7395057f3d6e57f7127d87c55deaedc171c255288f5f3cc6fbcc680a5a1b92786cf573875d5dc22521173799fe2639acc97d0715ff905b rust-qemu-linker.sh
de2aa6929bbff5db9132673e667f4525b333d062cb1f7a0597dd924de9e5c7215a9f8e2e6263b6fb5ace06f2c4b64f4ebfd0ede9b78add07c2cd08ec8613e98f rustc.sh
"
+10 -2
View File
@@ -1,12 +1,20 @@
#!/bin/sh -e
# Execute the binary from the native chroot if it is installed there. This is
# done for archiver tools such as unxz, so they don't need to go through QEMU.
BASENAME="$(basename "$0")"
if [ -n "$LD_PRELOAD" ]; then
# The archiver tool gets called during package(), which abuild runs
# with libfakeroot.so. Some packages do this, like bootchart2, which
# compresses man pages in its "make install". We can't run the native
# binary here due to the LD_PRELOAD, so run the foreign arch one.
export PATH="/usr/bin:/usr/sbin:/sbin:/bin"
exec "$BASENAME" "$@"
fi
# Try /native first, then the foreign arch paths. Never try
# /native/usr/lib/crossdirect as this would result in a loop.
UNWRAPPED_PATH="/native/usr/bin:/native/usr/sbin:/native/sbin:/native/bin:/usr/bin:/usr/sbin:/sbin:/bin"
BASENAME="$(basename "$0")"
UNWRAPPED_BIN="$(PATH="$UNWRAPPED_PATH" command -v "$BASENAME")"
case "$UNWRAPPED_BIN" in
@@ -0,0 +1,130 @@
From 824eae920f0f64dd7687c969a2436b129161fdc9 Mon Sep 17 00:00:00 2001
From: Jinyang He <hejinyang@loongson.cn>
Date: Wed, 29 Oct 2025 16:07:35 +0800
Subject: [PATCH] LoongArch: Only allow valid binary op when optimize
conditional move
It is wrong that optimize from `if (cond) dest op= 1 << shift` to
`dest op= (cond ? 1 : 0) << shift` when `dest op 0 != dest`.
Like `and`, `mul` or `div`.
And in this optimization `mul` and `div` is optimized to shift.
gcc/ChangeLog:
* config/loongarch/loongarch.cc
(loongarch_expand_conditional_move): Only allow valid binary
op when optimize conditional move.
gcc/testsuite/ChangeLog:
* gcc.target/loongarch/conditional-move-opt-1.c: Remove mul.
* gcc.target/loongarch/conditional-move-opt-2.c: Remove and.
* gcc.target/loongarch/conditional-move-opt-3.c: New test.
Co-Authored-By: Peng Fan <fanpeng@loongson.cn>
---
gcc/config/loongarch/loongarch.cc | 26 ++++++++++++++++---
.../loongarch/conditional-move-opt-1.c | 4 +--
.../loongarch/conditional-move-opt-2.c | 2 +-
.../loongarch/conditional-move-opt-3.c | 14 ++++++++++
4 files changed, 40 insertions(+), 6 deletions(-)
create mode 100644 gcc/testsuite/gcc.target/loongarch/conditional-move-opt-3.c
diff --git a/gcc/config/loongarch/loongarch.cc b/gcc/config/loongarch/loongarch.cc
index bdf290654..740c8611a 100644
--- a/gcc/config/loongarch/loongarch.cc
+++ b/gcc/config/loongarch/loongarch.cc
@@ -5533,12 +5533,32 @@ loongarch_expand_conditional_move (rtx *operands)
}
}
+ auto is_binary_op_0_keep_orig = [](enum rtx_code code)
+ {
+ switch (code)
+ {
+ case PLUS:
+ case MINUS:
+ case IOR:
+ case XOR:
+ case ROTATE:
+ case ROTATERT:
+ case ASHIFT:
+ case ASHIFTRT:
+ case LSHIFTRT:
+ return true;
+ default:
+ return false;
+ }
+ };
+
/* Check if the optimization conditions are met. */
if (value_if_true_insn
&& value_if_false_insn
- /* Make sure that value_if_false and var are the same. */
- && BINARY_P (value_if_true_insn_src
- = SET_SRC (single_set (value_if_true_insn)))
+ /* Make sure that the orig value OP 0 keep orig. */
+ && (value_if_true_insn_src
+ = SET_SRC (single_set (value_if_true_insn)))
+ && is_binary_op_0_keep_orig ( GET_CODE (value_if_true_insn_src))
/* Make sure that both value_if_true and value_if_false
has the same var. */
&& rtx_equal_p (XEXP (value_if_true_insn_src, 0),
diff --git a/gcc/testsuite/gcc.target/loongarch/conditional-move-opt-1.c b/gcc/testsuite/gcc.target/loongarch/conditional-move-opt-1.c
index ed13471aa..47802aa96 100644
--- a/gcc/testsuite/gcc.target/loongarch/conditional-move-opt-1.c
+++ b/gcc/testsuite/gcc.target/loongarch/conditional-move-opt-1.c
@@ -27,7 +27,7 @@ void
test_lt ()
{
if (lm < ln)
- lr *= (1 << 16);
+ lr += (1 << 16);
lr += lm;
}
@@ -35,7 +35,7 @@ void
test_le ()
{
if (lm <= ln)
- lr = lm * ((long)1 << 32);
+ lr = lm + ((long)1 << 32);
else
lr = lm;
lr += lm;
diff --git a/gcc/testsuite/gcc.target/loongarch/conditional-move-opt-2.c b/gcc/testsuite/gcc.target/loongarch/conditional-move-opt-2.c
index ac72d4d93..743fd5e67 100644
--- a/gcc/testsuite/gcc.target/loongarch/conditional-move-opt-2.c
+++ b/gcc/testsuite/gcc.target/loongarch/conditional-move-opt-2.c
@@ -29,7 +29,7 @@ void
test_lez ()
{
if (lm <= 0)
- lr &= (1 << 16);
+ lr |= (1 << 16);
lr += lm;
}
diff --git a/gcc/testsuite/gcc.target/loongarch/conditional-move-opt-3.c b/gcc/testsuite/gcc.target/loongarch/conditional-move-opt-3.c
new file mode 100644
index 000000000..95887980c
--- /dev/null
+++ b/gcc/testsuite/gcc.target/loongarch/conditional-move-opt-3.c
@@ -0,0 +1,14 @@
+/* { dg-do compile } */
+/* { dg-options "-O2" } */
+/* { dg-final { scan-assembler "maskeqz" } } */
+/* { dg-final { scan-assembler "masknez" } } */
+
+extern long lm, ln, lr;
+
+void
+test_and ()
+{
+ if (lm < 0)
+ lr &= (1 << 16);
+ lr += lm;
+}
--
2.51.1
@@ -0,0 +1,77 @@
From 21b7d08714c4964403848db4144003835ff5245a Mon Sep 17 00:00:00 2001
From: Linsen Zhou <i@lin.moe>
Date: Fri, 17 Oct 2025 11:05:04 +0800
Subject: [PATCH] tree-object-size.cc: Fix assert constant offset in
check_for_plus_in_loops [PR122012]
After commit 51b85dfeb19652bf3e0aaec08828ba7cee1e641c, when the
pointer offset is a variable in the loop, the object size of the
pointer may also need to be reexamined.
Which make gcc_assert in the check_for_plus_in_loops failed.
gcc/ChangeLog:
PR tree-optimization/122012
* tree-object-size.cc (check_for_plus_in_loops): Skip check
for the variable offset
gcc/testsuite/ChangeLog:
PR tree-optimization/122012
* gcc.dg/torture/pr122012.c: New test.
Signed-off-by: Linsen Zhou <i@lin.moe>
(cherry picked from commit 82cefc4898d4ccabe76e28d6626b91ca9e998923)
---
gcc/testsuite/gcc.dg/torture/pr122012.c | 18 ++++++++++++++++++
gcc/tree-object-size.cc | 7 +++----
2 files changed, 21 insertions(+), 4 deletions(-)
create mode 100644 gcc/testsuite/gcc.dg/torture/pr122012.c
diff --git a/gcc/testsuite/gcc.dg/torture/pr122012.c b/gcc/testsuite/gcc.dg/torture/pr122012.c
new file mode 100644
index 00000000000..055915a1e98
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/pr122012.c
@@ -0,0 +1,18 @@
+/* { dg-do compile } */
+#include <stdlib.h>
+
+void foo();
+
+void test(size_t step) {
+ char *buf = malloc(64);
+ char *p = buf;
+ size_t i;
+
+ for(i = 0; i < 64; ++i) {
+ p += 4;
+ if (__builtin_object_size (p, 2) != 0)
+ foo();
+ p += step;
+ }
+ free(buf);
+}
diff --git a/gcc/tree-object-size.cc b/gcc/tree-object-size.cc
index 2d13ab79a84..76dc2446059 100644
--- a/gcc/tree-object-size.cc
+++ b/gcc/tree-object-size.cc
@@ -2153,12 +2153,11 @@ check_for_plus_in_loops (struct object_size_info *osi, tree var)
&& gimple_assign_rhs_code (stmt) == POINTER_PLUS_EXPR)
{
tree basevar = gimple_assign_rhs1 (stmt);
- tree cst = gimple_assign_rhs2 (stmt);
-
- gcc_assert (TREE_CODE (cst) == INTEGER_CST);
+ tree offset = gimple_assign_rhs2 (stmt);
/* Skip non-positive offsets. */
- if (integer_zerop (cst) || compare_tree_int (cst, offset_limit) > 0)
+ if (TREE_CODE (offset) != INTEGER_CST
+ || integer_zerop (offset) || compare_tree_int (offset, offset_limit) > 0)
return;
osi->depths[SSA_NAME_VERSION (basevar)] = 1;
--
2.51.0
+6 -1
View File
@@ -34,7 +34,7 @@ _pkgsnap="${pkgver##*_git}"
[ "$CHOST" != "$CTARGET" ] && _target="-$CTARGET_ARCH" || _target=""
pkgname=gcc-aarch64
pkgrel=0
pkgrel=2
pkgdesc="Stage2 cross-compiler for aarch64"
url="https://gcc.gnu.org"
arch="x86_64"
@@ -279,6 +279,9 @@ source="https://gcc.gnu.org/pub/gcc/releases/gcc-$_pkgbase/gcc-$_pkgbase.tar.xz
0039-except-Don-t-use-the-cached-value-of-the-gcc_except_.patch
0040-ada-libgnat-use-stub-symbolic-module-name-functions.patch
0041-ada-libgnat-recognize-linux-musleabi-and-linux-muslg.patch
0001-tree-object-size.cc-Fix-assert-constant-offset-in-ch.patch
0001-LoongArch-Only-allow-valid-binary-op-when-optimize-c.patch
"
# secfixes:
@@ -793,4 +796,6 @@ eecc77e2a9cf956fd752693ad7f8ff8253a7bb557e00564bb488bbc1deac895e63104cc1182a0bdd
9f4c3fa0d17cfcd72626bdbaf51992ff3018f878d673ab19b9056047ee2630b581e5a5a4d4857444f08ba9bcdb0fc94f90dcda6180816e39690d1652843f0d8a 0039-except-Don-t-use-the-cached-value-of-the-gcc_except_.patch
d166475e340c91bbb24cf257240aab37129b04f2609e5ce323b530ab83853a4c34c525e0072c15732717f1681db07e6b3b0a4d268720c31f460435ccf4c99b7f 0040-ada-libgnat-use-stub-symbolic-module-name-functions.patch
c717764ef52c0226a23cbf434654cdefa6cbf38ec625648575d9143c5513b16d8914c25015db743033b8a46ac5b2c33ab75e1b67076128d67bb1319e5a83dd85 0041-ada-libgnat-recognize-linux-musleabi-and-linux-muslg.patch
c3b64b05332bd4dd7fad3fff3cacd4f9de0512943f1548c6f1205fab1a74c83622024f30471805f57d625198cc32f647b32172914528fd5605d0bf61cb0c3ff1 0001-tree-object-size.cc-Fix-assert-constant-offset-in-ch.patch
e91873055550eba051d9297bec5c6acd27abb9ee6ce8911cdd04b5faf37d77b6b2a7607ec588d2863f13f14b48af9398cb4ac42443d8567bfa5037dc6bd50404 0001-LoongArch-Only-allow-valid-binary-op-when-optimize-c.patch
"
@@ -0,0 +1,130 @@
From 824eae920f0f64dd7687c969a2436b129161fdc9 Mon Sep 17 00:00:00 2001
From: Jinyang He <hejinyang@loongson.cn>
Date: Wed, 29 Oct 2025 16:07:35 +0800
Subject: [PATCH] LoongArch: Only allow valid binary op when optimize
conditional move
It is wrong that optimize from `if (cond) dest op= 1 << shift` to
`dest op= (cond ? 1 : 0) << shift` when `dest op 0 != dest`.
Like `and`, `mul` or `div`.
And in this optimization `mul` and `div` is optimized to shift.
gcc/ChangeLog:
* config/loongarch/loongarch.cc
(loongarch_expand_conditional_move): Only allow valid binary
op when optimize conditional move.
gcc/testsuite/ChangeLog:
* gcc.target/loongarch/conditional-move-opt-1.c: Remove mul.
* gcc.target/loongarch/conditional-move-opt-2.c: Remove and.
* gcc.target/loongarch/conditional-move-opt-3.c: New test.
Co-Authored-By: Peng Fan <fanpeng@loongson.cn>
---
gcc/config/loongarch/loongarch.cc | 26 ++++++++++++++++---
.../loongarch/conditional-move-opt-1.c | 4 +--
.../loongarch/conditional-move-opt-2.c | 2 +-
.../loongarch/conditional-move-opt-3.c | 14 ++++++++++
4 files changed, 40 insertions(+), 6 deletions(-)
create mode 100644 gcc/testsuite/gcc.target/loongarch/conditional-move-opt-3.c
diff --git a/gcc/config/loongarch/loongarch.cc b/gcc/config/loongarch/loongarch.cc
index bdf290654..740c8611a 100644
--- a/gcc/config/loongarch/loongarch.cc
+++ b/gcc/config/loongarch/loongarch.cc
@@ -5533,12 +5533,32 @@ loongarch_expand_conditional_move (rtx *operands)
}
}
+ auto is_binary_op_0_keep_orig = [](enum rtx_code code)
+ {
+ switch (code)
+ {
+ case PLUS:
+ case MINUS:
+ case IOR:
+ case XOR:
+ case ROTATE:
+ case ROTATERT:
+ case ASHIFT:
+ case ASHIFTRT:
+ case LSHIFTRT:
+ return true;
+ default:
+ return false;
+ }
+ };
+
/* Check if the optimization conditions are met. */
if (value_if_true_insn
&& value_if_false_insn
- /* Make sure that value_if_false and var are the same. */
- && BINARY_P (value_if_true_insn_src
- = SET_SRC (single_set (value_if_true_insn)))
+ /* Make sure that the orig value OP 0 keep orig. */
+ && (value_if_true_insn_src
+ = SET_SRC (single_set (value_if_true_insn)))
+ && is_binary_op_0_keep_orig ( GET_CODE (value_if_true_insn_src))
/* Make sure that both value_if_true and value_if_false
has the same var. */
&& rtx_equal_p (XEXP (value_if_true_insn_src, 0),
diff --git a/gcc/testsuite/gcc.target/loongarch/conditional-move-opt-1.c b/gcc/testsuite/gcc.target/loongarch/conditional-move-opt-1.c
index ed13471aa..47802aa96 100644
--- a/gcc/testsuite/gcc.target/loongarch/conditional-move-opt-1.c
+++ b/gcc/testsuite/gcc.target/loongarch/conditional-move-opt-1.c
@@ -27,7 +27,7 @@ void
test_lt ()
{
if (lm < ln)
- lr *= (1 << 16);
+ lr += (1 << 16);
lr += lm;
}
@@ -35,7 +35,7 @@ void
test_le ()
{
if (lm <= ln)
- lr = lm * ((long)1 << 32);
+ lr = lm + ((long)1 << 32);
else
lr = lm;
lr += lm;
diff --git a/gcc/testsuite/gcc.target/loongarch/conditional-move-opt-2.c b/gcc/testsuite/gcc.target/loongarch/conditional-move-opt-2.c
index ac72d4d93..743fd5e67 100644
--- a/gcc/testsuite/gcc.target/loongarch/conditional-move-opt-2.c
+++ b/gcc/testsuite/gcc.target/loongarch/conditional-move-opt-2.c
@@ -29,7 +29,7 @@ void
test_lez ()
{
if (lm <= 0)
- lr &= (1 << 16);
+ lr |= (1 << 16);
lr += lm;
}
diff --git a/gcc/testsuite/gcc.target/loongarch/conditional-move-opt-3.c b/gcc/testsuite/gcc.target/loongarch/conditional-move-opt-3.c
new file mode 100644
index 000000000..95887980c
--- /dev/null
+++ b/gcc/testsuite/gcc.target/loongarch/conditional-move-opt-3.c
@@ -0,0 +1,14 @@
+/* { dg-do compile } */
+/* { dg-options "-O2" } */
+/* { dg-final { scan-assembler "maskeqz" } } */
+/* { dg-final { scan-assembler "masknez" } } */
+
+extern long lm, ln, lr;
+
+void
+test_and ()
+{
+ if (lm < 0)
+ lr &= (1 << 16);
+ lr += lm;
+}
--
2.51.1
@@ -0,0 +1,77 @@
From 21b7d08714c4964403848db4144003835ff5245a Mon Sep 17 00:00:00 2001
From: Linsen Zhou <i@lin.moe>
Date: Fri, 17 Oct 2025 11:05:04 +0800
Subject: [PATCH] tree-object-size.cc: Fix assert constant offset in
check_for_plus_in_loops [PR122012]
After commit 51b85dfeb19652bf3e0aaec08828ba7cee1e641c, when the
pointer offset is a variable in the loop, the object size of the
pointer may also need to be reexamined.
Which make gcc_assert in the check_for_plus_in_loops failed.
gcc/ChangeLog:
PR tree-optimization/122012
* tree-object-size.cc (check_for_plus_in_loops): Skip check
for the variable offset
gcc/testsuite/ChangeLog:
PR tree-optimization/122012
* gcc.dg/torture/pr122012.c: New test.
Signed-off-by: Linsen Zhou <i@lin.moe>
(cherry picked from commit 82cefc4898d4ccabe76e28d6626b91ca9e998923)
---
gcc/testsuite/gcc.dg/torture/pr122012.c | 18 ++++++++++++++++++
gcc/tree-object-size.cc | 7 +++----
2 files changed, 21 insertions(+), 4 deletions(-)
create mode 100644 gcc/testsuite/gcc.dg/torture/pr122012.c
diff --git a/gcc/testsuite/gcc.dg/torture/pr122012.c b/gcc/testsuite/gcc.dg/torture/pr122012.c
new file mode 100644
index 00000000000..055915a1e98
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/pr122012.c
@@ -0,0 +1,18 @@
+/* { dg-do compile } */
+#include <stdlib.h>
+
+void foo();
+
+void test(size_t step) {
+ char *buf = malloc(64);
+ char *p = buf;
+ size_t i;
+
+ for(i = 0; i < 64; ++i) {
+ p += 4;
+ if (__builtin_object_size (p, 2) != 0)
+ foo();
+ p += step;
+ }
+ free(buf);
+}
diff --git a/gcc/tree-object-size.cc b/gcc/tree-object-size.cc
index 2d13ab79a84..76dc2446059 100644
--- a/gcc/tree-object-size.cc
+++ b/gcc/tree-object-size.cc
@@ -2153,12 +2153,11 @@ check_for_plus_in_loops (struct object_size_info *osi, tree var)
&& gimple_assign_rhs_code (stmt) == POINTER_PLUS_EXPR)
{
tree basevar = gimple_assign_rhs1 (stmt);
- tree cst = gimple_assign_rhs2 (stmt);
-
- gcc_assert (TREE_CODE (cst) == INTEGER_CST);
+ tree offset = gimple_assign_rhs2 (stmt);
/* Skip non-positive offsets. */
- if (integer_zerop (cst) || compare_tree_int (cst, offset_limit) > 0)
+ if (TREE_CODE (offset) != INTEGER_CST
+ || integer_zerop (offset) || compare_tree_int (offset, offset_limit) > 0)
return;
osi->depths[SSA_NAME_VERSION (basevar)] = 1;
--
2.51.0
+6 -1
View File
@@ -34,7 +34,7 @@ _pkgsnap="${pkgver##*_git}"
[ "$CHOST" != "$CTARGET" ] && _target="-$CTARGET_ARCH" || _target=""
pkgname=gcc-armhf
pkgrel=0
pkgrel=2
pkgdesc="Stage2 cross-compiler for armhf"
url="https://gcc.gnu.org"
arch="x86_64"
@@ -279,6 +279,9 @@ source="https://gcc.gnu.org/pub/gcc/releases/gcc-$_pkgbase/gcc-$_pkgbase.tar.xz
0039-except-Don-t-use-the-cached-value-of-the-gcc_except_.patch
0040-ada-libgnat-use-stub-symbolic-module-name-functions.patch
0041-ada-libgnat-recognize-linux-musleabi-and-linux-muslg.patch
0001-tree-object-size.cc-Fix-assert-constant-offset-in-ch.patch
0001-LoongArch-Only-allow-valid-binary-op-when-optimize-c.patch
"
# secfixes:
@@ -793,4 +796,6 @@ eecc77e2a9cf956fd752693ad7f8ff8253a7bb557e00564bb488bbc1deac895e63104cc1182a0bdd
9f4c3fa0d17cfcd72626bdbaf51992ff3018f878d673ab19b9056047ee2630b581e5a5a4d4857444f08ba9bcdb0fc94f90dcda6180816e39690d1652843f0d8a 0039-except-Don-t-use-the-cached-value-of-the-gcc_except_.patch
d166475e340c91bbb24cf257240aab37129b04f2609e5ce323b530ab83853a4c34c525e0072c15732717f1681db07e6b3b0a4d268720c31f460435ccf4c99b7f 0040-ada-libgnat-use-stub-symbolic-module-name-functions.patch
c717764ef52c0226a23cbf434654cdefa6cbf38ec625648575d9143c5513b16d8914c25015db743033b8a46ac5b2c33ab75e1b67076128d67bb1319e5a83dd85 0041-ada-libgnat-recognize-linux-musleabi-and-linux-muslg.patch
c3b64b05332bd4dd7fad3fff3cacd4f9de0512943f1548c6f1205fab1a74c83622024f30471805f57d625198cc32f647b32172914528fd5605d0bf61cb0c3ff1 0001-tree-object-size.cc-Fix-assert-constant-offset-in-ch.patch
e91873055550eba051d9297bec5c6acd27abb9ee6ce8911cdd04b5faf37d77b6b2a7607ec588d2863f13f14b48af9398cb4ac42443d8567bfa5037dc6bd50404 0001-LoongArch-Only-allow-valid-binary-op-when-optimize-c.patch
"
@@ -0,0 +1,130 @@
From 824eae920f0f64dd7687c969a2436b129161fdc9 Mon Sep 17 00:00:00 2001
From: Jinyang He <hejinyang@loongson.cn>
Date: Wed, 29 Oct 2025 16:07:35 +0800
Subject: [PATCH] LoongArch: Only allow valid binary op when optimize
conditional move
It is wrong that optimize from `if (cond) dest op= 1 << shift` to
`dest op= (cond ? 1 : 0) << shift` when `dest op 0 != dest`.
Like `and`, `mul` or `div`.
And in this optimization `mul` and `div` is optimized to shift.
gcc/ChangeLog:
* config/loongarch/loongarch.cc
(loongarch_expand_conditional_move): Only allow valid binary
op when optimize conditional move.
gcc/testsuite/ChangeLog:
* gcc.target/loongarch/conditional-move-opt-1.c: Remove mul.
* gcc.target/loongarch/conditional-move-opt-2.c: Remove and.
* gcc.target/loongarch/conditional-move-opt-3.c: New test.
Co-Authored-By: Peng Fan <fanpeng@loongson.cn>
---
gcc/config/loongarch/loongarch.cc | 26 ++++++++++++++++---
.../loongarch/conditional-move-opt-1.c | 4 +--
.../loongarch/conditional-move-opt-2.c | 2 +-
.../loongarch/conditional-move-opt-3.c | 14 ++++++++++
4 files changed, 40 insertions(+), 6 deletions(-)
create mode 100644 gcc/testsuite/gcc.target/loongarch/conditional-move-opt-3.c
diff --git a/gcc/config/loongarch/loongarch.cc b/gcc/config/loongarch/loongarch.cc
index bdf290654..740c8611a 100644
--- a/gcc/config/loongarch/loongarch.cc
+++ b/gcc/config/loongarch/loongarch.cc
@@ -5533,12 +5533,32 @@ loongarch_expand_conditional_move (rtx *operands)
}
}
+ auto is_binary_op_0_keep_orig = [](enum rtx_code code)
+ {
+ switch (code)
+ {
+ case PLUS:
+ case MINUS:
+ case IOR:
+ case XOR:
+ case ROTATE:
+ case ROTATERT:
+ case ASHIFT:
+ case ASHIFTRT:
+ case LSHIFTRT:
+ return true;
+ default:
+ return false;
+ }
+ };
+
/* Check if the optimization conditions are met. */
if (value_if_true_insn
&& value_if_false_insn
- /* Make sure that value_if_false and var are the same. */
- && BINARY_P (value_if_true_insn_src
- = SET_SRC (single_set (value_if_true_insn)))
+ /* Make sure that the orig value OP 0 keep orig. */
+ && (value_if_true_insn_src
+ = SET_SRC (single_set (value_if_true_insn)))
+ && is_binary_op_0_keep_orig ( GET_CODE (value_if_true_insn_src))
/* Make sure that both value_if_true and value_if_false
has the same var. */
&& rtx_equal_p (XEXP (value_if_true_insn_src, 0),
diff --git a/gcc/testsuite/gcc.target/loongarch/conditional-move-opt-1.c b/gcc/testsuite/gcc.target/loongarch/conditional-move-opt-1.c
index ed13471aa..47802aa96 100644
--- a/gcc/testsuite/gcc.target/loongarch/conditional-move-opt-1.c
+++ b/gcc/testsuite/gcc.target/loongarch/conditional-move-opt-1.c
@@ -27,7 +27,7 @@ void
test_lt ()
{
if (lm < ln)
- lr *= (1 << 16);
+ lr += (1 << 16);
lr += lm;
}
@@ -35,7 +35,7 @@ void
test_le ()
{
if (lm <= ln)
- lr = lm * ((long)1 << 32);
+ lr = lm + ((long)1 << 32);
else
lr = lm;
lr += lm;
diff --git a/gcc/testsuite/gcc.target/loongarch/conditional-move-opt-2.c b/gcc/testsuite/gcc.target/loongarch/conditional-move-opt-2.c
index ac72d4d93..743fd5e67 100644
--- a/gcc/testsuite/gcc.target/loongarch/conditional-move-opt-2.c
+++ b/gcc/testsuite/gcc.target/loongarch/conditional-move-opt-2.c
@@ -29,7 +29,7 @@ void
test_lez ()
{
if (lm <= 0)
- lr &= (1 << 16);
+ lr |= (1 << 16);
lr += lm;
}
diff --git a/gcc/testsuite/gcc.target/loongarch/conditional-move-opt-3.c b/gcc/testsuite/gcc.target/loongarch/conditional-move-opt-3.c
new file mode 100644
index 000000000..95887980c
--- /dev/null
+++ b/gcc/testsuite/gcc.target/loongarch/conditional-move-opt-3.c
@@ -0,0 +1,14 @@
+/* { dg-do compile } */
+/* { dg-options "-O2" } */
+/* { dg-final { scan-assembler "maskeqz" } } */
+/* { dg-final { scan-assembler "masknez" } } */
+
+extern long lm, ln, lr;
+
+void
+test_and ()
+{
+ if (lm < 0)
+ lr &= (1 << 16);
+ lr += lm;
+}
--
2.51.1
@@ -0,0 +1,77 @@
From 21b7d08714c4964403848db4144003835ff5245a Mon Sep 17 00:00:00 2001
From: Linsen Zhou <i@lin.moe>
Date: Fri, 17 Oct 2025 11:05:04 +0800
Subject: [PATCH] tree-object-size.cc: Fix assert constant offset in
check_for_plus_in_loops [PR122012]
After commit 51b85dfeb19652bf3e0aaec08828ba7cee1e641c, when the
pointer offset is a variable in the loop, the object size of the
pointer may also need to be reexamined.
Which make gcc_assert in the check_for_plus_in_loops failed.
gcc/ChangeLog:
PR tree-optimization/122012
* tree-object-size.cc (check_for_plus_in_loops): Skip check
for the variable offset
gcc/testsuite/ChangeLog:
PR tree-optimization/122012
* gcc.dg/torture/pr122012.c: New test.
Signed-off-by: Linsen Zhou <i@lin.moe>
(cherry picked from commit 82cefc4898d4ccabe76e28d6626b91ca9e998923)
---
gcc/testsuite/gcc.dg/torture/pr122012.c | 18 ++++++++++++++++++
gcc/tree-object-size.cc | 7 +++----
2 files changed, 21 insertions(+), 4 deletions(-)
create mode 100644 gcc/testsuite/gcc.dg/torture/pr122012.c
diff --git a/gcc/testsuite/gcc.dg/torture/pr122012.c b/gcc/testsuite/gcc.dg/torture/pr122012.c
new file mode 100644
index 00000000000..055915a1e98
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/pr122012.c
@@ -0,0 +1,18 @@
+/* { dg-do compile } */
+#include <stdlib.h>
+
+void foo();
+
+void test(size_t step) {
+ char *buf = malloc(64);
+ char *p = buf;
+ size_t i;
+
+ for(i = 0; i < 64; ++i) {
+ p += 4;
+ if (__builtin_object_size (p, 2) != 0)
+ foo();
+ p += step;
+ }
+ free(buf);
+}
diff --git a/gcc/tree-object-size.cc b/gcc/tree-object-size.cc
index 2d13ab79a84..76dc2446059 100644
--- a/gcc/tree-object-size.cc
+++ b/gcc/tree-object-size.cc
@@ -2153,12 +2153,11 @@ check_for_plus_in_loops (struct object_size_info *osi, tree var)
&& gimple_assign_rhs_code (stmt) == POINTER_PLUS_EXPR)
{
tree basevar = gimple_assign_rhs1 (stmt);
- tree cst = gimple_assign_rhs2 (stmt);
-
- gcc_assert (TREE_CODE (cst) == INTEGER_CST);
+ tree offset = gimple_assign_rhs2 (stmt);
/* Skip non-positive offsets. */
- if (integer_zerop (cst) || compare_tree_int (cst, offset_limit) > 0)
+ if (TREE_CODE (offset) != INTEGER_CST
+ || integer_zerop (offset) || compare_tree_int (offset, offset_limit) > 0)
return;
osi->depths[SSA_NAME_VERSION (basevar)] = 1;
--
2.51.0
+6 -1
View File
@@ -34,7 +34,7 @@ _pkgsnap="${pkgver##*_git}"
[ "$CHOST" != "$CTARGET" ] && _target="-$CTARGET_ARCH" || _target=""
pkgname=gcc-armv7
pkgrel=0
pkgrel=2
pkgdesc="Stage2 cross-compiler for armv7"
url="https://gcc.gnu.org"
arch="x86_64"
@@ -279,6 +279,9 @@ source="https://gcc.gnu.org/pub/gcc/releases/gcc-$_pkgbase/gcc-$_pkgbase.tar.xz
0039-except-Don-t-use-the-cached-value-of-the-gcc_except_.patch
0040-ada-libgnat-use-stub-symbolic-module-name-functions.patch
0041-ada-libgnat-recognize-linux-musleabi-and-linux-muslg.patch
0001-tree-object-size.cc-Fix-assert-constant-offset-in-ch.patch
0001-LoongArch-Only-allow-valid-binary-op-when-optimize-c.patch
"
# secfixes:
@@ -793,4 +796,6 @@ eecc77e2a9cf956fd752693ad7f8ff8253a7bb557e00564bb488bbc1deac895e63104cc1182a0bdd
9f4c3fa0d17cfcd72626bdbaf51992ff3018f878d673ab19b9056047ee2630b581e5a5a4d4857444f08ba9bcdb0fc94f90dcda6180816e39690d1652843f0d8a 0039-except-Don-t-use-the-cached-value-of-the-gcc_except_.patch
d166475e340c91bbb24cf257240aab37129b04f2609e5ce323b530ab83853a4c34c525e0072c15732717f1681db07e6b3b0a4d268720c31f460435ccf4c99b7f 0040-ada-libgnat-use-stub-symbolic-module-name-functions.patch
c717764ef52c0226a23cbf434654cdefa6cbf38ec625648575d9143c5513b16d8914c25015db743033b8a46ac5b2c33ab75e1b67076128d67bb1319e5a83dd85 0041-ada-libgnat-recognize-linux-musleabi-and-linux-muslg.patch
c3b64b05332bd4dd7fad3fff3cacd4f9de0512943f1548c6f1205fab1a74c83622024f30471805f57d625198cc32f647b32172914528fd5605d0bf61cb0c3ff1 0001-tree-object-size.cc-Fix-assert-constant-offset-in-ch.patch
e91873055550eba051d9297bec5c6acd27abb9ee6ce8911cdd04b5faf37d77b6b2a7607ec588d2863f13f14b48af9398cb4ac42443d8567bfa5037dc6bd50404 0001-LoongArch-Only-allow-valid-binary-op-when-optimize-c.patch
"
@@ -0,0 +1,130 @@
From 824eae920f0f64dd7687c969a2436b129161fdc9 Mon Sep 17 00:00:00 2001
From: Jinyang He <hejinyang@loongson.cn>
Date: Wed, 29 Oct 2025 16:07:35 +0800
Subject: [PATCH] LoongArch: Only allow valid binary op when optimize
conditional move
It is wrong that optimize from `if (cond) dest op= 1 << shift` to
`dest op= (cond ? 1 : 0) << shift` when `dest op 0 != dest`.
Like `and`, `mul` or `div`.
And in this optimization `mul` and `div` is optimized to shift.
gcc/ChangeLog:
* config/loongarch/loongarch.cc
(loongarch_expand_conditional_move): Only allow valid binary
op when optimize conditional move.
gcc/testsuite/ChangeLog:
* gcc.target/loongarch/conditional-move-opt-1.c: Remove mul.
* gcc.target/loongarch/conditional-move-opt-2.c: Remove and.
* gcc.target/loongarch/conditional-move-opt-3.c: New test.
Co-Authored-By: Peng Fan <fanpeng@loongson.cn>
---
gcc/config/loongarch/loongarch.cc | 26 ++++++++++++++++---
.../loongarch/conditional-move-opt-1.c | 4 +--
.../loongarch/conditional-move-opt-2.c | 2 +-
.../loongarch/conditional-move-opt-3.c | 14 ++++++++++
4 files changed, 40 insertions(+), 6 deletions(-)
create mode 100644 gcc/testsuite/gcc.target/loongarch/conditional-move-opt-3.c
diff --git a/gcc/config/loongarch/loongarch.cc b/gcc/config/loongarch/loongarch.cc
index bdf290654..740c8611a 100644
--- a/gcc/config/loongarch/loongarch.cc
+++ b/gcc/config/loongarch/loongarch.cc
@@ -5533,12 +5533,32 @@ loongarch_expand_conditional_move (rtx *operands)
}
}
+ auto is_binary_op_0_keep_orig = [](enum rtx_code code)
+ {
+ switch (code)
+ {
+ case PLUS:
+ case MINUS:
+ case IOR:
+ case XOR:
+ case ROTATE:
+ case ROTATERT:
+ case ASHIFT:
+ case ASHIFTRT:
+ case LSHIFTRT:
+ return true;
+ default:
+ return false;
+ }
+ };
+
/* Check if the optimization conditions are met. */
if (value_if_true_insn
&& value_if_false_insn
- /* Make sure that value_if_false and var are the same. */
- && BINARY_P (value_if_true_insn_src
- = SET_SRC (single_set (value_if_true_insn)))
+ /* Make sure that the orig value OP 0 keep orig. */
+ && (value_if_true_insn_src
+ = SET_SRC (single_set (value_if_true_insn)))
+ && is_binary_op_0_keep_orig ( GET_CODE (value_if_true_insn_src))
/* Make sure that both value_if_true and value_if_false
has the same var. */
&& rtx_equal_p (XEXP (value_if_true_insn_src, 0),
diff --git a/gcc/testsuite/gcc.target/loongarch/conditional-move-opt-1.c b/gcc/testsuite/gcc.target/loongarch/conditional-move-opt-1.c
index ed13471aa..47802aa96 100644
--- a/gcc/testsuite/gcc.target/loongarch/conditional-move-opt-1.c
+++ b/gcc/testsuite/gcc.target/loongarch/conditional-move-opt-1.c
@@ -27,7 +27,7 @@ void
test_lt ()
{
if (lm < ln)
- lr *= (1 << 16);
+ lr += (1 << 16);
lr += lm;
}
@@ -35,7 +35,7 @@ void
test_le ()
{
if (lm <= ln)
- lr = lm * ((long)1 << 32);
+ lr = lm + ((long)1 << 32);
else
lr = lm;
lr += lm;
diff --git a/gcc/testsuite/gcc.target/loongarch/conditional-move-opt-2.c b/gcc/testsuite/gcc.target/loongarch/conditional-move-opt-2.c
index ac72d4d93..743fd5e67 100644
--- a/gcc/testsuite/gcc.target/loongarch/conditional-move-opt-2.c
+++ b/gcc/testsuite/gcc.target/loongarch/conditional-move-opt-2.c
@@ -29,7 +29,7 @@ void
test_lez ()
{
if (lm <= 0)
- lr &= (1 << 16);
+ lr |= (1 << 16);
lr += lm;
}
diff --git a/gcc/testsuite/gcc.target/loongarch/conditional-move-opt-3.c b/gcc/testsuite/gcc.target/loongarch/conditional-move-opt-3.c
new file mode 100644
index 000000000..95887980c
--- /dev/null
+++ b/gcc/testsuite/gcc.target/loongarch/conditional-move-opt-3.c
@@ -0,0 +1,14 @@
+/* { dg-do compile } */
+/* { dg-options "-O2" } */
+/* { dg-final { scan-assembler "maskeqz" } } */
+/* { dg-final { scan-assembler "masknez" } } */
+
+extern long lm, ln, lr;
+
+void
+test_and ()
+{
+ if (lm < 0)
+ lr &= (1 << 16);
+ lr += lm;
+}
--
2.51.1
@@ -0,0 +1,42 @@
From 94cf7d2b3514ed3a4401861a519ead450e022afc Mon Sep 17 00:00:00 2001
From: Szabolcs Nagy <nsz@port70.net>
Date: Fri, 26 Jan 2018 20:32:50 +0000
Subject: [PATCH] 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 d1d79a32fc9..069c3bb8324 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.50.1
@@ -0,0 +1,77 @@
From 21b7d08714c4964403848db4144003835ff5245a Mon Sep 17 00:00:00 2001
From: Linsen Zhou <i@lin.moe>
Date: Fri, 17 Oct 2025 11:05:04 +0800
Subject: [PATCH] tree-object-size.cc: Fix assert constant offset in
check_for_plus_in_loops [PR122012]
After commit 51b85dfeb19652bf3e0aaec08828ba7cee1e641c, when the
pointer offset is a variable in the loop, the object size of the
pointer may also need to be reexamined.
Which make gcc_assert in the check_for_plus_in_loops failed.
gcc/ChangeLog:
PR tree-optimization/122012
* tree-object-size.cc (check_for_plus_in_loops): Skip check
for the variable offset
gcc/testsuite/ChangeLog:
PR tree-optimization/122012
* gcc.dg/torture/pr122012.c: New test.
Signed-off-by: Linsen Zhou <i@lin.moe>
(cherry picked from commit 82cefc4898d4ccabe76e28d6626b91ca9e998923)
---
gcc/testsuite/gcc.dg/torture/pr122012.c | 18 ++++++++++++++++++
gcc/tree-object-size.cc | 7 +++----
2 files changed, 21 insertions(+), 4 deletions(-)
create mode 100644 gcc/testsuite/gcc.dg/torture/pr122012.c
diff --git a/gcc/testsuite/gcc.dg/torture/pr122012.c b/gcc/testsuite/gcc.dg/torture/pr122012.c
new file mode 100644
index 00000000000..055915a1e98
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/pr122012.c
@@ -0,0 +1,18 @@
+/* { dg-do compile } */
+#include <stdlib.h>
+
+void foo();
+
+void test(size_t step) {
+ char *buf = malloc(64);
+ char *p = buf;
+ size_t i;
+
+ for(i = 0; i < 64; ++i) {
+ p += 4;
+ if (__builtin_object_size (p, 2) != 0)
+ foo();
+ p += step;
+ }
+ free(buf);
+}
diff --git a/gcc/tree-object-size.cc b/gcc/tree-object-size.cc
index 2d13ab79a84..76dc2446059 100644
--- a/gcc/tree-object-size.cc
+++ b/gcc/tree-object-size.cc
@@ -2153,12 +2153,11 @@ check_for_plus_in_loops (struct object_size_info *osi, tree var)
&& gimple_assign_rhs_code (stmt) == POINTER_PLUS_EXPR)
{
tree basevar = gimple_assign_rhs1 (stmt);
- tree cst = gimple_assign_rhs2 (stmt);
-
- gcc_assert (TREE_CODE (cst) == INTEGER_CST);
+ tree offset = gimple_assign_rhs2 (stmt);
/* Skip non-positive offsets. */
- if (integer_zerop (cst) || compare_tree_int (cst, offset_limit) > 0)
+ if (TREE_CODE (offset) != INTEGER_CST
+ || integer_zerop (offset) || compare_tree_int (offset, offset_limit) > 0)
return;
osi->depths[SSA_NAME_VERSION (basevar)] = 1;
--
2.51.0
@@ -0,0 +1,258 @@
From 0d5e04099a3d2609105719f7396a4ff941b873b6 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Thu, 23 Jan 2025 17:12:51 -0800
Subject: [PATCH] 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".
Upstream-Status: Inappropriate [OE configuration]
Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Signed-off-by: sunil dora <sunilkumar.dora@windriver.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
gcc/common.opt | 4 ++++
gcc/config.in | 10 ++++++++++
gcc/configure | 19 +++++++++++++++++++
gcc/configure.ac | 16 ++++++++++++++++
gcc/doc/invoke.texi | 9 +++++++++
gcc/gcc.cc | 12 ++++++++++--
gcc/incpath.cc | 25 +++++++++++++++++++++++++
7 files changed, 93 insertions(+), 2 deletions(-)
diff --git a/gcc/common.opt b/gcc/common.opt
index e3fa0dacec4..bea1adc0940 100644
--- a/gcc/common.opt
+++ b/gcc/common.opt
@@ -729,6 +729,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 a79c51adb2b..8a531ed591c 100644
--- a/gcc/config.in
+++ b/gcc/config.in
@@ -249,6 +249,16 @@
#endif
+/* Define to warn for use of native system header directories */
+#ifndef USED_FOR_TARGET
+#undef ENABLE_POISON_SYSTEM_DIRECTORIES
+#endif
+/* Define to warn for use of native system header directories */
+#ifndef USED_FOR_TARGET
+#undef POISON_BY_DEFAULT
+#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 16965953f05..0f4a5d52c30 100755
--- a/gcc/configure
+++ b/gcc/configure
@@ -1051,6 +1051,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_host_pie
@@ -1828,6 +1829,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
--enable-host-pie build host code as PIE
@@ -34027,6 +34030,22 @@ 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}" != "xno"; then
+
+$as_echo "#define ENABLE_POISON_SYSTEM_DIRECTORIES 1" >>confdefs.h
+if test "$enable_poison_system_directories" = "error"; then
+$as_echo "#define POISON_BY_DEFAULT 1" >>confdefs.h
+fi
+
+fi
+
# Substitute configuration variables
diff --git a/gcc/configure.ac b/gcc/configure.ac
index 9f67e62950a..b0e3615e5aa 100644
--- a/gcc/configure.ac
+++ b/gcc/configure.ac
@@ -7502,6 +7502,22 @@ 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 (no/yes/error)]),,
+ [enable_poison_system_directories=no])
+AC_MSG_NOTICE([poisoned directories $enable_poison_system_directories])
+if test "x${enable_poison_system_directories}" != "xno"; then
+ AC_MSG_NOTICE([poisoned directories enabled])
+ AC_DEFINE([ENABLE_POISON_SYSTEM_DIRECTORIES],
+ [1],
+ [Define to warn for use of native system header directories])
+ if test $enable_poison_system_directories = "error"; then
+ AC_MSG_NOTICE([poisoned directories are fatal])
+ AC_DEFINE([POISON_BY_DEFAULT], [1], [Define to make poison warnings errors])
+ fi
+fi
+
# Substitute configuration variables
AC_SUBST(subdirs)
AC_SUBST(srcdir)
diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
index 72009c33cd0..29aea724731 100644
--- a/gcc/doc/invoke.texi
+++ b/gcc/doc/invoke.texi
@@ -405,6 +405,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-pragma-once-outside-header -Wno-prio-ctor-dtor
-Wno-psabi
-Wredundant-decls -Wrestrict
@@ -10727,6 +10728,14 @@ an error. @option{Wint-to-pointer-cast} is enabled by default.
Suppress warnings from casts from a pointer to an integer type of a
different size.
+@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 Winvalid-pch
@opindex Wno-invalid-pch
@item -Winvalid-pch
diff --git a/gcc/gcc.cc b/gcc/gcc.cc
index 4fd87f2c4a1..79d4920a047 100644
--- a/gcc/gcc.cc
+++ b/gcc/gcc.cc
@@ -909,6 +909,12 @@ proper position among the other output files. */
#define ASM_MAP ""
#endif
+#ifdef POISON_BY_DEFAULT
+#define POISON_IS_ERROR " -Werror=poison-system-directories"
+#else
+#define POISON_IS_ERROR
+#endif
+
/* Assembler options for compressed debug sections. */
#if HAVE_LD_COMPRESS_DEBUG == 0
/* Reject if the linker cannot write compressed debug sections. */
@@ -1166,6 +1172,8 @@ proper position among the other output files. */
"%{fuse-ld=*:-fuse-ld=%*} " LINK_COMPRESS_DEBUG_SPEC \
"%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):\
@@ -1268,7 +1276,7 @@ static const char *cpp_options =
"%(cpp_unique_options) %1 %{m*} %{std*&ansi&trigraphs} %{W*&pedantic*} %{w}\
%{f*} %{g*:%{%:debug-level-gt(0):%{g*}\
%{!fno-working-directory:-fworking-directory}}} %{O*}\
- %{undef} %{save-temps*:-fpch-preprocess}";
+ %{undef} %{save-temps*:-fpch-preprocess}" POISON_IS_ERROR;
/* Pass -d* flags, possibly modifying -dumpdir, -dumpbase et al.
@@ -1297,7 +1305,7 @@ static const char *cc1_options =
%{coverage:-fprofile-arcs -ftest-coverage}\
%{fprofile-arcs|fcondition-coverage|fpath-coverage|fprofile-generate*|coverage:\
%{!fprofile-update=single:\
- %{pthread:-fprofile-update=prefer-atomic}}}";
+ %{pthread:-fprofile-update=prefer-atomic}}}" POISON_IS_ERROR;
static const char *asm_options =
"%{-target-help:%:print-asm-header()} "
diff --git a/gcc/incpath.cc b/gcc/incpath.cc
index c1bbfd3872a..2cdbebc4c50 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. */
@@ -273,6 +274,10 @@ remove_duplicates (cpp_reader *pfile, struct cpp_dir *head,
cur->name, xstrerror (errno));
reason = REASON_NOENT;
}
+#ifdef ENABLE_POISON_SYSTEM_DIRECTORIES
+ pcur = &cur->next;
+ continue;
+#endif
}
else if (!S_ISDIR (st.st_mode))
cpp_error_with_line (pfile, CPP_DL_WARNING, 0, 0,
@@ -411,6 +416,26 @@ merge_include_chains (const char *sysroot, cpp_reader *pfile, int verbose)
fprintf (stderr, _("End of #embed 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.50.1
@@ -0,0 +1,44 @@
From 90e8697dd88fd99ce2cf8739e95494853005377e Mon Sep 17 00:00:00 2001
From: Ariadne Conill <ariadne@dereferenced.org>
Date: Fri, 21 Aug 2020 06:45:49 +0000
Subject: [PATCH] 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 29aea724731..6fb3ab70cc7 100644
--- a/gcc/doc/invoke.texi
+++ b/gcc/doc/invoke.texi
@@ -19477,6 +19477,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 79d4920a047..74a356fdf5e 100644
--- a/gcc/gcc.cc
+++ b/gcc/gcc.cc
@@ -1170,6 +1170,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.50.1
@@ -0,0 +1,46 @@
From 17c9cf9272077bc7ac784daffd4c68ba1ce67a0d Mon Sep 17 00:00:00 2001
From: Ariadne Conill <ariadne@dereferenced.org>
Date: Fri, 21 Aug 2020 06:46:22 +0000
Subject: [PATCH] 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 4589ee4a3a6..9edf095384c 100644
--- a/gcc/c-family/c-cppbuiltin.cc
+++ b/gcc/c-family/c-cppbuiltin.cc
@@ -1581,6 +1581,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 6fb3ab70cc7..799ce073dbf 100644
--- a/gcc/doc/invoke.texi
+++ b/gcc/doc/invoke.texi
@@ -12840,6 +12840,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.50.1
@@ -0,0 +1,286 @@
From 95d8fac6247b2cba1142261cc95c21063539112a Mon Sep 17 00:00:00 2001
From: Ariadne Conill <ariadne@dereferenced.org>
Date: Fri, 21 Aug 2020 06:46:56 +0000
Subject: [PATCH] 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/loongarch/gnu-user.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 ++++++++++++++++++++--------
15 files changed, 37 insertions(+), 20 deletions(-)
diff --git a/gcc/config/aarch64/aarch64-linux.h b/gcc/config/aarch64/aarch64-linux.h
index 116bb4e69f3..daf99f8dce9 100644
--- a/gcc/config/aarch64/aarch64-linux.h
+++ b/gcc/config/aarch64/aarch64-linux.h
@@ -39,6 +39,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 3fd3b831166..0b4c2dccebe 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 d4d389e2aa8..adccc0b11c2 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 4c4e31efa39..3c17ac6eade 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 7abfda53049..ceb8f855b7d 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 abe714711bf..3ca128a79f5 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 a2494c214c4..e1a5d530cdf 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/loongarch/gnu-user.h b/gcc/config/loongarch/gnu-user.h
index fbc75a90ad5..adbc4b7733f 100644
--- a/gcc/config/loongarch/gnu-user.h
+++ b/gcc/config/loongarch/gnu-user.h
@@ -44,7 +44,7 @@ along with GCC; see the file COPYING3. If not see
#undef GNU_USER_TARGET_LINK_SPEC
#define GNU_USER_TARGET_LINK_SPEC \
- "%{G*} %{shared} -m " GNU_USER_LINK_EMULATION \
+ "%{G*} %{shared} --as-needed -m " GNU_USER_LINK_EMULATION \
"%{!shared: %{static} " \
"%{!static: %{!static-pie: %{rdynamic:-export-dynamic} " \
"-dynamic-linker " GNU_USER_DYNAMIC_LINKER "}} " \
diff --git a/gcc/config/mips/gnu-user.h b/gcc/config/mips/gnu-user.h
index 5a82508c113..6eee7cdc603 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 9060c940a44..282c77b6a7b 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} \
-X \
diff --git a/gcc/config/rs6000/linux64.h b/gcc/config/rs6000/linux64.h
index 0316d8cb65d..139e1b6796c 100644
--- a/gcc/config/rs6000/linux64.h
+++ b/gcc/config/rs6000/linux64.h
@@ -378,13 +378,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 afb5c6ad867..b64638fb25b 100644
--- a/gcc/config/rs6000/sysv4.h
+++ b/gcc/config/rs6000/sysv4.h
@@ -781,7 +781,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 2c3bca5dfcb..b90661247a4 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 6d928846895..3cc05bb7240 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 74a356fdf5e..fc9c7d15b04 100644
--- a/gcc/gcc.cc
+++ b/gcc/gcc.cc
@@ -774,8 +774,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
@@ -810,8 +813,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
@@ -828,8 +834,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
@@ -844,8 +853,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.50.1
@@ -0,0 +1,34 @@
From 58a94690d4dd7b34543d9d154abc96d2d90d3b32 Mon Sep 17 00:00:00 2001
From: Ariadne Conill <ariadne@dereferenced.org>
Date: Fri, 21 Aug 2020 06:47:43 +0000
Subject: [PATCH] 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 75b6531860e..78830ce4b42 100644
--- a/gcc/c-family/c.opt
+++ b/gcc/c-family/c.opt
@@ -805,7 +805,7 @@ Warn about function calls with format strings that write past the end
of the destination region.
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
@@ -830,7 +830,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.
Wframe-address
--
2.50.1
@@ -0,0 +1,25 @@
From b2a755b671d88c34402290d7d769232e01aed350 Mon Sep 17 00:00:00 2001
From: Ariadne Conill <ariadne@ariadne.space>
Date: Fri, 25 Jul 2025 01:44:20 -0700
Subject: [PATCH] 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 bea1adc0940..e65a575d9f8 100644
--- a/gcc/common.opt
+++ b/gcc/common.opt
@@ -829,7 +829,7 @@ Common Var(warn_tautological_compare) Warning LangEnabledBy(C ObjC C++ ObjC++,Wa
Warn if a comparison always evaluates to true or false.
Wtrampolines
-Common Var(warn_trampolines) Warning
+Common Var(warn_trampolines) Init(1) Warning
Warn whenever a trampoline is generated.
Wtrivial-auto-var-init
--
2.50.1
@@ -0,0 +1,39 @@
From c355364231395090e7223ec00d8a16065903c2c5 Mon Sep 17 00:00:00 2001
From: Ariadne Conill <ariadne@ariadne.space>
Date: Fri, 25 Jul 2025 01:49:03 -0700
Subject: [PATCH] gcc: disable SSP on -ffreestanding, -nostdlib and
-nodefaultlibs
---
gcc/gcc.cc | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/gcc/gcc.cc b/gcc/gcc.cc
index fc9c7d15b04..7b0d3d2743b 100644
--- a/gcc/gcc.cc
+++ b/gcc/gcc.cc
@@ -1009,6 +1009,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" \
@@ -1314,7 +1320,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|fcondition-coverage|fpath-coverage|fprofile-generate*|coverage:\
%{!fprofile-update=single:\
--
2.50.1
@@ -0,0 +1,25 @@
From 5f09842c19d6db976724cd117190a8a6951acf9b Mon Sep 17 00:00:00 2001
From: Ariadne Conill <ariadne@ariadne.space>
Date: Fri, 25 Jul 2025 01:50:42 -0700
Subject: [PATCH] gcc: params: set default ssp-buffer-size to 4
---
gcc/params.opt | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gcc/params.opt b/gcc/params.opt
index 64e453d29b7..bba3fd574f2 100644
--- a/gcc/params.opt
+++ b/gcc/params.opt
@@ -1064,7 +1064,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.50.1
@@ -0,0 +1,54 @@
From ee0615536ae0d255f59070b904aa35d6de8fce49 Mon Sep 17 00:00:00 2001
From: Ariadne Conill <ariadne@dereferenced.org>
Date: Fri, 21 Aug 2020 06:50:33 +0000
Subject: [PATCH] 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 7f84a99533e..a4c6284f788 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.50.1
@@ -0,0 +1,28 @@
From 62966418472466142a9962892177f4b1f9f56944 Mon Sep 17 00:00:00 2001
From: Ariadne Conill <ariadne@dereferenced.org>
Date: Fri, 21 Aug 2020 06:52:07 +0000
Subject: [PATCH] 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 d4e8791b14b..c074980ed80 100644
--- a/include/libiberty.h
+++ b/include/libiberty.h
@@ -678,8 +678,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.50.1
@@ -0,0 +1,24 @@
From 0351f4f3dd00bdece780ce5e24d972e97ca1b7ed Mon Sep 17 00:00:00 2001
From: Ariadne Conill <ariadne@dereferenced.org>
Date: Fri, 21 Aug 2020 06:53:00 +0000
Subject: [PATCH] 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 ce54d88278d..10c212a1ad3 100644
--- a/libiberty/Makefile.in
+++ b/libiberty/Makefile.in
@@ -266,6 +266,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.50.1
+57
View File
@@ -0,0 +1,57 @@
From bd7e32d5405b6b4f3994a212a77ff2cd33134c74 Mon Sep 17 00:00:00 2001
From: Szabolcs Nagy <nsz@port70.net>
Date: Sat, 24 Oct 2015 20:09:53 +0000
Subject: [PATCH] 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 cdfd94d3c73..a3a6c988833 100644
--- a/gcc/config/i386/i386-expand.cc
+++ b/gcc/config/i386/i386-expand.cc
@@ -13643,10 +13643,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 2484dc839bf..e980030ef23 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.50.1
+85
View File
@@ -0,0 +1,85 @@
From c191dc86f4f7340542066f4156aa57be9cfbf876 Mon Sep 17 00:00:00 2001
From: Szabolcs Nagy <nsz@port70.net>
Date: Sat, 7 Nov 2015 02:08:05 +0000
Subject: [PATCH] nopie
---
gcc/configure | 25 +++++++++++++++++++++++++
gcc/configure.ac | 11 +++++++++++
2 files changed, 36 insertions(+)
diff --git a/gcc/configure b/gcc/configure
index 0f4a5d52c30..343563c8948 100755
--- a/gcc/configure
+++ b/gcc/configure
@@ -34586,6 +34586,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
@@ -34603,6 +34626,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 b0e3615e5aa..b3948469d17 100644
--- a/gcc/configure.ac
+++ b/gcc/configure.ac
@@ -7802,6 +7802,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
@@ -7819,6 +7828,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.50.1
@@ -0,0 +1,42 @@
From f1d6c0950e0f12fb8cf2429da570f478a1369286 Mon Sep 17 00:00:00 2001
From: Ariadne Conill <ariadne@dereferenced.org>
Date: Fri, 21 Aug 2020 06:59:16 +0000
Subject: [PATCH] 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 9e3385ca94f..2c0cca6e480 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.50.1
@@ -0,0 +1,24 @@
From 8773e0cf880da9fe80de7f8a662359664bb0b234 Mon Sep 17 00:00:00 2001
From: Ariadne Conill <ariadne@dereferenced.org>
Date: Fri, 21 Aug 2020 06:59:43 +0000
Subject: [PATCH] build: fix CXXFLAGS_FOR_BUILD passing
---
Makefile.in | 1 +
1 file changed, 1 insertion(+)
diff --git a/Makefile.in b/Makefile.in
index b1ed67d3d4f..1e039c20550 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -179,6 +179,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.50.1
@@ -0,0 +1,25 @@
From 625b8095796f24389fdda5bb5bc6ff9fbb365813 Mon Sep 17 00:00:00 2001
From: Ariadne Conill <ariadne@dereferenced.org>
Date: Fri, 21 Aug 2020 07:01:06 +0000
Subject: [PATCH] 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 d6280a4d4dd..ba69fb9fad7 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.50.1
@@ -0,0 +1,31 @@
From c557286adc46536fe033df400c50a880b672cfd6 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] 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 7b0d3d2743b..e46e976a2e8 100644
--- a/gcc/gcc.cc
+++ b/gcc/gcc.cc
@@ -1017,8 +1017,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.50.1
@@ -0,0 +1,69 @@
From d698fead9d201ef032e2e978898864335a9ab513 Mon Sep 17 00:00:00 2001
From: Ariadne Conill <ariadne@dereferenced.org>
Date: Fri, 21 Aug 2020 07:03:42 +0000
Subject: [PATCH] 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 e46e976a2e8..607c8ca1d42 100644
--- a/gcc/gcc.cc
+++ b/gcc/gcc.cc
@@ -775,10 +775,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
@@ -814,10 +814,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
@@ -835,10 +835,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
@@ -854,10 +854,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.50.1
@@ -0,0 +1,26 @@
From 9cf1916bd52d61ea0fd7a8b6acebb1dc4a1f2488 Mon Sep 17 00:00:00 2001
From: Ariadne Conill <ariadne@dereferenced.org>
Date: Thu, 6 Jan 2022 03:12:55 +0000
Subject: [PATCH] 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 70e36b3299e..e00c3becd3f 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.50.1
@@ -0,0 +1,25 @@
From dc07fb7df8d4f997877d8f98ea9ef8292f738ed3 Mon Sep 17 00:00:00 2001
From: Ariadne Conill <ariadne@dereferenced.org>
Date: Thu, 6 Jan 2022 03:13:59 +0000
Subject: [PATCH] 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.50.1
@@ -0,0 +1,81 @@
From 496067ded4a3698468412e240b899755d92b314c Mon Sep 17 00:00:00 2001
From: Ariadne Conill <ariadne@dereferenced.org>
Date: Thu, 6 Jan 2022 03:14:33 +0000
Subject: [PATCH] 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 f56b47c268e..c5f757a6284 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.50.1
@@ -0,0 +1,26 @@
From 3d0f96f3f53a7ff81532f077e9db69d7318db796 Mon Sep 17 00:00:00 2001
From: Ariadne Conill <ariadne@dereferenced.org>
Date: Thu, 6 Jan 2022 03:14:54 +0000
Subject: [PATCH] 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 64a4a20e64f..9a8eb8dd8d1 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.50.1
@@ -0,0 +1,78 @@
From b1ab523d6fa44aae8f3ec5f787a8f86f8686bf64 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] 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 282c77b6a7b..07adae3d59c 100644
--- a/gcc/config/riscv/linux.h
+++ b/gcc/config/riscv/linux.h
@@ -61,11 +61,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 a6f64f88d25..f88776ec520 100644
--- a/gcc/config/riscv/t-linux
+++ b/gcc/config/riscv/t-linux
@@ -1,5 +1,8 @@
-# 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
MULTIARCH_DIRNAME := $(call if_multiarch,$(firstword $(subst -, ,$(target)))-linux-gnu)
--
2.50.1
@@ -0,0 +1,51 @@
From ee64e5ead8938d5be6cedd674158a25d93711fe3 Mon Sep 17 00:00:00 2001
From: Ariadne Conill <ariadne@dereferenced.org>
Date: Fri, 21 Aug 2020 07:05:41 +0000
Subject: [PATCH] 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 0719fd0615d..80bb8f1622f 100644
--- a/libgcc/Makefile.in
+++ b/libgcc/Makefile.in
@@ -971,8 +971,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)
@@ -1177,10 +1178,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))))
@@ -1197,6 +1194,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.50.1
@@ -0,0 +1,59 @@
From 5adfe740c027fb8dc9931053f55f7eae222e6bb4 Mon Sep 17 00:00:00 2001
From: Ariadne Conill <ariadne@ariadne.space>
Date: Fri, 25 Jul 2025 02:09:02 -0700
Subject: [PATCH] ada: libgnarl: remove use of glibc-specific
pthread_rwlockattr_setkind_np
musl's thread library does not implement it
Signed-off-by: Ariadne Conill <ariadne@ariadne.space>
---
gcc/ada/libgnarl/s-osinte__linux.ads | 10 ----------
gcc/ada/libgnarl/s-taprop__linux.adb | 7 -------
2 files changed, 17 deletions(-)
diff --git a/gcc/ada/libgnarl/s-osinte__linux.ads b/gcc/ada/libgnarl/s-osinte__linux.ads
index 7aeb15da523..5551b701e5a 100644
--- a/gcc/ada/libgnarl/s-osinte__linux.ads
+++ b/gcc/ada/libgnarl/s-osinte__linux.ads
@@ -402,16 +402,6 @@ package System.OS_Interface is
(attr : access pthread_rwlockattr_t) return int;
pragma Import (C, pthread_rwlockattr_destroy, "pthread_rwlockattr_destroy");
- PTHREAD_RWLOCK_PREFER_READER_NP : constant := 0;
- 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;
diff --git a/gcc/ada/libgnarl/s-taprop__linux.adb b/gcc/ada/libgnarl/s-taprop__linux.adb
index 8f4c835baa7..6df36c7d8f4 100644
--- a/gcc/ada/libgnarl/s-taprop__linux.adb
+++ b/gcc/ada/libgnarl/s-taprop__linux.adb
@@ -409,16 +409,9 @@ package body System.Task_Primitives.Operations is
Result : C.int;
begin
- -- Set the rwlock to prefer writer to avoid writers starvation
-
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.50.1
@@ -0,0 +1,50 @@
From c8edb618208a854d121ff73c0d82d7cc467a3611 Mon Sep 17 00:00:00 2001
From: Ariadne Conill <ariadne@ariadne.space>
Date: Fri, 25 Jul 2025 02:13:19 -0700
Subject: [PATCH] ada: libgnarl: use posix_openpt instead of glibc-specific
getpt to open a pty
musl only implements posix_openpt(3), not the older glibc-specific getpt()
and glibc implements both for ages.
Signed-off-by: Ariadne Conill <ariadne@ariadne.space>
---
gcc/ada/terminals.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/gcc/ada/terminals.c b/gcc/ada/terminals.c
index 89f887556c0..93557fe2631 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)
--
2.50.1
@@ -0,0 +1,54 @@
From d3c515c40b9ec0133787388ae7df037e88a95f73 Mon Sep 17 00:00:00 2001
From: Ariadne Conill <ariadne@ariadne.space>
Date: Fri, 25 Jul 2025 02:18:49 -0700
Subject: [PATCH] ada: libgnarl: adaint: fix sched.h inclusion for musl
Signed-off-by: Ariadne Conill <ariadne@ariadne.space>
---
gcc/ada/adaint.c | 6 +++++-
gcc/ada/adaint.h | 5 +++++
2 files changed, 10 insertions(+), 1 deletion(-)
diff --git a/gcc/ada/adaint.c b/gcc/ada/adaint.c
index 1fcfae165a7..67318e647ed 100644
--- a/gcc/ada/adaint.c
+++ b/gcc/ada/adaint.c
@@ -95,6 +95,11 @@
#include <sys/pstat.h>
#endif
+#if defined (linux) || defined(__linux__)
+#define _GNU_SOURCE 1
+#include <sched.h>
+#endif
+
#ifdef __PikeOS__
#define __BSD_VISIBLE 1
#endif
@@ -3476,7 +3481,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
diff --git a/gcc/ada/adaint.h b/gcc/ada/adaint.h
index 3df12b5f956..26a489f2b78 100644
--- a/gcc/ada/adaint.h
+++ b/gcc/ada/adaint.h
@@ -40,6 +40,11 @@ extern "C" {
#include "mingw32.h"
#endif
+#if defined (linux) || defined(__linux__)
+#define _GNU_SOURCE 1
+#include <sched.h>
+#endif
+
#include <dirent.h>
/* Constants used for the form parameter encoding values */
--
2.50.1
@@ -0,0 +1,256 @@
From 3d13edda0134af3fbb802cdec6406c91003bbc33 Mon Sep 17 00:00:00 2001
From: Drew DeVault <sir@cmpwn.com>
Date: Wed, 9 Dec 2020 07:42:06 +0000
Subject: [PATCH] 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 1e039c20550..20f535a306a 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -238,6 +238,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 8a531ed591c..40045ff35a5 100644
--- a/gcc/config.in
+++ b/gcc/config.in
@@ -131,6 +131,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 3c17ac6eade..0426efdb8c3 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 343563c8948..54300a2a867 100755
--- a/gcc/configure
+++ b/gcc/configure
@@ -1003,6 +1003,7 @@ with_changes_root_url
enable_languages
with_multilib_list
with_multilib_generator
+enable_autolink_libatomic
with_zstd
with_zstd_include
with_zstd_lib
@@ -1742,6 +1743,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
@@ -8400,7 +8404,6 @@ else
fi
-
# Check whether --with-multilib-generator was given.
if test "${with_multilib_generator+set}" = set; then :
withval=$with_multilib_generator; :
@@ -8408,6 +8411,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 b3948469d17..81c070830e2 100644
--- a/gcc/configure.ac
+++ b/gcc/configure.ac
@@ -1227,6 +1227,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 3e9e09b4ae3..6e7b756be61 100644
--- a/gcc/doc/install.texi
+++ b/gcc/doc/install.texi
@@ -2617,6 +2617,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 a96700c0d38..16deedca64d 100644
--- a/gcc/doc/tm.texi
+++ b/gcc/doc/tm.texi
@@ -390,7 +390,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 eccc4d88493..4ca4c610571 100644
--- a/gcc/doc/tm.texi.in
+++ b/gcc/doc/tm.texi.in
@@ -390,7 +390,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 607c8ca1d42..e9f78f0f4c1 100644
--- a/gcc/gcc.cc
+++ b/gcc/gcc.cc
@@ -1000,13 +1000,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.50.1
@@ -0,0 +1,57 @@
From ddc31942d7363acc938007d70f29e3e324064f76 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] 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 6db039d6e8b..2751b5c1387 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.50.1
@@ -0,0 +1,27 @@
From e9f4662af949bc56eef27d531605dd90181bc300 Mon Sep 17 00:00:00 2001
From: Samuel Holland <samuel@sholland.org>
Date: Thu, 30 Jun 2022 16:44:51 +0000
Subject: [PATCH] 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 bfd02b5c2c6..16f9e84d66f 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.50.1
@@ -0,0 +1,26 @@
From b4c412a5d538f7478596880e89d0e6d5046ef16b 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] 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 20f535a306a..c087bfe7cd4 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -54382,7 +54382,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.50.1
@@ -0,0 +1,54 @@
From 0c10e5ee09685a5ecc39650e8ec8a1b4f5e096e5 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] 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 4f5be7d4ff4..0a48032edb4 100755
--- a/libphobos/configure
+++ b/libphobos/configure
@@ -15420,14 +15420,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 8dd9c7da107..b61bf528a14 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.50.1
@@ -0,0 +1,25 @@
From e5190522319c315efaf9a921737c05fae6a49e85 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] 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 98284a4d13e..0d14f116a10 100644
--- a/gcc/ada/libgnat/s-parame.ads
+++ b/gcc/ada/libgnat/s-parame.ads
@@ -101,7 +101,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.50.1
@@ -0,0 +1,30 @@
From 3fe1ff6c349a065daba97794c55961cafe6c4a10 Mon Sep 17 00:00:00 2001
From: psykose <alice@ayaya.dev>
Date: Mon, 29 May 2023 15:33:11 +0000
Subject: [PATCH] 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/sys/mman.d | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/libphobos/libdruntime/core/sys/posix/sys/mman.d b/libphobos/libdruntime/core/sys/posix/sys/mman.d
index b1eb9fa8107..3aee0d96319 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.50.1
@@ -0,0 +1,195 @@
From ff21b1649c1c5009a33722d21e28af9026c72cd7 Mon Sep 17 00:00:00 2001
From: psykose <alice@ayaya.dev>
Date: Mon, 10 Jul 2023 23:23:29 +0000
Subject: [PATCH] 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.50.1
@@ -0,0 +1,32 @@
From 0e09546330c7500b0d6d4e6d4bbf4fe751d57c34 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 45862048abf..73155acd832 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.50.1
@@ -0,0 +1,113 @@
From 05b462e0a6de90c0d69a48ed9c58a6f76158344e Mon Sep 17 00:00:00 2001
From: Rich Felker <dalias@aerifal.cx>
Date: Fri, 25 Jul 2025 02:41:46 -0700
Subject: [PATCH] static PIE: ensure -static reaches the linker
on some targets, the logic for the compiler option -static seems not
to be processed when -pie is present. rather than playing
whack-a-mole, just ensure LD_PIE_SPEC specs always pass -static to ld
if either -static or -static-pie is present on the compiler driver
command line.
this may produce redundant -static arguments but it doesn't matter.
---
gcc/common.opt | 4 ++--
gcc/config/gnu-user.h | 17 ++++++++---------
gcc/gcc.cc | 6 +++---
3 files changed, 13 insertions(+), 14 deletions(-)
diff --git a/gcc/common.opt b/gcc/common.opt
index e65a575d9f8..7ad38711f6e 100644
--- a/gcc/common.opt
+++ b/gcc/common.opt
@@ -3968,11 +3968,11 @@ Driver
no-pie
Driver RejectNegative Negative(shared)
-Don't create a dynamically linked position independent executable.
+Don't create a position independent executable.
pie
Driver RejectNegative Negative(no-pie)
-Create a dynamically linked position independent executable.
+Create a position independent executable.
static-pie
Driver RejectNegative Negative(pie)
diff --git a/gcc/config/gnu-user.h b/gcc/config/gnu-user.h
index 0426efdb8c3..866c8bd77f2 100644
--- a/gcc/config/gnu-user.h
+++ b/gcc/config/gnu-user.h
@@ -51,13 +51,12 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
#define GNU_USER_TARGET_STARTFILE_SPEC \
"%{shared:; \
pg|p|profile:%{static-pie:grcrt1.o%s;:gcrt1.o%s}; \
- static:crt1.o%s; \
- static-pie:rcrt1.o%s; \
+ static|static-pie:%{" PIE_SPEC ":rcrt1.o%s;:crt1.o%s}; \
" PIE_SPEC ":Scrt1.o%s; \
:crt1.o%s} " \
GNU_USER_TARGET_CRTI " \
- %{static:crtbeginT.o%s; \
- shared|static-pie|" PIE_SPEC ":crtbeginS.o%s; \
+ %{shared|" PIE_SPEC ":crtbeginS.o%s; \
+ static:crtbeginT.o%s; \
:crtbegin.o%s} \
%{fvtable-verify=none:%s; \
fvtable-verify=preinit:vtv_start_preinit.o%s; \
@@ -73,11 +72,11 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
GNU userspace "finalizer" file, `crtn.o'. */
#define GNU_USER_TARGET_ENDFILE_SPEC \
- "%{!static:%{fvtable-verify=none:%s; \
+ "%{static|static-pie:; \
+ fvtable-verify=none:%s; \
fvtable-verify=preinit:vtv_end_preinit.o%s; \
- fvtable-verify=std:vtv_end.o%s}} \
- %{static:crtend.o%s; \
- shared|static-pie|" PIE_SPEC ":crtendS.o%s; \
+ fvtable-verify=std:vtv_end.o%s} \
+ %{shared|" PIE_SPEC ":crtendS.o%s; \
:crtend.o%s} " \
GNU_USER_TARGET_CRTN " " \
CRTOFFLOADEND
@@ -106,7 +105,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
#define LIB_SPEC GNU_USER_TARGET_LIB_SPEC
#if defined(HAVE_LD_EH_FRAME_HDR)
-#define LINK_EH_SPEC "%{!static|static-pie:--eh-frame-hdr} "
+#define LINK_EH_SPEC "%{!static|" PIE_SPEC ":--eh-frame-hdr} "
#endif
#if !defined(LINK_LIBATOMIC_SPEC) && defined(ENABLE_AUTOLINK_LIBATOMIC)
diff --git a/gcc/gcc.cc b/gcc/gcc.cc
index e9f78f0f4c1..767ff65f348 100644
--- a/gcc/gcc.cc
+++ b/gcc/gcc.cc
@@ -1056,7 +1056,7 @@ proper position among the other output files. */
#define NO_FPIE_AND_FPIC_SPEC NO_FPIE_SPEC "|" NO_FPIC_SPEC
#define FPIE_OR_FPIC_SPEC NO_FPIE_AND_FPIC_SPEC ":;"
#else
-#define PIE_SPEC "pie"
+#define PIE_SPEC "pie|static-pie"
#define FPIE1_SPEC "fpie"
#define NO_FPIE1_SPEC FPIE1_SPEC ":;"
#define FPIE2_SPEC "fPIE"
@@ -1080,12 +1080,12 @@ proper position among the other output files. */
#ifndef LINK_PIE_SPEC
#ifdef HAVE_LD_PIE
#ifndef LD_PIE_SPEC
-#define LD_PIE_SPEC "-pie"
+#define LD_PIE_SPEC "-pie %{static|static-pie:--no-dynamic-linker -z text -Bsymbolic -static}"
#endif
#else
#define LD_PIE_SPEC ""
#endif
-#define LINK_PIE_SPEC "%{static|shared|r:;" PIE_SPEC ":" LD_PIE_SPEC "} "
+#define LINK_PIE_SPEC "%{shared|r:;" PIE_SPEC ":" LD_PIE_SPEC "} "
#endif
#ifndef LINK_BUILDID_SPEC
--
2.50.1
@@ -0,0 +1,77 @@
From 4c8cc9a8621b91f8aa83d8ca81f22b00a98d9fa9 Mon Sep 17 00:00:00 2001
From: Andrew Pinski <quic_apinski@quicinc.com>
Date: Fri, 28 Mar 2025 17:25:56 -0700
Subject: [PATCH] except: Don't use the cached value of the gcc_except_table
section for comdat functions [PR119507]
This has been broken since GCC started to put the comdat functions' gcc_except_table into their
own section; r0-118218-g3e6011cfebedfb. What would happen is after a non-comdat function is processed,
the cached value would always be used even for comdat function. Instead we should create a new
section for comdat functions.
OK? Bootstrapped and tested on x86_64-linux-gnu.
PR middle-end/119507
gcc/ChangeLog:
* except.cc (switch_to_exception_section): Don't use the cached section if
the current function is in comdat.
gcc/testsuite/ChangeLog:
* g++.dg/eh/pr119507.C: New test.
Signed-off-by: Andrew Pinski <quic_apinski@quicinc.com>
---
gcc/except.cc | 9 ++++++++-
gcc/testsuite/g++.dg/eh/pr119507.C | 17 +++++++++++++++++
2 files changed, 25 insertions(+), 1 deletion(-)
create mode 100644 gcc/testsuite/g++.dg/eh/pr119507.C
diff --git a/gcc/except.cc b/gcc/except.cc
index 205811c6567..0fe1e093489 100644
--- a/gcc/except.cc
+++ b/gcc/except.cc
@@ -2949,7 +2949,14 @@ switch_to_exception_section (const char * ARG_UNUSED (fnname))
{
section *s;
- if (exception_section)
+ if (exception_section
+ /* Don't use the cached section for comdat if it will be different. */
+#ifdef HAVE_LD_EH_GC_SECTIONS
+ && !(targetm_common.have_named_sections
+ && DECL_COMDAT_GROUP (current_function_decl)
+ && HAVE_COMDAT_GROUP)
+#endif
+ )
s = exception_section;
else
{
diff --git a/gcc/testsuite/g++.dg/eh/pr119507.C b/gcc/testsuite/g++.dg/eh/pr119507.C
new file mode 100644
index 00000000000..50afa75a43f
--- /dev/null
+++ b/gcc/testsuite/g++.dg/eh/pr119507.C
@@ -0,0 +1,17 @@
+// { dg-do compile { target comdat_group } }
+// Force off function sections
+// Force on exceptions
+// { dg-options "-fno-function-sections -fexceptions" }
+// PR middle-end/119507
+
+
+inline int comdat() { try { throw 1; } catch (int) { return 1; } return 0; }
+int another_func_with_exception() { try { throw 1; } catch (int) { return 1; } return 0; }
+inline int comdat1() { try { throw 1; } catch (int) { return 1; } return 0; }
+int foo() { return comdat() + comdat1(); }
+
+// Make sure the gcc puts the exception table for both comdat and comdat1 in their own section
+// { dg-final { scan-assembler-times ".section\[\t \]\[^\n\]*.gcc_except_table._Z6comdatv" 1 } }
+// { dg-final { scan-assembler-times ".section\[\t \]\[^\n\]*.gcc_except_table._Z7comdat1v" 1 } }
+// There should be 3 exception tables,
+// { dg-final { scan-assembler-times ".section\[\t \]\[^\n\]*.gcc_except_table" 3 } }
--
2.50.1
@@ -0,0 +1,164 @@
From a6c08fc7fe3a144ebd767cd52fe22043947655e9 Mon Sep 17 00:00:00 2001
From: Ariadne Conill <ariadne@ariadne.space>
Date: Sat, 26 Jul 2025 02:59:45 -0700
Subject: [PATCH] ada: libgnat: use stub symbolic module name functions
The "linux" implementation depends on glibc internals and accordingly
does not work on musl.
Signed-off-by: Ariadne Conill <ariadne@ariadne.space>
---
gcc/ada/Makefile.rtl | 32 ++++++++++++++++----------------
1 file changed, 16 insertions(+), 16 deletions(-)
diff --git a/gcc/ada/Makefile.rtl b/gcc/ada/Makefile.rtl
index cb41e6887cd..152ba70db4d 100644
--- a/gcc/ada/Makefile.rtl
+++ b/gcc/ada/Makefile.rtl
@@ -1642,7 +1642,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 \
@@ -2014,7 +2014,7 @@ ifeq ($(strip $(filter-out s390% linux%,$(target_cpu) $(target_os))),)
s-taspri.ads<libgnarl/s-taspri__posix-noaltstack.ads \
s-tpopsp.adb<libgnarl/s-tpopsp__posix-foreign.adb \
$(TRASYM_DWARF_UNIX_PAIRS) \
- s-tsmona.adb<libgnat/s-tsmona__linux.adb \
+ s-tsmona.adb<libgnat/s-tsmona.adb \
system.ads<libgnat/system-linux-s390.ads
ifeq ($(strip $(filter-out s390x,$(target_cpu))),)
@@ -2359,7 +2359,7 @@ ifeq ($(strip $(filter-out loongarch% linux%,$(target_cpu) $(target_os))),)
s-taspri.ads<libgnarl/s-taspri__posix.ads \
g-sercom.adb<libgnat/g-sercom__linux.adb \
$(TRASYM_DWARF_UNIX_PAIRS) \
- s-tsmona.adb<libgnat/s-tsmona__linux.adb \
+ s-tsmona.adb<libgnat/s-tsmona.adb \
$(GNATRTL_128BIT_PAIRS) \
$(ATOMICS_TARGET_PAIRS) \
$(ATOMICS_BUILTINS_TARGET_PAIRS) \
@@ -2407,7 +2407,7 @@ ifeq ($(strip $(filter-out mips% linux%,$(target_cpu) $(target_os))),)
s-taspri.ads<libgnarl/s-taspri__posix-noaltstack.ads \
s-tpopsp.adb<libgnarl/s-tpopsp__posix-foreign.adb \
$(TRASYM_DWARF_UNIX_PAIRS) \
- s-tsmona.adb<libgnat/s-tsmona__linux.adb \
+ s-tsmona.adb<libgnat/s-tsmona.adb \
system.ads<libgnat/system-linux-mips.ads
ifeq ($(strip $(filter-out mips64% mipsisa64%,$(target_cpu))),)
@@ -2463,7 +2463,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
@@ -2519,7 +2519,7 @@ ifeq ($(strip $(filter-out arm% linux-gnueabi%,$(target_cpu) $(target_os))),)
s-taspri.ads<libgnarl/s-taspri__posix-noaltstack.ads \
s-tpopsp.adb<libgnarl/s-tpopsp__posix-foreign.adb \
$(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-arm.ads
@@ -2565,7 +2565,7 @@ ifeq ($(strip $(filter-out aarch64% 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) \
$(ATOMICS_BUILTINS_TARGET_PAIRS) \
$(GNATRTL_128BIT_PAIRS) \
@@ -2607,7 +2607,7 @@ ifeq ($(strip $(filter-out sparc% linux%,$(target_cpu) $(target_os))),)
s-taspri.ads<libgnarl/s-taspri__posix-noaltstack.ads \
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 \
system.ads<libgnat/system-linux-sparc.ads
ifeq ($(strip $(filter-out sparc64 sparcv9,$(target_cpu))),)
@@ -2660,7 +2660,7 @@ ifeq ($(strip $(filter-out hppa% linux%,$(target_cpu) $(target_os))),)
s-taspri.ads<libgnarl/s-taspri__posix-noaltstack.ads \
s-tpopsp.adb<libgnarl/s-tpopsp__posix-foreign.adb \
$(TRASYM_DWARF_UNIX_PAIRS) \
- s-tsmona.adb<libgnat/s-tsmona__linux.adb \
+ s-tsmona.adb<libgnat/s-tsmona.adb \
system.ads<libgnat/system-linux-hppa.ads
TOOLS_TARGET_PAIRS = indepsw.adb<indepsw-gnu.adb
@@ -2697,7 +2697,7 @@ ifeq ($(strip $(filter-out m68k% linux%,$(target_cpu) $(target_os))),)
s-taspri.ads<libgnarl/s-taspri__posix.ads \
s-tpopsp.adb<libgnarl/s-tpopsp__posix-foreign.adb \
$(TRASYM_DWARF_UNIX_PAIRS) \
- s-tsmona.adb<libgnat/s-tsmona__linux.adb \
+ s-tsmona.adb<libgnat/s-tsmona.adb \
system.ads<libgnat/system-linux-m68k.ads
TOOLS_TARGET_PAIRS = indepsw.adb<indepsw-gnu.adb
@@ -2734,7 +2734,7 @@ ifeq ($(strip $(filter-out sh4% linux%,$(target_cpu) $(target_os))),)
s-taspri.ads<libgnarl/s-taspri__posix-noaltstack.ads \
s-tpopsp.adb<libgnarl/s-tpopsp__posix-foreign.adb \
$(TRASYM_DWARF_UNIX_PAIRS) \
- s-tsmona.adb<libgnat/s-tsmona__linux.adb \
+ s-tsmona.adb<libgnat/s-tsmona.adb \
system.ads<libgnat/system-linux-sh4.ads
TOOLS_TARGET_PAIRS = indepsw.adb<indepsw-linux.adb
@@ -2779,7 +2779,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) \
@@ -2859,7 +2859,7 @@ ifeq ($(strip $(filter-out alpha% linux%,$(target_cpu) $(target_os))),)
s-tpopsp.adb<libgnarl/s-tpopsp__posix-foreign.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) \
@@ -2904,7 +2904,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) \
@@ -2956,7 +2956,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) \
@@ -3000,7 +3000,7 @@ ifeq ($(strip $(filter-out riscv% linux%,$(target_cpu) $(target_os))),)
s-taspri.ads<libgnarl/s-taspri__posix-noaltstack.ads \
s-tpopsp.adb<libgnarl/s-tpopsp__posix-foreign.adb \
$(TRASYM_DWARF_UNIX_PAIRS) \
- s-tsmona.adb<libgnat/s-tsmona__linux.adb \
+ s-tsmona.adb<libgnat/s-tsmona.adb \
system.ads<libgnat/system-linux-riscv.ads
ifeq ($(strip $(filter-out riscv64,$(target_cpu))),)
--
2.50.1
@@ -0,0 +1,26 @@
From 4b5dfaaa043999f353ade7fc09e7f1bb4a6fe6db Mon Sep 17 00:00:00 2001
From: Ariadne Conill <ariadne@ariadne.space>
Date: Sat, 26 Jul 2025 03:02:38 -0700
Subject: [PATCH] ada: libgnat: recognize linux-musleabi and linux-muslgnueabi
platforms for ARM
---
gcc/ada/Makefile.rtl | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gcc/ada/Makefile.rtl b/gcc/ada/Makefile.rtl
index 152ba70db4d..89574cdfba7 100644
--- a/gcc/ada/Makefile.rtl
+++ b/gcc/ada/Makefile.rtl
@@ -2500,7 +2500,7 @@ endif
# ARM linux, GNU eabi
ifeq ($(SELECTED_PAIRS),PAIRS_NONE)
-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))),)
SELECTED_PAIRS=arm-linux-gnueabi
--
2.50.1
+801
View File
@@ -0,0 +1,801 @@
# Automatically generated aport, do not edit!
# Generator: pmbootstrap aportgen gcc-loongarch64
# Based on: main/gcc (from Alpine)
CTARGET_ARCH=loongarch64
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-loongarch64
pkgver=15.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-loongarch64
pkgrel=2
pkgdesc="Stage2 cross-compiler for loongarch64"
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-loongarch64 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-loongarch64 binutils-loongarch64"
subpackages="g++-loongarch64:gpp libstdc++-dev-loongarch64: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 (LIBDRUNTIME_ONLY=yes)
# See libphobos/configure.tgt in GCC sources for supported targets
# riscv fails with: error: static assert "unimplemented"
ppc*|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
_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
# 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/snapshots/${_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-gcc-disable-SSP-on-ffreestanding-nostdlib-and-nodefa.patch
0009-gcc-params-set-default-ssp-buffer-size-to-4.patch
0010-Ensure-that-msgfmt-doesn-t-encounter-problems-during.patch
0011-Don-t-declare-asprintf-if-defined-as-a-macro.patch
0012-libiberty-copy-PIC-objects-during-build-process.patch
0013-libgcc_s.patch
0014-nopie.patch
0015-ada-fix-shared-linking.patch
0016-build-fix-CXXFLAGS_FOR_BUILD-passing.patch
0017-add-fortify-headers-paths.patch
0018-Alpine-musl-package-provides-libssp_nonshared.a.-We-.patch
0019-DP-Use-push-state-pop-state-for-gold-as-well-when-li.patch
0020-aarch64-disable-multilib-support.patch
0021-s390x-disable-multilib-support.patch
0022-ppc64-le-disable-multilib-support.patch
0023-x86_64-disable-multilib-support.patch
0024-riscv-disable-multilib-support.patch
0025-always-build-libgcc_eh.a.patch
0026-ada-libgnarl-remove-use-of-glibc-specific-pthread_rw.patch
0027-ada-libgnarl-use-posix_openpt-instead-of-glibc-speci.patch
0028-ada-libgnarl-adaint-fix-sched.h-inclusion-for-musl.patch
0029-configure-Add-enable-autolink-libatomic-use-in-LINK_.patch
0030-configure-fix-detection-of-atomic-builtins-in-libato.patch
0031-libstdc-do-not-throw-exceptions-for-non-C-locales-on.patch
0032-gdc-unconditionally-link-libgphobos-against-libucont.patch
0033-druntime-link-against-libucontext-on-all-platforms.patch
0034-libgnat-time_t-is-always-64-bit-on-musl-libc.patch
0035-libphobos-do-not-use-LFS64-symbols.patch
0036-libgo-fix-lfs64-use.patch
0037-loongarch-disable-multilib-support.patch
0038-static-PIE-ensure-static-reaches-the-linker.patch
0039-except-Don-t-use-the-cached-value-of-the-gcc_except_.patch
0040-ada-libgnat-use-stub-symbolic-module-name-functions.patch
0041-ada-libgnat-recognize-linux-musleabi-and-linux-muslg.patch
0001-tree-object-size.cc-Fix-assert-constant-offset-in-ch.patch
0001-LoongArch-Only-allow-valid-binary-op-when-optimize-c.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=
local _sanitizer_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
*) _sanitizer_configure="--disable-libsanitizer" ;;
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
$_sanitizer_configure
$_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
# symlink to vendor-less target triple for
# supporting clang --target's fallback match
# ref: https://gitlab.alpinelinux.org/alpine/aports/-/issues/16828
ln -s "$CTARGET" "$pkgdir/usr/lib/gcc/${CTARGET%%-*}-${CTARGET#*-*-}"
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"
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="
89047a2e07bd9da265b507b516ed3635adb17491c7f4f67cf090f0bd5b3fc7f2ee6e4cc4008beef7ca884b6b71dffe2bb652b21f01a702e17b468cca2d10b2de gcc-15.2.0.tar.xz
fd5cebc5deb1d588583424acbc1b5a6d8d6f5b1bfa9f4bdbc082cfd406723f423d87011ee30e04ed18128a7ed8021cbfc9262becff5419125dc1afb6f407defa 0001-posix_memalign.patch
6634004cb9feea9ee0d063d6b6984d7db3b10c692b6139bb99169a4f2d74f0e10b5ca0ab31ce346ffef34b8eb9c3f536aa4d94bce1b27f8e0b8a9fc5cc4b7057 0002-gcc-poison-system-directories.patch
37e089791dbcbad73af866b662cda611dc0970d93e28251c7a9aa898db3b96446654e8b778d7866eb8550ba7f4a57cf22e8514d562bfed0c66613e65550d9c85 0003-specs-turn-on-Wl-z-now-by-default.patch
d4d5bfeb20a9fac968f37497d86d7eff4a9ac863e015dadbffae24c08236f5efde69b615d95191e2546672ce2d4b30d3627528c64a83fc64b715e8fa6fd4c372 0004-Turn-on-D_FORTIFY_SOURCE-2-by-default-for-C-C-ObjC-O.patch
4806687c806154dd3d5423ea9ef1203db344dfb8fd21f3eb3543d9f05f4dc01aacc4f012f45db8e890eeddc7b1c75ec06a6b29e29a1ef7b9ec6f853d1854cfd0 0005-On-linux-targets-pass-as-needed-by-default-to-the-li.patch
6b225df0dd76339b06d5efbe07edd6648391a7b9415a219041189c35c084ceffe8fb96b2660d60d62099e7afdfeb8e053622a2b6660d2e8a13adb924f4bc8c8a 0006-Enable-Wformat-and-Wformat-security-by-default.patch
e419b7f20a74384bfb1ac792e3625f9bfe69f8031c2c0beb23f4015df9d48a6c6f107d89bea3c20fa56309b022637863c13e90c1565d027eb47c08154389b7a0 0007-Enable-Wtrampolines-by-default.patch
e6307eec09196900bcd2c0154a62d6694576b4da48a1cf901750b97b4603cd694c4daee2476c33bce09f10bee92a72749face835eb18fbf2c2a50aa1dd251572 0008-gcc-disable-SSP-on-ffreestanding-nostdlib-and-nodefa.patch
969797f99602c119e1632f0c5be02a566be5fb4c7e59affefb5eb6084a06b97120d99d5ee63fef0dab6c0278c7cecf1d8caa53521cc5b6622de2aaa7deabf86e 0009-gcc-params-set-default-ssp-buffer-size-to-4.patch
c15f062790367c9e786a4933deec33931438680176ec752b172c2a0504463a23d588ead4350d32e474603750ceb130ba0ccadfcde601bcf8e2eabca5af8322d0 0010-Ensure-that-msgfmt-doesn-t-encounter-problems-during.patch
03a1012f1022cd68cf08440428e7d6cbf65ea2184e4a088a55976f34af627d80f42f15f713841ec9cbfc4afa39117d4fc384c3f27a4f9ad0ff3947bd45b71c4a 0011-Don-t-declare-asprintf-if-defined-as-a-macro.patch
8f098de9fcf4bbece0923dc4a2acfc67cf751c1d5c007535c5d88b8637a4482c1a42d5721a2760127498e327f6983bbc865a592a8e0db9ef7efc0e36b6d4102f 0012-libiberty-copy-PIC-objects-during-build-process.patch
bbe2b561b5288ca724af37353e17b413df8bf247bce724391e75373aee5cdcdb85e6489d51622c11f4041ed8f317278cf687aee14dfc8756398f03f1a796feb9 0013-libgcc_s.patch
ae34ca2bc5a53ed1c832651e3f6425ca29b5873f1e112b45613277fb9611693be41986d5879593f09149777e3e57d04ba17b142c43eaa990375d31e4e0b4adde 0014-nopie.patch
2c91a1eadf7236efff42eb53037862a342807596e37c6cc3c270d25c2d89078bf8db68bb2e93e57a8ad39b3af825e33db72e2f48a6311951fff53776933bc48c 0015-ada-fix-shared-linking.patch
1366d696a952ed35e5e56ab5bd1eba67e58a8ce752c0ef7e7fe4ad3eef44f25ce6016342d11add9548f9e719dc9ee0772064dda68784257a1a3234ae5957f3fb 0016-build-fix-CXXFLAGS_FOR_BUILD-passing.patch
af739373285e89a4ab0000042b537ff7197b0b366019b56991008c43f3d2b76709d472841cda40e9fb61e6f0dacc0fe8c6b888abb31f393ec1a87acc1c0585b3 0017-add-fortify-headers-paths.patch
c18f3eef4d7d6fcbfa64570edb71157a62dad1f3d7276f10fe3424e49caa33f57a0a5952f03189199472802a2dd966e4832789685a94911fe9a86bb1fd6c1d50 0018-Alpine-musl-package-provides-libssp_nonshared.a.-We-.patch
341d39a40ffd896db152863c717798c6885bdde44c9ac645c5d099c2364cbd8f6f526f97cc98302c420682cb5d6d88bbe28d838c7141456f2ba5581f3edfd64f 0019-DP-Use-push-state-pop-state-for-gold-as-well-when-li.patch
e603652f341909820789a2cec173b8e547ee607b040863f1745b998b8a69d51cb412a4ac55d2c9e3c5192cc298f6288f9dd48fa06fe53ba8f6b1cabbe61c997a 0020-aarch64-disable-multilib-support.patch
26819f3c3a5844c96cee89fc9766a4f8153e7bb22f6296c6c9fd6a13d45648e3f6c7059397ad7e5be66f55addc21054614b38f480b52a7c9a967cf389735644a 0021-s390x-disable-multilib-support.patch
8e6e6ed84c8cb39ecc35ad0986a91168fedbae2426c8ec1c83dec85a293777e0ec29eac13130193b1bdc2d98b6ffa180abf574dad70740d4720b4bfdab992ab8 0022-ppc64-le-disable-multilib-support.patch
264eaa54a76ec5a12294d91ad2f995eddac9210a569ba85aef27176cb015354aa427840bb22f1e3ba2f7761f6f85cc98ddb3b00584b295c6a10a9770c59a2607 0023-x86_64-disable-multilib-support.patch
47a1a407298b6c259d7faff774f26e4843c9d3764362d74230e7d3f77c46ea8bb51211e09a66bb51c04a9f276ea5b07570fb52312fdb1d354c72a0343bc40c57 0024-riscv-disable-multilib-support.patch
b86fcf40e75861bdffb00069d3a0c9cec3fe8042d49d6ce2beae48ffeadccc576b8ab36e5a85421db5cffeb080a75f3a66dbcbb825d7f4462d40ec621964efe3 0025-always-build-libgcc_eh.a.patch
1425543ce064bfd8e33d7e6e07f45cc16d94f156adcfe190c842722652d5ea0c9ba60f6a3e1b444bb0e5bc906ec4f9ca54720b306f274b441600b79bff47dc57 0026-ada-libgnarl-remove-use-of-glibc-specific-pthread_rw.patch
b8851d0e7fc66201e323007f7c1d702ea8a0d0405aa5945621128ebfb93afd967ec8b3ab6fd4ea779ec10dca2a32e1797f7a2622124ccf8ace2a7596f66ff0bf 0027-ada-libgnarl-use-posix_openpt-instead-of-glibc-speci.patch
12b09a171d61406a2bfa10bb25398cee8c92676b12506afe7aace7028e94cbf8d7df25f62ff7af07e8ed471c6edd3ab7811fa51dfaf3a221a6b367858b1f032c 0028-ada-libgnarl-adaint-fix-sched.h-inclusion-for-musl.patch
15bed06ee74a36e9f21f4b29d7bce9c4188769abb6391560e13ea6b165da51f5ae908e141de7510d3d7eec6b998d0fc53de1042fdb7bd056efa703d230a683b4 0029-configure-Add-enable-autolink-libatomic-use-in-LINK_.patch
4c5501256669fd33527a5394eaa4b84451ee341a943dd24a179b661d3c53ef70e87ed5d5f3e76c6c3f9cb79cb5d120ea40101278a7b9d04a55d9405e4cbf9796 0030-configure-fix-detection-of-atomic-builtins-in-libato.patch
eecc77e2a9cf956fd752693ad7f8ff8253a7bb557e00564bb488bbc1deac895e63104cc1182a0bdd700e440763f4a72e29876f560e13e4f5e6de2a1d9438c2f6 0031-libstdc-do-not-throw-exceptions-for-non-C-locales-on.patch
2b09f90d9cb417170060c8ce198bd4aa2e4ef163286c8f24f6e6c5a673ae80f5a883b078b1a5dd5fa71bc1502e08c886687072694da039eb82baa1ea1948ac2c 0032-gdc-unconditionally-link-libgphobos-against-libucont.patch
99c74242b6d79e6a814f1199b9fb0b56c6a43eb93e5d1a79b674cea750bb025363cdd1505d05cd2195a43c918831fa586c427556ee5bc826aa79cd82e7ee1c24 0033-druntime-link-against-libucontext-on-all-platforms.patch
4f8f7876bf8647cda47cbd2b145ff31efe2a7ac21c012c4134174f93482aad1fbab2592c66aacc3b05fccd1a694ff97511b794139db4aac719e243c114373240 0034-libgnat-time_t-is-always-64-bit-on-musl-libc.patch
0069da1d8cb9adb9bab081a34fec680a9ebb1236e606a2497e4565e99bef434518a0f06474a9a1fdfa70811ed3da5d35ca95d267268328f2764bf41c50e924de 0035-libphobos-do-not-use-LFS64-symbols.patch
1cbe85b63ef13bdf2804bfd3173998a6e86752d8ffc09d4cc75a9ba80b98aec5a04efa732bce97a2f50a90c84b92c442ca8f6639841fe7d6618f928ea65916a6 0036-libgo-fix-lfs64-use.patch
98fcd5b893a1646edab961a5d00246151c47b449f8eca99c51f4026ffdb53f60b5b9f6426437c0a6411342da10db8983e20337a29cd46ed22b70e0478573ea30 0037-loongarch-disable-multilib-support.patch
1ad48e39dab351b7bb3e17d9b4b8b78e7de7c736e212638c9d6874b1dde0360dcfc85586c39f515fbd2a6d9910fedc4f0c6ad7ff652b10a5c288c47173671ec7 0038-static-PIE-ensure-static-reaches-the-linker.patch
9f4c3fa0d17cfcd72626bdbaf51992ff3018f878d673ab19b9056047ee2630b581e5a5a4d4857444f08ba9bcdb0fc94f90dcda6180816e39690d1652843f0d8a 0039-except-Don-t-use-the-cached-value-of-the-gcc_except_.patch
d166475e340c91bbb24cf257240aab37129b04f2609e5ce323b530ab83853a4c34c525e0072c15732717f1681db07e6b3b0a4d268720c31f460435ccf4c99b7f 0040-ada-libgnat-use-stub-symbolic-module-name-functions.patch
c717764ef52c0226a23cbf434654cdefa6cbf38ec625648575d9143c5513b16d8914c25015db743033b8a46ac5b2c33ab75e1b67076128d67bb1319e5a83dd85 0041-ada-libgnat-recognize-linux-musleabi-and-linux-muslg.patch
c3b64b05332bd4dd7fad3fff3cacd4f9de0512943f1548c6f1205fab1a74c83622024f30471805f57d625198cc32f647b32172914528fd5605d0bf61cb0c3ff1 0001-tree-object-size.cc-Fix-assert-constant-offset-in-ch.patch
e91873055550eba051d9297bec5c6acd27abb9ee6ce8911cdd04b5faf37d77b6b2a7607ec588d2863f13f14b48af9398cb4ac42443d8567bfa5037dc6bd50404 0001-LoongArch-Only-allow-valid-binary-op-when-optimize-c.patch
"
@@ -0,0 +1,130 @@
From 824eae920f0f64dd7687c969a2436b129161fdc9 Mon Sep 17 00:00:00 2001
From: Jinyang He <hejinyang@loongson.cn>
Date: Wed, 29 Oct 2025 16:07:35 +0800
Subject: [PATCH] LoongArch: Only allow valid binary op when optimize
conditional move
It is wrong that optimize from `if (cond) dest op= 1 << shift` to
`dest op= (cond ? 1 : 0) << shift` when `dest op 0 != dest`.
Like `and`, `mul` or `div`.
And in this optimization `mul` and `div` is optimized to shift.
gcc/ChangeLog:
* config/loongarch/loongarch.cc
(loongarch_expand_conditional_move): Only allow valid binary
op when optimize conditional move.
gcc/testsuite/ChangeLog:
* gcc.target/loongarch/conditional-move-opt-1.c: Remove mul.
* gcc.target/loongarch/conditional-move-opt-2.c: Remove and.
* gcc.target/loongarch/conditional-move-opt-3.c: New test.
Co-Authored-By: Peng Fan <fanpeng@loongson.cn>
---
gcc/config/loongarch/loongarch.cc | 26 ++++++++++++++++---
.../loongarch/conditional-move-opt-1.c | 4 +--
.../loongarch/conditional-move-opt-2.c | 2 +-
.../loongarch/conditional-move-opt-3.c | 14 ++++++++++
4 files changed, 40 insertions(+), 6 deletions(-)
create mode 100644 gcc/testsuite/gcc.target/loongarch/conditional-move-opt-3.c
diff --git a/gcc/config/loongarch/loongarch.cc b/gcc/config/loongarch/loongarch.cc
index bdf290654..740c8611a 100644
--- a/gcc/config/loongarch/loongarch.cc
+++ b/gcc/config/loongarch/loongarch.cc
@@ -5533,12 +5533,32 @@ loongarch_expand_conditional_move (rtx *operands)
}
}
+ auto is_binary_op_0_keep_orig = [](enum rtx_code code)
+ {
+ switch (code)
+ {
+ case PLUS:
+ case MINUS:
+ case IOR:
+ case XOR:
+ case ROTATE:
+ case ROTATERT:
+ case ASHIFT:
+ case ASHIFTRT:
+ case LSHIFTRT:
+ return true;
+ default:
+ return false;
+ }
+ };
+
/* Check if the optimization conditions are met. */
if (value_if_true_insn
&& value_if_false_insn
- /* Make sure that value_if_false and var are the same. */
- && BINARY_P (value_if_true_insn_src
- = SET_SRC (single_set (value_if_true_insn)))
+ /* Make sure that the orig value OP 0 keep orig. */
+ && (value_if_true_insn_src
+ = SET_SRC (single_set (value_if_true_insn)))
+ && is_binary_op_0_keep_orig ( GET_CODE (value_if_true_insn_src))
/* Make sure that both value_if_true and value_if_false
has the same var. */
&& rtx_equal_p (XEXP (value_if_true_insn_src, 0),
diff --git a/gcc/testsuite/gcc.target/loongarch/conditional-move-opt-1.c b/gcc/testsuite/gcc.target/loongarch/conditional-move-opt-1.c
index ed13471aa..47802aa96 100644
--- a/gcc/testsuite/gcc.target/loongarch/conditional-move-opt-1.c
+++ b/gcc/testsuite/gcc.target/loongarch/conditional-move-opt-1.c
@@ -27,7 +27,7 @@ void
test_lt ()
{
if (lm < ln)
- lr *= (1 << 16);
+ lr += (1 << 16);
lr += lm;
}
@@ -35,7 +35,7 @@ void
test_le ()
{
if (lm <= ln)
- lr = lm * ((long)1 << 32);
+ lr = lm + ((long)1 << 32);
else
lr = lm;
lr += lm;
diff --git a/gcc/testsuite/gcc.target/loongarch/conditional-move-opt-2.c b/gcc/testsuite/gcc.target/loongarch/conditional-move-opt-2.c
index ac72d4d93..743fd5e67 100644
--- a/gcc/testsuite/gcc.target/loongarch/conditional-move-opt-2.c
+++ b/gcc/testsuite/gcc.target/loongarch/conditional-move-opt-2.c
@@ -29,7 +29,7 @@ void
test_lez ()
{
if (lm <= 0)
- lr &= (1 << 16);
+ lr |= (1 << 16);
lr += lm;
}
diff --git a/gcc/testsuite/gcc.target/loongarch/conditional-move-opt-3.c b/gcc/testsuite/gcc.target/loongarch/conditional-move-opt-3.c
new file mode 100644
index 000000000..95887980c
--- /dev/null
+++ b/gcc/testsuite/gcc.target/loongarch/conditional-move-opt-3.c
@@ -0,0 +1,14 @@
+/* { dg-do compile } */
+/* { dg-options "-O2" } */
+/* { dg-final { scan-assembler "maskeqz" } } */
+/* { dg-final { scan-assembler "masknez" } } */
+
+extern long lm, ln, lr;
+
+void
+test_and ()
+{
+ if (lm < 0)
+ lr &= (1 << 16);
+ lr += lm;
+}
--
2.51.1
@@ -0,0 +1,77 @@
From 21b7d08714c4964403848db4144003835ff5245a Mon Sep 17 00:00:00 2001
From: Linsen Zhou <i@lin.moe>
Date: Fri, 17 Oct 2025 11:05:04 +0800
Subject: [PATCH] tree-object-size.cc: Fix assert constant offset in
check_for_plus_in_loops [PR122012]
After commit 51b85dfeb19652bf3e0aaec08828ba7cee1e641c, when the
pointer offset is a variable in the loop, the object size of the
pointer may also need to be reexamined.
Which make gcc_assert in the check_for_plus_in_loops failed.
gcc/ChangeLog:
PR tree-optimization/122012
* tree-object-size.cc (check_for_plus_in_loops): Skip check
for the variable offset
gcc/testsuite/ChangeLog:
PR tree-optimization/122012
* gcc.dg/torture/pr122012.c: New test.
Signed-off-by: Linsen Zhou <i@lin.moe>
(cherry picked from commit 82cefc4898d4ccabe76e28d6626b91ca9e998923)
---
gcc/testsuite/gcc.dg/torture/pr122012.c | 18 ++++++++++++++++++
gcc/tree-object-size.cc | 7 +++----
2 files changed, 21 insertions(+), 4 deletions(-)
create mode 100644 gcc/testsuite/gcc.dg/torture/pr122012.c
diff --git a/gcc/testsuite/gcc.dg/torture/pr122012.c b/gcc/testsuite/gcc.dg/torture/pr122012.c
new file mode 100644
index 00000000000..055915a1e98
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/pr122012.c
@@ -0,0 +1,18 @@
+/* { dg-do compile } */
+#include <stdlib.h>
+
+void foo();
+
+void test(size_t step) {
+ char *buf = malloc(64);
+ char *p = buf;
+ size_t i;
+
+ for(i = 0; i < 64; ++i) {
+ p += 4;
+ if (__builtin_object_size (p, 2) != 0)
+ foo();
+ p += step;
+ }
+ free(buf);
+}
diff --git a/gcc/tree-object-size.cc b/gcc/tree-object-size.cc
index 2d13ab79a84..76dc2446059 100644
--- a/gcc/tree-object-size.cc
+++ b/gcc/tree-object-size.cc
@@ -2153,12 +2153,11 @@ check_for_plus_in_loops (struct object_size_info *osi, tree var)
&& gimple_assign_rhs_code (stmt) == POINTER_PLUS_EXPR)
{
tree basevar = gimple_assign_rhs1 (stmt);
- tree cst = gimple_assign_rhs2 (stmt);
-
- gcc_assert (TREE_CODE (cst) == INTEGER_CST);
+ tree offset = gimple_assign_rhs2 (stmt);
/* Skip non-positive offsets. */
- if (integer_zerop (cst) || compare_tree_int (cst, offset_limit) > 0)
+ if (TREE_CODE (offset) != INTEGER_CST
+ || integer_zerop (offset) || compare_tree_int (offset, offset_limit) > 0)
return;
osi->depths[SSA_NAME_VERSION (basevar)] = 1;
--
2.51.0
+6 -1
View File
@@ -34,7 +34,7 @@ _pkgsnap="${pkgver##*_git}"
[ "$CHOST" != "$CTARGET" ] && _target="-$CTARGET_ARCH" || _target=""
pkgname=gcc-ppc64le
pkgrel=0
pkgrel=2
pkgdesc="Stage2 cross-compiler for ppc64le"
url="https://gcc.gnu.org"
arch="x86_64"
@@ -279,6 +279,9 @@ source="https://gcc.gnu.org/pub/gcc/releases/gcc-$_pkgbase/gcc-$_pkgbase.tar.xz
0039-except-Don-t-use-the-cached-value-of-the-gcc_except_.patch
0040-ada-libgnat-use-stub-symbolic-module-name-functions.patch
0041-ada-libgnat-recognize-linux-musleabi-and-linux-muslg.patch
0001-tree-object-size.cc-Fix-assert-constant-offset-in-ch.patch
0001-LoongArch-Only-allow-valid-binary-op-when-optimize-c.patch
"
# secfixes:
@@ -793,4 +796,6 @@ eecc77e2a9cf956fd752693ad7f8ff8253a7bb557e00564bb488bbc1deac895e63104cc1182a0bdd
9f4c3fa0d17cfcd72626bdbaf51992ff3018f878d673ab19b9056047ee2630b581e5a5a4d4857444f08ba9bcdb0fc94f90dcda6180816e39690d1652843f0d8a 0039-except-Don-t-use-the-cached-value-of-the-gcc_except_.patch
d166475e340c91bbb24cf257240aab37129b04f2609e5ce323b530ab83853a4c34c525e0072c15732717f1681db07e6b3b0a4d268720c31f460435ccf4c99b7f 0040-ada-libgnat-use-stub-symbolic-module-name-functions.patch
c717764ef52c0226a23cbf434654cdefa6cbf38ec625648575d9143c5513b16d8914c25015db743033b8a46ac5b2c33ab75e1b67076128d67bb1319e5a83dd85 0041-ada-libgnat-recognize-linux-musleabi-and-linux-muslg.patch
c3b64b05332bd4dd7fad3fff3cacd4f9de0512943f1548c6f1205fab1a74c83622024f30471805f57d625198cc32f647b32172914528fd5605d0bf61cb0c3ff1 0001-tree-object-size.cc-Fix-assert-constant-offset-in-ch.patch
e91873055550eba051d9297bec5c6acd27abb9ee6ce8911cdd04b5faf37d77b6b2a7607ec588d2863f13f14b48af9398cb4ac42443d8567bfa5037dc6bd50404 0001-LoongArch-Only-allow-valid-binary-op-when-optimize-c.patch
"
@@ -0,0 +1,130 @@
From 824eae920f0f64dd7687c969a2436b129161fdc9 Mon Sep 17 00:00:00 2001
From: Jinyang He <hejinyang@loongson.cn>
Date: Wed, 29 Oct 2025 16:07:35 +0800
Subject: [PATCH] LoongArch: Only allow valid binary op when optimize
conditional move
It is wrong that optimize from `if (cond) dest op= 1 << shift` to
`dest op= (cond ? 1 : 0) << shift` when `dest op 0 != dest`.
Like `and`, `mul` or `div`.
And in this optimization `mul` and `div` is optimized to shift.
gcc/ChangeLog:
* config/loongarch/loongarch.cc
(loongarch_expand_conditional_move): Only allow valid binary
op when optimize conditional move.
gcc/testsuite/ChangeLog:
* gcc.target/loongarch/conditional-move-opt-1.c: Remove mul.
* gcc.target/loongarch/conditional-move-opt-2.c: Remove and.
* gcc.target/loongarch/conditional-move-opt-3.c: New test.
Co-Authored-By: Peng Fan <fanpeng@loongson.cn>
---
gcc/config/loongarch/loongarch.cc | 26 ++++++++++++++++---
.../loongarch/conditional-move-opt-1.c | 4 +--
.../loongarch/conditional-move-opt-2.c | 2 +-
.../loongarch/conditional-move-opt-3.c | 14 ++++++++++
4 files changed, 40 insertions(+), 6 deletions(-)
create mode 100644 gcc/testsuite/gcc.target/loongarch/conditional-move-opt-3.c
diff --git a/gcc/config/loongarch/loongarch.cc b/gcc/config/loongarch/loongarch.cc
index bdf290654..740c8611a 100644
--- a/gcc/config/loongarch/loongarch.cc
+++ b/gcc/config/loongarch/loongarch.cc
@@ -5533,12 +5533,32 @@ loongarch_expand_conditional_move (rtx *operands)
}
}
+ auto is_binary_op_0_keep_orig = [](enum rtx_code code)
+ {
+ switch (code)
+ {
+ case PLUS:
+ case MINUS:
+ case IOR:
+ case XOR:
+ case ROTATE:
+ case ROTATERT:
+ case ASHIFT:
+ case ASHIFTRT:
+ case LSHIFTRT:
+ return true;
+ default:
+ return false;
+ }
+ };
+
/* Check if the optimization conditions are met. */
if (value_if_true_insn
&& value_if_false_insn
- /* Make sure that value_if_false and var are the same. */
- && BINARY_P (value_if_true_insn_src
- = SET_SRC (single_set (value_if_true_insn)))
+ /* Make sure that the orig value OP 0 keep orig. */
+ && (value_if_true_insn_src
+ = SET_SRC (single_set (value_if_true_insn)))
+ && is_binary_op_0_keep_orig ( GET_CODE (value_if_true_insn_src))
/* Make sure that both value_if_true and value_if_false
has the same var. */
&& rtx_equal_p (XEXP (value_if_true_insn_src, 0),
diff --git a/gcc/testsuite/gcc.target/loongarch/conditional-move-opt-1.c b/gcc/testsuite/gcc.target/loongarch/conditional-move-opt-1.c
index ed13471aa..47802aa96 100644
--- a/gcc/testsuite/gcc.target/loongarch/conditional-move-opt-1.c
+++ b/gcc/testsuite/gcc.target/loongarch/conditional-move-opt-1.c
@@ -27,7 +27,7 @@ void
test_lt ()
{
if (lm < ln)
- lr *= (1 << 16);
+ lr += (1 << 16);
lr += lm;
}
@@ -35,7 +35,7 @@ void
test_le ()
{
if (lm <= ln)
- lr = lm * ((long)1 << 32);
+ lr = lm + ((long)1 << 32);
else
lr = lm;
lr += lm;
diff --git a/gcc/testsuite/gcc.target/loongarch/conditional-move-opt-2.c b/gcc/testsuite/gcc.target/loongarch/conditional-move-opt-2.c
index ac72d4d93..743fd5e67 100644
--- a/gcc/testsuite/gcc.target/loongarch/conditional-move-opt-2.c
+++ b/gcc/testsuite/gcc.target/loongarch/conditional-move-opt-2.c
@@ -29,7 +29,7 @@ void
test_lez ()
{
if (lm <= 0)
- lr &= (1 << 16);
+ lr |= (1 << 16);
lr += lm;
}
diff --git a/gcc/testsuite/gcc.target/loongarch/conditional-move-opt-3.c b/gcc/testsuite/gcc.target/loongarch/conditional-move-opt-3.c
new file mode 100644
index 000000000..95887980c
--- /dev/null
+++ b/gcc/testsuite/gcc.target/loongarch/conditional-move-opt-3.c
@@ -0,0 +1,14 @@
+/* { dg-do compile } */
+/* { dg-options "-O2" } */
+/* { dg-final { scan-assembler "maskeqz" } } */
+/* { dg-final { scan-assembler "masknez" } } */
+
+extern long lm, ln, lr;
+
+void
+test_and ()
+{
+ if (lm < 0)
+ lr &= (1 << 16);
+ lr += lm;
+}
--
2.51.1
@@ -0,0 +1,77 @@
From 21b7d08714c4964403848db4144003835ff5245a Mon Sep 17 00:00:00 2001
From: Linsen Zhou <i@lin.moe>
Date: Fri, 17 Oct 2025 11:05:04 +0800
Subject: [PATCH] tree-object-size.cc: Fix assert constant offset in
check_for_plus_in_loops [PR122012]
After commit 51b85dfeb19652bf3e0aaec08828ba7cee1e641c, when the
pointer offset is a variable in the loop, the object size of the
pointer may also need to be reexamined.
Which make gcc_assert in the check_for_plus_in_loops failed.
gcc/ChangeLog:
PR tree-optimization/122012
* tree-object-size.cc (check_for_plus_in_loops): Skip check
for the variable offset
gcc/testsuite/ChangeLog:
PR tree-optimization/122012
* gcc.dg/torture/pr122012.c: New test.
Signed-off-by: Linsen Zhou <i@lin.moe>
(cherry picked from commit 82cefc4898d4ccabe76e28d6626b91ca9e998923)
---
gcc/testsuite/gcc.dg/torture/pr122012.c | 18 ++++++++++++++++++
gcc/tree-object-size.cc | 7 +++----
2 files changed, 21 insertions(+), 4 deletions(-)
create mode 100644 gcc/testsuite/gcc.dg/torture/pr122012.c
diff --git a/gcc/testsuite/gcc.dg/torture/pr122012.c b/gcc/testsuite/gcc.dg/torture/pr122012.c
new file mode 100644
index 00000000000..055915a1e98
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/pr122012.c
@@ -0,0 +1,18 @@
+/* { dg-do compile } */
+#include <stdlib.h>
+
+void foo();
+
+void test(size_t step) {
+ char *buf = malloc(64);
+ char *p = buf;
+ size_t i;
+
+ for(i = 0; i < 64; ++i) {
+ p += 4;
+ if (__builtin_object_size (p, 2) != 0)
+ foo();
+ p += step;
+ }
+ free(buf);
+}
diff --git a/gcc/tree-object-size.cc b/gcc/tree-object-size.cc
index 2d13ab79a84..76dc2446059 100644
--- a/gcc/tree-object-size.cc
+++ b/gcc/tree-object-size.cc
@@ -2153,12 +2153,11 @@ check_for_plus_in_loops (struct object_size_info *osi, tree var)
&& gimple_assign_rhs_code (stmt) == POINTER_PLUS_EXPR)
{
tree basevar = gimple_assign_rhs1 (stmt);
- tree cst = gimple_assign_rhs2 (stmt);
-
- gcc_assert (TREE_CODE (cst) == INTEGER_CST);
+ tree offset = gimple_assign_rhs2 (stmt);
/* Skip non-positive offsets. */
- if (integer_zerop (cst) || compare_tree_int (cst, offset_limit) > 0)
+ if (TREE_CODE (offset) != INTEGER_CST
+ || integer_zerop (offset) || compare_tree_int (offset, offset_limit) > 0)
return;
osi->depths[SSA_NAME_VERSION (basevar)] = 1;
--
2.51.0
+6 -1
View File
@@ -34,7 +34,7 @@ _pkgsnap="${pkgver##*_git}"
[ "$CHOST" != "$CTARGET" ] && _target="-$CTARGET_ARCH" || _target=""
pkgname=gcc-riscv64
pkgrel=0
pkgrel=2
pkgdesc="Stage2 cross-compiler for riscv64"
url="https://gcc.gnu.org"
arch="x86_64"
@@ -279,6 +279,9 @@ source="https://gcc.gnu.org/pub/gcc/releases/gcc-$_pkgbase/gcc-$_pkgbase.tar.xz
0039-except-Don-t-use-the-cached-value-of-the-gcc_except_.patch
0040-ada-libgnat-use-stub-symbolic-module-name-functions.patch
0041-ada-libgnat-recognize-linux-musleabi-and-linux-muslg.patch
0001-tree-object-size.cc-Fix-assert-constant-offset-in-ch.patch
0001-LoongArch-Only-allow-valid-binary-op-when-optimize-c.patch
"
# secfixes:
@@ -793,4 +796,6 @@ eecc77e2a9cf956fd752693ad7f8ff8253a7bb557e00564bb488bbc1deac895e63104cc1182a0bdd
9f4c3fa0d17cfcd72626bdbaf51992ff3018f878d673ab19b9056047ee2630b581e5a5a4d4857444f08ba9bcdb0fc94f90dcda6180816e39690d1652843f0d8a 0039-except-Don-t-use-the-cached-value-of-the-gcc_except_.patch
d166475e340c91bbb24cf257240aab37129b04f2609e5ce323b530ab83853a4c34c525e0072c15732717f1681db07e6b3b0a4d268720c31f460435ccf4c99b7f 0040-ada-libgnat-use-stub-symbolic-module-name-functions.patch
c717764ef52c0226a23cbf434654cdefa6cbf38ec625648575d9143c5513b16d8914c25015db743033b8a46ac5b2c33ab75e1b67076128d67bb1319e5a83dd85 0041-ada-libgnat-recognize-linux-musleabi-and-linux-muslg.patch
c3b64b05332bd4dd7fad3fff3cacd4f9de0512943f1548c6f1205fab1a74c83622024f30471805f57d625198cc32f647b32172914528fd5605d0bf61cb0c3ff1 0001-tree-object-size.cc-Fix-assert-constant-offset-in-ch.patch
e91873055550eba051d9297bec5c6acd27abb9ee6ce8911cdd04b5faf37d77b6b2a7607ec588d2863f13f14b48af9398cb4ac42443d8567bfa5037dc6bd50404 0001-LoongArch-Only-allow-valid-binary-op-when-optimize-c.patch
"
@@ -0,0 +1,130 @@
From 824eae920f0f64dd7687c969a2436b129161fdc9 Mon Sep 17 00:00:00 2001
From: Jinyang He <hejinyang@loongson.cn>
Date: Wed, 29 Oct 2025 16:07:35 +0800
Subject: [PATCH] LoongArch: Only allow valid binary op when optimize
conditional move
It is wrong that optimize from `if (cond) dest op= 1 << shift` to
`dest op= (cond ? 1 : 0) << shift` when `dest op 0 != dest`.
Like `and`, `mul` or `div`.
And in this optimization `mul` and `div` is optimized to shift.
gcc/ChangeLog:
* config/loongarch/loongarch.cc
(loongarch_expand_conditional_move): Only allow valid binary
op when optimize conditional move.
gcc/testsuite/ChangeLog:
* gcc.target/loongarch/conditional-move-opt-1.c: Remove mul.
* gcc.target/loongarch/conditional-move-opt-2.c: Remove and.
* gcc.target/loongarch/conditional-move-opt-3.c: New test.
Co-Authored-By: Peng Fan <fanpeng@loongson.cn>
---
gcc/config/loongarch/loongarch.cc | 26 ++++++++++++++++---
.../loongarch/conditional-move-opt-1.c | 4 +--
.../loongarch/conditional-move-opt-2.c | 2 +-
.../loongarch/conditional-move-opt-3.c | 14 ++++++++++
4 files changed, 40 insertions(+), 6 deletions(-)
create mode 100644 gcc/testsuite/gcc.target/loongarch/conditional-move-opt-3.c
diff --git a/gcc/config/loongarch/loongarch.cc b/gcc/config/loongarch/loongarch.cc
index bdf290654..740c8611a 100644
--- a/gcc/config/loongarch/loongarch.cc
+++ b/gcc/config/loongarch/loongarch.cc
@@ -5533,12 +5533,32 @@ loongarch_expand_conditional_move (rtx *operands)
}
}
+ auto is_binary_op_0_keep_orig = [](enum rtx_code code)
+ {
+ switch (code)
+ {
+ case PLUS:
+ case MINUS:
+ case IOR:
+ case XOR:
+ case ROTATE:
+ case ROTATERT:
+ case ASHIFT:
+ case ASHIFTRT:
+ case LSHIFTRT:
+ return true;
+ default:
+ return false;
+ }
+ };
+
/* Check if the optimization conditions are met. */
if (value_if_true_insn
&& value_if_false_insn
- /* Make sure that value_if_false and var are the same. */
- && BINARY_P (value_if_true_insn_src
- = SET_SRC (single_set (value_if_true_insn)))
+ /* Make sure that the orig value OP 0 keep orig. */
+ && (value_if_true_insn_src
+ = SET_SRC (single_set (value_if_true_insn)))
+ && is_binary_op_0_keep_orig ( GET_CODE (value_if_true_insn_src))
/* Make sure that both value_if_true and value_if_false
has the same var. */
&& rtx_equal_p (XEXP (value_if_true_insn_src, 0),
diff --git a/gcc/testsuite/gcc.target/loongarch/conditional-move-opt-1.c b/gcc/testsuite/gcc.target/loongarch/conditional-move-opt-1.c
index ed13471aa..47802aa96 100644
--- a/gcc/testsuite/gcc.target/loongarch/conditional-move-opt-1.c
+++ b/gcc/testsuite/gcc.target/loongarch/conditional-move-opt-1.c
@@ -27,7 +27,7 @@ void
test_lt ()
{
if (lm < ln)
- lr *= (1 << 16);
+ lr += (1 << 16);
lr += lm;
}
@@ -35,7 +35,7 @@ void
test_le ()
{
if (lm <= ln)
- lr = lm * ((long)1 << 32);
+ lr = lm + ((long)1 << 32);
else
lr = lm;
lr += lm;
diff --git a/gcc/testsuite/gcc.target/loongarch/conditional-move-opt-2.c b/gcc/testsuite/gcc.target/loongarch/conditional-move-opt-2.c
index ac72d4d93..743fd5e67 100644
--- a/gcc/testsuite/gcc.target/loongarch/conditional-move-opt-2.c
+++ b/gcc/testsuite/gcc.target/loongarch/conditional-move-opt-2.c
@@ -29,7 +29,7 @@ void
test_lez ()
{
if (lm <= 0)
- lr &= (1 << 16);
+ lr |= (1 << 16);
lr += lm;
}
diff --git a/gcc/testsuite/gcc.target/loongarch/conditional-move-opt-3.c b/gcc/testsuite/gcc.target/loongarch/conditional-move-opt-3.c
new file mode 100644
index 000000000..95887980c
--- /dev/null
+++ b/gcc/testsuite/gcc.target/loongarch/conditional-move-opt-3.c
@@ -0,0 +1,14 @@
+/* { dg-do compile } */
+/* { dg-options "-O2" } */
+/* { dg-final { scan-assembler "maskeqz" } } */
+/* { dg-final { scan-assembler "masknez" } } */
+
+extern long lm, ln, lr;
+
+void
+test_and ()
+{
+ if (lm < 0)
+ lr &= (1 << 16);
+ lr += lm;
+}
--
2.51.1
@@ -0,0 +1,77 @@
From 21b7d08714c4964403848db4144003835ff5245a Mon Sep 17 00:00:00 2001
From: Linsen Zhou <i@lin.moe>
Date: Fri, 17 Oct 2025 11:05:04 +0800
Subject: [PATCH] tree-object-size.cc: Fix assert constant offset in
check_for_plus_in_loops [PR122012]
After commit 51b85dfeb19652bf3e0aaec08828ba7cee1e641c, when the
pointer offset is a variable in the loop, the object size of the
pointer may also need to be reexamined.
Which make gcc_assert in the check_for_plus_in_loops failed.
gcc/ChangeLog:
PR tree-optimization/122012
* tree-object-size.cc (check_for_plus_in_loops): Skip check
for the variable offset
gcc/testsuite/ChangeLog:
PR tree-optimization/122012
* gcc.dg/torture/pr122012.c: New test.
Signed-off-by: Linsen Zhou <i@lin.moe>
(cherry picked from commit 82cefc4898d4ccabe76e28d6626b91ca9e998923)
---
gcc/testsuite/gcc.dg/torture/pr122012.c | 18 ++++++++++++++++++
gcc/tree-object-size.cc | 7 +++----
2 files changed, 21 insertions(+), 4 deletions(-)
create mode 100644 gcc/testsuite/gcc.dg/torture/pr122012.c
diff --git a/gcc/testsuite/gcc.dg/torture/pr122012.c b/gcc/testsuite/gcc.dg/torture/pr122012.c
new file mode 100644
index 00000000000..055915a1e98
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/pr122012.c
@@ -0,0 +1,18 @@
+/* { dg-do compile } */
+#include <stdlib.h>
+
+void foo();
+
+void test(size_t step) {
+ char *buf = malloc(64);
+ char *p = buf;
+ size_t i;
+
+ for(i = 0; i < 64; ++i) {
+ p += 4;
+ if (__builtin_object_size (p, 2) != 0)
+ foo();
+ p += step;
+ }
+ free(buf);
+}
diff --git a/gcc/tree-object-size.cc b/gcc/tree-object-size.cc
index 2d13ab79a84..76dc2446059 100644
--- a/gcc/tree-object-size.cc
+++ b/gcc/tree-object-size.cc
@@ -2153,12 +2153,11 @@ check_for_plus_in_loops (struct object_size_info *osi, tree var)
&& gimple_assign_rhs_code (stmt) == POINTER_PLUS_EXPR)
{
tree basevar = gimple_assign_rhs1 (stmt);
- tree cst = gimple_assign_rhs2 (stmt);
-
- gcc_assert (TREE_CODE (cst) == INTEGER_CST);
+ tree offset = gimple_assign_rhs2 (stmt);
/* Skip non-positive offsets. */
- if (integer_zerop (cst) || compare_tree_int (cst, offset_limit) > 0)
+ if (TREE_CODE (offset) != INTEGER_CST
+ || integer_zerop (offset) || compare_tree_int (offset, offset_limit) > 0)
return;
osi->depths[SSA_NAME_VERSION (basevar)] = 1;
--
2.51.0
+6 -1
View File
@@ -34,7 +34,7 @@ _pkgsnap="${pkgver##*_git}"
[ "$CHOST" != "$CTARGET" ] && _target="-$CTARGET_ARCH" || _target=""
pkgname=gcc-x86
pkgrel=0
pkgrel=2
pkgdesc="Stage2 cross-compiler for x86"
url="https://gcc.gnu.org"
arch="x86_64"
@@ -279,6 +279,9 @@ source="https://gcc.gnu.org/pub/gcc/releases/gcc-$_pkgbase/gcc-$_pkgbase.tar.xz
0039-except-Don-t-use-the-cached-value-of-the-gcc_except_.patch
0040-ada-libgnat-use-stub-symbolic-module-name-functions.patch
0041-ada-libgnat-recognize-linux-musleabi-and-linux-muslg.patch
0001-tree-object-size.cc-Fix-assert-constant-offset-in-ch.patch
0001-LoongArch-Only-allow-valid-binary-op-when-optimize-c.patch
"
# secfixes:
@@ -793,4 +796,6 @@ eecc77e2a9cf956fd752693ad7f8ff8253a7bb557e00564bb488bbc1deac895e63104cc1182a0bdd
9f4c3fa0d17cfcd72626bdbaf51992ff3018f878d673ab19b9056047ee2630b581e5a5a4d4857444f08ba9bcdb0fc94f90dcda6180816e39690d1652843f0d8a 0039-except-Don-t-use-the-cached-value-of-the-gcc_except_.patch
d166475e340c91bbb24cf257240aab37129b04f2609e5ce323b530ab83853a4c34c525e0072c15732717f1681db07e6b3b0a4d268720c31f460435ccf4c99b7f 0040-ada-libgnat-use-stub-symbolic-module-name-functions.patch
c717764ef52c0226a23cbf434654cdefa6cbf38ec625648575d9143c5513b16d8914c25015db743033b8a46ac5b2c33ab75e1b67076128d67bb1319e5a83dd85 0041-ada-libgnat-recognize-linux-musleabi-and-linux-muslg.patch
c3b64b05332bd4dd7fad3fff3cacd4f9de0512943f1548c6f1205fab1a74c83622024f30471805f57d625198cc32f647b32172914528fd5605d0bf61cb0c3ff1 0001-tree-object-size.cc-Fix-assert-constant-offset-in-ch.patch
e91873055550eba051d9297bec5c6acd27abb9ee6ce8911cdd04b5faf37d77b6b2a7607ec588d2863f13f14b48af9398cb4ac42443d8567bfa5037dc6bd50404 0001-LoongArch-Only-allow-valid-binary-op-when-optimize-c.patch
"
@@ -0,0 +1,130 @@
From 824eae920f0f64dd7687c969a2436b129161fdc9 Mon Sep 17 00:00:00 2001
From: Jinyang He <hejinyang@loongson.cn>
Date: Wed, 29 Oct 2025 16:07:35 +0800
Subject: [PATCH] LoongArch: Only allow valid binary op when optimize
conditional move
It is wrong that optimize from `if (cond) dest op= 1 << shift` to
`dest op= (cond ? 1 : 0) << shift` when `dest op 0 != dest`.
Like `and`, `mul` or `div`.
And in this optimization `mul` and `div` is optimized to shift.
gcc/ChangeLog:
* config/loongarch/loongarch.cc
(loongarch_expand_conditional_move): Only allow valid binary
op when optimize conditional move.
gcc/testsuite/ChangeLog:
* gcc.target/loongarch/conditional-move-opt-1.c: Remove mul.
* gcc.target/loongarch/conditional-move-opt-2.c: Remove and.
* gcc.target/loongarch/conditional-move-opt-3.c: New test.
Co-Authored-By: Peng Fan <fanpeng@loongson.cn>
---
gcc/config/loongarch/loongarch.cc | 26 ++++++++++++++++---
.../loongarch/conditional-move-opt-1.c | 4 +--
.../loongarch/conditional-move-opt-2.c | 2 +-
.../loongarch/conditional-move-opt-3.c | 14 ++++++++++
4 files changed, 40 insertions(+), 6 deletions(-)
create mode 100644 gcc/testsuite/gcc.target/loongarch/conditional-move-opt-3.c
diff --git a/gcc/config/loongarch/loongarch.cc b/gcc/config/loongarch/loongarch.cc
index bdf290654..740c8611a 100644
--- a/gcc/config/loongarch/loongarch.cc
+++ b/gcc/config/loongarch/loongarch.cc
@@ -5533,12 +5533,32 @@ loongarch_expand_conditional_move (rtx *operands)
}
}
+ auto is_binary_op_0_keep_orig = [](enum rtx_code code)
+ {
+ switch (code)
+ {
+ case PLUS:
+ case MINUS:
+ case IOR:
+ case XOR:
+ case ROTATE:
+ case ROTATERT:
+ case ASHIFT:
+ case ASHIFTRT:
+ case LSHIFTRT:
+ return true;
+ default:
+ return false;
+ }
+ };
+
/* Check if the optimization conditions are met. */
if (value_if_true_insn
&& value_if_false_insn
- /* Make sure that value_if_false and var are the same. */
- && BINARY_P (value_if_true_insn_src
- = SET_SRC (single_set (value_if_true_insn)))
+ /* Make sure that the orig value OP 0 keep orig. */
+ && (value_if_true_insn_src
+ = SET_SRC (single_set (value_if_true_insn)))
+ && is_binary_op_0_keep_orig ( GET_CODE (value_if_true_insn_src))
/* Make sure that both value_if_true and value_if_false
has the same var. */
&& rtx_equal_p (XEXP (value_if_true_insn_src, 0),
diff --git a/gcc/testsuite/gcc.target/loongarch/conditional-move-opt-1.c b/gcc/testsuite/gcc.target/loongarch/conditional-move-opt-1.c
index ed13471aa..47802aa96 100644
--- a/gcc/testsuite/gcc.target/loongarch/conditional-move-opt-1.c
+++ b/gcc/testsuite/gcc.target/loongarch/conditional-move-opt-1.c
@@ -27,7 +27,7 @@ void
test_lt ()
{
if (lm < ln)
- lr *= (1 << 16);
+ lr += (1 << 16);
lr += lm;
}
@@ -35,7 +35,7 @@ void
test_le ()
{
if (lm <= ln)
- lr = lm * ((long)1 << 32);
+ lr = lm + ((long)1 << 32);
else
lr = lm;
lr += lm;
diff --git a/gcc/testsuite/gcc.target/loongarch/conditional-move-opt-2.c b/gcc/testsuite/gcc.target/loongarch/conditional-move-opt-2.c
index ac72d4d93..743fd5e67 100644
--- a/gcc/testsuite/gcc.target/loongarch/conditional-move-opt-2.c
+++ b/gcc/testsuite/gcc.target/loongarch/conditional-move-opt-2.c
@@ -29,7 +29,7 @@ void
test_lez ()
{
if (lm <= 0)
- lr &= (1 << 16);
+ lr |= (1 << 16);
lr += lm;
}
diff --git a/gcc/testsuite/gcc.target/loongarch/conditional-move-opt-3.c b/gcc/testsuite/gcc.target/loongarch/conditional-move-opt-3.c
new file mode 100644
index 000000000..95887980c
--- /dev/null
+++ b/gcc/testsuite/gcc.target/loongarch/conditional-move-opt-3.c
@@ -0,0 +1,14 @@
+/* { dg-do compile } */
+/* { dg-options "-O2" } */
+/* { dg-final { scan-assembler "maskeqz" } } */
+/* { dg-final { scan-assembler "masknez" } } */
+
+extern long lm, ln, lr;
+
+void
+test_and ()
+{
+ if (lm < 0)
+ lr &= (1 << 16);
+ lr += lm;
+}
--
2.51.1
@@ -0,0 +1,77 @@
From 21b7d08714c4964403848db4144003835ff5245a Mon Sep 17 00:00:00 2001
From: Linsen Zhou <i@lin.moe>
Date: Fri, 17 Oct 2025 11:05:04 +0800
Subject: [PATCH] tree-object-size.cc: Fix assert constant offset in
check_for_plus_in_loops [PR122012]
After commit 51b85dfeb19652bf3e0aaec08828ba7cee1e641c, when the
pointer offset is a variable in the loop, the object size of the
pointer may also need to be reexamined.
Which make gcc_assert in the check_for_plus_in_loops failed.
gcc/ChangeLog:
PR tree-optimization/122012
* tree-object-size.cc (check_for_plus_in_loops): Skip check
for the variable offset
gcc/testsuite/ChangeLog:
PR tree-optimization/122012
* gcc.dg/torture/pr122012.c: New test.
Signed-off-by: Linsen Zhou <i@lin.moe>
(cherry picked from commit 82cefc4898d4ccabe76e28d6626b91ca9e998923)
---
gcc/testsuite/gcc.dg/torture/pr122012.c | 18 ++++++++++++++++++
gcc/tree-object-size.cc | 7 +++----
2 files changed, 21 insertions(+), 4 deletions(-)
create mode 100644 gcc/testsuite/gcc.dg/torture/pr122012.c
diff --git a/gcc/testsuite/gcc.dg/torture/pr122012.c b/gcc/testsuite/gcc.dg/torture/pr122012.c
new file mode 100644
index 00000000000..055915a1e98
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/pr122012.c
@@ -0,0 +1,18 @@
+/* { dg-do compile } */
+#include <stdlib.h>
+
+void foo();
+
+void test(size_t step) {
+ char *buf = malloc(64);
+ char *p = buf;
+ size_t i;
+
+ for(i = 0; i < 64; ++i) {
+ p += 4;
+ if (__builtin_object_size (p, 2) != 0)
+ foo();
+ p += step;
+ }
+ free(buf);
+}
diff --git a/gcc/tree-object-size.cc b/gcc/tree-object-size.cc
index 2d13ab79a84..76dc2446059 100644
--- a/gcc/tree-object-size.cc
+++ b/gcc/tree-object-size.cc
@@ -2153,12 +2153,11 @@ check_for_plus_in_loops (struct object_size_info *osi, tree var)
&& gimple_assign_rhs_code (stmt) == POINTER_PLUS_EXPR)
{
tree basevar = gimple_assign_rhs1 (stmt);
- tree cst = gimple_assign_rhs2 (stmt);
-
- gcc_assert (TREE_CODE (cst) == INTEGER_CST);
+ tree offset = gimple_assign_rhs2 (stmt);
/* Skip non-positive offsets. */
- if (integer_zerop (cst) || compare_tree_int (cst, offset_limit) > 0)
+ if (TREE_CODE (offset) != INTEGER_CST
+ || integer_zerop (offset) || compare_tree_int (offset, offset_limit) > 0)
return;
osi->depths[SSA_NAME_VERSION (basevar)] = 1;
--
2.51.0
+6 -1
View File
@@ -34,7 +34,7 @@ _pkgsnap="${pkgver##*_git}"
[ "$CHOST" != "$CTARGET" ] && _target="-$CTARGET_ARCH" || _target=""
pkgname=gcc-x86_64
pkgrel=0
pkgrel=2
pkgdesc="Stage2 cross-compiler for x86_64"
url="https://gcc.gnu.org"
arch="aarch64"
@@ -279,6 +279,9 @@ source="https://gcc.gnu.org/pub/gcc/releases/gcc-$_pkgbase/gcc-$_pkgbase.tar.xz
0039-except-Don-t-use-the-cached-value-of-the-gcc_except_.patch
0040-ada-libgnat-use-stub-symbolic-module-name-functions.patch
0041-ada-libgnat-recognize-linux-musleabi-and-linux-muslg.patch
0001-tree-object-size.cc-Fix-assert-constant-offset-in-ch.patch
0001-LoongArch-Only-allow-valid-binary-op-when-optimize-c.patch
"
# secfixes:
@@ -793,4 +796,6 @@ eecc77e2a9cf956fd752693ad7f8ff8253a7bb557e00564bb488bbc1deac895e63104cc1182a0bdd
9f4c3fa0d17cfcd72626bdbaf51992ff3018f878d673ab19b9056047ee2630b581e5a5a4d4857444f08ba9bcdb0fc94f90dcda6180816e39690d1652843f0d8a 0039-except-Don-t-use-the-cached-value-of-the-gcc_except_.patch
d166475e340c91bbb24cf257240aab37129b04f2609e5ce323b530ab83853a4c34c525e0072c15732717f1681db07e6b3b0a4d268720c31f460435ccf4c99b7f 0040-ada-libgnat-use-stub-symbolic-module-name-functions.patch
c717764ef52c0226a23cbf434654cdefa6cbf38ec625648575d9143c5513b16d8914c25015db743033b8a46ac5b2c33ab75e1b67076128d67bb1319e5a83dd85 0041-ada-libgnat-recognize-linux-musleabi-and-linux-muslg.patch
c3b64b05332bd4dd7fad3fff3cacd4f9de0512943f1548c6f1205fab1a74c83622024f30471805f57d625198cc32f647b32172914528fd5605d0bf61cb0c3ff1 0001-tree-object-size.cc-Fix-assert-constant-offset-in-ch.patch
e91873055550eba051d9297bec5c6acd27abb9ee6ce8911cdd04b5faf37d77b6b2a7607ec588d2863f13f14b48af9398cb4ac42443d8567bfa5037dc6bd50404 0001-LoongArch-Only-allow-valid-binary-op-when-optimize-c.patch
"
+3 -3
View File
@@ -8,7 +8,7 @@ fi
pkgname=musl-aarch64
pkgver=1.2.5
pkgrel=20
pkgrel=21
arch="x86_64"
subpackages="musl-dev-aarch64:package_dev"
@@ -57,6 +57,6 @@ package_dev() {
}
sha512sums="
50f63cda14a40b017f891e0967bdc21e4d3bc02aa60334e53cbd612f7c6c2672e9de02a153d2fdfadf7fa309a0842bb5cd3e4906d783db898bfc2ad86015ac36 musl-1.2.5-r20-aarch64-edge.apk
d658eab31f3c1ed12fe4af71285ce97d240548d82ed63967f94a214efc3d8b4f316cd00c21438fa805e936d07f3ca32698c086db832f0d63ad5793d601174f0c musl-dev-1.2.5-r20-aarch64-edge.apk
dce3b131910f7596f8f1d7c2662805b619a151313c7822cf56a7529b6a8b3baf708bfab649be42d920b173dbd7caf33c667ab120779728b9c271439e1190d4ce musl-1.2.5-r21-aarch64-edge.apk
e635424ca037e3d949f793de68218e43fc25f0633aa27d1c330d96d97a8473643683f37bd545022bcb25c8298b8ed54288cf48ccc9633b6dda849cfa187d1019 musl-dev-1.2.5-r21-aarch64-edge.apk
"
+3 -3
View File
@@ -8,7 +8,7 @@ fi
pkgname=musl-armhf
pkgver=1.2.5
pkgrel=20
pkgrel=21
arch="x86_64"
subpackages="musl-dev-armhf:package_dev"
@@ -57,6 +57,6 @@ package_dev() {
}
sha512sums="
62cfdede4c1ef611ad9386409052fd3d2544749eb79d945eaaddab438deeca316c561211a4eeee012e88e92ed29a1580f82abee95ea75351ae0f754c8af31f3e musl-1.2.5-r20-armhf-edge.apk
b4277045fac537c84aa04f29e29cd72c9e01b821b5e8104c1c6c48d8d53e454ce27cb70bc8f9c51984b0235d1c308312412cedf664a221b9e570dcf2354e3cd6 musl-dev-1.2.5-r20-armhf-edge.apk
b5411d6b4e03c1c8767906733d091e3438b5ca61959395e5de969a311c131d460052d6ad0c776740bce51a57ea7956ceb11e76355ddc9cc7b045804dfea9927e musl-1.2.5-r21-armhf-edge.apk
cb52d3a273cfe102f1c782412d0fa5cb24d735527c99e6702aa456d04655bb09f2939c8c64db86c7e256579cc4179c5fbf1f56b6461596a5e298494c4464c35d musl-dev-1.2.5-r21-armhf-edge.apk
"
+3 -3
View File
@@ -8,7 +8,7 @@ fi
pkgname=musl-armv7
pkgver=1.2.5
pkgrel=20
pkgrel=21
arch="x86_64"
subpackages="musl-dev-armv7:package_dev"
@@ -57,6 +57,6 @@ package_dev() {
}
sha512sums="
f72f1a4393f44012a8c5bab9051c2a632d170a5258b3da6996eb22ef1d91f75360c47554be45ce8adea83c7dca51fda3385ef81c5806f6b5666aea674c8904d4 musl-1.2.5-r20-armv7-edge.apk
44f4e751bc811bb51dc857460e4b66999db269b5bbfdcbbc97af022b4c7787f37b439d5e60f64cdfc3ad3f22ae4b4a4f02c38e815ad34c2a9276c196168aa9a2 musl-dev-1.2.5-r20-armv7-edge.apk
440fa575b03ca4253d9d25fbe5a59ae3164ba945c012d12224ef829786afa14c654a2ff3868fedbd200bbbadd5789539f6d88def7831ca207e63a1d753021e5e musl-1.2.5-r21-armv7-edge.apk
3b7ce82a7ab3c02cb302614898ca68356ed18512f37f3632b1ef8df44b242b40b528c60c42cc19cb6b31c1e197019bf712713eb3b7998b4efbf96dc2aac29723 musl-dev-1.2.5-r21-armv7-edge.apk
"
+62
View File
@@ -0,0 +1,62 @@
# Automatically generated aport, do not edit!
# Generator: pmbootstrap aportgen musl-loongarch64
# Stub for apkbuild-lint
if [ -z "$(type -t arch_to_hostspec)" ]; then
arch_to_hostspec() { :; }
fi
pkgname=musl-loongarch64
pkgver=1.2.5
pkgrel=21
arch="x86_64"
subpackages="musl-dev-loongarch64:package_dev"
_arch="loongarch64"
_mirror="http://dl-4.alpinelinux.org/alpine/"
url="https://musl-libc.org"
license="MIT"
options="!check !strip"
pkgdesc="the musl library (lib c) implementation for $_arch"
_target="$(arch_to_hostspec $_arch)"
source="
musl-$pkgver-r$pkgrel-$_arch-edge.apk::$_mirror/edge/main/$_arch/musl-$pkgver-r$pkgrel.apk
musl-dev-$pkgver-r$pkgrel-$_arch-edge.apk::$_mirror/edge/main/$_arch/musl-dev-$pkgver-r$pkgrel.apk
"
package() {
mkdir -p "$pkgdir/usr/$_target"
cd "$pkgdir/usr/$_target"
# Use 'busybox tar' to avoid 'tar: Child returned status 141'
# on some machines (builds.sr.ht, gitlab-ci). See pmaports#26.
busybox tar -xf $srcdir/musl-$pkgver-r$pkgrel-$_arch-edge.apk
rm .PKGINFO .SIGN.*
}
package_dev() {
mkdir -p "$subpkgdir/usr/$_target"
cd "$subpkgdir/usr/$_target"
# Use 'busybox tar' to avoid 'tar: Child returned status 141'
# on some machines (builds.sr.ht, gitlab-ci). See pmaports#26.
busybox tar -xf $srcdir/musl-dev-$pkgver-r$pkgrel-$_arch-edge.apk
rm .PKGINFO .SIGN.*
# symlink everything from /usr/$_target/usr/*
# to /usr/$_target/* so the cross-compiler gcc does not fail
# to build.
for _dir in include lib; do
mkdir -p "$subpkgdir/usr/$_target/$_dir"
cd "$subpkgdir/usr/$_target/usr/$_dir"
for i in *; do
cd "$subpkgdir/usr/$_target/$_dir"
ln -s /usr/$_target/usr/$_dir/$i $i
done
done
}
sha512sums="
ec3cafd077ad5d07aadd75fdefadb6bcb625979eec47f2ac4ac675471c4d57c956c563bbcb1a455fe30b72212047cff8a1d7f4e4d143ad681a1f3c71c98614fd musl-1.2.5-r21-loongarch64-edge.apk
6bfff1beebaa45f409e414e3213c1260a98fc6a1345e11f41d23dcc1a7d37380ae21c538e28e72ab1c4ce5370f3e776dad6e827f741358ce85888bf5ab4e027c musl-dev-1.2.5-r21-loongarch64-edge.apk
"
+3 -3
View File
@@ -8,7 +8,7 @@ fi
pkgname=musl-ppc64le
pkgver=1.2.5
pkgrel=20
pkgrel=21
arch="x86_64"
subpackages="musl-dev-ppc64le:package_dev"
@@ -57,6 +57,6 @@ package_dev() {
}
sha512sums="
758d43964574c8d2bbc44c79a3842e84eeb724853e263747e9acd09a5c59c464fa1a6d20e5ef4249a27cf8b8d6014ec9aaa106a51ef5143c13a03550119f9293 musl-1.2.5-r20-ppc64le-edge.apk
1d474396e2e2e9ef8b2af5baa2e77085b8962798b8ef674f93648da4abf20fa2a9f49ce859f49ebecf11dece549a76adc1c1be8120ed26f1c24daf5c4ef89f63 musl-dev-1.2.5-r20-ppc64le-edge.apk
0e2720a11cd9c4417c96301d71f97dcc65ebe990e0115628aa30fe95debce12db75a716def86b4326074110c5e515f5f6876691c693c72ae211d641a43ba73cf musl-1.2.5-r21-ppc64le-edge.apk
fcea40a1616b49350f90fb1f0ba99ea8e7cf40544044133553ef4d70f24376d489fa5ff85c15aa4550e4283915eb172c14429ef439a51cd1ec7e08f3a231ce04 musl-dev-1.2.5-r21-ppc64le-edge.apk
"
+3 -3
View File
@@ -8,7 +8,7 @@ fi
pkgname=musl-riscv64
pkgver=1.2.5
pkgrel=20
pkgrel=21
arch="x86_64"
subpackages="musl-dev-riscv64:package_dev"
@@ -57,6 +57,6 @@ package_dev() {
}
sha512sums="
d305e3c1e7515709e11b87e0fa1d04020f9ed3bccf8a8ae5e599703381eee1a4329c51776b34a15140d9f843c0e48253b7f5145e71df619573fda4d68bc45c85 musl-1.2.5-r20-riscv64-edge.apk
8a9e0f5a55d2c3f74f59230a6012f386c59dfde34866099d57601212300c92105de34615f99a19a4e9dfff7f7623e1ff956d7e8bcbfdcfa58a87257704b623e9 musl-dev-1.2.5-r20-riscv64-edge.apk
c3f9b76c99bd9c1426f4f87b1d60405e3b4fc6c93451d08b72338496b4cefae6692ef0b0ab9f09b78317d944289060b38c0a7072737d92b3f75fbb0fd8e81132 musl-1.2.5-r21-riscv64-edge.apk
2b28646a759b54c3b2846499c04df7d9b8195da8892a004cbefb69625bbbb874bbc1748ce3d49738931e1e321ab5d90482b08783d07efe28f55d8d1657d451dd musl-dev-1.2.5-r21-riscv64-edge.apk
"
+3 -3
View File
@@ -8,7 +8,7 @@ fi
pkgname=musl-x86
pkgver=1.2.5
pkgrel=20
pkgrel=21
arch="x86_64"
subpackages="musl-dev-x86:package_dev"
@@ -57,6 +57,6 @@ package_dev() {
}
sha512sums="
1a82fbc238e6c431cf067af2442c6b83c0112e89559115b218a95bf7bb78d38ea0a768af41228c8f88ce1100b3c276de476dce6f0fd574f3188e6d48948d0cb3 musl-1.2.5-r20-x86-edge.apk
9e9ecb96d5b64bd6ecf0fe52c5ca00bb97472b31469140ff54d6040969f7ebcbb0814c8f2bb813fcfc4fd45569d1bc81d135b73f84eb8e9b6b0eaa2e4fa27329 musl-dev-1.2.5-r20-x86-edge.apk
6b0da8df450dc4f9b15851a0cdcfc8249f5cc6bedf91ce0d04d6b810b6d2970337345bb8ea83d6b66927be24b88395779b0f660c3511ac2adedbbae76e5c2dc2 musl-1.2.5-r21-x86-edge.apk
771c4002ede113c134bc00586dcafba4004c3860ca715723d680c5d8916d42a0a888094276d24405a8e6a39ff79e4690f0021fff075909398ae3f7379cdb6c25 musl-dev-1.2.5-r21-x86-edge.apk
"
+3 -3
View File
@@ -8,7 +8,7 @@ fi
pkgname=musl-x86_64
pkgver=1.2.5
pkgrel=20
pkgrel=21
arch="aarch64"
subpackages="musl-dev-x86_64:package_dev"
@@ -57,6 +57,6 @@ package_dev() {
}
sha512sums="
28e6c1da9ebd530680e778bbcb800a058aaabe8307b8acb49994140e43aa7244c28e743ef4452614a276b14fdb8daeda88e79bbf833a06731fb2f861301c9acb musl-1.2.5-r20-x86_64-edge.apk
fdc575938fff7d3465e6db64bdb070e356647cba099525e35b6bfcefec2e86a70278f221eba6e522d8483126c075091c33a1034508d789f4d7599fe3a8cf0775 musl-dev-1.2.5-r20-x86_64-edge.apk
a378f3015c9222161aaa8ffd34038880f923e7a86cb400dac886d1c1adcf691e55798844f8fa6a4ee3ca9ee4d1a1a5d5ea616a550ac0d99933e64a68c2d65332 musl-1.2.5-r21-x86_64-edge.apk
87296e7eb778ba4153c6fb27f596561ea7997ee5aa67346aeee9b42687ccb6a5d45e1c1faa2f13d1742e45f47898d78629db3320f640ef8700b55f710584662a musl-dev-1.2.5-r21-x86_64-edge.apk
"
+2 -2
View File
@@ -2,7 +2,7 @@
pkgname=systemd-boot-x86
_pkgname=systemd-boot # for monitoring
pkgver=258
pkgver=258.2
pkgrel=0
pkgdesc="systemd's EFI boot manager for x86 EFI on x86_64."
url="https://systemd.io/"
@@ -119,7 +119,7 @@ efistub() {
}
sha512sums="
c488354da1c170ad02e10926f561d1985c3c3393fec878562f295ef764fdf3a1b2877c3b2549253f19bf23e357be6e443a50b937f60f4677f286d3402d611b85 systemd-258.tar.gz
1dc016a5a037aec2682e08d2add0dcf8d03db15b45ce8c6b677898f734aefd4694ce18e588d579e42514071fc4c167b2bf53808478b2bd3856b257c9fbcde45d systemd-258.2.tar.gz
9ff8da74fa51b0ededaf6cf7b80b03f433c8617db39eb5cde01477031fa00724b8b7bdf68c945c277510f81e7fbbf3b2732f2c781b0f6ce67569b2737581595b 0001-patch-wchar_t-for-musl.patch
5cffc18f3eaaab1b6cc8f7191afed628036b9e794ca7f9fe0a7eb4653862f8cd2b43f18483916b52cdca4ddb17b8baae5baa212aa152b1ae8f2b31d57d6e1f45 0002-meson-minimal-configure-for-building-systemd-boot.patch
ad54e2c7e7a21bfa9b5f9e8db1b6af6a6d78a3e5dfe2dafcec77488f6224865ab4d4c8a8c8ee1c54c99d1741361e9fb3a51e5d36bcbc7a1c3fdcc4d0c1672132 cross-x86.meson
@@ -2,7 +2,7 @@
# Reference: <https://postmarketos.org/devicepkg>
pkgname=device-alcatel-idol347-downstream
pkgdesc="Alcatel OneTouch Idol 3 (4.7) (Downstream)"
pkgver=2
pkgver=3
pkgrel=0
url="https://postmarketos.org"
license="MIT"
@@ -21,5 +21,5 @@ package() {
}
sha512sums="
131bddf782050fd8301ebd242a5b19cd70c520f03fe2e8a2f0b7afba60cc3dc0330f3765395de70553fc172a116a02a9512c3fc189303cb09609e4adac76a799 deviceinfo
118b62d7ad6d9b62f0d63a1749005321fdf73417f95e8d70e761b6755f7c4e0164b2b476c8e1aad93dc42cd4df24384f660e21af6c62a9f8eda4d3e3bd8298e6 deviceinfo
"
@@ -10,7 +10,6 @@ deviceinfo_arch="armv7"
# Device related
deviceinfo_chassis="handset"
deviceinfo_keyboard="false"
deviceinfo_external_storage="true"
deviceinfo_screen_width="720"
deviceinfo_screen_height="1280"
@@ -20,7 +19,6 @@ deviceinfo_flash_method="fastboot"
deviceinfo_kernel_cmdline="console=ttyHSL0,115200,n8 androidboot.console=ttyHSL0 androidboot.hardware=qcom msm_rtb.filter=0x237 ehci-hcd.park=3 androidboot.bootdevice=7824900.sdhci lpm_levels.sleep_disabled=1 earlyprintk androidboot.bootloader=L1BGC0C0BG00"
deviceinfo_generate_bootimg="true"
deviceinfo_bootimg_qcdt="false"
deviceinfo_bootimg_dtb_second="false"
deviceinfo_flash_offset_base="0x80000000"
deviceinfo_flash_offset_kernel="0x00008000"
deviceinfo_flash_offset_ramdisk="0x01000000"
Loaded 100 of 2045 files, more files were not shown because too many files have changed in this diff. Show more