Received: by 2002:a25:683:0:0:0:0:0 with SMTP id 125csp337348ybg; Wed, 10 Jun 2020 02:04:29 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxX9AV//k+9jRVuRIxHSOW09QFH29dsWnt0CqgnBKoapiODBsBXVoIkPE9WCZ4udf/7yxuY X-Received: by 2002:a05:6402:1d0d:: with SMTP id dg13mr1548260edb.146.1591779868708; Wed, 10 Jun 2020 02:04:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591779868; cv=none; d=google.com; s=arc-20160816; b=JAOYo1i9TkQh7Q5c129JJ8NzsHBc0V6FgVkXjrDd7389K9vb46a7suFypUHg0FO0v/ 1NErHMZ8nrKw33EFBvBm6B1ufP3odCi4a82pIyy3Wubzv+I//FAIrK9Bzafmt6H+1WKZ TOf6JBN7PzPTU2QhQkkxBVsHpf9BcsINldse5gniKClSGR6GQJHxgSyAjPlPSDhd67KQ olUiY1W3IWcdXIWdfEY3JJbYQSffmsjAiQ/8NZv7UNOKt5+ahbJa90NWft9B0idFtHK+ dASecK0Glj59DpHTiKiGZ/nVbd9SiVL6GNpYN6ul0FSirCK/s58YmsC151w35ck4L61s +XWQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=LHb9HPZL9XpTtc79yClOxL66RppszWEIptQMEpe4Jo4=; b=UQT10c3wSvz8lieTiW1nlbotIJWVZKoH9Xi1XgcZQyK8QdJUnjmdUu8zOh+9QVkky+ O5hdrVSaURgO8fDZ5Capzk868v4MUg0QNrzpeEB5bZau4Z8ltTbtbFSOPipzKcVKmXnL JhDVAKDE33S43lKphnqsBhF3ZaBAOZrk67i5XHzCzUdMcr2GF3EooqJ1tC/gYJdJg1XK HlaZAqSAztmLoj4mb/NvdmRYFvhCtAauv0e4g6ZtiwdSiKFJ5pcGllEErHFB19CYEVto ToITPvtpBBz40xW9hcRNsgNHznYKqkzb5xHsqL3n4MHywr3c+f4LGrXTXKrfismPuylw Xpmw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Qz5SJTsY; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id si8si12219166ejb.7.2020.06.10.02.04.05; Wed, 10 Jun 2020 02:04:28 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Qz5SJTsY; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726992AbgFJI7g (ORCPT + 99 others); Wed, 10 Jun 2020 04:59:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40682 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726794AbgFJI7f (ORCPT ); Wed, 10 Jun 2020 04:59:35 -0400 Received: from mail-oo1-xc42.google.com (mail-oo1-xc42.google.com [IPv6:2607:f8b0:4864:20::c42]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6920AC03E96B; Wed, 10 Jun 2020 01:59:35 -0700 (PDT) Received: by mail-oo1-xc42.google.com with SMTP id z145so329854ooa.13; Wed, 10 Jun 2020 01:59:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to; bh=LHb9HPZL9XpTtc79yClOxL66RppszWEIptQMEpe4Jo4=; b=Qz5SJTsYGPnNegFFvLPl5enPu1KXc0mJKyVeSiX64zDTlEJGAFj9IfRDTfR78e8qyQ jz4NJ6u2SaKpQLixBSxkjxHnAVt9HTtsojZUll1B3ioG0N2T9urVFb954PYcDGknzINs 9nBpsqGN2iGvFfiUfiARYJ0D5RBsh9A7Xue7MTK0VdJ0apzN3yrgpJMR0dEVKIZ+01O+ 4sAxpRm4PYpPrcdInmhnCPTLCUDz1akYubPfvzwOuimqmALKLFUGhSuLULHHAj+a+Vq+ M0Vl+cRrNRTujRZIMCg4ozY47ndu6XXlkzxLVK2fC+MN4N9OOAVgjsbx+WrYFKK2CZIc qfQw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to; bh=LHb9HPZL9XpTtc79yClOxL66RppszWEIptQMEpe4Jo4=; b=Hk+HOhnvta1ozVO3JFfsF59j9SHyyqOfKwCn7++4TBO1Lkh793KG2EjsHRxrYj1FOD Ne6NIAu4H64g8mjaX/+0FINdw8U2YS4gFh0VGQXCGztA6Pxb4njGk9YcAKIwGfLkdt8t HC3Au1IZeREMRQN4QO42fm+EJyb2anOdNJpU9lkz6qo+Y6IDAQLEw8PVDK5XVy3y/kIP h0kCMPlQx07qZxjOXCE7OBJ3bogv5Cm6i4wWAuPnjjMRO8XOPIIOEOegZ3e1wzeBJxS9 F7xjFjBUq5cNLSNeJ8EJMB7Lanb/aeKMj55iszjaLrS8uydb2y1Zl8i1+4OQ0KTHCDgm 00RA== X-Gm-Message-State: AOAM532+gbylOqC1/bWd6k3VXhLn2J70l2ZPWXlCWKtjcgoL0CC/03RE aIciQ4U39iN1Lnpt1Uim2Ds= X-Received: by 2002:a4a:c501:: with SMTP id i1mr1556787ooq.65.1591779574587; Wed, 10 Jun 2020 01:59:34 -0700 (PDT) Received: from ubuntu-n2-xlarge-x86 ([2604:1380:4111:8b00::3]) by smtp.gmail.com with ESMTPSA id t11sm2764868otr.65.2020.06.10.01.59.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Jun 2020 01:59:34 -0700 (PDT) Date: Wed, 10 Jun 2020 01:59:32 -0700 From: Nathan Chancellor To: Zhenzhong Duan Cc: linux-kernel@vger.kernel.org, linux-efi@vger.kernel.org, ardb@kernel.org, nivedita@alum.mit.edu, keescook@chromium.org, mingo@kernel.org, clang-built-linux@googlegroups.com Subject: Re: [PATCH] efi/libstub: Fix build error with libstub Message-ID: <20200610085932.GA461993@ubuntu-n2-xlarge-x86> References: <20200610071446.3737-1-zhenzhong.duan@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20200610071446.3737-1-zhenzhong.duan@gmail.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jun 10, 2020 at 03:14:46PM +0800, Zhenzhong Duan wrote: > Got below error during build: > > In file included from drivers/firmware/efi/libstub/efi-stub-helper.c:16:0: > drivers/firmware/efi/libstub/efi-stub-helper.c: In function ‘efi_char16_puts’: > arch/x86/include/asm/efi.h:355:3: sorry, unimplemented: ms_abi attribute requires -maccumulate-outgoing-args or subtarget optimization implying it > : __efi64_thunk_map(inst, func, inst, ##__VA_ARGS__)) > ^ > drivers/firmware/efi/libstub/efi-stub-helper.c:37:2: note: in expansion of macro ‘efi_call_proto’ > efi_call_proto(efi_table_attr(efi_system_table, con_out), > ^ > drivers/firmware/efi/libstub/efi-stub-helper.c:37: confused by earlier errors, bailing out > > Fix it by adding -maccumulate-outgoing-args for efi libstub build > as suggested by gcc. > > Signed-off-by: Zhenzhong Duan > --- > drivers/firmware/efi/libstub/Makefile | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/firmware/efi/libstub/Makefile b/drivers/firmware/efi/libstub/Makefile > index cce4a74..25e5d02 100644 > --- a/drivers/firmware/efi/libstub/Makefile > +++ b/drivers/firmware/efi/libstub/Makefile > @@ -6,7 +6,7 @@ > # enabled, even if doing so doesn't break the build. > # > cflags-$(CONFIG_X86_32) := -march=i386 > -cflags-$(CONFIG_X86_64) := -mcmodel=small > +cflags-$(CONFIG_X86_64) := -mcmodel=small -maccumulate-outgoing-args This will need a cc-option call if this patch is necessary because clang does not support this flag. clang-11: error: unknown argument: '-maccumulate-outgoing-args' > cflags-$(CONFIG_X86) += -m$(BITS) -D__KERNEL__ \ > -fPIC -fno-strict-aliasing -mno-red-zone \ > -mno-mmx -mno-sse -fshort-wchar \ > -- > 1.8.3.1 > Cheers, Nathan