Date: Wed, 19 Aug 2020 17:05:30 +0000 (UTC) From: Dimitry Andric <dim@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r364400 - head/lib/clang Message-ID: <202008191705.07JH5U5B008430@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: dim Date: Wed Aug 19 17:05:30 2020 New Revision: 364400 URL: https://svnweb.freebsd.org/changeset/base/364400 Log: Fix the mips64 world build after r364284. Linking the full version of clang 11 results in errors similar to: lld: error: /usr/src/contrib/llvm-project/clang/lib/StaticAnalyzer/Frontend/AnalysisConsumer.cpp:736:(.text._ZN5clang4ento22CreateAnalysisConsumerERNS_16CompilerInstanceE+0xE0): relocation R_MIPS_CALL16 out of range: 48920 is not in [-32768, 32767]; references operator new(unsigned long) Add -mxgot to the compilation flags for llvm libraries to work around this error. This may be too big of a hammer, but it can always be refined later. MFC after: 6 weeks Modified: head/lib/clang/llvm.build.mk Modified: head/lib/clang/llvm.build.mk ============================================================================== --- head/lib/clang/llvm.build.mk Wed Aug 19 16:09:36 2020 (r364399) +++ head/lib/clang/llvm.build.mk Wed Aug 19 17:05:30 2020 (r364400) @@ -106,3 +106,8 @@ CXXSTD?= c++14 CXXFLAGS+= -fno-exceptions CXXFLAGS+= -fno-rtti CXXFLAGS.clang+= -stdlib=libc++ + +.if ${MACHINE_ARCH:Mmips64} +STATIC_CFLAGS+= -mxgot +STATIC_CXXFLAGS+= -mxgot +.endif
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202008191705.07JH5U5B008430>