summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* flag-o-matic.eclass: filter-lfs-flags: remove -D_TIME_BITS=64Mike Gilbert2021-12-181-1/+2
| | | | | | glibc only allows _TIME_BITS=64 when _FILE_OFFSET_BITS=64. Signed-off-by: Mike Gilbert <floppym@gentoo.org>
* flag-o-matic.eclass: Support EAPI 8Ulrich Müller2021-06-231-2/+2
| | | | Signed-off-by: Ulrich Müller <ulm@gentoo.org>
* flag-o-matic.eclass: allow -fno-sanitize* optionsSergei Trofimovich2021-05-081-1/+3
| | | | | | | | | | We already allow -fsanitize* options. Sometimes it's useful to enable -fsanitize= globally and disable ir in a few ebuilds. The change allows passing -fno-sanitize=all an similar to achieve that effect. Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
* flag-o-matic.eclass: Fix eclassdocAndreas Sturmlechner2021-04-111-1/+14
| | | | | Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org> Signed-off-by: Sam James <sam@gentoo.org>
* flag-o-matic.eclass: Make test-flags-PROG() internalAndreas Sturmlechner2021-04-111-5/+23
| | | | | Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org> Signed-off-by: Sam James <sam@gentoo.org>
* flag-o-matic.eclass: Make test-flag-PROG() internalAndreas Sturmlechner2021-04-111-5/+23
| | | | | Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org> Signed-off-by: Sam James <sam@gentoo.org>
* flag-o-matic.eclass: Make setup-allowed-flags() internalAndreas Sturmlechner2021-04-111-1/+15
| | | | | Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org> Signed-off-by: Sam James <sam@gentoo.org>
* flag-o-matic.eclass: SUPPORTED_EAPIS: 5,6,7; drop eutils, multilibAndreas Sturmlechner2021-04-111-2/+11
| | | | | | | | - eutils was only used for eqawarn in old EAPI - multilib usage unknown, but is inherited by toolchain-funcs anyway Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org> Signed-off-by: Sam James <sam@gentoo.org>
* eclass: [QA] Revert multiple meaningless doc changesMichał Górny2020-12-281-36/+0
| | | | | | | | | | | Revert multiple meaningless eclass documentation changes, notably adding a lot of placeholders and documenting implementation details. These changes were aimed at silencing (valid) documentation warnings without actually providing valuable documentation to the end users. While some of these changes were beneficial, it would take a lot of effort to review them all and the author is unwilling to fix his mistakes. Signed-off-by: Michał Górny <mgorny@gentoo.org>
* eclass/flag-o-matic: fixup documentationAaron Bauman2020-12-161-0/+36
| | | | Signed-off-by: Aaron Bauman <bman@gentoo.org>
* flag-o-matic.eclass: fix '-gstabs' filtering (allow '-gstabs')Sergei Trofimovich2020-08-101-1/+1
| | | | | | 'gstabs' is not a valid compiler flag. '-gstabs' is valid. Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
* flag-o-matic.eclass: allow -gdwarf (we already allow -gdwarf-*)Sergei Trofimovich2020-08-101-1/+1
| | | | | | Reported-by: Guilherme Amadio Suggested-by: Arfrever Frehtes Taifersar Arahesis Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
* flag-o-matic.eclass: add whitespace around -g* optionsSergei Trofimovich2020-08-101-1/+8
| | | | | | No functional change. Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
* eclass/flag-o-matic.eclass: Add missing MIPS CPU errata flagsJoshua Kinard2020-03-281-1/+3
| | | | | | | | | | | | | Noticed during a glibc build for MIPS-III ISA that the -mfix-r4000 and -mfix-r4400 gcc flags got stripped off. These are needed to work around known CPU errata in R4000 and R4400 CPUs. In addition, also add the -mfix-rm7000 option (and it's -mno form) to fix errata in the PMC RM7000 CPU, and the -mr10k-cache-barrier to control the generation of cache barriers to work around the side-effects of R10000's speculative execution capabilities. Signed-off-by: Joshua Kinard <kumba@gentoo.org> Reviewed-by: Matt Turner <mattst88@gentoo.org>
* flag-o-matic.eclass: document assumptions and limitations of test-flag-PROG()Sergei Trofimovich2020-03-261-0/+11
| | | | | Bug: https://bugs.gentoo.org/712488 Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
* flag-o-matic.eclass: revert "don't use -Werror in test-flag-PROG(), bug #712488"Sergei Trofimovich2020-03-261-8/+11
| | | | | | | | | | This reverts commit ab8fe14ae2e9110faa85ca1c4528b470c0be1535. Triggers build failures on sys-libs/compiler-rt-sanitizers. Reported-by: Craig Andrews Bug: https://bugs.gentoo.org/714742 Bug: https://bugs.gentoo.org/712488 Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
* flag-o-matic.eclass: don't use -Werror in test-flag-PROG(), bug #712488Sergei Trofimovich2020-03-201-11/+8
| | | | | | | | | | | -Werror filters out too much (everything) if used compiler happens to always generate warnings. Let's drop cosmetic stripping of ignored flags until we really need it. Then we can consider more selective filtering by using more targeted -Werror= options. Reported-by: Anton Gubarkov Closes: https://bugs.gentoo.org/712488 Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
* flag-o-matic.eclass: add more verbose conditionalsSergei Trofimovich2020-03-171-2/+9
| | | | | | | | | | | To ease debugging by pluggins debug statements convert foo || return 1 into if ! foo; then return 1 fi Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
* flag-o-matic.eclass: add assertions around argument countsSergei Trofimovich2020-03-141-0/+5
| | | | Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
* flag-o-matic.eclass: drop deprecated has_m32/has_m64 functionsSergei Trofimovich2020-03-141-8/+0
| | | | | | | | | | | has_m32/has_m64 were turned into 'die' calls with d863983fc89289 "mark has_m32 as dead since no one uses it, and mark has_m64 as a warning until xalan-c gets fixed #398855" Sat Jan 14 08:22:13 2012 +0000 Time to remove these helpers. Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
* flag-o-matic.eclass: crash in test-flag-PROG() when ${TEMP} is not writableSergei Trofimovich2020-03-141-6/+6
| | | | | | | | Reported by qolfixes on #gentoo-toolchain. Due to permission error in temp/ glibc ebuild silently filtered away all flags from CFLAGS and failed with an obscure error. The change turn flag filtering error into early fatal error. Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
* */*: Bump copyright on files touched this yearMichał Górny2020-02-111-1/+1
| | | | | | | Update the copyright notice on all files that were touched since January 1st but did not have the notice updated. Signed-off-by: Michał Górny <mgorny@gentoo.org>
* flag-o-matic.eclass: fix probe file extensionSergei Trofimovich2020-01-261-1/+1
| | | | | | A cosmetic fix as we rely on -x ${lang} to detect correct language. Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
* flag-o-matic.eclass: fix probe when CC points to absolute pathSergei Trofimovich2020-01-261-2/+2
| | | | Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
* flag-o-matic.eclass: add LDFLAGS testing against linkerSergei Trofimovich2019-12-241-14/+58
| | | | | | | | | | | | | | | | Before the change we tested only compiler driver (gcc flag parser) for LDFLAGS. This does not cover cases when we would really like to filter out unsupported linker flags like -Wl,--hash-style=gnu passed to non-ELF targets. The change adds test-flag-CCLD() helper to perform all of assembly, compilation and linking steps. Helper is used to filter LDFLAGS variable in strip-unsupported-flags(). Closes: https://bugs.gentoo.org/333763 Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
* flag-o-matic.eclass: fix test-flag-PROG() for CC="gcc -m64"Sergei Trofimovich2019-09-301-3/+5
| | | | | | | | | | | | | | | | | | | | bug #695706 added compiler validation via 'type -p ${CC}', but that does not take into account possible options present in ${CC} itself: $ type -P x86_64-pc-linux-gnu-gcc -m64; echo $? /usr/lib/ccache/bin/x86_64-pc-linux-gnu-gcc 1 $ type -P x86_64-pc-linux-gnu-gcc ; echo $? /usr/lib/ccache/bin/x86_64-pc-linux-gnu-gcc 0 The change picks first argument (binary name) and validates only that. Reported-by: Pavol Cupka Closes: https://bugs.gentoo.org/695888 Bug: https://bugs.gentoo.org/show_bug.cgi?id=695706 Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
* flag-o-matic.eclass: test-flag-PROG(): verify selected compiler existsTim Harder2019-09-271-1/+5
| | | | | | | | | Before trying to use it. Fixes stricter phase running done by pkgcore which explicitly dies when encountering unknown commands. Closes: https://bugs.gentoo.org/695706 Signed-off-by: Tim Harder <radhermit@gentoo.org>
* flag-o-matic.eclass: filter out '-B/foo' and '-B /foo' equallySergei Trofimovich2019-06-231-1/+2
| | | | | | | | | | | | | In bug #687198 Julian noticed that strip-unsupported-flags() filters out '-B' but not '/foo' in CFLAGS='-B /foo' and causes breakage. This change still does not allow -B flag but at least filters out both '-B' and it's parameter. Reported-by: Julian Cléaud Bug: https://bugs.gentoo.org/687198 Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
* flag-o-matic.eclass: whitelist -mstackrealign for 'strip-flags'Sergei Trofimovich2019-02-131-0/+7
| | | | | | | | | | Allow '-mstackrealign' in ebuilds like glibc to force stack realignment. That will allow running ancient (or foreign) binaries that don't maintain 16-byte stack alignment. See bug #677852 for example. Reported-by: Michael Huss Closes: https://bugs.gentoo.org/677852 Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
* flag-o-matic.eclass: allow -fuse-ld=* in filter flagsDavid C. Manuelda2018-08-241-0/+3
| | | | Closes: https://bugs.gentoo.org/662718
* flag-o-matic.eclass: treat "--param x" as a unit when testing flagsMike Gilbert2018-04-181-10/+23
| | | | | | | For clang and gcc, --param consumes the next argument. Testing --param and its value separately is nonsensical. Acked-by: Sergei Trofimovich <slyfox@gentoo.org>
* flag-o-matic.eclass: Allow -gz for compressed debug sections, bug 636986Andreas K. Hüttel2017-12-151-1/+1
| | | | Closes: https://bugs.gentoo.org/636986
* flag-o-matic.eclass: add ADA to flags for proper filteringStephen L Arnold2017-11-161-1/+1
| | | | * this is needed for some Ada packages using system gcc
* flag-o-matic.eclass: Strip LDFLAGS unsupported by the C compiler, #621274Michał Górny2017-08-251-0/+3
| | | | | | | | Include LDFLAGS in the variables stripped by strip-unsupported-flags. The code reuses the current functions for testing CC, and so only remove LDFLAGS that are rejected by the C compiler and not the linker. This solves the case of bug #621274 where LDFLAGS contained GCC-specific -flto flag.
* flag-o-matic.eclass: test-flag-PROG, ignore unused args in clangMichał Górny2017-08-251-1/+8
| | | | | | | | | | | | | | | | | | | By default, clang considers unused arguments as error when -Werror is used. Since flag tests are performed without linking, this causes all tests for linker flags to fail inadvertently and all those flags are stripped as a result. While the correctness of passing unused flags is doubtful, silently stripping them in a few random packages is certainly not the solution to the problem, and also makes the results differ between gcc and clang. To account for that, use clang's -Qunused-arguments option to silence unused argument warnings. To avoid wasting time on testing the compiler, just try passing -Qunused-arguments every time a flag check fails. If clang is not used, the additional call will fail just the same as the previous one (either because of the original flag or because of -Qunused-arguments), so the result will be the same.
* flag-o-matic.eclass: test-flag-PROG, refactor to reduce duplicationMichał Górny2017-08-251-3/+7
|
* flag-o-matic.eclass: Revert "Strip LDFLAGS unsupported by the C..."Michał Górny2017-08-111-3/+0
| | | | | | | The current logic strips too much, causing build failures. Revert it until we get it right. Bug: https://bugs.gentoo.org/627474
* flag-o-matic.eclass: Strip LDFLAGS unsupported by the C compiler, #621274Michał Górny2017-08-081-0/+3
| | | | | | | | Include LDFLAGS in the variables stripped by strip-unsupported-flags. The code reuses the current functions for testing CC, and so only remove LDFLAGS that are rejected by the C compiler and not the linker. This solves the case of bug #621274 where LDFLAGS contained GCC-specific -flto flag.
* flag-o-matic.eclass: Replace unnecessary evalsMichał Górny2017-03-081-6/+5
| | | | | | | | | Replace the evals used to export variables with plain export calls. Bash expands variable references for exported variable name anyway, rendering the eval completely unnecessary. Replace the single eval used for indirect variable reference with the ${!...} substitution which serves that exact purpose in bash.
* Drop $Id$ per council decision in bug #611234.Robin H. Johnson2017-02-281-1/+0
| | | | Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
* flag-o-matic.eclass: Add -fno-stack-check to ALLOWED_FLAGSJoshua Kinard2017-02-201-1/+1
| | | | | | | The -fno-stack-check flag is equivalent to -fstack-check=no, so support both in ALLOWED_FLAGS. Signed-off-by: Joshua Kinard <kumba@gentoo.org>
* flag-o-matic.eclass: Mark has_m64() as dead.Ulrich Müller2017-02-131-21/+2
| | | | The function is not used by any ebuild.
* flag-o-matic.eclass: whitelist -fstack-check #607710Mike Frysinger2017-02-091-1/+1
|
* flag-o-matic.eclass: handle gcc-6 -no-pie option #596584Mike Frysinger2016-11-111-2/+11
| | | | Reported-by: Laine Gholson <laine.gholson@gmail.com>
* flag-o-matic.eclass: Add -fplugin* (bug #519462).Ryan Hill2016-06-301-1/+1
|
* flag-o-matic.eclass: Add -mthumb/-marm (bug #586846).Ryan Hill2016-06-301-1/+1
|
* flag-o-matic.eclass: setup-allowed-flags: add -mno-hle #573454Mike Frysinger2016-02-011-1/+1
|
* flag-o-matic.eclass: all-flag-vars: rewrite to use bash arraysMike Frysinger2015-09-011-41/+44
| | | | This makes quoting much saner.
* flag-o-matic.eclass: all-flag-vars allow all -fsanitize* flags #553716Hanno Boeck2015-09-011-1/+1
| | | | | | This fixes handling of -fsanitize=foo flags, as well as supporting flags like -fsanitize-foo-bar. Since gcc seems to be using that namespace for all these settings, allow them all.
* proj/gentoo: Initial commitRobin H. Johnson2015-08-081-0/+673
This commit represents a new era for Gentoo: Storing the gentoo-x86 tree in Git, as converted from CVS. This commit is the start of the NEW history. Any historical data is intended to be grafted onto this point. Creation process: 1. Take final CVS checkout snapshot 2. Remove ALL ChangeLog* files 3. Transform all Manifests to thin 4. Remove empty Manifests 5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$ 5.1. Do not touch files with -kb/-ko keyword flags. Signed-off-by: Robin H. Johnson <robbat2@gentoo.org> X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed