From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-io1-xd2d.google.com (mail-io1-xd2d.google.com [IPv6:2607:f8b0:4864:20::d2d]) by sourceware.org (Postfix) with ESMTPS id 11E10386181F for ; Fri, 5 Mar 2021 02:30:51 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 11E10386181F Received: by mail-io1-xd2d.google.com with SMTP id i8so396750iog.7 for ; Thu, 04 Mar 2021 18:30:51 -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:in-reply-to:references:from:date :message-id:subject:to:cc; bh=Eez+NeaiPZgyMlZipvAan7qjAKwogpdFC6PfHmGZBtg=; b=boeud7ZUmlfFD0ZPcW9gCu4rR1nWTJDp8D4TOgNHIQiRwCpKDTMeajT+XzNEl+w8+8 Sy9jChEIwHzIpZmmj/ImklWX+1SJZhZgdwrC/NEx7uCU09pbxIJahew7qbgUf27NyJjL EOwPeQ2LehT7xCdqFH05Rmookn+SR3fQkmnDb508ucnFplL1KcE7CoAA4lGKd+1xIm4U GkwDOyUbqHLBslqFyRLmqYA9A4NHaCtNOCdgbnduqTd4yBrmfGp70AJAm0koqlL65Hx2 udcIs0AF8Y/4STh/JKK4jrpdOsM0mQQgNohYJkQJEiNINGJ1xX7+pkjDc+fQX/RLJ5Cv VLCA== X-Gm-Message-State: AOAM531uXPgV5B8e4tzR2eA4PGa3EilHIaquItWVGsXD4FmNZZNJrili MrqullfBMR115sz5CMb9CbKBUov7KE0o6j3zxp4= X-Google-Smtp-Source: ABdhPJy6xZC2y0KNeLtYBPuA4ga6NuBCRDJCVPuMvc/SMtWtKG7NMkhVmWQTZfCmollsVxwLXxcjP2Zb5MtbHfTFba8= X-Received: by 2002:a02:9003:: with SMTP id w3mr7247432jaf.31.1614911450541; Thu, 04 Mar 2021 18:30:50 -0800 (PST) MIME-Version: 1.0 Received: by 2002:a05:6602:349:0:0:0:0 with HTTP; Thu, 4 Mar 2021 18:30:49 -0800 (PST) In-Reply-To: References: <87wnunnq3q.fsf@oldenburg.str.redhat.com> From: Peng Yu Date: Thu, 4 Mar 2021 20:30:49 -0600 Message-ID: Subject: Re: Directory structure of glibc and header files installed on Linux To: Adhemerval Zanella Cc: Florian Weimer , Peng Yu via Libc-help Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.2 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.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: libc-help@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-help mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Mar 2021 02:30:53 -0000 > A sysroot is a folder which contains a minimal filesystem (especially > libraries, the C library and header files). I just paste the *exactly* > sequence of command using build-many-glibcs.py to create one using > gcc targeting glibc. You will need to read build-many-glibcs.py [3] > to check exactly on how it accomplish it, I am referring to the exact sequence of commands to make sysroot. Basically, all commands need for vanilla ubuntu are needed (only sysroot is need before running build-many-glibcs.py ?). Google search of sysroot is not very helpful on how to use it. https://stackoverflow.com/questions/39920712/what-is-a-sysroot-exactly-and-how-do-i-create-one So once sysroot is create, then the following commands can be used? All the original glibc installed in the system will not be affected? >>> (1) glibc-git$ ./scripts/build-many-glibcs.py checkout >>> /path/to/place/source/and/binaries >>> (2) glibc-git$ ./scripts/build-many-glibcs.py host-libraries >>> (3) glibc-git$ ./scripts/build-many-glibcs.py compilers x86_64-linux-gnu >>> (4) glibc-git$ ./scripts/build-many-glibcs.py glibcs x86_64-linux-gnu >>> >>> The (1) will download the required source (binutils, linux, gcc, >>> glibc, math libraries), (2) will >>> build the math libraries used in gcc built, (3) will build a bootstrap >>> compiler targetting >>> x86_64-linux-gnu, and finally (4) will build a glibc using the >>> bootstrap compiler built. >> >> > > [1] https://crosstool-ng.github.io/docs/toolchain-construction/ I don't need cross compilation. Why is this relevant? > [2] http://www.linuxfromscratch.org/ What is the relation of the above instruction to arch linux? > [3] > https://sourceware.org/git/?p=glibc.git;a=blob;f=scripts/build-many-glibcs.py;h=580d25e8ee4b3ff5f99fb957e6e533035bcc4ebc;hb=HEAD There are almost two thousand lines of code with too much code about dealing with command-line options. It is definitely not minimal for learning purposes. Does it really take so many lines of code. If the target is just for intel architecture, It sounds like a bash script with barely minimal code should be much shorter. -- Regards, Peng