From patchwork Thu Dec 26 22:09:20 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabrice Fontaine X-Patchwork-Id: 1215572 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=busybox.net (client-ip=140.211.166.137; helo=fraxinus.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="OmjfW9Ku"; dkim-atps=neutral Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 47kPH51L8xz9sPK for ; Fri, 27 Dec 2019 09:08:32 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id BED5F8525D; Thu, 26 Dec 2019 22:08:30 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id yWBudbnSTVyN; Thu, 26 Dec 2019 22:08:30 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by fraxinus.osuosl.org (Postfix) with ESMTP id 2371185247; Thu, 26 Dec 2019 22:08:30 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) by ash.osuosl.org (Postfix) with ESMTP id B8B7C1BF3BD for ; Thu, 26 Dec 2019 22:08:28 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id B2C6285247 for ; Thu, 26 Dec 2019 22:08:28 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id YYRWV2sf5DEH for ; Thu, 26 Dec 2019 22:08:28 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wr1-f41.google.com (mail-wr1-f41.google.com [209.85.221.41]) by fraxinus.osuosl.org (Postfix) with ESMTPS id B8A8185193 for ; Thu, 26 Dec 2019 22:08:27 +0000 (UTC) Received: by mail-wr1-f41.google.com with SMTP id q6so24589766wro.9 for ; Thu, 26 Dec 2019 14:08:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=H7Vii0zs0o/72hyMYDZDBdt7WtYoSKanYC8Pc/lWkVo=; b=OmjfW9KugV9rjdNrVhOfy41LslBENYQogI0iuzTeqemJryOOdIzQRWGRJoT+lUM/BR 4sT8H/nu626t37MfmenNLXjdsLcUWengrKxuMwIxGmLmKqQWO3j2RK4VWUs+nY3Kuxer f/Yc/dOIHImTbdIuKYPMFlKQiGFN/0nfg+kmOi5vPFXxPVcriX0kMgjapkCadrcx7myQ sJUGXn9GCZOyjlgjKlTYRNImbi78YqGonmEbFzFeCwNr85sTtVyubH/xi9qiAJw4sDRi LRjjMyZhHVPrptNEJxnLTePiBPWw8iEGWUfjeIga8UnxuXlPj5AUpZAMi70fwOQy/HJi RTCA== 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=H7Vii0zs0o/72hyMYDZDBdt7WtYoSKanYC8Pc/lWkVo=; b=OtbIREKvziBCDfNLI5tRJmHukxuddsfKN+K7sFBh/MMphuGinCot90hZNa2VkZCqot LNu37TlroL18Vaz746yt094Lyt3hhhYPPDZFB+GCVtXjwbp/wLFDI153undQYy3kbeip ooHoqqOxttNjXMg5klH5bCaKXPRf8gyPvR2OTFZZFLLJOWtyv7/2+Z3ndFQkl+LULVVu Vjs6uDN2wLQpnfwQ9Abui69kOZ9Z34TCIwrzdnlZnR+XCndaC0vcxmCnE4CTB0s+oEPQ fCPL1aXHIz/Pzc7omKLy+DTA8XyJ9LNQnCZBnEgQYM+Ur+L9aKvzFycAxaEXi2EOTF/V 9HDg== X-Gm-Message-State: APjAAAViwjPIxiI3+Ffu2MkvNCzhHejSFcE1Nsp5krKE4dRLzo9tWf88 7c0JDTGazGmKCfNwKlKzPJufgHBS X-Google-Smtp-Source: APXvYqy2Z+JLMZe02Z4uuMIns0Y5c0jL4vxtaKRCcMm3q/O8K6NkB3546HVWcmXQbxJ/+1QiBw+rBw== X-Received: by 2002:adf:f8c8:: with SMTP id f8mr45638585wrq.331.1577398105852; Thu, 26 Dec 2019 14:08:25 -0800 (PST) Received: from kali.home (lfbn-ren-1-602-70.w81-53.abo.wanadoo.fr. [81.53.179.70]) by smtp.gmail.com with ESMTPSA id j2sm9688717wmk.23.2019.12.26.14.08.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 26 Dec 2019 14:08:25 -0800 (PST) From: Fabrice Fontaine To: buildroot@buildroot.org Date: Thu, 26 Dec 2019 23:09:20 +0100 Message-Id: <20191226220920.261056-1-fontaine.fabrice@gmail.com> X-Mailer: git-send-email 2.24.0 MIME-Version: 1.0 Subject: [Buildroot] [PATCH 1/1] package/libffi: fix build on powerpc64 with no __int128 X-BeenThere: buildroot@busybox.net 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: Fabrice Fontaine , Thomas Petazzoni Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" Fixes: - http://autobuild.buildroot.net/results/cb69d82ad1d41f6ea13d289ec2226d9bd5b67984 Signed-off-by: Fabrice Fontaine --- ...6-Address-platforms-with-no-__int128.patch | 28 +++++++++++++ ...y-to-help-platforms-with-no-__int128.patch | 42 +++++++++++++++++++ 2 files changed, 70 insertions(+) create mode 100644 package/libffi/0006-Address-platforms-with-no-__int128.patch create mode 100644 package/libffi/0007-powerpc64-Use-memcpy-to-help-platforms-with-no-__int128.patch diff --git a/package/libffi/0006-Address-platforms-with-no-__int128.patch b/package/libffi/0006-Address-platforms-with-no-__int128.patch new file mode 100644 index 0000000000..012c6f0dae --- /dev/null +++ b/package/libffi/0006-Address-platforms-with-no-__int128.patch @@ -0,0 +1,28 @@ +From 6663047f56c2932a6b10a790f4ac6666dd181326 Mon Sep 17 00:00:00 2001 +From: Anthony Green +Date: Fri, 29 Nov 2019 07:00:35 -0500 +Subject: [PATCH] Address platforms with no __int128. + +[Retrieved from: +https://github.com/libffi/libffi/commit/6663047f56c2932a6b10a790f4ac6666dd181326] +Signed-off-by: Fabrice Fontaine +--- + src/powerpc/ffi_linux64.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/src/powerpc/ffi_linux64.c b/src/powerpc/ffi_linux64.c +index de0d0337..73647701 100644 +--- a/src/powerpc/ffi_linux64.c ++++ b/src/powerpc/ffi_linux64.c +@@ -547,9 +547,9 @@ ffi_prep_args64 (extended_cif *ecif, unsigned long *const stack) + if (next_arg.ul == gpr_end.ul) + next_arg.ul = rest.ul; + if (vecarg_count < NUM_VEC_ARG_REGISTERS64 && i < nfixedargs) +- *vec_base.f128++ = **p_argv.f128; ++ memcpy (vec_base.f128++, *p_argv.f128, sizeof (float128)); + else +- *next_arg.f128 = **p_argv.f128; ++ memcpy (next_arg.f128, *p_argv.f128, sizeof (float128)); + if (++next_arg.f128 == gpr_end.f128) + next_arg.f128 = rest.f128; + vecarg_count++; diff --git a/package/libffi/0007-powerpc64-Use-memcpy-to-help-platforms-with-no-__int128.patch b/package/libffi/0007-powerpc64-Use-memcpy-to-help-platforms-with-no-__int128.patch new file mode 100644 index 0000000000..53036707d2 --- /dev/null +++ b/package/libffi/0007-powerpc64-Use-memcpy-to-help-platforms-with-no-__int128.patch @@ -0,0 +1,42 @@ +From e50b9ef8b910fa642ef158f6642e60d54d7ad740 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Sat, 7 Dec 2019 02:34:14 -0800 +Subject: [PATCH] powerpc64: Use memcpy to help platforms with no __int128. + (#534) + +Signed-off-by: Khem Raj +[Retrieved from: +https://github.com/libffi/libffi/commit/e50b9ef8b910fa642ef158f6642e60d54d7ad740] +Signed-off-by: Fabrice Fontaine +--- + src/powerpc/ffi_linux64.c | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +diff --git a/src/powerpc/ffi_linux64.c b/src/powerpc/ffi_linux64.c +index 73647701..4d50878e 100644 +--- a/src/powerpc/ffi_linux64.c ++++ b/src/powerpc/ffi_linux64.c +@@ -680,9 +680,9 @@ ffi_prep_args64 (extended_cif *ecif, unsigned long *const stack) + { + if (vecarg_count < NUM_VEC_ARG_REGISTERS64 + && i < nfixedargs) +- *vec_base.f128++ = *arg.f128++; ++ memcpy (vec_base.f128++, arg.f128, sizeof (float128)); + else +- *next_arg.f128 = *arg.f128++; ++ memcpy (next_arg.f128, arg.f128++, sizeof (float128)); + if (++next_arg.f128 == gpr_end.f128) + next_arg.f128 = rest.f128; + vecarg_count++; +@@ -986,9 +986,9 @@ ffi_closure_helper_LINUX64 (ffi_cif *cif, + do + { + if (pvec < end_pvec && i < nfixedargs) +- *to.f128 = *pvec++; ++ memcpy (to.f128, pvec++, sizeof (float128)); + else +- *to.f128 = *from.f128; ++ memcpy (to.f128, from.f128, sizeof (float128)); + to.f128++; + from.f128++; + }