zeromq / libzmq

ZeroMQ core engine in C++, implements ZMTP/3.1
https://www.zeromq.org
Mozilla Public License 2.0
9.53k stars 2.34k forks source link

problem: using `-errwarn` on non-Sun systems #4699

Closed fanquake closed 3 weeks ago

fanquake commented 3 weeks ago

solution: only use -errwarn on SunPro systems

For example, using Clang on Alpine, this just results in build spam, and the option is incorrectly passed through to ld, which trys to use it (-e) as an entrypoint, i.e:

cmake -B build -DLIBZMQ_WERROR=ON
...
[ 28%] Building CXX object CMakeFiles/local_lat.dir/perf/local_lat.cpp.o
clang++: warning: -e rrwarn=%all: 'linker' input unused [-Wunused-command-line-argument]
[ 29%] Linking CXX executable bin/local_lat
/usr/bin/ld: warning: cannot find entry symbol rrwarn=%all; defaulting to 0000000000000cf0
[ 29%] Built target local_lat