From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ed1-x52b.google.com (mail-ed1-x52b.google.com [IPv6:2a00:1450:4864:20::52b]) by sourceware.org (Postfix) with ESMTPS id 0F81E3858012 for ; Tue, 3 Nov 2020 07:47:13 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 0F81E3858012 Received: by mail-ed1-x52b.google.com with SMTP id a71so11874045edf.9 for ; Mon, 02 Nov 2020 23:47:13 -0800 (PST) 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; bh=gBt4XCU9YUG6VSnhgEYlU0rb49uyg/+WjhFNkKKSYUU=; b=L2+OR0VwpM47zVz9seCA9liPcLKe4fEe+n8vbB2jSctZx+Ru9zOXBsF9iD7UDspLzN K2pHSivXx+xdGN/qU0kpQiOCdgxAPAxpddQvpC8ymMHxjyGj1ovHP4Quy6Bb0t4X51ym bVWRP7/nvnUGVGcVBg0GDQ9i2My3dLOMewfHK9CRf1hBNOqn3BpdTNUIw7skFtwY3oaM Wm9PdAIBd7+6g9aW5+VPqTB+5X4AECog6d1yDGdXCqH5bjON0lvSmTM1Mxp0E3b/JQuW AI+0OIEWlen2wf6ZyUknuTsK/DsuUWNZQJRMr70hgyozKievQvMn9JMG4vWSSoyRtLJK wzwA== X-Gm-Message-State: AOAM531nJTAJpVxsezq/NEfXG2NxQGf1Og79TyuIUamKk383gfw6c1s+ zX5uHTQY+3yoCZCbriVWKbfxwwqtcS2lP3FoZwc= X-Google-Smtp-Source: ABdhPJyXL3Vz8qT0MvAv2TEim6PPU1m0FfhcR5MbRhpOWAm2o/4lMqG5Jaakv2SlOSYBjJ9DcYOxbW36CODMf5Z7cfM= X-Received: by 2002:aa7:d2d2:: with SMTP id k18mr13427228edr.290.1604389632045; Mon, 02 Nov 2020 23:47:12 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Eric Pellegrini Date: Tue, 3 Nov 2020 08:47:01 +0100 Message-ID: Subject: Re: cannot find -l-static-libgcc when building gcc from source To: Jonathan Wakely Cc: gcc-help X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM, HTML_MESSAGE, 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 Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 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: Tue, 03 Nov 2020 07:47:14 -0000 I should have trusted the manual. The solution to my problem was just to perform the build in a directory outside the source directory as indicated. Sorry for the inconvenience and thx for your help. On Mon, Nov 2, 2020 at 6:44 PM Jonathan Wakely wrote: > On Mon, 2 Nov 2020 at 15:34, Eric Pellegrini via Gcc-help > wrote: > > > > Hi all, > > > > I try to build gcc (9.3.0) from source on ubuntu focal using the > following > > configure call: > > > > ./configure --enable-shared --enable-multilib --prefix=/opt/gcc > > Don't do that, see https://gcc.gnu.org/wiki/InstallingGCC > > > The configure runs OK but when building/linking I get the following > error: > > > > libtool: link: gcc -shared -fPIC -DPIC .libs/lto-plugin.o -l > > There's an argument missing here, it should be -l SOMETHING > > > -static-libgcc -static-libstdc++ -static-libgcc > > and that means the -static-libgcc gets treated as the argument to -l > > My guess is you have something defined in your environment, like > LDFLAGS=-l or something like that. Check the output of 'env' and unset > anything you don't need. >