dcadec
dcadec copied to clipboard
Default CFLAGS fail with gcc-4.9
gcc-4.9 does not use c99 by default, so the compilation fails with
cc -c -specs=/void-packages/common/environment/configure/gccspecs/hardened-cc1 -fstack-protector-strong -D_FORTIFY_SOURCE=2 -mtune=generic -O2 -pipe -DDCADEC_SHARED -DDCADEC_INTERNAL -fPIC -fvisibility=hidden -o libdcadec/interpolator_fixed.o libdcadec/interpolator_fixed.c
In file included from libdcadec/idct_fixed.c:21:0:
libdcadec/idct.h:67:64: error: expected ';', ',' or ')' before 'idct'
void idct_perform32_float(const struct idct_context * restrict idct,
^
...
adding -std=gnu99
to the CFLAGS
fixes this issue.
EDIT: replaced c99
with gnu99
as c99
neither defines __USE_MISC
or __USE_XOPEN
nor __USE_GNU
which is needed to define M_PI
when including math.h
.
Are you using a custom build script? Those cflags don't look like the ones in Makefile, which add -std=gnu99 and work just fine with gcc 4.9
I'm using void-packages to build dcadec. void-packages sets its own CFLAGS which overwrite the ones in the Makefile, I guess.