From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pl1-f174.google.com (mail-pl1-f174.google.com [209.85.214.174]) by sourceware.org (Postfix) with ESMTPS id 0E9F93858018 for ; Wed, 20 Jan 2021 07:48:19 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 0E9F93858018 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=maskray.me Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=emacsray@gmail.com Received: by mail-pl1-f174.google.com with SMTP id u11so7773645plg.13 for ; Tue, 19 Jan 2021 23:48:19 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:subject:message-id:mime-version :content-disposition; bh=g/kdsrpRdHcIt4dqXi6cMQ9NbHG9bjj/OMXYKl5L5y4=; b=dLVOm39GnwoWObUqN170hDcJ7KexPgupZ7K+xjLVfbhouV7wFGsHJC+KBt7kTtZm37 mheUqkjHRSrrxnpj0QlcJkmzJp848eiwY+7lI+JOh5yMSemqF+oWDpWsEM1ckMglopko mLzK4sJiLfglRucylD2HeaDwE2qy+Usr2pYgHePOajGwEmOglOEnHBqM9x54egQVAAPf jw0eV28M73dVECAlvGWC9DrjHoDGHrldGbfI+AVfH9aVOjV3KDFlmnq0PA4VKnA6W2Mr b0mjcm9WfGtqmtigLkpDIbBm79eY+mjUcjvEwcMw5SKKXSZzc/vC76xNYif25KiQeVPE Onhg== X-Gm-Message-State: AOAM530n87sh+M2mGD/ZgkYO4VXga3uUo1QCA0z1ilW+46vq9raPY6Mi IwisYt9RCseJeuHG4zLsyH0JFV42mnKxxA== X-Google-Smtp-Source: ABdhPJw3eAm1qNVCuP5wQHPn5Iz4Jb/R3+ckVDBAKqag3yROplMXsJG6WrbWdRGzR/gfQwLGRvaMrg== X-Received: by 2002:a17:902:9b90:b029:de:76e8:ee4b with SMTP id y16-20020a1709029b90b02900de76e8ee4bmr8528202plp.20.1611128898087; Tue, 19 Jan 2021 23:48:18 -0800 (PST) Received: from localhost ([2601:647:4b01:ae80:a09e:7fd7:bd71:97d2]) by smtp.gmail.com with ESMTPSA id bj18sm1354457pjb.40.2021.01.19.23.48.17 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 Jan 2021 23:48:17 -0800 (PST) Date: Tue, 19 Jan 2021 23:48:15 -0800 From: Fangrui Song To: libc-help@sourceware.org Subject: Lightning talk notes on glibc Message-ID: <20210120074815.k6km6cmhrt4aknpo@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline X-Spam-Status: No, score=-1.6 required=5.0 tests=BAYES_00, FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS, KAM_DMARC_STATUS, KAM_INFOUSMEBIZ, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=no 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: Wed, 20 Jan 2021 07:48:20 -0000 Greetings, I will give a lightning talk in a small meetup on some GNU toolchain projects and I am writing notes:) Here is that I have now for glibc. Happy to see more points from you experts:) ## glibc Repository: Wiki: Bugzilla: Mailing lists: `{libc-announce,libc-alpha,libc-locale,libc-stable,libc-help}@sourceware.org` A very unfortunate fact: glibc can only be built with `-O2`, not `-O0` or `-O1`. If you want to have an un-optimized debug build, deleting an object file and recompiling it with `-g` usually works. Another workaround is `#pragma GCC optimize ("O0")`. The `-O2` issue is probably related to (1) expected inlining and (2) avoiding dynamic relocations. Run the following commands to populate `/tmp/glibc-many` with toolchains. Caution: please make sure the target file system has tens of gigabytes. Preparation: ```sh scripts/build-many-glibcs.py /tmp/glibc-many checkout scripts/build-many-glibcs.py /tmp/glibc-many host-libraries scripts/build-many-glibcs.py /tmp/glibc-many compilers aarch64-linux-gnu scripts/build-many-glibcs.py /tmp/glibc-many compilers powerpc64le-linux-gnu scripts/build-many-glibcs.py /tmp/glibc-many compilers sparc64-linux-gnu ``` The `glibcs` command will delete the glibc build directory, build glibc, and run `make check`. ```sh scripts/build-many-glibcs.py /tmp/glibc-many glibcs aarch64-linux-gnu # Find the logs and test results under /tmp/glibc-many/logs/glibcs/aarch64-linux-gnu/ scripts/build-many-glibcs.py /tmp/glibc-many glibcs powerpc64le-linux-gnu scripts/build-many-glibcs.py /tmp/glibc-many glibcs sparc64-linux-gnu ``` During development, some interesting targets: ((((((It'd be nice to list more targets here)))))))) ```sh make -C Debug lib # meaning? make -C Debug objs # meaning? make -C Debug others # meaning? make -C Debug check-abi ```