transport-native-kqueue libraries should not lazy link
Motivation: We rely upon the linker being non-lazy to test compatibility the native library compatibility for kqueue, but the default mode of operation is to lazy link. Modifications: - We should modify the build scripts to inform the linker that this library should not be lazy linked - Error messages changes dyld: lazy symbol binding failed: Symbol not found: _clock_gettime java.lang.UnsatisfiedLinkError: unsupported JNI version 0xFFFFFFFF required by .../libnetty-transport-native-kqueue.dylib Result: Link errors are detected upon library load time.
This commit is contained in:
parent
d3c44ef985
commit
07a641900c
@ -79,6 +79,10 @@
|
||||
<configureArgs>
|
||||
<arg>${jni.compiler.args.ldflags}</arg>
|
||||
<arg>${jni.compiler.args.cflags}</arg>
|
||||
<!-- support for __attribute__((weak_import)) by the linker was added in 10.2 so ensure we
|
||||
explicitly set the target platform. Otherwise we may get fatal link errors due to weakly linked
|
||||
methods which are not expected to be present on MacOS (e.g. accept4). -->
|
||||
<arg>MACOSX_DEPLOYMENT_TARGET=10.2</arg>
|
||||
</configureArgs>
|
||||
</configuration>
|
||||
<goals>
|
||||
@ -353,7 +357,7 @@
|
||||
<unix.common.lib.unpacked.dir>${unix.common.lib.dir}/META-INF/native/lib</unix.common.lib.unpacked.dir>
|
||||
<unix.common.include.unpacked.dir>${unix.common.lib.dir}/META-INF/native/include</unix.common.include.unpacked.dir>
|
||||
<jni.compiler.args.cflags>CFLAGS=-O3 -Werror -fno-omit-frame-pointer -Wunused-variable -I${unix.common.include.unpacked.dir}</jni.compiler.args.cflags>
|
||||
<jni.compiler.args.ldflags>LDFLAGS=-L${unix.common.lib.unpacked.dir} -Wl,--whole-archive -l${unix.common.lib.name} -Wl,--no-whole-archive</jni.compiler.args.ldflags>
|
||||
<jni.compiler.args.ldflags>LDFLAGS=-z now -L${unix.common.lib.unpacked.dir} -Wl,--whole-archive -l${unix.common.lib.name} -Wl,--no-whole-archive</jni.compiler.args.ldflags>
|
||||
<skipTests>true</skipTests>
|
||||
</properties>
|
||||
|
||||
|
@ -102,6 +102,10 @@
|
||||
<env key="CFLAGS" value="-O3 -Werror -Wno-attributes -fPIC -fno-omit-frame-pointer -Wunused-variable" />
|
||||
<env key="LDFLAGS" value="-Wl,--no-as-needed -lrt" />
|
||||
<env key="LIB_NAME" value="${nativeLibName}" />
|
||||
<!-- support for __attribute__((weak_import)) by the linker was added in 10.2 so ensure we
|
||||
explicitly set the target platform. Otherwise we may get fatal link errors due to weakly linked
|
||||
methods which are not expected to be present on MacOS (e.g. accept4). -->
|
||||
<env key="MACOSX_DEPLOYMENT_TARGET" value="10.2" />
|
||||
</exec>
|
||||
</target>
|
||||
</configuration>
|
||||
|
Loading…
Reference in New Issue
Block a user