From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-10.1 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 12B91C43331 for ; Thu, 26 Mar 2020 08:04:06 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id DDA9B2083E for ; Thu, 26 Mar 2020 08:04:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1585209845; bh=HIhgaxcp3DLB+hHhS9LmUeNd9h0mfeUoyO0vnBgLWZE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=V2KrNqdUFOoHMOIiRkZbtkwll9Kh0JfaZBWT9LbLVjZcajXvv30RepMlp0MEvLJyo 6eiB5ISyMpuLlr9gmQ5IipLqzdCtL2xIOTql9o4fYiO7zugakIUmKqVEi6FJx30kN6 0lhmrLwwBPJ+b6eB4GMxHAG3J1NPvb1Z1wTNDkw0= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727869AbgCZIEE (ORCPT ); Thu, 26 Mar 2020 04:04:04 -0400 Received: from conuserg-11.nifty.com ([210.131.2.78]:18867 "EHLO conuserg-11.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727809AbgCZID4 (ORCPT ); Thu, 26 Mar 2020 04:03:56 -0400 Received: from pug.e01.socionext.com (p14092-ipngnfx01kyoto.kyoto.ocn.ne.jp [153.142.97.92]) (authenticated) by conuserg-11.nifty.com with ESMTP id 02Q81WpU002183; Thu, 26 Mar 2020 17:01:35 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-11.nifty.com 02Q81WpU002183 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1585209696; bh=oOjb9pPYS7LdRFAdDN6Ik8bWPmCh/WjUa0CZHnPToFo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=OiXXcS8A9j9/o2Q9A5ztEUoQHYVweNe6L/EALraV3KsGgmlFF5zF9Wq7QxsuXBpyg mGveeH6pdmeJcp+XVPwwPhkRbkIm6hmPiDolrj3IgrdelcZNjWRCX4geCncZgI6/Oa Rydv55HbE/lCMv9TL6F5BEWzBqA+i/TgbcsL+CjfpS1s5T6oq3mUdsdNbXKQ+IZBSw FOQcNMxO66Fh+BhM7SQMbB5d8iDFoka7mp+c8/TIp4Uz/BEvomX7CtWkma7nYBG91c 9x9ozosmoGb6x67jaqb7YHI0By237VMDUSzTnPFRcFhnLHK3qGk8ejJeK365w7PJD6 5QHsobPwo4U7g== X-Nifty-SrcIP: [153.142.97.92] From: Masahiro Yamada To: linux-kbuild@vger.kernel.org Cc: Thomas Gleixner , Nick Desaulniers , Borislav Petkov , Peter Zijlstra , "H . Peter Anvin" , x86@kernel.org, "Jason A . Donenfeld" , clang-built-linux@googlegroups.com, Masahiro Yamada , Jim Kukunas , NeilBrown , Yuanhan Liu , linux-kernel@vger.kernel.org Subject: [PATCH v2 01/16] lib/raid6/test: fix build on distros whose /bin/sh is not bash Date: Thu, 26 Mar 2020 17:00:49 +0900 Message-Id: <20200326080104.27286-2-masahiroy@kernel.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200326080104.27286-1-masahiroy@kernel.org> References: <20200326080104.27286-1-masahiroy@kernel.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org You can build a test program to test raid6 library code from user-space, like this: $ cd lib/raid6/test $ make The command in $(shell ...) function is evaluated by /bin/sh by default. (or, you can specify the shell by passing SHELL= from command line) Currently '>&/dev/null' is used to sink both stdout and stderr. Because this code is bash-ism, it only works when /bin/sh is a symbolic link to bash (this is the case on RHEL etc.) This does not work on Ubuntu where /bin/sh is a symbolic link to dash. I see lots of /bin/sh: 1: Syntax error: Bad fd number and warning "your version of binutils lacks ... support" Replace it with portable '>/dev/null 2>&1'. Fixes: 4f8c55c5ad49 ("lib/raid6: build proper files on corresponding arch") Signed-off-by: Masahiro Yamada Acked-by: H. Peter Anvin (Intel) --- Changes in v2: None lib/raid6/test/Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/raid6/test/Makefile b/lib/raid6/test/Makefile index 3ab8720aa2f8..b9e6c3648be1 100644 --- a/lib/raid6/test/Makefile +++ b/lib/raid6/test/Makefile @@ -35,13 +35,13 @@ endif ifeq ($(IS_X86),yes) OBJS += mmx.o sse1.o sse2.o avx2.o recov_ssse3.o recov_avx2.o avx512.o recov_avx512.o CFLAGS += $(shell echo "pshufb %xmm0, %xmm0" | \ - gcc -c -x assembler - >&/dev/null && \ + gcc -c -x assembler - >/dev/null 2>&1 && \ rm ./-.o && echo -DCONFIG_AS_SSSE3=1) CFLAGS += $(shell echo "vpbroadcastb %xmm0, %ymm1" | \ - gcc -c -x assembler - >&/dev/null && \ + gcc -c -x assembler - >/dev/null 2>&1 && \ rm ./-.o && echo -DCONFIG_AS_AVX2=1) CFLAGS += $(shell echo "vpmovm2b %k1, %zmm5" | \ - gcc -c -x assembler - >&/dev/null && \ + gcc -c -x assembler - >/dev/null 2>&1 && \ rm ./-.o && echo -DCONFIG_AS_AVX512=1) else ifeq ($(HAS_NEON),yes) OBJS += neon.o neon1.o neon2.o neon4.o neon8.o recov_neon.o recov_neon_inner.o -- 2.17.1