Bug 19462 - Glibc failed to build with -Os
Summary: Glibc failed to build with -Os
Status: RESOLVED FIXED
Alias: None
Product: glibc
Classification: Unclassified
Component: libc (show other bugs)
Version: 2.23
: P2 normal
Target Milestone: 2.23
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-01-13 18:11 UTC by H.J. Lu
Modified: 2016-02-18 17:45 UTC (History)
2 users (show)

See Also:
Host:
Target:
Build:
Last reconfirmed:
fweimer: security-


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description H.J. Lu 2016-01-13 18:11:09 UTC
On x86-64:

gcc gconv_simple.c -c -std=gnu11 -fgnu89-inline  -Os -Wall -Werror -Wundef -Wwrite-strings -fmerge-all-constants -frounding-math -g -Wstrict-prototypes -Wold-style-definition   -fPIC   -ftls-model=initial-exec      -I../include -I/export/build/gnu/glibc-test/build-x86_64-linux/iconv  -I/export/build/gnu/glibc-test/build-x86_64-linux  -I../sysdeps/unix/sysv/linux/x86_64/64  -I../sysdeps/unix/sysv/linux/x86_64  -I../sysdeps/unix/sysv/linux/x86  -I../sysdeps/unix/sysv/linux/wordsize-64  -I../sysdeps/x86_64/nptl  -I../sysdeps/unix/sysv/linux/include -I../sysdeps/unix/sysv/linux  -I../sysdeps/nptl  -I../sysdeps/pthread  -I../sysdeps/gnu  -I../sysdeps/unix/inet  -I../sysdeps/unix/sysv  -I../sysdeps/unix/x86_64  -I../sysdeps/unix  -I../sysdeps/posix  -I../sysdeps/x86_64/64  -I../sysdeps/x86_64/fpu/multiarch  -I../sysdeps/x86_64/fpu  -I../sysdeps/x86/fpu/include -I../sysdeps/x86/fpu  -I../sysdeps/x86_64/multiarch  -I../sysdeps/x86_64  -I../sysdeps/x86  -I../sysdeps/ieee754/ldbl-96  -I../sysdeps/ieee754/dbl-64/wordsize-64  -I../sysdeps/ieee754/dbl-64  -I../sysdeps/ieee754/flt-32  -I../sysdeps/wordsize-64  -I../sysdeps/ieee754  -I../sysdeps/generic  -I.. -I../libio -I.   -D_LIBC_REENTRANT -include /export/build/gnu/glibc-test/build-x86_64-linux/libc-modules.h -DMODULE_NAME=libc -include ../include/libc-symbols.h  -DPIC -DSHARED     -o /export/build/gnu/glibc-test/build-x86_64-linux/iconv/gconv_simple.os -MD -MP -MF /export/build/gnu/glibc-test/build-x86_64-linux/iconv/gconv_simple.os.dt -MT /export/build/gnu/glibc-test/build-x86_64-linux/iconv/gconv_simple.os
gconv_simple.c:116:6: error: "_STRING_ARCH_unaligned" is not defined [-Werror=undef]
 #if !_STRING_ARCH_unaligned
      ^
In file included from gconv_simple.c:213:0:
../iconv/skeleton.c:206:5: error: "_STRING_ARCH_unaligned" is not defined [-Werror=undef]
 #if _STRING_ARCH_unaligned
     ^
