From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5813 invoked by alias); 4 Feb 2020 14:29:38 -0000 Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org Received: (qmail 5802 invoked by uid 89); 4 Feb 2020 14:29:38 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-5.3 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.1 spammy=H*f:CAF8i9mMMF, H*f:sk:U3fubhw, H*i:sk:U3fubhw, H*f:sk:iS1_uzu X-HELO: simark.ca Received: from simark.ca (HELO simark.ca) (158.69.221.121) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 04 Feb 2020 14:29:37 +0000 Received: from [10.0.0.11] (unknown [192.222.164.54]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by simark.ca (Postfix) with ESMTPSA id AE5B11E059; Tue, 4 Feb 2020 09:29:35 -0500 (EST) Subject: Re: Forced to use --enable-unit-tests=no otherwise cross-compilation fail To: William Tambe , gdb@sourceware.org References: From: Simon Marchi Message-ID: <894378b5-9447-7c55-d8fd-388658f81bd0@simark.ca> Date: Tue, 04 Feb 2020 14:29:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.4.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-SW-Source: 2020-02/txt/msg00013.txt.bz2 On 2020-02-04 5:51 a.m., William Tambe wrote: > With Binutils 2.34, I have to use --enable-unit-tests=no with > ./configure otherwise cross-compilation fail trying to link > gdbarch-selftests.o: > > /usr/bin/ld: gdbarch-selftests.o: in function `_initialize_gdbarch_selftests()': > /binutils-gdb-build/gdb/../../binutils-gdb/gdb/gdbarch-selftests.c:168: > undefined reference to > `selftests::register_test_foreach_arch(std::__cxx11::basic_string std::char_traits, std::allocator > const&, void > (*)(gdbarch*))' > > Why is it now required to use --enable-unit-tests=no when cross-compiling ? > Hmm this is not expected. That missing symbol should be provided by gdb/selftest-arch.o. Does that file get compiled (and linked) in your configuration? Simon