----- Original Message ----- > From: "Ulrich Weigand" <[email protected]> > To: "llvm cfe" <[email protected]> > Cc: "Chandler Carruth" <[email protected]>, "Commit Messages and Patches > for LLVM" <[email protected]>, > "Rafael EspĂndola" <[email protected]>, "Bill Schmidt" > <[email protected]>, "Hal Finkel" > <[email protected]> > Sent: Thursday, January 29, 2015 12:06:44 PM > Subject: [PATCH] Work around ppc64 TLS linker bug (Re: [LPM] Try again to > appease powerpc64 in its self host.) > > Hal Finkel <[email protected]> wrote on 29.01.2015 17:13:21: > > > > It's probably indeed the best to use the linker flag for now. > > > > > > However, I think adding them to the LLVM build flags is the wrong > > > place; there is nothing special about compiling the LLVM code > > > base > > > as such. Rather, the problem is using clang/LLVM to compile > > > *any* > > > coding using general-/local-dynamics TLS variables. > > > > > > So I think the flags should be added by the clang compiler driver > > > whenever it invokes the linker on PowerPC. (At least for now, > > > and in 3.6. They can be removed again once Bill has changed the > > > code generation to again ensure use of r3 as expected by broken > > > linkers ...) > > > > Agreed. Can you please post a patch? > > I'm not completely sure if this is the correct place to add this, > but the patch seems to work for me. With this clang patch, I'm > able to successfully bootstrap clang again (with the initial-exec > TLS attribute in Chandler's latest change removed again). > > OK to check in? > > (See attached file: clang-ppc64-notlsopt.patch)
Yes, LGTM. We do need a test case, however (I think that something like test/Driver/Xlinker-args.c is essentially what is needed). -Hal > > Bye, > Ulrich -- Hal Finkel Assistant Computational Scientist Leadership Computing Facility Argonne National Laboratory _______________________________________________ cfe-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
