Please forgive the noob question.

I am porting a Scheme interpreter to riscv64 NuttX as apps/interpreters/umb-scheme/ but the binary fails to link in libm functions.

I could use some help in this.

Specifically, building on Raspberry Pi 4 Raspian 64 bit:

Raspian:RasPi4:~/RISCV/NuttX/apps/bin >>> riscv64-linux-gnu-gcc-nm -u scheme
                 U acos
                 U asin
                 U atan
                 U atan2
                 U ceil
                 U cos
                 U exp
                 U floor
                 U log
                 U pow
                 U sin
                 U sqrt
                 U tan

I am following the Pine64 Start64 recipe, which does yield a bootable NuttX on VisionFive 2 SoC:

https://nuttx.apache.org/docs/latest/platforms/risc-v/jh7110/boards/star64/index.html

My nuttx/.config file contains:

CONFIG_LIBM=y
CONFIG_ARCH_FLOAT_H=y

The interpreter local make/config files are attached. They should be unsurprising.

Perhaps some kind person can help me out with the proper build flags.

Thanks much!
-KenD     [Ken (dot) Dickey (at) Whidbey (dot) COM]





config INTERPRETERS_UMB_SCHEME
        tristate "UMB-Scheme R4RS Scheme interpreter"
        default y
        ---help---
                Enable the UMB-Scheme `scheme` interpreter
                - Be sure to set CONFIG_LIBM=y in your .config file
                - Be sure to set CONFIG_ARCH_SETJMP_H=y in your .config file

#if INTERPRETERS_UMB_SCHEME
#
#config INTERPRETERS_UMB_SCHEME_PRIORITY
#        int "UMB-Scheme task priority"
#        default 100
#
#config INTERPRETERS_UMB_SCHEME_STACKSIZE
#        int "UMB-Scheme stack size"
#       default 4096
#
#endif
# Makefile for the UMB Scheme interpreter.

include $(APPDIR)/Make.defs

# UMB-Scheme built-in application info

PROGNAME  = scheme
PRIORITY  = 100
#$(INTERPRETERS_UMB_SCHEME_PRIORITY)
STACKSIZE = 4096
#$(INTERPRETERS_UMB_SCHEME_STACKSIZE)
MODULE    = $(INTERPRETERS_UMB_SCHEME)

# UMB-Scheme components

CSRCS =  object.c primitive.c debug.c
CSRCS += io.c compiler.c eval.c architecture.c number.c
CSRCS += fixnum.c bignum.c rational.c real.c complex.c

MAINSRC = steering.c

###??### LDLIBS += ${NUTTX_PATH}/libs

include $(APPDIR)/Application.mk

### E O F ###
# ?? How to turn off  -Wstrict-prototypes  ??
ifneq ($(CONFIG_INTERPRETERS_UMB_SCHEME),)
CONFIGURED_APPS += $(APPDIR)/interpreters/umb-scheme
CFLAGS += -lm 
endif

Reply via email to