Commit Graph

137 Commits

Author SHA1 Message Date
Siddhesh Poyarekar
23645707f1 Replace --enable-static-pie with --disable-default-pie
Build glibc programs and tests as PIE by default and enable static-pie
automatically if the architecture and toolchain supports it.

Also add a new configuration option --disable-default-pie to prevent
building programs as PIE.

Only the following architectures now have PIE disabled by default
because they do not work at the moment.  hppa, ia64, alpha and csky
don't work because the linker is unable to handle a pcrel relocation
generated from PIE objects.  The microblaze compiler is currently
failing with an ICE.  GNU hurd tries to enable static-pie, which does
not work and hence fails.  All these targets have default PIE disabled
at the moment and I have left it to the target maintainers to enable PIE
on their targets.

build-many-glibcs runs clean for all targets.  I also tested x86_64 on
Fedora and Ubuntu, to verify that the default build as well as
--disable-default-pie work as expected with both system toolchains.

Signed-off-by: Siddhesh Poyarekar <siddhesh@sourceware.org>
Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
2021-12-13 08:08:59 +05:30
H.J. Lu
cbcd65c8b5 Add a comment for --enable-initfini-array [BZ #27945]
Document that --enable-initfini-array is enabled by default in GCC 12,
which can be removed when GCC 12 becomes the minimum requirement.
2021-11-13 09:50:07 -08:00
H.J. Lu
a586fe9c80 Configure GCC with --enable-initfini-array [BZ #27945]
Starting from GCC 12, the .init_array and .fini_array sections are enabled
unconditionally by

commit 13a39886940331149173b25d6ebde0850668d8b9
Author: H.J. Lu <hjl.tools@gmail.com>
Date:   Tue Jun 8 16:09:24 2021 -0700

    Always enable DT_INIT_ARRAY/DT_FINI_ARRAY on Linux

configure GCC with --enable-initfini-array to enable them when using GCC
release branches.

Fixes BZ #27945.
2021-11-05 15:30:02 -07:00
Joseph Myers
db432f033d Use Linux 5.15 in build-many-glibcs.py
This patch makes build-many-glibcs.py use Linux 5.15.

Tested with build-many-glibcs.py (host-libraries, compilers and glibcs
builds).
2021-11-02 16:54:59 +00:00
Paul E. Murphy
4ae2b8a423 build-many-glibcs.py: add powerpc64le glibc variant without multiarch
This configuration tests the float128 to ldouble128 redirect support
on powerpc64le without the extra wrappers needed to support ifunc
on this target.
2021-09-24 14:32:35 -05:00
Joseph Myers
876e51548c Fix build-many-glibcs.py --strip for installed library renaming
The renaming of installed shared libraries to use the SONAME directly
rather than linking to a versioned name stopped build-many-glibcs.py
--strip (used to facilitate comparing binaries before and after
changes that aren't meant to change any generated code in installed
glibc shared libraries) from stripping most of the installed shared
libraries, because it stripped only the *.so names.  Fix it to strip
*.so* names instead and to detect the case of linker scripts using
grep instead of hardcoding particular files that are linker scripts.

Tested with build-many-glibcs.py --strip.
2021-09-16 14:08:05 +00:00
Joseph Myers
4e04a47208 Use Linux 5.14 in build-many-glibcs.py
This patch makes build-many-glibcs.py use Linux 5.14.

Tested with build-many-glibcs.py (host-libraries, compilers and glibcs
builds).
2021-09-07 13:08:38 +00:00
Joseph Myers
1d7b32ee61 Use binutils 2.37 branch in build-many-glibcs.py
This patch makes build-many-glibcs.py use binutils 2.37 branch.

Tested with build-many-glibcs.py (compilers and glibcs builds).
2021-08-09 17:00:36 +00:00
Florian Weimer
5f18453d1c build-many-glibcs.py: Add x86_64-linux-gnu-minimal configuration
This configuration exercises various --disable-* configure options.
It is expected to catch -Werror failures that only affect these
configurations.
2021-07-28 14:47:33 +02:00
Florian Weimer
1e5235c561 build-many-glibcs.py: Add glibcs-arm-linux-gnueabihf-thumb
Previously, there was no thumb variant, despite that building
glibc in Thumb-2 mode is supported.
2021-07-09 10:59:22 +02:00
Joseph Myers
38f58041ba Use Linux 5.13 in build-many-glibcs.py
This patch makes build-many-glibcs.py use Linux 5.13.

Tested with build-many-glibcs.py (host-libraries, compilers and glibcs
builds).
2021-06-30 13:29:08 +00:00
Joseph Myers
876cdfd154 Use Linux 5.12 and GCC 11 branch in build-many-glibcs.py.
This patch makes build-many-glibcs.py use Linux 5.12 and GCC 11
branch.

Tested with build-many-glibcs.py (host-libraries, compilers and glibcs
builds).
2021-04-27 15:19:08 +00:00
Joseph Myers
8a7b4dc6d0 Use Linux 5.11 in build-many-glibcs.py.
This patch makes build-many-glibcs.py use Linux 5.11.

Tested with build-many-glibcs.py (host-libraries, compilers and glibcs
builds).
2021-02-22 16:11:21 +00:00
Florian Weimer
418f5783d9 build-many-glibcs.py: Use make -O for more consistent log output
The -O option avoids interleaving (e.g.) compiler error messages
with other build messages, and makes attribution of messages to
commands easier.

According to my tests, the impact on build time is within the noise.
2021-02-22 09:39:14 +01:00
Joseph Myers
dfc3907cde Use binutils 2.36 branch in build-many-glibcs.py.
This patch makes build-many-glibcs.py use binutils 2.36 branch.

Tested with build-many-glibcs.py (compilers and glibcs builds).
2021-02-04 16:00:36 +00:00
Paul Eggert
2b778ceb40 Update copyright dates with scripts/update-copyrights
I used these shell commands:

../glibc/scripts/update-copyrights $PWD/../gnulib/build-aux/update-copyright
(cd ../glibc && git commit -am"[this commit message]")

and then ignored the output, which consisted lines saying "FOO: warning:
copyright statement not found" for each of 6694 files FOO.
I then removed trailing white space from benchtests/bench-pthread-locks.c
and iconvdata/tst-iconv-big5-hkscs-to-2ucs4.c, to work around this
diagnostic from Savannah:
remote: *** pre-commit check failed ...
remote: *** error: lines with trailing whitespace found
remote: error: hook declined to update refs/heads/master
2021-01-02 12:17:34 -08:00
Joseph Myers
1f3cb8d600 Use Linux 5.10 in build-many-glibcs.py.
This patch makes build-many-glibcs.py use Linux 5.10.

Tested with build-many-glibcs.py (host-libraries, compilers and glibcs
builds).
2020-12-15 23:36:41 +00:00
Joseph Myers
7366cb03f8 Use GMP 6.2.1 in build-many-glibcs.py.
This patch makes build-many-glibcs.py use the recent GMP 6.2.1
release.

Tested with build-many-glibcs.py (host-libraries, compilers and glibcs
builds).
2020-12-15 16:45:49 +00:00
Joseph Myers
b853a4176c Use MPC 1.2.1 in build-many-glibcs.py.
This patch makes build-many-glibcs.py use the new MPC 1.2.1 release.

Tested with build-many-glibcs.py (host-libraries, compilers and glibcs
builds).
2020-10-30 17:16:54 +00:00
Joseph Myers
f603224706 Use Linux 5.9 in build-many-glibcs.py.
This patch makes build-many-glibcs.py use Linux 5.9.

Tested with build-many-glibcs.py (host-libraries, compilers and glibcs
builds).
2020-10-22 14:29:13 +00:00
Zong Li
567b170501 Add RISC-V 32-bit target to build-many-glibcs.py
Support building three variants of 32-bit RISC-V glibc as follows:
- riscv32-linux-gnu-rv32imac-ilp32
- riscv32-linux-gnu-rv32imafdc-ilp32
- riscv32-linux-gnu-rv32imafdc-ilp32d

Reviewed-by: Maciej W. Rozycki <macro@wdc.com>
2020-08-27 08:17:44 -07:00
Stefan Liebler
33dd32fd79 build-many-glibcs.py: Add a s390x -O3 glibc variant.
On s390x, gcc inlines more aggresive compared to other architectures.
This occaisionally leads to build warnings / errors.

Therefore this patch adds a s390x glibc variant with optimization.

There is the ccopts field which contain ABI options which are passed
to configure as CC / CXX.  Now there is also the cflags field which
contains non-ABI options like -g or -O. Those are passed to configure
as CFLAGS / CXXFLAGS.

Currently CC is passed to conformtest.py or linknamespace.py but not
the CFLAGS.
2020-08-20 10:51:42 +02:00
Joseph Myers
c08df688f2 Use MPC 1.2.0 in build-many-glibcs.py.
This patch makes build-many-glibcs.py use the new MPC 1.2.0 release.

Tested with build-many-glibcs.py (host-libraries, compilers and glibcs
builds).
2020-08-19 13:48:14 +00:00
Joseph Myers
23a7896d06 Update build-many-glibcs.py for binutils ia64 obsoletion.
Since binutils has obsoleted ia64 support, use --enable-obsolete for
now when configuring binutils for ia64 in build-many-glibcs.py (which
requires adding support for architecture-specific binutils configure
options there).  As with other obsoletions, the removal of support for
ia64 in any of (binutils, GCC, Linux kernel) should imply its removal
from glibc.

Tested with build-many-glibcs.py for ia64-linux-gnu (compilers and
glibcs build).
2020-08-13 18:51:10 +00:00
Joseph Myers
42a00a0fb4 Use Linux 5.8 in build-many-glibcs.py.
This patch makes build-many-glibcs.py use Linux 5.8.

Tested with build-many-glibcs.py (host-libraries, compilers and glibcs
builds).
2020-08-07 14:38:12 +00:00
Joseph Myers
b51c1500e0 Use binutils 2.35 branch in build-many-glibcs.py.
This patch makes build-many-glibcs.py use binutils 2.35 branch.

Tested with build-many-glibcs.py (compilers and glibcs builds).
2020-07-27 14:55:10 +00:00
Joseph Myers
63ce2425c2 Use MPFR 4.1.0 in build-many-glibcs.py.
This patch makes build-many-glibcs.py use the new MPFR 4.1.0 release.

Tested with build-many-glibcs.py (host-libraries, compilers and glibcs
builds).
2020-07-20 18:16:50 +00:00
Petr Vorel
5500cdba40 Remove --enable-obsolete-rpc configure flag
Sun RPC was removed from glibc. This includes rpcgen program, librpcsvc,
and Sun RPC headers. Also test for bug #20790 was removed
(test for rpcgen).

Backward compatibility for old programs is kept only for architectures
and ABIs that have been added in or before version 2.28.

libtirpc is mature enough, librpcsvc and rpcgen are provided in
rpcsvc-proto project.

NOTE: libnsl code depends on Sun RPC (installed libnsl headers use
installed Sun RPC headers), thus --enable-obsolete-rpc was a dependency
for --enable-obsolete-nsl (removed in a previous commit).

The arc ABI list file has to be updated because the port was added
with the sunrpc symbols

Tested-by: Carlos O'Donell <carlos@redhat.com>
Reviewed-by: Carlos O'Donell <carlos@redhat.com>
2020-07-13 19:36:35 +02:00
Vineet Gupta
2fc2260ba4 build-many-glibcs.py: Enable ARC builds
Reviewed-by: Adhemerval Zanella  <adhemerval.zanella@linaro.org>
2020-07-10 16:08:45 -07:00
Petr Vorel
ae7a94e5e3 Remove --enable-obsolete-nsl configure flag
this means that *always* libnsl is only built as shared library for
backward compatibility and the NSS modules libnss_nis and libnss_nisplus
are not built at all, libnsl's headers aren't installed.

This compatibility is kept only for architectures and ABIs that have
been added in or before version 2.28.

Replacement implementations based on TIRPC, which additionally support
IPv6, are available from <https://github.com/thkukuk/>.

This change does not affect libnss_compat which does not depended
on libnsl since 2.27 and thus can be used without NIS.

libnsl code depends on Sun RPC, e.g. on --enable-obsolete-rpc (installed
libnsl headers use installed Sun RPC headers), which will be removed in
the following commit.
2020-07-08 17:25:57 +02:00
Adhemerval Zanella
f13d260190 signal: Move sys_errlist to a compat symbol
The symbol is deprecated by strerror since its usage imposes some issues
such as copy relocations.

Its internal name is also changed to _sys_errlist_internal to avoid
static linking usage.  The compat code is also refactored by removing
the over enginered errlist-compat.c generation from manual entried and
extra comment token in linker script file.  It disantangle the code
generation from manual and simplify both Linux and Hurd compat code.

The definitions from errlist.c are moved to errlist.h and a new test
is added to avoid a new errno entry without an associated one in manual.

Checked on x86_64-linux-gnu and i686-linux-gnu. I also run a check-abi
on all affected platforms.

Tested-by: Carlos O'Donell <carlos@redhat.com>
Reviewed-by: Carlos O'Donell <carlos@redhat.com>
2020-07-07 14:10:58 -03:00
Joseph Myers
c477beb2cc Use Linux 5.7 in build-many-glibcs.py.
This patch makes build-many-glibcs.py use Linux 5.7.

Tested with build-many-glibcs.py (host-libraries, compilers and glibcs
builds).
2020-06-10 22:53:55 +00:00
Joseph Myers
99a327f801 Use GCC 10 branch in build-many-glibcs.py.
This updates the default GCC version used in build-many-glibcs.py when
no version is specified explicitly.  I'm replacing my bot using GCC 8
with one using GCC 10 (leaving the GCC 9 and GCC mainline bots running
as at present).
2020-05-06 15:41:55 +00:00
Joseph Myers
6b89dbc3ca Use Linux 5.6 and GMP 6.2.0 in build-many-glibcs.py.
This patch makes build-many-glibcs.py use the current versions of
Linux (5.6) and GMP (6.2.0).

Tested with build-many-glibcs.py (host-libraries, compilers and glibcs
builds).
2020-03-31 00:22:22 +00:00
Florian Weimer
feaa150680 build-many-glibcs.py: Add list-compilers, list-glibcs commands
These commands are helpful for scripting the distribution of
build-many-glibcs.py runs across multiple builders.
2020-03-03 07:39:16 +01:00
Florian Weimer
c592721a5b build-many-glibcs.py: Add --shallow option
The history is not used by build-many-glibcs.py itself.
--replace-sources deletes an existing source tree before switching
the version.  But some users prefer to have the full history
available, therefore make shallow clones optional with the --shallow
option.
2020-03-03 07:39:16 +01:00
Joseph Myers
a179673f3d Use --disable-gdbserver in build-many-glibcs.py.
Now that binutils-gdb has gdbserver at top level, an extra
--disable-gdbserver configure option is needed when configuring
binutils from a git checkout to avoid it also building gdbserver
unnecessarily (although fairly harmlessly).  This patch updates the
options used in build-many-glibcs.py accordingly (although this might
end up not being needed depending on what happens regarding whether
gdbserver gets built for host != target).

Tested with a build-many-glibcs.py compilers build for
aarch64-linux-gnu using binutils-gdb master.
2020-02-10 22:17:59 +00:00
Joseph Myers
286a01d7ab Use binutils 2.34 branch in build-many-glibcs.py.
This patch makes build-many-glibcs.py use binutils 2.34 branch.

Tested with build-many-glibcs.py (compilers and glibcs builds).
2020-02-03 20:38:27 +00:00
Joseph Myers
2db7feeb95 Use Linux 5.5 in build-many-glibcs.py.
This patch makes build-many-glibcs.py use Linux 5.5.

Tested with build-many-glibcs.py (compilers and glibcs builds).
2020-02-03 14:17:05 +00:00
Joseph Myers
bc487d7141 Update build-many-glibcs.py for GCC move to git.
This patch updates build-many-glibcs.py for the move of GCC to git,
teaching it to do the initial checkout from git, to replace an SVN
checkout with a git one if --replace-sources is used, and to get the
commit identifier from a git checkout after updating it.
2020-01-13 16:32:57 +00:00
Florian Weimer
cc47d5c5f5 build-many-glibcs.py: Fix “glibcs i686-gnu --strip”
Hurd uses an empty prefix, so the linker scripts end up in /lib, the
find command picked them up, and stripping them failed because they
are not ELF files.
2020-01-02 10:18:42 +01:00
Florian Weimer
07a44d2392 build-many-glibcs.py: Implement update-syscalls command
This command uses pre-built compilers to re-install the Linux headers
from the current sources into a temporary location and runs glibc's
“make update-syscalls-lists” against that.  This updates the glibc
source tree with the current system call numbers.

Reviewed-by: Siddhesh Poyarekar <siddhesh@sourceware.org>
2020-01-02 10:18:34 +01:00
Florian Weimer
857c7d7397 build-many-glibcs.py: Introduce glibc build policy classes
The new classes GlibcPolicyForCompiler and GlibcPolicyForBuild allow
customization of the Glibc.build_glibc method, replacing the existing
for_compiler flag.

Reviewed-by: Siddhesh Poyarekar <siddhesh@sourceware.org>
2020-01-02 10:18:31 +01:00
Florian Weimer
65b6c9b02b build-many-glibcs.py: Introduce LinuxHeadersPolicyForBuild
And move install_linux_headers to the top level.

Reviewed-by: Siddhesh Poyarekar <siddhesh@sourceware.org>
2020-01-02 10:18:26 +01:00
Joseph Myers
d614a75396 Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
Florian Weimer
3aec0c3912 build-many-glibcs.py: Do not build C++ PCHs by default
They are not used during the subsequent glibc build, so creating them
merely wastes time.
2019-12-18 08:47:45 +01:00
Dragan Mladjenovic
a2e487ce1c build-many-glibcs.py: Add mipsisa64r6el-linux-gnu target
This patch enables building mips/r6 isa/little-endian/hard-float configuration in
o32, n32, and n64 variants.
2019-12-16 19:42:37 +01:00
Adhemerval Zanella
066d80a7cd build-many-glibcs.py: Move sparcv8 to extra_glibcs
It also fixes the sparcv9-linux-gnu-disable-multi-arch configuration.
The resulting sparc possible build permutations are:

  - sparc64-linux-gnu
  - sparcv9-linux-gnu
  - sparcv8-linux-gnu-leon3 (from extra_glibcs)
  - sparc64-linux-gnu-disable-multi-arch (from extra_glibcs)
  - sparcv9-linux-gnu-disable-multi-arch (from extra_glibcs)
2019-12-05 08:51:58 -03:00
Joseph Myers
cdf203668e Fix syntax error in build-many-glibcs.py.
The recent SPARC changes caused a syntax error:

    'ccopts': '-m32 -mlong-double-128 -mcpu=v9'}],
                                                ^
SyntaxError: invalid syntax

Fixed by this patch.
2019-11-28 17:22:22 +00:00
Adhemerval Zanella
5d9b7b9fa7 Remove 32 bit sparc v7 support
The patch is straighforward:

  - The sparc32 v8 implementations are moved as the generic ones.

  - A configure test is added to check for either __sparc_v8__ or
    __sparc_v9__.

  - The triple names are simplified and sparc implies sparcv8.

The idea is to keep support on sparcv8 architectures that does support
CAS instructions, such as LEON3/LEON4.

Checked on a sparcv9-linux-gnu and sparc64-linux-gnu.

Tested-by: Andreas Larsson <andreas@gaisler.com>
2019-11-27 09:37:57 -03:00