../iconv/skeleton.c: In function ‘__gconv_transform_internal_ucs4’:
../iconv/skeleton.c:526:5: error: "_STRING_ARCH_unaligned" is not defined [-Werror=undef]
   (!_STRING_ARCH_unaligned                   \
     ^
../iconv/skeleton.c:535:5: note: in expansion of macro ‘POSSIBLY_UNALIGNED’
 #if POSSIBLY_UNALIGNED
     ^
../iconv/skeleton.c:526:5: error: "_STRING_ARCH_unaligned" is not defined [-Werror=undef]
   (!_STRING_ARCH_unaligned                   \
     ^

_STRING_ARCH_unaligned is defined in <bits/string.h>.  But string/string.h
has

#if defined __GNUC__ && __GNUC__ >= 2
# if defined __OPTIMIZE__ && !defined __OPTIMIZE_SIZE__ \
     && !defined __NO_INLINE__ && !defined __cplusplus
/* When using GNU CC we provide some optimized versions of selected
   functions from this header.  There are two kinds of optimizations:

   - machine-dependent optimizations, most probably using inline
     assembler code; these might be quite expensive since the code
     size can increase significantly.
     These optimizations are not used unless the symbol
        __USE_STRING_INLINES
     is defined before including this header.

   - machine-independent optimizations which do not increase the
     code size significantly and which optimize mainly situations
     where one or more arguments are compile-time constants.
     These optimizations are used always when the compiler is
     taught to optimize.

   One can inhibit all optimizations by defining __NO_STRING_INLINES.  */

/* Get the machine-dependent optimizations (if any).  */
#  include <bits/string.h>

/* These are generic optimizations which do not add too much inline code.  */
#  include <bits/string2.h>
# endif

# if __USE_FORTIFY_LEVEL > 0 && defined __fortify_function
/* Functions with security checks.  */
#  include <bits/string3.h>
# endif
#endif
Comment 1 Sourceware Commits 2016-01-14 18:31:16 UTC
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU C Library master sources".

The branch, hjl/pr19463 has been created
        at  cc0a0c005ec9824aa781de778eef7afe1f45d830 (commit)

- Log -----------------------------------------------------------------
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=cc0a0c005ec9824aa781de778eef7afe1f45d830

commit cc0a0c005ec9824aa781de778eef7afe1f45d830
Author: H.J. Lu <hjl.tools@gmail.com>
Date:   Thu Jan 14 06:43:38 2016 -0800

    Add libc_feclearexcept_env

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=5d7f37fa6c31dad10f3a0d2169d9f133155117ea

commit 5d7f37fa6c31dad10f3a0d2169d9f133155117ea
Author: H.J. Lu <hjl.tools@gmail.com>
Date:   Thu Jan 14 04:15:03 2016 -0800

    Use TIME_T_MAX and TIME_T_MIN in tst-mktime2.c
    
    GCC 5.3 compiles
    
    for (time_t_max = 1; 0 < time_t_max; time_t_max *= 2)
        continue;
    
    into an infinite loop with -Os.  We can copy TIME_T_MAX and TIME_T_MIN
    from time/mktime.c.
    
    	[BZ #19466]
    	* time/tst-mktime2.c (TYPE_SIGNED): New.
    	(TYPE_MINIMUM): Likewise.
    	(TYPE_MAXIMUM): Likewise.
    	(TIME_T_MIN): Likewise.
    	(TIME_T_MAX): Likewise.
    	(do_test): Initialize time_t_max and time_t_min with TIME_T_MAX
    	and TIME_T_MIN.

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=4dc17be7296be7855db6d02e75def6b2251f9d68

commit 4dc17be7296be7855db6d02e75def6b2251f9d68
Author: H.J. Lu <hjl.tools@gmail.com>
Date:   Wed Jan 13 15:03:46 2016 -0800

    Avoid strdup/strndup/strsep

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=6afb23118f1a0611b08b852c9186be1f9f735835

commit 6afb23118f1a0611b08b852c9186be1f9f735835
Author: H.J. Lu <hjl.tools@gmail.com>
Date:   Wed Jan 13 14:10:34 2016 -0800

    Allow inline in sys/sysmacros.h when building glibc

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=8d085b56186b4c168af5be927f439080886a6bcf

commit 8d085b56186b4c168af5be927f439080886a6bcf
Author: H.J. Lu <hjl.tools@gmail.com>
Date:   Wed Jan 13 13:31:34 2016 -0800

    Include <bits/stdio.h> when building glibc

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=f5537521e486c6df985435d99252370cef9e3e98

commit f5537521e486c6df985435d99252370cef9e3e98
Author: H.J. Lu <hjl.tools@gmail.com>
Date:   Wed Jan 13 17:26:00 2016 -0800

    Add <bits/string-1.h> to define _STRING_ARCH_unaligned
    
    _STRING_ARCH_unaligned is used unconditionally in glibc.  But
    <bits/string.h>, which defines _STRING_ARCH_unaligned, isn't
    included with -Os.  This patch adds <bits/string-1.h> to define
    _STRING_ARCH_unaligned, which is included unconditionally from
    <string.h>.
    
    	[BZ #19462]
    	* bits/string.h (_STRING_ARCH_unaligned): Removed.
    	* string/Makefile (headers): Add bits/string-1.h.
    	* string/bits/string-1.h: New file.
    	* sysdeps/s390/bits/string-1.h: Likewise.
    	* sysdeps/x86/bits/string-1.h: Likewise.
    	* string/string.h: Include <bits/string-1.h>.
    	* sysdeps/aarch64/bits/string.h: Renamed to ...
    	* sysdeps/aarch64/bits/string-1.h: This.
    	* sysdeps/m68k/m680x0/m68020/bits/string.h: Renamed to ...
    	* sysdeps/m68k/m680x0/m68020/bits/string-1.h: This.
    	* sysdeps/s390/bits/string.h (_STRING_ARCH_unaligned): Removed.
    	* sysdeps/sparc/bits/string.h (_STRING_ARCH_unaligned): Likewise.
    	* sysdeps/x86/bits/string.h (_STRING_ARCH_unaligned): Likewise.

-----------------------------------------------------------------------
Comment 2 Sourceware Commits 2016-01-14 19:08:40 UTC
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU C Library master sources".

The branch, hjl/pr19463 has been created
        at  90a92f4c01b8976c2dc9cb4fca777e8deb3f0c35 (commit)

- Log -----------------------------------------------------------------
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=90a92f4c01b8976c2dc9cb4fca777e8deb3f0c35

commit 90a92f4c01b8976c2dc9cb4fca777e8deb3f0c35
Author: H.J. Lu <hjl.tools@gmail.com>
Date:   Thu Jan 14 10:16:35 2016 -0800

    Compile x86 syscalls with -fomit-frame-pointer

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=a2af01a280588db874185810db9a3f8c31d973bb

commit a2af01a280588db874185810db9a3f8c31d973bb
Author: H.J. Lu <hjl.tools@gmail.com>
Date:   Thu Jan 14 06:43:38 2016 -0800

    Add libc_feclearexcept_env

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=ca3e8c11725b51e3f3d571f89c8242558b994e84

commit ca3e8c11725b51e3f3d571f89c8242558b994e84
Author: H.J. Lu <hjl.tools@gmail.com>
Date:   Thu Jan 14 04:15:03 2016 -0800

    Use TIME_T_MAX and TIME_T_MIN in tst-mktime2.c
    
    GCC 5.3 compiles
    
    for (time_t_max = 1; 0 < time_t_max; time_t_max *= 2)
        continue;
    
    into an infinite loop with -Os.  We can copy TIME_T_MAX and TIME_T_MIN
    from time/mktime.c.
    
    	[BZ #19466]
    	* time/tst-mktime2.c (TYPE_SIGNED): New.
    	(TYPE_MINIMUM): Likewise.
    	(TYPE_MAXIMUM): Likewise.
    	(TIME_T_MIN): Likewise.
    	(TIME_T_MAX): Likewise.
    	(do_test): Initialize time_t_max and time_t_min with TIME_T_MAX
    	and TIME_T_MIN.

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=987076add1938731768539e8657ff18ed5aa2466

commit 987076add1938731768539e8657ff18ed5aa2466
Author: H.J. Lu <hjl.tools@gmail.com>
Date:   Wed Jan 13 15:03:46 2016 -0800

    Avoid strdup/strndup/strsep

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=be5d38a4e308215ffa34236d667ba5794d60d72c

commit be5d38a4e308215ffa34236d667ba5794d60d72c
Author: H.J. Lu <hjl.tools@gmail.com>
Date:   Wed Jan 13 14:10:34 2016 -0800

    Allow inline in sys/sysmacros.h when building glibc

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=296fd33f86472df57f63c8960e476f2b99670e85

commit 296fd33f86472df57f63c8960e476f2b99670e85
Author: H.J. Lu <hjl.tools@gmail.com>
Date:   Wed Jan 13 13:31:34 2016 -0800

    Include <bits/stdio.h> when building glibc

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=d00caa24e1fcda5e317e7dd825a4fa023aa27583

commit d00caa24e1fcda5e317e7dd825a4fa023aa27583
Author: H.J. Lu <hjl.tools@gmail.com>
Date:   Wed Jan 13 17:26:00 2016 -0800

    Add string_private.h to define _STRING_ARCH_unaligned
    
    _STRING_ARCH_unaligned is used unconditionally in glibc.  But
    <bits/string.h>, which defines _STRING_ARCH_unaligned, isn't
    included with -Os.  Since _STRING_ARCH_unaligned is internal to
    glibc and may change between glibc releases, it should be made
    private to glibc.  This patch adds string_private.h to define
    _STRING_ARCH_unaligned, which is included unconditionally from
    internal <string.h> for glibc build.
    
    	[BZ #19462]
    	* bits/string.h (_STRING_ARCH_unaligned): Removed.
    	* include/string.h: Include <string_private.h>.
    	* sysdeps/aarch64/bits/string.h: Renamed to ...
    	* sysdeps/aarch64/string_private.h: This.
    	* sysdeps/generic/string_private.h: New file.
    	* sysdeps/s390/string_private.h: Likewise.
    	* sysdeps/x86/string_private.h: Likewise.
    	* sysdeps/m68k/m680x0/m68020/bits/string.h: Renamed to ...
    	* sysdeps/m68k/m680x0/m68020/string_private.h: This.
    	* sysdeps/s390/bits/string.h (_STRING_ARCH_unaligned): Removed.
    	* sysdeps/sparc/bits/string.h (_STRING_ARCH_unaligned): Likewise.
    	* sysdeps/x86/bits/string.h (_STRING_ARCH_unaligned): Likewise.

-----------------------------------------------------------------------
Comment 3 Sourceware Commits 2016-01-14 20:53:54 UTC
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU C Library master sources".

The branch, hjl/pr19463 has been created
        at  6ed50f4e0e954bf16e62c500d274a9823c3c0db6 (commit)

- Log -----------------------------------------------------------------
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=6ed50f4e0e954bf16e62c500d274a9823c3c0db6

commit 6ed50f4e0e954bf16e62c500d274a9823c3c0db6
Author: H.J. Lu <hjl.tools@gmail.com>
Date:   Thu Jan 14 12:49:13 2016 -0800

    Load FP environment before FP operation
    
    Since floating-point operation may trigger floating-point exceptions,
    we need to load the current floating-point environment before any
    floating-point operations.
    
    	[BZ #19465]
    	* sysdeps/ieee754/dbl-64/s_fma.c (__fma): Load the current
    	floating-point environment before any floating-point operation
    	which may trigger floating-point exceptions.

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=54bf044cd7ff1944c5a59d2daa97abfa2fb31061

commit 54bf044cd7ff1944c5a59d2daa97abfa2fb31061
Author: H.J. Lu <hjl.tools@gmail.com>
Date:   Wed Jan 13 15:03:46 2016 -0800

    Avoid strdup/strndup/strsep

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=0227d76ce0799fea0eb5cc9862ad73ddfc13810e

commit 0227d76ce0799fea0eb5cc9862ad73ddfc13810e
Author: H.J. Lu <hjl.tools@gmail.com>
Date:   Wed Jan 13 14:10:34 2016 -0800

    Allow inline in sys/sysmacros.h when building glibc

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=0a9b3b93f0a0868c518af7ebcc5b9a8126c7e0e5

commit 0a9b3b93f0a0868c518af7ebcc5b9a8126c7e0e5
Author: H.J. Lu <hjl.tools@gmail.com>
Date:   Wed Jan 13 13:31:34 2016 -0800

    Include <bits/stdio.h> when building glibc

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=c0d2afe47ec858e0363c15bb92078ead8edecd7d

commit c0d2afe47ec858e0363c15bb92078ead8edecd7d
Author: H.J. Lu <hjl.tools@gmail.com>
Date:   Thu Jan 14 10:16:35 2016 -0800

    Compile x86 syscalls with -fomit-frame-pointer

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=91c5dfa432a6be078105f8aacf8acd0eb26de8f4

commit 91c5dfa432a6be078105f8aacf8acd0eb26de8f4
Author: H.J. Lu <hjl.tools@gmail.com>
Date:   Thu Jan 14 04:15:03 2016 -0800

    Use TIME_T_MAX and TIME_T_MIN in tst-mktime2.c
    
    GCC 5.3 compiles
    
    for (time_t_max = 1; 0 < time_t_max; time_t_max *= 2)
        continue;
    
    into an infinite loop with -Os.  We can copy TIME_T_MAX and TIME_T_MIN
    from time/mktime.c.
    
    	[BZ #19466]
    	* time/tst-mktime2.c (TYPE_SIGNED): New.
    	(TYPE_MINIMUM): Likewise.
    	(TYPE_MAXIMUM): Likewise.
    	(TIME_T_MIN): Likewise.
    	(TIME_T_MAX): Likewise.
    	(do_test): Initialize time_t_max and time_t_min with TIME_T_MAX
    	and TIME_T_MIN.

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=d00caa24e1fcda5e317e7dd825a4fa023aa27583

commit d00caa24e1fcda5e317e7dd825a4fa023aa27583
Author: H.J. Lu <hjl.tools@gmail.com>
Date:   Wed Jan 13 17:26:00 2016 -0800

    Add string_private.h to define _STRING_ARCH_unaligned
    
    _STRING_ARCH_unaligned is used unconditionally in glibc.  But
    <bits/string.h>, which defines _STRING_ARCH_unaligned, isn't
    included with -Os.  Since _STRING_ARCH_unaligned is internal to
    glibc and may change between glibc releases, it should be made
    private to glibc.  This patch adds string_private.h to define
    _STRING_ARCH_unaligned, which is included unconditionally from
    internal <string.h> for glibc build.
    
    	[BZ #19462]
    	* bits/string.h (_STRING_ARCH_unaligned): Removed.
    	* include/string.h: Include <string_private.h>.
    	* sysdeps/aarch64/bits/string.h: Renamed to ...
    	* sysdeps/aarch64/string_private.h: This.
    	* sysdeps/generic/string_private.h: New file.
    	* sysdeps/s390/string_private.h: Likewise.
    	* sysdeps/x86/string_private.h: Likewise.
    	* sysdeps/m68k/m680x0/m68020/bits/string.h: Renamed to ...
    	* sysdeps/m68k/m680x0/m68020/string_private.h: This.
    	* sysdeps/s390/bits/string.h (_STRING_ARCH_unaligned): Removed.
    	* sysdeps/sparc/bits/string.h (_STRING_ARCH_unaligned): Likewise.
    	* sysdeps/x86/bits/string.h (_STRING_ARCH_unaligned): Likewise.

-----------------------------------------------------------------------
Comment 4 Sourceware Commits 2016-01-14 21:25:39 UTC
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU C Library master sources".

The branch, hjl/pr19463 has been created
        at  62e07f1cd82019c8cc5a493b8927db7d54ee053f (commit)

- Log -----------------------------------------------------------------
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=62e07f1cd82019c8cc5a493b8927db7d54ee053f

commit 62e07f1cd82019c8cc5a493b8927db7d54ee053f
Author: H.J. Lu <hjl.tools@gmail.com>
Date:   Thu Jan 14 12:49:13 2016 -0800

    Call math_opt_barrier inside if
    
    Since floating-point operation may trigger floating-point exceptions,
    we call math_opt_barrier inside if to prevent code motion.
    
    	[BZ #19465]
    	* sysdeps/ieee754/dbl-64/s_fma.c (__fma): Call math_opt_barrier
    	inside if.

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=54bf044cd7ff1944c5a59d2daa97abfa2fb31061

commit 54bf044cd7ff1944c5a59d2daa97abfa2fb31061
Author: H.J. Lu <hjl.tools@gmail.com>
Date:   Wed Jan 13 15:03:46 2016 -0800

    Avoid strdup/strndup/strsep

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=0227d76ce0799fea0eb5cc9862ad73ddfc13810e

commit 0227d76ce0799fea0eb5cc9862ad73ddfc13810e
Author: H.J. Lu <hjl.tools@gmail.com>
Date:   Wed Jan 13 14:10:34 2016 -0800

    Allow inline in sys/sysmacros.h when building glibc

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=0a9b3b93f0a0868c518af7ebcc5b9a8126c7e0e5

commit 0a9b3b93f0a0868c518af7ebcc5b9a8126c7e0e5
Author: H.J. Lu <hjl.tools@gmail.com>
Date:   Wed Jan 13 13:31:34 2016 -0800

    Include <bits/stdio.h> when building glibc

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=c0d2afe47ec858e0363c15bb92078ead8edecd7d

commit c0d2afe47ec858e0363c15bb92078ead8edecd7d
Author: H.J. Lu <hjl.tools@gmail.com>
Date:   Thu Jan 14 10:16:35 2016 -0800

    Compile x86 syscalls with -fomit-frame-pointer

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=91c5dfa432a6be078105f8aacf8acd0eb26de8f4

commit 91c5dfa432a6be078105f8aacf8acd0eb26de8f4
Author: H.J. Lu <hjl.tools@gmail.com>
Date:   Thu Jan 14 04:15:03 2016 -0800

    Use TIME_T_MAX and TIME_T_MIN in tst-mktime2.c
    
    GCC 5.3 compiles
    
    for (time_t_max = 1; 0 < time_t_max; time_t_max *= 2)
        continue;
    
    into an infinite loop with -Os.  We can copy TIME_T_MAX and TIME_T_MIN
    from time/mktime.c.
    
    	[BZ #19466]
    	* time/tst-mktime2.c (TYPE_SIGNED): New.
    	(TYPE_MINIMUM): Likewise.
    	(TYPE_MAXIMUM): Likewise.
    	(TIME_T_MIN): Likewise.
    	(TIME_T_MAX): Likewise.
    	(do_test): Initialize time_t_max and time_t_min with TIME_T_MAX
    	and TIME_T_MIN.

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=d00caa24e1fcda5e317e7dd825a4fa023aa27583

commit d00caa24e1fcda5e317e7dd825a4fa023aa27583
Author: H.J. Lu <hjl.tools@gmail.com>
Date:   Wed Jan 13 17:26:00 2016 -0800

    Add string_private.h to define _STRING_ARCH_unaligned
    
    _STRING_ARCH_unaligned is used unconditionally in glibc.  But
    <bits/string.h>, which defines _STRING_ARCH_unaligned, isn't
    included with -Os.  Since _STRING_ARCH_unaligned is internal to
    glibc and may change between glibc releases, it should be made
    private to glibc.  This patch adds string_private.h to define
    _STRING_ARCH_unaligned, which is included unconditionally from
    internal <string.h> for glibc build.
    
    	[BZ #19462]
    	* bits/string.h (_STRING_ARCH_unaligned): Removed.
    	* include/string.h: Include <string_private.h>.
    	* sysdeps/aarch64/bits/string.h: Renamed to ...
    	* sysdeps/aarch64/string_private.h: This.
    	* sysdeps/generic/string_private.h: New file.
    	* sysdeps/s390/string_private.h: Likewise.
    	* sysdeps/x86/string_private.h: Likewise.
    	* sysdeps/m68k/m680x0/m68020/bits/string.h: Renamed to ...
    	* sysdeps/m68k/m680x0/m68020/string_private.h: This.
    	* sysdeps/s390/bits/string.h (_STRING_ARCH_unaligned): Removed.
    	* sysdeps/sparc/bits/string.h (_STRING_ARCH_unaligned): Likewise.
    	* sysdeps/x86/bits/string.h (_STRING_ARCH_unaligned): Likewise.

-----------------------------------------------------------------------
Comment 5 Sourceware Commits 2016-01-15 17:01:19 UTC
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU C Library master sources".

The branch, hjl/pr19463 has been created
        at  3d27f14d247b988f3a226dce0112f7e0a69f5c30 (commit)

- Log -----------------------------------------------------------------
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=3d27f14d247b988f3a226dce0112f7e0a69f5c30

commit 3d27f14d247b988f3a226dce0112f7e0a69f5c30
Author: H.J. Lu <hjl.tools@gmail.com>
Date:   Wed Jan 13 15:03:46 2016 -0800

    Avoid strdup/strndup/strsep

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=f57d833a807aa443a89e54c518a64df1cdecbe77

commit f57d833a807aa443a89e54c518a64df1cdecbe77
Author: H.J. Lu <hjl.tools@gmail.com>
Date:   Wed Jan 13 14:10:34 2016 -0800

    Allow inline in sys/sysmacros.h when building glibc

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=ff10fdd4ef0df890c7fc55d2b3ee485adf3424fa

commit ff10fdd4ef0df890c7fc55d2b3ee485adf3424fa
Author: H.J. Lu <hjl.tools@gmail.com>
Date:   Wed Jan 13 13:31:34 2016 -0800

    Include <bits/stdio.h> when building glibc

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=82a543ffd097f4f5e60e898086f0bda2a647e37f

commit 82a543ffd097f4f5e60e898086f0bda2a647e37f
Author: H.J. Lu <hjl.tools@gmail.com>
Date:   Thu Jan 14 10:16:35 2016 -0800

    Compile x86 syscalls with -fomit-frame-pointer

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=0d32fcb814a7ea7e857a967e96e5c76205bd729b

commit 0d32fcb814a7ea7e857a967e96e5c76205bd729b
Author: H.J. Lu <hjl.tools@gmail.com>
Date:   Fri Jan 15 08:11:23 2016 -0800

    Add _STRING_INLINE_unaligned and string_private.h
    
    As discussed in
    
    https://sourceware.org/ml/libc-alpha/2015-10/msg00403.html
    
    the setting of _STRING_ARCH_unaligned currently controls the external
    GLIBC ABI as well as selecting the use of unaligned accesses withing
    GLIBC.
    
    Since _STRING_ARCH_unaligned was recently changed for AArch64, this
    would potentially break the ABI in GLIBC 2.23, so split the uses and add
    _STRING_INLINE_unaligned to select the string ABI. This setting must be
    fixed for each target, while _STRING_ARCH_unaligned may be changed from
    release to release.  _STRING_ARCH_unaligned is used unconditionally in
    glibc.  But <bits/string.h>, which defines _STRING_ARCH_unaligned, isn't
    included with -Os.  Since _STRING_ARCH_unaligned is internal to glibc and
    may change between glibc releases, it should be made private to glibc.
    _STRING_ARCH_unaligned should defined in the new string_private.h heade
    file which is included unconditionally from internal <string.h> for glibc
    build.
    
    2016-01-15  H.J. Lu  <hongjiu.lu@intel.com>
    	    Wilco Dijkstra  <wdijkstr@arm.com>
    
    	[BZ #19462]
    	* bits/string.h (_STRING_ARCH_unaligned): Renamed to ...
    	(_STRING_INLINE_unaligned): This.
    	* include/string.h: Include <string_private.h>.
    	* string/bits/string2.h: Replace _STRING_ARCH_unaligned with
    	_STRING_INLINE_unaligned.
    	* sysdeps/aarch64/bits/string.h (_STRING_ARCH_unaligned): Removed.
    	(_STRING_INLINE_unaligned): New.
    	* sysdeps/aarch64/string_private.h: New file.
    	* sysdeps/generic/string_private.h: Likewise.
    	* sysdeps/m68k/m680x0/m68020/string_private.h: Likewise.
    	* sysdeps/s390/string_private.h: Likewise.
    	* sysdeps/x86/string_private.h: Likewise.
    	* sysdeps/m68k/m680x0/m68020/bits/string.h
    	(_STRING_ARCH_unaligned): Renamed to ...
    	(_STRING_INLINE_unaligned): This.
    	* sysdeps/s390/bits/string.h (_STRING_ARCH_unaligned): Renamed
    	to ...
    	(_STRING_INLINE_unaligned): This.
    	* sysdeps/sparc/bits/string.h (_STRING_ARCH_unaligned): Renamed
    	to ...
    	(_STRING_INLINE_unaligned): This.
    	* sysdeps/x86/bits/string.h (_STRING_ARCH_unaligned): Renamed
    	to ...
    	(_STRING_INLINE_unaligned): This.

-----------------------------------------------------------------------
Comment 6 Sourceware Commits 2016-02-18 16:57:39 UTC
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU C Library master sources".

The branch, master has been updated
       via  16396c41deab45f715ffd813280d9d685b3b281e (commit)
      from  6400ae6ecf6376af230d3ec82a8541848d3239e9 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=16396c41deab45f715ffd813280d9d685b3b281e

commit 16396c41deab45f715ffd813280d9d685b3b281e
Author: H.J. Lu <hongjiu.lu@intel.com>
Date:   Thu Feb 18 11:00:33 2016 -0200

    Add _STRING_INLINE_unaligned and string_private.h
    
    As discussed in
    
    https://sourceware.org/ml/libc-alpha/2015-10/msg00403.html
    
    the setting of _STRING_ARCH_unaligned currently controls the external
    GLIBC ABI as well as selecting the use of unaligned accesses withing
    GLIBC.
    
    Since _STRING_ARCH_unaligned was recently changed for AArch64, this
    would potentially break the ABI in GLIBC 2.23, so split the uses and add
    _STRING_INLINE_unaligned to select the string ABI. This setting must be
    fixed for each target, while _STRING_ARCH_unaligned may be changed from
    release to release.  _STRING_ARCH_unaligned is used unconditionally in
    glibc.  But <bits/string.h>, which defines _STRING_ARCH_unaligned, isn't
    included with -Os.  Since _STRING_ARCH_unaligned is internal to glibc and
    may change between glibc releases, it should be made private to glibc.
    _STRING_ARCH_unaligned should defined in the new string_private.h heade
    file which is included unconditionally from internal <string.h> for glibc
    build.
    
    	[BZ #19462]
    	* bits/string.h (_STRING_ARCH_unaligned): Renamed to ...
    	(_STRING_INLINE_unaligned): This.
    	* include/string.h: Include <string_private.h>.
    	* string/bits/string2.h: Replace _STRING_ARCH_unaligned with
    	_STRING_INLINE_unaligned.
    	* sysdeps/aarch64/bits/string.h (_STRING_ARCH_unaligned): Removed.
    	(_STRING_INLINE_unaligned): New.
    	* sysdeps/aarch64/string_private.h: New file.
    	* sysdeps/generic/string_private.h: Likewise.
    	* sysdeps/m68k/m680x0/m68020/string_private.h: Likewise.
    	* sysdeps/s390/string_private.h: Likewise.
    	* sysdeps/x86/string_private.h: Likewise.
    	* sysdeps/m68k/m680x0/m68020/bits/string.h
    	(_STRING_ARCH_unaligned): Renamed to ...
    	(_STRING_INLINE_unaligned): This.
    	* sysdeps/s390/bits/string.h (_STRING_ARCH_unaligned): Renamed
    	to ...
    	(_STRING_INLINE_unaligned): This.
    	* sysdeps/sparc/bits/string.h (_STRING_ARCH_unaligned): Renamed
    	to ...
    	(_STRING_INLINE_unaligned): This.
    	* sysdeps/x86/bits/string.h (_STRING_ARCH_unaligned): Renamed
    	to ...
    	(_STRING_INLINE_unaligned): This.

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog                                   |   29 +++++++++++++++++++++++++++
 bits/string.h                               |    8 +++++-
 include/string.h                            |    3 ++
 string/bits/string2.h                       |   10 ++++----
 sysdeps/aarch64/bits/string.h               |    4 +-
 sysdeps/aarch64/string_private.h            |   20 ++++++++++++++++++
 sysdeps/generic/string_private.h            |   21 +++++++++++++++++++
 sysdeps/m68k/m680x0/m68020/bits/string.h    |    5 +--
 sysdeps/m68k/m680x0/m68020/string_private.h |   21 +++++++++++++++++++
 sysdeps/s390/bits/string.h                  |    4 +-
 sysdeps/s390/string_private.h               |   20 ++++++++++++++++++
 sysdeps/sparc/bits/string.h                 |    4 +-
 sysdeps/x86/bits/string.h                   |    4 +-
 sysdeps/x86/string_private.h                |   20 ++++++++++++++++++
 14 files changed, 155 insertions(+), 18 deletions(-)
 create mode 100644 sysdeps/aarch64/string_private.h
 create mode 100644 sysdeps/generic/string_private.h
 create mode 100644 sysdeps/m68k/m680x0/m68020/string_private.h
 create mode 100644 sysdeps/s390/string_private.h
 create mode 100644 sysdeps/x86/string_private.h
Comment 7 Adhemerval Zanella 2016-02-18 16:59:17 UTC
Fixed by 16396c41deab45f715ffd813280d9d685b3b281e