This is the mail archive of the
mailing list for the GCC project.
Re: [LTO][PATCH] Compress LTO IL sections in object files
- From: "Joseph S. Myers" <joseph at codesourcery dot com>
- To: Simon Baldwin <simonb at google dot com>
- Cc: dnovillo at google dot com, gcc-patches at gcc dot gnu dot org
- Date: Fri, 8 May 2009 18:56:31 +0000 (UTC)
- Subject: Re: [LTO][PATCH] Compress LTO IL sections in object files
- References: <20090508182635.CD60D3FE559@localhost>
On Fri, 8 May 2009, Simon Baldwin wrote:
> * Makefile.in: Added entries to build lto-compress module, added
> ZLIB to cc1 link lines.
To add a new required host library you generally need to:
* Add configure options specifying where to find any pre-installed copy
that may not be in the default headers and libraries search path, along
the lines of those for GMP. MPFR, CLooG, PPL.
* Document the library as required in install.texi.
* Document the configure options in install.texi.
In the case of zlib, GCC has an imported copy for use of libjava so you
might be able to make sure the imported copy is built as a static library
for the host and used by default (unless --with-system-zlib is passed) as
an alternative to these items - it's not clear there's any need for
options to specify where to find a pre-built zlib copy different from the
system one when GCC builds its own. You should also make sure that
--with-system-zlib uses the system copy. If you have verified these
conditions already hold then say so.
> +#include "zlib.h"
> +#include "config.h"
> +#include "system.h"
zlib.h is a system header. It includes other system headers. Those
headers may test feature test macros. config.h may define feature test
macros. You cannot include zlib.h before config.h safely. Include it
*after* including config.h and system.h, and use <zlib.h> not "zlib.h"
since it is a system header.
> Index: gcc/lto-compress.h
> --- gcc/lto-compress.h (revision 0)
> +++ gcc/lto-compress.h (revision 0)
> @@ -0,0 +1,37 @@
> +/* LTO IL compression streams.
> + Copyright 2009 Free Software Foundation, Inc.
> + Contributed by Simon Baldwin <email@example.com>
> +This file is part of GCC.
> +GCC is free software; you can redistribute it and/or modify
> +it under the terms of the GNU General Public License as published by
> +the Free Software Foundation; either version 2, or (at your option)
> +any later version.
No new files should have GPLv2 notices. Use the standard form of GPLv3
notice in GCC, and make sure that all other files present on LTO branch
but not on trunk do so.
Joseph S. Myers