clang: Fix errors on zero kernel devices
"const TYPE *ptr" creates a non-const pointer to const data; for the pointer itself to be rodata requires "TYPE *const ptr". Taking the size of the pointer is caught by -Werror by default; suppress that. Signed-off-by: Stefan O'Rear <sorear@fastmail.com>
This commit is contained in:
parent
509f855a94
commit
a91e979c5a
2 changed files with 2 additions and 1 deletions
|
|
@ -33,6 +33,7 @@ set(CMAKE_CXX_COMPILER "clang++")
|
|||
set(CMAKE_CXX_COMPILER_ID Clang)
|
||||
set(CMAKE_CXX_COMPILER_TARGET ${TRIPLE})
|
||||
|
||||
string(APPEND c_common_flags " -Wno-sizeof-pointer-div")
|
||||
string(APPEND c_common_flags " -Qunused-arguments")
|
||||
string(APPEND c_common_flags " -Wno-constant-logical-operand")
|
||||
if(NOT ("${TRIPLE}" MATCHES "^riscv"))
|
||||
|
|
|
|||
|
|
@ -93,7 +93,7 @@ static const kernel_frame_t BOOT_RODATA kernel_devices[] = {
|
|||
{% endfor %}
|
||||
};
|
||||
{% else %}
|
||||
static const kernel_frame_t BOOT_RODATA *kernel_devices = NULL;
|
||||
static const kernel_frame_t BOOT_RODATA *const kernel_devices = NULL;
|
||||
{% endif %}
|
||||
|
||||
/* PHYSICAL MEMORY */
|
||||
|
|
|
|||
Loading…
Reference in a new issue