summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAhelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>2020-10-09 17:39:42 +0200
committerSimon Horman <horms@verge.net.au>2020-11-16 11:58:55 +0100
commit6caad4c497726983864401545aa7a29934ddd67d (patch)
treeb6721cfa43bd2a9caaf4a6bdb37ef9684562b80a
parent9d33ea597977646fac180f56612be3b2cac7347c (diff)
downloadkexec-tools-6caad4c497726983864401545aa7a29934ddd67d.tar.gz
configure.ac, arch/x86_64: handle x32 as subarch of x86_64 and don't specify -mcmodel=large there
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz> Signed-off-by: Simon Horman <horms@verge.net.au>
-rw-r--r--configure.ac11
-rw-r--r--purgatory/arch/x86_64/Makefile2
2 files changed, 13 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index f0258231..eb3ecac5 100644
--- a/configure.ac
+++ b/configure.ac
@@ -63,6 +63,17 @@ case $target_cpu in
;;
esac
+if test "$ARCH" = "x86_64" ; then
+ case $target in
+ *x32 )
+ SUBARCH="x32"
+ ;;
+ * )
+ SUBARCH=""
+ ;;
+ esac
+fi
+
dnl ---Options
OBJDIR=`pwd`/objdir
diff --git a/purgatory/arch/x86_64/Makefile b/purgatory/arch/x86_64/Makefile
index 73009375..b0e277a3 100644
--- a/purgatory/arch/x86_64/Makefile
+++ b/purgatory/arch/x86_64/Makefile
@@ -23,4 +23,6 @@ x86_64_PURGATORY_SRCS += purgatory/arch/i386/console-x86.c
x86_64_PURGATORY_SRCS += purgatory/arch/i386/vga.c
x86_64_PURGATORY_SRCS += purgatory/arch/i386/pic.c
+ifneq ($(SUBARCH),x32)
x86_64_PURGATORY_EXTRA_CFLAGS = -mcmodel=large
+endif