It is said that I have to source the environment to use the toolchain.
After sourcing the environment,compilation success.
I wonder if I can compile and link files without sourcing it.The same parameters.
Even more problems if using ld directly.
Can anyone tell me how to use the toolchain without sourcing the environment?Thanks in advance for any help.
I didn't reproduce your problem without sourcing the file environment-setup-ppce500v2-fsl-linux-gnuspe.
Please refer to the following, there is no problem in compiling and linking.
$ /opt/fsl-networking/QorIQ-SDK-V1.8/sysroots/x86_64-fslsdk-linux/usr/bin/powerpc-fsl-linux-gnuspe/powerpc-fsl-linux-gnuspe-gcc -m32 -mcpu=8548 -mabi=spe -mspe -mfloat-gprs=double --sysroot="/opt/fsl-networking/QorIQ-SDK-V1.8/sysroots/ppce500v2-fsl-linux-gnuspe" test.c -o test.out
$ cat test.c
#include <stdio.h>
void main()
{
printf("test");
}
Anyway, I still suggest you use the standalone toolchain as the following.
$ source /opt/fsl-networking/QorIQ-SDK-V1.8/environment-setup-ppce500v2-fsl-linux-gnuspe
$ ${CC} test.c -o test.out
Have a great day,
Yiping
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
I can reproduce your problem in a clean machine, you could overcome this problem after exporting PATH value.
$export PATH=/opt/fsl-networking/QorIQ-SDK-V1.8/sysroots/i686-fslsdk-linux/usr/bin:/opt/fsl-networking/QorIQ-SDK-V1.8/sysroots/i686-fslsdk-linux/usr/bin/powerpc-fsl-linux-gnuspe:$PATH
Have a great day,
Yiping
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------