[MERGED] libasn1c[master]: link libasn1c against libmath, don't ask users to do it

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

Harald Welte gerrit-no-reply at lists.osmocom.org
Sat Oct 28 12:13:29 UTC 2017


Harald Welte has submitted this change and it was merged.

Change subject: link libasn1c against libmath, don't ask users to do it
......................................................................


link libasn1c against libmath, don't ask users to do it

libasn1c is using libm[ath] symbols from REAL.c and hence should be
linked using '-lm' to carry a dynamic linker dependency itself.

We shouldn't use a pkg-config hack to ask applications to do this on
our behalf.

Change-Id: Ie107f7252eeed90233468deaef57d3cee36abdf4
---
M libasn1c.pc.in
M src/Makefile.am
2 files changed, 2 insertions(+), 2 deletions(-)

Approvals:
  Harald Welte: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/libasn1c.pc.in b/libasn1c.pc.in
index 89ad53a..ab0c415 100644
--- a/libasn1c.pc.in
+++ b/libasn1c.pc.in
@@ -6,6 +6,6 @@
 Name: asn1c runtime library
 Description: C Utility Library
 Version: @VERSION@
-Libs: -L${libdir} @LIBTALLOC_LIBS@ -lasn1c -lm
+Libs: -L${libdir} @LIBTALLOC_LIBS@ -lasn1c
 Cflags: -I${includedir}/ -I${includedir}/asn1c @LIBTALLOC_CFLAGS@
 
diff --git a/src/Makefile.am b/src/Makefile.am
index 0f05cce..8009c76 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -11,6 +11,6 @@
 
 lib_LTLIBRARIES = libasn1c.la
 
-libasn1c_la_LDFLAGS = $(LIBTALLOC_LIBS)
+libasn1c_la_LDFLAGS = $(LIBTALLOC_LIBS) -lm
 libasn1c_la_SOURCES = ANY.c              constraints.c         GeneralizedTime.c   NumericString.c      T61String.c asn_codecs_prim.c  constr_CHOICE.c       GeneralString.c     ObjectDescriptor.c   TeletexString.c asn_SEQUENCE_OF.c  constr_SEQUENCE.c     GraphicString.c     OBJECT_IDENTIFIER.c  UniversalString.c asn_SET_OF.c       constr_SEQUENCE_OF.c  IA5String.c         OCTET_STRING.c       UTCTime.c ber_decoder.c      constr_SET.c          INTEGER.c           per_decoder.c        UTF8String.c ber_tlv_length.c   constr_SET_OF.c       ISO646String.c      per_encoder.c        VideotexString.c ber_tlv_tag.c      constr_TYPE.c         NativeEnumerated.c  per_support.c        VisibleString.c BIT_STRING.c       NativeInteger.c     PrintableString.c    xer_decoder.c BMPString.c        der_encoder.c         NativeReal.c        REAL.c               xer_encoder.c BOOLEAN.c          ENUMERATED.c          NULL.c              RELATIVE-OID.c       xer_support.c	per_opentype.c        asn1helpers.c
 

-- 
To view, visit https://gerrit.osmocom.org/4518
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ie107f7252eeed90233468deaef57d3cee36abdf4
Gerrit-PatchSet: 1
Gerrit-Project: libasn1c
Gerrit-Branch: master
Gerrit-Owner: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Jenkins Builder



More information about the gerrit-log mailing list