[Crash-utility] [RFC] makedumpfile, crash: LZO compression support

Dave Anderson anderson at redhat.com
Wed Nov 23 14:58:44 UTC 2011



----- Original Message -----
> Hello Dave,
> 
> From: Dave Anderson <anderson at redhat.com>
> Subject: Re: [Crash-utility] [RFC] makedumpfile, crash: LZO
> compression support
> Date: Fri, 18 Nov 2011 10:20:26 -0500 (EST)
> 
> > 
> > 
> > ----- Original Message -----
> > 
> >> > This could involve configure.c, but conceivably it could all be
> >> > done within the Makefile itself.  For example, by entering
> >> > something
> >> > like "make compress=lzo2", and then adding this to the Makefile:
> >> > 
> >> > ifneq ($(compress),)
> >> > ifeq ($(compress), lzo2)
> >> >   LZOFLAG=-DLZO
> >> >   LZOLIB=-llzo2
> >> > endif
> >> > endif
> >> > 
> >> > And then the diskdump.c compile line could use ${LZOFLAG}, and
> >> > the
> >> > gdb_merge stanza could include ${LZOLIB}.
> >> > 
> >> 
> >> Thanks for accepting the request and for detailed instructions.
> >> 
> >> I'll reflect these configuration logic in the next patch.
> > 
> > Actually, thinking more about it, I prefer the second solution:
> > 
> >> On the other hand, the capability of dynamically adding an optional
> >> library could be a useful feature in general -- not only for LZO
> >> compression support, but for other things in the future.
> >>
> >> I'm thinking that we could allow the user create an "extralibs" file
> >> in the top-level directory, and then build_configure() in configure.c
> >> could read it and dynamically create the LDFLAGS= line in the Makefile.
> >> Currently LDFLAGS can only be modified manually, but the -static example
> >> hasn't worked for a long time, and should be removed.
> > 
> > Then the only issue would be the extra -DLZO to be passed to diskdump.c.
> > Since any additional library would pretty much always require a conditional
> > function call or other library-specific reference, a general purpose
> > "extracflags" file could also be created and read by build_configure(),
> > and its contents appended to the Makefile's TARGET_CFLAGS line.
> > 
> > With "extralibs" and "extracfiles", we would have a general-purpose
> > solution for adding optional libraries for use by both the top-level
> > crash sources as well as by extension modules that are built within
> > the extensions sub-directory.  It would also negate the need to always
> > have to enter special "make ..." command every time -- instead just
> > create the "extralibs" and "extracflags" files, and it gets done
> > automatically.
> > 
> 
> Should I post the patch after this mechanism is prepared?
> 
> And anyway I'm going to post the patch after makedumpfile accepts the
> corresponding patch.
 
Right -- there is time.  I'll try to put the extralibs and extracflags
file support into crash-6.0.1, or crash-6.0.2 at the latest.  In the
meantime, you can always test your stuff with "make CFLAGS=-llzo2"

Thanks,
  Dave




Thanks,
  Dave 




More information about the Crash-utility mailing list