From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 67722 invoked by alias); 6 Jan 2018 19:25:03 -0000 Mailing-List: contact crossgcc-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: crossgcc-owner@sourceware.org Received: (qmail 67707 invoked by uid 89); 6 Jan 2018 19:25:02 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.9 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.2 spammy=Motto, motto, canadian, Canadian X-HELO: out2-smtp.messagingengine.com Received: from out2-smtp.messagingengine.com (HELO out2-smtp.messagingengine.com) (66.111.4.26) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sat, 06 Jan 2018 19:25:01 +0000 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id C21BB20973 for ; Sat, 6 Jan 2018 14:24:59 -0500 (EST) Received: from frontend1 ([10.202.2.160]) by compute1.internal (MEProxy); Sat, 06 Jan 2018 14:24:59 -0500 X-ME-Sender: Received: from localhost (135-23-125-70.cpe.pppoe.ca [135.23.125.70]) by mail.messagingengine.com (Postfix) with ESMTPA id 79BF67E12A for ; Sat, 6 Jan 2018 14:24:59 -0500 (EST) Date: Sat, 06 Jan 2018 19:25:00 -0000 From: Steven Taschuk To: crossgcc@sourceware.org Subject: binutils executables capture paths from build machine Message-ID: <20180106192755.GA3536@femur> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.6.0 (2016-04-01) X-IsSubscribed: yes X-SW-Source: 2018-01/txt/msg00000.txt.bz2 Hi! I'm using crosstool-ng 1.23.0 to make a cross-native toolchain, and am a bit confused about the configuration and install of the binutils executables. I've understood correctly, the bash function do_binutils_for_host configures binutils with --prefix=${CT_PREFIX_DIR} and installs the executables with make install. This procedure results in paths from the build machine being embedded in the binaries, in at least two places: the use of BINDIR at binutils-2.28/bfd/plugin.c:337; and the various uses of DEBUGDIR in binutils-2.28/bfd/dwarf2.c (where DEBUGDIR=${libdir}/debug; see binutils-2.28/bfd/configure.ac:108). I would have expected that, for a cross-native (or, for that matter, Canadian) build, binutils would be configured with --prefix=/usr or something, then installed with make DESTDIR=${CT_SYSROOT_DIR} install, for later transfer to the host. That's what do_binutils_for_target does, but it seems to build and install only libiberty and libbfd, not the executables. For builds with build!=host, how should binutils executables be built? (Context: I'm developing a small reproducible and self-reproducing Linux distribution, which requires making a reproducible cross-native toolchain. I also think there are some similar issues in the gcc executables, but haven't tracked those down yet.) -- Steven Taschuk http://www.amotlpaa.org/ Receive them ignorant; dispatch them confused. (Weschler's Teaching Motto)