summaryrefslogtreecommitdiff
path: root/var/spack/repos/builtin/packages/gcc
AgeCommit message (Collapse)AuthorFilesLines
2024-01-02Update copyright year to 2024 (#41919)Todd Gamblin1-1/+1
It was time to run `spack license update-copyright-year` again.
2023-12-27Initial License CheckinAiden Grossman1-0/+2
This patch adds license information for about 5,300 packages from automated sources. The license information was obtained from Alpine Linux and PyPI and processed using tooling available in https://github.com/boomanaiden154/spack-license-utils. The license field was added in after all other directives in an automated fashion. Note that while this license information is probably fairly accurate, it is not guaranteed to be accurate. In addition some of the license strings from Alpine Linux might not be valid SPDX license strings. Invalid SPDX identifiers can be picked up and fixed once we have validation/parsing infrastructure in place for the solver, and issues can be fixed as they come up.
2023-12-21Compilers can inject first order rules into the solverMassimiliano Culpo1-0/+29
* Restore PackageBase class, and modify only ASP This prevents a noticeable slowdown in concretization due to the number of directives involved. * Fix issue with 'clang' being preferred to 'gcc', due to runtime version weights * Constraints on runtimes are declared by compilers The declaration of available runtime versions, and of their compatibility constraints are in the associated compiler class. Co-authored-by: Harmen Stoppels <harmenstoppels@gmail.com>
2023-12-18gcc: fix run environment variables not being exported in environments (#41729)Michael Kuhn1-1/+3
Since views use symlinks, all compiler binaries were skipped in this case. Instead, only skip them if their target does not exist.
2023-12-12gcc: simplify patch when range (#41587)Harmen Stoppels1-2/+2
2023-10-10GCC: fix build with Apple Clang 15 (#40318)Adam J. Stewart1-0/+5
2023-09-29Test package detection in a systematic way (#18175)Massimiliano Culpo1-0/+38
This PR adds a new audit sub-command to check that detection of relevant packages is performed correctly in a few scenarios mocking real use-cases. The data for each package being tested is in a YAML file called detection_test.yaml alongside the corresponding package.py file. This is to allow encoding detection tests for compilers and other widely used tools, in preparation for compilers as dependencies.
2023-09-18Enabled building GCC 13.1 on darwin/aarch64. (#38667)Ben Cowan1-5/+15
2023-09-08Speed-up `spack external find` execution (#39843)Massimiliano Culpo1-3/+3
* Perform external spec detection with multiple workers The logic to perform external spec detection has been refactored into classes. These classes use the GoF "template" pattern to account for the small differences between searching for "executables" and for "libraries", while unifying the larger part of the algorithm. A ProcessPoolExecutor is used to parallelize the work. * Speed-up external find by tagging detectable packages automatically Querying packages by tag is much faster than inspecting the repository, since tags are cached. This commit adds a "detectable" tag to every package that implements the detection protocol, and external detection uses it to search for packages. * Pass package names instead of package classes to workers The slowest part of the search is importing the Python modules associated with candidate packages. The import is done serially before we distribute the work to the pool of executors. This commit pushes the import of the Python module to the job performed by the workers, and passes just the name of the packages to the executors. In this way imports can be done in parallel. * Rework unit-tests for Windows Some unit tests were doing a full e2e run of a command just to check a input handling. Make the test more focused by just stressing a specific function. Mark as xfailed 2 tests on Windows, that will be fixed by a PR in the queue. The tests are failing because we monkeypatch internals in the parent process, but the monkeypatching is not done in the "spawned" child process.
2023-08-09zlib-api: new virtual with zlib/zlib-ng as providers (#37372)Harmen Stoppels1-3/+5
Introduces a new virtual zlib-api, which replaces zlib in most packages. This allows users to switch to zlib-ng by default for better performance.
2023-07-28gcc: add 13.2.0 (#39119)Michael Kuhn1-0/+1
2023-07-09gcc: add 10.5.0 (#38784)Michael Kuhn1-1/+2
2023-07-05Drop Python 2 super syntax (#38718)Adam J. Stewart1-1/+1
2023-05-31gcc: add 11.4.0 (#37988)Michael Kuhn1-0/+1
2023-05-14gcc: add 12.3.0 (#37553)Paul R. C. Kent1-0/+1
2023-05-08Add a "requires" directive, extend functionality of package requirements ↵Massimiliano Culpo1-3/+1
(#36286) Add a "require" directive to packages, which functions exactly like requirements specified in packages.yaml (uses the same fact-generation logic); update both to allow making the requirement conditional. * Packages may now use "require" to add constraints. This can be useful for something like "require(%gcc)" (where before we had to add a conflict for every compiler except gcc). * Requirements (in packages.yaml or in a "require" directive) can be conditional on a spec, e.g. "require(%gcc, when=@1.0.0)" (version 1.0.0 can only build with gcc). * Requirements may include a message which clarifies why they are needed. The concretizer assigns a high priority to errors which generate these messages (in particular over errors for unsatisfied requirements that do not produce messages, but also over a number of more-generic errors).
2023-04-27gcc: add v13.1.0 (#37230)Massimiliano Culpo1-1/+6
version 13.1 builds with apple-clang@14.0.3
2023-04-27gcc: no need to special case macos/linux wrt rpaths (#37243)Harmen Stoppels1-6/+1
2023-03-23gcc: fix for apple-clang conflicts (#36165)Matthew Thompson1-1/+1
* gcc: fix for apple-clang conflict * Update var/spack/repos/builtin/packages/gcc/package.py Use variant by @adamjstewart Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com> --------- Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
2023-03-10go: refactor bootstrapping process (#35823)Alec Scott1-25/+22
* Refactor go bootstrapping to include binary or gcc bootstrap
2023-03-08gcc: Patch building of GCC 5.1-12.1 with glibc >= 2.36 (#35798)Maciej Wójcik3-0/+59
2023-03-08Split `satisfies(..., strict=True/False)` into two functions (#35681)Massimiliano Culpo1-1/+1
This commit formalizes `satisfies(lhs, rhs, strict=True/False)` and splits it into two functions: `satisfies(lhs, rhs)` and `intersects(lhs, rhs)`. - `satisfies(lhs, rhs)` means: all concrete specs matching the left hand side also match the right hand side - `intersects(lhs, rhs)` means: there exist concrete specs matching both lhs and rhs. `intersects` now has the property that it's commutative, which previously was not guaranteed. For abstract specs, `intersects(lhs, rhs)` implies that `constrain(lhs, rhs)` works. What's *not* done in this PR is ensuring that `intersects(concrete, abstract)` returns false when the abstract spec has additional properties not present in the concrete spec, but `constrain(concrete, abstract)` will raise an error. To accomplish this, some semantics have changed, as well as bugfixes to ArchSpec: - GitVersion is now interpreted as a more constrained version - Compiler flags are interpreted as strings since their order is important - Abstract specs respect variant type (bool / multivalued)
2023-02-16Style: black 23, skip magic trailing comma (#35351)Adam J. Stewart1-11/+2
* Style: black 23, skip magic trailing commas * isort should use same line length as black * Fix unused import * Update version of black used in CI * Update new packages * Update new packages
2023-02-01Use the `maintainers` directive in all packages (#35201)Massimiliano Culpo1-1/+1
2023-01-18license year bump (#34921)Harmen Stoppels1-1/+1
* license bump year * fix black issues of modified files * mypy * fix 2021 -> 2023
2023-01-17gcc: add patch for noexcept declarations (#34964)Glenn Johnson1-0/+7
There are some declarations that need to be declared noexcept for valarray. This affects gcc 9.5:11.2.
2022-11-23Control Werror by converting to Wno-error (#30882)Tom Scogland1-0/+1
Using `-Werror` is good practice for development and testing, but causes us a great deal of heartburn supporting multiple compiler versions, especially as newer compiler versions add warnings for released packages. This PR adds support for suppressing `-Werror` through spack's compiler wrappers. There are currently three modes for the `flags:keep_werror` setting: * `none`: (default) cancel all `-Werror`, `-Werror=*` and `-Werror-*` flags by converting them to `-Wno-error[=]*` flags * `specific`: preserve explicitly selected warnings as errors, such as `-Werror=format-truncation`, but reverse the blanket `-Werror` * `all`: keeps all `-Werror` flags These can be set globally in config.yaml, through the config command-line flags, or overridden by a particular package (some packages use Werror as a proxy for determining support for other compiler features). We chose to use this approach because: 1. removing `-Werror` flags entirely broke *many* build systems, especially autoconf based ones, because of things like checking `-Werror=feature` and making the assumption that if that did not error other flags related to that feature would also work 2. Attempting to preserve `-Werror` in some phases but not others caused similar issues 3. The per-package setting came about because some packages, even with all these protections, still use `-Werror` unsafely. Currently there are roughly 3 such packages known.
2022-11-18gcc: Ensure matching assembler/binutils on RHEL8 (#33994)Bernhard Kaindl1-0/+8
gcc@10: Newer binutils than RHEL7/8's are required to for guaranteed operaton. Therefore, on RHEL7/8, reject ~binutils. You need to add +binutils to be sure to have binutils which are recent enough. See this discussion with the OpenBLAS devs for reference: https://github.com/xianyi/OpenBLAS/issues/3805#issuecomment-1319878852 Co-authored-by: Bernhard Kaindl <contact@bernhard.kaindl.dev>
2022-11-10gcc: drop target bootstrap flags for aarch64 (#33813)Harmen Stoppels1-1/+3
See https://github.com/spack/spack/issues/31184 GCC bootstrap logic adds `-mpcu` for libatomic (iirc), which conflicts with the `-march` flag we provide.
2022-10-18go,gcc: Support external go compilers for Go bootstrap (#27769)Bernhard Kaindl1-1/+19
For ARM64, fallback to gccgo. (go-bootstrap@1.4 can't support ARM64)
2022-10-11GCC: update Xcode 14 conflict (#33226)Adam J. Stewart1-1/+1
2022-09-26gcc: add Apple Silicon support for newer versions (#32702)Adam J. Stewart1-3/+17
2022-09-12gcc: add support for the D language (GDC) (#32330)Sergey Kosukhin1-3/+157
2022-08-21gcc: add 12.2.0 (#32270)Wileam Y. Phan1-0/+1
2022-07-31black: reformat entire repository with blackTodd Gamblin1-427/+462
2022-07-28gcc: fix unstable patch urls (#31784)Harmen Stoppels5-6/+514
the patch urls dynamically generate a diff, which includes metadata about the git version used, meaning they are not content-addressable. instead ship the patches with spack.
2022-07-25GCC: Add bootstrap conflict for M1 (#31189)psakievich1-0/+1
2022-07-12`spack.repo.get()` can only be called on concrete specs (#31411)Massimiliano Culpo1-2/+3
The goal of this PR is to make clearer where we need a package object in Spack as opposed to a package class. We currently instantiate a lot of package objects when we could make do with a class. We should use the class when we only need metadata, and we should only instantiate and us an instance of `PackageBase` at build time. Modifications: - [x] Remove the `spack.repo.get` convenience function (which was used in many places, and not really needed) - [x] Use `spack.repo.path.get_pkg_class` wherever possible - [x] Try to route most of the need for `spack.repo.path.get` through `Spec.package` - [x] Introduce a non-data descriptor, that can be used as a decorator, to have "class level properties" - [x] Refactor unit tests that had to be modified to reduce code duplication - [x] `Spec.package` and `Repo.get` now require a concrete spec as input - [x] Remove `RepoPath.all_packages` and `Repo.all_packages`
2022-06-28gcc: add 10.4.0 (#31332)Michael Kuhn1-1/+2
2022-06-06GCC: add Apple M1 support (#30825)Adam J. Stewart1-2/+8
Co-authored-by: Seth R. Johnson <johnsonsr@ornl.gov>
2022-05-28refactor: packages import `spack.package` explicitly (#30404)Tom Scogland1-0/+1
Explicitly import package utilities in all packages, and corresponding fallout. This includes: * rename `spack.package` to `spack.package_base` * rename `spack.pkgkit` to `spack.package` * update all packages in builtin, builtin_mock and tutorials to include `from spack.package import *` * update spack style * ensure packages include the import * automatically add the new import and remove any/all imports of `spack` and `spack.pkgkit` from packages when using `--fix` * add support for type-checking packages with mypy when SPACK_MYPY_CHECK_PACKAGES is set in the environment * fix all type checking errors in packages in spack upstream * update spack create to include the new imports * update spack repo to inject the new import, injection persists to allow for a deprecation period Original message below: As requested @adamjstewart, update all packages to use pkgkit. I ended up using isort to do this, so repro is easy: ```console $ isort -a 'from spack.pkgkit import *' --rm 'spack' ./var/spack/repos/builtin/packages/*/package.py $ spack style --fix ``` There were several line spacing fixups caused either by space manipulation in isort or by packages that haven't been touched since we added requirements, but there are no functional changes in here. * [x] add config to isort to make sure this is maintained going forward
2022-05-27gcc: add 9.5.0 (#30893)Michael Kuhn1-0/+1
2022-05-21gcc: add `build_type` and `profiled` variants (#30660)Harmen Stoppels1-0/+67
Add a `build_type` variant, which allows building optimized compilers, as well as target libraries (libstdc++ and friends). The default is `build_type=RelWithDebInfo`, which corresponds to GCC's default of -O2 -g. When building with `+bootstrap %gcc`, also add Spack's arch specific flags using the common denominator between host and new GCC. It is done by creating a config/spack.mk file in def patch, that looks as follows: ``` BOOT_CFLAGS := $(filter-out -O% -g%, $(BOOT_CFLAGS)) -O2 -g -march=znver2 -mtune=znver2 CFLAGS_FOR_TARGET := $(filter-out -O% -g%, $(CFLAGS_FOR_TARGET)) -O2 -g -march=znver2 -mtune=znver2 CXXFLAGS_FOR_TARGET := $(filter-out -O% -g%, $(CXXFLAGS_FOR_TARGET)) -O2 -g -march=znver2 -mtune=znver2 ```
2022-05-07gcc: version 12.1.0 (#30537)Harmen Stoppels1-0/+2
2022-04-25gcc: Make gcc 11.3 build on Darwin (#30278)Erik Schnetter1-1/+1
Don't apply a Darwin-specific patch that doesn't work on 11.3 any more. Closes https://github.com/spack/spack/issues/30264.
2022-04-21gcc: add 11.3.0 (#30226)Michael Kuhn1-0/+1
2022-04-16gcc: avoid excessive stat calls (#30005)Harmen Stoppels1-0/+5
For about a decade GCC has an option `-f[no]-canonical-system-headers` which basically runs `realpath` on all "system headers", to possibly reduce the length of paths in diagnostics. [1] Spack usually installs the "system headers" of GCC in very deeply nested directories. Calling `realpath` there results in stat calls on every level, for every header file. On some slow filesystem I have, `-fno-canonical-system-headers` gives about 5x speedup to compile hello world in C, meaning that ./configure scripts would be much faster when using this flag by default. [1] https://codereview.appspot.com/6495088
2022-03-30gcc: add missing dependencies (#29671)Tom Scogland1-0/+9
Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
2022-03-23Use stable URLs and `?full_index=1` for all github patches (#29239)Adam J. Stewart1-1/+1
The number of commit characters in patch files fetched from GitHub can change, so we should use `full_index=1` to enforce full commit hashes (and a stable patch `sha256`). Similarly, URLs for branches like `master` don't give us stable patch files, because branches are moving targets. Use specific tags or commits for those. - [x] update all github patch URLs to use `full_index=1` - [x] don't use `master` or other branches for patches - [x] add an audit check and a test for `?full_index=1` Co-authored-by: Todd Gamblin <tgamblin@llnl.gov>
2022-02-07gcc: fix build on apple-clang@13 (#28801)Seth R. Johnson2-0/+35