[MacPorts] #37495: ubsan doesn't work with clang 3.2
#37495: ubsan doesn't work with clang 3.2 ------------------------------------+-------------------------------- Reporter: arsenm2@… | Owner: macports-tickets@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.1.2 Keywords: clang,cmake,ubsan,llvm | Port: clang-3.2 ------------------------------------+-------------------------------- If you try to use ubsan with clang, it always fails: $ /opt/local/bin/clang -fsanitize=undefined arst.c Undefined symbols for architecture x86_64: "___ubsan_handle_add_overflow", referenced from: _main in arst-nGlYc7.o ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation) The fix is clang should build should use cmake instead of autotools since it's basically the preferred LLVM build system at this point. http://llvm.org/bugs/show_bug.cgi?id=14341 -- Ticket URL: <https://trac.macports.org/ticket/37495> MacPorts <http://www.macports.org/> Ports system for Mac OS
#37495: ubsan doesn't work with clang 3.2 ------------------------+------------------------ Reporter: arsenm2@… | Owner: jeremyhu@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.1.2 Resolution: | Keywords: Port: clang-3.2 | ------------------------+------------------------ Changes (by macsforever2000@…): * keywords: clang,cmake,ubsan,llvm => * owner: macports-tickets@… => jeremyhu@… Old description:
If you try to use ubsan with clang, it always fails:
$ /opt/local/bin/clang -fsanitize=undefined arst.c Undefined symbols for architecture x86_64: "___ubsan_handle_add_overflow", referenced from: _main in arst-nGlYc7.o ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation)
The fix is clang should build should use cmake instead of autotools since it's basically the preferred LLVM build system at this point.
New description: If you try to use ubsan with clang, it always fails: {{{ $ /opt/local/bin/clang -fsanitize=undefined arst.c Undefined symbols for architecture x86_64: "___ubsan_handle_add_overflow", referenced from: _main in arst-nGlYc7.o ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation) }}} The fix is clang should build should use cmake instead of autotools since it's basically the preferred LLVM build system at this point. http://llvm.org/bugs/show_bug.cgi?id=14341 -- Comment: In the future, please use WikiFormatting and Cc the port maintainer(s). -- Ticket URL: <https://trac.macports.org/ticket/37495#comment:1> MacPorts <http://www.macports.org/> Ports system for Mac OS
#37495: ubsan doesn't work with clang 3.2 ------------------------+------------------------ Reporter: arsenm2@… | Owner: jeremyhu@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.1.2 Resolution: | Keywords: Port: clang-3.2 | ------------------------+------------------------ Comment (by jeremyhu@…): Moving from autotools to cmake as the build system is not exactly the fix. It might fix this as a side effect (I haven't tested), but in itself, that is not the fix. That being said, if you want to provide a patch to get us onto the new build system, I'd certainly appreciate it. -- Ticket URL: <https://trac.macports.org/ticket/37495#comment:2> MacPorts <http://www.macports.org/> Ports system for Mac OS
#37495: ubsan doesn't work with clang 3.2 ------------------------+------------------------ Reporter: arsenm2@… | Owner: jeremyhu@… Type: defect | Status: closed Priority: Normal | Milestone: Component: ports | Version: 2.1.2 Resolution: wontfix | Keywords: Port: clang-3.2 | ------------------------+------------------------ Changes (by jeremyhu@…): * status: new => closed * resolution: => wontfix Comment: Use 3.3 and 3.4: {{{ /opt/local/libexec/llvm-3.3/lib/clang/3.3/lib/darwin/libclang_rt.ubsan_osx.a /opt/local/libexec/llvm-3.4/lib/clang/3.4/lib/darwin/libclang_rt.ubsan_osx.a }}} -- Ticket URL: <https://trac.macports.org/ticket/37495#comment:3> MacPorts <http://www.macports.org/> Ports system for OS X
participants (1)
-
MacPorts