Code: Select all
TARGET=x86_64-pc-elf
TARGET=x86_64-pc-linux
Code: Select all
x86_64
x86_64-pc-none
Code: Select all
x86_64-*-*
Code: Select all
TARGET=x86_64-pc-elf
TARGET=x86_64-pc-linux
Code: Select all
x86_64
x86_64-pc-none
Code: Select all
x86_64-*-*
Code: Select all
machine-vendor-operating_system
Code: Select all
x86_64-whatever-sortix
Code: Select all
x86_64-sortix
Code: Select all
x86_64-unknown-linux-gnu
Code: Select all
x86_64-elf
Code: Select all
checking whether -lc should be explicitly linked in... yes
checking dynamic linker characteristics... no
checking how to hardcode library paths into programs... immediate
checking for shl_load... configure: error: Link tests are not allowed after GCC_NO_EXECUTABLES.
make[1]: *** [configure-target-libstdc++-v3] Error 1
make[1]: Leaving directory `/home/serge/Downloads/gcc-build'
make: *** [all] Error 2
Code: Select all
make all-gcc
make all-target-libgcc
make install-gcc
make install-target-libgcc
Yet it is the one place on the wiki that states exactly what TARGET to use for an 64-bit crosscompiler, even if it's also a written redirect to the generic GCC cross-compiler page in the same paragraph.sortie wrote:@Combuster:
Please do not link to that particular wiki article. It's entirely obsolete for modern GCC versions and I have it scheduled for deletion at some point. I see that you are aware of this on the talk page - I also fail to see why this article is relevant. For all intents and purposes, that tutorial has been replaced by the standard gcc cross-compiler tutorial: http://wiki.osdev.org/GCC_Cross-Compiler
You can quote simply use the <stdint.h> API. It's a freestanding header, so it works automatically. If you are passing -nostdinc currently, delete that option as it's silly, and then can use all the compiler headers. All the headers that you can manage to use with your cross-compiler is meant for you to use, anything else will fail.teodori wrote:But now I am not sure of my data sizes, I use intXY_t, how are the typdefs for ints?
Hmm, you're right. I think the better solution is to write an article on GNU Host Triplets and link to that (or include it) from GCC Cross-Compiler. I can perhaps base that on my above explanation.Combuster wrote:Basically, the OP's question would be answered within the introduction of the article linked, but not in the article you're suggesting as its replacement, so you certainly have some things to clean up before you go as far as deleting it
Code: Select all
tar -xJf binutils-2.24.tar.xz
mkdir binutils-build
cd binutils-build
../binutils-2.24/configure --target=x86_64-pc-elf --prefix="$HOME/opt" --disable-nls --disable-doc
make -j 1
make install
tar -xJf gmp-5.1.3.tar.xz
mv gmp-5.1.3 gmp
tar -xJf mpc-1.0.1.tar.xz
mv mpc-1.0.1 mpc
tar -xJf mpfr-3.1.2.tar.xz
mv mpfr-3.1.2 mpfr
tar -xJf gcc-4.8.2.tar.xz
mv gmp gcc-4.8.2/
mv mpc gcc-4.8.2/
mv mpfr gcc-4.8.2/
mkdir gcc-build
cd gcc-build
../gcc-4.8.2/configure --target=x86_64-pc-elf --prefix="$HOME/opt" --disable-nls --disable-doc --enable-languages=c,c++ --without-headers
make all-gcc -j 1
make all-target-libgcc -j 1
make install-gcc
make install-target-libgcc