mirror of
https://git.FreeBSD.org/src.git
synced 2025-01-07 13:14:51 +00:00
Pull in r336008 from upstream clang trunk:
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 Requested by: jhb MFC after: 3 days
This commit is contained in:
parent
b027d6545b
commit
8c44114a46
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=336227
@ -2375,6 +2375,8 @@ void Generic_ELF::addClangTargetOptions(const ArgList &DriverArgs,
|
||||
bool UseInitArrayDefault =
|
||||
getTriple().getArch() == llvm::Triple::aarch64 ||
|
||||
getTriple().getArch() == llvm::Triple::aarch64_be ||
|
||||
(getTriple().getOS() == llvm::Triple::FreeBSD &&
|
||||
getTriple().getOSMajorVersion() >= 12) ||
|
||||
(getTriple().getOS() == llvm::Triple::Linux &&
|
||||
((!GCCInstallation.isValid() || !V.isOlderThan(4, 7, 0)) ||
|
||||
getTriple().isAndroid())) ||
|
||||
|
Loading…
Reference in New Issue
Block a user