From febfb3bfe6c3c40660beb8066a7674f26424100b Mon Sep 17 00:00:00 2001 From: Christian Helmuth Date: Fri, 26 May 2017 16:57:44 +0200 Subject: [PATCH] Fix source file location in RPi GPIO driver The explicit relative location of the file instructed both target builds to generate ../main.o which gloriously fails with parallel builds. The produced range of error messages was astonishing ranging from "file truncated" to "TLS reference in ../main.o mismatches non-TLS reference in ../main.o". --- repos/os/src/drivers/gpio/spec/rpi/foc/target.mk | 6 ++++-- repos/os/src/drivers/gpio/spec/rpi/hw/target.mk | 4 +++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/repos/os/src/drivers/gpio/spec/rpi/foc/target.mk b/repos/os/src/drivers/gpio/spec/rpi/foc/target.mk index 8b2951ce7..e49f9ef18 100644 --- a/repos/os/src/drivers/gpio/spec/rpi/foc/target.mk +++ b/repos/os/src/drivers/gpio/spec/rpi/foc/target.mk @@ -1,5 +1,7 @@ TARGET = foc_gpio_drv REQUIRES = rpi -SRC_CC += ../main.cc -LIBS += base +SRC_CC += main.cc +LIBS = base INC_DIR += $(PRG_DIR) $(PRG_DIR)/.. + +vpath main.cc $(PRG_DIR)/.. diff --git a/repos/os/src/drivers/gpio/spec/rpi/hw/target.mk b/repos/os/src/drivers/gpio/spec/rpi/hw/target.mk index 7d590f170..7aa018f88 100644 --- a/repos/os/src/drivers/gpio/spec/rpi/hw/target.mk +++ b/repos/os/src/drivers/gpio/spec/rpi/hw/target.mk @@ -1,5 +1,7 @@ TARGET = hw_gpio_drv REQUIRES = rpi -SRC_CC += ../main.cc +SRC_CC += main.cc LIBS = base INC_DIR += $(PRG_DIR) $(PRG_DIR)/.. + +vpath main.cc $(PRG_DIR)/..