Message ID | 20221222225027.277117-1-fontaine.fabrice@gmail.com |
---|---|
State | Accepted |
Headers | show |
Series | [1/1] package/libdeflate: fix static build | expand |
>>>>> "Fabrice" == Fabrice Fontaine <fontaine.fabrice@gmail.com> writes: > Fix the following static build failure raised since bump to version 1.15 > in commit c31087182fa545784d9a0a01f0b32715d78c3955: > [ 79%] Linking C shared library libdeflate.so > /home/buildroot/autobuild/instance-2/output-1/host/lib/gcc/arc-buildroot-linux-uclibc/12.2.0/../../../../arc-buildroot-linux-uclibc/bin/ld: > /home/buildroot/autobuild/instance-2/output-1/host/lib/gcc/arc-buildroot-linux-uclibc/12.2.0/crtbeginT.o: > relocation R_ARC_32_ME against `__TMC_END__' can not be used when > making a shared object; recompile with -fPIC > Fixes: > - http://autobuild.buildroot.org/results/25489e5c6f0da642136e099ab35b091624f53a2b > Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com> Committed, thanks.
>>>>> "Fabrice" == Fabrice Fontaine <fontaine.fabrice@gmail.com> writes: > Fix the following static build failure raised since bump to version 1.15 > in commit c31087182fa545784d9a0a01f0b32715d78c3955: > [ 79%] Linking C shared library libdeflate.so > /home/buildroot/autobuild/instance-2/output-1/host/lib/gcc/arc-buildroot-linux-uclibc/12.2.0/../../../../arc-buildroot-linux-uclibc/bin/ld: > /home/buildroot/autobuild/instance-2/output-1/host/lib/gcc/arc-buildroot-linux-uclibc/12.2.0/crtbeginT.o: > relocation R_ARC_32_ME against `__TMC_END__' can not be used when > making a shared object; recompile with -fPIC > Fixes: > - http://autobuild.buildroot.org/results/25489e5c6f0da642136e099ab35b091624f53a2b > Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com> Committed to 2022.11.x, thanks.
diff --git a/package/libdeflate/libdeflate.mk b/package/libdeflate/libdeflate.mk index 2305af4dc9..67e97c6e5e 100644 --- a/package/libdeflate/libdeflate.mk +++ b/package/libdeflate/libdeflate.mk @@ -12,4 +12,18 @@ LIBDEFLATE_INSTALL_STAGING = YES LIBDEFLATE_CONF_OPTS = \ -DCMAKE_C_FLAGS="$(TARGET_CFLAGS) -D_DEFAULT_SOURCE" +ifeq ($(BR2_SHARED_LIBS),y) +LIBDEFLATE_CONF_OPTS += \ + -DLIBDEFLATE_BUILD_SHARED_LIB=ON \ + -DLIBDEFLATE_BUILD_STATIC_LIB=OFF +else ifeq ($(BR2_STATIC_LIBS),y) +LIBDEFLATE_CONF_OPTS += \ + -DLIBDEFLATE_BUILD_SHARED_LIB=OFF \ + -DLIBDEFLATE_BUILD_STATIC_LIB=ON +else ifeq ($(BR2_SHARED_STATIC_LIBS),y) +LIBDEFLATE_CONF_OPTS += \ + -DLIBDEFLATE_BUILD_SHARED_LIB=ON \ + -DLIBDEFLATE_BUILD_STATIC_LIB=ON +endif + $(eval $(cmake-package))
Fix the following static build failure raised since bump to version 1.15 in commit c31087182fa545784d9a0a01f0b32715d78c3955: [ 79%] Linking C shared library libdeflate.so /home/buildroot/autobuild/instance-2/output-1/host/lib/gcc/arc-buildroot-linux-uclibc/12.2.0/../../../../arc-buildroot-linux-uclibc/bin/ld: /home/buildroot/autobuild/instance-2/output-1/host/lib/gcc/arc-buildroot-linux-uclibc/12.2.0/crtbeginT.o: relocation R_ARC_32_ME against `__TMC_END__' can not be used when making a shared object; recompile with -fPIC Fixes: - http://autobuild.buildroot.org/results/25489e5c6f0da642136e099ab35b091624f53a2b Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com> --- package/libdeflate/libdeflate.mk | 14 ++++++++++++++ 1 file changed, 14 insertions(+)