1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
|
dnl Configure fragment for riscv.
dnl Copyright (C) 1999, 2004, 2006, 2007, 2008 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.
#
# Definitions.
#
[case $host_cpu in
riscv32)]
AM_CONDITIONAL([HOST_riscv32], [true])
CFLAGS="$CFLAGS -mcmodel=medany -march=rv64gcv"
# Some of the riscv-specific code checks for these.
AC_DEFINE([__ELF__], [1], [__ELF__])
# Determines the size of the CPU cache line.
AC_DEFINE([CPU_L1_SHIFT], [6], [CPU_L1_SHIFT])
[# Does the architecture provide machine-specific interfaces?
mach_machine_routines=1;;
*)]
AM_CONDITIONAL([HOST_riscv32], [false])[;;
esac
case $host_cpu in
riscv64)]
AM_CONDITIONAL([HOST_riscv64], [true])
CFLAGS="$CFLAGS -mcmodel=medany -march=rv64gcv"
# Some of the riscv-specific code checks for these.
AC_DEFINE([__ELF__], [1], [__ELF__])
# Determines the size of the CPU cache line.
AC_DEFINE([CPU_L1_SHIFT], [6], [CPU_L1_SHIFT])
[# Does the architecture provide machine-specific interfaces?
mach_machine_routines=1;;
*)]
AM_CONDITIONAL([HOST_riscv64], [false])[;;
esac
case $host_platform in
riscv)]
AM_CONDITIONAL([PLATFORM_riscv], [true])[;;
*)]
AM_CONDITIONAL([PLATFORM_riscv], [false])[;;
esac]
#
# Options.
#
# The immediate console, useful for debugging early system
# initialization. Disabled by default.
AC_DEFINE([ENABLE_IMMEDIATE_CONSOLE], [0], [ENABLE_IMMEDIATE_CONSOLE])
AC_ARG_ENABLE([apic],
AS_HELP_STRING([--enable-apic], [LAPIC/IOAPIC support]))
[if [ x"$enable_apic" = xyes ]; then]
AC_DEFINE([APIC], [1], [APIC support])
AM_CONDITIONAL([enable_apic], [true])
[else]
AM_CONDITIONAL([enable_apic], [false])
[fi]
AC_ARG_WITH([_START_MAP],
AS_HELP_STRING([--with-_START_MAP=0x1000000], [specify kernel mapping start address]),
[_START_MAP="$withval"], [_START_MAP=0x1000000])
AC_SUBST(_START_MAP)
AC_CONFIG_LINKS([asm:$systype/include/asm
uapi:$systype/include/uapi
generated:$systype/include/generated])
dnl Local Variables:
dnl mode: autoconf
dnl End:
|