Skip to content

Commit

Permalink
java: Tidy gcc options for building JNI
Browse files Browse the repository at this point in the history
  • Loading branch information
terryburton committed Apr 25, 2024
1 parent 59ddab7 commit 105870e
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/java/build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -69,16 +69,16 @@ the environment variables:

<target name="jni">
<exec executable="gcc" failonerror="true">
<arg line="-fPIC -O2 -g" />
<arg line="-Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,--no-as-needed" />
<arg line="-Werror" />
<arg line="-fPIC -O2 -g -Werror" />
<arg line="-I${clib}" />
<arg line="-I${java.home}/../include" />
<arg line="-I${java.home}/../include/linux" />
<arg line="-I${java.home}/include" />
<arg line="-I${java.home}/include/linux" />
<arg line="-Wl,--whole-archive ../c-lib/build/libgs1encoders.a -Wl,--no-whole-archive" unless:set="link_to_shared_lib" />
<arg line="-L${clib}/build -lgs1encoders" if:set="link_to_shared_lib" />
<arg line="-Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,--no-as-needed" />
<arg line="-Wl,--whole-archive -Wl,-Bstatic" unless:set="link_to_shared_lib" />
<arg line="-L${clib}/build -lgs1encoders" />
<arg line="-Wl,--no-whole-archive -Wl,-Bdynamic" unless:set="link_to_shared_lib" />
<arg line="-shared" />
<arg line="-o ${sofile}" />
<arg line="${wrapfile}" />
Expand Down

0 comments on commit 105870e

Please sign in to comment.