From patchwork Mon Jan 29 22:07:10 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrea Adami X-Patchwork-Id: 867331 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.infradead.org (client-ip=65.50.211.133; helo=bombadil.infradead.org; envelope-from=linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="qs2V6cPe"; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="kAeJk0Ju"; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3zVkCN6cWgz9s71 for ; Tue, 30 Jan 2018 09:07:44 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To: References:List-Owner; bh=vufJNbVF6JN11teKQUv0PEmV9d0jN8l75FqEKkyR8MA=; b=qs2 V6cPe1xaW9Sbnw6PfTG9D1kBjwoUmxetSm7xcWRcodBsfLi3+75b0Gmdt9DXQRZ15IWp87gPew7jP u00RVLMT0xYB7ci7FUJ2cqN/Or8uV9ixoIyAP13/bmBTx95d3wkGMqMJcjNHjV+LLjWS4pff9HT+v 1MrW55lUUEo7i9+xjM+3lADK09AEUvLdU+yZOYU0XDi1WCkXecicx0x1AMiTHLOvpKvoUbTj6zkY/ MNtCmamNC2shyv9TT+t5FI7TBeHlOdMMdxHUPcvfQn1P1P14qUKlPsLTS1cJBbn+pN0e8HEyAP0jM rSj2pc0dMlZ+4oSvt7dp0SyJEEIqGIg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.89 #1 (Red Hat Linux)) id 1egHaV-0001EH-J0; Mon, 29 Jan 2018 22:07:39 +0000 Received: from mail-wm0-x243.google.com ([2a00:1450:400c:c09::243]) by bombadil.infradead.org with esmtps (Exim 4.89 #1 (Red Hat Linux)) id 1egHaJ-00010M-GM for linux-mtd@lists.infradead.org; Mon, 29 Jan 2018 22:07:29 +0000 Received: by mail-wm0-x243.google.com with SMTP id r71so17340442wmd.1 for ; Mon, 29 Jan 2018 14:07:15 -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; bh=T/QbpWyKjfabxzXkaeY2LsOFh2J3R7Osdp/5/lxHxZo=; b=kAeJk0JuBS3/zDp0w2QbGO80T/G6VsWFVusfYwAxBJduZQhpmSccon6Xk3mHRE9UGt T2qy0e/shC+hSixYtfvKZcHz4y01AnNr5RVZGF2LM0qeS6p+w56qy4skfviQe5AeoOc1 gccm9D7TbrcAfmuZjFrqdnNICSzOsd3p7ygUl3YTmJUX6KxRq+Bzqi6IDKu7dRO62On/ 5pef06E+tL7cFMFNgw+iocaVJW1t5da15c+rQfWFQIoio1e2waPGr3p0BwJwNmrkBa4T d/QlWeWF2vtDJfXLrMRnk8LS2VV/GBPFIHXsHvDuif5bFTM50pihWKn8eaIp/nllRKIk iaaQ== 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; bh=T/QbpWyKjfabxzXkaeY2LsOFh2J3R7Osdp/5/lxHxZo=; b=c6H5zzbxIsdrPOJz+TMWeYmACibbNxXyR8xXGuDWcXvCPlysXumj6kdrek6kkAks2L IfsJDVo1iKYOh3u+thPZbkdEvjMtVbH3ecv2aW6o4/fwPs6HuC/c3e6Uj66II8/aLPiB +yyXoFs4ura1zld0sbXDZ4TREvf+lRyC7swoUp4ZcCVh8cthbvhYvPvPAxazRuijKjax 2/Chv+7H7j9jmQzw9tgE9ZdPpv8eUaljjEJFST4vg+ncCt1lcpVlLDoBIfjEm5aYAkBL h3KrWjs/1enqst7udiQjPSeLVSnpb1ylwMHvKGXoKuGzGsD/iMjK5zRjogdhYFXdVK/i KDjA== X-Gm-Message-State: AKwxytcrd2FPmUqSVYAXgabYQVyYbcBpXHvvUIXC0lSSjrJWRYAz9yEQ 43nWYnVRpG11QF8aE7SVc/4ADA== X-Google-Smtp-Source: AH8x224Aab0LpWT3nnQrQ4O8TbGErBOLdeh2lGhdhsGhBO/rxFGFZ6UfdXqqtMu6Q8FogPtAqhZZKA== X-Received: by 10.28.107.25 with SMTP id g25mr4217463wmc.4.1517263633808; Mon, 29 Jan 2018 14:07:13 -0800 (PST) Received: from andrea-ThinkPad-T520.homenet.telecomitalia.it (host57-10-dynamic.248-95-r.retail.telecomitalia.it. [95.248.10.57]) by smtp.gmail.com with ESMTPSA id v22sm13334832wra.58.2018.01.29.14.07.12 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 29 Jan 2018 14:07:12 -0800 (PST) From: Andrea Adami To: linux-mtd@lists.infradead.org Subject: [PATCH v2 0/2] mtd-utils: improve compatibility with klibc Date: Mon, 29 Jan 2018 23:07:10 +0100 Message-Id: <1517263632-11126-1-git-send-email-andrea.adami@gmail.com> X-Mailer: git-send-email 2.7.4 X-Spam-Note: CRM114 invocation failed X-Spam-Score: -2.0 (--) X-Spam-Report: SpamAssassin version 3.4.1 on bombadil.infradead.org summary: Content analysis details: (-2.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [2a00:1450:400c:c09:0:0:0:243 listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (andrea.adami[at]gmail.com) -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid X-BeenThere: linux-mtd@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: David Oberhollenzer MIME-Version: 1.0 Sender: "linux-mtd" Errors-To: linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org Klibc does not support floating point calculations. Here some fixes needed to build the ubi-utils against klibc for aarch64, without FPU. These lines end up compiled with soft float for other arm targets w/out FPU thus this was discovered only cross-building for qemuarm64 using the flag '-mgeneral-regs-only'. Changes tested on armv5, same output is printed. v2 fixes compiler warnings (-Wformat) about printf(). Andrea Adami (2): mtd-utils: common.c: convert to integer arithmetic ubi-utils: ubiformat.c: convert to integer arithmetic lib/common.c | 18 ++++++++++++------ ubi-utils/ubiformat.c | 2 +- 2 files changed, 13 insertions(+), 7 deletions(-)