Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support picolib #357

Open
wants to merge 10 commits into
base: master
Choose a base branch
from
Open

Support picolib #357

wants to merge 10 commits into from

Conversation

bradjc
Copy link
Contributor

@bradjc bradjc commented Dec 20, 2023

This uses the new precompiled newlib system to create a compiled picolib for libtock-c.

Hopefully this sweetens the deal for #353.

@lschuermann
Copy link
Member

Needs a formatting pass? Having a hard time parsing the CI output. It's very exciting to see picolibc support, though it'll be interesting if this build also alleviates the malloc concerns of #305 (comment).

@bradjc
Copy link
Contributor Author

bradjc commented Feb 6, 2024

The problem with this is that picolibc seems to want core functions without underscores:

int fstat(int fd, struct stat *st) { return _fstat(fd, st); }
int isatty(int fd) { return _isatty(fd); }
int read(int fd, void *buf, uint32_t count) { return _read(fd, buf, count); }
int write(int fd, const void *buf, uint32_t count) { return _write(fd, buf, count); }
int lseek(int fd, uint32_t offset, int whence) { return _lseek(fd, offset, whence); }
int close(int fd) { return _close(fd); }
caddr_t sbrk(int incr) { return _sbrk(incr); }

whereas newlib wants the versions with the underscore. My attempt to include both causes some apps to fail to compile. In any case, we probably don't want both.

I have no idea why picolib deviates here, or if there is a way to request the _ versions.

It's worth considering the picolibc flags I am using:

# Picolibc Configure Flags
#
# picolib=false             # Do not use picolib sbrk. We need to use the memop syscalls.
# picocrt=false             # Do not build crt0, we have our own.
# picocrt-lib=false         # Do not package crt0.
# tinystdio=false           # Do not use AVR tinystdio, which uses a different underlying interface (aka stdout object).
# newlib-stdio64=false      # Do not include 64 bit APIs.
# newlib-reent-small=true   # ?
# newlib-global-atexit=true # ?
$PICOLIB_SRC_DIR/scripts/do-configure arm-none-eabi -Dprefix=`realpath $PICOLIB_INSTALL_DIR` \
  -Dpicolib=false \
  -Dpicocrt=false \
  -Dpicocrt-lib=false \
  -Dtinystdio=false \
  -Dnewlib-stdio64=false \
  -Dnewlib-reent-small=true \
  -Dnewlib-global-atexit=true \
  -Dmultilib-list=thumb/v6-m/nofp,thumb/v7-m/nofp,thumb/v7e-m/nofp \
  -Dc_args="-g -Os -ffunction-sections -fdata-sections -fPIC -msingle-pic-base -mno-pic-data-is-text-relative"

I don't know what tinystdio is, but when I didn't set that to false compilation failed because we didn't have some sort of file-descriptor-like thing.

In any case, I've looked over the picolibc build options a couple times and I can't figure out what would have an impact on _ system names versus not.

@ppannuto
Copy link
Member

ppannuto commented Mar 20, 2024

AFAICT, the presence/absence of the leading underscore is some unimportant fight among various library/tool vendors: https://stackoverflow.com/questions/36438732/close-vs-close-read-vs-read-write-vs-write-what-is-difference — neither is [in]correct. Best (sigh) solution here is probably to #ifdef on whether we're using picolib or newlib for a given build.

@bradjc
Copy link
Contributor Author

bradjc commented Mar 26, 2024

AFAICT, the presence/absence of the leading underscore is some unimportant fight among various library/tool vendors: https://stackoverflow.com/questions/36438732/close-vs-close-read-vs-read-write-vs-write-what-is-difference

oh gross

solution here is probably to #ifdef on whether we're using picolib or newlib for a given build.

I think we can add this in a reasonable way

@bradjc bradjc force-pushed the make-precompiled-picolib branch 2 times, most recently from 549d516 to eb82f24 Compare March 31, 2024 01:10
@bradjc
Copy link
Contributor Author

bradjc commented Apr 2, 2024

Hurrah this passes CI!

lschuermann
lschuermann previously approved these changes Apr 12, 2024
Copy link
Member

@lschuermann lschuermann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did not look into the C bindings in depth just yet, but I think this is a great step in the right direction and wouldn't want to block this on a more in-depth review.

Copy link
Member

@ppannuto ppannuto left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add text for missing comments.

This needs a rebase onto the new library build infrastructure, which I think should be stable now.

picolib/build-arm.sh Outdated Show resolved Hide resolved
picolib/build-arm.sh Outdated Show resolved Hide resolved
@bradjc
Copy link
Contributor Author

bradjc commented Apr 23, 2024

Rebase and updated.

@ppannuto
Copy link
Member

Doesn't work on a fresh checkout currently. Had enough time to debug quickly but not push fix sorry. Need to add ifdef PICOLIB guards in the Precompiled.mk file as well, because the newlib pattern and the picolib pattern are the same (so you end up with two rules to make the same targets). Other option is to go back to the lib/newlib/... and lib/picolib/... which will also fix the problem. (Got away without the subdirectory for newlib vs libc++ because the archive names are different; here's it's libc.a in both cases)

TOCK_NEWLIB_TARGETS += $$(TOCK_USERLAND_BASE_DIR)/lib/%/$(1)/$(2)/lib/$(3)/libc.a
TOCK_NEWLIB_TARGETS += $$(TOCK_USERLAND_BASE_DIR)/lib/%/$(1)/$(2)/lib/$(3)/libm.a

