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

CXXFLAGS not used in src/ and ui/ #10212

Closed
nalimilan opened this issue Feb 16, 2015 · 4 comments · Fixed by #10758
Closed

CXXFLAGS not used in src/ and ui/ #10212

nalimilan opened this issue Feb 16, 2015 · 4 comments · Fixed by #10758
Labels
domain:building Build system, or building Julia or its dependencies

Comments

@nalimilan
Copy link
Member

I noticed that CXXFLAGS has no effect when building C++ files under src/ and ui/ (at least). For example in the following log, the Fedora standard CXXFLAGS that are set when calling make are not used at all for the last calls to g++ that fail (at the bottom of the file):

https://gist.github.com/nalimilan/4cf029bcfec741015019

(Noticed when trying to add std=c++11 for #10201)

@nalimilan nalimilan added the domain:building Build system, or building Julia or its dependencies label Feb 16, 2015
@nalimilan nalimilan changed the title CXXFLAGS not used in src/ and ui/ CXXFLAGS not used in src/ Feb 16, 2015
@nalimilan nalimilan changed the title CXXFLAGS not used in src/ CXXFLAGS not used in src/ and ui/ Feb 16, 2015
@nalimilan
Copy link
Member Author

Got it, these are the cases where g++ is used as the C++ linker. I'm not sure what kind of flags we should pass: is LDFLAGS appropriate? Also, I wonder whether -O3 has any effect for the linker (I'm supposed to override it with the Fedora default I use for CFLAGS, which is typically -O2).

@stevengj
Copy link
Member

Normally, if you use $(CXX) for the linker, you should pass $(CXX) $(CPPFLAGS) $(CXXFLAGS) -o $@ ...objects... $(LDFLAGS) $(LIBS). That is what e.g. automake does.

@nalimilan
Copy link
Member Author

@stevengj Something like this? #10758

@stevengj
Copy link
Member

stevengj commented Apr 7, 2015

Looks good.

nalimilan added a commit that referenced this issue Apr 7, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
domain:building Build system, or building Julia or its dependencies
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants