[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Preprocessor detection fails when no headers are available
From: |
Lucas Paul |
Subject: |
Preprocessor detection fails when no headers are available |
Date: |
Fri, 15 Mar 2019 14:33:15 -0400 |
Hi all,
I'm trying to update a Nix derivation for GCC so that I can easily and
reliably get a cross compiler for OS development work. In the process of
doing this, I seem to have run into a bit of a roadblock trying to
get libgcc to compile.
I'm more-or-less following a guide:
https://wiki.osdev.org/GCC_Cross-Compiler
My configuration options end up being just slightly different:
--prefix=/nix/store/2qgwg29px8ikpcdy6cn6b66ddxymc1aw-i686-elf-stage-final-
gcc-debug-7.4.0 --disable-nls --enable-languages=c\,c++ --without-headers
--build=x86_64-unknown-linux-gnu --host=x86_64-unknown-linux-gnu
--target=i686-elf
When I try to compile, I get an error while configuring libgcc. It claims
the preprocessor isn't sane. Full error and config.log at
https://gist.github.com/Reilithion/02126ee9259d81a54f157e93b3f657d7
Looking into the logs, I hypothesize that the configure script is using
methods for making judgments about the capabilities of the compiler and
preprocessor that will give inaccurate results in case the target system
does not have system headers. And since Nix doesn't keep its system headers
for the host in /usr/include there's no "wrong" headers to fall back on.
I don't want to be presumptuous, so I invite helpful feedback. But is this
a bug in the configure script?
- Lucas
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Preprocessor detection fails when no headers are available,
Lucas Paul <=