The problem isn't building TCC against musl, the problem is building musl using TCC.
git clone git://git.musl-libc.org/musl && cd musl && ./configure CC=i386-tcc --target=i386 && rm -r src/complex && make ... i386-tcc -std=c99 -nostdinc -ffreestanding -fexcess-precision=standard -frounding-math -Wa,--noexecstack -D_XOPEN_SOURCE=700 -I./arch/i386 -I./arch/generic -Iobj/src/internal -I./src/include -I./src/internal -Iobj/include -I./include -Os -pipe -fomit-frame-pointer -fno-unwind-tables -fno-asynchronous-unwind-tables -ffunction-sections -fdata-sections -march=i486 -mtune=generic -Werror=implicit-function-declaration -Werror=implicit-int -Werror=pointer-sign -Werror=pointer-arith -c -o obj/src/fcntl/fcntl.o src/fcntl/fcntl.c src/fcntl/fcntl.c:11: warning: implicit declaration of function '__builtin_va_start' src/fcntl/fcntl.c:12: warning: implicit declaration of function '__builtin_va_arg' src/fcntl/fcntl.c:12: error: identifier expected make: *** [Makefile:148: obj/src/fcntl/fcntl.o] Error 1 The problem is that it's va_start is defined in musl's stdarg.h as __builtin_va_start and the other va_* defines do the same because this is standard compiler convention. TCC is the only compiler that doesn't do this. Note, this isn't the only issue with TCC (which is why I removed the directory requiring the complex functions) but it is an issue with a straightforward solution. On Wed, Oct 31, 2018 at 5:16 PM avih <[email protected]> wrote: > > Do you have a specific issue to build tcc on musl or use va_* with tcc built > with musl? > > For me, on current Alpine linux (with gcc 8.2) `git clone > git://git.or.cz/tinycc && cd tinycc && ./configure --config-musl && make` > builds fine, all the tests pass (`make test`), and I've used this tcc (in the > past) to build complex programs which use va_* (mpv). > > Is there something you're trying to do which you can't? if yes, can you > please give exact steps to reproduce? (including the error messages, if any, > which you get) > > > On Wednesday, October 31, 2018 10:53 PM, Jan Nieuwenhuizen <[email protected]> > wrote: > > > Daniel Wingerd writes: > > > I'm working on getting musl to build using TCC and the first problem I > > encountered was that TCC is missing __builtin_va_* builtins. > > I suspect this is on x86_64? FWIW, I have finally managed to > bootstrap*) TCC on i686-linux using the Mes C Library and a pretty > simplistic stdarg+). > > Greetings, > janneke > > *) http://joyofsource.com/reduced-binary-seed-bootstrap.html > +) http://git.savannah.gnu.org/cgit/mes.git/tree/include/stdarg.h > > -- > Jan Nieuwenhuizen <[email protected]> | GNU LilyPond http://lilypond.org > Freelance IT http://JoyofSource.com | AvatarĀ® http://AvatarAcademy.com > > > _______________________________________________ > Tinycc-devel mailing list > [email protected] > https://lists.nongnu.org/mailman/listinfo/tinycc-devel > > _______________________________________________ Tinycc-devel mailing list [email protected] https://lists.nongnu.org/mailman/listinfo/tinycc-devel
