From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr1-f44.google.com (mail-wr1-f44.google.com [209.85.221.44]) by sourceware.org (Postfix) with ESMTPS id CCC9D385737F for ; Fri, 29 Apr 2022 16:22:56 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org CCC9D385737F Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=palves.net Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-wr1-f44.google.com with SMTP id c11so1613812wrn.8 for ; Fri, 29 Apr 2022 09:22:56 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:cc:references:from:in-reply-to :content-transfer-encoding; bh=brGRYoXWRTP32ePiNptPIHKxXEbnoV+MCnON47fC8RI=; b=qwnL2BM6uinjPxPXq+OjGlq3kQwdk0I7u4D4GrdxtxNL3XaX4jbATr0CICywT+SAQU j7YKlb6K/WUeLXwjFrVhAGP574ZKoHfUgvqevyM14m0wJIjaPB6XnmZY6gltnPlPO8lc QnAjYUbAJuujjiWz6b/2gqo8DVOY7NW44saKUB3ZjPa/L+mHfX/AMPoSeVTnAQzKS+oE KO33B2pCB+TNzcWvJ75g5Wm9WUYmhrOprJ+u2Aplmruyn/tf3TxMEs5MDxjnMdlyl9Ff umGxdIIM5m/zYkkbSwwaAr6KLJ/2gtYV8PEQRHGYW1d3cdIpDir0M3o4pa00Cozan8Ps +UUg== X-Gm-Message-State: AOAM531q2frPNpxr39RaY+9ny5Nw1EXxf+rj/fwJ34H8ph1b1JHWYXtf VwUv3aQo1jNHORvglp7XtkNxPXXj8k5/xg== X-Google-Smtp-Source: ABdhPJxSOlSs+1poB3SO9u5MiwHzkPjy1RMbm6BhPJfWJMcWbMcxdXr68T7UNVYiJyk0GxjUIy05xQ== X-Received: by 2002:adf:f0c6:0:b0:20a:d31b:6 with SMTP id x6-20020adff0c6000000b0020ad31b0006mr25896868wro.162.1651249375646; Fri, 29 Apr 2022 09:22:55 -0700 (PDT) Received: from ?IPV6:2001:8a0:f924:2600:209d:85e2:409e:8726? ([2001:8a0:f924:2600:209d:85e2:409e:8726]) by smtp.gmail.com with ESMTPSA id r20-20020a05600c35d400b00393f02839fasm7605287wmq.12.2022.04.29.09.22.54 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 29 Apr 2022 09:22:54 -0700 (PDT) Message-ID: <41c3c273-90cd-0f31-932b-d9bfa9655e86@palves.net> Date: Fri, 29 Apr 2022 17:22:53 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.8.1 Subject: Re: [PATCH, v2] Fix 32-bit build for --enable-targets=all Content-Language: en-US To: Luis Machado , Alan Modra , "Jose E. Marchesi" Cc: binutils@sourceware.org, Joel Brobecker References: <20220422132513.22471-1-luis.machado@arm.com> <2b02c5bd-1db2-f322-79c9-e6878adf8b67@arm.com> <87v8uwi7xi.fsf@oracle.com> <9d9ad2f0-ce12-b701-371e-7bb9eb0356cf@arm.com> From: Pedro Alves In-Reply-To: <9d9ad2f0-ce12-b701-371e-7bb9eb0356cf@arm.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-5.2 required=5.0 tests=BAYES_00, FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS, KAM_DMARC_STATUS, NICE_REPLY_A, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: binutils@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Binutils mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 Apr 2022 16:22:58 -0000 On 2022-04-29 13:35, Luis Machado via Binutils wrote: > > After some investigation, it seems the bpf target is a bit of a corner case. It's within the 64-bit bfd group, so libopcodes gets built only if --enable-64-bit-bfd. Otherwise, libopcodes doesn't include bpf. > > The bpf sim gets built regardless of having a 32-bit bfd or 64-bit bfd, so in the case of a 32-bit build with --enable-targets=all (and no --enable-64-bit-bfd), libopcodes doesn't include bpf, causing a libsim linking failure due to missing symbols (. > > Things work fine for 64-bit though. I think the fix would involve not building the sim if the bpf files are not linked into libopcodes. Can't the sim m4_include bfd64.m4 too and check enable_64_bit_bfd like opcodes, gdb, ld, etc. do?