fix: gcc crashing the client

This workaround lowers the optimisation level for those parts of the code,
that gcc 4.7 (and probably other versions) would compile to a binary that
crashes after a while. The previous solution for this so-called "linux bug"
was to use clang instead of gcc.

Thx, Jpablon, for doing all the work on this.
This commit is contained in:
ac-stef
2014-05-14 22:17:20 +02:00
parent ec97e75b51
commit de5deae8e3
+9
View File
@@ -179,6 +179,9 @@ struct vertmodel : model
numdyndraws = draws.length();
}
#if defined(__GNUC__) && defined(__OPTIMIZE__)
__attribute__((optimize(2)))
#endif
dyncacheentry *gendynverts(animstate &as, anpos &cur, anpos *prev, float ai_t)
{
dyncacheentry *d = dyncache.start();
@@ -290,6 +293,9 @@ struct vertmodel : model
}
}
#if defined(__GNUC__) && defined(__OPTIMIZE__)
__attribute__((optimize(2)))
#endif
shadowcacheentry *genshadowvolume(animstate &as, anpos &cur, anpos *prev, float ai_t, vec *buf)
{
if(!shareverts) return NULL;
@@ -350,6 +356,9 @@ struct vertmodel : model
return d;
}
#if defined(__GNUC__) && defined(__OPTIMIZE__)
__attribute__((optimize(2)))
#endif
lightcacheentry *lightvertexes(animstate &as, anpos &cur, anpos *prev, float ai_t, vec *buf)
{
if(dbgvlight) return NULL;