hitHuang commented on PR #2151: URL: https://github.com/apache/nuttx-apps/pull/2151#issuecomment-5150263984
@g2gps @xiaoxiang781216 I came across this PR while debugging a ceil undefined reference in calib_udelay on a BUILD_KERNEL config with CONFIG_LIBM=y (rv-virt:knsh). It turns out the condition else ifneq ($(CONFIG_LIBM_NONE),) is inverted — it adds -lm only when CONFIG_LIBM_NONE is set to y, but the intent is the opposite: add -lm for every math library choice except NONE. When CONFIG_LIBM=y, CONFIG_LIBM_NONE is empty so -lm never gets linked. The fix is simply: -else ifneq ($(CONFIG_LIBM_NONE),) +else ifneq ($(CONFIG_LIBM_NONE),y) Am I missing something here? -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
