Skip to content

Commit

Permalink
compiler/sim: Link with libbsd
Browse files Browse the repository at this point in the history
baselibc is providing some functions from libbsd eg strlcpy. We are
also using queue.h from BSD which on native build is system wide.

Unfortunatelly libbsd >= 0.11.3 is needed, see [1].
For older versions one need to "define __uintptr_t uintptr_t".

[1] https://gitlab.freedesktop.org/libbsd/libbsd/-/issues/6
  • Loading branch information
sjanc committed Jan 14, 2022
1 parent 79099c7 commit 7318f55
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions compiler/sim/compiler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ compiler.ld.binfile: false
compiler.ld.flags: -lm -Wl,--gc-sections

# Linux.
compiler.flags.base.LINUX: [-DMN_LINUX]
compiler.ld.flags.LINUX: [-lutil]
compiler.flags.base.LINUX: [-DMN_LINUX, -DLIBBSD_OVERLAY -I/usr/include/bsd]
compiler.ld.flags.LINUX: [-lutil -lbsd]

# OS X.
compiler.path.cc.DARWIN.OVERWRITE: "gcc"
Expand Down

0 comments on commit 7318f55

Please sign in to comment.