glibc/scripts
Joseph Myers b1176270de Add build-many-glibcs.py support for building more GCC libraries.
Every so often we get libsanitizer or libgo builds breaking with new
glibc because of some change in the glibc headers.

glibc's build-many-glibcs.py deliberately disables libsanitizer and
GCC languages other than C and C++ because the point is to test glibc
and find glibc problems (including problems shown up by new compiler
warnings in new GCC), not to test libsanitizer or libgo; if the
compiler build fails because of libsanitizer or libgo failing to
build, that could hide the existence of new problems in glibc.
However, it seems reasonable to have a non-default mode where
build-many-glibcs.py does build those additional pieces, which this
patch adds.

Note that I do not intend to run a build-many-glibcs.py bot with this
new option.  If people concerned with libsanitizer, libgo or other
potentially affected GCC libraries wish to find out about such
problems more quickly, they may wish to run such a bot or bots (and to
monitor the results and fix issues found - obviously there will be
some overlap with issues found by my bots not using that option).

Note also that building a non-native Ada compiler requires a
sufficiently recent native (or build-x-host, in general) Ada compiler
to be used, possibly more or less the same version as being built.
That needs to be in the PATH when build-many-glibcs.py --full-gcc is
run; the script does not deal with setting up such a compiler (or any
of the other host tools needed for building GCC and glibc, beyond the
GMP / MPFR / MPC libraries), but perhaps it should, to avoid the need
to keep updating such a compiler manually when running a bot.

Tested by running build-many-glibcs.py with the new option, with
mainline GCC.  There are build failures for various configurations,
which may be of interest to Go / Ada people even if you're not
interested in running such a bot:

* mips64 / mips64el (all configuration): ICE building libstdc++, as
  seen without using the new option
  <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87156>.

* aarch64_be: error building libgo (little-endian aarch64 works fine):

version.go:67:13: error: expected ';' or ')' or newline
67 |   BigEndian =
   |             ^
version.go:67:3: error: reference to undefined name 'BigEndian'
67 |   BigEndian =
   |   ^

* arm (all configurations): error building libgo:

