diff options
author | Andrew Waterman <waterman@eecs.berkeley.edu> | 2014-09-11 19:48:15 -0700 |
---|---|---|
committer | Andrew Waterman <waterman@eecs.berkeley.edu> | 2014-09-11 19:48:15 -0700 |
commit | 9eda71d78ed4c1dc2e86f07a3be7452d307a218f (patch) | |
tree | aae5f92b8b222e3bc4217b21ddece79c62cc3ec2 | |
parent | 3ccbeca6a9e8d8b066eda28583765d8e087f3da4 (diff) | |
download | pk-9eda71d78ed4c1dc2e86f07a3be7452d307a218f.zip pk-9eda71d78ed4c1dc2e86f07a3be7452d307a218f.tar.gz pk-9eda71d78ed4c1dc2e86f07a3be7452d307a218f.tar.bz2 |
Don't assume null pointers can't be dereferenced
This option breaks vm_init's access to word 0 to obtain the memory capacity.
-rwxr-xr-x | configure | 2 | ||||
-rw-r--r-- | configure.ac | 2 |
2 files changed, 2 insertions, 2 deletions
@@ -3951,7 +3951,7 @@ fi # Default compiler flags #------------------------------------------------------------------------- -CFLAGS="-Wall -Os -std=gnu99 -Wno-unused -Wno-attributes" +CFLAGS="-Wall -Os -std=gnu99 -Wno-unused -Wno-attributes -fno-delete-null-pointer-checks" LIBS="-lc -lgcc" diff --git a/configure.ac b/configure.ac index 71a9e33..93886cd 100644 --- a/configure.ac +++ b/configure.ac @@ -71,7 +71,7 @@ AC_HEADER_STDC # Default compiler flags #------------------------------------------------------------------------- -AC_SUBST([CFLAGS], ["-Wall -Os -std=gnu99 -Wno-unused -Wno-attributes"]) +AC_SUBST([CFLAGS], ["-Wall -Os -std=gnu99 -Wno-unused -Wno-attributes -fno-delete-null-pointer-checks"]) AC_SUBST([LIBS], ["-lc -lgcc"]) AX_DEFAULT_CONFIGURE_ARG([--host=riscv]) |