-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Develop fix r8b mingw #1499
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
Develop fix r8b mingw #1499
Conversation
- Added missing elif statement for mingw - Changed the compiler from 4.4.3 to 4.6
… to build on Windows. NDK docs state: Support for the gold linker is only available for ARM and x86 architectures on Linux and Mac OS hosts. This support is disabled by default. Add LOCAL_LDLIBS += -fuse-ld=gold in Android.mk to enable it.
mmh, for me it wasn't compiling unless i used gold, i was getting some errors with the linker phase. can you make that conditional for windows? |
That hack is required when building the project on Mac/Linux. But since the next NDK release will probably not require it, I thought that just reverting the hack and adding a small code snippet would be easier (which can/should be removed in future). It should be placed just after the last ifeq catch (line 70) and it will only append if the platform isn't Windows. The alternative would be adding either 4 small ifeq statements for every line that has "-fuse-ld=gold" in it or one big ifeq statement that covers all the 4 statements. Let me know what you would suggest |
apart from been necessary on linux and mac the gold linker is way faster than the normal one. i think the simplest is to add a linker flag conditionally for windows only, in Makefile.android after line 33:
i would add something like:
|
well i think that u should also add cygwin detection here since lots of people using it and now make files cant detect it and set correct PLATFORM |
sorry it took so long! |
Hey dear Falcon4ever, -no offence just criticism for further works- When you prepare a Windows+Eclipse+ADT+NDK compatible setup of the Openframeworks; it should be compatible with ndk-build+cygwin rather then mingw, shouldn't it? |
@noyanc I personally don't use Cygwin so I won't be patching and testing it for that platform. Of course you could patch it yourself by downloading a stable 0.7.x branch and looking for this in the makefile: else ifeq ( and adding this line: else ifeq ( With the release of 0.8.0, I believe the Makefiles have changed quite a bit. A lot of things are now shared between the platforms. I haven't had the chance to see if it still works with MinGw. |
This is an update ( #1484 ) since the merge (208f3bc) broke the windows compatibility.
This hack causes the examples not to build on windows. As stated in the NDK release docs its only for Mac/Linux:
( http://developer.android.com/tools/sdk/ndk/index.html )
Support for the gold linker is only available for ARM and x86 architectures on Linux and Mac OS hosts. This support is disabled by default. Add LOCAL_LDLIBS += -fuse-ld=gold in Android.mk to enable it.
Since a fix will be released in the next NDK (see the reply of this google engineer -> http://code.google.com/p/android/issues/detail?id=35209#c14 ) I would suggest putting "-fuse-ld=gold" in a temporary if statement so it will only append it to LDFLAGS if you're building on the Mac/Linux platform.
For example like:
ifneq ($(shell uname),MINGW32_NT-6.1)
LDFLAGS += -fuse-ld=gold
endif