From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-oi1-x22d.google.com (mail-oi1-x22d.google.com [IPv6:2607:f8b0:4864:20::22d]) by sourceware.org (Postfix) with ESMTPS id 0A52C3858C55 for ; Wed, 21 Sep 2022 12:57:02 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 0A52C3858C55 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-oi1-x22d.google.com with SMTP id v130so7927218oie.2 for ; Wed, 21 Sep 2022 05:57:02 -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=s5dURFSdwZrTFEDTKmP9ImOPvQDmH4rNgXyN34zJmvk=; b=X1NIkceKxHiOt5OUEA+ADl4HJblGgnLcaFUZoXqHqqpfOB3YFl9XqR/c12/WmE+sHo vbDWSzT2KQICp3Joh1AUbW1cie30YeMjBROgluNAfH9FriFQgEp0pUmdAoHulmA9Xxgs owVb1aPrnwt50S80R0bnUW6Di+BxH04fjP/p4UrgQFP0zBGgp+OCyNVyt2id3YGpf/un /mYIcOrUd6ZLwaboWfUuTqLrMT7XITHzSl2AtTcxoq6fKGo2oyZGYYipgPgqhelcLES5 NHY10bxgAs8ZU+9Jg0gTkw8qOxQLR7L4qJ+4tNPXpncx5u94G7wHNjfdl6uZirgs0xR7 2mlg== 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=s5dURFSdwZrTFEDTKmP9ImOPvQDmH4rNgXyN34zJmvk=; b=s9UM5zYaadPTWBoUsoSBMahEM8Up6SLZAcx/Iijn5AIAm9r/iwEflbmRlZWU0II1A2 b/eF/zw5IaEHkQB9FDNU5a8KQd3LseX4ZzlAAhPbEHxV8RUKL7/U00FbB8MUdaBl4J7U jjgFcLXD/WoPtC4W1f7au1IMlwTZNfLKmn/ne43tRrK3yBTShhSc5guNGVxk4Pp3n/TM t3pq3nRL9rVb9GM+yG9qjOR/gNSh6aGg3rFDRkh6zP9TKlPOKTMBlxaiiRTl/igGU0Ox DbFKeE8ZWn3LZyX5geKzqx9Y5Ww5wOWOpXRUrNtzwz28ZXPlXlgBYDcfXRw5uMxg9XgJ KDYA== X-Gm-Message-State: ACrzQf26q3kBXwqFYhbh/2VLIPo3a/Baj9MZON21j/+1/Ou5/ZhUB2wF rl5ZHpgapUblkta9QKE6cmwLsNZsvh9Ae7qkD2g= X-Google-Smtp-Source: AMsMyM5orKKf8fsNn1ITPsbQaNo66FawxqlWQ5b0wwN2MW6v2rL72kpMLqz5oUHwqnHJu3d0aBtho6gp+uklp/9rdX8= X-Received: by 2002:a54:4388:0:b0:345:20f6:775f with SMTP id u8-20020a544388000000b0034520f6775fmr3838503oiv.259.1663765021217; Wed, 21 Sep 2022 05:57:01 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Nuno Silva Date: Wed, 21 Sep 2022 13:56:51 +0100 Message-ID: Subject: Re: GCC builds with relative searchpaths instead of absolute To: Jonathan Wakely 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: Hello Jonathan, Why not: Possibly I'm missing something on my OS that could be making it not know where to find it: Right now it's just trying to run cc1 through execve but doesn't pass a path for cc1, just a plan cc1, which fails to be found as a result. Did you run make install? Yes, that's the next step actually, and cc1 is located in a libexec path of my sysroot. On Wed, Sep 21, 2022 at 1:49 PM Jonathan Wakely wrote: > > 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.