From patchwork Tue Sep 7 12:09:33 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?UmFwaGHDq2wgTcOpbG90dGU=?= X-Patchwork-Id: 1525305 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=mind.be header.i=@mind.be header.a=rsa-sha256 header.s=google header.b=FdzemWPi; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.buildroot.org (client-ip=2605:bc80:3010::133; helo=smtp2.osuosl.org; envelope-from=buildroot-bounces@lists.buildroot.org; receiver=) Received: from smtp2.osuosl.org (smtp2.osuosl.org [IPv6:2605:bc80:3010::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4H3kc600MMz9sf8 for ; Tue, 7 Sep 2021 22:10:13 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by smtp2.osuosl.org (Postfix) with ESMTP id 9EEA5404E4; Tue, 7 Sep 2021 12:10:10 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp2.osuosl.org ([127.0.0.1]) by localhost (smtp2.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 8xbcpeC1k8eS; Tue, 7 Sep 2021 12:10:09 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by smtp2.osuosl.org (Postfix) with ESMTP id 8290640235; Tue, 7 Sep 2021 12:10:08 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from smtp1.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id 399731BF334 for ; Tue, 7 Sep 2021 12:10:07 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id 29F9C82446 for ; Tue, 7 Sep 2021 12:10:07 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Authentication-Results: smtp1.osuosl.org (amavisd-new); dkim=pass (2048-bit key) header.d=mind.be Received: from smtp1.osuosl.org ([127.0.0.1]) by localhost (smtp1.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id zg8rO7YWteBC for ; Tue, 7 Sep 2021 12:10:06 +0000 (UTC) X-Greylist: whitelisted by SQLgrey-1.8.0 Received: from mail-ed1-x536.google.com (mail-ed1-x536.google.com [IPv6:2a00:1450:4864:20::536]) by smtp1.osuosl.org (Postfix) with ESMTPS id E954980AA4 for ; Tue, 7 Sep 2021 12:10:05 +0000 (UTC) Received: by mail-ed1-x536.google.com with SMTP id q3so13591770edt.5 for ; Tue, 07 Sep 2021 05:10:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mind.be; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=NtY6N4/mxYna1kF5OLaQLZtHJP1kdQapFkUKo6Ml2qo=; b=FdzemWPiczZhQx+dGlcZQs3xx6KHpPZP8f8fd6CmUeq11/eqjgNLAgtSYAXXTFwfCC jCJ1yrGkllUXI4FaXfiZADVy5wEz1hKtAVg8ssV0vot73GxRSkKrmLn/shkusckjnn6P Ls1hGWSZ6wtnIx3FDfSlXaJ70PG/SbhxngITD7LivPfew5DRceOX6T+FIZgqL8NKJEDJ 1uCkT3lxC3e3eiacuVaBAJrqc6s4YxnnOnxcdyz0vZoe730opFfvAtmbuXcNZ/JgTGyJ 8m1BNk32Guq9ctGgcd5kYoQKC+sCFKiligc5p4DZnSOjbLa2azPbBKmHWKLAlE6Fmpsr U6ng== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=NtY6N4/mxYna1kF5OLaQLZtHJP1kdQapFkUKo6Ml2qo=; b=K/4E+BVdWxkzw8JGCGJbGWTdTHfWI0tHKRj6fF3boUZnk3HZy5tI13QRLEeMxB730O AC51ODB2lqc8un4ki/knUcCXgotAJGtD/HmOLDzPck8u4xea3YidohZzL67dGag6shrP DqJS73iYL5vDEHVT+UxjtgV2PZfiOSvJopAW2NIFrAzyT+GDQDTy+zWut/fkjVJza5aW 3FYaZyyTd4uGaI9R/jzPz/w0Z9VmGobvWvdhp0WtuQH+EBOjlcSxTqCJs6Ng//xmXPn8 XU1rQSddFSyqyf2gCDbYmv3ppy9dAESSzTdieNG20NcUE6aMGRuarr1FAc2gKh/zAPaJ 2FRw== X-Gm-Message-State: AOAM530HLWKPkFX2Jo6OKByIek+wx1JCpxq6F+WEJwlT2hGeAh+m+wo0 f7Syu1+wJY7uT5vr4/KEMKrrYpEfJ/cDYdjv X-Google-Smtp-Source: ABdhPJx8enDS/fVUYulLEnygeeGF9XWtk/4TWyNk0PA8/6CQJNwqQfv3UjQBQqacFga89SCTZ+0LKw== X-Received: by 2002:a50:d09a:: with SMTP id v26mr18473557edd.346.1631016604165; Tue, 07 Sep 2021 05:10:04 -0700 (PDT) Received: from debian-hp-1.home (5.26-130-109.adsl-dyn.isp.belgacom.be. [109.130.26.5]) by smtp.gmail.com with ESMTPSA id gz22sm5538336ejb.15.2021.09.07.05.10.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Sep 2021 05:10:03 -0700 (PDT) From: =?utf-8?b?UmFwaGHDq2wgTcOpbG90dGU=?= To: buildroot@buildroot.org Date: Tue, 7 Sep 2021 14:09:33 +0200 Message-Id: <20210907120933.31647-1-raphael.melotte@mind.be> X-Mailer: git-send-email 2.32.0 MIME-Version: 1.0 Subject: [Buildroot] [PATCH 2/2] package/mupdf: fix building with some toolchains X-BeenThere: buildroot@lists.buildroot.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?utf-8?b?UmFwaGHDq2wgTcOpbG90dGU=?= Errors-To: buildroot-bounces@lists.buildroot.org Sender: "buildroot" With some toolchains (e.g. mips64el), partial linking fails in the following way: /tmp/instance-1/output-1/host/opt/ext-toolchain/bin/../lib/gcc/mips64el-buildroot-linux-uclibc/8.4.0/../../../../mips64el-buildroot-linux-uclibc/bin/ld: build/release/libmupdf.a(Dingbats.cff.o): ABI is incompatible with that of the selected emulation /tmp/instance-1/output-1/host/opt/ext-toolchain/bin/../lib/gcc/mips64el-buildroot-linux-uclibc/8.4.0/../../../../mips64el-buildroot-linux-uclibc/bin/ld: failed to merge target specific data of file build/release/libmupdf.a(Dingbats.cff.o) Taking inspiration from commit 9eca4b9f84fe2535d8caee6eeb062ce33733bdf1, fix it by using GCC instead of LD for partial linking. 'nostdlib' has to be added, or it will try to use GCC libraries for partial linking and fail with 'cannot find -lgcc_s'. Note that on mips the build will now produce warnings similar to this one: /home/rme/Documents/buildroot/output/host/lib/gcc/mips64el-buildroot-linux-gnu/10.3.0/../../../../mips64el-buildroot-linux-gnu/bin/ld: build/release/libmupdf.a(NotoSansTaiTham-Regular.ttf.o): warning: linking abicalls files with non-abicalls files During a runtime test on mips64el under qemu, mupdf-x11 was nonetheless able to display a sample PDF file correctly. This fixes the following build failures (and many similar ones): http://autobuild.buildroot.net/results/156fe9ee5f6dccdc98990f6c5de5562383bc2b74/ Signed-off-by: Raphaël Mélotte --- .../0001-use-gcc-instead-of-objcopy.patch | 29 +++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 package/mupdf/0001-use-gcc-instead-of-objcopy.patch diff --git a/package/mupdf/0001-use-gcc-instead-of-objcopy.patch b/package/mupdf/0001-use-gcc-instead-of-objcopy.patch new file mode 100644 index 0000000000..9a8dacbcca --- /dev/null +++ b/package/mupdf/0001-use-gcc-instead-of-objcopy.patch @@ -0,0 +1,29 @@ +From de27daedf8cb1d210b0b1facd87634c6aaaf1a74 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Rapha=C3=ABl=20M=C3=A9lotte?= +Date: Thu, 2 Sep 2021 20:17:26 +0200 +Subject: [PATCH] use gcc instead of objcopy +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Signed-off-by: Raphaël Mélotte +--- + Makefile | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/Makefile b/Makefile +index b0fb617e2..0a8795e0e 100644 +--- a/Makefile ++++ b/Makefile +@@ -64,7 +64,7 @@ endif + LINK_CMD = $(QUIET_LINK) $(MKTGTDIR) ; $(CC) $(LDFLAGS) -o $@ $^ $(LIBS) + TAGS_CMD = $(QUIET_TAGS) ctags -R --c-kinds=+p + WINDRES_CMD = $(QUIET_WINDRES) $(MKTGTDIR) ; $(WINDRES) $< $@ +-OBJCOPY_CMD = $(QUIET_OBJCOPY) $(MKTGTDIR) ; $(LD) -r -b binary -z noexecstack -o $@ $< ++OBJCOPY_CMD = $(QUIET_OBJCOPY) $(MKTGTDIR) ; $(CC) -Wl,-r -Wl,-b -Wl,binary -Wl,-z -Wl,noexecstack -nostdlib -o $@ $< + + # --- Rules --- + +-- +2.32.0 +