• Bug#851867: glibc: Please clone sysdeps from sh4 for sh3

    From John Paul Adrian Glaubitz@21:1/5 to All on Thu Jan 19 14:40:03 2017
    XPost: linux.debian.bugs.dist, linux.debian.maint.glibc

    This is a multi-part MIME message sent by reportbug.


    Source: glibc
    Version: 2.24-9
    Severity: wishlist
    Tags: patch
    User: helmutg@debian.org
    Usertags: rebootstrap

    Hi!

    While bootstrapping for sh3 using rebootstrap, I ran into the same problem
    we previously had with glibc on sh4:

    /tmp/buildd/glibc2/glibc-2.24/build-tree/sh3-libc/elf/dl-allobjs.os:/tmp/buildd/glibc2/glibc-2.24/elf/dl-open.c:756: first defined here
    /tmp/buildd/glibc2/glibc-2.24/build-tree/sh3-libc/libc_pic.a(init-first.os):(.data+0x0): multiple definition of `__libc_multiple_libcs'
    /tmp/buildd/glibc2/glibc-2.24/build-tree/sh3-libc/elf/dl-allobjs.os:/tmp/buildd/glibc2/glibc-2.24/elf/rtld.c:647: first defined here
    /tmp/buildd/glibc2/glibc-2.24/build-tree/sh3-libc/libc_pic.a(_itoa.os): In function `_itoa':
    /tmp/buildd/glibc2/glibc-2.24/stdio-common/_itoa.c:196: multiple definition of `_itoa'

    This is trivially fixed by cloning debian/sysdeps/sh4.mk to debian/sysdeps/sh3.mk
    which is what the attached patch does.

    Thanks,
    Adrian

    --
    .''`. John Paul Adrian Glaubitz
    : :' : Debian Developer - glaubitz@debian.org
    `. `' Freie Universitaet Berlin - glaubitz@physik.fu-berlin.de
    `- GPG: 62FF 8A75 84E0 2956 9546 0006 7426 3B37 F5B5 F913

    From e547ed5acb70dba2d476a32f0f146b1d3c9fe8ff Mon Sep 17 00:00:00 2001
    From: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
    Date: Thu, 19 Jan 2017 14:29:23 +0100
    Subject: [PATCH] Clone sysdeps/sh4.mk for sh3.

    Signed-off-by: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
    ---
    debian/sysdeps/sh3.mk | 7 +++++++
    1 file changed, 7 insertions(+)
    create mode 100644 debian/sysdeps/sh3.mk

    diff --git a/debian/sysdeps/sh3.mk b/debian/sysdeps/sh3.mk
    new file mode 100644
    index 00000000..412008c9
    --- /dev/null
    +++ b/debian/sysdeps/sh3.mk
    @@ -0,0 +1,7 @@
    +# Renesas SH enabled -ffinte-math-only. Some software need -mieee. +extra_cflags = -mieee
    +
    +# GCC 5 and later emits calls to abort() when there is no target specific
    +# __builtin_trap() implementation. This is not possible to do so in ld.so
    +# so we need to pass the -fno-delete-null-pointer-checks option to GCC. +extra_cflags += -fno-delete-null-pointer-checks
    --
    2.11.0

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)