Compare commits

...
Author SHA1 Message Date
Oliver Smith 27c999827f device-qemu-amd64: add none kernel subpackage (MR 4148)
Add a dummy subpackage that does not install any kernel. This is useful
for testing 'pmbootstrap install' code quickly without actually
downloading and installing a kernel package.
2023-06-06 10:56:30 +02:00
Sicelo A. Mhlongo 80ab66cd2a device-nokia-n900: improve user experience on i3 (MR 4157)
- fix wifi signal quality display, since /proc/net/wireless is no longer
  available in omap kernel
  Suggested-by: DvaMishkiLapa <thesame.personal@gmail.com>

- add `polkit-elogind` so tools like `loginctl poweroff` and `nmtui` do not
  require sudo under i3wm

[ci:skip-build]: already built successfully in CI
2023-06-05 23:50:57 +02:00
Oliver Smith a1b9f90871 modem/msm-modem: increase timeout to 4 (MR 4153)
For a lot of people having the 1 second timeout results in not finding
the sim at all. Let's rather wait up to 4 seconds for the sim to appear,
it was reported that 3 is enough in a report where 1 wasn't.

Related: issue 2072
[ci:skip-build]: already built successfully in CI
2023-06-05 21:06:02 +02:00
Bart Ribbers bd1ee83338 soc-qcom-sdm845: fix post upgrade (MR 4154)
The call_audio_idle_suspend_workaround init service was moved to the
-pulseaudio subpackage, but the -modem subpackage still had a
.post-upgrade referring to it. This moves that to the (recently) new
-pulseaudio package

[ci:skip-build]: already built successfully in CI
2023-06-05 15:27:00 +02:00
Jane Rachinger 5433eecb11 device-pine64-pinebookpro: resize on initial boot (MR 4149)
[ci:skip-build]: already built successfully in CI
2023-06-05 15:12:23 +02:00
Bart Ribbers b982708186 soc-qcom-sdm845: apply workaround for working audio on PipeWire (MR 4139)
Out of the box audio is really quiet and distorted on SDM845 devices when
using PipeWire. This can be worked around by forcing audio to 16 bits
(which PulseAudio uses by default and thus works). This seems to be a
kernel problem and should be fixed properly there but for now we can
apply this workaround to at least be able to switch to PipeWire anytime
soon. The actual workaround is applied by Wireplumber so the dependency
for the subpackage is set to that.

Upstream issue https://gitlab.freedesktop.org/pipewire/pipewire/-/issues/3193
[ci:skip-build]: already built successfully in CI
2023-06-05 14:45:38 +02:00
Newbyte e27bc8a84e linux-purism-librem5: upgrade to 6.3.4pureos1 (MR 4137)
[ci:skip-build]: Already built successfully in CI
2023-06-04 10:21:43 +02:00
Newbyte cb0e167a3c main/postmarketos-mkinitfs-hook-netboot: use source_deviceinfo from devicepkg-utils (MR 4129)
[ci:ignore-count]
2023-06-03 17:44:26 +02:00
Newbyte 0c043b055d main/postmarketos-mkinitfs-hook-debug-shell: use source_deviceinfo from devicepkg-utils (MR 4129) 2023-06-03 17:44:25 +02:00
Newbyte c025160029 main/postmarketos-mkinitfs-hook-console-shell: use source_deviceinfo from devicepkg-utils (MR 4129) 2023-06-03 17:44:25 +02:00
Newbyte a002330b81 planet-geminipda: use source_deviceinfo from devicepkg-utils (MR 4129) 2023-06-03 17:44:25 +02:00
Newbyte 614ac1835d motorola-maserati: use source_deviceinfo from devicepkg-utils (MR 4129) 2023-06-03 17:44:25 +02:00
Newbyte bc6800b368 main/osk-sdl: use source_deviceinfo from devicepkg-utils (MR 4129) 2023-06-03 17:44:25 +02:00
Newbyte ea7522f44e main/postmarketos-base: use source_deviceinfo (MR 4129) 2023-06-03 17:44:25 +02:00
Newbyte 0665493f14 main/postmarketos-bootsplash: use source_deviceinfo (MR 4129) 2023-06-03 17:44:25 +02:00
Newbyte 35129cb2c7 main/postmarketos-update-depthcharge-kernel: use source_deviceinfo (MR 4129) 2023-06-03 17:44:25 +02:00
Newbyte 14bc7fe038 main/postmarketos-update-kernel: use source_deviceinfo (MR 4129) 2023-06-03 17:44:25 +02:00
Newbyte 881dbc6a22 main/postmarketos-initramfs: use source_deviceinfo from devicepkg-utils (MR 4129)
See https://gitlab.com/postmarketOS/pmaports/-/issues/2086
2023-06-03 17:44:24 +02:00
Newbyte 96a21ace3f CI: check for direct sourcing of deviceinfo (MR 4129)
See https://gitlab.com/postmarketOS/pmaports/-/issues/2086
2023-06-03 17:44:24 +02:00
Newbyte d7e56cc7c0 main/devicepkg-utils: new aport (MR 4129) 2023-06-03 17:44:24 +02:00
Newbyte be819d7474 main/devicepkg-dev: set to noarch (MR 4140)
No reason for this to be arch-specific.
2023-06-03 15:04:45 +02:00
Oliver Smith 00e4c6d1b2 linux-google-sargo: remove (MR 4146)
It doesn't build currently (issue 2146) and also it's not used by any
device package currently (with other ports we support selecting between
mainline and downstream kernel in some cases, but not here).

If it's useful, the build can be fixed and it can be added back in a
future patch.
2023-06-03 14:25:47 +02:00
Newbyte f757d06824 device-oneplus-lemonade: use mkdtboimg from android-tools (MR 4145)
[ci:skip-build]: Built successfully locally and would take too long for
the CI to finish.
2023-06-03 06:35:10 +03:00
Newbyte 690f9bf67d firmware-google-crosshatch-mainline-dtbo: use mkdtboimg from android-tools (MR 4145) 2023-06-03 06:35:06 +03:00
Newbyte d4d18a0b81 linux-google-sargo: use mkdtboimg from android-tools (MR 4145) 2023-06-03 06:35:03 +03:00
Newbyte 8bbc90f097 linux-oneplus-instantnoodlep: use mkdtboimg from android-tools (MR 4145)
... and work around https://gitlab.com/postmarketOS/pmaports/-/issues/1990
2023-06-03 06:35:00 +03:00
Newbyte 56c96a30e9 linux-oneplus-kebab: use mkdtboimg from android-tools (MR 4145)
... and work around https://gitlab.com/postmarketOS/pmaports/-/issues/1990
2023-06-03 06:34:57 +03:00
Newbyte f5fc3217f0 linux-postmarketos-mediatek-mt6763: use mkdtboimg from android-tools (MR 4145)
... and work around https://gitlab.com/postmarketOS/pmaports/-/issues/1990
2023-06-03 06:34:54 +03:00
Newbyte c4886f93c7 linux-postmarketos-mediatek-mt6768: use mkdtboimg from android-tools (MR 4145)
... and work around https://gitlab.com/postmarketOS/pmaports/-/issues/1990
2023-06-03 06:34:51 +03:00
Newbyte 9291b05b2c linux-xiaomi-cepheus-downstream: use mkdtboimg from android-tools (MR 4145)
... and also work around https://gitlab.com/postmarketOS/pmaports/-/issues/1990
2023-06-03 06:34:48 +03:00
Newbyte 945a74a9ce main/android-mkdtboimg: remove (MR 4145)
Closes https://gitlab.com/postmarketOS/pmaports/-/issues/1889
2023-06-03 06:34:41 +03:00
Newbyte 2a8a57b08e linux-postmarketos-stericsson: allocate 128 MB of CMA memory (MR 4144)
Closes https://gitlab.com/postmarketOS/pmaports/-/issues/1220

[ci:skip-build] Already build-tested on CI
2023-06-02 19:11:55 +02:00
Clayton Craft bbbc7b7b2d purism-librem5: revert ucm, other cleanup (MR 4138)
changes:

- don't try to set gnss-share socket in geoclue

- install Alsa UCM configs from purism

  Upstream ucm is broken when migrating from the purism ucm, so let's
  just use ucm from purism until someone upstreams something that works.
  What I upstreamed was based on an older ucm from Purism, what they are
  shipping is more correct than upstream ucm...

  This reverts commit 70b7813fee.

  fixes #2134

[ci:skip-build] already built successfully in CI
2023-06-02 08:08:14 -07:00
Newbyte 5a2178cb5a linux-postmarketos-stericsson: upgrade to 6.3.5 (MR 4134)
* remove vendor kernel reference
* remove verbose build option
* add mmc busydetect fix patchset

[ci:skip-build] Already build-tested on CI
2023-06-02 12:33:12 +03:00
Denis 6ab29d06fd xiaomi-pine: update checksum of deviceinfo (MR 4114)
[ci:skip-build]: already built successfully in CI
2023-06-01 14:19:49 +02:00
Denis 0806c84144 xiaomi-pine: fix error in device (MR 4114) 2023-06-01 14:19:31 +02:00
Denis da05e2a230 xiaomi-pine: new device (MR 4114) 2023-06-01 14:19:31 +02:00
Pablo Correa Gómez 66625efa43 temp/gnome-shell-mobile: update mutter_api_version (MR 4119)
See previous commit for rationale

[ci:skip-build] already built successfully in CI
2023-05-31 16:57:21 -07:00
Pablo Correa Gómez 997243f6f7 temp/mutter-mobile: force update of libmutter_api_version (MR 4119)
The forked version includes some new API, but the maintainer wants to
have things as-close-as-possible to upstream. Since APK mostly keeps track
of libraries versions, having the same API version as upstream (there's no
stable ABI for mutter), makes it possible for APK to confuse with non-mobile
mutter. By having an unrealistic API version, we make sure this does not happen
to us.

Fixes #2127
2023-05-31 16:57:21 -07:00
NewbyteandOliver Smith bc0ff89fdc purism-librem5: fix ship mode on Linux 6.3 and higher (MR 4128)
Taken from https://source.puri.sm/Librem5/librem5-base/-/merge_requests/353

Closes https://gitlab.com/postmarketOS/pmaports/-/issues/2130

Co-authored-by: Oliver Smith <ollieparanoid@postmarketos.org>

[ci:skip-build] already built successfully in CI
2023-05-31 13:58:34 -07:00
Luca Weiss b2e5ad1670 main/postmarketos-base-ui: add supervisor to bluetooth service (MR 4136)
Due to an issue, probably in bluez, the bluetooth service often fails to
start on boot. Restarting the service later make bluez start correctly.

While adding the service supervisor for just this issue isn't a great
solution, in any case having a supervisor on such an important system
service is good, and it fixes this issue also by restarting the
bluetooth service after the first failure on boot.

  May 30 08:05:56 fairphone-fp4 daemon.info bluetoothd[1420]: Bluetooth daemon 5.66
  May 30 08:05:56 fairphone-fp4 daemon.err bluetoothd[1420]: src/main.c:main() Unable to get on D-Bus

Also while we're editing the list of subpackages make sure they're
ordered alphabetically.
[ci:skip-build]: already built successfully in CI
2023-05-31 08:05:38 +02:00
armel.guido 403c33eda6 linux-sony-eagle: update prima codeaurora source (MR 4109)
[ci:skip-build]: already built successfully in CI
2023-05-30 22:06:19 +02:00
Hugo Osvaldo Barrera f0b8dceae5 firmware-pine64-pinebookpro: remove (MR 4112)
This has been replaced by linux-firmware-brcm and
linux-firmware-rockchip.

[ci:skip-build]: already built successfully in CI
2023-05-30 22:02:52 +02:00
Hugo Osvaldo Barrera 68d7792bb9 pine64-*: update references to firmware-pine64-pinebookpro (MR 4112) 2023-05-30 22:02:51 +02:00
Hugo Osvaldo Barrera 1edbf01dcb pine64-pinebookpro: use linux-firmware packages (MR 4112)
The `firmware-pine64-pinebookpro` predates the firmware for this device
being available upstream. It is now packaged in two separate packages:
linux-firmware-brcm and linux-firmware-rockchip.

Install those two linux-firmware packages and drop the custom one. This
drop a custom firmware package and also ensure that firmware is kept up to
date with the rest of linux-firmware-*.

The resulting installation includes all the previously included firmware
files and I've confirmed that both sound and wifi work fine (dmesg
indicates bluetooth is available too).
2023-05-30 22:02:51 +02:00
Newbyte 734d4d1572 linux-purism-librem5: upgrade to 6.3.3pureos1 (MR 4126)
[ci:skip-build]: Already built successfully in CI.
2023-05-30 18:34:25 +02:00
Newbyte ca976d487c CI: CI runs for three hours, not one hour (MR 4135)
In 11682fb0ab, the timeout was set to 10
hours. This means that the CI no longer just runs for one hour. However,
we are still limited by GitLab's runners which only give us three hours
of CI time per job, so given the status quo, this is the most likely
duration for someone who hasn't set up their own CI runners.
2023-05-30 09:12:52 +02:00
Clayton Craft df8b0a6665 main/boot-deploy: upgrade to 0.8.2 (MR 4130)
Changelog: https://gitlab.com/postmarketOS/boot-deploy/-/tags/0.8.2

[ci:skip-build]: already built successfully in CI
2023-05-29 11:33:53 -07:00
Clayton Craft 928fa5b9c5 linux-postmarketos-amlogic: upgrade to 6.3.3 (MR 4071)
This also enables a few other things for Amlogic SBCs, including some
kernel config that enables video decoding support, however userspace
still doesn't support it (e.g. requires patched ffmpeg)

[ci:skip-build] already built successfully in CI
2023-05-29 11:27:46 -07:00
Newbyte 7a9d86bc25 cross/gcc-*: upgrade to 13.1.1_git20230527-r1 2023-05-29 18:48:58 +02:00
Ishaaq 5e0a9edcae samsung-starlte: New device (MR 4123)
[ci:skip-build]: already built successfully in CI
2023-05-29 13:16:00 +02:00
Oliver Smith 0ccd191d21 main/mobile-config-firefox: upgrade to 4.0.2 (MR 4125)
[ci:skip-build]: already built successfully in CI
2023-05-29 13:06:50 +02:00
Newbyte b8023b44e1 cross/gcc-*: upgrade to 13.1.1_git20230527-r0 2023-05-29 11:42:50 +02:00
Clayton Craft 3fff515886 purism-librem5: don't install custom geoclue service file (MR 4120)
Geoclue now supports reading from this path:

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

fixes https://gitlab.com/postmarketOS/pmaports/-/issues/2024

[ci:skip-build]: Already built successfully in CI.
2023-05-29 11:37:39 +02:00
Caleb Connolly 9ba1d82f6e community/linux-postmarketos-qcom-sdm845: upgrade to 6.3.4 (MR 4122)
[ci:skip-build]: already built successfully in CI
2023-05-29 02:37:12 +02:00
Oliver Smith d195f254a2 gitlab issue template: add v23.06 2023-05-29 01:49:33 +02:00
Oliver Smith 6dc3335119 pine64-pinetab: move from community to testing (MR 4116)
[ci:skip-vercheck]
Related: issue 1727
2023-05-28 23:22:05 +02:00
Oliver Smith 559454de25 cross/busybox-static-*: upgrade to 1.36.1 2023-05-28 23:10:21 +02:00
Oliver Smith f427ccd09d cross/binutils-*: upgrade to 2.40-r11 2023-05-28 23:10:15 +02:00
Mighty eeb6fb22eb linux-postmarketos-omap: upgrade to 6.3.4 (MR 4124)
[ci:skip-build]: already built successfully in CI
2023-05-27 21:44:54 +05:30
M0Rf30 a2e7dc074a linux-postmarketos-qcom-msm8953: add motorola-ocean max panel brightness level (MR 4121)
[ci:skip-build] Already build-tested on CI
2023-05-27 06:39:57 +03:00
Hugo Osvaldo Barrera d595967928 pine64-pinebookpro: remove reload of udev rules (MR 4113)
This package no longer ships any udev rules, so this is no longer
necessary.

[ci:skip-build]: already built successfully in CI
2023-05-25 09:02:05 +02:00
Hugo Osvaldo Barrera 4e056b2242 pine64-pinebookpro: drop unnecessary udev rule (MR 4113)
Previously, this extra rule was needed to grant regular users
permissions for the embedded display's backlight. It no longer seems to
be necessary; the presence of this rule is currently a no-op.

Someone else on IRC has tested removing the rule and also confirms this
new behaviour. I suspect this was fixed upstream in eudev.
2023-05-25 09:02:00 +02:00
Luca Weiss 1a50b3a49b main/dtbtool: switch to repository mirror (MR 4111)
Since codeaurora.org has been shut down and this project seemingly
hasn't been migrated to git.codelinaro.org, let's switch to a source
found on GitHub.
2023-05-24 17:19:05 +02:00
Luca Weiss 42d8a5abd5 device-fairphone-fp4: add Bluetooth firmware dependency (MR 4110)
[ci:skip-build] Already build tested on CI
2023-05-24 17:01:03 +03:00
Luca Weiss 8d81c77f05 firmware-fairphone-fp4: package Bluetooth firmware (MR 4110) 2023-05-24 17:00:55 +03:00
Luca Weiss 9813033c80 linux-postmarketos-qcom-sm6350: upgrade to 6.3.3 (MR 4110)
Enable Bluetooth-related options in defconfig since FP4 now has
Bluetooth support.
2023-05-24 17:00:52 +03:00
Oliver Smith a8f0c9268e cross/grub-efi-x86: upgrade to 2.06-r13 2023-05-24 09:50:57 +02:00
Oliver Smith dd80d9b57b channels.cfg: add v23.06 2023-05-24 09:13:36 +02:00
gtrxAC 5aa28ef117 huawei-plank: new device (MR 4096)
[ci:skip-build] already built successfully in CI
2023-05-23 15:19:16 -07:00
M0Rf30 e388dbb57d linux-postmarketos-qcom-sdm660: upgrade to 6.3.3 (MR 3984)
Rebase of sdm660 patchset on top of linux-stable/linux-6.3.y
branch.

Notable changes:
* New device: HMD Global Nokia 6.1 (nokia-pl2)
* New device: Xiaomi Mi A2 (xiaomi-jasmine_sprout)
* usage of pmb:kconfigcheck-community only
* LOCALVERSION is no longer set in kconfig, but at build time

Signed-off-by: Gianluca Boiano <morf3089@gmail.com>

[ci:skip-build] already built successfully in CI
2023-05-23 15:15:13 -07:00
René Kliment 5666109a4a samsung-p4note: use sparse image (MR 4105)
Fixes flashing of rootfs img with heimdall for Samsung Galaxy Note 10.1 N8010.

see https://wiki.postmarketos.org/wiki/Troubleshooting#Heimdall:_Flashing_fails_at_7.25
2023-05-23 22:36:10 +02:00
Jianhua Lu 1db7d64aab testing/device-xiaomi-elish: add audio speaker support (MR 4087) 2023-05-23 09:41:38 +02:00
Jianhua Lu b6cc5c0e9f testing/alsa-ucm-conf-qcom-sm8250: new aport (MR 4087) 2023-05-23 09:41:38 +02:00
Jianhua Lu 866b67e772 testing/firmware-xiaomi-elish: add cirrus and boe variant touchscreen firmware (MR 4087) 2023-05-23 09:41:38 +02:00
Jianhua Lu 30ff0308a2 testing/linux-postmarketos-qcom-sm8250: upgrade to 6.4.0 rc2 (MR 4087) 2023-05-23 09:41:32 +02:00
Oliver Smith 7926019217 cross/binutils-*: upgrade to 2.40-r8 (MR 4107)
Generated with:
https://lists.sr.ht/~postmarketos/pmbootstrap-devel/patches/41318
2023-05-22 08:54:25 +02:00
Anton Bambura 6e2077e604 google-stern: new device (MR 4091)
[ci:skip-build]: already built successfully in CI
2023-05-22 08:08:52 +02:00
Anton Bambura fdd5c560e9 google-cerise: new device (MR 4091) 2023-05-22 08:08:46 +02:00
Newbyte eee2eaf970 linux-purism-librem5: upgrade to 6.3.2pureos1 (MR 4104)
[ci:skip-build]: already built successfully in CI
2023-05-22 07:54:17 +02:00
Newbyte b891b8b18b cross/gcc-*: upgrade to 13.1.1_git20230520-r0 2023-05-21 21:12:02 +02:00
Dylan Van Assche 4b92e922ef main/postmarketos-base-ui: enable USB tethering (MR 3819)
USB tethering allows users to use their phone's WiFi or WWAN interface
as an access point for the device they connect the phone with over USB.
This way, they can use their data plan with a laptop or desktop when
regular Internet access is absent.

Configure NetworkManager to manage the usb0 iface from initfs so users
can configure it in GNOME Settings or KDE. Include a NetworkManager
dispatcher script as well to handle postmarketOS' setup with unudhcpd as
we want to provide an SSH login over USB when tethering is disabled. If
tethering is enabled, unudhpcd is stopped and its functionality is taken
over by NetworkManager through an instance of dnsmasq. NetworkManager
will also configure the necessary settings to allow IP forwarding and
firewall rules during tethering. Once disabled, NetworkManager cleans up
these settings and our dispatcher script starts unudhcpd again.

Due to upstream changes, NetworkManager requires networkmanager-dnsmasq
subpackage as dependency as dnsmasq needs DBus support for
NetworkManager. Without it, NetworkManager will silently fail spawning
dnsmasq instances.
[ci:skip-build]: already built successfully in CI
2023-05-21 19:42:14 +02:00
Newbyte a2a4772177 main/postmarketos-ui-plasma-mobile: don't recommend postmarketos-hidden-desktop-entries (MR 4086)
Package has been removed.

[ci:skip-vercheck]: Not necessary when recommends are changed.
[ci:skip-build]: already built successfully in CI
2023-05-21 17:14:55 +02:00
Newbyte 853f4ba5a5 main/postmarketos-ui-phosh: don't recommend postmarketos-hidden-desktop-entries (MR 4086)
Package has been removed.
2023-05-21 17:14:55 +02:00
Newbyte 8dcb873f9b main/postmarketos-ui-gnome-mobile: don't recommend postmarketos-hidden-desktop-entries (MR 4086)
Package has been removed.
2023-05-21 17:14:55 +02:00
Newbyte a04ca4caff main/postmarketos-hidden-desktop-entries: remove (MR 4086)
GNOME Console can now launch command-line applications from .desktop
files, so they are no longer "useless" in Phosh.

gnome-extensions-app hasn't been pulled in automatically in Phosh for
long. If users install this manually, it would be confusing for it to
not show up. The app itself has an error message that explains they
need to be logged into GNOME for it to work when launched in e.g.
Phosh, so I think that should take care of UX concerns. Additionally,
this package is installed in gnome-mobile as well, where
gnome-extensions-app actually is useful.

firefox-safe-mode has been removed in Alpine:
 - https://git.alpinelinux.org/aports/commit/community/firefox?id=438ee43621e1a83c8309bf7e5e14ba9fce0532ff
 - https://git.alpinelinux.org/aports/commit/community/firefox-esr?id=0f324c8b39ab08cc3f504e4ae959425bec472791

Considering all of this, postmarketos-hidden-desktop-entries no longer
serves a purpose, so let's remove it.
2023-05-21 17:14:50 +02:00
Ishaaq 9f15da8d46 samsung-starlte: new device (MR 4102)
[ci:skip-build]: Already built successfully in CI
2023-05-21 07:32:32 +02:00
hazardchem 4e1f99160d pine64-pinephonepro: Packages for PinePhone Keyboard with sway and X11 (MR 4078)
Copy of the work from this merge as pro model was missed:
https://gitlab.com/postmarketOS/pmaports/-/merge_requests/3845
2023-05-20 11:19:21 +02:00
Anton Bambura fcf33fccaa google-willow: add bluetooth firmware (MR 4099)
[ci:ignore-count]
[ci:skip-build]: Already built successfully in CI.
2023-05-20 11:15:51 +02:00
Anton Bambura fc3421e665 google-makomo: add bluetooth firmware (MR 4099) 2023-05-20 11:15:49 +02:00
Anton Bambura d69cd81186 google-krane: add bluetooth firmware (MR 4099) 2023-05-20 11:15:49 +02:00
Anton Bambura 22df89a1cb google-kodama: add bluetooth firmware (MR 4099) 2023-05-20 11:15:49 +02:00
Anton Bambura 7f78f74025 google-kenzo: add bluetooth firmware (MR 4099) 2023-05-20 11:15:48 +02:00
Anton Bambura af2ae7aa4c google-katsu: add bluetooth firmware (MR 4099) 2023-05-20 11:15:48 +02:00
Anton Bambura a2faf88238 google-kappa: add bluetooth firmware (MR 4099) 2023-05-20 11:15:48 +02:00
Anton Bambura fd0c785eb9 google-kakadu: add bluetooth firmware (MR 4099) 2023-05-20 11:15:48 +02:00
Anton Bambura 36e6a69dd7 google-juniper: add bluetooth firmware (MR 4099) 2023-05-20 11:15:48 +02:00
Anton Bambura 50d260240b google-fennel14: add bluetooth firmware (MR 4099) 2023-05-20 11:15:48 +02:00
Anton Bambura e859e47589 google-fennel: add bluetooth firmware (MR 4099) 2023-05-20 11:15:48 +02:00
Anton Bambura 3ed15d3d19 google-damu: add bluetooth firmware (MR 4099) 2023-05-20 11:15:48 +02:00
Anton Bambura 3c20e11910 google-cozmo: add bluetooth firmware (MR 4099) 2023-05-20 11:15:47 +02:00
Anton Bambura 0f4258d37e google-burnet: add bluetooth firmware (MR 4099) 2023-05-20 11:15:47 +02:00
Anton Bambura 6688808de8 linux-postmarketos-rockchip: enable video decoder (MR 4097)
[ci:skip-build]: Already built successfully in CI.
2023-05-20 11:13:25 +02:00
Anton Bambura 07cdab935a google-bob: enable accelerometer (MR 4098)
Fixed in upstream: https://github.com/eudev-project/eudev/pull/239
2023-05-20 11:09:39 +02:00
Anton Bambura 46304c497c google-kevin: enable accelerometer (MR 4098)
Fixed in upstream: https://github.com/eudev-project/eudev/pull/239
2023-05-20 11:09:38 +02:00
Luca Weiss 486de9b306 device-sony-leo: install lk2nd package (MR 4077)
This enables us to easily flash lk2nd with pmbootstrap during
installation.

[ci:skip-build]: already built successfully in CI
2023-05-19 18:42:19 +02:00
Luca Weiss 00261bc123 device-oneplus-bacon: install lk2nd package (MR 4077)
This enables us to easily flash lk2nd with pmbootstrap during
installation.
2023-05-19 18:42:19 +02:00
Luca Weiss 1e59890385 device-lg-hammerhead: install lk2nd package (MR 4077)
This enables us to easily flash lk2nd with pmbootstrap during
installation.
2023-05-19 18:42:19 +02:00
Luca Weiss 5954048db3 device-fairphone-fp2: install lk2nd package (MR 4077)
This enables us to easily flash lk2nd with pmbootstrap during
installation.
2023-05-19 18:42:18 +02:00
Luca Weiss 644439c79f main/lk2nd: also package appended-dtb variant of msm8974 (MR 4077)
Devices like oneplus-bacon require this variant instead of the standard
variant.
2023-05-19 18:42:18 +02:00
Newbyte e8eb332fa2 main/postmarketos-tweaks: upgrade to 0.13.1 (MR 4100)
[ci:skip-build]: already built successfully in CI
2023-05-19 16:07:31 +02:00
Hugo Osvaldo Barrera e9029c9153 pine64-pinebookpro: switch to upstream udev rules (MR 4095)
The entries kept locally are now part of the upstream rules. We can rely
on those instead and avoid the duplication.

See: https://github.com/eudev-project/eudev/blob/2703baf55615b7554fb67c4f1c241f057f8c0a79/hwdb/60-evdev.hwdb#L625
See: https://github.com/eudev-project/eudev/blob/2703baf55615b7554fb67c4f1c241f057f8c0a79/hwdb/60-keyboard.hwdb#L1526
[ci:skip-build]: already built successfully in CI
2023-05-19 12:11:10 +02:00
Anton Bambura af105937a2 mt8183 devices: remove audio module load configs (MR 4090)
Sound drivers not probing is solved with a patch in 6.1.28-r0 version
of linux-postmarketos-mediatek-mt8183 package.

[ci:ignore-count]
2023-05-19 07:24:32 +00:00
Luca Weiss 44797d1f4e testing/device-huawei-sturgeon: add mainline subpackages (MR 4053)
[ci:skip-build]: already built successfully in CI
2023-05-19 08:11:10 +02:00
Luca Weiss 8ff50a82a8 testing/firmware-huawei-sturgeon: add adsp and more wifi/bt firmware (MR 4053) 2023-05-19 08:11:10 +02:00
Luca Weiss f77fb2e610 testing/device-asus-sparrow: add mainline subpackages (MR 4053) 2023-05-19 08:11:10 +02:00
Luca Weiss a26ede4de6 testing/firmware-asus-sparrow: new aport (MR 4053) 2023-05-19 08:11:10 +02:00
Luca Weiss b1b5f9a8f2 testing/device-lg-lenok: add mainline subpackages (MR 4053) 2023-05-19 08:11:10 +02:00
Luca Weiss 7b4bf89443 testing/firmware-lg-lenok: new aport (MR 4053) 2023-05-19 08:11:10 +02:00
Luca Weiss 476f7fe6ad testing/linux-postmarketos-qcom-msm8226: adjust kernel config (MR 4053)
Enable various configs needed for the apq8026 watches, disable some
options for other platforms and adjust various other configs where it
makes sense.
2023-05-19 08:11:10 +02:00
Luca Weiss f3adab7539 testing/linux-postmarketos-qcom-msm8226: upgrade to 6.3.0 (MR 4053) 2023-05-19 08:11:05 +02:00
Anton Bambura 8e3cc49cfe soc-mediatek-mt8183: add symlink to scp.img (MR 4094)
Add symlink to the place where kernel expects it to be

[ci:skip-build]: already built successfully in CI
2023-05-19 07:49:49 +02:00
Anton Bambura 68a3bf8610 linux-postmarketos-mediatek-mt8183: add support for video decoder (MR 4093)
[ci:skip-build]: already built successfully in CI
2023-05-18 14:41:41 +03:00
Newbyte 6d72b33b41 cross/gcc-*: upgrade to 13.1.1_git20230513-r2 2023-05-17 22:27:00 +02:00
Anton Bambura 9c8ccba142 linux-postmarketos-mediatek-mt8183: upgrade to 6.1.28 (MR 4089)
[ci:skip-build]: Already built successfully in CI
2023-05-17 18:16:00 +02:00
Anton Bambura 3c629c64e3 google-nyan-blaze: add initfs modules for usb storage (MR 4074)
[ci:skip-build]
2023-05-16 23:18:02 +03:00
Anton Bambura 093611357b google-nyan-big: add initfs modules for usb storage (MR 4074) 2023-05-16 23:18:01 +03:00
Anton Bambura daea5dade3 google-nyan-blaze: switch from u-boot script to extlinux (MR 4074) 2023-05-16 23:18:01 +03:00
Anton Bambura 5ae8060f6d google-nyan-big: switch from u-boot script to extlinux (MR 4074) 2023-05-16 23:18:01 +03:00
Anton Bambura 670f23f640 google-nyan-blaze: switch from secondary u-boot to depthcharge (MR 4074) 2023-05-16 23:18:01 +03:00
Anton Bambura 2c6399db1c google-nyan-big: switch from secondary u-boot to depthcharge (MR 4074) 2023-05-16 23:18:01 +03:00
Anton BamburaandAlper Nebi Yasak 5bfe3ab5b5 linux-google-nyan: add a hack for depthcharge (MR 4074)
Prevent kernel self-decompression from overwriting initramfs

Co-authored-by: Alper Nebi Yasak <alpernebiyasak@gmail.com>
2023-05-16 23:18:01 +03:00
Anton Bambura 08096700f0 linux-google-nyan: upgrade to 6.1.27 (MR 4074)
Also, make it smaller and more modular
2023-05-16 23:18:01 +03:00
Newbyte 91adc26f51 linux-purism-librem5: enable lazy RCU (MR 4080)
See https://gitlab.com/postmarketOS/pmbootstrap/-/issues/2220

[ci:skip-build]: Already built successfully in CI
2023-05-16 18:40:42 +02:00
Newbyte f47d58a680 linux-purism-librem5: upgrade to 6.3.1 (MR 4080) 2023-05-16 18:40:41 +02:00
Joel Selvaraj 86601ff415 community/linux-postmarketos-qcom-sdm845: upgrade to 6.3.2 (MR 4079)
[ci:skip-build]: Already built successfully in CI
2023-05-16 09:19:47 +02:00
Anton Bambura 8ada15f062 google-veyron-jerry: use depthcharge (MR 4067)
Make use of its bootloader, so users don't have to flash U-Boot.
2023-05-16 01:56:38 +03:00
Mek101 34b1aff3cd lg-w5: move from armhf to armv7 (MR 4085)
[ci:skip-build]: already built successfully in CI
2023-05-15 22:29:08 +02:00
Newbyte 9c858aad62 cross/busybox-static-*: upgrade to 1.36.0-r11 2023-05-15 14:40:58 +02:00
Newbyte 8a9170d125 cross/binutils-*: upgrade to 2.40-r7 2023-05-15 14:40:32 +02:00
Newbyte 57b22658a9 cross/gcc-*: upgrade to 13.1.1_git20230513-r1 2023-05-15 10:15:31 +02:00
Anton Bambura a3001a0cb0 main/postmarketos-update-depthcharge-kernel: use kern_guid instead of label (MR 4066)
This allows to flash correct partition when having 2 installations of pmOS.

This will also avoid flashing kernel image when using U-Boot.
2023-05-14 19:22:51 +02:00
Newbyte 13904bb777 cross/busybox-static-*: upgrade to 1.36.0-r10 2023-05-14 18:31:53 +02:00
Newbyte 6352910769 cross/binutils-*: upgrade to 2.40-r6 2023-05-14 18:31:29 +02:00
Newbyte 69aea328e5 purism-librem5: upgrade to librem5-base 60 (MR 4055) 2023-05-13 10:40:21 +02:00
Newbyte 70b7813fee purism-librem5: don't install Alsa UCM configs (MR 4055)
This is now upstream in alsa-ucm-conf v1.2.9, and should as such
be removed from here as to avoid conflicts.
2023-05-13 10:40:17 +02:00
Newbyte 741b9caece cross/grub-efi-x86: upgrade to 2.06-r12 2023-05-13 10:32:21 +02:00
Oliver Smith 4f6b01db82 temp/pulseaudio: upgrade to 16.1 (MR 4075)
[ci:skip-build]: already built successfully in CI
2023-05-12 22:15:40 +02:00
Newbyte 16696849eb temp/pulseaudio: depend on alsa-utils in openrc subpackage (MR 4072)
Closes https://gitlab.com/postmarketOS/pmaports/-/issues/1801

Backport of https://gitlab.alpinelinux.org/alpine/aports/-/commit/3d3c5d17a79a615cd5935455cb31fee4efbe21a3
2023-05-12 08:52:48 +02:00
Martin Lillepuu 5b4df25783 device-oneplus-oneplus3t: remove mesa-dri-gallium from deps (MR 3323) 2023-05-11 20:48:58 +02:00
Martin Lillepuu ffb351f136 device-oneplus-oneplus3t: add GPU acceleration support (MR 3323)
Add GPU acceleration support for Oneplus 3T
2023-05-11 20:48:58 +02:00
Oliver Smith 76f32fecf3 device-pine64-pinephone: add replaces=alsa-ucm-conf (MR 4061)
Override the upstream alsa-ucm-conf for now.

Related: issue 2115
2023-05-11 10:11:09 +02:00
Luca Weiss 74c7092bbd main/postmarketos-ui-asteroid: launch mapplauncherd booster (MR 4063)
All Asteroid apps are launched with the "invoker" which needs the
booster running. Make sure this happens when the UI starts.

Alternatively we could use superd to launch it but for a single
executable this is good enough for now.
2023-05-10 11:54:20 +02:00
M0Rf30 4ded17dc1e linux-postmarketos-qcom-msm8953: enable motorola-ocean panel and sound (MR 4064)
[ci:skip-build]: Already built successfully in CI
2023-05-10 10:32:00 +02:00
Anton Bambura 91b81d92f7 firmware-google-veyron-brcm: add bluetooth firmware (MR 4068)
[ci:skip-build]: Already built successfully in CI
2023-05-10 00:20:09 +02:00
Anton Bambura 5cf259f46e linux-google-veyron: upgrade to 6.1.27 (MR 4069)
Also make it passing kconfig check again.

[ci:skip-build]: Already built successfully in CI
2023-05-10 00:17:21 +02:00
Clayton Craft 047730dfb0 main/postmarketos-ui-kodi: enable shutdown/reboot/suspend options (MR 4065)
These power menu options require this package

[ci:skip-build] already built successfully in CI
2023-05-09 10:01:32 -07:00
Luca Weiss 9a4a818bde community/linux-postmarketos-qcom-sm6350: enable DEVFREQ_THERMAL (MR 4062)
Make sure the GPU can register its thermal device to avoid this error:

  [    9.303081] adreno 3d00000.gpu: [drm:msm_devfreq_init] *ERROR* Couldn't register GPU cooling device

[ci:skip-build]: already built successfully in CI
2023-05-08 18:03:58 +02:00
Yassine Oudjana f71abed592 linux-postmarketos-qcom-msm8996: upgrade to 6.3.1 (MR 4059)
[ci:skip-build]: already built successfully in CI
2023-05-08 17:47:32 +02:00
Andreas Kemnade 3c32dbe814 linux-kobo-clara-mainline: Upgrade to 6.3.0 (MR 4060)
Add most config options for pmbootstrap kconfig check --community
CONFIG_SMP is left out since we have no mulitprocessor systems
using this kernel.

[ci:skip-build]: already built successfully in CI
2023-05-08 17:42:35 +02:00
Barnabás Czémán 3628ed25e8 device-xiaomi-tissot: update panel module names for initramfs (MR 4056)
[ci:skip-build]: already built successfully in CI
2023-05-07 18:55:30 +02:00
Newbyte 919c24cecb cross/busybox-static-*: upgrade to 1.36.0-r9 2023-05-06 23:22:53 +02:00
vipaol f07d122b67 xiaomi-markw: new device (MR 3906) 2023-05-04 20:54:05 +02:00
Clayton Craft b8aca2b914 main/boot-deploy: upgrade to 0.8.1 (MR 4048)
0.8.1:

Fixes:
  - get_free_space: always return an integer (MR 31)

0.8:

Features:
  - Add support for gummiboot
  - Many internal code improvements and bug fixes, see git log for
    details

Fixes:
  - Fix destination space calculation (MR 28)
  - Support destination paths with spaces

[ci:skip-build] already built successfully in CI
2023-05-04 08:39:51 -07:00
Newbyte 2f1d832d4d cross/musl-*: upgrade to 1.2.4 2023-05-03 14:12:26 +00:00
Pablo Correa Gómez d1856dad75 main/postmarketos-ui-xfce4: add elogind-openrc to depends, enable service (MR 4020)
[ci:ignore-count]
2023-05-03 15:56:56 +02:00
Pablo Correa Gómez 83d224df2b main/postmarketos-ui-weston: add elogind-openrc to depends, enable service (MR 4020) 2023-05-03 15:56:56 +02:00
Pablo Correa Gómez bc8bc00ef9 main/postmarketos-ui-sway: add elogind-openrc to depends, enable service (MR 4020) 2023-05-03 15:56:56 +02:00
Pablo Correa Gómez 10e5f418a0 main/postmarketos-ui-plasma-mobile: add elogind-openrc to depends, enable service (MR 4020) 2023-05-03 15:56:56 +02:00
Pablo Correa Gómez ec062f4e09 main/postmarketos-ui-plasma-bigscreen: add elogind-openrc to depends, enable service (MR 4020) 2023-05-03 15:56:56 +02:00
Pablo Correa Gómez 088482b579 main/postmarketos-ui-mate: add elogind-openrc to depends, enable service (MR 4020) 2023-05-03 15:56:56 +02:00
Pablo Correa Gómez 2d2b9bddd8 main/postmarketos-ui-lxqt: add elogind-openrc to depends, enable service (MR 4020) 2023-05-03 15:56:56 +02:00
Pablo Correa Gómez cbb4367c47 main/postmarketos-ui-kodi: add elogind-openrc to depends, enable service (MR 4020) 2023-05-03 15:56:55 +02:00
Pablo Correa Gómez d820779a10 main/postmarketos-ui-i3wm: add elogind-openrc to depends, enable service (MR 4020) 2023-05-03 15:56:55 +02:00
Pablo Correa Gómez ab87fde2f6 main/postmarketos-ui-asteroid: add elogind-openrc to depends, enable service (MR 4020) 2023-05-03 15:56:55 +02:00
Pablo Correa Gómez 6a125a739e main/postmarketos-base-ui-gnome: add elogind-openrc to depends, enable service (MR 4020) 2023-05-03 15:56:55 +02:00
M0Rf30 39f6db50cb linux-postmarketos-qcom-msm8953: upgrade to 6.3.0 (MR 4035)
[ci:skip-build]: Already built successfully in CI
2023-05-03 15:52:33 +02:00
M0Rf30 60fe572b47 xiaomi-vince: remove qcom_fg, i2c_qup from initfs modules, proper panel names (MR 4035) 2023-05-03 15:52:21 +02:00
Luca Weiss b2f939943c testing/linux-postmarketos-qcom-msm8974: upgrade to 6.3.0 (MR 4040)
Manual config changes:
* CONFIG_BPF_SYSCALL=y (waydroid check)
* CONFIG_CGROUP_BPF=y (waydroid check)

[ci:skip-build]: Already built successfully in CI
2023-05-03 15:48:18 +02:00
Oliver Smith e2169ff59f main/postmarketos-ui-lxqt: fix dep: lxpolkit -> lxqt-policykit (MR 4021)
lxpolkit has been removed in Alpine, adjust our packaging:
> this is dead for 10 years, pretty much superceded by lxqt-policykit

Related: https://gitlab.alpinelinux.org/alpine/aports/-/commit/9df419c349175cda0e635ec2bae13683b7eb916f
2023-05-02 08:14:14 +00:00
Luca Weiss 214f898dc5 community/linux-postmarketos-rockchip: adjust kconfig for usb_gadgets (MR 4028)
[ci:skip-build]: takes too long for CI
2023-05-02 08:33:38 +02:00
Luca Weiss 8ddef357b3 community/linux-postmarketos-omap: adjust kconfig for usb_gadgets (MR 4028) 2023-05-02 08:33:03 +02:00
Luca Weiss 65e27349d5 community/linux-postmarketos-exynos4: adjust kconfig for usb_gadgets (MR 4028) 2023-05-02 08:33:03 +02:00
Luca Weiss bec770e995 main/linux-purism-librem5: adjust kconfig for usb_gadgets (MR 4028) 2023-05-02 08:33:03 +02:00
Luca Weiss 9c894f8a73 main/linux-postmarketos-allwinner: adjust kconfig for usb_gadgets (MR 4028) 2023-05-02 08:32:57 +02:00
Caleb Connolly d40db11c30 device-thundercomm-db845c: new device (MR 4047)
Add support for the Qualcomm Robotics (RB3) dev kit, the Thundercomm
DB845c. This is a successor to the arrow 410c board already supported in
postmarketOS. It is based on the SDA845 SoC, almost identical to SDM845
but without a fully featured modem.

All the things you'd expect to work out of the box:
* UART
* USB host and peripheral
* HDMI display out
* Wifi, Bluetooth
2023-05-01 19:28:34 +01:00
Caleb Connolly 6c27c1c460 soc-qcom-sdm845: encapsulate cellular specific stuff (MR 4047)
The upcoming db845c doesn't have cellular modem capabilities, but still
has wifi. Avoid installing modem related configs and services by default
and only install it for devices that need it.
2023-05-01 19:28:34 +01:00
Alistair Francis 01d084c777 linux-purism-librem5: upgrade to 6.2.10 (MR 4045)
Signed-off-by: Alistair Francis <alistair@alistair23.me>

[ci:skip-build] already built successfully in CI
2023-04-30 00:18:28 -07:00
Pablo Correa Gómez e6a905c176 main/postmarketos-base-ui-gnome: enable apk-polkit-rs service (MR 4014)
Needed by GNOME Software since
https://gitlab.alpinelinux.org/Cogitri/apk-polkit-rs/-/merge_requests/45

GNOME Software is often installed in GNOME UI's through pmb_recommends,
but it's not a dependency in any way. To avoid spilling this service
enablement everywhere, add just the openrc subpackage from the daemon.
That means that if GNOME Software is not installed or gets uninstalled,
the daemon will crash on startup. That should not be a big deal though.

[ci:skip-build] already built successfully in CI
2023-04-30 00:02:12 -07:00
vipaol a1a9836982 main/lk2nd-msm8953: upgrade to 0.3.3 (MR 4044)
[ci:skip-build] already built successfully in CI
2023-04-29 23:57:49 -07:00
Santiago García Mantiñán d17d994693 linux-samsung-jackpotlte: Add patch to fix build ld error, issue #2052. (MR 4006)
[ci:skip-build] already built successfully in CI
2023-04-29 23:55:18 -07:00
Luca Weiss a7ed851ed9 community/linux-postmarketos-qcom-sm6350: upgrade to 6.3.0 (MR 4042)
[ci:skip-build] already built successfully in CI
2023-04-29 23:52:44 -07:00
Luca Weiss c91cd9998e community/firmware-fairphone-fp4: upgrade to 20230215 (MR 4042) 2023-04-29 23:52:44 -07:00
Clayton CraftandArnavion 4b516916dc pmos-base-ui-networkmanager: set up dnsmasq for filtering lookups (MR 3823)
This uses a dispatcher script to configure filtering A and AAAA records
based on which IP versions are routable on the NM primary connection.

gojq is preferred over the 'standard' jq because it's considerably
faster... the dispatcher script took 0.89s on my L5 with jq, and 0.07s
with gojq. the difference is probably greater on slower phones... so it
seemed worth installing it.

fixes #1430

Co-authored-by: Arnavion <me@arnavion.dev>
2023-04-29 23:40:52 -07:00
Jan Jasper de Kroon 08b32ff4ba linux-postmarketos-allwinner: upgrade to 6.3.0 (MR 4038)
-Removed 0013-media-ov5640-Update-last-busy-timestamp-to-reset-aut.patch:
 Fix should now be incorporated in 6.3 kernel.

[ci:skip-build]: Already built successfully in CI
2023-04-28 10:40:24 +02:00
notfound405 8f8c0bb350 main/msm-firmware-loader: upgrade to 1.2.0 (MR 4041) 2023-04-28 09:09:30 +02:00
notfound405 23d7875f10 generic-zhihe: add new devices (MSM8916-based LTE dongles, namely zhihe) (MR 3988)
[ci:skip-build]: already built successfully in CI
2023-04-27 09:58:53 +02:00
M0Rf30 dc79738ba6 firmware-xiaomi-vince: use a530_pfp.fw from V11.0.2.0.OEGMIXM (MR 4033)
[ci:skip-build]: already built successfully in CI
2023-04-27 09:55:37 +02:00
Pablo Correa Gómez ae41229fd4 device-pine64-dontbeevil: modernize, select dtb based on kernel suffix (MR 4037)
[ci:skip-vercheck]
2023-04-26 18:13:53 +02:00
Pablo Correa Gómez ee13208d07 device-planet-geminipda: use source_deviceinfo (MR 4037) 2023-04-26 18:13:53 +02:00
Pablo Correa Gómez ff12848ae6 device-motorola-maserati: use source_deviceinfo (MR 4037) 2023-04-26 18:13:52 +02:00
Pablo Correa Gómez 38659e07ff main/osk-sdl: use source_deviceinfo from init_functions.sh (MR 4037)
The osk-sdl runs on the initramfs, so this should be no issue
2023-04-26 18:13:52 +02:00
Pablo Correa Gómez 3c3ef48600 main/postmarketos-mkinitfs-hook-netboot: use source_deviceinfo (MR 4037) 2023-04-26 18:13:52 +02:00
Pablo Correa Gómez e192346cb4 main/postmarketos-mkinitfs-hook-debug-shell: use source_deviceinfo (MR 4037) 2023-04-26 18:13:52 +02:00
Pablo Correa Gómez c47963552a main/postmarketos-mkinitfs-hook-console-shell: use source_deviceinfo (MR 4037) 2023-04-26 18:13:52 +02:00
Pablo Correa Gómez b26ba8784c main/postmarketos-initramfs: add function to source deviceinfo (MR 4037)
As a preparation for #1836, move the sourcing of deviceinfo to its own
function. This should allow to have a single point in the whole of the
initramfs for the sourcing of the deviceinfo, instead of every script
that needs it sourcing it. This allows to change the way deviceinfo is
sourced in the future with a lot less effort.
2023-04-26 18:13:52 +02:00
Pablo Correa Gómez beef607a81 device-oneplus-oneplus2: remove unnecessary deviceinfo installation (MR 4037) 2023-04-26 18:13:52 +02:00
Pablo Correa Gómez b3998d167f device-asus-t00f: remove unnecessary deviceinfo installation (MR 4037) 2023-04-26 18:13:52 +02:00
Adam Słaboń 455368dfed lenovo-a6020a40: new device (Lenovo Vibe K5) (MR 4036)
[ci:skip-build]: already built successfully in CI
2023-04-25 22:24:47 +02:00
Minecrell a5a0b54f40 samsung-matisseve: add panel and touchscreen to initfs (MR 4032)
This makes the splash screen work and probably osk-sdl/unl0kr as well.

[ci:skip-build]: already built successfully in CI
2023-04-25 15:24:58 +02:00
Minecrell 25cc08f1e2 soc-qcom-msm8916: update ALSA UCM configs (MR 4031)
- Add msm8916-1mic configuration for devices without SecondaryMic
- Fix audio volume after upstream msm8916-wcd-digital changes

[ci:skip-build]: already built successfully in CI
2023-04-25 07:21:23 +02:00
Minecrell 880c94220e linux-postmarketos-qcom-msm8916: upgrade to 6.3 (MR 4031)
- Update to Linux 6.3
- Fix voltage reporting for SMB1360 battery driver

Device changes:
  - nokia-{argon,leo,sparkler}: Fix some key mappings
  - wileyfox-crackling: Fix multi-touch
  - bq-piccolo, samsung-gt510, samsung-matisseve:
    - Add capacitive touch keys
  - samsung-matisseve: Display brightness control
  - bq-paella: yushun-nt35521s panel driver
  - motorola-surnia: inx_v1 panel driver

New devices:
  - Various MSM8916-based USB modem dongles ("zhihe")
    (UF896, UFI001c, UZ801v3, ...)
    - eMMC, USB, Button, WiFi/BT, Modem, LEDs
  - Lenovo Vibe K5 (wingtech-wt82918hd)
    - eMMC, SD card, USB, Buttons, WiFi/BT, Vibrator
    - Display, Brightness control, LEDs
    - Touchscreen
    - Sensors (Accelerometer/Gyroscope/IMU)
    - Battery status (no charging driver yet)
    - Flash LED
    - Modem
2023-04-25 07:20:35 +02:00
Luca Weiss dfe9ada6e8 testing/linux-postmarketos-qcom-msm8953: enable new waydroid options (MR 4027)
[ci:skip-build]
2023-04-24 21:00:12 +02:00
Luca Weiss d7e933fbf5 testing/linux-postmarketos-qcom-msm8953: work around build timeout (MR 4027) 2023-04-24 20:59:54 +02:00
Luca Weiss daa1c6d8a5 testing/linux-sourceparts-pocketpc: enable new waydroid options (MR 4027) 2023-04-24 20:59:54 +02:00
Luca Weiss a570ee22c2 testing/linux-sourceparts-pocketpc: work around build timeout (MR 4027) 2023-04-24 20:59:54 +02:00
Luca Weiss bd280119fe testing/linux-postmarketos-stericsson: enable new waydroid options (MR 4027) 2023-04-24 20:59:54 +02:00
Luca Weiss 46b97c342b testing/linux-postmarketos-stericsson: work around build timeout (MR 4027) 2023-04-24 20:59:54 +02:00
Luca Weiss 03b588fc67 testing/linux-postmarketos-qcom-sdm660: enable new waydroid options (MR 4027) 2023-04-24 20:59:54 +02:00
Luca Weiss 137d23f938 testing/linux-postmarketos-qcom-sdm660: work around build timeout (MR 4027) 2023-04-24 20:59:54 +02:00
Clayton Craft 88f58f6a11 cross/busybox-static-a*: upgrade to 1.36.0-r8 2023-04-24 11:58:30 -07:00
Minecrell f81492edab motorola-harpia: use WCNSS firmware from osprey (MR 4034)
harpia's WCNSS firmware has problems with WiFi channels on some device
variants, using osprey's firmware seems to help as a workaround.

Install that by default so WiFi has better chances of working properly
out of the box.
[ci:skip-build]: already built successfully in CI
2023-04-24 12:37:56 +02:00
Bart Ribbers d892694d34 main/postmarketos-ui-plasma-mobile: remove kpeoplesink (MR 4030)
It has been dropped from Alpine due to being unmaintained and it's
dependencies not building against the latest kmime (23.04) anymore

[ci:skip-vercheck]
[ci:skip-build]
2023-04-24 10:50:45 +02:00
Dang Huynh 2d6be776a1 sipeed-m1sdock: new device (MR 4025)
Sipeed M1s DOCK is a development board from Sipeed, it is based on
M1s module.

The Sipeed M1s introduces the BL808 SoC from Bouffalo Lab, the
BL808 is also used in Pine64 0x64 development board.

[ci:skip-build]: already built successfully in CI
2023-04-24 07:53:10 +02:00
Barnabás Czémán 560e8b56ee linux-xiaomi-riva: Replace kernel source (MR 4029)
The kernel source replaced with the lineageos version.
It fix the compile issues and the contains security fixes.

[ci:skip-build]: Already built successfully in CI
2023-04-23 21:39:39 +02:00
Henrik Grimler 8583329551 linux-postmarketos-exynos5: upgrade to 6.1.24 (lts) (MR 4022)
The pmaports package will follow lts releases from now on.
Intermediate versions will be tagged in the
gitlab.com/exynos5-mainline/linux repo.

Also enable CONFIG_LRU_GEN while we are at it (but not
CONFIG_LRU_GEN_ENABLED for now).
[ci:skip-build]: already built successfully in CI
2023-04-23 15:23:59 +02:00
M0Rf30 20983e2b50 xiaomi-vince: use msm8953 prefix for dtb filename and remove mainline subpackage (MR 4023) 2023-04-22 20:47:03 +02:00
M0Rf30 6d8dbf777f xiaomi-tissot: use msm8953 prefix for dtb filename (MR 4023) 2023-04-22 20:47:02 +02:00
M0Rf30 69a148491c xiaomi-mido: use msm8953 prefix for dtb filename (MR 4023) 2023-04-22 20:47:02 +02:00
M0Rf30 65578e8149 xiaomi-daisy: use msm8953 prefix for dtb filename (MR 4023) 2023-04-22 20:47:01 +02:00
M0Rf30 4ab4c6f8f7 motorola-potter: use msm8953 prefix for dtb filename (MR 4023) 2023-04-22 20:47:00 +02:00
Henrik Grimler ee22fd5eac linux-postmarketos-exynos4: upgrade to version 6.3-rc7 (MR 4018)
And use gitlab.com/exynos4-mainline/linux as source so that we no
longer have to carry all the patches in pmaports.

[ci:skip-build]: Already built successfully in CI
2023-04-22 09:02:12 +02:00
Pangwalla d5fa93bd01 linux-postmarketos-qcom-sm8250: upgrade to 6.3.0_rc6 (MR 4002)
Add modules for instantnoodlep NFC, touchscreen, and MHI related to modem, which is a
work in progress

[ci:skip-build] already built successfully in CI
2023-04-21 09:33:29 +02:00
Pangwalla db7766d24e device-oneplus-instantnoodlep: add sm8250 mainline kernel (MR 4002) 2023-04-21 09:33:24 +02:00
Clayton Craft f8d91ebdfd temp/dhcpcd: remove (MR 4015)
I don't see any packages in pmaports that actually depend on dhcpcd, and
it hasn't been updated in 3 years...  (upstream is at version 10.0.0
now...)

NOTE by ollieparanoid: networkmanager in Alpine used dhcpcd before, so
it was part of our default network stack. But that isn't the case
anymore since 2020:
https://gitlab.alpinelinux.org/alpine/aports/-/commit/db03cedea9469e93f6ede531d92246ddc3c93e4e
2023-04-19 09:52:23 +02:00
Oliver Smith ccb594c646 cross/musl-*: upgrade to 1.2.3_git20230411 2023-04-18 19:55:58 +02:00
Oliver Smith 102e0a57f1 main/mobile-config-firefox: upgrade to 4.0.1 (MR 4017)
[ci:skip-build]: already built successfully in CI
2023-04-18 09:24:38 +02:00
Henrik Grimler 0d2757b3a4 linux-postmarketos-exynos4: split panel patch (MR 4011)
As stated in the MRs that added the patch, the ea8061 and s6evr02
panel drivers are originally from work by Simon Shields (fourkbomb).
Let's base our patches on the original commits to preserve authorship,
and note which modifications have been done, and by who.  This is a
step towards making these patches ready for submission to upstream.

[ci:skip-build]: Already built successfully in CI
2023-04-17 14:10:51 +02:00
Alistair Francis 484f587c1f purism-librem5: upgrade to librem5-base 59 (MR 4016)
Update to the librem5-base release 59 and include a fix for the modem
stability issues from:
https://source.puri.sm/Librem5/librem5-base/-/merge_requests/358.

Signed-off-by: Alistair Francis <alistair@alistair23.me>
2023-04-17 11:04:19 +02:00
Caleb Connolly 3f698640f1 device/community/sdm845: disable serial console (MR 3886)
The UART console makes the boot process a whole lot slower due to printk
being synchronous. These devices are well enough supported that we can
disable UART logging by default to improve the boot speed. This
constitutes a ~30 second speedup on the SHIFT6mq at 115200 baud.
2023-04-15 20:26:22 +01:00
Henrik Grimler a5de8ae21b samsung-klimtlte: set getty (MR 4013)
So that we can get a shell over uart.

[ci:skip-build]: already built successfully in CI
2023-04-14 09:33:14 +02:00
Henrik Grimler 4fa38dd8a8 samsung-chagallwifi: set getty (MR 4013)
So that we can get a shell over uart.
2023-04-14 09:33:14 +02:00
Henrik Grimler 02a4b7cd48 samsung-m0: set getty (MR 4013)
So that we can get a shell over uart.
2023-04-14 09:33:09 +02:00
Ferass El Hafidi 8c9b594cd3 linux-postmarketos-amlogic: upgrade to 6.2.9 (MR 3987)
Also update the patches with new, rebased ones straight from
the linux-amlogic mailing list, and rename them.

Signed-off-by: Ferass El Hafidi <vitali64pmemail@protonmail.com>

[ci:skip-build] already built successfully in CI
2023-04-13 23:25:36 -07:00
Bart Ribbers 15cca9eebf raspberry-pi4: add Plasma Bigscreen configuration (MR 3994)
Plasma Bigscreen requires specific configuration on the RPi4 to tell it
to load some device-specific stuff. In this case to disable 4K mode as
the device can not handle it

[ci:skip-build] already built successfully in CI
2023-04-13 23:23:47 -07:00
Pablo Correa Gómez a91fcca8d4 README: add mention to COMMITSTYLE (MR 4010)
[ci:skip-build] already built successfully in CI
2023-04-13 23:22:01 -07:00
Clayton Craft ef69eb7bdb cross/musl-*: upgrade to 1.2.3_git20230322-r3 2023-04-13 23:16:53 -07:00
Clayton Craft c3b0ea0021 cross/busybox-static-*: upgrade to 1.36.0-r7 2023-04-13 23:15:46 -07:00
Clayton Craft a6722a5116 cross/binutils-*: upgrade to 2.40-r5 2023-04-13 23:14:09 -07:00
Luca Weiss 41afe17856 cross/grub-efi-x86: upgrade to 2.06-r11 (MR 4012)
[ci:skip-build]: Already built successfully in CI
2023-04-13 15:36:57 +02:00
Luca Weiss d605627e1a cross/binutils-*: upgrade to 2.40-r4 (MR 4012) 2023-04-13 15:36:57 +02:00
Luca Weiss 7784f0326a cross/gcc-*: upgrade to 12.2.1_git20220924-r10 (MR 4012) 2023-04-13 15:36:56 +02:00
Luca Weiss 99553042ad main/postmarketos-base-ui: configure openrc-settingsd for chronyd (MR 3953)
We need to tell openrc-settingsd which ntp service to use, otherwise
it'll default to busybox ntpd which we don't want.

Additionally make sure openrc-settingsd service gets launched at boot
with the post-install/post-upgrade script.
[ci:skip-build]: already built successfully in CI
2023-04-12 16:53:15 +02:00
Pablo Correa Gómez 048a18ad71 Add githooks from alpine (MR 4008)
Get the githooks from alpine, with the following changes:

* Make it possible to parse the additionally nested "device" folder
  with the exceptions mentioned in our COMMITSTYLE
* Ignore "device/*" as a possible prefix for the commit
* Replace abuild references with pmbootstrap

Relates #2055
[ci:skip-build]: already built successfully in CI
2023-04-12 16:42:45 +02:00
651 changed files with 31603 additions and 17473 deletions

No files matched your search

+7
View File
@@ -38,3 +38,10 @@ if grep -qr '/usr/share/postmarketos-mkinitfs' -- *; then
grep --color=always -r '/usr/share/postmarketos-mkinitfs' -- *
exit 1
fi
# Direct sourcing of deviceinfo
if grep --exclude='source_deviceinfo' -qEr 'source /etc/deviceinfo|\. /etc/deviceinfo' -- *; then
echo 'ERROR: Please source the source_deviceinfo script instead of sourcing deviceinfo directly!'
grep --color=always --exclude='rootfs-usr-share-misc-source_deviceinfo' -Er 'source /etc/deviceinfo|\. /etc/deviceinfo' -- *
exit 1
fi
+1 -1
View File
@@ -134,7 +134,7 @@ def get_changed_packages_sanity_check(count):
print("ERROR: Too many packages have changed!")
print()
print("This is a sanity check, so we don't end up building packages that")
print("have not been modified. CI won't run for more than one hour")
print("have not been modified. CI won't run for more than three hours")
print("anyway.")
print()
print("Your options:")
+2
View File
@@ -17,6 +17,8 @@ sh_files="
./main/mdss-fb-init-hack/mdss-fb-init-hack.sh
./main/osk-sdl/unlock.sh
./main/postmarketos-base/rootfs-usr-lib-firmwareload.sh
./main/postmarketos-base-ui/rootfs-etc-NetworkManager-dispatcher.d-99-dns-filter.sh
./main/postmarketos-base-ui/rootfs-etc-NetworkManager-dispatcher.d-85-tethering
./main/postmarketos-installkernel/installkernel-pmos
./main/postmarketos-initramfs/init.sh
./main/postmarketos-initramfs/init_functions.sh
+119
View File
@@ -0,0 +1,119 @@
#!/bin/sh
#
# This hook checks that all local sources specified in the staged APKBUILDs
# are staged too or already committed and that checksums are correct.
#
set -eu
# Maximal allowed size (in bytes) of a file.
FILE_SIZE_LIMIT=262144 # 256 kiB
if ! command -v sha512sum >/dev/null; then
# macOS / BSDs (?) don't have sha512sum, but shasum.
alias sha512sum='shasum -a 512'
fi
error() {
printf '\033[0;31mpre-commit:\033[0m %s\n' "$1" >&2 # red
}
# Prints paths of created or modified files being committed.
changed_files() {
git diff-index \
--name-only \
--cached \
--diff-filter=ACMR HEAD \
-- "$@"
}
# Prints file names and checksums (in format <SHA-512>:<filename>) of local
# sources specified in the APKBUILD ($1).
apkbuild_local_sources() {
apkbuild="$1"
set +eu
. "$apkbuild" || {
error "$apkbuild is invalid"
return 1
}
set -eu
status=0
: ${source:=""}
for src in $source; do
# Skip remote sources.
case "$src" in */*) continue;; esac
echo "$sha512sums" | awk -v src="$src" '
{ if ($2 == src) { ok=1; print($2 ":" $1) } }
END { if (ok != 1) exit 1 }' || {
status=1
error "${apkbuild%/*}: file \"$src\" is missing in \$sha512sums (hint: run pmbootstrap checksum)"
}
done
return $status
}
# check if given object is a symlink
is_symlink() {
test "$(git ls-files --stage "$1" | awk '{print $1}')" = "120000"
}
# Checks that all local sources specified in the APKBUILD file ($1) are
# available in git tree and checksums are correct.
check_local_sources() {
local apkbuild="$1"
local startdir="${apkbuild%/*}"
local status=0
local checksum_act checksum_exp content filename line sources
sources=$(apkbuild_local_sources "$apkbuild")
for line in $sources; do
filename=${line%%:*}
checksum_exp=${line#*:}
if ! git cat-file -e ":$startdir/$filename" 2>/dev/null; then
error "$startdir: missing file \"$filename\""
status=1
continue
fi
if is_symlink ":$startdir/$filename"; then
continue
fi
checksum_act=$(git show ":$startdir/$filename" | sha512sum)
if [ "$checksum_act" != "$checksum_exp -" ]; then
local cmd="pmbootstrap checksum $(basename "$startdir")"
error "$startdir: bad checksum for file \"$filename\" (hint: run $cmd)"
status=1
fi
done
return $status
}
# Checks if the file ($1) being committed is not bigger than FILE_SIZE_LIMIT.
check_file_size() {
local path="$1"
local size
size=$(git cat-file -s ":$path")
if [ $size -gt $FILE_SIZE_LIMIT ]; then
local size_kb=$(( size / 1024 ))
error "file \"$path\" is quite big ($(( size / 1024 )) kiB), better put a remote url in source="
return 1
fi
}
for apkbuild in $(changed_files '**/APKBUILD'); do
check_local_sources "$apkbuild"
done
for path in $(changed_files); do
check_file_size "$path"
done
+49
View File
@@ -0,0 +1,49 @@
#!/bin/sh
#
# This hook adds prefix "<repo>/<pkgname>: " to the commit message when
# committing changes of a single package.
#
MSG_FILE="$1"
SOURCE="$2"
longest_common_prefix() {
awk -F/ '
(NR == 1) { split($0, prefix); prefix_len = NF }
(NR > 1) {
for (i = 1; i <= prefix_len; i++) {
if (prefix[i] != $i) {
prefix_len = i - 1; break
}
}
}
(prefix_len == 0) { exit }
END {
res = prefix[1]
for (i = 2; i <= prefix_len; i++) {
res = res FS prefix[i]
}
print(res)
}'
}
prepend_msg() {
local prefix="$1"
printf '%s\n%s\n' "$prefix" "$(cat "$MSG_FILE")" > "$MSG_FILE"
}
# Do nothing if message has been given using -m, template, merge etc.
[ -z "$SOURCE" ] || exit 0
lcp=$(git diff-index --name-only --cached HEAD | longest_common_prefix)
case "$lcp" in
device/*/*) prepend_msg "$(echo "$lcp" | cut -d/ -f3): ";;
# Multiple packages touched for same device category
# More logic could be added to detect if they all belong to same device
device/*) ;;
[^.]*/*) prepend_msg "$(echo "$lcp" | cut -d/ -f1-2): ";;
esac
exit 0
+1
View File
@@ -21,6 +21,7 @@
Replace space inside `[ ]` with `x` to fill the checkbox
-->
* [ ] edge (`master` branch)
* [ ] `v23.06`
* [ ] `v22.12`
* [ ] I confirm that the issue still is present after running `sudo apk upgrade -a`
+2
View File
@@ -71,6 +71,8 @@ device/*/device-samsung-klimtlte @Grimler
device/*/linux-samsung-klimtlte @Grimler
device/*/firmware-odroid-xu4 @Grimler
device/*/linux-samsung-chagallwifi @Grimler
device/*/device-huawei-plank @gtrxAC
device/*/linux-huawei-plank @gtrxAC
main/postmarketos-update-depthcharge-kernel/ @jenneron
main/osk-sdl/ @craftyguy
+1
View File
@@ -6,3 +6,4 @@ Helpful resources:
* [Alpine Linux aports](https://gitlab.alpinelinux.org/alpine/aports/)
* [Alpine Linux package search](https://pkgs.alpinelinux.org/packages)
* [postmarketOS package search](https://pkgs.postmarketos.org/packages)
* [postmarketOS commit style](./COMMITSTYLE.md)
+6
View File
@@ -8,6 +8,12 @@ branch_pmaports=master
branch_aports=master
mirrordir_alpine=edge
[v23.06]
description=Upcoming stable release (DO NOT USE)
branch_pmaports=v23.06
branch_aports=3.18-stable
mirrordir_alpine=v3.18
[v22.12]
description=Latest release / Recommended for best stability
branch_pmaports=v22.12
+36 -31
View File
@@ -8,21 +8,27 @@ CTARGET="$(arch_to_hostspec $CTARGET_ARCH)"
pkgname=binutils-aarch64
pkgver=2.40
pkgrel=3
pkgrel=11
pkgdesc="Tools necessary to build programs for aarch64 targets"
url="https://www.gnu.org/software/binutils/"
makedepends_build="bison flex texinfo"
makedepends_host="zlib-dev zstd-dev"
makedepends_host="zlib-dev jansson-dev zstd-dev"
makedepends="$makedepends_build $makedepends_host"
arch="x86_64"
license="GPL-2.0-or-later AND LGPL-2.1-or-later AND BSD-3-Clause"
subpackages="binutils-dev binutils-doc"
source="https://ftp.gnu.org/gnu/binutils/binutils-$pkgver.tar.xz
binutils-ld-fix-static-linking.patch
0001-Revert-PR25882-.gnu.attributes-are-not-checked-for-s.patch
CVE-2023-1972.patch
binutils-ld-fix-static-linking.patch
riscv64-textrels.patch
"
builddir="$srcdir/binutils-$pkgver"
if [ -z "$BOOTSTRAP" ]; then
makedepends_host="$makedepends_host jansson-dev zstd-dev"
fi
if [ "$CHOST" = "$CBUILD" ] && [ "$CBUILD" = "$CTARGET" ] && [ "$CTARGET_ARCH" != "riscv64" ]; then
subpackages="$subpackages binutils-gold"
fi
@@ -34,6 +40,10 @@ if [ "$CHOST" != "$CTARGET" ]; then
fi
# secfixes:
# 2.40-r10:
# - CVE-2023-1972
# 2.40-r0:
# - CVE-2023-1579
# 2.39-r2:
# - CVE-2022-38533
# 2.39-r0:
@@ -55,19 +65,6 @@ build() {
local _gold_configure="--disable-gold"
local _plugin_configure="--enable-plugins"
case "$CARCH" in
riscv64)
# binutils creates empty textrels here
# https://sourceware.org/bugzilla/show_bug.cgi?id=25694
local no_textrels=""
;;
*)
# set -z text by default
# this is the default for linkers such as ld.lld too
local no_textrels="--enable-textrel-check=error"
;;
esac
if [ "$CHOST" != "$CTARGET" ]; then
_sysroot="$CBUILDROOT"
_cross_configure="--disable-install-libiberty"
@@ -86,6 +83,8 @@ build() {
_gold_configure="--disable-gold"
fi
CFLAGS="$CFLAGS -O2" \
CXXFLAGS="$CXXFLAGS -O2" \
./configure \
--build=$CBUILD \
--host=$CHOST \
@@ -95,23 +94,27 @@ build() {
--prefix=/usr \
--mandir=/usr/share/man \
--infodir=/usr/share/info \
--disable-multilib \
--disable-gprofng \
--enable-ld=default \
$_gold_configure \
--enable-64-bit-bfd \
$_plugin_configure \
--enable-relro \
--enable-deterministic-archives \
--enable-default-execstack=no \
$_cross_configure \
--sysconfdir=/etc \
$_arch_configure \
--enable-default-hash-style=gnu \
$no_textrels \
--with-pic \
--disable-werror \
$_cross_configure \
$_gold_configure \
$_plugin_configure \
--disable-gprofng \
--disable-multilib \
--disable-nls \
--disable-werror \
--enable-64-bit-bfd \
--enable-colored-disassembly \
--enable-default-execstack=no \
--enable-default-hash-style=gnu \
--enable-deterministic-archives \
--enable-ld=default \
--enable-new-dtags \
--enable-relro \
--enable-threads \
--with-bugurl="https://postmarketos.org/issues" \
--with-mmap \
--with-pic \
--with-system-zlib
make
}
@@ -142,6 +145,8 @@ gold() {
sha512sums="
a37e042523bc46494d99d5637c3f3d8f9956d9477b748b3b1f6d7dfbb8d968ed52c932e88a4e946c6f77b8f48f1e1b360ca54c3d298f17193f3b4963472f6925 binutils-2.40.tar.xz
ecee33b0e435aa704af1c334e560f201638ff79e199aa11ed78a72f7c9b46f85fbb227af5748e735fd681d1965fcc42ac81b0c8824e540430ce0c706c81e8b49 binutils-ld-fix-static-linking.patch
70ec22bd72ef6dddecfd970613387dd4a8cdc8730dd3cbf03d5a0c3a7c4d839383167bb06dad21bf7c235329fd44b5dc4aefe762f68544f17155cf002bf1be4a 0001-Revert-PR25882-.gnu.attributes-are-not-checked-for-s.patch
b434e126c4c3f70c02b0a5597a0d75a4ea99b1498552c2d0676005ac0ae171c56cf07a6f6e2faa1381f1f4d4a37043a07d177dd4912f09b61109f103853594b2 CVE-2023-1972.patch
ecee33b0e435aa704af1c334e560f201638ff79e199aa11ed78a72f7c9b46f85fbb227af5748e735fd681d1965fcc42ac81b0c8824e540430ce0c706c81e8b49 binutils-ld-fix-static-linking.patch
d138691d953c6f49111601df1731db157d2ecedf1593e37ababb5c12ff10572b5f7982288c81579f4a99097780dbb18d3b457f74daab0f935f59423e69cec56f riscv64-textrels.patch
"
@@ -0,0 +1,37 @@
Patch-Source: https://sourceware.org/git/?p=binutils-gdb.git;a=commitdiff;h=c22d38baefc5a7a1e1f5cdc9dbb556b1f0ec5c57;hp=f2f9bde5cde7ff34ed0a4c4682a211d402aa1086
https://sourceware.org/bugzilla/show_bug.cgi?id=30285
--
From: Nick Clifton <nickc@redhat.com>
Date: Thu, 30 Mar 2023 09:10:09 +0000 (+0100)
Subject: Fix an illegal memory access when an accessing a zer0-lengthverdef table.
X-Git-Url: https://sourceware.org/git/?p=binutils-gdb.git;a=commitdiff_plain;h=c22d38baefc5a7a1e1f5cdc9dbb556b1f0ec5c57;hp=f2f9bde5cde7ff34ed0a4c4682a211d402aa1086
Fix an illegal memory access when an accessing a zer0-lengthverdef table.
PR 30285
* elf.c (_bfd_elf_slurp_version_tables): Fail if no version definitions are allocated.
---
diff --git a/bfd/elf.c b/bfd/elf.c
index 027d0143735..185028cbd97 100644
--- a/bfd/elf.c
+++ b/bfd/elf.c
@@ -9030,6 +9030,9 @@ _bfd_elf_slurp_version_tables (bfd *abfd, bool default_imported_symver)
bfd_set_error (bfd_error_file_too_big);
goto error_return_verdef;
}
+
+ if (amt == 0)
+ goto error_return_verdef;
elf_tdata (abfd)->verdef = (Elf_Internal_Verdef *) bfd_zalloc (abfd, amt);
if (elf_tdata (abfd)->verdef == NULL)
goto error_return_verdef;
@@ -9133,6 +9136,8 @@ _bfd_elf_slurp_version_tables (bfd *abfd, bool default_imported_symver)
bfd_set_error (bfd_error_file_too_big);
goto error_return;
}
+ if (amt == 0)
+ goto error_return;
elf_tdata (abfd)->verdef = (Elf_Internal_Verdef *) bfd_zalloc (abfd, amt);
if (elf_tdata (abfd)->verdef == NULL)
goto error_return;
@@ -0,0 +1,103 @@
Patch-Source: https://sourceware.org/git/?p=binutils-gdb.git;a=commitdiff;h=225df051d3d4cf714d1791b9035966a6686b3f3d;hp=a70d5ba34cb64bbbb7df4f3055cf5b1967bdf61e#patch1
https://sourceware.org/bugzilla/show_bug.cgi?id=25694
--
From: Nelson Chu <nelson@nelson.ba.rivosinc.com>
Date: Thu, 4 May 2023 09:08:50 +0000 (+0800)
Subject: [PR ld/22263][PR ld/25694] RISC-V: Avoid dynamic TLS relocs in PIE.
X-Git-Url: https://sourceware.org/git/?p=binutils-gdb.git;a=commitdiff_plain;h=225df051d3d4cf714d1791b9035966a6686b3f3d;hp=a70d5ba34cb64bbbb7df4f3055cf5b1967bdf61e
[PR ld/22263][PR ld/25694] RISC-V: Avoid dynamic TLS relocs in PIE.
Lots of targets already fixed the TEXTREL problem for TLS in PIE.
* For PR ld/25694,
In the check_reloc, refer to spare and loongarch, they don't need to reserve
any local dynamic reloc for TLS LE in pie/pde, and similar to other targets.
So it seems like riscv was too conservative to estimate the TLS LE before.
Just break and don't goto static_reloc for TLS LE in pie/pde can fix the
TEXTREL problem.
* For PR ld/22263,
The risc-v code for TLS GD/IE in the relocate_section seems same as MIPS port.
So similar to MIPS, pr22570, commits 9143e72c6d4d and 1cb83cac9a89, it seems
also the right way to do the same thing for risc-v.
On risc-v, fixes
FAIL: Build pr22263-1
RISC-V haven't supported the TLS transitions, so will need the same fix (use
bfd_link_dll) in the future.
bfd/
PR ld/22263
PR ld/25694
* elfnn-riscv.c (riscv_elf_check_relocs): Replace bfd_link_pic with
bfd_link_dll for TLS IE. Don't need to reserve the local dynamic
relocation for TLS LE in pie/pde, and report error in pic just like
before.
(riscv_elf_relocate_section): For TLS GD/IE, use bfd_link_dll rather
than !bfd_link_pic in determining the dynamic symbol index. Avoid
the index of -1.
---
diff --git a/bfd/elfnn-riscv.c b/bfd/elfnn-riscv.c
index 75af040cf92..762ea231c0b 100644
--- a/bfd/elfnn-riscv.c
+++ b/bfd/elfnn-riscv.c
@@ -824,7 +824,7 @@ riscv_elf_check_relocs (bfd *abfd, struct bfd_link_info *info,
break;
case R_RISCV_TLS_GOT_HI20:
- if (bfd_link_pic (info))
+ if (bfd_link_dll (info))
info->flags |= DF_STATIC_TLS;
if (!riscv_elf_record_got_reference (abfd, info, h, r_symndx)
|| !riscv_elf_record_tls_type (abfd, h, r_symndx, GOT_TLS_IE))
@@ -920,11 +920,12 @@ riscv_elf_check_relocs (bfd *abfd, struct bfd_link_info *info,
goto static_reloc;
case R_RISCV_TPREL_HI20:
+ /* This is not allowed in the pic, but okay in pie. */
if (!bfd_link_executable (info))
return bad_static_reloc (abfd, r_type, h);
if (h != NULL)
riscv_elf_record_tls_type (abfd, h, r_symndx, GOT_TLS_LE);
- goto static_reloc;
+ break;
case R_RISCV_HI20:
if (bfd_link_pic (info))
@@ -2880,24 +2881,20 @@ riscv_elf_relocate_section (bfd *output_bfd,
if (htab->elf.srelgot == NULL)
abort ();
- if (h != NULL)
- {
- bool dyn, pic;
- dyn = htab->elf.dynamic_sections_created;
- pic = bfd_link_pic (info);
-
- if (WILL_CALL_FINISH_DYNAMIC_SYMBOL (dyn, pic, h)
- && (!pic || !SYMBOL_REFERENCES_LOCAL (info, h)))
- indx = h->dynindx;
- }
+ bool dyn = elf_hash_table (info)->dynamic_sections_created;
+ if (h != NULL
+ && h->dynindx != -1
+ && WILL_CALL_FINISH_DYNAMIC_SYMBOL (dyn, bfd_link_pic (info), h)
+ && (bfd_link_dll (info) || !SYMBOL_REFERENCES_LOCAL (info, h)))
+ indx = h->dynindx;
/* The GOT entries have not been initialized yet. Do it
now, and emit any relocations. */
- if ((bfd_link_pic (info) || indx != 0)
+ if ((bfd_link_dll (info) || indx != 0)
&& (h == NULL
|| ELF_ST_VISIBILITY (h->other) == STV_DEFAULT
|| h->root.type != bfd_link_hash_undefweak))
- need_relocs = true;
+ need_relocs = true;
if (tls_type & GOT_TLS_GD)
{
+36 -31
View File
@@ -8,21 +8,27 @@ CTARGET="$(arch_to_hostspec $CTARGET_ARCH)"
pkgname=binutils-armhf
pkgver=2.40
pkgrel=3
pkgrel=11
pkgdesc="Tools necessary to build programs for armhf targets"
url="https://www.gnu.org/software/binutils/"
makedepends_build="bison flex texinfo"
makedepends_host="zlib-dev zstd-dev"
makedepends_host="zlib-dev jansson-dev zstd-dev"
makedepends="$makedepends_build $makedepends_host"
arch="x86_64"
license="GPL-2.0-or-later AND LGPL-2.1-or-later AND BSD-3-Clause"
subpackages="binutils-dev binutils-doc"
source="https://ftp.gnu.org/gnu/binutils/binutils-$pkgver.tar.xz
binutils-ld-fix-static-linking.patch
0001-Revert-PR25882-.gnu.attributes-are-not-checked-for-s.patch
CVE-2023-1972.patch
binutils-ld-fix-static-linking.patch
riscv64-textrels.patch
"
builddir="$srcdir/binutils-$pkgver"
if [ -z "$BOOTSTRAP" ]; then
makedepends_host="$makedepends_host jansson-dev zstd-dev"
fi
if [ "$CHOST" = "$CBUILD" ] && [ "$CBUILD" = "$CTARGET" ] && [ "$CTARGET_ARCH" != "riscv64" ]; then
subpackages="$subpackages binutils-gold"
fi
@@ -34,6 +40,10 @@ if [ "$CHOST" != "$CTARGET" ]; then
fi
# secfixes:
# 2.40-r10:
# - CVE-2023-1972
# 2.40-r0:
# - CVE-2023-1579
# 2.39-r2:
# - CVE-2022-38533
# 2.39-r0:
@@ -55,19 +65,6 @@ build() {
local _gold_configure="--disable-gold"
local _plugin_configure="--enable-plugins"
case "$CARCH" in
riscv64)
# binutils creates empty textrels here
# https://sourceware.org/bugzilla/show_bug.cgi?id=25694
local no_textrels=""
;;
*)
# set -z text by default
# this is the default for linkers such as ld.lld too
local no_textrels="--enable-textrel-check=error"
;;
esac
if [ "$CHOST" != "$CTARGET" ]; then
_sysroot="$CBUILDROOT"
_cross_configure="--disable-install-libiberty"
@@ -86,6 +83,8 @@ build() {
_gold_configure="--disable-gold"
fi
CFLAGS="$CFLAGS -O2" \
CXXFLAGS="$CXXFLAGS -O2" \
./configure \
--build=$CBUILD \
--host=$CHOST \
@@ -95,23 +94,27 @@ build() {
--prefix=/usr \
--mandir=/usr/share/man \
--infodir=/usr/share/info \
--disable-multilib \
--disable-gprofng \
--enable-ld=default \
$_gold_configure \
--enable-64-bit-bfd \
$_plugin_configure \
--enable-relro \
--enable-deterministic-archives \
--enable-default-execstack=no \
$_cross_configure \
--sysconfdir=/etc \
$_arch_configure \
--enable-default-hash-style=gnu \
$no_textrels \
--with-pic \
--disable-werror \
$_cross_configure \
$_gold_configure \
$_plugin_configure \
--disable-gprofng \
--disable-multilib \
--disable-nls \
--disable-werror \
--enable-64-bit-bfd \
--enable-colored-disassembly \
--enable-default-execstack=no \
--enable-default-hash-style=gnu \
--enable-deterministic-archives \
--enable-ld=default \
--enable-new-dtags \
--enable-relro \
--enable-threads \
--with-bugurl="https://postmarketos.org/issues" \
--with-mmap \
--with-pic \
--with-system-zlib
make
}
@@ -142,6 +145,8 @@ gold() {
sha512sums="
a37e042523bc46494d99d5637c3f3d8f9956d9477b748b3b1f6d7dfbb8d968ed52c932e88a4e946c6f77b8f48f1e1b360ca54c3d298f17193f3b4963472f6925 binutils-2.40.tar.xz
ecee33b0e435aa704af1c334e560f201638ff79e199aa11ed78a72f7c9b46f85fbb227af5748e735fd681d1965fcc42ac81b0c8824e540430ce0c706c81e8b49 binutils-ld-fix-static-linking.patch
70ec22bd72ef6dddecfd970613387dd4a8cdc8730dd3cbf03d5a0c3a7c4d839383167bb06dad21bf7c235329fd44b5dc4aefe762f68544f17155cf002bf1be4a 0001-Revert-PR25882-.gnu.attributes-are-not-checked-for-s.patch
b434e126c4c3f70c02b0a5597a0d75a4ea99b1498552c2d0676005ac0ae171c56cf07a6f6e2faa1381f1f4d4a37043a07d177dd4912f09b61109f103853594b2 CVE-2023-1972.patch
ecee33b0e435aa704af1c334e560f201638ff79e199aa11ed78a72f7c9b46f85fbb227af5748e735fd681d1965fcc42ac81b0c8824e540430ce0c706c81e8b49 binutils-ld-fix-static-linking.patch
d138691d953c6f49111601df1731db157d2ecedf1593e37ababb5c12ff10572b5f7982288c81579f4a99097780dbb18d3b457f74daab0f935f59423e69cec56f riscv64-textrels.patch
"
+37
View File
@@ -0,0 +1,37 @@
Patch-Source: https://sourceware.org/git/?p=binutils-gdb.git;a=commitdiff;h=c22d38baefc5a7a1e1f5cdc9dbb556b1f0ec5c57;hp=f2f9bde5cde7ff34ed0a4c4682a211d402aa1086
https://sourceware.org/bugzilla/show_bug.cgi?id=30285
--
From: Nick Clifton <nickc@redhat.com>
Date: Thu, 30 Mar 2023 09:10:09 +0000 (+0100)
Subject: Fix an illegal memory access when an accessing a zer0-lengthverdef table.
X-Git-Url: https://sourceware.org/git/?p=binutils-gdb.git;a=commitdiff_plain;h=c22d38baefc5a7a1e1f5cdc9dbb556b1f0ec5c57;hp=f2f9bde5cde7ff34ed0a4c4682a211d402aa1086
Fix an illegal memory access when an accessing a zer0-lengthverdef table.
PR 30285
* elf.c (_bfd_elf_slurp_version_tables): Fail if no version definitions are allocated.
---
diff --git a/bfd/elf.c b/bfd/elf.c
index 027d0143735..185028cbd97 100644
--- a/bfd/elf.c
+++ b/bfd/elf.c
@@ -9030,6 +9030,9 @@ _bfd_elf_slurp_version_tables (bfd *abfd, bool default_imported_symver)
bfd_set_error (bfd_error_file_too_big);
goto error_return_verdef;
}
+
+ if (amt == 0)
+ goto error_return_verdef;
elf_tdata (abfd)->verdef = (Elf_Internal_Verdef *) bfd_zalloc (abfd, amt);
if (elf_tdata (abfd)->verdef == NULL)
goto error_return_verdef;
@@ -9133,6 +9136,8 @@ _bfd_elf_slurp_version_tables (bfd *abfd, bool default_imported_symver)
bfd_set_error (bfd_error_file_too_big);
goto error_return;
}
+ if (amt == 0)
+ goto error_return;
elf_tdata (abfd)->verdef = (Elf_Internal_Verdef *) bfd_zalloc (abfd, amt);
if (elf_tdata (abfd)->verdef == NULL)
goto error_return;
+103
View File
@@ -0,0 +1,103 @@
Patch-Source: https://sourceware.org/git/?p=binutils-gdb.git;a=commitdiff;h=225df051d3d4cf714d1791b9035966a6686b3f3d;hp=a70d5ba34cb64bbbb7df4f3055cf5b1967bdf61e#patch1
https://sourceware.org/bugzilla/show_bug.cgi?id=25694
--
From: Nelson Chu <nelson@nelson.ba.rivosinc.com>
Date: Thu, 4 May 2023 09:08:50 +0000 (+0800)
Subject: [PR ld/22263][PR ld/25694] RISC-V: Avoid dynamic TLS relocs in PIE.
X-Git-Url: https://sourceware.org/git/?p=binutils-gdb.git;a=commitdiff_plain;h=225df051d3d4cf714d1791b9035966a6686b3f3d;hp=a70d5ba34cb64bbbb7df4f3055cf5b1967bdf61e
[PR ld/22263][PR ld/25694] RISC-V: Avoid dynamic TLS relocs in PIE.
Lots of targets already fixed the TEXTREL problem for TLS in PIE.
* For PR ld/25694,
In the check_reloc, refer to spare and loongarch, they don't need to reserve
any local dynamic reloc for TLS LE in pie/pde, and similar to other targets.
So it seems like riscv was too conservative to estimate the TLS LE before.
Just break and don't goto static_reloc for TLS LE in pie/pde can fix the
TEXTREL problem.
* For PR ld/22263,
The risc-v code for TLS GD/IE in the relocate_section seems same as MIPS port.
So similar to MIPS, pr22570, commits 9143e72c6d4d and 1cb83cac9a89, it seems
also the right way to do the same thing for risc-v.
On risc-v, fixes
FAIL: Build pr22263-1
RISC-V haven't supported the TLS transitions, so will need the same fix (use
bfd_link_dll) in the future.
bfd/
PR ld/22263
PR ld/25694
* elfnn-riscv.c (riscv_elf_check_relocs): Replace bfd_link_pic with
bfd_link_dll for TLS IE. Don't need to reserve the local dynamic
relocation for TLS LE in pie/pde, and report error in pic just like
before.
(riscv_elf_relocate_section): For TLS GD/IE, use bfd_link_dll rather
than !bfd_link_pic in determining the dynamic symbol index. Avoid
the index of -1.
---
diff --git a/bfd/elfnn-riscv.c b/bfd/elfnn-riscv.c
index 75af040cf92..762ea231c0b 100644
--- a/bfd/elfnn-riscv.c
+++ b/bfd/elfnn-riscv.c
@@ -824,7 +824,7 @@ riscv_elf_check_relocs (bfd *abfd, struct bfd_link_info *info,
break;
case R_RISCV_TLS_GOT_HI20:
- if (bfd_link_pic (info))
+ if (bfd_link_dll (info))
info->flags |= DF_STATIC_TLS;
if (!riscv_elf_record_got_reference (abfd, info, h, r_symndx)
|| !riscv_elf_record_tls_type (abfd, h, r_symndx, GOT_TLS_IE))
@@ -920,11 +920,12 @@ riscv_elf_check_relocs (bfd *abfd, struct bfd_link_info *info,
goto static_reloc;
case R_RISCV_TPREL_HI20:
+ /* This is not allowed in the pic, but okay in pie. */
if (!bfd_link_executable (info))
return bad_static_reloc (abfd, r_type, h);
if (h != NULL)
riscv_elf_record_tls_type (abfd, h, r_symndx, GOT_TLS_LE);
- goto static_reloc;
+ break;
case R_RISCV_HI20:
if (bfd_link_pic (info))
@@ -2880,24 +2881,20 @@ riscv_elf_relocate_section (bfd *output_bfd,
if (htab->elf.srelgot == NULL)
abort ();
- if (h != NULL)
- {
- bool dyn, pic;
- dyn = htab->elf.dynamic_sections_created;
- pic = bfd_link_pic (info);
-
- if (WILL_CALL_FINISH_DYNAMIC_SYMBOL (dyn, pic, h)
- && (!pic || !SYMBOL_REFERENCES_LOCAL (info, h)))
- indx = h->dynindx;
- }
+ bool dyn = elf_hash_table (info)->dynamic_sections_created;
+ if (h != NULL
+ && h->dynindx != -1
+ && WILL_CALL_FINISH_DYNAMIC_SYMBOL (dyn, bfd_link_pic (info), h)
+ && (bfd_link_dll (info) || !SYMBOL_REFERENCES_LOCAL (info, h)))
+ indx = h->dynindx;
/* The GOT entries have not been initialized yet. Do it
now, and emit any relocations. */
- if ((bfd_link_pic (info) || indx != 0)
+ if ((bfd_link_dll (info) || indx != 0)
&& (h == NULL
|| ELF_ST_VISIBILITY (h->other) == STV_DEFAULT
|| h->root.type != bfd_link_hash_undefweak))
- need_relocs = true;
+ need_relocs = true;
if (tls_type & GOT_TLS_GD)
{
+36 -31
View File
@@ -8,21 +8,27 @@ CTARGET="$(arch_to_hostspec $CTARGET_ARCH)"
pkgname=binutils-armv7
pkgver=2.40
pkgrel=3
pkgrel=11
pkgdesc="Tools necessary to build programs for armv7 targets"
url="https://www.gnu.org/software/binutils/"
makedepends_build="bison flex texinfo"
makedepends_host="zlib-dev zstd-dev"
makedepends_host="zlib-dev jansson-dev zstd-dev"
makedepends="$makedepends_build $makedepends_host"
arch="x86_64"
license="GPL-2.0-or-later AND LGPL-2.1-or-later AND BSD-3-Clause"
subpackages="binutils-dev binutils-doc"
source="https://ftp.gnu.org/gnu/binutils/binutils-$pkgver.tar.xz
binutils-ld-fix-static-linking.patch
0001-Revert-PR25882-.gnu.attributes-are-not-checked-for-s.patch
CVE-2023-1972.patch
binutils-ld-fix-static-linking.patch
riscv64-textrels.patch
"
builddir="$srcdir/binutils-$pkgver"
if [ -z "$BOOTSTRAP" ]; then
makedepends_host="$makedepends_host jansson-dev zstd-dev"
fi
if [ "$CHOST" = "$CBUILD" ] && [ "$CBUILD" = "$CTARGET" ] && [ "$CTARGET_ARCH" != "riscv64" ]; then
subpackages="$subpackages binutils-gold"
fi
@@ -34,6 +40,10 @@ if [ "$CHOST" != "$CTARGET" ]; then
fi
# secfixes:
# 2.40-r10:
# - CVE-2023-1972
# 2.40-r0:
# - CVE-2023-1579
# 2.39-r2:
# - CVE-2022-38533
# 2.39-r0:
@@ -55,19 +65,6 @@ build() {
local _gold_configure="--disable-gold"
local _plugin_configure="--enable-plugins"
case "$CARCH" in
riscv64)
# binutils creates empty textrels here
# https://sourceware.org/bugzilla/show_bug.cgi?id=25694
local no_textrels=""
;;
*)
# set -z text by default
# this is the default for linkers such as ld.lld too
local no_textrels="--enable-textrel-check=error"
;;
esac
if [ "$CHOST" != "$CTARGET" ]; then
_sysroot="$CBUILDROOT"
_cross_configure="--disable-install-libiberty"
@@ -86,6 +83,8 @@ build() {
_gold_configure="--disable-gold"
fi
CFLAGS="$CFLAGS -O2" \
CXXFLAGS="$CXXFLAGS -O2" \
./configure \
--build=$CBUILD \
--host=$CHOST \
@@ -95,23 +94,27 @@ build() {
--prefix=/usr \
--mandir=/usr/share/man \
--infodir=/usr/share/info \
--disable-multilib \
--disable-gprofng \
--enable-ld=default \
$_gold_configure \
--enable-64-bit-bfd \
$_plugin_configure \
--enable-relro \
--enable-deterministic-archives \
--enable-default-execstack=no \
$_cross_configure \
--sysconfdir=/etc \
$_arch_configure \
--enable-default-hash-style=gnu \
$no_textrels \
--with-pic \
--disable-werror \
$_cross_configure \
$_gold_configure \
$_plugin_configure \
--disable-gprofng \
--disable-multilib \
--disable-nls \
--disable-werror \
--enable-64-bit-bfd \
--enable-colored-disassembly \
--enable-default-execstack=no \
--enable-default-hash-style=gnu \
--enable-deterministic-archives \
--enable-ld=default \
--enable-new-dtags \
--enable-relro \
--enable-threads \
--with-bugurl="https://postmarketos.org/issues" \
--with-mmap \
--with-pic \
--with-system-zlib
make
}
@@ -142,6 +145,8 @@ gold() {
sha512sums="
a37e042523bc46494d99d5637c3f3d8f9956d9477b748b3b1f6d7dfbb8d968ed52c932e88a4e946c6f77b8f48f1e1b360ca54c3d298f17193f3b4963472f6925 binutils-2.40.tar.xz
ecee33b0e435aa704af1c334e560f201638ff79e199aa11ed78a72f7c9b46f85fbb227af5748e735fd681d1965fcc42ac81b0c8824e540430ce0c706c81e8b49 binutils-ld-fix-static-linking.patch
70ec22bd72ef6dddecfd970613387dd4a8cdc8730dd3cbf03d5a0c3a7c4d839383167bb06dad21bf7c235329fd44b5dc4aefe762f68544f17155cf002bf1be4a 0001-Revert-PR25882-.gnu.attributes-are-not-checked-for-s.patch
b434e126c4c3f70c02b0a5597a0d75a4ea99b1498552c2d0676005ac0ae171c56cf07a6f6e2faa1381f1f4d4a37043a07d177dd4912f09b61109f103853594b2 CVE-2023-1972.patch
ecee33b0e435aa704af1c334e560f201638ff79e199aa11ed78a72f7c9b46f85fbb227af5748e735fd681d1965fcc42ac81b0c8824e540430ce0c706c81e8b49 binutils-ld-fix-static-linking.patch
d138691d953c6f49111601df1731db157d2ecedf1593e37ababb5c12ff10572b5f7982288c81579f4a99097780dbb18d3b457f74daab0f935f59423e69cec56f riscv64-textrels.patch
"
+37
View File
@@ -0,0 +1,37 @@
Patch-Source: https://sourceware.org/git/?p=binutils-gdb.git;a=commitdiff;h=c22d38baefc5a7a1e1f5cdc9dbb556b1f0ec5c57;hp=f2f9bde5cde7ff34ed0a4c4682a211d402aa1086
https://sourceware.org/bugzilla/show_bug.cgi?id=30285
--
From: Nick Clifton <nickc@redhat.com>
Date: Thu, 30 Mar 2023 09:10:09 +0000 (+0100)
Subject: Fix an illegal memory access when an accessing a zer0-lengthverdef table.
X-Git-Url: https://sourceware.org/git/?p=binutils-gdb.git;a=commitdiff_plain;h=c22d38baefc5a7a1e1f5cdc9dbb556b1f0ec5c57;hp=f2f9bde5cde7ff34ed0a4c4682a211d402aa1086
Fix an illegal memory access when an accessing a zer0-lengthverdef table.
PR 30285
* elf.c (_bfd_elf_slurp_version_tables): Fail if no version definitions are allocated.
---
diff --git a/bfd/elf.c b/bfd/elf.c
index 027d0143735..185028cbd97 100644
--- a/bfd/elf.c
+++ b/bfd/elf.c
@@ -9030,6 +9030,9 @@ _bfd_elf_slurp_version_tables (bfd *abfd, bool default_imported_symver)
bfd_set_error (bfd_error_file_too_big);
goto error_return_verdef;
}
+
+ if (amt == 0)
+ goto error_return_verdef;
elf_tdata (abfd)->verdef = (Elf_Internal_Verdef *) bfd_zalloc (abfd, amt);
if (elf_tdata (abfd)->verdef == NULL)
goto error_return_verdef;
@@ -9133,6 +9136,8 @@ _bfd_elf_slurp_version_tables (bfd *abfd, bool default_imported_symver)
bfd_set_error (bfd_error_file_too_big);
goto error_return;
}
+ if (amt == 0)
+ goto error_return;
elf_tdata (abfd)->verdef = (Elf_Internal_Verdef *) bfd_zalloc (abfd, amt);
if (elf_tdata (abfd)->verdef == NULL)
goto error_return;
+103
View File
@@ -0,0 +1,103 @@
Patch-Source: https://sourceware.org/git/?p=binutils-gdb.git;a=commitdiff;h=225df051d3d4cf714d1791b9035966a6686b3f3d;hp=a70d5ba34cb64bbbb7df4f3055cf5b1967bdf61e#patch1
https://sourceware.org/bugzilla/show_bug.cgi?id=25694
--
From: Nelson Chu <nelson@nelson.ba.rivosinc.com>
Date: Thu, 4 May 2023 09:08:50 +0000 (+0800)
Subject: [PR ld/22263][PR ld/25694] RISC-V: Avoid dynamic TLS relocs in PIE.
X-Git-Url: https://sourceware.org/git/?p=binutils-gdb.git;a=commitdiff_plain;h=225df051d3d4cf714d1791b9035966a6686b3f3d;hp=a70d5ba34cb64bbbb7df4f3055cf5b1967bdf61e
[PR ld/22263][PR ld/25694] RISC-V: Avoid dynamic TLS relocs in PIE.
Lots of targets already fixed the TEXTREL problem for TLS in PIE.
* For PR ld/25694,
In the check_reloc, refer to spare and loongarch, they don't need to reserve
any local dynamic reloc for TLS LE in pie/pde, and similar to other targets.
So it seems like riscv was too conservative to estimate the TLS LE before.
Just break and don't goto static_reloc for TLS LE in pie/pde can fix the
TEXTREL problem.
* For PR ld/22263,
The risc-v code for TLS GD/IE in the relocate_section seems same as MIPS port.
So similar to MIPS, pr22570, commits 9143e72c6d4d and 1cb83cac9a89, it seems
also the right way to do the same thing for risc-v.
On risc-v, fixes
FAIL: Build pr22263-1
RISC-V haven't supported the TLS transitions, so will need the same fix (use
bfd_link_dll) in the future.
bfd/
PR ld/22263
PR ld/25694
* elfnn-riscv.c (riscv_elf_check_relocs): Replace bfd_link_pic with
bfd_link_dll for TLS IE. Don't need to reserve the local dynamic
relocation for TLS LE in pie/pde, and report error in pic just like
before.
(riscv_elf_relocate_section): For TLS GD/IE, use bfd_link_dll rather
than !bfd_link_pic in determining the dynamic symbol index. Avoid
the index of -1.
---
diff --git a/bfd/elfnn-riscv.c b/bfd/elfnn-riscv.c
index 75af040cf92..762ea231c0b 100644
--- a/bfd/elfnn-riscv.c
+++ b/bfd/elfnn-riscv.c
@@ -824,7 +824,7 @@ riscv_elf_check_relocs (bfd *abfd, struct bfd_link_info *info,
break;
case R_RISCV_TLS_GOT_HI20:
- if (bfd_link_pic (info))
+ if (bfd_link_dll (info))
info->flags |= DF_STATIC_TLS;
if (!riscv_elf_record_got_reference (abfd, info, h, r_symndx)
|| !riscv_elf_record_tls_type (abfd, h, r_symndx, GOT_TLS_IE))
@@ -920,11 +920,12 @@ riscv_elf_check_relocs (bfd *abfd, struct bfd_link_info *info,
goto static_reloc;
case R_RISCV_TPREL_HI20:
+ /* This is not allowed in the pic, but okay in pie. */
if (!bfd_link_executable (info))
return bad_static_reloc (abfd, r_type, h);
if (h != NULL)
riscv_elf_record_tls_type (abfd, h, r_symndx, GOT_TLS_LE);
- goto static_reloc;
+ break;
case R_RISCV_HI20:
if (bfd_link_pic (info))
@@ -2880,24 +2881,20 @@ riscv_elf_relocate_section (bfd *output_bfd,
if (htab->elf.srelgot == NULL)
abort ();
- if (h != NULL)
- {
- bool dyn, pic;
- dyn = htab->elf.dynamic_sections_created;
- pic = bfd_link_pic (info);
-
- if (WILL_CALL_FINISH_DYNAMIC_SYMBOL (dyn, pic, h)
- && (!pic || !SYMBOL_REFERENCES_LOCAL (info, h)))
- indx = h->dynindx;
- }
+ bool dyn = elf_hash_table (info)->dynamic_sections_created;
+ if (h != NULL
+ && h->dynindx != -1
+ && WILL_CALL_FINISH_DYNAMIC_SYMBOL (dyn, bfd_link_pic (info), h)
+ && (bfd_link_dll (info) || !SYMBOL_REFERENCES_LOCAL (info, h)))
+ indx = h->dynindx;
/* The GOT entries have not been initialized yet. Do it
now, and emit any relocations. */
- if ((bfd_link_pic (info) || indx != 0)
+ if ((bfd_link_dll (info) || indx != 0)
&& (h == NULL
|| ELF_ST_VISIBILITY (h->other) == STV_DEFAULT
|| h->root.type != bfd_link_hash_undefweak))
- need_relocs = true;
+ need_relocs = true;
if (tls_type & GOT_TLS_GD)
{
+36 -31
View File
@@ -8,21 +8,27 @@ CTARGET="$(arch_to_hostspec $CTARGET_ARCH)"
pkgname=binutils-riscv64
pkgver=2.40
pkgrel=3
pkgrel=11
pkgdesc="Tools necessary to build programs for riscv64 targets"
url="https://www.gnu.org/software/binutils/"
makedepends_build="bison flex texinfo"
makedepends_host="zlib-dev zstd-dev"
makedepends_host="zlib-dev jansson-dev zstd-dev"
makedepends="$makedepends_build $makedepends_host"
arch="x86_64"
license="GPL-2.0-or-later AND LGPL-2.1-or-later AND BSD-3-Clause"
subpackages="binutils-dev binutils-doc"
source="https://ftp.gnu.org/gnu/binutils/binutils-$pkgver.tar.xz
binutils-ld-fix-static-linking.patch
0001-Revert-PR25882-.gnu.attributes-are-not-checked-for-s.patch
CVE-2023-1972.patch
binutils-ld-fix-static-linking.patch
riscv64-textrels.patch
"
builddir="$srcdir/binutils-$pkgver"
if [ -z "$BOOTSTRAP" ]; then
makedepends_host="$makedepends_host jansson-dev zstd-dev"
fi
if [ "$CHOST" = "$CBUILD" ] && [ "$CBUILD" = "$CTARGET" ] && [ "$CTARGET_ARCH" != "riscv64" ]; then
subpackages="$subpackages binutils-gold"
fi
@@ -34,6 +40,10 @@ if [ "$CHOST" != "$CTARGET" ]; then
fi
# secfixes:
# 2.40-r10:
# - CVE-2023-1972
# 2.40-r0:
# - CVE-2023-1579
# 2.39-r2:
# - CVE-2022-38533
# 2.39-r0:
@@ -55,19 +65,6 @@ build() {
local _gold_configure="--disable-gold"
local _plugin_configure="--enable-plugins"
case "$CARCH" in
riscv64)
# binutils creates empty textrels here
# https://sourceware.org/bugzilla/show_bug.cgi?id=25694
local no_textrels=""
;;
*)
# set -z text by default
# this is the default for linkers such as ld.lld too
local no_textrels="--enable-textrel-check=error"
;;
esac
if [ "$CHOST" != "$CTARGET" ]; then
_sysroot="$CBUILDROOT"
_cross_configure="--disable-install-libiberty"
@@ -86,6 +83,8 @@ build() {
_gold_configure="--disable-gold"
fi
CFLAGS="$CFLAGS -O2" \
CXXFLAGS="$CXXFLAGS -O2" \
./configure \
--build=$CBUILD \
--host=$CHOST \
@@ -95,23 +94,27 @@ build() {
--prefix=/usr \
--mandir=/usr/share/man \
--infodir=/usr/share/info \
--disable-multilib \
--disable-gprofng \
--enable-ld=default \
$_gold_configure \
--enable-64-bit-bfd \
$_plugin_configure \
--enable-relro \
--enable-deterministic-archives \
--enable-default-execstack=no \
$_cross_configure \
--sysconfdir=/etc \
$_arch_configure \
--enable-default-hash-style=gnu \
$no_textrels \
--with-pic \
--disable-werror \
$_cross_configure \
$_gold_configure \
$_plugin_configure \
--disable-gprofng \
--disable-multilib \
--disable-nls \
--disable-werror \
--enable-64-bit-bfd \
--enable-colored-disassembly \
--enable-default-execstack=no \
--enable-default-hash-style=gnu \
--enable-deterministic-archives \
--enable-ld=default \
--enable-new-dtags \
--enable-relro \
--enable-threads \
--with-bugurl="https://postmarketos.org/issues" \
--with-mmap \
--with-pic \
--with-system-zlib
make
}
@@ -142,6 +145,8 @@ gold() {
sha512sums="
a37e042523bc46494d99d5637c3f3d8f9956d9477b748b3b1f6d7dfbb8d968ed52c932e88a4e946c6f77b8f48f1e1b360ca54c3d298f17193f3b4963472f6925 binutils-2.40.tar.xz
ecee33b0e435aa704af1c334e560f201638ff79e199aa11ed78a72f7c9b46f85fbb227af5748e735fd681d1965fcc42ac81b0c8824e540430ce0c706c81e8b49 binutils-ld-fix-static-linking.patch
70ec22bd72ef6dddecfd970613387dd4a8cdc8730dd3cbf03d5a0c3a7c4d839383167bb06dad21bf7c235329fd44b5dc4aefe762f68544f17155cf002bf1be4a 0001-Revert-PR25882-.gnu.attributes-are-not-checked-for-s.patch
b434e126c4c3f70c02b0a5597a0d75a4ea99b1498552c2d0676005ac0ae171c56cf07a6f6e2faa1381f1f4d4a37043a07d177dd4912f09b61109f103853594b2 CVE-2023-1972.patch
ecee33b0e435aa704af1c334e560f201638ff79e199aa11ed78a72f7c9b46f85fbb227af5748e735fd681d1965fcc42ac81b0c8824e540430ce0c706c81e8b49 binutils-ld-fix-static-linking.patch
d138691d953c6f49111601df1731db157d2ecedf1593e37ababb5c12ff10572b5f7982288c81579f4a99097780dbb18d3b457f74daab0f935f59423e69cec56f riscv64-textrels.patch
"
@@ -0,0 +1,37 @@
Patch-Source: https://sourceware.org/git/?p=binutils-gdb.git;a=commitdiff;h=c22d38baefc5a7a1e1f5cdc9dbb556b1f0ec5c57;hp=f2f9bde5cde7ff34ed0a4c4682a211d402aa1086
https://sourceware.org/bugzilla/show_bug.cgi?id=30285
--
From: Nick Clifton <nickc@redhat.com>
Date: Thu, 30 Mar 2023 09:10:09 +0000 (+0100)
Subject: Fix an illegal memory access when an accessing a zer0-lengthverdef table.
X-Git-Url: https://sourceware.org/git/?p=binutils-gdb.git;a=commitdiff_plain;h=c22d38baefc5a7a1e1f5cdc9dbb556b1f0ec5c57;hp=f2f9bde5cde7ff34ed0a4c4682a211d402aa1086
Fix an illegal memory access when an accessing a zer0-lengthverdef table.
PR 30285
* elf.c (_bfd_elf_slurp_version_tables): Fail if no version definitions are allocated.
---
diff --git a/bfd/elf.c b/bfd/elf.c
index 027d0143735..185028cbd97 100644
--- a/bfd/elf.c
+++ b/bfd/elf.c
@@ -9030,6 +9030,9 @@ _bfd_elf_slurp_version_tables (bfd *abfd, bool default_imported_symver)
bfd_set_error (bfd_error_file_too_big);
goto error_return_verdef;
}
+
+ if (amt == 0)
+ goto error_return_verdef;
elf_tdata (abfd)->verdef = (Elf_Internal_Verdef *) bfd_zalloc (abfd, amt);
if (elf_tdata (abfd)->verdef == NULL)
goto error_return_verdef;
@@ -9133,6 +9136,8 @@ _bfd_elf_slurp_version_tables (bfd *abfd, bool default_imported_symver)
bfd_set_error (bfd_error_file_too_big);
goto error_return;
}
+ if (amt == 0)
+ goto error_return;
elf_tdata (abfd)->verdef = (Elf_Internal_Verdef *) bfd_zalloc (abfd, amt);
if (elf_tdata (abfd)->verdef == NULL)
goto error_return;
@@ -0,0 +1,103 @@
Patch-Source: https://sourceware.org/git/?p=binutils-gdb.git;a=commitdiff;h=225df051d3d4cf714d1791b9035966a6686b3f3d;hp=a70d5ba34cb64bbbb7df4f3055cf5b1967bdf61e#patch1
https://sourceware.org/bugzilla/show_bug.cgi?id=25694
--
From: Nelson Chu <nelson@nelson.ba.rivosinc.com>
Date: Thu, 4 May 2023 09:08:50 +0000 (+0800)
Subject: [PR ld/22263][PR ld/25694] RISC-V: Avoid dynamic TLS relocs in PIE.
X-Git-Url: https://sourceware.org/git/?p=binutils-gdb.git;a=commitdiff_plain;h=225df051d3d4cf714d1791b9035966a6686b3f3d;hp=a70d5ba34cb64bbbb7df4f3055cf5b1967bdf61e
[PR ld/22263][PR ld/25694] RISC-V: Avoid dynamic TLS relocs in PIE.
Lots of targets already fixed the TEXTREL problem for TLS in PIE.
* For PR ld/25694,
In the check_reloc, refer to spare and loongarch, they don't need to reserve
any local dynamic reloc for TLS LE in pie/pde, and similar to other targets.
So it seems like riscv was too conservative to estimate the TLS LE before.
Just break and don't goto static_reloc for TLS LE in pie/pde can fix the
TEXTREL problem.
* For PR ld/22263,
The risc-v code for TLS GD/IE in the relocate_section seems same as MIPS port.
So similar to MIPS, pr22570, commits 9143e72c6d4d and 1cb83cac9a89, it seems
also the right way to do the same thing for risc-v.
On risc-v, fixes
FAIL: Build pr22263-1
RISC-V haven't supported the TLS transitions, so will need the same fix (use
bfd_link_dll) in the future.
bfd/
PR ld/22263
PR ld/25694
* elfnn-riscv.c (riscv_elf_check_relocs): Replace bfd_link_pic with
bfd_link_dll for TLS IE. Don't need to reserve the local dynamic
relocation for TLS LE in pie/pde, and report error in pic just like
before.
(riscv_elf_relocate_section): For TLS GD/IE, use bfd_link_dll rather
than !bfd_link_pic in determining the dynamic symbol index. Avoid
the index of -1.
---
diff --git a/bfd/elfnn-riscv.c b/bfd/elfnn-riscv.c
index 75af040cf92..762ea231c0b 100644
--- a/bfd/elfnn-riscv.c
+++ b/bfd/elfnn-riscv.c
@@ -824,7 +824,7 @@ riscv_elf_check_relocs (bfd *abfd, struct bfd_link_info *info,
break;
case R_RISCV_TLS_GOT_HI20:
- if (bfd_link_pic (info))
+ if (bfd_link_dll (info))
info->flags |= DF_STATIC_TLS;
if (!riscv_elf_record_got_reference (abfd, info, h, r_symndx)
|| !riscv_elf_record_tls_type (abfd, h, r_symndx, GOT_TLS_IE))
@@ -920,11 +920,12 @@ riscv_elf_check_relocs (bfd *abfd, struct bfd_link_info *info,
goto static_reloc;
case R_RISCV_TPREL_HI20:
+ /* This is not allowed in the pic, but okay in pie. */
if (!bfd_link_executable (info))
return bad_static_reloc (abfd, r_type, h);
if (h != NULL)
riscv_elf_record_tls_type (abfd, h, r_symndx, GOT_TLS_LE);
- goto static_reloc;
+ break;
case R_RISCV_HI20:
if (bfd_link_pic (info))
@@ -2880,24 +2881,20 @@ riscv_elf_relocate_section (bfd *output_bfd,
if (htab->elf.srelgot == NULL)
abort ();
- if (h != NULL)
- {
- bool dyn, pic;
- dyn = htab->elf.dynamic_sections_created;
- pic = bfd_link_pic (info);
-
- if (WILL_CALL_FINISH_DYNAMIC_SYMBOL (dyn, pic, h)
- && (!pic || !SYMBOL_REFERENCES_LOCAL (info, h)))
- indx = h->dynindx;
- }
+ bool dyn = elf_hash_table (info)->dynamic_sections_created;
+ if (h != NULL
+ && h->dynindx != -1
+ && WILL_CALL_FINISH_DYNAMIC_SYMBOL (dyn, bfd_link_pic (info), h)
+ && (bfd_link_dll (info) || !SYMBOL_REFERENCES_LOCAL (info, h)))
+ indx = h->dynindx;
/* The GOT entries have not been initialized yet. Do it
now, and emit any relocations. */
- if ((bfd_link_pic (info) || indx != 0)
+ if ((bfd_link_dll (info) || indx != 0)
&& (h == NULL
|| ELF_ST_VISIBILITY (h->other) == STV_DEFAULT
|| h->root.type != bfd_link_hash_undefweak))
- need_relocs = true;
+ need_relocs = true;
if (tls_type & GOT_TLS_GD)
{
+3 -3
View File
@@ -7,8 +7,8 @@ if [ -z "$(type -t arch_to_hostspec)" ]; then
fi
pkgname=busybox-static-aarch64
pkgver=1.36.0
pkgrel=6
pkgver=1.36.1
pkgrel=0
_arch="aarch64"
_mirror="http://dl-4.alpinelinux.org/alpine/"
@@ -32,5 +32,5 @@ package() {
}
sha512sums="
85af89c440bdb347190466d8521ce59b28dd713bfb7a4adf750e51c9f8099348c6c417eeb744b402ee84314ea6e8e9718ee40bc64ef051ef6f57af126c7a4e74 busybox-static-1.36.0-r6-aarch64-edge.apk
d4977cf4654bb5659d4e6d91785832d3fd418403b70f1619c26aa305839d64c131c6389979793896af0fb0d9e8fc2b99537dbeb65133465d7d983576902dff34 busybox-static-1.36.1-r0-aarch64-edge.apk
"
+3 -3
View File
@@ -7,8 +7,8 @@ if [ -z "$(type -t arch_to_hostspec)" ]; then
fi
pkgname=busybox-static-armhf
pkgver=1.36.0
pkgrel=6
pkgver=1.36.1
pkgrel=0
_arch="armhf"
_mirror="http://dl-4.alpinelinux.org/alpine/"
@@ -32,5 +32,5 @@ package() {
}
sha512sums="
146709b156c917e61051f6aa61f9208b39b6bd5922e2a92370251d9a8fbfc4240647f550cd13483d0bbd3b844841049cb87b72febf126742fd04c8235293ab3a busybox-static-1.36.0-r6-armhf-edge.apk
eece41953046c99029ec4a0707c1fd4270d43b497f05cf63070deef376fc28f61bcdfa8b9f34e23305ba459a633909eb1682fbe183206b69dea8be3742479ae7 busybox-static-1.36.1-r0-armhf-edge.apk
"
+3 -3
View File
@@ -7,8 +7,8 @@ if [ -z "$(type -t arch_to_hostspec)" ]; then
fi
pkgname=busybox-static-armv7
pkgver=1.36.0
pkgrel=6
pkgver=1.36.1
pkgrel=0
_arch="armv7"
_mirror="http://dl-4.alpinelinux.org/alpine/"
@@ -32,5 +32,5 @@ package() {
}
sha512sums="
e3ee6e88fe6d38762650fa3c81e1fd3abb43c537beccd828e49c73b29b4760f9f244ec74fe35038899b66ee9e8cbfcbad5da6bfda453f0a6ff57e5eedcbf056a busybox-static-1.36.0-r6-armv7-edge.apk
29df2ea5d83535632308524064dbb43bf9ed147ab1112bed76b1fc70b519d7dc3e4083c51527e80129a455a001479569641b710f58fdad8538852061d4880660 busybox-static-1.36.1-r0-armv7-edge.apk
"
+6 -3
View File
@@ -1,14 +1,14 @@
From 74c7b0df9971b6bc75d7d172c2819ffd21d51050 Mon Sep 17 00:00:00 2001
From 3e5acbe356124aa5d8dde0635d652c065a553e7d Mon Sep 17 00:00:00 2001
From: Szabolcs Nagy <nsz@port70.net>
Date: Fri, 26 Jan 2018 20:32:50 +0000
Subject: [PATCH] posix_memalign
Subject: [PATCH 01/33] posix_memalign
---
gcc/config/i386/pmm_malloc.h | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/gcc/config/i386/pmm_malloc.h b/gcc/config/i386/pmm_malloc.h
index 3b2e4f47915..20f790904a2 100644
index 3527283693b..c4071b64b53 100644
--- a/gcc/config/i386/pmm_malloc.h
+++ b/gcc/config/i386/pmm_malloc.h
@@ -27,12 +27,13 @@
@@ -37,3 +37,6 @@ index 3b2e4f47915..20f790904a2 100644
return __ptr;
else
return NULL;
--
2.40.1
@@ -1,7 +1,7 @@
From dd1e75ff4ecda96957465b34681f245e818928bd Mon Sep 17 00:00:00 2001
From f986a4a1224fa7d452b415d690aead8d356a7eae Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Fri, 29 Mar 2013 08:59:00 +0400
Subject: [PATCH] gcc: poison-system-directories
Subject: [PATCH 02/33] gcc: poison-system-directories
Add /sw/include and /opt/include based on the original
zecke-no-host-includes.patch patch. The original patch checked for
@@ -26,10 +26,10 @@ Upstream-Status: Pending
7 files changed, 68 insertions(+)
diff --git a/gcc/common.opt b/gcc/common.opt
index 8a0dafc522d..0357868e22c 100644
index 862c474d3c8..64c4277c991 100644
--- a/gcc/common.opt
+++ b/gcc/common.opt
@@ -710,6 +710,10 @@ Wreturn-local-addr
@@ -711,6 +711,10 @@ Wreturn-local-addr
Common Var(warn_return_local_addr) Init(1) Warning
Warn about returning a pointer/reference to a local or temporary variable.
@@ -41,10 +41,10 @@ index 8a0dafc522d..0357868e22c 100644
Common Var(warn_shadow) Warning
Warn when one variable shadows another. Same as -Wshadow=global.
diff --git a/gcc/config.in b/gcc/config.in
index 64c27c9cfac..f0fbf123aa8 100644
index 4cad077bfbe..0679fbbf4c6 100644
--- a/gcc/config.in
+++ b/gcc/config.in
@@ -230,6 +230,12 @@
@@ -236,6 +236,12 @@
#endif
@@ -58,10 +58,10 @@ index 64c27c9cfac..f0fbf123aa8 100644
optimizer and back end) to be checked for dynamic type safety at runtime.
This is quite expensive. */
diff --git a/gcc/configure b/gcc/configure
index 5ce0557719a..e9060112384 100755
index c7b26d1927d..8c46369f73f 100755
--- a/gcc/configure
+++ b/gcc/configure
@@ -1023,6 +1023,7 @@ enable_maintainer_mode
@@ -1026,6 +1026,7 @@ enable_maintainer_mode
enable_link_mutex
enable_link_serialization
enable_version_specific_runtime_libs
@@ -69,7 +69,7 @@ index 5ce0557719a..e9060112384 100755
enable_plugin
enable_host_shared
enable_libquadmath_support
@@ -1785,6 +1786,8 @@ Optional Features:
@@ -1788,6 +1789,8 @@ Optional Features:
--enable-version-specific-runtime-libs
specify that runtime libraries should be installed
in a compiler-specific directory
@@ -78,7 +78,7 @@ index 5ce0557719a..e9060112384 100755
--enable-plugin enable plugin support
--enable-host-shared build host code as shared libraries
--disable-libquadmath-support
@@ -31982,6 +31985,19 @@ if test "${enable_version_specific_runtime_libs+set}" = set; then :
@@ -31753,6 +31756,19 @@ if test "${enable_version_specific_runtime_libs+set}" = set; then :
fi
@@ -99,10 +99,10 @@ index 5ce0557719a..e9060112384 100755
diff --git a/gcc/configure.ac b/gcc/configure.ac
index 23bee7010a3..75a7048045c 100644
index 09082e8ccae..5504bf6eb01 100644
--- a/gcc/configure.ac
+++ b/gcc/configure.ac
@@ -7421,6 +7421,16 @@ AC_ARG_ENABLE(version-specific-runtime-libs,
@@ -7292,6 +7292,16 @@ AC_ARG_ENABLE(version-specific-runtime-libs,
[specify that runtime libraries should be
installed in a compiler-specific directory])])
@@ -120,37 +120,37 @@ index 23bee7010a3..75a7048045c 100644
AC_SUBST(subdirs)
AC_SUBST(srcdir)
diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
index 07b440190c3..b2de464798a 100644
index c0c3ad14515..7cdd5bfa952 100644
--- a/gcc/doc/invoke.texi
+++ b/gcc/doc/invoke.texi
@@ -379,6 +379,7 @@ Objective-C and Objective-C++ Dialects}.
-Wpacked -Wno-packed-bitfield-compat -Wpacked-not-aligned -Wpadded @gol
-Wparentheses -Wno-pedantic-ms-format @gol
-Wpointer-arith -Wno-pointer-compare -Wno-pointer-to-int-cast @gol
+-Wno-poison-system-directories @gol
-Wno-pragmas -Wno-prio-ctor-dtor -Wredundant-decls @gol
-Wrestrict -Wno-return-local-addr -Wreturn-type @gol
-Wno-scalar-storage-order -Wsequence-point @gol
@@ -8029,6 +8030,14 @@ made up of data only and thus requires no special treatment. But, for
@@ -384,6 +384,7 @@ Objective-C and Objective-C++ Dialects}.
-Wpacked -Wno-packed-bitfield-compat -Wpacked-not-aligned -Wpadded
-Wparentheses -Wno-pedantic-ms-format
-Wpointer-arith -Wno-pointer-compare -Wno-pointer-to-int-cast
+-Wno-poison-system-directories
-Wno-pragmas -Wno-prio-ctor-dtor -Wredundant-decls
-Wrestrict -Wno-return-local-addr -Wreturn-type
-Wno-scalar-storage-order -Wsequence-point
@@ -8424,6 +8425,14 @@ made up of data only and thus requires no special treatment. But, for
most targets, it is made up of code and thus requires the stack to be
made executable in order for the program to work properly.
+@item -Wno-poison-system-directories
+@opindex Wno-poison-system-directories
+@item -Wno-poison-system-directories
+Do not warn for @option{-I} or @option{-L} options using system
+directories such as @file{/usr/include} when cross compiling. This
+option is intended for use in chroot environments when such
+directories contain the correct headers and libraries for the target
+system rather than the host.
+
@item -Wfloat-equal
@opindex Wfloat-equal
@opindex Wno-float-equal
@item -Wfloat-equal
diff --git a/gcc/gcc.cc b/gcc/gcc.cc
index bb07cc244e3..47fb5802194 100644
index 16bb07f2cdc..33b56e721d2 100644
--- a/gcc/gcc.cc
+++ b/gcc/gcc.cc
@@ -1159,6 +1159,8 @@ proper position among the other output files. */
@@ -1146,6 +1146,8 @@ proper position among the other output files. */
"%{fuse-ld=*:-fuse-ld=%*} " LINK_COMPRESS_DEBUG_SPEC \
"%X %{o*} %{e*} %{N} %{n} %{r}\
%{s} %{t} %{u*} %{z} %{Z} %{!nostdlib:%{!r:%{!nostartfiles:%S}}} \
@@ -160,7 +160,7 @@ index bb07cc244e3..47fb5802194 100644
VTABLE_VERIFICATION_SPEC " " SANITIZER_EARLY_SPEC " %o "" \
%{fopenacc|fopenmp|%:gt(%{ftree-parallelize-loops=*:%*} 1):\
diff --git a/gcc/incpath.cc b/gcc/incpath.cc
index bd2a97938eb..c80f100f476 100644
index 4d44321183f..0f3f071b44c 100644
--- a/gcc/incpath.cc
+++ b/gcc/incpath.cc
@@ -26,6 +26,7 @@
@@ -198,3 +198,6 @@ index bd2a97938eb..c80f100f476 100644
}
/* Use given -I paths for #include "..." but not #include <...>, and
--
2.40.1
@@ -1,7 +1,7 @@
From 40e45739e7d3787acd13b5b9a4c27d843de0ffe2 Mon Sep 17 00:00:00 2001
From 31e2b60000e779ef775daa306120eabcf987852a Mon Sep 17 00:00:00 2001
From: Ariadne Conill <ariadne@dereferenced.org>
Date: Fri, 21 Aug 2020 06:45:49 +0000
Subject: [PATCH] specs: turn on -Wl,-z,now by default
Subject: [PATCH 03/33] specs: turn on -Wl,-z,now by default
Previously, we also used to turn on -z relro here, but we now build
binutils with --enable-relro, which is functionally equivalent.
@@ -14,24 +14,24 @@ now by default.
2 files changed, 4 insertions(+)
diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
index b2de464798a..83bd1bde433 100644
index 7cdd5bfa952..158b7bcb81e 100644
--- a/gcc/doc/invoke.texi
+++ b/gcc/doc/invoke.texi
@@ -16872,6 +16872,9 @@ For example, @option{-Wl,-Map,output.map} passes @option{-Map output.map} to the
@@ -17959,6 +17959,9 @@ For example, @option{-Wl,-Map,output.map} passes @option{-Map output.map} to the
linker. When using the GNU linker, you can also get the same effect with
@option{-Wl,-Map=output.map}.
+NOTE: In Alpine Linux, for LDFLAGS, the option
+@option{-Wl,-z,now} is used. To disable, use @option{-Wl,-z,nonow}.
+
@item -u @var{symbol}
@opindex u
@item -u @var{symbol}
Pretend the symbol @var{symbol} is undefined, to force linking of
diff --git a/gcc/gcc.cc b/gcc/gcc.cc
index 47fb5802194..d18b5d7b59a 100644
index 33b56e721d2..f82fae23c22 100644
--- a/gcc/gcc.cc
+++ b/gcc/gcc.cc
@@ -1157,6 +1157,7 @@ proper position among the other output files. */
@@ -1144,6 +1144,7 @@ proper position among the other output files. */
"%{flto|flto=*:%<fcompare-debug*} \
%{flto} %{fno-lto} %{flto=*} %l " LINK_PIE_SPEC \
"%{fuse-ld=*:-fuse-ld=%*} " LINK_COMPRESS_DEBUG_SPEC \
@@ -39,3 +39,6 @@ index 47fb5802194..d18b5d7b59a 100644
"%X %{o*} %{e*} %{N} %{n} %{r}\
%{s} %{t} %{u*} %{z} %{Z} %{!nostdlib:%{!r:%{!nostartfiles:%S}}} \
%{Wno-poison-system-directories:--no-poison-system-directories} \
--
2.40.1
@@ -1,8 +1,8 @@
From 666d0aeb808ac9c10d065ae7b196695c81a25a20 Mon Sep 17 00:00:00 2001
From 3b910da7d1e81bdd953e6d9ec82020e7b120353b Mon Sep 17 00:00:00 2001
From: Ariadne Conill <ariadne@dereferenced.org>
Date: Fri, 21 Aug 2020 06:46:22 +0000
Subject: [PATCH] Turn on -D_FORTIFY_SOURCE=2 by default for C, C++, ObjC,
ObjC++, if the optimization level is > 0
Subject: [PATCH 04/33] Turn on -D_FORTIFY_SOURCE=2 by default for C, C++,
ObjC, ObjC++, if the optimization level is > 0
---
gcc/c-family/c-cppbuiltin.cc | 4 ++++
@@ -10,10 +10,10 @@ Subject: [PATCH] Turn on -D_FORTIFY_SOURCE=2 by default for C, C++, ObjC,
2 files changed, 10 insertions(+)
diff --git a/gcc/c-family/c-cppbuiltin.cc b/gcc/c-family/c-cppbuiltin.cc
index 4672ae8486a..573c021e1e8 100644
index 5d64625fcd7..868d69506e4 100644
--- a/gcc/c-family/c-cppbuiltin.cc
+++ b/gcc/c-family/c-cppbuiltin.cc
@@ -1510,6 +1510,10 @@ c_cpp_builtins (cpp_reader *pfile)
@@ -1546,6 +1546,10 @@ c_cpp_builtins (cpp_reader *pfile)
builtin_define_with_value ("__REGISTER_PREFIX__", REGISTER_PREFIX, 0);
builtin_define_with_value ("__USER_LABEL_PREFIX__", user_label_prefix, 0);
@@ -25,10 +25,10 @@ index 4672ae8486a..573c021e1e8 100644
if (flag_gnu89_inline)
cpp_define (pfile, "__GNUC_GNU_INLINE__");
diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
index 83bd1bde433..dda299a9987 100644
index 158b7bcb81e..cc9972f907b 100644
--- a/gcc/doc/invoke.texi
+++ b/gcc/doc/invoke.texi
@@ -10896,6 +10896,12 @@ also turns on the following optimization flags:
@@ -11866,6 +11866,12 @@ also turns on the following optimization flags:
Please note the warning under @option{-fgcse} about
invoking @option{-O2} on programs that use computed gotos.
@@ -38,6 +38,9 @@ index 83bd1bde433..dda299a9987 100644
+functions. To disable, specify either @option{-U_FORTIFY_SOURCE} or
+@option{-D_FORTIFY_SOURCE=0}.
+
@item -O3
@opindex O3
@item -O3
Optimize yet more. @option{-O3} turns on all optimizations specified
--
2.40.1
@@ -1,8 +1,8 @@
From 75d1a35180cf0967f062765314bf091a64032062 Mon Sep 17 00:00:00 2001
From 9c3a2882b1932296ccb1d0ed2900cf046f998a26 Mon Sep 17 00:00:00 2001
From: Ariadne Conill <ariadne@dereferenced.org>
Date: Fri, 21 Aug 2020 06:46:56 +0000
Subject: [PATCH] On linux targets pass --as-needed by default to the linker,
but always link the sanitizer libraries with --no-as-needed.
Subject: [PATCH 05/33] On linux targets pass --as-needed by default to the
linker, but always link the sanitizer libraries with --no-as-needed.
---
gcc/config/aarch64/aarch64-linux.h | 1 +
@@ -22,7 +22,7 @@ Subject: [PATCH] On linux targets pass --as-needed by default to the linker,
14 files changed, 36 insertions(+), 19 deletions(-)
diff --git a/gcc/config/aarch64/aarch64-linux.h b/gcc/config/aarch64/aarch64-linux.h
index 5e4553d79f5..b516f3ef97f 100644
index 4277f03da2a..b131983a546 100644
--- a/gcc/config/aarch64/aarch64-linux.h
+++ b/gcc/config/aarch64/aarch64-linux.h
@@ -35,6 +35,7 @@
@@ -34,7 +34,7 @@ index 5e4553d79f5..b516f3ef97f 100644
%{shared:-shared} \
%{symbolic:-Bsymbolic} \
diff --git a/gcc/config/alpha/linux-elf.h b/gcc/config/alpha/linux-elf.h
index 17f16a55910..9ec667e9a5e 100644
index 03f783f2ad1..d946e700dda 100644
--- a/gcc/config/alpha/linux-elf.h
+++ b/gcc/config/alpha/linux-elf.h
@@ -37,7 +37,7 @@ along with GCC; see the file COPYING3. If not see
@@ -47,7 +47,7 @@ index 17f16a55910..9ec667e9a5e 100644
%{shared:-shared} \
%{!shared: \
diff --git a/gcc/config/arm/linux-elf.h b/gcc/config/arm/linux-elf.h
index df3da67c4f0..7532bc29f9b 100644
index 7b7b7cbbe14..49c050c6f2c 100644
--- a/gcc/config/arm/linux-elf.h
+++ b/gcc/config/arm/linux-elf.h
@@ -70,6 +70,7 @@
@@ -59,7 +59,7 @@ index df3da67c4f0..7532bc29f9b 100644
SUBTARGET_EXTRA_LINK_SPEC
diff --git a/gcc/config/gnu-user.h b/gcc/config/gnu-user.h
index 857c0e077bf..8433e56c3e1 100644
index eda8010b133..b26b17f2f2a 100644
--- a/gcc/config/gnu-user.h
+++ b/gcc/config/gnu-user.h
@@ -136,7 +136,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
@@ -69,9 +69,9 @@ index 857c0e077bf..8433e56c3e1 100644
- LD_DYNAMIC_OPTION "}}%{!static-libasan:-lasan}"
+ LD_DYNAMIC_OPTION "}}%{!static-libasan:%{!fuse-ld=gold:--push-state} --no-as-needed -lasan %{fuse-ld=gold:--as-needed;:--pop-state}}"
#undef LIBHWASAN_EARLY_SPEC
#define LIBHWASAN_EARLY_SPEC "%{static-libhwasan:%{!shared:" \
LD_STATIC_OPTION " --whole-archive -lhwasan --no-whole-archive " \
@@ -145,12 +145,12 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
#define LIBHWASAN_EARLY_SPEC "%{!shared:libhwasan_preinit%O%s} " \
"%{static-libhwasan:%{!shared:" \
@@ -146,12 +146,12 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
#define LIBTSAN_EARLY_SPEC "%{!shared:libtsan_preinit%O%s} " \
"%{static-libtsan:%{!shared:" \
LD_STATIC_OPTION " --whole-archive -ltsan --no-whole-archive " \
@@ -87,7 +87,7 @@ index 857c0e077bf..8433e56c3e1 100644
#undef TARGET_F951_OPTIONS
diff --git a/gcc/config/i386/gnu-user.h b/gcc/config/i386/gnu-user.h
index 0102b2a6f3b..994414c1845 100644
index a79b739089d..e0752673dff 100644
--- a/gcc/config/i386/gnu-user.h
+++ b/gcc/config/i386/gnu-user.h
@@ -68,7 +68,7 @@ along with GCC; see the file COPYING3. If not see
@@ -100,7 +100,7 @@ index 0102b2a6f3b..994414c1845 100644
%{!static: \
%{!static-pie: \
diff --git a/gcc/config/i386/gnu-user64.h b/gcc/config/i386/gnu-user64.h
index abc8cf624ca..fe656aeae27 100644
index 3b63b99acf6..759bf0db86f 100644
--- a/gcc/config/i386/gnu-user64.h
+++ b/gcc/config/i386/gnu-user64.h
@@ -56,6 +56,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
@@ -112,7 +112,7 @@ index abc8cf624ca..fe656aeae27 100644
%{!shared: \
%{!static: \
diff --git a/gcc/config/ia64/linux.h b/gcc/config/ia64/linux.h
index 93510098ccc..3813e536423 100644
index 5dfd428aa17..02656dad7fc 100644
--- a/gcc/config/ia64/linux.h
+++ b/gcc/config/ia64/linux.h
@@ -58,7 +58,7 @@ do { \
@@ -125,7 +125,7 @@ index 93510098ccc..3813e536423 100644
%{!shared: \
%{!static: \
diff --git a/gcc/config/mips/gnu-user.h b/gcc/config/mips/gnu-user.h
index 6aad7192e69..e1256a55add 100644
index a4e5380b589..3cc61bce69f 100644
--- a/gcc/config/mips/gnu-user.h
+++ b/gcc/config/mips/gnu-user.h
@@ -55,6 +55,7 @@ along with GCC; see the file COPYING3. If not see
@@ -137,10 +137,10 @@ index 6aad7192e69..e1256a55add 100644
%{!static: \
%{rdynamic:-export-dynamic} \
diff --git a/gcc/config/riscv/linux.h b/gcc/config/riscv/linux.h
index 38803723ba9..3067ed6eac8 100644
index 2fdfd930cf2..16503482ec2 100644
--- a/gcc/config/riscv/linux.h
+++ b/gcc/config/riscv/linux.h
@@ -58,6 +58,7 @@ along with GCC; see the file COPYING3. If not see
@@ -48,6 +48,7 @@ along with GCC; see the file COPYING3. If not see
"%{mabi=ilp32:_ilp32}"
#define LINK_SPEC "\
@@ -149,7 +149,7 @@ index 38803723ba9..3067ed6eac8 100644
%{mno-relax:--no-relax} \
%{mbig-endian:-EB} \
diff --git a/gcc/config/rs6000/linux64.h b/gcc/config/rs6000/linux64.h
index b2a7afabc73..34ceb4e4fce 100644
index 9e457033d11..08016bf224d 100644
--- a/gcc/config/rs6000/linux64.h
+++ b/gcc/config/rs6000/linux64.h
@@ -377,13 +377,13 @@ extern int dot_symbols;
@@ -169,10 +169,10 @@ index b2a7afabc73..34ceb4e4fce 100644
%{rdynamic:-export-dynamic} \
-dynamic-linker " GNU_USER_DYNAMIC_LINKER64 "}}} \
diff --git a/gcc/config/rs6000/sysv4.h b/gcc/config/rs6000/sysv4.h
index 7e2519de5d4..61215a7a1b3 100644
index ae932fc22f0..c8ff0c6dc8e 100644
--- a/gcc/config/rs6000/sysv4.h
+++ b/gcc/config/rs6000/sysv4.h
@@ -788,7 +788,7 @@ GNU_USER_TARGET_CC1_SPEC
@@ -780,7 +780,7 @@ GNU_USER_TARGET_CC1_SPEC
#define GNU_USER_DYNAMIC_LINKER GLIBC_DYNAMIC_LINKER
#endif
@@ -182,7 +182,7 @@ index 7e2519de5d4..61215a7a1b3 100644
-dynamic-linker " GNU_USER_DYNAMIC_LINKER "}}"
diff --git a/gcc/config/s390/linux.h b/gcc/config/s390/linux.h
index d7b7e7a7b02..d2287f14f2e 100644
index 02aa1edaff8..64df5801134 100644
--- a/gcc/config/s390/linux.h
+++ b/gcc/config/s390/linux.h
@@ -82,7 +82,7 @@ along with GCC; see the file COPYING3. If not see
@@ -195,7 +195,7 @@ index d7b7e7a7b02..d2287f14f2e 100644
%{!shared: \
%{static:-static} \
diff --git a/gcc/config/sparc/linux.h b/gcc/config/sparc/linux.h
index 6a809e9092d..93bfb92d3ff 100644
index 0e33b3cac2c..c2f44546e62 100644
--- a/gcc/config/sparc/linux.h
+++ b/gcc/config/sparc/linux.h
@@ -81,7 +81,7 @@ extern const char *host_detect_local_cpu (int argc, const char **argv);
@@ -208,10 +208,10 @@ index 6a809e9092d..93bfb92d3ff 100644
%{!shared: \
%{!static: \
diff --git a/gcc/gcc.cc b/gcc/gcc.cc
index d18b5d7b59a..3b76311b544 100644
index f82fae23c22..da6417dd0d1 100644
--- a/gcc/gcc.cc
+++ b/gcc/gcc.cc
@@ -744,8 +744,11 @@ proper position among the other output files. */
@@ -754,8 +754,11 @@ proper position among the other output files. */
#ifdef LIBASAN_EARLY_SPEC
#define LIBASAN_SPEC STATIC_LIBASAN_LIBS
#elif defined(HAVE_LD_STATIC_DYNAMIC)
@@ -225,7 +225,7 @@ index d18b5d7b59a..3b76311b544 100644
STATIC_LIBASAN_LIBS
#else
#define LIBASAN_SPEC "-lasan" STATIC_LIBASAN_LIBS
@@ -780,8 +783,11 @@ proper position among the other output files. */
@@ -790,8 +793,11 @@ proper position among the other output files. */
#ifdef LIBTSAN_EARLY_SPEC
#define LIBTSAN_SPEC STATIC_LIBTSAN_LIBS
#elif defined(HAVE_LD_STATIC_DYNAMIC)
@@ -239,7 +239,7 @@ index d18b5d7b59a..3b76311b544 100644
STATIC_LIBTSAN_LIBS
#else
#define LIBTSAN_SPEC "-ltsan" STATIC_LIBTSAN_LIBS
@@ -798,8 +804,11 @@ proper position among the other output files. */
@@ -808,8 +814,11 @@ proper position among the other output files. */
#ifdef LIBLSAN_EARLY_SPEC
#define LIBLSAN_SPEC STATIC_LIBLSAN_LIBS
#elif defined(HAVE_LD_STATIC_DYNAMIC)
@@ -253,7 +253,7 @@ index d18b5d7b59a..3b76311b544 100644
STATIC_LIBLSAN_LIBS
#else
#define LIBLSAN_SPEC "-llsan" STATIC_LIBLSAN_LIBS
@@ -814,8 +823,11 @@ proper position among the other output files. */
@@ -824,8 +833,11 @@ proper position among the other output files. */
#define STATIC_LIBUBSAN_LIBS \
" %{static-libubsan|static:%:include(libsanitizer.spec)%(link_libubsan)}"
#ifdef HAVE_LD_STATIC_DYNAMIC
@@ -267,3 +267,6 @@ index d18b5d7b59a..3b76311b544 100644
STATIC_LIBUBSAN_LIBS
#else
#define LIBUBSAN_SPEC "-lubsan" STATIC_LIBUBSAN_LIBS
--
2.40.1
@@ -1,17 +1,17 @@
From c664283dd30949c5299d1c45bd5740bcfe993d22 Mon Sep 17 00:00:00 2001
From 288cb2be3abe07dcf2737ed3ac07e93573262bc4 Mon Sep 17 00:00:00 2001
From: Ariadne Conill <ariadne@dereferenced.org>
Date: Fri, 21 Aug 2020 06:47:43 +0000
Subject: [PATCH] Enable -Wformat and -Wformat-security by default.
Subject: [PATCH 06/33] Enable -Wformat and -Wformat-security by default.
---
gcc/c-family/c.opt | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/gcc/c-family/c.opt b/gcc/c-family/c.opt
index 07da40ef43b..8683f706426 100644
index a75038930ae..b98726f33ed 100644
--- a/gcc/c-family/c.opt
+++ b/gcc/c-family/c.opt
@@ -692,7 +692,7 @@ Warn about function calls with format strings that write past the end
@@ -704,7 +704,7 @@ Warn about function calls with format strings that write past the end
of the destination region. Same as -Wformat-overflow=1.
Wformat-security
@@ -20,7 +20,7 @@ index 07da40ef43b..8683f706426 100644
Warn about possible security problems with format functions.
Wformat-signedness
@@ -713,7 +713,7 @@ C ObjC C++ ObjC++ Var(warn_format_zero_length) Warning LangEnabledBy(C ObjC C++
@@ -725,7 +725,7 @@ C ObjC C++ ObjC++ Var(warn_format_zero_length) Warning LangEnabledBy(C ObjC C++
Warn about zero-length formats.
Wformat=
@@ -29,3 +29,6 @@ index 07da40ef43b..8683f706426 100644
Warn about printf/scanf/strftime/strfmon format string anomalies.
Wformat-overflow=
--
2.40.1
@@ -1,17 +1,17 @@
From e4d0ec43e772b6dc7c3708aed5309897df26a125 Mon Sep 17 00:00:00 2001
From 93e44f7c7b1f11c1f714d6c384b0d39a191ac18a Mon Sep 17 00:00:00 2001
From: Ariadne Conill <ariadne@dereferenced.org>
Date: Fri, 21 Aug 2020 06:48:24 +0000
Subject: [PATCH] Enable -Wtrampolines by default.
Subject: [PATCH 07/33] Enable -Wtrampolines by default.
---
gcc/common.opt | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gcc/common.opt b/gcc/common.opt
index 0357868e22c..6d5e5eebe60 100644
index 64c4277c991..c24839d32bc 100644
--- a/gcc/common.opt
+++ b/gcc/common.opt
@@ -802,7 +802,7 @@ Common Var(warn_system_headers) Warning
@@ -803,7 +803,7 @@ Common Var(warn_system_headers) Warning
Do not suppress warnings from system headers.
Wtrampolines
@@ -20,3 +20,6 @@ index 0357868e22c..6d5e5eebe60 100644
Warn whenever a trampoline is generated.
Wtrivial-auto-var-init
--
2.40.1
@@ -1,8 +1,8 @@
From 27e5d5bd3fed9006a2958d2b09750d15ad07383b Mon Sep 17 00:00:00 2001
From 7aa93d6d9a63c7bedf1e033f6d040e95038537e7 Mon Sep 17 00:00:00 2001
From: Ariadne Conill <ariadne@dereferenced.org>
Date: Fri, 21 Aug 2020 06:49:40 +0000
Subject: [PATCH] Disable ssp on -nostdlib, -nodefaultlibs and -ffreestanding
Change the buffer size.
Subject: [PATCH 08/33] Disable ssp on -nostdlib, -nodefaultlibs and
-ffreestanding Change the buffer size.
---
gcc/gcc.cc | 8 +++++++-
@@ -10,10 +10,10 @@ Subject: [PATCH] Disable ssp on -nostdlib, -nodefaultlibs and -ffreestanding
2 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/gcc/gcc.cc b/gcc/gcc.cc
index 3b76311b544..cc99d0b7aa1 100644
index da6417dd0d1..b5a6f200635 100644
--- a/gcc/gcc.cc
+++ b/gcc/gcc.cc
@@ -996,6 +996,12 @@ proper position among the other output files. */
@@ -983,6 +983,12 @@ proper position among the other output files. */
#define LINK_GCC_C_SEQUENCE_SPEC "%G %{!nolibc:%L %G}"
#endif
@@ -26,7 +26,7 @@ index 3b76311b544..cc99d0b7aa1 100644
#ifndef LINK_SSP_SPEC
#ifdef TARGET_LIBC_PROVIDES_SSP
#define LINK_SSP_SPEC "%{fstack-protector|fstack-protector-all" \
@@ -1295,7 +1301,7 @@ static const char *cc1_options =
@@ -1282,7 +1288,7 @@ static const char *cc1_options =
%{-version:--version}\
%{-help=*:--help=%*}\
%{!fsyntax-only:%{S:%W{o*}%{!o*:-o %w%b.s}}}\
@@ -36,10 +36,10 @@ index 3b76311b544..cc99d0b7aa1 100644
%{fprofile-arcs|fprofile-generate*|coverage:\
%{!fprofile-update=single:\
diff --git a/gcc/params.opt b/gcc/params.opt
index b88e1372005..82a7e25dd2f 100644
index 823cdb2ff85..5b096899b40 100644
--- a/gcc/params.opt
+++ b/gcc/params.opt
@@ -1012,7 +1012,7 @@ Common Joined UInteger Var(param_ssa_name_def_chain_limit) Init(512) Param Optim
@@ -1006,7 +1006,7 @@ Common Joined UInteger Var(param_ssa_name_def_chain_limit) Init(512) Param Optim
The maximum number of SSA_NAME assignments to follow in determining a value.
-param=ssp-buffer-size=
@@ -48,3 +48,6 @@ index b88e1372005..82a7e25dd2f 100644
The lower bound for a buffer to be considered for stack smashing protection.
-param=stack-clash-protection-guard-size=
--
2.40.1
@@ -1,8 +1,8 @@
From 83bf2a316222e2fe0b72968cadf4e334d41173f6 Mon Sep 17 00:00:00 2001
From e44b295b5b0b917c0b47085f60466a37f890e1c7 Mon Sep 17 00:00:00 2001
From: Ariadne Conill <ariadne@dereferenced.org>
Date: Fri, 21 Aug 2020 06:50:33 +0000
Subject: [PATCH] Ensure that msgfmt doesn't encounter problems during gcc
bootstrapping.
Subject: [PATCH 09/33] Ensure that msgfmt doesn't encounter problems during
gcc bootstrapping.
Solves error messages like the following:
@@ -26,7 +26,7 @@ https://bugs.gentoo.org/295480
2 files changed, 2 insertions(+)
diff --git a/libstdc++-v3/po/Makefile.am b/libstdc++-v3/po/Makefile.am
index 8f51544989e..5329804d136 100644
index 12d34910830..61b13762b71 100644
--- a/libstdc++-v3/po/Makefile.am
+++ b/libstdc++-v3/po/Makefile.am
@@ -38,6 +38,7 @@ MSGFMT = msgfmt
@@ -38,7 +38,7 @@ index 8f51544989e..5329804d136 100644
all-local: all-local-$(USE_NLS)
diff --git a/libstdc++-v3/po/Makefile.in b/libstdc++-v3/po/Makefile.in
index 243f3db7b72..822210781fa 100644
index 8e93445acd2..d6ff06e5ddb 100644
--- a/libstdc++-v3/po/Makefile.in
+++ b/libstdc++-v3/po/Makefile.in
@@ -561,6 +561,7 @@ uninstall-am:
@@ -49,3 +49,6 @@ index 243f3db7b72..822210781fa 100644
$(MSGFMT) -o $@ $<
all-local: all-local-$(USE_NLS)
--
2.40.1
@@ -1,14 +1,14 @@
From 190064993cd8ddbd48015c1fc1916e4110a97733 Mon Sep 17 00:00:00 2001
From f041dcd8f775e03b85a49e3aeef0870e2333b10e Mon Sep 17 00:00:00 2001
From: Ariadne Conill <ariadne@dereferenced.org>
Date: Fri, 21 Aug 2020 06:52:07 +0000
Subject: [PATCH] Don't declare asprintf if defined as a macro.
Subject: [PATCH 10/33] Don't declare asprintf if defined as a macro.
---
include/libiberty.h | 3 +++
1 file changed, 3 insertions(+)
diff --git a/include/libiberty.h b/include/libiberty.h
index a65ced9c820..eb20ab0f95f 100644
index 1d5c779fcff..19e3cb1e31c 100644
--- a/include/libiberty.h
+++ b/include/libiberty.h
@@ -652,8 +652,11 @@ extern void *bsearch_r (const void *, const void *,
@@ -23,3 +23,6 @@ index a65ced9c820..eb20ab0f95f 100644
/* Like asprintf but allocates memory without fail. This works like
xmalloc. */
--
2.40.1
@@ -1,14 +1,14 @@
From 838e1daa955d9013c462be3471497cb39641e951 Mon Sep 17 00:00:00 2001
From 6fc13fce114648b1a64e658b469a4697382d18bb Mon Sep 17 00:00:00 2001
From: Ariadne Conill <ariadne@dereferenced.org>
Date: Fri, 21 Aug 2020 06:53:00 +0000
Subject: [PATCH] libiberty: copy PIC objects during build process
Subject: [PATCH 11/33] libiberty: copy PIC objects during build process
---
libiberty/Makefile.in | 1 +
1 file changed, 1 insertion(+)
diff --git a/libiberty/Makefile.in b/libiberty/Makefile.in
index 1b17c2e3a47..8db1176df2e 100644
index 72608f3e4a7..58356884728 100644
--- a/libiberty/Makefile.in
+++ b/libiberty/Makefile.in
@@ -265,6 +265,7 @@ $(TARGETLIB): $(REQUIRED_OFILES) $(EXTRA_OFILES) $(LIBOBJS)
@@ -19,3 +19,6 @@ index 1b17c2e3a47..8db1176df2e 100644
cd ..; \
else true; fi
--
2.40.1
@@ -1,7 +1,7 @@
From 048c394eb709bfd216e307c1b92ac7f8a7e7758b Mon Sep 17 00:00:00 2001
From 6a1955bbf49836ad99b23501f42283842e01761b Mon Sep 17 00:00:00 2001
From: Szabolcs Nagy <nsz@port70.net>
Date: Sat, 24 Oct 2015 20:09:53 +0000
Subject: [PATCH] libgcc_s
Subject: [PATCH 12/33] libgcc_s
---
gcc/config/i386/i386-expand.cc | 4 ++--
@@ -10,10 +10,10 @@ Subject: [PATCH] libgcc_s
3 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/gcc/config/i386/i386-expand.cc b/gcc/config/i386/i386-expand.cc
index 31780b6daf7..d89898846e1 100644
index 0d817fc3f3b..2e99db00db9 100644
--- a/gcc/config/i386/i386-expand.cc
+++ b/gcc/config/i386/i386-expand.cc
@@ -12338,10 +12338,10 @@ ix86_expand_builtin (tree exp, rtx target, rtx subtarget,
@@ -12691,10 +12691,10 @@ ix86_expand_builtin (tree exp, rtx target, rtx subtarget,
{
case IX86_BUILTIN_CPU_INIT:
{
@@ -27,7 +27,7 @@ index 31780b6daf7..d89898846e1 100644
return expand_expr (call_expr, target, mode, EXPAND_NORMAL);
}
diff --git a/libgcc/config/i386/cpuinfo.c b/libgcc/config/i386/cpuinfo.c
index dab1d98060f..cf824b4114a 100644
index 50b6d8248a2..724ced402a1 100644
--- a/libgcc/config/i386/cpuinfo.c
+++ b/libgcc/config/i386/cpuinfo.c
@@ -63,7 +63,7 @@ __cpu_indicator_init (void)
@@ -52,3 +52,6 @@ index 8506a635790..564296f788e 100644
-HOST_LIBGCC2_CFLAGS += -mlong-double-80 -DUSE_ELF_SYMVER $(CET_FLAGS)
+HOST_LIBGCC2_CFLAGS += -mlong-double-80 $(CET_FLAGS)
CRTSTUFF_T_CFLAGS += $(CET_FLAGS)
--
2.40.1
@@ -1,30 +0,0 @@
From 717346fbbd6642ba6b0c3af2deb3771794346507 Mon Sep 17 00:00:00 2001
From: Ariadne Conill <ariadne@dereferenced.org>
Date: Fri, 21 Aug 2020 06:53:36 +0000
Subject: [PATCH] libitm: disable FORTIFY
---
libitm/configure.tgt | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/libitm/configure.tgt b/libitm/configure.tgt
index 06e90973ef3..669e64236c3 100644
--- a/libitm/configure.tgt
+++ b/libitm/configure.tgt
@@ -47,6 +47,16 @@ if test "$gcc_cv_have_tls" = yes ; then
esac
fi
+# FIXME: error: inlining failed in call to always_inline
+# ‘int vfprintf(FILE*, const char*, __va_list_tag*)’
+# : function body can be overwritten at link time
+# Disable Fortify in libitm for now. #508852
+case "${target}" in
+ *-*-linux*)
+ XCFLAGS="${XCFLAGS} -U_FORTIFY_SOURCE"
+ ;;
+esac
+
# Map the target cpu to an ARCH sub-directory. At the same time,
# work out any special compilation flags as necessary.
case "${target_cpu}" in
@@ -1,7 +1,7 @@
From db28b1e0f3b06325026ec5b5e7cdca4e9992e05c Mon Sep 17 00:00:00 2001
From 558e95aa2b0f3bbf416e1bb572e5f47bddc8601c Mon Sep 17 00:00:00 2001
From: Szabolcs Nagy <nsz@port70.net>
Date: Sat, 7 Nov 2015 02:08:05 +0000
Subject: [PATCH] nopie
Subject: [PATCH 13/33] nopie
---
gcc/configure | 27 +++++++++++++++++++++++++++
@@ -9,10 +9,10 @@ Subject: [PATCH] nopie
2 files changed, 40 insertions(+)
diff --git a/gcc/configure b/gcc/configure
index e9060112384..2f6b3265a6c 100755
index 8c46369f73f..e59cbee1767 100755
--- a/gcc/configure
+++ b/gcc/configure
@@ -32497,6 +32497,33 @@ fi
@@ -32268,6 +32268,33 @@ fi
$as_echo "$gcc_cv_no_pie" >&6; }
if test "$gcc_cv_no_pie" = "yes"; then
NO_PIE_FLAG="-no-pie"
@@ -47,10 +47,10 @@ index e9060112384..2f6b3265a6c 100755
diff --git a/gcc/configure.ac b/gcc/configure.ac
index 75a7048045c..e683d3a7a5f 100644
index 5504bf6eb01..57268319de1 100644
--- a/gcc/configure.ac
+++ b/gcc/configure.ac
@@ -7681,6 +7681,19 @@ AC_CACHE_CHECK([for -no-pie option],
@@ -7552,6 +7552,19 @@ AC_CACHE_CHECK([for -no-pie option],
LDFLAGS="$saved_LDFLAGS"])
if test "$gcc_cv_no_pie" = "yes"; then
NO_PIE_FLAG="-no-pie"
@@ -70,3 +70,6 @@ index 75a7048045c..e683d3a7a5f 100644
fi
AC_SUBST([NO_PIE_FLAG])
--
2.40.1
@@ -1,14 +1,14 @@
From fd642f8cd61849a9dc169588be5562ceda96a889 Mon Sep 17 00:00:00 2001
From ecad19db42776c536bd4f6033ec1891ffae03720 Mon Sep 17 00:00:00 2001
From: Ariadne Conill <ariadne@dereferenced.org>
Date: Fri, 21 Aug 2020 06:59:16 +0000
Subject: [PATCH] ada: fix shared linking
Subject: [PATCH 14/33] ada: fix shared linking
---
gcc/ada/link.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/gcc/ada/link.c b/gcc/ada/link.c
index a7574efb472..0ad0d66463c 100644
index f2126441208..22cfa9c641f 100644
--- a/gcc/ada/link.c
+++ b/gcc/ada/link.c
@@ -107,9 +107,9 @@ const char *__gnat_default_libgcc_subdir = "lib";
@@ -37,3 +37,6 @@ index a7574efb472..0ad0d66463c 100644
int __gnat_link_max = 8192;
unsigned char __gnat_objlist_file_supported = 1;
const char *__gnat_object_library_extension = ".a";
--
2.40.1
@@ -1,17 +1,17 @@
From a547632f5c7caec4a164e8d5e5b568fb7a461365 Mon Sep 17 00:00:00 2001
From 8500b4cdd039c16a02a8acabd124b92865871979 Mon Sep 17 00:00:00 2001
From: Ariadne Conill <ariadne@dereferenced.org>
Date: Fri, 21 Aug 2020 06:59:43 +0000
Subject: [PATCH] build: fix CXXFLAGS_FOR_BUILD passing
Subject: [PATCH 15/33] build: fix CXXFLAGS_FOR_BUILD passing
---
Makefile.in | 1 +
1 file changed, 1 insertion(+)
diff --git a/Makefile.in b/Makefile.in
index 593495e1650..b96f60e33e2 100644
index 06a9398e172..6ff2b3f9925 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -176,6 +176,7 @@ BUILD_EXPORTS = \
@@ -178,6 +178,7 @@ BUILD_EXPORTS = \
# built for the build system to override those in BASE_FLAGS_TO_PASS.
EXTRA_BUILD_FLAGS = \
CFLAGS="$(CFLAGS_FOR_BUILD)" \
@@ -19,3 +19,6 @@ index 593495e1650..b96f60e33e2 100644
LDFLAGS="$(LDFLAGS_FOR_BUILD)"
# This is the list of directories to built for the host system.
--
2.40.1
@@ -1,21 +0,0 @@
From 686e85d8a05f9f9e6c983afb13f937bd88fe84dd Mon Sep 17 00:00:00 2001
From: Ariadne Conill <ariadne@dereferenced.org>
Date: Thu, 6 Jan 2022 03:18:32 +0000
Subject: [PATCH] dlang: use libucontext on mips64
---
libphobos/configure.tgt | 1 +
1 file changed, 1 insertion(+)
diff --git a/libphobos/configure.tgt b/libphobos/configure.tgt
index 0063dd23249..c5e782a1238 100644
--- a/libphobos/configure.tgt
+++ b/libphobos/configure.tgt
@@ -38,6 +38,7 @@ case "${target}" in
;;
mips*-*-linux*)
LIBPHOBOS_SUPPORTED=yes
+ LIBDRUNTIME_NEEDS_UCONTEXT=yes
;;
power*-*-freebsd*)
LIBPHOBOS_SUPPORTED=yes
@@ -1,17 +1,17 @@
From 5bd37f8ee93a0fe1a3f841f48ed6626e7e0aa19d Mon Sep 17 00:00:00 2001
From e893ad827215a7c090a835e20a81559f4044fb47 Mon Sep 17 00:00:00 2001
From: Ariadne Conill <ariadne@dereferenced.org>
Date: Fri, 21 Aug 2020 07:01:06 +0000
Subject: [PATCH] add fortify-headers paths
Subject: [PATCH 16/33] add fortify-headers paths
---
gcc/config/linux.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/gcc/config/linux.h b/gcc/config/linux.h
index 74f70793d90..61b07f319f6 100644
index e3aca79cccc..b3537b8fbeb 100644
--- a/gcc/config/linux.h
+++ b/gcc/config/linux.h
@@ -172,6 +172,8 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
@@ -159,6 +159,8 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
#ifdef NATIVE_SYSTEM_HEADER_DIR
#define INCLUDE_DEFAULTS_MUSL_NATIVE \
@@ -20,3 +20,6 @@ index 74f70793d90..61b07f319f6 100644
{ NATIVE_SYSTEM_HEADER_DIR, 0, 0, 0, 1, 2 }, \
{ NATIVE_SYSTEM_HEADER_DIR, 0, 0, 0, 1, 0 },
#else
--
2.40.1
@@ -1,11 +1,11 @@
From d2577dc78a1f159e5c41fd0b53e73fa0e264cb52 Mon Sep 17 00:00:00 2001
From 064afc74f18f2a00771fc2600029a713b8708845 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Timo=20Ter=C3=A4s?= <timo.teras@iki.fi>
Date: Fri, 21 Aug 2020 07:03:00 +0000
Subject: [PATCH] Alpine musl package provides libssp_nonshared.a. We link to
it unconditionally, as otherwise we get link failures if some objects are
-fstack-protector built and final link happens with -fno-stack-protector.
Subject: [PATCH 17/33] Alpine musl package provides libssp_nonshared.a. We
link to it unconditionally, as otherwise we get link failures if some objects
are -fstack-protector built and final link happens with -fno-stack-protector.
This seems to be the common case when bootstrapping gcc, the piepatches do
not seem to fully fix the crosstoolchain and bootstrap sequence wrt.
not seem to fully fix the crosstoolchain and bootstrap sequence wrt.
stack-protector flag usage.
---
@@ -13,10 +13,10 @@ Subject: [PATCH] Alpine musl package provides libssp_nonshared.a. We link to
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/gcc/gcc.cc b/gcc/gcc.cc
index cc99d0b7aa1..c60a75371f8 100644
index b5a6f200635..6cbb726599b 100644
--- a/gcc/gcc.cc
+++ b/gcc/gcc.cc
@@ -1004,8 +1004,7 @@ proper position among the other output files. */
@@ -991,8 +991,7 @@ proper position among the other output files. */
#ifndef LINK_SSP_SPEC
#ifdef TARGET_LIBC_PROVIDES_SSP
@@ -26,3 +26,6 @@ index cc99d0b7aa1..c60a75371f8 100644
#else
#define LINK_SSP_SPEC "%{fstack-protector|fstack-protector-all" \
"|fstack-protector-strong|fstack-protector-explicit" \
--
2.40.1
@@ -1,7 +1,7 @@
From bbd5c529ef878c2d6096fd4949616714eb82683a Mon Sep 17 00:00:00 2001
From 45a98ce1f1702424aba4271f7f7570e43a354101 Mon Sep 17 00:00:00 2001
From: Ariadne Conill <ariadne@dereferenced.org>
Date: Fri, 21 Aug 2020 07:03:42 +0000
Subject: [PATCH] DP: Use --push-state/--pop-state for gold as well when
Subject: [PATCH 18/33] DP: Use --push-state/--pop-state for gold as well when
linking libtsan.
---
@@ -9,10 +9,10 @@ Subject: [PATCH] DP: Use --push-state/--pop-state for gold as well when
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/gcc/gcc.cc b/gcc/gcc.cc
index c60a75371f8..735b2b1bba1 100644
index 6cbb726599b..59390fd39d6 100644
--- a/gcc/gcc.cc
+++ b/gcc/gcc.cc
@@ -745,10 +745,10 @@ proper position among the other output files. */
@@ -755,10 +755,10 @@ proper position among the other output files. */
#define LIBASAN_SPEC STATIC_LIBASAN_LIBS
#elif defined(HAVE_LD_STATIC_DYNAMIC)
#define LIBASAN_SPEC "%{static-libasan:" LD_STATIC_OPTION "}" \
@@ -25,7 +25,7 @@ index c60a75371f8..735b2b1bba1 100644
STATIC_LIBASAN_LIBS
#else
#define LIBASAN_SPEC "-lasan" STATIC_LIBASAN_LIBS
@@ -784,10 +784,10 @@ proper position among the other output files. */
@@ -794,10 +794,10 @@ proper position among the other output files. */
#define LIBTSAN_SPEC STATIC_LIBTSAN_LIBS
#elif defined(HAVE_LD_STATIC_DYNAMIC)
#define LIBTSAN_SPEC "%{static-libtsan:" LD_STATIC_OPTION "}" \
@@ -38,7 +38,7 @@ index c60a75371f8..735b2b1bba1 100644
STATIC_LIBTSAN_LIBS
#else
#define LIBTSAN_SPEC "-ltsan" STATIC_LIBTSAN_LIBS
@@ -805,10 +805,10 @@ proper position among the other output files. */
@@ -815,10 +815,10 @@ proper position among the other output files. */
#define LIBLSAN_SPEC STATIC_LIBLSAN_LIBS
#elif defined(HAVE_LD_STATIC_DYNAMIC)
#define LIBLSAN_SPEC "%{static-liblsan:" LD_STATIC_OPTION "}" \
@@ -51,7 +51,7 @@ index c60a75371f8..735b2b1bba1 100644
STATIC_LIBLSAN_LIBS
#else
#define LIBLSAN_SPEC "-llsan" STATIC_LIBLSAN_LIBS
@@ -824,10 +824,10 @@ proper position among the other output files. */
@@ -834,10 +834,10 @@ proper position among the other output files. */
" %{static-libubsan|static:%:include(libsanitizer.spec)%(link_libubsan)}"
#ifdef HAVE_LD_STATIC_DYNAMIC
#define LIBUBSAN_SPEC "%{static-libubsan:" LD_STATIC_OPTION "}" \
@@ -64,3 +64,6 @@ index c60a75371f8..735b2b1bba1 100644
STATIC_LIBUBSAN_LIBS
#else
#define LIBUBSAN_SPEC "-lubsan" STATIC_LIBUBSAN_LIBS
--
2.40.1
@@ -1,7 +1,7 @@
From 8fc8d6c26a2a45945182e211bc3ac2eae4d6a11b Mon Sep 17 00:00:00 2001
From 6a2e902dc8abcfd44522b9224fd759d038db51f5 Mon Sep 17 00:00:00 2001
From: Ariadne Conill <ariadne@dereferenced.org>
Date: Thu, 6 Jan 2022 03:12:55 +0000
Subject: [PATCH] aarch64: disable multilib support
Subject: [PATCH 19/33] aarch64: disable multilib support
multilib is unsupported on Alpine GCC
---
@@ -9,7 +9,7 @@ multilib is unsupported on Alpine GCC
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gcc/config/aarch64/t-aarch64-linux b/gcc/config/aarch64/t-aarch64-linux
index d0cd546002a..b63a77f4969 100644
index 57bf4100fcd..172894b57ef 100644
--- a/gcc/config/aarch64/t-aarch64-linux
+++ b/gcc/config/aarch64/t-aarch64-linux
@@ -22,7 +22,7 @@ LIB1ASMSRC = aarch64/lib1funcs.asm
@@ -21,3 +21,6 @@ index d0cd546002a..b63a77f4969 100644
MULTIARCH_DIRNAME = $(call if_multiarch,aarch64$(AARCH_BE)-linux-gnu)
MULTILIB_OSDIRNAMES += mabi.ilp32=../libilp32$(call if_multiarch,:aarch64$(AARCH_BE)-linux-gnu_ilp32)
--
2.40.1
@@ -1,7 +1,7 @@
From 65ad898df141261a1ccd891a99133ad8f9847133 Mon Sep 17 00:00:00 2001
From 6e7c72ee05353a284d9c9809035e7ff488b4b8c1 Mon Sep 17 00:00:00 2001
From: Ariadne Conill <ariadne@dereferenced.org>
Date: Thu, 6 Jan 2022 03:13:59 +0000
Subject: [PATCH] s390x: disable multilib support
Subject: [PATCH 20/33] s390x: disable multilib support
multilib is not supported on Alpine GCC at present
---
@@ -20,3 +20,6 @@ index cc6ab367072..7f498ee1cdc 100644
-MULTILIB_OSDIRNAMES += $(if $(wildcard $(shell echo $(SYSTEM_HEADER_DIR))/../../usr/lib32),../lib32,../lib)$(call if_multiarch,:s390-linux-gnu)
+MULTILIB_OSDIRNAMES = m64=../lib
+MULTILIB_OSDIRNAMES+= m32=../lib32
--
2.40.1
@@ -1,45 +0,0 @@
From 714ed6d9649bf9ed42e34fef9c41169921e63921 Mon Sep 17 00:00:00 2001
From: Nils Andreas Svee <me@lochnair.net>
Date: Thu, 21 Dec 2017 03:14:33 +0100
Subject: [PATCH] mips64: disable multilib support
multilib is not supported by Alpine GCC
---
gcc/config/mips/mips.h | 8 ++++----
gcc/config/mips/t-linux64 | 6 +++---
2 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/gcc/config/mips/mips.h b/gcc/config/mips/mips.h
index 858bbba3a36..2d4f553e652 100644
--- a/gcc/config/mips/mips.h
+++ b/gcc/config/mips/mips.h
@@ -3447,11 +3447,11 @@ struct GTY(()) machine_function {
/* If we are *not* using multilibs and the default ABI is not ABI_32 we
need to change these from /lib and /usr/lib. */
#if MIPS_ABI_DEFAULT == ABI_N32
-#define STANDARD_STARTFILE_PREFIX_1 "/lib32/"
-#define STANDARD_STARTFILE_PREFIX_2 "/usr/lib32/"
+#define STANDARD_STARTFILE_PREFIX_1 "/lib/"
+#define STANDARD_STARTFILE_PREFIX_2 "/usr/lib/"
#elif MIPS_ABI_DEFAULT == ABI_64
-#define STANDARD_STARTFILE_PREFIX_1 "/lib64/"
-#define STANDARD_STARTFILE_PREFIX_2 "/usr/lib64/"
+#define STANDARD_STARTFILE_PREFIX_1 "/lib/"
+#define STANDARD_STARTFILE_PREFIX_2 "/usr/lib/"
#endif
/* Load store bonding is not supported by micromips and fix_24k. The
diff --git a/gcc/config/mips/t-linux64 b/gcc/config/mips/t-linux64
index 2fdd8e00407..406a3676289 100644
--- a/gcc/config/mips/t-linux64
+++ b/gcc/config/mips/t-linux64
@@ -21,6 +21,6 @@ MULTILIB_DIRNAMES = n32 32 64
MIPS_EL = $(if $(filter %el, $(firstword $(subst -, ,$(target)))),el)
MIPS_SOFT = $(if $(strip $(filter MASK_SOFT_FLOAT_ABI, $(target_cpu_default)) $(filter soft, $(with_float))),soft)
MULTILIB_OSDIRNAMES = \
- ../lib32$(call if_multiarch,:mips64$(MIPS_EL)-linux-gnuabin32$(MIPS_SOFT)) \
- ../lib$(call if_multiarch,:mips$(MIPS_EL)-linux-gnu$(MIPS_SOFT)) \
- ../lib64$(call if_multiarch,:mips64$(MIPS_EL)-linux-gnuabi64$(MIPS_SOFT))
+ ../lib \
+ ../lib32 \
+ ../lib
@@ -1,7 +1,7 @@
From 3263d8634da6d7e1edb1bfd88e1b2627ce0aa1be Mon Sep 17 00:00:00 2001
From 44655aa3be8d5354fb82a42317a9ac6ac1b50164 Mon Sep 17 00:00:00 2001
From: Ariadne Conill <ariadne@dereferenced.org>
Date: Thu, 6 Jan 2022 03:14:33 +0000
Subject: [PATCH] ppc64[le]: disable multilib support
Subject: [PATCH 21/33] ppc64[le]: disable multilib support
multilib is not presently supported on Alpine GCC
---
@@ -36,7 +36,7 @@ index 4e371255533..128c75c7d39 100644
endif
diff --git a/gcc/config/rs6000/t-linux64 b/gcc/config/rs6000/t-linux64
index 47e0efd5764..f89729af64f 100644
index 01a94242308..b3a76379c03 100644
--- a/gcc/config/rs6000/t-linux64
+++ b/gcc/config/rs6000/t-linux64
@@ -28,8 +28,8 @@
@@ -76,3 +76,6 @@ index 2e63bdb9fc9..c6e1c5db65d 100644
+MULTILIB_OSDIRNAMES := m64=../lib
+MULTILIB_OSDIRNAMES += m32=../lib32
MULTILIB_MATCHES := ${MULTILIB_MATCHES_ENDIAN}
--
2.40.1
@@ -1,7 +1,7 @@
From bf63353ea679e0bbf2c2f17bb64c75ebd590c6e7 Mon Sep 17 00:00:00 2001
From 5f79236c49bd0c2c36440f0ef83cea02d52fcaaf Mon Sep 17 00:00:00 2001
From: Ariadne Conill <ariadne@dereferenced.org>
Date: Thu, 6 Jan 2022 03:14:54 +0000
Subject: [PATCH] x86_64: disable multilib support
Subject: [PATCH 22/33] x86_64: disable multilib support
multilib is not presently supported on Alpine GCC
---
@@ -9,7 +9,7 @@ multilib is not presently supported on Alpine GCC
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/gcc/config/i386/t-linux64 b/gcc/config/i386/t-linux64
index 5526ad0e6cc..78866afab36 100644
index 138956b0962..bc03dab874f 100644
--- a/gcc/config/i386/t-linux64
+++ b/gcc/config/i386/t-linux64
@@ -33,6 +33,6 @@
@@ -21,3 +21,6 @@ index 5526ad0e6cc..78866afab36 100644
+MULTILIB_OSDIRNAMES = m64=../lib
+MULTILIB_OSDIRNAMES+= m32=../lib32
MULTILIB_OSDIRNAMES+= mx32=../libx32$(call if_multiarch,:x86_64-linux-gnux32)
--
2.40.1
@@ -1,7 +1,7 @@
From 2eed19787020ce52cf07b76a5d167c420ec42b61 Mon Sep 17 00:00:00 2001
From 4605e64b3a076411f2f8134256c400eb58bcc1c7 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?S=C3=B6ren=20Tempel?= <soeren+git@soeren-tempel.net>
Date: Mon, 3 Jan 2022 07:14:48 +0100
Subject: [PATCH] riscv: disable multilib support
Subject: [PATCH 23/33] riscv: disable multilib support
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
@@ -43,10 +43,10 @@ library.
2 files changed, 5 insertions(+), 8 deletions(-)
diff --git a/gcc/config/riscv/linux.h b/gcc/config/riscv/linux.h
index 3067ed6eac8..4c8c85e3285 100644
index 16503482ec2..8d9881eadeb 100644
--- a/gcc/config/riscv/linux.h
+++ b/gcc/config/riscv/linux.h
@@ -71,9 +71,3 @@ along with GCC; see the file COPYING3. If not see
@@ -61,9 +61,3 @@ along with GCC; see the file COPYING3. If not see
%{static:-static}}"
#define TARGET_ASM_FILE_END file_end_indicate_exec_stack
@@ -69,3 +69,6 @@ index 216d2776a18..1a8a863853e 100644
+MULTILIB_DIRNAMES := $(patsubst rv32%,lib32,$(patsubst rv64%,lib,$(MULTILIB_DIRNAMES)))
MULTILIB_OSDIRNAMES := $(patsubst lib%,../lib%,$(MULTILIB_DIRNAMES))
+MULTILIB_MATCHES := march?rv64gc=march?rv64imafdc
--
2.40.1
@@ -1,7 +1,7 @@
From 51a35c0fa0e793c6a2c64ae1449c0cfd681d8f8a Mon Sep 17 00:00:00 2001
From a178cfeb975d79bb9b9fd877ab4c6e05d10b147e Mon Sep 17 00:00:00 2001
From: Ariadne Conill <ariadne@dereferenced.org>
Date: Fri, 21 Aug 2020 07:05:41 +0000
Subject: [PATCH] always build libgcc_eh.a
Subject: [PATCH 24/33] always build libgcc_eh.a
highly inspired by:
http://landley.net/hg/aboriginal/file/7e0747a665ab/sources/patches/gcc-core-libgcceh.patch
@@ -10,10 +10,10 @@ highly inspired by:
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/libgcc/Makefile.in b/libgcc/Makefile.in
index 09b3ec8bc2e..c9ca58c64cc 100644
index 6c4dc79ab71..023cede18a7 100644
--- a/libgcc/Makefile.in
+++ b/libgcc/Makefile.in
@@ -957,8 +957,9 @@ ifneq ($(LIBUNWIND),)
@@ -960,8 +960,9 @@ ifneq ($(LIBUNWIND),)
all: libunwind.a
endif
@@ -24,7 +24,7 @@ index 09b3ec8bc2e..c9ca58c64cc 100644
ifneq ($(LIBUNWIND),)
all: libunwind$(SHLIB_EXT)
libgcc_s$(SHLIB_EXT): libunwind$(SHLIB_EXT)
@@ -1160,10 +1161,6 @@ install-libunwind:
@@ -1163,10 +1164,6 @@ install-libunwind:
install-shared:
$(mkinstalldirs) $(DESTDIR)$(inst_libdir)
@@ -35,7 +35,7 @@ index 09b3ec8bc2e..c9ca58c64cc 100644
$(subst @multilib_dir@,$(MULTIDIR),$(subst \
@shlib_base_name@,libgcc_s,$(subst \
@shlib_slibdir_qual@,$(MULTIOSSUBDIR),$(SHLIB_INSTALL))))
@@ -1180,6 +1177,10 @@ ifeq ($(enable_gcov),yes)
@@ -1183,6 +1180,10 @@ ifeq ($(enable_gcov),yes)
$(RANLIB) $(DESTDIR)$(inst_libdir)/libgcov.a
endif
@@ -46,3 +46,6 @@ index 09b3ec8bc2e..c9ca58c64cc 100644
parts="$(INSTALL_PARTS)"; \
for file in $$parts; do \
rm -f $(DESTDIR)$(inst_libdir)/$$file; \
--
2.40.1
@@ -1,7 +1,7 @@
From 64a1c5f57e278869f41c43ee56cc5defb3dd55c5 Mon Sep 17 00:00:00 2001
From 5bc3deb9bc2679ad4f6f189a65e3643b550587a1 Mon Sep 17 00:00:00 2001
From: Ariadne Conill <ariadne@dereferenced.org>
Date: Fri, 21 Aug 2020 07:06:30 +0000
Subject: [PATCH] ada: libgnarl compatibility for musl
Subject: [PATCH 25/33] ada: libgnarl compatibility for musl
---
gcc/ada/libgnarl/s-osinte__linux.ads | 11 ------
@@ -9,7 +9,7 @@ Subject: [PATCH] ada: libgnarl compatibility for musl
2 files changed, 3 insertions(+), 61 deletions(-)
diff --git a/gcc/ada/libgnarl/s-osinte__linux.ads b/gcc/ada/libgnarl/s-osinte__linux.ads
index 7c9e7ca4518..caafc4aa68f 100644
index a5e645d334d..32165347071 100644
--- a/gcc/ada/libgnarl/s-osinte__linux.ads
+++ b/gcc/ada/libgnarl/s-osinte__linux.ads
@@ -403,12 +403,6 @@ package System.OS_Interface is
@@ -38,7 +38,7 @@ index 7c9e7ca4518..caafc4aa68f 100644
sched_priority : int; -- scheduling priority
end record;
diff --git a/gcc/ada/libgnarl/s-taprop__linux.adb b/gcc/ada/libgnarl/s-taprop__linux.adb
index 4ff784f0ea7..b34a12802c6 100644
index 821ceef30e4..ae95b58e01e 100644
--- a/gcc/ada/libgnarl/s-taprop__linux.adb
+++ b/gcc/ada/libgnarl/s-taprop__linux.adb
@@ -198,9 +198,6 @@ package body System.Task_Primitives.Operations is
@@ -130,3 +130,6 @@ index 4ff784f0ea7..b34a12802c6 100644
Result := pthread_rwlock_init (L.RW'Access, RWlock_Attr'Access);
pragma Assert (Result in 0 | ENOMEM);
--
2.40.1
@@ -1,7 +1,7 @@
From 82addb1312f4f58a412a664228944009aa5cb569 Mon Sep 17 00:00:00 2001
From e1e6dccc9124e0907c5ae174d20acb3bad87e633 Mon Sep 17 00:00:00 2001
From: Ariadne Conill <ariadne@dereferenced.org>
Date: Fri, 21 Aug 2020 07:07:48 +0000
Subject: [PATCH] ada: musl support fixes
Subject: [PATCH 26/33] ada: musl support fixes
---
gcc/ada/Makefile.rtl | 10 +++++-----
@@ -11,10 +11,10 @@ Subject: [PATCH] ada: musl support fixes
4 files changed, 32 insertions(+), 30 deletions(-)
diff --git a/gcc/ada/Makefile.rtl b/gcc/ada/Makefile.rtl
index aaf853e3a2a..e2dd3587ed5 100644
index 96306f8cc9a..090b6770ae5 100644
--- a/gcc/ada/Makefile.rtl
+++ b/gcc/ada/Makefile.rtl
@@ -1633,7 +1633,7 @@ ifeq ($(strip $(filter-out %86 linux%,$(target_cpu) $(target_os))),)
@@ -1549,7 +1549,7 @@ ifeq ($(strip $(filter-out %86 linux%,$(target_cpu) $(target_os))),)
s-intman.adb<libgnarl/s-intman__posix.adb \
s-tpopsp.adb<libgnarl/s-tpopsp__tls.adb \
$(TRASYM_DWARF_UNIX_PAIRS) \
@@ -23,7 +23,7 @@ index aaf853e3a2a..e2dd3587ed5 100644
a-exetim.adb<libgnarl/a-exetim__posix.adb \
a-exetim.ads<libgnarl/a-exetim__default.ads \
s-linux.ads<libgnarl/s-linux.ads \
@@ -2258,7 +2258,7 @@ ifeq ($(strip $(filter-out powerpc% linux%,$(target_cpu) $(target_os))),)
@@ -2174,7 +2174,7 @@ ifeq ($(strip $(filter-out powerpc% linux%,$(target_cpu) $(target_os))),)
s-tasinf.adb<libgnarl/s-tasinf__linux.adb \
s-taspri.ads<libgnarl/s-taspri__posix.ads \
$(TRASYM_DWARF_UNIX_PAIRS) \
@@ -32,7 +32,7 @@ index aaf853e3a2a..e2dd3587ed5 100644
$(ATOMICS_TARGET_PAIRS) \
$(ATOMICS_BUILTINS_TARGET_PAIRS) \
system.ads<libgnat/system-linux-ppc.ads
@@ -2289,7 +2289,7 @@ ifeq ($(strip $(filter-out powerpc% linux%,$(target_cpu) $(target_os))),)
@@ -2205,7 +2205,7 @@ ifeq ($(strip $(filter-out powerpc% linux%,$(target_cpu) $(target_os))),)
endif
# ARM linux, GNU eabi
@@ -41,7 +41,7 @@ index aaf853e3a2a..e2dd3587ed5 100644
LIBGNAT_TARGET_PAIRS = \
a-intnam.ads<libgnarl/a-intnam__linux.ads \
s-inmaop.adb<libgnarl/s-inmaop__posix.adb \
@@ -2504,7 +2504,7 @@ ifeq ($(strip $(filter-out %ia64 linux%,$(target_cpu) $(target_os))),)
@@ -2420,7 +2420,7 @@ ifeq ($(strip $(filter-out %ia64 linux%,$(target_cpu) $(target_os))),)
s-tpopsp.adb<libgnarl/s-tpopsp__tls.adb \
s-taspri.ads<libgnarl/s-taspri__posix-noaltstack.ads \
$(TRASYM_DWARF_UNIX_PAIRS) \
@@ -50,7 +50,7 @@ index aaf853e3a2a..e2dd3587ed5 100644
$(ATOMICS_TARGET_PAIRS) \
$(ATOMICS_BUILTINS_TARGET_PAIRS) \
$(GNATRTL_128BIT_PAIRS) \
@@ -2608,7 +2608,7 @@ ifeq ($(strip $(filter-out %x86_64 linux%,$(target_cpu) $(target_os))),)
@@ -2524,7 +2524,7 @@ ifeq ($(strip $(filter-out %x86_64 linux%,$(target_cpu) $(target_os))),)
s-tpopsp.adb<libgnarl/s-tpopsp__tls.adb \
s-taspri.ads<libgnarl/s-taspri__posix.ads \
$(TRASYM_DWARF_UNIX_PAIRS) \
@@ -58,9 +58,9 @@ index aaf853e3a2a..e2dd3587ed5 100644
+ s-tsmona.adb<libgnat/s-tsmona.adb \
$(ATOMICS_TARGET_PAIRS) \
$(X86_64_TARGET_PAIRS) \
$(GNATRTL_128BIT_PAIRS) \
$(SIMD_PATH_TARGET_PAIRS) \
diff --git a/gcc/ada/adaint.c b/gcc/ada/adaint.c
index 591d033fbca..a485cbf15b9 100644
index 8522094164e..92b230a462b 100644
--- a/gcc/ada/adaint.c
+++ b/gcc/ada/adaint.c
@@ -91,6 +91,11 @@
@@ -75,7 +75,7 @@ index 591d033fbca..a485cbf15b9 100644
#ifdef __PikeOS__
#define __BSD_VISIBLE 1
@@ -3446,7 +3451,6 @@ __gnat_lwp_self (void)
@@ -3438,7 +3443,6 @@ __gnat_lwp_self (void)
#endif
#if defined (__linux__)
@@ -83,7 +83,7 @@ index 591d033fbca..a485cbf15b9 100644
/* glibc versions earlier than 2.7 do not define the routines to handle
dynamically allocated CPU sets. For these targets, we use the static
@@ -3456,7 +3460,7 @@ __gnat_lwp_self (void)
@@ -3448,7 +3452,7 @@ __gnat_lwp_self (void)
/* Dynamic cpu sets */
@@ -92,7 +92,7 @@ index 591d033fbca..a485cbf15b9 100644
__gnat_cpu_alloc (size_t count)
{
return CPU_ALLOC (count);
@@ -3469,33 +3473,33 @@ __gnat_cpu_alloc_size (size_t count)
@@ -3461,33 +3465,33 @@ __gnat_cpu_alloc_size (size_t count)
}
void
@@ -134,7 +134,7 @@ index 591d033fbca..a485cbf15b9 100644
}
size_t
@@ -3505,23 +3509,23 @@ __gnat_cpu_alloc_size (size_t count ATTRIBUTE_UNUSED)
@@ -3497,23 +3501,23 @@ __gnat_cpu_alloc_size (size_t count ATTRIBUTE_UNUSED)
}
void
@@ -164,10 +164,10 @@ index 591d033fbca..a485cbf15b9 100644
#endif /* !CPU_ALLOC */
#endif /* __linux__ */
diff --git a/gcc/ada/adaint.h b/gcc/ada/adaint.h
index 2631be5ad3e..d442f4bd6cd 100644
index 987432c9307..4d782f07de9 100644
--- a/gcc/ada/adaint.h
+++ b/gcc/ada/adaint.h
@@ -321,13 +321,11 @@ extern void *__gnat_lwp_self (void);
@@ -319,13 +319,11 @@ extern void *__gnat_lwp_self (void);
/* Routines for interface to required CPU set primitives */
@@ -186,10 +186,10 @@ index 2631be5ad3e..d442f4bd6cd 100644
#if defined (_WIN32)
diff --git a/gcc/ada/terminals.c b/gcc/ada/terminals.c
index 32d30a49c7e..d960e32e2d0 100644
index c0ee4a16bb1..ed796a48c1b 100644
--- a/gcc/ada/terminals.c
+++ b/gcc/ada/terminals.c
@@ -1132,7 +1132,7 @@ __gnat_setup_winsize (void *desc ATTRIBUTE_UNUSED,
@@ -1127,7 +1127,7 @@ __gnat_setup_winsize (void *desc ATTRIBUTE_UNUSED,
/* POSIX does not specify how to open the master side of a terminal.Several
methods are available (system specific):
1- using a cloning device (USE_CLONE_DEVICE)
@@ -198,7 +198,7 @@ index 32d30a49c7e..d960e32e2d0 100644
3- openpty (USE_OPENPTY)
When using the cloning device method, the macro USE_CLONE_DEVICE should
@@ -1146,7 +1146,7 @@ __gnat_setup_winsize (void *desc ATTRIBUTE_UNUSED,
@@ -1141,7 +1141,7 @@ __gnat_setup_winsize (void *desc ATTRIBUTE_UNUSED,
#if defined (__APPLE__) || defined (BSD)
#define USE_OPENPTY
#elif defined (__linux__)
@@ -207,7 +207,7 @@ index 32d30a49c7e..d960e32e2d0 100644
#elif defined (__sun__)
#define USE_CLONE_DEVICE "/dev/ptmx"
#elif defined (_AIX)
@@ -1195,8 +1195,8 @@ allocate_pty_desc (pty_desc **desc) {
@@ -1190,8 +1190,8 @@ allocate_pty_desc (pty_desc **desc) {
int master_fd = -1;
char *slave_name = NULL;
@@ -218,3 +218,6 @@ index 32d30a49c7e..d960e32e2d0 100644
#elif defined (USE_OPENPTY)
status = openpty (&master_fd, &slave_fd, NULL, NULL, NULL);
#elif defined (USE_CLONE_DEVICE)
--
2.40.1
@@ -1,7 +1,7 @@
From 573a66e4146c9a65d895af9081a4d3d49cfc9e7a Mon Sep 17 00:00:00 2001
From 9506e729f0e4f66f4018fbfc5340a568e8520264 Mon Sep 17 00:00:00 2001
From: Drew DeVault <sir@cmpwn.com>
Date: Wed, 9 Dec 2020 16:07:26 +0000
Subject: [PATCH] configure: Add --enable-autolink-libatomic, use in
Date: Wed, 9 Dec 2020 07:42:06 +0000
Subject: [PATCH 27/33] configure: Add --enable-autolink-libatomic, use in
LINK_GCC_C_SEQUENCE_SPEC [PR81358]
This fixes issues with RISC-V.
@@ -9,19 +9,19 @@ This fixes issues with RISC-V.
Makefile.in | 1 +
gcc/config.in | 6 ++++++
gcc/config/gnu-user.h | 12 +++++++++++-
gcc/configure | 32 ++++++++++++++++++++++++++++++--
gcc/configure.ac | 22 +++++++++++++++++++++-
gcc/configure | 31 ++++++++++++++++++++++++++++++-
gcc/configure.ac | 21 +++++++++++++++++++++
gcc/doc/install.texi | 8 ++++++++
gcc/doc/tm.texi | 8 +++++++-
gcc/doc/tm.texi.in | 8 +++++++-
gcc/gcc.cc | 12 +++++++++++-
9 files changed, 102 insertions(+), 7 deletions(-)
9 files changed, 102 insertions(+), 5 deletions(-)
diff --git a/Makefile.in b/Makefile.in
index b564ddbf792..a95c7407d16 100644
index 6ff2b3f9925..394b105b271 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -232,6 +232,7 @@ HOST_EXPORTS = \
@@ -235,6 +235,7 @@ HOST_EXPORTS = \
RANLIB_FOR_TARGET="$(RANLIB_FOR_TARGET)"; export RANLIB_FOR_TARGET; \
READELF_FOR_TARGET="$(READELF_FOR_TARGET)"; export READELF_FOR_TARGET; \
TOPLEVEL_CONFIGURE_ARGUMENTS="$(TOPLEVEL_CONFIGURE_ARGUMENTS)"; export TOPLEVEL_CONFIGURE_ARGUMENTS; \
@@ -30,7 +30,7 @@ index b564ddbf792..a95c7407d16 100644
GMPLIBS="$(HOST_GMPLIBS)"; export GMPLIBS; \
GMPINC="$(HOST_GMPINC)"; export GMPINC; \
diff --git a/gcc/config.in b/gcc/config.in
index f0fbf123aa8..af84efc4f9e 100644
index 0679fbbf4c6..ee81139b385 100644
--- a/gcc/config.in
+++ b/gcc/config.in
@@ -118,6 +118,12 @@
@@ -47,7 +47,7 @@ index f0fbf123aa8..af84efc4f9e 100644
format instead of DPD */
#ifndef USED_FOR_TARGET
diff --git a/gcc/config/gnu-user.h b/gcc/config/gnu-user.h
index 8433e56c3e1..0347f10da8b 100644
index b26b17f2f2a..3f64ea46180 100644
--- a/gcc/config/gnu-user.h
+++ b/gcc/config/gnu-user.h
@@ -109,8 +109,18 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
@@ -71,10 +71,10 @@ index 8433e56c3e1..0347f10da8b 100644
#undef LINK_GCC_C_SEQUENCE_SPEC
diff --git a/gcc/configure b/gcc/configure
index 2f6b3265a6c..6dc65bf4ccb 100755
index e59cbee1767..787c35d4e25 100755
--- a/gcc/configure
+++ b/gcc/configure
@@ -981,6 +981,7 @@ with_changes_root_url
@@ -984,6 +984,7 @@ with_changes_root_url
enable_languages
with_multilib_list
with_multilib_generator
@@ -82,7 +82,7 @@ index 2f6b3265a6c..6dc65bf4ccb 100755
with_zstd
with_zstd_include
with_zstd_lib
@@ -1710,6 +1711,9 @@ Optional Features:
@@ -1713,6 +1714,9 @@ Optional Features:
--disable-shared don't provide a shared libgcc
--disable-gcov don't provide libgcov and related host tools
--enable-languages=LIST specify which front-ends to build
@@ -92,7 +92,7 @@ index 2f6b3265a6c..6dc65bf4ccb 100755
--disable-rpath do not hardcode runtime library paths
--enable-sjlj-exceptions
arrange to use setjmp/longjmp exception handling
@@ -8324,7 +8328,6 @@ else
@@ -8329,7 +8333,6 @@ else
fi
@@ -100,7 +100,7 @@ index 2f6b3265a6c..6dc65bf4ccb 100755
# Check whether --with-multilib-generator was given.
if test "${with_multilib_generator+set}" = set; then :
withval=$with_multilib_generator; :
@@ -8332,6 +8335,32 @@ else
@@ -8337,6 +8340,32 @@ else
with_multilib_generator=default
fi
@@ -133,16 +133,11 @@ index 2f6b3265a6c..6dc65bf4ccb 100755
# -------------------------
# Checks for other programs
@@ -34296,4 +34325,3 @@ if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
fi
-
diff --git a/gcc/configure.ac b/gcc/configure.ac
index e683d3a7a5f..07c81c78336 100644
index 57268319de1..56bcaa87620 100644
--- a/gcc/configure.ac
+++ b/gcc/configure.ac
@@ -1205,6 +1205,27 @@ AC_ARG_WITH(multilib-generator,
@@ -1199,6 +1199,27 @@ AC_ARG_WITH(multilib-generator,
:,
with_multilib_generator=default)
@@ -170,16 +165,11 @@ index e683d3a7a5f..07c81c78336 100644
# -------------------------
# Checks for other programs
# -------------------------
@@ -7839,4 +7860,3 @@ done
],
[subdirs='$subdirs'])
AC_OUTPUT
-
diff --git a/gcc/doc/install.texi b/gcc/doc/install.texi
index 48408d842db..c90be0ee750 100644
index 928fc6b6d4b..81a677014df 100644
--- a/gcc/doc/install.texi
+++ b/gcc/doc/install.texi
@@ -2295,6 +2295,14 @@ files, but these changed header paths may conflict with some compilation
@@ -2374,6 +2374,14 @@ files, but these changed header paths may conflict with some compilation
environments. Enabled by default, and may be disabled using
@option{--disable-canonical-system-headers}.
@@ -195,7 +185,7 @@ index 48408d842db..c90be0ee750 100644
Tell GCC that when the GNU C Library (glibc) is used on the target it
will be version @var{major}.@var{minor} or later. Normally this can
diff --git a/gcc/doc/tm.texi b/gcc/doc/tm.texi
index c5006afc00d..56b62c69ae8 100644
index a660e33739b..6183c407a2b 100644
--- a/gcc/doc/tm.texi
+++ b/gcc/doc/tm.texi
@@ -381,7 +381,13 @@ the argument @option{-lgcc} to tell the linker to do the search.
@@ -214,7 +204,7 @@ index c5006afc00d..56b62c69ae8 100644
@defmac POST_LINK_SPEC
diff --git a/gcc/doc/tm.texi.in b/gcc/doc/tm.texi.in
index f869ddd5e5b..57c93f24ac3 100644
index f7ab5d48a63..281540aba68 100644
--- a/gcc/doc/tm.texi.in
+++ b/gcc/doc/tm.texi.in
@@ -381,7 +381,13 @@ the argument @option{-lgcc} to tell the linker to do the search.
@@ -233,10 +223,10 @@ index f869ddd5e5b..57c93f24ac3 100644
@defmac POST_LINK_SPEC
diff --git a/gcc/gcc.cc b/gcc/gcc.cc
index 735b2b1bba1..f10f3c91aa7 100644
index 59390fd39d6..dae1dd4cf79 100644
--- a/gcc/gcc.cc
+++ b/gcc/gcc.cc
@@ -987,13 +987,23 @@ proper position among the other output files. */
@@ -974,13 +974,23 @@ proper position among the other output files. */
# define ASM_DEBUG_OPTION_SPEC ""
#endif
@@ -261,3 +251,6 @@ index 735b2b1bba1..f10f3c91aa7 100644
#endif
#ifdef ENABLE_DEFAULT_SSP
--
2.40.1
@@ -1,8 +1,8 @@
From 4baaeb9661fa4015d9701e3616ce1ad4e8a07fd8 Mon Sep 17 00:00:00 2001
From 966da83d0d75482a1489804593ae61f3f8e3b385 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?S=C3=B6ren=20Tempel?= <soeren+git@soeren-tempel.net>
Date: Sun, 29 Aug 2021 09:45:27 +0200
Subject: [PATCH] configure: fix detection of atomic builtins in libatomic
configure script
Date: Sun, 29 Aug 2021 12:23:34 +0200
Subject: [PATCH 28/33] configure: fix detection of atomic builtins in
libatomic configure script
Alpine's --enable-autolink-libatomic (which is enabled for riscv64 by
default) causes the libatomic configure script to incorrectly detect
@@ -22,7 +22,7 @@ See:
1 file changed, 20 insertions(+)
diff --git a/libatomic/configure.tgt b/libatomic/configure.tgt
index 33f8c91ce77..3999db2cf8a 100644
index a92ae9e8309..90b579ca4d8 100644
--- a/libatomic/configure.tgt
+++ b/libatomic/configure.tgt
@@ -30,6 +30,26 @@
@@ -52,3 +52,6 @@ index 33f8c91ce77..3999db2cf8a 100644
case "${target_cpu}" in
alpha*)
# fenv.c needs this option to generate inexact exceptions.
--
2.40.1
@@ -1,15 +1,15 @@
From 20c84de53efcb86993f1a1909e65a97240d6123e Mon Sep 17 00:00:00 2001
From e74f4b3a10d96f06b15df9d9b61d5b10a84ec084 Mon Sep 17 00:00:00 2001
From: Samuel Holland <samuel@sholland.org>
Date: Thu, 30 Jun 2022 17:08:36 +0000
Subject: [PATCH] libstdc++: do not throw exceptions for non-C locales on musl
targets
Date: Thu, 30 Jun 2022 16:44:51 +0000
Subject: [PATCH 29/33] libstdc++: do not throw exceptions for non-C locales on
musl targets
---
libstdc++-v3/config/locale/generic/c_locale.cc | 3 ---
1 file changed, 3 deletions(-)
diff --git a/libstdc++-v3/config/locale/generic/c_locale.cc b/libstdc++-v3/config/locale/generic/c_locale.cc
index 1e4db8d4415..9b79bc3c5dd 100644
index 8849d78fdfa..aff467f98fe 100644
--- a/libstdc++-v3/config/locale/generic/c_locale.cc
+++ b/libstdc++-v3/config/locale/generic/c_locale.cc
@@ -242,9 +242,6 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
@@ -22,3 +22,6 @@ index 1e4db8d4415..9b79bc3c5dd 100644
}
void
--
2.40.1
@@ -1,7 +1,8 @@
From b6554d1207d0f5771c2f5d11316b61787e4dd705 Mon Sep 17 00:00:00 2001
From bdc2699f0284e59842e5d3a39fc426550b4ba0e8 Mon Sep 17 00:00:00 2001
From: Mathias LANG <pro.mathias.lang@gmail.com>
Date: Mon, 17 Jan 2022 16:31:09 +0000
Subject: [PATCH] gdc: unconditionally link libgphobos against libucontext
Date: Mon, 17 Jan 2022 03:49:21 +0000
Subject: [PATCH 30/33] gdc: unconditionally link libgphobos against
libucontext
ref: alpine/aports#13422
---
@@ -9,10 +10,10 @@ ref: alpine/aports#13422
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Makefile.in b/Makefile.in
index a95c7407d16..ea942d60387 100644
index 394b105b271..bc4a77fc300 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -53287,7 +53287,7 @@ configure-target-libphobos:
@@ -52809,7 +52809,7 @@ configure-target-libphobos:
esac; \
module_srcdir=libphobos; \
rm -f no-such-file || : ; \
@@ -21,3 +22,6 @@ index a95c7407d16..ea942d60387 100644
$$s/$$module_srcdir/configure \
--srcdir=$${topdir}/$$module_srcdir \
$(TARGET_CONFIGARGS) --build=${build_alias} --host=${target_alias} \
--
2.40.1
@@ -1,7 +1,7 @@
From 39f5c9a850917a3c19630c0115ef0d5b0f151c72 Mon Sep 17 00:00:00 2001
From 82780d18bfcb7dabc215d4b89b1187cb253e15f8 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?S=C3=B6ren=20Tempel?= <soeren+git@soeren-tempel.net>
Date: Sat, 16 Jul 2022 13:26:49 +0200
Subject: [PATCH] druntime: link against libucontext on all platforms
Date: Sat, 16 Jul 2022 09:21:11 +0200
Subject: [PATCH 31/33] druntime: link against libucontext on all platforms
On musl-based Linux distributions, swapcontext etc. are not provided by
musl but instead by libucontext. Hence, we _always_ need to link against
@@ -12,10 +12,10 @@ an external library for these functions.
2 files changed, 16 deletions(-)
diff --git a/libphobos/configure b/libphobos/configure
index 9da06f087d0..0db0acfb9c2 100755
index 925c53c5f5e..60c2a0c11c6 100755
--- a/libphobos/configure
+++ b/libphobos/configure
@@ -15192,14 +15192,6 @@ fi
@@ -15216,14 +15216,6 @@ fi
# Keep this in sync with core/thread.d, set druntime_fiber_asm_external to
# "yes" for targets that have 'version = AsmExternal'.
druntime_fiber_asm_external=no
@@ -49,3 +49,6 @@ index 45a56f6f76a..fef6e890b1e 100644
if test "$druntime_fiber_asm_external" = no; then
AC_SEARCH_LIBS([swapcontext], [c ucontext], [],
AC_MSG_ERROR([swapcontext required but not found]))
--
2.40.1
@@ -1,14 +1,14 @@
From 4b28b8356c7ecf9375a2c07ac6be226a5693f8d2 Mon Sep 17 00:00:00 2001
From 32fc6be0b339983e31f6285dbc565b906ec983d4 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?S=C3=B6ren=20Tempel?= <soeren+git@soeren-tempel.net>
Date: Tue, 19 Jul 2022 01:05:11 +0200
Subject: [PATCH] libgnat: time_t is always 64-bit on musl libc
Date: Tue, 19 Jul 2022 14:54:07 +0200
Subject: [PATCH 32/33] libgnat: time_t is always 64-bit on musl libc
---
gcc/ada/libgnat/s-parame.ads | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gcc/ada/libgnat/s-parame.ads b/gcc/ada/libgnat/s-parame.ads
index 4b8111402ba..b670e78c53b 100644
index 3d6e345a1ba..cfe0b4d3ca6 100644
--- a/gcc/ada/libgnat/s-parame.ads
+++ b/gcc/ada/libgnat/s-parame.ads
@@ -102,7 +102,7 @@ package System.Parameters is
@@ -20,3 +20,6 @@ index 4b8111402ba..b670e78c53b 100644
-- Number of bits in type time_t
----------------------------------------------
--
2.40.1
@@ -1,101 +0,0 @@
From ecc2a2e70e44fa76a75b12d0893bc1702b72a1b4 Mon Sep 17 00:00:00 2001
From: Ian Lance Taylor <iant@golang.org>
Date: Mon, 19 Dec 2022 10:37:06 -0800
Subject: [PATCH] libgo: check for makecontext in -lucontext
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Patch from Sören Tempel.
Change-Id: I74b4052cc7aca19224afd6d9a2739c3fae46b722
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/458396
Reviewed-by: Cherry Mui <cherryyz@google.com>
Reviewed-by: Than McIntosh <thanm@google.com>
---
libgo/configure | 57 ++++++++++++++++++++++++++++++++++++++++++++++
libgo/configure.ac | 3 +++
2 files changed, 60 insertions(+)
diff --git a/libgo/configure b/libgo/configure
index 460fdad7..a607dbff 100755
--- a/libgo/configure
+++ b/libgo/configure
@@ -14818,6 +14818,63 @@ fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing makecontext" >&5
+$as_echo_n "checking for library containing makecontext... " >&6; }
+if ${ac_cv_search_makecontext+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_func_search_save_LIBS=$LIBS
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char makecontext ();
+int
+main ()
+{
+return makecontext ();
+ ;
+ return 0;
+}
+_ACEOF
+for ac_lib in '' ucontext; do
+ if test -z "$ac_lib"; then
+ ac_res="none required"
+ else
+ ac_res=-l$ac_lib
+ LIBS="-l$ac_lib $ac_func_search_save_LIBS"
+ fi
+ if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_search_makecontext=$ac_res
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext
+ if ${ac_cv_search_makecontext+:} false; then :
+ break
+fi
+done
+if ${ac_cv_search_makecontext+:} false; then :
+
+else
+ ac_cv_search_makecontext=no
+fi
+rm conftest.$ac_ext
+LIBS=$ac_func_search_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_makecontext" >&5
+$as_echo "$ac_cv_search_makecontext" >&6; }
+ac_res=$ac_cv_search_makecontext
+if test "$ac_res" != no; then :
+ test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
+
+fi
+
+
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sched_yield" >&5
$as_echo_n "checking for library containing sched_yield... " >&6; }
if ${ac_cv_search_sched_yield+:} false; then :
diff --git a/libgo/configure.ac b/libgo/configure.ac
index 09554a37..a59aa091 100644
--- a/libgo/configure.ac
+++ b/libgo/configure.ac
@@ -570,6 +570,9 @@ PTHREAD_LIBS=
AC_CHECK_LIB([pthread], [pthread_create], PTHREAD_LIBS=-lpthread)
AC_SUBST(PTHREAD_LIBS)
+dnl Test if -lucontext is required for makecontext.
+AC_SEARCH_LIBS([makecontext], [ucontext])
+
dnl Test if -lrt is required for sched_yield or nanosleep or clock_gettime.
AC_SEARCH_LIBS([sched_yield], [rt])
AC_SEARCH_LIBS([nanosleep], [rt])
@@ -0,0 +1,30 @@
From b5e9f810a8a5963104dd1897c3276f60786f9edb Mon Sep 17 00:00:00 2001
From: psykose <alice@ayaya.dev>
Date: Mon, 29 May 2023 15:33:11 +0000
Subject: [PATCH 33/33] libphobos: do not use LFS64 symbols
musl does not have these since 1.2.4, we can't use the compat interfaces.
---
libphobos/libdruntime/core/sys/posix/sys/mman.d | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/libphobos/libdruntime/core/sys/posix/sys/mman.d b/libphobos/libdruntime/core/sys/posix/sys/mman.d
index 0d3d517d69a..323aa0af72d 100644
--- a/libphobos/libdruntime/core/sys/posix/sys/mman.d
+++ b/libphobos/libdruntime/core/sys/posix/sys/mman.d
@@ -293,11 +293,7 @@ else version (CRuntime_Bionic)
}
else version (CRuntime_Musl)
{
- static if (__USE_LARGEFILE64) void* mmap64(void*, size_t, int, int, int, off_t);
- static if (__USE_FILE_OFFSET64)
- alias mmap = mmap64;
- else
- void* mmap(void*, size_t, int, int, int, off_t);
+ void* mmap(void*, size_t, int, int, int, off_t);
int munmap(void*, size_t);
}
else version (CRuntime_UClibc)
--
2.40.1
@@ -1,204 +0,0 @@
From b3840bdcc0eee2a4d099a9af52199944ade7acb9 Mon Sep 17 00:00:00 2001
From: Ian Lance Taylor <iant@golang.org>
Date: Tue, 29 Nov 2022 17:28:44 -0800
Subject: [PATCH] syscall, runtime: always call XSI strerror_r
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
This does the right thing for either glibc or musl on GNU/Linux.
Based on patch by Sören Tempel.
Change-Id: If2969e131f0fae456d58b35d839d8abe191fcc59
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/454176
Reviewed-by: Cherry Mui <cherryyz@google.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
TryBot-Bypass: Ian Lance Taylor <iant@google.com>
---
libgo/Makefile.am | 1 +
libgo/Makefile.in | 6 +++++-
libgo/go/syscall/errstr.go | 22 ++++++++-----------
libgo/go/syscall/errstr_glibc.go | 33 ----------------------------
libgo/runtime/go-strerror.c | 37 ++++++++++++++++++++++++++++++++
5 files changed, 52 insertions(+), 47 deletions(-)
delete mode 100644 libgo/go/syscall/errstr_glibc.go
create mode 100644 libgo/runtime/go-strerror.c
diff --git a/libgo/Makefile.am b/libgo/Makefile.am
index e0a1eec5..df568743 100644
--- a/libgo/Makefile.am
+++ b/libgo/Makefile.am
@@ -465,6 +465,7 @@ runtime_files = \
runtime/go-nanotime.c \
runtime/go-now.c \
runtime/go-nosys.c \
+ runtime/go-strerror.c \
runtime/go-reflect-call.c \
runtime/go-setenv.c \
runtime/go-signal.c \
diff --git a/libgo/Makefile.in b/libgo/Makefile.in
index 7bef5df9..f2f3f0fc 100644
--- a/libgo/Makefile.in
+++ b/libgo/Makefile.in
@@ -247,7 +247,7 @@ am__objects_4 = runtime/aeshash.lo runtime/go-assert.lo \
runtime/go-fieldtrack.lo runtime/go-matherr.lo \
runtime/go-memclr.lo runtime/go-memmove.lo \
runtime/go-memequal.lo runtime/go-nanotime.lo \
- runtime/go-now.lo runtime/go-nosys.lo \
+ runtime/go-now.lo runtime/go-nosys.lo runtime/go-strerror.lo \
runtime/go-reflect-call.lo runtime/go-setenv.lo \
runtime/go-signal.lo runtime/go-unsafe-pointer.lo \
runtime/go-unsetenv.lo runtime/go-unwind.lo \
@@ -917,6 +917,7 @@ runtime_files = \
runtime/go-nanotime.c \
runtime/go-now.c \
runtime/go-nosys.c \
+ runtime/go-strerror.c \
runtime/go-reflect-call.c \
runtime/go-setenv.c \
runtime/go-signal.c \
@@ -1390,6 +1391,8 @@ runtime/go-now.lo: runtime/$(am__dirstamp) \
runtime/$(DEPDIR)/$(am__dirstamp)
runtime/go-nosys.lo: runtime/$(am__dirstamp) \
runtime/$(DEPDIR)/$(am__dirstamp)
+runtime/go-strerror.lo: runtime/$(am__dirstamp) \
+ runtime/$(DEPDIR)/$(am__dirstamp)
runtime/go-reflect-call.lo: runtime/$(am__dirstamp) \
runtime/$(DEPDIR)/$(am__dirstamp)
runtime/go-setenv.lo: runtime/$(am__dirstamp) \
@@ -1457,6 +1460,7 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@runtime/$(DEPDIR)/go-reflect-call.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@runtime/$(DEPDIR)/go-setenv.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@runtime/$(DEPDIR)/go-signal.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@runtime/$(DEPDIR)/go-strerror.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@runtime/$(DEPDIR)/go-unsafe-pointer.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@runtime/$(DEPDIR)/go-unsetenv.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@runtime/$(DEPDIR)/go-unwind.Plo@am__quote@
diff --git a/libgo/go/syscall/errstr.go b/libgo/go/syscall/errstr.go
index 6c2441d3..9f688e2a 100644
--- a/libgo/go/syscall/errstr.go
+++ b/libgo/go/syscall/errstr.go
@@ -4,23 +4,19 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build !hurd
-// +build !linux
-
package syscall
-//sysnb strerror_r(errnum int, buf []byte) (err Errno)
-//strerror_r(errnum _C_int, buf *byte, buflen Size_t) _C_int
+import "internal/bytealg"
+
+//extern go_strerror
+func go_strerror(_C_int, *byte, Size_t) _C_int
func Errstr(errnum int) string {
- for len := 128; ; len *= 2 {
- b := make([]byte, len)
- errno := strerror_r(errnum, b)
+ for size := 128; ; size *= 2 {
+ b := make([]byte, size)
+ errno := go_strerror(_C_int(errnum), &b[0], Size_t(len(b)))
if errno == 0 {
- i := 0
- for b[i] != 0 {
- i++
- }
+ i := bytealg.IndexByte(b, 0)
// Lowercase first letter: Bad -> bad, but
// STREAM -> STREAM.
if i > 1 && 'A' <= b[0] && b[0] <= 'Z' && 'a' <= b[1] && b[1] <= 'z' {
@@ -29,7 +25,7 @@ func Errstr(errnum int) string {
return string(b[:i])
}
if errno != ERANGE {
- return "errstr failure"
+ return "strerror_r failure"
}
}
}
diff --git a/libgo/go/syscall/errstr_glibc.go b/libgo/go/syscall/errstr_glibc.go
deleted file mode 100644
index 5b19e6f2..00000000
--- a/libgo/go/syscall/errstr_glibc.go
+++ /dev/null
@@ -1,33 +0,0 @@
-// errstr_glibc.go -- GNU/Linux and GNU/Hurd specific error strings.
-
-// Copyright 2010 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// We use this rather than errstr.go because on GNU/Linux sterror_r
-// returns a pointer to the error message, and may not use buf at all.
-
-// +build hurd linux
-
-package syscall
-
-import "unsafe"
-
-//sysnb strerror_r(errnum int, b []byte) (errstr *byte)
-//strerror_r(errnum _C_int, b *byte, len Size_t) *byte
-
-func Errstr(errnum int) string {
- a := make([]byte, 128)
- p := strerror_r(errnum, a)
- b := (*[1000]byte)(unsafe.Pointer(p))
- i := 0
- for b[i] != 0 {
- i++
- }
- // Lowercase first letter: Bad -> bad, but STREAM -> STREAM.
- if i > 1 && 'A' <= b[0] && b[0] <= 'Z' && 'a' <= b[1] && b[1] <= 'z' {
- c := b[0] + 'a' - 'A'
- return string(c) + string(b[1:i])
- }
- return string(b[:i])
-}
diff --git a/libgo/runtime/go-strerror.c b/libgo/runtime/go-strerror.c
new file mode 100644
index 00000000..13d1d91d
--- /dev/null
+++ b/libgo/runtime/go-strerror.c
@@ -0,0 +1,37 @@
+/* go-strerror.c -- wrapper around XSI-compliant strerror_r.
+
+ Copyright 2022 The Go Authors. All rights reserved.
+ Use of this source code is governed by a BSD-style
+ license that can be found in the LICENSE file. */
+
+/* There are two version of strerror_r on GNU/Linux: a GNU-specific
+ and an XSI-compliant version. The former version is only available
+ on glibc. Since glibc 2.13, the XSI-compliant version is also
+ provided by glibc if _GNU_SOURCE is not defined. Since the
+ entirety of gofrontend is compiled with _GNU_SOURCE, this file
+ exists to selectively undefine it and provides an alias to the
+ XSI-compliant version of strerror_r(3). */
+
+#ifdef __linux__
+
+/* Force selection of XSI-compliant strerror_r by glibc. */
+#undef XOPEN_SOURCE
+#define XOPEN_SOURCE 600
+#undef _POSIX_C_SOURCE
+#define _POSIX_C_SOURCE 200112L
+#undef _GNU_SOURCE
+
+#endif /* __linux__ */
+
+#include <string.h>
+
+#ifndef HAVE_STRERROR_R
+// Provided by go-nosys.c if not provided by libc itself.
+extern int strerror_r (int, char *, size_t);
+#endif
+
+int
+go_strerror (int errnum, char *buf, size_t buflen)
+{
+ return strerror_r (errnum, buf, buflen);
+}
@@ -1,199 +0,0 @@
From 3b9243b891cc06373639a23ed5717b0d1c2d8ea6 Mon Sep 17 00:00:00 2001
From: Ian Lance Taylor <iant@golang.org>
Date: Tue, 14 Jun 2022 06:13:43 -0700
Subject: [PATCH] libgo: permit loff_t and off_t to be macros
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
They are macros in musl libc, rather than typedefs, and -fgo-dump-spec
doesn't handle that case.
Based on patch by Sören Tempel.
Change-Id: Ic9a608fd964a6f78e754aa8e3100aff06ab3dade
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/412075
Reviewed-by: Ian Lance Taylor <iant@google.com>
Reviewed-by: Cherry Mui <cherryyz@google.com>
libgo: #include <sys/types.h> when checking for loff_t
Fixes https://gcc.gnu.org/PR106033
Fixes golang/go#53469
Change-Id: I060021b7bb9334949b567442448abb6822fd6d35
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/413214
Reviewed-by: Cherry Mui <cherryyz@google.com>
Reviewed-by: Than McIntosh <thanm@google.com>
---
libgo/config.h.in | 3 +++
libgo/configure | 12 ++++++++++--
libgo/configure.ac | 11 +++++++++--
libgo/go/syscall/libcall_linux.go | 17 +++++++++--------
libgo/mksysinfo.sh | 6 +-----
libgo/sysinfo.c | 15 ++++++++++++++-
6 files changed, 46 insertions(+), 18 deletions(-)
diff --git a/libgo/config.h.in b/libgo/config.h.in
index 25b8ab8f9ee..2c3c7469675 100644
--- a/libgo/config.h.in
+++ b/libgo/config.h.in
@@ -70,6 +70,9 @@
/* Define to 1 if you have the `fchownat' function. */
#undef HAVE_FCHOWNAT
+/* Define to 1 if you have the <fcntl.h> header file. */
+#undef HAVE_FCNTL_H
+
/* Define to 1 if you have the `futimesat' function. */
#undef HAVE_FUTIMESAT
diff --git a/libgo/configure b/libgo/configure
index ffe17c9be55..61a49947eb9 100755
--- a/libgo/configure
+++ b/libgo/configure
@@ -15249,7 +15249,7 @@ $as_echo "#define HAVE_GETIPINFO 1" >>confdefs.h
fi
-for ac_header in port.h sched.h semaphore.h sys/file.h sys/mman.h syscall.h sys/epoll.h sys/event.h sys/inotify.h sys/ptrace.h sys/syscall.h sys/sysctl.h sys/user.h sys/utsname.h sys/select.h sys/socket.h net/bpf.h net/if.h net/if_arp.h net/route.h netpacket/packet.h sys/prctl.h sys/mount.h sys/vfs.h sys/statfs.h sys/timex.h sys/sysinfo.h utime.h linux/ether.h linux/fs.h linux/ptrace.h linux/reboot.h netinet/in_syst.h netinet/ip.h netinet/ip_mroute.h netinet/if_ether.h lwp.h
+for ac_header in fcntl.h port.h sched.h semaphore.h sys/file.h sys/mman.h syscall.h sys/epoll.h sys/event.h sys/inotify.h sys/ptrace.h sys/syscall.h sys/sysctl.h sys/user.h sys/utsname.h sys/select.h sys/socket.h net/bpf.h net/if.h net/if_arp.h net/route.h netpacket/packet.h sys/prctl.h sys/mount.h sys/vfs.h sys/statfs.h sys/timex.h sys/sysinfo.h utime.h linux/ether.h linux/fs.h linux/ptrace.h linux/reboot.h netinet/in_syst.h netinet/ip.h netinet/ip_mroute.h netinet/if_ether.h lwp.h
do :
as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
@@ -15546,7 +15546,14 @@ _ACEOF
fi
-ac_fn_c_check_type "$LINENO" "loff_t" "ac_cv_type_loff_t" "$ac_includes_default"
+
+CFLAGS_hold="$CFLAGS"
+CFLAGS="$OSCFLAGS $CFLAGS"
+ac_fn_c_check_type "$LINENO" "loff_t" "ac_cv_type_loff_t" "
+#include <sys/types.h>
+#include <fcntl.h>
+
+"
if test "x$ac_cv_type_loff_t" = xyes; then :
cat >>confdefs.h <<_ACEOF
@@ -15556,6 +15563,7 @@ _ACEOF
fi
+CFLAGS="$CFLAGS_hold"
LIBS_hold="$LIBS"
LIBS="$LIBS -lm"
diff --git a/libgo/configure.ac b/libgo/configure.ac
index 7e2b98ba67c..274fcfc35c7 100644
--- a/libgo/configure.ac
+++ b/libgo/configure.ac
@@ -579,7 +579,7 @@ AC_C_BIGENDIAN
GCC_CHECK_UNWIND_GETIPINFO
-AC_CHECK_HEADERS(port.h sched.h semaphore.h sys/file.h sys/mman.h syscall.h sys/epoll.h sys/event.h sys/inotify.h sys/ptrace.h sys/syscall.h sys/sysctl.h sys/user.h sys/utsname.h sys/select.h sys/socket.h net/bpf.h net/if.h net/if_arp.h net/route.h netpacket/packet.h sys/prctl.h sys/mount.h sys/vfs.h sys/statfs.h sys/timex.h sys/sysinfo.h utime.h linux/ether.h linux/fs.h linux/ptrace.h linux/reboot.h netinet/in_syst.h netinet/ip.h netinet/ip_mroute.h netinet/if_ether.h lwp.h)
+AC_CHECK_HEADERS(fcntl.h port.h sched.h semaphore.h sys/file.h sys/mman.h syscall.h sys/epoll.h sys/event.h sys/inotify.h sys/ptrace.h sys/syscall.h sys/sysctl.h sys/user.h sys/utsname.h sys/select.h sys/socket.h net/bpf.h net/if.h net/if_arp.h net/route.h netpacket/packet.h sys/prctl.h sys/mount.h sys/vfs.h sys/statfs.h sys/timex.h sys/sysinfo.h utime.h linux/ether.h linux/fs.h linux/ptrace.h linux/reboot.h netinet/in_syst.h netinet/ip.h netinet/ip_mroute.h netinet/if_ether.h lwp.h)
AC_CHECK_HEADERS([netinet/icmp6.h], [], [],
[#include <netinet/in.h>
@@ -601,7 +601,14 @@ AC_STRUCT_DIRENT_D_TYPE
AC_CHECK_FUNCS(accept4 dup3 epoll_create1 faccessat fallocate fchmodat fchownat futimesat getxattr inotify_add_watch inotify_init inotify_init1 inotify_rm_watch listxattr mkdirat mknodat open64 openat pipe2 removexattr renameat setxattr sync_file_range splice syscall tee unlinkat unshare utimensat)
AC_TYPE_OFF_T
-AC_CHECK_TYPES([loff_t])
+
+CFLAGS_hold="$CFLAGS"
+CFLAGS="$OSCFLAGS $CFLAGS"
+AC_CHECK_TYPES([loff_t], [], [], [[
+#include <sys/types.h>
+#include <fcntl.h>
+]])
+CFLAGS="$CFLAGS_hold"
LIBS_hold="$LIBS"
LIBS="$LIBS -lm"
diff --git a/libgo/go/syscall/libcall_linux.go b/libgo/go/syscall/libcall_linux.go
index 96974bd3269..65eb1a745f7 100644
--- a/libgo/go/syscall/libcall_linux.go
+++ b/libgo/go/syscall/libcall_linux.go
@@ -209,19 +209,20 @@ func Gettid() (tid int) {
//sys Setxattr(path string, attr string, data []byte, flags int) (err error)
//setxattr(path *byte, name *byte, value *byte, size Size_t, flags _C_int) _C_int
-//sys splice(rfd int, roff *_loff_t, wfd int, woff *_loff_t, len int, flags int) (n int64, err error)
-//splice(rfd _C_int, roff *_loff_t, wfd _C_int, woff *_loff_t, len Size_t, flags _C_uint) Ssize_t
+//sys splice(rfd int, roff *_libgo_loff_t_type, wfd int, woff *_libgo_loff_t_type, len int, flags int) (n int64, err error)
+//splice(rfd _C_int, roff *_libgo_loff_t_type, wfd _C_int, woff *_libgo_loff_t_type, len Size_t, flags _C_uint) Ssize_t
+
func Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int64, err error) {
- var lroff _loff_t
- var plroff *_loff_t
+ var lroff _libgo_loff_t_type
+ var plroff *_libgo_loff_t_type
if roff != nil {
- lroff = _loff_t(*roff)
+ lroff = _libgo_loff_t_type(*roff)
plroff = &lroff
}
- var lwoff _loff_t
- var plwoff *_loff_t
+ var lwoff _libgo_loff_t_type
+ var plwoff *_libgo_loff_t_type
if woff != nil {
- lwoff = _loff_t(*woff)
+ lwoff = _libgo_loff_t_type(*woff)
plwoff = &lwoff
}
n, err = splice(rfd, plroff, wfd, plwoff, len, flags)
diff --git a/libgo/mksysinfo.sh b/libgo/mksysinfo.sh
index 0c52ea5d71a..5aa309155c3 100755
--- a/libgo/mksysinfo.sh
+++ b/libgo/mksysinfo.sh
@@ -403,11 +403,7 @@ fi
# Some basic types.
echo 'type Size_t _size_t' >> ${OUT}
echo "type Ssize_t _ssize_t" >> ${OUT}
-if grep '^const _HAVE_OFF64_T = ' gen-sysinfo.go > /dev/null 2>&1; then
- echo "type Offset_t _off64_t" >> ${OUT}
-else
- echo "type Offset_t _off_t" >> ${OUT}
-fi
+echo "type Offset_t _libgo_off_t_type" >> ${OUT}
echo "type Mode_t _mode_t" >> ${OUT}
echo "type Pid_t _pid_t" >> ${OUT}
echo "type Uid_t _uid_t" >> ${OUT}
diff --git a/libgo/sysinfo.c b/libgo/sysinfo.c
index 336a5983750..fc0210992fa 100644
--- a/libgo/sysinfo.c
+++ b/libgo/sysinfo.c
@@ -354,6 +354,18 @@ enum {
};
#endif
+#if defined(HAVE_LOFF_T)
+// loff_t can be defined as a macro; for -fgo-dump-spec make sure we
+// see a typedef.
+typedef loff_t libgo_loff_t_type;
+#endif
+
+#if defined(HAVE_OFF64_T)
+typedef off64_t libgo_off_t_type;
+#else
+typedef off_t libgo_off_t_type;
+#endif
+
// The following section introduces explicit references to types and
// constants of interest to support bootstrapping libgo using a
// compiler that doesn't support -fdump-go-spec (e.g., clang), via
@@ -534,7 +546,8 @@ SREF(timex);
// From sys/types.h
TREF(pid_t);
TREF(off_t);
-TREF(loff_t);
+TREF(libgo_loff_t_type);
+TREF(libgo_off_t_type);
TREF(size_t);
TREF(ssize_t);
TREF(mode_t);
@@ -1,59 +0,0 @@
From 5e658f4659c551330ea68f5667e4f951b218f32d Mon Sep 17 00:00:00 2001
From: Ian Lance Taylor <iant@golang.org>
Date: Wed, 26 Oct 2022 17:23:42 -0700
Subject: [PATCH] runtime: use _libgo_off_t_type when calling C mmap
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
The last argument to the C mmap function is type off_t, not uintptr.
On some 32-bit systems, off_t is larger than uintptr.
Based on patch by Sören Tempel.
Change-Id: Ib6f9d5bcd4734f99a72889e2282b97ec3c8fbd34
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/445735
Reviewed-by: Cherry Mui <cherryyz@google.com>
Reviewed-by: Than McIntosh <thanm@google.com>
---
libgo/go/runtime/mem_gccgo.go | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/libgo/go/runtime/mem_gccgo.go b/libgo/go/runtime/mem_gccgo.go
index fa3389d8..1e84f4f5 100644
--- a/libgo/go/runtime/mem_gccgo.go
+++ b/libgo/go/runtime/mem_gccgo.go
@@ -15,7 +15,7 @@ import (
//go:linkname sysFree
//extern mmap
-func sysMmap(addr unsafe.Pointer, n uintptr, prot, flags, fd int32, off uintptr) unsafe.Pointer
+func sysMmap(addr unsafe.Pointer, n uintptr, prot, flags, fd int32, off _libgo_off_t_type) unsafe.Pointer
//extern munmap
func munmap(addr unsafe.Pointer, length uintptr) int32
@@ -38,7 +38,7 @@ func init() {
}
func mmap(addr unsafe.Pointer, n uintptr, prot, flags, fd int32, off uintptr) (unsafe.Pointer, int) {
- p := sysMmap(addr, n, prot, flags, fd, off)
+ p := sysMmap(addr, n, prot, flags, fd, _libgo_off_t_type(off))
if uintptr(p) == _MAP_FAILED {
return nil, errno()
}
@@ -47,6 +47,7 @@ func mmap(addr unsafe.Pointer, n uintptr, prot, flags, fd int32, off uintptr) (u
// Don't split the stack as this method may be invoked without a valid G, which
// prevents us from allocating more stack.
+//
//go:nosplit
func sysAlloc(n uintptr, sysStat *sysMemStat) unsafe.Pointer {
p, err := mmap(nil, n, _PROT_READ|_PROT_WRITE, _MAP_ANON|_MAP_PRIVATE, mmapFD, 0)
@@ -165,6 +166,7 @@ func sysHugePage(v unsafe.Pointer, n uintptr) {
// Don't split the stack as this function may be invoked without a valid G,
// which prevents us from allocating more stack.
+//
//go:nosplit
func sysFree(v unsafe.Pointer, n uintptr, sysStat *sysMemStat) {
sysStat.add(-int64(n))
@@ -1,71 +0,0 @@
From c86b726c048eddc1be320c0bf64a897658bee13d Mon Sep 17 00:00:00 2001
From: Uros Bizjak <ubizjak@gmail.com>
Date: Wed, 18 May 2022 20:03:26 +0200
Subject: [PATCH] x86: Fix -fsplit-stack feature detection via
TARGET_CAN_SPLIT_STACK
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Since commit c163647ffbc9a20c8feb6e079dbecccfe016c82e -fsplit-stack
is only supported on glibc targets. However, this original commit
required some fixups. As part of the fixup, the changes to the
gnu-user-common.h and gnu.h were partially reverted in commit
60953a23d57b13a672f751bec0c6eefc059eb1ab thus causing TARGET_CAN_SPLIT_STACK
to be defined for non-glibc targets even though -fsplit-stack is
actually not supported and attempting to use it causes a runtime error.
This causes gcc internal code, such as ./gcc/go/gospec.c to not
correctly detect that -fsplit-stack is not supported and thus causes
gccgo to fail compilation on non-glibc targets.
This commit ensures that TARGET_CAN_SPLIT_STACK is only set if the
default libc is glibc. It is presently unclear to me if there is a
better way to detect glibc at pre-processor time.
The proposed changes have been tested on x86 and x86_64 Alpine Linux
(which uses musl libc) and fix compilation of gccgo for this target.
Signed-off-by: Sören Tempel <soeren@soeren-tempel.net>
gcc/ChangeLog:
* config/i386/gnu-user-common.h (defined): Only define
TARGET_CAN_SPLIT_STACK for glibc targets.
* config/i386/gnu.h (defined): Ditto.
---
gcc/config/i386/gnu-user-common.h | 5 +++--
gcc/config/i386/gnu.h | 5 +++--
2 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/gcc/config/i386/gnu-user-common.h b/gcc/config/i386/gnu-user-common.h
index 23b54c5be52..cab9be2bfb7 100644
--- a/gcc/config/i386/gnu-user-common.h
+++ b/gcc/config/i386/gnu-user-common.h
@@ -66,7 +66,8 @@ along with GCC; see the file COPYING3. If not see
#define STACK_CHECK_STATIC_BUILTIN 1
/* We only build the -fsplit-stack support in libgcc if the
- assembler has full support for the CFI directives. */
-#if HAVE_GAS_CFI_PERSONALITY_DIRECTIVE
+ assembler has full support for the CFI directives. Also
+ we only support -fsplit-stack on glibc targets. */
+#if (DEFAULT_LIBC == LIBC_GLIBC) && HAVE_GAS_CFI_PERSONALITY_DIRECTIVE
#define TARGET_CAN_SPLIT_STACK
#endif
diff --git a/gcc/config/i386/gnu.h b/gcc/config/i386/gnu.h
index 401e60c9a02..fb8d69a97d8 100644
--- a/gcc/config/i386/gnu.h
+++ b/gcc/config/i386/gnu.h
@@ -41,8 +41,9 @@ along with GCC. If not, see <http://www.gnu.org/licenses/>.
#define TARGET_THREAD_SSP_OFFSET 0x14
/* We only build the -fsplit-stack support in libgcc if the
- assembler has full support for the CFI directives. */
-#if HAVE_GAS_CFI_PERSONALITY_DIRECTIVE
+ assembler has full support for the CFI directives. Also
+ we only support -fsplit-stack on glibc targets. */
+#if (DEFAULT_LIBC == LIBC_GLIBC) && HAVE_GAS_CFI_PERSONALITY_DIRECTIVE
#define TARGET_CAN_SPLIT_STACK
#endif
/* We steal the last transactional memory word. */
@@ -1,41 +0,0 @@
From 548720bca6bff21ebc9aba22249d9ce45bbd90c7 Mon Sep 17 00:00:00 2001
From: Ian Lance Taylor <iant@golang.org>
Date: Wed, 29 Jun 2022 15:32:04 -0700
Subject: [PATCH] libgo: handle stat st_atim32 field and SYS_SECCOMP
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Patches for musl support, from Sören Tempel.
Fixes https://gcc.gnu.org/PR105225
Change-Id: If396877d4a4c7d27962226d7a6e3bb91b1344413
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/415294
Reviewed-by: Than McIntosh <thanm@google.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
---
libgo/mksysinfo.sh | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/libgo/mksysinfo.sh b/libgo/mksysinfo.sh
index 5aa30915..ea1fa17d 100755
--- a/libgo/mksysinfo.sh
+++ b/libgo/mksysinfo.sh
@@ -127,6 +127,7 @@ fi
# The syscall numbers. We force the names to upper case.
grep '^const _SYS_' gen-sysinfo.go | \
+ grep -v '^const _SYS_SECCOMP = ' | \
sed -e 's/const _\(SYS_[^= ]*\).*$/\1/' | \
while read sys; do
sup=`echo $sys | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ`
@@ -506,7 +507,7 @@ fi
# For historical reasons Go uses the suffix "timespec" instead of "tim" for
# stat_t's time fields on NetBSD.
-st_times='-e s/st_atim/Atim/ -e s/st_mtim/Mtim/ -e s/st_ctim/Ctim/'
+st_times='-e s/st_atim/Atim/g -e s/st_mtim/Mtim/g -e s/st_ctim/Ctim/g'
if test "${GOOS}" = "netbsd"; then
st_times='-e s/st_atim/Atimespec/ -e s/st_mtim/Mtimespec/ -e s/st_ctim/Ctimespec/'
fi
@@ -1,108 +0,0 @@
From 8f1a91aeff400d572857895b7f5e863ec5a4d93e Mon Sep 17 00:00:00 2001
From: Ian Lance Taylor <iant@golang.org>
Date: Mon, 26 Sep 2022 15:03:53 -0400
Subject: [PATCH] runtime: portable access to sigev_notify_thread_id
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Previously, libgo relied on the _sigev_un implementation-specific
field in struct sigevent, which is only available on glibc.
This patch uses the sigev_notify_thread_id macro instead which is
mandated by timer_create(2). In theory, this should work with any libc
implementation for Linux. Unfortunately, there is an open glibc bug
as glibc does not define this macro. For this reason, a glibc-specific
workaround is required. Other libcs (such as musl) define the macro
and don't require the workaround.
See https://sourceware.org/bugzilla/show_bug.cgi?id=27417
This makes libgo compatible with musl libc.
Based on patch by Sören Tempel.
Change-Id: I0924a53d5212730ebc395ecf9199f85967be8cc6
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/434755
Reviewed-by: Cherry Mui <cherryyz@google.com>
Reviewed-by: Than McIntosh <thanm@google.com>
---
libgo/go/runtime/os_linux.go | 12 +++++++++++-
libgo/runtime/go-signal.c | 18 ++++++++++++++++++
2 files changed, 29 insertions(+), 1 deletion(-)
diff --git a/libgo/go/runtime/os_linux.go b/libgo/go/runtime/os_linux.go
index 96fb1788..2b2d827c 100644
--- a/libgo/go/runtime/os_linux.go
+++ b/libgo/go/runtime/os_linux.go
@@ -22,6 +22,12 @@ type mOS struct {
profileTimerValid uint32
}
+// setSigeventTID is written in C to set the sigev_notify_thread_id
+// field of a sigevent struct.
+//
+//go:noescape
+func setSigeventTID(*_sigevent, int32)
+
func getProcID() uint64 {
return uint64(gettid())
}
@@ -52,9 +58,12 @@ const (
)
// Atomically,
+//
// if(*addr == val) sleep
+//
// Might be woken up spuriously; that's allowed.
// Don't sleep longer than ns; ns < 0 means forever.
+//
//go:nosplit
func futexsleep(addr *uint32, val uint32, ns int64) {
// Some Linux kernels have a bug where futex of
@@ -73,6 +82,7 @@ func futexsleep(addr *uint32, val uint32, ns int64) {
}
// If any procs are sleeping on addr, wake up at most cnt.
+//
//go:nosplit
func futexwakeup(addr *uint32, cnt uint32) {
ret := futex(unsafe.Pointer(addr), _FUTEX_WAKE_PRIVATE, cnt, nil, nil, 0)
@@ -365,7 +375,7 @@ func setThreadCPUProfiler(hz int32) {
var sevp _sigevent
sevp.sigev_notify = _SIGEV_THREAD_ID
sevp.sigev_signo = _SIGPROF
- *((*int32)(unsafe.Pointer(&sevp._sigev_un))) = int32(mp.procid)
+ setSigeventTID(&sevp, int32(mp.procid))
ret := timer_create(_CLOCK_THREAD_CPUTIME_ID, &sevp, &timerid)
if ret != 0 {
// If we cannot create a timer for this M, leave profileTimerValid false
diff --git a/libgo/runtime/go-signal.c b/libgo/runtime/go-signal.c
index 528d9b6d..aa1b6305 100644
--- a/libgo/runtime/go-signal.c
+++ b/libgo/runtime/go-signal.c
@@ -183,6 +183,24 @@ setSigactionHandler(struct sigaction* sa, uintptr handler)
sa->sa_sigaction = (void*)(handler);
}
+#ifdef __linux__
+
+// Workaround for https://sourceware.org/bugzilla/show_bug.cgi?id=27417
+#ifndef sigev_notify_thread_id
+ #define sigev_notify_thread_id _sigev_un._tid
+#endif
+
+void setSigeventTID(struct sigevent*, int32_t)
+ __asm__ (GOSYM_PREFIX "runtime.setSigeventTID");
+
+void
+setSigeventTID(struct sigevent *sev, int32_t v)
+{
+ sev->sigev_notify_thread_id = v;
+}
+
+#endif // defined(__linux__)
+
// C code to fetch values from the siginfo_t and ucontext_t pointers
// passed to a signal handler.
@@ -1,75 +0,0 @@
From 01be086df55016ad676685c6b0dca6aa11330bfc Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?S=C3=B6ren=20Tempel?= <soeren+git@soeren-tempel.net>
Date: Sun, 17 Jul 2022 13:38:39 +0200
Subject: [PATCH] libphobos: don't define __mode_t twice on musl targets
For musl targets, __mode_t is already aliased to uint, thus if it
aliased in an architecture-specific if-case then it is defined twice
which causes a build error.
To-Do: Report this upstream or revise this patch in a way that is also
works with glibc and submit that upstream.
---
libphobos/libdruntime/core/sys/posix/sys/stat.d | 7 -------
1 file changed, 7 deletions(-)
diff --git a/libphobos/libdruntime/core/sys/posix/sys/stat.d b/libphobos/libdruntime/core/sys/posix/sys/stat.d
index 1fb4e44cbbf..ca31bbb7ccf 100644
--- a/libphobos/libdruntime/core/sys/posix/sys/stat.d
+++ b/libphobos/libdruntime/core/sys/posix/sys/stat.d
@@ -167,7 +167,6 @@ version (linux)
alias __dev_t = ulong;
alias __ino_t = c_ulong;
alias __ino64_t = ulong;
- alias __mode_t = uint;
alias __nlink_t = size_t;
alias __uid_t = uint;
alias __gid_t = uint;
@@ -483,7 +482,6 @@ version (linux)
alias __dev_t = ulong;
alias __ino_t = c_ulong;
alias __ino64_t = ulong;
- alias __mode_t = uint;
alias __nlink_t = uint;
alias __uid_t = uint;
alias __gid_t = uint;
@@ -565,7 +563,6 @@ version (linux)
alias __dev_t = ulong;
alias __ino_t = c_ulong;
alias __ino64_t = ulong;
- alias __mode_t = uint;
alias __nlink_t = size_t;
alias __uid_t = uint;
alias __gid_t = uint;
@@ -660,7 +657,6 @@ version (linux)
alias __dev_t = ulong;
alias __ino_t = c_ulong;
alias __ino64_t = ulong;
- alias __mode_t = uint;
alias __nlink_t = uint;
alias __uid_t = uint;
alias __gid_t = uint;
@@ -746,7 +742,6 @@ version (linux)
alias __dev_t = ulong;
alias __ino_t = c_ulong;
alias __ino64_t = ulong;
- alias __mode_t = uint;
alias __nlink_t = uint;
alias __uid_t = uint;
alias __gid_t = uint;
@@ -838,7 +833,6 @@ version (linux)
alias __dev_t = ulong;
alias __ino_t = c_ulong;
alias __ino64_t = ulong;
- alias __mode_t = uint;
alias __nlink_t = uint;
alias __uid_t = uint;
alias __gid_t = uint;
@@ -914,7 +908,6 @@ version (linux)
alias __dev_t = ulong;
alias __ino_t = c_ulong;
alias __ino64_t = ulong;
- alias __mode_t = uint;
alias __nlink_t = ulong;
alias __uid_t = uint;
alias __gid_t = uint;
@@ -1,36 +0,0 @@
From d53e8a0e94e34dc609e34dd5e404debda2640cfb Mon Sep 17 00:00:00 2001
From: Ian Lance Taylor <iant@golang.org>
Date: Sat, 30 Jul 2022 07:29:28 -0700
Subject: [PATCH] libgo: use SYS_timer_settime32
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Musl defines SYS_timer_settime32, not SYS_timer_settime, on 32-bit systems.
Based on patch by Sören Tempel.
Change-Id: I1f3485028d132ceca1aba595325af24b4d72b894
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/420222
Reviewed-by: Ian Lance Taylor <iant@google.com>
Reviewed-by: Cherry Mui <cherryyz@google.com>
---
libgo/sysinfo.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/libgo/sysinfo.c b/libgo/sysinfo.c
index fc021099..180f5c31 100644
--- a/libgo/sysinfo.c
+++ b/libgo/sysinfo.c
@@ -354,6 +354,11 @@ enum {
};
#endif
+#if !defined(SYS_timer_settime) && defined(SYS_timer_settime32)
+// musl defines SYS_timer_settim32 on 32-bit systems.
+#define SYS_timer_settime SYS_timer_settime32
+#endif
+
#if defined(HAVE_LOFF_T)
// loff_t can be defined as a macro; for -fgo-dump-spec make sure we
// see a typedef.
@@ -1,50 +0,0 @@
From a62f20ae78ddd41be682dde8cab075ca4f5dbb2a Mon Sep 17 00:00:00 2001
From: Ian Lance Taylor <iant@golang.org>
Date: Fri, 22 Jul 2022 11:38:20 -0700
Subject: [PATCH] libgo: use POSIX shell arithmetic expansion
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Avoid bash-specific ((expression)) syntax. As the bash syntax
converts a non-zero value to a zero status (and a zero value to a 1
status), and POSIX arithmetic expansion does not, we have to negate
the result.
Based on patch by Sören Tempel.
Change-Id: I4c64fa15de3994a1a5c7c5ec0de6a82ddd858917
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/419154
Reviewed-by: Than McIntosh <thanm@google.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
---
libgo/match.sh | 2 +-
libgo/testsuite/gotest | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/libgo/match.sh b/libgo/match.sh
index 7ed587ff..e5ed98de 100755
--- a/libgo/match.sh
+++ b/libgo/match.sh
@@ -111,7 +111,7 @@ gobuild() {
if test "$goarch" != "386"; then
line=$(echo "$line" | sed -e "s/\\(${wrap}\\)386\\(${wrap}\\)/\10\2/g")
fi
- (($line))
+ return $((!($line)))
}
matched=
diff --git a/libgo/testsuite/gotest b/libgo/testsuite/gotest
index 04e4267f..0a0a7e14 100755
--- a/libgo/testsuite/gotest
+++ b/libgo/testsuite/gotest
@@ -302,7 +302,7 @@ gobuild() {
if test "$goarch" != "386"; then
line=$(echo "$line" | sed -e "s/\\(${wrap}\\)386\\(${wrap}\\)/\10\2/g")
fi
- (($line))
+ return $((!($line)))
}
case "x$gofiles" in
@@ -1,65 +0,0 @@
From 7b8400f902ef25ea71ed460716c1afedca357a61 Mon Sep 17 00:00:00 2001
From: Natanael Copa <ncopa@alpinelinux.org>
Date: Wed, 2 Nov 2022 12:31:36 +0100
Subject: [PATCH] libphobos: fix undefined reference to `__cmsg_nxthdr' with
musl
Ported fix from upstream.
Upstream: https://github.com/dlang/dmd/commit/54544260a848c8ebad5582e27ac1e09627cdfb17
Bug-URL: https://issues.dlang.org/show_bug.cgi?id=23157
---
.../libdruntime/core/sys/posix/sys/socket.d | 36 +++++++++++++++++--
1 file changed, 33 insertions(+), 3 deletions(-)
diff --git a/libphobos/libdruntime/core/sys/posix/sys/socket.d b/libphobos/libdruntime/core/sys/posix/sys/socket.d
index c1309a68c9c..e3b536d87e7 100644
--- a/libphobos/libdruntime/core/sys/posix/sys/socket.d
+++ b/libphobos/libdruntime/core/sys/posix/sys/socket.d
@@ -188,10 +188,40 @@ version (linux)
extern (D) inout(ubyte)* CMSG_DATA( return scope inout(cmsghdr)* cmsg ) pure nothrow @nogc { return cast(ubyte*)( cmsg + 1 ); }
- private inout(cmsghdr)* __cmsg_nxthdr(inout(msghdr)*, inout(cmsghdr)*) pure nothrow @nogc;
- extern (D) inout(cmsghdr)* CMSG_NXTHDR(inout(msghdr)* msg, inout(cmsghdr)* cmsg) pure nothrow @nogc
+ version (CRuntime_Musl)
{
- return __cmsg_nxthdr(msg, cmsg);
+ extern (D)
+ {
+ private size_t __CMSG_LEN(inout(cmsghdr)* cmsg) pure nothrow @nogc
+ {
+ return (cmsg.cmsg_len + size_t.sizeof -1) & cast(size_t)(~(size_t.sizeof - 1));
+ }
+
+ private inout(cmsghdr)* __CMSG_NEXT(inout(cmsghdr)* cmsg) pure nothrow @nogc
+ {
+ return cmsg + __CMSG_LEN(cmsg);
+ }
+
+ private inout(msghdr)* __MHDR_END(inout(msghdr)* mhdr) pure nothrow @nogc
+ {
+ return cast(inout(msghdr)*)(mhdr.msg_control + mhdr.msg_controllen);
+ }
+
+ inout(cmsghdr)* CMSG_NXTHDR(inout(msghdr)* msg, inout(cmsghdr)* cmsg) pure nothrow @nogc
+ {
+ return cmsg.cmsg_len < cmsghdr.sizeof ||
+ __CMSG_LEN(cmsg) + cmsghdr.sizeof >= __MHDR_END(msg) - cast(inout(msghdr)*)(cmsg)
+ ? cast(inout(cmsghdr)*) null : cast(inout(cmsghdr)*) __CMSG_NEXT(cmsg);
+ }
+ }
+ }
+ else
+ {
+ private inout(cmsghdr)* __cmsg_nxthdr(inout(msghdr)*, inout(cmsghdr)*) pure nothrow @nogc;
+ extern (D) inout(cmsghdr)* CMSG_NXTHDR(inout(msghdr)* msg, inout(cmsghdr)* cmsg) pure nothrow @nogc
+ {
+ return __cmsg_nxthdr(msg, cmsg);
+ }
}
extern (D) inout(cmsghdr)* CMSG_FIRSTHDR( inout(msghdr)* mhdr ) pure nothrow @nogc
--
2.38.1
+102 -98
View File
@@ -24,15 +24,17 @@ CBUILDROOT="/"
_cross_configure="--disable-bootstrap --with-sysroot=/usr/$CTARGET"
pkgname=gcc-aarch64
_pkgbase=12.2.1 # must match gcc/BASE-VER
_pkgsnap=20220924
pkgver=${_pkgbase}_git$_pkgsnap
pkgver=13.1.1_git20230527
# i.e. 13.1.1, must match gcc/BASE-VER
_pkgbase="${pkgver%%_git*}"
# date component from snapshots
_pkgsnap="${pkgver##*_git}"
[ "$BOOTSTRAP" = "nolibc" ] && pkgname="gcc-pass2"
[ "$CBUILD" != "$CHOST" ] && _cross="-$CARCH" || _cross=""
[ "$CHOST" != "$CTARGET" ] && _target="-$CTARGET_ARCH" || _target=""
pkgname=gcc-aarch64
pkgrel=9
pkgrel=1
pkgdesc="Stage2 cross-compiler for aarch64"
url="https://gcc.gnu.org"
arch="x86_64"
@@ -42,7 +44,7 @@ depends="binutils-aarch64 mpc1"
makedepends_build="gcc g++ bison flex texinfo gawk zip gmp-dev mpfr-dev mpc1-dev zlib-dev"
makedepends_host="linux-headers gmp-dev mpfr-dev mpc1-dev isl-dev zlib-dev musl-dev-aarch64 binutils-aarch64"
subpackages="g++-aarch64:gpp libstdc++-dev-aarch64:libcxx_dev"
[ "$CHOST" = "$CTARGET" ] && subpackages="gcc-doc$_target"
[ "$CHOST" = "$CTARGET" ] && subpackages="gcc-gdb gcc-doc$_target"
replaces="libstdc++ binutils"
: "${LANG_CXX:=true}"
@@ -76,11 +78,13 @@ if [ "$CHOST" != "$CTARGET" ]; then
_libatomic=false
_libitm=false
# format-sec: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100431
CPPFLAGS="${CPPFLAGS/-Werror=format-security/}"
# reset target flags (should be set in crosscreate abuild)
# fixup flags. seems gcc treats CPPFLAGS as global without
# _FOR_xxx variants. wrap it in CFLAGS and CXXFLAGS.
export CFLAGS="$CPPFLAGS $CFLAGS"
export CXXFLAGS="$CPPFLAGS $CXXFLAGS"
export CFLAGS="$CPPFLAGS -g0 ${CFLAGS/-Werror=format-security/}"
export CXXFLAGS="$CPPFLAGS -g0 ${CXXFLAGS/-Werror=format-security/}"
unset CPPFLAGS
export CFLAGS_FOR_TARGET=" "
export CXXFLAGS_FOR_TARGET=" "
@@ -88,10 +92,12 @@ 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
CPPFLAGS="${CPPFLAGS/-Werror=format-security/}"
# fixup flags. seems gcc treats CPPFLAGS as global without
# _FOR_xxx variants. wrap it in CFLAGS and CXXFLAGS.
export CFLAGS="$CPPFLAGS $CFLAGS"
export CXXFLAGS="$CPPFLAGS $CXXFLAGS"
export CFLAGS="$CPPFLAGS -g0 ${CFLAGS/-Werror=format-security/}"
export CXXFLAGS="$CPPFLAGS -g0 ${CXXFLAGS/-Werror=format-security/}"
unset CPPFLAGS
# reset flags and cc for build
@@ -116,6 +122,21 @@ 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
CPPFLAGS="${CPPFLAGS/-Werror=format-security/}"
# pass -g0 by default to bypass -g, since we don't do debug
# if -dbg added, the -g is appended and overrides this
export CFLAGS="$CPPFLAGS -g0 ${CFLAGS/-Werror=format-security/} -O2"
export CXXFLAGS="$CPPFLAGS -g0 ${CXXFLAGS/-Werror=format-security/} -O2"
unset CPPFLAGS
# https://gcc.gnu.org/install/build.html
export CFLAGS_FOR_TARGET="$CFLAGS"
export CXXFLAGS_FOR_TARGET="$CXXFLAGS"
export LDFLAGS_FOR_TARGET="$LDFLAGS"
export BOOT_CFLAGS="$CFLAGS"
export BOOT_CXXFLAGS="$CXXFLAGS"
export BOOT_LDFLAGS="$LDFLAGS"
fi
case "$CARCH" in
@@ -147,7 +168,7 @@ esac
# currently on x86, x86_64 and ia64
_libquadmath=$LANG_FORTRAN
case "$CTARGET_ARCH" in
x86 | x86_64) _libquadmath=$LANG_FORTRAN ;;
x86 | x86_64 | ppc64le) _libquadmath=$LANG_FORTRAN ;;
*) _libquadmath=false ;;
esac
@@ -224,41 +245,28 @@ source="https://dev.alpinelinux.org/archive/gcc/${_pkgbase%%.*}-$_pkgsnap/gcc-${
0009-Ensure-that-msgfmt-doesn-t-encounter-problems-during.patch
0010-Don-t-declare-asprintf-if-defined-as-a-macro.patch
0011-libiberty-copy-PIC-objects-during-build-process.patch
0012-libitm-disable-FORTIFY.patch
0013-libgcc_s.patch
0014-nopie.patch
0015-dlang-use-libucontext-on-mips64.patch
0016-ada-fix-shared-linking.patch
0017-build-fix-CXXFLAGS_FOR_BUILD-passing.patch
0018-add-fortify-headers-paths.patch
0019-Alpine-musl-package-provides-libssp_nonshared.a.-We-.patch
0020-DP-Use-push-state-pop-state-for-gold-as-well-when-li.patch
0021-mips64-disable-multilib-support.patch
0022-aarch64-disable-multilib-support.patch
0023-s390x-disable-multilib-support.patch
0024-ppc64-le-disable-multilib-support.patch
0025-x86_64-disable-multilib-support.patch
0026-riscv-disable-multilib-support.patch
0027-always-build-libgcc_eh.a.patch
0028-ada-libgnarl-compatibility-for-musl.patch
0029-ada-musl-support-fixes.patch
0033-gcc-go-link-to-libucontext.patch
0034-Use-generic-errstr.go-implementation-on-musl.patch
0035-configure-Add-enable-autolink-libatomic-use-in-LINK_.patch
0036-configure-fix-detection-of-atomic-builtins-in-libato.patch
0037-libgo-Recognize-off64_t-and-loff_t-definitions-of-mu.patch
0039-gcc-go-Use-int64-type-as-offset-argument-for-mmap.patch
0041-go-gospec-forcibly-disable-fsplit-stack-support.patch
0042-gcc-go-fix-build-error-with-SYS_SECCOMP.patch
0043-libstdc-do-not-throw-exceptions-for-non-C-locales-on.patch
0044-gdc-unconditionally-link-libgphobos-against-libucont.patch
0045-druntime-link-against-libucontext-on-all-platforms.patch
0049-libgo-adjust-name-of-union-in-sigevent-struct.patch
0050-libphobos-don-t-define-__mode_t-twice-on-musl-target.patch
0051-libgo-Explicitly-define-SYS_timer_settime-for-32-bit.patch
0052-libgnat-time_t-is-always-64-bit-on-musl-libc.patch
0053-libgo-make-match.sh-POSIX-shell-compatible.patch
0054-libphobos-fix-undefined-reference-to-__cmsg_nxthdr-w.patch
0012-libgcc_s.patch
0013-nopie.patch
0014-ada-fix-shared-linking.patch
0015-build-fix-CXXFLAGS_FOR_BUILD-passing.patch
0016-add-fortify-headers-paths.patch
0017-Alpine-musl-package-provides-libssp_nonshared.a.-We-.patch
0018-DP-Use-push-state-pop-state-for-gold-as-well-when-li.patch
0019-aarch64-disable-multilib-support.patch
0020-s390x-disable-multilib-support.patch
0021-ppc64-le-disable-multilib-support.patch
0022-x86_64-disable-multilib-support.patch
0023-riscv-disable-multilib-support.patch
0024-always-build-libgcc_eh.a.patch
0025-ada-libgnarl-compatibility-for-musl.patch
0026-ada-musl-support-fixes.patch
0027-configure-Add-enable-autolink-libatomic-use-in-LINK_.patch
0028-configure-fix-detection-of-atomic-builtins-in-libato.patch
0029-libstdc-do-not-throw-exceptions-for-non-C-locales-on.patch
0030-gdc-unconditionally-link-libgphobos-against-libucont.patch
0031-druntime-link-against-libucontext-on-all-platforms.patch
0032-libgnat-time_t-is-always-64-bit-on-musl-libc.patch
0033-libphobos-do-not-use-LFS64-symbols.patch
"
# we build out-of-tree
@@ -302,7 +310,7 @@ build() {
case "$CTARGET" in
aarch64-*-*-*) _arch_configure="--with-arch=armv8-a --with-abi=lp64";;
armv5-*-*-*eabi) _arch_configure="--with-arch=armv5te --with-tune=arm926ej-s --with-float=soft --with-abi=aapcs-linux";;
armv6-*-*-*eabihf) _arch_configure="--with-arch=armv6zk --with-tune=arm1176jzf-s --with-fpu=vfp --with-float=hard --with-abi=aapcs-linux";;
armv6-*-*-*eabihf) _arch_configure="--with-arch=armv6kz --with-tune=arm1176jzf-s --with-fpu=vfpv2 --with-float=hard --with-abi=aapcs-linux";;
armv7-*-*-*eabihf) _arch_configure="--with-arch=armv7-a --with-tune=generic-armv7-a --with-fpu=vfpv3-d16 --with-float=hard --with-abi=aapcs-linux --with-mode=thumb";;
mips-*-*-*) _arch_configure="--with-arch=mips32 --with-mips-plt --with-float=soft --with-abi=32";;
mips64-*-*-*) _arch_configure="--with-arch=mips3 --with-tune=mips64 --with-mips-plt --with-float=soft --with-abi=64";;
@@ -357,11 +365,7 @@ build() {
echo " hash_style_configure=$_hash_style_configure"
echo ""
export CFLAGS="$CFLAGS -O2"
export CXXFLAGS="$CXXFLAGS -O2"
export CPPFLAGS="$CPPFLAGS -O2"
local version="Alpine $pkgver-r$pkgrel"
local version="Alpine $pkgver"
local gccconfiguration="
--prefix=/usr
--mandir=/usr/share/man
@@ -370,6 +374,7 @@ build() {
--host=$CHOST
--target=$CTARGET
--enable-checking=release
--disable-cet
--disable-fixed-point
--disable-libstdcxx-pch
--disable-multilib
@@ -380,6 +385,8 @@ build() {
--enable-default-pie
--enable-default-ssp
--enable-languages=$_languages
--enable-link-serialization=2
--enable-linker-build-id
$_arch_configure
$_libc_configure
$_cross_configure
@@ -552,6 +559,7 @@ libcxx_dev() {
replaces="g++"
amove usr/${_target:+$CTARGET/}lib/libstdc++.a \
usr/${_target:+$CTARGET/}lib/libstdc++exp.a \
usr/${_target:+$CTARGET/}lib/libstdc++.so \
usr/${_target:+$CTARGET/}lib/libstdc++fs.a \
usr/${_target:+$CTARGET/}lib/libsupc++.a \
@@ -762,52 +770,48 @@ gnat() {
mv "$pkgdir"/usr/bin/*gnat* "$subpkgdir"/usr/bin/
}
gdb() {
pkgdesc="$pkgdesc (gdb printers)"
install_if="$pkgname=$pkgver-r$pkgrel gdb"
amove \
usr/share/gdb/python/ \
usr/share/gcc-*/python/
}
sha512sums="
ba4d9e73d108088da26fbefe18d9b245b76771ffe752c2b4b31bdf38a2d0b638fbc115c377526c27311d4d7ffd4e0d236a5af5016bd364ccaa11a4989d1401e8 gcc-12-20220924.tar.xz
41cbb4d69218006cf9e0cdb6c86212ef451f8decd52a50a7dbb4d34726009da7a4e0261c852b46cb584db253a4bae2f31dc485c506cb545e64a7d26e0ba6c2b6 0001-posix_memalign.patch
531155055cda7f119bcac6479bcae73af9201cd596af9cf1616850bbcf4393b91c5de9f2fbbc1cde6e158fb4df7237b033146f662dff5fa0ea12151cc514adb8 0002-gcc-poison-system-directories.patch
c1275d77b5269386a2ec683933570810f5a2ba1208c161ed887797eb9aee3cb82ef08a8964635902614e6a6e83f3065ba0801c9355d85dd8d60cb1fa20bdf687 0003-specs-turn-on-Wl-z-now-by-default.patch
a54e45bff4484a35d3826435a414d909281453f5605f4081cf3be1f15336cceed93a1d8a54e92e2fa97188623e3030ca1323d7749141e228a7db73795230d86a 0004-Turn-on-D_FORTIFY_SOURCE-2-by-default-for-C-C-ObjC-O.patch
ad132ddbd0c33a3983e3de4f74d8fdb8cb1ddf53ef54de0a5c12efb49e42014ed117165d43f396bcf3455ecfe2c8620e0326e73b4160a370a4cc92d213329c34 0005-On-linux-targets-pass-as-needed-by-default-to-the-li.patch
0b9ce0f130a7b797770f3d58a5200575f20e5663c86c0c5710718b7bffd3416cc2f05861613d9c258428e9541c6e0b9837d01f0c99d383e2c3de0503a988e861 0006-Enable-Wformat-and-Wformat-security-by-default.patch
e7813acc7ead61373c212cefbe53eb020b4c5bd8f0f35ee972e0524060713f911624f5a1a871feada642e1f3f5e48c8508125ca2da09de351d544bedf1d44ada 0007-Enable-Wtrampolines-by-default.patch
d0d0566a11e4828bdd6f53346a9a6b9841f3066d3f4a05ee2b6fe97aeb4552654170e7662318ea18fc777c3e75c88a067097478fc4e880a3f9c134b8a3af2277 0008-Disable-ssp-on-nostdlib-nodefaultlibs-and-ffreestand.patch
f75e63d9d933874f18fb7f55b135c60dfa0377abafa8e0edb91b85d5f00f4f072d0a338ba5d9baec18494211dbbda8068782830dbafbb37068936f76aede270f 0009-Ensure-that-msgfmt-doesn-t-encounter-problems-during.patch
afa4daba222a19569588736a8276dc7c12223a7c222f3dd3795dc3f1cd90f40b90518971ae27b358020354f89562c9680ec8b8e24e85e6d4f8e54e79d185359b 0010-Don-t-declare-asprintf-if-defined-as-a-macro.patch
79dac82249fb573ec477e1451a33883302eb63a5110853faed117f5021221f2153e2ec845dd5a0043b1bf9f0e5736ef0c89743ff2d771774a281c8b24542803a 0011-libiberty-copy-PIC-objects-during-build-process.patch
b035f85c1703b45d15c1d1ffe7d23400e01625e5d403504911cc92f740b02586447de2a9d66a9f80f12b9c227bc193e2a43942c8af2bdb42cdeff8272bbe6068 0012-libitm-disable-FORTIFY.patch
9fb4d396a9493d2d68fe829ce075ba4c5df148b1d6aaab315a6f8ccbdd70d0e052a5dc50369adc2dab005b4a3becd1504b182faed6e82c86accb95f5bc2b9f50 0013-libgcc_s.patch
f82ac22961d842c9f8e731a601bb255918cc160969888363ad2d83e2ccf08b19114a200d46bcf99d097bf530f470c2b1e71e46828bc1b9fff5469ff945f541d8 0014-nopie.patch
6527dc9d250db48d56cf01e9299461bf22a838ffda96c40d448e18f457b206cec2322275d2d5abbbaf3c6573c5e7eba12724c9691b601f118ff7520e19726373 0015-dlang-use-libucontext-on-mips64.patch
6c3ce0ccd68b19e2c76172d8f24b0747ee0af2b8de7af692f2f699848267d7fc42fec8e5c303102fe05be7e934b56f21eea17ce47c8aca20570590830d88e9b0 0016-ada-fix-shared-linking.patch
7089a96aaec8e0b222cb3fa7301d71bb2e328a24dec33e15ea9e3e7695bcae919308249b9a3be5ea2f3b1f069f9fd1739066f31d12317fcdab0596dba9ca54a4 0017-build-fix-CXXFLAGS_FOR_BUILD-passing.patch
b7ebdeee0b143052fdd6e3efa070ea8621d4fb729312cbc787d618e666b593990a20cd9044a786265970d8e09ec13da03b797009543d0b657b0fe924f2dcaa68 0018-add-fortify-headers-paths.patch
8e682893d6367732ab8c490b915112a68d98855deec3bd8db91dc0d9bf486b8c044b13ee2b95c4806da7ac17c41034e081b7a66861018274cb33fdb2fd6df04a 0019-Alpine-musl-package-provides-libssp_nonshared.a.-We-.patch
a14c5f98ade5af8cd6e3a0244752674d9c4f6dadb4260f98f1949bff51ac1211a3f8319e0f933f776e98998d2c7221004f92413f97ccc2e966f8462ed6d33597 0020-DP-Use-push-state-pop-state-for-gold-as-well-when-li.patch
28c1d477da79aa212ac79e4b02cf865d8b9c31cec6c42f41b4268e3f3c49bf67fb51e54180abe543a54e550788bb472bfcf1b4bc38d072a792d7403dbbee178a 0021-mips64-disable-multilib-support.patch
0920e31c46bf937b47a0602766f042d45adb71abf332ee84399c665c12298ef115cff945fe26d646b0276bfdfdd04913970e6f1f8784a11c26e15111c854643d 0022-aarch64-disable-multilib-support.patch
e4c6bf7ec40f2798c8e5b40a543aecffd5591a2805546b3b97aaa4fbe4df6ce4330a60973a9ddfbca9890590606d5204e7f653ab2b6e4b2c13feeb595b68e63a 0023-s390x-disable-multilib-support.patch
0e956d793c94283ce5af7fe84bfcbb655585a9573608e9bf497fa7b726e12daa391e44977d0a8c97fb460aba89b1773b91e036b0ee1ef4d6263a3943cb63d9cd 0024-ppc64-le-disable-multilib-support.patch
95917fcb60dbc0a8134db9beb583f3c9ea61128499c214f594c434ec8246641ec41e245ce2d1d9b85ffd40ea0e5764f7a33c5522b2547145814245ac0fa25025 0025-x86_64-disable-multilib-support.patch
b40d7e4712c035674c993bbb55475290ec14523b3f0fd05493514bac4e9adaa6641faf815fc40ffc00119d9fd64be28218ee874c289ec7430eeef05ab2fcae5e 0026-riscv-disable-multilib-support.patch
674360ce2ee9f704d0632cc98756f9fe8dd8ca30064fb9d3423b437f7e679c1c51e765b15e535dcb278cd2769583690acb3395b91e4fd5f6f4e3b97879fcc313 0027-always-build-libgcc_eh.a.patch
f060687adcd5297124e4000f1ba1e3fd5d7d124da04d948cbd0d4a6c69a90a2b29a4a0dbbe13a83ab6950724f434de012b681bdbcdf53c0100b40fe3d00f2f2f 0028-ada-libgnarl-compatibility-for-musl.patch
5160bae68e20a1966c1f6d655ee98af759e9b9ee842718ae6007d467b418e1cf3b307528a0841477b5259671ce868521b06c0f2e947b7b8f3a398c53dd978252 0029-ada-musl-support-fixes.patch
72631fbef4843d6ada52f3173b257e027605866a3faf1d8e34438cbf2581952f97bf6f9569ee44fcd7c4b3b337612eaeb0612fb2e6451903f219e4d99bf719db 0033-gcc-go-link-to-libucontext.patch
141c0428f988cbd102000d4db8d4150485f6da5c064469493ea378cd579bed99330658f41fe106c0d07d1c1aa436ec3f864403ed1ba79f791a1d727b42d46910 0034-Use-generic-errstr.go-implementation-on-musl.patch
d9ba710f770e053c8f212e821817c188091a829658050b9ab5906388553ec60fec37943ea43c270e92a9014902949f3c98fc4639032d92b8145b375bb29e193e 0035-configure-Add-enable-autolink-libatomic-use-in-LINK_.patch
ab90d8fdd977d6cd3da096a1c76d77be3e89a020b2127247771711a32eb608cceed21834ef488ab4b69bb0f408b098fdfb61630819e3d1a1e57d5af67800ee74 0036-configure-fix-detection-of-atomic-builtins-in-libato.patch
8bc6823f0b3c66f7b73d7ddb64ffa6930463285c2e9a14a2bc1882bcc4271144eaa1107d713294699caf9481648163cbf43921a2b8e4ac0d55c78a804bae8a3d 0037-libgo-Recognize-off64_t-and-loff_t-definitions-of-mu.patch
f0744c01859e67deed404c97e1870b2876935fdc467e51980373744936574c314d5d21134734c5d515e7f3cd3483ef98045b9bbcd81c568c6038fac96ffb5fa0 0039-gcc-go-Use-int64-type-as-offset-argument-for-mmap.patch
d6dc1bfb881a313d167aaa5658790b0f55eea4336c408cfc6613dd5783440dafd0d37c43031a5f3e69be40f632e38371cd4fb6e5f0494ac4ea4d7d5025d2ae02 0041-go-gospec-forcibly-disable-fsplit-stack-support.patch
684c6a6d52512b973429b6e709966439ac1e174f9e79a33d4a638b452245b457b34752b4b4034ba983f6a712f86522e7adf715bab00a6603f64a12139c5b1e39 0042-gcc-go-fix-build-error-with-SYS_SECCOMP.patch
25014dfa99d96ee70ce0ad22e9f7974f0a51cc50b3b9c2db49df50774c8cd29e497ceed120486bee50be83bfb07f2009ed310eb9b0543f2795bd7359b87eadd2 0043-libstdc-do-not-throw-exceptions-for-non-C-locales-on.patch
75fd83ac05ab0a08d5f48547b08810f9934209bc78b5db59d65f33887b382af7ec24d8a29d40f86325c05af40c1ae1ec6466c839f646af90afc895a13073d07b 0044-gdc-unconditionally-link-libgphobos-against-libucont.patch
13e047153076d6e1fc40c9f5b6bfe5699c0e5460248f3d2b35ae36677cb960525af7b0b025997e5000a8492cec5e77a86828d66b4058c0d7f89fde0ab3890142 0045-druntime-link-against-libucontext-on-all-platforms.patch
c33ca2553642c2dbd1c65cd97046548f08775785a3db06d761e3bbe61398c37bc382fe132c0c3fa2101dfd4eea2a6d48bf4fae899a0ddb811c81abd7be35c122 0049-libgo-adjust-name-of-union-in-sigevent-struct.patch
179cd15d629884a66e954fd76066675efa594686b970facbb12ad50769e5d70b5530d7f61e77120e26d1c3dfc701cfc5295f341f635db998df73c41bc8e62172 0050-libphobos-don-t-define-__mode_t-twice-on-musl-target.patch
c82d7c8d340a76df3d796565a79b0ccc04ddffef39927620e1f3719bf2dc1db101ba13aef24b46c5bc95b7bf1e31c8bda4ab0936ba4c9c5e5047ba08826c982c 0051-libgo-Explicitly-define-SYS_timer_settime-for-32-bit.patch
eb403d8ea665fd5dc2c11faf43b055e6a3bf480a397ceee3e0ca1e38ec7d2392315f2694ed9a34ffbc99e464f2873fbbf91be8646ea4dea5d3636e3ea22fefa0 0052-libgnat-time_t-is-always-64-bit-on-musl-libc.patch
22fb6edf1ed0387e2b93839ffe6e82a7fee420950af90e91199c3488d966702fdeb1a3396d22be0c73a4051525da9349c93d070a0d83b724c83f2b268da6483f 0053-libgo-make-match.sh-POSIX-shell-compatible.patch
9b74d0a0e4140b597708a295bcf51b93944782698470e2ba9bc0f0d4a830fc418da9624eccc85f3d65ff6d50b8ebf40cecd34d5b045db9e6c29614e981e93f92 0054-libphobos-fix-undefined-reference-to-__cmsg_nxthdr-w.patch
bcad5977ff9b0fe66df53e985ddcf0be1727860f76025a09c2ea786bd6d4c7f1129776ad2e52912c16824fb5d870188d44a24125db78603d78da75c13d207311 gcc-13-20230527.tar.xz
af3d297e6e6aa9076fd09d128d72d72cb9c225ee377f3c65cc7647620b956ac463e8f744c808b045102ab7ed131cbaa3d511e121e5c820ac93f29374bb1f4281 0001-posix_memalign.patch
1be15c3740749731e606eed65f99c274fca2072cc8c907f036f44f3f03047af356fd2f1b2b5b8a082dac6f9046998dde400f8acb4046d14702dace7d976ff78f 0002-gcc-poison-system-directories.patch
a43fd3091f7cecba66f6904d4241a3d04b084c6eab820f34d36a445fa57b44b0a65613550544c179e314a3d516c2cbd8f245a3f001a0854b99c7bbac171c5756 0003-specs-turn-on-Wl-z-now-by-default.patch
b8dd907022785d5f3edd5b6575a1343d54a0c84d935e76a35308dcf2cb602a03e8b91fb51431a9be970eb797f0ae8d4f64f93ec97573cc0fdac61c0dba5ab79f 0004-Turn-on-D_FORTIFY_SOURCE-2-by-default-for-C-C-ObjC-O.patch
f93ec8f926a014cd43e70589ce188ca0ef24d216617184bcb81e9c9cbd56aeeede6653489f2d31105c51cab7ea94499db5ec46528ad6e14d33d8e90e2c95dc29 0005-On-linux-targets-pass-as-needed-by-default-to-the-li.patch
966012aa0a9271232d271d548c1029af3567aaf0b1d3d1ef502ad6fa18cb1c6709f8e7f7124c58040777ddd84bca68490255664a02f0a626d9e76aa4a3949980 0006-Enable-Wformat-and-Wformat-security-by-default.patch
503789bae52d70ddae2cb55ab5046b149f03af95c8341927712d1f7c6c2d25db1fa2ee19f0832d477357162adb276f287c66b702565b684162a2f43b69157d9f 0007-Enable-Wtrampolines-by-default.patch
1488ae4f29e3d9416430e1a10e9201d4c1cad10515ff0921756e98b6be4ec5aa8adbd94d7e5fe4dab446bdf495183fbd6d04cd53a69e5d7f2d1963eeb739daf7 0008-Disable-ssp-on-nostdlib-nodefaultlibs-and-ffreestand.patch
6785152ee7d25ccfdb5bb14ccb08e9fa21433f3f9567b12c7174ec77c37d2437737bde60d8b4be41927eaf40efe46d24348e95ccde78428877f296f33642ab49 0009-Ensure-that-msgfmt-doesn-t-encounter-problems-during.patch
8ca5ef6c9ad56c0314a2230ef6d8d21e0bffdc1289f573991077d6ed1007e30d4cbefe00b0ea72718c09020bb8275178f028ce6763829f7e34255a9b84e5332f 0010-Don-t-declare-asprintf-if-defined-as-a-macro.patch
6909b33e6067c3aef3f6a6975c9c35523d3aa7cb1e8bdaed73804b9afd28890fc868e54f806ac31b134a9c783b2e4774e561f9a7c456c6dba85c17acee1aa84d 0011-libiberty-copy-PIC-objects-during-build-process.patch
2ff9b6828b25ea6ede730954131ccdcbdd7457f0fc32c0ba87dc9a4732a22f9bb87086b1429f7ebd04859ea66b7b3682fc75e8d81e96b2b74e9a6891456f6835 0012-libgcc_s.patch
eb1241be648e0371dd83bed55e1902b7867938cb71fa5ed09b8e1ecfb81ee5da40abc42f2ab515217c8e70234f923fc1b85ec137fd7a58cbfaf357f732cd16f7 0013-nopie.patch
4cd04db2d503d4cc224b08a39b4130056df340ea27c2d2c8b682096516255d4f431af2a9cf8bf1fb946b1499f1157123de666beaef72875ab3e678dde1dddce2 0014-ada-fix-shared-linking.patch
07c159267d0f3fea64f504ce0f995e2e1dab5c96cc00198698ff24392d3cb242915ac373f69f8fc3fbc12bd60fa2c5d5b22bbf01aba938bcb6c9d2541c1701f0 0015-build-fix-CXXFLAGS_FOR_BUILD-passing.patch
548c7e0f7795405f46c9177638c6c20dca1d3de850a8e238ac2278887924be080d243135d246e7c15c0eb0c82b6d58cec5afbcba26da45c294a3e3de54b12e9b 0016-add-fortify-headers-paths.patch
3e50bec315f257f57e5fdc830a91a813451348f4ed2b7d43d628544592d684e0971e2b00b614f46d0b5902fa530f13db7c86bedc180da6a700a96f1e4be2ad88 0017-Alpine-musl-package-provides-libssp_nonshared.a.-We-.patch
c777cf9ed9e0a9d91b5539a12375679f37b101e35aae6a70d113074138f4eb47afeae454206d47f5a8d6e5d437640a754839cc67cfa81a3269cc4ee4fefa8a6b 0018-DP-Use-push-state-pop-state-for-gold-as-well-when-li.patch
5b3e6875725b0a63666af7709e55154774045f1e03ef7e8620cf3cf9d50bfd852259b26e8f072613e02b106c0a09834f6223f21084362ff6a7697ba874ab1a14 0019-aarch64-disable-multilib-support.patch
bc7790e9012985d8f2147476d57f580e966b83323b596914575518d80db51c27bd7080116ff6aef91fcf0de6712f4710a32f1c272c7fc927f0f8a4ee90fc547b 0020-s390x-disable-multilib-support.patch
4284db01201fa1e9cebda4098b61b0c9c0319f86e0870e26e991df4b902cef6381b032f4ba83ba4e6b2537b2e14bf6e1069bba8a55054d70421769fbca3a5d80 0021-ppc64-le-disable-multilib-support.patch
a151bd420781dae743c3406657d111a226e3170b258d7a0ce32c7c959c8702d504249222071e329c24dc74ebdcd9fafd36cb5a15d153714c6fc52e9b399353cb 0022-x86_64-disable-multilib-support.patch
59a32ab970d83a7be15e75be73dcbf760df1a16768568ab8bfdb7519b97b53096cb9f9db5fbefe01c23957bb5f84f89eb44df3bd09ec168ab0dfb49036246b04 0023-riscv-disable-multilib-support.patch
e083d4fdfdc22d318d8cb75c7b7ec9b1426cb0a4b66c35766a0c59aab0151a69cc40a58041ef7b2475e6c6c7d7130fbe8898f04b28008cec36076ed9b74f8b3e 0024-always-build-libgcc_eh.a.patch
c3c3f80d48d79a8ea182d6b193cbc9334a04f8620bf53f44c7a1016a184c0113754d25c8ab912fae7c985147454f3c3dcaea05de05f9232bfa44b377a7740ebb 0025-ada-libgnarl-compatibility-for-musl.patch
8f7392f6339488916b94ef5bae8e13991462b8ea4ce8317eb7b70eac59785b0a68fae26fee5b819e2889a365e512693a650f33c59848537568798b859884ad17 0026-ada-musl-support-fixes.patch
8198c2761551912e286d4cbe8d9f3feadc63cba1cb03f9fec739b8127643714b559fbaa8d16f6f9605836cc660dbdd10d4d2cdf322418a9b135a03b79577e58e 0027-configure-Add-enable-autolink-libatomic-use-in-LINK_.patch
65410e7eb0e9cfb202570365cac76ba951ec52332a02d16bfece10e4f90ea1c2feccc0aee8d3b57ec36c3d83dc3e48b80c077458106dc031fc4b9a9fe7386466 0028-configure-fix-detection-of-atomic-builtins-in-libato.patch
023b3f79edd904a2fdafa903288626467aba43777ab40b53875fc3fb126a64af24b772ae06266afe93aa09f594c494b6e2c3b4d94eb9da724bb130978242a07c 0029-libstdc-do-not-throw-exceptions-for-non-C-locales-on.patch
f37af328cf6562aaed7d3c8a62f4cc9bcd7b858d862e6a7cd9e6f5d8710578cf77c78bfe153b7a736cc1881b5534cd98f99065f821ae961e64840d360966c669 0030-gdc-unconditionally-link-libgphobos-against-libucont.patch
8f5fd0aa921c3fb34bc268a76dea34f6db0dcf120b9c72dce8e691e880fc404f6881d73d0ea20620703da8720fff769215df3bbb679fd32eff78a27fc40a3366 0031-druntime-link-against-libucontext-on-all-platforms.patch
00f1d6434bd8bc2baaad58f3d739e771fd2738af7c86f0ea1a99a70b71153b78d586b3e098cc7a5cdd06b515d70e32acb2b239a0bb3b96078af7a0e52be9d6aa 0032-libgnat-time_t-is-always-64-bit-on-musl-libc.patch
5ee4a721f27908c9f9352f7f0de46f36d6464548b9524c7f45ca92c159966481782182022f2270ef690a1828270bbb9879111cc62b080e5314a235aa83d409e3 0033-libphobos-do-not-use-LFS64-symbols.patch
"
+6 -3
View File
@@ -1,14 +1,14 @@
From 74c7b0df9971b6bc75d7d172c2819ffd21d51050 Mon Sep 17 00:00:00 2001
From 3e5acbe356124aa5d8dde0635d652c065a553e7d Mon Sep 17 00:00:00 2001
From: Szabolcs Nagy <nsz@port70.net>
Date: Fri, 26 Jan 2018 20:32:50 +0000
Subject: [PATCH] posix_memalign
Subject: [PATCH 01/33] posix_memalign
---
gcc/config/i386/pmm_malloc.h | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/gcc/config/i386/pmm_malloc.h b/gcc/config/i386/pmm_malloc.h
index 3b2e4f47915..20f790904a2 100644
index 3527283693b..c4071b64b53 100644
--- a/gcc/config/i386/pmm_malloc.h
+++ b/gcc/config/i386/pmm_malloc.h
@@ -27,12 +27,13 @@
@@ -37,3 +37,6 @@ index 3b2e4f47915..20f790904a2 100644
return __ptr;
else
return NULL;
--
2.40.1
@@ -1,7 +1,7 @@
From dd1e75ff4ecda96957465b34681f245e818928bd Mon Sep 17 00:00:00 2001
From f986a4a1224fa7d452b415d690aead8d356a7eae Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Fri, 29 Mar 2013 08:59:00 +0400
Subject: [PATCH] gcc: poison-system-directories
Subject: [PATCH 02/33] gcc: poison-system-directories
Add /sw/include and /opt/include based on the original
zecke-no-host-includes.patch patch. The original patch checked for
@@ -26,10 +26,10 @@ Upstream-Status: Pending
7 files changed, 68 insertions(+)
diff --git a/gcc/common.opt b/gcc/common.opt
index 8a0dafc522d..0357868e22c 100644
index 862c474d3c8..64c4277c991 100644
--- a/gcc/common.opt
+++ b/gcc/common.opt
@@ -710,6 +710,10 @@ Wreturn-local-addr
@@ -711,6 +711,10 @@ Wreturn-local-addr
Common Var(warn_return_local_addr) Init(1) Warning
Warn about returning a pointer/reference to a local or temporary variable.
@@ -41,10 +41,10 @@ index 8a0dafc522d..0357868e22c 100644
Common Var(warn_shadow) Warning
Warn when one variable shadows another. Same as -Wshadow=global.
diff --git a/gcc/config.in b/gcc/config.in
index 64c27c9cfac..f0fbf123aa8 100644
index 4cad077bfbe..0679fbbf4c6 100644
--- a/gcc/config.in
+++ b/gcc/config.in
@@ -230,6 +230,12 @@
@@ -236,6 +236,12 @@
#endif
@@ -58,10 +58,10 @@ index 64c27c9cfac..f0fbf123aa8 100644
optimizer and back end) to be checked for dynamic type safety at runtime.
This is quite expensive. */
diff --git a/gcc/configure b/gcc/configure
index 5ce0557719a..e9060112384 100755
index c7b26d1927d..8c46369f73f 100755
--- a/gcc/configure
+++ b/gcc/configure
@@ -1023,6 +1023,7 @@ enable_maintainer_mode
@@ -1026,6 +1026,7 @@ enable_maintainer_mode
enable_link_mutex
enable_link_serialization
enable_version_specific_runtime_libs
@@ -69,7 +69,7 @@ index 5ce0557719a..e9060112384 100755
enable_plugin
enable_host_shared
enable_libquadmath_support
@@ -1785,6 +1786,8 @@ Optional Features:
@@ -1788,6 +1789,8 @@ Optional Features:
--enable-version-specific-runtime-libs
specify that runtime libraries should be installed
in a compiler-specific directory
@@ -78,7 +78,7 @@ index 5ce0557719a..e9060112384 100755
--enable-plugin enable plugin support
--enable-host-shared build host code as shared libraries
--disable-libquadmath-support
@@ -31982,6 +31985,19 @@ if test "${enable_version_specific_runtime_libs+set}" = set; then :
@@ -31753,6 +31756,19 @@ if test "${enable_version_specific_runtime_libs+set}" = set; then :
fi
@@ -99,10 +99,10 @@ index 5ce0557719a..e9060112384 100755
diff --git a/gcc/configure.ac b/gcc/configure.ac
index 23bee7010a3..75a7048045c 100644
index 09082e8ccae..5504bf6eb01 100644
--- a/gcc/configure.ac
+++ b/gcc/configure.ac
@@ -7421,6 +7421,16 @@ AC_ARG_ENABLE(version-specific-runtime-libs,
@@ -7292,6 +7292,16 @@ AC_ARG_ENABLE(version-specific-runtime-libs,
[specify that runtime libraries should be
installed in a compiler-specific directory])])
@@ -120,37 +120,37 @@ index 23bee7010a3..75a7048045c 100644
AC_SUBST(subdirs)
AC_SUBST(srcdir)
diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
index 07b440190c3..b2de464798a 100644
index c0c3ad14515..7cdd5bfa952 100644
--- a/gcc/doc/invoke.texi
+++ b/gcc/doc/invoke.texi
@@ -379,6 +379,7 @@ Objective-C and Objective-C++ Dialects}.
-Wpacked -Wno-packed-bitfield-compat -Wpacked-not-aligned -Wpadded @gol
-Wparentheses -Wno-pedantic-ms-format @gol
-Wpointer-arith -Wno-pointer-compare -Wno-pointer-to-int-cast @gol
+-Wno-poison-system-directories @gol
-Wno-pragmas -Wno-prio-ctor-dtor -Wredundant-decls @gol
-Wrestrict -Wno-return-local-addr -Wreturn-type @gol
-Wno-scalar-storage-order -Wsequence-point @gol
@@ -8029,6 +8030,14 @@ made up of data only and thus requires no special treatment. But, for
@@ -384,6 +384,7 @@ Objective-C and Objective-C++ Dialects}.
-Wpacked -Wno-packed-bitfield-compat -Wpacked-not-aligned -Wpadded
-Wparentheses -Wno-pedantic-ms-format
-Wpointer-arith -Wno-pointer-compare -Wno-pointer-to-int-cast
+-Wno-poison-system-directories
-Wno-pragmas -Wno-prio-ctor-dtor -Wredundant-decls
-Wrestrict -Wno-return-local-addr -Wreturn-type
-Wno-scalar-storage-order -Wsequence-point
@@ -8424,6 +8425,14 @@ made up of data only and thus requires no special treatment. But, for
most targets, it is made up of code and thus requires the stack to be
made executable in order for the program to work properly.
+@item -Wno-poison-system-directories
+@opindex Wno-poison-system-directories
+@item -Wno-poison-system-directories
+Do not warn for @option{-I} or @option{-L} options using system
+directories such as @file{/usr/include} when cross compiling. This
+option is intended for use in chroot environments when such
+directories contain the correct headers and libraries for the target
+system rather than the host.
+
@item -Wfloat-equal
@opindex Wfloat-equal
@opindex Wno-float-equal
@item -Wfloat-equal
diff --git a/gcc/gcc.cc b/gcc/gcc.cc
index bb07cc244e3..47fb5802194 100644
index 16bb07f2cdc..33b56e721d2 100644
--- a/gcc/gcc.cc
+++ b/gcc/gcc.cc
@@ -1159,6 +1159,8 @@ proper position among the other output files. */
@@ -1146,6 +1146,8 @@ proper position among the other output files. */
"%{fuse-ld=*:-fuse-ld=%*} " LINK_COMPRESS_DEBUG_SPEC \
"%X %{o*} %{e*} %{N} %{n} %{r}\
%{s} %{t} %{u*} %{z} %{Z} %{!nostdlib:%{!r:%{!nostartfiles:%S}}} \
@@ -160,7 +160,7 @@ index bb07cc244e3..47fb5802194 100644
VTABLE_VERIFICATION_SPEC " " SANITIZER_EARLY_SPEC " %o "" \
%{fopenacc|fopenmp|%:gt(%{ftree-parallelize-loops=*:%*} 1):\
diff --git a/gcc/incpath.cc b/gcc/incpath.cc
index bd2a97938eb..c80f100f476 100644
index 4d44321183f..0f3f071b44c 100644
--- a/gcc/incpath.cc
+++ b/gcc/incpath.cc
@@ -26,6 +26,7 @@
@@ -198,3 +198,6 @@ index bd2a97938eb..c80f100f476 100644
}
/* Use given -I paths for #include "..." but not #include <...>, and
--
2.40.1
@@ -1,7 +1,7 @@
From 40e45739e7d3787acd13b5b9a4c27d843de0ffe2 Mon Sep 17 00:00:00 2001
From 31e2b60000e779ef775daa306120eabcf987852a Mon Sep 17 00:00:00 2001
From: Ariadne Conill <ariadne@dereferenced.org>
Date: Fri, 21 Aug 2020 06:45:49 +0000
Subject: [PATCH] specs: turn on -Wl,-z,now by default
Subject: [PATCH 03/33] specs: turn on -Wl,-z,now by default
Previously, we also used to turn on -z relro here, but we now build
binutils with --enable-relro, which is functionally equivalent.
@@ -14,24 +14,24 @@ now by default.
2 files changed, 4 insertions(+)
diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
index b2de464798a..83bd1bde433 100644
index 7cdd5bfa952..158b7bcb81e 100644
--- a/gcc/doc/invoke.texi
+++ b/gcc/doc/invoke.texi
@@ -16872,6 +16872,9 @@ For example, @option{-Wl,-Map,output.map} passes @option{-Map output.map} to the
@@ -17959,6 +17959,9 @@ For example, @option{-Wl,-Map,output.map} passes @option{-Map output.map} to the
linker. When using the GNU linker, you can also get the same effect with
@option{-Wl,-Map=output.map}.
+NOTE: In Alpine Linux, for LDFLAGS, the option
+@option{-Wl,-z,now} is used. To disable, use @option{-Wl,-z,nonow}.
+
@item -u @var{symbol}
@opindex u
@item -u @var{symbol}
Pretend the symbol @var{symbol} is undefined, to force linking of
diff --git a/gcc/gcc.cc b/gcc/gcc.cc
index 47fb5802194..d18b5d7b59a 100644
index 33b56e721d2..f82fae23c22 100644
--- a/gcc/gcc.cc
+++ b/gcc/gcc.cc
@@ -1157,6 +1157,7 @@ proper position among the other output files. */
@@ -1144,6 +1144,7 @@ proper position among the other output files. */
"%{flto|flto=*:%<fcompare-debug*} \
%{flto} %{fno-lto} %{flto=*} %l " LINK_PIE_SPEC \
"%{fuse-ld=*:-fuse-ld=%*} " LINK_COMPRESS_DEBUG_SPEC \
@@ -39,3 +39,6 @@ index 47fb5802194..d18b5d7b59a 100644
"%X %{o*} %{e*} %{N} %{n} %{r}\
%{s} %{t} %{u*} %{z} %{Z} %{!nostdlib:%{!r:%{!nostartfiles:%S}}} \
%{Wno-poison-system-directories:--no-poison-system-directories} \
--
2.40.1
@@ -1,8 +1,8 @@
From 666d0aeb808ac9c10d065ae7b196695c81a25a20 Mon Sep 17 00:00:00 2001
From 3b910da7d1e81bdd953e6d9ec82020e7b120353b Mon Sep 17 00:00:00 2001
From: Ariadne Conill <ariadne@dereferenced.org>
Date: Fri, 21 Aug 2020 06:46:22 +0000
Subject: [PATCH] Turn on -D_FORTIFY_SOURCE=2 by default for C, C++, ObjC,
ObjC++, if the optimization level is > 0
Subject: [PATCH 04/33] Turn on -D_FORTIFY_SOURCE=2 by default for C, C++,
ObjC, ObjC++, if the optimization level is > 0
---
gcc/c-family/c-cppbuiltin.cc | 4 ++++
@@ -10,10 +10,10 @@ Subject: [PATCH] Turn on -D_FORTIFY_SOURCE=2 by default for C, C++, ObjC,
2 files changed, 10 insertions(+)
diff --git a/gcc/c-family/c-cppbuiltin.cc b/gcc/c-family/c-cppbuiltin.cc
index 4672ae8486a..573c021e1e8 100644
index 5d64625fcd7..868d69506e4 100644
--- a/gcc/c-family/c-cppbuiltin.cc
+++ b/gcc/c-family/c-cppbuiltin.cc
@@ -1510,6 +1510,10 @@ c_cpp_builtins (cpp_reader *pfile)
@@ -1546,6 +1546,10 @@ c_cpp_builtins (cpp_reader *pfile)
builtin_define_with_value ("__REGISTER_PREFIX__", REGISTER_PREFIX, 0);
builtin_define_with_value ("__USER_LABEL_PREFIX__", user_label_prefix, 0);
@@ -25,10 +25,10 @@ index 4672ae8486a..573c021e1e8 100644
if (flag_gnu89_inline)
cpp_define (pfile, "__GNUC_GNU_INLINE__");
diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
index 83bd1bde433..dda299a9987 100644
index 158b7bcb81e..cc9972f907b 100644
--- a/gcc/doc/invoke.texi
+++ b/gcc/doc/invoke.texi
@@ -10896,6 +10896,12 @@ also turns on the following optimization flags:
@@ -11866,6 +11866,12 @@ also turns on the following optimization flags:
Please note the warning under @option{-fgcse} about
invoking @option{-O2} on programs that use computed gotos.
@@ -38,6 +38,9 @@ index 83bd1bde433..dda299a9987 100644
+functions. To disable, specify either @option{-U_FORTIFY_SOURCE} or
+@option{-D_FORTIFY_SOURCE=0}.
+
@item -O3
@opindex O3
@item -O3
Optimize yet more. @option{-O3} turns on all optimizations specified
--
2.40.1
@@ -1,8 +1,8 @@
From 75d1a35180cf0967f062765314bf091a64032062 Mon Sep 17 00:00:00 2001
From 9c3a2882b1932296ccb1d0ed2900cf046f998a26 Mon Sep 17 00:00:00 2001
From: Ariadne Conill <ariadne@dereferenced.org>
Date: Fri, 21 Aug 2020 06:46:56 +0000
Subject: [PATCH] On linux targets pass --as-needed by default to the linker,
but always link the sanitizer libraries with --no-as-needed.
Subject: [PATCH 05/33] On linux targets pass --as-needed by default to the
linker, but always link the sanitizer libraries with --no-as-needed.
---
gcc/config/aarch64/aarch64-linux.h | 1 +
@@ -22,7 +22,7 @@ Subject: [PATCH] On linux targets pass --as-needed by default to the linker,
14 files changed, 36 insertions(+), 19 deletions(-)
diff --git a/gcc/config/aarch64/aarch64-linux.h b/gcc/config/aarch64/aarch64-linux.h
index 5e4553d79f5..b516f3ef97f 100644
index 4277f03da2a..b131983a546 100644
--- a/gcc/config/aarch64/aarch64-linux.h
+++ b/gcc/config/aarch64/aarch64-linux.h
@@ -35,6 +35,7 @@
@@ -34,7 +34,7 @@ index 5e4553d79f5..b516f3ef97f 100644
%{shared:-shared} \
%{symbolic:-Bsymbolic} \
diff --git a/gcc/config/alpha/linux-elf.h b/gcc/config/alpha/linux-elf.h
index 17f16a55910..9ec667e9a5e 100644
index 03f783f2ad1..d946e700dda 100644
--- a/gcc/config/alpha/linux-elf.h
+++ b/gcc/config/alpha/linux-elf.h
@@ -37,7 +37,7 @@ along with GCC; see the file COPYING3. If not see
@@ -47,7 +47,7 @@ index 17f16a55910..9ec667e9a5e 100644
%{shared:-shared} \
%{!shared: \
diff --git a/gcc/config/arm/linux-elf.h b/gcc/config/arm/linux-elf.h
index df3da67c4f0..7532bc29f9b 100644
index 7b7b7cbbe14..49c050c6f2c 100644
--- a/gcc/config/arm/linux-elf.h
+++ b/gcc/config/arm/linux-elf.h
@@ -70,6 +70,7 @@
@@ -59,7 +59,7 @@ index df3da67c4f0..7532bc29f9b 100644
SUBTARGET_EXTRA_LINK_SPEC
diff --git a/gcc/config/gnu-user.h b/gcc/config/gnu-user.h
index 857c0e077bf..8433e56c3e1 100644
index eda8010b133..b26b17f2f2a 100644
--- a/gcc/config/gnu-user.h
+++ b/gcc/config/gnu-user.h
@@ -136,7 +136,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
@@ -69,9 +69,9 @@ index 857c0e077bf..8433e56c3e1 100644
- LD_DYNAMIC_OPTION "}}%{!static-libasan:-lasan}"
+ LD_DYNAMIC_OPTION "}}%{!static-libasan:%{!fuse-ld=gold:--push-state} --no-as-needed -lasan %{fuse-ld=gold:--as-needed;:--pop-state}}"
#undef LIBHWASAN_EARLY_SPEC
#define LIBHWASAN_EARLY_SPEC "%{static-libhwasan:%{!shared:" \
LD_STATIC_OPTION " --whole-archive -lhwasan --no-whole-archive " \
@@ -145,12 +145,12 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
#define LIBHWASAN_EARLY_SPEC "%{!shared:libhwasan_preinit%O%s} " \
"%{static-libhwasan:%{!shared:" \
@@ -146,12 +146,12 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
#define LIBTSAN_EARLY_SPEC "%{!shared:libtsan_preinit%O%s} " \
"%{static-libtsan:%{!shared:" \
LD_STATIC_OPTION " --whole-archive -ltsan --no-whole-archive " \
@@ -87,7 +87,7 @@ index 857c0e077bf..8433e56c3e1 100644
#undef TARGET_F951_OPTIONS
diff --git a/gcc/config/i386/gnu-user.h b/gcc/config/i386/gnu-user.h
index 0102b2a6f3b..994414c1845 100644
index a79b739089d..e0752673dff 100644
--- a/gcc/config/i386/gnu-user.h
+++ b/gcc/config/i386/gnu-user.h
@@ -68,7 +68,7 @@ along with GCC; see the file COPYING3. If not see
@@ -100,7 +100,7 @@ index 0102b2a6f3b..994414c1845 100644
%{!static: \
%{!static-pie: \
diff --git a/gcc/config/i386/gnu-user64.h b/gcc/config/i386/gnu-user64.h
index abc8cf624ca..fe656aeae27 100644
index 3b63b99acf6..759bf0db86f 100644
--- a/gcc/config/i386/gnu-user64.h
+++ b/gcc/config/i386/gnu-user64.h
@@ -56,6 +56,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
@@ -112,7 +112,7 @@ index abc8cf624ca..fe656aeae27 100644
%{!shared: \
%{!static: \
diff --git a/gcc/config/ia64/linux.h b/gcc/config/ia64/linux.h
index 93510098ccc..3813e536423 100644
index 5dfd428aa17..02656dad7fc 100644
--- a/gcc/config/ia64/linux.h
+++ b/gcc/config/ia64/linux.h
@@ -58,7 +58,7 @@ do { \
@@ -125,7 +125,7 @@ index 93510098ccc..3813e536423 100644
%{!shared: \
%{!static: \
diff --git a/gcc/config/mips/gnu-user.h b/gcc/config/mips/gnu-user.h
index 6aad7192e69..e1256a55add 100644
index a4e5380b589..3cc61bce69f 100644
--- a/gcc/config/mips/gnu-user.h
+++ b/gcc/config/mips/gnu-user.h
@@ -55,6 +55,7 @@ along with GCC; see the file COPYING3. If not see
@@ -137,10 +137,10 @@ index 6aad7192e69..e1256a55add 100644
%{!static: \
%{rdynamic:-export-dynamic} \
diff --git a/gcc/config/riscv/linux.h b/gcc/config/riscv/linux.h
index 38803723ba9..3067ed6eac8 100644
index 2fdfd930cf2..16503482ec2 100644
--- a/gcc/config/riscv/linux.h
+++ b/gcc/config/riscv/linux.h
@@ -58,6 +58,7 @@ along with GCC; see the file COPYING3. If not see
@@ -48,6 +48,7 @@ along with GCC; see the file COPYING3. If not see
"%{mabi=ilp32:_ilp32}"
#define LINK_SPEC "\
@@ -149,7 +149,7 @@ index 38803723ba9..3067ed6eac8 100644
%{mno-relax:--no-relax} \
%{mbig-endian:-EB} \
diff --git a/gcc/config/rs6000/linux64.h b/gcc/config/rs6000/linux64.h
index b2a7afabc73..34ceb4e4fce 100644
index 9e457033d11..08016bf224d 100644
--- a/gcc/config/rs6000/linux64.h
+++ b/gcc/config/rs6000/linux64.h
@@ -377,13 +377,13 @@ extern int dot_symbols;
@@ -169,10 +169,10 @@ index b2a7afabc73..34ceb4e4fce 100644
%{rdynamic:-export-dynamic} \
-dynamic-linker " GNU_USER_DYNAMIC_LINKER64 "}}} \
diff --git a/gcc/config/rs6000/sysv4.h b/gcc/config/rs6000/sysv4.h
index 7e2519de5d4..61215a7a1b3 100644
index ae932fc22f0..c8ff0c6dc8e 100644
--- a/gcc/config/rs6000/sysv4.h
+++ b/gcc/config/rs6000/sysv4.h
@@ -788,7 +788,7 @@ GNU_USER_TARGET_CC1_SPEC
@@ -780,7 +780,7 @@ GNU_USER_TARGET_CC1_SPEC
#define GNU_USER_DYNAMIC_LINKER GLIBC_DYNAMIC_LINKER
#endif
@@ -182,7 +182,7 @@ index 7e2519de5d4..61215a7a1b3 100644
-dynamic-linker " GNU_USER_DYNAMIC_LINKER "}}"
diff --git a/gcc/config/s390/linux.h b/gcc/config/s390/linux.h
index d7b7e7a7b02..d2287f14f2e 100644
index 02aa1edaff8..64df5801134 100644
--- a/gcc/config/s390/linux.h
+++ b/gcc/config/s390/linux.h
@@ -82,7 +82,7 @@ along with GCC; see the file COPYING3. If not see
@@ -195,7 +195,7 @@ index d7b7e7a7b02..d2287f14f2e 100644
%{!shared: \
%{static:-static} \
diff --git a/gcc/config/sparc/linux.h b/gcc/config/sparc/linux.h
index 6a809e9092d..93bfb92d3ff 100644
index 0e33b3cac2c..c2f44546e62 100644
--- a/gcc/config/sparc/linux.h
+++ b/gcc/config/sparc/linux.h
@@ -81,7 +81,7 @@ extern const char *host_detect_local_cpu (int argc, const char **argv);
@@ -208,10 +208,10 @@ index 6a809e9092d..93bfb92d3ff 100644
%{!shared: \
%{!static: \
diff --git a/gcc/gcc.cc b/gcc/gcc.cc
index d18b5d7b59a..3b76311b544 100644
index f82fae23c22..da6417dd0d1 100644
--- a/gcc/gcc.cc
+++ b/gcc/gcc.cc
@@ -744,8 +744,11 @@ proper position among the other output files. */
@@ -754,8 +754,11 @@ proper position among the other output files. */
#ifdef LIBASAN_EARLY_SPEC
#define LIBASAN_SPEC STATIC_LIBASAN_LIBS
#elif defined(HAVE_LD_STATIC_DYNAMIC)
@@ -225,7 +225,7 @@ index d18b5d7b59a..3b76311b544 100644
STATIC_LIBASAN_LIBS
#else
#define LIBASAN_SPEC "-lasan" STATIC_LIBASAN_LIBS
@@ -780,8 +783,11 @@ proper position among the other output files. */
@@ -790,8 +793,11 @@ proper position among the other output files. */
#ifdef LIBTSAN_EARLY_SPEC
#define LIBTSAN_SPEC STATIC_LIBTSAN_LIBS
#elif defined(HAVE_LD_STATIC_DYNAMIC)
@@ -239,7 +239,7 @@ index d18b5d7b59a..3b76311b544 100644
STATIC_LIBTSAN_LIBS
#else
#define LIBTSAN_SPEC "-ltsan" STATIC_LIBTSAN_LIBS
@@ -798,8 +804,11 @@ proper position among the other output files. */
@@ -808,8 +814,11 @@ proper position among the other output files. */
#ifdef LIBLSAN_EARLY_SPEC
#define LIBLSAN_SPEC STATIC_LIBLSAN_LIBS
#elif defined(HAVE_LD_STATIC_DYNAMIC)
@@ -253,7 +253,7 @@ index d18b5d7b59a..3b76311b544 100644
STATIC_LIBLSAN_LIBS
#else
#define LIBLSAN_SPEC "-llsan" STATIC_LIBLSAN_LIBS
@@ -814,8 +823,11 @@ proper position among the other output files. */
@@ -824,8 +833,11 @@ proper position among the other output files. */
#define STATIC_LIBUBSAN_LIBS \
" %{static-libubsan|static:%:include(libsanitizer.spec)%(link_libubsan)}"
#ifdef HAVE_LD_STATIC_DYNAMIC
@@ -267,3 +267,6 @@ index d18b5d7b59a..3b76311b544 100644
STATIC_LIBUBSAN_LIBS
#else
#define LIBUBSAN_SPEC "-lubsan" STATIC_LIBUBSAN_LIBS
--
2.40.1
@@ -1,17 +1,17 @@
From c664283dd30949c5299d1c45bd5740bcfe993d22 Mon Sep 17 00:00:00 2001
From 288cb2be3abe07dcf2737ed3ac07e93573262bc4 Mon Sep 17 00:00:00 2001
From: Ariadne Conill <ariadne@dereferenced.org>
Date: Fri, 21 Aug 2020 06:47:43 +0000
Subject: [PATCH] Enable -Wformat and -Wformat-security by default.
Subject: [PATCH 06/33] Enable -Wformat and -Wformat-security by default.
---
gcc/c-family/c.opt | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/gcc/c-family/c.opt b/gcc/c-family/c.opt
index 07da40ef43b..8683f706426 100644
index a75038930ae..b98726f33ed 100644
--- a/gcc/c-family/c.opt
+++ b/gcc/c-family/c.opt
@@ -692,7 +692,7 @@ Warn about function calls with format strings that write past the end
@@ -704,7 +704,7 @@ Warn about function calls with format strings that write past the end
of the destination region. Same as -Wformat-overflow=1.
Wformat-security
@@ -20,7 +20,7 @@ index 07da40ef43b..8683f706426 100644
Warn about possible security problems with format functions.
Wformat-signedness
@@ -713,7 +713,7 @@ C ObjC C++ ObjC++ Var(warn_format_zero_length) Warning LangEnabledBy(C ObjC C++
@@ -725,7 +725,7 @@ C ObjC C++ ObjC++ Var(warn_format_zero_length) Warning LangEnabledBy(C ObjC C++
Warn about zero-length formats.
Wformat=
@@ -29,3 +29,6 @@ index 07da40ef43b..8683f706426 100644
Warn about printf/scanf/strftime/strfmon format string anomalies.
Wformat-overflow=
--
2.40.1
@@ -1,17 +1,17 @@
From e4d0ec43e772b6dc7c3708aed5309897df26a125 Mon Sep 17 00:00:00 2001
From 93e44f7c7b1f11c1f714d6c384b0d39a191ac18a Mon Sep 17 00:00:00 2001
From: Ariadne Conill <ariadne@dereferenced.org>
Date: Fri, 21 Aug 2020 06:48:24 +0000
Subject: [PATCH] Enable -Wtrampolines by default.
Subject: [PATCH 07/33] Enable -Wtrampolines by default.
---
gcc/common.opt | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gcc/common.opt b/gcc/common.opt
index 0357868e22c..6d5e5eebe60 100644
index 64c4277c991..c24839d32bc 100644
--- a/gcc/common.opt
+++ b/gcc/common.opt
@@ -802,7 +802,7 @@ Common Var(warn_system_headers) Warning
@@ -803,7 +803,7 @@ Common Var(warn_system_headers) Warning
Do not suppress warnings from system headers.
Wtrampolines
@@ -20,3 +20,6 @@ index 0357868e22c..6d5e5eebe60 100644
Warn whenever a trampoline is generated.
Wtrivial-auto-var-init
--
2.40.1
@@ -1,8 +1,8 @@
From 27e5d5bd3fed9006a2958d2b09750d15ad07383b Mon Sep 17 00:00:00 2001
From 7aa93d6d9a63c7bedf1e033f6d040e95038537e7 Mon Sep 17 00:00:00 2001
From: Ariadne Conill <ariadne@dereferenced.org>
Date: Fri, 21 Aug 2020 06:49:40 +0000
Subject: [PATCH] Disable ssp on -nostdlib, -nodefaultlibs and -ffreestanding
Change the buffer size.
Subject: [PATCH 08/33] Disable ssp on -nostdlib, -nodefaultlibs and
-ffreestanding Change the buffer size.
---
gcc/gcc.cc | 8 +++++++-
@@ -10,10 +10,10 @@ Subject: [PATCH] Disable ssp on -nostdlib, -nodefaultlibs and -ffreestanding
2 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/gcc/gcc.cc b/gcc/gcc.cc
index 3b76311b544..cc99d0b7aa1 100644
index da6417dd0d1..b5a6f200635 100644
--- a/gcc/gcc.cc
+++ b/gcc/gcc.cc
@@ -996,6 +996,12 @@ proper position among the other output files. */
@@ -983,6 +983,12 @@ proper position among the other output files. */
#define LINK_GCC_C_SEQUENCE_SPEC "%G %{!nolibc:%L %G}"
#endif
@@ -26,7 +26,7 @@ index 3b76311b544..cc99d0b7aa1 100644
#ifndef LINK_SSP_SPEC
#ifdef TARGET_LIBC_PROVIDES_SSP
#define LINK_SSP_SPEC "%{fstack-protector|fstack-protector-all" \
@@ -1295,7 +1301,7 @@ static const char *cc1_options =
@@ -1282,7 +1288,7 @@ static const char *cc1_options =
%{-version:--version}\
%{-help=*:--help=%*}\
%{!fsyntax-only:%{S:%W{o*}%{!o*:-o %w%b.s}}}\
@@ -36,10 +36,10 @@ index 3b76311b544..cc99d0b7aa1 100644
%{fprofile-arcs|fprofile-generate*|coverage:\
%{!fprofile-update=single:\
diff --git a/gcc/params.opt b/gcc/params.opt
index b88e1372005..82a7e25dd2f 100644
index 823cdb2ff85..5b096899b40 100644
--- a/gcc/params.opt
+++ b/gcc/params.opt
@@ -1012,7 +1012,7 @@ Common Joined UInteger Var(param_ssa_name_def_chain_limit) Init(512) Param Optim
@@ -1006,7 +1006,7 @@ Common Joined UInteger Var(param_ssa_name_def_chain_limit) Init(512) Param Optim
The maximum number of SSA_NAME assignments to follow in determining a value.
-param=ssp-buffer-size=
@@ -48,3 +48,6 @@ index b88e1372005..82a7e25dd2f 100644
The lower bound for a buffer to be considered for stack smashing protection.
-param=stack-clash-protection-guard-size=
--
2.40.1
@@ -1,8 +1,8 @@
From 83bf2a316222e2fe0b72968cadf4e334d41173f6 Mon Sep 17 00:00:00 2001
From e44b295b5b0b917c0b47085f60466a37f890e1c7 Mon Sep 17 00:00:00 2001
From: Ariadne Conill <ariadne@dereferenced.org>
Date: Fri, 21 Aug 2020 06:50:33 +0000
Subject: [PATCH] Ensure that msgfmt doesn't encounter problems during gcc
bootstrapping.
Subject: [PATCH 09/33] Ensure that msgfmt doesn't encounter problems during
gcc bootstrapping.
Solves error messages like the following:
@@ -26,7 +26,7 @@ https://bugs.gentoo.org/295480
2 files changed, 2 insertions(+)
diff --git a/libstdc++-v3/po/Makefile.am b/libstdc++-v3/po/Makefile.am
index 8f51544989e..5329804d136 100644
index 12d34910830..61b13762b71 100644
--- a/libstdc++-v3/po/Makefile.am
+++ b/libstdc++-v3/po/Makefile.am
@@ -38,6 +38,7 @@ MSGFMT = msgfmt
@@ -38,7 +38,7 @@ index 8f51544989e..5329804d136 100644
all-local: all-local-$(USE_NLS)
diff --git a/libstdc++-v3/po/Makefile.in b/libstdc++-v3/po/Makefile.in
index 243f3db7b72..822210781fa 100644
index 8e93445acd2..d6ff06e5ddb 100644
--- a/libstdc++-v3/po/Makefile.in
+++ b/libstdc++-v3/po/Makefile.in
@@ -561,6 +561,7 @@ uninstall-am:
@@ -49,3 +49,6 @@ index 243f3db7b72..822210781fa 100644
$(MSGFMT) -o $@ $<
all-local: all-local-$(USE_NLS)
--
2.40.1
@@ -1,14 +1,14 @@
From 190064993cd8ddbd48015c1fc1916e4110a97733 Mon Sep 17 00:00:00 2001
From f041dcd8f775e03b85a49e3aeef0870e2333b10e Mon Sep 17 00:00:00 2001
From: Ariadne Conill <ariadne@dereferenced.org>
Date: Fri, 21 Aug 2020 06:52:07 +0000
Subject: [PATCH] Don't declare asprintf if defined as a macro.
Subject: [PATCH 10/33] Don't declare asprintf if defined as a macro.
---
include/libiberty.h | 3 +++
1 file changed, 3 insertions(+)
diff --git a/include/libiberty.h b/include/libiberty.h
index a65ced9c820..eb20ab0f95f 100644
index 1d5c779fcff..19e3cb1e31c 100644
--- a/include/libiberty.h
+++ b/include/libiberty.h
@@ -652,8 +652,11 @@ extern void *bsearch_r (const void *, const void *,
@@ -23,3 +23,6 @@ index a65ced9c820..eb20ab0f95f 100644
/* Like asprintf but allocates memory without fail. This works like
xmalloc. */
--
2.40.1
@@ -1,14 +1,14 @@
From 838e1daa955d9013c462be3471497cb39641e951 Mon Sep 17 00:00:00 2001
From 6fc13fce114648b1a64e658b469a4697382d18bb Mon Sep 17 00:00:00 2001
From: Ariadne Conill <ariadne@dereferenced.org>
Date: Fri, 21 Aug 2020 06:53:00 +0000
Subject: [PATCH] libiberty: copy PIC objects during build process
Subject: [PATCH 11/33] libiberty: copy PIC objects during build process
---
libiberty/Makefile.in | 1 +
1 file changed, 1 insertion(+)
diff --git a/libiberty/Makefile.in b/libiberty/Makefile.in
index 1b17c2e3a47..8db1176df2e 100644
index 72608f3e4a7..58356884728 100644
--- a/libiberty/Makefile.in
+++ b/libiberty/Makefile.in
@@ -265,6 +265,7 @@ $(TARGETLIB): $(REQUIRED_OFILES) $(EXTRA_OFILES) $(LIBOBJS)
@@ -19,3 +19,6 @@ index 1b17c2e3a47..8db1176df2e 100644
cd ..; \
else true; fi
--
2.40.1
@@ -1,7 +1,7 @@
From 048c394eb709bfd216e307c1b92ac7f8a7e7758b Mon Sep 17 00:00:00 2001
From 6a1955bbf49836ad99b23501f42283842e01761b Mon Sep 17 00:00:00 2001
From: Szabolcs Nagy <nsz@port70.net>
Date: Sat, 24 Oct 2015 20:09:53 +0000
Subject: [PATCH] libgcc_s
Subject: [PATCH 12/33] libgcc_s
---
gcc/config/i386/i386-expand.cc | 4 ++--
@@ -10,10 +10,10 @@ Subject: [PATCH] libgcc_s
3 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/gcc/config/i386/i386-expand.cc b/gcc/config/i386/i386-expand.cc
index 31780b6daf7..d89898846e1 100644
index 0d817fc3f3b..2e99db00db9 100644
--- a/gcc/config/i386/i386-expand.cc
+++ b/gcc/config/i386/i386-expand.cc
@@ -12338,10 +12338,10 @@ ix86_expand_builtin (tree exp, rtx target, rtx subtarget,
@@ -12691,10 +12691,10 @@ ix86_expand_builtin (tree exp, rtx target, rtx subtarget,
{
case IX86_BUILTIN_CPU_INIT:
{
@@ -27,7 +27,7 @@ index 31780b6daf7..d89898846e1 100644
return expand_expr (call_expr, target, mode, EXPAND_NORMAL);
}
diff --git a/libgcc/config/i386/cpuinfo.c b/libgcc/config/i386/cpuinfo.c
index dab1d98060f..cf824b4114a 100644
index 50b6d8248a2..724ced402a1 100644
--- a/libgcc/config/i386/cpuinfo.c
+++ b/libgcc/config/i386/cpuinfo.c
@@ -63,7 +63,7 @@ __cpu_indicator_init (void)
@@ -52,3 +52,6 @@ index 8506a635790..564296f788e 100644
-HOST_LIBGCC2_CFLAGS += -mlong-double-80 -DUSE_ELF_SYMVER $(CET_FLAGS)
+HOST_LIBGCC2_CFLAGS += -mlong-double-80 $(CET_FLAGS)
CRTSTUFF_T_CFLAGS += $(CET_FLAGS)
--
2.40.1
@@ -1,30 +0,0 @@
From 717346fbbd6642ba6b0c3af2deb3771794346507 Mon Sep 17 00:00:00 2001
From: Ariadne Conill <ariadne@dereferenced.org>
Date: Fri, 21 Aug 2020 06:53:36 +0000
Subject: [PATCH] libitm: disable FORTIFY
---
libitm/configure.tgt | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/libitm/configure.tgt b/libitm/configure.tgt
index 06e90973ef3..669e64236c3 100644
--- a/libitm/configure.tgt
+++ b/libitm/configure.tgt
@@ -47,6 +47,16 @@ if test "$gcc_cv_have_tls" = yes ; then
esac
fi
+# FIXME: error: inlining failed in call to always_inline
+# ‘int vfprintf(FILE*, const char*, __va_list_tag*)’
+# : function body can be overwritten at link time
+# Disable Fortify in libitm for now. #508852
+case "${target}" in
+ *-*-linux*)
+ XCFLAGS="${XCFLAGS} -U_FORTIFY_SOURCE"
+ ;;
+esac
+
# Map the target cpu to an ARCH sub-directory. At the same time,
# work out any special compilation flags as necessary.
case "${target_cpu}" in
@@ -1,7 +1,7 @@
From db28b1e0f3b06325026ec5b5e7cdca4e9992e05c Mon Sep 17 00:00:00 2001
From 558e95aa2b0f3bbf416e1bb572e5f47bddc8601c Mon Sep 17 00:00:00 2001
From: Szabolcs Nagy <nsz@port70.net>
Date: Sat, 7 Nov 2015 02:08:05 +0000
Subject: [PATCH] nopie
Subject: [PATCH 13/33] nopie
---
gcc/configure | 27 +++++++++++++++++++++++++++
@@ -9,10 +9,10 @@ Subject: [PATCH] nopie
2 files changed, 40 insertions(+)
diff --git a/gcc/configure b/gcc/configure
index e9060112384..2f6b3265a6c 100755
index 8c46369f73f..e59cbee1767 100755
--- a/gcc/configure
+++ b/gcc/configure
@@ -32497,6 +32497,33 @@ fi
@@ -32268,6 +32268,33 @@ fi
$as_echo "$gcc_cv_no_pie" >&6; }
if test "$gcc_cv_no_pie" = "yes"; then
NO_PIE_FLAG="-no-pie"
@@ -47,10 +47,10 @@ index e9060112384..2f6b3265a6c 100755
diff --git a/gcc/configure.ac b/gcc/configure.ac
index 75a7048045c..e683d3a7a5f 100644
index 5504bf6eb01..57268319de1 100644
--- a/gcc/configure.ac
+++ b/gcc/configure.ac
@@ -7681,6 +7681,19 @@ AC_CACHE_CHECK([for -no-pie option],
@@ -7552,6 +7552,19 @@ AC_CACHE_CHECK([for -no-pie option],
LDFLAGS="$saved_LDFLAGS"])
if test "$gcc_cv_no_pie" = "yes"; then
NO_PIE_FLAG="-no-pie"
@@ -70,3 +70,6 @@ index 75a7048045c..e683d3a7a5f 100644
fi
AC_SUBST([NO_PIE_FLAG])
--
2.40.1
@@ -1,14 +1,14 @@
From fd642f8cd61849a9dc169588be5562ceda96a889 Mon Sep 17 00:00:00 2001
From ecad19db42776c536bd4f6033ec1891ffae03720 Mon Sep 17 00:00:00 2001
From: Ariadne Conill <ariadne@dereferenced.org>
Date: Fri, 21 Aug 2020 06:59:16 +0000
Subject: [PATCH] ada: fix shared linking
Subject: [PATCH 14/33] ada: fix shared linking
---
gcc/ada/link.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/gcc/ada/link.c b/gcc/ada/link.c
index a7574efb472..0ad0d66463c 100644
index f2126441208..22cfa9c641f 100644
--- a/gcc/ada/link.c
+++ b/gcc/ada/link.c
@@ -107,9 +107,9 @@ const char *__gnat_default_libgcc_subdir = "lib";
@@ -37,3 +37,6 @@ index a7574efb472..0ad0d66463c 100644
int __gnat_link_max = 8192;
unsigned char __gnat_objlist_file_supported = 1;
const char *__gnat_object_library_extension = ".a";
--
2.40.1
@@ -1,17 +1,17 @@
From a547632f5c7caec4a164e8d5e5b568fb7a461365 Mon Sep 17 00:00:00 2001
From 8500b4cdd039c16a02a8acabd124b92865871979 Mon Sep 17 00:00:00 2001
From: Ariadne Conill <ariadne@dereferenced.org>
Date: Fri, 21 Aug 2020 06:59:43 +0000
Subject: [PATCH] build: fix CXXFLAGS_FOR_BUILD passing
Subject: [PATCH 15/33] build: fix CXXFLAGS_FOR_BUILD passing
---
Makefile.in | 1 +
1 file changed, 1 insertion(+)
diff --git a/Makefile.in b/Makefile.in
index 593495e1650..b96f60e33e2 100644
index 06a9398e172..6ff2b3f9925 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -176,6 +176,7 @@ BUILD_EXPORTS = \
@@ -178,6 +178,7 @@ BUILD_EXPORTS = \
# built for the build system to override those in BASE_FLAGS_TO_PASS.
EXTRA_BUILD_FLAGS = \
CFLAGS="$(CFLAGS_FOR_BUILD)" \
@@ -19,3 +19,6 @@ index 593495e1650..b96f60e33e2 100644
LDFLAGS="$(LDFLAGS_FOR_BUILD)"
# This is the list of directories to built for the host system.
--
2.40.1
@@ -1,21 +0,0 @@
From 686e85d8a05f9f9e6c983afb13f937bd88fe84dd Mon Sep 17 00:00:00 2001
From: Ariadne Conill <ariadne@dereferenced.org>
Date: Thu, 6 Jan 2022 03:18:32 +0000
Subject: [PATCH] dlang: use libucontext on mips64
---
libphobos/configure.tgt | 1 +
1 file changed, 1 insertion(+)
diff --git a/libphobos/configure.tgt b/libphobos/configure.tgt
index 0063dd23249..c5e782a1238 100644
--- a/libphobos/configure.tgt
+++ b/libphobos/configure.tgt
@@ -38,6 +38,7 @@ case "${target}" in
;;
mips*-*-linux*)
LIBPHOBOS_SUPPORTED=yes
+ LIBDRUNTIME_NEEDS_UCONTEXT=yes
;;
power*-*-freebsd*)
LIBPHOBOS_SUPPORTED=yes
@@ -1,17 +1,17 @@
From 5bd37f8ee93a0fe1a3f841f48ed6626e7e0aa19d Mon Sep 17 00:00:00 2001
From e893ad827215a7c090a835e20a81559f4044fb47 Mon Sep 17 00:00:00 2001
From: Ariadne Conill <ariadne@dereferenced.org>
Date: Fri, 21 Aug 2020 07:01:06 +0000
Subject: [PATCH] add fortify-headers paths
Subject: [PATCH 16/33] add fortify-headers paths
---
gcc/config/linux.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/gcc/config/linux.h b/gcc/config/linux.h
index 74f70793d90..61b07f319f6 100644
index e3aca79cccc..b3537b8fbeb 100644
--- a/gcc/config/linux.h
+++ b/gcc/config/linux.h
@@ -172,6 +172,8 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
@@ -159,6 +159,8 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
#ifdef NATIVE_SYSTEM_HEADER_DIR
#define INCLUDE_DEFAULTS_MUSL_NATIVE \
@@ -20,3 +20,6 @@ index 74f70793d90..61b07f319f6 100644
{ NATIVE_SYSTEM_HEADER_DIR, 0, 0, 0, 1, 2 }, \
{ NATIVE_SYSTEM_HEADER_DIR, 0, 0, 0, 1, 0 },
#else
--
2.40.1
@@ -1,11 +1,11 @@
From d2577dc78a1f159e5c41fd0b53e73fa0e264cb52 Mon Sep 17 00:00:00 2001
From 064afc74f18f2a00771fc2600029a713b8708845 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Timo=20Ter=C3=A4s?= <timo.teras@iki.fi>
Date: Fri, 21 Aug 2020 07:03:00 +0000
Subject: [PATCH] Alpine musl package provides libssp_nonshared.a. We link to
it unconditionally, as otherwise we get link failures if some objects are
-fstack-protector built and final link happens with -fno-stack-protector.
Subject: [PATCH 17/33] Alpine musl package provides libssp_nonshared.a. We
link to it unconditionally, as otherwise we get link failures if some objects
are -fstack-protector built and final link happens with -fno-stack-protector.
This seems to be the common case when bootstrapping gcc, the piepatches do
not seem to fully fix the crosstoolchain and bootstrap sequence wrt.
not seem to fully fix the crosstoolchain and bootstrap sequence wrt.
stack-protector flag usage.
---
@@ -13,10 +13,10 @@ Subject: [PATCH] Alpine musl package provides libssp_nonshared.a. We link to
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/gcc/gcc.cc b/gcc/gcc.cc
index cc99d0b7aa1..c60a75371f8 100644
index b5a6f200635..6cbb726599b 100644
--- a/gcc/gcc.cc
+++ b/gcc/gcc.cc
@@ -1004,8 +1004,7 @@ proper position among the other output files. */
@@ -991,8 +991,7 @@ proper position among the other output files. */
#ifndef LINK_SSP_SPEC
#ifdef TARGET_LIBC_PROVIDES_SSP
@@ -26,3 +26,6 @@ index cc99d0b7aa1..c60a75371f8 100644
#else
#define LINK_SSP_SPEC "%{fstack-protector|fstack-protector-all" \
"|fstack-protector-strong|fstack-protector-explicit" \
--
2.40.1
@@ -1,7 +1,7 @@
From bbd5c529ef878c2d6096fd4949616714eb82683a Mon Sep 17 00:00:00 2001
From 45a98ce1f1702424aba4271f7f7570e43a354101 Mon Sep 17 00:00:00 2001
From: Ariadne Conill <ariadne@dereferenced.org>
Date: Fri, 21 Aug 2020 07:03:42 +0000
Subject: [PATCH] DP: Use --push-state/--pop-state for gold as well when
Subject: [PATCH 18/33] DP: Use --push-state/--pop-state for gold as well when
linking libtsan.
---
@@ -9,10 +9,10 @@ Subject: [PATCH] DP: Use --push-state/--pop-state for gold as well when
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/gcc/gcc.cc b/gcc/gcc.cc
index c60a75371f8..735b2b1bba1 100644
index 6cbb726599b..59390fd39d6 100644
--- a/gcc/gcc.cc
+++ b/gcc/gcc.cc
@@ -745,10 +745,10 @@ proper position among the other output files. */
@@ -755,10 +755,10 @@ proper position among the other output files. */
#define LIBASAN_SPEC STATIC_LIBASAN_LIBS
#elif defined(HAVE_LD_STATIC_DYNAMIC)
#define LIBASAN_SPEC "%{static-libasan:" LD_STATIC_OPTION "}" \
@@ -25,7 +25,7 @@ index c60a75371f8..735b2b1bba1 100644
STATIC_LIBASAN_LIBS
#else
#define LIBASAN_SPEC "-lasan" STATIC_LIBASAN_LIBS
@@ -784,10 +784,10 @@ proper position among the other output files. */
@@ -794,10 +794,10 @@ proper position among the other output files. */
#define LIBTSAN_SPEC STATIC_LIBTSAN_LIBS
#elif defined(HAVE_LD_STATIC_DYNAMIC)
#define LIBTSAN_SPEC "%{static-libtsan:" LD_STATIC_OPTION "}" \
@@ -38,7 +38,7 @@ index c60a75371f8..735b2b1bba1 100644
STATIC_LIBTSAN_LIBS
#else
#define LIBTSAN_SPEC "-ltsan" STATIC_LIBTSAN_LIBS
@@ -805,10 +805,10 @@ proper position among the other output files. */
@@ -815,10 +815,10 @@ proper position among the other output files. */
#define LIBLSAN_SPEC STATIC_LIBLSAN_LIBS
#elif defined(HAVE_LD_STATIC_DYNAMIC)
#define LIBLSAN_SPEC "%{static-liblsan:" LD_STATIC_OPTION "}" \
@@ -51,7 +51,7 @@ index c60a75371f8..735b2b1bba1 100644
STATIC_LIBLSAN_LIBS
#else
#define LIBLSAN_SPEC "-llsan" STATIC_LIBLSAN_LIBS
@@ -824,10 +824,10 @@ proper position among the other output files. */
@@ -834,10 +834,10 @@ proper position among the other output files. */
" %{static-libubsan|static:%:include(libsanitizer.spec)%(link_libubsan)}"
#ifdef HAVE_LD_STATIC_DYNAMIC
#define LIBUBSAN_SPEC "%{static-libubsan:" LD_STATIC_OPTION "}" \
@@ -64,3 +64,6 @@ index c60a75371f8..735b2b1bba1 100644
STATIC_LIBUBSAN_LIBS
#else
#define LIBUBSAN_SPEC "-lubsan" STATIC_LIBUBSAN_LIBS
--
2.40.1
@@ -1,7 +1,7 @@
From 8fc8d6c26a2a45945182e211bc3ac2eae4d6a11b Mon Sep 17 00:00:00 2001
From 6a2e902dc8abcfd44522b9224fd759d038db51f5 Mon Sep 17 00:00:00 2001
From: Ariadne Conill <ariadne@dereferenced.org>
Date: Thu, 6 Jan 2022 03:12:55 +0000
Subject: [PATCH] aarch64: disable multilib support
Subject: [PATCH 19/33] aarch64: disable multilib support
multilib is unsupported on Alpine GCC
---
@@ -9,7 +9,7 @@ multilib is unsupported on Alpine GCC
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gcc/config/aarch64/t-aarch64-linux b/gcc/config/aarch64/t-aarch64-linux
index d0cd546002a..b63a77f4969 100644
index 57bf4100fcd..172894b57ef 100644
--- a/gcc/config/aarch64/t-aarch64-linux
+++ b/gcc/config/aarch64/t-aarch64-linux
@@ -22,7 +22,7 @@ LIB1ASMSRC = aarch64/lib1funcs.asm
@@ -21,3 +21,6 @@ index d0cd546002a..b63a77f4969 100644
MULTIARCH_DIRNAME = $(call if_multiarch,aarch64$(AARCH_BE)-linux-gnu)
MULTILIB_OSDIRNAMES += mabi.ilp32=../libilp32$(call if_multiarch,:aarch64$(AARCH_BE)-linux-gnu_ilp32)
--
2.40.1
@@ -1,7 +1,7 @@
From 65ad898df141261a1ccd891a99133ad8f9847133 Mon Sep 17 00:00:00 2001
From 6e7c72ee05353a284d9c9809035e7ff488b4b8c1 Mon Sep 17 00:00:00 2001
From: Ariadne Conill <ariadne@dereferenced.org>
Date: Thu, 6 Jan 2022 03:13:59 +0000
Subject: [PATCH] s390x: disable multilib support
Subject: [PATCH 20/33] s390x: disable multilib support
multilib is not supported on Alpine GCC at present
---
@@ -20,3 +20,6 @@ index cc6ab367072..7f498ee1cdc 100644
-MULTILIB_OSDIRNAMES += $(if $(wildcard $(shell echo $(SYSTEM_HEADER_DIR))/../../usr/lib32),../lib32,../lib)$(call if_multiarch,:s390-linux-gnu)
+MULTILIB_OSDIRNAMES = m64=../lib
+MULTILIB_OSDIRNAMES+= m32=../lib32
--
2.40.1
@@ -1,45 +0,0 @@
From 714ed6d9649bf9ed42e34fef9c41169921e63921 Mon Sep 17 00:00:00 2001
From: Nils Andreas Svee <me@lochnair.net>
Date: Thu, 21 Dec 2017 03:14:33 +0100
Subject: [PATCH] mips64: disable multilib support
multilib is not supported by Alpine GCC
---
gcc/config/mips/mips.h | 8 ++++----
gcc/config/mips/t-linux64 | 6 +++---
2 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/gcc/config/mips/mips.h b/gcc/config/mips/mips.h
index 858bbba3a36..2d4f553e652 100644
--- a/gcc/config/mips/mips.h
+++ b/gcc/config/mips/mips.h
@@ -3447,11 +3447,11 @@ struct GTY(()) machine_function {
/* If we are *not* using multilibs and the default ABI is not ABI_32 we
need to change these from /lib and /usr/lib. */
#if MIPS_ABI_DEFAULT == ABI_N32
-#define STANDARD_STARTFILE_PREFIX_1 "/lib32/"
-#define STANDARD_STARTFILE_PREFIX_2 "/usr/lib32/"
+#define STANDARD_STARTFILE_PREFIX_1 "/lib/"
+#define STANDARD_STARTFILE_PREFIX_2 "/usr/lib/"
#elif MIPS_ABI_DEFAULT == ABI_64
-#define STANDARD_STARTFILE_PREFIX_1 "/lib64/"
-#define STANDARD_STARTFILE_PREFIX_2 "/usr/lib64/"
+#define STANDARD_STARTFILE_PREFIX_1 "/lib/"
+#define STANDARD_STARTFILE_PREFIX_2 "/usr/lib/"
#endif
/* Load store bonding is not supported by micromips and fix_24k. The
diff --git a/gcc/config/mips/t-linux64 b/gcc/config/mips/t-linux64
index 2fdd8e00407..406a3676289 100644
--- a/gcc/config/mips/t-linux64
+++ b/gcc/config/mips/t-linux64
@@ -21,6 +21,6 @@ MULTILIB_DIRNAMES = n32 32 64
MIPS_EL = $(if $(filter %el, $(firstword $(subst -, ,$(target)))),el)
MIPS_SOFT = $(if $(strip $(filter MASK_SOFT_FLOAT_ABI, $(target_cpu_default)) $(filter soft, $(with_float))),soft)
MULTILIB_OSDIRNAMES = \
- ../lib32$(call if_multiarch,:mips64$(MIPS_EL)-linux-gnuabin32$(MIPS_SOFT)) \
- ../lib$(call if_multiarch,:mips$(MIPS_EL)-linux-gnu$(MIPS_SOFT)) \
- ../lib64$(call if_multiarch,:mips64$(MIPS_EL)-linux-gnuabi64$(MIPS_SOFT))
+ ../lib \
+ ../lib32 \
+ ../lib
@@ -1,7 +1,7 @@
From 3263d8634da6d7e1edb1bfd88e1b2627ce0aa1be Mon Sep 17 00:00:00 2001
From 44655aa3be8d5354fb82a42317a9ac6ac1b50164 Mon Sep 17 00:00:00 2001
From: Ariadne Conill <ariadne@dereferenced.org>
Date: Thu, 6 Jan 2022 03:14:33 +0000
Subject: [PATCH] ppc64[le]: disable multilib support
Subject: [PATCH 21/33] ppc64[le]: disable multilib support
multilib is not presently supported on Alpine GCC
---
@@ -36,7 +36,7 @@ index 4e371255533..128c75c7d39 100644
endif
diff --git a/gcc/config/rs6000/t-linux64 b/gcc/config/rs6000/t-linux64
index 47e0efd5764..f89729af64f 100644
index 01a94242308..b3a76379c03 100644
--- a/gcc/config/rs6000/t-linux64
+++ b/gcc/config/rs6000/t-linux64
@@ -28,8 +28,8 @@
@@ -76,3 +76,6 @@ index 2e63bdb9fc9..c6e1c5db65d 100644
+MULTILIB_OSDIRNAMES := m64=../lib
+MULTILIB_OSDIRNAMES += m32=../lib32
MULTILIB_MATCHES := ${MULTILIB_MATCHES_ENDIAN}
--
2.40.1
@@ -1,7 +1,7 @@
From bf63353ea679e0bbf2c2f17bb64c75ebd590c6e7 Mon Sep 17 00:00:00 2001
From 5f79236c49bd0c2c36440f0ef83cea02d52fcaaf Mon Sep 17 00:00:00 2001
From: Ariadne Conill <ariadne@dereferenced.org>
Date: Thu, 6 Jan 2022 03:14:54 +0000
Subject: [PATCH] x86_64: disable multilib support
Subject: [PATCH 22/33] x86_64: disable multilib support
multilib is not presently supported on Alpine GCC
---
@@ -9,7 +9,7 @@ multilib is not presently supported on Alpine GCC
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/gcc/config/i386/t-linux64 b/gcc/config/i386/t-linux64
index 5526ad0e6cc..78866afab36 100644
index 138956b0962..bc03dab874f 100644
--- a/gcc/config/i386/t-linux64
+++ b/gcc/config/i386/t-linux64
@@ -33,6 +33,6 @@
@@ -21,3 +21,6 @@ index 5526ad0e6cc..78866afab36 100644
+MULTILIB_OSDIRNAMES = m64=../lib
+MULTILIB_OSDIRNAMES+= m32=../lib32
MULTILIB_OSDIRNAMES+= mx32=../libx32$(call if_multiarch,:x86_64-linux-gnux32)
--
2.40.1
@@ -1,7 +1,7 @@
From 2eed19787020ce52cf07b76a5d167c420ec42b61 Mon Sep 17 00:00:00 2001
From 4605e64b3a076411f2f8134256c400eb58bcc1c7 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?S=C3=B6ren=20Tempel?= <soeren+git@soeren-tempel.net>
Date: Mon, 3 Jan 2022 07:14:48 +0100
Subject: [PATCH] riscv: disable multilib support
Subject: [PATCH 23/33] riscv: disable multilib support
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
@@ -43,10 +43,10 @@ library.
2 files changed, 5 insertions(+), 8 deletions(-)
diff --git a/gcc/config/riscv/linux.h b/gcc/config/riscv/linux.h
index 3067ed6eac8..4c8c85e3285 100644
index 16503482ec2..8d9881eadeb 100644
--- a/gcc/config/riscv/linux.h
+++ b/gcc/config/riscv/linux.h
@@ -71,9 +71,3 @@ along with GCC; see the file COPYING3. If not see
@@ -61,9 +61,3 @@ along with GCC; see the file COPYING3. If not see
%{static:-static}}"
#define TARGET_ASM_FILE_END file_end_indicate_exec_stack
@@ -69,3 +69,6 @@ index 216d2776a18..1a8a863853e 100644
+MULTILIB_DIRNAMES := $(patsubst rv32%,lib32,$(patsubst rv64%,lib,$(MULTILIB_DIRNAMES)))
MULTILIB_OSDIRNAMES := $(patsubst lib%,../lib%,$(MULTILIB_DIRNAMES))
+MULTILIB_MATCHES := march?rv64gc=march?rv64imafdc
--
2.40.1
@@ -1,7 +1,7 @@
From 51a35c0fa0e793c6a2c64ae1449c0cfd681d8f8a Mon Sep 17 00:00:00 2001
From a178cfeb975d79bb9b9fd877ab4c6e05d10b147e Mon Sep 17 00:00:00 2001
From: Ariadne Conill <ariadne@dereferenced.org>
Date: Fri, 21 Aug 2020 07:05:41 +0000
Subject: [PATCH] always build libgcc_eh.a
Subject: [PATCH 24/33] always build libgcc_eh.a
highly inspired by:
http://landley.net/hg/aboriginal/file/7e0747a665ab/sources/patches/gcc-core-libgcceh.patch
@@ -10,10 +10,10 @@ highly inspired by:
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/libgcc/Makefile.in b/libgcc/Makefile.in
index 09b3ec8bc2e..c9ca58c64cc 100644
index 6c4dc79ab71..023cede18a7 100644
--- a/libgcc/Makefile.in
+++ b/libgcc/Makefile.in
@@ -957,8 +957,9 @@ ifneq ($(LIBUNWIND),)
@@ -960,8 +960,9 @@ ifneq ($(LIBUNWIND),)
all: libunwind.a
endif
@@ -24,7 +24,7 @@ index 09b3ec8bc2e..c9ca58c64cc 100644
ifneq ($(LIBUNWIND),)
all: libunwind$(SHLIB_EXT)
libgcc_s$(SHLIB_EXT): libunwind$(SHLIB_EXT)
@@ -1160,10 +1161,6 @@ install-libunwind:
@@ -1163,10 +1164,6 @@ install-libunwind:
install-shared:
$(mkinstalldirs) $(DESTDIR)$(inst_libdir)
@@ -35,7 +35,7 @@ index 09b3ec8bc2e..c9ca58c64cc 100644
$(subst @multilib_dir@,$(MULTIDIR),$(subst \
@shlib_base_name@,libgcc_s,$(subst \
@shlib_slibdir_qual@,$(MULTIOSSUBDIR),$(SHLIB_INSTALL))))
@@ -1180,6 +1177,10 @@ ifeq ($(enable_gcov),yes)
@@ -1183,6 +1180,10 @@ ifeq ($(enable_gcov),yes)
$(RANLIB) $(DESTDIR)$(inst_libdir)/libgcov.a
endif
@@ -46,3 +46,6 @@ index 09b3ec8bc2e..c9ca58c64cc 100644
parts="$(INSTALL_PARTS)"; \
for file in $$parts; do \
rm -f $(DESTDIR)$(inst_libdir)/$$file; \
--
2.40.1
@@ -1,7 +1,7 @@
From 64a1c5f57e278869f41c43ee56cc5defb3dd55c5 Mon Sep 17 00:00:00 2001
From 5bc3deb9bc2679ad4f6f189a65e3643b550587a1 Mon Sep 17 00:00:00 2001
From: Ariadne Conill <ariadne@dereferenced.org>
Date: Fri, 21 Aug 2020 07:06:30 +0000
Subject: [PATCH] ada: libgnarl compatibility for musl
Subject: [PATCH 25/33] ada: libgnarl compatibility for musl
---
gcc/ada/libgnarl/s-osinte__linux.ads | 11 ------
@@ -9,7 +9,7 @@ Subject: [PATCH] ada: libgnarl compatibility for musl
2 files changed, 3 insertions(+), 61 deletions(-)
diff --git a/gcc/ada/libgnarl/s-osinte__linux.ads b/gcc/ada/libgnarl/s-osinte__linux.ads
index 7c9e7ca4518..caafc4aa68f 100644
index a5e645d334d..32165347071 100644
--- a/gcc/ada/libgnarl/s-osinte__linux.ads
+++ b/gcc/ada/libgnarl/s-osinte__linux.ads
@@ -403,12 +403,6 @@ package System.OS_Interface is
@@ -38,7 +38,7 @@ index 7c9e7ca4518..caafc4aa68f 100644
sched_priority : int; -- scheduling priority
end record;
diff --git a/gcc/ada/libgnarl/s-taprop__linux.adb b/gcc/ada/libgnarl/s-taprop__linux.adb
index 4ff784f0ea7..b34a12802c6 100644
index 821ceef30e4..ae95b58e01e 100644
--- a/gcc/ada/libgnarl/s-taprop__linux.adb
+++ b/gcc/ada/libgnarl/s-taprop__linux.adb
@@ -198,9 +198,6 @@ package body System.Task_Primitives.Operations is
@@ -130,3 +130,6 @@ index 4ff784f0ea7..b34a12802c6 100644
Result := pthread_rwlock_init (L.RW'Access, RWlock_Attr'Access);
pragma Assert (Result in 0 | ENOMEM);
--
2.40.1
Loaded 100 of 651 files, more files were not shown because too many files have changed in this diff. Show more