From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ed1-x536.google.com (mail-ed1-x536.google.com [IPv6:2a00:1450:4864:20::536]) by sourceware.org (Postfix) with ESMTPS id 913E43858C55 for ; Wed, 21 Sep 2022 12:49:32 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 913E43858C55 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-ed1-x536.google.com with SMTP id e18so8549624edj.3 for ; Wed, 21 Sep 2022 05:49:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date; bh=Tp44HrbVft098aY/kcbTO09vRB8nw26tUFvz5MW2cls=; b=mbP1SJC11qJox7qi9r/XQSkVAfx+MD8t2hpfpu6FJTaB2p7Bv9HH4o4tKQxwuu+kIq EVmPXIxO1PeTEOlXlHlLktwnX0gm/jRM7Puwo7B3FkbCNpAe0uyxSGJGP8UneRjPdUYW gwWO4JqAZYLAEcQP6cMPUB3RTK2apEoDLawtf/Y+RaX9rSFE1XUkD+cCKC/3IGKM+i4u TO3le0vICGKwpg/j3FBDvfMuFdZzDUUMwl1FzCtuXx6JRBE+5dI8oCt2tBxrZ2sCBzTH V8hjBkG9gGsasald0hZRTA5FH6ULTv7wiLTACUx/4e93Uow0jhpv0SD88jVhKWdCt8rL 9HYg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date; bh=Tp44HrbVft098aY/kcbTO09vRB8nw26tUFvz5MW2cls=; b=JRemtfx7UPOA9pxUANOcOBqd7kBBmiYvcKBQn2vjwih5pJh6kO7Z46A8acJdU2FIzw m/qL39AoMnAVus0YIan0rhHpNVCiVTAPOuGaQTzyoUaNrvtC78uecOCt2SmAA6vKmVy0 NWok7jStwNzjWv/IqKY07hBZd0eTbXLSYIxYNB1kQp638m8PY/OL9UQK0s7Kv+PoSVze UCIE2gy8y6KOuuxE/o1R61hJdAArMNW+quRQ9f7CSskk1lfcp1VjCyZckv8YJzwjeXdL hA+PG9kpw292eyBsHpq51VLqHZ+ih4+XT+4KJxF1Expkh2XgnJr52Mpqt8nBQ1lLbcZr Yskg== X-Gm-Message-State: ACrzQf2NA4Ja7/DBmNXQBI3bISp5bzrOOmnfiDrXocXB9ZU8efd7l3Eo 8BXMQTvLwpH/0F/9brhykoMvQU/5octuwMT0Wd8= X-Google-Smtp-Source: AMsMyM65Fva/VXzgjFZsYimt3kBuxZoFasEqKJlVPH+nu1VeHaiqyx4pk0KVPGQXClIz54Hj4jobn2K4hqg2/YCmBoM= X-Received: by 2002:a05:6402:847:b0:453:943b:bf4 with SMTP id b7-20020a056402084700b00453943b0bf4mr19963942edz.301.1663764571336; Wed, 21 Sep 2022 05:49:31 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Jonathan Wakely Date: Wed, 21 Sep 2022 13:49:20 +0100 Message-ID: Subject: Re: GCC builds with relative searchpaths instead of absolute To: Nuno Silva Cc: gcc-help@gcc.gnu.org Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-0.6 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 autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On Wed, 21 Sept 2022 at 12:43, Nuno Silva via Gcc-help wrote: > > Hello, > This is my first post in this mailing list, so I apologize if I do > anything wrong. > > I'm working on a hobby operating system and, as part of making apps > for it, I'm trying to port gcc to it. To be clear: I already have my > cross compiler, I just want to make gcc run inside the OS. > > However, gcc doesn't seem to find cc1, and when I look into the > searchdirs it shows relative paths (prepended with ".."), which means > it would never find cc1. Why not? > I'm configuring GCC with the following: > > configure --host=x86_64-toast --prefix=/usr --target=x86_64-toast > --with-sysroot=/ --with-build-sysroot= > --enable-languages=c,c++ --enable-initfini-array --disable-multilib > --disable-nls --enable-lto --with-system-zlib CFLAGS=-O2 CXXFLAGS=-O2 > > Then running make all-gcc all-target-libgcc all-target-libcstdc++-v3 Did you run make install? Because that's what installs cc1 and gcc into the right locations so that the relative paths work.