NDK 11 linker is treating warnings as errors

Viewed 5317

I'm trying to build a library with android ndk-11 and I'm getting a linker error:

arm-linux-androideabi/bin/ld: error: treating warnings as errors

I do not get this error if I use ndk-r10e.

Running ndk-build with V=1, I see that -Wl,--fatal-warnings is being passed to the linker. I've tried adding LOCAL_LDFLAGS:=-Wl,--no-fatal-warnings to my Android.mk file, and I can see in the linker output that it is in fact being passed to the linker, but it is passed before -Wl,--fatal-warnings, so it is being ignored.

The warnings are coming from a 3rd party library, so I can't just recompile it to fix the warnings (they are all 'relocation refers to discarded section' warnings). I've always seen these warnings and have never had any problems.

Does anyone know how to tell the ndk-11 linker not to treat warnings as errors?

1 Answers
Related