|
From: Tom H. <to...@co...> - 2005-07-29 17:58:50
|
In message <200...@kf...>
Maurice van der Pot <gri...@ge...> wrote:
> It compiles on one of my systems, but not on the other. The system that
> it fails to build on is an nptl only system.
I don't think the NPTL only thing is an issue. FC4 is NPTL by default
and that builds fine.
> The build fails because of a few static const variable declarations
> within functions. Why are these static? If I change them to normal const
> variables, the compilation succeeds.
The problem is not the fact that it is static, but the fact that
the initialiser is invalid.
> One example of this is in coregrind/m_aspacemgr/aspacemgr.c at the
> beginning of function VG_(unmap_range). The error I get is
> "initializer element is not constant".
Those are technically invalid but work with every version of gcc
that I know of so long as you have optimisation turned on as the
constant folder reduces the expression to a constant before it checks
the initialiser ;-)
For production use I would suggest that you probably want to have
optimisation turned on when building valgrind
> I've tried with
> compilers: gcc 3.3.3
> gcc 3.4.3
> gcc 3.4.4
> glibc: 2.3.5
>
> Attached is a patch to change all problematic static consts into consts.
There is already a bug on the bug tracker for this. You probably
want to attach yourself to it and maybe add your patch.
Tom
--
Tom Hughes (to...@co...)
http://www.compton.nu/
|