[PATCH] D43080: Adding Msan support to FreeBSD

Kamil Rytarowski via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Feb 9 14:26:15 PST 2018


krytarowski added inline comments.


================
Comment at: lib/msan/CMakeLists.txt:21
 append_rtti_flag(OFF MSAN_RTL_CFLAGS)
-append_list_if(COMPILER_RT_HAS_FPIE_FLAG -fPIE MSAN_RTL_CFLAGS)
+if(NOT CMAKE_SYSTEM_NAME MATCHES "FreeBSD")
+  append_list_if(COMPILER_RT_HAS_FPIE_FLAG -fPIE MSAN_RTL_CFLAGS)
----------------
devnexen wrote:
> krytarowski wrote:
> > krytarowski wrote:
> > > devnexen wrote:
> > > > krytarowski wrote:
> > > > > Why pie?
> > > > I think it is for performance reason PIE had been added ? Unfortunately the binaries does not build under FreeBSD with both PIC and PIE.
> > > pie usually has performance overhead
> > We embed initial-exec in the code, please audit the ifdefs whether it's added for FreeBSD.
> It seems in first glance but maybe I miss a part or two.
I suspect that we are papering over something. Can you point what demands this?


================
Comment at: lib/msan/CMakeLists.txt:23
+if(NOT CMAKE_SYSTEM_NAME MATCHES "FreeBSD")
+  append_list_if(COMPILER_RT_HAS_FPIE_FLAG -fPIE MSAN_RTL_CFLAGS)
+endif()
----------------
Does FreeBSD build only for PIE nowadays? If so, this flag could be passed to clang frontend, unless it's already there.


================
Comment at: test/msan/dtls_test.c:9
+
+   UNSUPPORTED: freebsd
 */
----------------
krytarowski wrote:
> dtls should be supported by FreeBSD
I confess that I have not finished it for NetBSD so far. We support it in NetBSD only for the static main program thread.

The current code for dtls is GLIBC-centric.

Marking it with XFAIL is fine.


Repository:
  rCRT Compiler Runtime

https://reviews.llvm.org/D43080





More information about the llvm-commits mailing list