Commit c3c54e0f by Ian Lance Taylor

libgo: fixes for Solaris build

    
    Don't put m[0-4] in runtime.inc.
    
    Pass -mclear-hwcap to the linker if supported.
    
    From Rainer Orth.
    
    Reviewed-on: https://go-review.googlesource.com/34331

From-SVN: r243619
parent 80e66af3
ac59bb383e1b446c68465af793722dd0e84abefb 556a546ba3c7bb14bd1b9b8469ee3b7a914909f6
The first line of this file holds the git revision number of the last The first line of this file holds the git revision number of the last
merge done from the gofrontend repository. merge done from the gofrontend repository.
...@@ -46,8 +46,10 @@ AM_CFLAGS = -fexceptions -fnon-call-exceptions -fplan9-extensions \ ...@@ -46,8 +46,10 @@ AM_CFLAGS = -fexceptions -fnon-call-exceptions -fplan9-extensions \
-I $(srcdir)/../libgcc -I $(srcdir)/../libbacktrace \ -I $(srcdir)/../libgcc -I $(srcdir)/../libbacktrace \
-I $(MULTIBUILDTOP)../../gcc/include -I $(MULTIBUILDTOP)../../gcc/include
AM_LDFLAGS = $(HWCAP_LDFLAGS)
if USING_SPLIT_STACK if USING_SPLIT_STACK
AM_LDFLAGS = -XCClinker $(SPLIT_STACK) AM_LDFLAGS += -XCClinker $(SPLIT_STACK)
endif endif
# Multilib support. # Multilib support.
...@@ -561,7 +563,7 @@ s-sigtab: $(srcdir)/mksigtab.sh gen-sysinfo.go ...@@ -561,7 +563,7 @@ s-sigtab: $(srcdir)/mksigtab.sh gen-sysinfo.go
runtime.inc: s-runtime-inc; @true runtime.inc: s-runtime-inc; @true
s-runtime-inc: runtime.lo Makefile s-runtime-inc: runtime.lo Makefile
rm -f runtime.inc.tmp2 rm -f runtime.inc.tmp2
grep -v "#define _" runtime.inc.tmp | grep -v "#define c[01] " > runtime.inc.tmp2 grep -v "#define _" runtime.inc.tmp | grep -v "#define [cm][01234] " > runtime.inc.tmp2
for pattern in '_[GP][a-z]' _Max _Lock _Sig _Trace _MHeap _Num; do \ for pattern in '_[GP][a-z]' _Max _Lock _Sig _Trace _MHeap _Num; do \
grep "#define $$pattern" runtime.inc.tmp >> runtime.inc.tmp2; \ grep "#define $$pattern" runtime.inc.tmp >> runtime.inc.tmp2; \
done done
......
...@@ -62,8 +62,9 @@ POST_UNINSTALL = : ...@@ -62,8 +62,9 @@ POST_UNINSTALL = :
build_triplet = @build@ build_triplet = @build@
host_triplet = @host@ host_triplet = @host@
target_triplet = @target@ target_triplet = @target@
@GOC_IS_LLGO_TRUE@am__append_1 = libgo-llgo.la libgobegin-llgo.a @USING_SPLIT_STACK_TRUE@am__append_1 = -XCClinker $(SPLIT_STACK)
@GOC_IS_LLGO_FALSE@am__append_2 = libgo.la libgobegin.a @GOC_IS_LLGO_TRUE@am__append_2 = libgo-llgo.la libgobegin-llgo.a
@GOC_IS_LLGO_FALSE@am__append_3 = libgo.la libgobegin.a
subdir = . subdir = .
DIST_COMMON = README $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ DIST_COMMON = README $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
$(top_srcdir)/configure $(am__configure_deps) \ $(top_srcdir)/configure $(am__configure_deps) \
...@@ -71,6 +72,7 @@ DIST_COMMON = README $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ ...@@ -71,6 +72,7 @@ DIST_COMMON = README $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
$(srcdir)/../depcomp $(srcdir)/../depcomp
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/../config/depstand.m4 \ am__aclocal_m4_deps = $(top_srcdir)/../config/depstand.m4 \
$(top_srcdir)/../config/hwcaps.m4 \
$(top_srcdir)/../config/lead-dot.m4 \ $(top_srcdir)/../config/lead-dot.m4 \
$(top_srcdir)/../config/multi.m4 \ $(top_srcdir)/../config/multi.m4 \
$(top_srcdir)/../config/override.m4 \ $(top_srcdir)/../config/override.m4 \
...@@ -319,6 +321,7 @@ GO_SPLIT_STACK = @GO_SPLIT_STACK@ ...@@ -319,6 +321,7 @@ GO_SPLIT_STACK = @GO_SPLIT_STACK@
GO_SYSCALL_OS_ARCH_FILE = @GO_SYSCALL_OS_ARCH_FILE@ GO_SYSCALL_OS_ARCH_FILE = @GO_SYSCALL_OS_ARCH_FILE@
GO_SYSCALL_OS_FILE = @GO_SYSCALL_OS_FILE@ GO_SYSCALL_OS_FILE = @GO_SYSCALL_OS_FILE@
GREP = @GREP@ GREP = @GREP@
HWCAP_LDFLAGS = @HWCAP_LDFLAGS@
INSTALL = @INSTALL@ INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@ INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_PROGRAM = @INSTALL_PROGRAM@
...@@ -460,7 +463,7 @@ AM_CFLAGS = -fexceptions -fnon-call-exceptions -fplan9-extensions \ ...@@ -460,7 +463,7 @@ AM_CFLAGS = -fexceptions -fnon-call-exceptions -fplan9-extensions \
-I $(srcdir)/../libgcc -I $(srcdir)/../libbacktrace \ -I $(srcdir)/../libgcc -I $(srcdir)/../libbacktrace \
-I $(MULTIBUILDTOP)../../gcc/include -I $(MULTIBUILDTOP)../../gcc/include
@USING_SPLIT_STACK_TRUE@AM_LDFLAGS = -XCClinker $(SPLIT_STACK) AM_LDFLAGS = $(HWCAP_LDFLAGS) $(am__append_1)
# Multilib support. # Multilib support.
MAKEOVERRIDES = MAKEOVERRIDES =
...@@ -1117,7 +1120,7 @@ CHECK_DEPS = $(toolexeclibgo_DATA) $(toolexeclibgoarchive_DATA) \ ...@@ -1117,7 +1120,7 @@ CHECK_DEPS = $(toolexeclibgo_DATA) $(toolexeclibgoarchive_DATA) \
$(toolexeclibgorpc_DATA) $(toolexeclibgoruntime_DATA) \ $(toolexeclibgorpc_DATA) $(toolexeclibgoruntime_DATA) \
$(toolexeclibgosync_DATA) $(toolexeclibgotesting_DATA) \ $(toolexeclibgosync_DATA) $(toolexeclibgotesting_DATA) \
$(toolexeclibgotext_DATA) $(toolexeclibgotexttemplate_DATA) \ $(toolexeclibgotext_DATA) $(toolexeclibgotexttemplate_DATA) \
$(toolexeclibgounicode_DATA) $(am__append_1) $(am__append_2) $(toolexeclibgounicode_DATA) $(am__append_2) $(am__append_3)
# Pass -ffp-contract=off, or 386-specific options, when building the # Pass -ffp-contract=off, or 386-specific options, when building the
# math package. MATH_FLAG is defined in configure.ac. # math package. MATH_FLAG is defined in configure.ac.
...@@ -3173,7 +3176,7 @@ s-sigtab: $(srcdir)/mksigtab.sh gen-sysinfo.go ...@@ -3173,7 +3176,7 @@ s-sigtab: $(srcdir)/mksigtab.sh gen-sysinfo.go
runtime.inc: s-runtime-inc; @true runtime.inc: s-runtime-inc; @true
s-runtime-inc: runtime.lo Makefile s-runtime-inc: runtime.lo Makefile
rm -f runtime.inc.tmp2 rm -f runtime.inc.tmp2
grep -v "#define _" runtime.inc.tmp | grep -v "#define c[01] " > runtime.inc.tmp2 grep -v "#define _" runtime.inc.tmp | grep -v "#define [cm][01234] " > runtime.inc.tmp2
for pattern in '_[GP][a-z]' _Max _Lock _Sig _Trace _MHeap _Num; do \ for pattern in '_[GP][a-z]' _Max _Lock _Sig _Trace _MHeap _Num; do \
grep "#define $$pattern" runtime.inc.tmp >> runtime.inc.tmp2; \ grep "#define $$pattern" runtime.inc.tmp >> runtime.inc.tmp2; \
done done
......
...@@ -989,6 +989,7 @@ AC_SUBST([am__untar]) ...@@ -989,6 +989,7 @@ AC_SUBST([am__untar])
]) # _AM_PROG_TAR ]) # _AM_PROG_TAR
m4_include([../config/depstand.m4]) m4_include([../config/depstand.m4])
m4_include([../config/hwcaps.m4])
m4_include([../config/lead-dot.m4]) m4_include([../config/lead-dot.m4])
m4_include([../config/multi.m4]) m4_include([../config/multi.m4])
m4_include([../config/override.m4]) m4_include([../config/override.m4])
......
...@@ -624,6 +624,9 @@ GO_SPLIT_STACK ...@@ -624,6 +624,9 @@ GO_SPLIT_STACK
USING_SPLIT_STACK_FALSE USING_SPLIT_STACK_FALSE
USING_SPLIT_STACK_TRUE USING_SPLIT_STACK_TRUE
SPLIT_STACK SPLIT_STACK
HAVE_HWCAP_FALSE
HAVE_HWCAP_TRUE
HWCAP_LDFLAGS
OSCFLAGS OSCFLAGS
GO_SYSCALL_OS_ARCH_FILE GO_SYSCALL_OS_ARCH_FILE
GO_SYSCALL_OS_FILE GO_SYSCALL_OS_FILE
...@@ -11103,7 +11106,7 @@ else ...@@ -11103,7 +11106,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF cat > conftest.$ac_ext <<_LT_EOF
#line 11106 "configure" #line 11109 "configure"
#include "confdefs.h" #include "confdefs.h"
#if HAVE_DLFCN_H #if HAVE_DLFCN_H
...@@ -11209,7 +11212,7 @@ else ...@@ -11209,7 +11212,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF cat > conftest.$ac_ext <<_LT_EOF
#line 11212 "configure" #line 11215 "configure"
#include "confdefs.h" #include "confdefs.h"
#if HAVE_DLFCN_H #if HAVE_DLFCN_H
...@@ -13908,6 +13911,53 @@ case "$target" in ...@@ -13908,6 +13911,53 @@ case "$target" in
esac esac
test -z "$HWCAP_LDFLAGS" && HWCAP_LDFLAGS=''
ac_save_LDFLAGS="$LDFLAGS"
LDFLAGS="$LFLAGS -mclear-hwcap"
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -mclear-hwcap" >&5
$as_echo_n "checking for -mclear-hwcap... " >&6; }
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int
main ()
{
return 0;
;
return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
ac_hwcap_ldflags=yes
else
ac_hwcap_ldflags=no
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
if test "$ac_hwcap_ldflags" = "yes"; then
HWCAP_LDFLAGS="-mclear-hwcap $HWCAP_LDFLAGS"
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_hwcap_ldflags" >&5
$as_echo "$ac_hwcap_ldflags" >&6; }
LDFLAGS="$ac_save_LDFLAGS"
if test $ac_hwcap_ldflags != no; then
HAVE_HWCAP_TRUE=
HAVE_HWCAP_FALSE='#'
else
HAVE_HWCAP_TRUE='#'
HAVE_HWCAP_FALSE=
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -fsplit-stack is supported" >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -fsplit-stack is supported" >&5
$as_echo_n "checking whether -fsplit-stack is supported... " >&6; } $as_echo_n "checking whether -fsplit-stack is supported... " >&6; }
if test "${libgo_cv_c_split_stack_supported+set}" = set; then : if test "${libgo_cv_c_split_stack_supported+set}" = set; then :
...@@ -15688,6 +15738,10 @@ if test -z "${LIBGO_IS_BSD_TRUE}" && test -z "${LIBGO_IS_BSD_FALSE}"; then ...@@ -15688,6 +15738,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. as_fn_error "conditional \"LIBGO_IS_BSD\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5 Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi fi
if test -z "${HAVE_HWCAP_TRUE}" && test -z "${HAVE_HWCAP_FALSE}"; then
as_fn_error "conditional \"HAVE_HWCAP\" 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 if test -z "${USING_SPLIT_STACK_TRUE}" && test -z "${USING_SPLIT_STACK_FALSE}"; then
as_fn_error "conditional \"USING_SPLIT_STACK\" was never defined. as_fn_error "conditional \"USING_SPLIT_STACK\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5 Usually this means the macro was only invoked conditionally." "$LINENO" 5
......
...@@ -421,6 +421,9 @@ case "$target" in ...@@ -421,6 +421,9 @@ case "$target" in
esac esac
AC_SUBST(OSCFLAGS) AC_SUBST(OSCFLAGS)
dnl Check linker hardware capability support.
GCC_CHECK_LINKER_HWCAP
dnl Use -fsplit-stack when compiling C code if available. dnl Use -fsplit-stack when compiling C code if available.
AC_CACHE_CHECK([whether -fsplit-stack is supported], AC_CACHE_CHECK([whether -fsplit-stack is supported],
[libgo_cv_c_split_stack_supported], [libgo_cv_c_split_stack_supported],
......
...@@ -55,6 +55,7 @@ subdir = testsuite ...@@ -55,6 +55,7 @@ subdir = testsuite
DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/../config/depstand.m4 \ am__aclocal_m4_deps = $(top_srcdir)/../config/depstand.m4 \
$(top_srcdir)/../config/hwcaps.m4 \
$(top_srcdir)/../config/lead-dot.m4 \ $(top_srcdir)/../config/lead-dot.m4 \
$(top_srcdir)/../config/multi.m4 \ $(top_srcdir)/../config/multi.m4 \
$(top_srcdir)/../config/override.m4 \ $(top_srcdir)/../config/override.m4 \
...@@ -123,6 +124,7 @@ GO_SPLIT_STACK = @GO_SPLIT_STACK@ ...@@ -123,6 +124,7 @@ GO_SPLIT_STACK = @GO_SPLIT_STACK@
GO_SYSCALL_OS_ARCH_FILE = @GO_SYSCALL_OS_ARCH_FILE@ GO_SYSCALL_OS_ARCH_FILE = @GO_SYSCALL_OS_ARCH_FILE@
GO_SYSCALL_OS_FILE = @GO_SYSCALL_OS_FILE@ GO_SYSCALL_OS_FILE = @GO_SYSCALL_OS_FILE@
GREP = @GREP@ GREP = @GREP@
HWCAP_LDFLAGS = @HWCAP_LDFLAGS@
INSTALL = @INSTALL@ INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@ INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_PROGRAM = @INSTALL_PROGRAM@
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment