oasislinux / oasis

a small statically-linked linux system
Other
2.75k stars 84 forks source link

Build libxkbcommon with byacc #21

Open bluetech opened 3 years ago

bluetech commented 3 years ago

I noticed that the libxkbcommon carries a patch with a pre-generated parser.c file, because it is generated with bison. But I always did try to keep byacc working. The only detail is that byacc needs to be build with --enable-btyacc (i.e. #define YYBTYACC 1)

michaelforney commented 3 years ago

Thanks for keeping it working with byacc! Currently our byacc does not use --enable-btyacc, which is why I added the pregenerated version (we also used to use OpenBSD yacc instead of byacc). I think I am fine to enable it, but I'm a bit worried since it means the host system must have a yacc that supports %destructor. I suppose this is usually the case, except when cross-compiling from non-Linux operating systems.

At some point I might switch to using a local byacc built for the host system instead of whatever is provided by the host operating system. If I do that, then it makes sense to enable btyacc and drop the pregenerated version at the same time.