Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED] Cross-emerge: Is it possible to use an own made gcc
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
jgeiss66
n00b
n00b


Joined: 18 Aug 2009
Posts: 6
Location: Germany/Altötting

PostPosted: Fri Oct 08, 2021 6:29 am    Post subject: [SOLVED] Cross-emerge: Is it possible to use an own made gcc Reply with quote

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
View user's profile Send private message
turtles
Veteran
Veteran


Joined: 31 Dec 2004
Posts: 1655

PostPosted: Mon Oct 11, 2021 9:32 pm    Post subject: Re: Cross-emerge: Is it possible to use an own made gcc? Reply with quote

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
View user's profile Send private message
jgeiss66
n00b
n00b


Joined: 18 Aug 2009
Posts: 6
Location: Germany/Altötting

PostPosted: Fri Oct 15, 2021 12:31 pm    Post subject: Re: Cross-emerge: Is it possible to use an own made gcc? Reply with quote

turtles wrote:
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


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
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 21624

PostPosted: Fri Oct 15, 2021 3:39 pm    Post subject: Reply with quote

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
View user's profile Send private message
jgeiss66
n00b
n00b


Joined: 18 Aug 2009
Posts: 6
Location: Germany/Altötting

PostPosted: Mon Oct 18, 2021 7:41 am    Post subject: [SOLVED] Cross-emerge: Is it possible to use an own made gcc Reply with quote

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
View user's profile Send private message
turtles
Veteran
Veteran


Joined: 31 Dec 2004
Posts: 1655

PostPosted: Tue Oct 19, 2021 3:33 am    Post subject: Reply with quote

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
View user's profile Send private message
jgeiss66
n00b
n00b


Joined: 18 Aug 2009
Posts: 6
Location: Germany/Altötting

PostPosted: Fri Oct 22, 2021 3:37 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum