public inbox for libc-help@sourceware.org
 help / color / mirror / Atom feed
* Lightning talk notes on glibc
@ 2021-01-20  7:48 Fangrui Song
  2021-01-20 16:17 ` Adhemerval Zanella
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Fangrui Song @ 2021-01-20  7:48 UTC (permalink / raw)
  To: libc-help

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: <https://sourceware.org/git/gitweb.cgi?p=glibc.git>
Wiki: <https://sourceware.org/glibc/wiki/>
Bugzilla: <https://sourceware.org/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
```

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2021-01-20 16:25 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-20  7:48 Lightning talk notes on glibc Fangrui Song
2021-01-20 16:17 ` Adhemerval Zanella
2021-01-20 16:20 ` Carlos O'Donell
2021-01-20 16:25 ` Carlos O'Donell
2021-01-20 16:25 ` Carlos O'Donell

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).