[build, libgo, libstdc++] Build libgo with -Wa,-nH if possible (PR go/78978)

Rainer Orth ro@CeBiTec.Uni-Bielefeld.DE
Thu Jan 5 09:21:00 GMT 2017


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?

Thanks.

	Rainer

-- 
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University


2017-01-04  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>

	libgo:
	PR go/78978
	* Makefile.am (AM_CFLAGS): Add HWCAP_CFLAGS.
	* configure.ac: Call GCC_CHECK_ASSEMBLER_HWCAP.
	* aclocal.m4: Regenerate.
	* configure: Regenerate.
	* Makefile.in: Regenerate.
	* testsuite/Makefile.in: Regenerate.

	Revert:
	2016-12-09  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>

	* configure.ac: Call GCC_CHECK_LINKER_HWCAP.
	* Makefile.am (AM_LDFLAGS): Initialize to HWCAP_LDFLAGS.
	[USING_SPLIT_STACK]: Add to AM_LDFLAGS.
	* aclocal.m4: Regenerate.
	* configure: Regenerate.
	* Makefile.in: Regenerate.
	* testsuite/Makefile.in: Regenerate.

	libstdc++-v3:
	PR go/78978
	* acinclude.m4 (GLIBCXX_CHECK_ASSEMBLER_HWCAP): Remove.
	* configure.ac: Call GCC_CHECK_ASSEMBLER_HWCAP instead of
	GLIBCXX_CHECK_ASSEMBLER_HWCAP.
	* fragment.am (CONFIG_CXXFLAGS): Use HWCAP_CFLAGS instead of
	HWCAP_FLAGS.
	* aclocal.m4: Regenerate.
	* configure: Regenerate.
	* Makefile.in, doc/Makefile.in, include/Makefile.in,
	libsupc++/Makefile.in, po/Makefile.in, python/Makefile.in,
	src/Makefile.in, src/c++11/Makefile.in, src/c++98/Makefile.in,
	src/filesystem/Makefile.in, testsuite/Makefile.in: Regenerate.

	config:
	PR go/78978
	* hwcaps.m4 (GCC_CHECK_ASSEMBLER_HWCAP): New macro.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: solx86-libgo-nH.patch
Type: text/x-patch
Size: 4775 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/libstdc++/attachments/20170105/632a4caf/attachment.bin>


More information about the Libstdc++ mailing list