From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 117983 invoked by alias); 18 Dec 2018 00:09:38 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 117961 invoked by uid 89); 18 Dec 2018 00:09:37 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.2 spammy=horrible, H*RU:209.85.214.193, Hx-spam-relays-external:209.85.214.193, HX-HELO:sk:mail-pl X-HELO: mail-pl1-f193.google.com Received: from mail-pl1-f193.google.com (HELO mail-pl1-f193.google.com) (209.85.214.193) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 18 Dec 2018 00:09:36 +0000 Received: by mail-pl1-f193.google.com with SMTP id y1so6892766plp.9 for ; Mon, 17 Dec 2018 16:09:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=dwvaM0LSlbny45o2Fnx7RFoLH/RivBLheh3I/pMKIBc=; b=HGMlFqoWVR0Zazrn88bFeGW1M/Ee4QyzHpgKUbLU3RPGNjvVb1JIZlY0yx+iBGWnXQ NERSxyUyuVhVhOjuxSJpi2oohJhAf1dnlTuZI/pTA8nTUb1Ykktew7fz2V0tTJr3G5GT jA7BEOqHXguiS1PNZ9Im+PVwItRxak5mEtfGojVUXYnwdr8EMUGvZtFR3mW3a+jsH6l7 74v4HqCSnXVXgFZ3J4dkEBJ3YMj0e9dpDhd0JDFCWsO/GtalrtTin/+FWiD1GFRsUBXA XxQFahqpGLNdRmhaOnnz1csACeEAtkzgt4Zj1Lo9P1CloePsmt7F6NuBk6UDDnz6pZjc d1zw== Return-Path: Received: from bubble.grove.modra.org ([58.175.241.133]) by smtp.gmail.com with ESMTPSA id x19sm24102465pfk.14.2018.12.17.16.09.32 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 17 Dec 2018 16:09:33 -0800 (PST) Received: by bubble.grove.modra.org (Postfix, from userid 1000) id 1A99C80650; Tue, 18 Dec 2018 10:39:27 +1030 (ACDT) Date: Tue, 18 Dec 2018 00:09:00 -0000 From: Alan Modra To: Segher Boessenkool Cc: Andreas Tobler , GCC Patches Subject: Re: [patch] Fix bootstrap powerpc*-*-freebsd* targets Message-ID: <20181218000927.GD30978@bubble.grove.modra.org> References: <7d04429f-e633-0b5b-0d69-eae3c86634ca@fgznet.ch> <20181217001000.GA30978@bubble.grove.modra.org> <20181217170556.GY3803@gate.crashing.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20181217170556.GY3803@gate.crashing.org> User-Agent: Mutt/1.9.4 (2018-02-28) X-IsSubscribed: yes X-SW-Source: 2018-12/txt/msg01271.txt.bz2 On Mon, Dec 17, 2018 at 11:05:57AM -0600, Segher Boessenkool wrote: > Hi! > > On Mon, Dec 17, 2018 at 10:40:01AM +1030, Alan Modra wrote: > > Since I broke powerpc*-freebsd and the other non-linux powerpc > > targets, I guess I ought to fix them. The following is a variation on > > your first patch, that results in -mcall-linux for powerpc-freebsd* > > providing the 32-bit powerpc-linux dynamic linker. > > That, like the first patch, abuses that header file. Please do it > somewhere sane instead, not in a random subtarget file? Is there is a better place, currently? sysv4.h contains a mess of OS related defines already, to support various -mcall options. If those stay in sysv4.h I can't see a better place for the fall-back GNU_USER_DYNAMIC_LINKER define. Here's the problem: powerpc*-*-linux* uses tm_file="rs6000/rs6000.h dbxelf.h elfos.h gnu-user.h linux.h freebsd-spec.h rs6000/sysv4.h" plus a few more. linux.h contains the proper GNU_USER_DYNAMIC_LINKER define for linux. Fairly obviously we can't put a fallback define in rs6000/rs6000.h for those targets that don't include linux.h (and including linux.h for non-linux targets is probably not a good idea). Besides rs6000/sysv4.h, you could put the fallback in rs6000/freebsd.h to fix powerpc*-freebsd*, but then you'd need to put it in rs6000/netbsd.h, rs6000/eabi.h, rs6000/rtems.h, rs6000/vxworks.h, rs6000/lynx.h to fix those targets. That would be horrible. And it would leave powerpc-elf broken. > > > * config/rs6000/sysv4.h (GNU_USER_DYNAMIC_LINKER): Define. -- Alan Modra Australia Development Lab, IBM