Fine granularity of control over libgcc* search paths

Kai Ruottu kai.ruottu@wippies.com
Sun Nov 12 19:37:06 GMT 2023


Kai Ruottu kirjoitti 12.11.2023 klo 21.29:
> R jd via Gcc-help kirjoitti 8.11.2023 klo 2.20:
>> I have tried for some hours to figure out how to get full control 
>> over the
>> paths that are implicitly searched for *libgcc.a*.
>
> This reply isn't directly related to your problem but related to 
> finding the right shared libgcc's in cross-compilers.
>
> I mean the peculiarity seen in the following :
>
Let's try again this copy & paste :

[kairuottu@fedora test]$ powerpc64-centos-linux7.9-gcc-13 -o 
hello_world_powerc64 hello_world.c
[kairuottu@fedora test]$ powerpc64-centos-linux7.9-gcc-14 -o 
hello_world_powerc64 hello_world.c
/opt/cross64/bin/../lib/gcc/powerpc64-centos-linux7.9/14.0.0/../../../../powerpc64-centos-linux7.9/bin/ld: 
cannot find -lgcc_s
collect2: error: ld returned 1 exit status
[kairuottu@fedora test]$ cd /opt/cross/lib/gcc/powerpc64-centos-linux7.9
[kairuottu@fedora powerpc64-centos-linux7.9]$ ls -l -t
yhteensä 56
drwxr-xr-x. 7 root root 4096 12.11. 19:52 14.0.0
drwxr-xr-x. 2 root root 4096 12.11. 19:51 lib
drwxr-xr-x. 2 root root 4096 12.11. 19:51 lib64
drwxr-xr-x. 7 root root 4096  1. 8. 23:53 13.2.0
drwxr-xr-x. 7 root root 4096 10. 7. 15:47 10.5.0
drwxr-xr-x. 7 root root 4096  2. 6. 19:11 11.4.0
drwxr-xr-x. 7 root root 4096 12. 5.  2023 12.3.0
drwxr-xr-x. 7 root root 4096 11. 5.  2023 9.5.0
drwxr-xr-x. 7 root root 4096 11. 5.  2023 8.5.0
drwxr-xr-x. 7 root root 4096 11. 5.  2023 7.5.0
drwxr-xr-x. 7 root root 4096 11. 5.  2023 6.5.0
drwxr-xr-x. 8 root root 4096 11. 5.  2023 4.9.4
drwxr-xr-x. 8 root root 4096 11. 5.  2023 5.5.0
drwxr-xr-x. 8 root root 4096 10. 5.  2023 4.8.5
[kairuottu@fedora powerpc64-centos-linux7.9]$ ls lib*
lib:
libgcc_s.so  libgcc_s.so.1

lib64:
libgcc_s.so  libgcc_s.so.1



More information about the Gcc-help mailing list