Porting GCC to my OS
Two more (stupid) questions:
#1: Should i add --with-headers to binutils as well or it's only a gcc specific configure parameter?
#2: When i'm trying to compile binutils how jnc100 explained ( with --host=i586-pc-giszOS --target=i586-pc-giszOS) configure runs without failure but when i start make it looks for header files without success. Where should i put the header files of my C library? I've an include directory in .../my_cross_dir, should i place them there?
giszo
#1: Should i add --with-headers to binutils as well or it's only a gcc specific configure parameter?
#2: When i'm trying to compile binutils how jnc100 explained ( with --host=i586-pc-giszOS --target=i586-pc-giszOS) configure runs without failure but when i start make it looks for header files without success. Where should i put the header files of my C library? I've an include directory in .../my_cross_dir, should i place them there?
giszo
I've tried both without luck.. I got the same results with error that's why i asked
If i add the --with-headers parameter: CC=i586-pc-giszOS-gcc ./configure --host=i586-pc-giszOS --target=i586-pc-giszOS --prefix=/home/giszo/gcc_giszOS_native --disable-nls --with-headers=/path/of/my/C/header/files
i got the following error: *** --with-headers is only supported when cross compiling
If i just drop my libc header files to .../my_cross_dir/include i got a lot of error like this:
checking sys/time.h usability... no
checking sys/time.h presence... no
checking for sys/time.h... no
and so on..
If i add the --with-headers parameter: CC=i586-pc-giszOS-gcc ./configure --host=i586-pc-giszOS --target=i586-pc-giszOS --prefix=/home/giszo/gcc_giszOS_native --disable-nls --with-headers=/path/of/my/C/header/files
i got the following error: *** --with-headers is only supported when cross compiling
If i just drop my libc header files to .../my_cross_dir/include i got a lot of error like this:
checking sys/time.h usability... no
checking sys/time.h presence... no
checking for sys/time.h... no
and so on..
Personally, mine go in /usr/cross/i586-pc-tysos/include, where $PREFIX=/usr/cross and $TARGET=i586-pc-tysos (from when I built the cross compiler). Obviously, you need to be sure that your C library contains all the required headers...giszo wrote:Where should i put the header files of my C library?
Regards,
John.
*cough*
Are you serious?
<irony>
Of course not. It is named "standard" to mislead people into thinking it is about a standard collection of functions declared in standard headers...
</irony>
Try the Dinkumware online reference for starters.
Are you serious?
<irony>
Of course not. It is named "standard" to mislead people into thinking it is about a standard collection of functions declared in standard headers...
</irony>
Try the Dinkumware online reference for starters.
Every good solution is obvious once you've found it.
What is the problem with my header file if i got errors like these:
/home/giszo/gcc_giszOS_cross/bin/../lib/gcc/i586-pc-giszOS/4.2.2/../../../../i586-pc-giszOS/include/sys/types.h:45: error: two or more data types in declaration specifiers
In sys/types.h line #45 is the following:
typedef int pid_t;
/home/giszo/gcc_giszOS_cross/bin/../lib/gcc/i586-pc-giszOS/4.2.2/../../../../i586-pc-giszOS/include/sys/types.h:30: error: duplicate 'unsigned'
line #30:
typedef unsigned int uintptr_t;
/home/giszo/gcc_giszOS_cross/bin/../lib/gcc/i586-pc-giszOS/4.2.2/../../../../i586-pc-giszOS/include/sys/types.h:45: error: two or more data types in declaration specifiers
In sys/types.h line #45 is the following:
typedef int pid_t;
/home/giszo/gcc_giszOS_cross/bin/../lib/gcc/i586-pc-giszOS/4.2.2/../../../../i586-pc-giszOS/include/sys/types.h:30: error: duplicate 'unsigned'
line #30:
typedef unsigned int uintptr_t;
Check if there happens to be a "#define uintptr_t unsigned..." somewhere.../home/giszo/gcc_giszOS_cross/bin/../lib/gcc/i586-pc-giszOS/4.2.2/../../../../i586-pc-giszOS/include/sys/types.h:30: error: duplicate 'unsigned'
line #30:
typedef unsigned int uintptr_t;
Every good solution is obvious once you've found it.
I didn't tell you that my OS/C library is 100% complete, but at least i compiled binutils and it's running on my OS, but still i've a little problem.
When i run for example "objdump -i" i got only the following:
"BFD header file version (GNU binutils) 2.18 and no more output"
What did i miss? I can't see any supported format by objdump...
When i run for example "objdump -i" i got only the following:
"BFD header file version (GNU binutils) 2.18 and no more output"
What did i miss? I can't see any supported format by objdump...