| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Before the change gcc version orderig was relying on bash sorting
in flob matches, like:
cat /etc/env.d/gcc/${CHOST}-* | fgrep LDPATH | tail -n 1
This stopped working with gcc-10, which lexicographically goes
before gcc-9.
The workaround for now is to normalizeversions to fixed-width
and order them lexicographically:
gcc-0009
gcc-0010
Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
|
|
|
|
|
| |
Bug: https://bugs.gentoo.org/174422
Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
|
|
|
|
|
|
|
|
|
|
|
| |
Profile files created by toolchain.eclass before gentoo commit 534e0f7d5e8a02264b7b7fc97c3ef11441e35c5c
contain assignment of PATH variable (e.g. PATH="/usr/x86_64-pc-linux-gnu/gcc-bin/9.2.0").
Sourcing them without restoring previous PATH value breaks gcc-config.
Fixes: 231bc60d6fa6b8eb309ac2ca308f7c60213f81a3
Bug: https://bugs.gentoo.org/174422
Signed-off-by: Arfrever Frehtes Taifersar Arahesis <Arfrever@Apache.Org>
Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This reverts commit 44570a44be60a8fc33bd05089047c1f2980b3047.
Unfortunately ld.so does has static set of fallback paths
when it fails to lookup shared library from ld.so.cache:
those are /lib64 and /usr/lib64 on amd64.
Let's revert the change and jkeep relying on /lib64 for now.
Bug: https://bugs.gentoo.org/667020
Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
|
|
|
|
| |
Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Writing (and removing) libraries to /lib outside package manager
was a surprise to users in bug #667020# where libunwind.so was
clobbered by gcc-config runs.
This change isolates all logic that handles file copies
outside package manager into /lib/gcc-backup directory.
To make new library still resolveable we install env.d entry
with contents of
LDPATH="/lib/gcc-backup"
Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
|
|
|
|
|
|
| |
gcc-config doec not contain C code nowadays.
Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
|
|
|
|
| |
Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
|
|
|
|
| |
Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
|
|
|
|
|
|
|
| |
Thesse files are generated for cross-gcc only. Were empty
since Aug 2018.
Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
|
|
|
|
|
|
| |
As gcc-wrapper is gone nothing should use it anymore.
Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
|
|
|
|
|
|
|
| |
Noticed when ran 'make check':
* Running source/test.sed ... due to log difference; see tests/source/test.sed.log [ !! ]
Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
|
|
|
|
|
|
|
| |
/etc/env.d/gcc/config migraion was enabled 7 years ago.
Let's assume everyone migrated by now.
Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
|
|
|
|
| |
Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
|
|
|
|
| |
Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
|
|
|
|
|
|
| |
Closes: https://bugs.gentoo.org/693588
Signed-off-by: Arfrever Frehtes Taifersar Arahesis <Arfrever@Apache.Org>
Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
|
|
|
|
| |
Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
toolchain.eclass constructs correct GCC_PATH since 2007:
commit 7d9f89700a2ee50674c0d871ec6d21b468ac6206
("start moving to GCC_PATH for env.d #174422 and cleanup "
"gcc-config logic so that it doesnt matter what the ROOT value is")
We don't need to rewrite /etc/env.d/gcc/<TARGET>-<VER>
files anymore (owned by gcc ebuilds).
Bug: https://bugs.gentoo.org/174422
Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
|
|
|
|
| |
Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
|
|
|
|
| |
Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
|
|
|
|
|
|
|
|
|
|
|
|
| |
other files matching libunwind.so*.
libunwind.so belongs to sys-libs/libunwind.
libunwind.so.7* is copied by gcc-config (only on ia64) from active version of sys-devel/gcc.
libunwind.so.8* belong to sys-libs/libunwind since 1.0.1 version released on 2011-09-11.
[slyfox@: sumplified 'return' statement]
Bug: https://bugs.gentoo.org/667020
Signed-off-by: Arfrever Frehtes Taifersar Arahesis <Arfrever@Apache.Org>
|
|
|
|
|
|
| |
Bug: https://bugs.gentoo.org/667020
Bug: https://bugs.gentoo.org/693252
Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
|
|
|
|
|
|
|
|
| |
Patch by [Arfrever]. No changes in actual handling of
/lib*/ file on non-prefix systems yet.
Bug: https://bugs.gentoo.org/667020
Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Before the change:
/usr/bin/gcc and friends were a copy of /usr/$(libexecdir)/misc/gcc-config
After the change:
/usr/bin/gcc is a symlink to a real compiler binary. Examples:
/usr/${CTARGET}/gcc-bin/${GCC_VER}/gcc (native)
/usr/${CHOST}/${CTARGET}/gcc-bin/${GCC_VER}/gcc (cross)
gcc-config is a binary wrapper that does (or did) a few things:
- [removed in 2011] injects additional CFLAGS_${ABI}
Removed in commit 7ac40f3eb8434961f70485247d883f5b3009dcf2
"Stop auto appending CFLAGS_<abi> from the env."
- traverses PATH for real compiler binary and reexecutes it.
- reads /etc/env.d/05gcc-${CTARGET} as a fallback if PATH is empty.
Today binary wrapper does only PATH resolution and re-execution.
This change has a few minor benefits:
- PATH will not contain explicit /usr/${CHOST}/${CTARGET}/gcc-bin/${GCC_VER}
entry. This will make PATH shorter for those who have mavy cross-compilers
installed.
- compiler switch will not require sourcing '. /etc/profile' as changes are
applied as soon an symlink is switched.
- ccache will see gcc binary changes directly and react accordingly.
Previously in default configuration ccache cache depended on state of
/usr/$(libexecdir)/misc/gcc-config
See bug #640958 where ccache did not notice USE=-pie -> USE=pie switch.
- Reasoning about PATH ordering is straightforward: all available binaries
(as symlinks) are in /usr/bin.
See bug #255695 where PATH ordering changed and bug #626606 where
people get confused on what is in /usr/bin/gcc binary.
Bug: https://bugs.gentoo.org/626606
Bug: https://bugs.gentoo.org/255695
Bug: https://bugs.gentoo.org/640958
Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
|
|
|
|
| |
Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
|
|
|
|
|
|
| |
Noticed by [Arfrever].
Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
|
|
|
|
| |
Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
|
|
|
|
|
|
|
| |
Fix tests to follow commit 39af3214ed29d9a3ca867988f7f2f3b995cafd66
("rename installed binary wrapper from 'gcc-config' to 'wrapper'")
Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Before the change installed directory was:
/usr/$(libexecdir)/misc/gcc-config
/usr/bin/gcc-config
After the change:
/usr/$(libexecdir)/gcc-config/wrapper
/usr/bin/gcc-config
Should decrease confusion between a script and wrapper binary.
Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
|
|
|
|
|
|
|
|
|
|
| |
Before the change 3 tests failed due to extra output
about switching to LTO plugin:
* Running rw-multi-native-configs/test.use-old ... due to log difference; see .../TMP-test.use-old-rw-multi-native-configs/test.use-old.log [ !! ]
* Running rw-multi-native-configs/test.select-insane ... due to log difference; see .../TMP-test.select-insane-rw-multi-native-configs/test.select-insane.log [ !! ]
* Running rw-multi-native-configs/test.select ... due to log difference; see .../TMP-test.select-rw-multi-native-configs/test.select.log [ !! ]
Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
|
|
|
|
| |
Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
|
|
|
|
|
|
|
|
|
|
| |
Before the change the warning was:
wrapper.c: In function 'main':
wrapper.c:281:14: warning: unused parameter 'argc' [-Wunused-parameter]
int main(int argc, char *argv[])
~~~~^~~~
Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
|
| |
|
|
|
|
|
|
|
|
| |
Since Binutils 2.25, automatic loading of LTO plugins is supported from
binutils, but the LTO plugins must be in the bfd-plugins directory in
order to be found. This patches gcc-config to automatically do this.
Signed-off-by: Shane Peelar <lookatyouhacker@gmail.com>
|
|
|
|
|
|
|
|
|
| |
The intention of commit cfbb9e94ca23c360d5801946e39da29c7d422dfc was to
disable running ldconfig and updating ld.so.conf for prefix, but the
implementation was too greedy and also disabled env-update, which we
need to activate a compiler, see bug #641096.
Bug: https://bugs.gentoo.org/641096
|
|
|
|
|
|
|
|
|
| |
This wraps gcc-config so that people can use the standard eselect
interface to manage gcc profiles.
URL: https://bugs.gentoo.org/507870
Reported-by: Ulrich Müller <ulm@gentoo.org>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
|
|
|
|
| |
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
|
|
|
|
|
|
| |
URL: https://bugs.gentoo.org/504118
Signed-off-by: Ryan Hill <rhill@gentoo.org>
Signed-off-by: Lars Wendler <polynomial-c@gentoo.org>
|
|
|
|
|
|
|
|
|
|
| |
The amount of whitespace output by ebegin/eend from gentoo-functions
is dynamic (seems to be dependent on terminal width). Since we can't
predict this we have to ignore all whitespace differences.
URL: https://bugs.gentoo.org/547586
Reported-by: tka <tka@kamph.org>
Signed-off-by: Ryan Hill <rhill@gentoo.org>
|
|
|
|
|
|
|
|
| |
We use stat(), so make sure we use the 64bit versions, else trying
to stat() a file with 64bit inodes will randomly fail on us.
URL: http://bugs.gentoo.org/471024
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
|
|
|
|
|
|
|
|
| |
In Prefix we're unprivileged (most likely) so don't bother trying to
update ld.so.conf or anything like that.
Signed-off-by: Fabian Groffen <grobian@gentoo.org>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Because Prefix doesn't have ld.so.conf magic in place (either because it
doesn't exist, or because we don't have the privileges to touch it), we
need to ensure that GCC's libs can be found at runtime. To do so, we
use a special dir in which we stack all GCC's libs per version. This
dir is in RPATH (or equivalent), such that applications and libraries
can find their libgcc_s.so.1 (needed on Solaris) or libstdc++.so.6, or
libgomp.so, ... etc.
Signed-off-by: Fabian Groffen <grobian@gentoo.org>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
|
|
|
|
|
|
|
| |
Cleanup lib/libgcc_s{.1,_ppc,...}.dylib for Darwin hosts.
Signed-off-by: Fabian Groffen <grobian@gentoo.org>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
|
|
|
|
|
|
|
|
|
| |
- changed Makefile to expand @GENTOO_EPREFIX@ for gcc-config
- defined EPREFIX and EROOT in gcc-config, and used them
- made wrapper look in the offset for files
Signed-off-by: Fabian Groffen <grobian@gentoo.org>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
|
|
|
|
|
|
|
|
|
|
|
| |
Don't consider linking, even if /usr would be split, on Prefix. Do
cleanup from older gcc-config though. This leaves a gap where we don't
cleanup if the Prefix install uses a different filesystem for its /usr,
but that should be pretty rare, non-standard and utterly weird, so we
don't care.
Signed-off-by: Fabian Groffen <grobian@gentoo.org>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
|
|
|
|
|
|
|
| |
Otherwise, it means we can't sed certain values in a way which we
then attempt to test. e.g. EPREFIX.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When we added this logic, Gentoo/prefix wasn't a standard setup. Now that
we do have Gentoo/prefix, there's no reason to special case Solaris as this
path won't be an issue (as prefix systems don't write to /lib/).
If someone really cares about using portage in a non-prefix setup, we can
talk about how best to support things then. But this issue isn't Solaris
specific, so we shouldn't have that tuple hardcoded.
URL: http://bugs.gentoo.org/79964
Reported-by: Fabian Groffen <grobian@gentoo.org>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
|
|
|
|
| |
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
|
|
|
|
| |
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
|
|
|
|
| |
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
|