tech-toolchain archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: -current sparc build failure with MKDEBUG=yes/COPTS=-g



On Fri, Nov 18, 2011 at 04:57:31PM +1100, matthew green wrote:
> 
> > I finally got time to dig into -current NetBSD/sparc build failure
> > with MKDEBUG=yes && COPTS=-g.
> > 
> > The problem lies in miniroot.fs build :
> > 
> >      create  miniroot/miniroot.fs
> > nbmakefs: `work'size of 8527872 is larger than the maxsize of 8388608.
> > --- miniroot.fs ---
> > *** [miniroot.fs] Error code 1
> > 
> > Some files in usr/mdec have indeed larger size with COPTS=-g
> > 
> > -r--r--r--  1 njoly  users  78230 Nov 17 13:02 bootjs.net
> > -r--r--r--  1 njoly  users  92392 Nov 17 13:02 ofwboot
> > -r--r--r--  1 njoly  users  92392 Nov 17 13:02 ofwboot.net
> > 
> > -r--r--r--  1 njoly  users  310196 Nov 17 14:34 bootjs.net
> > -r--r--r--  1 njoly  users  370643 Nov 17 14:34 ofwboot
> > -r--r--r--  1 njoly  users  370643 Nov 17 14:34 ofwboot.net
> > 
> > Is the attached patch, which clear COPTS, correct ?
> 
> that's the wrong answer.  a quick workaround would be to
> stop installing two copies of the same binary and have
> ofwboot and ofwboot.net linked together.

Ok. Here's the patch that fix it by using COPY/LINK instead of
COPYDIR.

> ideally, we should strip -g these for installation, but
> leave the debug info somewhere.

Agreed. I'll keep it in mind ...

> wait.  is that COPTS=-g also means "no -O"?  if so, then
> i recommend that you use "COPTS=-g -O2".  actually, i've
> always thought the right way is to set DBG, not COPTS.

Actually, i do add -g to COPTS in mk.conf :

MKDEBUG=        yes
.if !defined(KERNEL_BUILD) && ${MKDEBUG:Uno} != no
COPTS+=         -g
.endif

I used COPTS because of the following paragraph from mk/bsd.README:

COPTS.lib<lib>
OBJCOPTS.lib<lib>
LDADD.lib<lib>
CPPFLAGS.lib<lib>
CXXFLAGS.lib<lib>
COPTS.<prog>
OBJCCOPTS.<prog>
LDADD.<prog>
CPPFLAGS.<prog>
CXXFLAGS.<prog> These provide a way to specify additions to the associated
                variables in a way that applies only to a particular library
                or program.  <lib> corresponds to the LIB variable set in
                the library's makefile.  <prog> corresponds to either PROG
                or PROG_CXX (if set).  For example,if COPTS.libcrypto is
                set to "-g","-g"will be added to COPTS only when compiling
                the crypto library.

And didn't found the corresponding explanation for DBG.

Thanks.

-- 
Nicolas Joly

Projects and Developments in Bioinformatics
Institut Pasteur, Paris.
Index: distrib/sparc/miniroot/list
===================================================================
RCS file: /cvsroot/src/distrib/sparc/miniroot/list,v
retrieving revision 1.36
diff -u -p -r1.36 list
--- distrib/sparc/miniroot/list 3 Jul 2011 23:11:33 -0000       1.36
+++ distrib/sparc/miniroot/list 18 Nov 2011 12:03:58 -0000
@@ -24,7 +24,15 @@ SPECIAL      less    srcdir external/bsd/less/bi
 SYMLINK        /tmp    var/tmp
 
 # we need the contents of /usr/mdec
-COPYDIR        ${DESTDIR}/usr/mdec     usr/mdec
+COPY   ${DESTDIR}/usr/mdec/binstall    usr/mdec/binstall
+COPY   ${DESTDIR}/usr/mdec/boot        usr/mdec/boot
+LINK   usr/mdec/boot                   usr/mdec/boot.388000
+COPY   ${DESTDIR}/usr/mdec/boot.net    usr/mdec/boot.net
+COPY   ${DESTDIR}/usr/mdec/bootblk     usr/mdec/bootblk
+COPY   ${DESTDIR}/usr/mdec/bootjs.net  usr/mdec/bootjs.net
+COPY   ${DESTDIR}/usr/mdec/bootxx      usr/mdec/bootxx
+COPY   ${DESTDIR}/usr/mdec/ofwboot     usr/mdec/ofwboot
+LINK   usr/mdec/ofwboot                usr/mdec/ofwboot.net
 # ensure binstall is executable
 MTREE  ./usr/mdec/binstall     mode=0555
 


Home | Main Index | Thread Index | Old Index