mirror of
https://github.com/taigrr/gopher-os
synced 2025-01-18 04:43:13 -08:00
tools: update offsets tool to work with go versions 1.7 - 1.10
Older go versions (1.7.x) specify a fixed page size (_PageSize const) as part of their runtime whereas newer go versions populate the page size at runtime. The kernel asm bootstrap code was written with go 1.8 in mind. As a result it attempts to populate the page size manually which obviously breaks compilation in go 1.7. The offsets tool has been updated to emit the special def "SKIP_PAGESIZE_SETUP" when running under go 1.7 which allows us to perform conditional compilation of the page setup code inside the bootstrap asm code. fixup
This commit is contained in:
3
Makefile
3
Makefile
@@ -22,7 +22,6 @@ FUZZ_PKG_LIST := src/gopheros/device/acpi/aml
|
||||
ifeq ($(OS), Linux)
|
||||
export SHELL := /bin/bash -o pipefail
|
||||
|
||||
|
||||
LD := ld
|
||||
AS := nasm
|
||||
|
||||
@@ -105,7 +104,7 @@ $(BUILD_DIR)/go_asm_offsets.inc:
|
||||
@mkdir -p $(BUILD_DIR)
|
||||
|
||||
@echo "[tools:offsets] calculating OS/arch-specific offsets for g, m and stack structs"
|
||||
@GOPATH=$(GOPATH) $(GO) run tools/offsets/offsets.go -target-os $(GOOS) -target-arch $(GOARCH) -go-binary $(GO) -out $@
|
||||
@GOROOT=$(GOROOT) GOPATH=$(GOPATH) $(GO) run tools/offsets/offsets.go -target-os $(GOOS) -target-arch $(GOARCH) -go-binary $(GO) -out $@
|
||||
|
||||
$(BUILD_DIR)/arch/$(ARCH)/asm/%.o: src/arch/$(ARCH)/asm/%.s
|
||||
@mkdir -p $(shell dirname $@)
|
||||
|
||||
Reference in New Issue
Block a user