about summary refs log tree commit diff
path: root/Makeconfig
Commit message (Collapse)AuthorAgeFilesLines
* Update copyright dates with scripts/update-copyrightsPaul Eggert2024-01-011-1/+1
|
* crypt: Remove libcrypt supportAdhemerval Zanella2023-10-301-5/+0
| | | | | | | | | | | | | | | | | | All the crypt related functions, cryptographic algorithms, and make requirements are removed, with only the exception of md5 implementation which is moved to locale folder since it is required by localedef for integrity protection (libc's locale-reading code does not check these, but localedef does generate them). Besides thec code itself, both internal documentation and the manual is also adjusted. This allows to remove both --enable-crypt and --enable-nss-crypt configure options. Checked with a build for all affected ABIs. Co-authored-by: Zack Weinberg <zack@owlfolio.org> Reviewed-by: Carlos O'Donell <carlos@redhat.com>
* Remove 'shadow' and merge into 'nss'Arjun Shankar2023-10-241-1/+1
| | | | | | | | The majority of shadow routines are entry points for nss functionality. This commit removes the 'shadow' subdirectory and moves all functionality and tests to 'nss'. References to shadow/ are accordingly changed. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
* Remove 'pwd' and merge into 'nss'Arjun Shankar2023-10-241-1/+1
| | | | | | | The majority of pwd routines are entry points for nss functionality. This commit removes the 'pwd' subdirectory and moves all functionality and tests to 'nss'. References to pwd/ are accordingly changed. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
* Remove 'gshadow' and merge into 'nss'Arjun Shankar2023-10-241-1/+1
| | | | | | | | The majority of gshadow routines are entry points for nss functionality. This commit removes the 'gshadow' subdirectory and moves all functionality and tests to 'nss'. References to gshadow/ are accordingly changed. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
* Remove 'grp' and merge into 'nss' and 'posix'Arjun Shankar2023-10-241-1/+1
| | | | | | | | | | | | | | The majority of grp routines are entry points for nss functionality. This commit removes the 'grp' subdirectory and moves all nss-relevant functionality and all tests to 'nss', and the 'setgroups' stub into 'posix' (alongside the 'getgroups' stub). References to grp/ are accordingly changed. In addition, compat-initgroups.c, a fallback implementation of initgroups is renamed to initgroups-fallback.c so that the build system does not confuse it for nss_compat/compat-initgroups.c. Build time improves very slightly; e.g. down from an average of 45.5s to 44.5s on an 8-thread mobile x86_64 CPU. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
* configure: Add -Wall again to the default CFLAGSFlorian Weimer2023-08-151-1/+1
| | | | | | | Commit 78ceef25d64efeeb6067d1cb282a00466e637e2a ("configure: Remove --enable-all-warnings option") removed it due to a missing +. Reviewed-by: Siddhesh Poyarekar <siddhesh@sourceware.org>
* configure: Remove --enable-all-warnings optionAdhemerval Zanella Netto2023-08-011-6/+1
| | | | | | | | The option is not activelly tested and has bitrotten, to fix it would require a lot of work and multiple fixes. A better option would to evaluate each option and enable the warning if it makes sense. Reviewed-by: Siddhesh Poyarekar <siddhesh@sourceware.org>
* Allow glibc to be built with _FORTIFY_SOURCEFrédéric Bérat2023-07-051-3/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Add --enable-fortify-source option. It is now possible to enable fortification through a configure option. The level may be given as parameter, if none is provided, the configure script will determine what is the highest level possible that can be set considering GCC built-ins availability and set it. If level is explicitly set to 3, configure checks if the compiler supports the built-in function necessary for it or raise an error if it isn't. If the configure option isn't explicitly enabled, it _FORTIFY_SOURCE is forcibly undefined (and therefore disabled). The result of the configure checks are new variables, ${fortify_source} and ${no_fortify_source} that can be used to appropriately populate CFLAGS. A dedicated patch will follow to make use of this variable in Makefiles when necessary. Updated NEWS and INSTALL. Adding dedicated x86_64 variant that enables the configuration. Reviewed-by: Siddhesh Poyarekar <siddhesh@sourceware.org>
* Remove --enable-tunables configure optionAdhemerval Zanella Netto2023-03-291-7/+2
| | | | | | | | | | | | And make always supported. The configure option was added on glibc 2.25 and some features require it (such as hwcap mask, huge pages support, and lock elisition tuning). It also simplifies the build permutations. Changes from v1: * Remove glibc.rtld.dynamic_sort changes, it is orthogonal and needs more discussion. * Cleanup more code. Reviewed-by: Siddhesh Poyarekar <siddhesh@sourceware.org>
* Update copyright dates with scripts/update-copyrightsJoseph Myers2023-01-061-1/+1
|
* nis: Build libnsl with 64 bit time_tAdhemerval Zanella Netto2022-12-091-1/+1
| | | | | And remove the usage of glibc reserved names. Reviewed-by: DJ Delorie <dj@redhat.com>
* Remove lingering libSegfault Makefile entriesAdhemerval Zanella2022-10-261-2/+2
| | | | The library was removed by 65ccd641ba.
* Makerules: fix MAKEFLAGS assignment for upcoming make-4.4 [BZ# 29564]Sergei Trofimovich2022-09-131-1/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | make-4.4 will add long flags to MAKEFLAGS variable: * WARNING: Backward-incompatibility! Previously only simple (one-letter) options were added to the MAKEFLAGS variable that was visible while parsing makefiles. Now, all options are available in MAKEFLAGS. This causes locale builds to fail when long options are used: $ make --shuffle ... make -C localedata install-locales make: invalid shuffle mode: '1662724426r' The change fixes it by passing eash option via whitespace and dashes. That way option is appended to both single-word form and whitespace separated form. While at it fixed --silent mode detection in $(MAKEFLAGS) by filtering out --long-options. Otherwise options like --shuffle flag enable silent mode unintentionally. $(silent-make) variable consolidates the checks. Resolves: BZ# 29564 CC: Paul Smith <psmith@gnu.org> CC: Siddhesh Poyarekar <siddhesh@gotplt.org> Signed-off-by: Sergei Trofimovich <slyich@gmail.com> Reviewed-by: Siddhesh Poyarekar <siddhesh@sourceware.org>
* Makeconfig: Set pie-ccflag to -fPIE by default [BZ# 29514]Richard Henderson2022-08-291-1/+1
| | | | | | | | | | | | We should default to the larger code model, in order to support larger applications built with -static -pie. This should be consistent with pic-ccflag, which defaults to -fPIC. Remove the now redundant override from sysdeps/sparc/Makefile. Note that -fno-pie and -fno-PIE have the same effect. Reviewed-by: Carlos O'Donell <carlos@redhat.com> Tested-by: Carlos O'Donell <carlos@redhat.com>
* Remove ldd libc4 supportAdhemerval Zanella2022-08-041-2/+2
| | | | The older libc versions are obsolete for over twenty years now.
* Enable DT_RELR in glibc shared libraries and PIEs automaticallyH.J. Lu2022-05-181-0/+12
| | | | | | Enable DT_RELR in glibc shared libraries and position independent executables (PIE) automatically if linker supports -z pack-relative-relocs. Reviewed-by: Florian Weimer <fweimer@redhat.com>
* stdio: Remove the usage of $(fno-unit-at-a-time) for errlist.cAdhemerval Zanella2022-05-131-1/+2
| | | | | | | | | | | | | | | | | | The errlist.c is built with -fno-toplevel-reorder to avoid compiler to reorder the compat assembly directives due an assembler issue [1] (fixed on 2.39). This patch removes the compiler flags by split the compat symbol generation in two phases. First the _sys_errlist_internal internal without any compat symbol directive is preprocessed to generate an assembly source code. This generate assembly is then used as input on a platform agnostic errlist-data.S which then creates the compat definitions. This prevents compiler to move any compat directive prior the _sys_errlist_internal definition itself. Checked on a make check run-built-tests=no on all affected ABIs. [1] https://sourceware.org/bugzilla/show_bug.cgi?id=29012
* Do not use --hash-style=both for building glibc shared objectsFlorian Weimer2022-04-291-9/+0
| | | | | | | | The comment indicates that --hash-style=both was used to maintain compatibility with static dlopen, but we had many internal ABI changes since then, so this compatiblity does not add value anymore. Reviewed-by: Carlos O'Donell <carlos@redhat.com>
* Remove -z combreloc and HAVE_Z_COMBRELOCFangrui Song2022-04-041-8/+2
| | | | | | | | | | | | | -z combreloc has been the default regadless of the architecture since binutils commit f4d733664aabd7bd78c82895e030ec9779a92809 (2002). The configure check added in commit fdde83499a05 (2001) has long been unneeded. We can therefore treat HAVE_Z_COMBRELOC as always 1 and delete dead code paths in dl-machine.h files (many were copied from commit a711b01d34ca and ee0cb67ec238). Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
* Add and use link-test-modules-rpath-link [BZ #28455]H.J. Lu2022-01-241-0/+2
| | | | | | | | | | | | | DT_RUNPATH is only used to find the immediate dependencies of the executable or shared object containing the DT_RUNPATH entry: 1. Define link-test-modules-rpath-link if $(build-hardcoded-path-in-tests) is yes. 2. Use $(link-test-modules-rpath-link) in build-module-helper so that test modules can dlopen modules with DT_RUNPATH. 3. Add a test to show why link-test-modules-rpath-link is needed. This partially fixes BZ #28455.
* Generate gcc-macros.hFlorian Weimer2022-01-141-0/+9
| | | | | | | | The file can be used to check the effect of the default compiler flags on code generation even in areas of the build that uses non-default compiler flags. Reviewed-by: H.J. Lu <hjl.tools@gmail.com>
* Do not build libresolv module with 64 bit time_t flagsAdhemerval Zanella2022-01-121-1/+1
| | | | | | | It is not used to build installed programs. It also fixes resolv/tst-p_secstodate on big endian machines. Checked on i686-linux-gnu and powerpc-linux-gnu-power4.
* Update copyright dates with scripts/update-copyrightsPaul Eggert2022-01-011-1/+1
| | | | | | | | | | | | | | | | | | | | | | | 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 7061 files FOO. I then removed trailing white space from math/tgmath.h, support/tst-support-open-dev-null-range.c, and sysdeps/x86_64/multiarch/strlen-vec.S, to work around the following obscure pre-commit check failure diagnostics from Savannah. I don't know why I run into these diagnostics whereas others evidently do not. remote: *** 912-#endif remote: *** 913: remote: *** 914- remote: *** error: lines with trailing whitespace found ... remote: *** error: sysdeps/unix/sysv/linux/statx_cp.c: trailing lines
* Fix The GNU ToolChain Authors copyright noticeSiddhesh Poyarekar2021-12-171-1/+1
| | | | | | | | | | | I (and maybe one or two others) added a (C) to the copyright notice regardless of the contribution checklist[1] not mentioning it. Fix all these instances so that the notice reads as "Copyright The GNU Toolchain Authors" across the source code. [1] https://sourceware.org/glibc/wiki/Contribution%20checklist Signed-off-by: Siddhesh Poyarekar <siddhesh@sourceware.org>
* Use LFS and 64 bit time for installed programs (BZ #15333)Adhemerval Zanella2021-12-151-2/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The installed programs are built with a combination of different values for MODULE_NAME, as below. To enable both Long File Support and 64 bt time, -D_TIME_BITS=64 -D_FILE_OFFSET_BITS=64 is added for nonlibi, nscd, lddlibc4, libresolv, ldconfig, locale_programs, iconvprogs, libnss_files, libnss_compat, libnss_db, libnss_hesiod, libutil, libpcprofile, and libSegFault. nscd/nscd nscd/nscd.o MODULE_NAME=nscd nscd/connections.o MODULE_NAME=nscd nscd/pwdcache.o MODULE_NAME=nscd nscd/getpwnam_r.o MODULE_NAME=nscd nscd/getpwuid_r.o MODULE_NAME=nscd nscd/grpcache.o MODULE_NAME=nscd nscd/getgrnam_r.o MODULE_NAME=nscd nscd/getgrgid_r.o MODULE_NAME=nscd nscd/hstcache.o MODULE_NAME=nscd nscd/gethstbyad_r.o MODULE_NAME=nscd nscd/gethstbynm3_r.o MODULE_NAME=nscd nscd/getsrvbynm_r.o MODULE_NAME=nscd nscd/getsrvbypt_r.o MODULE_NAME=nscd nscd/servicescache.o MODULE_NAME=nscd nscd/dbg_log.o MODULE_NAME=nscd nscd/nscd_conf.o MODULE_NAME=nscd nscd/nscd_stat.o MODULE_NAME=nscd nscd/cache.o MODULE_NAME=nscd nscd/mem.o MODULE_NAME=nscd nscd/nscd_setup_thread.o MODULE_NAME=nscd nscd/xmalloc.o MODULE_NAME=nscd nscd/xstrdup.o MODULE_NAME=nscd nscd/aicache.o MODULE_NAME=nscd nscd/initgrcache.o MODULE_NAME=nscd nscd/gai.o MODULE_NAME=nscd nscd/res_hconf.o MODULE_NAME=nscd nscd/netgroupcache.o MODULE_NAME=nscd nscd/cachedumper.o MODULE_NAME=nscd elf/lddlibc4 elf/lddlibc4 MODULE_NAME=lddlibc4 elf/pldd elf/pldd.o MODULE_NAME=nonlib elf/xmalloc.o MODULE_NAME=nonlib elf/sln elf/sln.o MODULE_NAME=nonlib elf/static-stubs.o MODULE_NAME=nonlib elf/sprof MODULE_NAME=nonlib elf/ldconfig elf/ldconfig.o MODULE_NAME=ldconfig elf/cache.o MODULE_NAME=nonlib elf/readlib.o MODULE_NAME=nonlib elf/xmalloc.o MODULE_NAME=nonlib elf/xstrdup.o MODULE_NAME=nonlib elf/chroot_canon.o MODULE_NAME=nonlib elf/static-stubs.o MODULE_NAME=nonlib elf/stringtable.o MODULE_NAME=nonlib io/pwd io/pwd.o MODULE_NAME=nonlib locale/locale locale/locale.o MODULE_NAME=locale_programs locale/locale-spec.o MODULE_NAME=locale_programs locale/charmap-dir.o MODULE_NAME=locale_programs locale/simple-hash.o MODULE_NAME=locale_programs locale/xmalloc.o MODULE_NAME=locale_programs locale/xstrdup.o MODULE_NAME=locale_programs locale/record-status.o MODULE_NAME=locale_programs locale/xasprintf.o MODULE_NAME=locale_programs locale/localedef locale/localedef.o MODULE_NAME=locale_programs locale/ld-ctype.o MODULE_NAME=locale_programs locale/ld-messages.o MODULE_NAME=locale_programs locale/ld-monetary.o MODULE_NAME=locale_programs locale/ld-numeric.o MODULE_NAME=locale_programs locale/ld-time.o MODULE_NAME=locale_programs locale/ld-paper.o MODULE_NAME=locale_programs locale/ld-name.o MODULE_NAME=locale_programs locale/ld-address.o MODULE_NAME=locale_programs locale/ld-telephone.o MODULE_NAME=locale_programs locale/ld-measurement.o MODULE_NAME=locale_programs locale/ld-identification.o MODULE_NAME=locale_programs locale/ld-collate.o MODULE_NAME=locale_programs locale/charmap.o MODULE_NAME=locale_programs locale/linereader.o MODULE_NAME=locale_programs locale/locfile.o MODULE_NAME=locale_programs locale/repertoire.o MODULE_NAME=locale_programs locale/locarchive.o MODULE_NAME=locale_programs locale/md5.o MODULE_NAME=locale_programs locale/charmap-dir.o MODULE_NAME=locale_programs locale/simple-hash.o MODULE_NAME=locale_programs locale/xmalloc.o MODULE_NAME=locale_programs locale/xstrdup.o MODULE_NAME=locale_programs locale/record-status.o MODULE_NAME=locale_programs locale/xasprintf.o MODULE_NAME=locale_programs catgets/gencat catgets/gencat.o MODULE_NAME=nonlib catgets/xmalloc.o MODULE_NAME=nonlib nss/makedb nss/makedb.o MODULE_NAME=nonlib nss/xmalloc.o MODULE_NAME=nonlib nss/hash-string.o MODULE_NAME=nonlib nss/getent nss/getent.o MODULE_NAME=nonlib posix/getconf posix/getconf.o MODULE_NAME=nonlib login/utmpdump login/utmpdump.o MODULE_NAME=nonlib debug/pcprofiledump debug/pcprofiledump.o MODULE_NAME=nonlib timezone/zic timezone/zic.o MODULE_NAME=nonlib timezone/zdump timezone/zdump.o MODULE_NAME=nonlib iconv/iconv_prog iconv/iconv_prog.o MODULE_NAME=nonlib iconv/iconv_charmap.o MODULE_NAME=iconvprogs iconv/charmap.o MODULE_NAME=iconvprogs iconv/charmap-dir.o MODULE_NAME=iconvprogs iconv/linereader.o MODULE_NAME=iconvprogs iconv/dummy-repertoire.o MODULE_NAME=iconvprogs iconv/simple-hash.o MODULE_NAME=iconvprogs iconv/xstrdup.o MODULE_NAME=iconvprogs iconv/xmalloc.o MODULE_NAME=iconvprogs iconv/record-status.o MODULE_NAME=iconvprogs iconv/iconvconfig iconv/iconvconfig.o MODULE_NAME=nonlib iconv/strtab.o MODULE_NAME=iconvprogs iconv/xmalloc.o MODULE_NAME=iconvprogs iconv/hash-string.o MODULE_NAME=iconvprogs nss/libnss_files.so MODULE_NAME=libnss_files nss/libnss_compat.so.2 MODULE_NAME=libnss_compat nss/libnss_db.so MODULE_NAME=libnss_db hesiod/libnss_hesiod.so MODULE_NAME=libnss_hesiod login/libutil.so MODULE_NAME=libutil debug/libpcprofile.so MODULE_NAME=libpcprofile debug/libSegFault.so MODULE_NAME=libSegFault Also, to avoid adding both LFS and 64 bit time support on internal tests they are moved to a newer 'testsuite-internal' module. It should be similar to 'nonlib' regarding internal definition and linking namespace. This patch also enables LFS and 64 bit support of libsupport container programs (echo-container, test-container, shell-container, and true-container). Checked on x86_64-linux-gnu and i686-linux-gnu. Reviewed-by: DJ Delorie <dj@redhat.com>
* Replace --enable-static-pie with --disable-default-pieSiddhesh Poyarekar2021-12-131-7/+14
| | | | | | | | | | | | | | | | | | | | | | | | 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>
* Remove the unused +mkdep/+make-deps/s-proto.S/s-proto-cancel.SH.J. Lu2021-11-101-7/+0
| | | | | | | | | | | | | | | Since commit d73f5331ce5370ca5a879229e3842f5de98689cd Author: Roland McGrath <roland@gnu.org> Date: Fri May 2 02:20:45 2003 +0000 2003-05-01 Roland McGrath <roland@redhat.com> dependency is generated by passing -MD -MF to compiler. Remove the unused +mkdep, +make-deps, s-proto.S and s-proto-cancel.S. This fixes BZ #28554.
* Run conform/ tests using newly built libcJoseph Myers2021-09-171-7/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Although the conform/ header tests are built using the headers of the glibc under test, the execution tests from conformtest (a few tests of the values of macros evaluating to string constants) are linked and run with system libc, not the newly built libc. Apart from preventing testing in cross environments, this can be a problem even for native testing. Specifically, it can be useful to do native testing when building with a cross compiler that links with a libc that is not the system libc; for example, on x86_64, you can test all three ABIs that way if the kernel support is present, even if the host OS lacks 32-bit or x32 libraries or they are older than the libraries in the sysroot used by the compiler used to build glibc. This works for almost all tests, but not for these conformtest tests. Arrange for conformtest to link and run test programs similarly to other tests, with consequent refactoring of various variables in Makeconfig to allow passing relevant parts of the link-time command lines down to conformtest. In general, the parts of the link command involving $@ or $^ are separated out from the parts that should be passed to conformtest (the variables passed to conformtest still involve various variables whose names involve $(@F), but those variables simply won't be defined for the conformtest makefile rules and I think their presence there is harmless). This is also most of the support that would be needed to allow running those tests of string constants for cross testing when test-wrapper is defined. That will also need changes to where conformtest.py puts the test executables, so it puts them in the main object directory (expected to be shared with a test system in cross testing) rather than /tmp (not expected to be shared) as at present. Tested for x86_64.
* Force building with -fno-commonFlorian Weimer2021-07-091-1/+5
| | | | | | | | | | As a result, is not necessary to specify __attribute__ ((nocommon)) on individual definitions. GCC 10 defaults to -fno-common on all architectures except ARC, but this change is compatible with older GCC versions and ARC, too. Reviewed-by: Carlos O'Donell <carlos@redhat.com>
* resolv: Move libanl into libc (if libpthread is in libc)Florian Weimer2021-07-021-0/+2
| | | | | | | | | | The symbols gai_cancel, gai_error, gai_suspend, getaddrinfo_a, __gai_suspend_time64 were moved using scripts/move-symbol-to-libc.py. For Hurd (which remains !PTHREAD_IN_LIBC), a few #define redirects had to be added because several pthread functions are not available under __. (Linux uses __ prefixes for most hidden aliases, and has to in some cases to avoid linknamespace issues.)
* Fix librt-routines-var issues for !PTHREAD_IN_LIBCFlorian Weimer2021-06-211-1/+1
| | | | | | | The variable name was incorrect, and the existing librt-routines variable needs to be augmented (not assigned) in rt/Makefile. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
* Makeconfig: Fix time64-compat.mk targetSiddhesh Poyarekar2021-06-171-4/+4
| | | | | | | | | | | | The time64-compat.i needed for the time64-compat.mk Makeconfig include ends up trying to include libc-modules.h, which is not generated until later. This results in an error during build which is not noticed because it somehow does not terminate the build. Exclude the modules cppflags from the pre-processing command and fix up the time64-compat.mk target so that the build runs without issues. Reviewed-by: Andreas Schwab <schwab@linux-m68k.org>
* y2038: Add test coverageAdhemerval Zanella2021-06-151-0/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It is enabled through a new rule, tests-y2038, which is built only when the ABI supports the comapt 64-bit time_t (defined by the header time64-compat.h, which also enables the creation of the symbol Version for Linux). It means the tests are not built for ABI which already provide default 64-bit time_t. The new rule already adds the required LFS and 64-bit time_t compiler flags. The current coverage is: * libc: - adjtime tst-adjtime-time64 - adjtimex tst-adjtimex-time64 - clock_adjtime tst-clock_adjtime-time64 - clock_getres tst-clock-time64, tst-cpuclock1-time64 - clock_gettime tst-clock-time64, tst-clock2-time64, tst-cpuclock1-time64 - clock_nanosleep tst-clock_nanosleep-time64, tst-cpuclock1-time64 - clock_settime tst-clock2-time64 - cnd_timedwait tst-cnd-timedwait-time64 - ctime tst-ctime-time64 - ctime_r tst-ctime-time64 - difftime tst-difftime-time64 - fstat tst-stat-time64 - fstatat tst-stat-time64 - futimens tst-futimens-time64 - futimes tst-futimes-time64 - futimesat tst-futimesat-time64 - fts_* tst-fts-time64 - getitimer tst-itimer-timer64 - getrusage - gettimeofday tst-clock_nanosleep-time64 - glob / globfree tst-gnuglob64-time64 - gmtime tst-gmtime-time64 - gmtime_r tst-gmtime-time64 - lstat tst-stat-time64 - localtime tst-y2039-time64 - localtime_t tst-y2039-time64 - lutimes tst-lutimes-time64 - mktime tst-mktime4-time64 - mq_timedreceive tst-mqueue{1248}-time64 - mq_timedsend tst-mqueue{1248}-time64 - msgctl test-sysvmsg-time64 - mtx_timedlock tst-mtx-timedlock-time64 - nanosleep tst-cpuclock{12}-time64, tst-mqueue8-time64, tst-clock-time64 - nftw / ftw ftwtest-time64 - ntp_adjtime tst-ntp_adjtime-time64 - ntp_gettime tst-ntp_gettime-time64 - ntp_gettimex tst-ntp_gettimex-time64 - ppoll tst-ppoll-time64 - pselect tst-pselect-time64 - pthread_clockjoin_np tst-join14-time64 - pthread_cond_clockwait tst-cond11-time64 - pthread_cond_timedwait tst-abstime-time64 - pthread_mutex_clocklock tst-abstime-time64 - pthread_mutex_timedlock tst-abstime-time64 - pthread_rwlock_clockrdlock tst-abstime-time64, tst-rwlock14-time64 - pthread_rwlock_clockwrlock tst-abstime-time64, tst-rwlock14-time64 - pthread_rwlock_timedrdlock tst-abstime-time64, tst-rwlock14-time64 - pthread_rwlock_timedwrlock tst-abstime-time64, tst-rwlock14-time64 - pthread_timedjoin_np tst-join14-time64 - recvmmsg tst-cancel4_2-time64 - sched_rr_get_interval tst-sched_rr_get_interval-time64 - select tst-select-time64 - sem_clockwait tst-sem5-time64 - sem_timedwait tst-sem5-time64 - semctl test-sysvsem-time64 - semtimedop test-sysvsem-time64 - setitimer tst-mqueue2-time64, tst-itimer-timer64 - settimeofday tst-settimeofday-time64 - shmctl test-sysvshm-time64 - sigtimedwait tst-sigtimedwait-time64 - stat tst-stat-time64 - thrd_sleep tst-thrd-sleep-time64 - time tst-mqueue{1248}-time64 - timegm tst-timegm-time64 - timer_gettime tst-timer4-time64 - timer_settime tst-timer4-time64 - timerfd_gettime tst-timerfd-time64 - timerfd_settime tst-timerfd-time64 - timespec_get tst-timespec_get-time64 - timespec_getres tst-timespec_getres-time64 - utime tst-utime-time64 - utimensat tst-utimensat-time64 - utimes tst-utimes-time64 - wait3 tst-wait3-time64 - wait4 tst-wait4-time64 * librt: - aio_suspend tst-aio6-time64 - mq_timedreceive tst-mqueue{1248}-time64 - mq_timedsend tst-mqueue{1248}-time64 - timer_gettime tst-timer4-time64 - timer_settime tst-timer4-time64 * libanl: - gai_suspend Reviewed-by: Lukasz Majewski <lukma@denx.de> Reviewed-by: Carlos O'Donell <carlos@redhat.com> Tested-by: Carlos O'Donell <carlos@redhat.com>
* dlfcn: Cleanups after -ldl is no longer requiredFlorian Weimer2021-06-031-6/+0
| | | | | | | | | | | | This commit removes the ELF constructor and internal variables from dlfcn/dlfcn.c. The file now serves the same purpose as nptl/libpthread-compat.c, so it is renamed to dlfcn/libdl-compat.c. The use of libdl-shared-only-routines ensures that libdl.a is empty. This commit adjusts the test suite not to use $(libdl). The libdl.so symbolic link is no longer installed. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
* Add pthread-in-libc, libpthread-routines-var, librt-routines-varFlorian Weimer2021-05-031-0/+11
| | | | | | | | These make variables can be used to add routines to different libraries for the Hurd and Linux builds. Reviewed-by: Carlos O'Donell <carlos@redhat.com> Tested-by: Carlos O'Donell <carlos@redhat.com>
* Build libc-start with stack protector for SHAREDSiddhesh Poyarekar2021-03-151-0/+8
| | | | | | | | | | This does not change the emitted code since __libc_start_main does not return, but is important for formal flags compliance. This also cleans up the cosmetic inconsistency in the stack protector flags in csu, especially the incorrect value of STACK_PROTECTOR_LEVEL. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
* Update copyright dates with scripts/update-copyrightsPaul Eggert2021-01-021-1/+1
| | | | | | | | | | | | | | | | 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
* Add {,sysdep-}ld-library-path make variableSamuel Thibault2020-11-161-0/+3
| | | | | | | | On GNU/Hurd we not only need $(common-objpfx) in LD_LIBRARY_PATH when loading dynamic objects, but also $(common-objpfx)/mach and $(common-objpfx)/hurd. This adds an ld-library-path variable to be used as LD_LIBRARY_PATH basis in Makefiles, and a sysdep-ld-library-path variable for sysdeps to add some more paths, here mach/ and hurd/.
* Makeconfig: Use $(error ...) to output error messageSimon Marchi2020-04-291-1/+1
| | | | | | | | | | | | | | | | | | Being not familiar with the glibc repository, I typed "make" inside some subdirectory that has a Makefile, and was met with: $ make ../Makeconfig:42: *** missing separator. Stop. At Makeconfig:42, we have: objdir must be defined by the build-directory Makefile. Change that to use $(error ...), which I guess was the original intention. The result is: $ make ../Makeconfig:42: *** objdir must be defined by the build-directory Makefile. Stop.
* Makeconfig: sandwich gnulib-tests between libc/ld linking of testsPaul E. Murphy2020-03-251-6/+6
| | | | | | | This better resembles the default linking process with the gnulibs, and also resolves the increasingly difficult to maintain f128-loader-link usage on powerpc64le as some libgcc symbols are dependent on those found in the loader (ld).
* Update copyright dates with scripts/update-copyrights.Joseph Myers2020-01-011-1/+1
|
* Expand $(as-needed) and $(no-as-needed) throughout the build systemFlorian Weimer2019-12-031-5/+2
| | | | | | | | | Since commit a3cc4f48e94f32c9532ee36982ac00eb1e5719b0 ("Remove --as-needed configure test."), --as-needed support is no longer optional. The macros are not much shorter and do not provide documentary value, either, so this commit removes them.
* Prefer https to http for gnu.org and fsf.org URLsPaul Eggert2019-09-071-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* test-container: Install with $(sorted-subdirs) [BZ #24794]Tulio Magno Quites Machado Filho2019-07-291-3/+3
| | | | | | | | | | | | | Commit 35e038c1d2ccb3a75395662f9c4f28d85a61444f started to use an incomplete list of subdirs based on $(all-subdirs) causing testroot.pristine to miss files from nss. Tested if the list of files in testroot.pristine remains the same. [BZ #24794] * Makeconfig (all-subdirs): Improved source comments. * Makefile (testroot.pristine/install.stamp): Pass subdirs='$(sorted-subdirs)' to make install.
* Makeconfig: Move -Wl,-rpath-link options before library referencesFlorian Weimer2019-04-261-5/+14
| | | | | | | | | | | | | | | | | | | Previously, the -Wl,-rpath-link options came after the libraries injected using LDLIBS-* variables on the link editor command line for main programs. As a result, it could happen that installed libraries that reference glibc libraries used the installed glibc from the system directories, instead of the glibc from the build tree. This can lead to link failures if the wrong version of libpthread.so.0 is used, for instance, due to differences in the internal GLIBC_PRIVATE interfaces, as seen with memusagestat and -lgd after commit f9b645b4b0a10c43753296ce3fa40053fa44606a ("memusagestat: use local glibc when linking [BZ #18465]"). The isolation is necessarily imperfect because these installed libraries are linked against the installed glibc in the system directories. However, in most cases, the built glibc will be newer than the installed glibc, and this link is permitted because of the ABI backwards compatibility glibc provides.
* Makeconfig: Move $(CC) to +link command variablesFlorian Weimer2019-04-261-13/+17
| | | | | | This change is needed to add linker flags which come very early in the command linke (before LDFLAGS) and are not applied to test programs (only to installed programs).
* Extend BIND_NOW to installed programs with --enable-bind-nowFlorian Weimer2019-04-251-3/+5
| | | | | | | | Commit 2d6ab5df3b675e96ee587ae6a8c2ce004c6b1ba9 ("Document and fix --enable-bind-now [BZ #21015]") extended BIND_NOW to all installed shared objects. This change also covers installed programs. Reviewed-by: Carlos O'Donell <carlos@redhat.com>
* Only build libm with -fno-math-errno (bug 24024)Aurelien Jarno2019-01-071-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | Commit 1294b1892e ("Add support for sqrt asm redirects") added the -fno-math-errno flag to build most of the glibc in order to enable GCC to inline math functions. Due to GCC bug #88576, saving and restoring errno around calls to malloc are optimized-out. In turn this causes strerror to set errno to ENOMEM if it get passed an invalid error number and if malloc sets errno to ENOMEM (which might happen even if it succeeds). This is not allowed by POSIX. This patch changes the build flags, building only libm with -fno-math-errno and all the remaining code with -fno-math-errno. This should be safe as libm doesn't contain any code saving and restoring errno around malloc. This patch can probably be reverted once the GCC bug is fixed and available in stable releases. Tested on x86-64, no regression in the testsuite. Changelog: [BZ #24024] * Makeconfig: Build libm with -fno-math-errno but build the remaining code with -fmath-errno. * string/Makefile [$(build-shared)] (tests): Add test-strerror-errno. [$(build-shared)] (LDLIBS-test-strerror-errno): New variable. * string/test-strerror-errno.c: New file.
* Update copyright dates with scripts/update-copyrights.Joseph Myers2019-01-011-1/+1
| | | | | | | * All files with FSF copyright notices: Update copyright dates using scripts/update-copyrights. * locale/programs/charmap-kw.h: Regenerated. * locale/programs/locfile-kw.h: Likewise.