Skip to content

Commit

Permalink
Fix build failure using the suggestion on java-native-access#173
Browse files Browse the repository at this point in the history
  • Loading branch information
Stefan Saasen committed Apr 2, 2013
1 parent 9106422 commit 5ed7fa2
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion native/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ NDK_PLATFORM?=/Developer/Applications/android-ndk-r7c/platforms/android-14
JAVA_INCLUDES=
CINCLUDES+=-I"$(NDK_PLATFORM)/arch-arm/usr/include" # -I/usr/include
LIBS=-nostdlib -L"$(NDK_PLATFORM)/arch-arm/usr/lib/" -lgcc -lc -ldl -lm
LDFLAGS+=-Wl,-shared,-Bsymbolic
LDFLAGS+=-Wl,-shared,-Bsymbolic,-no_pie,-no_compact_unwind

This comment has been minimized.

Copy link
@twall

twall Apr 3, 2013

This line applies to android-arm, not macosx.

FFI_ENV=CPP="$(CPP)" CC="$(CC)" CFLAGS="$(COPT) $(CDEBUG) $(CINCLUDES)" CPPFLAGS="$(CDEFINES) $(CINCLUDES)" LIBS="$(LIBS)" RANLIB="$(RANLIB)"
FFI_CONFIG=--enable-static --disable-shared --with-pic=yes --host=arm-linux-eabi
endif
Expand Down Expand Up @@ -308,6 +308,8 @@ LDFLAGS=$(ARCHFLAGS) -dynamiclib -o $@ -framework JavaVM \
-compatibility_version $(shell echo ${JNA_JNI_VERSION}|sed 's/^\([0-9][0-9]*\).*/\1/g') \
-current_version $(JNA_JNI_VERSION) \
-mmacosx-version-min=10.3 \
-framework Foundation \
-Wl,-no_compact_unwind,-no_pie \

This comment has been minimized.

Copy link
@twall

twall Apr 3, 2013

Are these options necessary when -framework Foundation is supplied? It would appear that the compact unwind failure is due to the Foundation symbols not being found. Sorry can't check myself, my OSX and Xcode are too old.

-install_name ${@F} \
$(SYSLIBROOT)
# JAWT linkage handled by -framework JavaVM
Expand Down

0 comments on commit 5ed7fa2

Please sign in to comment.