mailing list of musl libc
 help / color / mirror / code / Atom feed
From: Szabolcs Nagy <nsz@port70.net>
To: Chen Wang <unicorn_wang@outlook.com>
Cc: musl <musl@lists.openwall.com>
Subject: Re: [musl] [Question] some questions about kernel header files for musl?
Date: Mon, 2 Nov 2020 09:04:16 +0100	[thread overview]
Message-ID: <20201102080416.GB1370092@port70.net> (raw)
In-Reply-To: <OSYP286MB0181A056F1A8C452EF3D25A7FE100@OSYP286MB0181.JPNP286.PROD.OUTLOOK.COM>

* Chen Wang <unicorn_wang@outlook.com> [2020-11-02 15:44:38 +0800]:
> hi, I'm a newbie learning msul, I have some questions about kernel header files for musl. Appreciated if anybody can answer my quesitons, thanks in adv.
> 
> Q1) What's the rule to pick up kernel header files for musl? Do we need to catch up the latest kernel when the kernel is upgraded? What version of kernel is musl currently in usage?

musl can be built without linux headers.

you can use whatever linux version to build your toolchain,
but recent ones (e.g. linux v5.*) will have less issues when
libc and linux headers are included together in some code.

> Q2) I see duplicated headers files in different folders, for example: unistd.h, I see it under both "include/unistd.h" and "src/include/unistd.h". Why we need multiple copies? Are they used for different purpose?

src/* is musl internal, it is only used for building musl.

> Q3) For different arch, such as arm/x86/riscv, do they share the same kernel header files? I double checked android bionic and found it has different kernel header files for differnet arch.

musl does not use linux headers. it uses its own
target specific definitions see arch/*/bits/*.h,
an installed header set is only valid for one arch
because the bits/ directory is arch specific.

linux headers are similar: different targets cannot
share the same headers because the asm/ directory
is arch specific.

  reply	other threads:[~2020-11-02  8:04 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-02  7:44 Chen Wang
2020-11-02  8:04 ` Szabolcs Nagy [this message]
2020-11-02 13:28   ` Re: [musl] [Question] somequestions " Chen Wang
2020-11-02 15:30     ` Rich Felker

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20201102080416.GB1370092@port70.net \
    --to=nsz@port70.net \
    --cc=musl@lists.openwall.com \
    --cc=unicorn_wang@outlook.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/musl/

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 NNTP newsgroup(s).