cant you just crosscompile the toolchain to be with --prefix=/usr/idp/ ? and just build all of it that way and its correct.
no, it's not correct. Gentoo forces a toolchain to be segregated in a specific prefix
e.g.
# gcc-config -l
[1] hppa2.0-unknown-linux-gnu-4.1.2
[2] hppa2.0-unknown-linux-gnu-4.2.4
[3] hppa2.0-unknown-linux-gnu-4.4.7
[4] hppa2.0-unknown-linux-gnu-4.9.3
[5] hppa2.0-unknown-linux-gnu-5.4.0
[6] hppa2.0-unknown-linux-gnu-6.4.0
[7] hppa2.0-unknown-linux-gnu-7.3.0 *
[8] hppa64-unknown-linux-gnu-4.9.4
[9] hppa64-unknown-linux-gnu-6.4.0
[10] hppa64-unknown-linux-gnu-7.3.0 *
[11] m68hc11-elf-3.3.6 *
[12] m68k-elf-4.1.2 *
[13] m68k-unknown-linux-gnu-4.1.2 *
[14] mips-unknown-linux-gnu-5.3.0 *
[15] mips64-unknown-linux-gnu-5.3.0 *
[16] powerpc-unknown-linux-gnu-5.3.0 *
it means --prefix is ={ /usr/hppa2.0-unknown-linux-gnu, /usr/hppa64-unknown-linux-gnu, /usr/m68hc11-elf, /usr/m68k-elf, /usr/m68k-unknown-linux-gnu, /usr/mips-unknown-linux-gnu, /usr/mips64-unknown-linux-gnu, /usr/powerpc-unknown-linux-gnu }
unfortunately, this approach depends on
crossdev, which usually profiles for Linux
so these two toolchains need an override patch in order to force crossdev to avoid considering them as "sources" for "cross-emerging" tools
[11] m68hc11-elf-3.3.6 *
[12] m68k-elf-4.1.2 *
anyway, in order to make my life easier, I am considering barebone toolchains as independent things, so they are not handled by
crossdev (which does a great job, but it's too centralized and difficult to be handled when you want something "special")
In my case, --prefix=/usr/idp/ is in use and it
causes collision with some files on different toolchains.
I want everything inside /usr/idp; all goes as it should, except { 68hc11, riscv, etc } with --prefix=/usr/idp/ all collide /usr/idp/share/*.mo files, and this is a problem for the sandbox since a collision is a bad event that makes the install process to fail.
Anyway, I have now hacked the Makefile, removed gdb, and other stuff, and now it's working as it should
I had to
- to create a fake Gdb Makefile, because Gdb tries to compiles things which try to install crap
- to disable nls
- to disable gettext