Hi Ian, > On Thu, Jan 5, 2017 at 1:20 AM, Rainer Orth <r...@cebitec.uni-bielefeld.de> > wrote: >> As could have been expected, the static libgo.a causes the same problem >> with hardware capabilities on Solaris/x86 as was solved for libgo.so >> with >> >> https://gcc.gnu.org/ml/gcc-patches/2016-12/msg00726.html >> >> Instead of trying to pass -mclear-hwcap with -static-libgo, it was >> deemed easier to solve both problems the same way and disable hwcaps >> support in the assembler in the first place. >> >> This has already been done in libstdc++, so I've moved the corresponding >> autoconf macro to config/hwcaps.m4 and adapted it to set HWCAP_CFLAGS >> instead of HWCAP_FLAGS to better differntiate from HWCAP_LDFLAGS. >> Everything else is straightforward, I believe. >> >> Bootstrapped without regressions on i386-pc-solaris2.1[02] with as/ld >> (where as supports -nH) and sparc-sun-solaris2.12 with as/ld (where as >> doesn't, or rather it's called -hwcap={1|0}), and the libgo >> runtime/pprof failure is gone. >> >> Ok for mainline? >> >> Once approved, how should we proceed with checking? Ian, will you take >> care of the libgo part once the rest is in? > > This patch is OK. Yes, please commit the config and libstdc++ > portions. Then I will commit the libgo portions to the external repo > and mirror them in. Thanks.
done, thanks. While preparing the partial commit, I noticed that I'd created the libgo part of the patch on top of a tree that contained a workaround for PR go/64900. Here's the libgo part again, this time on top of a vanilla tree. Rainer -- ----------------------------------------------------------------------------- Rainer Orth, Center for Biotechnology, Bielefeld University
diff --git a/libgo/Makefile.am b/libgo/Makefile.am --- a/libgo/Makefile.am +++ b/libgo/Makefile.am @@ -42,14 +42,12 @@ ACLOCAL_AMFLAGS = -I ./config -I ../conf AM_CFLAGS = -fexceptions -fnon-call-exceptions -fplan9-extensions \ $(SPLIT_STACK) $(WARN_CFLAGS) \ - $(STRINGOPS_FLAG) $(OSCFLAGS) \ + $(STRINGOPS_FLAG) $(HWCAP_CFLAGS) $(OSCFLAGS) \ -I $(srcdir)/../libgcc -I $(srcdir)/../libbacktrace \ -I $(MULTIBUILDTOP)../../gcc/include -AM_LDFLAGS = $(HWCAP_LDFLAGS) - if USING_SPLIT_STACK -AM_LDFLAGS += -XCClinker $(SPLIT_STACK) +AM_LDFLAGS = -XCClinker $(SPLIT_STACK) endif # Multilib support. diff --git a/libgo/configure.ac b/libgo/configure.ac --- a/libgo/configure.ac +++ b/libgo/configure.ac @@ -421,8 +421,8 @@ case "$target" in esac AC_SUBST(OSCFLAGS) -dnl Check linker hardware capability support. -GCC_CHECK_LINKER_HWCAP +dnl Check if assembler supports disabling hardware capability support. +GCC_CHECK_ASSEMBLER_HWCAP dnl Use -fsplit-stack when compiling C code if available. AC_CACHE_CHECK([whether -fsplit-stack is supported],