X-Original-To: alpine-aports@lists.alpinelinux.org Received: from mx7.valuehost.ru (mx7.valuehost.ru [217.112.42.214]) by lists.alpinelinux.org (Postfix) with ESMTP id 795C75C5563 for ; Fri, 10 Aug 2018 13:46:17 +0000 (GMT) Received: from mx7.valuehost.ru (localhost.valuehost.ru [127.0.0.1]) by mx7.valuehost.ru (Postfix) with ESMTP id 2C8B62EC18 for ; Fri, 10 Aug 2018 16:46:15 +0300 (MSK) Date: Fri, 10 Aug 2018 16:46:25 +0300 From: Mobile Stream X-Priority: 3 (Normal) Message-ID: <1759810645.20180810164625@mobile-stream.com> To: alpine-aports@lists.alpinelinux.org Subject: [alpine-aports] [PATCH] main/tar: avoid using broken code in cross build X-Mailinglist: alpine-aports Precedence: list List-Id: Alpine Development List-Unsubscribe: List-Post: List-Help: List-Subscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit The tar cross-compile logic fails to detect no-clobber properties of gettimeofday and tzset functions and replaces them and some dependent calls with the code from the bundled GNU portability library (tar-130/gnu/). This includes the apparently broken rpl_gmtime/rpl_localtime code from tar-130/gnu/localtime-buffer.c which on armhf ends up as: 0004578c : 4578c: e92d4010 push {r4, lr} 45790: ebfffffd bl 4578c 45794: e59f3018 ldr r3, [pc, #24] ; 457b4 45798: e59f2018 ldr r2, [pc, #24] ; 457b8 4579c: e08f3003 add r3, pc, r3 457a0: e5931000 ldr r1, [r3] 457a4: e08f2002 add r2, pc, r2 457a8: e1510002 cmp r1, r2 457ac: 05830000 streq r0, [r3] 457b0: e8bd8010 pop {r4, pc} 457b4: 0002ff1c .word 0x0002ff1c 457b8: 00030858 .word 0x00030858 The proper fix should be in gnulib (i.e. recognize musl libc as done with glibc) however the APKBUILD change is simpler and easier to remove when/if upstream fixes the problem. --- main/tar/APKBUILD | 2 ++ 1 file changed, 2 insertions(+) diff --git a/main/tar/APKBUILD b/main/tar/APKBUILD index 02220a1652..cd710503be 100644 --- a/main/tar/APKBUILD +++ b/main/tar/APKBUILD @@ -29,6 +29,8 @@ prepare() { build() { cd "$_builddir" + gl_cv_func_gettimeofday_clobber=no \ + gl_cv_func_tzset_clobber=no \ ./configure \ --build=$CBUILD \ --host=$CHOST \ -- 2.18.0 --- Unsubscribe: alpine-aports+unsubscribe@lists.alpinelinux.org Help: alpine-aports+help@lists.alpinelinux.org ---