Skip to content

Commit

Permalink
problem: using -errwarn on non-Sun systems
Browse files Browse the repository at this point in the history
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 use it
(`-e`) as an entrypoint, i.e:
```bash
[ 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
```
  • Loading branch information
fanquake authored and bluca committed Jul 8, 2024
1 parent de290e9 commit d203ad2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -705,7 +705,7 @@ if(LIBZMQ_WERROR)
zmq_check_cxx_flag_prepend("/WX")
else()
zmq_check_cxx_flag_prepend("-Werror")
if(NOT "${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
if(${CMAKE_CXX_COMPILER_ID} MATCHES "SunPro")
zmq_check_cxx_flag_prepend("-errwarn=%all")
endif()
endif()
Expand Down

0 comments on commit d203ad2

Please sign in to comment.