-
Notifications
You must be signed in to change notification settings - Fork 31
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
use default CC, with std=c99 #22
Conversation
src/Makefile
Outdated
@@ -10,15 +10,15 @@ else | |||
XOBJS = $(DOBJS) | |||
endif | |||
|
|||
CFLAGS-add += -DMATHLIB_STANDALONE | |||
CFLAGS-add += -std=c99 -DMATHLIB_STANDALONE |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
c99 is pickier than gnu99, I'd avoid changing that
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think it uses any of the GNU features: http://clang.llvm.org/docs/UsersManual.html#differences-between-various-standard-modes
and I thought it might make it more general (e.g. for use with icc
and the like).
default: release | ||
|
||
%.o: %.c | ||
$(CC) $(CPPFLAGS) $(CFLAGS-add) $(CFLAGS) $(fPIC) -std=gnu99 -I../include -DNDEBUG -c $< -o $@ | ||
$(CC) $(CPPFLAGS) $(CFLAGS) $(CFLAGS-add) $(fPIC) -DMATHLIB_STANDALONE -I../include -DNDEBUG -c $< -o $@ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you'll still have to specify C99 somewhere in here; the tests are failing because it isn't assuming C99.
Seems to be working now. |
BTW, it's also wrong to add |
Thanks. I admit I don't have a lot of experience with writing Makefiles: is there any standard guidance for what should go where? Or do people just copy whatever autoconf does? |
I edited/created many FreeBSD ports, and since many projects use gmake that's where my knowledge came from. Otherwise, there's no good reference that I know of. |
Thanks. If you have any further suggestions, let me know.
|
I think it's okay to set optimization levels in this case, since the vast majority of users won't be passing any kind of special flags for building. This primarily just gets built for use with Rmath.jl, rather than as a library for general distribution as with a FreeBSD port, and there isn't an easy way within Julia's |
When gmake is called, it picks flags from /etc/make.conf. Users are expected to have /etc/make.conf with all correct flags, that's how GNU make works. |
Right, that applies to FreeBSD, but I don't think |
Such lack of standard is what messes GNU make up. There is no generally correct way. |
It's ok, put back -O3 it you want to. |
No description provided.