aboutsummaryrefslogtreecommitdiff
path: root/m4
diff options
context:
space:
mode:
authorBrent Cook <bcook@openbsd.org>2017-07-09 05:12:21 -0500
committerBrent Cook <bcook@openbsd.org>2017-07-09 05:12:21 -0500
commit70ee57c6ad8173ceb153e78c8225b1f9ae5a5051 (patch)
tree126e0e6cbc485cc131c9982fcc6031c849dab36c /m4
parent0dbae37735a395e3c378ac944842e359f8087d41 (diff)
parente5505342036183ff32a8f537be1a5105d6a1dbaa (diff)
downloadportable-70ee57c6ad8173ceb153e78c8225b1f9ae5a5051.tar.gz
portable-70ee57c6ad8173ceb153e78c8225b1f9ae5a5051.tar.bz2
portable-70ee57c6ad8173ceb153e78c8225b1f9ae5a5051.zip
Land #328, generate the crypto export symbol list at build time
Diffstat (limited to 'm4')
-rw-r--r--m4/check-libc.m485
1 files changed, 0 insertions, 85 deletions
diff --git a/m4/check-libc.m4 b/m4/check-libc.m4
index 0b7ffb0..b1b5ef4 100644
--- a/m4/check-libc.m4
+++ b/m4/check-libc.m4
@@ -148,88 +148,3 @@ if test "x$ac_cv_have___va_copy" = "xyes" ; then
148 AC_DEFINE([HAVE___VA_COPY], [1], [Define if __va_copy exists]) 148 AC_DEFINE([HAVE___VA_COPY], [1], [Define if __va_copy exists])
149fi 149fi
150]) 150])
151
152AC_DEFUN([GENERATE_CRYPTO_PORTABLE_SYM], [
153AS_CASE([$host_cpu],
154 [i?86], [HOSTARCH=intel],
155 [x86_64], [HOSTARCH=intel],
156 [amd64], [HOSTARCH=intel],
157)
158AC_SUBST([HOSTARCH])
159crypto_sym=$srcdir/crypto/crypto.sym
160crypto_p_sym=./crypto/crypto_portable.sym
161echo "generating $crypto_p_sym ..."
162mkdir -p ./crypto
163cp $crypto_sym $crypto_p_sym
164chmod u+w $crypto_p_sym
165if test "x$ac_cv_func_arc4random_buf" = "xno" ; then
166 echo arc4random >> $crypto_p_sym
167 echo arc4random_buf >> $crypto_p_sym
168 echo arc4random_uniform >> $crypto_p_sym
169 if test "x$ac_cv_func_getentropy" = "xno" ; then
170 echo getentropy >> $crypto_p_sym
171 fi
172fi
173if test "x$ac_cv_func_asprintf" = "xno" ; then
174 echo asprintf >> $crypto_p_sym
175 echo vasprintf >> $crypto_p_sym
176fi
177if test "x$ac_cv_func_explicit_bzero" = "xno" ; then
178 echo explicit_bzero >> $crypto_p_sym
179fi
180if test "x$ac_cv_func_freezero" = "xno" ; then
181 echo freezero >> $crypto_p_sym
182fi
183if test "x$ac_cv_func_inet_pton" = "xno" ; then
184 echo inet_pton >> $crypto_p_sym
185fi
186if test "x$ac_cv_func_reallocarray" = "xno" ; then
187 echo reallocarray >> $crypto_p_sym
188fi
189if test "x$ac_cv_func_recallocarray" = "xno" ; then
190 echo recallocarray >> $crypto_p_sym
191fi
192if test "x$ac_cv_func_strlcat" = "xno" ; then
193 echo strlcat >> $crypto_p_sym
194fi
195if test "x$ac_cv_func_strlcpy" = "xno" ; then
196 echo strlcpy >> $crypto_p_sym
197fi
198if test "x$ac_cv_func_strndup" = "xno" ; then
199 echo strndup >> $crypto_p_sym
200fi
201if test "x$ac_cv_func_strnlen" = "xno" ; then
202 echo strnlen >> $crypto_p_sym
203fi
204if test "x$ac_cv_func_strsep" = "xno" ; then
205 echo strsep >> $crypto_p_sym
206fi
207if test "x$ac_cv_func_timegm" = "xno" ; then
208 echo timegm >> $crypto_p_sym
209fi
210if test "x$ac_cv_func_timingsafe_bcmp" = "xno" ; then
211 echo timingsafe_bcmp >> $crypto_p_sym
212fi
213if test "x$ac_cv_func_timingsafe_memcmp" = "xno" ; then
214 echo timingsafe_memcmp >> $crypto_p_sym
215fi
216if test "x$HOSTARCH" = "xintel" ; then
217 echo OPENSSL_ia32cap_P >> $crypto_p_sym
218fi
219if test "x$HOST_OS" = "xwin" ; then
220 echo posix_perror >> $crypto_p_sym
221 echo posix_fopen >> $crypto_p_sym
222 echo posix_fgets >> $crypto_p_sym
223 echo posix_open >> $crypto_p_sym
224 echo posix_rename >> $crypto_p_sym
225 echo posix_connect >> $crypto_p_sym
226 echo posix_close >> $crypto_p_sym
227 echo posix_read >> $crypto_p_sym
228 echo posix_write >> $crypto_p_sym
229 echo posix_getsockopt >> $crypto_p_sym
230 echo posix_setsockopt >> $crypto_p_sym
231
232 grep -v BIO_s_log $crypto_p_sym > $crypto_p_sym.tmp
233 mv $crypto_p_sym.tmp $crypto_p_sym
234fi
235])