aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Makefile: drop excessive EPREFIXingv2.7Sam James2022-10-081-1/+0
| | | | | Bug: https://bugs.gentoo.org/875377 Signed-off-by: Sam James <sam@gentoo.org>
* gcc-config: make USE_CC_WRAPPERS=yes to install cc/f77 linksManoj Gupta2020-06-241-0/+3
| | | | | | | | Add USE_CC_WRAPPERS option to control installation of cc/f77 symlinks. This will let packages other than GCC to install 'cc'. Signed-off-by: Manoj Gupta <manojgupta@google.com> Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
* gcc-config: install /usr/bin/c{89,99}, take over from toolchain.eclassSergei Trofimovich2020-06-201-3/+31
| | | | | | Reported-by: Kent Fredric Bug: https://bugs.gentoo.org/728722 Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
* gcc-config: add build-time and runtime switches to disable native symlinksSergei Trofimovich2020-05-221-0/+8
| | | | | | | | | | | We have two knobs here: 1. Build-time knob USE_NATIVE_LINKS to set a default, defaults to 'yes' (existing behaviour) 2. Run-time --enable-native-links / --disable-native-links knobs. These are not persistent across gcc-config runs and are meant for manual testing. Undocumented for now. Reported-by: Kent Fredric Bug: https://bugs.gentoo.org/724454 Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
* Revert "gcc-config: store gcc backup into /lib/gcc-backup, not /lib"Sergei Trofimovich2019-09-071-19/+3
| | | | | | | | | | | | | 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>
* gcc-config: store gcc backup into /lib/gcc-backup, not /libSergei Trofimovich2019-09-071-3/+19
| | | | | | | | | | | | | | | 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>
* Makefile: drop C*FLAGS from Makefile as gcc-wrapper is no moreSergei Trofimovich2019-09-071-4/+0
| | | | | | gcc-config doec not contain C code nowadays. Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
* Makefile: install READMESergei Trofimovich2019-09-071-1/+4
| | | | Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
* Convert binary wrapper to a symlink wrapper.v2.0Sergei Trofimovich2018-08-241-5/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* rename installed binary wrapper from 'gcc-config' to 'wrapper'Sergei Trofimovich2018-08-131-2/+2
| | | | | | | | | | | | | 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>
* gcc.eselect: add an eselect modulev1.9.0Mike Frysinger2015-08-051-1/+4
| | | | | | | | | 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>
* make aware of EPREFIX offset prefixFabian Groffen2013-01-121-1/+6
| | | | | | | | | - 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>
* compile gcc-config into .gcc-config so we can test it properlyMike Frysinger2013-01-021-8/+11
| | | | | | | 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>
* tests: add some!Mike Frysinger2012-03-211-0/+3
| | | | Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* add a makefileMike Frysinger2012-03-201-0/+49
Signed-off-by: Mike Frysinger <vapier@gentoo.org>