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