Mercurial > hg > CbC > CbC_gcc
comparison libgomp/configure.ac @ 145:1830386684a0
gcc-9.2.0
author | anatofuz |
---|---|
date | Thu, 13 Feb 2020 11:34:05 +0900 |
parents | 84e7813d76e9 |
children |
comparison
equal
deleted
inserted
replaced
131:84e7813d76e9 | 145:1830386684a0 |
---|---|
1 # Process this file with autoconf to produce a configure script, like so: | 1 # Process this file with autoconf to produce a configure script, like so: |
2 # aclocal -I ../config && autoconf && autoheader && automake | 2 # aclocal -I ../config && autoconf && autoheader && automake |
3 | 3 |
4 AC_PREREQ(2.64) | |
5 AC_INIT([GNU Offloading and Multi Processing Runtime Library], 1.0,,[libgomp]) | 4 AC_INIT([GNU Offloading and Multi Processing Runtime Library], 1.0,,[libgomp]) |
6 AC_CONFIG_HEADER(config.h) | 5 AC_CONFIG_HEADER(config.h) |
7 | 6 |
8 # ------- | 7 # ------- |
9 # Options | 8 # Options |
63 # -Wno-portability: ...except this one, since GNU make is required. | 62 # -Wno-portability: ...except this one, since GNU make is required. |
64 # -Wno-override: ... and this one, since we do want this in testsuite. | 63 # -Wno-override: ... and this one, since we do want this in testsuite. |
65 AM_INIT_AUTOMAKE([1.9.0 foreign no-dist -Wall -Wno-portability -Wno-override]) | 64 AM_INIT_AUTOMAKE([1.9.0 foreign no-dist -Wall -Wno-portability -Wno-override]) |
66 AM_ENABLE_MULTILIB(, ..) | 65 AM_ENABLE_MULTILIB(, ..) |
67 | 66 |
67 GCC_WITH_TOOLEXECLIBDIR | |
68 | |
68 # Calculate toolexeclibdir | 69 # Calculate toolexeclibdir |
69 # Also toolexecdir, though it's only used in toolexeclibdir | 70 # Also toolexecdir, though it's only used in toolexeclibdir |
70 case ${enable_version_specific_runtime_libs} in | 71 case ${enable_version_specific_runtime_libs} in |
71 yes) | 72 yes) |
72 # Need the gcc compiler version to know where to install libraries | 73 # Need the gcc compiler version to know where to install libraries |
78 no) | 79 no) |
79 if test -n "$with_cross_host" && | 80 if test -n "$with_cross_host" && |
80 test x"$with_cross_host" != x"no"; then | 81 test x"$with_cross_host" != x"no"; then |
81 # Install a library built with a cross compiler in tooldir, not libdir. | 82 # Install a library built with a cross compiler in tooldir, not libdir. |
82 toolexecdir='$(exec_prefix)/$(target_alias)' | 83 toolexecdir='$(exec_prefix)/$(target_alias)' |
83 toolexeclibdir='$(toolexecdir)/lib' | 84 case ${with_toolexeclibdir} in |
85 no) | |
86 toolexeclibdir='$(toolexecdir)/lib' | |
87 ;; | |
88 *) | |
89 toolexeclibdir=${with_toolexeclibdir} | |
90 ;; | |
91 esac | |
84 else | 92 else |
85 toolexecdir='$(libdir)/gcc-lib/$(target_alias)' | 93 toolexecdir='$(libdir)/gcc-lib/$(target_alias)' |
86 toolexeclibdir='$(libdir)' | 94 toolexeclibdir='$(libdir)' |
87 fi | 95 fi |
88 multi_os_directory=`$CC -print-multi-os-directory` | 96 multi_os_directory=`$CC -print-multi-os-directory` |
170 AC_STDC_HEADERS | 178 AC_STDC_HEADERS |
171 AC_HEADER_TIME | 179 AC_HEADER_TIME |
172 ACX_HEADER_STRING | 180 ACX_HEADER_STRING |
173 AC_CHECK_HEADERS(pthread.h unistd.h semaphore.h sys/loadavg.h sys/sysctl.h sys/time.h) | 181 AC_CHECK_HEADERS(pthread.h unistd.h semaphore.h sys/loadavg.h sys/sysctl.h sys/time.h) |
174 | 182 |
175 GCC_HEADER_STDINT(gstdint.h) | |
176 | |
177 XPCFLAGS="" | 183 XPCFLAGS="" |
178 case "$host" in | 184 case "$host" in |
179 *-*-rtems*) | 185 *-*-rtems*) |
180 # RTEMS supports Pthreads, but the library is not available at GCC build time. | 186 # RTEMS supports Pthreads, but the library is not available at GCC build time. |
181 ;; | 187 ;; |
182 nvptx*-*-*) | 188 nvptx*-*-* | amdgcn*-*-*) |
183 # NVPTX does not support Pthreads, has its own code replacement. | 189 # NVPTX does not support Pthreads, has its own code replacement. |
184 libgomp_use_pthreads=no | 190 libgomp_use_pthreads=no |
185 # NVPTX is an accelerator-only target | 191 # NVPTX is an accelerator-only target |
186 libgomp_offloaded_only=yes | 192 libgomp_offloaded_only=yes |
187 ;; | 193 ;; |
217 | 223 |
218 m4_include([plugin/configfrag.ac]) | 224 m4_include([plugin/configfrag.ac]) |
219 | 225 |
220 # Check for functions needed. | 226 # Check for functions needed. |
221 AC_CHECK_FUNCS(getloadavg clock_gettime strtoull) | 227 AC_CHECK_FUNCS(getloadavg clock_gettime strtoull) |
228 AC_CHECK_FUNCS(aligned_alloc posix_memalign memalign _aligned_malloc) | |
222 | 229 |
223 # Check for broken semaphore implementation on darwin. | 230 # Check for broken semaphore implementation on darwin. |
224 # sem_init returns: sem_init error: Function not implemented. | 231 # sem_init returns: sem_init error: Function not implemented. |
225 case "$host" in | 232 case "$host" in |
226 *-darwin*) | 233 *-darwin*) |
264 [LIBS="-lrt $LIBS" | 271 [LIBS="-lrt $LIBS" |
265 AC_DEFINE(HAVE_CLOCK_GETTIME, 1, | 272 AC_DEFINE(HAVE_CLOCK_GETTIME, 1, |
266 [Define to 1 if you have the `clock_gettime' function.])]) | 273 [Define to 1 if you have the `clock_gettime' function.])]) |
267 fi | 274 fi |
268 | 275 |
276 # Check for uname. | |
277 AC_COMPILE_IFELSE( | |
278 [AC_LANG_PROGRAM( | |
279 [#include <string.h> | |
280 #include <stdlib.h> | |
281 #include <sys/utsname.h>], | |
282 [struct utsname buf; | |
283 volatile size_t len = 0; | |
284 if (!uname (buf)) | |
285 len = strlen (buf.nodename);])], | |
286 AC_DEFINE(HAVE_UNAME, 1, | |
287 [ Define if uname is supported and struct utsname has nodename field.])) | |
288 | |
289 # Check for gethostname. | |
290 AC_COMPILE_IFELSE( | |
291 [AC_LANG_PROGRAM( | |
292 [#include <unistd.h>], | |
293 [ | |
294 changequote(,)dnl | |
295 char buf[256]; | |
296 if (gethostname (buf, sizeof (buf) - 1) == 0) | |
297 buf[255] = '\0'; | |
298 changequote([,])dnl | |
299 ])], | |
300 AC_DEFINE(HAVE_GETHOSTNAME, 1, | |
301 [ Define if gethostname is supported.])) | |
302 | |
303 # Check for getpid. | |
304 AC_COMPILE_IFELSE( | |
305 [AC_LANG_PROGRAM( | |
306 [#include <unistd.h>], | |
307 [int pid = getpid ();])], | |
308 AC_DEFINE(HAVE_GETPID, 1, | |
309 [ Define if getpid is supported.])) | |
310 | |
269 # See if we support thread-local storage. | 311 # See if we support thread-local storage. |
270 GCC_CHECK_TLS | 312 GCC_CHECK_TLS |
271 | 313 |
272 # See if we have emulated thread-local storage. | 314 # See if we have emulated thread-local storage. |
273 GCC_CHECK_EMUTLS | 315 GCC_CHECK_EMUTLS |
280 | 322 |
281 if test $enable_symvers = gnu; then | 323 if test $enable_symvers = gnu; then |
282 AC_DEFINE(LIBGOMP_GNU_SYMBOL_VERSIONING, 1, | 324 AC_DEFINE(LIBGOMP_GNU_SYMBOL_VERSIONING, 1, |
283 [Define to 1 if GNU symbol versioning is used for libgomp.]) | 325 [Define to 1 if GNU symbol versioning is used for libgomp.]) |
284 fi | 326 fi |
327 | |
328 # Determine cpu count to limit testsuite parallelism. | |
329 AX_COUNT_CPUS | |
330 AC_SUBST(CPU_COUNT) | |
285 | 331 |
286 # Get target configury. | 332 # Get target configury. |
287 . ${srcdir}/configure.tgt | 333 . ${srcdir}/configure.tgt |
288 CFLAGS="$save_CFLAGS $XCFLAGS" | 334 CFLAGS="$save_CFLAGS $XCFLAGS" |
289 | 335 |