Toolchain independence#717
Conversation
|
|
||
| REBUILD_CANDIDATE_OBJECTS := $(shell find . -name '*.o') | ||
| ${REBUILD_CANDIDATE_OBJECTS): .EXTRA_PREREQS = ${CHECK_FLAGS_BOARD_HASH} | ||
| .EXTRA_PREREQS = ${CHECK_FLAGS_BOARD_HASH} |
There was a problem hiding this comment.
FYI Peter: #715. (I suspect this might be the BSD make instead of GNU make thing again? IDK)
There was a problem hiding this comment.
Could be; I will check this.
There was a problem hiding this comment.
We use so many GNUmake idioms I'd be surprised if BSD make builds the system at all.
There was a problem hiding this comment.
Is it possible to make make error if it's not GNUmake? That would solve this as well, I think. (I do recall us decided that we basically need GNUmake: our CI needs it explicitly)
There was a problem hiding this comment.
Correction: macOS default is GNUmake 3.8, from 2006...
There was a problem hiding this comment.
Thanks for bringing this up @midnightveil . @wom-bat Could you please review/consider merging my PR #715 ? I understand that in general we may not want to worry about supporting super old versions of make, however:
-
We do not explicitly document that a certain version of make is required anywhere, and in this particular case the use of the
.EXTRA_PREREQSvariable just fails silently (or creates an unused variable), which is dangerous when it comes to dependency tracking. -
As I describe in my PR, I don't think there are any benefits of using
.EXTRA_PREREQShere.common.mkdoes not contain any compilation rules for object files, and since automatic variable expansions only contain dependencies declared in the same file, there is no risk of the board cflags file being accidentally included in the compilation rules declared in other makefiles.commands.
|
|
||
|
|
||
| IMAGES := blk_driver.elf client.elf blk_virt.elf serial_virt_tx.elf serial_driver.elf | ||
| CFLAGS += -Wall -Wno-unused-function -Werror -Wno-unused-command-line-argument \ |
There was a problem hiding this comment.
I can understand wanting to remove these disabled warnings but it has nothing to do with GCC vs Clang... These should be separate commits not squished in with the rest silently.
There was a problem hiding this comment.
This is GCC-versus clang ... the arguments are not available for gcc, and the warnings they suppress need to be fixed in-line in the code instead.
There was a problem hiding this comment.
GCC doesn't support -Wno-unused-function? but it says it does: https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wunused-function (and I'm pretty sure these pre-date clang-as-default).
There was a problem hiding this comment.
-Wunused-command-line-argument is the one it doesn't seem to accept... and if we can get rid of them, let's go ...
55be0f0 to
e017a3e
Compare
Gcc complains about a multi-line // comment. Fix it. Signed-off-by: Peter Chubb <Peter.Chubb@unsw.edu.au>
GCC complained about an unused variable: remove it. Signed-off-by: Peter Chubb <Peter.Chubb@unsw.edu.au>
This means we can get of the -Wno-unused-function compiler arg that is unrecognised by GCC. Signed-off-by: Peter Chubb <Peter.Chubb@unsw.edu.au>
Extend the board-hash to include TOOLCHAIN and make it so *everything* depends on it. Make clang the default toolchain Allow parent Makefiles to add to the flags depended on. Signed-off-by: Peter Chubb <Peter.Chubb@unsw.edu.au>
Extends flags with NVME and PARTITION so changing them forces a rebuild. Passes down Makefile flags to submake. Reformat slightly for clarity Signed-off-by: Peter Chubb <Peter.Chubb@unsw.edu.au>
This allows compilation ... there are some debug print helper
functions in a block.h header file.
-- Mark them inline so they don't get expanded if not used
-- Mark them __attribute__((unused) to make sure the compiler doesn't
complain.
Signed-off-by: Peter Chubb <Peter.Chubb@unsw.edu.au>
to make the style checker happy. Signed-off-by: Peter Chubb <Peter.Chubb@unsw.edu.au>
in mmio.c -- clang complains about unused functions. Signed-off-by: Peter Chubb <Peter.Chubb@unsw.edu.au>
Fix style in timer/apb_timer/timer.c blk/mmc/imx/usdhc.c and Makefiles Signed-off-by: Peter Chubb <Peter.Chubb@unsw.edu.au>
e017a3e to
2bb2ae4
Compare
This is now set in common.mk. Signed-off-by: Peter Chubb <Peter.Chubb@unsw.edu.au>
Make sddf build more independent of toolchain.
-- fix warnings from gcc
-- improve common.mk so switching toolchains actually rebuilds things