From c0f92f445469d0b6d8ae79f644dadc26e6dd8fb7 Mon Sep 17 00:00:00 2001 From: Achilleas Anagnostopoulos Date: Fri, 23 Mar 2018 07:17:12 +0000 Subject: [PATCH] makefile: tweak build script to compile kernel using go 1.10 --- Makefile | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 794deed..07cfefb 100644 --- a/Makefile +++ b/Makefile @@ -61,11 +61,13 @@ go.o: -e "1s|^|export GOOS=$(GOOS)\n|" \ -e "1s|^|export GOARCH=$(GOARCH)\n|" \ -e "1s|^|export GOROOT=$(GOROOT)\n|" \ - -e "1s|^|WORK='$(BUILD_ABS_DIR)'\n|" \ + -e "1s|^|export CGO_ENABLED=0\n|" \ -e "1s|^|alias pack='$(GO) tool pack'\n|" \ -e "/^mv/d" \ + -e "/\/buildid/d" \ -e "s|-extld|-tmpdir='$(BUILD_ABS_DIR)' -linkmode=external -extldflags='-nostartfiles -nodefaultlibs -nostdlib -r' -extld|g" \ - | sh 2>&1 | sed -e "s/^/ | /g" + -e 's|$$WORK|$(BUILD_ABS_DIR)|g' \ + | sh 2>&1 | sed -e "s/^/ | /g" @# build/go.o is a elf32 object file but all go symbols are unexported. Our @# asm entrypoint code needs to know the address to 'main.main' so we use