/scratch/jmyers/glibc/many9/src/gcc/libgo/go/internal/syscall/unix/getrandom_linux.go:29:5: error: reference to undefined name 'randomTrap'
29 |  if randomTrap == 0 {
   |     ^
/scratch/jmyers/glibc/many9/src/gcc/libgo/go/internal/syscall/unix/getrandom_linux.go:38:34: error: reference to undefined name 'randomTrap'
38 |  r1, _, errno := syscall.Syscall(randomTrap,
   |                                  ^

What's happening there is, I think, that the arm*b*-*-* case in
libgo/configure.ac is wrongly matching arm-glibc-linux-gnueabi with
the 'b' in the vendor part, and then something else is failing to
handle GOARCH=armbe.  Given that you can have configurations with
multilibs of both endiannesses, endianness should always be detected
by configure.ac, for all architectures, using a compile test of
whether __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__, not based on textual
matches to the host (= target at top-level) triplet.

* armeb (all configurations): error building libada (for some reason
  the Arm libada configuration seems to do different things for EH for
  big-endian, which makes no sense to me and doesn't actually work):

a-exexpr.adb:87:06: "System.Exceptions.Machine" is not a predefined library unit
a-exexpr.adb:87:06: "Ada.Exceptions (body)" depends on "Ada.Exceptions.Exception_Propagation (body)"
a-exexpr.adb:87:06: "Ada.Exceptions.Exception_Propagation (body)" depends on "System.Exceptions.Machine (spec)"

* hppa: error building libgo (same error as for aarch64_be).

* ia64: ICE building libgo.  I've filed
  <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87281> for this.

* m68k: ICE in the Go front end building libgo
  <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84948>.

* microblaze, microblazeel, nios2, sh3, sh3eb: build failure in libada
  for lack of a libada port to those systems (I'm not sure sh3 would
  actually need anything different from sh4):

a-cbdlli.ads:38:14: violation of restriction "No_Finalization" at system.ads:47

* i686-gnu: build failure in libada, might be fixed by the patch
  attached to <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81103>
  (not tested):

terminals.c:1115:13: fatal error: termio.h: No such file or directory

	* scripts/build-many-glibcs.py (Context.__init__): Add full_gcc
	argument.
	(Config.build_gcc): Use --disable-libsanitizer for first GCC
	build, but not for second build if --full-gcc.  Use
	--enable-languages=all for second build if --full-gcc.
	(get_parser): Add --full-gcc option.
	(main): Update call to Context.
2018-09-11 12:02:28 +00:00
..
abi-versions.awk Remove bitrotten --enable-oldest-abi (bug 6652). 2014-09-16 17:45:03 +00:00
abilist.awk Ignore absolute symbols in ABI tests. 2018-05-04 15:46:32 +00:00
backport-support.sh Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
build-many-glibcs.py Add build-many-glibcs.py support for building more GCC libraries. 2018-09-11 12:02:28 +00:00
check-c++-types.sh Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
check-execstack.awk check-execstack: Permit sysdeps to xfail some libs 2018-07-20 03:28:14 +02:00
check-initfini.awk Mark _init and _fini as hidden [BZ #23145] 2018-06-08 10:28:52 -07:00
check-installed-headers.sh hurd: Fix inclusion of mach headers in all standards 2018-03-04 02:53:09 +01:00
check-local-headers.sh Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
check-localplt.awk Extend local PLT reference check 2015-07-29 11:58:06 -07:00
check-textrel.awk Do check-textrel test using readelf rather than a build-time C program. 2012-05-01 13:27:11 -07:00
config-uname.sh Rejigger header generation for default uname implementation. 2010-08-24 11:56:52 -07:00
config.guess Update miscellaneous files from upstream sources. 2018-01-01 18:05:06 +00:00
config.sub Update miscellaneous files from upstream sources. 2018-01-01 18:05:06 +00:00
cpp Make shebang interpreter directives consistent 2016-01-07 04:03:21 -05:00
cross-test-ssh.sh Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
documented.sh Make shebang interpreter directives consistent 2016-01-07 04:03:21 -05:00
evaluate-test.sh Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
firstversions.awk Fix bug in firstversions.awk version range handling. 2012-01-28 12:02:44 -05:00
gen-as-const.awk Fix 64-bit platform handling in test cases for generated headers with constants. 2009-08-16 00:39:43 -07:00
gen-libc-abis Make shebang interpreter directives consistent 2016-01-07 04:03:21 -05:00
gen-libc-modules.awk Auto-generate libc-modules.h 2014-11-19 12:16:00 +05:30
gen-posix-conf-vars.awk Remove uses of sprintf in gen-posix-conf-vars.awk 2015-01-02 11:16:35 +05:30
gen-py-const.awk Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
gen-rrtypes.py Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
gen-sorted.awk Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
gen-tunables.awk Fix range check in do_tunable_update_val 2017-09-27 02:44:09 +05:30
install-sh Update miscellaneous files from upstream sources. 2017-12-20 22:28:20 +00:00
lib-names.awk Clean up gnu/lib-names.h generation (bug 14171). 2014-09-26 17:33:04 +00:00
list-fixed-bugs.py Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
list-sources.sh Update scripts/list-sources.sh for ports repository merge. 2014-06-26 21:30:07 +00:00
localplt.awk Support PLT and GOT references in local PIC check 2015-10-14 06:00:02 -07:00
merge-test-results.sh Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
mkinstalldirs Update miscellaneous files from upstream sources. 2016-12-21 16:05:55 +00:00
move-if-change Update miscellaneous files from upstream sources. 2018-01-01 18:05:06 +00:00
output-format.sed 2004-08-13 Daniel Jacobowitz <dan@debian.org> 2004-08-14 06:54:39 +00:00
pylint Implement benchmarking script in python 2014-03-21 17:32:50 +05:30
pylintrc pylintrc: disable reports 2015-11-11 13:41:57 -05:00
rellns-sh Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
soversions.awk Remove bitrotten --enable-oldest-abi (bug 6652). 2014-09-16 17:45:03 +00:00
sysd-rules.awk sysd-rules: Cut down the number of rtld-% pattern rules 2016-09-20 10:41:05 +02:00
test-installation.pl Fix hardcoded /tmp paths in testing (bug 13888). 2018-06-26 21:48:48 +00:00
test_printers_common.py Disable lock elision for mutex pretty printer tests. 2018-04-19 12:45:11 +02:00
test_printers_exceptions.py Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
update-abilist.sh scripts/update-abilist.sh: Accept empty list of files to patch 2018-06-14 09:37:31 +02:00
update-copyrights Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
versionlist.awk Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
versions.awk Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00