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

Pass -std=c99 flag to compiler #76

Open
concatime opened this issue Dec 24, 2020 · 0 comments
Open

Pass -std=c99 flag to compiler #76

concatime opened this issue Dec 24, 2020 · 0 comments

Comments

@concatime
Copy link

concatime commented Dec 24, 2020

Hi there!
I'm quite new to Janet and JPM I must admit.
While executing jpm build (with a rather old GCC), I got:

[admin@localhost hermes]$ jpm build
compiling src/hermes.c to build/src___hermes.o...
src/hermes.c: In function ‘validate_pkg’:
src/hermes.c:75:9: error: ‘for’ loop initial declarations are only allowed in C99 mode
src/hermes.c:75:9: note: use option -std=c99 or -std=gnu99 to compile your code
src/hermes.c:110:5: error: ‘for’ loop initial declarations are only allowed in C99 mode
src/hermes.c:111:5: error: ‘for’ loop initial declarations are only allowed in C99 mode
src/hermes.c:112:5: error: ‘for’ loop initial declarations are only allowed in C99 mode
error: command exited with status 1
  in shell [/usr/local/bin/jpm] (tailcall) on line 143, column 5
  in do-rule [/usr/local/bin/jpm] on line 262, column 26
  in do-rule [/usr/local/bin/jpm] on line 258, column 44
  in do-rule [/usr/local/bin/jpm] (tailcall) on line 258, column 44

How do we pass -std=c99? (env CFLAGS=-std=c99 jpm build does not work)

Thank you!

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

1 participant