Updating project from GCC 4.4.3 to 4.6

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Updating project from GCC 4.4.3 to 4.6

Hertz
Hey!
I have a problem when I attempt to build my project with GCC 4.6 instead of 4.4.3 (android-ndk-r8b) for armeabi architecture using following compiler flags:
-fno-rtti -fno-exceptions -march=armv5te -mtune=xscale -msoft-float -mthumb -mthumb-interwork -fstack-protector -finline-limit=64 -Wno-psabi -O2 -fpic -fno-strict-aliasing -funwind-tables -fno-short-enums -fsigned-char -ffast-math -fvisibility=hidden

Logcat shows some weird problem while loading native library:
E/AndroidRuntime(12818): FATAL EXCEPTION: main
E/AndroidRuntime(12818): java.lang.ExceptionInInitializerError
....
E/AndroidRuntime(12818): Caused by: java.lang.UnsatisfiedLinkError: Cannot load library: reloc_library[1285]:   104 cannot locate '__gnu_thumb1_case_si'...
E/AndroidRuntime(12818): 
E/AndroidRuntime(12818): at java.lang.Runtime.loadLibrary(Runtime.java:370)
E/AndroidRuntime(12818): at java.lang.System.loadLibrary(System.java:539)
E/AndroidRuntime(12818): at com.hertz.myapp.<clinit>(MyApp.java:42)

Other architectures (armeabi-v7a and x86) work okay with GCC4.6.
Google search remains silent on this problem, seems that I am the only one with this issue :-)

Is there something I can do to fix it?

Cheers,
Andrey M.

--
You received this message because you are subscribed to the Google Groups "android-ndk" group.
To view this discussion on the web visit https://groups.google.com/d/msg/android-ndk/-/EEEsP1I82G8J.
To post to this group, send email to [hidden email].
To unsubscribe from this group, send email to [hidden email].
For more options, visit this group at http://groups.google.com/group/android-ndk?hl=en.
Reply | Threaded
Open this post in threaded view
|

Re: Updating project from GCC 4.4.3 to 4.6

Ray Donnelly
Try removing fvisibility=hidden, also try manually linking to libgcc
as the first library that you link to with "-lgcc".

On Tue, Dec 4, 2012 at 1:39 PM, Hertz <[hidden email]> wrote:

> Hey!
> I have a problem when I attempt to build my project with GCC 4.6 instead of
> 4.4.3 (android-ndk-r8b) for armeabi architecture using following compiler
> flags:
> -fno-rtti -fno-exceptions -march=armv5te -mtune=xscale -msoft-float -mthumb
> -mthumb-interwork -fstack-protector -finline-limit=64 -Wno-psabi -O2 -fpic
> -fno-strict-aliasing -funwind-tables -fno-short-enums -fsigned-char
> -ffast-math -fvisibility=hidden
>
> Logcat shows some weird problem while loading native library:
> E/AndroidRuntime(12818): FATAL EXCEPTION: main
> E/AndroidRuntime(12818): java.lang.ExceptionInInitializerError
> ....
> E/AndroidRuntime(12818): Caused by: java.lang.UnsatisfiedLinkError: Cannot
> load library: reloc_library[1285]:   104 cannot locate
> '__gnu_thumb1_case_si'...
> E/AndroidRuntime(12818):
> E/AndroidRuntime(12818): at java.lang.Runtime.loadLibrary(Runtime.java:370)
> E/AndroidRuntime(12818): at java.lang.System.loadLibrary(System.java:539)
> E/AndroidRuntime(12818): at com.hertz.myapp.<clinit>(MyApp.java:42)
>
> Other architectures (armeabi-v7a and x86) work okay with GCC4.6.
> Google search remains silent on this problem, seems that I am the only one
> with this issue :-)
>
> Is there something I can do to fix it?
>
> Cheers,
> Andrey M.
>
> --
> You received this message because you are subscribed to the Google Groups
> "android-ndk" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/android-ndk/-/EEEsP1I82G8J.
> To post to this group, send email to [hidden email].
> To unsubscribe from this group, send email to
> [hidden email].
> For more options, visit this group at
> http://groups.google.com/group/android-ndk?hl=en.

--
You received this message because you are subscribed to the Google Groups "android-ndk" group.
To post to this group, send email to [hidden email].
To unsubscribe from this group, send email to [hidden email].
For more options, visit this group at http://groups.google.com/group/android-ndk?hl=en.