From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) by sourceware.org (Postfix) with ESMTPS id CC912398B864 for ; Fri, 9 Apr 2021 13:03:15 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org CC912398B864 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=suse.de Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=matz@suse.de X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id DFFF4B1D5; Fri, 9 Apr 2021 13:03:14 +0000 (UTC) Date: Fri, 9 Apr 2021 13:03:14 +0000 (UTC) From: Michael Matz To: Mark Wielaard cc: Tom de Vries , dwz@sourceware.org, jakub@redhat.com Subject: Re: [PATCH] Add -p native and -e native In-Reply-To: <20210409094231.GD30119@wildebeest.org> Message-ID: References: <20210409092439.GA17210@delia> <20210409094231.GD30119@wildebeest.org> User-Agent: Alpine 2.20 (LSU 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-Spam-Status: No, score=-3.5 required=5.0 tests=BAYES_00, KAM_DMARC_STATUS, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: dwz@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Dwz mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Apr 2021 13:03:17 -0000 Hello, On Fri, 9 Apr 2021, Mark Wielaard wrote: > > We determine native as the result of: > > - -p: sizeof (void *) > > - -e: __BYTE_ORDER__ > > when compiling using CC without CFLAGS, such that if we build dwz with -m32 on > > x86_64 like so: > > ... > > $ make CFLAGS="-m32 -O2 -g" LDFLAGS=-m32 > > ... > > and we have: > > ... > > $ file ./dwz > > dwz: ELF 32-bit LSB executable, Intel 80386 > > ... > > we still have: > > ... > > $ ./dwz -? > > ... > > -p, --multifile-pointer-size > > Set pointer size of multifile, in number of bytes. > > Native pointer size is 8. > > Default value: auto. > > ... > > > > Any comments? > > Except for this narrow multilib case, doesn't this actually make it > impossible to do a cross-arch build? For cross the term "native" doesn't make sense, so it would seem valid to simply not support that setting with a cross (not multilib) dwz. I.e. if ./native can't be executed assume cross-ness and don't support -p native. > I don't think this should be a compile time option, unless it can > derived from the target architecture that the dwz binary is build for. If it can be derived from the target architecture it can't be called native. If you mean a canadian cross setting (i.e. where the dwz binary itself is built on host to be able to run on target and produces binaries for target): do we really want to support such build outside the core toolchain? Ciao, Michael.