[Mesa-dev] [mesa build system] glsl builtin_functions.cpp change breaks entire compilation
tom fogal
tfogal at sci.utah.edu
Wed Jan 12 16:32:59 PST 2011
Tobias Jakobi wrote:
> Some further testing shows that the LDFLAGS seem to cause the problem.
> More specifically the '--as-needed' which is passed to the linker.
As needed should probably be removed from the link line when we're
linking with g++.
Last I looked into such issues, I found that the flag is incognizant of
static initializers, and thus is not valid for C++. I got the
impression it was fine for C.. but in retrospect I can't remember why,
it's not like C lacks static variables. Worth another googling round.
> I don't know how to fix this, but I figure it could become a problem for
> a lot more users since more and more distros seem to use '--as-needed'
> by default.
If that's the case, it's a distro bug; they shouldn't be adding
--as-needed to packages unless they're certain there's no C++ code.
-tom
More information about the mesa-dev
mailing list