Compare commits

...
185 Commits
Author SHA1 Message Date
Luca Weiss 491e7b8b8a linux-postmarketos-qcom-msm8226: update to latest kconfig
Manual kconfig changes:
* CACHEFILES=m (category:netmount)
* CRYPTO_CAMELLIA=m (category:netmount)
* CRYPTO_CTS=y (category:netmount)
* FSCACHE=y (category:netmount)
* NFS_FSCACHE=y (category:netmount)
* NFS_V4_2=y (category:netmount)
* NFSD=m (category:netmount)
* NFSD_V3_ACL=y (category:netmount)
* NFSD_V4=y (category:netmount)
* NFSD_PNFS=y (category:netmount)
* NFSD_BLOCKLAYOUT=y (category:netmount)
* NFSD_SCSILAYOUT=y (category:netmount)
* NFSD_V4_2_INTER_SSC=y (category:netmount)
* RPCSEC_GSS_KRB5_ENCTYPES_AES_SHA1=y (category:netmount)
* RPCSEC_GSS_KRB5_ENCTYPES_AES_SHA2=y (category:netmount)
* RPCSEC_GSS_KRB5_ENCTYPES_CAMELLIA=y (category:netmount)
* CRYPTO_AES_TI=m (category:netmount)
* NFS_V4_1=y (category:netmount)
* ACCESSIBILITY=y (category:accessibility)
* A11Y_BRAILLE_CONSOLE=y (category:accessibility)
* SPEAKUP=m (category:accessibility)
* SPEAKUP_SYNTH_ACNTSA=m (category:accessibility)
* SPEAKUP_SYNTH_APOLLO=m (category:accessibility)
* SPEAKUP_SYNTH_AUDPTR=m (category:accessibility)
* SPEAKUP_SYNTH_BNS=m (category:accessibility)
* SPEAKUP_SYNTH_DECTLK=m (category:accessibility)
* SPEAKUP_SYNTH_DECEXT=m (category:accessibility)
* SPEAKUP_SYNTH_LTLK=m (category:accessibility)
* SPEAKUP_SYNTH_SOFT=m (category:accessibility)
* SPEAKUP_SYNTH_SPKOUT=m (category:accessibility)
* SPEAKUP_SYNTH_TXPRT=m (category:accessibility)
* SECURITY_DMESG_RESTRICT=y (category:hardening)
2026-05-12 12:00:17 +02:00
Aelin c57ccbf57b linux-postmarketos-mainline: Upgrade to 7.1_rc3
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/8528>
2026-05-11 22:46:43 +00:00
Andreas Kemnade f9357ff76b linux-epson-embt2ws: Update to 7.0.6
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/8527>
2026-05-11 20:27:27 +00:00
Luca Leonardo Scorcia d64e7f263b main/postmarketos-mkinitfs-hook-netboot: remove redundant 'ERROR:' prefix
Remove the now redundant 'ERROR:' prefix.

Signed-off-by: Luca Leonardo Scorcia <l.scorcia@gmail.com>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/8526>
2026-05-11 19:14:26 +00:00
Luca Leonardo Scorcia 2a350af160 main/postmarketos-mkinitfs-hook-netboot: update show_splash calls for plymouth
The show_splash function has been replaced by splash_show,
splash_set_message and splash_set_error, but the netboot hook still calls
the old function, logging errors in boot dmesg.

Signed-off-by: Luca Leonardo Scorcia <l.scorcia@gmail.com>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/8526>
2026-05-11 19:14:26 +00:00
adamthiede 8dda93f2e4 linux-postmarketos-mediatek-mt8173: upgrade to 7.0.6 and update config
- Once again, another vuln: https://lwn.net/Articles/1071775/
- Adding required kconfig items

Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/8514>
2026-05-11 19:09:04 +00:00
Pablo Correa Gómez ff3de1ac4d main/postmarketos-base: drop innefective empty replaces
The main package does not have a replaces, so this is just redundant

Signed-off-by: Pablo Correa Gómez <pabloyoyoista@postmarketos.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/8522>
2026-05-11 18:39:10 +00:00
Pablo Correa Gómez 38c285af62 main/postmarketos-base-nofde: integrate as postmarketos-base subpackage
This is pretty pointless as an independent subpackage

Signed-off-by: Pablo Correa Gómez <pabloyoyoista@postmarketos.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/8522>
2026-05-11 18:39:10 +00:00
Pablo Correa Gómez 747fca72f1 main/postmarketos-base-nofde: drop inneffective provider_priority
It's ignored whenever the provides is versioned!

Signed-off-by: Pablo Correa Gómez <pabloyoyoista@postmarketos.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/8522>
2026-05-11 18:39:07 +00:00
Pablo Correa Gómez c3fb6da297 main/unl0kr: fix postmarketos-fde-unlocker provider not being versioned
And therefore remove the unnecessary "provider_priority". The
postmarketos-base-nofde is already versioned, and there is no situation
in which having both unl0kr and postmarketos-base-nofde installed
makes sense.

Signed-off-by: Pablo Correa Gómez <pabloyoyoista@postmarketos.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/8522>
2026-05-11 18:39:03 +00:00
Steven Lamphear 7c57ec6983 device-fairphone-fp6: move sim-wait-time.conf to -systemd subpackage
Co-authored by: @craftyguy

Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/8428>
2026-05-11 17:29:20 +00:00
Steven Lamphear eb61326447 device-fairphone-fp6: fix sim detection on cold boot
On cold boot, msm-modem-uim-selection's default 4-second SIM
detection timeout expires before the modem's UIM service is ready,
leaving ModemManager stuck in a "sim-missing" failed state and
requiring the user to manually run `systemctl restart ModemManager`.

Install a systemd drop-in override that increases SIM_WAIT_TIME from
the default 4 seconds to 30 seconds, giving the modem enough time to
finish initializing on this device.

Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/8428>
2026-05-11 17:29:20 +00:00
Luca Leonardo Scorcia 79325d16d5 main/postmarketos-initramfs: fix leftover pbsplash call in debug_shell
The hide_splash function has been renamed to splash_hide.

Signed-off-by: Luca Leonardo Scorcia <l.scorcia@gmail.com>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/8525>
2026-05-11 09:23:29 +00:00
bluebunny 299759f051 linux-postmarketos-exynos7870: set CONFIG_NLS_ASCII, sync kconfig, install modules to /usr
Without CONFIG_NLS_ASCII=y, the kernel fails to boot from fat32 ESP.

Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/8515>
2026-05-11 09:19:50 +00:00
bluebunny 768de0abe4 firmware-samsung-{a2corelte,j6lte,on7xelte}: drop
Bluetooth firmware are all in upstream linux-firmware-brcm, and Wi-Fi can be
functional by symlinking inside the device package.

Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/8515>
2026-05-11 09:19:50 +00:00
bluebunny 3dd9d1522f device-samsung-{a2corelte,j6lte,j7xelte,on7xelte}: drop
Switch to generic port samsung-exynos7.

Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/8515>
2026-05-11 09:19:50 +00:00
bluebunny 8e343f6183 samsung-exynos7: switch to generic port for {a2corelte,j6lte,j7xelte,on7xelte}
Add myself as a co-maintainer.

Simplify the device name across APKBUILD and deviceinfo.

Depend on linux-firmware-brcm and add all related symlinks for enabling Wi-Fi support.

Follow the device package template for generic kernels [1] and add the close-to-mainline
kernel alongside the generic kernels. This is done because vanilla upstream kernels are
not very usable at the moment. (e.g. Wi-Fi doesn't work at all, j7xelte doesn't boot
due to lack of proper DRM)

[1]: https://docs.postmarketos.org/pmaports/main/generic-kernels.html#device-package-template

Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/8515>
2026-05-11 09:19:50 +00:00
Antoine Martin 522114f550 device-clockworkpi-uconsole-rpi: take maintainership
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/8524>
2026-05-11 06:00:11 +00:00
Stefan Hansson 8133df094d Revert "main/postmarketos-mkinitfs-hook: merge mkinitfs-hook packages into one"
This breaks pmbootstrap's hook handling.

Closes https://gitlab.postmarketos.org/postmarketOS/pmbootstrap/-/work_items/2759

This reverts commit 38ccc2ac8a.

[ci:skip-vercheck]: These aren't "new" packages per se.

Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/8511>
2026-05-10 13:43:38 +00:00
Stefan Hansson aa19f54ef9 Revert "ci: shellcheck: update mkinitfs hook paths"
This reverts commit 59beb3ba91.

Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/8511>
2026-05-10 13:43:38 +00:00
Aster Boese 30b14c3938 lynx-r1: add maintainer
See https://gitlab.postmarketos.org/postmarketOS/pmaports/-/work_items/4445#note_551859

Signed-off-by: Aster Boese <asterboese@mailbox.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/8523>
2026-05-10 10:37:21 +02:00
Luca Weiss c8c48bb2d3 linux-postmarketos-qcom-sm6350: upgrade to 7.0.5
* CACHEFILES=m (category:netmount)
* CRYPTO_CAMELLIA=m (category:netmount)
* CRYPTO_CTS=y (category:netmount)
* FSCACHE=y (category:netmount)
* NFS_FS=m (category:netmount)
* NFS_FSCACHE=y (category:netmount)
* NFS_V3=m (category:netmount)
* NFS_V4=m (category:netmount)
* NFS_V4_2=y (category:netmount)
* NFSD=m (category:netmount)
* NFSD_V3_ACL=y (category:netmount)
* NFSD_V4=y (category:netmount)
* NFSD_PNFS=y (category:netmount)
* NFSD_BLOCKLAYOUT=y (category:netmount)
* NFSD_SCSILAYOUT=y (category:netmount)
* NFSD_V4_2_INTER_SSC=y (category:netmount)
* RPCSEC_GSS_KRB5=m (category:netmount)
* RPCSEC_GSS_KRB5_ENCTYPES_AES_SHA1=y (category:netmount)
* RPCSEC_GSS_KRB5_ENCTYPES_AES_SHA2=y (category:netmount)
* RPCSEC_GSS_KRB5_ENCTYPES_CAMELLIA=y (category:netmount)
* ACCESSIBILITY=y (category:accessibility)
* A11Y_BRAILLE_CONSOLE=y (category:accessibility)
* SPEAKUP=m (category:accessibility)
* SPEAKUP_SYNTH_ACNTSA=m (category:accessibility)
* SPEAKUP_SYNTH_APOLLO=m (category:accessibility)
* SPEAKUP_SYNTH_AUDPTR=m (category:accessibility)
* SPEAKUP_SYNTH_BNS=m (category:accessibility)
* SPEAKUP_SYNTH_DECTLK=m (category:accessibility)
* SPEAKUP_SYNTH_DECEXT=m (category:accessibility)
* SPEAKUP_SYNTH_LTLK=m (category:accessibility)
* SPEAKUP_SYNTH_SOFT=m (category:accessibility)
* SPEAKUP_SYNTH_SPKOUT=m (category:accessibility)
* SPEAKUP_SYNTH_TXPRT=m (category:accessibility)

Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/8512>
2026-05-09 23:07:35 +00:00
Luca Weiss fec2d011a2 linux-postmarketos-qcom-sc7280: upgrade to 7.0.5
Enable all the 'accessibility' options as well.

Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/8498>
2026-05-09 23:05:00 +00:00
Sicelo A. Mhlongo 33cea5f892 linux-postmarketos-omap: Add accessibility kconfigs
Signed-off-By: Sicelo A. Mhlongo <absicsz@gmail.com>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/8471>
2026-05-09 18:29:24 +00:00
Sicelo A. Mhlongo 6b6306918c linux-postmarketos-omap: add CFI compatibility patch
omap4_finish_suspend is defined in arm assembly and is thus invisible to CFI,
causing errors when called directly as .finish_suspend. Wrap it in a function
which calls the assembly function.

The goal is to upstream the patch.

Signed-off-By: Sicelo A. Mhlongo <absicsz@gmail.com>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/8471>
2026-05-09 18:29:24 +00:00
Sicelo A. Mhlongo 66f3535d7a linux-postmarketos-omap: add upstreamable hsi fix
Signed-off-By: Sicelo A. Mhlongo <absicsz@gmail.com>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/8471>
2026-05-09 18:29:21 +00:00
Sicelo A. Mhlongo 75141b778c linux-postmarketos-omap: upgrade to 7.0.5
In addition to the version upgrade:
 1. Drop DTS patch for volume keys. These will be handled via hwdb
 2. Drop CONFIG_FW_LOADER_USER_HELPER. It was required by the LED controller
    (lp5523) driver until Linux 6.19
 3. Restore TWL4030_PWRBUTTON, and make it built-in (in readiness for plymouth)
 4. Drop HSI patch. To be replaced with a better quality patch which will be
    upstreamed
 5. The remainder of changes are from kconfig migrate

 Signed-off-By: Sicelo A. Mhlongo <absicsz@gmail.com>

Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/8471>
2026-05-09 18:29:17 +00:00
Ferass El Hafidi 85e89db86a main/postmarketos-base-ui-plasma: switch _pmb_recommends to depends for -kaccounts
Signed-off-by: Ferass El Hafidi <funderscore@postmarketos.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/8507>
2026-05-09 08:56:07 +00:00
Ferass El Hafidi 0f35b43684 main/postmarketos-ui-plasma-mobile: switch _pmb_recommends to depends
for subpackages

Apparently pmbootstrap doesn't look in subpackages for _pmb_recommends.

Suggested-by: Clayton Craft <craftyguy@postmarketos.org>
Signed-off-by: Ferass El Hafidi <funderscore@postmarketos.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/8507>
2026-05-09 08:56:07 +00:00
adamthiede dca2d19532 linux-postmarketos-mediatek-mt81: upgrade to 6.18.28 and update kconfig
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/8516>
2026-05-09 01:56:21 +00:00
Andreas Kemnade 76b2ad1c28 linux-postmarketos-imx-ereader: Update to 7.0
- backlight for kobo-clara2e
- remove upstreamed wifi fix, add another one
- make kconfigcheck happy

Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/8492>
2026-05-08 23:44:34 +00:00
Pablo Correa Gómez 6112038d86 docs: remove requirement for maintainer from community devices
This is a general packaging guideline.

Signed-off-by: Pablo Correa Gómez <pabloyoyoista@postmarketos.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/8508>
2026-05-08 21:49:46 +00:00
Pablo Correa Gómez e3f06aba45 docs: add section about maintainership to packaging guidelines
Signed-off-by: Pablo Correa Gómez <pabloyoyoista@postmarketos.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/8508>
2026-05-08 21:49:46 +00:00
Pablo Correa Gómez b293a8e354 docs: place the provides section of the packaging guidelines at the end
It is quite massive, and therefore let's put the simpler things
first. If things keep growing, at some point it would make sense to
move it out to a subpage.

Signed-off-by: Pablo Correa Gómez <pabloyoyoista@postmarketos.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/8508>
2026-05-08 21:49:43 +00:00
Luca Weiss a90be8cc48 linux-postmarketos-qcom-milos: upgrade to 7.0.5
Manual kconfig changes:
* CACHEFILES=m (category:netmount)
* CRYPTO_CAMELLIA=m (category:netmount)
* CRYPTO_CTS=y (category:netmount)
* FSCACHE=y (category:netmount)
* NFS_FS=m (category:netmount)
* NFS_FSCACHE=y (category:netmount)
* NFS_V3=m (category:netmount)
* NFS_V4=m (category:netmount)
* NFS_V4_2=y (category:netmount)
* NFSD=m (category:netmount)
* NFSD_V3_ACL=y (category:netmount)
* NFSD_V4=y (category:netmount)
* NFSD_PNFS=y (category:netmount)
* NFSD_BLOCKLAYOUT=y (category:netmount)
* NFSD_SCSILAYOUT=y (category:netmount)
* NFSD_V4_2_INTER_SSC=y (category:netmount)
* RPCSEC_GSS_KRB5=m (category:netmount)
* RPCSEC_GSS_KRB5_ENCTYPES_AES_SHA1=y (category:netmount)
* RPCSEC_GSS_KRB5_ENCTYPES_AES_SHA2=y (category:netmount)
* RPCSEC_GSS_KRB5_ENCTYPES_CAMELLIA=y (category:netmount)
* ACCESSIBILITY=y (category:accessibility)
* A11Y_BRAILLE_CONSOLE=y (category:accessibility)
* SPEAKUP=m (category:accessibility)
* SPEAKUP_SYNTH_ACNTSA=m (category:accessibility)
* SPEAKUP_SYNTH_APOLLO=m (category:accessibility)
* SPEAKUP_SYNTH_AUDPTR=m (category:accessibility)
* SPEAKUP_SYNTH_BNS=m (category:accessibility)
* SPEAKUP_SYNTH_DECTLK=m (category:accessibility)
* SPEAKUP_SYNTH_DECEXT=m (category:accessibility)
* SPEAKUP_SYNTH_LTLK=m (category:accessibility)
* SPEAKUP_SYNTH_SOFT=m (category:accessibility)
* SPEAKUP_SYNTH_SPKOUT=m (category:accessibility)
* SPEAKUP_SYNTH_TXPRT=m (category:accessibility)

Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/8513>
2026-05-08 16:19:27 +00:00
postmarketOS CI 18f6788502 linux-next: upgrade to next-20260508 2026-05-08 15:38:50 +00:00
Aelin 43e3d13a3e linux-postmarketos-lts: Upgrade to 6.18.27
And patch the ESP part of dirtyfrag.

Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/8510>
2026-05-08 00:18:54 +00:00
Aelin fbd16e84e6 linux-postmarketos-stable: Upgrade to 7.0.4
And patch the ESP part of dirtyfrag.

Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/8509>
2026-05-08 00:16:36 +00:00
postmarketOS CI 7774d016a5 linux-next: upgrade to next-20260507 2026-05-07 21:30:48 +00:00
Casey Connolly 3622865c9e CI: fix autoupdate
Reference the main branch instead of master.

Signed-off-by: Casey Connolly <kcxt@postmarketos.org>
2026-05-07 23:14:34 +02:00
bluebunny baa112b246 kconfig-generic: enable upstream configs for sm8250
These are some configs in the mainline kernel for supporting sm8250 devices.

Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/8504>
2026-05-08 02:57:00 +09:00
Aster Boese 9153c26779 kconfig-generic: sort alphanumerically
Signed-off-by: Aster Boese <asterboese@mailbox.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/8440>
2026-05-07 17:22:41 +00:00
Aster Boese 943ad8bb9e kconfig-generic: enable upstream configs for sdm845
These are not all the required configs for running mainline on sdm845, only the
ones that are in the upstream kernel.

Signed-off-by: Aster Boese <asterboese@mailbox.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/8440>
2026-05-07 17:22:41 +00:00
Pablo Correa Gómez 0b505f0189 docs: cleanup wording of device-categorization.
"2021-11" is completely unnecessary at this point, and adding that the
kernel must be upgraded regularly is redundant with the requirement of
3 kernel releases and a lot less objective. So keep the objective
wording and remove the one very up for interpretation.

Signed-off-by: Pablo Correa Gómez <pabloyoyoista@postmarketos.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/8505>
2026-05-07 16:44:53 +00:00
Pablo Correa Gómez 5e180a8f0b docs: fix heading level of archived category
Signed-off-by: Pablo Correa Gómez <pabloyoyoista@postmarketos.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/8505>
2026-05-07 16:44:53 +00:00
Steven Lamphear ec2040aad2 linux-postmarketos-allwinner: fetch tarball from GitHub mirror
The codeberg tarball fetch was timing out the verify-checksums CI job
(no bytes received after TCP/TLS handshake for 15 minutes). Switch to
Arnav Singh's GitHub mirror of megi's tree, which mirrors the same tag
(orange-pi-6.18-20260105-0049).

The recorded sha512sum changes because GitHub and Gitea (codeberg)
generate tarballs with different bytes for the same git tag.

