Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Default CFLAGS fail with gcc-4.9 #54

Open
Gottox opened this issue Mar 17, 2016 · 2 comments
Open

Default CFLAGS fail with gcc-4.9 #54

Gottox opened this issue Mar 17, 2016 · 2 comments

Comments

@Gottox
Copy link

Gottox commented Mar 17, 2016

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.

@jamrial
Copy link
Contributor

jamrial commented Mar 17, 2016

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

@Gottox
Copy link
Author

Gottox commented Mar 17, 2016

I'm using void-packages to build dcadec. void-packages sets its own CFLAGS which overwrite the ones in the Makefile, I guess.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants