Mercurial > hg > CbC > CbC_gcc
diff libgo/configure.ac @ 131:84e7813d76e9
gcc-8.2
author | mir3636 |
---|---|
date | Thu, 25 Oct 2018 07:37:49 +0900 |
parents | 04ced10e8804 |
children | 1830386684a0 |
line wrap: on
line diff
--- a/libgo/configure.ac Fri Oct 27 22:46:09 2017 +0900 +++ b/libgo/configure.ac Thu Oct 25 07:37:49 2018 +0900 @@ -11,7 +11,7 @@ AC_CONFIG_SRCDIR(Makefile.am) AC_CONFIG_HEADER(config.h) -libtool_VERSION=12:0:0 +libtool_VERSION=13:0:0 AC_SUBST(libtool_VERSION) AM_ENABLE_MULTILIB(, ..) @@ -207,42 +207,43 @@ # All known GOARCH values. This is the union of all architectures # supported by the gofrontend and all architectures supported by the # gc toolchain. -# N.B. Keep in sync with gcc/testsuite/go.test/go-test.exp (go-set-goarch). -ALLGOARCH="386 alpha amd64 amd64p32 arm armbe arm64 arm64be ia64 m68k mips mipsle mips64 mips64le mips64p32 mips64p32le ppc ppc64 ppc64le s390 s390x sparc sparc64" +# To add a new architecture: +# - add it to this list +# - if appropriate, add an entry to ALLGOARCHFAMILY below +# - add an entry to the case on ${host} below to set GOARCH +# - update goarchList in libgo/go/go/build/syslist.go +# - update goarch.sh to report the values for this architecture +# - update go-set-goarch in gcc/testsuite/go.test/go-test.exp +# - update ptrSizeMap and intSizeMap in libgo/go/cmd/cgo/main.go +# - update arch lists in libgo/match.sh +# - update arch lists in libgo/testsuite/gotest +# - update +build lines in several places +# - libgo/go/runtime/lfstack_NNbit.go +# - libgo/go/runtime/hashNN.go +# - libgo/go/runtime/unalignedN.go +# - libgo/go/syscall/endian_XX.go +# - possibly others +# - possibly update files in libgo/go/internal/syscall/unix +ALLGOARCH="386 alpha amd64 amd64p32 arm armbe arm64 arm64be ia64 m68k mips mipsle mips64 mips64le mips64p32 mips64p32le nios2 ppc ppc64 ppc64le riscv riscv64 s390 s390x sh shbe sparc sparc64 wasm" -# All known GOARCH_FAMILY values. -ALLGOARCHFAMILY="I386 ALPHA AMD64 ARM ARM64 IA64 M68K MIPS MIPS64 PPC PPC64 S390 S390X SPARC SPARC64" +# All known GOARCH family values. +ALLGOARCHFAMILY="I386 ALPHA AMD64 ARM ARM64 IA64 M68K MIPS MIPS64 NIOS2 PPC PPC64 RISCV RISCV64 S390 S390X SH SPARC SPARC64 WASM" GOARCH=unknown -GOARCH_FAMILY=unknown -GOARCH_BIGENDIAN=0 -GOARCH_CACHELINESIZE=64 -GOARCH_PHYSPAGESIZE=4096 -GOARCH_PCQUANTUM=1 -GOARCH_INT64ALIGN=8 -GOARCH_HUGEPAGESIZE=0 -GOARCH_MINFRAMESIZE=0 case ${host} in alpha*-*-*) GOARCH=alpha - GOARCH_FAMILY=ALPHA - GOARCH_PHYSPAGESIZE=8192 - GOARCH_PCQUANTUM=4 ;; aarch64-*-*) GOARCH=arm64 - GOARCH_FAMILY=ARM64 - GOARCH_CACHELINESIZE=32 - GOARCH_PHYSPAGESIZE=65536 - GOARCH_PCQUANTUM=4 - GOARCH_MINFRAMESIZE=8 ;; arm*-*-* | strongarm*-*-* | ep9312*-*-* | xscale-*-*) GOARCH=arm - GOARCH_FAMILY=ARM - GOARCH_CACHELINESIZE=32 - GOARCH_PCQUANTUM=4 - GOARCH_MINFRAMESIZE=4 + case ${host} in + arm*b*-*-*) + GOARCH=armbe + ;; + esac ;; changequote(,)dnl i[34567]86-*-* | x86_64-*-*) @@ -251,29 +252,19 @@ #ifdef __x86_64__ #error 64-bit #endif], -[GOARCH=386 -GOARCH_FAMILY=I386 -GOARCH_INT64ALIGN=4 -GOARCH_HUGEPAGESIZE="1 << 21" -], -[GOARCH=amd64 -GOARCH_FAMILY=AMD64 -GOARCH_HUGEPAGESIZE="1 << 21" -]) + [GOARCH=386], + AC_COMPILE_IFELSE([ +#ifdef __ILP32__ +#error x32 +#endif], + [GOARCH=amd64], + [GOARCH=amd64p32])) ;; ia64-*-*) GOARCH=ia64 - GOARCH_FAMILY=IA64 - GOARCH_CACHELINESIZE=16384 - GOARCH_PHYSPAGESIZE=65536 ;; m68k*-*-*) GOARCH=m68k - GOARCH_FAMILY=M68K - GOARCH_BIGENDIAN=1 - GOARCH_CACHELINESIZE=16 - GOARCH_PCQUANTUM=4 - GOARCH_INT64ALIGN=2 ;; mips*-*-*) AC_COMPILE_IFELSE([ @@ -298,93 +289,56 @@ "n32") GOARCH=mips64p32 ;; "n64") GOARCH=mips64 ;; esac - case "$mips_abi" in - "o32" | "n32") - GOARCH_FAMILY=MIPS - GOARCH_MINFRAMESIZE=4 - ;; - "n64") - GOARCH_FAMILY=MIPS64 - GOARCH_MINFRAMESIZE=8 - ;; - esac case "${host}" in mips*el-*-*) GOARCH="${GOARCH}le" ;; - *) - GOARCH_BIGENDIAN=1 - ;; esac - GOARCH_CACHELINESIZE=32 - GOARCH_PHYSPAGESIZE=16384 - GOARCH_PCQUANTUM=4 + ;; + nios2-*-*) + GOARCH=nios2 ;; rs6000*-*-* | powerpc*-*-*) AC_COMPILE_IFELSE([ #ifdef _ARCH_PPC64 #error 64-bit #endif], -[GOARCH=ppc -GOARCH_FAMILY=PPC -GOARCH_BIGENDIAN=1 -], +[GOARCH=ppc], [ -GOARCH_FAMILY=PPC64 AC_COMPILE_IFELSE([ #if defined(_BIG_ENDIAN) || defined(__BIG_ENDIAN__) #error 64be #endif], -[GOARCH=ppc64le -], -[GOARCH=ppc64 -GOARCH_BIGENDIAN=1 -])]) - GOARCH_PHYSPAGESIZE=65536 - GOARCH_PCQUANTUM=4 - GOARCH_MINFRAMESIZE=32 +[GOARCH=ppc64le], +[GOARCH=ppc64])]) + ;; + riscv64-*-*) + GOARCH=riscv64 ;; s390*-*-*) AC_COMPILE_IFELSE([ #if defined(__s390x__) #error 64-bit #endif], -[GOARCH=s390 -GOARCH_FAMILY=S390 -GOARCH_MINFRAMESIZE=4 -], [GOARCH=s390x -GOARCH_FAMILY=S390X -GOARCH_MINFRAMESIZE=8 -]) - GOARCH_BIGENDIAN=1 - GOARCH_CACHELINESIZE=256 - GOARCH_PCQUANTUM=2 +[GOARCH=s390], +[GOARCH=s390x]) + ;; + sh3eb*-*-* | sh4eb*-*-*) + GOARCH=shbe + ;; + sh3*-*-* | sh4*-*-*) + GOARCH=sh ;; sparc*-*-*) AC_COMPILE_IFELSE([ #if defined(__sparcv9) || defined(__arch64__) #error 64-bit #endif], -[GOARCH=sparc -GOARCH_FAMILY=SPARC -], -[GOARCH=sparc64 -GOARCH_FAMILY=SPARC64 -]) - GOARCH_BIGENDIAN=1 - GOARCH_PHYSPAGESIZE=8192 - GOARCH_PCQUANTUM=4 +[GOARCH=sparc], +[GOARCH=sparc64]) ;; esac AC_SUBST(GOARCH) -AC_SUBST(GOARCH_FAMILY) -AC_SUBST(GOARCH_BIGENDIAN) -AC_SUBST(GOARCH_CACHELINESIZE) -AC_SUBST(GOARCH_PHYSPAGESIZE) -AC_SUBST(GOARCH_PCQUANTUM) -AC_SUBST(GOARCH_INT64ALIGN) -AC_SUBST(GOARCH_HUGEPAGESIZE) -AC_SUBST(GOARCH_MINFRAMESIZE) AC_SUBST(ALLGOARCH) AC_SUBST(ALLGOARCHFAMILY) @@ -550,14 +504,15 @@ AC_CACHE_CHECK([whether -pthread is supported], [libgo_cv_lib_pthread], [CFLAGS_hold=$CFLAGS -CFLAGS="$CFLAGS -pthread" +CFLAGS="$CFLAGS -pthread -L../libatomic/.libs" AC_COMPILE_IFELSE([[int i;]], [libgo_cv_lib_pthread=yes], [libgo_cv_lib_pthread=no]) CFLAGS=$CFLAGS_hold]) PTHREAD_CFLAGS= if test "$libgo_cv_lib_pthread" = yes; then - PTHREAD_CFLAGS=-pthread + # RISC-V apparently adds -latomic when using -pthread. + PTHREAD_CFLAGS="-pthread -L../libatomic/.libs" fi AC_SUBST(PTHREAD_CFLAGS) @@ -587,27 +542,9 @@ #endif ]) -AC_CACHE_CHECK([whether <ustat.h> can be used], -[libgo_cv_c_ustat_h], -[CFLAGS_hold=$CFLAGS -CFLAGS="$CFLAGS -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE $OSCFLAGS" -AC_COMPILE_IFELSE( -[AC_LANG_SOURCE([ -#include <sys/types.h> -#ifdef HAVE_LINUX_FILTER_H -#include <linux/filter.h> -#endif -#include <ustat.h> -])], [libgo_cv_c_ustat_h=yes], [libgo_cv_c_ustat_h=no]) -CFLAGS=$CFLAGS_hold]) -if test $libgo_cv_c_ustat_h = yes; then - AC_DEFINE(HAVE_USTAT_H, 1, - [Define to 1 if you have the <ustat.h> header file and it works.]) -fi - AM_CONDITIONAL(HAVE_SYS_MMAN_H, test "$ac_cv_header_sys_mman_h" = yes) -AC_CHECK_FUNCS(strerror_r strsignal wait4 mincore setenv unsetenv dl_iterate_phdr) +AC_CHECK_FUNCS(strerror_r strsignal wait4 mincore setenv unsetenv dl_iterate_phdr memmem) AM_CONDITIONAL(HAVE_STRERROR_R, test "$ac_cv_func_strerror_r" = yes) AM_CONDITIONAL(HAVE_WAIT4, test "$ac_cv_func_wait4" = yes) @@ -706,8 +643,7 @@ AC_SUBST(STRINGOPS_FLAG) dnl For x86 we want to compile the math library with -mfancy-math-387 -dnl -funsafe-math-optimizations so that we can use the builtin -dnl instructions directly. +dnl so that we can use the builtin instructions directly. AC_CACHE_CHECK([whether compiler supports -mfancy-math-387], [libgo_cv_c_fancymath], [CFLAGS_hold=$CFLAGS @@ -718,10 +654,9 @@ CFLAGS=$CFLAGS_hold]) MATH_FLAG= if test "$libgo_cv_c_fancymath" = yes; then - MATH_FLAG="-mfancy-math-387 -funsafe-math-optimizations" -else - MATH_FLAG="-ffp-contract=off" + MATH_FLAG="-mfancy-math-387" fi +MATH_FLAG="${MATH_FLAG} -ffp-contract=off -fno-math-errno -fno-trapping-math" AC_SUBST(MATH_FLAG) CFLAGS_hold=$CFLAGS @@ -752,7 +687,7 @@ AC_SUBST(STRUCT_EPOLL_EVENT_FD_OFFSET) dnl Check if <sys/stat.h> uses timespec_t for st_?tim members. Introduced -dnl in Solaris 12 for XPG7 compatibility. +dnl in Solaris 11.4 for XPG7 compatibility. AC_EGREP_HEADER([timespec_t.*st_atim], [sys/stat.h], [have_stat_timespec=yes], [have_stat_timespec=no]) AM_CONDITIONAL(HAVE_STAT_TIMESPEC, test $have_stat_timespec = yes)