[all-commits] [llvm/llvm-project] b29c7f: [OpenMP] Remove -Wl, -fini=__kmp_internal_end_fini
Aaron Puchert via All-commits
all-commits at lists.llvm.org
Mon Nov 18 15:55:39 PST 2019
Branch: refs/heads/master
Home: https://github.com/llvm/llvm-project
Commit: b29c7fdb617cba4c83037840842a872e8bf2f6b1
https://github.com/llvm/llvm-project/commit/b29c7fdb617cba4c83037840842a872e8bf2f6b1
Author: Aaron Puchert <aaronpuchert at alice-dsl.net>
Date: 2019-11-19 (Tue, 19 Nov 2019)
Changed paths:
M openmp/runtime/cmake/LibompHandleFlags.cmake
M openmp/runtime/cmake/config-ix.cmake
M openmp/runtime/src/kmp.h
M openmp/runtime/src/kmp_runtime.cpp
Log Message:
-----------
[OpenMP] Remove -Wl,-fini=__kmp_internal_end_fini
Summary:
The termination function duplicated the functionality of the
__attribute((destructor))-annotated function __kmp_internal_end_fini,
and we have no indication that this doesn't work.
The function might cause issues with link-time optimization turned on:
until very recently, none of the usual linkers was reporting functions
named in -Wl,-fini as used to the LTO plugin, so it might be dropped.
If the function is dropped, -Wl,-fini=__kmp_internal_end_fini doesn't
do what we want: with ld.bfd and lld it drops the FINI attribute from
.dynamic and with gold we get FINI = 0x0, which leads to a crash on
cleanup. This can be reproduced by building with
-DLLVM_ENABLE_PROJECTS="clang;openmp" \
-DLLVM_ENABLE_LTO=Thin \
-DLLVM_USE_LINKER=gold
The issue in lld has been fixed in f95273f75aa, but gold remains without
fix so far.
Fixes PR43927.
Reviewers: JonChesterfield, jdoerfert, AndreyChurbanov
Reviewed By: AndreyChurbanov
Differential Revision: https://reviews.llvm.org/D69927
More information about the All-commits
mailing list