aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoraurel32 <aurelien@aurel32.net>2018-03-21 23:43:43 +0100
committerAndrew Waterman <aswaterman@gmail.com>2018-03-21 15:43:43 -0700
commitdcd6ee0893f784320db857cb66f8424a1d154d8d (patch)
treec5be9d269d6aab29396b303908a1751873daa9bb
parent5a0e3e55cab1d6f3462c77e852f16365c79f2c98 (diff)
downloadriscv-pk-dcd6ee0893f784320db857cb66f8424a1d154d8d.zip
riscv-pk-dcd6ee0893f784320db857cb66f8424a1d154d8d.tar.gz
riscv-pk-dcd6ee0893f784320db857cb66f8424a1d154d8d.tar.bz2
Fix build with compilers defaulting to PIE (#90)
Debian toolchain defaults to PIE, and I guess that will also be the case of most distributions. This cause bbl to be non-functional. This patch fixes that by adding -fno-PIE in the default CFLAGS.
-rwxr-xr-xconfigure2
-rw-r--r--configure.ac2
2 files changed, 2 insertions, 2 deletions
diff --git a/configure b/configure
index c83743f..5af7cee 100755
--- a/configure
+++ b/configure
@@ -4071,7 +4071,7 @@ fi
# Set compiler flags
#-------------------------------------------------------------------------
-default_CFLAGS="-Wall -Werror -D__NO_INLINE__ -mcmodel=medany -O2 -std=gnu99 -Wno-unused -Wno-attributes -fno-delete-null-pointer-checks"
+default_CFLAGS="-Wall -Werror -D__NO_INLINE__ -mcmodel=medany -O2 -std=gnu99 -Wno-unused -Wno-attributes -fno-delete-null-pointer-checks -fno-PIE"
# Check whether --enable-32bit was given.
if test "${enable_32bit+set}" = set; then :
diff --git a/configure.ac b/configure.ac
index 7b7c61a..da0d737 100644
--- a/configure.ac
+++ b/configure.ac
@@ -78,7 +78,7 @@ AC_ARG_VAR(RISCV, [top-level RISC-V install directory])
# Set compiler flags
#-------------------------------------------------------------------------
-default_CFLAGS="-Wall -Werror -D__NO_INLINE__ -mcmodel=medany -O2 -std=gnu99 -Wno-unused -Wno-attributes -fno-delete-null-pointer-checks"
+default_CFLAGS="-Wall -Werror -D__NO_INLINE__ -mcmodel=medany -O2 -std=gnu99 -Wno-unused -Wno-attributes -fno-delete-null-pointer-checks -fno-PIE"
AC_ARG_ENABLE([32bit],
AS_HELP_STRING([--enable-32bit], [Build a 32-bit pk]),