From Fedora Project Wiki
(Handling false positives)
(Common autoconf issues)
Line 24: Line 24:


There is currently no way to record exceptions for implicit ints, only for implicit function declarations. The instrumented GCC compiler contains changes that avoid spurious implicit int diagnostics for common erroneous constructs.
There is currently no way to record exceptions for implicit ints, only for implicit function declarations. The instrumented GCC compiler contains changes that avoid spurious implicit int diagnostics for common erroneous constructs.
== Common autoconf issues ==
Over the years, many C99 compatibility fixes have been applied to the autoconf package, fixing issues in generated `configure` scripts. It is not always possible to run the `autoconf` tool during the Fedora build, so patching the generated scripts may be necessary. Some of the standard issues can be patched using this script:
* https://gitlab.com/fweimer-rh/fedora-modernc-tools/-/blob/main/rewrite-configure.lua
If the generated configure script (or the generated `aclocal.m4` file) only contains issues that go away when re-running `autoconf` (or `autoreconf`), then there is no need to upstream these changes.
If it is necessary to inhibit running `autoconf` or `automake` during the build, use a construct like this in the `%prep` section after applying the patches:
<pre>
touch -r aclocal.m4 configure*
</pre>
Older autoconf versions are available in this COPR repository:
* https://copr.fedorainfracloud.org/coprs/jwakely/autotools-gcc/
But for anything pre-dating 2.69, it is probably necessary to patch the generated shell code manually because it will be difficult to find a matching autoconf version.

Revision as of 11:31, 12 January 2023

Procedures for Modern C Porting

Choosing packages to work on

Clone the fedora-modernc-logs repository and pick a log file to work on at random:

git ls-files logs | sort -R | head -n1

At present, there are so many packages left that this is not likely to create a collision and duplicated work.

Recording work

  • Delete the log file in the fedora-modernc-logs repository.
  • Add a markdown documentation file to the fedora-modernc repository. Include the Fedora bug if applicable. Always include a link to the Fedora dist-git commit. Please add link titles to external links.

Handling false positives

It is important to record exceptions so that further mass-prebuilds with the instrumented compilers do not show the same set of known false positives.

There is currently no way to record exceptions for implicit ints, only for implicit function declarations. The instrumented GCC compiler contains changes that avoid spurious implicit int diagnostics for common erroneous constructs.

Common autoconf issues

Over the years, many C99 compatibility fixes have been applied to the autoconf package, fixing issues in generated configure scripts. It is not always possible to run the autoconf tool during the Fedora build, so patching the generated scripts may be necessary. Some of the standard issues can be patched using this script:

If the generated configure script (or the generated aclocal.m4 file) only contains issues that go away when re-running autoconf (or autoreconf), then there is no need to upstream these changes.

If it is necessary to inhibit running autoconf or automake during the build, use a construct like this in the %prep section after applying the patches:

touch -r aclocal.m4 configure*

Older autoconf versions are available in this COPR repository:

But for anything pre-dating 2.69, it is probably necessary to patch the generated shell code manually because it will be difficult to find a matching autoconf version.