From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-qt1-x82e.google.com (mail-qt1-x82e.google.com [IPv6:2607:f8b0:4864:20::82e]) by sourceware.org (Postfix) with ESMTPS id DC57238485B9 for ; Wed, 15 Jun 2022 09:56:16 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org DC57238485B9 Received: by mail-qt1-x82e.google.com with SMTP id k4so7766103qth.8 for ; Wed, 15 Jun 2022 02:56:16 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=xBI7eCCi8FU6nOJJ39KTgm7+GEMRNgDDvBFswsjSy6I=; b=6s8YBfRZA/p2gPEhc6TkC8GNYQ9oncLfKynB9sZ45QbV/UuWac4pxviJpyW7BUAXnd YzzPRY9ojMC5r1yZiivZYXfFvywtYnsij5muwf1pyialmoeKQi9AjJHXoun2aznzGd09 XVe+RpPs59f647dCoWiCHIdNQlY7x31lrqA+X3Xcd1u80Rz928+Sy0sIaAC+nMgcvOEp ft9xG5F/giWuMvRWvrFvh8AcDnW/XAcc7qDAqTYqDtMvRM0HR58GfgAWMf7s29PBGuTJ VgNvM3wrARd4rE1knN560ihe6wACSwEXn3IPWfTE5yu4HmrLoK/bf/XbC8MT1hnVwDP7 EROg== X-Gm-Message-State: AOAM532cD39Xr4AN5Ajq/rTZPVg7WPuwbZFsssFx9wgWrB1IDoMoEve7 ZQHkTt/v49KnJY2nTLqFvGgLiAw+IeCtic5+n9JwWDovBgI= X-Google-Smtp-Source: ABdhPJyL+c2HZJVs+NzaiqCGbFyIAPyLFY9jt9UpXqHnZz1R0EwRt6wMGrkXdDb40M68v27LZ36V5+z0eCIDYxZcLRA= X-Received: by 2002:a05:622a:1345:b0:304:f444:a0eb with SMTP id w5-20020a05622a134500b00304f444a0ebmr8055818qtk.329.1655286976311; Wed, 15 Jun 2022 02:56:16 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Richard Biener Date: Wed, 15 Jun 2022 11:56:05 +0200 Message-ID: Subject: Re: Building gcc 12 cross-compiler with --enable-lto on FreeBSD fails To: Chris Johns Cc: GCC Development Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Jun 2022 09:56:18 -0000 On Wed, Jun 15, 2022 at 11:27 AM Chris Johns wrote: > > Hi, > > I am trying to build a cross-compiler on FreeBSD with --enable-lto because a > chip vendor is using it when building controller software that is part of a system. > > The build I am using symlinks gmp, mpfr etc as source so they are built as part > of the gcc build. > > The mpfr package is reporting ... > > build/mpfr/config.log:configure:17408: error: Link Time Optimisation is not > supported (see config.log for details). > > Should the enable option be passed to these packages? You shouldn't need --enable-lto, it's effect (adding lto to the set of compiled languages) is already the default. You can use --enable-languages=default,lto to achieve the same effect without getting the mpfr side-effect. > I have assumed the enable option for LTO is for the cross compiler and not the > host gcc? it's for the built GCC, enabling LTO support (but not for enabling building GCC itself with LTO). Richard. > > Thanks > Chris