View previous topic :: View next topic |
Author |
Message |
jgeiss66 n00b
Joined: 18 Aug 2009 Posts: 6 Location: Germany/Altötting
|
Posted: Fri Oct 08, 2021 6:29 am Post subject: [SOLVED] Cross-emerge: Is it possible to use an own made gcc |
|
|
Crossdev and Portage builds compiler and packages in a /usr/CHOST target directory.
Different cross compiler versions can be selected by gcc-config. So far, so good.
But: Is it possible to tell Portage to use an own made cross compiler/linker, which is installed in e. g. /usr/local/ or /opt?
Maybe a cross compiler build bay crosstool-ng or yocto?
Last edited by jgeiss66 on Mon Oct 18, 2021 10:22 am; edited 1 time in total |
|
Back to top |
|
|
turtles Veteran
Joined: 31 Dec 2004 Posts: 1655
|
Posted: Mon Oct 11, 2021 9:32 pm Post subject: Re: Cross-emerge: Is it possible to use an own made gcc? |
|
|
jgeiss66 wrote: | Crossdev and Portage builds compiler and packages in a /usr/CHOST target directory.
Different cross compiler versions can be selected by gcc-config. So far, so good.
But: Is it possible to tell Portage to use an own made cross compiler/linker, which is installed in e. g. /usr/local/ or /opt?
Maybe a cross compiler build bay crosstool-ng or yocto? |
jgeiss66 tell us more about what your trying to do.
have you tried out sys-devel/crossdev ?
https://wiki.gentoo.org/wiki/Cross_build_environment _________________ Donate to Gentoo |
|
Back to top |
|
|
jgeiss66 n00b
Joined: 18 Aug 2009 Posts: 6 Location: Germany/Altötting
|
Posted: Fri Oct 15, 2021 12:31 pm Post subject: Re: Cross-emerge: Is it possible to use an own made gcc? |
|
|
Yes, thanks, I know crossdev and I am working quite a lot with it.
My special care is, though, different. Some customers give their toolchain, which is made by Yocto, Crosstool-NG, or other and it can be installed in e. g. /opt. It would be nice if Portage could use his toolchain to build a small system, as usual, in /usr/TARGET. |
|
Back to top |
|
|
Hu Moderator
Joined: 06 Mar 2007 Posts: 21624
|
Posted: Fri Oct 15, 2021 3:39 pm Post subject: |
|
|
Is the cross-compiler in $PATH, and given a standard $CHOST-based name? If so, then regular Portage cross-emerge support should find it and use it without any special overrides. |
|
Back to top |
|
|
jgeiss66 n00b
Joined: 18 Aug 2009 Posts: 6 Location: Germany/Altötting
|
Posted: Mon Oct 18, 2021 7:41 am Post subject: [SOLVED] Cross-emerge: Is it possible to use an own made gcc |
|
|
Hu wrote: | Is the cross-compiler in $PATH, and given a standard $CHOST-based name? If so, then regular Portage cross-emerge support should find it and use it without any special overrides. |
Yes, is works. I didn't thought of that.
But you have to make some symbolic links first. Emerge changes PATH, so the compiler cannot be found. I did
Code: | crossdev --init-target --stable -oS gentoo -oO /var/db/repos/private-overlay --target arm-poky-linux-gnueabi
cd /opt/bin
for f in /usr/local/poky/sysroots/x86_64-pokysdk-linux/usr/bin/arm-poky-linux-gnueabi/arm-poky-linux-gnueabi.*; do ln -s "$f" .; done
|
After editing /usr/arm-poky-linux-gnueabi/etc/portage/make.conf to meet my needs, I could emerge glibc and busybox.
Code: | arm-poky-linux-gnueabi-emerge -av glibc busybox
|
Thank you very much. I can live with that solution. |
|
Back to top |
|
|
turtles Veteran
Joined: 31 Dec 2004 Posts: 1655
|
Posted: Tue Oct 19, 2021 3:33 am Post subject: |
|
|
Glad we could help?
have you have been using Gentoo since 2009 and have had a total of 5 posts?
Thats kinda amazing.
Cheers _________________ Donate to Gentoo |
|
Back to top |
|
|
jgeiss66 n00b
Joined: 18 Aug 2009 Posts: 6 Location: Germany/Altötting
|
Posted: Fri Oct 22, 2021 3:37 pm Post subject: |
|
|
turtles wrote: | have you have been using Gentoo since 2009 and have had a total of 5 posts?
Thats kinda amazing. |
Yes, I am quite seldom in forums. |
|
Back to top |
|
|
|