Other gccgo port on FreeBSD

YuryG

Aspiring Daemon

Reaction score: 30
Messages: 504

Is there GNU GO implementation port on FreeBSD? I've tried to add "go" in the gcc port's Makefile manually in the languages string. But got a bunch of errors.
 
OP
Y

YuryG

Aspiring Daemon

Reaction score: 30
Messages: 504

Thanks, I've seen it also. (Also in the gcc source there are files for freebsd's gccgo due to their names, but not compiling out of the box.)
 
OP
Y

YuryG

Aspiring Daemon

Reaction score: 30
Messages: 504

Sorry, but still no-one knows how to build gccgo on (for) FreeBSD? May be someone could point me to a more specific place to ask?
 

RAMChYLD

New Member


Messages: 5

I cannot wrap my head around what it is.

I googled hard and found a similar problem being mentioned about compiling gccgo on FreeBSD on the PowerPC64 arch.

https://www.mail-archive.com/gcc-bugs@gcc.gnu.org/msg659897.html

They theorized that it's down to mkrsysinfo.sh generating bogus code for FreeBSD, coupled with errors in the os_freebsd.go file.

The compilation always end with the following errors:

Code:
runtime_sysinfo.go:338:6: error: invalid recursive type
  338 | type _cmsghdr _cmsghdr
      |      ^
runtime_sysinfo.go:560:6: error: invalid recursive type
  560 | type _thread _thread
      |      ^
runtime_sysinfo.go:89:27: error: use of undefined type '___va_list_tag'
   89 | type ___gnuc_va_list [0+1]___va_list_tag
      |                           ^
/usr/ports/lang/gcc10/work/gcc-10.2.0/libgo/go/runtime/os_freebsd.go:91:16: error: unexpected reference to package
   91 |  if maskSize < sys.PtrSize {
      |                ^
/usr/ports/lang/gcc10/work/gcc-10.2.0/libgo/go/runtime/os_freebsd.go:92:14: error: unexpected reference to package
   92 |   maskSize = sys.PtrSize
      |              ^
/usr/ports/lang/gcc10/work/gcc-10.2.0/libgo/go/runtime/os_freebsd.go:15:75: error: use of undefined type 'umtx_time'
   15 | func sys_umtx_op(addr *uint32, mode int32, val uint32, uaddr1 uinptr, ts *umtx_time) int32
      |                                                                           ^
/usr/ports/lang/gcc10/work/gcc-10.2.0/libgo/go/runtime/os_freebsd.go:141:5: error: reference to field '_clockid' in object which has no fields or methods
  141 |   ut._clockid = _CLOCK_MONOTONIC
      |     ^
/usr/ports/lang/gcc10/work/gcc-10.2.0/libgo/go/runtime/os_freebsd.go:142:5: error: reference to field '_timeout' in object which has no fields or methods
  142 |   ut._timeout.setNsec(ns)
      |     ^
/usr/ports/lang/gcc10/work/gcc-10.2.0/libgo/go/runtime/os_freebsd.go:145:27: error: reference to undefined name '_UMTX_OP_WAIT_UINT_PRIVATE'
  145 |  ret := sys_umtx_op(addr, _UMTX_OP_WAIT_UINT_PRIVATE, val, unsafe.Sizeof(*utp), utp)
      |                           ^
/usr/ports/lang/gcc10/work/gcc-10.2.0/libgo/go/runtime/os_freebsd.go:15:75: error: use of undefined type 'umtx_time'
   15 | func sys_umtx_op(addr *uint32, mode int32, val uint32, uaddr1 uinptr, ts *umtx_time) int32
      |                                                                           ^
/usr/ports/lang/gcc10/work/gcc-10.2.0/libgo/go/runtime/os_freebsd.go:155:27: error: reference to undefined name '_UMTX_OP_WAKE_PRIVATE'
  155 |  ret := sys_umtx_op(addr, _UMTX_OP_WAKE_PRIVATE, cnt, 0, nil)
      |                           ^
/usr/ports/lang/gcc10/work/gcc-10.2.0/libgo/go/runtime/os_freebsd.go:184:67: error: unexpected reference to package
  184 |  auxv := (*[1 << 28]uintptr)(add(unsafe.Pointer(argv), uintptr(n)*sys.PtrSize))
      |                                                                   ^
/usr/ports/lang/gcc10/work/gcc-10.2.0/libgo/go/runtime/os_freebsd.go:204:4: error: reference to undefined name 'timekeepSharedPage'
  204 |    timekeepSharedPage = (*vdsoTimekeep)(unsafe.Pointer(val))
      |    ^
/usr/ports/lang/gcc10/work/gcc-10.2.0/libgo/go/runtime/os_freebsd.go:204:27: error: reference to undefined name 'vdsoTimekeep'
  204 |    timekeepSharedPage = (*vdsoTimekeep)(unsafe.Pointer(val))
      |                           ^
/usr/ports/lang/gcc10/work/gcc-10.2.0/libgo/go/runtime/os_freebsd.go:204:26: error: expected pointer
  204 |    timekeepSharedPage = (*vdsoTimekeep)(unsafe.Pointer(val))
      |                          ^
/usr/ports/lang/gcc10/work/gcc-10.2.0/libgo/go/runtime/os_freebsd.go:207:3: error: reference to undefined name 'archauxv'
  207 |   archauxv(tag, val)
      |   ^
/usr/ports/lang/gcc10/work/gcc-10.2.0/libgo/go/runtime/time_nofake.go:23:9: error: reference to undefined name 'walltime1'
   23 |  return walltime1()
      |         ^
/usr/ports/lang/gcc10/work/gcc-10.2.0/libgo/go/runtime/time_nofake.go:23:2: error: not enough arguments to return
   23 |  return walltime1()
      |  ^
/usr/ports/lang/gcc10/work/gcc-10.2.0/libgo/go/runtime/os_freebsd.go:15:63: error: use of undefined type 'uinptr'
   15 | func sys_umtx_op(addr *uint32, mode int32, val uint32, uaddr1 uinptr, ts *umtx_time) int32
      |                                                               ^
/usr/ports/lang/gcc10/work/gcc-10.2.0/libgo/go/runtime/os_freebsd.go:15:75: error: use of undefined type 'umtx_time'
   15 | func sys_umtx_op(addr *uint32, mode int32, val uint32, uaddr1 uinptr, ts *umtx_time) int32
      |                                                                           ^
gmake[6]: *** [Makefile:2865: runtime.lo] Error 1
gmake[5]: *** [Makefile:2247: all-recursive] Error 1
gmake[4]: *** [Makefile:1160: all] Error 2
gmake[3]: *** [Makefile:20697: all-target-libgo] Error 2
gmake[2]: *** [Makefile:24939: bootstrap-lean] Error 2
 
Top