public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-dev] New USE=-native-symlinks for gcc-config and binutils-config
@ 2020-05-22 21:36 Sergei Trofimovich
  2020-05-23  6:05 ` Michał Górny
                   ` (2 more replies)
  0 siblings, 3 replies; 15+ messages in thread
From: Sergei Trofimovich @ 2020-05-22 21:36 UTC (permalink / raw
  To: gentoo-dev

'tc-directly' tracker https://bugs.gentoo.org/243502 tracks
packages that don't respect users' CC/AR/LD flags.

I added new USE=-native-symlinks mode for gcc-config and
binutils-config to ease detection of such packages.

Native symlinks are still installed by default. Nothing should
break for users who use default USE flags.

USE=-native-symlinks removes a bunch of links that most packages
use by default until are overridden explicitly. Incomplete list is:
- /lib/cpp
- /usr/bin/{gcc,cc,g++,c++,...}
- /usr/bin/{as,ld,ranlib,dwp,...}

The rule of thumb is: if a tool does not have ${CTARGET}- prefix
it will probably disappear with USE=-native-symlinks.

(At least eventually) 'emerge' should still be able to build most
of packages in such environment. I expect initial breakage will be
huge though.

Using './configure && make && make install' style workflow will be more
tedious. One workaround at least for gcc is to use something like:
    $ PATH="$(gcc-config -B):$PATH"
It's not perfect. We'll see if toolchain can provide nicer environment.

Typical fixes for autoconf style build systems is to use macros like:
- AC_PROG_CC
- AM_PROG_AR
- AC_CHECK_TOOL(DWP, dwp)
and so on to detect tool that corresponds to --host=/--target= flags
and allows user's override via environment variable.

-- 

  Sergei


^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2020-05-24 10:04 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-05-22 21:36 [gentoo-dev] New USE=-native-symlinks for gcc-config and binutils-config Sergei Trofimovich
2020-05-23  6:05 ` Michał Górny
2020-05-23  7:24   ` Sergei Trofimovich
2020-05-24  1:40 ` Pengcheng Xu
2020-05-24  7:55   ` Kent Fredric
2020-05-24 10:04   ` Sergei Trofimovich
2020-05-24  2:41 ` Mike Gilbert
2020-05-24  5:20   ` Joonas Niilola
2020-05-24  6:40     ` Matt Turner
2020-05-24  9:34       ` Sergei Trofimovich
2020-05-24  8:15   ` Kent Fredric
2020-05-24  8:33     ` Michał Górny
2020-05-24  9:15       ` Kent Fredric
2020-05-24  9:48   ` Sergei Trofimovich
2020-05-24 10:00     ` Fabian Groffen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox