← Back to context

Comment by embedding-shape

21 days ago

Seems like a nothingburger? Mostly a spammy GitHub thread of people not reading the rest of the responses.

> Works if you supply the correct include path(s)

> Can confirm, works fine:

> You could arguably fault ccc's driver for not specifying the include path to find the native C library on this system.

> (I followed the instructions in the BUILDING_LINUX.txt file in the repo and got the kernel built for RISC-V. You can find the build I made here if someone is just interested in the binaries)

>> Works if you supply the correct include path(s)

The location of Standard C headers do not need to be supplied to a conformant compiler.

>> You could arguably fault ccc's driver for not specifying the include path to find the native C library on this system.

This is not a good implementation decision for a compiler which is not the C compiler distributed with the OS. Even though Standard C headers have well-defined names and public contracts, how they are defined is very much compiler specific.

So this defect is a "somethingburger."

  • Well this compiler was written to build Linux as a proof of concept. You don't need a libc for building the kernel. Was it claimed anywhere that it is a fully compliant C compiler?

  • That's kind of moving the goal post no? They set out to build a C compiler that could compile the kernel, it can do that just fine?

    Searching for "compliant" in the README doesn't seem to indicate that building a "conformant compiler" was even the goal here, so not sure why that's suddenly should be a requirement.