Skip to content

Commit d203ad2

Browse files
fanquakebluca
authored andcommitted
problem: using -errwarn on non-Sun systems
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 ```
1 parent de290e9 commit d203ad2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

CMakeLists.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -705,7 +705,7 @@ if(LIBZMQ_WERROR)
705705
zmq_check_cxx_flag_prepend("/WX")
706706
else()
707707
zmq_check_cxx_flag_prepend("-Werror")
708-
if(NOT "${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
708+
if(${CMAKE_CXX_COMPILER_ID} MATCHES "SunPro")
709709
zmq_check_cxx_flag_prepend("-errwarn=%all")
710710
endif()
711711
endif()

0 commit comments

Comments
 (0)