Request init/fini array on FreeBSD 12 and later
authorDimitry Andric <dimitry@andric.com>
Fri, 29 Jun 2018 19:18:17 +0000 (19:18 +0000)
committerDimitry Andric <dimitry@andric.com>
Fri, 29 Jun 2018 19:18:17 +0000 (19:18 +0000)
commit33cc6c8a51ba75bf9c445e8f6a684a201b9988af
tree7ff9e7e94106c2ce6b4f8702aeba90e962e2677b
parent50f8ca38ee222dd24ee5750a9e6cc5f00872e691
Request init/fini array on FreeBSD 12 and later

Summary:
It seems a bad idea to change the default in the middle of a release
branch due to possible changes in global ctor / dtor ordering between
.ctors and .init_array. With FreeBSD 11.0's release imminent lets change
the default now for FreeBSD 12 (the current development stream) and
later.

FreeBSD rtld has supported .init_array / .fini_array for many years. As
of Jan 1 2017 all supported FreeBSD releases and branches will have
support.

Reviewers: dim, brooks, arichardson

Reviewed By: dim, brooks, arichardson

Subscribers: bsdjhb, krytarowski, emaste, cfe-commits

Differential Revision: https://reviews.llvm.org/D24867

llvm-svn: 336008
clang/lib/Driver/ToolChains/Gnu.cpp
clang/test/Driver/constructors.c