This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch] Fix bootstrap powerpc*-*-freebsd* targets


On Tue, Dec 18, 2018 at 10:39:27AM +1030, Alan Modra wrote:
> On Mon, Dec 17, 2018 at 11:05:57AM -0600, Segher Boessenkool wrote:
> > Hi!
> > 
> > On Mon, Dec 17, 2018 at 10:40:01AM +1030, Alan Modra wrote:
> > > Since I broke powerpc*-freebsd and the other non-linux powerpc
> > > targets, I guess I ought to fix them.  The following is a variation on
> > > your first patch, that results in -mcall-linux for powerpc-freebsd*
> > > providing the 32-bit powerpc-linux dynamic linker.
> > 
> > That, like the first patch, abuses that header file.  Please do it
> > somewhere sane instead, not in a random subtarget file?
> 
> Is there is a better place, currently?  sysv4.h contains a mess of OS
> related defines already, to support various -mcall options.  If those
> stay in sysv4.h I can't see a better place for the fall-back
> GNU_USER_DYNAMIC_LINKER define.
> 
> Here's the problem:
> powerpc*-*-linux* uses tm_file="rs6000/rs6000.h dbxelf.h elfos.h
> gnu-user.h linux.h freebsd-spec.h rs6000/sysv4.h" plus a few more.
> linux.h contains the proper GNU_USER_DYNAMIC_LINKER define for linux.
> Fairly obviously we can't put a fallback define in rs6000/rs6000.h
> for those targets that don't include linux.h (and including linux.h
> for non-linux targets is probably not a good idea).
> 
> Besides rs6000/sysv4.h, you could put the fallback in rs6000/freebsd.h
> to fix powerpc*-freebsd*, but then you'd need to put it in
> rs6000/netbsd.h, rs6000/eabi.h, rs6000/rtems.h, rs6000/vxworks.h,
> rs6000/lynx.h to fix those targets.  That would be horrible.  And it
> would leave powerpc-elf broken.
> 
> > 
> > > 	* config/rs6000/sysv4.h (GNU_USER_DYNAMIC_LINKER): Define.

The patch is okay for now, btw.  Thanks!


Segher


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]