Differences between revisions 21 and 22
Revision 21 as of 2014-06-30 23:16:22
Size: 6104
Comment:
Revision 22 as of 2014-08-09 07:28:11
Size: 6136
Editor: AllanMcRae
Comment:
Deletions are marked like this. Additions are marked like this.
Line 29: Line 29:
 * {{{INSTALL}}} is generated by makeinfo; run {{{make INSTALL}}} to regenerate it.  * {{{INSTALL}}} is generated by makeinfo; run {{{make INSTALL}}} to regenerate it. Currently we use texinfo v4.13.

Regenerating and updating upstream files

Some files checked in to the glibc repository are not maintained directly as source code in glibc. These are files imported verbatim from elsewhere, or generated files where we don't require the generator (for example, Autoconf for regenerating configure scripts) or its run-time dependencies (for example, Perl for regenerating C-translit.h) to be available when building glibc, or when regeneration of such a file is unusually slow. There are no files in glibc-ports that are imported verbatim from elsewhere; glibc-ports contains generated configure scripts, ABI baselines and libm-test-ulps files.

  • The following come verbatim from upstream and should not be modified locally: scripts/config.guess, scripts/config.sub, scripts/install-sh, scripts/mkinstalldirs, scripts/move-if-change, manual/texinfo.tex. New versions may be updated verbatim from their upstream sources (in the case of manual/texinfo.tex, it may also be necessary to remove trailing whitespace).

  • The following license texts also come verbatim from upstream: COPYING, COPYING.LIB, manual/fdl-1.3.texi, manual/lgpl-2.1.texi. Any license changes should be discussed by the FSF-appointed maintainers (the Steering Committee) and the FSF.

  • configure scripts, including fragments in many subdirectories, are generated by autoconf. All should be generated using the same autoconf version (currently 2.68).

    • When regenerating glibc's configure you can simply run autoconf from the top-level directory.

    • When regenerating a port's configure you can run autoconf -I<path to glibc src> from the directory that contains the port's configure.ac fragment. Alternatively you can run autoconf /path/to/ports/configure.ac > /path/to/ports/configure from the top-level glibc directory.

    • Bulk regeneration can be done from the top-level glibc source directory with:
      • for i in `find -L . -name 'configure.ac'`; do echo "autoconf -I. $i > ${i%.ac}"; done;

      Review the output, and then run each command by hand. Revert any changes that add newlines to the end of files.
  • locale/programs/charmap-kw.h and locale/programs/locfile-kw.h are generated by gperf.

  • locale/C-translit.h is generated from locale/C-translit.h.in.

  • intl/plural.c is generated by bison. It may be necessary to remove trailing whitespace after regeneration.

  • INSTALL is generated by makeinfo; run make INSTALL to regenerate it. Currently we use texinfo v4.13.

  • sysdeps/gnu/errlist.c is generated from manual/errno.texi by make sysdeps/gnu/errlist.c, and sysdeps/mach/hurd/bits/errno.h from manual/errno.texi and other files.

  • po/libc.pot is generated by gettext. Regeneration of po/libc.pot assumes that you have symlinked glibc-ports as ports under the main source tree. To regenerate it, run the following from the root of the object directory:

    make -r PARALLELMFLAGS="" -C <path to glibc srcdir>/po objdir=`pwd` libc.pot
    • po/*.po are maintained upstream by the translation teams and should not be modified locally. New versions may be found at the Translation Project site.

  • ABI baselines exist for each machine as *.abilist files within the machine directories. Run "make check-abi" for your architecture/ABI, make sure any changes to the ABI baselines are desirable and update the baselines using "make update-abi update-abi-config=REGEXP" with REGEXP being taken from the existing baselines.

    • When generating ABI baselines from scratch you must create empty *.abilist files in the source tree and those will act as your initial baseline. All of the ABI tests will fail but they will generate *.symlist files in the build directory which you can copy, edit, and verify, eventually replacing your *.abilist files as the final baselines. You will be comparing against as many past releases as possible to ensure the ABI is correct.

  • Some files come from gettext, libidn or GMP upstream but may also be changed locally in glibc. The procedures for updating these files locally are not well-documented and FSF approval may sometimes be needed to use a newer version under LGPLv2.1+.

Math files

See the Math section of the manual for some background details.

libm-test-ulps

This base line file can be semi-automatically updated. You can do either of the following:

  • Run make regen-ulps to merge the existing file with all new test results. Copy the resulting NewUlps file to the target ULPs file as indicated by the printed instructions.

  • Run a specific tests (test-float, test-double, etc.) with the -u flag (e.g. ./testrun.sh math/test-double -u; see Testing/Builds for more details). This will generate a file called ULPs which you can manually merge into the existing libm-test-ulps file. Then run gen-libm-test.pl -n -u FILE to produce a NewUlps which is the new sorted version of libm-test-ulps.

In either case, you will need to watch out for:

  • Old test results. The automatic steps will merge new stuff with the existing results, but won't trim out old stuff. Normally you'd truncate the libm-test-ulps (or just delete the results for the specific test/function you're updating) before automatically generating it, and then review the final diff to make sure nothing unusual crops up.

  • ULPs don't automatically shrink, just grow. If the new ULPs results are larger than the previously recorded values, the test results will be updated to reflect the new value. But if the ULPs results are smaller, the old test results are used instead. The same truncation method (see "Old test results" above) should help here.

None: Regeneration (last edited 2014-08-09 07:28:11 by AllanMcRae)