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=-7.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no 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 A74C9C433E2 for ; Tue, 14 Jul 2020 08:31:41 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 7F3A321BE5 for ; Tue, 14 Jul 2020 08:31:41 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="CsVckzVa" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725981AbgGNIbl (ORCPT ); Tue, 14 Jul 2020 04:31:41 -0400 Received: from us-smtp-delivery-1.mimecast.com ([207.211.31.120]:31288 "EHLO us-smtp-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725793AbgGNIbk (ORCPT ); Tue, 14 Jul 2020 04:31:40 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1594715499; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=jxagKFMPTlHYLlE9FXu+4jDWBv7YXV1lVPgmdIJdZ48=; b=CsVckzVae5W6TG/iDfWoKLqt1dpoytQwBDwJn7phouZ8hh7ce8X6Td7/XuUTF7z3lj/voi vRcG966dbGvieLhJU9bdHM2W68Mv4E6/r7Ztj+i77z5BFywkroDm5YSnhlfX7phZLT3Vmz WINIKGrYudvuZU2nMmtlrJnWXV7Q+B4= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-365-gT-4-w__MF-EnDVmh3g0kw-1; Tue, 14 Jul 2020 04:31:37 -0400 X-MC-Unique: gT-4-w__MF-EnDVmh3g0kw-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 1C175106B244; Tue, 14 Jul 2020 08:31:36 +0000 (UTC) Received: from krava (unknown [10.40.193.14]) by smtp.corp.redhat.com (Postfix) with SMTP id 558B12DE6A; Tue, 14 Jul 2020 08:31:34 +0000 (UTC) Date: Tue, 14 Jul 2020 10:31:33 +0200 From: Jiri Olsa To: Stephen Rothwell Cc: Daniel Borkmann , Alexei Starovoitov , Networking , Linux Next Mailing List , Linux Kernel Mailing List , Jiri Olsa Subject: Re: linux-next: build failure after merge of the bpf-next tree Message-ID: <20200714083133.GF183694@krava> References: <20200714122247.797cf01e@canb.auug.org.au> <20200714061654.GE183694@krava> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200714061654.GE183694@krava> X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 Sender: linux-next-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-next@vger.kernel.org On Tue, Jul 14, 2020 at 08:16:54AM +0200, Jiri Olsa wrote: > On Tue, Jul 14, 2020 at 12:22:47PM +1000, Stephen Rothwell wrote: > > Hi all, > > > > After merging the bpf-next tree, today's linux-next build (arm > > multi_v7_defconfig) failed like this: > > > > tmp/ccsqpVCY.s: Assembler messages: > > tmp/ccsqpVCY.s:78: Error: unrecognized symbol type "" > > tmp/ccsqpVCY.s:91: Error: unrecognized symbol type "" > > > > I don't know what has caused this (I guess maybe the resolve_btfids > > branch). > > > > I have used the bpf-next tree from next-20200713 for today. > > ok, trying to reproduce damn crossbuilds.. change below fixes it for me, will do some more testing and post it today jirka --- diff --git a/include/linux/btf_ids.h b/include/linux/btf_ids.h index fe019774f8a7..8b9194e22c7c 100644 --- a/include/linux/btf_ids.h +++ b/include/linux/btf_ids.h @@ -21,7 +21,7 @@ asm( \ ".pushsection " BTF_IDS_SECTION ",\"a\"; \n" \ ".local " #symbol " ; \n" \ -".type " #symbol ", @object; \n" \ +".type " #symbol ", STT_OBJECT; \n" \ ".size " #symbol ", 4; \n" \ #symbol ": \n" \ ".zero 4 \n" \ diff --git a/tools/bpf/resolve_btfids/Makefile b/tools/bpf/resolve_btfids/Makefile index 948378ca73d4..a88cd4426398 100644 --- a/tools/bpf/resolve_btfids/Makefile +++ b/tools/bpf/resolve_btfids/Makefile @@ -16,6 +16,20 @@ else MAKEFLAGS=--no-print-directory endif +# always use the host compiler +ifneq ($(LLVM),) +HOSTAR ?= llvm-ar +HOSTCC ?= clang +HOSTLD ?= ld.lld +else +HOSTAR ?= ar +HOSTCC ?= gcc +HOSTLD ?= ld +endif +AR = $(HOSTAR) +CC = $(HOSTCC) +LD = $(HOSTLD) + OUTPUT ?= $(srctree)/tools/bpf/resolve_btfids/ LIBBPF_SRC := $(srctree)/tools/lib/bpf/