TOCK_PICOLIB_TARGETS += $$(TOCK_USERLAND_BASE_DIR)/lib/%/$(1)/$(2)/lib/$(3)/libc.a
TOCK_PICOLIB_TARGETS += $$(TOCK_USERLAND_BASE_DIR)/lib/%/$(1)/$(2)/lib/$(3)/libm.a

@bradjc
Copy link
Contributor Author

bradjc commented Apr 24, 2024

Does something like d4cb0c3 work?

@bradjc bradjc force-pushed the make-precompiled-picolib branch 2 times, most recently from 7a7b781 to b7b8c02 Compare June 11, 2024 18:34
@ppannuto
Copy link
Member

Beyond the CI error, I don't think the rules are right either. Without debugging deeply, on a fresh checkout it will try to fetch picolib twice:

[-bash] Fri 14 Jun 12:36 [[make-precompiled-picolib] /tmp/libtock-c/examples/blink]
$ make PICOLIB=1 -j4
cd ../../lib; ./fetch-picolib.sh 1.8.5
/Applications/Xcode.app/Contents/Developer/usr/bin/make -C ../../picolib-tock -f Makefile all
cd ../lib; ./fetch-picolib.sh 1.8.5
 DIR        ../picolib-tock/build/cortex-m0/picolib-tock
...
replace libtock-picolib-1.8.5/build-riscv.log? [y]es, [n]o, [A]ll, [N]one, [r]ename:

which ultimately causes the build to hang because of this question.

full output

