aboutsummaryrefslogtreecommitdiff
path: root/contrib
AgeCommit message (Collapse)AuthorFilesLines
2024-01-12Daily bump.GCC Administrator1-0/+5
2024-01-11dg-extract-results.py: Ignore case in header linePaul Iannetta1-1/+2
DejaGNU changed its header line from "Test Run By" to "Test run by" around 2016. This patch makes it so that both alternatives are correcly detected. contrib/ChangeLog: * dg-extract-results.py: Make the test_run regex case insensitive.
2024-01-10Daily bump.GCC Administrator1-0/+5
2024-01-09libstdc++: Fix Unicode property detection functionsJonathan Wakely1-1/+4
Fix some copy & pasted logic in __is_extended_pictographic. This function should yield false for the values before the first edge, not true. Also add a missing boundary condition check in __incb_property. Also Fix an off-by-one error in _Utf_iterator::operator++() that would make dereferencing a past-the-end iterator undefined (where the intended design is that the iterator is always incrementable and dereferenceable, for better memory safety). Also simplify the grapheme view iterator, which still contained some remnants of an earlier design I was experimenting with. Slightly tweak the gen_libstdcxx_unicode_data.py script so that the _Gcb_property enumerators are in the order we encounter them in the data file, instead of sorting them alphabetically. Start with the "Other" property at value 0, because that's the default property for anything not in the file. This makes no practical difference, but seems cleaner. It causes the values in the __gcb_edges table to change, so can only be done now before anybody is using this code yet. The enumerator values and table entries become ABI artefacts for the function using them. contrib/ChangeLog: * unicode/gen_libstdcxx_unicode_data.py: Print out Gcb_property enumerators in the order they're seen, not alphabetical order. libstdc++-v3/ChangeLog: * include/bits/unicode-data.h: Regenerate. * include/bits/unicode.h (_Utf_iterator::operator++()): Fix off by one error. (__incb_property): Add missing check for values before the first edge. (__is_extended_pictographic): Invert return values to fix copy&pasted logic. (_Grapheme_cluster_view::_Iterator): Remove second iterator member and find end of cluster lazily. * testsuite/ext/unicode/grapheme_view.cc: New test. * testsuite/ext/unicode/properties.cc: New test. * testsuite/ext/unicode/view.cc: New test.
2024-01-09Daily bump.GCC Administrator1-0/+7
2024-01-08libstdc++: Add Unicode-aware width estimation for std::formatJonathan Wakely4-2/+3027
This implements the requirements in the following proposals, which dictate how std::format deals with non-ASCII strings: https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2019/p1868r1.html https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2023/p2572r1.html https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2023/p2675r1.pdf There are two parts to this. The width estimation for strings must only count the width of the first character in an extended grapheme cluster. That requires implementing the algorithm for detecting cluster breaks, which requires a number of lookup tables of the grapheme cluster break properties (and Indic_Conjunct_Break and Extended_Pictographic properties) of every code point. Additionally, some characters have a field width of 2, which requires another lookup table of field widths for every code point. The tables added in this commit do not contain entries for every code point from 0 to 0x10FFFF as that would be very inefficient and use too much memory. Instead the tables only contain the code points that form an "edge" for a property, omitting all the code points that have the same property as the preceding one. We can use a binary search to find the closest code point in the table that is not greater than the one we're looking for. The tables are generated by a new Python script added to the contrib/unicode directory, and a new data file downloaded from the Unicode Consortium website. The rules for extended grapheme cluster breaking are implemented for the latest Unicode standard, version 15.1.0. libstdc++-v3/ChangeLog: * include/Makefile.am: Add new headers. * include/Makefile.in: Regenerate. * include/bits/unicode.h: New file. * include/bits/unicode-data.h: New file. * include/std/format: Include <bits/unicode.h>. (__literal_encoding_is_utf8): Move to <bits/unicode.h>. (_Spec::_M_fill): Change type to char32_t. (_Spec::_M_parse_fill_and_align): Read a Unicode scalar value instead of a single character. (__write_padded): Change __fill_char parameter to char32_t and encode it into the output. (__formatter_str::format): Use new __unicode::__field_width and __unicode::__truncate functions. * include/std/ostream: Adjust namespace qualification for __literal_encoding_is_utf8. * include/std/print: Likewise. * src/c++23/print.cc: Add [[unlikely]] attribute to error path. * testsuite/ext/unicode/view.cc: New test. * testsuite/std/format/functions/format.cc: Add missing examples from the standard demonstrating alignment with non-ASCII characters. Add examples checking correct handling of extended grapheme clusters. contrib/ChangeLog: * unicode/README: Add notes about generating libstdc++ tables. * unicode/GraphemeBreakProperty.txt: New file. * unicode/emoji-data.txt: New file. * unicode/gen_libstdcxx_unicode_data.py: New file.
2024-01-06Daily bump.GCC Administrator1-0/+25
2024-01-05contrib: Remove C-style comments from Python filesJonathan Wakely18-18/+18
These Python scripts have "*/" at the end of the license header comment blocks, presumably copy&pasted from C files. contrib/ChangeLog: * analyze_brprob.py: Remove stray text at end of comment. * analyze_brprob_spec.py: Likewise. * check-params-in-docs.py: Likewise. * check_GNU_style.py: Likewise. * check_GNU_style_lib.py: Likewise. * filter-clang-warnings.py: Likewise. * gcc-changelog/git_check_commit.py: Likewise. * gcc-changelog/git_commit.py: Likewise. * gcc-changelog/git_email.py: Likewise. * gcc-changelog/git_repository.py: Likewise. * gcc-changelog/git_update_version.py: Likewise. * gcc-changelog/test_email.py: Likewise. * gen_autofdo_event.py: Likewise. * mark_spam.py: Likewise. * unicode/gen-box-drawing-chars.py: Likewise. * unicode/gen-combining-chars.py: Likewise. * unicode/gen-printable-chars.py: Likewise. * unicode/gen_wcwidth.py: Likewise.
2024-01-05contrib: Add script name to usage error in gen_wcwidth.pyJonathan Wakely1-1/+1
contrib/ChangeLog: * unicode/gen_wcwidth.py: Add sys.argv[0] to usage error.
2024-01-04Daily bump.GCC Administrator1-0/+5
2024-01-03Update copyright years.Jakub Jelinek77-79/+79
2024-01-03Small tweaks for update-copyright.pyJakub Jelinek1-1/+5
update-copyright.py --this-year FAILs on two spots in the modula2 directories. One is gpl_v3_without_node.texi, I think that is similar to other license files which we already exclude from updates. And the other is GmcOptions.cc, which has lines like mcPrintf_printf0 ((const char *) "Copyright ", 10); mcPrintf_printf1 ((const char *) "Copyright (C) %d Free Software Foundation, Inc.\\n", 49, (const unsigned char *) &year, (sizeof (year)-1)); mcPrintf_printf1 ((const char *) "Copyright (C) %d Free Software Foundation, Inc.\\n", 49, (const unsigned char *) &year, (sizeof (year)-1)); which update-copyhright.py obviously can't grok. The file is generated and doesn't contain normal Copyright year which should be updated, so I think it is also ok to skip it. 2024-01-03 Jakub Jelinek <jakub@redhat.com> * update-copyright.py (GenericFilter): Skip gpl_v3_without_node.texi. (GCCFilter): Skip GmcOptions.cc.
2023-12-22Daily bump.GCC Administrator1-0/+5
2023-12-21compare_tests: distinguish c-c++-common results by toolAlexandre Oliva1-3/+3
When compare_tests compares both C and C++ tests in c-c++-common, they get the same identifier, so expected differences in results across languages become undesirably noisy. This patch adds tool identifiers to tests, so that runs by different tools are not confused by the compare logic. It also fixes a bug in reporting differences, that would attempt to print an undefined fname (the definitions are in subshell loops), and adjusts the target insertion to match tabs in addition to blanks after colons. for contrib/ChangeLog * compare_tests: Add tool to test lines. Match tabs besides blanks to insert tool and target. Don't print undefined fname.
2023-12-21Daily bump.GCC Administrator1-0/+4
2023-12-20contrib: add git gcc-style aliasJason Merrill1-0/+5
I thought it could be easier to use check_GNU_style.py. With this alias, 'git gcc-style' will take a git revision as argument instead of a file, or check HEAD if no argument is given. contrib/ChangeLog: * gcc-git-customization.sh: Add git gcc-style alias.
2023-12-15Daily bump.GCC Administrator1-0/+10
2023-12-14libgrust: Add libproc_macro and build systemPierre-Emmanuel Patry1-0/+4
Add some dummy files in libproc_macro along with its build system. libgrust/ChangeLog: * Makefile.am: New file. * Makefile.in: Generate. * configure.ac: New file. * configure: Generate. * aclocal.m4: Generate. * libproc_macro/Makefile.am: New file. * libproc_macro/proc_macro.cc: New file. * libproc_macro/proc_macro.h: New file. * libproc_macro/Makefile.in: Generate. contrib/ChangeLog: * gcc_update: Add libgrust file dependencies. Co-authored-by: Arthur Cohen <arthur.cohen@embecosm.com> Signed-off-by: Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
2023-12-14libgrust: Add entry for maintainersPierre-Emmanuel Patry1-0/+1
ChangeLog: * MAINTAINERS: Add maintainers for libgrust. contrib/ChangeLog: * gcc-changelog/git_commit.py: Add libgrust. Co-authored-by: Arthur Cohen <arthur.cohen@embecosm.com> Signed-off-by: Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
2023-12-14Daily bump.GCC Administrator1-0/+7
2023-12-13download_prerequisites: add --only-gettextArsen Arsenović1-1/+7
contrib/ChangeLog: * download_prerequisites <arg parse>: Parse --only-gettext. (echo_archives): Check only_gettext and stop early if true. (helptext): Document --only-gettext.
2023-12-03Daily bump.GCC Administrator1-0/+7
2023-12-02Tweak language choice in config-list.mkRichard Sandiford1-3/+14
When I tried to use config-list.mk, the build for every triple except the build machine's failed for m2. This is because, unlike other languages, m2 builds target objects during all-gcc. The build will therefore fail unless you have access to an appropriate binutils (or an equivalent). That's quite a big ask for over 100 targets. :) This patch therefore makes m2 an optional inclusion. Doing that wasn't entirely straightforward though. The current configure line includes "--enable-languages=all,...", which means that the "..." can only force languages to be added that otherwise wouldn't have been. (I.e. the only effect of the "..." is to override configure autodetection.) The choice of all,ada and: # Make sure you have a recent enough gcc (with ada support) in your path so # that --enable-werror-always will work. make it clear that lack of GNAT should be a build failure rather than silently ignored. This predates the D frontend, which requires GDC in the same way that Ada requires GNAT. I don't know of a reason why D should be treated differently. The patch therefore expands the "all" into a specific list of languages. That in turn meant that Fortran had to be handled specially, since bpf and mmix don't support Fortran. Perhaps there's an argument that m2 shouldn't build target objects during all-gcc, but (a) it works for practical usage and (b) the patch is an easy workaround. I'd be happy for the patch to be reverted if the build system changes. contrib/ * config-list.mk (OPT_IN_LANGUAGES): New variable. ($(LIST)): Replace --enable-languages=all with a specifc list. Disable fortran on bpf and mmix. Enable the languages in OPT_IN_LANGUAGES.
2023-11-24Daily bump.GCC Administrator1-0/+13
2023-11-24contrib/regression/btest-gcc.sh: Optionally handle XPASS.Hans-Peter Nilsson1-1/+10
Tests with keys that match both PASS, FAIL (or now optionally XPASS), count as fail. XPASSes were previously ignored. Handling them as FAIL seems the most useful alternative, but not counting XPASSes may be deliberate. It's also a matter of compatibility, so make it optional. Attempts to use --handle-xpass-as-fail was previously flagged as a usage error. If you pass it now, on state with previous mixed XPASS and PASS results but doesn't change in this run, the XPASS is discovered as a (new) regression. For new XPASSing tests, it's handled as a new FAIL. * btest-gcc.sh (--handle-xpass-as-fail): New option.
2023-11-24contrib/regression/btest-gcc.sh: Simplify option handling.Hans-Peter Nilsson1-2/+3
* btest-gcc.sh (Option handling): Break out shifts from each option alternative.
2023-11-24contrib/regression/btest-gcc.sh: Handle multiple options.Hans-Peter Nilsson1-7/+10
This is a long-standing bug: passing "-j --add-passes-despite-regression" or "--add-passes-despite-regression -j" caused the second option to be treated as TARGET; the first non-option parameter. * btest-gcc.sh (Option handling): Handle multiple options.
2023-11-15Daily bump.GCC Administrator1-0/+12
2023-11-14libcpp, contrib: Update to Unicode 15.1Jakub Jelinek8-2614/+9011
The following patch (in plaintext just a pseudo-patch where I've left out the too big parts of either wget downloaded or regenerated files out with ..., full patch attached compressed) updates to Unicode 15.1 from 15.0 we had last year. Apparently Unicode forgot to add a new range to 4-8 Table we are using, but from the other files it is clear what should have been added; I've filed a bugreport against Unicode. 2023-11-14 Jakub Jelinek <jakub@redhat.com> contrib/ * unicode/README: Adjust glibc git commit hash, number of Unicode data files to be updated and latest Unicode version. * unicode/from_glibc/utf8_gen.py: Update from glibc. * unicode/UnicodeData.txt: Update from Unicode 15.1. * unicode/EastAsianWidth.txt: Likewise. * unicode/DerivedNormalizationProps.txt: Likewise. * unicode/NameAliases.txt: Likewise. * unicode/DerivedCoreProperties.txt: Likewise. * unicode/PropList.txt: Likewise. libcpp/ * makeucnid.cc (write_copyright): Update copyright year. * makeuname2c.cc (write_copyright): Likewise. (struct generated): Update latest Unicode version. (generated_ranges): Add 2ebf0-2ee5d CJK UNIFIED IDEOGRAPH range which was forgotten to be added to 4-8 table, but clearly is expected to be there from the 15.1 additions. * ucnid.h: Regenerated. * uname2c.h: Regenerated. * generated_cpp_wcwidth.h: Regenerated.
2023-11-14Daily bump.GCC Administrator1-0/+11
2023-11-14contrib: Ignore the r14-5312-g040e5b0edbca861196d9e2ea2af5e805769c8d5d bogus ↵Jakub Jelinek1-1/+2
commit The r14-5312-g040e5b0edbca861196d9e2ea2af5e805769c8d5d commit log contains a line from git revert with correct hash, but unfortunately hand ammended with explanation, so it got through the pre-commit hook but failed during update_version_git generation. Please don't do this. 2023-11-14 Jakub Jelinek <jakub@redhat.com> contrib/ChangeLog: * gcc-changelog/git_update_version.py: Add 040e5b0edbca861196d9e2ea2af5e805769c8d5d to ignored commits.
2023-11-14*: add modern gettextArsen Arsenović3-0/+4
This patch updates gettext.m4 and related .m4 files and adds gettext-runtime as a gmp/mpfr/... style host library, allowing newer libintl to be used. This patch /does not/ add build-time tools required for internationalizing (msgfmt et al), instead, it just updates the runtime library. The result should be a distribution that acts exactly the same when a copy of gettext is present, and disables internationalization otherwise. There should be no changes in behavior when gettext is included in-tree. When gettext is not included in tree, nor available on the system, the programs will be built without localization. ChangeLog: PR bootstrap/12596 * .gitignore: Add '/gettext*'. * configure.ac (host_libs): Replace intl with gettext. (hbaseargs, bbaseargs, baseargs): Split baseargs into {h,b}baseargs. (skip_barg): New flag. Skips appending current flag to bbaseargs. <library exemptions>: Exempt --with-libintl-{type,prefix} from target and build machine argument passing. * configure: Regenerate. * Makefile.def (host_modules): Replace intl module with gettext module. (configure-ld): Depend on configure-gettext. * Makefile.in: Regenerate. config/ChangeLog: * intlmacosx.m4: Import from gettext-0.22 (serial 8). * gettext.m4: Sync with gettext-0.22 (serial 77). * gettext-sister.m4 (ZW_GNU_GETTEXT_SISTER_DIR): Load gettext's uninstalled-config.sh, or call AM_GNU_GETTEXT if missing. * iconv.m4: Sync with gettext-0.22 (serial 26). contrib/ChangeLog: * prerequisites.sha512: Add gettext. * prerequisites.md5: Add gettext. * download_prerequisites: Add gettext. gcc/ChangeLog: * configure: Regenerate. * aclocal.m4: Regenerate. * Makefile.in (LIBDEPS): Remove (potential) ./ prefix from LIBINTL_DEP. * doc/install.texi: Document new (notable) flags added by the optional gettext tree and by AM_GNU_GETTEXT. Document libintl/libc with gettext dependency. libcpp/ChangeLog: * configure: Regenerate. * aclocal.m4: Regenerate. libstdc++-v3/ChangeLog: * configure: Regenerate.
2023-10-06Daily bump.GCC Administrator1-0/+19
2023-10-05contrib: add mdcompactAndrea Corallo16-0/+600
Hello all, this patch checks in mdcompact, the tool written in elisp that I used to mass convert all the multi choice pattern in the aarch64 back-end to the new compact syntax. I tested it on Emacs 29 (might run on older versions as well not sure), also I verified it runs cleanly on a few other back-ends (arm, loongarch). The tool can be used to convert a single pattern, an open buffer or all md files in a directory. The tool might need further adjustment to run on some specific back-end, in case very happy to help. This patch was pre-approved here [1]. Best Regards Andrea Corallo [1] <https://gcc.gnu.org/pipermail/gcc-patches/2023-October/631830.html> contrib/ChangeLog * mdcompact/mdcompact-testsuite.el: New file. * mdcompact/mdcompact.el: Likewise. * mdcompact/tests/1.md: Likewise. * mdcompact/tests/1.md.out: Likewise. * mdcompact/tests/2.md: Likewise. * mdcompact/tests/2.md.out: Likewise. * mdcompact/tests/3.md: Likewise. * mdcompact/tests/3.md.out: Likewise. * mdcompact/tests/4.md: Likewise. * mdcompact/tests/4.md.out: Likewise. * mdcompact/tests/5.md: Likewise. * mdcompact/tests/5.md.out: Likewise. * mdcompact/tests/6.md: Likewise. * mdcompact/tests/6.md.out: Likewise. * mdcompact/tests/7.md: Likewise. * mdcompact/tests/7.md.out: Likewise.
2023-10-04Daily bump.GCC Administrator1-0/+5
2023-10-03contrib/mklog.py: Fix issues reported by flake8Martin Jambor1-1/+2
The testing infrastructure built by Martin Liška contains checking a few python scripts in contrib witha tool flake8. That tool recently complains that: contrib/mklog.py:360:45: E711 comparison to None should be 'if cond is None:' contrib/mklog.py:362:1: E305 expected 2 blank lines after class or function definition, found 1 I'd like to silence these with the following, hopefully trivial, changes. However, I have only tested the changes by running flake8 again and running ./contrib/mklog.py --help. Is this good for trunk? (Or should I stop using flake8 instead?) Thanks, Martin contrib/ChangeLog: 2023-10-03 Martin Jambor <mjambor@suse.cz> * mklog.py (skip_line_in_changelog): Compare to None using is instead of ==, add an extra newline after the function.
2023-10-03Daily bump.GCC Administrator1-0/+6
2023-10-02contrib: Update Darwin entries in config-list.mkIain Sandoe1-7/+9
This list was out of date, and included cases that are not well-supported for cross-compilers. This updates the list to bracket the range of OS versions we support and to drop one earlier case where GCC will no longer build with native tools. contrib/ChangeLog: * config-list.mk: Add newer Darwin versions, trim one older. Remove cases with no OS version, which is not supported for cross- compilers. Signed-off-by: Iain Sandoe <iain@sandoe.co.uk>
2023-09-30Daily bump.GCC Administrator1-0/+9
2023-09-29check_GNU_style.py: Skip .md square bracket lintingPatrick O'Neill1-0/+3
This testcase causes lots of false-positives for machine description files. contrib/ChangeLog: * check_GNU_style_lib.py: Skip machine description file bracket linting. Signed-off-by: Patrick O'Neill <patrick@rivosinc.com>
2023-09-29Harmonize headers between both dg-extract-results scriptsPaul Iannetta2-2/+2
The header of the python version looked like: Target is ... Host is ... The header of the bash version looked like: Test run by ... on ... Target is ... After this change both headers look like: Test run by ... on ... Target is ... Host is ... The order of the tests is not the same but since dg-cmp-results.sh it does not matter much. contrib/ChangeLog: * dg-extract-results.py: Print the "Test run" line. * dg-extract-results.sh: Print the "Host" line.
2023-09-13Daily bump.GCC Administrator1-0/+5
2023-09-12contrib: Quote variable in test expression [PR111360]Jonathan Wakely1-1/+1
Without the quotes some shells will always return true and some will print an error. It should be quoted so that a null variable works as intended. contrib/ChangeLog: PR other/111360 * gcc_update: Quote variable.
2023-09-12Daily bump.GCC Administrator1-0/+6
2023-09-11contrib: Check if getent is available in git setup script [PR111359]Jonathan Wakely1-1/+5
contrib/ChangeLog: PR other/111359 * gcc-git-customization.sh: Check for getent before using it. Use id on macOS.
2023-09-08Update contrib + libgomp ChangeLogs for failed reject-commit testingTobias Burnus1-0/+19
The following commit should have enabled checking for invalid revert hashes; it worked locally - but did work as pre-commit hook on sourceware as it wasn't copied to the hook directory: r14-3777-gff20bce9f58 contrib/gcc-changelog: Check whether revert-commit exists Hence, the following revert commit was wrongly applied: r14-3778-gfbbd9001e9b Revert "contrib/gcc-changelog: Check whether revert-commit exists" (In this commit: contrib/ChangeLog update for the revert.) r14-3779-g69e83181ebc contrib/gcc-changelog: Check whether revert-commit exists Re-applied the commit with a commit-log typo fixed but missing a late commit. r14-3780-g1b0934b7276 Revert "contrib/gcc-changelog: Check whether revert-commit exists" This commit still came through but re-instated the late wording fix in contrib/gcc-changelog/git_commit.py. (In this commit: contrib/ChangeLog update for the wording change.) r14-3781-gd22cd7745ff Revert: "Another revert test with a bogus hash" Another attempt to get a reject, but it still came through. It removed tailing whitespace in libgomp/target.c (In this commit: libgomp/ChangeLog was for the whitespace removal.)
2023-09-08Daily bump.GCC Administrator1-0/+22
2023-09-07Revert "contrib/gcc-changelog: Check whether revert-commit exists"Tobias Burnus1-2/+2
This reverts commit ffffffffffffffffffffffffffffffffffffffff. This checks whether the pre-commit hook of the mentioned commit triggers and rejects this commit due to the bogus commit hash. This commit actually does not revert that patch but fixes that patch as 'technically' was accidently re-added in the second commit.
2023-09-07contrib/gcc-changelog: Check whether revert-commit existsTobias Burnus2-7/+16
This is the identical (except for a ChangeLog typo) to commit r14-3777-gff20bce9f5879878f352f1fcd6ade023a2067598 It reverts the test revert in commit r14-3778-gfbbd9001e9b6f2c59b542cc53a8f9183514091ce which has a bogus commit hash and should have been rejected, but we missed that - before testing - the script had to be manually copied to the right place on sourceware to be affective as pre-commit hook. Thus, the r14-3777 commit had to be reinstate by this commit ... contrib/ChangeLog: * gcc-changelog/git_commit.py (GitCommit.__init__): Handle commit_to_info_hook = None; otherwise, if None, regard it as error. (to_changelog_entries): Handle commit_to_info_hook = None; if info is None, create a warning for it. * gcc-changelog/git_email.py (GitEmail.__init__): call super() with commit_to_info_hook=None instead of a lambda function.
2023-09-07Revert "contrib/gcc-changelog: Check whether revert-commit exists"Tobias Burnus2-16/+7
This reverts commit ffffffffffffffffffffffffffffffffffffffff.