summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2020-03-29 16:07:01 +0200
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2020-03-29 16:58:00 +0200
commit15955354d26cda32bfb88eb150d5661fe66dc9d0 (patch)
tree664c4df3c90c0f9c9755ea9bf1d9a0515d7a8417
parentd99288c94ddfade228ce74e734ced699cda567db (diff)
Share ncom, lpr, PAE definitions between i386 and x86_64
Otherwise the x86_64 configfrag would overwrite i386's. * i386/configfrag.ac: Remove ncom, nlpr, pae, NCOM, NLPR, PAE definitions. * i386/configfrag.ac: Remove ncom, nlpr, NCOM, NLPR, PAE definitions. Enable PAE. * configfrag-first.ac: New file, defines ncom, nlpr, pae. * configure.ac: Include configfrag-first.ac * configfrag.ac: Define NCOM, NLPR, PAE.
-rw-r--r--configfrag-first.ac29
-rw-r--r--configfrag.ac13
-rw-r--r--configure.ac3
-rw-r--r--i386/configfrag.ac19
-rw-r--r--x86_64/configfrag.ac15
5 files changed, 49 insertions, 30 deletions
diff --git a/configfrag-first.ac b/configfrag-first.ac
new file mode 100644
index 00000000..5dc0db2c
--- /dev/null
+++ b/configfrag-first.ac
@@ -0,0 +1,29 @@
+dnl Configure fragment for general options.
+
+dnl Copyright (C) 2020 Free Software Foundation, Inc.
+
+dnl Permission to use, copy, modify and distribute this software and its
+dnl documentation is hereby granted, provided that both the copyright
+dnl notice and this permission notice appear in all copies of the
+dnl software, derivative works or modified versions, and any portions
+dnl thereof, and that both notices appear in supporting documentation.
+dnl
+dnl THE FREE SOFTWARE FOUNDATION ALLOWS FREE USE OF THIS SOFTWARE IN ITS
+dnl "AS IS" CONDITION. THE FREE SOFTWARE FOUNDATION DISCLAIMS ANY
+dnl LIABILITY OF ANY KIND FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE
+dnl USE OF THIS SOFTWARE.
+
+#
+# Common options
+#
+
+ncom=0
+nlpr=0
+
+AC_ARG_ENABLE([pae],
+ AS_HELP_STRING([--enable-pae], [PAE support (ix86-only); on i386-at disabled
+ by default, otherwise enabled by default]))
+
+dnl Local Variables:
+dnl mode: autoconf
+dnl End:
diff --git a/configfrag.ac b/configfrag.ac
index 73c23ffb..91d737ef 100644
--- a/configfrag.ac
+++ b/configfrag.ac
@@ -26,6 +26,19 @@ AC_DEFINE([KERNEL], [1], [KERNEL])
# Formerly in `bogus/'.
#
+# i386/bogus/com.h
+AC_DEFINE_UNQUOTED([NCOM], [$ncom], [NCOM])
+
+# i386/bogus/lpr.h
+AC_DEFINE_UNQUOTED([NLPR], [$nlpr], [NLPR])
+
+[if [ x"$enable_pae" = xyes ]; then]
+ AC_DEFINE([PAE], [1], [PAE support])
+ AM_CONDITIONAL([enable_pae], [true])
+[else]
+ AM_CONDITIONAL([enable_pae], [false])
+[fi]
+
# When set, the bootstrap task symbols are preserved by the kernel debugger.
# Used in `kern/bootstrap.c'.
AC_DEFINE([BOOTSTRAP_SYMBOLS], [0], [BOOTSTRAP_SYMBOLS])
diff --git a/configure.ac b/configure.ac
index 49e16399..806a1da1 100644
--- a/configure.ac
+++ b/configure.ac
@@ -134,6 +134,9 @@ esac]
# PC AT.
# TODO. Currently handled in `i386/configfrag.ac'.
+# General options.
+m4_include([configfrag-first.ac])
+
# Xen.
m4_include([xen/configfrag.ac])
diff --git a/i386/configfrag.ac b/i386/configfrag.ac
index 3c29bdf9..df5311e5 100644
--- a/i386/configfrag.ac
+++ b/i386/configfrag.ac
@@ -44,8 +44,6 @@ esac
# Formerly in `i386/bogus/'.
#
-ncom=0
-nlpr=0
case $host_platform:$host_cpu in
at:i?86)
ncom=4
@@ -62,12 +60,6 @@ case $host_platform:$host_cpu in
*)
:;;
esac]
-
-# i386/bogus/com.h
-AC_DEFINE_UNQUOTED([NCOM], [$ncom], [NCOM])
-
-# i386/bogus/lpr.h
-AC_DEFINE_UNQUOTED([NLPR], [$nlpr], [NLPR])
#
# Options.
@@ -100,9 +92,6 @@ if [ x"$enable_lpr" = xyes ]; then]
[fi]
-AC_ARG_ENABLE([pae],
- AS_HELP_STRING([--enable-pae], [PAE support (ix86-only); on ix86-at disabled
- by default, on ix86-xen enabled by default]))
[case $host_platform:$host_cpu in
xen:i?86)
enable_pae=${enable_pae-yes};;
@@ -112,13 +101,7 @@ AC_ARG_ENABLE([pae],
if [ x"$enable_pae" = xyes ]; then]
AC_MSG_ERROR([can only enable the `PAE' feature on ix86.])
[fi;;
-esac
-if [ x"$enable_pae" = xyes ]; then]
- AC_DEFINE([PAE], [1], [PAE support])
- AM_CONDITIONAL([enable_pae], [true])
-[else]
- AM_CONDITIONAL([enable_pae], [false])
-[fi]
+esac]
AC_ARG_WITH([_START_MAP],
AS_HELP_STRING([--with-_START_MAP=0x1000000], [specify kernel mapping start address]),
diff --git a/x86_64/configfrag.ac b/x86_64/configfrag.ac
index 480028c8..817eff3d 100644
--- a/x86_64/configfrag.ac
+++ b/x86_64/configfrag.ac
@@ -28,7 +28,9 @@ dnl USE OF THIS SOFTWARE.
AC_DEFINE([CPU_L1_SHIFT], [6], [CPU_L1_SHIFT])
[# Does the architecture provide machine-specific interfaces?
- mach_machine_routines=1;;
+ mach_machine_routines=1
+
+ enable_pae=yes;;
*)]
AM_CONDITIONAL([HOST_x86_64], [false])[;;
esac
@@ -40,8 +42,6 @@ case $host_platform in
AM_CONDITIONAL([PLATFORM_at], [false])[;;
esac]
-ncom=0
-nlpr=0
[case $host_platform:$host_cpu in
at:x86_64)]
ncom=4
@@ -52,15 +52,6 @@ nlpr=0
*)
:;;
esac]
-
-# i386/bogus/com.h
-AC_DEFINE_UNQUOTED([NCOM], [$ncom], [NCOM])
-
-# i386/bogus/lpr.h
-AC_DEFINE_UNQUOTED([NLPR], [$nlpr], [NLPR])
-
-AC_DEFINE([PAE], [1], [PAE support])
-AM_CONDITIONAL([enable_pae], [true])
dnl Local Variables:
dnl mode: autoconf