Re: Why does gcc build try to link lpthreads and ldl for x86_64-w64-mingw32 host?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



https://github.com/gcc-mirror/gcc/blob/c18c53db823b22204405e015cbb4d7b039f875c0/gcc/rust/Make-lang.in#L57

I removed -ldl -lpthread in make-lang.in and it compiles. It isn't very clear. I did not enable rust languages in the configure since I do not use rust at all, but why does the grust settings still impact on GCC build?
________________________________
From: pifminns deettnta <tstndeemkssz@xxxxxxxxxxx>
Sent: Monday, August 5, 2024 01:22
To: gcc-help@xxxxxxx <gcc-help@xxxxxxx>
Subject: Re: Why does gcc build try to link lpthreads and ldl for x86_64-w64-mingw32 host?

https://github.com/gcc-mirror/gcc/blob/c18c53db823b22204405e015cbb4d7b039f875c0/configure.ac#L2040C1-L2041C37

I think this is where it is wrong. The detection is just wrong. Threads should not be used at all tbh
________________________________
From: pifminns deettnta <tstndeemkssz@xxxxxxxxxxx>
Sent: Monday, August 5, 2024 01:21
To: gcc-help@xxxxxxx <gcc-help@xxxxxxx>
Subject: Re: Why does gcc build try to link lpthreads and ldl for x86_64-w64-mingw32 host?

https://github.com/gcc-mirror/gcc/blob/c18c53db823b22204405e015cbb4d7b039f875c0/configure.ac#L2040C1-L2041C37
[https://opengraph.githubassets.com/5a037ae09b9742154019cfa6fdbff1950974486fc725268318b703819933f6b5/gcc-mirror/gcc]<https://github.com/gcc-mirror/gcc/blob/c18c53db823b22204405e015cbb4d7b039f875c0/configure.ac#L2040C1-L2041C37>
gcc/configure.ac at c18c53db823b22204405e015cbb4d7b039f875c0 · gcc-mirror/gcc<https://github.com/gcc-mirror/gcc/blob/c18c53db823b22204405e015cbb4d7b039f875c0/configure.ac#L2040C1-L2041C37>
Contribute to gcc-mirror/gcc development by creating an account on GitHub.
github.com

I think this is where it is wrong. The detection is just wrong. The rust people just screwed things up. Threads should not be used tbh

________________________________
From: pifminns deettnta
Sent: Monday, August 5, 2024 00:49
To: gcc-help@xxxxxxx <gcc-help@xxxxxxx>
Subject: Why does gcc build try to link lpthreads and ldl for x86_64-w64-mingw32 host?

Build x86_64-pc-linux-gnu
Host x86_64-w64-mingw32
Target x86_64-generic-linux-gnu

x86_64-w64-mingw32-g++ -no-pie   -g -O2     -DIN_GCC -DCROSS_DIRECTORY_STRUCTURE   -fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wmissing-format-attribute -Wconditionally-supported -Woverloaded-virtual -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings  -DHAVE_CONFIG_H -no-pie -static-libstdc++ -static-libgcc -Wl,--stack,12582912 gcov.o json.o \
      hash-table.o ggc-none.o libcommon.a ../libcpp/libcpp.a   ../libbacktrace/.libs/libbacktrace.a ../libiberty/libiberty.a ../libdecnumber/libdecnumber.a  -ldl -lpthread -L./../zlib -lz -o gcov.exe
/home/toolchains/x86_64-generic-linux-gnu/x86_64-w64-mingw32/lib/gcc/x86_64-w64-mingw32/15.0.0/../../../../x86_64-w64-mingw32/bin/ld: cannot find -ldl: No such file or directory
/home/toolchains/x86_64-generic-linux-gnu/x86_64-w64-mingw32/lib/gcc/x86_64-w64-mingw32/15.0.0/../../../../x86_64-w64-mingw32/bin/ld: cannot find -lpthread: No such file or directory
collect2: error: ld returned 1 exit status
make[2]: *** [Makefile:3293: gcov.exe] Error 1
make[2]: *** Waiting for unfinished jobs....




[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux