What is the difference between -static and -static-libgo for gccgo? The documentation doesn't seem to really shed light on what is going on:
Use the -static-libgo option to link statically against the compiled packages.
Use the -static option to do…
First of all, all these code can be built successfully using go tool(e.g. go build, go install)
For say I got an a.go which tries to import a non-standard-library pkg from github:
package a
import (
"fmt"
"github.com/usr/pkg"
)
func init()…
Background
I'm currently in the process of writing a Go interface for this library.
As a first step, I'm trying to run the tests in /test/test_pc.c by calling them through Go wrappers. It is important to note that the tests are successful when…
I am trying to run a C call from go language code. Here is the program I am running:
package main
// #include
import "C"
import "fmt"
func main(){
fmt.Println(C.CMD_SET_ROUTE)
}
Here is the content of the file proxy.h:
#ifndef…
I am new to gccgo and I need help with compiling/running the below code (that works all right with the "standard" go compiler (sorry, I do not know the proper nomenclature)):
my gcc:
nailor@macbuntu:*rgo/src/tictoc-demo$ gccgo -v
Using built-in…
I'm trying to get hugo to work on my Alpine distro that's running on my Intel gallileo(Quark CPU).
I've overcome a few hurdles already.
This CPU Doesn't have MMX so gcc-go was needed to compile hugo into a binary (in a virtual machine)
But after…
How does one uses environment variables to optimize a go binary?
For instance, with C and GCC, you would set CFLAGS="-O2 -march=znver1 to build with tier 2 optimizations, with specific optimizations for the Zen microarchitecture.
I couldn't find an…
I want to install gccgo, but I am on windows. I read the Setting up and using gccgo page on the golang page. The page said
The simplest way to install gccgo is to install a GCC binary release built to include Go support. GCC binary releases are…
I need to build a shared library in Go. For this purpose, I used CGO and then built SO lib with options
go build -o libUtil.so -buildmode=c-shared main.go
Now, I need to do the same, but for ARM architecture. When I do not use CGO, I only do…
I am trying to build a go code for "arm64" architecture from "amd64" using a arm64 based so. I get the below mentioned error when I build the go code with the shared library. Can someone please assist me on this?
Go Version:
go1.10.3…
I am trying to run a simple helloworld.go on RHEL 6.8.
% cat helloworld.go
package main
import "fmt"
func main() {
fmt.Println("hello world")
}
The GC compiler works ok
% go build -compiler gccgo helloworld.go
go build…
I found a really strange issue with GCCGO and I was wondering if someone could explain it.
I'm trying to delete an element from a slice by index using the suggested slice tricks (https://github.com/golang/go/wiki/SliceTricks).
The following code…
I tried to compile some code with gccgo on my machine:
$ export LANG=C
$ go get -d github.com/fuzxxl/ppm
$ cd $GOPATH/src /github.com/fuzxxl/ppm
$ go build -compiler gcc
gccgo: error: unrecognized command line option…