I appear to be getting this whenever I compile for no discernible reason.


Code:
/usr/local/cross/bin/sh3eb-elf-gcc -MMD -MP -MF /home/atrt7/libfxcg/projects/jenncraft/build/main.d -Os -Wall -mb -m4a-nofpu -mhitachi -nostdlib   -I/home/atrt7/libfxcg/projects/jenncraft/build -I/home/atrt7/libfxcg/include -ffunction-sections -fdata-sections -std=c99 -c /home/atrt7/libfxcg/projects/jenncraft/src/main.c -o main.o
/usr/local/cross/bin/sh3eb-elf-gcc  drawing.o fixed.o input.o main.o util.o -mb -m4a-nofpu -mhitachi -nostdlib -T/home/atrt7/libfxcg/toolchain/prizm.x -Wl,-static -Wl,-gc-sections  -L/home/atrt7/libfxcg/lib -lfxcg -lc -lgcc -o /home/atrt7/libfxcg/projects/jenncraft/jenncraft.bin
/usr/local/cross/lib/gcc/sh3eb-elf/10.3.0/../../../../sh3eb-elf/bin/ld: /home/atrt7/libfxcg/lib/libc.a(string.o): in function `strcat':
/home/atrt7/libfxcg/libc/string.c:65: undefined reference to `_strlen'
/usr/local/cross/lib/gcc/sh3eb-elf/10.3.0/../../../../sh3eb-elf/bin/ld: /home/atrt7/libfxcg/lib/libc.a(string.o): in function `strdup':
/home/atrt7/libfxcg/libc/string.c:115: undefined reference to `_strlen'
/usr/local/cross/lib/gcc/sh3eb-elf/10.3.0/../../../../sh3eb-elf/bin/ld: /home/atrt7/libfxcg/lib/libc.a(string.o): in function `strncpy':
/home/atrt7/libfxcg/libc/string.c:153: undefined reference to `_strlen'
/usr/local/cross/lib/gcc/sh3eb-elf/10.3.0/../../../../sh3eb-elf/bin/ld: /home/atrt7/libfxcg/lib/libc.a(string.o): in function `strncat':
/home/atrt7/libfxcg/libc/string.c:122: undefined reference to `_strlen'
/usr/local/cross/lib/gcc/sh3eb-elf/10.3.0/../../../../sh3eb-elf/bin/ld: /home/atrt7/libfxcg/lib/libc.a(string.o): in function `strpbrk':
/home/atrt7/libfxcg/libc/string.c:172: undefined reference to `_strlen'
/usr/local/cross/lib/gcc/sh3eb-elf/10.3.0/../../../../sh3eb-elf/bin/ld: /home/atrt7/libfxcg/lib/libc.a(string.o):/home/atrt7/libfxcg/libc/string.c:109: more undefined references to `_strlen' follow
/usr/local/cross/lib/gcc/sh3eb-elf/10.3.0/../../../../sh3eb-elf/bin/ld: /home/atrt7/libfxcg/lib/libc.a(stdlib.o): in function `malloc':
/home/atrt7/libfxcg/libc/stdlib.c:14: undefined reference to `_sys_malloc'
/usr/local/cross/lib/gcc/sh3eb-elf/10.3.0/../../../../sh3eb-elf/bin/ld: /home/atrt7/libfxcg/lib/libc.a(stdlib.o): in function `realloc':
/home/atrt7/libfxcg/libc/stdlib.c:18: undefined reference to `_sys_realloc'
/usr/local/cross/lib/gcc/sh3eb-elf/10.3.0/../../../../sh3eb-elf/bin/ld: /home/atrt7/libfxcg/lib/libc.a(stdlib.o): in function `free':
/home/atrt7/libfxcg/libc/stdlib.c:22: undefined reference to `_sys_free'
/usr/local/cross/lib/gcc/sh3eb-elf/10.3.0/../../../../sh3eb-elf/bin/ld: /home/atrt7/libfxcg/lib/libc.a(stdlib.o): in function `exit':
/home/atrt7/libfxcg/libc/stdlib.c:53: undefined reference to `_EnableStatusArea'
/usr/local/cross/lib/gcc/sh3eb-elf/10.3.0/../../../../sh3eb-elf/bin/ld: /home/atrt7/libfxcg/libc/stdlib.c:53: undefined reference to `_DefineStatusAreaFlags'
/usr/local/cross/lib/gcc/sh3eb-elf/10.3.0/../../../../sh3eb-elf/bin/ld: /home/atrt7/libfxcg/libc/stdlib.c:53: undefined reference to `_DefineStatusMessage'
/usr/local/cross/lib/gcc/sh3eb-elf/10.3.0/../../../../sh3eb-elf/bin/ld: /home/atrt7/libfxcg/libc/stdlib.c:53: undefined reference to `_DisplayStatusArea'
/usr/local/cross/lib/gcc/sh3eb-elf/10.3.0/../../../../sh3eb-elf/bin/ld: /home/atrt7/libfxcg/lib/libc.a(stdlib.o): in function `abort':
/home/atrt7/libfxcg/libc/stdlib.c:72: undefined reference to `_EnableStatusArea'
/usr/local/cross/lib/gcc/sh3eb-elf/10.3.0/../../../../sh3eb-elf/bin/ld: /home/atrt7/libfxcg/libc/stdlib.c:72: undefined reference to `_DefineStatusAreaFlags'
/usr/local/cross/lib/gcc/sh3eb-elf/10.3.0/../../../../sh3eb-elf/bin/ld: /home/atrt7/libfxcg/libc/stdlib.c:72: undefined reference to `_DefineStatusMessage'
/usr/local/cross/lib/gcc/sh3eb-elf/10.3.0/../../../../sh3eb-elf/bin/ld: /home/atrt7/libfxcg/libc/stdlib.c:72: undefined reference to `_DisplayStatusArea'
/usr/local/cross/lib/gcc/sh3eb-elf/10.3.0/../../../../sh3eb-elf/bin/ld: /home/atrt7/libfxcg/lib/libc.a(stdio.o): in function `serial_ensureopen':
/home/atrt7/libfxcg/libc/stdio.c:136: undefined reference to `_Serial_IsOpen'
/usr/local/cross/lib/gcc/sh3eb-elf/10.3.0/../../../../sh3eb-elf/bin/ld: /home/atrt7/libfxcg/libc/stdio.c:136: undefined reference to `_Serial_Open'
/usr/local/cross/lib/gcc/sh3eb-elf/10.3.0/../../../../sh3eb-elf/bin/ld: /home/atrt7/libfxcg/lib/libc.a(stdio.o): in function `fopen':
/home/atrt7/libfxcg/libc/stdio.c:108: undefined reference to `_strlen'
/usr/local/cross/lib/gcc/sh3eb-elf/10.3.0/../../../../sh3eb-elf/bin/ld: /home/atrt7/libfxcg/libc/stdio.c:108: undefined reference to `_Bfile_OpenFile_OS'
/usr/local/cross/lib/gcc/sh3eb-elf/10.3.0/../../../../sh3eb-elf/bin/ld: /home/atrt7/libfxcg/libc/stdio.c:108: undefined reference to `_Bfile_StrToName_ncpy'
/usr/local/cross/lib/gcc/sh3eb-elf/10.3.0/../../../../sh3eb-elf/bin/ld: /home/atrt7/libfxcg/libc/stdio.c:108: undefined reference to `_Bfile_CreateEntry_OS'
/usr/local/cross/lib/gcc/sh3eb-elf/10.3.0/../../../../sh3eb-elf/bin/ld: /home/atrt7/libfxcg/libc/stdio.c:108: undefined reference to `_sys_malloc'
/usr/local/cross/lib/gcc/sh3eb-elf/10.3.0/../../../../sh3eb-elf/bin/ld: /home/atrt7/libfxcg/lib/libc.a(stdio.o): in function `fclose':
/home/atrt7/libfxcg/libc/stdio.c:126: undefined reference to `_Bfile_CloseFile_OS'
/usr/local/cross/lib/gcc/sh3eb-elf/10.3.0/../../../../sh3eb-elf/bin/ld: /home/atrt7/libfxcg/libc/stdio.c:126: undefined reference to `_sys_free'
/usr/local/cross/lib/gcc/sh3eb-elf/10.3.0/../../../../sh3eb-elf/bin/ld: /home/atrt7/libfxcg/lib/libc.a(stdio.o): in function `fwrite_term':
/home/atrt7/libfxcg/libc/stdio.c:195: undefined reference to `_Serial_PollTX'
/usr/local/cross/lib/gcc/sh3eb-elf/10.3.0/../../../../sh3eb-elf/bin/ld: /home/atrt7/libfxcg/libc/stdio.c:195: undefined reference to `_Serial_Write'
/usr/local/cross/lib/gcc/sh3eb-elf/10.3.0/../../../../sh3eb-elf/bin/ld: /home/atrt7/libfxcg/libc/stdio.c:195: undefined reference to `_sys_malloc'
/usr/local/cross/lib/gcc/sh3eb-elf/10.3.0/../../../../sh3eb-elf/bin/ld: /home/atrt7/libfxcg/libc/stdio.c:195: undefined reference to `_PrintMiniMini'
/usr/local/cross/lib/gcc/sh3eb-elf/10.3.0/../../../../sh3eb-elf/bin/ld: /home/atrt7/libfxcg/libc/stdio.c:195: undefined reference to `_Bfile_WriteFile_OS'
/usr/local/cross/lib/gcc/sh3eb-elf/10.3.0/../../../../sh3eb-elf/bin/ld: /home/atrt7/libfxcg/libc/stdio.c:195: undefined reference to `_sys_free'
/usr/local/cross/lib/gcc/sh3eb-elf/10.3.0/../../../../sh3eb-elf/bin/ld: /home/atrt7/libfxcg/lib/libc.a(stdio.o): in function `fread_serial':
/home/atrt7/libfxcg/libc/stdio.c:229: undefined reference to `_Serial_PollRX'
/usr/local/cross/lib/gcc/sh3eb-elf/10.3.0/../../../../sh3eb-elf/bin/ld: /home/atrt7/libfxcg/libc/stdio.c:229: undefined reference to `_Serial_Read'
/usr/local/cross/lib/gcc/sh3eb-elf/10.3.0/../../../../sh3eb-elf/bin/ld: /home/atrt7/libfxcg/lib/libc.a(stdio.o): in function `fread':
/home/atrt7/libfxcg/libc/stdio.c:254: undefined reference to `_Bfile_ReadFile_OS'
/usr/local/cross/lib/gcc/sh3eb-elf/10.3.0/../../../../sh3eb-elf/bin/ld: /home/atrt7/libfxcg/lib/libc.a(stdio.o): in function `fputs':
/home/atrt7/libfxcg/libc/stdio.c:272: undefined reference to `_strlen'
/usr/local/cross/lib/gcc/sh3eb-elf/10.3.0/../../../../sh3eb-elf/bin/ld: /home/atrt7/libfxcg/lib/libc.a(stdio.o): in function `ftell':
/home/atrt7/libfxcg/libc/stdio.c:344: undefined reference to `_Bfile_TellFile_OS'
/usr/local/cross/lib/gcc/sh3eb-elf/10.3.0/../../../../sh3eb-elf/bin/ld: /home/atrt7/libfxcg/lib/libc.a(stdio.o): in function `fseek':
/home/atrt7/libfxcg/libc/stdio.c:320: undefined reference to `_Bfile_SeekFile_OS'
/usr/local/cross/lib/gcc/sh3eb-elf/10.3.0/../../../../sh3eb-elf/bin/ld: /home/atrt7/libfxcg/lib/libc.a(stdio.o): in function `perror':
/home/atrt7/libfxcg/libc/stdio.c:356: undefined reference to `_strlen'
/usr/local/cross/lib/gcc/sh3eb-elf/10.3.0/../../../../sh3eb-elf/bin/ld: /home/atrt7/libfxcg/lib/libc.a(stdio.o): in function `remove':
/home/atrt7/libfxcg/libc/stdio.c:377: undefined reference to `_strlen'
/usr/local/cross/lib/gcc/sh3eb-elf/10.3.0/../../../../sh3eb-elf/bin/ld: /home/atrt7/libfxcg/libc/stdio.c:377: undefined reference to `_Bfile_StrToName_ncpy'
/usr/local/cross/lib/gcc/sh3eb-elf/10.3.0/../../../../sh3eb-elf/bin/ld: /home/atrt7/libfxcg/libc/stdio.c:377: undefined reference to `_Bfile_DeleteEntry'
/usr/local/cross/lib/gcc/sh3eb-elf/10.3.0/../../../../sh3eb-elf/bin/ld: /home/atrt7/libfxcg/lib/libc.a(stdio.o): in function `rename':
/home/atrt7/libfxcg/libc/stdio.c:393: undefined reference to `_strlen'
/usr/local/cross/lib/gcc/sh3eb-elf/10.3.0/../../../../sh3eb-elf/bin/ld: /home/atrt7/libfxcg/libc/stdio.c:393: undefined reference to `_Bfile_StrToName_ncpy'
/usr/local/cross/lib/gcc/sh3eb-elf/10.3.0/../../../../sh3eb-elf/bin/ld: /home/atrt7/libfxcg/libc/stdio.c:393: undefined reference to `_Bfile_RenameEntry'
/usr/local/cross/lib/gcc/sh3eb-elf/10.3.0/../../../../sh3eb-elf/bin/ld: /home/atrt7/libfxcg/lib/libc.a(stdio.o): in function `mkdir':
/home/atrt7/libfxcg/libc/stdio.c:411: undefined reference to `_strlen'
/usr/local/cross/lib/gcc/sh3eb-elf/10.3.0/../../../../sh3eb-elf/bin/ld: /home/atrt7/libfxcg/libc/stdio.c:411: undefined reference to `_Bfile_StrToName_ncpy'
/usr/local/cross/lib/gcc/sh3eb-elf/10.3.0/../../../../sh3eb-elf/bin/ld: /home/atrt7/libfxcg/libc/stdio.c:411: undefined reference to `_Bfile_CreateEntry_OS'
collect2: error: ld returned 1 exit status
make[1]: *** [/home/atrt7/libfxcg/toolchain/prizm_rules:83: /home/atrt7/libfxcg/projects/jenncraft/jenncraft.bin] Error 1
make: *** [Makefile:104: all] Error 2
Here is the Makefile


Code:
#---------------------------------------------------------------------------------
# Clear the implicit built in rules
#---------------------------------------------------------------------------------
.SUFFIXES:
#---------------------------------------------------------------------------------
# Set toolchain location in an environment var for future use, this will change
# to use a system environment var in the future.
#---------------------------------------------------------------------------------
ifeq ($(strip $(FXCGSDK)),)
export FXCGSDK := $(abspath ../../)
endif

include $(FXCGSDK)/toolchain/prizm_rules


#---------------------------------------------------------------------------------
# TARGET is the name of the output
# BUILD is the directory where object files & intermediate files will be placed
# SOURCES is a list of directories containing source code
# INCLUDES is a list of directories containing extra header files
#---------------------------------------------------------------------------------
TARGET      :=   $(notdir $(CURDIR))
BUILD      :=   build
SOURCES      :=   src
DATA      :=   data 
INCLUDES   :=

#---------------------------------------------------------------------------------
# options for code and add-in generation
#---------------------------------------------------------------------------------

MKG3AFLAGS := -n basic:jenncraft -i uns:../unselected.bmp -i sel:../selected.bmp

CFLAGS   = -Os -Wall $(MACHDEP) $(INCLUDE) -ffunction-sections -fdata-sections -std=c99
CXXFLAGS   =   $(CFLAGS)

LDFLAGS   = $(MACHDEP) -T$(FXCGSDK)/toolchain/prizm.x -Wl,-static -Wl,-gc-sections

#---------------------------------------------------------------------------------
# any extra libraries we wish to link with the project
#---------------------------------------------------------------------------------
LIBS   :=   -lfxcg -lc -lgcc

#---------------------------------------------------------------------------------
# list of directories containing libraries, this must be the top level containing
# include and lib
#---------------------------------------------------------------------------------
LIBDIRS   :=

#---------------------------------------------------------------------------------
# no real need to edit anything past this point unless you need to add additional
# rules for different file extensions
#---------------------------------------------------------------------------------
ifneq ($(BUILD),$(notdir $(CURDIR)))
#---------------------------------------------------------------------------------

export OUTPUT   :=   $(CURDIR)/$(TARGET)

export VPATH   :=   $(foreach dir,$(SOURCES),$(CURDIR)/$(dir)) \
               $(foreach dir,$(DATA),$(CURDIR)/$(dir))

export DEPSDIR   :=   $(CURDIR)/$(BUILD)

#---------------------------------------------------------------------------------
# automatically build a list of object files for our project
#---------------------------------------------------------------------------------
CFILES      :=   $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.c)))
CPPFILES   :=   $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.cpp)))
sFILES      :=   $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.s)))
SFILES      :=   $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.S)))
BINFILES   :=   $(foreach dir,$(DATA),$(notdir $(wildcard $(dir)/*.*)))

#---------------------------------------------------------------------------------
# use CXX for linking C++ projects, CC for standard C
#---------------------------------------------------------------------------------
ifeq ($(strip $(CPPFILES)),)
   export LD   :=   $(CC)
else
   export LD   :=   $(CXX)
endif

export OFILES   :=   $(addsuffix .o,$(BINFILES)) \
               $(CPPFILES:.cpp=.o) $(CFILES:.c=.o) \
               $(sFILES:.s=.o) $(SFILES:.S=.o)

#---------------------------------------------------------------------------------
# build a list of include paths
#---------------------------------------------------------------------------------
export INCLUDE   :=   $(foreach dir,$(INCLUDES), -iquote $(CURDIR)/$(dir)) \
               $(foreach dir,$(LIBDIRS),-I$(dir)/include) \
               -I$(CURDIR)/$(BUILD) -I$(LIBFXCG_INC)

#---------------------------------------------------------------------------------
# build a list of library paths
#---------------------------------------------------------------------------------
export LIBPATHS   :=   $(foreach dir,$(LIBDIRS),-L$(dir)/lib) \
               -L$(LIBFXCG_LIB)

export OUTPUT   :=   $(CURDIR)/$(TARGET)
.PHONY: all clean

#---------------------------------------------------------------------------------
all: $(BUILD)
   @make --no-print-directory -C $(BUILD) -f $(CURDIR)/Makefile

$(BUILD):
   @mkdir $@

#---------------------------------------------------------------------------------
export CYGWIN := nodosfilewarning
clean:
   $(call rmdir,$(BUILD))
   $(call rm,$(OUTPUT).bin)
   $(call rm,$(OUTPUT).g3a)

#---------------------------------------------------------------------------------
else

DEPENDS   :=   $(OFILES:.o=.d)

#---------------------------------------------------------------------------------
# main targets
#---------------------------------------------------------------------------------
$(OUTPUT).g3a: $(OUTPUT).bin
$(OUTPUT).bin: $(OFILES)


-include $(DEPENDS)

#---------------------------------------------------------------------------------
endif
#---------------------------------------------------------------------------------
Seems like the string functions don't often get used, or people are building with optimization cranked up so they get inlined. Looks like we don't actually provide an implementation of strlen right now.

I've put together something that I think will help you, if you can grab the 'libfxcg' artifact from https://github.com/Jonimoose/libfxcg/actions/runs/765563190 and replace the .a files in your SDK with the downloaded ones. If that fixes your build I can build a new release with that fixed.
Here is the output after changing those files.


Code:
/usr/local/cross/bin/sh3eb-elf-gcc -MMD -MP -MF /home/atrt7/libfxcg/projects/jenncraft/build/main.d -Os -Wall -mb -m4a-nofpu -mhitachi -nostdlib   -I/home/atrt7/libfxcg/projects/jenncraft/build -I/home/atrt7/libfxcg/include -ffunction-sections -fdata-sections -std=c99 -c /home/atrt7/libfxcg/projects/jenncraft/src/main.c -o main.o
/usr/local/cross/bin/sh3eb-elf-gcc  drawing.o fixed.o input.o main.o util.o -mb -m4a-nofpu -mhitachi -nostdlib -T/home/atrt7/libfxcg/toolchain/prizm.x -Wl,-static -Wl,-gc-sections  -L/home/atrt7/libfxcg/lib -lfxcg -lc -lgcc -o /home/atrt7/libfxcg/projects/jenncraft/jenncraft.bin
/usr/local/cross/lib/gcc/sh3eb-elf/10.3.0/../../../../sh3eb-elf/bin/ld: /home/atrt7/libfxcg/lib/libc.a(string.o): in function `strlen':
/__w/libfxcg/libfxcg/libc/string.c:65: undefined reference to `_sys_strlen'
/usr/local/cross/lib/gcc/sh3eb-elf/10.3.0/../../../../sh3eb-elf/bin/ld: /home/atrt7/libfxcg/lib/libc.a(string.o): in function `strcat':
/__w/libfxcg/libfxcg/libc/string.c:73: undefined reference to `_sys_strlen'
/usr/local/cross/lib/gcc/sh3eb-elf/10.3.0/../../../../sh3eb-elf/bin/ld: /home/atrt7/libfxcg/lib/libc.a(string.o): in function `strdup':
/__w/libfxcg/libfxcg/libc/string.c:123: undefined reference to `_sys_strlen'
/usr/local/cross/lib/gcc/sh3eb-elf/10.3.0/../../../../sh3eb-elf/bin/ld: /home/atrt7/libfxcg/lib/libc.a(string.o): in function `strncpy':
/__w/libfxcg/libfxcg/libc/string.c:161: undefined reference to `_sys_strlen'
/usr/local/cross/lib/gcc/sh3eb-elf/10.3.0/../../../../sh3eb-elf/bin/ld: /home/atrt7/libfxcg/lib/libc.a(string.o): in function `strncat':
/__w/libfxcg/libfxcg/libc/string.c:130: undefined reference to `_sys_strlen'
/usr/local/cross/lib/gcc/sh3eb-elf/10.3.0/../../../../sh3eb-elf/bin/ld: /home/atrt7/libfxcg/lib/libc.a(string.o):/__w/libfxcg/libfxcg/libc/string.c:180: more undefined references to `_sys_strlen' follow
/usr/local/cross/lib/gcc/sh3eb-elf/10.3.0/../../../../sh3eb-elf/bin/ld: /home/atrt7/libfxcg/lib/libc.a(stdlib.o): in function `malloc':
/__w/libfxcg/libfxcg/libc/stdlib.c:14: undefined reference to `_sys_malloc'
/usr/local/cross/lib/gcc/sh3eb-elf/10.3.0/../../../../sh3eb-elf/bin/ld: /home/atrt7/libfxcg/lib/libc.a(stdlib.o): in function `realloc':
/__w/libfxcg/libfxcg/libc/stdlib.c:18: undefined reference to `_sys_realloc'
/usr/local/cross/lib/gcc/sh3eb-elf/10.3.0/../../../../sh3eb-elf/bin/ld: /home/atrt7/libfxcg/lib/libc.a(stdlib.o): in function `free':
/__w/libfxcg/libfxcg/libc/stdlib.c:22: undefined reference to `_sys_free'
/usr/local/cross/lib/gcc/sh3eb-elf/10.3.0/../../../../sh3eb-elf/bin/ld: /home/atrt7/libfxcg/lib/libc.a(stdlib.o): in function `exit':
/__w/libfxcg/libfxcg/libc/stdlib.c:53: undefined reference to `_EnableStatusArea'
/usr/local/cross/lib/gcc/sh3eb-elf/10.3.0/../../../../sh3eb-elf/bin/ld: /__w/libfxcg/libfxcg/libc/stdlib.c:53: undefined reference to `_DefineStatusAreaFlags'
/usr/local/cross/lib/gcc/sh3eb-elf/10.3.0/../../../../sh3eb-elf/bin/ld: /__w/libfxcg/libfxcg/libc/stdlib.c:53: undefined reference to `_DefineStatusMessage'
/usr/local/cross/lib/gcc/sh3eb-elf/10.3.0/../../../../sh3eb-elf/bin/ld: /__w/libfxcg/libfxcg/libc/stdlib.c:53: undefined reference to `_DisplayStatusArea'
/usr/local/cross/lib/gcc/sh3eb-elf/10.3.0/../../../../sh3eb-elf/bin/ld: /home/atrt7/libfxcg/lib/libc.a(stdlib.o): in function `abort':
/__w/libfxcg/libfxcg/libc/stdlib.c:72: undefined reference to `_EnableStatusArea'
/usr/local/cross/lib/gcc/sh3eb-elf/10.3.0/../../../../sh3eb-elf/bin/ld: /__w/libfxcg/libfxcg/libc/stdlib.c:72: undefined reference to `_DefineStatusAreaFlags'
/usr/local/cross/lib/gcc/sh3eb-elf/10.3.0/../../../../sh3eb-elf/bin/ld: /__w/libfxcg/libfxcg/libc/stdlib.c:72: undefined reference to `_DefineStatusMessage'
/usr/local/cross/lib/gcc/sh3eb-elf/10.3.0/../../../../sh3eb-elf/bin/ld: /__w/libfxcg/libfxcg/libc/stdlib.c:72: undefined reference to `_DisplayStatusArea'
/usr/local/cross/lib/gcc/sh3eb-elf/10.3.0/../../../../sh3eb-elf/bin/ld: /home/atrt7/libfxcg/lib/libc.a(stdio.o): in function `serial_ensureopen':
/__w/libfxcg/libfxcg/libc/stdio.c:136: undefined reference to `_Serial_IsOpen'
/usr/local/cross/lib/gcc/sh3eb-elf/10.3.0/../../../../sh3eb-elf/bin/ld: /__w/libfxcg/libfxcg/libc/stdio.c:136: undefined reference to `_Serial_Open'
/usr/local/cross/lib/gcc/sh3eb-elf/10.3.0/../../../../sh3eb-elf/bin/ld: /home/atrt7/libfxcg/lib/libc.a(stdio.o): in function `fopen':
/__w/libfxcg/libfxcg/libc/stdio.c:108: undefined reference to `_Bfile_OpenFile_OS'
/usr/local/cross/lib/gcc/sh3eb-elf/10.3.0/../../../../sh3eb-elf/bin/ld: /__w/libfxcg/libfxcg/libc/stdio.c:108: undefined reference to `_Bfile_StrToName_ncpy'
/usr/local/cross/lib/gcc/sh3eb-elf/10.3.0/../../../../sh3eb-elf/bin/ld: /__w/libfxcg/libfxcg/libc/stdio.c:108: undefined reference to `_Bfile_CreateEntry_OS'
/usr/local/cross/lib/gcc/sh3eb-elf/10.3.0/../../../../sh3eb-elf/bin/ld: /__w/libfxcg/libfxcg/libc/stdio.c:108: undefined reference to `_sys_malloc'
/usr/local/cross/lib/gcc/sh3eb-elf/10.3.0/../../../../sh3eb-elf/bin/ld: /home/atrt7/libfxcg/lib/libc.a(stdio.o): in function `fclose':
/__w/libfxcg/libfxcg/libc/stdio.c:126: undefined reference to `_Bfile_CloseFile_OS'
/usr/local/cross/lib/gcc/sh3eb-elf/10.3.0/../../../../sh3eb-elf/bin/ld: /__w/libfxcg/libfxcg/libc/stdio.c:126: undefined reference to `_sys_free'
/usr/local/cross/lib/gcc/sh3eb-elf/10.3.0/../../../../sh3eb-elf/bin/ld: /home/atrt7/libfxcg/lib/libc.a(stdio.o): in function `fwrite_term':
/__w/libfxcg/libfxcg/libc/stdio.c:195: undefined reference to `_Serial_PollTX'
/usr/local/cross/lib/gcc/sh3eb-elf/10.3.0/../../../../sh3eb-elf/bin/ld: /__w/libfxcg/libfxcg/libc/stdio.c:195: undefined reference to `_Serial_Write'
/usr/local/cross/lib/gcc/sh3eb-elf/10.3.0/../../../../sh3eb-elf/bin/ld: /__w/libfxcg/libfxcg/libc/stdio.c:195: undefined reference to `_sys_malloc'
/usr/local/cross/lib/gcc/sh3eb-elf/10.3.0/../../../../sh3eb-elf/bin/ld: /__w/libfxcg/libfxcg/libc/stdio.c:195: undefined reference to `_PrintMiniMini'
/usr/local/cross/lib/gcc/sh3eb-elf/10.3.0/../../../../sh3eb-elf/bin/ld: /__w/libfxcg/libfxcg/libc/stdio.c:195: undefined reference to `_Bfile_WriteFile_OS'
/usr/local/cross/lib/gcc/sh3eb-elf/10.3.0/../../../../sh3eb-elf/bin/ld: /__w/libfxcg/libfxcg/libc/stdio.c:195: undefined reference to `_sys_free'
/usr/local/cross/lib/gcc/sh3eb-elf/10.3.0/../../../../sh3eb-elf/bin/ld: /home/atrt7/libfxcg/lib/libc.a(stdio.o): in function `fread_serial':
/__w/libfxcg/libfxcg/libc/stdio.c:229: undefined reference to `_Serial_PollRX'
/usr/local/cross/lib/gcc/sh3eb-elf/10.3.0/../../../../sh3eb-elf/bin/ld: /__w/libfxcg/libfxcg/libc/stdio.c:229: undefined reference to `_Serial_Read'
/usr/local/cross/lib/gcc/sh3eb-elf/10.3.0/../../../../sh3eb-elf/bin/ld: /home/atrt7/libfxcg/lib/libc.a(stdio.o): in function `fread':
/__w/libfxcg/libfxcg/libc/stdio.c:254: undefined reference to `_Bfile_ReadFile_OS'
/usr/local/cross/lib/gcc/sh3eb-elf/10.3.0/../../../../sh3eb-elf/bin/ld: /home/atrt7/libfxcg/lib/libc.a(stdio.o): in function `ftell':
/__w/libfxcg/libfxcg/libc/stdio.c:344: undefined reference to `_Bfile_TellFile_OS'
/usr/local/cross/lib/gcc/sh3eb-elf/10.3.0/../../../../sh3eb-elf/bin/ld: /home/atrt7/libfxcg/lib/libc.a(stdio.o): in function `fseek':
/__w/libfxcg/libfxcg/libc/stdio.c:320: undefined reference to `_Bfile_SeekFile_OS'
/usr/local/cross/lib/gcc/sh3eb-elf/10.3.0/../../../../sh3eb-elf/bin/ld: /home/atrt7/libfxcg/lib/libc.a(stdio.o): in function `remove':
/__w/libfxcg/libfxcg/libc/stdio.c:377: undefined reference to `_Bfile_StrToName_ncpy'
/usr/local/cross/lib/gcc/sh3eb-elf/10.3.0/../../../../sh3eb-elf/bin/ld: /__w/libfxcg/libfxcg/libc/stdio.c:377: undefined reference to `_Bfile_DeleteEntry'
/usr/local/cross/lib/gcc/sh3eb-elf/10.3.0/../../../../sh3eb-elf/bin/ld: /home/atrt7/libfxcg/lib/libc.a(stdio.o): in function `rename':
/__w/libfxcg/libfxcg/libc/stdio.c:393: undefined reference to `_Bfile_StrToName_ncpy'
/usr/local/cross/lib/gcc/sh3eb-elf/10.3.0/../../../../sh3eb-elf/bin/ld: /__w/libfxcg/libfxcg/libc/stdio.c:393: undefined reference to `_Bfile_RenameEntry'
/usr/local/cross/lib/gcc/sh3eb-elf/10.3.0/../../../../sh3eb-elf/bin/ld: /home/atrt7/libfxcg/lib/libc.a(stdio.o): in function `mkdir':
/__w/libfxcg/libfxcg/libc/stdio.c:411: undefined reference to `_Bfile_StrToName_ncpy'
/usr/local/cross/lib/gcc/sh3eb-elf/10.3.0/../../../../sh3eb-elf/bin/ld: /__w/libfxcg/libfxcg/libc/stdio.c:411: undefined reference to `_Bfile_CreateEntry_OS'
collect2: error: ld returned 1 exit status
make[1]: *** [/home/atrt7/libfxcg/toolchain/prizm_rules:83: /home/atrt7/libfxcg/projects/jenncraft/jenncraft.bin] Error 1
make: *** [Makefile:104: all] Error 2
So that seems to have helped, and there's another issue now.

