Re: svn commit: r332090 - head/stand/i386
On 9 April 2018 at 15:28, John Baldwinwrote: > > I do think we are likely to have far fewer conditional LDFLAGS rather > than CFLAGS though. I think if we are only going to have 1 or 2 > instances in the tree then LDFLAGS.LINKER_TYPE might perhaps be > overkill, but if we think there will be several then I think it is > more readable. Indeed, I don't anticipate we'd end up with more than 1 or 2 instances, but even with only the single case today I think it is clearer (D14998). ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r332090 - head/stand/i386
On Monday, April 09, 2018 11:02:01 AM Warner Losh wrote: > On Mon, Apr 9, 2018 at 10:44 AM, Ed Mastewrote: > > > On 6 April 2018 at 13:54, John Baldwin wrote: > > > On Friday, April 06, 2018 02:57:58 AM Ed Maste wrote: > > >> Author: emaste > > >> Date: Fri Apr 6 02:57:58 2018 > > >> New Revision: 332090 > > >> URL: https://svnweb.freebsd.org/changeset/base/332090 > > >> > > >> Log: > > >> stand: pass --no-rosegment for i386 bits when linking with lld > > >> > > > > > > Maybe we should support LDFLAGS.${LINKER_TYPE} as we do for CFLAGS, etc.? > > > > I don't anticipate LINKER_TYPE tests proliferating, but a good point > > nonetheless. Change proposed in review D14998. > > > > We only really support two compilers. This lets us have fewer .if > statements which historically people have messed often enough that we've > move to constructs that avoid them. I do think we are likely to have far fewer conditional LDFLAGS rather than CFLAGS though. I think if we are only going to have 1 or 2 instances in the tree then LDFLAGS.LINKER_TYPE might perhaps be overkill, but if we think there will be several then I think it is more readable. -- John Baldwin ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r332090 - head/stand/i386
On Mon, Apr 9, 2018 at 10:44 AM, Ed Mastewrote: > On 6 April 2018 at 13:54, John Baldwin wrote: > > On Friday, April 06, 2018 02:57:58 AM Ed Maste wrote: > >> Author: emaste > >> Date: Fri Apr 6 02:57:58 2018 > >> New Revision: 332090 > >> URL: https://svnweb.freebsd.org/changeset/base/332090 > >> > >> Log: > >> stand: pass --no-rosegment for i386 bits when linking with lld > >> > > > > Maybe we should support LDFLAGS.${LINKER_TYPE} as we do for CFLAGS, etc.? > > I don't anticipate LINKER_TYPE tests proliferating, but a good point > nonetheless. Change proposed in review D14998. > We only really support two compilers. This lets us have fewer .if statements which historically people have messed often enough that we've move to constructs that avoid them. Warner ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r332090 - head/stand/i386
On 6 April 2018 at 13:54, John Baldwinwrote: > On Friday, April 06, 2018 02:57:58 AM Ed Maste wrote: >> Author: emaste >> Date: Fri Apr 6 02:57:58 2018 >> New Revision: 332090 >> URL: https://svnweb.freebsd.org/changeset/base/332090 >> >> Log: >> stand: pass --no-rosegment for i386 bits when linking with lld >> > > Maybe we should support LDFLAGS.${LINKER_TYPE} as we do for CFLAGS, etc.? I don't anticipate LINKER_TYPE tests proliferating, but a good point nonetheless. Change proposed in review D14998. ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r332090 - head/stand/i386
On Fri, Apr 6, 2018 at 11:54 AM, John Baldwinwrote: > On Friday, April 06, 2018 02:57:58 AM Ed Maste wrote: > > Author: emaste > > Date: Fri Apr 6 02:57:58 2018 > > New Revision: 332090 > > URL: https://svnweb.freebsd.org/changeset/base/332090 > > > > Log: > > stand: pass --no-rosegment for i386 bits when linking with lld > > > > btxld does not correctly handle input with other than 2 PT_LOAD > > segments. Passing --no-rosegment lets lld produce output eqivalent to > > ld.bfd: 2 PT_LOAD segments and no PT_GNU_RELRO. > > > > PR: 225775 > > MFC after: 3 weeks > > Sponsored by: The FreeBSD Foundation > > Differential Revision: https://reviews.freebsd.org/D14956 > > > > Modified: > > head/stand/i386/Makefile.inc > > > > Modified: head/stand/i386/Makefile.inc > > > == > > --- head/stand/i386/Makefile.inc Fri Apr 6 02:47:43 2018 > (r332089) > > +++ head/stand/i386/Makefile.inc Fri Apr 6 02:57:58 2018 > (r332090) > > @@ -2,8 +2,13 @@ > > # > > # $FreeBSD$ > > > > +.sinclude > > + > > LOADER_ADDRESS?=0x20 > > LDFLAGS+=-nostdlib > > +.if defined(LINKER_TYPE) && ${LINKER_TYPE} == "lld" > > +LDFLAGS+=-Wl,--no-rosegment > > +.endif > > Maybe we should support LDFLAGS.${LINKER_TYPE} as we do for CFLAGS, etc.? > I concur. It doesn't take too many of these for that to pay off big time, especially if we have to do anything globally... Warner ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r332090 - head/stand/i386
On Friday, April 06, 2018 02:57:58 AM Ed Maste wrote: > Author: emaste > Date: Fri Apr 6 02:57:58 2018 > New Revision: 332090 > URL: https://svnweb.freebsd.org/changeset/base/332090 > > Log: > stand: pass --no-rosegment for i386 bits when linking with lld > > btxld does not correctly handle input with other than 2 PT_LOAD > segments. Passing --no-rosegment lets lld produce output eqivalent to > ld.bfd: 2 PT_LOAD segments and no PT_GNU_RELRO. > > PR: 225775 > MFC after: 3 weeks > Sponsored by: The FreeBSD Foundation > Differential Revision: https://reviews.freebsd.org/D14956 > > Modified: > head/stand/i386/Makefile.inc > > Modified: head/stand/i386/Makefile.inc > == > --- head/stand/i386/Makefile.inc Fri Apr 6 02:47:43 2018 > (r332089) > +++ head/stand/i386/Makefile.inc Fri Apr 6 02:57:58 2018 > (r332090) > @@ -2,8 +2,13 @@ > # > # $FreeBSD$ > > +.sinclude > + > LOADER_ADDRESS?=0x20 > LDFLAGS+=-nostdlib > +.if defined(LINKER_TYPE) && ${LINKER_TYPE} == "lld" > +LDFLAGS+=-Wl,--no-rosegment > +.endif Maybe we should support LDFLAGS.${LINKER_TYPE} as we do for CFLAGS, etc.? -- John Baldwin ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"