Commit Graph

430 Commits

Author SHA1 Message Date
Samuel Thibault
9446e02b0d hurd: Remove some remnants of cthreads
Libc has actually been using mach's lock-internal.h mutex for a long
time already.
2020-11-15 13:16:03 +01: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
Florian Weimer
1a945ba5ad scripts/update-copyrights: Update csu/version.c, elf/dl-usage.c
Reviewed-by: Adhemerval Zanella  <adhemerval.zanella@linaro.org>
2020-10-08 15:37:59 +02:00
DJ Delorie
78e09591a5 Optimize scripts/merge-test-results.sh
The inner loop is called thousands of times per "make check" even
if there's otherwise nothing to do.  Avoid calling /bin/head all
those times when a builtin will do.

Reviewed-by: Carlos O'Donell <carlos@redhat.com>
2020-10-05 17:16:03 -04: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
Siddhesh Poyarekar
cd71f47acc [vcstocl] Import ProjectQuirks from its own file
ProjectQuirks moved into its own file in gnulib because one cannot
import modules with hyphens in them.  Adjust the quirks file to
reflect this reality.
2020-08-20 23:23:01 +05:30
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
Florian Weimer
076f09afba Linux: Remove <sys/sysctl.h> and the sysctl function
Linux 5.5 remove the system call in commit
61a47c1ad3a4dc6882f01ebdc88138ac62d0df03 ("Linux: Remove
<sys/sysctl.h>").  Therefore, the compat function is just a stub that
sets ENOSYS.

Due to SHLIB_COMPAT, new ports will not add the sysctl function anymore
automatically.

x32 already lacks the sysctl function, so an empty sysctl.c file is
used to suppress it.  Otherwise, a new compat symbol would be added.

Reviewed-by: Adhemerval Zanella  <adhemerval.zanella@linaro.org>
2020-04-15 17:17:32 +02: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
Florian Weimer
0499a353a6 elf: Add elf/check-wx-segment, a test for the presence of WX segments
Writable, executable segments defeat security hardening.  The
existing check for DT_TEXTREL does not catch this.

hppa and SPARC currently keep the PLT in an RWX load segment.
2020-03-02 14:25:20 +01:00
Stefan Liebler
5e6efd3ec2 Use gcc -finput-charset=ascii for check-installed-headers.
A non-ascii character in the installed headers leads now to:
error: failure to convert ascii to UTF-8

Such a finding in s390 specific fenv.h leads to fails in GCC testsuite.
See glibc commit 08aea89ef6.

Adding this gcc option also to our tests was proposed by Florian Weimer.

This change also found a hit in resource.h where now "microseconds" is used.
I've adjusted all the resource.h files.

I've used the following command to check for further hits in headers.
LC_ALL=C find -name "*.h" -exec grep -PHn "[\x80-\xFF]" {} \;

Tested on s390x and x86_64.

Reviewed-by: Zack Weinberg <zackw@panix.com>
2020-02-13 17:32:00 +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
Siddhesh Poyarekar
44b2d5f1ba list-fixed-bugs.py: Wrap at 72 chars
Wrap the bug list output at 72 chars to make it easy to paste into
emails.

Reviewed-by: H.J. Lu <hjl.tools@gmail.com>
2020-02-03 09:08:55 +05:30
Siddhesh Poyarekar
de077de10f gitlog-to-changelog: Drop scripts in favour of gnulib version
The ChangeLog automation scripts were incorporated in gnulib as
vcs-to-changelog for a while now since other projects expressed the
desire to use and extend this script.  In the interest of avoiding
duplication of code, drop the glibc version of gitlog-to-changelog and
use the gnulib one directly.

The only file that remains is vcstocl_quirks.py, which specifies
properties and quirks of the glibc project source code.  This patch
also drops the shebang at the start of vcstocl_quirks.py since the
file is not intended to be directly executable.
2020-01-23 20:00:13 +05:30
Siddhesh Poyarekar
a9ed2b2747 vcs-to-changelog: Add quirk for __nonnull
The parser cannot identify the __nonnull off the bat and confuses
__typeof in the change db25266c9 to be a function declaration.
2020-01-17 09:26:20 +05:30
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
Siddhesh Poyarekar
d006e84d5d Fix formatting of ChangeLog ouput
Add another newline when the number of files differing is too large.
This is typical for across-the-board changes such as the copyright
year update that happened recently.
2020-01-07 09:55:03 +05:30
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
5f72f9800b Update copyright dates not handled by scripts/update-copyrights.
I've updated copyright dates in glibc for 2020.  This is the patch for
the changes not generated by scripts/update-copyrights and subsequent
build / regeneration of generated files.  As well as the usual annual
updates, mainly dates in --version output (minus libc.texinfo which
previously had to be handled manually but is now successfully updated
by update-copyrights), there is a fix to
sysdeps/unix/sysv/linux/powerpc/bits/termios-c_lflag.h where a typo in
the copyright notice meant it failed to be updated automatically.

Please remember to include 2020 in the dates for any new files added
in future (which means updating any existing uncommitted patches you
have that add new files to use the new copyright dates in them).
2020-01-01 00:21:22 +00: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
Joseph Myers
17832eefee Use Linux 5.4 in build-many-glibcs.py.
This patch makes build-many-glibcs.py use Linux 5.4.

Tested with build-many-glibcs.py (compilers and glibcs builds).
2019-11-26 01:46:32 +00:00
Joseph Myers
b5b67ecec1 Use binutils 2.33 branch in build-many-glibcs.py.
This patch makes build-many-glibcs.py default to binutils 2.33 branch.

Tested with build-many-glibcs.py (compilers and glibcs builds).

	* scripts/build-many-glibcs.py (Context.checkout): Default
	binutils version to 2.33 branch.
2019-09-30 22:21:39 +00:00
Siddhesh Poyarekar
8b45cac079 auto-changelog: Remove latin1 from codecs
Bruno Haible had pointed out that latin1 is a subset of cp1252 and is
hence redundant.  I forgot to remove it back then.
2019-09-26 12:04:26 -07:00
Siddhesh Poyarekar
f2144b7874 Script to generate ChangeLog-like output from git log
Co-authored-by: Gabriel F. T. Gomes <gabriel@inconstante.net.br>
Reviewed-by: Gabriel F. T. Gomes <gabriel@inconstante.net.br>
Reviewed-by: Joseph Myers <joseph@codesourcery.com>

The utility of a ChangeLog file has been discussed in various mailing
list threads and GNU Tools Cauldrons in the past years and the general
consensus is that while the file may have been very useful in the past
when revision control did not exist or was not as powerful as it is
today, it's current utility is fast diminishing.  Further, the
ChangeLog format gets in the way of modernisation of processes since
it almost always results in rewriting of a commit, thus preventing use
of any code review tools to automatically manage patches in the glibc
project.

There is consensus in the glibc community that documentation of why a
change was done (i.e. a detailed description in a git commit) is more
useful than what changed (i.e. a ChangeLog entry) since the latter can
be deduced from the patch.  The GNU community would however like to
keep the option of ascertaining what changed through a ChangeLog-like
output and as a compromise, it was proposed that a script be developed
that generates this output.

The script below is the result of these discussions.  This script
takes two git revisions references as input and generates the git log
between those revisions in a form that resembles a ChangeLog.  Its
capabilities and limitations are listed in a comment in the script.
On a high level it is capable of parsing C code and telling what
changed at the top level, but not within constructs such as functions.

Design
------

At a high level, the script analyses the raw output of a VCS, parses
the source files that have changed and attempts to determine what
changed.  The script driver needs three distinct components to be
fully functional for a repository:

- A vcstocl_quirks.py file that helps it parse weird patterns in
  sources that may result from preprocessor defines.
- A VCS plugin backend; the git backend is implemented for glibc
- A programming language parser plugin.  C is currently implemented.

Additional programming language parsers can be added to give more
detailed output for changes in those types of files.

For input in languages other than those that have a parser, the script
only identifies if a file has been added, removed, modified,
permissions changed, etc. but cannot understand the change in content.

The C Parser
------------

The C parser is capable of parsing C programs with preprocessor macros
in place, as if they were part of the language.  This presents some
challenges with parsing code that expands macros on the fly and to
help work around that, a vcstocl_quirks.py file has transformations to
ease things.

The C parser currently can identify macro definitions and scopes and
all global and static declarations and definitions.  It cannot parse
(and compare) changes inside functions yet, it could be a future
enhancement if the need for it arises.

Testing
-------

The script has been tested with the glibc repository up to glibc-2.29
and also in the past with emacs.  While it would be ideal to have
something like this in a repository like gnulib, that should not be a
bottleneck for glibc to start using this, so this patch proposes to
add these scripts into glibc.

And here is (hopefully!) one of the last ChangeLog entries we'd have
to write for glibc:

	* scripts/gitlog_to_changelog.py: New script to auto-generate
	ChangeLog.
	* scripts/vcs_to_changelog/frontend_c.py: New file.
	* scripts/vcs_to_changelog/misc_util.py: New file.
	* scripts/vcs_to_changelog/vcs_git.py: New file.
	* scripts/vcs_to_changelog/vcstocl_quirks.py: Likewise.
2019-09-20 11:46:52 -07:00
Joseph Myers
2dd8d4a7c0 Use Linux 5.3 in build-many-glibcs.py.
This patch makes build-many-glibcs.py use Linux 5.3.

Tested with build-many-glibcs.py (host-libraries, compilers and glibcs
builds).

	* scripts/build-many-glibcs.py (Context.checkout): Default Linux
	version to 5.3.
2019-09-18 15:13:33 +00:00
Paul Eggert
5a82c74822 Prefer https to http for gnu.org and fsf.org URLs
Also, change sources.redhat.com to sourceware.org.
This patch was automatically generated by running the following shell
script, which uses GNU sed, and which avoids modifying files imported
from upstream:

sed -ri '
  s,(http|ftp)(://(.*\.)?(gnu|fsf|sourceware)\.org($|[^.]|\.[^a-z])),https\2,g
  s,(http|ftp)(://(.*\.)?)sources\.redhat\.com($|[^.]|\.[^a-z]),https\2sourceware.org\4,g
' \
  $(find $(git ls-files) -prune -type f \
      ! -name '*.po' \
      ! -name 'ChangeLog*' \
      ! -path COPYING ! -path COPYING.LIB \
      ! -path manual/fdl-1.3.texi ! -path manual/lgpl-2.1.texi \
      ! -path manual/texinfo.tex ! -path scripts/config.guess \
      ! -path scripts/config.sub ! -path scripts/install-sh \
      ! -path scripts/mkinstalldirs ! -path scripts/move-if-change \
      ! -path INSTALL ! -path  locale/programs/charmap-kw.h \
      ! -path po/libc.pot ! -path sysdeps/gnu/errlist.c \
      ! '(' -name configure \
            -execdir test -f configure.ac -o -f configure.in ';' ')' \
      ! '(' -name preconfigure \
            -execdir test -f preconfigure.ac ';' ')' \
      -print)

and then by running 'make dist-prepare' to regenerate files built
from the altered files, and then executing the following to cleanup:

  chmod a+x sysdeps/unix/sysv/linux/riscv/configure
  # Omit irrelevant whitespace and comment-only changes,
  # perhaps from a slightly-different Autoconf version.
  git checkout -f \
    sysdeps/csky/configure \
    sysdeps/hppa/configure \
    sysdeps/riscv/configure \
    sysdeps/unix/sysv/linux/csky/configure
  # Omit changes that caused a pre-commit check to fail like this:
  # remote: *** error: sysdeps/powerpc/powerpc64/ppc-mcount.S: trailing lines
  git checkout -f \
    sysdeps/powerpc/powerpc64/ppc-mcount.S \
    sysdeps/unix/sysv/linux/s390/s390-64/syscall.S
  # Omit change that caused a pre-commit check to fail like this:
  # remote: *** error: sysdeps/sparc/sparc64/multiarch/memcpy-ultra3.S: last line does not end in newline
  git checkout -f sysdeps/sparc/sparc64/multiarch/memcpy-ultra3.S
2019-09-07 02:43:31 -07:00