-
-
Notifications
You must be signed in to change notification settings - Fork 7.4k
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
Fix unix/Makefile to build on OSX #871
Conversation
Force OSX to compile with clang even if gcc is available Change LDFLAGS syntax to be compatible with clang Fix questionable syntax on line 90 Remove extraneous tab character
Sounds good, I'll be able to update the PR later this evening. |
Actually, your suggestion will change the syntax suggested in #782 (comment) to have clang make the map file. |
I see what to do now.
Then Edited to add: That seems to work. Any thoughts on line 90 being LDFLAGS or LDFLAGS_MOD? |
@blmorris Ahh - I missed the -M -m difference. In that case, I would just call it LDFLAGS_MAP and make it equal to Then you have the option of setting LDFLAGS_MAP to the empty string to not get a map file at all. |
Couldn't the order and map stuff be put in the same variable. Eg:
Of course, then you can't easily override to get no map file. |
Doesn't LDFLAGS_MOD need to be somewhere in the definition? There are several lines later in the file that manipulate the value of LDFLAGS_MOD, and without a placeholder in LDFLAGS it seems that all of those values simply get skipped over. |
Yes, you are right,
|
Got it. I'll test that on my system and update the PR if it works out. |
I just realized that LDFLAGS_EXTRA is not used anywhere else in unix/Makefile; am I correct that this is just a placeholder for flags to be added later in the build process? |
Yes, it's used if you want to add options from the command line. |
Add more specific comments describing what is going on.
Both unix and stmhal build on my system, and it checks out on Travis too. Anything else we might have missed? |
Fix unix/Makefile to build on OSX
Thank you! |
Remove asf3 nvm code.
Please comment and review - I am not an expert in the subtleties of Makefiles!
This unix/Makefile change should allow the unix port to build on OSX without breaking stmhal build on OSX or affecting other platforms. Tested build for unix and stmhal on OSX 10.7.5 (Lion):
Force OSX to compile with clang even if gcc is available
Change LDFLAGS syntax to be compatible with clang
Fix questionable syntax on line 90
Remove extraneous tab character on line 102