[-bash] Fri 14 Jun 12:36 [[make-precompiled-picolib] /tmp/libtock-c/examples/blink]
$ make PICOLIB=1 -j4
cd ../../lib; ./fetch-picolib.sh 1.8.5
/Applications/Xcode.app/Contents/Developer/usr/bin/make -C ../../picolib-tock -f Makefile all
cd ../lib; ./fetch-picolib.sh 1.8.5
DIR ../picolib-tock/build/cortex-m0/picolib-tock
DIR ../picolib-tock/build/cortex-m3/picolib-tock
Fetching picolib from https://www.cs.virginia.edu/~bjc8c/archive/tock...
DIR ../picolib-tock/build/cortex-m7/picolib-tock
Fetching https://www.cs.virginia.edu/~bjc8c/archive/tock/libtock-picolib-1.8.5.zip...
DIR ../picolib-tock/build/cortex-m4/picolib-tock
Fetching picolib from https://www.cs.virginia.edu/~bjc8c/archive/tock...
Fetching https://www.cs.virginia.edu/~bjc8c/archive/tock/libtock-picolib-1.8.5.zip...
DIR ../picolib-tock/build/rv32imac/picolib-tock
DIR ../picolib-tock/build/rv32imc/picolib-tock
libtock-picolib-1.8.5.zip: OK
Archive: libtock-picolib-1.8.5.zip
creating: libtock-picolib-1.8.5/
inflating: libtock-picolib-1.8.5/build-riscv.log
inflating: libtock-picolib-1.8.5/build-arm.log
creating: libtock-picolib-1.8.5/arm/
creating: libtock-picolib-1.8.5/arm/arm-none-eabi/
creating: libtock-picolib-1.8.5/arm/arm-none-eabi/include/
inflating: libtock-picolib-1.8.5/arm/arm-none-eabi/include/time.h
inflating: libtock-picolib-1.8.5/arm/arm-none-eabi/include/pwd.h
inflating: libtock-picolib-1.8.5/arm/arm-none-eabi/include/utime.h
inflating: libtock-picolib-1.8.5/arm/arm-none-eabi/include/inttypes.h
creating: libtock-picolib-1.8.5/arm/arm-none-eabi/include/ssp/
inflating: libtock-picolib-1.8.5/arm/arm-none-eabi/include/ssp/stdlib.h
inflating: libtock-picolib-1.8.5/arm/arm-none-eabi/include/ssp/unistd.h
inflating: libtock-picolib-1.8.5/arm/arm-none-eabi/include/ssp/strings.h
inflating: libtock-picolib-1.8.5/arm/arm-none-eabi/include/ssp/wchar.h
inflating: libtock-picolib-1.8.5/arm/arm-none-eabi/include/ssp/ssp.h
inflating: libtock-picolib-1.8.5/arm/arm-none-eabi/include/ssp/stdio.h
inflating: libtock-picolib-1.8.5/arm/arm-none-eabi/include/ssp/string.h
inflating: libtock-picolib-1.8.5/arm/arm-none-eabi/include/stdlib.h
inflating: libtock-picolib-1.8.5/arm/arm-none-eabi/include/malloc.h
inflating: libtock-picolib-1.8.5/arm/arm-none-eabi/include/envz.h
inflating: libtock-picolib-1.8.5/arm/arm-none-eabi/include/picotls.h
inflating: libtock-picolib-1.8.5/arm/arm-none-eabi/include/locale.h
inflating: libtock-picolib-1.8.5/arm/arm-none-eabi/include/cpio.h
inflating: libtock-picolib-1.8.5/arm/arm-none-eabi/include/langinfo.h
inflating: libtock-picolib-1.8.5/arm/arm-none-eabi/include/limits.h
inflating: libtock-picolib-1.8.5/arm/arm-none-eabi/include/endian.h
inflating: libtock-picolib-1.8.5/arm/arm-none-eabi/include/envlock.h
inflating: libtock-picolib-1.8.5/arm/arm-none-eabi/include/unistd.h
inflating: libtock-picolib-1.8.5/arm/arm-none-eabi/include/ieeefp.h
inflating: libtock-picolib-1.8.5/arm/arm-none-eabi/include/wctype.h
inflating: libtock-picolib-1.8.5/arm/arm-none-eabi/include/fcntl.h
inflating: libtock-picolib-1.8.5/arm/arm-none-eabi/include/tar.h
inflating: libtock-picolib-1.8.5/arm/arm-none-eabi/include/signal.h
inflating: libtock-picolib-1.8.5/arm/arm-none-eabi/include/dirent.h
inflating: libtock-picolib-1.8.5/arm/arm-none-eabi/include/spawn.h
inflating: libtock-picolib-1.8.5/arm/arm-none-eabi/include/regex.h
creating: libtock-picolib-1.8.5/arm/arm-none-eabi/include/arpa/
inflating: libtock-picolib-1.8.5/arm/arm-none-eabi/include/arpa/inet.h
inflating: libtock-picolib-1.8.5/arm/arm-none-eabi/include/newlib.h
inflating: libtock-picolib-1.8.5/arm/arm-none-eabi/include/threads.h
inflating: libtock-picolib-1.8.5/arm/arm-none-eabi/include/semihost.h
inflating: libtock-picolib-1.8.5/arm/arm-none-eabi/include/unctrl.h
inflating: libtock-picolib-1.8.5/arm/arm-none-eabi/include/libgen.h
inflating: libtock-picolib-1.8.5/arm/arm-none-eabi/include/fastmath.h
inflating: libtock-picolib-1.8.5/arm/arm-none-eabi/include/setjmp.h
inflating: libtock-picolib-1.8.5/arm/arm-none-eabi/include/elf.h
inflating: libtock-picolib-1.8.5/arm/arm-none-eabi/include/getopt.h
inflating: libtock-picolib-1.8.5/arm/arm-none-eabi/include/strings.h
inflating: libtock-picolib-1.8.5/arm/arm-none-eabi/include/fnmatch.h
inflating: libtock-picolib-1.8.5/arm/arm-none-eabi/include/byteswap.h
inflating: libtock-picolib-1.8.5/arm/arm-none-eabi/include/alloca.h
creating: libtock-picolib-1.8.5/arm/arm-none-eabi/include/sys/
inflating: libtock-picolib-1.8.5/arm/arm-none-eabi/include/sys/time.h
inflating: libtock-picolib-1.8.5/arm/arm-none-eabi/include/sys/utime.h
inflating: libtock-picolib-1.8.5/arm/arm-none-eabi/include/sys/syslimits.h
inflating: libtock-picolib-1.8.5/arm/arm-none-eabi/include/sys/timeb.h
inflating: libtock-picolib-1.8.5/arm/arm-none-eabi/include/sys/config.h
inflating: libtock-picolib-1.8.5/arm/arm-none-eabi/include/sys/features.h
inflating: libtock-picolib-1.8.5/arm/arm-none-eabi/include/sys/types.h
inflating: libtock-picolib-1.8.5/arm/arm-none-eabi/include/sys/times.h
inflating: libtock-picolib-1.8.5/arm/arm-none-eabi/include/sys/unistd.h
inflating: libtock-picolib-1.8.5/arm/arm-none-eabi/include/sys/_intsup.h
inflating: libtock-picolib-1.8.5/arm/arm-none-eabi/include/sys/lock.h
inflating: libtock-picolib-1.8.5/arm/arm-none-eabi/include/sys/wait.h
inflating: libtock-picolib-1.8.5/arm/arm-none-eabi/include/sys/fcntl.h
inflating: libtock-picolib-1.8.5/arm/arm-none-eabi/include/sys/file.h
inflating: libtock-picolib-1.8.5/arm/arm-none-eabi/include/sys/_locale.h
inflating: libtock-picolib-1.8.5/arm/arm-none-eabi/include/sys/stat.h
inflating: libtock-picolib-1.8.5/arm/arm-none-eabi/include/sys/signal.h
inflating: libtock-picolib-1.8.5/arm/arm-none-eabi/include/sys/dirent.h
inflating: libtock-picolib-1.8.5/arm/arm-none-eabi/include/sys/tree.h
inflating: libtock-picolib-1.8.5/arm/arm-none-eabi/include/sys/_timeval.h
inflating: libtock-picolib-1.8.5/arm/arm-none-eabi/include/sys/auxv.h
inflating: libtock-picolib-1.8.5/arm/arm-none-eabi/include/sys/_stdint.h
inflating: libtock-picolib-1.8.5/arm/arm-none-eabi/include/sys/custom_file.h
inflating: libtock-picolib-1.8.5/arm/arm-none-eabi/include/sys/param.h
inflating: libtock-picolib-1.8.5/arm/arm-none-eabi/include/sys/_tz_structs.h
inflating: libtock-picolib-1.8.5/arm/arm-none-eabi/include/sys/fenv.h
inflating: libtock-picolib-1.8.5/arm/arm-none-eabi/include/sys/timespec.h
inflating: libtock-picolib-1.8.5/arm/arm-none-eabi/include/sys/resource.h
inflating: libtock-picolib-1.8.5/arm/arm-none-eabi/include/sys/sched.h
inflating: libtock-picolib-1.8.5/arm/arm-none-eabi/include/sys/_timespec.h
inflating: libtock-picolib-1.8.5/arm/arm-none-eabi/include/sys/iconvnls.h
inflating: libtock-picolib-1.8.5/arm/arm-none-eabi/include/sys/cdefs.h
inflating: libtock-picolib-1.8.5/arm/arm-none-eabi/include/sys/errno.h
inflating: libtock-picolib-1.8.5/arm/arm-none-eabi/include/sys/stdio.h
inflating: libtock-picolib-1.8.5/arm/arm-none-eabi/include/sys/_default_fcntl.h
inflating: libtock-picolib-1.8.5/arm/arm-none-eabi/include/sys/_sigset.h
inflating: libtock-picolib-1.8.5/arm/arm-none-eabi/include/sys/_types.h
inflating: libtock-picolib-1.8.5/arm/arm-none-eabi/include/sys/dir.h
inflating: libtock-picolib-1.8.5/arm/arm-none-eabi/include/sys/queue.h
inflating: libtock-picolib-1.8.5/arm/arm-none-eabi/include/sys/string.h
inflating: libtock-picolib-1.8.5/arm/arm-none-eabi/include/sys/select.h
inflating: libtock-picolib-1.8.5/arm/arm-none-eabi/include/utmp.h
inflating: libtock-picolib-1.8.5/arm/arm-none-eabi/include/iconv.h
creating: libtock-picolib-1.8.5/arm/arm-none-eabi/include/bits/
creating: libtock-picolib-1.8.5/arm/arm-none-eabi/include/bits/types/
inflating: libtock-picolib-1.8.5/arm/arm-none-eabi/include/bits/types/mbstate_t.h
inflating: libtock-picolib-1.8.5/arm/arm-none-eabi/include/fenv.h
inflating: libtock-picolib-1.8.5/arm/arm-none-eabi/include/grp.h
inflating: libtock-picolib-1.8.5/arm/arm-none-eabi/include/ctype.h
creating: libtock-picolib-1.8.5/arm/arm-none-eabi/include/machine/
inflating: libtock-picolib-1.8.5/arm/arm-none-eabi/include/machine/time.h
inflating: libtock-picolib-1.8.5/arm/arm-none-eabi/include/machine/stdlib.h
inflating: libtock-picolib-1.8.5/arm/arm-none-eabi/include/machine/malloc.h
inflating: libtock-picolib-1.8.5/arm/arm-none-eabi/include/machine/_endian.h
inflating: libtock-picolib-1.8.5/arm/arm-none-eabi/include/machine/types.h
inflating: libtock-picolib-1.8.5/arm/arm-none-eabi/include/machine/_arc4random.h
inflating: libtock-picolib-1.8.5/arm/arm-none-eabi/include/machine/endian.h
inflating: libtock-picolib-1.8.5/arm/arm-none-eabi/include/machine/ieeefp.h
inflating: libtock-picolib-1.8.5/arm/arm-none-eabi/include/machine/fastmath.h
inflating: libtock-picolib-1.8.5/arm/arm-none-eabi/include/machine/setjmp.h
inflating: libtock-picolib-1.8.5/arm/arm-none-eabi/include/machine/ansi.h
inflating: libtock-picolib-1.8.5/arm/arm-none-eabi/include/machine/param.h
inflating: libtock-picolib-1.8.5/arm/arm-none-eabi/include/machine/acle-compat.h
inflating: libtock-picolib-1.8.5/arm/arm-none-eabi/include/machine/_default_types.h
inflating: libtock-picolib-1.8.5/arm/arm-none-eabi/include/machine/setjmp-dj.h
inflating: libtock-picolib-1.8.5/arm/arm-none-eabi/include/machine/math.h
inflating: libtock-picolib-1.8.5/arm/arm-none-eabi/include/machine/termios.h
inflating: libtock-picolib-1.8.5/arm/arm-none-eabi/include/machine/_time.h
inflating: libtock-picolib-1.8.5/arm/arm-none-eabi/include/machine/_types.h
inflating: libtock-picolib-1.8.5/arm/arm-none-eabi/include/wordexp.h
inflating: libtock-picolib-1.8.5/arm/arm-none-eabi/include/paths.h
inflating: libtock-picolib-1.8.5/arm/arm-none-eabi/include/wchar.h
inflating: libtock-picolib-1.8.5/arm/arm-none-eabi/include/sched.h
inflating: libtock-picolib-1.8.5/arm/arm-none-eabi/include/_ansi.h
inflating: libtock-picolib-1.8.5/arm/arm-none-eabi/include/math.h
inflating: libtock-picolib-1.8.5/arm/arm-none-eabi/include/memory.h
inflating: libtock-picolib-1.8.5/arm/arm-none-eabi/include/ar.h
inflating: libtock-picolib-1.8.5/arm/arm-none-eabi/include/argz.h
inflating: libtock-picolib-1.8.5/arm/arm-none-eabi/include/errno.h
inflating: libtock-picolib-1.8.5/arm/arm-none-eabi/include/termios.h
inflating: libtock-picolib-1.8.5/arm/arm-none-eabi/include/stdio.h
inflating: libtock-picolib-1.8.5/arm/arm-none-eabi/include/picolibc.h
inflating: libtock-picolib-1.8.5/arm/arm-none-eabi/include/devctl.h
creating: libtock-picolib-1.8.5/arm/arm-none-eabi/include/rpc/
inflating: libtock-picolib-1.8.5/arm/arm-none-eabi/include/rpc/types.h
inflating: libtock-picolib-1.8.5/arm/arm-none-eabi/include/rpc/xdr.h
inflating: libtock-picolib-1.8.5/arm/arm-none-eabi/include/search.h
inflating: libtock-picolib-1.8.5/arm/arm-none-eabi/include/assert.h
inflating: libtock-picolib-1.8.5/arm/arm-none-eabi/include/_syslist.h
inflating: libtock-picolib-1.8.5/arm/arm-none-eabi/include/glob.h
inflating: libtock-picolib-1.8.5/arm/arm-none-eabi/include/stdint.h
inflating: libtock-picolib-1.8.5/arm/arm-none-eabi/include/complex.h
inflating: libtock-picolib-1.8.5/arm/arm-none-eabi/include/string.h
inflating: libtock-picolib-1.8.5/arm/arm-none-eabi/include/regdef.h
creating: libtock-picolib-1.8.5/arm/arm-none-eabi/lib/
inflating: libtock-picolib-1.8.5/arm/arm-none-eabi/lib/picolibc.ld
creating: libtock-picolib-1.8.5/arm/arm-none-eabi/lib/thumb/
creating: libtock-picolib-1.8.5/arm/arm-none-eabi/lib/thumb/v7e-m/
creating: libtock-picolib-1.8.5/arm/arm-none-eabi/lib/thumb/v7e-m/nofp/
inflating: libtock-picolib-1.8.5/arm/arm-none-eabi/lib/thumb/v7e-m/nofp/libm.a
inflating: libtock-picolib-1.8.5/arm/arm-none-eabi/lib/thumb/v7e-m/nofp/libsemihost.a
inflating: libtock-picolib-1.8.5/arm/arm-none-eabi/lib/thumb/v7e-m/nofp/libg.a
inflating: libtock-picolib-1.8.5/arm/arm-none-eabi/lib/thumb/v7e-m/nofp/libc.a
creating: libtock-picolib-1.8.5/arm/arm-none-eabi/lib/thumb/v7/
creating: libtock-picolib-1.8.5/arm/arm-none-eabi/lib/thumb/v7/nofp/
inflating: libtock-picolib-1.8.5/arm/arm-none-eabi/lib/thumb/v7/nofp/libm.a
inflating: libtock-picolib-1.8.5/arm/arm-none-eabi/lib/thumb/v7/nofp/libsemihost.a
inflating: libtock-picolib-1.8.5/arm/arm-none-eabi/lib/thumb/v7/nofp/libg.a
inflating: libtock-picolib-1.8.5/arm/arm-none-eabi/lib/thumb/v7/nofp/libc.a
creating: libtock-picolib-1.8.5/arm/arm-none-eabi/lib/thumb/v7-m/
creating: libtock-picolib-1.8.5/arm/arm-none-eabi/lib/thumb/v7-m/nofp/
inflating: libtock-picolib-1.8.5/arm/arm-none-eabi/lib/thumb/v7-m/nofp/libm.a
inflating: libtock-picolib-1.8.5/arm/arm-none-eabi/lib/thumb/v7-m/nofp/libsemihost.a
inflating: libtock-picolib-1.8.5/arm/arm-none-eabi/lib/thumb/v7-m/nofp/libg.a
inflating: libtock-picolib-1.8.5/arm/arm-none-eabi/lib/thumb/v7-m/nofp/libc.a
creating: libtock-picolib-1.8.5/arm/arm-none-eabi/lib/thumb/v6-m/
creating: libtock-picolib-1.8.5/arm/arm-none-eabi/lib/thumb/v6-m/nofp/
inflating: libtock-picolib-1.8.5/arm/arm-none-eabi/lib/thumb/v6-m/nofp/libm.a
inflating: libtock-picolib-1.8.5/arm/arm-none-eabi/lib/thumb/v6-m/nofp/libsemihost.a
inflating: libtock-picolib-1.8.5/arm/arm-none-eabi/lib/thumb/v6-m/nofp/libg.a
inflating: libtock-picolib-1.8.5/arm/arm-none-eabi/lib/thumb/v6-m/nofp/libc.a
inflating: libtock-picolib-1.8.5/arm/arm-none-eabi/lib/picolibcpp.ld
creating: libtock-picolib-1.8.5/riscv/
creating: libtock-picolib-1.8.5/riscv/riscv64-unknown-elf/
creating: libtock-picolib-1.8.5/riscv/riscv64-unknown-elf/include/
inflating: libtock-picolib-1.8.5/riscv/riscv64-unknown-elf/include/time.h
inflating: libtock-picolib-1.8.5/riscv/riscv64-unknown-elf/include/pwd.h
inflating: libtock-picolib-1.8.5/riscv/riscv64-unknown-elf/include/utime.h
inflating: libtock-picolib-1.8.5/riscv/riscv64-unknown-elf/include/inttypes.h
creating: libtock-picolib-1.8.5/riscv/riscv64-unknown-elf/include/ssp/
inflating: libtock-picolib-1.8.5/riscv/riscv64-unknown-elf/include/ssp/stdlib.h
inflating: libtock-picolib-1.8.5/riscv/riscv64-unknown-elf/include/ssp/unistd.h
inflating: libtock-picolib-1.8.5/riscv/riscv64-unknown-elf/include/ssp/strings.h
inflating: libtock-picolib-1.8.5/riscv/riscv64-unknown-elf/include/ssp/wchar.h
inflating: libtock-picolib-1.8.5/riscv/riscv64-unknown-elf/include/ssp/ssp.h
inflating: libtock-picolib-1.8.5/riscv/riscv64-unknown-elf/include/ssp/stdio.h
inflating: libtock-picolib-1.8.5/riscv/riscv64-unknown-elf/include/ssp/string.h
inflating: libtock-picolib-1.8.5/riscv/riscv64-unknown-elf/include/stdlib.h
inflating: libtock-picolib-1.8.5/riscv/riscv64-unknown-elf/include/malloc.h
inflating: libtock-picolib-1.8.5/riscv/riscv64-unknown-elf/include/envz.h
inflating: libtock-picolib-1.8.5/riscv/riscv64-unknown-elf/include/picotls.h
inflating: libtock-picolib-1.8.5/riscv/riscv64-unknown-elf/include/locale.h
inflating: libtock-picolib-1.8.5/riscv/riscv64-unknown-elf/include/cpio.h
inflating: libtock-picolib-1.8.5/riscv/riscv64-unknown-elf/include/langinfo.h
inflating: libtock-picolib-1.8.5/riscv/riscv64-unknown-elf/include/limits.h
inflating: libtock-picolib-1.8.5/riscv/riscv64-unknown-elf/include/endian.h
inflating: libtock-picolib-1.8.5/riscv/riscv64-unknown-elf/include/envlock.h
inflating: libtock-picolib-1.8.5/riscv/riscv64-unknown-elf/include/unistd.h
inflating: libtock-picolib-1.8.5/riscv/riscv64-unknown-elf/include/ieeefp.h
inflating: libtock-picolib-1.8.5/riscv/riscv64-unknown-elf/include/wctype.h
inflating: libtock-picolib-1.8.5/riscv/riscv64-unknown-elf/include/fcntl.h
inflating: libtock-picolib-1.8.5/riscv/riscv64-unknown-elf/include/tar.h
inflating: libtock-picolib-1.8.5/riscv/riscv64-unknown-elf/include/signal.h
inflating: libtock-picolib-1.8.5/riscv/riscv64-unknown-elf/include/dirent.h
inflating: libtock-picolib-1.8.5/riscv/riscv64-unknown-elf/include/spawn.h
inflating: libtock-picolib-1.8.5/riscv/riscv64-unknown-elf/include/regex.h
creating: libtock-picolib-1.8.5/riscv/riscv64-unknown-elf/include/arpa/
inflating: libtock-picolib-1.8.5/riscv/riscv64-unknown-elf/include/arpa/inet.h
inflating: libtock-picolib-1.8.5/riscv/riscv64-unknown-elf/include/newlib.h
inflating: libtock-picolib-1.8.5/riscv/riscv64-unknown-elf/include/threads.h
inflating: libtock-picolib-1.8.5/riscv/riscv64-unknown-elf/include/semihost.h
inflating: libtock-picolib-1.8.5/riscv/riscv64-unknown-elf/include/unctrl.h
inflating: libtock-picolib-1.8.5/riscv/riscv64-unknown-elf/include/libgen.h
inflating: libtock-picolib-1.8.5/riscv/riscv64-unknown-elf/include/fastmath.h
inflating: libtock-picolib-1.8.5/riscv/riscv64-unknown-elf/include/setjmp.h
inflating: libtock-picolib-1.8.5/riscv/riscv64-unknown-elf/include/elf.h
inflating: libtock-picolib-1.8.5/riscv/riscv64-unknown-elf/include/getopt.h
inflating: libtock-picolib-1.8.5/riscv/riscv64-unknown-elf/include/strings.h
inflating: libtock-picolib-1.8.5/riscv/riscv64-unknown-elf/include/fnmatch.h
inflating: libtock-picolib-1.8.5/riscv/riscv64-unknown-elf/include/byteswap.h
inflating: libtock-picolib-1.8.5/riscv/riscv64-unknown-elf/include/alloca.h
creating: libtock-picolib-1.8.5/riscv/riscv64-unknown-elf/include/sys/
inflating: libtock-picolib-1.8.5/riscv/riscv64-unknown-elf/include/sys/time.h
inflating: libtock-picolib-1.8.5/riscv/riscv64-unknown-elf/include/sys/utime.h
inflating: libtock-picolib-1.8.5/riscv/riscv64-unknown-elf/include/sys/syslimits.h
inflating: libtock-picolib-1.8.5/riscv/riscv64-unknown-elf/include/sys/timeb.h
inflating: libtock-picolib-1.8.5/riscv/riscv64-unknown-elf/include/sys/config.h
inflating: libtock-picolib-1.8.5/riscv/riscv64-unknown-elf/include/sys/features.h
inflating: libtock-picolib-1.8.5/riscv/riscv64-unknown-elf/include/sys/types.h
inflating: libtock-picolib-1.8.5/riscv/riscv64-unknown-elf/include/sys/times.h
inflating: libtock-picolib-1.8.5/riscv/riscv64-unknown-elf/include/sys/unistd.h
inflating: libtock-picolib-1.8.5/riscv/riscv64-unknown-elf/include/sys/_intsup.h
inflating: libtock-picolib-1.8.5/riscv/riscv64-unknown-elf/include/sys/lock.h
inflating: libtock-picolib-1.8.5/riscv/riscv64-unknown-elf/include/sys/wait.h
inflating: libtock-picolib-1.8.5/riscv/riscv64-unknown-elf/include/sys/fcntl.h
inflating: libtock-picolib-1.8.5/riscv/riscv64-unknown-elf/include/sys/file.h
inflating: libtock-picolib-1.8.5/riscv/riscv64-unknown-elf/include/sys/_locale.h
inflating: libtock-picolib-1.8.5/riscv/riscv64-unknown-elf/include/sys/stat.h
inflating: libtock-picolib-1.8.5/riscv/riscv64-unknown-elf/include/sys/signal.h
inflating: libtock-picolib-1.8.5/riscv/riscv64-unknown-elf/include/sys/dirent.h
inflating: libtock-picolib-1.8.5/riscv/riscv64-unknown-elf/include/sys/tree.h
inflating: libtock-picolib-1.8.5/riscv/riscv64-unknown-elf/include/sys/_timeval.h
inflating: libtock-picolib-1.8.5/riscv/riscv64-unknown-elf/include/sys/auxv.h
inflating: libtock-picolib-1.8.5/riscv/riscv64-unknown-elf/include/sys/_stdint.h
inflating: libtock-picolib-1.8.5/riscv/riscv64-unknown-elf/include/sys/custom_file.h
inflating: libtock-picolib-1.8.5/riscv/riscv64-unknown-elf/include/sys/param.h
inflating: libtock-picolib-1.8.5/riscv/riscv64-unknown-elf/include/sys/_tz_structs.h
inflating: libtock-picolib-1.8.5/riscv/riscv64-unknown-elf/include/sys/fenv.h
inflating: libtock-picolib-1.8.5/riscv/riscv64-unknown-elf/include/sys/timespec.h
inflating: libtock-picolib-1.8.5/riscv/riscv64-unknown-elf/include/sys/resource.h
inflating: libtock-picolib-1.8.5/riscv/riscv64-unknown-elf/include/sys/sched.h
inflating: libtock-picolib-1.8.5/riscv/riscv64-unknown-elf/include/sys/_timespec.h
inflating: libtock-picolib-1.8.5/riscv/riscv64-unknown-elf/include/sys/iconvnls.h
inflating: libtock-picolib-1.8.5/riscv/riscv64-unknown-elf/include/sys/cdefs.h
inflating: libtock-picolib-1.8.5/riscv/riscv64-unknown-elf/include/sys/errno.h
inflating: libtock-picolib-1.8.5/riscv/riscv64-unknown-elf/include/sys/stdio.h
inflating: libtock-picolib-1.8.5/riscv/riscv64-unknown-elf/include/sys/_default_fcntl.h
inflating: libtock-picolib-1.8.5/riscv/riscv64-unknown-elf/include/sys/_sigset.h
inflating: libtock-picolib-1.8.5/riscv/riscv64-unknown-elf/include/sys/_types.h
inflating: libtock-picolib-1.8.5/riscv/riscv64-unknown-elf/include/sys/dir.h
inflating: libtock-picolib-1.8.5/riscv/riscv64-unknown-elf/include/sys/queue.h
inflating: libtock-picolib-1.8.5/riscv/riscv64-unknown-elf/include/sys/string.h
inflating: libtock-picolib-1.8.5/riscv/riscv64-unknown-elf/include/sys/select.h
inflating: libtock-picolib-1.8.5/riscv/riscv64-unknown-elf/include/utmp.h
inflating: libtock-picolib-1.8.5/riscv/riscv64-unknown-elf/include/iconv.h
creating: libtock-picolib-1.8.5/riscv/riscv64-unknown-elf/include/bits/
creating: libtock-picolib-1.8.5/riscv/riscv64-unknown-elf/include/bits/types/
inflating: libtock-picolib-1.8.5/riscv/riscv64-unknown-elf/include/bits/types/mbstate_t.h
inflating: libtock-picolib-1.8.5/riscv/riscv64-unknown-elf/include/fenv.h
inflating: libtock-picolib-1.8.5/riscv/riscv64-unknown-elf/include/grp.h
inflating: libtock-picolib-1.8.5/riscv/riscv64-unknown-elf/include/ctype.h
creating: libtock-picolib-1.8.5/riscv/riscv64-unknown-elf/include/machine/
inflating: libtock-picolib-1.8.5/riscv/riscv64-unknown-elf/include/machine/time.h
inflating: libtock-picolib-1.8.5/riscv/riscv64-unknown-elf/include/machine/stdlib.h
inflating: libtock-picolib-1.8.5/riscv/riscv64-unknown-elf/include/machine/malloc.h
inflating: libtock-picolib-1.8.5/riscv/riscv64-unknown-elf/include/machine/_endian.h
inflating: libtock-picolib-1.8.5/riscv/riscv64-unknown-elf/include/machine/types.h
inflating: libtock-picolib-1.8.5/riscv/riscv64-unknown-elf/include/machine/_arc4random.h
inflating: libtock-picolib-1.8.5/riscv/riscv64-unknown-elf/include/machine/endian.h
inflating: libtock-picolib-1.8.5/riscv/riscv64-unknown-elf/include/machine/ieeefp.h
inflating: libtock-picolib-1.8.5/riscv/riscv64-unknown-elf/include/machine/fastmath.h
inflating: libtock-picolib-1.8.5/riscv/riscv64-unknown-elf/include/machine/setjmp.h
inflating: libtock-picolib-1.8.5/riscv/riscv64-unknown-elf/include/machine/ansi.h
inflating: libtock-picolib-1.8.5/riscv/riscv64-unknown-elf/include/machine/param.h
inflating: libtock-picolib-1.8.5/riscv/riscv64-unknown-elf/include/machine/_default_types.h
inflating: libtock-picolib-1.8.5/riscv/riscv64-unknown-elf/include/machine/setjmp-dj.h
inflating: libtock-picolib-1.8.5/riscv/riscv64-unknown-elf/include/machine/math.h
inflating: libtock-picolib-1.8.5/riscv/riscv64-unknown-elf/include/machine/termios.h
inflating: libtock-picolib-1.8.5/riscv/riscv64-unknown-elf/include/machine/_time.h
inflating: libtock-picolib-1.8.5/riscv/riscv64-unknown-elf/include/machine/_types.h
inflating: libtock-picolib-1.8.5/riscv/riscv64-unknown-elf/include/wordexp.h
inflating: libtock-picolib-1.8.5/riscv/riscv64-unknown-elf/include/paths.h
inflating: libtock-picolib-1.8.5/riscv/riscv64-unknown-elf/include/wchar.h
inflating: libtock-picolib-1.8.5/riscv/riscv64-unknown-elf/include/sched.h
inflating: libtock-picolib-1.8.5/riscv/riscv64-unknown-elf/include/_ansi.h
inflating: libtock-picolib-1.8.5/riscv/riscv64-unknown-elf/include/math.h
inflating: libtock-picolib-1.8.5/riscv/riscv64-unknown-elf/include/memory.h
inflating: libtock-picolib-1.8.5/riscv/riscv64-unknown-elf/include/ar.h
inflating: libtock-picolib-1.8.5/riscv/riscv64-unknown-elf/include/argz.h
inflating: libtock-picolib-1.8.5/riscv/riscv64-unknown-elf/include/errno.h
inflating: libtock-picolib-1.8.5/riscv/riscv64-unknown-elf/include/termios.h
inflating: libtock-picolib-1.8.5/riscv/riscv64-unknown-elf/include/stdio.h
inflating: libtock-picolib-1.8.5/riscv/riscv64-unknown-elf/include/picolibc.h
inflating: libtock-picolib-1.8.5/riscv/riscv64-unknown-elf/include/devctl.h
creating: libtock-picolib-1.8.5/riscv/riscv64-unknown-elf/include/rpc/
inflating: libtock-picolib-1.8.5/riscv/riscv64-unknown-elf/include/rpc/types.h
inflating: libtock-picolib-1.8.5/riscv/riscv64-unknown-elf/include/rpc/xdr.h
inflating: libtock-picolib-1.8.5/riscv/riscv64-unknown-elf/include/search.h
inflating: libtock-picolib-1.8.5/riscv/riscv64-unknown-elf/include/assert.h
inflating: libtock-picolib-1.8.5/riscv/riscv64-unknown-elf/include/_syslist.h
inflating: libtock-picolib-1.8.5/riscv/riscv64-unknown-elf/include/glob.h
inflating: libtock-picolib-1.8.5/riscv/riscv64-unknown-elf/include/stdint.h
inflating: libtock-picolib-1.8.5/riscv/riscv64-unknown-elf/include/complex.h
inflating: libtock-picolib-1.8.5/riscv/riscv64-unknown-elf/include/string.h
inflating: libtock-picolib-1.8.5/riscv/riscv64-unknown-elf/include/regdef.h
creating: libtock-picolib-1.8.5/riscv/riscv64-unknown-elf/lib/
creating: libtock-picolib-1.8.5/riscv/riscv64-unknown-elf/lib/rv32i/
creating: libtock-picolib-1.8.5/riscv/riscv64-unknown-elf/lib/rv32i/ilp32/
inflating: libtock-picolib-1.8.5/riscv/riscv64-unknown-elf/lib/rv32i/ilp32/libm.a
inflating: libtock-picolib-1.8.5/riscv/riscv64-unknown-elf/lib/rv32i/ilp32/libsemihost.a
inflating: libtock-picolib-1.8.5/riscv/riscv64-unknown-elf/lib/rv32i/ilp32/libg.a
inflating: libtock-picolib-1.8.5/riscv/riscv64-unknown-elf/lib/rv32i/ilp32/libc.a
inflating: libtock-picolib-1.8.5/riscv/riscv64-unknown-elf/lib/picolibc.ld
creating: libtock-picolib-1.8.5/riscv/riscv64-unknown-elf/lib/rv32imac/
creating: libtock-picolib-1.8.5/riscv/riscv64-unknown-elf/lib/rv32imac/ilp32/
inflating: libtock-picolib-1.8.5/riscv/riscv64-unknown-elf/lib/rv32imac/ilp32/libm.a
inflating: libtock-picolib-1.8.5/riscv/riscv64-unknown-elf/lib/rv32imac/ilp32/libsemihost.a
inflating: libtock-picolib-1.8.5/riscv/riscv64-unknown-elf/lib/rv32imac/ilp32/libg.a
inflating: libtock-picolib-1.8.5/riscv/riscv64-unknown-elf/lib/rv32imac/ilp32/libc.a libtock-picolib-1.8.5.zip: OK
Archive: libtock-picolib-1.8.5.zip
replace libtock-picolib-1.8.5/build-riscv.log? [y]es, [n]o, [A]ll, [N]one, [r]ename:
inflating: libtock-picolib-1.8.5/riscv/riscv64-unknown-elf/lib/picolibcpp.ld
creating: libtock-picolib-1.8.5/riscv/riscv64-unknown-elf/lib/rv32im/
creating: libtock-picolib-1.8.5/riscv/riscv64-unknown-elf/lib/rv32im/ilp32/
inflating: libtock-picolib-1.8.5/riscv/riscv64-unknown-elf/lib/rv32im/ilp32/libm.a
inflating: libtock-picolib-1.8.5/riscv/riscv64-unknown-elf/lib/rv32im/ilp32/libsemihost.a
inflating: libtock-picolib-1.8.5/riscv/riscv64-unknown-elf/lib/rv32im/ilp32/libg.a
inflating: libtock-picolib-1.8.5/riscv/riscv64-unknown-elf/lib/rv32im/ilp32/libc.a

@ppannuto
Copy link
Member

Ah, I looked at d4cb0c3 now. Short answer, no.

That's actually what I tried the first time for newlib/libc++, and how I eventually ended up with the extra directory. % isn't quite like a generic wildcard matching text, it is aware of file and directory structure, and it matches a directory, not a string [things learned a few weeks back when I fought this same battle].

The easy answer is to just embrace the subdirectory like I originally had. It's what make wants 🤷🏼 .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants