aboutsummaryrefslogtreecommitdiff
path: root/Makefile.in
diff options
context:
space:
mode:
authorNick Knight <nick.knight@sifive.com>2019-12-09 16:18:49 -0800
committerAndrew Waterman <andrew@sifive.com>2019-12-09 16:18:49 -0800
commit34ceb37298b3b6cdb7eaf38dd519f564a28bfb63 (patch)
tree07e61d7e852f0f981d5ef51fe879b774e572b331 /Makefile.in
parent103f61c8a0204e0ad4e2a2dc4c0e9993eb7ef28d (diff)
downloadriscv-pk-34ceb37298b3b6cdb7eaf38dd519f564a28bfb63.zip
riscv-pk-34ceb37298b3b6cdb7eaf38dd519f564a28bfb63.tar.gz
riscv-pk-34ceb37298b3b6cdb7eaf38dd519f564a28bfb63.tar.bz2
Added --with-abi configure option (#183)
* Added --with-abi configure option * Revised to preserve original semantics when user specifies --with-arch but not --with-abi or when the user specifies --with-arch but not --host.
Diffstat (limited to 'Makefile.in')
-rw-r--r--Makefile.in17
1 files changed, 13 insertions, 4 deletions
diff --git a/Makefile.in b/Makefile.in
index 8d89184..470f306 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -50,14 +50,23 @@ else
project_ver:=@PACKAGE_VERSION@
endif
-# 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. i.e., ilp32 for 32-bit and lp64 for 64-bit.
+# The user may specify the host ISA (--with-arch) or host ABI (--with-abi).
+# *** If neither are given, they use the compiler's defaults.
+# *** If --with-arch is given but --with-abi is not, then the ABI defaults to
+# ilp32 or lp64, as appropriate for the ISA.
+# *** If --with-abi is given but --with-arch is not, then the ISA uses the
+# compiler's default.
ifneq (@WITH_ARCH@,)
march := -march=@WITH_ARCH@
is_32bit := $(findstring 32,$(march))
- mabi := -mabi=$(if $(is_32bit),ilp32,lp64)
+ ifeq (@WITH_ABI@,)
+ mabi := -mabi=$(if $(is_32bit),ilp32,lp64)
+ endif
+endif
+
+ifneq (@WITH_ABI@,)
+ mabi := -mabi=@WITH_ABI@
endif
# Installation directories