Sadly, it is hard to add incremental improvements to architectures,
and then assume the old ones are gone...

Stuart Henderson <[email protected]> wrote:

> On 2019/11/15 03:02, Ted Unangst wrote:
> > Stuart Henderson wrote:
> > > This runs OK on an i386 with more CPU features; most likely it wants
> > > SSE or similar which the Geode LX in your net5501 doesn't have. (Go has
> > > runtime cpuid checks for most of the SSE variants but I think not for
> > > the original SSE which it probably just assumes is available).
> > > One clue would be if the disassembly has instructions referencing
> > > registers X0..X15 which are just used for SSE.
> > 
> > go will autodetect 387 or sse2 based on the host.
> > 
> > https://golang.org/doc/install/source#environment
> 
> On 2019/11/18 21:50, [email protected] wrote:
> > I think I may have found the problem:
> > https://github.com/golang/go/issues/20009#issuecomment-294437962
> > 
> > It looks like the ports machines building Go probably have SSE/SSE2, so
> > the resulting binary expects those to be present.
> > 
> > I'm not sure what can be done short of building Go on my Soekris…  I
> > can't fault anyone for using a more "modern" CPU when building the ports
> > tree for distribution.
> 
> 
> Oh, so the autodetect is like -mtune=auto in C compilers? yeuuw.
> 
> I suppose we can do this (plus bump REVISION on all the go ports that
> build on i386 to trigger rebuilds). I don't see there being *all* that
> much point in having i386 packages if they don't run on soekris/alix...
> 
> Thoughts? (+cc jsing)
> 
> 
> Index: Makefile
> ===================================================================
> RCS file: /cvs/ports/lang/go/Makefile,v
> retrieving revision 1.75
> diff -u -p -r1.75 Makefile
> --- Makefile  24 Oct 2019 16:22:07 -0000      1.75
> +++ Makefile  18 Nov 2019 21:56:56 -0000
> @@ -55,6 +55,9 @@ GOARCH =            arm64
>  GOARCH =             386
>  .endif
>  
> +# don't use SSE on i386
> +MAKE_ENV +=          GO386=387
> +
>  .for arch in ${BIN_BOOTSTRAP_GOARCHS}
>  SUPDISTFILES +=              
> go-openbsd-${arch}-bootstrap-${BIN_BOOTSTRAP_VERSION}${EXTRACT_SUFX}:0
>  
> Index: go.port.mk
> ===================================================================
> RCS file: /cvs/ports/lang/go/go.port.mk,v
> retrieving revision 1.26
> diff -u -p -r1.26 go.port.mk
> --- go.port.mk        6 Oct 2019 15:37:15 -0000       1.26
> +++ go.port.mk        18 Nov 2019 21:56:56 -0000
> @@ -33,7 +33,10 @@ MODGO_TYPE ?=              bin
>  MODGO_WORKSPACE ?=   ${WRKDIR}/go
>  MODGO_GOCACHE ?=     ${WRKDIR}/go-cache
>  MODGO_GOPATH ?=              ${MODGO_WORKSPACE}:${MODGO_PACKAGE_PATH}
> -MAKE_ENV +=          GOCACHE="${MODGO_GOCACHE}" GOPATH="${MODGO_GOPATH}" 
> GO111MODULE=off
> +MAKE_ENV +=          GOCACHE="${MODGO_GOCACHE}" \
> +                     GOPATH="${MODGO_GOPATH}" \
> +                     GO111MODULE=off \
> +                     GO386=387
>  # ports are not allowed to fetch from the network at build time; point
>  # GOPROXY at an unreachable host so that failures are also visible to
>  # developers who don't have PORTS_PRIVSEP and a "deny .. _pbuild" PF rule.
> 

Reply via email to