Message ID | 20190131215611.29341-3-michael@walle.cc (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | lm32: convert to new common tcg infrastructure | expand |
Michael Walle <michael@walle.cc> writes: > The lm32 architecture doesn't need the complete compiler. In fact, only > the building of GCC is skipped to make building the docker image faster. > > Signed-off-by: Michael Walle <michael@walle.cc> > --- > tests/tcg/Makefile.include | 13 +++++++++++-- > 1 file changed, 11 insertions(+), 2 deletions(-) > > diff --git a/tests/tcg/Makefile.include b/tests/tcg/Makefile.include > index 73b5626fc5..19b81400f5 100644 > --- a/tests/tcg/Makefile.include > +++ b/tests/tcg/Makefile.include > @@ -41,17 +41,26 @@ ifneq ($(DOCKER_IMAGE),) > # We also need the Docker make rules to depend on > include $(SRC_PATH)/tests/docker/Makefile.include > > -DOCKER_COMPILE_CMD="$(DOCKER_SCRIPT) cc --user $(shell id -u) \ > +DOCKER_CC_CMD="$(DOCKER_SCRIPT) cc --user $(shell id -u) \ > --cc $(DOCKER_CROSS_COMPILER) \ > -i qemu:$(DOCKER_IMAGE) \ > -s $(SRC_PATH) -- " > +DOCKER_AS_CMD="$(DOCKER_SCRIPT) cc --user $(shell id -u) \ > + --cc $(DOCKER_CROSS_ASSEMBLER) \ > + -i qemu:$(DOCKER_IMAGE) \ > + -s $(SRC_PATH) -- " > +DOCKER_LD_CMD="$(DOCKER_SCRIPT) cc --user $(shell id -u) \ > + --cc $(DOCKER_CROSS_LINKER) \ > + -i qemu:$(DOCKER_IMAGE) \ > + -s $(SRC_PATH) -- " > DOCKER_PREREQ=docker-image-$(DOCKER_IMAGE) > > .PHONY: docker-build-guest-tests > docker-build-guest-tests: $(DOCKER_PREREQ) > $(call quiet-command, \ > (mkdir -p tests && cd tests && \ > - $(MAKE) -f $(TCG_MAKE) CC=$(DOCKER_COMPILE_CMD) \ > + $(MAKE) -f $(TCG_MAKE) CC=$(DOCKER_CC_CMD) \ > + AS=$(DOCKER_AS_CMD) LD=$(DOCKER_LD_CMD) \ Hmm will these overrides break exiting builds? We haven't defined DOCKER_CROSS_ASSEMBLER or DOCKER_CROSS_LINKER for all our targets. > BUILD_STATIC=y \ > EXTRA_CFLAGS=$(DOCKER_CROSS_COMPILER_CFLAGS)), \ > "BUILD","$(TARGET_NAME) guest-tests with docker qemu:$(DOCKER_IMAGE)") -- Alex Bennée
Am 1. Februar 2019 18:31:46 MEZ schrieb "Alex Bennée" <alex.bennee@linaro.org>: > >Michael Walle <michael@walle.cc> writes: > >> The lm32 architecture doesn't need the complete compiler. In fact, >only >> the building of GCC is skipped to make building the docker image >faster. >> >> Signed-off-by: Michael Walle <michael@walle.cc> >> --- >> tests/tcg/Makefile.include | 13 +++++++++++-- >> 1 file changed, 11 insertions(+), 2 deletions(-) >> >> diff --git a/tests/tcg/Makefile.include b/tests/tcg/Makefile.include >> index 73b5626fc5..19b81400f5 100644 >> --- a/tests/tcg/Makefile.include >> +++ b/tests/tcg/Makefile.include >> @@ -41,17 +41,26 @@ ifneq ($(DOCKER_IMAGE),) >> # We also need the Docker make rules to depend on >> include $(SRC_PATH)/tests/docker/Makefile.include >> >> -DOCKER_COMPILE_CMD="$(DOCKER_SCRIPT) cc --user $(shell id -u) \ >> +DOCKER_CC_CMD="$(DOCKER_SCRIPT) cc --user $(shell id -u) \ >> --cc $(DOCKER_CROSS_COMPILER) \ >> -i qemu:$(DOCKER_IMAGE) \ >> -s $(SRC_PATH) -- " >> +DOCKER_AS_CMD="$(DOCKER_SCRIPT) cc --user $(shell id -u) \ >> + --cc $(DOCKER_CROSS_ASSEMBLER) \ >> + -i qemu:$(DOCKER_IMAGE) \ >> + -s $(SRC_PATH) -- " >> +DOCKER_LD_CMD="$(DOCKER_SCRIPT) cc --user $(shell id -u) \ >> + --cc $(DOCKER_CROSS_LINKER) \ >> + -i qemu:$(DOCKER_IMAGE) \ >> + -s $(SRC_PATH) -- " >> DOCKER_PREREQ=docker-image-$(DOCKER_IMAGE) >> >> .PHONY: docker-build-guest-tests >> docker-build-guest-tests: $(DOCKER_PREREQ) >> $(call quiet-command, \ >> (mkdir -p tests && cd tests && \ >> - $(MAKE) -f $(TCG_MAKE) CC=$(DOCKER_COMPILE_CMD) \ >> + $(MAKE) -f $(TCG_MAKE) CC=$(DOCKER_CC_CMD) \ >> + AS=$(DOCKER_AS_CMD) LD=$(DOCKER_LD_CMD) \ > >Hmm will these overrides break exiting builds? We haven't defined >DOCKER_CROSS_ASSEMBLER or DOCKER_CROSS_LINKER for all our targets. it's just an RFC and not intended to be used as is.. actually I'd prefer to use the gcc. but I guess it makes the Travis ci run too long. I'd hoped there will be other ideas.. if we go with the linker and assembler variables, these should only be set if the architecture make includes will setup the variables correctly.
diff --git a/tests/tcg/Makefile.include b/tests/tcg/Makefile.include index 73b5626fc5..19b81400f5 100644 --- a/tests/tcg/Makefile.include +++ b/tests/tcg/Makefile.include @@ -41,17 +41,26 @@ ifneq ($(DOCKER_IMAGE),) # We also need the Docker make rules to depend on include $(SRC_PATH)/tests/docker/Makefile.include -DOCKER_COMPILE_CMD="$(DOCKER_SCRIPT) cc --user $(shell id -u) \ +DOCKER_CC_CMD="$(DOCKER_SCRIPT) cc --user $(shell id -u) \ --cc $(DOCKER_CROSS_COMPILER) \ -i qemu:$(DOCKER_IMAGE) \ -s $(SRC_PATH) -- " +DOCKER_AS_CMD="$(DOCKER_SCRIPT) cc --user $(shell id -u) \ + --cc $(DOCKER_CROSS_ASSEMBLER) \ + -i qemu:$(DOCKER_IMAGE) \ + -s $(SRC_PATH) -- " +DOCKER_LD_CMD="$(DOCKER_SCRIPT) cc --user $(shell id -u) \ + --cc $(DOCKER_CROSS_LINKER) \ + -i qemu:$(DOCKER_IMAGE) \ + -s $(SRC_PATH) -- " DOCKER_PREREQ=docker-image-$(DOCKER_IMAGE) .PHONY: docker-build-guest-tests docker-build-guest-tests: $(DOCKER_PREREQ) $(call quiet-command, \ (mkdir -p tests && cd tests && \ - $(MAKE) -f $(TCG_MAKE) CC=$(DOCKER_COMPILE_CMD) \ + $(MAKE) -f $(TCG_MAKE) CC=$(DOCKER_CC_CMD) \ + AS=$(DOCKER_AS_CMD) LD=$(DOCKER_LD_CMD) \ BUILD_STATIC=y \ EXTRA_CFLAGS=$(DOCKER_CROSS_COMPILER_CFLAGS)), \ "BUILD","$(TARGET_NAME) guest-tests with docker qemu:$(DOCKER_IMAGE)")
The lm32 architecture doesn't need the complete compiler. In fact, only the building of GCC is skipped to make building the docker image faster. Signed-off-by: Michael Walle <michael@walle.cc> --- tests/tcg/Makefile.include | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-)