Also adjust builddir, since GitHub's tarball top-level directory is
named "<repo>-<tag>" (linux-orange-pi-6.18-20260105-0049/) where
codeberg's was just "<repo>" (linux/).

Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/8501>
2026-05-07 08:38:00 -05:00
Steven Lamphear bed6fee4cf linux-postmarketos-allwinner: install modules to /usr/lib/modules
Required by .ci/grep.sh as of c883d781bd. Matches the pattern already in linux-postmarketos-{mainline,lts,stable}

Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/8501>
2026-05-07 08:17:51 -05:00
Steven Lamphear 56ab46e628 linux-postmarketos-allwinner: fix rtl8723cs CFI panic on PinePhone
The rtl8723cs staging driver in megi's tree [declares rtw_xmit_entry as returning int](https://codeberg.org/megi/linux/src/tag/orange-pi-6.18-20260105-0049/drivers/staging/rtl8723cs/os_dep/linux/xmit_linux.c#L513), but the kernel core's net_device_ops::ndo_start_xmit [expects netdev_tx_t](https://codeberg.org/megi/linux/src/commit/6519f78239276e5d14698135fe05aa3206947ab9/include/linux/netdevice.h#L1413). With kCFI enabled on aarch64 the indirect call from dev_hard_start_xmit traps on the type-hash mismatch, panicking the kernel as soon as wpa_supplicant sends a frame. This patch changes rtw_xmit_entry's return type to netdev_tx_t (the function already returns 0, which is NETDEV_TX_OK).

Tested on a PinePhone 1.2 with both an SD-card install and an eMMC install: wifi associates and remains stable, no CFI panic. The eMMC install had previously been connected to wifi, so it froze during boot; the SD-card install was new, but would freeze (and eventually crash) upon attempting to connect to wifi.

Closes: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/work_items/4507
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/8501>
2026-05-07 08:17:51 -05:00
Aster Boese 38566839db systemd/postmarketos-base-systemd: fix VT auto allocation
For systemd-logind to allocate VTs automatically when a user switches to them, two
things need to be done. First, logind.conf needs `NAutoVTs=` set to a value, which
in this change is set to the default. Second, getty@.service needs to be symlinked
to autovt@.service, otherwise systemd-logind fails to find the template file.

This change also moves logind.conf to the proper path under `/usr/lib/systemd/`
instead of the sysadmin override path under `/etc/systemd/` and alphanumerically
sorts the sources.

Signed-off-by: Aster Boese <asterboese@mailbox.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/8496>
2026-05-06 19:02:02 +00:00
Aster Boese 029b539827 kconfigcheck: add accessibility category
Enables the basic kernel interfaces for the kernel braille and
speakup support.

Signed-off-by: Aster Boese <asterboese@mailbox.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7429>
2026-05-06 16:10:53 +00:00
Andreas Kemnade 5fd2a894fe u-boot-kobo-librah2o: take over maintainership
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/8491>
2026-05-06 05:50:55 +00:00
Andreas Kemnade b4239c35a8 device-kobo-librah2o: take over maintainership
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/8491>
2026-05-06 05:50:55 +00:00
Clayton Craft 8d657c1c3f main/postmarketos-base: update nosplash kernel cmdline config
Signed-off-by: Clayton Craft <craftyguy@postmarketos.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7482>
2026-05-05 12:34:20 -07:00
Clayton Craft 92db54cf94 main/postmarketos-mkinitfs: add trigger for plymouth
Signed-off-by: Clayton Craft <craftyguy@postmarketos.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7482>
2026-05-05 12:34:20 -07:00
Clayton Craft 084013fac5 main/postmarketos-initramfs: replace pbsplash with plymouth
This also drops support for pmos.no-splash, since removing `splash` from
the kernel cmdline will effectively prevent Plymouth from showing the
splash screen.

Signed-off-by: Clayton Craft <craftyguy@postmarketos.org>

[ci:skip-vercheck]

Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7482>
2026-05-05 12:34:20 -07:00
Clayton Craft 3f67ce725c main/postmarketos-bootsplash: Clayton take over maintaining
Signed-off-by: Clayton Craft <craftyguy@postmarketos.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7482>
2026-05-05 12:34:19 -07:00
Clayton Craft c9d6c3b56e main/postmarketos-bootsplash: replace pbsplash with plymouth
Signed-off-by: Clayton Craft <craftyguy@postmarketos.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7482>
2026-05-05 12:34:19 -07:00
Clayton Craft 2c16da8777 main/postmarketos-plymouth-themes: new aport
Signed-off-by: Clayton Craft <craftyguy@postmarketos.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7482>
2026-05-05 12:34:19 -07:00
Andreas Kemnade 608d19a9d7 u-boot-tolino-shine3: MAINTAINER
I have kobo-clarahd and tolino-shine2hd.
kobo-clarahd uses the same board as tolino-shine3, but another
pin-compatible but not software-compatible SoC is installed
tolino-shine2hd uses the same SoC as the tolino-shine3.
So if things are working on both of the devices, it is almost
safe to assume that they will also work on the tolino-shine3.
Based on that assumption add me as a maintainer.

Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/8490>
2026-05-05 17:43:02 +00:00
Andreas Kemnade e4f3682b35 device-tolino-shine3: MAINTAINER
I have kobo-clarahd and tolino-shine2hd.
kobo-clarahd uses the same board as tolino-shine3, but another
pin-compatible but not software-compatible SoC is installed
tolino-shine2hd uses the same SoC as the tolino-shine3.
So if things are working on both of the devices, it is almost
safe to assume that they will also work on the tolino-shine3.
Based on that assumption add me as a maintainer.

Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/8490>
2026-05-05 17:43:02 +00:00
Oliver Smith c52e7b1556 docs: add release documentation
Move and update release documentation from these wiki pages to pmaports
docs:
* https://wiki.postmarketos.org/wiki/Releases
* https://wiki.postmarketos.org/wiki/Creating_a_release_branch#Timeline

Signed-off-by: Oliver Smith <ollieparanoid@postmarketos.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/8486>
2026-05-05 12:48:41 +00:00
Oliver Smith c614719e7a issue_templates: add Release_EOL.md
Move the contents of this wiki page into an issue template and modernize
it a bit while at it:
https://wiki.postmarketos.org/wiki/Creating_a_release_branch#Drop_phase

Signed-off-by: Oliver Smith <ollieparanoid@postmarketos.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/8486>
2026-05-05 12:48:41 +00:00
Oliver Smith ca732c1fb7 issue_templates: add Release_Infrastructure.md
Move the contents of this wiki page into an issue template and modernize
it a bit while at it:
https://wiki.postmarketos.org/wiki/Creating_a_release_branch#Detailed_tasks_for_Team

Signed-off-by: Oliver Smith <ollieparanoid@postmarketos.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/8486>
2026-05-05 12:48:41 +00:00
Paul Sajna 185e92dba7 device-lg-judyp: MAINTAINER
I now have one of these in my posession and I'm working on extracting the firmware and fixing up the DTB to get it working properly again.

Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/8483>
2026-05-05 01:55:44 +00:00
Clayton Craft 37c9314dbe main/postmarketos-duranium: merge sysexts in initramfs
This merges system extensions in the initramfs, right before
switch_root, so that the rootfs boot always has the full merged /usr
right from the start. It fixes ordering issues like binfmt starting
before /usr/lib/binfmt.d was merged, and ultimately not working as
expected.

Signed-off-by: Clayton Craft <craftyguy@postmarketos.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/8426>
2026-05-04 15:53:33 -07:00
Clayton Craft f61687b60d main/postmarketos-duranium: support "self hosting"
This will allow folks to easily run mkosi, e.g. for building duranium
images. This makes duranium self-hosting.

There are several key changes in this patch:

- mkosi is added to the duranium developer tools sysext

- user qemu is added to the dev tools sysext (for binfmt+qemu)

- coreutils is added to the main pkg to work around a conflict that Alpine
has with mkosi (see: https://github.com/systemd/mkosi/pull/4283). The
issue is that the busybox symlinks installed in the base duranium image
are not replaced by mkosi when it generates a system extension even if
that sysext pulls in coreutils. coreutils isn't *that* big, so it makes
sense to just have these links correct in the base image.

- duranium dev. tools depends on apk-tools. Wait, what?! mkosi uses
apk to bootstrap a tools tree for building pmOS images. Since we don't
actually want apk to work when run against the duranium rootfs, this
also installs a wrapper that refuses to run apk if it detects that it's
being used "unsafely". To be clear, running apk on duranium's rootfs
won't change /usr or break duranium, but it will: 1) fail, 2) create
confusing state in /etc, /var.

Signed-off-by: Clayton Craft <craftyguy@postmarketos.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/8426>
2026-05-04 15:53:16 -07:00
Clayton Craft fc5554ef5c main/postmarketos-base: split apk-tools into -apk subpkg
It doesn't make sense to install apk by default in all flavors of pmOS,
like duranium. To avoid this, apk-tools is moved into a new -apk
subpackage that is pulled in implicitly via install_if. This has the
following benefits:

- postmarketos-duranium can "depend" on !postmarketos-base-apk to
exclude apk-tools

- apk-tools remains a dependency in existing mutable pmOS installs,
so it shouldn't be purged by this change 🤞

- we don't have to update hundreds of APKBUILDs in pmaports that
explicitly depend on `postmarketos-base` to now depend on some other
package that doesn't have apk-tools as an explicit dependency.

After this change, we'll be able to remove some janky cleanup code in
the duranium image build config for uninstalling apk-tools from the base
image, and it will allow us to *add* apk-tools in a system extension
later [1]

Signed-off-by: Clayton Craft <craftyguy@postmarketos.org>

1. https://gitlab.postmarketos.org/postmarketOS/pmaports/-/work_items/4502

Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/8426>
2026-05-04 15:53:16 -07:00
Scott C 83b13b1ad0 device-barnesnoble-encore: Become maintainer and add udev rule for touchscreen
I've added support for this device and continue to work on it, so
become maintainer.

Udev rule is just a slight tweak to the one generated by pmbootstrap
when touchscreen details are in deviceinfo, except use the device
name instead of /dev/input/eventX, whose number varies each boot.

Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/8470>
2026-05-04 20:05:31 +00:00
Aelin c1ed6289e2 kconfigcheck: Require the improved NTFS driver in 7.1+
Linux 7.1 introduces a new NTFS driver that is more compatible than
NTFS3, faster and has more features. Let's switch to it for kernel
versions where it is available.

Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/8484>
2026-05-04 14:24:22 +00:00
Aster Boese c883d781bd ci: grep: enforce installing kernel modules to /usr/lib/modules/
Signed-off-by: Aster Boese <asterboese@mailbox.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/8374>
2026-05-04 09:43:12 +02:00
Affe Null 784f73e155 firmware-jolla-c2: remove boot subpackage
Do not package proprietary bootloader files in /boot since they are not
needed there.

Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/8480>
2026-05-04 05:38:43 +00:00
Affe Null 9c64171a29 device-jolla-c2: remove firmware-jolla-c2-boot dependency
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/8480>
2026-05-04 05:38:43 +00:00
Aelin b6ce0811df linux-postmarketos-mainline: Upgrade to 7.1_rc2
Also install modules to /usr/lib/modules rather than /lib/modules.

Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/8482>
2026-05-04 04:51:14 +00:00
Aelin d2e6fed469 cross/gcc-*: regenerate to enable on aarch64
[ci:skip-vercheck]: architecture enablement

Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/8479>
2026-05-03 22:41:52 +00:00
Aelin 0cb96660c3 cross/musl-*: regenerate to enable for aarch64
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/8479>
2026-05-03 22:41:52 +00:00
Aelin 616d3a5fcb linux-postmarketos-qcom-sm8250: Update source checksums
[ci:skip-vercheck]: moving between categories
[ci:skip-kconfigcheck]: moving between categories

Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/8398>
2026-05-03 20:35:10 +02:00
Aelin c66aa62e36 device-xiaomi-elish: Move to testing
The kernel package used by this device does not meet the community
kernel version requirements anymore and the maintainer has not responded
to the issue #4448 which notified them of the situation.

Since two weeks have passed without a request for more time, the device
should be moved to testing.

Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/8398>
2026-05-03 20:35:06 +02:00
Tom Schlenker 1a3c003fda linux-postmarketos-qcom-sc7180: enable CROS_EC_CHARGECONTROL
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/8477>
2026-05-03 16:11:35 +00:00
Kevin Widjaja 0726a31793 Move sony-togari to archive
I have not maintained the port for a while now and am currently unable to due to my Z Ultra being broken. The last status was the device was able to boot debug shell but unable to boot to pmos.

Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/8465>
2026-05-03 15:51:40 +00:00
Aster Boese c08af97985 cross/gcc{4,6}-*: sync with compilers in main/
Signed-off-by: Aster Boese <asterboese@mailbox.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/8214>
2026-05-03 15:08:45 +00:00
Aster Boese f98e59c618 main/gcc{4,6}: fix license and options fields
license= is not touched by pmbootstrap's gcc aportgen, so we need to
fix it manually.

options= is edited to match the modern output of aportgen.

Signed-off-by: Aster Boese <asterboese@mailbox.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/8214>
2026-05-03 15:08:45 +00:00
Aster Boese 345094da82 main/gcc{4,6}: remove fortify-headers from the default include path
gcc4 and gcc6 are only used for compiling downstream kernels these days.
Because these compilers are so old, most of fortify-headers does not even
work with them. As such, because downstream kernels have no security
guarantees, removing fortify-headers from the default include path
won't have any negative impacts on the distro.

Signed-off-by: Aster Boese <asterboese@mailbox.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/8214>
2026-05-03 15:08:45 +00:00
Oliver Smith a3efbbedb4 Drop maintainership for jane400
She currently can't maintain these ports, drop the maintainership as we
had discussed in chat.

[ci:skip-vercheck]

Signed-off-by: Oliver Smith <ollieparanoid@postmarketos.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/8478>
2026-05-03 13:15:49 +00:00
Stefan Hansson c6caa19a8f Revert "linux-postmarketos-allwinner: HACK: disable cross-native"
This was only needed as a temporary workaround[1].

This reverts commit a184bf63e2.

 [1]: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/8295#note_546725

Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/8476>
2026-05-03 09:27:01 +02:00
Rudraksha Gupta f43a60639d linux-pine64-pinephonepro: upgrade to 7.0
Update ppp kernel to 7.0

Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/8300>
2026-05-02 20:48:58 -07:00
Robert Eckelmann b91e6153b5 linux-postmarketos-grate: adopt latest changes in kconfig
Signed-off-by: Robert Eckelmann <longnoserob@postmarketos.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/8422>
2026-05-03 10:20:03 +09:00
Robert Eckelmann a9e24a9109 linux-postmarketos-grate: add source by commit_id
Signed-off-by: Robert Eckelmann <longnoserob@postmarketos.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/8422>
2026-05-03 10:20:03 +09:00
Robert Eckelmann 780a52b667 linux-postmarketos-grate: update maintainers
Signed-off-by: Robert Eckelmann <longnoserob@postmarketos.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/8422>
2026-05-03 10:20:03 +09:00
Robert Eckelmann b5ffd1b480 linux-postmarketos-grate: fix dependencies
Signed-off-by: Robert Eckelmann <longnoserob@postmarketos.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/8422>
2026-05-03 10:20:03 +09:00
Robert Eckelmann 7c32d93131 linux-postmarketos-grate: remove patch for wifi on Surface RT
This patch is now included in the source-tree

Signed-off-by: Robert Eckelmann <longnoserob@postmarketos.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/8422>
2026-05-03 10:20:03 +09:00
Robert Eckelmann 4262b265df linux-postmarketos-grate: upgrade to 7.0.1
- update url to new tegra-libre repo on codeberg
- kconfig migration done
- latest changes to kconfig reflected

Signed-off-by: Robert Eckelmann <longnoserob@postmarketos.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/8422>
2026-05-03 10:19:47 +09:00
Sicelo A. Mhlongo 71858694b3 device-nokia-n900: sway: workaround wlroots dpms bug
The sway 1.12 & wlroots 0.20 combination surfaces a dpms bug where the display
requires two attempts at turning it on after it has been set to off. Workaround
this until the issue is resolved.

Reference: https://gitlab.freedesktop.org/wlroots/wlroots/-/work_items/4026
Signed-off-By: Sicelo A. Mhlongo <absicsz@gmail.com>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/8472>
2026-05-02 16:09:42 +02:00
Sicelo A. Mhlongo e51efc65b2 device-nokia-n900: drop xorg.conf
The X11 server can auto-configure things on its own.

Signed-off-By: Sicelo A. Mhlongo <absicsz@gmail.com>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/8472>
2026-05-02 16:09:42 +02:00
Sicelo A. Mhlongo fcbcb97a50 device-nokia-n900: Implement fixes for boot/init issues
1. Modernize the boot parameters uboot passes to the kernel
 2. Correct the volume keys. Upstream DTS actually sends F7 and F8 for these
       keys, which is the behavior from stock. Using hwdb to correct the keys
       allows us to drop the relevant DTS patch from linux-postmarketos-omap.
       Additionally add the hwdb database into initramfs to ensure the keys
       also work during system initialization
 3. Disable OMAP 3430 OFF mode early in the initramfs. This is currently
       broken and causes system instability. We previously used a DTS patch to
       do this, but using an initramfs hook allows us to reduce the amount of
       kernel patches we maintain

Signed-off-By: Sicelo A. Mhlongo <absicsz@gmail.com>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/8472>
2026-05-02 16:09:42 +02:00
Sicelo A. Mhlongo 5622b6371c device-nokia-n900: do not depend on UPower for i3blocks
Version 34 of the device-nokia-n900 package implemented an udev-based script
for shutdown due to critically-low battery condition.  Therefore, depending on
UPower is no longer necessary. To keep the i3blocks status bar working in
the absence of UPower, switch back to basic sysfs polling.

Signed-off-By: Sicelo A. Mhlongo <absicsz@gmail.com>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/8472>
2026-05-02 16:09:42 +02:00
Sicelo A. Mhlongo 1de140f47f device-nokia-n900: upower: switch to config fragment
As of upower 1.91.0, UPower supports config fragments, thus there is no longer
a need to ship a full UPower.conf. The device-specific upower package can
therefore be dropped, and the config fragment will be installed unconditionally
as part of the device package.

NB: It is still necessary to use a custom udev script to initiate poweroff due
to low battery on the N900, since the fuel gauge has a hardware limitation
which results in reporting 0% if the calibration is off, causing unwanted
device shutdowns if UPower's mechanism is active.

Signed-off-By: Sicelo A. Mhlongo <absicsz@gmail.com>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/8472>
2026-05-02 16:09:42 +02:00
Sicelo A. Mhlongo 0b83a665db device-nokia-n900: rework screen locking
Provide a unified screen locking mechanism, supporting x11 and sway.  Auto
locking is also improved to correctly disable inputs in all screen locking
scenarios, and re-enabling them on unlock. Unlock on keypad slide now also
works on sway (from sway v1.12).

Any x11 UI can use the existing script by setting up appropriate keybinds to
the script and autostarting xautolock. It may be necessary to disable any
built-in autolock method integrated within a specific x11 WM.

NB: This is NOT locking in the sense of secure locking. It is purely for
turning the screen off and disabling some inputs (currently only the
touchscreen) to prevent unintended wakeups.

Signed-off-By: Sicelo A. Mhlongo <absicsz@gmail.com>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/8472>
2026-05-02 16:09:42 +02:00
Sicelo A. Mhlongo 92b08601f7 device-nokia-n900: simplify sway status bar configuration
Since version 4, postmarketos-ui-sway allows overriding the status bar easily,
thus the hack to hide the global sway status bar to display a second bar is no
longer necessary.

Signed-off-By: Sicelo A. Mhlongo <absicsz@gmail.com>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/8472>
2026-05-02 16:09:42 +02:00
Sicelo A. Mhlongo 79f6325f6c postmarketos-ui-sway: use config fragment for status bar
Separating the status bar allows for customization (e.g. in a device package)
without replacing the entire sway config

Signed-off-By: Sicelo A. Mhlongo <absicsz@gmail.com>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/8472>
2026-05-02 16:09:42 +02:00
Luca Weiss 94a191ce06 linux-postmarketos-qcom-sc7280: upgrade to 7.0.0
Manual kconfig changes:
* QCOM_QSEECOM=y (Q6A)
* QCOM_QSEECOM_UEFISECAPP=y (Q6A)
* BRCMFMAC=m (RUBIK Pi 3)
* SENSORS_PWM_FAN=m (RUBIK Pi 3)
* DEVFREQ_GOV_PERFORMANCE=y
* DEVFREQ_GOV_POWERSAVE=y
* DEVFREQ_GOV_USERSPACE=y
* DEVFREQ_GOV_PASSIVE=y
* USB_NET_RNDIS_HOST=m (category:usb)
* SECURITY_DMESG_RESTRICT=y (category:hardening)

Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/8360>
2026-05-02 08:30:49 +00:00
Robert Eckelmann b2befbfed1 linux-postmarketos-marvell: upgrade to 6.18.24
relecting also lated kconfig requirements

Signed-off-by: Robert Eckelmann <longnoserob@postmarketos.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/8424>
2026-05-02 02:38:57 +00:00
Stefan Hansson 96217725f4 main/postmarketos-tweaks-setting-definitions: upgrade to 1.1.0
Signed-off-by: Stefan Hansson <newbyte@postmarketos.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/8456>
2026-05-02 02:13:09 +00:00
adamthiede 4fc27938cc linux-postmarketos-mediatek-mt81: upgrade to 6.18.26 and update kconfig
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/8464>
2026-05-02 02:10:13 +00:00
Anton Bambura 395c9d0981 ayn-odin: depend on soc-qcom-pd-mapper and soc-qcom-qbootctl
soc-qcom-pd-mapper is required for WiFi to work, and
soc-qcom-qbootctl should fix the issue of the slot getting inactive
after a few reboots.

Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/8434>
2026-05-02 01:31:11 +00:00
Alexander Martinz bce2b05e3b firmware-shift-otter: update firmware to 20260306
Firmware is updated to 20260306, matching the latest Android OTA
`OTTER.SOS.6.5.G-RELEASE-20260306-OTA.zip`.

This release also adds firmware for hexagonfs.

Further the prepare script is now installing the firmware into
`/usr/lib` instead of `/lib`.

Signed-off-by: Alexander Martinz <amartinz@shiftphones.com>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/8451>
2026-05-02 00:59:35 +00:00
Barnabás Czémán 0bf541c91b linux-postmarketos-qcom-msm8953: Upgrade to v7.0.2-r0
Upgrade kernel to v7.0.2-r0

Signed-off-by: Barnabás Czémán <barnabas.czeman@postmarketos.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/8452>
2026-05-02 00:56:42 +00:00
Linus Walleij 47ed0d3446 samsung-stericsson-phones: Assume maintainership
The kernel and firmware is maintained, I can maintain the devices,
I maintain their wikipages anyway.

Signed-off-by: Linus Walleij <linusw@kernel.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/8466>
2026-05-01 17:58:11 +02:00
adamthiede 69c23c9752 linux-postmarketos-mediatek-mt8173: upgrade to 7.0.3 and update config
update config for new default checks

Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/8455>
2026-05-01 13:03:02 +00:00
Alicja Michalska 2d18e334fe linux-postmarketos-qcom-sc7180: Update to 6.18.26
Patches CopyFail, satisfies new kconfig requirements

Signed-off-by: Alicja Michalska <ellyqw@mainlining.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/8460>
2026-05-01 12:35:10 +00:00
Antoine Martin 082d19cdd8 linux-postmarketos-rockchip: upgrade to 6.19.14
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/8462>
2026-04-30 19:26:13 -04:00
Clayton Craft dc9bacbe85 linux-postmarketos-asahi: upgrade to 6.19.14-1
Signed-off-by: Clayton Craft <craftyguy@postmarketos.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/8458>
2026-04-30 22:44:30 +00:00
Aelin a25bb27739 linux-postmarketos-lts: Upgrade to 6.18.26
Also install modules to /usr/lib/modules rather than /lib/modules.

And fix an oversight in the kconfig-generic.toml that would lead to
some configs not being enabled on 6.18.

Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/8459>
2026-04-30 19:23:34 +00:00
Aelin 120f85d9fc kconfig-generic: EC_LENOVO_YOGA_C630 is not enabled on 6.18
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/8459>
2026-04-30 19:23:34 +00:00
Aelin a6e35ca3aa linux-postmarketos-stable: Upgrade to 7.0.3
Also install modules to /usr/lib/modules rather than /lib/modules.

Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/8457>
2026-04-30 16:23:35 +02:00
Eisenbahnfan 40380a12d6 device-samsung-v1awifi: Add more initfs modules for display
Additional modules are needed in initfs to enable the display during boot.

Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/8453>
2026-04-30 00:28:57 +02:00
Eisenbahnfan 565544855e device-samsung-n2awifi: Add more initfs modules for display
Additional modules are needed in initfs to enable the display during boot.

Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/8453>
2026-04-30 00:28:35 +02:00
Eisenbahnfan 834b442669 device-samsung-n1awifi: Add more initfs modules for display
Additional modules are needed in initfs to enable the display during boot.

Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/8453>
2026-04-30 00:25:54 +02:00
Barnabás Czémán 40bcbbb4c3 device-qcom-msm89x7: add necessary modules for pwm
Redmi 4A, 5A and Go are using PWM backlight what is
dependency of the panel.
Add necessary modules for make it able to use PWM at
early boot stage.

Signed-off-by: Barnabás Czémán <barnabas.czeman@postmarketos.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/8447>
2026-04-29 11:49:10 +00:00
Barnabás Czémán 114b9249dd linux-postmarketos-qcom-msm89x7: Upgrade to v7.0.2-r0
Upgrade kernel to v7.0.2-r0.

Signed-off-by: Barnabás Czémán <barnabas.czeman@postmarketos.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/8447>
2026-04-29 11:49:10 +00:00
Robert Mader 4b25f699e4 temp/libcamera: upgrade to 0.7.1
See
https://gitlab.freedesktop.org/camera/libcamera/-/releases/v0.7.1

Also sync dependencies to upstream.

Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/8449>
2026-04-29 09:48:53 +02:00
Robert Eckelmann 4ca37d4f48 device-nvidia-tegra-armv7: takeover maintainership
Signed-off-by: Robert Eckelmann <longnoserob@postmarketos.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/8425>
2026-04-28 21:40:09 +00:00
Robert Eckelmann dee0225ae5 firmware-nvidia-tegra-armv7: update source repo and maintainer
Signed-off-by: Robert Eckelmann <longnoserob@postmarketos.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/8425>
2026-04-28 21:40:09 +00:00
Aelin 86283c7cf0 firmware-thundercomm-rubikpi3: Add WiFi firmware
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/8400>
2026-04-28 23:00:38 +02:00
Aelin 96fc094233 linux-postmarketos-lts: Upgrade to 6.18.25
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/8444>
2026-04-28 13:53:09 +00:00
Aelin 90202ff4d3 linux-postmarketos-stable: Upgrade to 7.0.2
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/8443>
2026-04-28 13:51:01 +00:00
Aelin d918718472 linux-postmarketos-mainline: Upgrade to 7.1_rc1
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/8435>
2026-04-28 13:47:55 +00:00
Eisenbahnfan 08d1da344f device-samsung-v1awifi: Switch to u-boot
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/8296>
2026-04-28 13:21:25 +00:00
Eisenbahnfan cb474148bb device-samsung-n2awifi: Switch to u-boot
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/8296>
2026-04-28 13:21:25 +00:00
Eisenbahnfan 677c91b500 device-samsung-n1awifi: Switch to u-boot
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/8296>
2026-04-28 13:21:25 +00:00
Eisenbahnfan f4fdf38d13 u-boot-exynos5420: Introduce u-boot package for device-samsung-{n1awifi,n2awifi,v1awifi}
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/8296>
2026-04-28 13:21:25 +00:00
Clayton Craft f559b38457 main/postmarketos-duranium: don't set user comment on first boot
This was causing GNOME and KDE to show "Default User" e.g. on login

Signed-off-by: Clayton Craft <craftyguy@postmarketos.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/8442>
2026-04-28 12:38:32 +00:00
Ferass El Hafidi 6f49801ecd main/postmarketos-base-ui-plasma: do not install kaccounts-providers on armv7
Yet another package that depends on qtwebengine and thus is unavailable
on armv7.
See: pma#4505

Signed-off-by: Ferass El Hafidi <funderscore@postmarketos.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/8438>
2026-04-28 07:44:18 +00:00
Aster Boese c1722fd01a main/postmarketos-mkinitfs-hook: fix using wrong variable in loop
Signed-off-by: Aster Boese <asterboese@mailbox.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/8441>
2026-04-28 00:11:48 +02:00
Aster Boese ec2aab38d5 device/community/firmware-*: install to /usr/lib/
Signed-off-by: Aster Boese <asterboese@mailbox.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/8385>
2026-04-27 17:49:29 +00:00
Stefan Hansson fd95c55abf deviceinfo_schema.toml: Document vendor_boot-related variables
Found in
https://gitlab.postmarketos.org/postmarketOS/pmbootstrap/-/commit/8e3229c9a8d481ad223ecfe7a73041323cbc2390

Signed-off-by: Stefan Hansson <newbyte@postmarketos.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/8387>
2026-04-27 16:52:54 +00:00
Eisenbahnfan a325d6d06d kconfigcheck: CONFIG_NFS_V4_1 is not available starting from Linux v7.0
See [1], which was merged into v7.0.

[1] https://lore.kernel.org/all/20260126203938.450304-15-anna@kernel.org/

Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/8429>
2026-04-26 17:34:33 +00:00
Ali Nasrullayev db45854e65 xiaomi-vayu: Take maintainership, refactor firmware and device packages
Updated firmware and device packages to comply with latest standards and
added kernel subpackages for each display panel variant

Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/8332>
2026-04-26 15:39:36 +00:00
Aster Boese 430a3f0f85 systemd/cups: upgrade to 2.4.18
Signed-off-by: Aster Boese <asterboese@mailbox.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/8430>
2026-04-26 15:26:03 +00:00
bluebunny 632197dd74 linux-xiaomi-pipa: upgrade to 7.0.1
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/8412>
2026-04-26 10:48:24 +00:00
Clayton Craft ea6a2fc814 linux-postmarketos-asahi: upgrade to 6.19.12-1
Signed-off-by: Clayton Craft <craftyguy@postmarketos.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/8423>
2026-04-25 10:18:17 -07:00
Luca Weiss bb0d75bf85 linux-postmarketos-qcom-sc7280: update kconfig for NFSD
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/8117>
2026-04-24 21:05:20 +00:00
Luca Weiss fbaf608c1c kconfigcheck: Enable NFSD options
Enable the in-kernel NFS server along with some other related options.

Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/8117>
2026-04-24 21:05:20 +00:00
Neil Armstrong 51f2a726b1 linux-ayaneo-pocket-s2: refresh kernel on v7.0 and latest mainline patchset
Also include changed from Drakulix to enable the controller UART,
fix runtime suspend and enable higher GPU OPPs.

Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/8405>
2026-04-24 20:54:40 +00:00
Aelin 5d38a7cc64 kconfigcheck: Simplify based on version baselines
This replaces all version requirements below the baseline for the
categories with >=0.0.0 and completely removes configurations that would
only apply to version ranges no longer included in the baseline.

The default category baseline is 2.6.0, categories for community kernels
currently have a baseline of 5.17.

Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/8421>
2026-04-24 20:43:49 +00:00
André Apitzsch 4b64fc45ed motorola-peregrine: archive device specific package
Archive Motorola Moto G 4G 2013 device package in favor of
device-qcom-msm8226.

Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/8395>
2026-04-23 21:36:37 +02:00
Aster Boese 59beb3ba91 ci: shellcheck: update mkinitfs hook paths
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/8413>
2026-04-23 19:04:55 +00:00
Aster Boese 38ccc2ac8a main/postmarketos-mkinitfs-hook: merge mkinitfs-hook packages into one
Having many separate mkinitfs-hook packages makes it harder to add new
hooks and makes maintaining the hooks very fragmented and challenging.
Merging them all into one package and splitting them out by subpackage
makes them much more maintainable and makes adding new hooks as easy as
adding files and a subpackage.

Signed-off-by: Aster Boese <asterboese@mailbox.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/8413>
2026-04-23 19:04:55 +00:00
Aelin 0def725a74 kconfig-generic: Enable Motorcomm YT6801 ethernet controller
This ethernet controller is found on a handful of Loongson mainboards,
for example the XB612B0 for the 3B6000.

Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/8418>
2026-04-23 10:10:31 +00:00
Aelin ccd99db6a1 linux-postmarketos-stable: Upgrade to 7.0.1
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/8416>
2026-04-23 09:12:46 +00:00
Clayton Craft a329e09227 main/postmarketos-duranium: pin size of usr partition
In some cases when the disk is very large (e.g. 2TB) repart will add
extra space to the slot-A usr partition to make it larger. The slot-B
partitions are already pinned with a min/max size so they would stay
the correct size. This pins the slot-A usr partition so it's no longer
grown. This should have been done all along.

Signed-off-by: Clayton Craft <craftyguy@postmarketos.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/8419>
2026-04-23 03:07:53 +00:00
Aelin 4c2cb176ef linux-postmarketos-lts: Upgrade to 6.18.24
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/8417>
2026-04-23 00:25:04 +02:00
Aelin b51e236f1a kconfigcheck: Fix inconsistencies on loongarch64
CONFIG_CRYPTO_CTS is built-in if CONFIG_FS_ENCRYPTION is enabled, which
it is by default on loongarch64, which is reasonable.

CONFIG_NFSD is also built-in on some architectures, which causes
CONFIG_RPCSEC_GSS_KRB5 to be built-in rather than a module. We could
either force disable NFSD, which is not great, or just build it as a
module, which is what I opted for.

Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/8415>
2026-04-22 22:06:50 +00:00
Guido Günther 20424b99f9 issue_template: Explain how to get debug information for Phosh
Signed-off-by: Guido Günther <agx@sigxcpu.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/8403>
2026-04-22 21:13:59 +00:00
Neil Armstrong 8155e23632 kconfigcheck: CRYPTO_AES_TI is not available starting from Linux v7.0
See [1], which was merged into v7.0.

[1] https://lore.kernel.org/all/20260112192035.10427-9-ebiggers@kernel.org/

Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/8410>
2026-04-22 20:23:39 +00:00
Clayton Craft 0add2ad499 main/postmarketos-duranium: shorten part. names, drop verity sig part.
This uses a new naming convention for partitions. It fixes an issue
where some firmware (i.e. on the OnePlus 6 / 6T) will hang when starting
fastboot mode if it finds a (sub!)partition with a GPT partition label
that's "too long" (25char, in the case of enchilada, well under the 34
char limit in the GPT spec).

By keeping the old partition name match pattern, which *should* help
migrate existing installs after 2 updates (to capture partitions
associated with both "slots"). Given duranium's "wip" status, I don't
think it's strictly necessary to migrate existing installs, but I feel
like this is a good opportunity to see if it's possible to do so. It
might be handy to do in the future and working out how to do that now
seems useful.

This also drops the verity signature partition. According to the UAPI
Discov. Partition Spec (DPS) this partition is not really needed if the
verity hash for the usr partition is in the kernel cmdline and the UKI
is signed (not yet, but one day 🤞). There is one mode where having the
separate partition is useful: verified boot in containers, but this is
outside the scope of duranium.

This partition is tiny (16K) so the space saving is negligible... but
it would be nice to have one less partition to "manage". On existing
installs, this partition will become "foreign" to systemd repart, and
sysupdate will not touch it since it will no longer match any patterns.

fixes #4484

Signed-off-by: Clayton Craft <craftyguy@postmarketos.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/8408>
2026-04-22 19:25:48 +00:00
Clayton Craft 4a588de728 main/postmarketos-base-ui-gnome: add duranium-specific config
The kernel cmdline option is to prevent gnome-initial-setup from
launching, because it doesn't work properly and conflicts with our first
boot setup. On phosh this is technically not necessary since g-i-s won't
try to start there, but adding this to the base gnome UI pkg means I
wouldn't have to add sep. subpackages to gnome and gnome-mobile UI pkgs.

The duranium subpkg also pulls in a plugin for gnome-software so that
g-s can provide a frontend for pulling duranium image updates via
sysupdate.

Signed-off-by: Clayton Craft <craftyguy@postmarketos.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/8411>
2026-04-22 16:23:49 +00:00
Aelin 6d11555054 docs/kconfigcheck: Clarify version baselines
It is extremely tedious to keep track of what the name of a particular
option was for every kernel release and when they were added. To keep
kconfigcheck maintainable, let's ease the burden on people adding new
options for community categories or other categories only required by
close-to-mainline kernel packages and only have them look back a
reasonable number of kernel versions.

Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/8407>
2026-04-22 16:12:29 +00:00
Christian Duerr adf05d8067 device-fairphone-fp4: Fix USB audio DACs
The current pipewire rule was forcing every output sink to use the S32LE
format, which caused problems with DACs that do not support this format.

To ensure only the built-in sinks are matched, we manually specify the
alsa card name in the pipewire rule matcher.

Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/8363>
2026-04-22 12:07:10 +00:00
Christian Duerr 33e4ce4dc8 device-fairphone-fp5: Fix USB audio DACs
The current pipewire rule was forcing every output sink to use the S32LE
format, which caused problems with DACs that do not support this format.

To ensure only the built-in sinks are matched, we manually specify the
alsa card name in the pipewire rule matcher.

Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/8346>
2026-04-22 11:35:16 +00:00
Bart Ribbers 0342eafd35 systemd/kjournald: upgrade to 25.12.2
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/8078>
2026-04-21 23:05:15 +02:00
Luca Weiss 0ea9e8b265 linux-postmarketos-qcom-sc7280: update kconfig for 'netmount' category
Enable the new options that are required by the updated
kconfigcheck.toml including 'netmount'.

[ci:skip-vercheck] # no need to bump allwinner package

Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/8063>
2026-04-21 15:51:21 +02:00
Luca Weiss 44b33f724a linux-postmarketos-allwinner: drop redundant kconfigcheck-netmount option
This category is now included with the community category.

Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/8063>
2026-04-21 15:47:43 +02:00
Luca Weiss 8c29e3a104 kconfigcheck: Add 'netmount' to community category
It doesn't look like it was intentional to keep this optional, so let's
require netmount (i.e. NFS) for all community kernels.

Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/8063>
2026-04-21 15:47:43 +02:00
Luca Weiss 470789f095 kconfigcheck: Build 'netmount' category as modules where possible
There's no need to have these built-in to the kernel, better to build
these options as modules to keep the impact low.

Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/8063>
2026-04-21 15:47:43 +02:00
Bart Ribbers d56a1df0fd temp/{plasma-bigscreen,plank-player,aura-browser}: add comment explaining why it's in temp
[ci:skip-vercheck]

Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/8404>
2026-04-21 09:49:42 +02:00
Sam Day d90dbbd420 linux-postmarketos-qcom-msm8916: fix kconfigcheck
Enable the options flagged by pmb:kconfigcheck-community (hardening,
zram backends, immutable rootfs, module compression, etc.) so both
aarch64 and armv7 configs pass 'pmbootstrap kconfig check'.

Signed-off-by: Sam Day <me@samcday.com>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/8084>
2026-04-20 23:23:59 +00:00
Sam Day cefa00376b linux-postmarketos-qcom-msm8916: enable ublk
https://github.com/samcday/smoo needs ublk to do smoo-y things

Signed-off-by: Sam Day <me@samcday.com>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/8084>
2026-04-20 23:23:59 +00:00
Chris Vogel a5a5bca690 shift-axolotl: add unl0kr-fbforcerefresh
when started from u-boot unl0kr doesn't display the keyboard without a forced refresh

Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/8142>
2026-04-20 22:47:30 +00:00
Chris Vogel f1c4d7434c shift-axolotl: u-boot
adds dependencie on systemd-boot and changes boot partitions filesystem to fat32 to efi boot from u-boot

Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/8142>
2026-04-20 22:47:30 +00:00
Aelin 8065e72b63 firmware-analogix: drop
This package was introduced back when Pine64 shipped the PinePhone
with a broken ANX7688. The issue no longer persists on later versions
of the PinePhone and the package requires manual intervention and is
not pre-installed, so let's drop it.

Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7799>
2026-04-20 21:07:02 +00:00
bluebunny ab29db9b94 firmware-samsung-j7xelte: drop
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/8402>
2026-04-20 15:55:23 +00:00
bluebunny e110300bd0 device-samsung-j7xelte: comply with firmware policy
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/8402>
2026-04-20 15:55:23 +00:00
Aelin 6182ce138d {device-microsoft-surface-rt,device-nvidia-tegra-armv7}: move to testing
The kernel package used by these two devices does not meet our community
kernel version requirements anymore, and two weeks after notifying the
maintainers, the situation hasn't changed, so let's move them to testing
accordingly.

See also #4448

[ci:skip-vercheck]: moving between categories
[ci:skip-kconfigcheck]: moving between categories

Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/8399>
2026-04-20 11:13:03 +00:00
Aelin 477a24fe25 linux-postmarketos-lts: Upgrade to 6.18.23
And enable SELinux configurations on all architectures.

Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/8397>
2026-04-20 06:50:31 +00:00
Aelin 912e8272c9 linux-postmarketos-stable: Upgrade to 6.19.13
And enable SELinux configurations on all architectures.

Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/8396>
2026-04-20 01:51:43 +02:00
Barnabás Czémán efb8b4bf9b linux-postmarketos-qcom-msm8956: Upgrade to v7.0-r0
Upgrade to v7.0-r0.

Signed-off-by: Barnabás Czémán <barnabas.czeman@postmarketos.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/8390>
2026-04-19 17:55:17 +00:00
Aster Boese 993d92a696 main/postmarketos-base: add kernel-cmdline.d config to disable splash
By creating a package for this, debugging boot-time issues is made a lot easier
as now during image creation `postmarketos-base-nosplash` can be added to
extra-packages and installed without rebuilding any packages.

Signed-off-by: Aster Boese <asterboese@mailbox.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/8304>
2026-04-19 17:38:49 +00:00
Eric Anderson 48a40e6f01 firmware-asus-flo: Add ejona as maintainer
I became the maintainer of device-asus-flo in !8111.

Contributes to #4445 which is tracking down maintainers for unmaintained
packages.

Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/8393>
2026-04-19 07:47:12 -07:00
Pan Ortiz 5321fd0ca3 google-bonito: mirror sargo changes
This commit mirrors some of the changes from google-sargo:

 google-sargo: install config for plasma-camera
  device-google-sargo: add support for u-boot
 community/device-google-sargo: only keep fastrpc link udev rule

Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/8386>
2026-04-19 07:53:52 +00:00
Luca Weiss d01f245f62 linux-postmarketos-qcom-sm6350: upgrade to 7.0.0
Manual kconfig changes:
* POWER_SEQUENCING=m
* DEVFREQ_GOV_PERFORMANCE=y
* DEVFREQ_GOV_POWERSAVE=y
* DEVFREQ_GOV_USERSPACE=y
* DEVFREQ_GOV_PASSIVE=y
* BPF_LSM=y (category:default)
* KPROBES=y (category:default)
* KPROBE_EVENTS=y (category:default)
* SECURITY=y (category:default)
* SECURITYFS=y (category:default)
* IP_NF_RAW=m (category:containers)
* IP6_NF_RAW=m (category:containers)
* BLK_DEV_UBLK=m (category:netboot)
* EROFS_FS is preferably m, but currently y (category:filesystems)
* EROFS_FS_ZIP_LZMA=y (category:filesystems)
* EROFS_FS_ZIP_DEFLATE=y (category:filesystems)
* EROFS_FS_ZIP_ZSTD=y (category:filesystems)
* USB_NET_RNDIS_HOST=m (category:usb)
* SECURITY_DMESG_RESTRICT=y (category:hardening)

Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/8358>
2026-04-19 07:50:58 +00:00
Dang Huynh ff519f2e14 linux-pine64-pinetab2: Upgrade to 7.0
Signed-off-by: Dang Huynh <dang.huynh@mainlining.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/8391>
2026-04-19 07:42:35 +00:00
Stefan Hansson a184bf63e2 linux-postmarketos-allwinner: HACK: disable cross-native
To avoid issue described here:
https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/8295#note_5453

Signed-off-by: Stefan Hansson <newbyte@postmarketos.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/8295>
2026-04-18 14:40:07 +00:00
Luca Weiss 822ccc31a7 linux-postmarketos-allwinner: pass LLVM=1 to downstreamkernel_prepare
Since a 'recent' pmbootstrap change, the cross compilers are no longer
installed by default which uncovered that "make oldconfig" is called
without LLVM=1.

scripts/Kconfig.include:41: linker 'armv7-alpine-linux-musleabihf-ld' not found
make[2]: *** [scripts/kconfig/Makefile:85: oldconfig] Error 1

Pass it so that all steps in the build process are run with the LLVM
toolchain and we're not mixing toolchains in the build process.

Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/8295>
2026-04-18 14:40:07 +00:00
Luca Weiss cbed5ce151 main/devicepkg-dev: support passing LLVM=1 in downstreamkernel_prepare
As required by kernels that probably shouldn't be using the
downstreamkernel_* functions in the first place, but we need to fix this
up to unblock linux-postmarketos-allwinner compilation.

Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/8295>
2026-04-18 14:40:03 +00:00
Luca Weiss a77dff06d8 linux-postmarketos-qcom-milos: upgrade to 7.0.0
Manual kconfig changes:
* VIDEO_QCOM_VENUS=n
* VIDEO_QCOM_IRIS=m
* DEVFREQ_GOV_PERFORMANCE=y
* DEVFREQ_GOV_POWERSAVE=y
* DEVFREQ_GOV_USERSPACE=y
* DEVFREQ_GOV_PASSIVE=y
* SRAM=y
* USB_NET_RNDIS_HOST=m (category:usb)
* SECURITY_DMESG_RESTRICT=y (category:hardening)

Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/8383>
2026-04-18 10:06:03 +00:00
426 changed files with 26503 additions and 10941 deletions

No files matched your search

+1 -1
View File
@@ -89,7 +89,7 @@ update_linux_next() {
git remote add gitlab https://pmos-ci:"$PMAPORTS_PUSH_TOKEN"@gitlab.postmarketos.org/postmarketOS/pmaports.git
git fetch gitlab
git checkout --track gitlab/master
git checkout --track gitlab/main
for pkg in $PKGS; do
case "$pkg" in
+28
View File
@@ -130,6 +130,34 @@ if [ -n "$CI_MERGE_REQUEST_DIFF_BASE_SHA" ]; then
fi
fi
# Find all moved, added, or generally modified kernel APKBUILDs
MODIFIED_KERNEL_PACKAGES=$(git show --pretty="" --name-only --diff-filter=AMR "$CI_MERGE_REQUEST_DIFF_BASE_SHA"..HEAD | grep "device/\(main\|community\|testing\|downstream\)/linux-.*/APKBUILD" || true)
if [ -n "$MODIFIED_KERNEL_PACKAGES" ]; then
# Disallow installing kernel modules outside /usr/
_bad_module_path_packages=""
for package in $MODIFIED_KERNEL_PACKAGES; do
# Check for INSTALL_MOD_PATH being set
if grep -qr 'INSTALL_MOD_PATH="$pkgdir"' "$package"; then
# Check if INSTALL_MOD_PATH is set to install to usr
if ! grep -qr 'INSTALL_MOD_PATH="$pkgdir"/usr' "$package"; then
# If INSTALL_MOD_PATH doesn't include usr, add package to list and
# setup failure
_bad_module_path_packages="$_bad_module_path_packages $package"
_module_error=1
fi
fi
done
# Fail with error and pretty print bad packages for logging
if [ -n "$_module_error" ]; then
echo "ERROR: Please set INSTALL_MOD_PATH to '\"\$pkgdir\"/usr'."
for package in $_bad_module_path_packages; do
printf "$package\n"
done
exit_code=1
fi
fi
# Disallow adding packages without a maintainer set
NEW_APKBUILDS=$(git show --pretty="" --name-only --diff-filter=A "$CI_MERGE_REQUEST_DIFF_BASE_SHA"..HEAD | grep APKBUILD || true)
+1 -1
View File
@@ -35,7 +35,7 @@
#### Environments
* [ ] COSMIC
* [ ] GNOME Shell on Mobile
* [ ] Phosh
* [ ] Phosh (*Please attach the debug information of the Mobile settings app, see [this video](https://peertube.debian.social/w/4GwDjCJNcAmp8cb7dqXz1T) or use `phosh-mobile-settings -d`*)
* [ ] Plasma Mobile
* [ ] Sxmo (Wayland/Sway) **Please post the output of `sxmo_version.sh`**
* [ ] Other: **Please fill out**
+29
View File
@@ -0,0 +1,29 @@
<!--
This template is for marking a postmarketOS stable release as EOL.
Name this issue "vYY.MM EOL".
-->
When the release has reached its EOL date:
- [ ] `postmarketos-base-ui`: let it depend on
`postmarketos-release-upgrade-notification` and bump pkgrel
- [ ] ensure it builds locally with pmbootstrap
- [ ] push it to the branch
- [ ] make sure bpo built and released the updated packages
- [ ] drop the old release from
[monitoring](https://gitlab.postmarketos.org/postmarketOS/monitoring)
- [ ] drop the "oldold -> old" release check from
[postmarketos-release-upgrade](https://gitlab.postmarketos.org/postmarketOS/postmarketos-release-upgrade/)
CI
- [ ] bpo: configure images so they don't get built for the old release anymore
- [ ] bpo: configure branches so we don't try to build packages for old
branches anymore
- e.g. on startup all branches are checked for new packages, we should keep
the amount of branches that get checked minimal
- [ ] pmaports.git channels.cfg: change description:
- "Old release (unsupported)"
- [ ] Update the [Releases](https://docs.postmarketos.org/pmaports/main/releases.html) page
- Move the release from active to old
- [ ] Consider removing images for the previous releases to save disk space
(people can build their own images with pmbootstrap if needed)
@@ -0,0 +1,221 @@
<!--
This template is for creating a new postmarketOS stable release.
Name this issue "vYY.MM Infrastructure".
-->
Person in charge of the release (doesn't have to do all the work, but has to
push it forward):
<!-- Put your usename here and assign yourself to this issue -->
### Preparation
- [ ] Create the gitlab milestone for the release
- [ ] Add this infrastructure issue to the milestone
- [ ] Update the
[timeline](https://docs.postmarketos.org/policies-and-processes/development/releases/current-timeline.html)
for the next release
### Pre-Build phase
This phase is to get some extra time for building packages. The branch will be rebased once in the branch phase.
#### Requirements
- [ ] Alpine's main repository must be built and published
- [ ] Alpine's community repository must be built and published
#### pmbootstrap: adjust config
- [ ] Update `pmb/config/__init__.py:apk_tools_min_version`. This should be a
trivial change, push it directly to main.
- [ ] (can be done later, at start of test phase) make a new [pmbootstrap
release](https://wiki.postmarketos.org/wiki/Pmbootstrap_release) <small>bpo
uses the main branch, so it will be fine without a release, however users
will want to try out the new release and may not run main.</small>
#### pmaports: create branch and initial changes
- [ ] `git checkout -b vYY.MM main`
- [ ] Create a `=== Branch vYY.MM from main ===` commit
- Remove channels.cfg (should only be in main)
- Change `channel=edge` to `channel=vYY.MM` in pmaports.cfg
- Change `supported_arches` to `x86_64,aarch64,armv7` in pmaports.cfg
- Disable x86, armhf, riscv64 in .ci/build-jobs.yaml.j2 on the release branch
and delete `.ci/build-*` scripts for these arches
- [ ] `git push`
- [ ] '''protect the new release branch in gitlab''', so nobody can force-push to it
#### pmaports: update main branch
- [ ] `git checkout main`
- [ ] Add the new branch to
[channels.cfg](https://wiki.postmarketos.org/wiki/Channels.cfg_reference),
[like this](https://gitlab.postmarketos.org/postmarketOS/pmaports/-/commit/c43571ceaf9b8155519bc9fb760bdeccd96e7e9c)
- [ ] `git push`
#### pmaports: update os-release / remove packages / aportgen
- [ ] `git checkout vYY.MM`
- [ ] Update `postmarketos-base`:
- [ ] Set version info for `/usr/lib/os-release` in
`main/postmarketos-base/rootfs-usr-lib-os-release`
(`PRETTY_NAME="postmarketOS vYY.MM"`, `VERSION_ID="vYY.MM"`,
`VERSION="vYY.MM"`)
- `pmbootstrap pkgrel_bump postmarketos-base`
- `pmbootstrap config mirrors.pmaports none`
- `pmbootstrap config mirrors.systemd none`
- `pmbootstrap checksum postmarketos-base`
- `git commit`
- [ ] Remove packages:
- `cross/*-armhf` and other unsupported arches in cross dir (keep `gcc-x86` and `musl-dev-x86`, `systemd-boot-x86`)
- `main/postmarketos-ui-asteroid` (no smartwatches are useful on stable branches at the moment)
- `gcc4*` and `gcc6*` from main and cross dirs
- `device/downstream`, `device/archived`
- [ ] Run `pmbootstrap aportgen` for packages in cross
- [ ] `git push`
#### bpo: adjust config
- [ ] Add the branch to the
[build.postmarketos.org](https://gitlab.postmarketos.org/postmarketOS/build.postmarketos.org)
config in `bpo/config/const/__init__.py:branches` below `branches["main"]`,
so it builds with lower priority than main until it's released. Set `ignore_errors` to `True`.
- [ ] Make a merge request, wait until CI passes, merge it (or if you can directly push to main that's also fine since it's a trivial change)
- [ ] Roll it out/ask somebody who can do that
- [ ] Restart bpo, it will start building `x86_64` packages
#### bootstrap of binary packages
- [ ] Fix failing `x86_64` packages (Remember: patches need to go through edge
first, then get backported to the stable branch!)
- Try to get build fixes merged to edge quickly, ask for reviews in
#postmarketos-devel, and consider merging trivial fixes right after they
pass CI.
- Devices in testing and archived categories that don't build: consider
trying to fix them, or just delete them from the branch
- [ ] Wait until all packages for `x86_64` are built and published
- [ ] Fix up ARM packages too
- [ ] Wait until all packages for ARM are built and published
#### Wallpaper poll
- [ ] Team meeting: make a short list of 4 wallpapers from [the
pool](https://gitlab.postmarketos.org/postmarketOS/artwork/-/tree/main/wallpapers/2024)
- [ ] Make a poll on the wallpapers on mastodon
([example](https://fosstodon.org/@postmarketOS/113624366198561582))
- Make sure to thank the wallpaper authors (usually dikasp) for the amazing
work on the wallpapers
- Put the names of the wallpapers on top of the wallpapers for easier voting
and as alt text
- Create a comment with poll options
#### Adjust CI
- [ ] Make sure pmaports.git CI runs through on the new branch (run
`pmbootstrap ci`). Examples of why it might fail:
- One postmarketos-ui package has a package from alpine testing in their
_pmb_recommends.
- Remove the UI if it is not used much (can bring it back on demand) or
fork the package to the new branch
- Consider fixing it in edge, so we don't run into this with the next
release
- [ ] Adjust
[upstream-compat](https://gitlab.postmarketos.org/postmarketOS/continuous-testing/upstream-compat)
to run on the new release and make sure it passes
([example](https://gitlab.postmarketos.org/postmarketOS/continuous-testing/upstream-compat/-/merge_requests/10))
#### Adjust release upgrade script
- [ ] Add the new release to `upgrade.sh` in [postmarketos-release-upgrade](https://gitlab.postmarketos.org/postmarketOS/postmarketos-release-upgrade/)
- [ ] Bump `SCRIPT_VERSION`, tag a new release
- [ ] Package it for edge (make MR), backport it to the new release, but NOT to
the old release yet (otherwise users may upgrade by accident, without
realizing that the new version is not out yet!)
- [ ] Adjust CI of postmarketos-release-upgrade to test the new release too
(`git grep` for the previous release to see what needs to be adjusted)
### Update the wallpaper
- [ ] Set the wallpaper that won in the poll in edge, backport this change to
the stable release branch
### Branch phase
#### Rebase on main
- [ ] `git checkout vYY.MM`
- [ ] `git rebase -i origin/main`
- [ ] Temporarily enable force-push for the `vYY.MM` branch
- [ ] `git push --force-with-lease`
- [ ] Disable force-push for the `vYY.MM` branch again
#### Update BPO config
- [ ] Update bpo's images config to build images for the new branch for all
devices in community and main, except for:
- qemu-*
- [ ] bpo: configure the new branch to be not WIP anymore
- [ ] Roll-out bpo changes
#### pmb release done?
- [ ] Ensure that a pmbootstrap release been made with the apk-tools min
version change
### Test phase
- [ ] Create an issue in pmaports with a checklist of devices and UIs in main
and community (see previous issue for reference)
- Tag the testers of each device and UI
- Ask to verify that the images work as expected
- Release upgrade script: when coming from the previous release, grab it from
main: `wget https://gitlab.postmarketos.org/postmarketOS/postmarketos-release-upgrade/-/raw/main/upgrade.sh`
- [ ] Announce the new phase in the testing chat - and ask them to do the
testing within one week, as in the timeline.
- Prioritize merging fixes from maintainers (they do the heavy lifting in the
testing and fixing phase, see timetable)
- Make sure to properly cherry pick fixes from MRs to edge, if they are
intended for the upcoming release
- [ ] Add new version to the pmaports gitlab issue template (.gitlab dir)
### Release phase
- [ ] Did a reasonable amount of devices get tested? (we may consider dropping
devices that were not tested)
- [ ] Make sure all fixes are in
- [ ] Make sure new images are generated *with* the fixes (unless it's a fix
for something that doesn't impact the experience much and is fine to get with
the first update after installing)
- [ ] Announce the new phase in the testing chat, together with the planned
date of blog post release (and testing)
#### Write blog post
- [ ] Write a blog post for the new release in `postmarketos.org.git`:
- Look at the previous release blog post and try to make the new one
consistent with it
- Highlight major changes since the last release
(see the release notes issue)
- Mention new devices, and total list of devices
- Count devices that have their own wiki page as separate device
- E.g. OnePlus 6, 6T are two devices (two wiki pages), but variants of
"Samsung Galaxy A3 (2015)" are one device (one wiki page)
- Don't count/list devices for which we don't build images (e.g.
qemu-amd64)
- Adjust the homepage config to point to the new release in the downloads
page
- update `config/download.py`:
- `latest_release`
- update devices and categories. only list the ones where we actually build images.
- Add some cool photos
- Submit the blog post as MR to postmarketos.org.git.
- Let the blog post MR close the current release notes issue.
- Ask for reviews.
#### Release!
- [ ] Backport the new postmarketos-release-upgrade version that allows
upgrading to the new release, to the previous release (don't do this before
the release is tested and ready! During the testing phase, we can use
postmarketos-release-upgrade from main directly: `wget
https://gitlab.postmarketos.org/postmarketOS/postmarketos-release-upgrade/-/raw/main/upgrade.sh`)
- [ ] Add the branch to pkgs.postmarketos.org
- [ ] Merge the blog post
- [ ] Edit channels.cfg, change descriptions:
- New release: "Latest release / Recommended for best stability"
- Old release: "Old release (supported until YYYY-MM-DD)" (one month from date of the release)
- [ ] Create a milestone for the next release
- [ ] Create an issue for the next release notes and attach it to that milestone
- [ ] Update the [Releases](https://docs.postmarketos.org/pmaports/main/releases.html) page
- Move the new release to the list of active releases, link to the blog post
- Update the announcement and title for the release
- Add a new upcoming release below
- [ ] Update [Template:Latest stable release](https://wiki.postmarketos.org/wiki/Template:Latest_stable_release) on the wiki with the new version
- [ ] Update "Default description template for issues" in pmaports (.gitlab dir)
- In "On what postmarketOS version did you encounter the issue?", change:
- previous release: add " (supported until YYYY-MM-DD)"
- add the new release
- [ ] Put a reminder in recurring-admin-tasks to drop support for the old release
+11 -3
View File
@@ -40,13 +40,17 @@ 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-aarch64 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"
depends="binutils-aarch64 mpc1 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"
case "$CARCH" in
x86_64) depends="$depends so:libc.musl-x86_64.so.1" ;;
esac
makedepends_build="gcc g++ bison flex texinfo gawk zip gmp-dev mpfr-dev mpc1-dev zlib-dev"
makedepends_host="linux-headers gmp-dev mpfr-dev mpc1-dev isl-dev zlib-dev musl-dev-aarch64 binutils-aarch64"
subpackages="g++-aarch64:gpp libstdc++-dev-aarch64:libcxx_dev"
[ "$CHOST" = "$CTARGET" ] && subpackages="gcc-gdb gcc-doc"
replaces="libstdc++ binutils"
options="!strip !tracedeps"
options="!strip !tracedeps toolchain"
: "${LANG_CXX:=true}"
: "${LANG_D:=true}"
@@ -581,7 +585,11 @@ gpp() {
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"
depends="$depends so:libgmp.so.10 so:libisl.so.23 so:libmpc.so.3 so:libmpfr.so.6 so:libz.so.1"
case "$CARCH" in
x86_64) depends="$depends so:libc.musl-x86_64.so.1" ;;
esac
amove $_gcclibexec/cc1plus
amove usr/bin/*++
+14 -4
View File
@@ -37,16 +37,21 @@ pkgname=gcc-armhf
pkgrel=3
pkgdesc="Stage2 cross-compiler for armhf"
url="https://gcc.gnu.org"
arch="x86_64"
arch="aarch64 x86_64"
license="GPL-2.0-or-later AND LGPL-2.1-or-later"
_gccrel=$pkgver-r$pkgrel
depends="binutils-armhf mpc1 so:libc.musl-x86_64.so.1 so:libgcc_s.so.1 so:libgmp.so.10 so:libisl.so.23 so:libmpc.so.3 so:libmpfr.so.6 so:libstdc++.so.6 so:libz.so.1"
depends="binutils-armhf mpc1 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"
case "$CARCH" in
aarch64) depends="$depends so:libc.musl-aarch64.so.1" ;;
x86_64) depends="$depends so:libc.musl-x86_64.so.1" ;;
esac
makedepends_build="gcc g++ bison flex texinfo gawk zip gmp-dev mpfr-dev mpc1-dev zlib-dev"
makedepends_host="linux-headers gmp-dev mpfr-dev mpc1-dev isl-dev zlib-dev musl-dev-armhf binutils-armhf"
subpackages="g++-armhf:gpp libstdc++-dev-armhf:libcxx_dev"
[ "$CHOST" = "$CTARGET" ] && subpackages="gcc-gdb gcc-doc"
replaces="libstdc++ binutils"
options="!strip !tracedeps"
options="!strip !tracedeps toolchain"
: "${LANG_CXX:=true}"
: "${LANG_D:=true}"
@@ -581,7 +586,12 @@ gpp() {
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"
depends="$depends so:libgmp.so.10 so:libisl.so.23 so:libmpc.so.3 so:libmpfr.so.6 so:libz.so.1"
case "$CARCH" in
aarch64) depends="$depends so:libc.musl-aarch64.so.1" ;;
x86_64) depends="$depends so:libc.musl-x86_64.so.1" ;;
esac
amove $_gcclibexec/cc1plus
amove usr/bin/*++
+14 -4
View File
@@ -37,16 +37,21 @@ pkgname=gcc-armv7
pkgrel=3
pkgdesc="Stage2 cross-compiler for armv7"
url="https://gcc.gnu.org"
arch="x86_64"
arch="aarch64 x86_64"
license="GPL-2.0-or-later AND LGPL-2.1-or-later"
_gccrel=$pkgver-r$pkgrel
depends="binutils-armv7 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"
depends="binutils-armv7 mpc1 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"
case "$CARCH" in
aarch64) depends="$depends so:libc.musl-aarch64.so.1" ;;
x86_64) depends="$depends so:libc.musl-x86_64.so.1" ;;
esac
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-armv7 binutils-armv7"
subpackages="g++-armv7:gpp libstdc++-dev-armv7:libcxx_dev"
[ "$CHOST" = "$CTARGET" ] && subpackages="gcc-gdb gcc-doc"
replaces="libstdc++ binutils"
options="!strip !tracedeps"
options="!strip !tracedeps toolchain"
: "${LANG_CXX:=true}"
: "${LANG_D:=true}"
@@ -581,7 +586,12 @@ gpp() {
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"
depends="$depends so:libgmp.so.10 so:libisl.so.23 so:libmpc.so.3 so:libmpfr.so.6 so:libz.so.1"
case "$CARCH" in
aarch64) depends="$depends so:libc.musl-aarch64.so.1" ;;
x86_64) depends="$depends so:libc.musl-x86_64.so.1" ;;
esac
amove $_gcclibexec/cc1plus
amove usr/bin/*++
+14 -4
View File
@@ -37,16 +37,21 @@ pkgname=gcc-loongarch64
pkgrel=3
pkgdesc="Stage2 cross-compiler for loongarch64"
url="https://gcc.gnu.org"
arch="x86_64"
arch="aarch64 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"
depends="binutils-loongarch64 mpc1 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"
case "$CARCH" in
aarch64) depends="$depends so:libc.musl-aarch64.so.1" ;;
x86_64) depends="$depends so:libc.musl-x86_64.so.1" ;;
esac
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"
options="!strip !tracedeps toolchain"
: "${LANG_CXX:=true}"
: "${LANG_D:=true}"
@@ -581,7 +586,12 @@ gpp() {
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"
depends="$depends so:libgmp.so.10 so:libisl.so.23 so:libmpc.so.3 so:libmpfr.so.6 so:libz.so.1"
case "$CARCH" in
aarch64) depends="$depends so:libc.musl-aarch64.so.1" ;;
x86_64) depends="$depends so:libc.musl-x86_64.so.1" ;;
esac
amove $_gcclibexec/cc1plus
amove usr/bin/*++
+14 -4
View File
@@ -37,16 +37,21 @@ pkgname=gcc-ppc64le
pkgrel=3
pkgdesc="Stage2 cross-compiler for ppc64le"
url="https://gcc.gnu.org"
arch="x86_64"
arch="aarch64 x86_64"
license="GPL-2.0-or-later AND LGPL-2.1-or-later"
_gccrel=$pkgver-r$pkgrel
depends="binutils-ppc64le 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"
depends="binutils-ppc64le mpc1 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"
case "$CARCH" in
aarch64) depends="$depends so:libc.musl-aarch64.so.1" ;;
x86_64) depends="$depends so:libc.musl-x86_64.so.1" ;;
esac
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-ppc64le binutils-ppc64le"
subpackages="g++-ppc64le:gpp libstdc++-dev-ppc64le:libcxx_dev"
[ "$CHOST" = "$CTARGET" ] && subpackages="gcc-gdb gcc-doc"
replaces="libstdc++ binutils"
options="!strip !tracedeps"
options="!strip !tracedeps toolchain"
: "${LANG_CXX:=true}"
: "${LANG_D:=true}"
@@ -581,7 +586,12 @@ gpp() {
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"
depends="$depends so:libgmp.so.10 so:libisl.so.23 so:libmpc.so.3 so:libmpfr.so.6 so:libz.so.1"
case "$CARCH" in
aarch64) depends="$depends so:libc.musl-aarch64.so.1" ;;
x86_64) depends="$depends so:libc.musl-x86_64.so.1" ;;
esac
amove $_gcclibexec/cc1plus
amove usr/bin/*++
+14 -4
View File
@@ -37,16 +37,21 @@ pkgname=gcc-riscv64
pkgrel=3
pkgdesc="Stage2 cross-compiler for riscv64"
url="https://gcc.gnu.org"
arch="x86_64"
arch="aarch64 x86_64"
license="GPL-2.0-or-later AND LGPL-2.1-or-later"
_gccrel=$pkgver-r$pkgrel
depends="binutils-riscv64 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"
depends="binutils-riscv64 mpc1 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"
case "$CARCH" in
aarch64) depends="$depends so:libc.musl-aarch64.so.1" ;;
x86_64) depends="$depends so:libc.musl-x86_64.so.1" ;;
esac
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-riscv64 binutils-riscv64"
subpackages="g++-riscv64:gpp libstdc++-dev-riscv64:libcxx_dev"
[ "$CHOST" = "$CTARGET" ] && subpackages="gcc-gdb gcc-doc"
replaces="libstdc++ binutils"
options="!strip !tracedeps"
options="!strip !tracedeps toolchain"
: "${LANG_CXX:=true}"
: "${LANG_D:=true}"
@@ -581,7 +586,12 @@ gpp() {
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"
depends="$depends so:libgmp.so.10 so:libisl.so.23 so:libmpc.so.3 so:libmpfr.so.6 so:libz.so.1"
case "$CARCH" in
aarch64) depends="$depends so:libc.musl-aarch64.so.1" ;;
x86_64) depends="$depends so:libc.musl-x86_64.so.1" ;;
esac
amove $_gcclibexec/cc1plus
amove usr/bin/*++
+14 -4
View File
@@ -37,16 +37,21 @@ pkgname=gcc-x86
pkgrel=3
pkgdesc="Stage2 cross-compiler for x86"
url="https://gcc.gnu.org"
arch="x86_64"
arch="aarch64 x86_64"
license="GPL-2.0-or-later AND LGPL-2.1-or-later"
_gccrel=$pkgver-r$pkgrel
depends="binutils-x86 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"
depends="binutils-x86 mpc1 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"
case "$CARCH" in
aarch64) depends="$depends so:libc.musl-aarch64.so.1" ;;
x86_64) depends="$depends so:libc.musl-x86_64.so.1" ;;
esac
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-x86 binutils-x86"
subpackages="g++-x86:gpp libstdc++-dev-x86:libcxx_dev"
[ "$CHOST" = "$CTARGET" ] && subpackages="gcc-gdb gcc-doc"
replaces="libstdc++ binutils"
options="!strip !tracedeps"
options="!strip !tracedeps toolchain"
: "${LANG_CXX:=true}"
: "${LANG_D:=true}"
@@ -581,7 +586,12 @@ gpp() {
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"
depends="$depends so:libgmp.so.10 so:libisl.so.23 so:libmpc.so.3 so:libmpfr.so.6 so:libz.so.1"
case "$CARCH" in
aarch64) depends="$depends so:libc.musl-aarch64.so.1" ;;
x86_64) depends="$depends so:libc.musl-x86_64.so.1" ;;
esac
amove $_gcclibexec/cc1plus
amove usr/bin/*++
+11 -3
View File
@@ -40,13 +40,17 @@ url="https://gcc.gnu.org"
arch="aarch64"
license="GPL-2.0-or-later AND LGPL-2.1-or-later"
_gccrel=$pkgver-r$pkgrel
depends="binutils-x86_64 mpc1 so:libc.musl-aarch64.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"
depends="binutils-x86_64 mpc1 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"
case "$CARCH" in
aarch64) depends="$depends so:libc.musl-aarch64.so.1" ;;
esac
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-x86_64 binutils-x86_64"
subpackages="g++-x86_64:gpp libstdc++-dev-x86_64:libcxx_dev"
[ "$CHOST" = "$CTARGET" ] && subpackages="gcc-gdb gcc-doc"
replaces="libstdc++ binutils"
options="!strip !tracedeps"
options="!strip !tracedeps toolchain"
: "${LANG_CXX:=true}"
: "${LANG_D:=true}"
@@ -581,7 +585,11 @@ gpp() {
depends="libstdc++-dev$_target=$_gccrel gcc$_target=$_gccrel musl-dev"
[ "$CHOST" = "$CTARGET" ] && depends="$depends libstdc++=$_gccrel"
depends="$depends so:libc.musl-aarch64.so.1 so:libgmp.so.10 so:libisl.so.23 so:libmpc.so.3 so:libmpfr.so.6 so:libz.so.1"
depends="$depends so:libgmp.so.10 so:libisl.so.23 so:libmpc.so.3 so:libmpfr.so.6 so:libz.so.1"
case "$CARCH" in
aarch64) depends="$depends so:libc.musl-aarch64.so.1" ;;
esac
amove $_gcclibexec/cc1plus
amove usr/bin/*++
@@ -1,31 +0,0 @@
Enable -D_FORTIFY_SOURCE=2 by default.
Original patch from:
http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo/src/patchsets/gcc/4.9.2/gentoo/10_all_default-fortify-source.patch
--- a/gcc/c-family/c-cppbuiltin.c
+++ b/gcc/c-family/c-cppbuiltin.c
@@ -951,6 +951,9 @@ 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 w/optimization. */
+ cpp_define (pfile, "_FORTIFY_SOURCE=((defined __OPTIMIZE__ && __OPTIMIZE__ > 0) ? 2 : 0)");
+
/* Misc. */
if (flag_gnu89_inline)
cpp_define (pfile, "__GNUC_GNU_INLINE__");
--- a/gcc/doc/gcc.info
+++ b/gcc/doc/gcc.info
@@ -6255,6 +6255,11 @@ find out the exact set of optimizations that are enabled at each level.
Please note the warning under '-fgcse' about invoking '-O2' on
programs that use computed gotos.
+ NOTE: In Alpine Linux, `-D_FORTIFY_SOURCE=2' is set by default, and is
+ activated when `-Os' or `-O1' or higher is used. This enables additional
+ compile-time and run-time checks for several libc functions. To disable,
+ specify either `-U_FORTIFY_SOURCE' or `-D_FORTIFY_SOURCE=0'.
+
'-O3'
Optimize yet more. '-O3' turns on all optimizations specified by
'-O2' and also turns on the '-finline-functions',
+63 -17
View File
@@ -1,7 +1,6 @@
# Automatically generated aport, do not edit!
# Generator: pmbootstrap aportgen gcc4-aarch64
# Based on: main/gcc4 (from postmarketOS)
CTARGET_ARCH=aarch64
CTARGET="$(arch_to_hostspec ${CTARGET_ARCH})"
LANG_D=false
@@ -23,19 +22,22 @@ CBUILDROOT="/"
_cross_configure="--disable-bootstrap --with-sysroot=/usr/$CTARGET"
maintainer=""
pkgname=gcc4-aarch64
pkgver=9999
_pkgver=4.9.2
pkgrel=7
_pkgver=4.9.4
pkgrel=10
pkgdesc="Stage2 cross-compiler for aarch64"
url="http://gcc.gnu.org"
# loongarch64: not supported
# ppc64le, riscv64: doesn't build
arch="x86_64"
license="GPL LGPL"
license="GPL-2.0-or-later AND LGPL-2.1-or-later"
_gccrel=$_pkgver-r$pkgrel
depends="binutils-aarch64 mpc1"
depends="binutils-aarch64 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-aarch64 binutils-aarch64"
options="!strip"
options="!strip !tracedeps toolchain"
# We only care about C, so we can compile old Linux kernels
LANG_CXX=false
@@ -67,11 +69,23 @@ if [ "$CHOST" != "$CTARGET" ]; then
LIBATOMIC=false
LIBITM=false
# format-sec: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100431
CFLAGS="${CFLAGS/-Werror=format-security/}"
CXXFLAGS="${CXXFLAGS/-Werror=format-security/}"
CPPFLAGS="${CPPFLAGS/-Werror=format-security/}"
# fstack-clash-protection is not known to GCC 4
CFLAGS="${CFLAGS/-fstack-clash-protection/}"
CXXFLAGS="${CXXFLAGS/-fstack-clash-protection/}"
CPPFLAGS="${CPPFLAGS/-fstack-clash-protection/}"
# and neither is -fno-plt
CFLAGS="${CFLAGS/-fno-plt/}"
CXXFLAGS="${CXXFLAGS/-fno-plt/}"
CPPFLAGS="${CPPFLAGS/-fno-plt/}"
# 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 $CFLAGS"
export CXXFLAGS="$CPPFLAGS $CXXFLAGS"
export CFLAGS="$CPPFLAGS -g0 $CFLAGS"
export CXXFLAGS="$CPPFLAGS -g0 $CXXFLAGS"
unset CPPFLAGS
export CFLAGS_FOR_TARGET=" "
export CXXFLAGS_FOR_TARGET=" "
@@ -79,10 +93,23 @@ if [ "$CHOST" != "$CTARGET" ]; then
STRIP_FOR_TARGET="$CTARGET-strip"
elif [ "$CBUILD" != "$CHOST" ]; then
# format-sec: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100431
CFLAGS="${CFLAGS/-Werror=format-security/}"
CXXFLAGS="${CXXFLAGS/-Werror=format-security/}"
CPPFLAGS="${CPPFLAGS/-Werror=format-security/}"
# fstack-clash-protection is not known to GCC 4
CFLAGS="${CFLAGS/-fstack-clash-protection/}"
CXXFLAGS="${CXXFLAGS/-fstack-clash-protection/}"
CPPFLAGS="${CPPFLAGS/-fstack-clash-protection/}"
# and neither is -fno-plt
CFLAGS="${CFLAGS/-fno-plt/}"
CXXFLAGS="${CXXFLAGS/-fno-plt/}"
CPPFLAGS="${CPPFLAGS/-fno-plt/}"
# 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 $CFLAGS"
export CXXFLAGS="$CPPFLAGS $CXXFLAGS"
export CFLAGS="$CPPFLAGS -g0 $CFLAGS"
export CXXFLAGS="$CPPFLAGS -g0 $CXXFLAGS"
unset CPPFLAGS
# reset flags and cc for build
@@ -106,6 +133,31 @@ elif [ "$CBUILD" != "$CHOST" ]; then
else
STRIP_FOR_TARGET=${CROSS_COMPILE}strip
_builddir="$srcdir/build"
# format-sec: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100431
CFLAGS="${CFLAGS/-Werror=format-security/}"
CXXFLAGS="${CXXFLAGS/-Werror=format-security/}"
CPPFLAGS="${CPPFLAGS/-Werror=format-security/}"
# fstack-clash-protection is not known to GCC 4
CFLAGS="${CFLAGS/-fstack-clash-protection/}"
CXXFLAGS="${CXXFLAGS/-fstack-clash-protection/}"
CPPFLAGS="${CPPFLAGS/-fstack-clash-protection/}"
# and neither is -fno-plt
CFLAGS="${CFLAGS/-fno-plt/}"
CXXFLAGS="${CXXFLAGS/-fno-plt/}"
CPPFLAGS="${CPPFLAGS/-fno-plt/}"
# 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 -O2"
export CXXFLAGS="$CPPFLAGS -g0 $CXXFLAGS -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
# Go needs {set,make,swap}context, unimplemented in musl
@@ -176,7 +228,6 @@ source="http://gcc.gnu.org/pub/gcc/releases/gcc-${_pkgbase:-$_pkgver}/gcc-${_pkg
40_all_gcc49_config_esp.patch
41_all_gcc49_config_esp_alpine.patch
10_all_default-fortify-source.patch
12_all_default-warn-trampolines.patch
15_all_libgfortran-Werror.patch
16_all_libgomp-Werror.patch
@@ -193,7 +244,6 @@ source="http://gcc.gnu.org/pub/gcc/releases/gcc-${_pkgbase:-$_pkgver}/gcc-${_pkg
gcc-4.9-musl.patch
gcc-4.8-musl-fix-iteratephdr.patch
gcc-4.8-musl-libssp.patch
gcc-4.9-musl-fortify.patch
boehm-gc-uclibc.patch
boehm-gc-musl.patch
gcc-pure64.patch
@@ -201,7 +251,6 @@ source="http://gcc.gnu.org/pub/gcc/releases/gcc-${_pkgbase:-$_pkgver}/gcc-${_pkg
fix-gcj-iconv-musl.patch
musl-posix_memalign-c++.patch
pr63740.patch
pr64037.patch
gcc-4.8-build-args.patch
fix-cxxflags-passing.patch
@@ -435,7 +484,7 @@ package() {
}
sha512sums="
35a1386ae2b8629cd464383fbb3c61e94a07f3691f48b8029b97cc62a60c792ffb870aad2343b2ad8185bf46f77e1e1dd62309ecdadc42f919874c6e2c58b936 gcc-4.9.2.tar.gz
ca0f589f33987755195e81a9c7a83f797cfe5775fca908d025eb3ddbe8857edd666d272c2e97088c1808b268c5785326b72f2a340a277f6aa2c9bfe22c02ad69 gcc-4.9.4.tar.gz
28f8c6fdbcb19e950b1d0bafb3bcc7a8cba87bc673aa6027cece116599cdee80f0cf5e95a1440544890239f5c754e8a93ab46d9daedd937faef445d7ea33b226 ecj-4.9.jar
618a8d037ccad15e60182acc9c85ba844cb9b5800a22ece0b814e43541b01b4e390a2847f86debb351f4b05580241747fde87e86a17060744e7bb2b9a3dc5bd4 01_all_gcc49_configure.patch
21770259c7916e55568027926e4a543eea468b04436cc61c28f749be5a6635c48e68b7924a8eb19a76733a9d2f00921ba06faddaedbf14b1cdad5ab1810cc6c6 02_all_gcc48_config.in.patch
@@ -448,7 +497,6 @@ dd5b9b30eb7716cb3c010ca79a83ed6219ff6e6f2557deb4e1d26cecac0f2b14c4ef7bf4dc5c2aec
8829f85323d8b11e26e3c19ced4a51875fc63f1483cfdc4d0f579a6cb37e1b6e23fcf33a87a574a6e0007250374ea46d117a136e73a40fbe43f0e39d9b2dd1a8 35_all_gcc48_config_arm.patch
976994900d20a448b97fa91e1d758b6da6d8ad9121b3dbc2e8f66ff8006d8e496cd3dddc41394db6c4d20366d56fe12375b97f494d6fb9abb8e64ab626acc2ef 40_all_gcc49_config_esp.patch
e2d027be2e76a64a607ae44566d163bcc2a03c9e14d5bd20cd8bb15c2e9e395d8964b747a6a9c49541a5d1613d721855b73d60cce7c834427b44788fa92d44dc 41_all_gcc49_config_esp_alpine.patch
6cdac0741568b418af1e267a69b487e48a98e319f5ec8ab2bad293f2520ceced40c7df7ddef84963f5b101b94f34e441574c501ef3993ded097beb7c9d3b205f 10_all_default-fortify-source.patch
5069e4b741488913a646a9b5d871af8e7f7a606158ea09305d0ddd46257c5b659770627bc2ca3abeaae039da1717b3ba6c9cd90554a441da74eb4ecf24c13074 12_all_default-warn-trampolines.patch
c18a99b7303a734fe4dca9d4e90e21d18e5bd71c7d91e1a26c86b1354c73f567590a875941bfe64ce59f0393023b91c606c96b30885c55b98a790c3ab0c84ca7 15_all_libgfortran-Werror.patch
433404fd9bfa172d69fff4a5505e8648cbbbf5f052d2b4235608ff7af0c4063d557d25d80c85c5bd0d1e1ed64b568e7bbc0cdbce11cc74db4c0189af3a01634a 16_all_libgomp-Werror.patch
@@ -464,7 +512,6 @@ d08d7ead2de0429e5c9055d5b029ec2be9a8c821d22cecaf9b51f633652c493333f98963d9267fa2
e2be926c0ed4d67587857652678253a2a4e42294009a0c4b9fc420e53b0e6d44d1a2c6c2c62db837bc010470e9e62eb4af1ba7f51ff507c41e40922cd022dd26 gcc-4.9-musl.patch
b5b0210dfaccfe0b06f0a9090666b1fae2a3faa4140b7930146b29531f0da9beb1f2c1f7e7bc2bd29179f9fe05dc30e246e96220b8ff75a90f75e8350c9058a1 gcc-4.8-musl-fix-iteratephdr.patch
e6d9b103c128e5d4eca515b1496d78b05708de770597c883daddd95ea41e77b5ef1be613b989357cc870a7efd9e43b011022c2d302e7056cff7b69e764906ff2 gcc-4.8-musl-libssp.patch
600fe5098dc54edaa9808fd5717af9dec058953f9ad37d49cfba1db4f7e9a7a8f02019342f75157fc575946fa693259422184de27b7ecc8386d9f3ecc0f7cc5d gcc-4.9-musl-fortify.patch
e1d6a450dfb40b134ad7f759c4c10174d2490b0093fe47cb33479245f26a3a8c54ebcf6255943c0ccfcb5095600d1c05e530baeed35609c8ffe75caac8e57c49 boehm-gc-uclibc.patch
bda845a6aa1854d2c883910b115f79ccfa93dfc2b5eac69a3a236d83eb34cadc140731d616ffc24698c7abc8878dd15f231bcc5119f1860e575a120b311706c7 boehm-gc-musl.patch
4a5aeff0399782c752e6e3f2f48d984b2056dfb5d229b23a24eee1562d241339989b2203f139821cfc03c9b25c9bd7da6ccbbdc7a09d242e4de7f0d606c6f63c gcc-pure64.patch
@@ -472,7 +519,6 @@ f89ddeb21bc8f97e6a850a6b70b4501a8f3e49a4bc8cc82897488decda5d98ad01cb7f6c8b392d45
54d67cc008b735e47771314171930c5d8b8f5f5dc97fcf4214824c105c808f3e75d22d5a4fdf5068ed0457fa0d46c60cfb442e276259a4a5e9b8722a027d18e6 fix-gcj-iconv-musl.patch
7de81fc8c7eb36690949eb30082515454978440a8f389b12407ac5e9125ef6824d6059ffb5b063ab1ccc6c4827b1a6a0984b538f056b85e3171800a6f723ec8b musl-posix_memalign-c++.patch
095281d940ad7504ed7071cc9800d81db33eb4aa5465696ef7b12bf1213dbdfa701f4392095c5167b331c38219b19d25a0798524b319f1c77aa8522d76d8c92c pr63740.patch
efc04b179d41b484eddddc56d0e442634995d56c994e6295ae09b9856ab46649d5f45f51ea84494ab39df41c213772d0e68aee67e66fdf340f0a647b55629ced pr64037.patch
abe9aaf9aa956058d0386a4396a511d176a46bb3906b90e952383646cdc158cbeb0a5dc616a1ccb1ca7d49fd0b5e351532aa15a3b13362abbf1ca4266f54a687 gcc-4.8-build-args.patch
35d6d59f0b7b968f282f56767c9e0823a7bdc5aa0d450aca50fbd802649a7ca608b47671244a3faa208a9b0d6832cabb5a22724157dc817b2c0ad63d09f93282 fix-cxxflags-passing.patch
c731f4aaaa65c8950e1b2bd9331410f92d378fd8c7e718532dccaa27ee11984d51d74216c3611e89a802325b81d7f184116839dce2dab50cae9b643c20a82fe7 fix-cxxflags-for-target.patch
@@ -1,11 +0,0 @@
--- gcc-4.9.2/gcc/config/linux.h.orig 2015-03-09 13:27:13.289736710 +0000
+++ gcc-4.9.2/gcc/config/linux.h 2015-03-09 13:29:32.295625046 +0000
@@ -146,6 +146,8 @@
#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
-83
View File
@@ -1,83 +0,0 @@
https://gcc.gnu.org/git/?p=gcc.git;a=patch;h=0817dc6f0e6b973e0e3671eb72d3758a8f042324
(changelog changes removed)
From 0817dc6f0e6b973e0e3671eb72d3758a8f042324 Mon Sep 17 00:00:00 2001
From: hjl <hjl@138bc75d-0d04-0410-961f-82ee72b054a4>
Date: Sun, 14 Dec 2014 16:07:03 +0000
Subject: [PATCH] Pass unpromoted argument to promote_function_mode
This patch updates setup_incoming_promotions in combine.c to match what
is actually passed in assign_parm_setup_reg in function.c.
Backported from mainline:
gcc/
PR rtl-optimization/64037
* combine.c (setup_incoming_promotions): Pass the argument
before any promotions happen to promote_function_mode.
gcc/testsuite/
PR rtl-optimization/64037
* g++.dg/pr64037.C: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-4_9-branch@218721 138bc75d-0d04-0410-961f-82ee72b054a4
---
gcc/combine.c | 4 ++--
gcc/testsuite/g++.dg/pr64037.C | 27 +++++++++++++++++++++++++++
4 files changed, 46 insertions(+), 2 deletions(-)
create mode 100644 gcc/testsuite/g++.dg/pr64037.C
diff --git a/gcc/combine.c b/gcc/combine.c
index 7c00452..adea2c1 100644
--- a/gcc/combine.c
+++ b/gcc/combine.c
@@ -1529,8 +1529,8 @@ setup_incoming_promotions (rtx first)
uns3 = TYPE_UNSIGNED (DECL_ARG_TYPE (arg));
/* The mode and signedness of the argument as it is actually passed,
- after any TARGET_PROMOTE_FUNCTION_ARGS-driven ABI promotions. */
- mode3 = promote_function_mode (DECL_ARG_TYPE (arg), mode2, &uns3,
+ see assign_parm_setup_reg in function.c. */
+ mode3 = promote_function_mode (TREE_TYPE (arg), mode1, &uns3,
TREE_TYPE (cfun->decl), 0);
/* The mode of the register in which the argument is being passed. */
diff --git a/gcc/testsuite/g++.dg/pr64037.C b/gcc/testsuite/g++.dg/pr64037.C
new file mode 100644
index 0000000..e5cd0e2
--- /dev/null
+++ b/gcc/testsuite/g++.dg/pr64037.C
@@ -0,0 +1,27 @@
+// { dg-do run { target i?86-*-* x86_64-*-* } }
+// { dg-options "-std=c++11 -Os" }
+
+enum class X : unsigned char {
+ V = 2,
+};
+
+static void
+__attribute__((noinline,noclone))
+foo(unsigned &out, unsigned a, X b)
+{
+ out = static_cast<unsigned>(b);
+}
+
+int main()
+{
+ unsigned deadbeef = 0xDEADBEEF;
+ asm volatile ("" : "+d" (deadbeef), "+c" (deadbeef));
+
+ unsigned out;
+ foo(out, 2, X::V);
+
+ if (out != 2)
+ __builtin_abort ();
+
+ return 0;
+}
--
1.7.1
@@ -1,31 +0,0 @@
Enable -D_FORTIFY_SOURCE=2 by default.
Original patch from:
http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo/src/patchsets/gcc/4.9.2/gentoo/10_all_default-fortify-source.patch
--- a/gcc/c-family/c-cppbuiltin.c
+++ b/gcc/c-family/c-cppbuiltin.c
@@ -951,6 +951,9 @@ 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 w/optimization. */
+ cpp_define (pfile, "_FORTIFY_SOURCE=((defined __OPTIMIZE__ && __OPTIMIZE__ > 0) ? 2 : 0)");
+
/* Misc. */
if (flag_gnu89_inline)
cpp_define (pfile, "__GNUC_GNU_INLINE__");
--- a/gcc/doc/gcc.info
+++ b/gcc/doc/gcc.info
@@ -6255,6 +6255,11 @@ find out the exact set of optimizations that are enabled at each level.
Please note the warning under '-fgcse' about invoking '-O2' on
programs that use computed gotos.
+ NOTE: In Alpine Linux, `-D_FORTIFY_SOURCE=2' is set by default, and is
+ activated when `-Os' or `-O1' or higher is used. This enables additional
+ compile-time and run-time checks for several libc functions. To disable,
+ specify either `-U_FORTIFY_SOURCE' or `-D_FORTIFY_SOURCE=0'.
+
'-O3'
Optimize yet more. '-O3' turns on all optimizations specified by
'-O2' and also turns on the '-finline-functions',
+63 -17
View File
@@ -1,7 +1,6 @@
# Automatically generated aport, do not edit!
# Generator: pmbootstrap aportgen gcc4-armhf
# Based on: main/gcc4 (from postmarketOS)
CTARGET_ARCH=armhf
CTARGET="$(arch_to_hostspec ${CTARGET_ARCH})"
LANG_D=false
@@ -23,19 +22,22 @@ CBUILDROOT="/"
_cross_configure="--disable-bootstrap --with-sysroot=/usr/$CTARGET"
maintainer=""
pkgname=gcc4-armhf
pkgver=9999
_pkgver=4.9.2
pkgrel=7
_pkgver=4.9.4
pkgrel=10
pkgdesc="Stage2 cross-compiler for armhf"
url="http://gcc.gnu.org"
# loongarch64: not supported
# ppc64le, riscv64: doesn't build
arch="x86_64"
license="GPL LGPL"
license="GPL-2.0-or-later AND LGPL-2.1-or-later"
_gccrel=$_pkgver-r$pkgrel
depends="binutils-armhf mpc1"
depends="binutils-armhf mpc1 so:libc.musl-x86_64.so.1 so:libgcc_s.so.1 so:libgmp.so.10 so:libisl.so.23 so:libmpc.so.3 so:libmpfr.so.6 so:libstdc++.so.6 so:libz.so.1"
makedepends_build="gcc g++ bison flex texinfo gawk zip gmp-dev mpfr-dev mpc1-dev zlib-dev"
makedepends_host="linux-headers gmp-dev mpfr-dev mpc1-dev isl-dev zlib-dev musl-dev-armhf binutils-armhf"
options="!strip"
options="!strip !tracedeps toolchain"
# We only care about C, so we can compile old Linux kernels
LANG_CXX=false
@@ -67,11 +69,23 @@ if [ "$CHOST" != "$CTARGET" ]; then
LIBATOMIC=false
LIBITM=false
# format-sec: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100431
CFLAGS="${CFLAGS/-Werror=format-security/}"
CXXFLAGS="${CXXFLAGS/-Werror=format-security/}"
CPPFLAGS="${CPPFLAGS/-Werror=format-security/}"
# fstack-clash-protection is not known to GCC 4
CFLAGS="${CFLAGS/-fstack-clash-protection/}"
CXXFLAGS="${CXXFLAGS/-fstack-clash-protection/}"
CPPFLAGS="${CPPFLAGS/-fstack-clash-protection/}"
# and neither is -fno-plt
CFLAGS="${CFLAGS/-fno-plt/}"
CXXFLAGS="${CXXFLAGS/-fno-plt/}"
CPPFLAGS="${CPPFLAGS/-fno-plt/}"
# 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 $CFLAGS"
export CXXFLAGS="$CPPFLAGS $CXXFLAGS"
export CFLAGS="$CPPFLAGS -g0 $CFLAGS"
export CXXFLAGS="$CPPFLAGS -g0 $CXXFLAGS"
unset CPPFLAGS
export CFLAGS_FOR_TARGET=" "
export CXXFLAGS_FOR_TARGET=" "
@@ -79,10 +93,23 @@ if [ "$CHOST" != "$CTARGET" ]; then
STRIP_FOR_TARGET="$CTARGET-strip"
elif [ "$CBUILD" != "$CHOST" ]; then
# format-sec: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100431
CFLAGS="${CFLAGS/-Werror=format-security/}"
CXXFLAGS="${CXXFLAGS/-Werror=format-security/}"
CPPFLAGS="${CPPFLAGS/-Werror=format-security/}"
# fstack-clash-protection is not known to GCC 4
CFLAGS="${CFLAGS/-fstack-clash-protection/}"
CXXFLAGS="${CXXFLAGS/-fstack-clash-protection/}"
CPPFLAGS="${CPPFLAGS/-fstack-clash-protection/}"
# and neither is -fno-plt
CFLAGS="${CFLAGS/-fno-plt/}"
CXXFLAGS="${CXXFLAGS/-fno-plt/}"
CPPFLAGS="${CPPFLAGS/-fno-plt/}"
# 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 $CFLAGS"
export CXXFLAGS="$CPPFLAGS $CXXFLAGS"
export CFLAGS="$CPPFLAGS -g0 $CFLAGS"
export CXXFLAGS="$CPPFLAGS -g0 $CXXFLAGS"
unset CPPFLAGS
# reset flags and cc for build
@@ -106,6 +133,31 @@ elif [ "$CBUILD" != "$CHOST" ]; then
else
STRIP_FOR_TARGET=${CROSS_COMPILE}strip
_builddir="$srcdir/build"
# format-sec: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100431
CFLAGS="${CFLAGS/-Werror=format-security/}"
CXXFLAGS="${CXXFLAGS/-Werror=format-security/}"
CPPFLAGS="${CPPFLAGS/-Werror=format-security/}"
# fstack-clash-protection is not known to GCC 4
CFLAGS="${CFLAGS/-fstack-clash-protection/}"
CXXFLAGS="${CXXFLAGS/-fstack-clash-protection/}"
CPPFLAGS="${CPPFLAGS/-fstack-clash-protection/}"
# and neither is -fno-plt
CFLAGS="${CFLAGS/-fno-plt/}"
CXXFLAGS="${CXXFLAGS/-fno-plt/}"
CPPFLAGS="${CPPFLAGS/-fno-plt/}"
# 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 -O2"
export CXXFLAGS="$CPPFLAGS -g0 $CXXFLAGS -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
# Go needs {set,make,swap}context, unimplemented in musl
@@ -176,7 +228,6 @@ source="http://gcc.gnu.org/pub/gcc/releases/gcc-${_pkgbase:-$_pkgver}/gcc-${_pkg
40_all_gcc49_config_esp.patch
41_all_gcc49_config_esp_alpine.patch
10_all_default-fortify-source.patch
12_all_default-warn-trampolines.patch
15_all_libgfortran-Werror.patch
16_all_libgomp-Werror.patch
@@ -193,7 +244,6 @@ source="http://gcc.gnu.org/pub/gcc/releases/gcc-${_pkgbase:-$_pkgver}/gcc-${_pkg
gcc-4.9-musl.patch
gcc-4.8-musl-fix-iteratephdr.patch
gcc-4.8-musl-libssp.patch
gcc-4.9-musl-fortify.patch
boehm-gc-uclibc.patch
boehm-gc-musl.patch
gcc-pure64.patch
@@ -201,7 +251,6 @@ source="http://gcc.gnu.org/pub/gcc/releases/gcc-${_pkgbase:-$_pkgver}/gcc-${_pkg
fix-gcj-iconv-musl.patch
musl-posix_memalign-c++.patch
pr63740.patch
pr64037.patch
gcc-4.8-build-args.patch
fix-cxxflags-passing.patch
@@ -435,7 +484,7 @@ package() {
}
sha512sums="
35a1386ae2b8629cd464383fbb3c61e94a07f3691f48b8029b97cc62a60c792ffb870aad2343b2ad8185bf46f77e1e1dd62309ecdadc42f919874c6e2c58b936 gcc-4.9.2.tar.gz
ca0f589f33987755195e81a9c7a83f797cfe5775fca908d025eb3ddbe8857edd666d272c2e97088c1808b268c5785326b72f2a340a277f6aa2c9bfe22c02ad69 gcc-4.9.4.tar.gz
28f8c6fdbcb19e950b1d0bafb3bcc7a8cba87bc673aa6027cece116599cdee80f0cf5e95a1440544890239f5c754e8a93ab46d9daedd937faef445d7ea33b226 ecj-4.9.jar
618a8d037ccad15e60182acc9c85ba844cb9b5800a22ece0b814e43541b01b4e390a2847f86debb351f4b05580241747fde87e86a17060744e7bb2b9a3dc5bd4 01_all_gcc49_configure.patch
21770259c7916e55568027926e4a543eea468b04436cc61c28f749be5a6635c48e68b7924a8eb19a76733a9d2f00921ba06faddaedbf14b1cdad5ab1810cc6c6 02_all_gcc48_config.in.patch
@@ -448,7 +497,6 @@ dd5b9b30eb7716cb3c010ca79a83ed6219ff6e6f2557deb4e1d26cecac0f2b14c4ef7bf4dc5c2aec
8829f85323d8b11e26e3c19ced4a51875fc63f1483cfdc4d0f579a6cb37e1b6e23fcf33a87a574a6e0007250374ea46d117a136e73a40fbe43f0e39d9b2dd1a8 35_all_gcc48_config_arm.patch
976994900d20a448b97fa91e1d758b6da6d8ad9121b3dbc2e8f66ff8006d8e496cd3dddc41394db6c4d20366d56fe12375b97f494d6fb9abb8e64ab626acc2ef 40_all_gcc49_config_esp.patch
e2d027be2e76a64a607ae44566d163bcc2a03c9e14d5bd20cd8bb15c2e9e395d8964b747a6a9c49541a5d1613d721855b73d60cce7c834427b44788fa92d44dc 41_all_gcc49_config_esp_alpine.patch
6cdac0741568b418af1e267a69b487e48a98e319f5ec8ab2bad293f2520ceced40c7df7ddef84963f5b101b94f34e441574c501ef3993ded097beb7c9d3b205f 10_all_default-fortify-source.patch
5069e4b741488913a646a9b5d871af8e7f7a606158ea09305d0ddd46257c5b659770627bc2ca3abeaae039da1717b3ba6c9cd90554a441da74eb4ecf24c13074 12_all_default-warn-trampolines.patch
c18a99b7303a734fe4dca9d4e90e21d18e5bd71c7d91e1a26c86b1354c73f567590a875941bfe64ce59f0393023b91c606c96b30885c55b98a790c3ab0c84ca7 15_all_libgfortran-Werror.patch
433404fd9bfa172d69fff4a5505e8648cbbbf5f052d2b4235608ff7af0c4063d557d25d80c85c5bd0d1e1ed64b568e7bbc0cdbce11cc74db4c0189af3a01634a 16_all_libgomp-Werror.patch
@@ -464,7 +512,6 @@ d08d7ead2de0429e5c9055d5b029ec2be9a8c821d22cecaf9b51f633652c493333f98963d9267fa2
e2be926c0ed4d67587857652678253a2a4e42294009a0c4b9fc420e53b0e6d44d1a2c6c2c62db837bc010470e9e62eb4af1ba7f51ff507c41e40922cd022dd26 gcc-4.9-musl.patch
b5b0210dfaccfe0b06f0a9090666b1fae2a3faa4140b7930146b29531f0da9beb1f2c1f7e7bc2bd29179f9fe05dc30e246e96220b8ff75a90f75e8350c9058a1 gcc-4.8-musl-fix-iteratephdr.patch
e6d9b103c128e5d4eca515b1496d78b05708de770597c883daddd95ea41e77b5ef1be613b989357cc870a7efd9e43b011022c2d302e7056cff7b69e764906ff2 gcc-4.8-musl-libssp.patch
600fe5098dc54edaa9808fd5717af9dec058953f9ad37d49cfba1db4f7e9a7a8f02019342f75157fc575946fa693259422184de27b7ecc8386d9f3ecc0f7cc5d gcc-4.9-musl-fortify.patch
e1d6a450dfb40b134ad7f759c4c10174d2490b0093fe47cb33479245f26a3a8c54ebcf6255943c0ccfcb5095600d1c05e530baeed35609c8ffe75caac8e57c49 boehm-gc-uclibc.patch
bda845a6aa1854d2c883910b115f79ccfa93dfc2b5eac69a3a236d83eb34cadc140731d616ffc24698c7abc8878dd15f231bcc5119f1860e575a120b311706c7 boehm-gc-musl.patch
4a5aeff0399782c752e6e3f2f48d984b2056dfb5d229b23a24eee1562d241339989b2203f139821cfc03c9b25c9bd7da6ccbbdc7a09d242e4de7f0d606c6f63c gcc-pure64.patch
@@ -472,7 +519,6 @@ f89ddeb21bc8f97e6a850a6b70b4501a8f3e49a4bc8cc82897488decda5d98ad01cb7f6c8b392d45
54d67cc008b735e47771314171930c5d8b8f5f5dc97fcf4214824c105c808f3e75d22d5a4fdf5068ed0457fa0d46c60cfb442e276259a4a5e9b8722a027d18e6 fix-gcj-iconv-musl.patch
7de81fc8c7eb36690949eb30082515454978440a8f389b12407ac5e9125ef6824d6059ffb5b063ab1ccc6c4827b1a6a0984b538f056b85e3171800a6f723ec8b musl-posix_memalign-c++.patch
095281d940ad7504ed7071cc9800d81db33eb4aa5465696ef7b12bf1213dbdfa701f4392095c5167b331c38219b19d25a0798524b319f1c77aa8522d76d8c92c pr63740.patch
efc04b179d41b484eddddc56d0e442634995d56c994e6295ae09b9856ab46649d5f45f51ea84494ab39df41c213772d0e68aee67e66fdf340f0a647b55629ced pr64037.patch
abe9aaf9aa956058d0386a4396a511d176a46bb3906b90e952383646cdc158cbeb0a5dc616a1ccb1ca7d49fd0b5e351532aa15a3b13362abbf1ca4266f54a687 gcc-4.8-build-args.patch
35d6d59f0b7b968f282f56767c9e0823a7bdc5aa0d450aca50fbd802649a7ca608b47671244a3faa208a9b0d6832cabb5a22724157dc817b2c0ad63d09f93282 fix-cxxflags-passing.patch
c731f4aaaa65c8950e1b2bd9331410f92d378fd8c7e718532dccaa27ee11984d51d74216c3611e89a802325b81d7f184116839dce2dab50cae9b643c20a82fe7 fix-cxxflags-for-target.patch
@@ -1,11 +0,0 @@
--- gcc-4.9.2/gcc/config/linux.h.orig 2015-03-09 13:27:13.289736710 +0000
+++ gcc-4.9.2/gcc/config/linux.h 2015-03-09 13:29:32.295625046 +0000
@@ -146,6 +146,8 @@
#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
-83
View File
@@ -1,83 +0,0 @@
https://gcc.gnu.org/git/?p=gcc.git;a=patch;h=0817dc6f0e6b973e0e3671eb72d3758a8f042324
(changelog changes removed)
From 0817dc6f0e6b973e0e3671eb72d3758a8f042324 Mon Sep 17 00:00:00 2001
From: hjl <hjl@138bc75d-0d04-0410-961f-82ee72b054a4>
Date: Sun, 14 Dec 2014 16:07:03 +0000
Subject: [PATCH] Pass unpromoted argument to promote_function_mode
This patch updates setup_incoming_promotions in combine.c to match what
is actually passed in assign_parm_setup_reg in function.c.
Backported from mainline:
gcc/
PR rtl-optimization/64037
* combine.c (setup_incoming_promotions): Pass the argument
before any promotions happen to promote_function_mode.
gcc/testsuite/
PR rtl-optimization/64037
* g++.dg/pr64037.C: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-4_9-branch@218721 138bc75d-0d04-0410-961f-82ee72b054a4
---
gcc/combine.c | 4 ++--
gcc/testsuite/g++.dg/pr64037.C | 27 +++++++++++++++++++++++++++
4 files changed, 46 insertions(+), 2 deletions(-)
create mode 100644 gcc/testsuite/g++.dg/pr64037.C
diff --git a/gcc/combine.c b/gcc/combine.c
index 7c00452..adea2c1 100644
--- a/gcc/combine.c
+++ b/gcc/combine.c
@@ -1529,8 +1529,8 @@ setup_incoming_promotions (rtx first)
uns3 = TYPE_UNSIGNED (DECL_ARG_TYPE (arg));
/* The mode and signedness of the argument as it is actually passed,
- after any TARGET_PROMOTE_FUNCTION_ARGS-driven ABI promotions. */
- mode3 = promote_function_mode (DECL_ARG_TYPE (arg), mode2, &uns3,
+ see assign_parm_setup_reg in function.c. */
+ mode3 = promote_function_mode (TREE_TYPE (arg), mode1, &uns3,
TREE_TYPE (cfun->decl), 0);
/* The mode of the register in which the argument is being passed. */
diff --git a/gcc/testsuite/g++.dg/pr64037.C b/gcc/testsuite/g++.dg/pr64037.C
new file mode 100644
index 0000000..e5cd0e2
--- /dev/null
+++ b/gcc/testsuite/g++.dg/pr64037.C
@@ -0,0 +1,27 @@
+// { dg-do run { target i?86-*-* x86_64-*-* } }
+// { dg-options "-std=c++11 -Os" }
+
+enum class X : unsigned char {
+ V = 2,
+};
+
+static void
+__attribute__((noinline,noclone))
+foo(unsigned &out, unsigned a, X b)
+{
+ out = static_cast<unsigned>(b);
+}
+
+int main()
+{
+ unsigned deadbeef = 0xDEADBEEF;
+ asm volatile ("" : "+d" (deadbeef), "+c" (deadbeef));
+
+ unsigned out;
+ foo(out, 2, X::V);
+
+ if (out != 2)
+ __builtin_abort ();
+
+ return 0;
+}
--
1.7.1
@@ -1,31 +0,0 @@
Enable -D_FORTIFY_SOURCE=2 by default.
Original patch from:
http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo/src/patchsets/gcc/4.9.2/gentoo/10_all_default-fortify-source.patch
--- a/gcc/c-family/c-cppbuiltin.c
+++ b/gcc/c-family/c-cppbuiltin.c
@@ -951,6 +951,9 @@ 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 w/optimization. */
+ cpp_define (pfile, "_FORTIFY_SOURCE=((defined __OPTIMIZE__ && __OPTIMIZE__ > 0) ? 2 : 0)");
+
/* Misc. */
if (flag_gnu89_inline)
cpp_define (pfile, "__GNUC_GNU_INLINE__");
--- a/gcc/doc/gcc.info
+++ b/gcc/doc/gcc.info
@@ -6255,6 +6255,11 @@ find out the exact set of optimizations that are enabled at each level.
Please note the warning under '-fgcse' about invoking '-O2' on
programs that use computed gotos.
+ NOTE: In Alpine Linux, `-D_FORTIFY_SOURCE=2' is set by default, and is
+ activated when `-Os' or `-O1' or higher is used. This enables additional
+ compile-time and run-time checks for several libc functions. To disable,
+ specify either `-U_FORTIFY_SOURCE' or `-D_FORTIFY_SOURCE=0'.
+
'-O3'
Optimize yet more. '-O3' turns on all optimizations specified by
'-O2' and also turns on the '-finline-functions',
+63 -17
View File
@@ -1,7 +1,6 @@
# Automatically generated aport, do not edit!
# Generator: pmbootstrap aportgen gcc4-armv7
# Based on: main/gcc4 (from postmarketOS)
CTARGET_ARCH=armv7
CTARGET="$(arch_to_hostspec ${CTARGET_ARCH})"
LANG_D=false
@@ -23,19 +22,22 @@ CBUILDROOT="/"
_cross_configure="--disable-bootstrap --with-sysroot=/usr/$CTARGET"
maintainer=""
pkgname=gcc4-armv7
pkgver=9999
_pkgver=4.9.2
pkgrel=7
_pkgver=4.9.4
pkgrel=10
pkgdesc="Stage2 cross-compiler for armv7"
url="http://gcc.gnu.org"
# loongarch64: not supported
# ppc64le, riscv64: doesn't build
arch="x86_64"
license="GPL LGPL"
license="GPL-2.0-or-later AND LGPL-2.1-or-later"
_gccrel=$_pkgver-r$pkgrel
depends="binutils-armv7 mpc1"
depends="binutils-armv7 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-armv7 binutils-armv7"
options="!strip"
options="!strip !tracedeps toolchain"
# We only care about C, so we can compile old Linux kernels
LANG_CXX=false
@@ -67,11 +69,23 @@ if [ "$CHOST" != "$CTARGET" ]; then
LIBATOMIC=false
LIBITM=false
# format-sec: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100431
CFLAGS="${CFLAGS/-Werror=format-security/}"
CXXFLAGS="${CXXFLAGS/-Werror=format-security/}"
CPPFLAGS="${CPPFLAGS/-Werror=format-security/}"
# fstack-clash-protection is not known to GCC 4
CFLAGS="${CFLAGS/-fstack-clash-protection/}"
CXXFLAGS="${CXXFLAGS/-fstack-clash-protection/}"
CPPFLAGS="${CPPFLAGS/-fstack-clash-protection/}"
# and neither is -fno-plt
CFLAGS="${CFLAGS/-fno-plt/}"
CXXFLAGS="${CXXFLAGS/-fno-plt/}"
CPPFLAGS="${CPPFLAGS/-fno-plt/}"
# 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 $CFLAGS"
export CXXFLAGS="$CPPFLAGS $CXXFLAGS"
export CFLAGS="$CPPFLAGS -g0 $CFLAGS"
export CXXFLAGS="$CPPFLAGS -g0 $CXXFLAGS"
unset CPPFLAGS
export CFLAGS_FOR_TARGET=" "
export CXXFLAGS_FOR_TARGET=" "
@@ -79,10 +93,23 @@ if [ "$CHOST" != "$CTARGET" ]; then
STRIP_FOR_TARGET="$CTARGET-strip"
elif [ "$CBUILD" != "$CHOST" ]; then
# format-sec: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100431
CFLAGS="${CFLAGS/-Werror=format-security/}"
CXXFLAGS="${CXXFLAGS/-Werror=format-security/}"
CPPFLAGS="${CPPFLAGS/-Werror=format-security/}"
# fstack-clash-protection is not known to GCC 4
CFLAGS="${CFLAGS/-fstack-clash-protection/}"
CXXFLAGS="${CXXFLAGS/-fstack-clash-protection/}"
CPPFLAGS="${CPPFLAGS/-fstack-clash-protection/}"
# and neither is -fno-plt
CFLAGS="${CFLAGS/-fno-plt/}"
CXXFLAGS="${CXXFLAGS/-fno-plt/}"
CPPFLAGS="${CPPFLAGS/-fno-plt/}"
# 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 $CFLAGS"
export CXXFLAGS="$CPPFLAGS $CXXFLAGS"
export CFLAGS="$CPPFLAGS -g0 $CFLAGS"
export CXXFLAGS="$CPPFLAGS -g0 $CXXFLAGS"
unset CPPFLAGS
# reset flags and cc for build
@@ -106,6 +133,31 @@ elif [ "$CBUILD" != "$CHOST" ]; then
else
STRIP_FOR_TARGET=${CROSS_COMPILE}strip
_builddir="$srcdir/build"
# format-sec: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100431
CFLAGS="${CFLAGS/-Werror=format-security/}"
CXXFLAGS="${CXXFLAGS/-Werror=format-security/}"
CPPFLAGS="${CPPFLAGS/-Werror=format-security/}"
# fstack-clash-protection is not known to GCC 4
CFLAGS="${CFLAGS/-fstack-clash-protection/}"
CXXFLAGS="${CXXFLAGS/-fstack-clash-protection/}"
CPPFLAGS="${CPPFLAGS/-fstack-clash-protection/}"
# and neither is -fno-plt
CFLAGS="${CFLAGS/-fno-plt/}"
CXXFLAGS="${CXXFLAGS/-fno-plt/}"
CPPFLAGS="${CPPFLAGS/-fno-plt/}"
# 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 -O2"
export CXXFLAGS="$CPPFLAGS -g0 $CXXFLAGS -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
# Go needs {set,make,swap}context, unimplemented in musl
@@ -176,7 +228,6 @@ source="http://gcc.gnu.org/pub/gcc/releases/gcc-${_pkgbase:-$_pkgver}/gcc-${_pkg
40_all_gcc49_config_esp.patch
41_all_gcc49_config_esp_alpine.patch
10_all_default-fortify-source.patch
12_all_default-warn-trampolines.patch
15_all_libgfortran-Werror.patch
16_all_libgomp-Werror.patch
@@ -193,7 +244,6 @@ source="http://gcc.gnu.org/pub/gcc/releases/gcc-${_pkgbase:-$_pkgver}/gcc-${_pkg
gcc-4.9-musl.patch
gcc-4.8-musl-fix-iteratephdr.patch
gcc-4.8-musl-libssp.patch
gcc-4.9-musl-fortify.patch
boehm-gc-uclibc.patch
boehm-gc-musl.patch
gcc-pure64.patch
@@ -201,7 +251,6 @@ source="http://gcc.gnu.org/pub/gcc/releases/gcc-${_pkgbase:-$_pkgver}/gcc-${_pkg
fix-gcj-iconv-musl.patch
musl-posix_memalign-c++.patch
pr63740.patch
pr64037.patch
gcc-4.8-build-args.patch
fix-cxxflags-passing.patch
@@ -435,7 +484,7 @@ package() {
}
sha512sums="
35a1386ae2b8629cd464383fbb3c61e94a07f3691f48b8029b97cc62a60c792ffb870aad2343b2ad8185bf46f77e1e1dd62309ecdadc42f919874c6e2c58b936 gcc-4.9.2.tar.gz
ca0f589f33987755195e81a9c7a83f797cfe5775fca908d025eb3ddbe8857edd666d272c2e97088c1808b268c5785326b72f2a340a277f6aa2c9bfe22c02ad69 gcc-4.9.4.tar.gz
28f8c6fdbcb19e950b1d0bafb3bcc7a8cba87bc673aa6027cece116599cdee80f0cf5e95a1440544890239f5c754e8a93ab46d9daedd937faef445d7ea33b226 ecj-4.9.jar
618a8d037ccad15e60182acc9c85ba844cb9b5800a22ece0b814e43541b01b4e390a2847f86debb351f4b05580241747fde87e86a17060744e7bb2b9a3dc5bd4 01_all_gcc49_configure.patch
21770259c7916e55568027926e4a543eea468b04436cc61c28f749be5a6635c48e68b7924a8eb19a76733a9d2f00921ba06faddaedbf14b1cdad5ab1810cc6c6 02_all_gcc48_config.in.patch
@@ -448,7 +497,6 @@ dd5b9b30eb7716cb3c010ca79a83ed6219ff6e6f2557deb4e1d26cecac0f2b14c4ef7bf4dc5c2aec
8829f85323d8b11e26e3c19ced4a51875fc63f1483cfdc4d0f579a6cb37e1b6e23fcf33a87a574a6e0007250374ea46d117a136e73a40fbe43f0e39d9b2dd1a8 35_all_gcc48_config_arm.patch
976994900d20a448b97fa91e1d758b6da6d8ad9121b3dbc2e8f66ff8006d8e496cd3dddc41394db6c4d20366d56fe12375b97f494d6fb9abb8e64ab626acc2ef 40_all_gcc49_config_esp.patch
e2d027be2e76a64a607ae44566d163bcc2a03c9e14d5bd20cd8bb15c2e9e395d8964b747a6a9c49541a5d1613d721855b73d60cce7c834427b44788fa92d44dc 41_all_gcc49_config_esp_alpine.patch
6cdac0741568b418af1e267a69b487e48a98e319f5ec8ab2bad293f2520ceced40c7df7ddef84963f5b101b94f34e441574c501ef3993ded097beb7c9d3b205f 10_all_default-fortify-source.patch
5069e4b741488913a646a9b5d871af8e7f7a606158ea09305d0ddd46257c5b659770627bc2ca3abeaae039da1717b3ba6c9cd90554a441da74eb4ecf24c13074 12_all_default-warn-trampolines.patch
c18a99b7303a734fe4dca9d4e90e21d18e5bd71c7d91e1a26c86b1354c73f567590a875941bfe64ce59f0393023b91c606c96b30885c55b98a790c3ab0c84ca7 15_all_libgfortran-Werror.patch
433404fd9bfa172d69fff4a5505e8648cbbbf5f052d2b4235608ff7af0c4063d557d25d80c85c5bd0d1e1ed64b568e7bbc0cdbce11cc74db4c0189af3a01634a 16_all_libgomp-Werror.patch
@@ -464,7 +512,6 @@ d08d7ead2de0429e5c9055d5b029ec2be9a8c821d22cecaf9b51f633652c493333f98963d9267fa2
e2be926c0ed4d67587857652678253a2a4e42294009a0c4b9fc420e53b0e6d44d1a2c6c2c62db837bc010470e9e62eb4af1ba7f51ff507c41e40922cd022dd26 gcc-4.9-musl.patch
b5b0210dfaccfe0b06f0a9090666b1fae2a3faa4140b7930146b29531f0da9beb1f2c1f7e7bc2bd29179f9fe05dc30e246e96220b8ff75a90f75e8350c9058a1 gcc-4.8-musl-fix-iteratephdr.patch
e6d9b103c128e5d4eca515b1496d78b05708de770597c883daddd95ea41e77b5ef1be613b989357cc870a7efd9e43b011022c2d302e7056cff7b69e764906ff2 gcc-4.8-musl-libssp.patch
600fe5098dc54edaa9808fd5717af9dec058953f9ad37d49cfba1db4f7e9a7a8f02019342f75157fc575946fa693259422184de27b7ecc8386d9f3ecc0f7cc5d gcc-4.9-musl-fortify.patch
e1d6a450dfb40b134ad7f759c4c10174d2490b0093fe47cb33479245f26a3a8c54ebcf6255943c0ccfcb5095600d1c05e530baeed35609c8ffe75caac8e57c49 boehm-gc-uclibc.patch
bda845a6aa1854d2c883910b115f79ccfa93dfc2b5eac69a3a236d83eb34cadc140731d616ffc24698c7abc8878dd15f231bcc5119f1860e575a120b311706c7 boehm-gc-musl.patch
4a5aeff0399782c752e6e3f2f48d984b2056dfb5d229b23a24eee1562d241339989b2203f139821cfc03c9b25c9bd7da6ccbbdc7a09d242e4de7f0d606c6f63c gcc-pure64.patch
@@ -472,7 +519,6 @@ f89ddeb21bc8f97e6a850a6b70b4501a8f3e49a4bc8cc82897488decda5d98ad01cb7f6c8b392d45
54d67cc008b735e47771314171930c5d8b8f5f5dc97fcf4214824c105c808f3e75d22d5a4fdf5068ed0457fa0d46c60cfb442e276259a4a5e9b8722a027d18e6 fix-gcj-iconv-musl.patch
7de81fc8c7eb36690949eb30082515454978440a8f389b12407ac5e9125ef6824d6059ffb5b063ab1ccc6c4827b1a6a0984b538f056b85e3171800a6f723ec8b musl-posix_memalign-c++.patch
095281d940ad7504ed7071cc9800d81db33eb4aa5465696ef7b12bf1213dbdfa701f4392095c5167b331c38219b19d25a0798524b319f1c77aa8522d76d8c92c pr63740.patch
efc04b179d41b484eddddc56d0e442634995d56c994e6295ae09b9856ab46649d5f45f51ea84494ab39df41c213772d0e68aee67e66fdf340f0a647b55629ced pr64037.patch
abe9aaf9aa956058d0386a4396a511d176a46bb3906b90e952383646cdc158cbeb0a5dc616a1ccb1ca7d49fd0b5e351532aa15a3b13362abbf1ca4266f54a687 gcc-4.8-build-args.patch
35d6d59f0b7b968f282f56767c9e0823a7bdc5aa0d450aca50fbd802649a7ca608b47671244a3faa208a9b0d6832cabb5a22724157dc817b2c0ad63d09f93282 fix-cxxflags-passing.patch
c731f4aaaa65c8950e1b2bd9331410f92d378fd8c7e718532dccaa27ee11984d51d74216c3611e89a802325b81d7f184116839dce2dab50cae9b643c20a82fe7 fix-cxxflags-for-target.patch
@@ -1,11 +0,0 @@
--- gcc-4.9.2/gcc/config/linux.h.orig 2015-03-09 13:27:13.289736710 +0000
+++ gcc-4.9.2/gcc/config/linux.h 2015-03-09 13:29:32.295625046 +0000
@@ -146,6 +146,8 @@
#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
-83
View File
@@ -1,83 +0,0 @@
https://gcc.gnu.org/git/?p=gcc.git;a=patch;h=0817dc6f0e6b973e0e3671eb72d3758a8f042324
(changelog changes removed)
From 0817dc6f0e6b973e0e3671eb72d3758a8f042324 Mon Sep 17 00:00:00 2001
From: hjl <hjl@138bc75d-0d04-0410-961f-82ee72b054a4>
Date: Sun, 14 Dec 2014 16:07:03 +0000
Subject: [PATCH] Pass unpromoted argument to promote_function_mode
This patch updates setup_incoming_promotions in combine.c to match what
is actually passed in assign_parm_setup_reg in function.c.
Backported from mainline:
gcc/
PR rtl-optimization/64037
* combine.c (setup_incoming_promotions): Pass the argument
before any promotions happen to promote_function_mode.
gcc/testsuite/
PR rtl-optimization/64037
* g++.dg/pr64037.C: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-4_9-branch@218721 138bc75d-0d04-0410-961f-82ee72b054a4
---
gcc/combine.c | 4 ++--
gcc/testsuite/g++.dg/pr64037.C | 27 +++++++++++++++++++++++++++
4 files changed, 46 insertions(+), 2 deletions(-)
create mode 100644 gcc/testsuite/g++.dg/pr64037.C
diff --git a/gcc/combine.c b/gcc/combine.c
index 7c00452..adea2c1 100644
--- a/gcc/combine.c
+++ b/gcc/combine.c
@@ -1529,8 +1529,8 @@ setup_incoming_promotions (rtx first)
uns3 = TYPE_UNSIGNED (DECL_ARG_TYPE (arg));
/* The mode and signedness of the argument as it is actually passed,
- after any TARGET_PROMOTE_FUNCTION_ARGS-driven ABI promotions. */
- mode3 = promote_function_mode (DECL_ARG_TYPE (arg), mode2, &uns3,
+ see assign_parm_setup_reg in function.c. */
+ mode3 = promote_function_mode (TREE_TYPE (arg), mode1, &uns3,
TREE_TYPE (cfun->decl), 0);
/* The mode of the register in which the argument is being passed. */
diff --git a/gcc/testsuite/g++.dg/pr64037.C b/gcc/testsuite/g++.dg/pr64037.C
new file mode 100644
index 0000000..e5cd0e2
--- /dev/null
+++ b/gcc/testsuite/g++.dg/pr64037.C
@@ -0,0 +1,27 @@
+// { dg-do run { target i?86-*-* x86_64-*-* } }
+// { dg-options "-std=c++11 -Os" }
+
+enum class X : unsigned char {
+ V = 2,
+};
+
+static void
+__attribute__((noinline,noclone))
+foo(unsigned &out, unsigned a, X b)
+{
+ out = static_cast<unsigned>(b);
+}
+
+int main()
+{
+ unsigned deadbeef = 0xDEADBEEF;
+ asm volatile ("" : "+d" (deadbeef), "+c" (deadbeef));
+
+ unsigned out;
+ foo(out, 2, X::V);
+
+ if (out != 2)
+ __builtin_abort ();
+
+ return 0;
+}
--
1.7.1
@@ -1,40 +0,0 @@
# DP: Turn on -D_FORTIFY_SOURCE=2 by default for C, C++, ObjC, ObjC++,
# DP: if the optimization level is > 0
---
gcc/doc/invoke.texi | 6 ++++++
gcc/c-family/c-cppbuiltin.c | 3 +
2 files changed, 9 insertions(+), 0 deletions(-)
Index: b/gcc/doc/invoke.texi
===================================================================
--- a/gcc/doc/invoke.texi
+++ b/gcc/doc/invoke.texi
@@ -7840,6 +7840,12 @@ also turns on the following optimization
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}.
+
@item -O3
@opindex O3
Optimize yet more. @option{-O3} turns on all optimizations specified
Index: b/gcc/c-family/c-cppbuiltin.c
===================================================================
--- a/gcc/c-family/c-cppbuiltin.c
+++ b/gcc/c-family/c-cppbuiltin.c
@@ -1176,6 +1176,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__");
+65 -13
View File
@@ -1,7 +1,6 @@
# Automatically generated aport, do not edit!
# Generator: pmbootstrap aportgen gcc6-aarch64
# Based on: main/gcc6 (from postmarketOS)
CTARGET_ARCH=aarch64
CTARGET="$(arch_to_hostspec ${CTARGET_ARCH})"
LANG_D=false
@@ -23,19 +22,23 @@ CBUILDROOT="/"
_cross_configure="--disable-bootstrap --with-sysroot=/usr/$CTARGET"
maintainer=""
pkgname=gcc6-aarch64
pkgver=9999
_pkgver=6.4.0
pkgrel=12
pkgrel=15
pkgdesc="Stage2 cross-compiler for aarch64"
url="http://gcc.gnu.org"
# loongarch64: not relevant
# ppc64le: not relevant
# riscv64: doesn't build
arch="x86_64"
license="GPL LGPL"
license="GPL-2.0-or-later AND LGPL-2.1-or-later"
_gccrel=$_pkgver-r$pkgrel
depends="binutils-aarch64 mpc1"
depends="binutils-aarch64 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-aarch64 binutils-aarch64"
options="!strip"
options="!strip !tracedeps toolchain"
# We only care about C, so we can compile old Linux kernels
LANG_CXX=false
@@ -67,11 +70,23 @@ if [ "$CHOST" != "$CTARGET" ]; then
LIBATOMIC=false
LIBITM=false
# format-sec: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100431
CFLAGS="${CFLAGS/-Werror=format-security/}"
CXXFLAGS="${CXXFLAGS/-Werror=format-security/}"
CPPFLAGS="${CPPFLAGS/-Werror=format-security/}"
# fstack-clash-protection is not known to GCC 6
CFLAGS="${CFLAGS/-fstack-clash-protection/}"
CXXFLAGS="${CXXFLAGS/-fstack-clash-protection/}"
CPPFLAGS="${CPPFLAGS/-fstack-clash-protection/}"
# and neither is -fno-plt
CFLAGS="${CFLAGS/-fno-plt/}"
CXXFLAGS="${CXXFLAGS/-fno-plt/}"
CPPFLAGS="${CPPFLAGS/-fno-plt/}"
# 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 $CFLAGS"
export CXXFLAGS="$CPPFLAGS $CXXFLAGS"
export CFLAGS="$CPPFLAGS -g0 $CFLAGS"
export CXXFLAGS="$CPPFLAGS -g0 $CXXFLAGS"
unset CPPFLAGS
export CFLAGS_FOR_TARGET=" "
export CXXFLAGS_FOR_TARGET=" "
@@ -79,10 +94,23 @@ if [ "$CHOST" != "$CTARGET" ]; then
STRIP_FOR_TARGET="$CTARGET-strip"
elif [ "$CBUILD" != "$CHOST" ]; then
# format-sec: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100431
CFLAGS="${CFLAGS/-Werror=format-security/}"
CXXFLAGS="${CXXFLAGS/-Werror=format-security/}"
CPPFLAGS="${CPPFLAGS/-Werror=format-security/}"
# fstack-clash-protection is not known to GCC 6
CFLAGS="${CFLAGS/-fstack-clash-protection/}"
CXXFLAGS="${CXXFLAGS/-fstack-clash-protection/}"
CPPFLAGS="${CPPFLAGS/-fstack-clash-protection/}"
# and neither is -fno-plt
CFLAGS="${CFLAGS/-fno-plt/}"
CXXFLAGS="${CXXFLAGS/-fno-plt/}"
CPPFLAGS="${CPPFLAGS/-fno-plt/}"
# 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 $CFLAGS"
export CXXFLAGS="$CPPFLAGS $CXXFLAGS"
export CFLAGS="$CPPFLAGS -g0 $CFLAGS"
export CXXFLAGS="$CPPFLAGS -g0 $CXXFLAGS"
unset CPPFLAGS
# reset flags and cc for build
@@ -106,6 +134,31 @@ elif [ "$CBUILD" != "$CHOST" ]; then
else
STRIP_FOR_TARGET=${CROSS_COMPILE}strip
_builddir="$srcdir/build"
# format-sec: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100431
CFLAGS="${CFLAGS/-Werror=format-security/}"
CXXFLAGS="${CXXFLAGS/-Werror=format-security/}"
CPPFLAGS="${CPPFLAGS/-Werror=format-security/}"
# fstack-clash-protection is not known to GCC 6
CFLAGS="${CFLAGS/-fstack-clash-protection/}"
CXXFLAGS="${CXXFLAGS/-fstack-clash-protection/}"
CPPFLAGS="${CPPFLAGS/-fstack-clash-protection/}"
# and neither is -fno-plt
CFLAGS="${CFLAGS/-fno-plt/}"
CXXFLAGS="${CXXFLAGS/-fno-plt/}"
CPPFLAGS="${CPPFLAGS/-fno-plt/}"
# 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 -O2"
export CXXFLAGS="$CPPFLAGS -g0 $CXXFLAGS -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
# Go needs {set,make,swap}context, unimplemented in musl
@@ -166,7 +219,6 @@ source="http://gcc.gnu.org/pub/gcc/releases/gcc-${_pkgbase:-$_pkgver}/gcc-${_pkg
001_all_default-ssp-strong.patch
002_all_default-relro.patch
003_all_default-fortify-source.patch
005_all_default-as-needed.patch
011_all_default-warn-format-security.patch
012_all_default-warn-trampolines.patch
@@ -184,7 +236,6 @@ source="http://gcc.gnu.org/pub/gcc/releases/gcc-${_pkgbase:-$_pkgver}/gcc-${_pkg
207-static-pie.patch
libgcc-always-build-gcceh.a.patch
gcc-4.9-musl-fortify.patch
gcc-6.1-musl-libssp.patch
boehm-gc-musl.patch
gcc-pure64.patch
@@ -208,6 +259,8 @@ source="http://gcc.gnu.org/pub/gcc/releases/gcc-${_pkgbase:-$_pkgver}/gcc-${_pkg
gcc-pure64-mips.patch
ada-mips64.patch
gcc-6.4-isl.patch
0001-i386-Move-struct-ix86_frame-to-machine_function.patch
0002-i386-Use-reference-of-struct-ix86_frame-to-avoid-cop.patch
0003-i386-Use-const-reference-of-struct-ix86_frame-to-avo.patch
@@ -446,7 +499,6 @@ sha512sums="
28f8c6fdbcb19e950b1d0bafb3bcc7a8cba87bc673aa6027cece116599cdee80f0cf5e95a1440544890239f5c754e8a93ab46d9daedd937faef445d7ea33b226 ecj-4.9.jar
a1335adc2fbee98e36c4437ff2587771b98ed4180726779020f65039498235626a411cdb0100dbd20cd19d12f0d94f9a21af179ff624676c28cead9d60598b5d 001_all_default-ssp-strong.patch
e36e95b81489163abd6fe9d58f7867bdca43e61143afacbfb17f4698c0b16ec5fd0061d8fab7b2ae615540bebd721c2e2227f80401b4e7fc253da9da62e6b513 002_all_default-relro.patch
f86466c62b8291fac46f9c250c7ad8fa5ab7b1cce2504442fd07ddc4543665b317ae28951f244e39aba29aeaf3fff252ec4f6a147aa16adb2b7aed747dd89188 003_all_default-fortify-source.patch
51282fea54c7e616367bbeb2479ba13fec6f24eb47bd04e2071907b3b36273b2ff24676f46ef8d22f241c8ab4857307861eee076eab66797c3a50a8ecaa1809a 005_all_default-as-needed.patch
3398386dd1e079d6545dd9799adc799c6b80e3984fac6899d0e1a7ee21b66d0c7e53cddf17a65d590c883db750f9f79aaedd857355a8b9f7fb9476c906237919 011_all_default-warn-format-security.patch
9adb0d2b9b67dd957df6c609b8714c7c078efb52cd88770905c37c67827be8fc83d1125037b9c29d77db21ce78756aa2bb0bacdb0b98d869ac126da76a298e21 012_all_default-warn-trampolines.patch
@@ -462,7 +514,6 @@ fc0de05b36613b732a0222ea005c90653c6a40d6761b6894af2419272f4e74875f37e26af33a9b99
98473bcaa77903a223ca9b0d2087c0921b287a2816d308cc32c8fe009e6cbf5dd1ae7fba27794ab8d9c09e117fe534413d91a464d1218474fc123ce0adfdc2c1 205-nopie.patch
3287d5b443bea8ec64132bcabe869c738ae98ea8f1a86df1c5d18c927f8816edbfcefeefc47792dbbb2bcacf50319af00e01b3735d34525913b64350770ad453 207-static-pie.patch
d08d7ead2de0429e5c9055d5b029ec2be9a8c821d22cecaf9b51f633652c493333f98963d9267fa2fa63850c50ae5eefd5f59e5910ec10d20044dac082182a8b libgcc-always-build-gcceh.a.patch
600fe5098dc54edaa9808fd5717af9dec058953f9ad37d49cfba1db4f7e9a7a8f02019342f75157fc575946fa693259422184de27b7ecc8386d9f3ecc0f7cc5d gcc-4.9-musl-fortify.patch
dbe0ee917fc7668571722364ab7c806731e3a31e8bfa30b4941b28b16b877d2a32b4a3897ef533399a28f82d43cac9b28e92de0493f0e779046db56584e07fa4 gcc-6.1-musl-libssp.patch
bda845a6aa1854d2c883910b115f79ccfa93dfc2b5eac69a3a236d83eb34cadc140731d616ffc24698c7abc8878dd15f231bcc5119f1860e575a120b311706c7 boehm-gc-musl.patch
fa62556719449caec6b2b434355bfbcaa5ae55ffe017b3e1f827f66a2aae21b79c571ee7a4ce723ea69169bc3a6447e73650991a200cc372adf2f102677518d7 gcc-pure64.patch
@@ -482,6 +533,7 @@ f4ef08454e28c8732db69115e4998ec153399e8d229dd27f923dbdcf57b68128a65640d026cc7f45
34a818d5be67eb1f34e44a80b83c28a9b9c17d37fc9fac639f490d6bb5b53ebe3318140d09c236a17d7c98f5a7792ae3d6cefccda8067a5e942d6305b9d1f87c fix-linux-header-use-in-libgcc.patch
86be3338cc9c33089608bc4c5e3b7918c4e500a345c338f361b18c342119a6ed69af5495d72950de7106d760f003528b46ad14795e805f8a3331e206dcb234e3 gcc-pure64-mips.patch
508f3bca214d88531d739d761d07affc953689b1540905c73420b34c246e1e6b72588cf89f0e1462752633f8ddc88da8c0238be2a1b6e1c213829cecee7924cf ada-mips64.patch
80084d4f5984ea1c62f813c3c1fe7ce033d41d6cd5e6df3b10c649c0bbc2544ad0a58e7076fa28bf71d691df0211b07fc11eb0d5c9f462ef28eed4c3fbeeb9ee gcc-6.4-isl.patch
7912964bf3a985e9f870250d6e068f715582a4fb04270849d697a50e6aad0cf50df3d483ff80a0eb777d9940fd85526dd8d0b85da9bc71a5f2fbc07616263866 0001-i386-Move-struct-ix86_frame-to-machine_function.patch
baa27a4b912d8e27cd65a556b09cf45289a0e00e86dae3925f2923d1f3752080e80d80e159c996ef4156c4df1dfc3069114810a846672170ef3ae461ae0ab7e1 0002-i386-Use-reference-of-struct-ix86_frame-to-avoid-cop.patch
6701d15000bdd7c4c98a8fece8c814f5e4e73603eecf84fe4dc5ac10f79b3074afba7c2cc9e51d08b2abade1c34cb0c944c08ead7a85db94e97158c752fd1aac 0003-i386-Use-const-reference-of-struct-ix86_frame-to-avo.patch
@@ -1,11 +0,0 @@
--- gcc-4.9.2/gcc/config/linux.h.orig 2015-03-09 13:27:13.289736710 +0000
+++ gcc-4.9.2/gcc/config/linux.h 2015-03-09 13:29:32.295625046 +0000
@@ -146,6 +146,8 @@
#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
+251
View File
@@ -0,0 +1,251 @@
From cc46a51d4ff8bc1c42b7e6ae472494733bed5c49 Mon Sep 17 00:00:00 2001
From: Richard Biener <rguenther@suse.de>
Date: Thu, 16 Feb 2017 07:53:53 +0000
Subject: [PATCH] graphite.h: Do not include isl/isl_val_gmp.h, instead include
isl/isl_val.h.
2017-02-16 Richard Biener <rguenther@suse.de>
* graphite.h: Do not include isl/isl_val_gmp.h, instead include
isl/isl_val.h.
* graphite-isl-ast-to-gimple.c (gmp_cst_to_tree): Remove.
(gcc_expression_from_isl_expr_int): Use generic isl_val interface.
* graphite-sese-to-poly.c: Do not include isl/isl_val_gmp.h.
(isl_val_int_from_wi): New function.
(extract_affine_gmp): Rename to ...
(extract_affine_wi): ... this, take a widest_int.
(extract_affine_int): Just wrap extract_affine_wi.
(add_param_constraints): Use isl_val_int_from_wi.
(add_loop_constraints): Likewise, and extract_affine_wi.
From-SVN: r245501
---
gcc/ChangeLog | 14 ++++++++
gcc/graphite-isl-ast-to-gimple.c | 30 +++++------------
gcc/graphite-sese-to-poly.c | 58 ++++++++++++++------------------
gcc/graphite.h | 2 +-
4 files changed, 50 insertions(+), 54 deletions(-)
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 24d9c1589f456..5fc6142eaa03f 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,17 @@
+2017-02-16 Richard Biener <rguenther@suse.de>
+
+ * graphite.h: Do not include isl/isl_val_gmp.h, instead include
+ isl/isl_val.h.
+ * graphite-isl-ast-to-gimple.c (gmp_cst_to_tree): Remove.
+ (gcc_expression_from_isl_expr_int): Use generic isl_val interface.
+ * graphite-sese-to-poly.c: Do not include isl/isl_val_gmp.h.
+ (isl_val_int_from_wi): New function.
+ (extract_affine_gmp): Rename to ...
+ (extract_affine_wi): ... this, take a widest_int.
+ (extract_affine_int): Just wrap extract_affine_wi.
+ (add_param_constraints): Use isl_val_int_from_wi.
+ (add_loop_constraints): Likewise, and extract_affine_wi.
+
2017-02-15 Jeff Law <law@redhat.com>
PR middle-end/79521
diff --git a/gcc/graphite-isl-ast-to-gimple.c b/gcc/graphite-isl-ast-to-gimple.c
index dbdae7a7c155d..ec5fb73d9b2bc 100644
--- a/gcc/graphite-isl-ast-to-gimple.c
+++ b/gcc/graphite-isl-ast-to-gimple.c
@@ -73,22 +73,6 @@ struct ast_build_info
bool is_parallelizable;
};
-/* Converts a GMP constant VAL to a tree and returns it. */
-
-static tree
-gmp_cst_to_tree (tree type, mpz_t val)
-{
- tree t = type ? type : integer_type_node;
- mpz_t tmp;
-
- mpz_init (tmp);
- mpz_set (tmp, val);
- wide_int wi = wi::from_mpz (t, tmp, true);
- mpz_clear (tmp);
-
- return wide_int_to_tree (t, wi);
-}
-
/* Verifies properties that GRAPHITE should maintain during translation. */
static inline void
@@ -325,16 +309,20 @@ gcc_expression_from_isl_expr_int (tree type, __isl_take isl_ast_expr *expr)
{
gcc_assert (isl_ast_expr_get_type (expr) == isl_ast_expr_int);
isl_val *val = isl_ast_expr_get_val (expr);
- mpz_t val_mpz_t;
- mpz_init (val_mpz_t);
+ size_t n = isl_val_n_abs_num_chunks (val, sizeof (HOST_WIDE_INT));
+ HOST_WIDE_INT *chunks = XALLOCAVEC (HOST_WIDE_INT, n);
tree res;
- if (isl_val_get_num_gmp (val, val_mpz_t) == -1)
+ if (isl_val_get_abs_num_chunks (val, sizeof (HOST_WIDE_INT), chunks) == -1)
res = NULL_TREE;
else
- res = gmp_cst_to_tree (type, val_mpz_t);
+ {
+ widest_int wi = widest_int::from_array (chunks, n, true);
+ if (isl_val_is_neg (val))
+ wi = -wi;
+ res = wide_int_to_tree (type, wi);
+ }
isl_val_free (val);
isl_ast_expr_free (expr);
- mpz_clear (val_mpz_t);
return res;
}
diff --git a/gcc/graphite-sese-to-poly.c b/gcc/graphite-sese-to-poly.c
index ede96e5a3c299..8ff9a22e12916 100644
--- a/gcc/graphite-sese-to-poly.c
+++ b/gcc/graphite-sese-to-poly.c
@@ -55,7 +55,6 @@ along with GCC; see the file COPYING3. If not see
#include <isl/constraint.h>
#include <isl/aff.h>
#include <isl/val.h>
-#include <isl/val_gmp.h>
#include "graphite.h"
@@ -154,16 +153,32 @@ extract_affine_name (scop_p s, tree e, __isl_take isl_space *space)
return isl_pw_aff_alloc (dom, aff);
}
+/* Convert WI to a isl_val with CTX. */
+
+static __isl_give isl_val *
+isl_val_int_from_wi (isl_ctx *ctx, const widest_int &wi)
+{
+ if (wi::neg_p (wi, SIGNED))
+ {
+ widest_int mwi = -wi;
+ return isl_val_neg (isl_val_int_from_chunks (ctx, mwi.get_len (),
+ sizeof (HOST_WIDE_INT),
+ mwi.get_val ()));
+ }
+ return isl_val_int_from_chunks (ctx, wi.get_len (), sizeof (HOST_WIDE_INT),
+ wi.get_val ());
+}
+
/* Extract an affine expression from the gmp constant G. */
static isl_pw_aff *
-extract_affine_gmp (mpz_t g, __isl_take isl_space *space)
+extract_affine_wi (const widest_int &g, __isl_take isl_space *space)
{
isl_local_space *ls = isl_local_space_from_space (isl_space_copy (space));
isl_aff *aff = isl_aff_zero_on_domain (ls);
isl_set *dom = isl_set_universe (space);
isl_ctx *ct = isl_aff_get_ctx (aff);
- isl_val *v = isl_val_int_from_gmp (ct, g);
+ isl_val *v = isl_val_int_from_wi (ct, g);
aff = isl_aff_add_constant_val (aff, v);
return isl_pw_aff_alloc (dom, aff);
@@ -174,13 +189,7 @@ extract_affine_gmp (mpz_t g, __isl_take isl_space *space)
static isl_pw_aff *
extract_affine_int (tree e, __isl_take isl_space *space)
{
- mpz_t g;
-
- mpz_init (g);
- tree_int_to_gmp (e, g);
- isl_pw_aff *res = extract_affine_gmp (g, space);
- mpz_clear (g);
-
+ isl_pw_aff *res = extract_affine_wi (wi::to_widest (e), space);
return res;
}
@@ -411,15 +420,11 @@ add_param_constraints (scop_p scop, graphite_dim_t p)
{
isl_space *space = isl_set_get_space (scop->param_context);
isl_constraint *c;
- mpz_t g;
isl_val *v;
c = isl_inequality_alloc (isl_local_space_from_space (space));
- mpz_init (g);
- tree_int_to_gmp (lb, g);
- v = isl_val_int_from_gmp (scop->isl_context, g);
+ v = isl_val_int_from_wi (scop->isl_context, wi::to_widest (lb));
v = isl_val_neg (v);
- mpz_clear (g);
c = isl_constraint_set_constant_val (c, v);
c = isl_constraint_set_coefficient_si (c, isl_dim_param, p, 1);
@@ -431,15 +436,11 @@ add_param_constraints (scop_p scop, graphite_dim_t p)
{
isl_space *space = isl_set_get_space (scop->param_context);
isl_constraint *c;
- mpz_t g;
isl_val *v;
c = isl_inequality_alloc (isl_local_space_from_space (space));
- mpz_init (g);
- tree_int_to_gmp (ub, g);
- v = isl_val_int_from_gmp (scop->isl_context, g);
- mpz_clear (g);
+ v = isl_val_int_from_wi (scop->isl_context, wi::to_widest (ub));
c = isl_constraint_set_constant_val (c, v);
c = isl_constraint_set_coefficient_si (c, isl_dim_param, p, -1);
@@ -773,11 +774,8 @@ add_loop_constraints (scop_p scop, __isl_take isl_set *domain, loop_p loop,
isl_local_space *ls = isl_local_space_from_space (space);
isl_constraint *c = isl_inequality_alloc (ls);
c = isl_constraint_set_coefficient_si (c, isl_dim_set, loop_index, -1);
- mpz_t g;
- mpz_init (g);
- tree_int_to_gmp (nb_iters, g);
- isl_val *v = isl_val_int_from_gmp (scop->isl_context, g);
- mpz_clear (g);
+ isl_val *v
+ = isl_val_int_from_wi (scop->isl_context, wi::to_widest (nb_iters));
c = isl_constraint_set_constant_val (c, v);
return isl_set_add_constraint (domain, c);
}
@@ -817,12 +815,9 @@ add_loop_constraints (scop_p scop, __isl_take isl_set *domain, loop_p loop,
/* NIT is an upper bound to NB_ITERS: "NIT >= NB_ITERS", although we
do not know whether the loop executes at least once. */
- mpz_t g;
- mpz_init (g);
- wi::to_mpz (nit, g, SIGNED);
- mpz_sub_ui (g, g, 1);
+ --nit;
- isl_pw_aff *approx = extract_affine_gmp (g, isl_space_copy (space));
+ isl_pw_aff *approx = extract_affine_wi (nit, isl_space_copy (space));
isl_set *x = isl_pw_aff_ge_set (approx, aff_nb_iters);
x = isl_set_project_out (x, isl_dim_set, 0,
isl_set_dim (x, isl_dim_set));
@@ -831,8 +826,7 @@ add_loop_constraints (scop_p scop, __isl_take isl_set *domain, loop_p loop,
ls = isl_local_space_from_space (space);
c = isl_inequality_alloc (ls);
c = isl_constraint_set_coefficient_si (c, isl_dim_set, loop_index, -1);
- isl_val *v = isl_val_int_from_gmp (scop->isl_context, g);
- mpz_clear (g);
+ isl_val *v = isl_val_int_from_wi (scop->isl_context, nit);
c = isl_constraint_set_constant_val (c, v);
if (dump_file)
diff --git a/gcc/graphite.h b/gcc/graphite.h
index 5103c614ff140..d22c4f2693f52 100644
--- a/gcc/graphite.h
+++ b/gcc/graphite.h
@@ -25,7 +25,7 @@ along with GCC; see the file COPYING3. If not see
#include "sese.h"
#include <isl/options.h>
#include <isl/ctx.h>
-#include <isl/val_gmp.h>
+#include <isl/val.h>
#include <isl/set.h>
#include <isl/union_set.h>
#include <isl/map.h>
@@ -1,40 +0,0 @@
# DP: Turn on -D_FORTIFY_SOURCE=2 by default for C, C++, ObjC, ObjC++,
# DP: if the optimization level is > 0
---
gcc/doc/invoke.texi | 6 ++++++
gcc/c-family/c-cppbuiltin.c | 3 +
2 files changed, 9 insertions(+), 0 deletions(-)
Index: b/gcc/doc/invoke.texi
===================================================================
--- a/gcc/doc/invoke.texi
+++ b/gcc/doc/invoke.texi
@@ -7840,6 +7840,12 @@ also turns on the following optimization
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}.
+
@item -O3
@opindex O3
Optimize yet more. @option{-O3} turns on all optimizations specified
Index: b/gcc/c-family/c-cppbuiltin.c
===================================================================
--- a/gcc/c-family/c-cppbuiltin.c
+++ b/gcc/c-family/c-cppbuiltin.c
@@ -1176,6 +1176,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__");
+65 -13
View File
@@ -1,7 +1,6 @@
# Automatically generated aport, do not edit!
# Generator: pmbootstrap aportgen gcc6-armhf
# Based on: main/gcc6 (from postmarketOS)
CTARGET_ARCH=armhf
CTARGET="$(arch_to_hostspec ${CTARGET_ARCH})"
LANG_D=false
@@ -23,19 +22,23 @@ CBUILDROOT="/"
_cross_configure="--disable-bootstrap --with-sysroot=/usr/$CTARGET"
maintainer=""
pkgname=gcc6-armhf
pkgver=9999
_pkgver=6.4.0
pkgrel=12
pkgrel=15
pkgdesc="Stage2 cross-compiler for armhf"
url="http://gcc.gnu.org"
# loongarch64: not relevant
# ppc64le: not relevant
# riscv64: doesn't build
arch="x86_64"
license="GPL LGPL"
license="GPL-2.0-or-later AND LGPL-2.1-or-later"
_gccrel=$_pkgver-r$pkgrel
depends="binutils-armhf mpc1"
depends="binutils-armhf mpc1 so:libc.musl-x86_64.so.1 so:libgcc_s.so.1 so:libgmp.so.10 so:libisl.so.23 so:libmpc.so.3 so:libmpfr.so.6 so:libstdc++.so.6 so:libz.so.1"
makedepends_build="gcc g++ bison flex texinfo gawk zip gmp-dev mpfr-dev mpc1-dev zlib-dev"
makedepends_host="linux-headers gmp-dev mpfr-dev mpc1-dev isl-dev zlib-dev musl-dev-armhf binutils-armhf"
options="!strip"
options="!strip !tracedeps toolchain"
# We only care about C, so we can compile old Linux kernels
LANG_CXX=false
@@ -67,11 +70,23 @@ if [ "$CHOST" != "$CTARGET" ]; then
LIBATOMIC=false
LIBITM=false
# format-sec: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100431
CFLAGS="${CFLAGS/-Werror=format-security/}"
CXXFLAGS="${CXXFLAGS/-Werror=format-security/}"
CPPFLAGS="${CPPFLAGS/-Werror=format-security/}"
# fstack-clash-protection is not known to GCC 6
CFLAGS="${CFLAGS/-fstack-clash-protection/}"
CXXFLAGS="${CXXFLAGS/-fstack-clash-protection/}"
CPPFLAGS="${CPPFLAGS/-fstack-clash-protection/}"
# and neither is -fno-plt
CFLAGS="${CFLAGS/-fno-plt/}"
CXXFLAGS="${CXXFLAGS/-fno-plt/}"
CPPFLAGS="${CPPFLAGS/-fno-plt/}"
# 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 $CFLAGS"
export CXXFLAGS="$CPPFLAGS $CXXFLAGS"
export CFLAGS="$CPPFLAGS -g0 $CFLAGS"
export CXXFLAGS="$CPPFLAGS -g0 $CXXFLAGS"
unset CPPFLAGS
export CFLAGS_FOR_TARGET=" "
export CXXFLAGS_FOR_TARGET=" "
@@ -79,10 +94,23 @@ if [ "$CHOST" != "$CTARGET" ]; then
STRIP_FOR_TARGET="$CTARGET-strip"
elif [ "$CBUILD" != "$CHOST" ]; then
# format-sec: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100431
CFLAGS="${CFLAGS/-Werror=format-security/}"
CXXFLAGS="${CXXFLAGS/-Werror=format-security/}"
CPPFLAGS="${CPPFLAGS/-Werror=format-security/}"
# fstack-clash-protection is not known to GCC 6
CFLAGS="${CFLAGS/-fstack-clash-protection/}"
CXXFLAGS="${CXXFLAGS/-fstack-clash-protection/}"
CPPFLAGS="${CPPFLAGS/-fstack-clash-protection/}"
# and neither is -fno-plt
CFLAGS="${CFLAGS/-fno-plt/}"
CXXFLAGS="${CXXFLAGS/-fno-plt/}"
CPPFLAGS="${CPPFLAGS/-fno-plt/}"
# 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 $CFLAGS"
export CXXFLAGS="$CPPFLAGS $CXXFLAGS"
export CFLAGS="$CPPFLAGS -g0 $CFLAGS"
export CXXFLAGS="$CPPFLAGS -g0 $CXXFLAGS"
unset CPPFLAGS
# reset flags and cc for build
@@ -106,6 +134,31 @@ elif [ "$CBUILD" != "$CHOST" ]; then
else
STRIP_FOR_TARGET=${CROSS_COMPILE}strip
_builddir="$srcdir/build"
# format-sec: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100431
CFLAGS="${CFLAGS/-Werror=format-security/}"
CXXFLAGS="${CXXFLAGS/-Werror=format-security/}"
CPPFLAGS="${CPPFLAGS/-Werror=format-security/}"
# fstack-clash-protection is not known to GCC 6
CFLAGS="${CFLAGS/-fstack-clash-protection/}"
CXXFLAGS="${CXXFLAGS/-fstack-clash-protection/}"
CPPFLAGS="${CPPFLAGS/-fstack-clash-protection/}"
# and neither is -fno-plt
CFLAGS="${CFLAGS/-fno-plt/}"
CXXFLAGS="${CXXFLAGS/-fno-plt/}"
CPPFLAGS="${CPPFLAGS/-fno-plt/}"
# 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 -O2"
export CXXFLAGS="$CPPFLAGS -g0 $CXXFLAGS -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
# Go needs {set,make,swap}context, unimplemented in musl
@@ -166,7 +219,6 @@ source="http://gcc.gnu.org/pub/gcc/releases/gcc-${_pkgbase:-$_pkgver}/gcc-${_pkg
001_all_default-ssp-strong.patch
002_all_default-relro.patch
003_all_default-fortify-source.patch
005_all_default-as-needed.patch
011_all_default-warn-format-security.patch
012_all_default-warn-trampolines.patch
@@ -184,7 +236,6 @@ source="http://gcc.gnu.org/pub/gcc/releases/gcc-${_pkgbase:-$_pkgver}/gcc-${_pkg
207-static-pie.patch
libgcc-always-build-gcceh.a.patch
gcc-4.9-musl-fortify.patch
gcc-6.1-musl-libssp.patch
boehm-gc-musl.patch
gcc-pure64.patch
@@ -208,6 +259,8 @@ source="http://gcc.gnu.org/pub/gcc/releases/gcc-${_pkgbase:-$_pkgver}/gcc-${_pkg
gcc-pure64-mips.patch
ada-mips64.patch
gcc-6.4-isl.patch
0001-i386-Move-struct-ix86_frame-to-machine_function.patch
0002-i386-Use-reference-of-struct-ix86_frame-to-avoid-cop.patch
0003-i386-Use-const-reference-of-struct-ix86_frame-to-avo.patch
@@ -446,7 +499,6 @@ sha512sums="
28f8c6fdbcb19e950b1d0bafb3bcc7a8cba87bc673aa6027cece116599cdee80f0cf5e95a1440544890239f5c754e8a93ab46d9daedd937faef445d7ea33b226 ecj-4.9.jar
a1335adc2fbee98e36c4437ff2587771b98ed4180726779020f65039498235626a411cdb0100dbd20cd19d12f0d94f9a21af179ff624676c28cead9d60598b5d 001_all_default-ssp-strong.patch
e36e95b81489163abd6fe9d58f7867bdca43e61143afacbfb17f4698c0b16ec5fd0061d8fab7b2ae615540bebd721c2e2227f80401b4e7fc253da9da62e6b513 002_all_default-relro.patch
f86466c62b8291fac46f9c250c7ad8fa5ab7b1cce2504442fd07ddc4543665b317ae28951f244e39aba29aeaf3fff252ec4f6a147aa16adb2b7aed747dd89188 003_all_default-fortify-source.patch
51282fea54c7e616367bbeb2479ba13fec6f24eb47bd04e2071907b3b36273b2ff24676f46ef8d22f241c8ab4857307861eee076eab66797c3a50a8ecaa1809a 005_all_default-as-needed.patch
3398386dd1e079d6545dd9799adc799c6b80e3984fac6899d0e1a7ee21b66d0c7e53cddf17a65d590c883db750f9f79aaedd857355a8b9f7fb9476c906237919 011_all_default-warn-format-security.patch
9adb0d2b9b67dd957df6c609b8714c7c078efb52cd88770905c37c67827be8fc83d1125037b9c29d77db21ce78756aa2bb0bacdb0b98d869ac126da76a298e21 012_all_default-warn-trampolines.patch
@@ -462,7 +514,6 @@ fc0de05b36613b732a0222ea005c90653c6a40d6761b6894af2419272f4e74875f37e26af33a9b99
98473bcaa77903a223ca9b0d2087c0921b287a2816d308cc32c8fe009e6cbf5dd1ae7fba27794ab8d9c09e117fe534413d91a464d1218474fc123ce0adfdc2c1 205-nopie.patch
3287d5b443bea8ec64132bcabe869c738ae98ea8f1a86df1c5d18c927f8816edbfcefeefc47792dbbb2bcacf50319af00e01b3735d34525913b64350770ad453 207-static-pie.patch
d08d7ead2de0429e5c9055d5b029ec2be9a8c821d22cecaf9b51f633652c493333f98963d9267fa2fa63850c50ae5eefd5f59e5910ec10d20044dac082182a8b libgcc-always-build-gcceh.a.patch
600fe5098dc54edaa9808fd5717af9dec058953f9ad37d49cfba1db4f7e9a7a8f02019342f75157fc575946fa693259422184de27b7ecc8386d9f3ecc0f7cc5d gcc-4.9-musl-fortify.patch
dbe0ee917fc7668571722364ab7c806731e3a31e8bfa30b4941b28b16b877d2a32b4a3897ef533399a28f82d43cac9b28e92de0493f0e779046db56584e07fa4 gcc-6.1-musl-libssp.patch
bda845a6aa1854d2c883910b115f79ccfa93dfc2b5eac69a3a236d83eb34cadc140731d616ffc24698c7abc8878dd15f231bcc5119f1860e575a120b311706c7 boehm-gc-musl.patch
fa62556719449caec6b2b434355bfbcaa5ae55ffe017b3e1f827f66a2aae21b79c571ee7a4ce723ea69169bc3a6447e73650991a200cc372adf2f102677518d7 gcc-pure64.patch
@@ -482,6 +533,7 @@ f4ef08454e28c8732db69115e4998ec153399e8d229dd27f923dbdcf57b68128a65640d026cc7f45
34a818d5be67eb1f34e44a80b83c28a9b9c17d37fc9fac639f490d6bb5b53ebe3318140d09c236a17d7c98f5a7792ae3d6cefccda8067a5e942d6305b9d1f87c fix-linux-header-use-in-libgcc.patch
86be3338cc9c33089608bc4c5e3b7918c4e500a345c338f361b18c342119a6ed69af5495d72950de7106d760f003528b46ad14795e805f8a3331e206dcb234e3 gcc-pure64-mips.patch
508f3bca214d88531d739d761d07affc953689b1540905c73420b34c246e1e6b72588cf89f0e1462752633f8ddc88da8c0238be2a1b6e1c213829cecee7924cf ada-mips64.patch
80084d4f5984ea1c62f813c3c1fe7ce033d41d6cd5e6df3b10c649c0bbc2544ad0a58e7076fa28bf71d691df0211b07fc11eb0d5c9f462ef28eed4c3fbeeb9ee gcc-6.4-isl.patch
7912964bf3a985e9f870250d6e068f715582a4fb04270849d697a50e6aad0cf50df3d483ff80a0eb777d9940fd85526dd8d0b85da9bc71a5f2fbc07616263866 0001-i386-Move-struct-ix86_frame-to-machine_function.patch
baa27a4b912d8e27cd65a556b09cf45289a0e00e86dae3925f2923d1f3752080e80d80e159c996ef4156c4df1dfc3069114810a846672170ef3ae461ae0ab7e1 0002-i386-Use-reference-of-struct-ix86_frame-to-avoid-cop.patch
6701d15000bdd7c4c98a8fece8c814f5e4e73603eecf84fe4dc5ac10f79b3074afba7c2cc9e51d08b2abade1c34cb0c944c08ead7a85db94e97158c752fd1aac 0003-i386-Use-const-reference-of-struct-ix86_frame-to-avo.patch
@@ -1,11 +0,0 @@
--- gcc-4.9.2/gcc/config/linux.h.orig 2015-03-09 13:27:13.289736710 +0000
+++ gcc-4.9.2/gcc/config/linux.h 2015-03-09 13:29:32.295625046 +0000
@@ -146,6 +146,8 @@
#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
+251
View File
@@ -0,0 +1,251 @@
From cc46a51d4ff8bc1c42b7e6ae472494733bed5c49 Mon Sep 17 00:00:00 2001
From: Richard Biener <rguenther@suse.de>
Date: Thu, 16 Feb 2017 07:53:53 +0000
Subject: [PATCH] graphite.h: Do not include isl/isl_val_gmp.h, instead include
isl/isl_val.h.
2017-02-16 Richard Biener <rguenther@suse.de>
* graphite.h: Do not include isl/isl_val_gmp.h, instead include
isl/isl_val.h.
* graphite-isl-ast-to-gimple.c (gmp_cst_to_tree): Remove.
(gcc_expression_from_isl_expr_int): Use generic isl_val interface.
* graphite-sese-to-poly.c: Do not include isl/isl_val_gmp.h.
(isl_val_int_from_wi): New function.
(extract_affine_gmp): Rename to ...
(extract_affine_wi): ... this, take a widest_int.
(extract_affine_int): Just wrap extract_affine_wi.
(add_param_constraints): Use isl_val_int_from_wi.
(add_loop_constraints): Likewise, and extract_affine_wi.
From-SVN: r245501
---
gcc/ChangeLog | 14 ++++++++
gcc/graphite-isl-ast-to-gimple.c | 30 +++++------------
gcc/graphite-sese-to-poly.c | 58 ++++++++++++++------------------
gcc/graphite.h | 2 +-
4 files changed, 50 insertions(+), 54 deletions(-)
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 24d9c1589f456..5fc6142eaa03f 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,17 @@
+2017-02-16 Richard Biener <rguenther@suse.de>
+
+ * graphite.h: Do not include isl/isl_val_gmp.h, instead include
+ isl/isl_val.h.
+ * graphite-isl-ast-to-gimple.c (gmp_cst_to_tree): Remove.
+ (gcc_expression_from_isl_expr_int): Use generic isl_val interface.
+ * graphite-sese-to-poly.c: Do not include isl/isl_val_gmp.h.
+ (isl_val_int_from_wi): New function.
+ (extract_affine_gmp): Rename to ...
+ (extract_affine_wi): ... this, take a widest_int.
+ (extract_affine_int): Just wrap extract_affine_wi.
+ (add_param_constraints): Use isl_val_int_from_wi.
+ (add_loop_constraints): Likewise, and extract_affine_wi.
+
2017-02-15 Jeff Law <law@redhat.com>
PR middle-end/79521
diff --git a/gcc/graphite-isl-ast-to-gimple.c b/gcc/graphite-isl-ast-to-gimple.c
index dbdae7a7c155d..ec5fb73d9b2bc 100644
--- a/gcc/graphite-isl-ast-to-gimple.c
+++ b/gcc/graphite-isl-ast-to-gimple.c
@@ -73,22 +73,6 @@ struct ast_build_info
bool is_parallelizable;
};
-/* Converts a GMP constant VAL to a tree and returns it. */
-
-static tree
-gmp_cst_to_tree (tree type, mpz_t val)
-{
- tree t = type ? type : integer_type_node;
- mpz_t tmp;
-
- mpz_init (tmp);
- mpz_set (tmp, val);
- wide_int wi = wi::from_mpz (t, tmp, true);
- mpz_clear (tmp);
-
- return wide_int_to_tree (t, wi);
-}
-
/* Verifies properties that GRAPHITE should maintain during translation. */
static inline void
@@ -325,16 +309,20 @@ gcc_expression_from_isl_expr_int (tree type, __isl_take isl_ast_expr *expr)
{
gcc_assert (isl_ast_expr_get_type (expr) == isl_ast_expr_int);
isl_val *val = isl_ast_expr_get_val (expr);
- mpz_t val_mpz_t;
- mpz_init (val_mpz_t);
+ size_t n = isl_val_n_abs_num_chunks (val, sizeof (HOST_WIDE_INT));
+ HOST_WIDE_INT *chunks = XALLOCAVEC (HOST_WIDE_INT, n);
tree res;
- if (isl_val_get_num_gmp (val, val_mpz_t) == -1)
+ if (isl_val_get_abs_num_chunks (val, sizeof (HOST_WIDE_INT), chunks) == -1)
res = NULL_TREE;
else
- res = gmp_cst_to_tree (type, val_mpz_t);
+ {
+ widest_int wi = widest_int::from_array (chunks, n, true);
+ if (isl_val_is_neg (val))
+ wi = -wi;
+ res = wide_int_to_tree (type, wi);
+ }
isl_val_free (val);
isl_ast_expr_free (expr);
- mpz_clear (val_mpz_t);
return res;
}
diff --git a/gcc/graphite-sese-to-poly.c b/gcc/graphite-sese-to-poly.c
index ede96e5a3c299..8ff9a22e12916 100644
--- a/gcc/graphite-sese-to-poly.c
+++ b/gcc/graphite-sese-to-poly.c
@@ -55,7 +55,6 @@ along with GCC; see the file COPYING3. If not see
#include <isl/constraint.h>
#include <isl/aff.h>
#include <isl/val.h>
-#include <isl/val_gmp.h>
#include "graphite.h"
@@ -154,16 +153,32 @@ extract_affine_name (scop_p s, tree e, __isl_take isl_space *space)
return isl_pw_aff_alloc (dom, aff);
}
+/* Convert WI to a isl_val with CTX. */
+
+static __isl_give isl_val *
+isl_val_int_from_wi (isl_ctx *ctx, const widest_int &wi)
+{
+ if (wi::neg_p (wi, SIGNED))
+ {
+ widest_int mwi = -wi;
+ return isl_val_neg (isl_val_int_from_chunks (ctx, mwi.get_len (),
+ sizeof (HOST_WIDE_INT),
+ mwi.get_val ()));
+ }
+ return isl_val_int_from_chunks (ctx, wi.get_len (), sizeof (HOST_WIDE_INT),
+ wi.get_val ());
+}
+
/* Extract an affine expression from the gmp constant G. */
static isl_pw_aff *
-extract_affine_gmp (mpz_t g, __isl_take isl_space *space)
+extract_affine_wi (const widest_int &g, __isl_take isl_space *space)
{
isl_local_space *ls = isl_local_space_from_space (isl_space_copy (space));
isl_aff *aff = isl_aff_zero_on_domain (ls);
isl_set *dom = isl_set_universe (space);
isl_ctx *ct = isl_aff_get_ctx (aff);
- isl_val *v = isl_val_int_from_gmp (ct, g);
+ isl_val *v = isl_val_int_from_wi (ct, g);
aff = isl_aff_add_constant_val (aff, v);
return isl_pw_aff_alloc (dom, aff);
@@ -174,13 +189,7 @@ extract_affine_gmp (mpz_t g, __isl_take isl_space *space)
static isl_pw_aff *
extract_affine_int (tree e, __isl_take isl_space *space)
{
- mpz_t g;
-
- mpz_init (g);
- tree_int_to_gmp (e, g);
- isl_pw_aff *res = extract_affine_gmp (g, space);
- mpz_clear (g);
-
+ isl_pw_aff *res = extract_affine_wi (wi::to_widest (e), space);
return res;
}
@@ -411,15 +420,11 @@ add_param_constraints (scop_p scop, graphite_dim_t p)
{
isl_space *space = isl_set_get_space (scop->param_context);
isl_constraint *c;
- mpz_t g;
isl_val *v;
c = isl_inequality_alloc (isl_local_space_from_space (space));
- mpz_init (g);
- tree_int_to_gmp (lb, g);
- v = isl_val_int_from_gmp (scop->isl_context, g);
+ v = isl_val_int_from_wi (scop->isl_context, wi::to_widest (lb));
v = isl_val_neg (v);
- mpz_clear (g);
c = isl_constraint_set_constant_val (c, v);
c = isl_constraint_set_coefficient_si (c, isl_dim_param, p, 1);
@@ -431,15 +436,11 @@ add_param_constraints (scop_p scop, graphite_dim_t p)
{
isl_space *space = isl_set_get_space (scop->param_context);
isl_constraint *c;
- mpz_t g;
isl_val *v;
c = isl_inequality_alloc (isl_local_space_from_space (space));
- mpz_init (g);
- tree_int_to_gmp (ub, g);
- v = isl_val_int_from_gmp (scop->isl_context, g);
- mpz_clear (g);
+ v = isl_val_int_from_wi (scop->isl_context, wi::to_widest (ub));
c = isl_constraint_set_constant_val (c, v);
c = isl_constraint_set_coefficient_si (c, isl_dim_param, p, -1);
@@ -773,11 +774,8 @@ add_loop_constraints (scop_p scop, __isl_take isl_set *domain, loop_p loop,
isl_local_space *ls = isl_local_space_from_space (space);
isl_constraint *c = isl_inequality_alloc (ls);
c = isl_constraint_set_coefficient_si (c, isl_dim_set, loop_index, -1);
- mpz_t g;
- mpz_init (g);
- tree_int_to_gmp (nb_iters, g);
- isl_val *v = isl_val_int_from_gmp (scop->isl_context, g);
- mpz_clear (g);
+ isl_val *v
+ = isl_val_int_from_wi (scop->isl_context, wi::to_widest (nb_iters));
c = isl_constraint_set_constant_val (c, v);
return isl_set_add_constraint (domain, c);
}
@@ -817,12 +815,9 @@ add_loop_constraints (scop_p scop, __isl_take isl_set *domain, loop_p loop,
/* NIT is an upper bound to NB_ITERS: "NIT >= NB_ITERS", although we
do not know whether the loop executes at least once. */
- mpz_t g;
- mpz_init (g);
- wi::to_mpz (nit, g, SIGNED);
- mpz_sub_ui (g, g, 1);
+ --nit;
- isl_pw_aff *approx = extract_affine_gmp (g, isl_space_copy (space));
+ isl_pw_aff *approx = extract_affine_wi (nit, isl_space_copy (space));
isl_set *x = isl_pw_aff_ge_set (approx, aff_nb_iters);
x = isl_set_project_out (x, isl_dim_set, 0,
isl_set_dim (x, isl_dim_set));
@@ -831,8 +826,7 @@ add_loop_constraints (scop_p scop, __isl_take isl_set *domain, loop_p loop,
ls = isl_local_space_from_space (space);
c = isl_inequality_alloc (ls);
c = isl_constraint_set_coefficient_si (c, isl_dim_set, loop_index, -1);
- isl_val *v = isl_val_int_from_gmp (scop->isl_context, g);
- mpz_clear (g);
+ isl_val *v = isl_val_int_from_wi (scop->isl_context, nit);
c = isl_constraint_set_constant_val (c, v);
if (dump_file)
diff --git a/gcc/graphite.h b/gcc/graphite.h
index 5103c614ff140..d22c4f2693f52 100644
--- a/gcc/graphite.h
+++ b/gcc/graphite.h
@@ -25,7 +25,7 @@ along with GCC; see the file COPYING3. If not see
#include "sese.h"
#include <isl/options.h>
#include <isl/ctx.h>
-#include <isl/val_gmp.h>
+#include <isl/val.h>
#include <isl/set.h>
#include <isl/union_set.h>
#include <isl/map.h>
@@ -1,40 +0,0 @@
# DP: Turn on -D_FORTIFY_SOURCE=2 by default for C, C++, ObjC, ObjC++,
# DP: if the optimization level is > 0
---
gcc/doc/invoke.texi | 6 ++++++
gcc/c-family/c-cppbuiltin.c | 3 +
2 files changed, 9 insertions(+), 0 deletions(-)
Index: b/gcc/doc/invoke.texi
===================================================================
--- a/gcc/doc/invoke.texi
+++ b/gcc/doc/invoke.texi
@@ -7840,6 +7840,12 @@ also turns on the following optimization
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}.
+
@item -O3
@opindex O3
Optimize yet more. @option{-O3} turns on all optimizations specified
Index: b/gcc/c-family/c-cppbuiltin.c
===================================================================
--- a/gcc/c-family/c-cppbuiltin.c
+++ b/gcc/c-family/c-cppbuiltin.c
@@ -1176,6 +1176,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__");
+65 -13
View File
@@ -1,7 +1,6 @@
# Automatically generated aport, do not edit!
# Generator: pmbootstrap aportgen gcc6-armv7
# Based on: main/gcc6 (from postmarketOS)
CTARGET_ARCH=armv7
CTARGET="$(arch_to_hostspec ${CTARGET_ARCH})"
LANG_D=false
@@ -23,19 +22,23 @@ CBUILDROOT="/"
_cross_configure="--disable-bootstrap --with-sysroot=/usr/$CTARGET"
maintainer=""
pkgname=gcc6-armv7
pkgver=9999
_pkgver=6.4.0
pkgrel=12
pkgrel=15
pkgdesc="Stage2 cross-compiler for armv7"
url="http://gcc.gnu.org"
# loongarch64: not relevant
# ppc64le: not relevant
# riscv64: doesn't build
arch="x86_64"
license="GPL LGPL"
license="GPL-2.0-or-later AND LGPL-2.1-or-later"
_gccrel=$_pkgver-r$pkgrel
depends="binutils-armv7 mpc1"
depends="binutils-armv7 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-armv7 binutils-armv7"
options="!strip"
options="!strip !tracedeps toolchain"
# We only care about C, so we can compile old Linux kernels
LANG_CXX=false
@@ -67,11 +70,23 @@ if [ "$CHOST" != "$CTARGET" ]; then
LIBATOMIC=false
LIBITM=false
# format-sec: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100431
CFLAGS="${CFLAGS/-Werror=format-security/}"
CXXFLAGS="${CXXFLAGS/-Werror=format-security/}"
CPPFLAGS="${CPPFLAGS/-Werror=format-security/}"
# fstack-clash-protection is not known to GCC 6
CFLAGS="${CFLAGS/-fstack-clash-protection/}"
CXXFLAGS="${CXXFLAGS/-fstack-clash-protection/}"
CPPFLAGS="${CPPFLAGS/-fstack-clash-protection/}"
# and neither is -fno-plt
CFLAGS="${CFLAGS/-fno-plt/}"
CXXFLAGS="${CXXFLAGS/-fno-plt/}"
CPPFLAGS="${CPPFLAGS/-fno-plt/}"
# 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 $CFLAGS"
export CXXFLAGS="$CPPFLAGS $CXXFLAGS"
export CFLAGS="$CPPFLAGS -g0 $CFLAGS"
export CXXFLAGS="$CPPFLAGS -g0 $CXXFLAGS"
unset CPPFLAGS
export CFLAGS_FOR_TARGET=" "
export CXXFLAGS_FOR_TARGET=" "
@@ -79,10 +94,23 @@ if [ "$CHOST" != "$CTARGET" ]; then
STRIP_FOR_TARGET="$CTARGET-strip"
elif [ "$CBUILD" != "$CHOST" ]; then
# format-sec: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100431
CFLAGS="${CFLAGS/-Werror=format-security/}"
CXXFLAGS="${CXXFLAGS/-Werror=format-security/}"
CPPFLAGS="${CPPFLAGS/-Werror=format-security/}"
# fstack-clash-protection is not known to GCC 6
CFLAGS="${CFLAGS/-fstack-clash-protection/}"
CXXFLAGS="${CXXFLAGS/-fstack-clash-protection/}"
CPPFLAGS="${CPPFLAGS/-fstack-clash-protection/}"
# and neither is -fno-plt
CFLAGS="${CFLAGS/-fno-plt/}"
CXXFLAGS="${CXXFLAGS/-fno-plt/}"
CPPFLAGS="${CPPFLAGS/-fno-plt/}"
# 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 $CFLAGS"
export CXXFLAGS="$CPPFLAGS $CXXFLAGS"
export CFLAGS="$CPPFLAGS -g0 $CFLAGS"
export CXXFLAGS="$CPPFLAGS -g0 $CXXFLAGS"
unset CPPFLAGS
# reset flags and cc for build
@@ -106,6 +134,31 @@ elif [ "$CBUILD" != "$CHOST" ]; then
else
STRIP_FOR_TARGET=${CROSS_COMPILE}strip
_builddir="$srcdir/build"
# format-sec: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100431
CFLAGS="${CFLAGS/-Werror=format-security/}"
CXXFLAGS="${CXXFLAGS/-Werror=format-security/}"
CPPFLAGS="${CPPFLAGS/-Werror=format-security/}"
# fstack-clash-protection is not known to GCC 6
CFLAGS="${CFLAGS/-fstack-clash-protection/}"
CXXFLAGS="${CXXFLAGS/-fstack-clash-protection/}"
CPPFLAGS="${CPPFLAGS/-fstack-clash-protection/}"
# and neither is -fno-plt
CFLAGS="${CFLAGS/-fno-plt/}"
CXXFLAGS="${CXXFLAGS/-fno-plt/}"
CPPFLAGS="${CPPFLAGS/-fno-plt/}"
# 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 -O2"
export CXXFLAGS="$CPPFLAGS -g0 $CXXFLAGS -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
# Go needs {set,make,swap}context, unimplemented in musl
@@ -166,7 +219,6 @@ source="http://gcc.gnu.org/pub/gcc/releases/gcc-${_pkgbase:-$_pkgver}/gcc-${_pkg
001_all_default-ssp-strong.patch
002_all_default-relro.patch
003_all_default-fortify-source.patch
005_all_default-as-needed.patch
011_all_default-warn-format-security.patch
012_all_default-warn-trampolines.patch
@@ -184,7 +236,6 @@ source="http://gcc.gnu.org/pub/gcc/releases/gcc-${_pkgbase:-$_pkgver}/gcc-${_pkg
207-static-pie.patch
libgcc-always-build-gcceh.a.patch
gcc-4.9-musl-fortify.patch
gcc-6.1-musl-libssp.patch
boehm-gc-musl.patch
gcc-pure64.patch
@@ -208,6 +259,8 @@ source="http://gcc.gnu.org/pub/gcc/releases/gcc-${_pkgbase:-$_pkgver}/gcc-${_pkg
gcc-pure64-mips.patch
ada-mips64.patch
gcc-6.4-isl.patch
0001-i386-Move-struct-ix86_frame-to-machine_function.patch
0002-i386-Use-reference-of-struct-ix86_frame-to-avoid-cop.patch
0003-i386-Use-const-reference-of-struct-ix86_frame-to-avo.patch
@@ -446,7 +499,6 @@ sha512sums="
28f8c6fdbcb19e950b1d0bafb3bcc7a8cba87bc673aa6027cece116599cdee80f0cf5e95a1440544890239f5c754e8a93ab46d9daedd937faef445d7ea33b226 ecj-4.9.jar
a1335adc2fbee98e36c4437ff2587771b98ed4180726779020f65039498235626a411cdb0100dbd20cd19d12f0d94f9a21af179ff624676c28cead9d60598b5d 001_all_default-ssp-strong.patch
e36e95b81489163abd6fe9d58f7867bdca43e61143afacbfb17f4698c0b16ec5fd0061d8fab7b2ae615540bebd721c2e2227f80401b4e7fc253da9da62e6b513 002_all_default-relro.patch
f86466c62b8291fac46f9c250c7ad8fa5ab7b1cce2504442fd07ddc4543665b317ae28951f244e39aba29aeaf3fff252ec4f6a147aa16adb2b7aed747dd89188 003_all_default-fortify-source.patch
51282fea54c7e616367bbeb2479ba13fec6f24eb47bd04e2071907b3b36273b2ff24676f46ef8d22f241c8ab4857307861eee076eab66797c3a50a8ecaa1809a 005_all_default-as-needed.patch
3398386dd1e079d6545dd9799adc799c6b80e3984fac6899d0e1a7ee21b66d0c7e53cddf17a65d590c883db750f9f79aaedd857355a8b9f7fb9476c906237919 011_all_default-warn-format-security.patch
9adb0d2b9b67dd957df6c609b8714c7c078efb52cd88770905c37c67827be8fc83d1125037b9c29d77db21ce78756aa2bb0bacdb0b98d869ac126da76a298e21 012_all_default-warn-trampolines.patch
@@ -462,7 +514,6 @@ fc0de05b36613b732a0222ea005c90653c6a40d6761b6894af2419272f4e74875f37e26af33a9b99
98473bcaa77903a223ca9b0d2087c0921b287a2816d308cc32c8fe009e6cbf5dd1ae7fba27794ab8d9c09e117fe534413d91a464d1218474fc123ce0adfdc2c1 205-nopie.patch
3287d5b443bea8ec64132bcabe869c738ae98ea8f1a86df1c5d18c927f8816edbfcefeefc47792dbbb2bcacf50319af00e01b3735d34525913b64350770ad453 207-static-pie.patch
d08d7ead2de0429e5c9055d5b029ec2be9a8c821d22cecaf9b51f633652c493333f98963d9267fa2fa63850c50ae5eefd5f59e5910ec10d20044dac082182a8b libgcc-always-build-gcceh.a.patch
600fe5098dc54edaa9808fd5717af9dec058953f9ad37d49cfba1db4f7e9a7a8f02019342f75157fc575946fa693259422184de27b7ecc8386d9f3ecc0f7cc5d gcc-4.9-musl-fortify.patch
dbe0ee917fc7668571722364ab7c806731e3a31e8bfa30b4941b28b16b877d2a32b4a3897ef533399a28f82d43cac9b28e92de0493f0e779046db56584e07fa4 gcc-6.1-musl-libssp.patch
bda845a6aa1854d2c883910b115f79ccfa93dfc2b5eac69a3a236d83eb34cadc140731d616ffc24698c7abc8878dd15f231bcc5119f1860e575a120b311706c7 boehm-gc-musl.patch
fa62556719449caec6b2b434355bfbcaa5ae55ffe017b3e1f827f66a2aae21b79c571ee7a4ce723ea69169bc3a6447e73650991a200cc372adf2f102677518d7 gcc-pure64.patch
@@ -482,6 +533,7 @@ f4ef08454e28c8732db69115e4998ec153399e8d229dd27f923dbdcf57b68128a65640d026cc7f45
34a818d5be67eb1f34e44a80b83c28a9b9c17d37fc9fac639f490d6bb5b53ebe3318140d09c236a17d7c98f5a7792ae3d6cefccda8067a5e942d6305b9d1f87c fix-linux-header-use-in-libgcc.patch
86be3338cc9c33089608bc4c5e3b7918c4e500a345c338f361b18c342119a6ed69af5495d72950de7106d760f003528b46ad14795e805f8a3331e206dcb234e3 gcc-pure64-mips.patch
508f3bca214d88531d739d761d07affc953689b1540905c73420b34c246e1e6b72588cf89f0e1462752633f8ddc88da8c0238be2a1b6e1c213829cecee7924cf ada-mips64.patch
80084d4f5984ea1c62f813c3c1fe7ce033d41d6cd5e6df3b10c649c0bbc2544ad0a58e7076fa28bf71d691df0211b07fc11eb0d5c9f462ef28eed4c3fbeeb9ee gcc-6.4-isl.patch
7912964bf3a985e9f870250d6e068f715582a4fb04270849d697a50e6aad0cf50df3d483ff80a0eb777d9940fd85526dd8d0b85da9bc71a5f2fbc07616263866 0001-i386-Move-struct-ix86_frame-to-machine_function.patch
baa27a4b912d8e27cd65a556b09cf45289a0e00e86dae3925f2923d1f3752080e80d80e159c996ef4156c4df1dfc3069114810a846672170ef3ae461ae0ab7e1 0002-i386-Use-reference-of-struct-ix86_frame-to-avoid-cop.patch
6701d15000bdd7c4c98a8fece8c814f5e4e73603eecf84fe4dc5ac10f79b3074afba7c2cc9e51d08b2abade1c34cb0c944c08ead7a85db94e97158c752fd1aac 0003-i386-Use-const-reference-of-struct-ix86_frame-to-avo.patch
@@ -1,11 +0,0 @@
--- gcc-4.9.2/gcc/config/linux.h.orig 2015-03-09 13:27:13.289736710 +0000
+++ gcc-4.9.2/gcc/config/linux.h 2015-03-09 13:29:32.295625046 +0000
@@ -146,6 +146,8 @@
#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
+251
View File
@@ -0,0 +1,251 @@
From cc46a51d4ff8bc1c42b7e6ae472494733bed5c49 Mon Sep 17 00:00:00 2001
From: Richard Biener <rguenther@suse.de>
Date: Thu, 16 Feb 2017 07:53:53 +0000
Subject: [PATCH] graphite.h: Do not include isl/isl_val_gmp.h, instead include
isl/isl_val.h.
2017-02-16 Richard Biener <rguenther@suse.de>
* graphite.h: Do not include isl/isl_val_gmp.h, instead include
isl/isl_val.h.
* graphite-isl-ast-to-gimple.c (gmp_cst_to_tree): Remove.
(gcc_expression_from_isl_expr_int): Use generic isl_val interface.
* graphite-sese-to-poly.c: Do not include isl/isl_val_gmp.h.
(isl_val_int_from_wi): New function.
(extract_affine_gmp): Rename to ...
(extract_affine_wi): ... this, take a widest_int.
(extract_affine_int): Just wrap extract_affine_wi.
(add_param_constraints): Use isl_val_int_from_wi.
(add_loop_constraints): Likewise, and extract_affine_wi.
From-SVN: r245501
---
gcc/ChangeLog | 14 ++++++++
gcc/graphite-isl-ast-to-gimple.c | 30 +++++------------
gcc/graphite-sese-to-poly.c | 58 ++++++++++++++------------------
gcc/graphite.h | 2 +-
4 files changed, 50 insertions(+), 54 deletions(-)
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 24d9c1589f456..5fc6142eaa03f 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,17 @@
+2017-02-16 Richard Biener <rguenther@suse.de>
+
+ * graphite.h: Do not include isl/isl_val_gmp.h, instead include
+ isl/isl_val.h.
+ * graphite-isl-ast-to-gimple.c (gmp_cst_to_tree): Remove.
+ (gcc_expression_from_isl_expr_int): Use generic isl_val interface.
+ * graphite-sese-to-poly.c: Do not include isl/isl_val_gmp.h.
+ (isl_val_int_from_wi): New function.
+ (extract_affine_gmp): Rename to ...
+ (extract_affine_wi): ... this, take a widest_int.
+ (extract_affine_int): Just wrap extract_affine_wi.
+ (add_param_constraints): Use isl_val_int_from_wi.
+ (add_loop_constraints): Likewise, and extract_affine_wi.
+
2017-02-15 Jeff Law <law@redhat.com>
PR middle-end/79521
diff --git a/gcc/graphite-isl-ast-to-gimple.c b/gcc/graphite-isl-ast-to-gimple.c
index dbdae7a7c155d..ec5fb73d9b2bc 100644
--- a/gcc/graphite-isl-ast-to-gimple.c
+++ b/gcc/graphite-isl-ast-to-gimple.c
@@ -73,22 +73,6 @@ struct ast_build_info
bool is_parallelizable;
};
-/* Converts a GMP constant VAL to a tree and returns it. */
-
-static tree
-gmp_cst_to_tree (tree type, mpz_t val)
-{
- tree t = type ? type : integer_type_node;
- mpz_t tmp;
-
- mpz_init (tmp);
- mpz_set (tmp, val);
- wide_int wi = wi::from_mpz (t, tmp, true);
- mpz_clear (tmp);
-
- return wide_int_to_tree (t, wi);
-}
-
/* Verifies properties that GRAPHITE should maintain during translation. */
static inline void
@@ -325,16 +309,20 @@ gcc_expression_from_isl_expr_int (tree type, __isl_take isl_ast_expr *expr)
{
gcc_assert (isl_ast_expr_get_type (expr) == isl_ast_expr_int);
isl_val *val = isl_ast_expr_get_val (expr);
- mpz_t val_mpz_t;
- mpz_init (val_mpz_t);
+ size_t n = isl_val_n_abs_num_chunks (val, sizeof (HOST_WIDE_INT));
+ HOST_WIDE_INT *chunks = XALLOCAVEC (HOST_WIDE_INT, n);
tree res;
- if (isl_val_get_num_gmp (val, val_mpz_t) == -1)
+ if (isl_val_get_abs_num_chunks (val, sizeof (HOST_WIDE_INT), chunks) == -1)
res = NULL_TREE;
else
- res = gmp_cst_to_tree (type, val_mpz_t);
+ {
+ widest_int wi = widest_int::from_array (chunks, n, true);
+ if (isl_val_is_neg (val))
+ wi = -wi;
+ res = wide_int_to_tree (type, wi);
+ }
isl_val_free (val);
isl_ast_expr_free (expr);
- mpz_clear (val_mpz_t);
return res;
}
diff --git a/gcc/graphite-sese-to-poly.c b/gcc/graphite-sese-to-poly.c
index ede96e5a3c299..8ff9a22e12916 100644
--- a/gcc/graphite-sese-to-poly.c
+++ b/gcc/graphite-sese-to-poly.c
@@ -55,7 +55,6 @@ along with GCC; see the file COPYING3. If not see
#include <isl/constraint.h>
#include <isl/aff.h>
#include <isl/val.h>
-#include <isl/val_gmp.h>
#include "graphite.h"
@@ -154,16 +153,32 @@ extract_affine_name (scop_p s, tree e, __isl_take isl_space *space)
return isl_pw_aff_alloc (dom, aff);
}
+/* Convert WI to a isl_val with CTX. */
+
+static __isl_give isl_val *
+isl_val_int_from_wi (isl_ctx *ctx, const widest_int &wi)
+{
+ if (wi::neg_p (wi, SIGNED))
+ {
+ widest_int mwi = -wi;
+ return isl_val_neg (isl_val_int_from_chunks (ctx, mwi.get_len (),
+ sizeof (HOST_WIDE_INT),
+ mwi.get_val ()));
+ }
+ return isl_val_int_from_chunks (ctx, wi.get_len (), sizeof (HOST_WIDE_INT),
+ wi.get_val ());
+}
+
/* Extract an affine expression from the gmp constant G. */
static isl_pw_aff *
-extract_affine_gmp (mpz_t g, __isl_take isl_space *space)
+extract_affine_wi (const widest_int &g, __isl_take isl_space *space)
{
isl_local_space *ls = isl_local_space_from_space (isl_space_copy (space));
isl_aff *aff = isl_aff_zero_on_domain (ls);
isl_set *dom = isl_set_universe (space);
isl_ctx *ct = isl_aff_get_ctx (aff);
- isl_val *v = isl_val_int_from_gmp (ct, g);
+ isl_val *v = isl_val_int_from_wi (ct, g);
aff = isl_aff_add_constant_val (aff, v);
return isl_pw_aff_alloc (dom, aff);
@@ -174,13 +189,7 @@ extract_affine_gmp (mpz_t g, __isl_take isl_space *space)
static isl_pw_aff *
extract_affine_int (tree e, __isl_take isl_space *space)
{
- mpz_t g;
-
- mpz_init (g);
- tree_int_to_gmp (e, g);
- isl_pw_aff *res = extract_affine_gmp (g, space);
- mpz_clear (g);
-
+ isl_pw_aff *res = extract_affine_wi (wi::to_widest (e), space);
return res;
}
@@ -411,15 +420,11 @@ add_param_constraints (scop_p scop, graphite_dim_t p)
{
isl_space *space = isl_set_get_space (scop->param_context);
isl_constraint *c;
- mpz_t g;
isl_val *v;
c = isl_inequality_alloc (isl_local_space_from_space (space));
- mpz_init (g);
- tree_int_to_gmp (lb, g);
- v = isl_val_int_from_gmp (scop->isl_context, g);
+ v = isl_val_int_from_wi (scop->isl_context, wi::to_widest (lb));
v = isl_val_neg (v);
- mpz_clear (g);
c = isl_constraint_set_constant_val (c, v);
c = isl_constraint_set_coefficient_si (c, isl_dim_param, p, 1);
@@ -431,15 +436,11 @@ add_param_constraints (scop_p scop, graphite_dim_t p)
{
isl_space *space = isl_set_get_space (scop->param_context);
isl_constraint *c;
- mpz_t g;
isl_val *v;
c = isl_inequality_alloc (isl_local_space_from_space (space));
- mpz_init (g);
- tree_int_to_gmp (ub, g);
- v = isl_val_int_from_gmp (scop->isl_context, g);
- mpz_clear (g);
+ v = isl_val_int_from_wi (scop->isl_context, wi::to_widest (ub));
c = isl_constraint_set_constant_val (c, v);
c = isl_constraint_set_coefficient_si (c, isl_dim_param, p, -1);
@@ -773,11 +774,8 @@ add_loop_constraints (scop_p scop, __isl_take isl_set *domain, loop_p loop,
isl_local_space *ls = isl_local_space_from_space (space);
isl_constraint *c = isl_inequality_alloc (ls);
c = isl_constraint_set_coefficient_si (c, isl_dim_set, loop_index, -1);
- mpz_t g;
- mpz_init (g);
- tree_int_to_gmp (nb_iters, g);
- isl_val *v = isl_val_int_from_gmp (scop->isl_context, g);
- mpz_clear (g);
+ isl_val *v
+ = isl_val_int_from_wi (scop->isl_context, wi::to_widest (nb_iters));
c = isl_constraint_set_constant_val (c, v);
return isl_set_add_constraint (domain, c);
}
@@ -817,12 +815,9 @@ add_loop_constraints (scop_p scop, __isl_take isl_set *domain, loop_p loop,
/* NIT is an upper bound to NB_ITERS: "NIT >= NB_ITERS", although we
do not know whether the loop executes at least once. */
- mpz_t g;
- mpz_init (g);
- wi::to_mpz (nit, g, SIGNED);
- mpz_sub_ui (g, g, 1);
+ --nit;
- isl_pw_aff *approx = extract_affine_gmp (g, isl_space_copy (space));
+ isl_pw_aff *approx = extract_affine_wi (nit, isl_space_copy (space));
isl_set *x = isl_pw_aff_ge_set (approx, aff_nb_iters);
x = isl_set_project_out (x, isl_dim_set, 0,
isl_set_dim (x, isl_dim_set));
@@ -831,8 +826,7 @@ add_loop_constraints (scop_p scop, __isl_take isl_set *domain, loop_p loop,
ls = isl_local_space_from_space (space);
c = isl_inequality_alloc (ls);
c = isl_constraint_set_coefficient_si (c, isl_dim_set, loop_index, -1);
- isl_val *v = isl_val_int_from_gmp (scop->isl_context, g);
- mpz_clear (g);
+ isl_val *v = isl_val_int_from_wi (scop->isl_context, nit);
c = isl_constraint_set_constant_val (c, v);
if (dump_file)
diff --git a/gcc/graphite.h b/gcc/graphite.h
index 5103c614ff140..d22c4f2693f52 100644
--- a/gcc/graphite.h
+++ b/gcc/graphite.h
@@ -25,7 +25,7 @@ along with GCC; see the file COPYING3. If not see
#include "sese.h"
#include <isl/options.h>
#include <isl/ctx.h>
-#include <isl/val_gmp.h>
+#include <isl/val.h>
#include <isl/set.h>
#include <isl/union_set.h>
#include <isl/map.h>
+1 -1
View File
@@ -10,7 +10,7 @@ maintainer=""
pkgname=musl-armhf
pkgver=1.2.6
pkgrel=2
arch="x86_64"
arch="aarch64 x86_64"
subpackages="musl-dev-armhf:package_dev"
_arch="armhf"
+1 -1
View File
@@ -10,7 +10,7 @@ maintainer=""
pkgname=musl-armv7
pkgver=1.2.6
pkgrel=2
arch="x86_64"
arch="aarch64 x86_64"
subpackages="musl-dev-armv7:package_dev"
_arch="armv7"
+1 -1
View File
@@ -10,7 +10,7 @@ maintainer=""
pkgname=musl-loongarch64
pkgver=1.2.6
pkgrel=2
arch="x86_64"
arch="aarch64 x86_64"
subpackages="musl-dev-loongarch64:package_dev"
_arch="loongarch64"
+1 -1
View File
@@ -10,7 +10,7 @@ maintainer=""
pkgname=musl-ppc64le
pkgver=1.2.6
pkgrel=2
arch="x86_64"
arch="aarch64 x86_64"
subpackages="musl-dev-ppc64le:package_dev"
_arch="ppc64le"
+1 -1
View File
@@ -10,7 +10,7 @@ maintainer=""
pkgname=musl-riscv64
pkgver=1.2.6
pkgrel=2
arch="x86_64"
arch="aarch64 x86_64"
subpackages="musl-dev-riscv64:package_dev"
_arch="riscv64"
+1 -1
View File
@@ -10,7 +10,7 @@ maintainer=""
pkgname=musl-x86
pkgver=1.2.6
pkgrel=2
arch="x86_64"
arch="aarch64 x86_64"
subpackages="musl-dev-x86:package_dev"
_arch="x86"
@@ -1,3 +1,4 @@
# Archived: unmaintained port, only for testing. Use generic/mainline port (qcom-msm8226)
# Reference: <https://postmarketos.org/devicepkg>
maintainer=""
pkgname=device-motorola-peregrine
@@ -1,3 +1,4 @@
# Archived: No device available to test with
# Reference: <https://postmarketos.org/devicepkg>
maintainer=""
pkgname=device-sony-togari
@@ -2,8 +2,9 @@ monitor.alsa.rules = [
{
matches = [
{
# Matches all sinks
# Matches all sinks of the internal sound card
node.name = "~alsa_output.*"
alsa.card_name = "Fairphone 4"
}
]
actions = {
@@ -2,7 +2,7 @@
maintainer="Luca Weiss <luca@lucaweiss.eu>"
pkgname=device-fairphone-fp4
pkgdesc="Fairphone 4"
pkgver=9
pkgver=10
pkgrel=0
url="https://postmarketos.org"
license="MIT"
@@ -71,7 +71,7 @@ openrc() {
}
sha512sums="
f6fb26e0e75b15cf727e8a20f34e4132cf357025fff1427cf63729776aedce6e647f9f81f1ec13d0a895e381c119980d8bca575e431d241d9affb4f0ee44f4b4 52-fairphone-fp4.conf
fdf1973c32c3834f2e1194d2366fbe1ce6b1ac6ee6211fb720677793f3dcea9adaeeada0e7284d72de848692939e2bc2977997d72ab2126d4f4f8c19428ac846 52-fairphone-fp4.conf
2c16ba75e0077b2b1eaefa4c73b287475505a1aeb291ec29316d41cc094277320f9d2aaabfd91eb1dc0f488ab2d61a94faef16e7afe0f1e226779113761b9a37 81-libssc-fairphone-fp4.rules
0b56ac5bcd8ec44de9a5f6939b95f7bd1b90d86f1fe8f21f5a0f2bf753445845f540932c0ddc09965bab48ddc0b092b03892240f43e421b265e4b5d76ab3b8db deviceinfo
52bb7ed829caa4dcff9728bd6e3cdf118b3c7ee7dfe90df0d4e6422dd67bf3258ae2a4d2dc7599da4182fbd8eb47a0e1d20c58198dc17f2bf178b8f01a8887f7 modules-initfs
@@ -1,8 +1,2 @@
# Invert the acceleration so it is directed downwards, at rest on a planet.
# This is for compatibility with iio-sensor-proxy.
#
# https://gitlab.freedesktop.org/hadess/iio-sensor-proxy/-/issues/375
SUBSYSTEM=="misc", KERNEL=="fastrpc-adsp*", ENV{ACCEL_MOUNT_MATRIX}="-1, 0, 0; 0, -1, 0; 0, 0, -1"
# Be compatible with the fix to CVE 2024-41024.
SUBSYSTEM=="misc", KERNEL=="fastrpc-adsp-secure", SYMLINK="fastrpc-adsp"
+13 -3
View File
@@ -2,7 +2,7 @@
maintainer="Anjandev Momi <anjan@momi.ca>"
pkgname=device-google-bonito
pkgdesc="Google Pixel 3a XL"
pkgver=8
pkgver=9
pkgrel=0
url="https://postmarketos.org"
license="MIT"
@@ -22,6 +22,7 @@ depends="
soc-qcom-modem
soc-qcom-pd-mapper
soc-qcom-qbootctl
systemd-boot
unl0kr-fbforcerefresh
"
makedepends="devicepkg-dev"
@@ -32,12 +33,14 @@ source="
hexagonrpcd-adsp-sensorspd.confd
modules-initfs
no-hexagonrpcd-on-suspend.sh
plasmacamerarc
q6voiced.conf
"
subpackages="
$pkgname-kernel-sdc:kernel_sdc
$pkgname-kernel-tianma:kernel_tianma
$pkgname-openrc:openrc
$pkgname-plasma-camera:plasma_camera
"
build() {
@@ -84,11 +87,18 @@ openrc() {
-t "$subpkgdir"/usr/libexec/elogind/system-sleep
}
plasma_camera() {
install_if="$pkgname=$pkgver-r$pkgrel plasma-camera"
install -Dm644 "$srcdir"/plasmacamerarc "$subpkgdir"/etc/xdg/plasmacamerarc
}
sha512sums="
089ce0acba4e1d789e337bedfca7570796a6416e7230ae9b8fc6b625747a40dbb064b1a707877cd6b7bdc73844c6571316e2ec0746a77060f13d98c52fdbfc00 81-libssc-google-sargo.rules
199d20f5a777ecfd431a40d5b6bf05337a0164ea782be51c911708590a4702eadd107a9aae0654de58a581e633d2a2f15b1ebd0c019aaf38e42e9b6b831835e2 deviceinfo
e358f0565b95cd5d39dd5bc07645c6e0f94679c93b120b72bd2b6082b7f919e990a6a78e03edc0db045f8fc5e3363377c69fb8e42107298868ec319740c29210 81-libssc-google-sargo.rules
bbd5032dd4d40554b3a0d44c1a35c1f1b984f347b9a3d2d4fd718aeedc2e39e8efc8243af5829dd31300c6cb49c8d5f4678364b787861f2144a88e063d90397b deviceinfo
b6208c254b6e44ac4f6d748a38cc6b05da0db2c90235ada2011b138b82ccc3372687df2f5ad97e885e9eea135216a3c52266a08a7f4eb323e62e799f6f82ec7b hexagonrpcd-adsp-sensorspd.confd
0253ff4688b789aa7cdbffb22e7ff9497aabe083adc44bf33fa52617215a1f48fc722bd61aa13a35d109eff1e69202eb599dccff029e39c0a390dcab11dd9b76 modules-initfs
2972005a9cf6ca57061965075593dddfa8ee479bc6c21cd41851b1a14768cb1cddbd31a17975ae17adc36d40d294ccbc6bf83defbd69fc7b363f638d8564fbbc no-hexagonrpcd-on-suspend.sh
53bec3338d875ecedf2ae981cf9a0f9066e276f09570b3bd06217414461126a76942b70e01c3bb18831fbefeb188621dd5a341ab2604e8fb0c6de8a3025177e2 plasmacamerarc
3a4a9322839d4b3ef9d79668a37840a9f444954759ae3c512e694051d2f9a2573db42ad6c4c1a5c75eeb861232a27ba1a8cef9b503decd54ead25a96e3dd6f98 q6voiced.conf
"
@@ -27,6 +27,7 @@ deviceinfo_flash_offset_ramdisk="0x01000000"
deviceinfo_flash_offset_second="0x00000000"
deviceinfo_flash_offset_tags="0x00000100"
deviceinfo_flash_sparse="true"
deviceinfo_boot_filesystem="fat32"
# Reported to be necessary to boot sometimes on Android 9 bootloaders
deviceinfo_flash_fastboot_partition_vbmeta="vbmeta"
@@ -0,0 +1,5 @@
[General]
# H264
videoCodec=0
# 720p
videoResolution=2
@@ -1,4 +1,3 @@
# Co-Maintainer: jane400 <jane400@postmarketos.org>
# Contributor: Konrad Dybcio <konradybcio@kernel.org>
# Contributor: Aster Boese <asterboese@mailbox.org>
# Reference: <https://postmarketos.org/devicepkg>
@@ -7,3 +7,6 @@
# touchscreen calibration
/usr/lib/udev/rules.d/90-touchscreen-dev.rules
# volume key remapping
/etc/udev/hwdb.bin
+36 -40
View File
@@ -1,15 +1,14 @@
# Reference: <https://postmarketos.org/devicepkg>
maintainer="Danct12 <danct12@disroot.org>"
pkgname=device-nokia-n900
pkgver=51
pkgrel=5
pkgver=57
pkgrel=0
pkgdesc="Nokia N900"
url="https://postmarketos.org"
arch="armv7"
license="MIT"
depends="
alsa-utils
evtest
kbd
kbd-bkeymaps
linux-firmware-ti-connectivity
@@ -34,7 +33,6 @@ subpackages="
$pkgname-i3blocks
$pkgname-i3wm
$pkgname-openrc
$pkgname-upower
$pkgname-sway
$pkgname-wayland
$pkgname-x11
@@ -53,7 +51,6 @@ source="
device-nokia-n900.start
deviceinfo
etc-profile.d-25wlr-pixman.sh
modules-initfs
i3blocks/i3blocks.conf
i3blocks/scripts/battery-bq27200
i3blocks/scripts/calendar
@@ -68,22 +65,23 @@ source="
keymaps/rx51_it.map
keymaps/rx51_ptes.map
keymaps/rx51_us.map
lock.sh
modem-load.conf
modem-opts.conf
modules.blocklist
modules-initfs
pointercal
screenlock.sh
sway/etc-sway-config.d-n900-status.conf
sway/etc-sway-config.d-nokia-n900.conf
sway/etc-xdg-foot-foot.ini
sway/usr-bin-sway-bar-hack.sh
sway/usr-bin-sway-saver.sh
uboot-script.cmd
udev/10-nokia-modem.rules
udev/15-bq27k.rules
udev/90-touchscreen-dev.rules
upower.conf
usr-lib-udev-hwdb.d-99-n900-volume-keys.hwdb
usr-share-mkinitfs-hooks-01-omap-disable-idle.sh
xkb-keymap
xorg.conf
xresources
"
options="!check !archcheck"
@@ -118,18 +116,24 @@ package() {
"$pkgdir"/usr/share/mkinitfs/files/10-initfs-input.files
install -Dm644 "$srcdir"/10-initfs-keymap.sh \
"$pkgdir"/usr/share/mkinitfs/hooks/10-initfs-keymap.sh
install -D -m644 "$srcdir"/usr-share-mkinitfs-hooks-01-omap-disable-idle.sh \
"$pkgdir"/usr/share/mkinitfs/hooks/01-omap-disable-idle.sh
install -Dm755 "$srcdir"/$pkgname.start \
"$pkgdir"/etc/local.d/$pkgname.start
install -Dm755 "$srcdir"/bq27k-monitor.sh \
"$pkgdir"/usr/bin/bq27k-monitor
install -Dm755 "$srcdir"/screenlock.sh \
"$pkgdir"/usr/bin/screenlock.sh
# Udev rules
# Udev & hwdb rules
install -D -m644 "$srcdir"/90-touchscreen-dev.rules \
"$pkgdir"/usr/lib/udev/rules.d/90-touchscreen-dev.rules
install -D -m644 "$srcdir"/10-nokia-modem.rules \
"$pkgdir"/usr/lib/udev/rules.d/10-nokia-modem.rules
install -D -m644 "$srcdir"/15-bq27k.rules \
"$pkgdir"/usr/lib/udev/rules.d/15-bq27xxx-battery.rules
install -D -m644 "$srcdir"/usr-lib-udev-hwdb.d-99-n900-volume-keys.hwdb \
"$pkgdir"/usr/lib/udev/hwdb.d/99-n900-volume-keys.hwdb
# Keymap
install -D -m644 "$srcdir"/keymaps/rx51_us.bmap.gz \
@@ -171,11 +175,15 @@ package() {
"$pkgdir"/usr/lib/modprobe.d/n900-module-blocklist.conf
install -D -m644 "$srcdir"/bq27k-options.conf \
"$pkgdir"/usr/lib/modprobe.d/bq27xxx-battery.conf
# UPower
install -Dm644 "$srcdir"/upower.conf \
"$pkgdir"/etc/UPower/UPower.conf.d/99-n900-fg.conf
}
x11() {
install_if="$pkgname=$pkgver-r$pkgrel xorg-server"
depends="unclutter-xfixes scrot xdotool xinput xrdb xset"
depends="unclutter-xfixes scrot xautolock xdotool xinput xrdb xset"
mkdir "$pkgdir"/etc/acpi
install -D -m755 "$srcdir"/acpi_handler.sh \
"$pkgdir"/etc/acpi/handler.sh
@@ -183,10 +191,6 @@ x11() {
"$pkgdir"/etc/acpi.map
install -D -m644 "$srcdir"/40-xkb.conf \
"$subpkgdir"/usr/share/X11/xorg.conf.d/40-xkb.conf
install -D -m644 "$srcdir"/xorg.conf \
"$subpkgdir"/usr/share/X11/xorg.conf.d/11-n900.conf
install -Dm755 "$srcdir"/lock.sh \
"$subpkgdir"/usr/bin/lock.sh
install -Dm644 "$srcdir"/xresources \
"$subpkgdir"/usr/share/X11/Xresources-mobile
}
@@ -200,7 +204,7 @@ xkeyboard_config() {
i3wm() {
install_if="$pkgname=$pkgver-r$pkgrel postmarketos-ui-i3wm"
depends="brightnessctl i3blocks rxvt-unicode sxmo-dmenu upower"
depends="brightnessctl i3blocks rxvt-unicode sxmo-dmenu"
install -D -m644 "$srcdir"/i3wm.conf \
"$subpkgdir"/etc/xdg/i3/config
install -D -m755 "$srcdir"/config-checker \
@@ -209,13 +213,6 @@ i3wm() {
"$subpkgdir"/usr/bin/pwr-key-handler
}
upower() {
install_if="$pkgname=$pkgver-r$pkgrel upower"
replaces="upower"
install -Dm644 "$srcdir"/upower.conf \
"$subpkgdir"/etc/UPower/UPower.conf
}
openrc() {
install_if="$pkgname=$pkgver-r$pkgrel openrc"
depends="wl1251-cal-openrc"
@@ -224,14 +221,13 @@ openrc() {
}
sway() {
depends="brightnessctl foot i3blocks jq upower"
depends="brightnessctl foot i3blocks jq"
install_if="$pkgname=$pkgver-r$pkgrel postmarketos-ui-sway"
replaces="postmarketos-ui-sway"
install -D -m644 "$srcdir"/etc-sway-config.d-nokia-n900.conf \
"$subpkgdir"/etc/sway/config.d/nokia-n900.conf
install -D -m755 "$srcdir"/usr-bin-sway-saver.sh \
"$subpkgdir"/usr/bin/sway-saver.sh
install -D -m755 "$srcdir"/usr-bin-sway-bar-hack.sh \
"$subpkgdir"/usr/bin/sway-bar-hack.sh
install -D -m644 "$srcdir"/etc-sway-config.d-n900-status.conf \
"$subpkgdir"/etc/sway/config.d/01-status-bar.conf
}
foot() {
@@ -264,10 +260,10 @@ wayland() {
}
sha512sums="
4887bc1f9a3559614bf3092511114be4a824a4e94bec6dfda31f52b877f92b38164568c8223cab22234a1edf818f9e3b4af0d7f7244c9880bc3399fa4cb0ce37 10-initfs-input.files
a37c53a6fcf9559ce439ed4a56659375deb1722af1114d99d3c5a718d29684d3bd5ce49f9d8ff2fc7afcc66c36ab7eca8e987e7931700d406a3e874f5bdf26fc 10-initfs-input.files
4656d3b3ced0a86e2d6315c89322899f646a689e9cb64609aa8ad5a676b23d93706d8a37f3be6f6b12c6b1e8501b7d26ecafecf27322333850513a6805c61910 10-initfs-keymap.sh
2e6c324c2a0627fb37ee2feff249d6c828116a9c1a32d572481dddc12648c98b726eb3a475838398742f76a60e3f2249d7707502360473b8bf2e794bf22f57ce acpi.map
b2c2033f8a77a18dc0c5192e0304f60e3c2a2a7d132c2072ab0dd6ee1a5b2a8c7e6396165411534468311a254663ae887cbaf23816f8b17893dd28e99e549790 acpi_handler.sh
eef1f3d5fab1148af498607d3bc7c6a866b61d808d2b90a4ea3e360d5fef779070380670431b67bd3d87111bc7d0e877ef9ab656f4de17c3071cfc360a2746e3 acpi_handler.sh
5b87071834313a389f83d29f86f6e3ea108d0921f17dc918be7a46de7e74c73a4418044ef600a0fbf72c8fad22b7730dcd5bfe3d6d01d76bf01556f8540f0b32 asound.state.headset
67acc17a33bc75113300393b4a5bba15319014032407e774d079abf310368e75f4f697dbb4856ba2d2d8ea184b056bb33561f42918de3ee91ab6a77df89a133c asound.state.speakers
3d55e34b95791636e44a5f41754f3d0de039dbba41f7a556d43a95c9e64afcfa930046b4b96b40020b6f196096ffba93514682927e32fa4488686fdd19c6da5a backlight-enable.sh
@@ -276,14 +272,13 @@ c5b8e03ca9f720a794f2593a3e938640cbd91ac44dd761079bbf4614a0d288a9d7b72de8ed2493c0
e6bbac8de1a198ba716f44ade76606e1e0adcc574156b855ac41be5eb5308389d3277fd89cc34b119fbc33d9801ab9f79a6ff213392596bff40bc17e931c05ef device-nokia-n900.start
b1ebed32232ca1890ed6a47372ce45f4ee004fcb76defc6f67048cfa7361d6e02ebd365a6370ba7c26d410e67926a6fada863f07aa18d7098dbdea1a3b057415 deviceinfo
1c7499eb84948eb5b73d58474b1b71a5f2f63116a2a3e1f9a4238064dcf6c152ccefa108bd4ab1074712a2319111c8fdd4bfcf0dbe4d26b5a319404def1b11d2 etc-profile.d-25wlr-pixman.sh
4efca73b4053e00b2a24ef3e79ead3da43b0e6db4f3447721fa9084b1c280e65f1ddaadd390d6073e26b6c635bb14f804fcf3c54d8ebf9df73eff80deff59d80 modules-initfs
a8152e94262629e11abdd8809d187c3b7ed1866a6128fb1f435e17e72120536ac8114262e66df6decb2627743027f2b923ddbe8a94e3e844099b6fad02ec252b i3blocks.conf
6c6a70667f37807089adbb343c09d1f62d47b8e6c9c0a54f44790b822f8bff3dccae73341ef736b799fd6740bbd6e1f48e6e122c2e08520f71f6ad7434a47d2c battery-bq27200
8a35a4ea9de9a30a5c1a5f01f8a8d211a7dbd43b77773eaf904fe633d4f9d1b0641c0b81493599af2b5cefefb6947c9c9d7a4d633d041f3503394dbfa90cf4f5 battery-bq27200
d9ef88c714e9fce8822f63b7a9d7fc3e1ed472c8c876b44ba524d44efea322839f13ddd2fa652420608427ecf7279bfaac302c9b67667f32796ca21da332164d calendar
82038d38f94cb975a8d38914afca49b64957446bef7490ab684efa1df47ede2ea1c769045789bb9fded673345eea01911fbbf85fdb54c28685cad8022bfaafac ofono
d7f79fa0887110b85dfb676bd426fa76764fbbb8093df89184552838ddb703b62500f61d7cfa8decdb75a542e3ef577cc71ee4c12ed14d6a76827a3f5aa13073 wifi
d7d1599a9952fd02d3cfbeaa6b3307251e765f98a9eb723237c94f585831cc8f11d9d30dbc0352e3b008224dec12b820cf86fa28a5e5ac303cfd03d80b8872f5 config-checker
c95afd02124e53f0de1ef33e7bbee12a15ae2d4d629a201157ed9d428288365241dfc3358fc7055154845f9df986fd975a2ebd4de384b8e175cb45f26b2fa38d i3wm.conf
2f00222e3502cc7ca245ceab24e370fd9d653d7bcad2c4039848fbba5a16d7f467c107fcf80ea253d42cc632048d6cef890b39446cac31a9a6f2c42cb48d9d30 i3wm.conf
63ec5a88f4385fd944477d0b7ca7061745b061337cba8d3c779826aa96a94dda79bfca4fb3456234f6adbdb483e660d3cf6ccefd8576d23a70f52e3f44f0edb4 pwr-key-handler.sh
181187db6d88b872233f594759373f32fd08065ee340b60f0c3ff06396d99f4b1250192d70a054fcc9e51e067f6cc063c62b7d8dfff3427b292f1d0c766db206 40-xkb.conf
dc585e11bf4e06e36c5c62bcc024eaacecc30437d9da5257df14be05e247a2f2bc208874be3058edc6f87cc2877da2ecafd2f627d9b465d4fd24475fc21fdc71 rx51_ch.map
@@ -291,21 +286,22 @@ dc585e11bf4e06e36c5c62bcc024eaacecc30437d9da5257df14be05e247a2f2bc208874be3058ed
082a5166e38296b097e873b0b4aeaf007e594d3bf4470c74e91ee3efedcf28ad25cd55c23dd63e460339898ae08e77e111b0e1092fa5e661db90bb40732103a1 rx51_it.map
6e4e8b10a41d0957968736f5d780f14c7070b03913d80859cb07180e9cec9a36bbc9c639748765e48962772640974f5491627520cc36bd3d6c9d01748f9ddaff rx51_ptes.map
e440ed7a3070c17e003b86b72dbe6d8194d01b577ca8dd56dd066f216b6dda32bb965c780950f1789a66f7c948290016b048da9f1cf63aba9e11d7e7fd6873ba rx51_us.map
83374ba470dc6c34e11c62e91e90a96614d76ae7ce240dd830cb1b2f07f9a72c83e5b50e07e49885a72b9caf25fd586c4ea26452a73baf8bab1d2b4490a107ab lock.sh
157b27feebcfddf800a1ffd8c6e369d2b58e5db25b1a44b4443dada8d9fe74abb91d036b9f0e97769bbafbdc72020b5637313682c6932fe7b0bddb9ebebbad42 modem-load.conf
695feac7f69a0ec8c5e007cdb651adcc3492f1c6236e7fd183edec2a5e25cb957d3ace630ea5fdb87fd703e35ac368f1d097c2f881ecb52c9cfd433564db2a6c modem-opts.conf
862ebc7cd2d7a1b3d41b10701b8418308c89eb0732eb99c42ec1091d48e08db9421727f67a3272b7309549798d59afb1b8d7d2fa48d1447b208fcb2329472d4d modules.blocklist
4efca73b4053e00b2a24ef3e79ead3da43b0e6db4f3447721fa9084b1c280e65f1ddaadd390d6073e26b6c635bb14f804fcf3c54d8ebf9df73eff80deff59d80 modules-initfs
143c21f0b18a016d37cb44178e9daea09f128a90769b48353c03c3f245cb9b1f7e773b9ccee084973fc78ddd7a18c2642e54888a85bda7c7daecddc9a8c62eff pointercal
0342c1518b832e8db65c349147c478905e2bf3319abc36a1031c17b1513f969dd4e0423d98b99b64d51f1f7871e21d8764b5af54018c7e09a03cb44717459f47 etc-sway-config.d-nokia-n900.conf
286aceb4b3c1a159c5eb6cbd563027f24941cc30245459b8bf6ca30fd7e7a4e8ea18d67c4cfefd06d9ed02acac6587857d9aab674cd1071359b54acd26036e1f screenlock.sh
3ec2e28a59298ad87ece5205be37b6e07c5f0f3bd0a98022f9f6824500444792cb06425bfbb62c9503c3072183f2d571c8504b6f23054062bb082c7a5b125a2b etc-sway-config.d-n900-status.conf
1e6939c583372dd4d493e1e2cfb6a4758a17606edd262d322bc01b2d3d76de4370581954f22f6ac976d86e87aab0979b2233e1c75780aeaff0670ea25dba62ca etc-sway-config.d-nokia-n900.conf
45da074b597a47825146ae1f3712538210e2ebe1c459f98a8189ccfc7c16ed54d221999b5890785c92aa750c6295dee7e920ef7f97d415d4212f8c0fea29169f etc-xdg-foot-foot.ini
49db3826d42a57951bdfe7d651de6d20277edcda094fd98aeaf0a859b4a88ff9df340915d77b32dc8481fc6ea23f02a2ed4b70c28a3c93cbac4a8182ebbc4ca1 usr-bin-sway-bar-hack.sh
8ca33e8e8bb5da1c4de562db3a96ff3481d42344d9cabe532730665231cce491c777526ed35a4872bee768f48e5573f35bc034757740f8b57a570d409004b241 usr-bin-sway-saver.sh
42f916d87dd305111028992a1107bf6fe108bebbd782ae8edd065e76505db2b3a75e57515970c3e40cb0d1b7e83097a1bba92785be13df7c3fd80959a8d9c5c1 uboot-script.cmd
4be9626cd2ad96730671e145aba9473b8bb7e62b7dec109eb87b4c748e5ac8fcb7cb0deeecc2a07f6fc9e9a598dbd438e02ad32d21e13d109ed7fecfb29904cc uboot-script.cmd
465b9a0d2b46d0981c64b47cb1f656c2456a90b91b1751a2efad10af38a96030dd99108b1fd76ce31bf1ea0f236d55bed38b114d6bd712f09f8968de034c946c 10-nokia-modem.rules
1acc441b9f83dc91fd65fa3f89b8205bfd72a465286bc181b4e7e92dd4b8c0bc5c20a18dab46ff3ee8ae70940efd7d767b3dfb920edb4c74377bd418b838693d 15-bq27k.rules
c6012aef28b096141b924fced226ec99fb93eb53b69c064a8887d8fecdf8dc08a3ba3db399e18d88374c6ef4c59013a30699c7e4d76e5cb771040582573a0527 90-touchscreen-dev.rules
9b99feee42dd6bdd122769994c786d3127c41e0aa3321f19c82a9d3845cf07b522908621a31cbddd9599fe18c5c37127d9b4be4255cd7fa8e0e8983bf73eb41b upower.conf
1087d9699f6c4325a1d7ba2e6faf7fda87953fc0d3b0ef97de1da05187ba8f942f78806916cfb2ae9456fa2e63b2adf08e1e8118dc834c31a677755bab0fbf9a upower.conf
662d00f1ea0874037ccb573eb36ac0ed715f057ae40adb52319c358d06e81a4d8764dd39542374006546f66196d13262b5d7f66b0540c367469f003981dfb53a usr-lib-udev-hwdb.d-99-n900-volume-keys.hwdb
73dc0f29a97994e7efe0a2c8906f75099b2bca1d660f58ae50b44d3f00eec0cee2a89541a80a4de0f276605ef36a576dd757f0cd9a9a4fd47b535b9400a83526 usr-share-mkinitfs-hooks-01-omap-disable-idle.sh
4de54d007bd354461fe4d6d455fe3f29694c132a3996c79b68070d606b5ca1839f9027202ebb731035f0bf6504b42fbd5ab15c7b47b7f308ce768a84d45024c4 xkb-keymap
a91f98daa60efa2beb2ff6b405097f92edca5f1bbb9e7675499139be52ca2570712f8f06f9032ef29f636f99c8f8da8b992f746eab6424aac04260c16158bcc2 xorg.conf
183dfdd545ba05e216209b1abe45e4af4e0ee16b2e73cff0e7ea7b9524ee35a1cf85213a77f32a1a94287aee6546885dbd71c6de1f4f1a1e2961e638ff27cdf6 xresources
"
@@ -3,20 +3,13 @@
user=$( getent passwd 10000 | cut -d: -f1 )
cmd=$( echo $0 | awk '{i=split($0,a,"/"); print a[i]}' )
function adjust_keypad_bl {
for i in $(seq 1 6); do
echo $1 > /sys/class/leds/lp5523\:kb$i/brightness
done
}
case $cmd in
KP_SLIDE_OPEN)
adjust_keypad_bl 63
su $user -c 'DISPLAY=:0.0 /usr/bin/xset dpms force on'
su $user -c 'DISPLAY=:0.0 /usr/bin/xinput enable "TSC2005 touchscreen"'
su $user -c '/usr/bin/screenlock.sh unlock'
/usr/bin/screenlock.sh kbd_backlight 31
;;
KP_SLIDE_CLOSE)
adjust_keypad_bl 0
/usr/bin/screenlock.sh kbd_backlight 0
;;
CAM_BTN_DWN)
echo "Not implemented yet"
@@ -5,4 +5,7 @@ for i in $(awk '{if($NF && ($1 !~ /^#/)) print $NF}' /etc/acpi.map); do
ln -s /etc/acpi/handler.sh /etc/acpi/$i
done
# Update hwdb
udevadm hwdb --update
exit 0
@@ -1,13 +1,12 @@
#!/bin/sh
# SPDX-License-Identifier: GPL-3.0-only
upower_batt="/org/freedesktop/UPower/devices/battery_bq27200_0"
upower_data=$(upower -i "$upower_batt" 2> /dev/null)
capacity=$(echo "$upower_data" | awk '/percentage/ {print $NF}')
state=$(echo "$upower_data" | awk '/state/ {print $NF}')
echo "$capacity"
echo "$capacity"
battery="/sys/class/power_supply/bq27200-0"
capacity=$(cat "$battery"/capacity)
status=$(cat "$battery"/status)
echo "$capacity%"
echo "$capacity%"
if [ "$state" = "charging" ] || [ "$state" = "fully-charged" ]; then
if [ "$status" = "Charging" ] || [ "$status" = "Full" ]; then
echo "#0099FF"
else
echo "#FFFFFF"
@@ -67,7 +67,7 @@ bindsym --release Shift+Up exec --no-startup-id xdotool click 4
bindsym --release Shift+Down exec --no-startup-id xdotool click 5
# Handle screenlock key
bindsym --release XF86ScreenSaver exec --no-startup-id lock.sh
bindsym --release XF86ScreenSaver exec --no-startup-id screenlock.sh
# Pressing the power button offers reboot, shutdown, or suspend choice
bindsym XF86PowerOff exec --no-startup-id pwr-key-handler
@@ -101,4 +101,6 @@ exec --no-startup-id xrdb -merge /usr/share/X11/Xresources-mobile
# Hide mouse cursor
exec --no-startup-id unclutter-xfixes --fork
# Turn display off after 2 minutes of idle
exec --no-startup-id xset dpms 0 0 120
exec --no-startup-id xset dpms 0 0 0
exec --no-startup-id xset s off
exec --no-startup-id xautolock -time 2 -detectsleep -locker 'screenlock.sh lock'
@@ -1,14 +0,0 @@
#!/bin/sh
touch_state=$(xinput list-props "TSC2005 touchscreen" | grep "Device Enabled" | tr -d "\t" | cut -d ":" -f 2)
case "$touch_state" in
0)
xinput enable "TSC2005 touchscreen"
xset dpms force on
;;
1)
xinput disable "TSC2005 touchscreen"
xset dpms force off
;;
esac
@@ -0,0 +1,101 @@
#!/bin/sh
set -e
kbd_backlight() {
for i in $(seq 1 6); do
brightnessctl --quiet --device="*kb$i" s "$1"
done
}
x11_unlock() {
export DISPLAY=:0
xautolock -enable
xset dpms force on
xset dpms 0 0 0
xinput enable "TSC2005 touchscreen"
}
x11_lock() {
export DISPLAY=:0
xinput disable "TSC2005 touchscreen"
xset dpms 0 0 3
xset dpms force off
xautolock -disable
kbd_backlight 0
}
sway_unlock() {
SWAYSOCK="$(find /run/user/ -name "*sway-ipc*")"
export SWAYSOCK
swaymsg output DPI-1 power on
# Workaround wlroots bug, https://gitlab.freedesktop.org/wlroots/wlroots/-/work_items/4026
swaymsg output DPI-1 power on
swaymsg exec "swayidle timeout 120 'swaymsg exec screenlock.sh lock'"
swaymsg input "0:2005:TSC2005_touchscreen" events enabled
}
sway_lock() {
SWAYSOCK="$(find /run/user/ -name "*sway-ipc*")"
export SWAYSOCK
swaymsg input "0:2005:TSC2005_touchscreen" events disabled
swaymsg output DPI-1 power off
pkill -f swayidle
kbd_backlight 0
}
get_environment() {
environment="unknown"
if pgrep -nf Xorg > /dev/null; then
environment="x11"
elif pgrep -nf sway$ > /dev/null; then
environment="sway"
else
# add other environments here
exit 0
fi
echo "$environment"
}
toggle() {
case "$(get_environment)" in
x11)
export DISPLAY=:0
touch_state=$(xinput list-props "TSC2005 touchscreen" | grep "Device Enabled" | tr -d "\t" | cut -d ":" -f 2)
;;
sway)
SWAYSOCK="$(find /run/user/ -name "*sway-ipc*")"
export SWAYSOCK
touch_state=$(swaymsg -t get_inputs | jq -r '.[] | select (.identifier == "0:2005:TSC2005_touchscreen") | .libinput.send_events')
;;
esac
case "$touch_state" in
disabled)
sway_unlock
;;
enabled)
sway_lock
;;
0)
x11_unlock
;;
1)
x11_lock
;;
esac
}
if [ "$#" -ge 1 ]; then
case "$1" in
*lock)
env="$(get_environment)"
eval "$env"_"$1"
;;
kbd_backlight)
shift 1
kbd_backlight "$1"
;;
esac
else
toggle
fi
@@ -0,0 +1,6 @@
# Bar configuration
### use i3blocks, for which N900 already has a working configuration
bar {
position top
status_command i3blocks
}
@@ -31,12 +31,16 @@ bindsym --release Shift+Down exec -- seat * cursor press button5
# Handle screenlock key (XF86ScreenSaver)
# Bind using code due to sway bug: https://github.com/swaywm/sway/issues/8438
bindcode --no-repeat 160 exec sway-saver.sh
bindcode --no-repeat 160 exec screenlock.sh
# Handle keypad slide
bindswitch keypad_slide:on exec screenlock.sh kbd_backlight 31 && screenlock.sh unlock
bindswitch keypad_slide:off exec screenlock.sh kbd_backlight 0
# TODO: Pressing the power button should offer choices including rebooting,
# shutdown, and suspend.
# At present, it will only lock and unlock the screen, same as XF86ScreenSaver
bindsym XF86PowerOff exec sway-saver.sh
bindsym XF86PowerOff exec screenlock.sh
# Use PA once UCM2 config is available
bindsym XF86AudioRaiseVolume exec amixer set PCM 5%+
@@ -47,13 +51,4 @@ bindsym Shift+XF86AudioRaiseVolume exec brightnessctl --quiet --class=backlight
bindsym Shift+XF86AudioLowerVolume exec brightnessctl --quiet --class=backlight set 10%-
# Idle configuration
exec swayidle timeout 120 'swaymsg exec sway-saver.sh disable'
# Bar configuration
### stop default bar (from default config)
exec_always sway-bar-hack.sh
### use i3blocks, for which N900 already has a working configuration
bar {
position top
status_command i3blocks
}
exec swayidle timeout 120 'swaymsg exec screenlock.sh lock'
@@ -1,8 +0,0 @@
#!/bin/sh
# Stop the default bar. For unknown reasons, these commands do not work from
# inside the config
(
sleep 3
swaymsg bar bar-0 status_command -
swaymsg bar mode invisible bar-0
) &
@@ -1,46 +0,0 @@
#!/bin/sh
# Silence shellcheck's errorneous "(warning): In POSIX sh, 'enable' is undefined."
# shellcheck disable=3044
set -e
set_kbd_backlight() {
for i in $(seq 1 6); do
brightnessctl --quiet --device="*kb$i" s "$1"
done
}
enable() {
swaymsg input "0:2005:TSC2005_touchscreen" events enabled
swaymsg output DPI-1 power on
set_kbd_backlight 25
swaymsg exec "swayidle timeout 120 'swaymsg exec sway-saver.sh disable'"
}
disable() {
swaymsg input "0:2005:TSC2005_touchscreen" events disabled
swaymsg output DPI-1 power off
set_kbd_backlight 0
pkill -f swayidle
}
# Enable/disable based on cmdline parameter
if [ "$#" -eq 1 ]; then
case "$1" in
enable|disable)
eval "$1"
;;
esac
exit 0
fi
state_touch=$(swaymsg -t get_inputs | jq -r '.[] | select (.identifier == "0:2005:TSC2005_touchscreen") | .libinput.send_events')
# Toggle enabled/disabled state
case "$state_touch" in
disabled)
enable
;;
enabled)
disable
;;
esac
@@ -2,7 +2,7 @@ setenv mmcnum 0
setenv mmcpart 1
setenv mmctype ext2
setenv setup_omap_atag 1
setenv bootargs init=/init.sh rw console=tty0 PMOS_FORCE_PARTITION_RESIZE
setenv bootargs init=/init.sh rw console=tty0 pmos.force-partition-resize splash
setenv mmckernfile /uImage
setenv mmcinitrdfile /uInitrd
setenv mmcscriptfile
@@ -1,104 +1,3 @@
# Only the system vendor should modify this file, ordinary users
# should not have to change anything.
[UPower]
# Enable the Watts Up Pro device.
#
# The Watts Up Pro contains a generic FTDI USB device without a specific
# vendor and product ID. When we probe for WUP devices, we can cause
# the user to get a perplexing "Device or resource busy" error when
# attempting to use their non-WUP device.
#
# The generic FTDI device is known to also be used on:
#
# - Sparkfun FT232 breakout board
# - Parallax Propeller
#
# default=false
EnableWattsUpPro=false
# Don't poll the kernel for battery level changes.
#
# Some hardware will send us battery level changes through
# events, rather than us having to poll for it. This option
# allows disabling polling for hardware that sends out events.
#
# default=false
NoPollBatteries=false
# Do we ignore the lid state
#
# Some laptops are broken. The lid state is either inverted, or stuck
# on or off. We can't do much to fix these problems, but this is a way
# for users to make the laptop panel vanish, a state that might be used
# by a couple of user-space daemons. On Linux systems, see also
# logind.conf(5).
#
# default=false
IgnoreLid=false
# Policy for warnings and action based on battery levels
#
# Whether battery percentage based policy should be used. The default
# is to use the time left, change to true to use the percentage, which
# should work around broken firmwares. It is also more reliable than
# the time left (frantically saving all your files is going to use more
# battery than letting it rest for example).
# default=true
UsePercentageForPolicy=true
# When UsePercentageForPolicy is true, the levels at which UPower will
# consider the battery low, critical, or take action for the critical
# battery level.
#
# This will also be used for batteries which don't have time information
# such as that of peripherals.
#
# If any value is invalid, or not in descending order, the defaults
# will be used.
#
# Defaults:
# PercentageLow=20.0
# PercentageCritical=5.0
# PercentageAction=2.0
PercentageLow=20.0
PercentageCritical=5.0
PercentageAction=2.0
# When UsePercentageForPolicy is false, the time remaining in seconds at
# which UPower will consider the battery low, critical, or take action for
# the critical battery level.
#
# If any value is invalid, or not in descending order, the defaults
# will be used.
#
# Defaults:
# TimeLow=1200
# TimeCritical=300
# TimeAction=120
TimeLow=1200
TimeCritical=300
TimeAction=120
# Enable the risky CriticalPowerAction-Suspend
# This option is not recommended, but it is here for users who
# want to enable the riscky CriticalPowerAction, such as "Suspend"
# to fulfil their needs.
# Default is false
AllowRiskyCriticalPowerAction=true
# The action to take when "TimeAction" or "PercentageAction" above has been
# reached for the batteries (UPS or laptop batteries) supplying the computer
#
# Possible values are:
# PowerOff
# Hibernate
# HybridSleep
# Suspend (AllowRiskyCriticalPowerAction should be true to use this option but risky)
# Ignore (AllowRiskyCriticalPowerAction should be true to use this option but risky)
#
# If Suspend isn't available or AllowRiskyCriticalPowerAction=false, HybridSleep will be used
# If HybridSleep isn't available, Hibernate will be used
# If Hibernate isn't available, PowerOff will be used
CriticalPowerAction=Ignore
@@ -0,0 +1,5 @@
# N900's volume keys actually emit F7 and F8 in the stock OS/kernel as well as
# upstream (kernel.org) DTS. Correct them via hwdb.
evdev:input:b0019v0001p0001e0003*
KEYBOARD_KEY_71=volumedown
KEYBOARD_KEY_72=volumeup
@@ -0,0 +1,6 @@
#!/bin/busybox ash
# Disable OMAP 3430 SoC OFF mode. It is currently unreliable and leads to
# system lockup and crashes.
mount -t debugfs none /sys/kernel/debug || true
echo 0 > /sys/kernel/debug/pm_debug/enable_off_mode || true
@@ -1,6 +0,0 @@
Section "OutputClass"
Identifier "LCD"
MatchDriver "omapdrm"
Driver "modesetting"
Option "AccelMethod" "none"
EndSection
@@ -4,22 +4,24 @@
maintainer="Alexander Martinz <amartinz@shiftphones.com>"
pkgname=device-shift-axolotl
pkgdesc="SHIFT6mq"
pkgver=20
pkgrel=1
pkgver=21
pkgrel=0
url="https://postmarketos.org"
license="MIT"
arch="aarch64"
options="!check !archcheck"
depends="
alsa-ucm-conf-sdm845
fwupd>=1.8.6
linux-postmarketos-qcom-sdm845
make-dynpart-mappings
mkbootimg
postmarketos-base
alsa-ucm-conf-sdm845
soc-qcom
soc-qcom-pd-mapper
soc-qcom-qbootctl
fwupd>=1.8.6
systemd-boot
unl0kr-fbforcerefresh
"
makedepends="devicepkg-dev"
source="
@@ -76,7 +78,7 @@ pmtest() {
}
sha512sums="
c53336de1a7e97bf90650986fa1bf436fe464e47a66a5a448d7057c5bb4010d075c821e6f1fcc42b0bdafbe51b069651d4862aa896db06ef2dfe0a6a040c4f1c deviceinfo
7304e795a2969d251110b223a29acbaaf42811522f50b42cb6dae03afff697845c8af9be04f312137e8c4973092f87b0eb6ba5650c6086e277df171c0610303f deviceinfo
f16e550f623522be29027954c69a956eb6543f2f608a4c6b37c1a3983403a3edaa24e70aa42dbe88e76216991aba867b48c7341c9b8a81f675902d6223937b51 kernel-cmdline.conf
5966325963a3a62c919b5f39f7bc56e1785f192f50c40a6cc644a2fea0c9b8dd083e287ef43c59c2b9cab5c88d65266b0cd9cf1f5110924950bd250be5385622 hexagonrpcd.confd
4dc84207c5ca84b33b74139c8b0c9ce5baa8bcb1068df9943c478c02abcf8daccb88e06af63f120a434a115e277008e899305bd5239d8669436cb269889040e9 modules-initfs
@@ -34,6 +34,7 @@ deviceinfo_append_dtb="true"
deviceinfo_dtb="qcom/sdm845-shift-axolotl"
deviceinfo_flash_kernel_on_update="true"
deviceinfo_initfs_compression="zstd:fast"
deviceinfo_boot_filesystem="fat32"
# Required for devices using UFS as storage (instead of e.g. eMMC)
deviceinfo_rootfs_image_sector_size="4096"
@@ -1,18 +0,0 @@
maintainer=""
pkgname=firmware-analogix
pkgver=0_git20200620
pkgrel=0
pkgdesc="Firmware for Analogix controllers"
url="https://megous.com/git/linux-firmware"
arch="aarch64"
license="proprietary"
options="!check !strip !archcheck !tracedeps pmb:cross-native"
_commit="331f8c0826b6b89fa51a13df2c632e5f632e6e19"
source="anx7688-fw-$_commit.bin::https://megous.com/git/linux-firmware/plain/anx7688-fw.bin?id=$_commit"
package() {
install -Dm644 "$srcdir"/anx7688-fw-$_commit.bin \
"$pkgdir"/lib/firmware/anx7688-fw.bin
}
sha512sums="627b40cfd7fb02a1c4c2cb3628075e162745292d54875957de8f2913339db9048dbd59cb8cd088419861c5fdc77e658040b3111c79be265afb56fca9c407dfcb anx7688-fw-331f8c0826b6b89fa51a13df2c632e5f632e6e19.bin"
+5 -5
View File
@@ -1,6 +1,6 @@
maintainer=""
pkgname=firmware-ath6kl
pkgver=0.1
pkgver=1
pkgrel=0
_commit=2e02576c1dab6fd35118eea1004f50aaaed3794f
pkgdesc="Firmware for Atheros ath6kl / AR6004"
@@ -12,11 +12,11 @@ source="$pkgname-$pkgver.tar.gz::https://github.com/qca/ath6kl-firmware/archive/
builddir="$srcdir/ath6kl-firmware-$_commit"
package() {
mkdir -p "$pkgdir"/lib/firmware
mv ath6k "$pkgdir"/lib/firmware
mkdir -p "$pkgdir"/usr/lib/firmware
mv ath6k "$pkgdir"/usr/lib/firmware
# These conflict with linux-firmware-ath6k
rm -r "$pkgdir"/lib/firmware/ath6k/AR6004/hw1.*
rm -r "$pkgdir"/usr/lib/firmware/ath6k/AR6004/hw1.*
}
sha512sums="
a73577ac75dfc9d289ee7dc9eae1428cdad277d6e1fdef10425286fb58d7ae6761cafd533c6ce41f743afb75581e38b6b1dcd514cbbb97252708a8589db6c4e2 firmware-ath6kl-0.1.tar.gz
a73577ac75dfc9d289ee7dc9eae1428cdad277d6e1fdef10425286fb58d7ae6761cafd533c6ce41f743afb75581e38b6b1dcd514cbbb97252708a8589db6c4e2 firmware-ath6kl-1.tar.gz
"
+3 -3
View File
@@ -1,7 +1,7 @@
maintainer="Clayton Craft <clayton@craftyguy.net>"
pkgname=firmware-b43xx
pkgver=6.30.163.46
pkgrel=1
pkgrel=2
pkgdesc="Firmware for Broadcom B43xx WiFi chipsets"
url="https://www.lwfinger.com/b43-firmware/"
arch="x86_64"
@@ -12,9 +12,9 @@ makedepends="b43-fwcutter"
builddir="$srcdir"
package() {
mkdir -p "$pkgdir"/lib/firmware/postmarketos
mkdir -p "$pkgdir"/usr/lib/firmware/postmarketos
b43-fwcutter \
-w "$pkgdir"/lib/firmware/postmarketos/ \
-w "$pkgdir"/usr/lib/firmware/postmarketos/ \
broadcom-wl-"$pkgver".wl_apsta.o
}
+4 -4
View File
@@ -2,8 +2,8 @@
# Contributor: Clayton Craft <clayton@craftyguy.net>
maintainer="Alistair Francis <alistair@alistair23.me>"
pkgname=firmware-brcm43752
pkgver=3_git20230613
pkgrel=1
pkgver=4_git20230613
pkgrel=0
_commit="84b8b00f57a9495c05190477c5895cd66f69b873"
pkgdesc="Firmware for the Broadcom brcm43752 Wifi/BT adapter"
url="https://source.puri.sm/Librem5/firmware-brcm43752-nonfree"
@@ -14,8 +14,8 @@ source="https://source.puri.sm/Librem5/firmware-brcm43752-nonfree/-/archive/$_co
builddir="$srcdir/firmware-brcm43752-nonfree-$_commit"
package() {
mkdir -p "$pkgdir/lib/firmware/postmarketos"
cp -r "$builddir/firmware/brcm" "$pkgdir/lib/firmware/postmarketos"
mkdir -p "$pkgdir/usr/lib/firmware/postmarketos"
cp -r "$builddir/firmware/brcm" "$pkgdir/usr/lib/firmware/postmarketos"
}
sha512sums="
@@ -1,7 +1,7 @@
maintainer="Luca Weiss <luca@lucaweiss.eu>"
pkgname=firmware-fairphone-fp4
pkgver=20240313
pkgrel=3
pkgrel=4
pkgdesc="Firmware for Fairphone 4"
subpackages="
$pkgname-adreno
@@ -41,18 +41,18 @@ adreno() {
# TODO: replace with firmware-qcom-adreno-a619 when released to linux-firmware.
# The parent device package currently depends on a630-sqe
install -Dm644 "$builddir"/a619_gmu.bin -t \
"$subpkgdir/lib/firmware/qcom/"
"$subpkgdir/usr/lib/firmware/qcom/"
install -Dm644 "$builddir"/a615_zap.mbn -t \
"$subpkgdir/lib/firmware/qcom/sm7225/fairphone4/"
"$subpkgdir/usr/lib/firmware/qcom/sm7225/fairphone4/"
}
adsp() {
pkgdesc="Fairphone 4 adsp firmware"
install -Dm644 "$builddir"/adsp.mbn -t \
"$subpkgdir/lib/firmware/qcom/sm7225/fairphone4/"
"$subpkgdir/usr/lib/firmware/qcom/sm7225/fairphone4/"
install -Dm644 "$builddir"/adsp*.jsn -t \
"$subpkgdir/lib/firmware/qcom/sm7225/fairphone4/"
"$subpkgdir/usr/lib/firmware/qcom/sm7225/fairphone4/"
}
audio() {
@@ -60,29 +60,29 @@ audio() {
# TODO: Should get a proper device-specific location long-term
install -Dm644 "$builddir"/aw882xx_monitor.bin -t \
"$subpkgdir/lib/firmware/postmarketos/"
"$subpkgdir/usr/lib/firmware/postmarketos/"
install -Dm644 "$builddir"/aw882xx_spk_reg_l.bin -t \
"$subpkgdir/lib/firmware/postmarketos/"
"$subpkgdir/usr/lib/firmware/postmarketos/"
install -Dm644 "$builddir"/aw882xx_spk_reg_r.bin -t \
"$subpkgdir/lib/firmware/postmarketos/"
"$subpkgdir/usr/lib/firmware/postmarketos/"
}
bluetooth() {
pkgdesc="Fairphone 4 bluetooth firmware"
install -Dm644 "$builddir"/apbtfw11.tlv -t \
"$subpkgdir/lib/firmware/qca/"
"$subpkgdir/usr/lib/firmware/qca/"
install -Dm644 "$builddir"/apnv11.bin -t \
"$subpkgdir/lib/firmware/qca/"
"$subpkgdir/usr/lib/firmware/qca/"
}
cdsp() {
pkgdesc="Fairphone 4 cdsp firmware"
install -Dm644 "$builddir"/cdsp.mbn -t \
"$subpkgdir/lib/firmware/qcom/sm7225/fairphone4/"
"$subpkgdir/usr/lib/firmware/qcom/sm7225/fairphone4/"
install -Dm644 "$builddir"/cdsp*.jsn -t \
"$subpkgdir/lib/firmware/qcom/sm7225/fairphone4/"
"$subpkgdir/usr/lib/firmware/qcom/sm7225/fairphone4/"
}
hexagonfs() {
@@ -104,20 +104,20 @@ ipa() {
pkgdesc="Fairphone 4 ipa firmware"
install -Dm644 "$builddir"/lagoon_ipa_fws.mbn \
"$subpkgdir/lib/firmware/qcom/sm7225/fairphone4/ipa_fws.mbn"
"$subpkgdir/usr/lib/firmware/qcom/sm7225/fairphone4/ipa_fws.mbn"
}
modem() {
pkgdesc="Fairphone 4 modem firmware"
install -Dm644 "$builddir"/modem.mbn -t \
"$subpkgdir/lib/firmware/qcom/sm7225/fairphone4/"
"$subpkgdir/usr/lib/firmware/qcom/sm7225/fairphone4/"
install -Dm644 "$builddir"/modem*.jsn -t \
"$subpkgdir/lib/firmware/qcom/sm7225/fairphone4/"
"$subpkgdir/usr/lib/firmware/qcom/sm7225/fairphone4/"
cp -r "$builddir"/modem_pr/ \
"$subpkgdir/lib/firmware/qcom/sm7225/fairphone4/"
find "$subpkgdir/lib/firmware/qcom/sm7225/fairphone4/" \
"$subpkgdir/usr/lib/firmware/qcom/sm7225/fairphone4/"
find "$subpkgdir/usr/lib/firmware/qcom/sm7225/fairphone4/" \
-type f -exec chmod 0644 {} \;
}
@@ -125,14 +125,14 @@ venus() {
pkgdesc="Fairphone 4 venus firmware"
install -Dm644 "$builddir"/venus.mbn -t \
"$subpkgdir/lib/firmware/qcom/sm7225/fairphone4/"
"$subpkgdir/usr/lib/firmware/qcom/sm7225/fairphone4/"
}
wlan() {
pkgdesc="Fairphone 4 wlan firmware"
install -Dm644 "$builddir"/wlanmdsp.mbn -t \
"$subpkgdir/lib/firmware/qcom/sm7225/fairphone4/"
"$subpkgdir/usr/lib/firmware/qcom/sm7225/fairphone4/"
}
sha512sums="
+15 -15
View File
@@ -1,7 +1,7 @@
maintainer="Richard Acayan <mailingradian@gmail.com>"
pkgname=firmware-google-sargo
pkgver=220505.008
pkgrel=10
pkgrel=11
pkgdesc="Proprietary firmware blobs from the Google Pixel 3a factory image"
url="https://github.com/TheMuppets/proprietary_vendor_google_sargo"
arch="aarch64"
@@ -46,33 +46,33 @@ build() {
package() {
install -Dm644 "$builddir"/a615_zap.mbn.zst \
"$pkgdir"/lib/firmware/qcom/sdm670/sargo/a615_zap.mbn.zst
"$pkgdir"/usr/lib/firmware/qcom/sdm670/sargo/a615_zap.mbn.zst
install -Dm644 "$builddir"/ipa_fws.mbn.zst \
"$pkgdir"/lib/firmware/qcom/sdm670/sargo/ipa_fws.mbn.zst
"$pkgdir"/usr/lib/firmware/qcom/sdm670/sargo/ipa_fws.mbn.zst
install -Dm644 "$builddir"/proprietary/vendor/firmware/adsp.mbn.zst \
"$pkgdir"/lib/firmware/qcom/sdm670/sargo/adsp.mbn.zst
"$pkgdir"/usr/lib/firmware/qcom/sdm670/sargo/adsp.mbn.zst
install -Dm644 "$builddir"/proprietary/vendor/firmware/adspr.jsn \
"$pkgdir"/lib/firmware/qcom/sdm670/sargo/adspr.jsn
"$pkgdir"/usr/lib/firmware/qcom/sdm670/sargo/adspr.jsn
install -Dm644 "$builddir"/proprietary/vendor/firmware/adspua.jsn \
"$pkgdir"/lib/firmware/qcom/sdm670/sargo/adspua.jsn
"$pkgdir"/usr/lib/firmware/qcom/sdm670/sargo/adspua.jsn
install -Dm644 "$builddir"/proprietary/vendor/firmware/cdsp.mbn.zst \
"$pkgdir"/lib/firmware/qcom/sdm670/sargo/cdsp.mbn.zst
"$pkgdir"/usr/lib/firmware/qcom/sdm670/sargo/cdsp.mbn.zst
install -Dm644 "$builddir"/proprietary/vendor/firmware/cdspr.jsn \
"$pkgdir"/lib/firmware/qcom/sdm670/sargo/cdspr.jsn
"$pkgdir"/usr/lib/firmware/qcom/sdm670/sargo/cdspr.jsn
install -Dm644 "$builddir"/proprietary/vendor/firmware/modemuw.jsn \
"$pkgdir"/lib/firmware/qcom/sdm670/sargo/modemuw.jsn
"$pkgdir"/usr/lib/firmware/qcom/sdm670/sargo/modemuw.jsn
install -Dm644 "$builddir"/proprietary/vendor/firmware/venus.mbn.zst \
"$pkgdir"/lib/firmware/qcom/sdm670/sargo/venus.mbn.zst
"$pkgdir"/usr/lib/firmware/qcom/sdm670/sargo/venus.mbn.zst
install -Dm644 "$builddir"/proprietary/vendor/firmware/wlanmdsp.mbn.zst \
"$pkgdir"/lib/firmware/qcom/sdm670/sargo/wlanmdsp.mbn.zst
"$pkgdir"/usr/lib/firmware/qcom/sdm670/sargo/wlanmdsp.mbn.zst
install -Dm644 "$_modemfw_dir"/modemfw/mba.mbn.zst \
"$pkgdir"/lib/firmware/qcom/sdm670/sargo/mba.mbn.zst
"$pkgdir"/usr/lib/firmware/qcom/sdm670/sargo/mba.mbn.zst
install -Dm644 "$_modemfw_dir"/modemfw/modem.mbn.zst \
"$pkgdir"/lib/firmware/qcom/sdm670/sargo/modem.mbn.zst
"$pkgdir"/usr/lib/firmware/qcom/sdm670/sargo/modem.mbn.zst
install -Dm644 "$_modemfw_dir"/modemfw/modemr.jsn \
"$pkgdir"/lib/firmware/qcom/sdm670/sargo/modemr.jsn
"$pkgdir"/usr/lib/firmware/qcom/sdm670/sargo/modemr.jsn
mkdir -p "$pkgdir"/usr/share/qcom/sdm670/Google/sargo/sensors/
cp -r "$builddir"/sensors-registry \
@@ -81,7 +81,7 @@ package() {
ln -s sargo "$pkgdir"/usr/share/qcom/sdm670/Google/b4s4-sdm670
install -Dm644 "$srcdir"/Global_cal.acdb \
"$pkgdir"/lib/firmware/qcom/sdm670/sargo/Global_cal.acdb
"$pkgdir"/usr/lib/firmware/qcom/sdm670/sargo/Global_cal.acdb
}
hexagon_nn() {
@@ -1 +1 @@
/lib/firmware/qcom/sm7150/google/sunfish/a615_zap.mbn
/usr/lib/firmware/qcom/sm7150/google/sunfish/a615_zap.mbn
@@ -1,8 +1,7 @@
maintainer="Aelin <aelin@postmarketos.org>"
pkgname=firmware-google-sunfish
pkgver=1
pkgrel=1
pkgver=2
pkgrel=0
pkgdesc="Firmware for Google Pixel 4a"
url="https://github.com/sm7150-mainline/firmware-google-sunfish"
arch="aarch64"
@@ -16,6 +15,7 @@ source="
builddir="$srcdir/$pkgname-$_commit"
package() {
mv "$builddir"/lib "$builddir"/usr
find . -type f -exec install -Dm644 {} "$pkgdir"/{} \;
install -Dm644 "$srcdir/30-initramfs-$pkgname.files" -t \
@@ -24,5 +24,5 @@ package() {
sha512sums="
c94511f6e6d6aa6ebf3238e27b7092498f3d58be9893d05e874ce9551cffb1a3e38b994a822c4364c97da0f03925d4d554045234b1f78b59af63207a396ee713 firmware-google-sunfish-fe63598e1bd9884bd68ba89e4670dae4d70b1e3e.tar.gz
d07e3a34791608d432cb119507299dabedc5772ad34763c5494daf68f28892b3556ca6ca34994b5f32cc097cd6d1795db3b952db11e0522f6ef33a663761f289 30-initramfs-firmware-google-sunfish.files
bbcd1a4a46ceacf073e2b137469a4cb18ebb3ac20cd66e8ec758f5f271d095c9b651f5165a6fd9335922928e20fb922889fcabcbcccd2f2a8d4b673b17a0803a 30-initramfs-firmware-google-sunfish.files
"
@@ -2,8 +2,8 @@
# Co-Maintainer: WeirdTreeThing <bradyn127@protonmail.com>
maintainer="Alicja Michalska <ellyqw@mainlining.org>"
pkgname=firmware-google-trogdor
pkgver=1
pkgrel=1
pkgver=2
pkgrel=0
pkgdesc="Modem firmware for Google Trogdor chromebooks"
url="https://gitlab.com/jenneron/firmware-google-trogdor"
arch="aarch64"
@@ -17,7 +17,7 @@ builddir="$srcdir/$pkgname-$_commit"
package() {
_srcdir="qcom/sc7180-trogdor"
_installdir="$pkgdir/lib/firmware/postmarketos/$_srcdir"
_installdir="$pkgdir/usr/lib/firmware/postmarketos/$_srcdir"
install -Dm644 "$_srcdir"/modem/mba.mbn -t "$_installdir"/modem
install -Dm644 "$_srcdir"/modem/qdsp6sw.mbn -t "$_installdir"/modem
install -Dm644 "$_srcdir"/modem-nolte/mba.mbn -t "$_installdir"/modem-nolte
@@ -1,8 +1,8 @@
# Co-Maintainer: WeirdTreeThing <bradyn127@protonmail.com>
maintainer="Eric Anderson <ejona86@gmail.com>"
pkgname=firmware-google-veyron-brcm
pkgver=2
pkgrel=3
pkgver=3
pkgrel=0
pkgdesc="Broadcom firmware for Google Veyron Chromebooks"
url="https://github.com/jenneron/firmware-google-veyron-brcm"
arch="armv7"
@@ -12,7 +12,7 @@ options="!check !strip !archcheck !tracedeps pmb:cross-native"
_commit="77348d909a14e81ad6548f9dd3539bfc8c32ffc9"
source="$pkgname-$_commit.tar.gz::$url/archive/$_commit.tar.gz"
_fwdir="/lib/firmware/postmarketos"
_fwdir="/usr/lib/firmware/postmarketos"
package() {
mkdir -p "$pkgdir"
@@ -1 +1 @@
/lib/firmware/qcom/sdm845/oneplus6/adsp.mbn
/usr/lib/firmware/qcom/sdm845/oneplus6/adsp.mbn
@@ -1,8 +1,7 @@
maintainer="Casey Connolly <kcxt@postmarketos.org>"
pkgname=firmware-oneplus-sdm845
pkgver=10
pkgrel=3
pkgver=11
pkgrel=0
pkgdesc="Firmware for OnePlus 6 / 6T"
url="https://gitlab.com/sdm845-mainline/firmware-oneplus-sdm845"
arch="aarch64"
@@ -26,7 +25,7 @@ subpackages="
package() {
while IFS="" read -r _i || [ -n "$_i" ]; do
install -Dm644 "$srcdir/$pkgname-$_version/$_i" "$pkgdir/$_i"
install -Dm644 "$srcdir/$pkgname-$_version/$_i" "$pkgdir/usr/$_i"
done < "$srcdir/firmware.files"
}
@@ -58,6 +57,6 @@ sha512sums="
68ecc3cec0458e5c7a0c6e2d1b0da72df324b48e1283e6e0ebc3c1713e8b721386e2554edf48fd559a8b8a40b54f3d4046ba2e484342ff4d5c69baf0839a800e firmware-oneplus-sdm845-176ca713448c5237a983fb1f158cf3a5c251d775.tar.gz
23e4ea891f688bf5669e4b8479aab06b56c5478429b759c22fa417e1ad09cb413e55856140b456c6b676b8920ecec40aa0215d8fd61a23ac2c5c02240552f247 firmware.files
09e06851f8cd936aea191e839abca0a37a66444470df446eaaf24cee275a66611400286907565175d4d74627f6232bf2eed88b1d1906ce6416689a5c67e1c980 sensor.files
d6a81ab4697e763eebf2b428e8a63dbdd0a44743691d9277e9d3c7de26dbcbddaea1928a6cfa5509f8f41506d8812022f200ec47f87d28e05af77302683ffcf4 30-oneplus-sdm845-firmware-ci.files
449d967187767ac0027fcaf46e3dd0668118e721f4c388f22287ce0cec95f74e641551e0b16cc9ce1824090436318c3ec167ce197f30334e4a81551e314b6cc7 30-oneplus-sdm845-firmware-ci.files
3f5b04afd8ccd08e676cee2d290c08c3b5e0f0c0b85ddf6e94f86730615ea174a2cc57452dc8455f68675fc173bf0fb79c0505819c3e0203ad5a7acb5ebf4b10 0001-oneplus6-set-mount-matrix.patch
"
@@ -1,7 +1,7 @@
maintainer="Arnav Singh <me@arnavion.dev>"
pkgname=firmware-pine64-ov5640
pkgver=0_git20201028
pkgrel=3
pkgver=1_git20201028
pkgrel=0
_commit="61beaa4eb1ad87ad067cfbe123fbcd0a0cf01246"
pkgdesc="Firmware for the ov5640 autofocus"
url="https://github.com/pmsourcedump/ov5640"
@@ -12,13 +12,13 @@ source="$pkgname-$_commit.bin::https://github.com/pmsourcedump/ov5640/blob/$_com
makedepends="zstd"
package() {
install -d "$pkgdir/lib/firmware/postmarketos"
install -d "$pkgdir/usr/lib/firmware/postmarketos"
# "--force" is needed because the input is a symlink to the downloaded file under /var/cache/distfiles/,
# and zstd ignores symlinks unless "--force" is specified.
zstd --compress -19 --force "$srcdir/$pkgname-$_commit.bin" -o "$pkgdir/lib/firmware/postmarketos/ov5640_af.bin.zst"
zstd --compress -19 --force "$srcdir/$pkgname-$_commit.bin" -o "$pkgdir/usr/lib/firmware/postmarketos/ov5640_af.bin.zst"
chmod 0644 "$pkgdir/lib/firmware/postmarketos/ov5640_af.bin.zst"
chmod 0644 "$pkgdir/usr/lib/firmware/postmarketos/ov5640_af.bin.zst"
}
sha512sums="4e0c050f483e2e6c4584874a70e90748f8adfb612c8eef38b877d69d8085dbe29f3ae36bb9c299dc5a3986223d82bd51d4eefcaa9709bcfbca5a249098cfb0f0 firmware-pine64-ov5640-61beaa4eb1ad87ad067cfbe123fbcd0a0cf01246.bin"
@@ -1,8 +1,8 @@
# Co-Maintainer: Bart Ribbers <bribbers@disroot.org>
maintainer="@exkc <exkc@exkc.moe>"
pkgname=firmware-pine64-rockpro64
pkgver=1
pkgrel=1
pkgver=2
pkgrel=0
_commit="4b370cd415a2dd7b0ecdbe8bbf1d86fb35ce6985"
pkgdesc="Firmware for the RockPro64 (pine64-rockpro64)"
url="https://github.com/LibreELEC/brcmfmac_sdio-firmware"
@@ -20,7 +20,7 @@ package() {
mv brcmfmac4359-sdio.txt brcmfmac4359-sdio.pine64,rockpro64-v2.1.txt
for file in BCM4359C0.hcd brcmfmac4359-sdio.*; do
install -Dm 0644 "$file" -t "$pkgdir"/lib/firmware/postmarketos/brcm
install -Dm 0644 "$file" -t "$pkgdir"/usr/lib/firmware/postmarketos/brcm
done
}
@@ -1,7 +1,7 @@
maintainer="Adam Thiede <me@adamthiede.com>"
pkgname=firmware-powervr-gx6250
pkgver=1.0.6503725
pkgrel=0
pkgrel=1
pkgdesc="Firmware for PowerVR GX6250"
url="https://gitlab.freedesktop.org/frankbinns/linux-firmware"
arch="aarch64"
@@ -14,7 +14,7 @@ source="$pkgname-$_commit.tar.gz::$url/-/archive/$_commit/linux-firmware-$_commi
builddir="$srcdir/linux-firmware-$_commit"
package() {
install -Dm644 powervr/* -t "$pkgdir"/lib/firmware/powervr
install -Dm644 powervr/* -t "$pkgdir"/usr/lib/firmware/powervr
}
sha512sums="
@@ -1,7 +1,7 @@
maintainer="Marijn Suijten <marijn.suijten@somainline.org>"
pkgname=firmware-qcom-adreno
pkgver=20260110
pkgrel=0
pkgrel=1
pkgdesc="Qualcomm Adreno GPU firmware from linux-firmware"
url="https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/"
arch="aarch64 armv7"
@@ -20,7 +20,7 @@ builddir="$srcdir/linux-firmware-$pkgver"
# This package is a replacement for linux-firmware-qcom (packaging all GPU firmware
# in separate subpackages), so it's packaged in /qcom, not /postmarketos.
replaces="linux-firmware-qcom"
_fwdir="/lib/firmware/qcom"
_fwdir="/usr/lib/firmware/qcom"
_gpus="a300 a330 a420 a530 a650 a660 gen70500"
for gpu in $_gpus; do
@@ -1,8 +1,8 @@
# Co-Maintainer: Victor Pavlov (vipaoL) <vipaolmail@gmail.com>
maintainer="Barnabas Czeman <barnabas.czeman@postmarketos.org>"
pkgname=firmware-qcom-msm8953
pkgver=3
pkgrel=1
pkgver=4
pkgrel=0
pkgdesc="Firmware files for Qualcomm MSM8953 devices"
url="https://postmarketos.org"
arch="aarch64"
@@ -47,7 +47,7 @@ source="
firmware-xiaomi-ysl-$_xiaomi_ysl_commit.tar.gz::https://gitlab.com/barni2000/firmware-xiaomi-ysl/-/archive/$_xiaomi_ysl_commit/firmware-xiaomi-ysl-$_xiaomi_ysl_commit.tar.gz
"
_basefwdir="/lib/firmware"
_basefwdir="/usr/lib/firmware"
_fwdir="$_basefwdir/qcom/msm8953"
package() {
@@ -1,2 +1,2 @@
/lib/firmware/qcom/a630_gmu.bin
/lib/firmware/qcom/a630_sqe.fw
/usr/lib/firmware/qcom/a630_gmu.bin
/usr/lib/firmware/qcom/a630_sqe.fw
@@ -1,8 +1,7 @@
maintainer="Aelin <aelin@postmarketos.org>"
pkgname=firmware-qcom-sm7150
pkgver=1
pkgrel=2
pkgver=2
pkgrel=0
url="https://github.com/sm7150-mainline"
pkgdesc="Firmware for Qualcomm SM7150 devices"
arch="aarch64"
@@ -59,17 +58,17 @@ package() {
install -Dm644 \
"$srcdir"/"$pkgname-ath10k-$_ath10k_fw_commit"/*.bin.zst \
-t "$pkgdir"/lib/firmware/ath10k/WCN3990/hw1.0
-t "$pkgdir"/usr/lib/firmware/ath10k/WCN3990/hw1.0
}
ath10k() {
pkgdesc="WiFi firmware for Qualcomm SM7150 devices"
replaces="linux-firmware-ath10k"
amove lib/firmware/ath10k/WCN3990/hw1.0/*
amove usr/lib/firmware/ath10k/WCN3990/hw1.0/*
}
sha512sums="
ee2efa2a26a45abb86247068877f2e977126357e8048ca41e98554917d393bff23e000de6e831a1b435e3304c31e237192f5d9d772c08e59cb29ace37296af74 30-initramfs-firmware-qcom-sm7150.files
913ee0ccde7f9fc2745a25aedf38ad19f5b5ed5fcf0dcb570c6ee1e651247ef67ac9322031e2b5fa234d04f12e7392dca03d9aea674db75537fa76a7fef5d842 30-initramfs-firmware-qcom-sm7150.files
0e548ef14ec0bb1af9c62e25b3b0a98732b46a081d506cc1f0d52145b288b59b88317816c50521364d0f44431a2b5fd814200313095291d981eca80adec9d094 firmware-qcom-sm7150-ath10k-792c716c85c06861c4d17bce5ec21fba7f0f7de6.tar.gz
"
@@ -1,7 +1,7 @@
maintainer="Mithil Bavishi <bavishimithil@gmail.com>"
pkgname=firmware-samsung-espresso
pkgver=1
pkgrel=1
pkgver=2
pkgrel=0
pkgdesc="Samsung Galaxy Tab Firmware"
url="https://github.com/TheMuppets/proprietary_vendor_samsung"
arch="armv7"
@@ -21,11 +21,11 @@ done
package() {
install -Dm644 "$srcdir/nvram_net.txt" \
"$pkgdir"/lib/firmware/postmarketos/brcm/"brcmfmac4330-sdio.samsung,espresso7.txt"
"$pkgdir"/usr/lib/firmware/postmarketos/brcm/"brcmfmac4330-sdio.samsung,espresso7.txt"
install -Dm644 "$srcdir/nvram_net.txt" \
"$pkgdir"/lib/firmware/postmarketos/brcm/"brcmfmac4330-sdio.samsung,espresso10.txt"
"$pkgdir"/usr/lib/firmware/postmarketos/brcm/"brcmfmac4330-sdio.samsung,espresso10.txt"
install -Dm644 "$srcdir/bcmdhd_sta.bin" \
"$pkgdir"/lib/firmware/postmarketos/brcm/"brcmfmac4330-sdio.bin"
"$pkgdir"/usr/lib/firmware/postmarketos/brcm/"brcmfmac4330-sdio.bin"
}
sha512sums="
bd2729c2cbc3c52e1abc5c6e0f4ba32b3b77711bc73c76aece591f8de642da69f0edb8620e422e102e0eaced8c9d76870ac63dfc7113e318ad8aa2633a32b10f bcmdhd_sta.bin
@@ -1,8 +1,8 @@
# Co-Maintainer: Lukas Timmermann <lukas@timmermann.space>
maintainer="Alexandre Marquet <tb@a-marquet.fr>"
pkgname=firmware-samsung-manta
pkgver=3
pkgrel=1
pkgver=4
pkgrel=0
pkgdesc="Firmware for Samsung Manta (Nexus 10)"
url="https://developers.google.com/android/drivers#mantalmy49j"
arch="armv7"
@@ -22,19 +22,19 @@ package() {
# Wifi
install -Dm644 "brcmfmac43241b0-sdio.samsung,nexus10-manta.txt" \
-t "$pkgdir/lib/firmware/postmarketos/brcm/"
-t "$pkgdir/usr/lib/firmware/postmarketos/brcm/"
# Bluetooth
install -Dm644 "BCM.samsung,nexus10-manta.hcd" \
-t "$pkgdir/lib/firmware/postmarketos/brcm/"
-t "$pkgdir/usr/lib/firmware/postmarketos/brcm/"
# Touchscreen
install -Dm644 "maxtouch.fw" \
-t "$pkgdir/lib/firmware/postmarketos/"
-t "$pkgdir/usr/lib/firmware/postmarketos/"
# Audience eS305
install -Dm644 "es305_fw.bin" \
-t "$pkgdir/lib/firmware/postmarketos/"
-t "$pkgdir/usr/lib/firmware/postmarketos/"
}
sha512sums="
@@ -1,7 +1,7 @@
maintainer="Stefan Hansson <newbyte@postmarketos.org>"
pkgname=firmware-samsung-midas
pkgver=8
pkgrel=2
pkgver=9
pkgrel=0
pkgdesc="Samsung Galaxy Midas board firmware (m0, m3, t0lte, ...)"
_commit="fdd8c44568a148c22fbf008de822ff4e27992da1"
url="https://github.com/TheMuppets/proprietary_vendor_samsung"
@@ -45,7 +45,7 @@ bluetooth() {
replaces="firmware-samsung-m0-mainline"
install -Dm644 "$srcdir"/bcm4334.hcd-$_commit \
"$subpkgdir"/lib/firmware/postmarketos/brcm/BCM4334B0.hcd
"$subpkgdir"/usr/lib/firmware/postmarketos/brcm/BCM4334B0.hcd
}
wifi() {
@@ -53,20 +53,20 @@ wifi() {
replaces="firmware-samsung-m0-mainline"
install -Dm644 "$srcdir"/brcmfmac4334-sdio.bin?id=dc9576448222cc1922462d58796ab1c62b523ada \
"$subpkgdir"/lib/firmware/postmarketos/brcm/brcmfmac4334-sdio.bin
"$subpkgdir"/usr/lib/firmware/postmarketos/brcm/brcmfmac4334-sdio.bin
install -Dm644 "$srcdir"/brcmfmac4334-sdio.samsung,i9300-$_armbian_commit.txt \
"$subpkgdir"/lib/firmware/postmarketos/brcm/brcmfmac4334-sdio.samsung,i9300.txt
"$subpkgdir"/usr/lib/firmware/postmarketos/brcm/brcmfmac4334-sdio.samsung,i9300.txt
install -Dm644 "$srcdir"/brcmfmac4334-sdio.samsung,i9305-$_androguide_commit.txt \
"$subpkgdir"/lib/firmware/postmarketos/brcm/brcmfmac4334-sdio.samsung,i9305.txt
ln -s /lib/firmware/postmarketos/brcm/brcmfmac4334-sdio.samsung,i9305.txt \
"$subpkgdir"/lib/firmware/postmarketos/brcm/brcmfmac4334-sdio.samsung,n7100.txt
ln -s /lib/firmware/postmarketos/brcm/brcmfmac4334-sdio.samsung,i9305.txt \
"$subpkgdir"/lib/firmware/postmarketos/brcm/brcmfmac4334-sdio.samsung,n7105.txt
ln -s /lib/firmware/postmarketos/brcm/brcmfmac4334-sdio.samsung,i9300.txt \
"$subpkgdir"/lib/firmware/postmarketos/brcm/brcmfmac4334-sdio.samsung,n8010.txt
ln -s /lib/firmware/postmarketos/brcm/brcmfmac4334-sdio.samsung,i9300.txt \
"$subpkgdir"/lib/firmware/postmarketos/brcm/brcmfmac4334-sdio.samsung,n5110.txt
"$subpkgdir"/usr/lib/firmware/postmarketos/brcm/brcmfmac4334-sdio.samsung,i9305.txt
ln -s /usr/lib/firmware/postmarketos/brcm/brcmfmac4334-sdio.samsung,i9305.txt \
"$subpkgdir"/usr/lib/firmware/postmarketos/brcm/brcmfmac4334-sdio.samsung,n7100.txt
ln -s /usr/lib/firmware/postmarketos/brcm/brcmfmac4334-sdio.samsung,i9305.txt \
"$subpkgdir"/usr/lib/firmware/postmarketos/brcm/brcmfmac4334-sdio.samsung,n7105.txt
ln -s /usr/lib/firmware/postmarketos/brcm/brcmfmac4334-sdio.samsung,i9300.txt \
"$subpkgdir"/usr/lib/firmware/postmarketos/brcm/brcmfmac4334-sdio.samsung,n8010.txt
ln -s /usr/lib/firmware/postmarketos/brcm/brcmfmac4334-sdio.samsung,i9300.txt \
"$subpkgdir"/usr/lib/firmware/postmarketos/brcm/brcmfmac4334-sdio.samsung,n5110.txt
}
sha512sums="
@@ -1 +1 @@
/lib/firmware/qcom/sdm845/axolotl/adsp.mbn
/usr/lib/firmware/qcom/sdm845/axolotl/adsp.mbn
@@ -1,8 +1,7 @@
maintainer="Alexander Martinz <amartinz@shiftphones.com>"
pkgname=firmware-shift-sdm845
pkgver=20240517
pkgrel=1
pkgrel=2
pkgdesc="Firmware for SHIFT sdm845 devices"
url="https://gitlab.com/sdm845-mainline/firmware-shift-sdm845"
arch="aarch64"
@@ -29,12 +28,12 @@ subpackages="
package() {
while IFS="" read -r _i || [ -n "$_i" ]; do
[ ! -d $(dirname $_i) ] && mkdir -p $(dirname $_i)
install -Dm644 "$srcdir/$pkgname-$_version/$_i" "$pkgdir/$_i"
install -Dm644 "$srcdir/$pkgname-$_version/$_i" "$pkgdir/usr/$_i"
done < "$srcdir/firmware.files"
# Install symlinks for using upstream firmware
ln -s ../mba.mbn.zst "$pkgdir"/lib/firmware/qcom/sdm845/axolotl/mba.mbn.zst
ln -s ../../../ath10k/WCN3990/hw1.0/wlanmdsp.mbn.zst "$pkgdir"/lib/firmware/qcom/sdm845/axolotl/wlanmdsp.mbn.zst
ln -s ../mba.mbn.zst "$pkgdir"/usr/lib/firmware/qcom/sdm845/axolotl/mba.mbn.zst
ln -s ../../../ath10k/WCN3990/hw1.0/wlanmdsp.mbn.zst "$pkgdir"/usr/lib/firmware/qcom/sdm845/axolotl/wlanmdsp.mbn.zst
}
pmtest() {
@@ -62,5 +61,5 @@ sha512sums="
19d0f5debd851f6c5f2b460b72ee714265d48e5e12051cbde321dc97ebe235897ba377e67fc34cd6234611b12bdf20da6696f60621b855d9a9b912260d0f440e firmware-shift-sdm845.tar.gz
842f4e182da48cff45a41dcdb0cfe0a8fce1e1883a95177fe176a59797ade722a5b444eae1e572c7b2a9d5c8c0e4511ca2d561a3fc22cf79e853d3ccc9f676b6 firmware.files
ef495c515cb16c7d6aebaf1c6a23883768228282ea39118b6a19bed12a41e4777bf67b2436fc553b204a1a02672df54b9bc33f2c3946b7e688e78cd87c51448e sensors.files
97756b554cc0f91a69f511496663a012287517ec5853167246fe59c4deeb1cbf1eb352ec267bd0ad897e3f30547d2ad2818e70b597d9dfec26db45efca85b3f2 30-shift-sdm845-firmware-ci.files
81c941f0737f0da5e799910dfa7ed31afc7e131812bd418e788b15ce2a89e8be233bdf9a84a46d2b6a48c388c2483dd395214b6b995e407e4badbe5c13439454 30-shift-sdm845-firmware-ci.files
"
Loaded 100 of 426 files, more files were not shown because too many files have changed in this diff. Show more