Merge https://reviews.llvm.org/rL298532 and https://reviews.llvm.org/rL298570 to the 4.0.1 branch. This is not a bug fix but an improvement to improve compatibility with GNU libtools. I believe this is quite low-risk to merge into the stable branch.
If those two commits are commited then https://reviews.llvm.org/rL298568 should be included too.
also https://reviews.llvm.org/rL298591 to go with r298568 above.
Go ahead and merge these 2 patches plus the 2 mentioned by Brad if you think they are OK for the stable branch.
*** Bug 32602 has been marked as a duplicate of this bug. ***
All these changes have been merged to 4.0 branch.