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
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
|
dnl This is the newlib/libc/machine/arm configure.in file.
dnl Process this file with autoconf to produce a configure script.
AC_PREREQ(2.59)
AC_INIT([newlib],[NEWLIB_VERSION])
AC_CONFIG_SRCDIR([Makefile.am])
dnl Can't be done in NEWLIB_CONFIGURE because that confuses automake.
AC_CONFIG_AUX_DIR(../../../..)
NEWLIB_CONFIGURE(../../..)
dnl Check for Thumb1 supported.
AC_CACHE_CHECK(whether we are using thumb1,
acnewlib_cv_thumb1_processor, [dnl
cat > conftest.c <<EOF
#if defined (__thumb__) && !defined (__thumb2__)
#define _THUMB1
#else
#error "not thumb1"
#endif
int main () {
return 0;
}
EOF
if AC_TRY_COMMAND([${CC} $CFLAGS $CPPFLAGS -c -o conftest.o conftest.c
1>&AS_MESSAGE_LOG_FD])
then
acnewlib_cv_thumb1_processor=yes;
else
acnewlib_cv_thumb1_processor=no;
fi
rm -f conftest*])
AM_CONDITIONAL(HAVE_THUMB1, test x"$acnewlib_cv_thumb1_processor" = x"yes")
dnl Check for whether the size is preferred.
AC_CACHE_CHECK(whether the size is preferred,
acnewlib_cv_opt_size, [dnl
cat > conftest.c <<EOF
#if defined (__OPTIMIZE_SIZE__) || defined (PREFER_SIZE_OVER_SPEED)
#define OPT_SIZE
#else
#error "not need for size optimization."
#endif
int main () {
return 0;
}
EOF
if AC_TRY_COMMAND([${CC} $CFLAGS $CPPFLAGS -c -o conftest.o conftest.c
1>&AS_MESSAGE_LOG_FD])
then
acnewlib_cv_opt_size=yes;
else
acnewlib_cv_opt_size=no;
fi
rm -f conftest*])
AM_CONDITIONAL(OPT_SIZE, test x"$acnewlib_cv_opt_size" = x"yes")
dnl Check for whether ARM_7 or ARM_ARCH_6T2 is defined.
dnl This macro is used to support memchr() for old CPU.
AC_CACHE_CHECK(whether armv7 processor is supported,
acnewlib_cv_armv7_processor, [dnl
cat > conftest.c <<EOF
#if defined (_ISA_ARM_7) || defined (__ARM_ARCH_6T2__)
#define HAVE_ARMV7
#else
#error "ARMV7 is not supported."
#endif
int main () {
return 0;
}
EOF
if AC_TRY_COMMAND([${CC} $CFLAGS $CPPFLAGS -c -o conftest.o conftest.c
1>&AS_MESSAGE_LOG_FD])
then
acnewlib_cv_armv7_processor=yes;
else
acnewlib_cv_armv7_processor=no;
fi
rm -f conftest*])
AM_CONDITIONAL(HAVE_ARMV7, test x"$acnewlib_cv_armv7_processor" = x"yes")
dnl Check for whether ARM_ARCH_7A is defined.
AC_CACHE_CHECK(whether armv7a processor is supported,
acnewlib_cv_armv7a_processor, [dnl
cat > conftest.c <<EOF
#if defined (__ARM_ARCH_7A__) && defined (__ARM_FEATURE_UNALIGNED)
#define HAVE_ARMV7A
#else
#error "ARMV7A is not supported."
#endif
int main () {
return 0;
}
EOF
if AC_TRY_COMMAND([${CC} $CFLAGS $CPPFLAGS -c -o conftest.o conftest.c
1>&AS_MESSAGE_LOG_FD])
then
acnewlib_cv_armv7a_processor=yes;
else
acnewlib_cv_armv7a_processor=no;
fi
rm -f conftest*])
AM_CONDITIONAL(HAVE_ARMV7A, test x"$acnewlib_cv_armv7a_processor" = x"yes")
dnl Check for whether ARM_ARCH_7M is defined.
AC_CACHE_CHECK(whether armv7m processor is supported,
acnewlib_cv_armv7m_processor, [dnl
cat > conftest.c <<EOF
#if defined (__ARM_ARCH_7M__) || defined (__ARM_ARCH_7EM__)
#define HAVE_ARMV7M
#else
#error "ARMV7M is not supported."
#endif
int main () {
return 0;
}
EOF
if AC_TRY_COMMAND([${CC} $CFLAGS $CPPFLAGS -c -o conftest.o conftest.c
1>&AS_MESSAGE_LOG_FD])
then
acnewlib_cv_armv7m_processor=yes;
else
acnewlib_cv_armv7m_processor=no;
fi
rm -f conftest*])
AM_CONDITIONAL(HAVE_ARMV7M, test x"$acnewlib_cv_armv7m_processor" = x"yes")
AC_SUBST(CFLAGS)
AC_CONFIG_FILES([Makefile])
AC_OUTPUT
|