Mike Sieweke wrote:
> Takis <takm
...@otenet.gr> wrote:
>> Here is the extra debug info:
>> - the directory where the compiler is installed
>> /usr/local/src/mips-x86.linux-xgcc, all executables symbolically linked
>> to /usr/bin
>> - your PATH variable
>> $PATH=/home/takis/bin:/usr/local/bin:/usr/bin:/bin:/usr/bin/X11R6:
>> /usr/X11R6/bin:/usr/games:/usr/lib/jvm/jre/bin:/usr/lib/mit/bin:
>> //usr/lib/mit/sbin
>> - the complete command you typed
>> mips-gcc -S -O2 -fno-delayed-branch lab4_ex4.c -o lab4_ex4.s
>> - the complete error message(s)
>> lab4_ex4.c:1:19:no include path in which to find stdio.h
>> (obviously caused by the directive #include <stdio.h>)
>> It would probably also help to have the output from this command:
>> > mips-gcc -v
>> Using built-in specs.
>> Configuredwith:./configure --target=mips-dec-ultrix42
>> --program-prefix=mips- --with-gnu-as --with-gnu-ld --enable-obsolete
>> Thread model: single
>> gcc version 3.2.2
>> (My version of gcc is 4.2.1 (SUSE Linux))
>> thank you in advance for your assistance.
>> Best Regards,
>> Takis Markopoulos
>> Athens,
> Hello Takis,
> Usually the Gnu compiler finds its include path automatically in
> the same folder where the compiler was found. That didn't work, so
> either the include directory is missing or the compiler couldn't
> figure out where it was (maybe because it's accessed via a symbolic
> link, or because the directory naming scheme is non-standard). If
> the directory isn't missing, you need to point the compiler to it,
> like this:
> mips-gcc \
> -I/usr/local/src/mips-x86.linux-xgcc/mips-x86.linux-xgcc/include \
> -S -O2 -fno-delayed-branch lab4_ex4.c -o lab4_ex4.s
> This assumes your directory naming scheme matches the one for
> my compiler. You need to substitute the real path to the
> "include" directory.
> I didn't need to do any of the above with my compiler. I built it
> myself as "mipsisa32-elf-gcc". Here is how it's installed:
> My compiler is in "/install-path/mipsisa32-elf/bin/".
> The path variable is "PATH=$PATH:/install-path/mipsisa32-elf/bin".
> The include directory is:
> /install-path/mipsisa32-elf/mipsisa32-elf/include
> I can compile with this command, and the compiler finds the
> include path automatically:
> mipsisa32-elf-gcc -c -O2 test.c
> If this all doesn't get you going, I recommend you install a
> different version of GCC. The MIPS company has one called
> "SDE-Lite" for free, and it's likely to be better supported
> than the one you have. You can get it from here:
> http://www.mips.com/products/software-tools/mips-sde-lite/
> This one also has some documentation, although it might be
> confusing with all the options available.
> Mike
Just for the records the -l switch didn't work. gcc-mips was searching a
number of directories around the "gcc-lib/mips-dec-ultrix42" string with no
success. So I had to create the directory and symlink a good number (>100)
of header files from various include directories in my SUSE distribution.
My patience was rewarded.