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

2020-07-20 Thread Atilla Filiz
For archive's sake, let me tell my solution. I carefully added a preprocessing command into my build steps. Before compiling, the following command is run: sed -E -i 's:(Version\s*=\s*)".*":\1"'$(DOCKER_CLI_VERSION)'":' \ $(@D)/cli/version/version.go \ && sed -E -i 's:(GitCommit\s*=

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

[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