Source: libgpg-error Version: 1.26-2 Severity: wishlist Tags: upstream libgpg-error is painful to bootstrap for every new architecture, because it requires a new header file src/syscfg/lock-obj-pub.<triplet>.h
This is intended to be generated with a native build of gen-posix-lock-obj, which is a C program, that looks at libc headers and generates a header file containing a struct. This is not practical for an actual new architecture where you don't yet have a machine/filesystem to run this program on. It is 'correctly' cross-built by the current configury to build a binary for the HOST arch, but as we want to use it at build-time to generate the header file this is no use as we want a binary for the BUILD arch, that would output the correct file for the HOST arch. It seems redundant to be running a C program which is just fishing values out of libc headers to make another header. Just using the headers directly would remove the need for this bootstrapping. Using an arch-independent scripting language to generate the header would at least make bootstrapping new arches a lot simpler. However, given that the point of all this is to make a locking interface for users that works on all arches, can we not just get rid of this whole thing and use the available locking primitives in linux/bsd/windows directly, thereby making a genuinely opaque interface? Round about here we reach the edge of my expertise, and I hope Steve Capper, with whom I discussed this today will chime in with more details of an actual implementation and you can tell us if there is some reason why that won't work. Wookey