-
Notifications
You must be signed in to change notification settings - Fork 17.8k
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
gccgo, syscall: unknowndefine TUNSETIFF IOCTL const and others #11707
Comments
My earlier comment about the define of HAVE_LINUX_IF_TUN_H was referring to powerpc64le-linux/libgo/config.h which is generated during the gccgo build. |
mksysinfo.sh can handle macros defined in terms of macros. What it can't handle are macros that are defined as expressions more complex than the code in gcc/godump.c can parse. At least on my system the issue is that the TUNSET macros are defined using sizeof. Something like the earlier TIOCS* fix is what is required here. |
CL https://golang.org/cl/12491 mentions this issue. |
During the gccgo build define constants from some header files are processed by mksysinfo.sh and added to syscall.go. In some cases the constants are based on macros which are not processed correctly by mksysinfo.sh. This adds the support to generate the correct values for the TUN* constants from linux/if_tun.h. Fixes golang/go#11707 Reviewed-on: https://go-review.googlesource.com/12491 git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@226196 138bc75d-0d04-0410-961f-82ee72b054a4
syscall: Add ioctl consts from if_tun.h During the gccgo build define constants from some header files are processed by mksysinfo.sh and added to syscall.go. In some cases the constants are based on macros which are not processed correctly by mksysinfo.sh. This adds the support to generate the correct values for the TUN* constants from linux/if_tun.h. Fixes golang/go#11707 Reviewed-on: https://go-review.googlesource.com/12491 syscall: Fix to libgo/mksysinfo.sh In a recent change to mksysinfo.sh, a space was missing on some lines which caused the libgo build to hang on some systems. This corrects that problem. Fixes golang/go#11924 Reviewed-on: https://go-review.googlesource.com/12835 syscall: RawSockaddr fix for ppc64, ppc64le The struct RawSockaddr contains a field Data which should be uint8 on ppc64 and ppc64le, but is declared as int8 in gccgo. This change adds a two new files which contain the structure declaration for RawSockaddr, one with the correct types for for ppc64 and ppc64le, and the other for non-ppc64 platforms. Fixes golang/go#11469 Reviewed-on: https://go-review.googlesource.com/11946 git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-5-branch@226595 138bc75d-0d04-0410-961f-82ee72b054a4
During the gccgo build define constants from some header files are processed by mksysinfo.sh and added to syscall.go. In some cases the constants are based on macros which are not processed correctly by mksysinfo.sh. This adds the support to generate the correct values for the TUN* constants from linux/if_tun.h. Fixes golang/go#11707 Reviewed-on: https://go-review.googlesource.com/12491 From-SVN: r226196
This problem was reported in gccgo from gcc 5 (latest branch) when built on ppc64le because the IOCTL constant value TUNSETIFF is not defined in gccgo, but is available in gc from golang 1.5 in the generated files zerrors_linux_ppc64.go and zerrors_linu_ppc64le.go.
In the gccgo build, I can see that HAVE_LINUX_IF_TUN_H is defined, which allows the correct include file for these defines to be found, but mksysinfo.sh does not appear to handle them correctly. Instead the gen-sysinfo.go file contains:
// unknowndefine TUNSETIFF _IOW('T', 202, int)
for this define and all the other TUNSET* constants.
Possibly because it is a macro defined in terms of another macro and mksysinfo.sh doesn't handle that case?
This same problem occurred months ago with other IOCTL constants TIOCS* and the fix was to add some lines to mksysinfo.sh to enable them to be generated. I don't know if this is the same kind of problem and could be solved the same way.
The request would be to add all the TUNSET* constants to gccgo in the gcc5 branch if possible.
The text was updated successfully, but these errors were encountered: