From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gnu.wildebeest.org (wildebeest.demon.nl [212.238.236.112]) by sourceware.org (Postfix) with ESMTPS id C12D9398B42D for ; Fri, 9 Apr 2021 09:43:51 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org C12D9398B42D Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=klomp.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=mark@klomp.org Received: from librem (ip-213-127-40-215.ip.prioritytelecom.net [213.127.40.215]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by gnu.wildebeest.org (Postfix) with ESMTPSA id AFC65302FB96; Fri, 9 Apr 2021 11:43:50 +0200 (CEST) Received: by librem (Postfix, from userid 1000) id 0D186C32C9; Fri, 9 Apr 2021 11:42:31 +0200 (CEST) Date: Fri, 9 Apr 2021 11:42:31 +0200 From: Mark Wielaard To: Tom de Vries Cc: dwz@sourceware.org, jakub@redhat.com, Michael Matz Subject: Re: [PATCH] Add -p native and -e native Message-ID: <20210409094231.GD30119@wildebeest.org> References: <20210409092439.GA17210@delia> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210409092439.GA17210@delia> User-Agent: Mutt/1.10.1 (2018-07-13) X-Spam-Status: No, score=-3.1 required=5.0 tests=BAYES_00, JMQ_SPF_NEUTRAL, KAM_DMARC_STATUS, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=no 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 09:43:53 -0000 On Fri, Apr 09, 2021 at 11:24:41AM +0200, Tom de Vries wrote: > Add option parameter native to options -p and -e. > > 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? 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. Cheers, Mark