Try modifying the LIBS line in your Makefile as well, to read -lc -lfxcg -lgcc. (Seems like libc should be able to depend on libfxcg, and libfxcg should not depend on libc.)
This is the output of that.


Code:
/usr/local/cross/bin/sh3eb-elf-gcc  drawing.o fixed.o input.o main.o util.o -mb -m4a-nofpu -mhitachi -nostdlib -T/home/atrt7/libfxcg/toolchain/prizm.x -Wl,-static -Wl,-gc-sections  -L/home/atrt7/libfxcg/lib -lc -lfxcg -lgcc -o /home/atrt7/libfxcg/projects/jenncraft/jenncraft.bin
/usr/local/cross/lib/gcc/sh3eb-elf/10.3.0/../../../../sh3eb-elf/bin/ld: /home/atrt7/libfxcg/lib/libc.a(string.o): in function `strlen':
/__w/libfxcg/libfxcg/libc/string.c:65: undefined reference to `_sys_strlen'
/usr/local/cross/lib/gcc/sh3eb-elf/10.3.0/../../../../sh3eb-elf/bin/ld: /home/atrt7/libfxcg/lib/libc.a(string.o): in function `strcat':
/__w/libfxcg/libfxcg/libc/string.c:73: undefined reference to `_sys_strlen'
/usr/local/cross/lib/gcc/sh3eb-elf/10.3.0/../../../../sh3eb-elf/bin/ld: /home/atrt7/libfxcg/lib/libc.a(string.o): in function `strdup':
/__w/libfxcg/libfxcg/libc/string.c:123: undefined reference to `_sys_strlen'
/usr/local/cross/lib/gcc/sh3eb-elf/10.3.0/../../../../sh3eb-elf/bin/ld: /home/atrt7/libfxcg/lib/libc.a(string.o): in function `strncpy':
/__w/libfxcg/libfxcg/libc/string.c:161: undefined reference to `_sys_strlen'
/usr/local/cross/lib/gcc/sh3eb-elf/10.3.0/../../../../sh3eb-elf/bin/ld: /home/atrt7/libfxcg/lib/libc.a(string.o): in function `strncat':
/__w/libfxcg/libfxcg/libc/string.c:130: undefined reference to `_sys_strlen'
/usr/local/cross/lib/gcc/sh3eb-elf/10.3.0/../../../../sh3eb-elf/bin/ld: /home/atrt7/libfxcg/lib/libc.a(string.o):/__w/libfxcg/libfxcg/libc/string.c:180: more undefined references to `_sys_strlen' follow
collect2: error: ld returned 1 exit status
make[1]: *** [/home/atrt7/libfxcg/toolchain/prizm_rules:83: /home/atrt7/libfxcg/projects/jenncraft/jenncraft.bin] Error 1
make: *** [Makefile:104: all] Error 2
Looks like I did a foolish thing earlier, and there's no need to modify how we define strlen. I've updated the branch to deal with your issues, if you can grab the libraries again and check that fixes your issue: https://github.com/Jonimoose/libfxcg/actions/runs/772554472

It turns out I thought we defined the strlen syscall as sys_strlen when in fact it's just strlen, so the linker command line ordering that we subsequently dealt with seems like it was the only problem.
  
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
Page 1 of 1
» All times are UTC - 5 Hours
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

 

Advertisement