On Tue, May 10, 2016 at 11:48:53 -0400, David Edelsohn wrote: > On Tue, May 10, 2016 at 11:39 AM, James Norris <jnor...@codesourcery.com> > wrote: > > The fix for PR68463 (https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68463) > > was missing code that prevented the fix from working on RS6000. The > > attached patch adds the missing code for RS6000. > > > > Bootstrapped and regtested on Power8. > > > > OK for trunk? > > > > Thanks! > > Jim > > > > ========= > > > > ChangeLog > > > > * config/rs6000/sysv4.h (CRTOFFLOADBEGIN): Define. Add > > crtoffloadbegin.o > > if offloading is enabled and -fopenacc or -fopenmp is specified. > > (CRTOFFLOADEND): Likewise. > > (STARTFILE_LINUX_SPEC): Add CRTOFFLOADBEGIN. > > (ENDFILE_LINUX_SPEC): Add CRTOFFLOADEND. > > Why is this enabled for openmp? Not all openmp applications require > offloading. > > I see that the same logic is used in config/gnu-user.h, but I'm > curious about the need.
Yes, this adds a bit overhead to openmp applications without offloading (when the compiler is configured with enabled offloading). But there is no way to determine from the driver whether the application uses offloading or not, only underlying lto-wrapper can determine this by analyzing object files. -- Ilya