Re: [poky] Changing the Prefix of a Yocto-Generated Toolchain

Khem Raj <[email protected]>
Newsgroups org.yoctoproject.lists.poky
Message-ID <CAMKF1sqycQZ=h1i7SRjv5rQTEgV=5SNb-LGRhTzgBvRvwteFsA@mail.gmail.com>
On Wed, Jun 19, 2024 at 2:27 AM Nicolas Wirth via
lists.yoctoproject.org
<[email protected]> wrote:
>
> Hi everyone,
>
> I would like to change my toolchain prefix. Currently, it is defined as "aarch64-poky-linux-"gcc/g++/ar...
> Is it possible to change it to "nicolas-"gcc/g++/ar...?
>

Well, Usually distro's insert their identify via setting TARGET_VENDOR
and let the build system compose the tuples
and those tuples are represented by ${TARGET|HOST|BUILD}_SYS which are
then used to componse equivalent _PREFIX variables.
for cross tools like gcc etc. not only target but host prefix is also
important. So if you override just target it still uses a mismatched
tuple and hence the errors you are seeing. I wonder if you override
TARGET_SYS and HOST_SYS it might make you go further.

> By reading the documentation, I was under the impression that changing the TARGET_PREFIX variable would achieve this. However, I end up with a cryptic error message that ends like this:
>
> | libtool: link: g++   -fPIC -DPIC -shared -nostdlib /usr/lib/gcc/x86_64-linux-gnu/11/../../../x86_64-linux-gnu/crti.o /usr/lib/gcc/x86_64-linux-gnu/11/crtbeginS.o  .libs/libcp1plugin.o .libs/callbacks.o .libs/connection.o .libs/marshall.o   -L/workdir/yocto/builds/myimage/work/x86_64-linux/gcc-cross-aarch64/11.2.0-r0/recipe-sysroot-native/usr/lib -L/workdir/yocto/builds/myimage/work/x86_64-linux/gcc-cross-aarch64/11.2.0-r0/recipe-sysroot-native/lib -L/usr/lib/gcc/x86_64-linux-gnu/11 -L/usr/lib/gcc/x86_64-linux-gnu/11/../../../x86_64-linux-gnu -L/usr/lib/gcc/x86_64-linux-gnu/11/../../../../lib -L/lib/x86_64-linux-gnu -L/lib/../lib -L/usr/lib/x86_64-linux-gnu -L/usr/lib/../lib -L/usr/lib/gcc/x86_64-linux-gnu/11/../../.. -lstdc++ -lm -lc -lgcc_s /usr/lib/gcc/x86_64-linux-gnu/11/crtendS.o /usr/lib/gcc/x86_64-linux-gnu/11/../../../x86_64-linux-gnu/crtn.o  -static-libstdc++ -static-libgcc -Wl,--enable-new-dtags -Wl,-rpath-link -Wl,/workdir/yocto/builds/myimage/work/x86_64-linux/gcc-cross-aarch64/11.2.0-r0/recipe-sysroot-native/usr/lib -Wl,-rpath-link -Wl,/workdir/yocto/builds/myimage/work/x86_64-linux/gcc-cross-aarch64/11.2.0-r0/recipe-sysroot-native/lib -Wl,-rpath -Wl,/workdir/yocto/builds/myimage/work/x86_64-linux/gcc-cross-aarch64/11.2.0-r0/recipe-sysroot-native/usr/lib -Wl,-rpath -Wl,/workdir/yocto/builds/myimage/work/x86_64-linux/gcc-cross-aarch64/11.2.0-r0/recipe-sysroot-native/lib -Wl,-O1 -Wl,--allow-shlib-undefined -Wl,--dynamic-linker=/workdir/yocto/builds/myimage/sysroots-uninative/x86_64-linux/lib/ld-linux-x86-64.so.2 ../libiberty/pic/libiberty.a   -Wl,-soname -Wl,libcp1plugin.so.0 -Wl,-retain-symbols-file -Wl,../../../../../../../work-shared/gcc-11.2.0-r0/gcc-11.2.0/libcc1/libcp1plugin.sym -o .libs/libcp1plugin.so.0.0.0
> | libtool: link: (cd ".libs" && rm -f "libcp1plugin.so.0" && ln -s "libcp1plugin.so.0.0.0" "libcp1plugin.so.0")
> | libtool: link: (cd ".libs" && rm -f "libcp1plugin.so" && ln -s "libcp1plugin.so.0.0.0" "libcp1plugin.so")
> | libtool: link: ( cd ".libs" && rm -f "libcp1plugin.la" && ln -s "../libcp1plugin.la" "libcp1plugin.la" )
> | make[2]: Leaving directory '/workdir/yocto/builds/myimage/work/x86_64-linux/gcc-cross-aarch64/11.2.0-r0/gcc-11.2.0/build.x86_64-linux.aarch64-poky-linux/libcc1'
> | make[1]: Leaving directory '/workdir/yocto/builds/myimage/work/x86_64-linux/gcc-cross-aarch64/11.2.0-r0/gcc-11.2.0/build.x86_64-linux.aarch64-poky-linux/libcc1'
> | ERROR: oe_runmake failed
> | WARNING: exit code 1 from a shell command.
> ERROR: Task (/workdir/yocto/src/poky/meta/recipes-devtools/gcc/gcc-cross_11.2.bb:do_compile) failed with exit code '1'
> NOTE: Tasks Summary: Attempted 3649 tasks of which 2744 didn't need to be rerun and 1 failed.
> NOTE: Writing buildhistory
>
> NOTE: Writing buildhistory took: 2 seconds
>
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#13381): https://lists.yoctoproject.org/g/poky/message/13381
> Mute This Topic: https://lists.yoctoproject.org/mt/106757265/1997914
> Group Owner: [email protected]
> Unsubscribe: https://lists.yoctoproject.org/g/poky/unsub [[email protected]]
> -=-=-=-=-=-=-=-=-=-=-=-
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.