Skip to content

Explicitly link math library - #170

Merged
PJK merged 2 commits into
masterfrom
lm
Nov 27, 2020
Merged

PJK merged 2 commits into
masterfrom
lm

Conversation

@PJK

@PJK PJK commented Nov 27, 2020

Copy link
Copy Markdown
Owner

Closes #169

@PJK
PJK merged commit 0741dd4 into master Nov 27, 2020
@PJK PJK mentioned this pull request Oct 25, 2026
2 of 8 tasks
PJK added a commit that referenced this pull request Oct 25, 2026
* Stop linking the math library

The check for ldexp and the conditional -lm were added in #170 because
_cbor_decode_half called ldexp, which lives in libm on e.g. NetBSD.
Since #453 the library no longer calls it; its remaining <math.h> uses
are the isnan and NAN macros, which need no libm (NetBSD implements
__isnanf in libc).

Link the cjson2cbor example against libm itself since it calls fabs and
could previously have relied on libcbor to pull libm in.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0191nuQHmM9MpnzoHTkUwqXT

* CHANGELOG: math library linkage

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0191nuQHmM9MpnzoHTkUwqXT

---------

Co-authored-by: Claude <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

libcbor needs libm

1 participant

⌂ 换网址