From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-il1-x135.google.com (mail-il1-x135.google.com [IPv6:2607:f8b0:4864:20::135]) by sourceware.org (Postfix) with ESMTPS id 1EDAD3851C26 for ; Fri, 29 May 2020 11:22:44 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 1EDAD3851C26 Received: by mail-il1-x135.google.com with SMTP id y17so2097036ilg.0 for ; Fri, 29 May 2020 04:22:44 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=74t0uZySEEyBB/vEtAM7F8FXNSzijPknj5SZU1rf2rY=; b=OE0JLTykwZzLoQaNKSmQIRWC674yY+llVm38LSsyQSOomZbuYwdbyQ2fiE2Rueew+M 9a5pIASCBVhDd0MLTPGJvkXBJXk8qKzAcuGs9U0vCxixvJejuDMh7iGq/UL3x2co77Kn ywvNP/mcpLtLNu2kN6SNR6BHipPNsuVXz7MQ49Yor5uNGervvTO1VniH9l2k6BGCLooX ZDeGmfBCAgspVJQs0ZHzwpN9vZQbqqGO8QcTDcATytrykFD27JDadnNEsA7PYugqUA3K WPVYPGwM6ZNniDIxqfOOLzm28XUDKnrq4UKvLF3WlT8ZxUMFSzT5TSkYQDn2dgW4Dain W1rw== X-Gm-Message-State: AOAM532LXaSbmbr5eFxLMJA9Sk1SWEtauXH7vyxqGXNP7AAoylONdwce Wv/RpnbFFyWuRrimS4a178HeL5K4s+lblUg+iWF4qQ== X-Google-Smtp-Source: ABdhPJwiAqDsxl06eEZ/L+3SAvswANSE2Q0YzJDwfPUx5RF9LfGExEprkJsF+kL8NZoH+0C8ipfkKUCtRiGiOg8lhv4= X-Received: by 2002:a92:9f82:: with SMTP id z2mr6352503ilk.59.1590751363492; Fri, 29 May 2020 04:22:43 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Jonathan Wakely Date: Fri, 29 May 2020 12:22:32 +0100 Message-ID: Subject: Re: multiple installed versions of gcc -- automatically set rpath ?? To: Dan Kegel Cc: Patrick Herbst , gcc-help Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-2.5 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, KAM_SHORT, RCVD_IN_DNSWL_NONE, 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: gcc-help@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-help mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 May 2020 11:22:45 -0000 On Fri, 29 May 2020 at 04:53, Dan Kegel wrote: > > https://stackoverflow.com/questions/13334300/how-to-build-and-install-gcc= -with-built-in-rpath > is a bit dated, but might be helpful. It says in part: > =EF=BF=BC > Using --with-boot-ldflags=3D"-Wl,-rpath,/some/path" on the configure > step seems to work for me on gcc 4.8.3. The docs discuss this a bit > https://gcc.gnu.org/install/configure.html That sets the linker flags to use when building GCC itself. It doesn't make GCC automatically add those linker flags when you compile your own programs. Even if it did add the flags when compiling your own programs, it wouldn't work well for multlib compilers where the rpath should be lib or lib64 depending on the multilib being used for a given compilation.