On Mon, Aug 22, 2016 at 2:45 PM, <ellio...@gmail.com> wrote: > > A few months ago I asked about adding a new struct type to syscall. > (https://groups.google.com/d/msg/golang-nuts/5HTN3QVC_lQ/QuYxNl5UAgAJ) and I > got a great answer from Ian Lance Taylor that it would make sense to use the > x/sys/unix library for my implementation. > > This worked great, I made a small change to syscall_linux.go > (https://github.com/elliotmr/cantest/blob/master/unix.diff) and was able to > regenerate zerrors_linux_amd64.go, zsysnum_linux_amd64.go, and > ztypes_linux_amd64.go using mkall.sh. Actually, the generated files have > many more differences than what I would expect just from my code changes, > but everything seems to work. > > Now however, I want to use this on an arm processor and I am having trouble. > If I try to run GOOS=linux GOARCH=arm ./mkall.sh from my build host (amd64) > is crashes because my gcc doesn't have the -marm flag. If I try passing my > cross-toolchain using $CC I get some missing header errors. Eventually I > was able to get it to regenerate the files using qemu and this image: > https://people.debian.org/~aurel32/qemu/armhf/. The ztypes file looks good > (though once again there are extra entries generated that seem to have > nothing to do with my patch). But zsysnum is completely empty. > > Basically the question is this: What is the correct way to generate the > x/sys/unix files, both for a given host environments and also for others?
We don't currently have a good procedure for that. Normally one has to actually run the mkall.sh script on a system of the type you are trying to update. Using QEMU could work in principle. For ARM GNU/Linux zsysnum is updating by running curl (see mkall.sh) which is probably why that failed to update. Ian -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.