comparison libgcc/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 dnl Process this file with autoconf to produce a configure script. 1 dnl Process this file with autoconf to produce a configure script.
2 2
3 sinclude(../config/enable.m4) 3 sinclude(../config/enable.m4)
4 sinclude(../config/tls.m4) 4 sinclude(../config/tls.m4)
5 sinclude(../config/toolexeclibdir.m4)
5 sinclude(../config/acx.m4) 6 sinclude(../config/acx.m4)
6 sinclude(../config/no-executables.m4) 7 sinclude(../config/no-executables.m4)
7 sinclude(../config/lib-ld.m4) 8 sinclude(../config/lib-ld.m4)
8 sinclude(../config/override.m4) 9 sinclude(../config/override.m4)
9 sinclude(../config/picflag.m4) 10 sinclude(../config/picflag.m4)
11 sinclude(../config/unwind_ipinfo.m4) 12 sinclude(../config/unwind_ipinfo.m4)
12 sinclude(../config/gthr.m4) 13 sinclude(../config/gthr.m4)
13 sinclude(../config/sjlj.m4) 14 sinclude(../config/sjlj.m4)
14 sinclude(../config/cet.m4) 15 sinclude(../config/cet.m4)
15 16
16 AC_PREREQ(2.64)
17 AC_INIT([GNU C Runtime Library], 1.0,,[libgcc]) 17 AC_INIT([GNU C Runtime Library], 1.0,,[libgcc])
18 AC_CONFIG_SRCDIR([static-object.mk]) 18 AC_CONFIG_SRCDIR([static-object.mk])
19 19
20 # The libgcc should not depend on any header files 20 # The libgcc should not depend on any header files
21 AC_DEFUN([_AC_INCLUDES_DEFAULT_REQUIREMENTS], 21 AC_DEFUN([_AC_INCLUDES_DEFAULT_REQUIREMENTS],
112 *) AC_MSG_ERROR([Unknown argument to enable/disable version-specific libs]);; 112 *) AC_MSG_ERROR([Unknown argument to enable/disable version-specific libs]);;
113 esac], 113 esac],
114 [version_specific_libs=no]) 114 [version_specific_libs=no])
115 AC_MSG_RESULT($version_specific_libs) 115 AC_MSG_RESULT($version_specific_libs)
116 116
117 GCC_WITH_TOOLEXECLIBDIR
118
117 AC_ARG_WITH(slibdir, 119 AC_ARG_WITH(slibdir,
118 [ --with-slibdir=DIR shared libraries in DIR [LIBDIR]], 120 [ --with-slibdir=DIR shared libraries in DIR [LIBDIR]],
119 slibdir="$with_slibdir", 121 slibdir="$with_slibdir",
120 if test "${version_specific_libs}" = yes; then 122 [if test "${version_specific_libs}" = yes; then
121 slibdir='$(libsubdir)' 123 slibdir='$(libsubdir)'
122 elif test -n "$with_cross_host" && test x"$with_cross_host" != x"no"; then 124 elif test -n "$with_cross_host" && test x"$with_cross_host" != x"no"; then
123 slibdir='$(exec_prefix)/$(host_noncanonical)/lib' 125 case ${with_toolexeclibdir} in
126 no)
127 slibdir='$(exec_prefix)/$(host_noncanonical)/lib'
128 ;;
129 *)
130 slibdir=${with_toolexeclibdir}
131 ;;
132 esac
124 else 133 else
125 slibdir='$(libdir)' 134 slibdir='$(libdir)'
126 fi) 135 fi])
127 AC_SUBST(slibdir) 136 AC_SUBST(slibdir)
128 137
129 # Command-line options. 138 # Command-line options.
130 # Very limited version of AC_MAINTAINER_MODE. 139 # Very limited version of AC_MAINTAINER_MODE.
131 AC_ARG_ENABLE([maintainer-mode], 140 AC_ARG_ENABLE([maintainer-mode],
167 no) 176 no)
168 if test -n "$with_cross_host" && 177 if test -n "$with_cross_host" &&
169 test x"$with_cross_host" != x"no"; then 178 test x"$with_cross_host" != x"no"; then
170 # Install a library built with a cross compiler in tooldir, not libdir. 179 # Install a library built with a cross compiler in tooldir, not libdir.
171 toolexecdir='$(exec_prefix)/$(target_noncanonical)' 180 toolexecdir='$(exec_prefix)/$(target_noncanonical)'
172 toolexeclibdir='$(toolexecdir)/lib' 181 case ${with_toolexeclibdir} in
182 no)
183 toolexeclibdir='$(toolexecdir)/lib'
184 ;;
185 *)
186 toolexeclibdir=${with_toolexeclibdir}
187 ;;
188 esac
173 else 189 else
174 toolexecdir='$(libdir)/gcc-lib/$(target_noncanonical)' 190 toolexecdir='$(libdir)/gcc-lib/$(target_noncanonical)'
175 toolexeclibdir='$(libdir)' 191 toolexeclibdir='$(libdir)'
176 fi 192 fi
177 multi_os_directory=`$CC -print-multi-os-directory` 193 multi_os_directory=`$CC -print-multi-os-directory`
206 AC_SUBST(double_type_size) 222 AC_SUBST(double_type_size)
207 AC_SUBST(long_double_type_size) 223 AC_SUBST(long_double_type_size)
208 224
209 AC_CHECK_HEADERS(inttypes.h stdint.h stdlib.h ftw.h \ 225 AC_CHECK_HEADERS(inttypes.h stdint.h stdlib.h ftw.h \
210 unistd.h sys/stat.h sys/types.h \ 226 unistd.h sys/stat.h sys/types.h \
211 string.h strings.h memory.h) 227 string.h strings.h memory.h sys/auxv.h)
212 AC_HEADER_STDC 228 AC_HEADER_STDC
213 229
214 # Check for decimal float support. 230 # Check for decimal float support.
215 AC_CACHE_CHECK([whether decimal floating point is supported], [libgcc_cv_dfp], 231 AC_CACHE_CHECK([whether decimal floating point is supported], [libgcc_cv_dfp],
216 [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ 232 [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
227 243
228 GCC_AC_ENABLE_DECIMAL_FLOAT([$host]) 244 GCC_AC_ENABLE_DECIMAL_FLOAT([$host])
229 245
230 # Check for fixed-point support. 246 # Check for fixed-point support.
231 AC_CACHE_CHECK([whether fixed-point is supported], [libgcc_cv_fixed_point], 247 AC_CACHE_CHECK([whether fixed-point is supported], [libgcc_cv_fixed_point],
232 [AC_COMPILE_IFELSE([_Sat _Fract x;], [libgcc_cv_fixed_point=yes], 248 [AC_COMPILE_IFELSE([AC_LANG_SOURCE([_Sat _Fract x;])],
249 [libgcc_cv_fixed_point=yes],
233 [libgcc_cv_fixed_point=no])]) 250 [libgcc_cv_fixed_point=no])])
234 fixed_point=$libgcc_cv_fixed_point 251 fixed_point=$libgcc_cv_fixed_point
235 AC_SUBST(fixed_point) 252 AC_SUBST(fixed_point)
236 253
237 # For platforms with the unwind ABI which includes an unwind library, 254 # For platforms with the unwind ABI which includes an unwind library,
259 force_explicit_eh_registry=-DUSE_EH_FRAME_REGISTRY_ALWAYS 276 force_explicit_eh_registry=-DUSE_EH_FRAME_REGISTRY_ALWAYS
260 fi 277 fi
261 ]) 278 ])
262 AC_SUBST([force_explicit_eh_registry]) 279 AC_SUBST([force_explicit_eh_registry])
263 280
281 AC_ARG_ENABLE([tm-clone-registry],
282 [ --disable-tm-clone-registry disable TM clone registry],
283 [
284 use_tm_clone_registry=
285 if test "$enable_tm_clone_registry" = no; then
286 use_tm_clone_registry=-DUSE_TM_CLONE_REGISTRY=0
287 fi
288 ],
289 [
290 use_tm_clone_registry=
291 case $target in
292 msp430*elfbare)
293 use_tm_clone_registry=-DUSE_TM_CLONE_REGISTRY=0
294 ;;
295 esac
296 ])
297 AC_SUBST([use_tm_clone_registry])
298
264 AC_LIB_PROG_LD_GNU 299 AC_LIB_PROG_LD_GNU
265 300
266 AC_MSG_CHECKING([for thread model used by GCC]) 301 AC_MSG_CHECKING([for thread model used by GCC])
267 target_thread_file=`$CC -v 2>&1 | sed -n 's/^Thread model: //p'` 302 target_thread_file=`$CC -v 2>&1 | sed -n 's/^Thread model: //p'`
268 AC_MSG_RESULT([$target_thread_file]) 303 AC_MSG_RESULT([$target_thread_file])
269 304
270 # Check for assembler CFI support. 305 # Check for assembler CFI support.
271 AC_CACHE_CHECK([whether assembler supports CFI directives], [libgcc_cv_cfi], 306 AC_CACHE_CHECK([whether assembler supports CFI directives], [libgcc_cv_cfi],
272 [AC_COMPILE_IFELSE( 307 [AC_COMPILE_IFELSE(
273 [asm("\n\ 308 [AC_LANG_SOURCE([asm("\n\
274 .text\n\ 309 .text\n\
275 .cfi_startproc\n\ 310 .cfi_startproc\n\
276 .cfi_personality 0, symbol\n\ 311 .cfi_personality 0, symbol\n\
277 .cfi_endproc");], 312 .cfi_endproc");])],
278 [libgcc_cv_cfi=yes], 313 [libgcc_cv_cfi=yes],
279 [libgcc_cv_cfi=no])]) 314 [libgcc_cv_cfi=no])])
280 315
281 # Check 32bit or 64bit. In the case of MIPS, this really determines the 316 # Check 32bit or 64bit. In the case of MIPS, this really determines the
282 # word size rather than the address size. 317 # word size rather than the address size.
294 case ${host} in 329 case ${host} in
295 mips*-*-*) 330 mips*-*-*)
296 AC_CACHE_CHECK([whether the target is hard-float], 331 AC_CACHE_CHECK([whether the target is hard-float],
297 [libgcc_cv_mips_hard_float], 332 [libgcc_cv_mips_hard_float],
298 [AC_COMPILE_IFELSE( 333 [AC_COMPILE_IFELSE(
299 [#ifndef __mips_hard_float 334 [AC_LANG_SOURCE([#ifndef __mips_hard_float
300 #error FOO 335 #error FOO
301 #endif], 336 #endif
337 ])],
302 [libgcc_cv_mips_hard_float=yes], 338 [libgcc_cv_mips_hard_float=yes],
303 [libgcc_cv_mips_hard_float=no])]) 339 [libgcc_cv_mips_hard_float=no])])
304 esac 340 esac
305 341
306 case ${host} in 342 case ${host} in
393 saved_CFLAGS="$CFLAGS" 429 saved_CFLAGS="$CFLAGS"
394 CFLAGS="$CFLAGS -mabi=altivec -mvsx -mfloat128" 430 CFLAGS="$CFLAGS -mabi=altivec -mvsx -mfloat128"
395 AC_CACHE_CHECK([for PowerPC ISA 2.06 to build __float128 libraries], 431 AC_CACHE_CHECK([for PowerPC ISA 2.06 to build __float128 libraries],
396 [libgcc_cv_powerpc_float128], 432 [libgcc_cv_powerpc_float128],
397 [AC_COMPILE_IFELSE( 433 [AC_COMPILE_IFELSE(
398 [vector double dadd (vector double a, vector double b) { return a + b; }], 434 [AC_LANG_SOURCE([vector double dadd (vector double a, vector double b) { return a + b; }])],
399 [libgcc_cv_powerpc_float128=yes], 435 [libgcc_cv_powerpc_float128=yes],
400 [libgcc_cv_powerpc_float128=no])]) 436 [libgcc_cv_powerpc_float128=no])])
401 437
402 CFLAGS="$CFLAGS -mpower9-vector -mfloat128-hardware" 438 CFLAGS="$CFLAGS -mpower9-vector -mfloat128-hardware"
403 AC_CACHE_CHECK([for PowerPC ISA 3.0 to build hardware __float128 libraries], 439 AC_CACHE_CHECK([for PowerPC ISA 3.0 to build hardware __float128 libraries],
404 [libgcc_cv_powerpc_float128_hw], 440 [libgcc_cv_powerpc_float128_hw],
405 [AC_COMPILE_IFELSE( 441 [AC_COMPILE_IFELSE(
406 [#include <sys/auxv.h> 442 [AC_LANG_SOURCE([#include <sys/auxv.h>
407 #ifndef AT_PLATFORM 443 #ifndef AT_PLATFORM
408 #error "AT_PLATFORM is not defined" 444 #error "AT_PLATFORM is not defined"
409 #endif 445 #endif
410 #ifndef __BUILTIN_CPU_SUPPORTS__ 446 #ifndef __BUILTIN_CPU_SUPPORTS__
411 #error "__builtin_cpu_supports is not available" 447 #error "__builtin_cpu_supports is not available"
416 __asm__ ("xsaddqp %0,%1,%2" : "=v" (ret) : "v" (a), "v" (b)); 452 __asm__ ("xsaddqp %0,%1,%2" : "=v" (ret) : "v" (a), "v" (b));
417 return ret; 453 return ret;
418 } 454 }
419 void *add_resolver (void) { return (void *) add; } 455 void *add_resolver (void) { return (void *) add; }
420 __float128 add_ifunc (__float128, __float128) 456 __float128 add_ifunc (__float128, __float128)
421 __attribute__ ((__ifunc__ ("add_resolver")));], 457 __attribute__ ((__ifunc__ ("add_resolver")));])],
422 [libgcc_cv_powerpc_float128_hw=yes], 458 [libgcc_cv_powerpc_float128_hw=yes],
423 [libgcc_cv_powerpc_float128_hw=no])]) 459 [libgcc_cv_powerpc_float128_hw=no])])
424 CFLAGS="$saved_CFLAGS" 460 CFLAGS="$saved_CFLAGS"
425 esac 461 esac
426 462
444 # Check if Solaris/x86 linker supports ZERO terminator unwind entries. 480 # Check if Solaris/x86 linker supports ZERO terminator unwind entries.
445 # This is after config.host so we can augment tmake_file. 481 # This is after config.host so we can augment tmake_file.
446 # Link with -nostartfiles -nodefaultlibs since neither are present while 482 # Link with -nostartfiles -nodefaultlibs since neither are present while
447 # building libgcc. 483 # building libgcc.
448 case ${host} in 484 case ${host} in
449 i?86-*-solaris2* | x86_64-*-solaris2.1[[0-9]]*) 485 i?86-*-solaris2* | x86_64-*-solaris2*)
450 cat > conftest.s <<EOF 486 cat > conftest.s <<EOF
451 .section .eh_frame,"a",@unwind 487 .section .eh_frame,"a",@unwind
452 .zero 4 488 .zero 4
453 .section .jcr,"aw",@progbits 489 .section .jcr,"aw",@progbits
454 .zero 8 490 .zero 8