[PATCH] D102453: [CMake][ELF] Add -fno-semantic-interposition for GCC and Clang>=13
Fangrui Song via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sat Jun 26 16:51:48 PDT 2021
MaskRay added a comment.
In D102453#2842233 <https://reviews.llvm.org/D102453#2842233>, @tambre wrote:
> Compiling Polly with ThinLTO in either Release or RelWithDebInfo fails after this with relocation errors:
>
> root at xinux:/opt/deb/llvm/build# rm -r * .*
> root at xinux:/opt/deb/llvm/build# cmake ../llvm -GNinja \
> -DCMAKE_BUILD_TYPE=Release \
> -DLLVM_ENABLE_PROJECTS="polly" \
> -DLLVM_ENABLE_LTO=Thin && ninja LLVMPolly.so
> -- The C compiler identification is Clang 13.0.0
> -- The CXX compiler identification is Clang 13.0.0
> -- The ASM compiler identification is Clang
> -- Found assembler: /usr/bin/clang
> -- Detecting C compiler ABI info
> -- Detecting C compiler ABI info - done
> -- Check for working C compiler: /usr/bin/clang - skipped
> -- Detecting C compile features
> -- Detecting C compile features - done
> -- Detecting CXX compiler ABI info
> -- Detecting CXX compiler ABI info - done
> -- Check for working CXX compiler: /usr/bin/clang++ - skipped
> -- Detecting CXX compile features
> -- Detecting CXX compile features - done
> -- clang project is disabled
> -- clang-tools-extra project is disabled
> -- compiler-rt project is disabled
> -- debuginfo-tests project is disabled
> -- libc project is disabled
> -- libclc project is disabled
> -- libcxx project is disabled
> -- libcxxabi project is disabled
> -- libunwind project is disabled
> -- lld project is disabled
> -- lldb project is disabled
> -- mlir project is disabled
> -- openmp project is disabled
> -- parallel-libs project is disabled
> -- polly project is enabled
> -- pstl project is disabled
> -- flang project is disabled
> -- Performing Test LLVM_LIBSTDCXX_MIN
> -- Performing Test LLVM_LIBSTDCXX_MIN - Success
> -- Performing Test LLVM_LIBSTDCXX_SOFT_ERROR
> -- Performing Test LLVM_LIBSTDCXX_SOFT_ERROR - Success
> -- Looking for dlfcn.h
> -- Looking for dlfcn.h - found
> -- Looking for errno.h
> -- Looking for errno.h - found
> -- Looking for fcntl.h
> -- Looking for fcntl.h - found
> -- Looking for link.h
> -- Looking for link.h - found
> -- Looking for malloc/malloc.h
> -- Looking for malloc/malloc.h - not found
> -- Looking for pthread.h
> -- Looking for pthread.h - found
> -- Looking for signal.h
> -- Looking for signal.h - found
> -- Looking for sys/ioctl.h
> -- Looking for sys/ioctl.h - found
> -- Looking for sys/mman.h
> -- Looking for sys/mman.h - found
> -- Looking for sys/param.h
> -- Looking for sys/param.h - found
> -- Looking for sys/resource.h
> -- Looking for sys/resource.h - found
> -- Looking for sys/stat.h
> -- Looking for sys/stat.h - found
> -- Looking for sys/time.h
> -- Looking for sys/time.h - found
> -- Looking for sys/types.h
> -- Looking for sys/types.h - found
> -- Looking for sysexits.h
> -- Looking for sysexits.h - found
> -- Looking for termios.h
> -- Looking for termios.h - found
> -- Looking for unistd.h
> -- Looking for unistd.h - found
> -- Looking for valgrind/valgrind.h
> -- Looking for valgrind/valgrind.h - not found
> -- Looking for fenv.h
> -- Looking for fenv.h - found
> -- Looking for FE_ALL_EXCEPT
> -- Looking for FE_ALL_EXCEPT - found
> -- Looking for FE_INEXACT
> -- Looking for FE_INEXACT - found
> -- Looking for mach/mach.h
> -- Looking for mach/mach.h - not found
> -- Looking for histedit.h
> -- Looking for histedit.h - found
> -- Looking for CrashReporterClient.h
> -- Looking for CrashReporterClient.h - not found
> -- Looking for linux/magic.h
> -- Looking for linux/magic.h - found
> -- Looking for pthread_create in pthread
> -- Looking for pthread_create in pthread - found
> -- Looking for pthread_getspecific in pthread
> -- Looking for pthread_getspecific in pthread - found
> -- Looking for pthread_rwlock_init in pthread
> -- Looking for pthread_rwlock_init in pthread - found
> -- Looking for pthread_mutex_lock in pthread
> -- Looking for pthread_mutex_lock in pthread - found
> -- Looking for dlopen in dl
> -- Looking for dlopen in dl - found
> -- Looking for clock_gettime in rt
> -- Looking for clock_gettime in rt - found
> -- Looking for pfm_initialize in pfm
> -- Looking for pfm_initialize in pfm - found
> -- Looking for perfmon/perf_event.h
> -- Looking for perfmon/perf_event.h - found
> -- Looking for perfmon/pfmlib.h
> -- Looking for perfmon/pfmlib.h - found
> -- Looking for perfmon/pfmlib_perf_event.h
> -- Looking for perfmon/pfmlib_perf_event.h - found
> -- Performing Test COMPILE_WITH_CYCLES
> -- Performing Test COMPILE_WITH_CYCLES - Success
> -- Looking for pthread.h
> -- Looking for pthread.h - found
> -- Performing Test CMAKE_HAVE_LIBC_PTHREAD
> -- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
> -- Looking for pthread_create in pthreads
> -- Looking for pthread_create in pthreads - not found
> -- Looking for pthread_create in pthread
> -- Looking for pthread_create in pthread - found
> -- Found Threads: TRUE
> -- Found ZLIB: /usr/lib/x86_64-linux-gnu/libz.so (found version "1.2.11")
> -- Looking for compress2
> -- Looking for compress2 - found
> -- Found LibXml2: /usr/lib/x86_64-linux-gnu/libxml2.so (found version "2.9.10")
> -- Looking for xmlReadMemory
> -- Looking for xmlReadMemory - found
> -- Looking for el_init in edit
> -- Looking for el_init in edit - found
> -- Looking for xar_open in xar
> -- Looking for xar_open in xar - not found
> -- Looking for arc4random
> -- Looking for arc4random - not found
> -- Looking for backtrace
> -- Looking for backtrace - found
> -- backtrace facility detected in default set of libraries
> -- Found Backtrace: /usr/include
> -- Performing Test C_SUPPORTS_WERROR_UNGUARDED_AVAILABILITY_NEW
> -- Performing Test C_SUPPORTS_WERROR_UNGUARDED_AVAILABILITY_NEW - Success
> -- Looking for __register_frame
> -- Looking for __register_frame - not found
> -- Looking for __deregister_frame
> -- Looking for __deregister_frame - not found
> -- Looking for _Unwind_Backtrace
> -- Looking for _Unwind_Backtrace - not found
> -- Looking for getpagesize
> -- Looking for getpagesize - found
> -- Looking for sysconf
> -- Looking for sysconf - found
> -- Looking for getrusage
> -- Looking for getrusage - found
> -- Looking for setrlimit
> -- Looking for setrlimit - found
> -- Looking for isatty
> -- Looking for isatty - found
> -- Looking for futimens
> -- Looking for futimens - found
> -- Looking for futimes
> -- Looking for futimes - found
> -- Looking for posix_fallocate
> -- Looking for posix_fallocate - found
> -- Looking for sigaltstack
> -- Looking for sigaltstack - found
> -- Looking for lseek64
> -- Looking for lseek64 - found
> -- Looking for mallctl
> -- Looking for mallctl - not found
> -- Looking for mallinfo
> -- Looking for mallinfo - found
> -- Looking for mallinfo2
> -- Looking for mallinfo2 - not found
> -- Looking for malloc_zone_statistics
> -- Looking for malloc_zone_statistics - not found
> -- Looking for getrlimit
> -- Looking for getrlimit - found
> -- Looking for posix_spawn
> -- Looking for posix_spawn - found
> -- Looking for pread
> -- Looking for pread - found
> -- Looking for sbrk
> -- Looking for sbrk - found
> -- Looking for strerror
> -- Looking for strerror - found
> -- Looking for strerror_r
> -- Looking for strerror_r - found
> -- Looking for strerror_s
> -- Looking for strerror_s - not found
> -- Looking for setenv
> -- Looking for setenv - found
> -- Looking for dlopen
> -- Looking for dlopen - found
> -- Looking for dladdr
> -- Looking for dladdr - not found
> -- Performing Test HAVE_STRUCT_STAT_ST_MTIMESPEC_TV_NSEC
> -- Performing Test HAVE_STRUCT_STAT_ST_MTIMESPEC_TV_NSEC - Failed
> -- Performing Test HAVE_STRUCT_STAT_ST_MTIM_TV_NSEC
> -- Performing Test HAVE_STRUCT_STAT_ST_MTIM_TV_NSEC - Success
> -- Looking for __GLIBC__
> -- Looking for __GLIBC__ - found
> -- Looking for pthread_getname_np
> -- Looking for pthread_getname_np - found
> -- Looking for pthread_setname_np
> -- Looking for pthread_setname_np - found
> -- Looking for proc_pid_rusage
> -- Looking for proc_pid_rusage - not found
> -- Performing Test HAVE_STD_IS_TRIVIALLY_COPYABLE
> -- Performing Test HAVE_STD_IS_TRIVIALLY_COPYABLE - Success
> -- Performing Test HAVE_CXX_ATOMICS_WITHOUT_LIB
> -- Performing Test HAVE_CXX_ATOMICS_WITHOUT_LIB - Success
> -- Performing Test HAVE_CXX_ATOMICS64_WITHOUT_LIB
> -- Performing Test HAVE_CXX_ATOMICS64_WITHOUT_LIB - Success
> -- Performing Test LLVM_HAS_ATOMICS
> -- Performing Test LLVM_HAS_ATOMICS - Success
> -- Performing Test SUPPORTS_VARIADIC_MACROS_FLAG
> -- Performing Test SUPPORTS_VARIADIC_MACROS_FLAG - Success
> -- Performing Test SUPPORTS_GNU_ZERO_VARIADIC_MACRO_ARGUMENTS_FLAG
> -- Performing Test SUPPORTS_GNU_ZERO_VARIADIC_MACRO_ARGUMENTS_FLAG - Success
> -- Native target architecture is X86
> -- Threads enabled.
> -- Doxygen disabled.
> -- Go bindings disabled.
> -- Ninja version: 1.10.1
> -- Found OCaml: /usr/bin/ocamlfind
> -- OCaml bindings disabled, need ctypes >=0.4.
> -- Could NOT find Python module pygments
> -- Could NOT find Python module pygments.lexers.c_cpp
> -- Could NOT find Python module yaml
> -- LLVM host triple: x86_64-unknown-linux-gnu
> -- LLVM default target triple: x86_64-unknown-linux-gnu
> -- ThinLTO provides its own parallel linking - limiting parallel link jobs to 2.
> -- Performing Test C_SUPPORTS_FPIC
> -- Performing Test C_SUPPORTS_FPIC - Success
> -- Performing Test CXX_SUPPORTS_FPIC
> -- Performing Test CXX_SUPPORTS_FPIC - Success
> -- Building with -fPIC
> -- Performing Test C_SUPPORTS_FNO_SEMANTIC_INTERPOSITION
> -- Performing Test C_SUPPORTS_FNO_SEMANTIC_INTERPOSITION - Success
> -- Performing Test CXX_SUPPORTS_FNO_SEMANTIC_INTERPOSITION
> -- Performing Test CXX_SUPPORTS_FNO_SEMANTIC_INTERPOSITION - Success
> -- Performing Test SUPPORTS_FVISIBILITY_INLINES_HIDDEN_FLAG
> -- Performing Test SUPPORTS_FVISIBILITY_INLINES_HIDDEN_FLAG - Success
> -- Performing Test C_SUPPORTS_WERROR_DATE_TIME
> -- Performing Test C_SUPPORTS_WERROR_DATE_TIME - Success
> -- Performing Test CXX_SUPPORTS_WERROR_DATE_TIME
> -- Performing Test CXX_SUPPORTS_WERROR_DATE_TIME - Success
> -- Performing Test CXX_SUPPORTS_WERROR_UNGUARDED_AVAILABILITY_NEW
> -- Performing Test CXX_SUPPORTS_WERROR_UNGUARDED_AVAILABILITY_NEW - Success
> -- Performing Test CXX_SUPPORTS_MISSING_FIELD_INITIALIZERS_FLAG
> -- Performing Test CXX_SUPPORTS_MISSING_FIELD_INITIALIZERS_FLAG - Success
> -- Performing Test C_SUPPORTS_CXX98_COMPAT_EXTRA_SEMI_FLAG
> -- Performing Test C_SUPPORTS_CXX98_COMPAT_EXTRA_SEMI_FLAG - Success
> -- Performing Test CXX_SUPPORTS_CXX98_COMPAT_EXTRA_SEMI_FLAG
> -- Performing Test CXX_SUPPORTS_CXX98_COMPAT_EXTRA_SEMI_FLAG - Success
> -- Performing Test C_SUPPORTS_IMPLICIT_FALLTHROUGH_FLAG
> -- Performing Test C_SUPPORTS_IMPLICIT_FALLTHROUGH_FLAG - Success
> -- Performing Test CXX_SUPPORTS_IMPLICIT_FALLTHROUGH_FLAG
> -- Performing Test CXX_SUPPORTS_IMPLICIT_FALLTHROUGH_FLAG - Success
> -- Performing Test C_SUPPORTS_COVERED_SWITCH_DEFAULT_FLAG
> -- Performing Test C_SUPPORTS_COVERED_SWITCH_DEFAULT_FLAG - Success
> -- Performing Test CXX_SUPPORTS_COVERED_SWITCH_DEFAULT_FLAG
> -- Performing Test CXX_SUPPORTS_COVERED_SWITCH_DEFAULT_FLAG - Success
> -- Performing Test CXX_SUPPORTS_CLASS_MEMACCESS_FLAG
> -- Performing Test CXX_SUPPORTS_CLASS_MEMACCESS_FLAG - Failed
> -- Performing Test CXX_SUPPORTS_NOEXCEPT_TYPE_FLAG
> -- Performing Test CXX_SUPPORTS_NOEXCEPT_TYPE_FLAG - Success
> -- Performing Test CXX_WONT_WARN_ON_FINAL_NONVIRTUALDTOR
> -- Performing Test CXX_WONT_WARN_ON_FINAL_NONVIRTUALDTOR - Success
> -- Performing Test C_SUPPORTS_DELETE_NON_VIRTUAL_DTOR_FLAG
> -- Performing Test C_SUPPORTS_DELETE_NON_VIRTUAL_DTOR_FLAG - Success
> -- Performing Test CXX_SUPPORTS_DELETE_NON_VIRTUAL_DTOR_FLAG
> -- Performing Test CXX_SUPPORTS_DELETE_NON_VIRTUAL_DTOR_FLAG - Success
> -- Performing Test CXX_SUPPORTS_SUGGEST_OVERRIDE_FLAG
> -- Performing Test CXX_SUPPORTS_SUGGEST_OVERRIDE_FLAG - Success
> -- Performing Test CXX_WSUGGEST_OVERRIDE_ALLOWS_ONLY_FINAL
> -- Performing Test CXX_WSUGGEST_OVERRIDE_ALLOWS_ONLY_FINAL - Success
> -- Performing Test C_WCOMMENT_ALLOWS_LINE_WRAP
> -- Performing Test C_WCOMMENT_ALLOWS_LINE_WRAP - Success
> -- Performing Test C_SUPPORTS_STRING_CONVERSION_FLAG
> -- Performing Test C_SUPPORTS_STRING_CONVERSION_FLAG - Success
> -- Performing Test CXX_SUPPORTS_STRING_CONVERSION_FLAG
> -- Performing Test CXX_SUPPORTS_STRING_CONVERSION_FLAG - Success
> -- Performing Test C_SUPPORTS_MISLEADING_INDENTATION_FLAG
> -- Performing Test C_SUPPORTS_MISLEADING_INDENTATION_FLAG - Success
> -- Performing Test CXX_SUPPORTS_MISLEADING_INDENTATION_FLAG
> -- Performing Test CXX_SUPPORTS_MISLEADING_INDENTATION_FLAG - Success
> -- Performing Test LINKER_SUPPORTS_COLOR_DIAGNOSTICS
> -- Performing Test LINKER_SUPPORTS_COLOR_DIAGNOSTICS - Success
> -- Performing Test C_SUPPORTS_FNO_FUNCTION_SECTIONS
> -- Performing Test C_SUPPORTS_FNO_FUNCTION_SECTIONS - Success
> -- Performing Test C_SUPPORTS_FFUNCTION_SECTIONS
> -- Performing Test C_SUPPORTS_FFUNCTION_SECTIONS - Success
> -- Performing Test CXX_SUPPORTS_FFUNCTION_SECTIONS
> -- Performing Test CXX_SUPPORTS_FFUNCTION_SECTIONS - Success
> -- Performing Test C_SUPPORTS_FDATA_SECTIONS
> -- Performing Test C_SUPPORTS_FDATA_SECTIONS - Success
> -- Performing Test CXX_SUPPORTS_FDATA_SECTIONS
> -- Performing Test CXX_SUPPORTS_FDATA_SECTIONS - Success
> -- Looking for os_signpost_interval_begin
> -- Looking for os_signpost_interval_begin - not found
> -- Found Python3: /usr/bin/python3.9 (found suitable version "3.9.2", minimum required is "3.6") found components: Interpreter
> -- Linker detection: unknown
> -- Found Git: /usr/bin/git (found version "2.32.0")
> -- Targeting AArch64
> -- Targeting AMDGPU
> -- Targeting ARM
> -- Targeting AVR
> -- Targeting BPF
> -- Targeting Hexagon
> -- Targeting Lanai
> -- Targeting Mips
> -- Targeting MSP430
> -- Targeting NVPTX
> -- Targeting PowerPC
> -- Targeting RISCV
> -- Targeting Sparc
> -- Targeting SystemZ
> -- Targeting WebAssembly
> -- Targeting X86
> -- Targeting XCore
> -- ISL version: isl-0.23-61-g24e8cd12
> -- Performing Test HAS_ATTRIBUTE_WARN_UNUSED_RESULT
> -- Performing Test HAS_ATTRIBUTE_WARN_UNUSED_RESULT - Success
> -- Performing Test HAVE___ATTRIBUTE__
> -- Performing Test HAVE___ATTRIBUTE__ - Success
> -- Performing Test HAVE_DECL_FFS
> -- Performing Test HAVE_DECL_FFS - Success
> -- Performing Test HAVE_DECL___BUILTIN_FFS
> -- Performing Test HAVE_DECL___BUILTIN_FFS - Success
> -- Performing Test HAVE_DECL__BITSCANFORWARD
> -- Performing Test HAVE_DECL__BITSCANFORWARD - Failed
> -- Performing Test HAVE_DECL_STRCASECMP
> -- Performing Test HAVE_DECL_STRCASECMP - Success
> -- Performing Test HAVE_DECL__STRICMP
> -- Performing Test HAVE_DECL__STRICMP - Failed
> -- Performing Test HAVE_DECL_STRNCASECMP
> -- Performing Test HAVE_DECL_STRNCASECMP - Success
> -- Performing Test HAVE_DECL__STRNICMP
> -- Performing Test HAVE_DECL__STRNICMP - Failed
> -- Performing Test HAVE_DECL_SNPRINTF
> -- Performing Test HAVE_DECL_SNPRINTF - Success
> -- Performing Test HAVE_DECL__SNPRINTF
> -- Performing Test HAVE_DECL__SNPRINTF - Failed
> -- Performing Test HAVE_UINT8T
> -- Performing Test HAVE_UINT8T - Failed
> -- Performing Test HAVE_STDINT_H
> -- Performing Test HAVE_STDINT_H - Success
> -- Performing Test HAVE_INTTYPES_H
> -- Performing Test HAVE_INTTYPES_H - Success
> -- Performing Test HAVE_SYS_INTTYPES_H
> -- Performing Test HAVE_SYS_INTTYPES_H - Failed
> -- Registering Polly as a pass plugin (static build: ON)
> -- Registering Bye as a pass plugin (static build: OFF)
> -- Failed to find LLVM FileCheck
> -- Version: 0.0.0
> -- Performing Test HAVE_CXX_FLAG_STD_CXX11
> -- Performing Test HAVE_CXX_FLAG_STD_CXX11 - Success
> -- Performing Test HAVE_CXX_FLAG_WALL
> -- Performing Test HAVE_CXX_FLAG_WALL - Success
> -- Performing Test HAVE_CXX_FLAG_WEXTRA
> -- Performing Test HAVE_CXX_FLAG_WEXTRA - Success
> -- Performing Test HAVE_CXX_FLAG_WSHADOW
> -- Performing Test HAVE_CXX_FLAG_WSHADOW - Success
> -- Performing Test HAVE_CXX_FLAG_PEDANTIC
> -- Performing Test HAVE_CXX_FLAG_PEDANTIC - Success
> -- Performing Test HAVE_CXX_FLAG_PEDANTIC_ERRORS
> -- Performing Test HAVE_CXX_FLAG_PEDANTIC_ERRORS - Success
> -- Performing Test HAVE_CXX_FLAG_WSHORTEN_64_TO_32
> -- Performing Test HAVE_CXX_FLAG_WSHORTEN_64_TO_32 - Success
> -- Performing Test HAVE_CXX_FLAG_WFLOAT_EQUAL
> -- Performing Test HAVE_CXX_FLAG_WFLOAT_EQUAL - Success
> -- Performing Test HAVE_CXX_FLAG_FSTRICT_ALIASING
> -- Performing Test HAVE_CXX_FLAG_FSTRICT_ALIASING - Success
> -- Performing Test HAVE_CXX_FLAG_FNO_EXCEPTIONS
> -- Performing Test HAVE_CXX_FLAG_FNO_EXCEPTIONS - Success
> -- Performing Test HAVE_CXX_FLAG_WNO_SUGGEST_OVERRIDE
> -- Performing Test HAVE_CXX_FLAG_WNO_SUGGEST_OVERRIDE - Success
> -- Performing Test HAVE_CXX_FLAG_WSTRICT_ALIASING
> -- Performing Test HAVE_CXX_FLAG_WSTRICT_ALIASING - Success
> -- Performing Test HAVE_CXX_FLAG_WD654
> -- Performing Test HAVE_CXX_FLAG_WD654 - Failed
> -- Performing Test HAVE_CXX_FLAG_WTHREAD_SAFETY
> -- Performing Test HAVE_CXX_FLAG_WTHREAD_SAFETY - Success
> -- Performing Test HAVE_THREAD_SAFETY_ATTRIBUTES
> -- Performing Test HAVE_THREAD_SAFETY_ATTRIBUTES
> -- Performing Test HAVE_THREAD_SAFETY_ATTRIBUTES -- failed to compile
> -- Performing Test HAVE_CXX_FLAG_COVERAGE
> -- Performing Test HAVE_CXX_FLAG_COVERAGE - Success
> -- Performing Test HAVE_GNU_POSIX_REGEX
> -- Performing Test HAVE_GNU_POSIX_REGEX
> -- Performing Test HAVE_GNU_POSIX_REGEX -- failed to compile
> -- Performing Test HAVE_POSIX_REGEX
> -- Performing Test HAVE_POSIX_REGEX
> -- Performing Test HAVE_POSIX_REGEX -- success
> -- Performing Test HAVE_STEADY_CLOCK
> -- Performing Test HAVE_STEADY_CLOCK
> -- Performing Test HAVE_STEADY_CLOCK -- success
> -- Configuring done
> -- Generating done
> -- Build files have been written to: /opt/deb/llvm/build
> [380/380] Linking CXX shared module lib/LLVMPolly.so
> FAILED: lib/LLVMPolly.so
> : && /usr/bin/clang++ -fPIC -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -pedantic -Wno-long-long -Wc++98-compat-extra-semi -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wstring-conversion -Wmisleading-indentation -fdiagnostics-color -ffunction-sections -fdata-sections -flto=thin -fno-exceptions -fno-rtti -O3 -DNDEBUG -Wl,-z,nodelete -Wl,--color-diagnostics -shared -o lib/LLVMPolly.so tools/polly/lib/CMakeFiles/obj.Polly.dir/Analysis/DependenceInfo.cpp.o tools/polly/lib/CMakeFiles/obj.Polly.dir/Analysis/PolyhedralInfo.cpp.o tools/polly/lib/CMakeFiles/obj.Polly.dir/Analysis/ScopDetection.cpp.o tools/polly/lib/CMakeFiles/obj.Polly.dir/Analysis/ScopDetectionDiagnostic.cpp.o tools/polly/lib/CMakeFiles/obj.Polly.dir/Analysis/ScopInfo.cpp.o tools/polly/lib/CMakeFiles/obj.Polly.dir/Analysis/ScopBuilder.cpp.o tools/polly/lib/CMakeFiles/obj.Polly.dir/Analysis/ScopGraphPrinter.cpp.o tools/polly/lib/CMakeFiles/obj.Polly.dir/Analysis/ScopPass.cpp.o tools/polly/lib/CMakeFiles/obj.Polly.dir/Analysis/PruneUnprofitable.cpp.o tools/polly/lib/CMakeFiles/obj.Polly.dir/CodeGen/BlockGenerators.cpp.o tools/polly/lib/CMakeFiles/obj.Polly.dir/CodeGen/IslAst.cpp.o tools/polly/lib/CMakeFiles/obj.Polly.dir/CodeGen/IslExprBuilder.cpp.o tools/polly/lib/CMakeFiles/obj.Polly.dir/CodeGen/IslNodeBuilder.cpp.o tools/polly/lib/CMakeFiles/obj.Polly.dir/CodeGen/CodeGeneration.cpp.o tools/polly/lib/CMakeFiles/obj.Polly.dir/CodeGen/LoopGenerators.cpp.o tools/polly/lib/CMakeFiles/obj.Polly.dir/CodeGen/LoopGeneratorsGOMP.cpp.o tools/polly/lib/CMakeFiles/obj.Polly.dir/CodeGen/LoopGeneratorsKMP.cpp.o tools/polly/lib/CMakeFiles/obj.Polly.dir/CodeGen/IRBuilder.cpp.o tools/polly/lib/CMakeFiles/obj.Polly.dir/CodeGen/Utils.cpp.o tools/polly/lib/CMakeFiles/obj.Polly.dir/CodeGen/RuntimeDebugBuilder.cpp.o tools/polly/lib/CMakeFiles/obj.Polly.dir/CodeGen/CodegenCleanup.cpp.o tools/polly/lib/CMakeFiles/obj.Polly.dir/CodeGen/PerfMonitor.cpp.o tools/polly/lib/CMakeFiles/obj.Polly.dir/Exchange/JSONExporter.cpp.o tools/polly/lib/CMakeFiles/obj.Polly.dir/Support/GICHelper.cpp.o tools/polly/lib/CMakeFiles/obj.Polly.dir/Support/SCEVAffinator.cpp.o tools/polly/lib/CMakeFiles/obj.Polly.dir/Support/SCEVValidator.cpp.o tools/polly/lib/CMakeFiles/obj.Polly.dir/Support/RegisterPasses.cpp.o tools/polly/lib/CMakeFiles/obj.Polly.dir/Support/ScopHelper.cpp.o tools/polly/lib/CMakeFiles/obj.Polly.dir/Support/ScopLocation.cpp.o tools/polly/lib/CMakeFiles/obj.Polly.dir/Support/ISLTools.cpp.o tools/polly/lib/CMakeFiles/obj.Polly.dir/Support/DumpModulePass.cpp.o tools/polly/lib/CMakeFiles/obj.Polly.dir/Support/VirtualInstruction.cpp.o tools/polly/lib/CMakeFiles/obj.Polly.dir/Transform/Canonicalization.cpp.o tools/polly/lib/CMakeFiles/obj.Polly.dir/Transform/CodePreparation.cpp.o tools/polly/lib/CMakeFiles/obj.Polly.dir/Transform/DeadCodeElimination.cpp.o tools/polly/lib/CMakeFiles/obj.Polly.dir/Transform/ScheduleOptimizer.cpp.o tools/polly/lib/CMakeFiles/obj.Polly.dir/Transform/ScheduleTreeTransform.cpp.o tools/polly/lib/CMakeFiles/obj.Polly.dir/Transform/FlattenSchedule.cpp.o tools/polly/lib/CMakeFiles/obj.Polly.dir/Transform/FlattenAlgo.cpp.o tools/polly/lib/CMakeFiles/obj.Polly.dir/Transform/ForwardOpTree.cpp.o tools/polly/lib/CMakeFiles/obj.Polly.dir/Transform/DeLICM.cpp.o tools/polly/lib/CMakeFiles/obj.Polly.dir/Transform/ZoneAlgo.cpp.o tools/polly/lib/CMakeFiles/obj.Polly.dir/Transform/Simplify.cpp.o tools/polly/lib/CMakeFiles/obj.Polly.dir/Transform/MaximalStaticExpansion.cpp.o tools/polly/lib/CMakeFiles/obj.Polly.dir/Transform/RewriteByReferenceParameters.cpp.o tools/polly/lib/CMakeFiles/obj.Polly.dir/Transform/ScopInliner.cpp.o tools/polly/lib/CMakeFiles/obj.Polly.dir/Transform/ManualOptimizer.cpp.o tools/polly/lib/CMakeFiles/obj.Polly.dir/Transform/MatmulOptimizer.cpp.o tools/polly/lib/CMakeFiles/LLVMPolly.dir/Plugin/Polly.cpp.o lib/libPollyISL.a && :
> ld.lld: error: relocation R_X86_64_PC32 cannot be used against symbol isl_map_coalesce; recompile with -fPIC
> >>> defined in lto.tmp
> >>> referenced by DependenceInfo.cpp
> >>> lto.tmp:(polly::Dependences::addPrivatizationDependences())
>
> ld.lld: error: relocation R_X86_64_PC32 cannot be used against symbol isl_map_coalesce; recompile with -fPIC
> >>> defined in lto.tmp
> >>> referenced by DependenceInfo.cpp
> >>> lto.tmp:(polly::Dependences::calculateDependences(polly::Scop&))
>
> ld.lld: error: relocation R_X86_64_PC32 cannot be used against symbol isl_map_coalesce; recompile with -fPIC
> >>> defined in lto.tmp
> >>> referenced by DependenceInfo.cpp
> >>> lto.tmp:(polly::Dependences::calculateDependences(polly::Scop&))
>
> ld.lld: error: relocation R_X86_64_PC32 cannot be used against symbol isl_map_coalesce; recompile with -fPIC
> >>> defined in lto.tmp
> >>> referenced by DependenceInfo.cpp
> >>> lto.tmp:(polly::Dependences::calculateDependences(polly::Scop&))
>
> ld.lld: error: relocation R_X86_64_PC32 cannot be used against symbol isl_map_coalesce; recompile with -fPIC
> >>> defined in lto.tmp
> >>> referenced by DependenceInfo.cpp
> >>> lto.tmp:(polly::Dependences::getDependences(int) const)
>
> ld.lld: error: relocation R_X86_64_PC32 cannot be used against symbol isl_map_coalesce; recompile with -fPIC
> >>> defined in lto.tmp
> >>> referenced by PolyhedralInfo.cpp
> >>> lto.tmp:(polly::PolyhedralInfo::getScheduleForLoop(polly::Scop const*, llvm::Loop*) const)
>
> ld.lld: error: relocation R_X86_64_PC32 cannot be used against symbol isl_aff_add; recompile with -fPIC
> >>> defined in lto.tmp
> >>> referenced by ScopBuilder.cpp
> >>> lto.tmp:(polly::ScopBuilder::calculateMinMaxAccess(llvm::SmallVector<polly::MemoryAccess*, 4u>, llvm::SmallVector<std::__1::pair<isl::noexceptions::pw_multi_aff, isl::noexceptions::pw_multi_aff>, 4u>&))
>
> ld.lld: error: relocation R_X86_64_PC32 cannot be used against symbol isl_aff_add; recompile with -fPIC
> >>> defined in lto.tmp
> >>> referenced by SCEVAffinator.cpp
> >>> lto.tmp:(polly::SCEVAffinator::interpretAsUnsigned(std::__1::pair<isl::noexceptions::pw_aff, isl::noexceptions::set>&, unsigned int))
>
> ld.lld: error: relocation R_X86_64_PC32 cannot be used against symbol isl_aff_mul; recompile with -fPIC
> >>> defined in lto.tmp
> >>> referenced by SCEVAffinator.cpp
> >>> lto.tmp:(polly::SCEVAffinator::visit(llvm::SCEV const*))
>
> ld.lld: error: relocation R_X86_64_PC32 cannot be used against symbol isl_aff_add; recompile with -fPIC
> >>> defined in lto.tmp
> >>> referenced by SCEVAffinator.cpp
> >>> lto.tmp:(polly::SCEVAffinator::addModuloSemantic(isl::noexceptions::pw_aff, llvm::Type*) const)
>
> ld.lld: error: relocation R_X86_64_PC32 cannot be used against symbol isl_aff_add; recompile with -fPIC
> >>> defined in lto.tmp
> >>> referenced by SCEVAffinator.cpp
> >>> lto.tmp:(polly::SCEVAffinator::visitAddExpr(llvm::SCEVAddExpr const*))
>
> ld.lld: error: relocation R_X86_64_PC32 cannot be used against symbol isl_aff_mul; recompile with -fPIC
> >>> defined in lto.tmp
> >>> referenced by SCEVAffinator.cpp
> >>> lto.tmp:(polly::SCEVAffinator::visitMulExpr(llvm::SCEVMulExpr const*))
>
> ld.lld: error: relocation R_X86_64_PC32 cannot be used against symbol isl_aff_add; recompile with -fPIC
> >>> defined in lto.tmp
> >>> referenced by SCEVAffinator.cpp
> >>> lto.tmp:(polly::SCEVAffinator::visitAddRecExpr(llvm::SCEVAddRecExpr const*))
>
> ld.lld: error: relocation R_X86_64_PC32 cannot be used against symbol isl_aff_mul; recompile with -fPIC
> >>> defined in lto.tmp
> >>> referenced by SCEVAffinator.cpp
> >>> lto.tmp:(polly::SCEVAffinator::visitAddRecExpr(llvm::SCEVAddRecExpr const*))
>
> ld.lld: error: relocation R_X86_64_PC32 cannot be used against symbol isl_aff_add; recompile with -fPIC
> >>> defined in lto.tmp
> >>> referenced by SCEVAffinator.cpp
> >>> lto.tmp:(polly::SCEVAffinator::visitUDivExpr(llvm::SCEVUDivExpr const*))
>
> ld.lld: error: relocation R_X86_64_PC32 cannot be used against symbol isl_aff_mul; recompile with -fPIC
> >>> defined in lto.tmp
> >>> referenced by ScheduleTreeTransform.cpp
> >>> lto.tmp:(isl::noexceptions::stat std::__1::__function::__policy_invoker<isl::noexceptions::stat (isl::noexceptions::pw_aff)>::__call_impl<std::__1::__function::__default_alloc_func<polly::applyPartialUnroll(isl::noexceptions::schedule_node, int)::$_2, isl::noexceptions::stat (isl::noexceptions::pw_aff)> >(std::__1::__function::__policy_storage const*, isl::noexceptions::pw_aff&&))
>
> ld.lld: error: relocation R_X86_64_PC32 cannot be used against symbol isl_aff_add; recompile with -fPIC
> >>> defined in lto.tmp
> >>> referenced by FlattenAlgo.cpp
> >>> lto.tmp:((anonymous namespace)::tryFlattenSequence(isl::noexceptions::union_map))
>
> ld.lld: error: relocation R_X86_64_PC32 cannot be used against symbol isl_aff_add; recompile with -fPIC
> >>> defined in lto.tmp
> >>> referenced by FlattenAlgo.cpp
> >>> lto.tmp:((anonymous namespace)::tryFlattenSequence(isl::noexceptions::union_map))
>
> ld.lld: error: relocation R_X86_64_PC32 cannot be used against symbol isl_aff_add; recompile with -fPIC
> >>> defined in lto.tmp
> >>> referenced by FlattenAlgo.cpp
> >>> lto.tmp:((anonymous namespace)::tryFlattenSequence(isl::noexceptions::union_map))
>
> ld.lld: error: relocation R_X86_64_PC32 cannot be used against symbol isl_aff_mul; recompile with -fPIC
> >>> defined in lto.tmp
> >>> referenced by FlattenAlgo.cpp
> >>> lto.tmp:(isl::noexceptions::stat std::__1::__function::__policy_invoker<isl::noexceptions::stat (isl::noexceptions::pw_aff)>::__call_impl<std::__1::__function::__default_alloc_func<(anonymous namespace)::multiply(isl::noexceptions::union_pw_aff, isl::noexceptions::val)::$_1, isl::noexceptions::stat (isl::noexceptions::pw_aff)> >(std::__1::__function::__policy_storage const*, isl::noexceptions::pw_aff&&))
>
> ld.lld: error: too many errors emitted, stopping now (use -error-limit=0 to see all errors)
> clang-13: error: linker command failed with exit code 1 (use -v to see invocation)
Thanks for the detailed reproduce! There is a ThinLTO issue. I sent D104986 <https://reviews.llvm.org/D104986> to fix it.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D102453/new/
https://reviews.llvm.org/D102453
More information about the llvm-commits
mailing list