that says it's ANSI C, with x86_64 Apple macOS system so it's the same with both Intel and M1 Apples. It complained about endianness as well, then after applying your commit there's a linker message
% tcc -v
tcc version 0.9.27 mob:4e0e9b8 (x86_64 Darwin)
niklrose@Admins-MBP libbtc % ./configure CC=tcc
checking build system type... x86_64-apple-darwin21.2.0
checking host system type... x86_64-apple-darwin21.2.0
checking whether make supports nested variables... yes
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a race-free mkdir -p... ./build-aux/install-sh -c -d
checking for gawk... no
checking for mawk... no
checking for nawk... no
checking for awk... awk
checking whether make sets $(MAKE)... yes
checking whether make supports the include directive... yes (GNU style)
checking for gcc... tcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether the compiler supports GNU C... yes
checking whether tcc accepts -g... yes
checking for tcc option to enable C11 features... unsupported
checking for tcc option to enable C99 features... none needed
checking whether tcc understands -c and -o together... yes
checking dependency style of tcc... tcc
checking for stdio.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for strings.h... yes
checking for sys/stat.h... yes
checking for sys/types.h... yes
checking for unistd.h... yes
checking for _Bool... yes
checking for stdbool.h that conforms to C99... yes
checking how to print strings... printf
checking for a sed that does not truncate output... /usr/bin/sed
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for fgrep... /usr/bin/grep -F
checking for ld used by tcc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... no
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 786432
checking how to convert x86_64-apple-darwin21.2.0 file names to x86_64-apple-darwin21.2.0 format... func_convert_file_noop
checking how to convert x86_64-apple-darwin21.2.0 file names to toolchain format... func_convert_file_noop
checking for /usr/bin/ld option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for dlltool... no
checking how to associate runtime and link libraries... printf %s\n
checking for ar... ar
checking for archiver @FILE support... no
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /usr/bin/nm -B output from tcc object... ok
checking for sysroot... no
checking for a working dd... /bin/dd
checking how to truncate binary pipes... /bin/dd bs=4096 count=1
checking for mt... no
checking if : is a manifest tool... no
checking for dsymutil... dsymutil
checking for nmedit... nmedit
checking for lipo... lipo
checking for otool... otool
checking for otool64... no
checking for -single_module linker flag... tcc: error: unsupported linker option '-single_module'
no
checking for -exported_symbols_list linker flag... no
checking for -force_load linker flag... tcc: error: unsupported linker option '-force_load,./libconftest.a'
no
checking for dlfcn.h... yes
checking for objdir... .libs
checking if tcc supports -fno-rtti -fno-exceptions... yes
checking for tcc option to produce PIC... -fno-common -DPIC
checking if tcc PIC flag -fno-common -DPIC works... yes
checking if tcc static flag -static works... no
checking if tcc supports -c -o file.o... yes
checking if tcc supports -c -o file.o... (cached) yes
checking whether the tcc linker (/usr/bin/ld) supports shared libraries... yes
checking dynamic linker characteristics... darwin21.2.0 dyld
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
checking for pkg-config... /usr/local/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for ar... /usr/bin/ar
checking for ranlib... /usr/bin/ranlib
checking for strip... /usr/bin/strip
checking if tcc supports -std=gnu99 -pedantic -Wno-unused-function -Wno-long-long -Wno-overlength-strings -Werror=return-type... yes
checking for __builtin_expect... yes
checking for event2/event.h... yes
checking for main in -levent_core... yes
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating Makefile
config.status: creating libbtc.pc
config.status: creating src/libbtc-config.h
config.status: src/libbtc-config.h is unchanged
config.status: executing depfiles commands
config.status: executing libtool commands
=== configuring in src/secp256k1 (/Users/niklrose/proj/libbtc/libbtc/src/secp256k1)
configure: running /bin/sh ./configure --disable-option-checking '--prefix=/usr/local' 'CC=tcc' '--enable-module-recovery' --cache-file=/dev/null --srcdir=.
checking build system type... x86_64-apple-darwin21.2.0
checking host system type... x86_64-apple-darwin21.2.0
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a race-free mkdir -p... ./build-aux/install-sh -c -d
checking for gawk... no
checking for mawk... no
checking for nawk... no
checking for awk... awk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking how to print strings... printf
checking whether make supports the include directive... yes (GNU style)
checking for gcc... tcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether the compiler supports GNU C... yes
checking whether tcc accepts -g... yes
checking for tcc option to enable C11 features... unsupported
checking for tcc option to enable C99 features... none needed
checking whether tcc understands -c and -o together... yes
checking dependency style of tcc... tcc
checking for a sed that does not truncate output... /usr/bin/sed
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for fgrep... /usr/bin/grep -F
checking for ld used by tcc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... no
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 786432
checking how to convert x86_64-apple-darwin21.2.0 file names to x86_64-apple-darwin21.2.0 format... func_convert_file_noop
checking how to convert x86_64-apple-darwin21.2.0 file names to toolchain format... func_convert_file_noop
checking for /usr/bin/ld option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for dlltool... no
checking how to associate runtime and link libraries... printf %s\n
checking for ar... ar
checking for archiver @FILE support... no
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /usr/bin/nm -B output from tcc object... ok
checking for sysroot... no
checking for a working dd... /bin/dd
checking how to truncate binary pipes... /bin/dd bs=4096 count=1
checking for mt... no
checking if : is a manifest tool... no
checking for dsymutil... dsymutil
checking for nmedit... nmedit
checking for lipo... lipo
checking for otool... otool
checking for otool64... no
checking for -single_module linker flag... tcc: error: unsupported linker option '-single_module'
no
checking for -exported_symbols_list linker flag... no
checking for -force_load linker flag... tcc: error: unsupported linker option '-force_load,./libconftest.a'
no
checking for stdio.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for strings.h... yes
checking for sys/stat.h... yes
checking for sys/types.h... yes
checking for unistd.h... yes
checking for dlfcn.h... yes
checking for objdir... .libs
checking if tcc supports -fno-rtti -fno-exceptions... yes
checking for tcc option to produce PIC... -fno-common -DPIC
checking if tcc PIC flag -fno-common -DPIC works... yes
checking if tcc static flag -static works... no
checking if tcc supports -c -o file.o... yes
checking if tcc supports -c -o file.o... (cached) yes
checking whether the tcc linker (/usr/bin/ld) supports shared libraries... yes
checking dynamic linker characteristics... darwin21.2.0 dyld
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
checking whether make supports nested variables... (cached) yes
checking for pkg-config... /usr/local/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for ar... /usr/bin/ar
checking for ranlib... /usr/bin/ranlib
checking for strip... /usr/bin/strip
checking dependency style of tcc... tcc
checking for brew... /usr/local/bin/brew
checking if tcc supports -std=c89 -pedantic -Wall -Wextra -Wcast-align -Wnested-externs -Wshadow -Wstrict-prototypes -Wundef -Wno-unused-function -Wno-long-long -Wno-overlength-strings... yes
checking if tcc supports -fvisibility=hidden... yes
checking for valgrind/memcheck.h... no
checking for x86_64 assembly availability... no
checking for libcrypto... no
checking for openssl/crypto.h... no
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating Makefile
config.status: creating libsecp256k1.pc
config.status: creating src/libsecp256k1-config.h
config.status: src/libsecp256k1-config.h is unchanged
config.status: executing depfiles commands
config.status: executing libtool commands
Build Options:
with ecmult precomp = yes
with external callbacks = no
with benchmarks = yes
with tests = yes
with openssl tests = no
with coverage = no
module ecdh = no
module recovery = yes
module extrakeys = no
module schnorrsig = no
asm = no
ecmult window size = 15
ecmult gen prec. bits = 4
valgrind = no
CC = tcc
CFLAGS = -O2 -fvisibility=hidden -std=c89 -pedantic -Wall -Wextra -Wcast-align -Wnested-externs -Wshadow -Wstrict-prototypes -Wundef -Wno-unused-function -Wno-long-long -Wno-overlength-strings -W -g
CPPFLAGS = -I/usr/local/opt/valgrind/include
LDFLAGS =
CC_FOR_BUILD = tcc
CFLAGS_FOR_BUILD = -O2 -fvisibility=hidden -std=c89 -pedantic -Wall -Wextra -Wcast-align -Wnested-externs -Wshadow -Wstrict-prototypes -Wundef -Wno-unused-function -Wno-long-long -Wno-overlength-strings -W -g
CPPFLAGS_FOR_BUILD = -I/usr/local/opt/valgrind/include
LDFLAGS_FOR_BUILD =
Options used to compile and link:
with wallet = yes
with tools = yes
with net = yes
target os = darwin
CC = tcc
CFLAGS = -g -O2 -W -std=gnu99 -pedantic -Wno-unused-function -Wno-long-long -Wno-overlength-strings -Werror=return-type
CXX =
CXXFLAGS =
LDFLAGS =
niklrose@Admins-MBP libbtc % make
CC src/tools/bitcointool-bitcointool.o
CC src/libbtc_la-base58.lo
CC src/libbtc_la-bip32.lo
CC src/libbtc_la-block.lo
CC src/libbtc_la-commontools.lo
CC src/libbtc_la-ecc_key.lo
CC src/libbtc_la-ecc_libsecp256k1.lo
CC src/libbtc_la-script.lo
CC src/libbtc_la-tx.lo
CC src/trezor-crypto/libbtc_la-base58.lo
CC src/trezor-crypto/libbtc_la-blake2b.lo
CC src/trezor-crypto/libbtc_la-blake256.lo
CC src/trezor-crypto/libbtc_la-groestl.lo
CC src/trezor-crypto/libbtc_la-hasher.lo
CC src/trezor-crypto/libbtc_la-hmac.lo
CC src/trezor-crypto/libbtc_la-ripemd160.lo
CC src/trezor-crypto/libbtc_la-sha2.lo
CC src/trezor-crypto/libbtc_la-sha3.lo
CC src/logdb/libbtc_la-logdb_core.lo
CC src/logdb/libbtc_la-logdb_memdb_llist.lo
CC src/logdb/libbtc_la-logdb_memdb_rbtree.lo
CC src/logdb/libbtc_la-logdb_rec.lo
CC src/libbtc_la-wallet.lo
CC src/libbtc_la-headersdb_file.lo
CC src/libbtc_la-net.lo
CC src/libbtc_la-netspv.lo
CC src/libbtc_la-protocol.lo
CC src/libsecp256k1_la-secp256k1.lo
CCLD
libsecp256k1.lawarning: /Library/Developer/CommandLineTools/usr/bin/ranlib: archive library: .libs/libsecp256k1.a the table of contents is empty (no object file members in the library define global symbols)
CCLD
libbtc.latcc: error: unsupported linker option '-undefined'
make[1]: *** [
libbtc.la] Error 1
make: *** [all-recursive] Error 1