unable to build gcc 4.9.0 for i686-elf target with posix threads
Ragnar Rüütel
ragnar.ruutel@gmail.com
Wed Jul 2 13:36:00 GMT 2014
Hi,
Thanks for the reply and I apologize for my ignorance.
On Wed, Jul 2, 2014 at 4:00 PM, Jonathan Wakely <jwakely.gcc@gmail.com> wrote:
> What do you mean by "generic linux binaries"?
> With no dependency on a C library?
> Why do you need "i686-elf" rather than e.g. i686-unknown-linux-gnu ?
> What are you actually trying to do in the end?
I need to create linux binaries of my tools that will run on any x86
linux distribution. So I can compile them once and copy to other linux
machines. As I understood i686-elf target should be best choice for
this.
> Native to what? What system are you building on?
>From osdev tutorials I learned that I should first build compiler
which works on system (this is what I meant with native)
x86_64-unknown-linux-gnu and then use it to build cross compiler.
> Why did you do this? The instructions you said you're following don't do this.
> I no longer help people who install gmp, mpfr and mpc manually and ask for help.
I wasn't aware that having gmp, mpfr and mpc inside gcc source
directory doesn't have the same effect as using --with-gmp,
--with-mpfr and -with-mpc. But that's a good point, I'll try it.
> Where is the --without-headers option that the wiki.osdev.org
> instructions say to use?
>
> Why are you surprised it doesn't work if you don't follow the
> instructions properly?
I noticed that I had --without-headers option missing right after
posting so I added it and tried again. Unfortunately there's not
difference. I still get the same error:
/home/ragnar/cpp-tools/compiler/cpp-build-tools/build-linux32/gcc/./gcc/xgcc
-B/home/ragnar/cpp-tools/compiler/cpp-build-tools/build-linux32/gcc/./gcc/
-B/home/ragnar/cpp-tools/compiler/cpp-build-tools/../linux32/gcc/i686-elf/bin/
-B/home/ragnar/cpp-tools/compiler/cpp-build-tools/../linux32/gcc/i686-elf/lib/
-isystem /home/ragnar/cpp-tools/compiler/cpp-build-tools/../linux32/gcc/i686-elf/include
-isystem /home/ragnar/cpp-tools/compiler/cpp-build-tools/../linux32/gcc/i686-elf/sys-include
-g -O2 -O2 -g -O2 -DIN_GCC -DCROSS_DIRECTORY_STRUCTURE -W -Wall
-Wno-narrowing -Wwrite-strings -Wcast-qual -Wstrict-prototypes
-Wmissing-prototypes -Wold-style-definition -isystem ./include
-fpic -g -DIN_LIBGCC2 -fbuilding-libgcc -fno-stack-protector
-Dinhibit_libc -fpic -I. -I. -I../.././gcc
-I/home/ragnar/cpp-tools/compiler/cpp-build-tools/sources/gcc/libgcc
-I/home/ragnar/cpp-tools/compiler/cpp-build-tools/sources/gcc/libgcc/.
-I/home/ragnar/cpp-tools/compiler/cpp-build-tools/sources/gcc/libgcc/../gcc
-I/home/ragnar/cpp-tools/compiler/cpp-build-tools/sources/gcc/libgcc/../include
-DHAVE_CC_TLS -o unwind-dw2.o -MT unwind-dw2.o -MD -MP -MF
unwind-dw2.dep -fexceptions -c
/home/ragnar/cpp-tools/compiler/cpp-build-tools/sources/gcc/libgcc/unwind-dw2.c
-fvisibility=hidden -DHIDE_EXPORTS
In file included from
/home/ragnar/cpp-tools/compiler/cpp-build-tools/sources/gcc/libgcc/gthr.h:148:0,
from
/home/ragnar/cpp-tools/compiler/cpp-build-tools/sources/gcc/libgcc/unwind-dw2.c:37:
./gthr-default.h:35:21: fatal error: pthread.h: No such file or directory
#include <pthread.h>
^
compilation terminated.
make[1]: *** [unwind-dw2.o] Error 1
make[1]: Leaving directory
`/home/ragnar/cpp-tools/compiler/cpp-build-tools/build-linux32/gcc/i686-elf/libgcc'
make: *** [all-target-libgcc] Error 2
-------------- next part --------------
A non-text attachment was scrubbed...
Name: config.log
Type: text/x-log
Size: 61859 bytes
Desc: not available
URL: <https://gcc.gnu.org/pipermail/gcc-help/attachments/20140702/a913bb8e/attachment.bin>
More information about the Gcc-help
mailing list