diff options
author | Ian Lance Taylor <ian@gcc.gnu.org> | 2019-09-09 20:08:32 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@gcc.gnu.org> | 2019-09-09 20:08:32 +0000 |
commit | de0f55dbb314264d7858a9d98c805285c62f5b6b (patch) | |
tree | 56fa5bee83ed5ce35c8fe111a578bc0fc69c9714 /libgo/configure | |
parent | b3baefb205e22aef208192aaf02f7ab0fad7c025 (diff) | |
download | gcc-de0f55dbb314264d7858a9d98c805285c62f5b6b.zip gcc-de0f55dbb314264d7858a9d98c805285c62f5b6b.tar.gz gcc-de0f55dbb314264d7858a9d98c805285c62f5b6b.tar.bz2 |
libgo: only build x/sys/cpu/cpu_gccgo.c on x86 systems
The C file has a build tag, but the procedure we use for building C
files ignores build tags.
This should fix the libgo build on non-x86 systems.
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/194378
From-SVN: r275544
Diffstat (limited to 'libgo/configure')
-rwxr-xr-x | libgo/configure | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/libgo/configure b/libgo/configure index ebdffa8..09c89df 100755 --- a/libgo/configure +++ b/libgo/configure @@ -662,6 +662,8 @@ GO_SYSCALL_OS_FILE GO_LIBCALL_OS_ARCH_FILE GO_LIBCALL_OS_FILE FUNCTION_DESCRIPTORS +LIBGO_IS_X86_FALSE +LIBGO_IS_X86_TRUE ALLGOARCHFAMILY ALLGOARCH GOARCH @@ -11484,7 +11486,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 11487 "configure" +#line 11489 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -11590,7 +11592,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 11593 "configure" +#line 11595 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -14229,6 +14231,15 @@ esac + if test "$GOARCH" = "386" -o "$GOARCH" = "amd64" -o "$GOARCH" = "amd64p32"; then + LIBGO_IS_X86_TRUE= + LIBGO_IS_X86_FALSE='#' +else + LIBGO_IS_X86_TRUE='#' + LIBGO_IS_X86_FALSE= +fi + + FUNCTION_DESCRIPTORS=false case ${host} in rs6000*-*-* | powerpc*-*-*) @@ -16038,6 +16049,10 @@ if test -z "${LIBGO_IS_BSD_TRUE}" && test -z "${LIBGO_IS_BSD_FALSE}"; then as_fn_error $? "conditional \"LIBGO_IS_BSD\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi +if test -z "${LIBGO_IS_X86_TRUE}" && test -z "${LIBGO_IS_X86_FALSE}"; then + as_fn_error $? "conditional \"LIBGO_IS_X86\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi if test -z "${USING_SPLIT_STACK_TRUE}" && test -z "${USING_SPLIT_STACK_FALSE}"; then as_fn_error $? "conditional \"USING_SPLIT_STACK\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 |