Current-Users archive

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

Re: fsck seg fault failure on vmware -i386?



    Date:        Tue, 9 Feb 2010 18:07:28 -0000
    From:        yancm%sdf.lonestar.org@localhost
    Message-ID:  
<7732b88a737224d922a3ee86c131e201.squirrel%webmail.freeshell.org@localhost>

  | > You can use .CURDIR for this purpose to set it conditionally...
  | 
  | I'm sorry to be thick, but all the advice I'm getting on doing
  | this is confusing me.

Joerg was providing a hint as to how you could get flags into the build
of a part of the system (say, for example, the build of libc) without going
and actually changing the relevant Makefile the way I suggested.

That would be by putting a test into /etc/mk.conf (using ${.CURDIR}) to
see what is being compiled right now, and when it is libs, adding the -g
flag.

All that's possible, and most likely the right way, but doing it for a
one-off is far more work than just editing the Makefile.

  | I want to build a debug version of libc (really just the libc/time
  | routines).

I'd still recommend just editing libc's Makefile, and adding either
COPTS+=-g or DBG=-g to it - that simple change is easy to make and
hard to get wrong by accident...

  | Where would the resultant libc.a end up?
  | I assume it would end up in /usr/obj/lib/libc?

Yes, if there's a libc_g.c use that, otherwise if you had -g in the
COPTS then libc.a should have the debug symbols.   It should also get
copied to ${DESTDIR}/lib/libc.c (not sure if he libc_g.a version, if
created, will go in ${DESTDIR} or not).

  | And how do I get my debug version of fsck_ffs to use the debug
  | version of libc?

Add DPADD+=/path/to/your/libc.a
after the existing DPADD+= line in fsck_ffs's Makefile.

  | What do I do with .CURDIR ? I looked in the build.sh and BUILDING files
  | and do not really find any clues.

You could use it in /etc/mk.conf (in a .if line - probably multiple times)
to add this stuff there, rather than in the Makefiles in question (that is,
if you are building libc, or libc/time, add -g, or if you are building
fsck_ffs add a reference to the static -g form of libc - the latter you
could probably do without .if by using DPADD.fsck_ffs+= in mk.conf - but
all of this stuff either needs an expert (not me) to get right, or a bunch of
trial and error).   If someone else tells you the exact lines to add, modifying
just mk.conf is definitely the better way (and easier to clean up later),
but without that, just editing the Makefiles is easier...

kre



Home | Main Index | Thread Index | Old Index