At the GNU Tools Cauldron 2016, the state of the current tunables
patchset was considered OK with the addition of a way to select the
frontend to be used for the tunables. That is, to avoid being locked
in to one type of frontend initially, it should be possible to build
tunables with a different frontend with something as simple as a
configure switch.
To that effect, this patch enhances the --enable-tunables option to
accept more values than just 'yes' or 'no'. The current frontend (and
default when enable-tunables is 'yes') is called 'valstring', to
select the frontend where a single environment variable is set to a
colon-separated value string. More such frontends can be added in
future.
* Makeconfig (have-tunables): Check for non-negative instead
of positive.
* configure.ac: Add 'valstring' as a valid value for
--enable-tunables.
* configure: Regenerate.
* elf/Makefile (have-tunables): Check for non-negative instead
of positive.
(CPPFLAGS-dl-tunables.c): Define TUNABLES_FRONTEND for
dl-tunables.c.
* elf/dl-tunables.c (GLIBC_TUNABLES): Define only when
TUNABLES_FRONTEND == TUNABLES_FRONTEND_valstring.
(tunables_strdup): Likewise.
(disable_tunables): Likewise.
(parse_tunables): Likewise.
(__tunables_init): Process GLIBC_TUNABLES envvar only when.
TUNABLES_FRONTEND == TUNABLES_FRONTEND_valstring.
* elf/dl-tunables.h (TUNABLES_FRONTEND_valstring): New macro.
(TUNABLES_FRONTEND_yes): New macro, define as
TUNABLES_FRONTEND_valstring by default.
* manual/install.texi: Document new acceptable values for
--enable-tunables.
* INSTALL: Regenerate.
The tunables framework allows us to uniformly manage and expose global
variables inside glibc as switches to users. tunables/README has
instructions for glibc developers to add new tunables.
Tunables support can be enabled by passing the --enable-tunables
configure flag to the configure script. This patch only adds a
framework and does not pose any limitations on how tunable values are
read from the user. It also adds environment variables used in malloc
behaviour tweaking to the tunables framework as a PoC of the
compatibility interface.
* manual/install.texi: Add --enable-tunables option.
* INSTALL: Regenerate.
* README.tunables: New file.
* Makeconfig (CPPFLAGS): Define TOP_NAMESPACE.
(before-compile): Generate dl-tunable-list.h early.
* config.h.in: Add HAVE_TUNABLES.
* config.make.in: Add have-tunables.
* configure.ac: Add --enable-tunables option.
* configure: Regenerate.
* csu/init-first.c (__libc_init_first): Move
__libc_init_secure earlier...
* csu/init-first.c (LIBC_START_MAIN):... to here.
Include dl-tunables.h, libc-internal.h.
(LIBC_START_MAIN) [!SHARED]: Initialize tunables for static
binaries.
* elf/Makefile (dl-routines): Add dl-tunables.
* elf/Versions (ld): Add __tunable_set_val to GLIBC_PRIVATE
namespace.
* elf/dl-support (_dl_nondynamic_init): Unset MALLOC_CHECK_
only when !HAVE_TUNABLES.
* elf/rtld.c (process_envvars): Likewise.
* elf/dl-sysdep.c [HAVE_TUNABLES]: Include dl-tunables.h
(_dl_sysdep_start): Call __tunables_init.
* elf/dl-tunable-types.h: New file.
* elf/dl-tunables.c: New file.
* elf/dl-tunables.h: New file.
* elf/dl-tunables.list: New file.
* malloc/tst-malloc-usable-static.c: New test case.
* malloc/Makefile (tests-static): Add it.
* malloc/arena.c [HAVE_TUNABLES]: Include dl-tunables.h.
Define TUNABLE_NAMESPACE.
(DL_TUNABLE_CALLBACK (set_mallopt_check)): New function.
(DL_TUNABLE_CALLBACK_FNDECL): New macro. Use it to define
callback functions.
(ptmalloc_init): Set tunable values.
* scripts/gen-tunables.awk: New file.
* sysdeps/mach/hurd/dl-sysdep.c: Include dl-tunables.h.
(_dl_sysdep_start): Call __tunables_init.
With all the machinery we just added, we can easily arrange to work even
when the compiler passes in -fstack-protector automatically: all the
necessary bits of glibc are always compiled with -fno-stack-protector
now.
So tear out the check in configure, and add appropriate calls to
-fno-stack-protector in tests that need them (largely those that use
-nostdlib), since we don't yet have a __stack_chk_fail that those
tests can rely upon. (GCC often provides one, but we cannot rely on
this, especially not when bootstrapping.)
When stack protection is disabled, explicitly pass -fno-stack-protector
to everything, to stop a compiler hacked to enable it from inserting
calls to __stack_chk_fail via the PLT in every object file.
When dynamically linking, ifunc resolvers are called before TLS is
initialized, so they cannot be safely stack-protected.
We avoid disabling stack-protection on large numbers of files by
using __attribute__ ((__optimize__ ("-fno-stack-protector")))
to turn it off just for the resolvers themselves. (We provide
the attribute even when statically linking, because we will later
use it elsewhere too.)
This adds =all and =strong, with obvious semantics, defaulting to off.
We don't validate the value of the option yet: that's in a later patch.
Nor do we use it for anything at this stage.
We differentiate between 'the compiler understands -fstack-protector'
and 'the user wanted -fstack-protector' so that we can pass
-fno-stack-protector in appropriate places even if the user didn't want
to turn on -fstack-protector for other parts. (This helps us overcome
another existing limitation, that glibc doesn't work with GCCs hacked
to pass in -fstack-protector by default.)
We also arrange to set the STACK_PROTECTOR_LEVEL #define to a value
appropriate for the stack-protection level in use for each file in
particular.
Add a configure check that looks for python3 and python in that order
since we had agreed in the past to prefer python3 over python in all
our code. The patch also adjusts invocations through the various
Makefiles to use the set variable.
* configure.ac: Check for python3 or python.
* configure: Regenerated.
* config.make.in (PYTHON): New variable.
* benchtests/Makefile: Don't define PYTHON.
(bench): Define target only if PYTHON was defined.
* Rules: Don't define PYTHON.
Define pretty printer targets only if PYTHON was defined.
(tests-printers): Add to tests-unsupported if PYTHON is not
found.
(python-flags, python-invoke): Remove.
(tests-printers-out): Use PYTHON instead of python-invoke.
Some configurations may use NSS cryptographic routines but have no
static library for those routines. The following changes allow glibc to
be built and tested with --enable-nss-crypt, but without having a static
NSS library. At a high level the change does two things:
(1) Detect at configure time if static NSS crypto libraries are
available. Assumes libfreebl3.a (instead of the existing Fedora
libfreebl.a which is incomplete) which matches libfreebl3.so.
(2) If static NSS crypto libraries are _not_ available then adjust the
way in which we build tst-linkall-static. This includes excluding a
reference to crypt and not linking against libcrypt.a, all of which
will fail otherwise.
Testing assumptions:
* Static library is named libfreebl3.a (not libfreebl.a as is currently
provided in Fedora), matching libfreebl3.so shared link name.
Tested on x86_64 on Fedora with:
(a) --enable-nss-crypt, with no static NSS library support: PASS
(previous FAIL)
(b) --enable-nss-crypt, with faked static NSS library support: PASS
(unsupported)
* Requires changing elf/Makefile to include a stub
/lib64/libfreebl3.a for testing purposes.
(c) --disable-nss-crypt: PASS
(default)
No regressions on x86_64.
For details see:
https://www.sourceware.org/ml/libc-alpha/2016-11/msg00647.html
When glibc is compiled with gcc 6.2 that has been configured with
--enable-default-pie and --enable-default-ssp, the configure script
fails to detect that the compiler has ssp turned on by default when
being built for i686-linux-gnu.
This is because gcc is emitting __stack_chk_fail_local but the
script is only looking for __stack_chk_fail. Support both.
Example output:
checking whether x86_64-pc-linux-gnu-gcc -m32 -Wl,-O1 -Wl,--as-needed
implicitly enables -fstack-protector... no
This patch adds a configure check to test if gcc supports attribute ifunc.
The support can either be enabled in <gcc-src>/gcc/config.gcc for one
architecture in general by setting default_gnu_indirect_function variable to yes
or by configuring gcc with --enable-gnu-indirect-function.
The next patch rewrites libc_ifunc macro to use gcc attribute ifunc instead
of inline assembly to generate the IFUNC symbols due to false debuginfo.
If gcc does not support attribute ifunc, the old approach for generating
ifunc'ed symbols is used. Then the debug-information is false. Thus it is
recommended to use a gcc with indirect function support (See notes in INSTALL).
After this patch-series these inline assemblies for ifunc-handling are not
scattered in multiple files but are used only indirect via ifunc-macros
and can simply removed in libc-symbols.h in future.
If glibc is configured with --enable-multi-arch and gcc does not support
attribute ifunc, a configure warning is dumped!
ChangeLog:
* config.h.in (HAVE_GCC_IFUNC): New undef.
* configure.ac: Add check if gcc supports attribute ifunc feature.
* configure: Regenerated.
* manual/install.texi: Add recommendation for gcc with
indirect-function support.
* INSTALL: Regenerated.
Since _dl_tlsdesc_dynamic is called via PLT, we need to add 8 bytes for
push in the PLT entry to align the stack.
[BZ #20309]
* configure.ac (have-mtls-dialect-gnu2): Set to yes if
-mtls-dialect=gnu2 works.
* configure: Regenerated.
* elf/Makefile [have-mtls-dialect-gnu2 = yes]
(tests): Add tst-gnu2-tls1.
(modules-names): Add tst-gnu2-tls1mod.
($(objpfx)tst-gnu2-tls1): New.
(tst-gnu2-tls1mod.so-no-z-defs): Likewise.
(CFLAGS-tst-gnu2-tls1mod.c): Likewise.
* elf/tst-gnu2-tls1.c: New file.
* elf/tst-gnu2-tls1mod.c: Likewise.
* sysdeps/x86_64/dl-tlsdesc.S (_dl_tlsdesc_dynamic): Add 8
bytes for push in the PLT entry to align the stack.
When --enable-bind-now is used to configure glibc build, we can avoid
an extra branch to the PLT entry by using indirect branch via the GOT
slot instead, which is similar to the first instructuon in the PLT
entry. Changes in the shared library sizes in text sections:
Shared library Before (bytes) After (bytes)
libm.so 1060813 1060797
libmvec.so 160881 160805
libpthread.so 94992 94984
librt.so 25064 25048
* config.h.in (BIND_NOW): New.
* configure.ac (BIND_NOW): New. Defined for --enable-bind-now.
* configure: Regenerated.
* sysdeps/x86_64/sysdep.h (JUMPTARGET)[BIND_NOW]: Defined to
indirect branch via the GOT slot.
In preparation to fix the --localedir configure argument we must
move the existing conflicting definition of localedir to a more
appropriate name. Given that all current internal uses of localedir
relate to the compiled locales we rename to complocaledir.
There are configure tests for the linker -z nodelete, -z nodlopen and
-z initfirst options. These options were added in binutils 2.11, so
the tests are obsolete; this patch removes them.
Tested for x86_64 and x86 (testsuite, and that installed shared
libraries are unchanged by the patch).
* configure.ac (libc_cv_z_nodelete): Remove configure test.
(libc_cv_z_nodlopen): Likewise.
(libc_cv_z_initfirst): Likewise.
* configure: Regenerated.
There is a configure test for the --no-whole-archive linker option.
This option was added in binutils 2.7, so the test is obsolete; this
patch removes it.
Tested for x86_64 and x86 (testsuite, and that installed shared
libraries are unchanged by the patch).
* configure.ac (libc_cv_ld_no_whole_archive): Remove configure
test.
* configure: Regenerated.
There is a configure test "for .preinit_array/.init_array/.fini_array
support". Support for this feature was added in binutils 2.13, so the
configure test is obsolete; this patch removes it.
Tested for x86_64 and x86 (testsuite, and that installed shared
libraries are unchanged by the patch).
* configure.ac (libc_cv_initfini_array): Remove configure test.
* configure: Regenerated.
There are various configure tests for visibility support in the
compiler and assember.
GCC support for visibility attributes was added in GCC 3.3. I don't
know what specific fix was intended by the test "for broken
__attribute__((visibility())", but it was added by
<https://sourceware.org/ml/libc-hacker/2002-08/msg00030.html>, and GCC
3.3 appears not to have that breakage, so I suspect it was only ever
in development versions before 3.3 was released. The assembler
support was added in binutils 2.10.
This patch removes the tests in question as obsolete. Two tests that
were formerly conditional on "if test $libc_cv_visibility_attribute =
yes", including the one for linker support for protected data, are now
unconditional.
Tested for x86_64 and x86 (testsuite, and that installed shared
libraries are unchanged by the patch).
* configure.ac (libc_cv_asm_protected_directive): Remove configure
test.
(libc_cv_visibility_attribute): Likewise.
(libc_cv_protected_data): Test unconditionally.
(libc_cv_broken_visibility_attribute): Remove configure test.
(libc_cv_have_sdata_section): Test unconditionally.
* configure: Regenerated.
Now that GCC 4.7 or later is required to build glibc, this patch moves
the build from using -std=gnu99 to -std=gnu11 (option added in 4.7).
This allows use of C11 features from GCC's headers, such as new
float.h macros and max_align_t.
Tested for x86_64 and x86 (testsuite; installed stripped shared
libraries are unchanged by the patch on x86_64, while I see some
slight code reordering of no significance on x86).
* Makeconfig (CFLAGS): Use -std=gnu11 instead of -std=gnu99.
* Makefile ($(objpfx)c++-types-check.out): Filter out -std=gnu11
instead of -std=gnu99.
* configure.ac (systemtap): Test with -std=gnu11 instead of
-std=gnu99.
* configure: Regenerated.
* math/gen-auto-libm-tests.c: Use -std=gnu11 instead of -std=gnu99
in compilation command in comment.
sysdeps/nptl/configure.ac tests for forced unwind support and the C
cleanup attribute, giving errors if either is unsupported. It does
nothing beyond running those two tests.
Both the attribute, and _Unwind_GetCFA which is used in the forced
unwind test, were added in GCC 3.3. Thus these tests are long
obsolete, and this patch removes the configure fragment running them,
along with associated conditionals.
Tested for x86_64 and x86 (testsuite, and that installed stripped
shared libraries are unchanged by the patch).
* sysdeps/nptl/configure.ac: Remove file.
* sysdeps/nptl/configure: Remove generated file.
* configure.ac (libc_cv_forced_unwind): Do not substitute.
* configure: Regenerated.
* config.h.in (HAVE_FORCED_UNWIND): Remove #undef.
* config.make.in (have-forced-unwind): Remove variable.
* nptl/Makefile [$(have-forced-unwind) = yes]: Make code
unconditional.
* nptl/descr.h [HAVE_FORCED_UNWIND]: Likewise.
* nptl/unwind.c [HAVE_FORCED_UNWIND]: Likewise.
(__pthread_unwind) [!HAVE_FORCED_UNWIND]: Remove conditional code.
* nptl/version.c [HAVE_FORCED_UNWIND]: Make code unconditional.
* sysdeps/nptl/Makefile [$(have-forced-unwind) = yes]: Make code
unconditional.
This patch implements a requirement of GCC 4.7 or later to build
glibc.
This was discussed in the thread starting at
<https://sourceware.org/ml/libc-alpha/2015-08/msg00851.html>.
Concerns were expressed by Mike and David. At
<https://sourceware.org/ml/libc-alpha/2015-10/msg00453.html> I have
provided a 14-patch series showing in outline the cleanups facilitated
by this version requirement, as requested by Mike (this patch is the
first in that series, with the addition of a NEWS entry). Given the
absence of further concerns or alternative proposals for criteria for
updates to this version requirement as requested in
<https://sourceware.org/ml/libc-alpha/2015-10/msg00065.html>, I am
interpreting this as "absence of sustained opposition" under Carlos's
definition at <https://sourceware.org/glibc/wiki/Consensus> and
proposing this patch for inclusion in glibc. I'd like to remind
people testing with 4.6 that if they move to testing with GCC 5 then
it will probably be about four years before they need to update the
compiler they use to test glibc again.
Although on the principles of time-based updates I think a move to
requiring binutils 2.23 would be reasonable, I'm not currently aware
of any cleanups that would facilitate so am not proposing that at this
time (but would expect to propose a move to requiring binutils 2.24 in
a year's time, as that brings features such as AVX512 support that
should allow some conditionals to be cleaned up). If someone thinks a
move to requiring 2.23 would help clean things up for their
architecture, please speak up. (And in general, I suspect there are
lots of architecture-specific configure tests that could be removed on
the basis of current GCC and binutils version requirements, given how
I've found architecture-independent tests obsolete on the basis of
version requirements going back 20 years.)
Tested for x86_64 and x86 (testsuite, and that installed shared
libraries are unchanged by the patch).
* configure.ac (libc_cv_compiler_ok): Require GCC 4.7 or later.
* configure: Regenerated.
* manual/install.texi (Tools for Compilation): Document
requirement for GCC 4.7 or later.
* INSTALL: Regenerated.
There seemed to be support in response to
<https://sourceware.org/ml/libc-alpha/2015-10/msg00510.html> for
removing configure tests that exist only to produce errors, where we
expect that tool versions failing the tests would also fail the tests
of minimum GCC / binutils versions.
This patch removes the tests for TLS support as one instance of such
tests. Since the addition of TLS emulation support in GCC 4.3, I
don't think these tests would have failed even if proper TLS support
(as required by glibc) was missing in that architecture's GCC back
end, so any new glibc ports wanting a substantive test (if there are
actual GCC or binutils versions for those architectures, with
supported version numbers, missing TLS support) would have needed an
architecture-specific test anyway.
Tested for x86_64 and x86 (testsuite, and that installed shared
libraries are unchanged by the patch).
* configure.ac (libc_cv_gcc___thread): Remove configure test.
(libc_cv_gcc_tls_model_attr): Likewise.
* configure: Regenerated.
There is a configure test for "whether we need to use -P to assemble
.S files".
I think this test is long obsolete. I don't have a specific reference
to a binutils change or version that obsoleted this test, but: (a) we
only support GNU binutils; (b) it looks like every architecture
supported by glibc has '#' as a line comment character in its gas
port; (c) in any case, if the (compiler, assembler) combination in use
cannot compile a .S file without special options, that would clearly
be a substantially broken combination, which I don't think we need to
allow for at all.
The test in question was added by:
Thu Jan 27 16:46:03 1994 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
* configure.in (asm-CPPFLAGS): Add new check to see if assembling
a .S file loses without -P. If so, set asm-CPPFLAGS=-P in config.make.
This patch removes the test and the reference to this issue in the
comment on the default empty definition of asm-CPPFLAGS. (Various
other settings of asm-CPPFLAGS remain in sysdeps Makefile fragments.)
Tested for x86_64 and x86 (testsuite, and that installed shared
libraries are unchanged by the patch).
* configure.ac (libc_cv_need_minus_P): Remove configure test.
* configure: Regenerated.
* Makeconfig (asm-CPPFLAGS): Remove reference to -P in comment.
There is a configure test for the presence of glibc 2.0 headers (that
were renamed / no longer installed in glibc 2.1) and associated
support for removing them on "make install".
Normal practice for subsequent removal / renaming of installed files
has been not to do anything special about removing them; if you want
installed files from an old installation removed reliably, you need to
use a packaging system that tracks what files were installed by a
previous glibc package (via installing in an intermediate directory
with install_root). I think it's been long enough since 2.0 that it's
not particularly useful to have that special logic for those old
headers either; this patch removes it.
Tested for x86_64 and x86 (testsuite, and that installed shared
libraries are unchanged by the patch).
* configure.ac (old_glibc_headers): Remove configure test.
* configure: Regenerated.
* config.make.in (old-glibc-headers): Remove variable.
* Makefile [!$(install_root) && $(old-glibc-headers) = yes]
(install): Remove dependency on remove-old-headers.
(headers2_0): Remove variable.
(remove-old-headers): Remove rule.
There is a configure test for assembler support for the .text
directive.
I suppose this test must have been aimed at some non-ELF platform or
non-GNU assembler. Certainly the GNU assembler has had ELF-specific
architecture-independent handling for .text since version 2.2, and
generic non-ELF-specific support predates that.
This patch removes this test as obsolete.
Tested for x86_64 and x86 (testsuite, and that installed shared
libraries are unchanged by the patch).
* configure.ac (libc_cv_dot_text): Remove configure test.
(libc_cv_asm_set_directive): Use .text instead of
${libc_cv_dot_text} in configure test.
* configure: Regenerated.
There is a configure test for assembler support for the
gnu_unique_object symbol type. This support was added in binutils
2.20, so is present in all versions supported for building glibc.
Thus, I think the configure test can be removed; this patch does so.
Now, there is a caveat that the gas NEWS entry refers to this as a
feature for GNU/Linux targets. But the condition is use of
ELFOSABI_GNU or ELFOSABI_NONE. ELFOSABI_GNU covers Hurd as well as
GNU/Linux (as was the case with the older ELFOSABI_LINUX name), and
ELFOSABI_NONE means this is effectively OS-independent. Furthermore,
I think a correct binutils port for any glibc target ought to support
this feature for use with glibc; glibc supports this as an
OS-independent feature (the configure test is only about glibc
testcases).
Tested for x86_64 (testsuite, and that installed shared libraries are
unchanged by the patch).
* configure.ac (libc_cv_asm_unique_object): Remove configure test.
* configure: Regenerated.
* config.h.in (HAVE_ASM_UNIQUE_OBJECT): Remove #undef.
* elf/tst-unique1.c (do_test) [HAVE_ASM_UNIQUE_OBJECT]: Make code
unconditional.
* elf/tst-unique1mod1.c [HAVE_ASM_UNIQUE_OBJECT]: Likewise.
* elf/tst-unique1mod2.c [HAVE_ASM_UNIQUE_OBJECT]: Likewise.
* elf/tst-unique2.c (do_test) [HAVE_ASM_UNIQUE_OBJECT]: Likewise.
(do_test) [!HAVE_ASM_UNIQUE_OBJECT]: Remove conditional code.
* elf/tst-unique2mod1.c [HAVE_ASM_UNIQUE_OBJECT]: Make code
unconditional.
* elf/tst-unique2mod2.c [HAVE_ASM_UNIQUE_OBJECT]: Likewise.
With gcc-4.9, a new -fstack-protector-strong flag is available that is
between -fstack-protector (pretty weak) and -fstack-protector-all (pretty
strong) that provides good trade-offs between overhead but still providing
good coverage. Update the places in glibc that use ssp to use this flag
when it's available.
This also kills off the indirection of hardcoding the flag name in the
Makefiles and adding it based on a have-ssp boolean. Instead, the build
always expands the $(stack-protector) variable to the best ssp setting.
This makes the build logic a bit simpler and allows people to easily set
to a diff flag like:
make stack-protector=-fstack-protector-all
There is a configure test for -fgnu89-inline. This option was added
in GCC 4.2, so the test is obsolete; this patch removes it.
Tested for x86_64 (testsuite, and that installed shared libraries are
unchanged by the patch).
* configure.ac (libc_cv_gnu89_inline): Remove configure test.
* configure: Regenerated.
* config.make.in (gnu89-inline-CFLAGS): Remove variable.
* Makeconfig (CFLAGS): Use -fgnu89-inline instead of
$(gnu89-inline-CFLAGS).
There are configure tests for assembler .weak support, and, as a
fallback, for .weakext support.
.weakext appears to be an ECOFF thing (although a few ELF targets
support it as well). .weak has been supported by the GNU assembler
for ELF targets since version 2.2, so given the requirement for ELF
the configure tests are obsolete; this patch removes them.
Tested for x86_64 (testsuite, and that installed shared libraries are
unchanged by the patch).
* configure.ac (libc_cv_asm_weak_directive): Remove configure
test.
(libc_cv_asm_weakext_directive): Likewise.
* configure: Regenerated.
* config.h.in (HAVE_ASM_WEAK_DIRECTIVE): Remove #undef.
(HAVE_ASM_WEAKEXT_DIRECTIVE): Likewise.
* include/libc-symbols.h
[!HAVE_ASM_WEAK_DIRECTIVE && !HAVE_ASM_WEAKEXT_DIRECTIVE]: Remove
#error.
[HAVE_ASM_WEAKEXT_DIRECTIVE]: Remove conditional code.
[!HAVE_ASM_WEAKEXT_DIRECTIVE]: Make code unconditional.
There is a configure test for the -Bgroup linker option whose results
aren't used anywhere. This patch removes that test.
Tested for x86_64 (testsuite, and that installed shared libraries are
unchanged by the patch).
* configure.ac (libc_cv_Bgroup): Remove configure test.
* configure: Regenerated.
* config.make.in (have-Bgroup): Remove variable.
There is a configure test for sizeof (long double) whose results
aren't used anywhere. This patch removes that test.
Tested for x86_64 (testsuite, and that installed shared libraries are
unchanged by the patch).
* configure.ac (sizeof_long_double): Remove configure test.
* configure: Regenerated.
* config.make.in (sizeof-long-double): Remove variable.
There is a configure test for the assembler .previous directive, and,
as a fallback, for .popsection.
glibc now only supports ELF. For ELF, the GNU assembler has supported
.previous since version 2.2 (support added by
Mon Jul 19 15:21:20 1993 Ken Raeburn (raeburn@rtl.cygnus.com)
* config/obj-elf.c (obj_elf_previous): New function.
(previous_section, previous_subsection): New vars.
(obj_elf_section): Save current place in case DWARF code wants us
to pop back to it. Handle unquoted section name as well as quoted
section name. Don't crash on invalid strings.
(obj_pseudo_table): Handle new pseudos "previous", "2byte", and
"4byte".
). Thus this configure test is obsolete, and this patch removes it
(and with it the fallback .popsection test).
Tested for x86_64 and x86 (testsuite, and that installed shared
libraries are unchanged by the patch).
* configure.ac (libc_cv_asm_previous_directive): Remove configure
test.
(libc_cv_asm_popsection_directive): Likewise.
* configure: Regenerated.
* config.h.in (HAVE_ASM_PREVIOUS_DIRECTIVE): Remove #undef.
(HAVE_ASM_POPSECTION_DIRECTIVE): Likewise.
* include/libc-symbols.h [HAVE_ASM_PREVIOUS_DIRECTIVE]
(__make_section_unallocated): Make definition unconditional.
[HAVE_ASM_POPSECTION_DIRECTIVE] (__make_section_unallocated):
Remove conditional definition.
[!HAVE_ASM_PREVIOUS_DIRECTIVE && !HAVE_ASM_POPSECTION_DIRECTIVE]
(__make_section_unallocated): Likewise.
There is a configure test for -static-libgcc. GCC added this option
in version 3.0, so this test is obsolete; this patch removes it.
Tested for x86_64 and x86 (testsuite, and that installed shared
libraries are unchanged by the patch).
* configure.ac (libc_cv_gcc_static_libgcc): Remove configure test.
* configure: Regenerated.
* config.make.in (static-libgcc): Remove variable.
* Makerules (build-shlib-helper): Use -static-libgcc instead of
$(static-libgcc).
(build-module-helper): Likewise.
There is a configure test "for libc-friendly stddef.h", which sets a
makefile variable stddef.h that appears to be nowhere used. It
appears the uses of this variable were removed by:
Tue Feb 21 00:10:50 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
* Makefile (headers): Remove $(stddef.h).
* Makeconfig (stddef.h): Variable removed; now require gcc version
>= 2.2.
* stddef.h: File removed.
(having been added by
Wed May 26 14:44:19 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
* configure.in (autoconf checks): Add new check for a
libc-friendly stddef.h.
so the test was of use for less than two years, before being obsolete
for over 20 years). This patch removes the test.
Tested for x86_64 and x86 (testsuite, and that installed shared
libraries are unchanged by the patch).
* configure.ac (libc_cv_friendly_stddef): Remove configure test.
* configure: Regenerated.
Some distros build+install the timezone tools (zic/zdump/tzselect) outside
of glibc and use the upstream package directly. Add a configure flag to
glibc so they can disable install of those tools.
This allows tests to run & pass regardless of the configure flag. Only
the install of them is impacted.
To support building glibc with GCC 6 configured with --enable-default-pie,
which generates PIE by default, we need to build programs as PIE. But
elf/tst-dlopen-aout must not be built as PIE since it tests dlopen on
ET_EXEC file and PIE is ET_DYN.
[BZ #17841]
* Makeconfig (no-pie-ldflag): New.
(+link): Set to $(+link-pie) if default to PIE.
(+link-tests): Set to $(+link-pie-tests) if default to PIE.
* config.make.in (build-pie-default): New.
* configure.ac (libc_cv_pie_default): New. Set to yes if -fPIE
is default. AC_SUBST.
* configure: Regenerated.
* elf/Makefile (LDFLAGS-tst-dlopen-aout): New.
Installation of libm.so as linker script only in case of libmvec.so build.
2015-05-14 Andrew Senkevich <andrew.n.senkevich@gmail.com>
* Makeconfig (rpath-dirs, all-subdirs): Added mathvec folder.
(libmvec): New variable.
* configure.ac: Added option for mathvec build.
* configure: Regenerated.
* mathvec/Depend: New file.
* mathvec/Makefile: New file.
* shlib-versions: Added libmvec.
* math/Makefile: Added rule for libm.so installation.
Linkers in some versions of binutils 2.25 and 2.26 don't support protected
data symbol with error messsage like:
/usr/bin/ld: copy reloc against protected `bar' is invalid
/usr/bin/ld: failed to set dynamic section sizes: Bad value
We check if linker supports copy reloc against protected data symbol to
avoid running the test if linker is broken.
[BZ #17711]
* config.make.in (have-protected-data): New.
* configure.ac: Check linker support for protected data symbol.
* configure: Regenerated.
* elf/Makefile (modules-names): Add tst-protected1moda and
tst-protected1modb if $(have-protected-data) is yes.
(tests): Add tst-protected1a and tst-protected1b if
$(have-protected-data) is yes.
($(objpfx)tst-protected1a): New.
($(objpfx)tst-protected1b): Likewise.
(tst-protected1modb.so-no-z-defs): Likewise.
* elf/tst-protected1a.c: New file.
* elf/tst-protected1b.c: Likewise.
* elf/tst-protected1mod.h: Likewise.
* elf/tst-protected1moda.c: Likewise.
* elf/tst-protected1modb.c: Likewise.
and revert the corresponding part of ba90e05 which was making the fix
necessary.
* abi-tags: Revert ae20c9a: rename back gnu into gnu-gnu.
* configure.ac, configure: Revert ba90e05: modify gnu-* host_os back
into gnu-gnu, and update comment to refer to abi-tags.
The merge of the latest gettext code introduced changes to the yacc
parser source that are incompatible with versions of bison older
than 2.7. Add a configure check for the appropriate versions and
document the requirement in INSTALL.
ChangeLog:
2014-12-22 Will Newton <will.newton@linaro.org>
* manual/install.texi: Document that we require bison 2.7
or above.
* INSTALL: Regenerate.
* configure.ac: Use AC_CHECK_PROG_VER instead of
AC_PATH_PROG when checking for bison and check for
version 2.7 or above.
* configure: Regenerate.
It seems we require texinfo 4.7 for the --plaintext option, so
document that and check for the correct version in configure.
ChangeLog:
2014-12-15 Will Newton <will.newton@linaro.org>
* manual/install.texi: Bump required version of texinfo
to 4.7 from 4.5.
* INSTALL: Regenerated.
* configure.ac: Check for makeinfo version 4.7 and above.
* configure: Regenerated.