aboutsummaryrefslogtreecommitdiff
path: root/configure
diff options
context:
space:
mode:
authorZong Li <zong@andestech.com>2018-05-01 10:58:34 +0800
committerZong Li <zong@andestech.com>2018-06-21 17:18:47 +0800
commitc3cf29a8f2f5f6a0b793bd1f24b083a759370a01 (patch)
treefbbbc55a9a98cbc4be9eb73a151507dde39b85e3 /configure
parent2cffbf5d8efd9822dbac98e2fde89adba871d4b0 (diff)
downloadriscv-pk-c3cf29a8f2f5f6a0b793bd1f24b083a759370a01.zip
riscv-pk-c3cf29a8f2f5f6a0b793bd1f24b083a759370a01.tar.gz
riscv-pk-c3cf29a8f2f5f6a0b793bd1f24b083a759370a01.tar.bz2
Replace the --enable-32bit option by --with-arch
Get rid of the --enable-32bit option and switch to use --with-arch, which is more standard because it matches the GCC build. If --with-arch is not specified, it defaults to whatever the compiler's default is. The --with-abi is not necessary for this project. Unconditionally compile it with a no-float ABI.
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure37
1 files changed, 11 insertions, 26 deletions
diff --git a/configure b/configure
index 058eea1..5a37513 100755
--- a/configure
+++ b/configure
@@ -592,7 +592,7 @@ subprojects_enabled
subprojects
BBL_LOGO_FILE
BBL_PAYLOAD
-install_subdir
+WITH_ARCH
RISCV
EGREP
GREP
@@ -669,7 +669,7 @@ ac_subst_files=''
ac_user_opts='
enable_option_checking
enable_stow
-enable_32bit
+with_arch
enable_print_device_tree
enable_optional_subprojects
enable_vm
@@ -1318,7 +1318,6 @@ Optional Features:
--disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
--enable-FEATURE[=ARG] include FEATURE [ARG=yes]
--enable-stow Enable stow-based install
- --enable-32bit Build a 32-bit pk
--enable-print-device-tree
Print DTS when booting
--enable-optional-subprojects
@@ -1330,6 +1329,7 @@ Optional Features:
Optional Packages:
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
--without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
+ --with-arch Set the RISC-V architecture
--with-payload Set ELF payload for bbl
--with-logo Specify a better logo
@@ -4071,31 +4071,12 @@ 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 -fno-PIE"
-# Check whether --enable-32bit was given.
-if test "${enable_32bit+set}" = set; then :
- enableval=$enable_32bit; BUILD_32BIT=$enableval
-else
- BUILD_32BIT=no
-fi
+# Check whether --with-arch was given.
+if test "${with_arch+set}" = set; then :
+ withval=$with_arch; WITH_ARCH=$with_arch
-
-case "${BUILD_32BIT}" in
- yes|default)
- echo "Building 32-bit pk"
- CFLAGS="$default_CFLAGS -m32"
- LDFLAGS="-m32"
- install_subdir="`echo $host_alias | sed -e 's/64/32/g'`"
- ;;
- *)
- CFLAGS="$default_CFLAGS"
- LDFLAGS=
- install_subdir=$host_alias
- ;;
-esac
-
-LDFLAGS="$LDFLAGS -Wl,--build-id=none"
+fi
# Check whether --enable-print-device-tree was given.
if test "${enable_print_device_tree+set}" = set; then :
@@ -4110,12 +4091,16 @@ $as_echo "#define PK_PRINT_DEVICE_TREE /**/" >>confdefs.h
fi
+CFLAGS="-Wall -Werror -D__NO_INLINE__ -mcmodel=medany -O2 -std=gnu99 -Wno-unused -Wno-attributes -fno-delete-null-pointer-checks -fno-PIE"
+LDFLAGS="$LDFLAGS -Wl,--build-id=none"
+
LIBS="-lgcc"
+
#-------------------------------------------------------------------------
# MCPPBS subproject list
#-------------------------------------------------------------------------