Re: [go-nuts] What is the the gccgo equivalent of -X importpath.name=value

2020-07-11 Thread 'Ingo Oeser' via golang-nuts
You could use the Go module support to tie the cli version to the version of your cli module. The module version can now be optained from the binary via https://godoc.org/runtime/debug#ReadBuildInfo and then in BuildInfo.Module.Version field. Since that is part of the official Go std-library,

Re: [go-nuts] What is the the gccgo equivalent of -X importpath.name=value

2020-07-09 Thread Atilla Filiz
Hi Ian I am thinking of ways to work around this then. I come from C world. There we use an undefined symbol, and define it using the -D flag to the compiler. Since Go has no preprocessor, this is probably not an option. Another option could be some binutil trick to remove a symbol an re-add it

Re: [go-nuts] What is the the gccgo equivalent of -X importpath.name=value

2020-07-09 Thread Ian Lance Taylor
On Thu, Jul 9, 2020 at 9:40 AM Atilla Filiz wrote: > > As part of porting to powerpc440 effort, we are using gccgo to port Docker. > > I am confused about the -X flag. What is the gccgo equivalent of using -X > importpath.name=value to set string variables in some go files. > > The following comm

[go-nuts] What is the the gccgo equivalent of -X importpath.name=value

2020-07-09 Thread Atilla Filiz
Hi All As part of porting to powerpc440 effort, we are using gccgo to port Docker. I am confused about the -X flag. What is the gccgo equivalent of using -X importpath.name=value to set string variables in some go files. The following command GO111MODULE=off GOARCH=ppc GOCACHE="/workspace/out