egcs-1.0.1 can't find headers in -I./

Richard Hadsell hadsell@blueskystudios.com
Tue Jan 20 12:05:00 GMT 1998


It seems that egcs-1.0.1 does not recognize -I./ as the current
directory.  This was true of egcs-1.0 as well.  -I. works fine.  It
would be nice to get -I./ working, because we have some make rules that
generate the include path automatically from discovered header files,
and they give "./" as the directory for any header file that is named
without a path.

I think that this test case is telling us that it misinterprets "-I./"
as "-I/":

loki1 studio++/tests 37% cat egcsbug2.h

class A {

public:
        void    f ();

protected:
        A       *a_;
};
loki1 studio++/tests 38% cat egcsbug2.cc

#include <egcsbug2.h>

void    A::f ()
{
        a_ = 0;
}
loki1 studio++/tests 39% ECC -v -I./ -c egcsbug2.cc
Reading specs from
/usr/local/lib/gcc-lib/alphaev5-unknown-linux-gnu/egcs-2.90.23/specs
gcc version egcs-2.90.23 980102 (egcs-1.0.1 release)
 /usr/local/lib/gcc-lib/alphaev5-unknown-linux-gnu/egcs-2.90.23/cpp
-lang-c++ -v -I./ -undef -D__GNUC__=2 -D__GNUG__=2 -D__cplusplus
-D__GNUC_MINOR__=90 -D__alpha -D__alpha__ -D__linux__ -D__linux
-D_LONGLONG -Dlinux -Dunix -D__ELF__ -D__alpha -D__alpha__ -D__linux__
-D__linux -D_LONGLONG -D__linux__ -D__unix__ -D__ELF__ -D__linux
-D__unix -Asystem(linux) -Acpu(alpha) -Amachine(alpha) -D__EXCEPTIONS
-D__LANGUAGE_C__ -D__LANGUAGE_C -DLANGUAGE_C -D__LANGUAGE_C_PLUS_PLUS__
-D__LANGUAGE_C_PLUS_PLUS -D__cplusplus egcsbug2.cc /tmp/cca30792.ii
GNU CPP version egcs-2.90.23 980102 (egcs-1.0.1 release) (Alpha
Linux/ELF)
#include "..." search starts here:
#include <...> search starts here:
 /
 /usr/local/include/g++
 /usr/local/include
 /usr/local/alphaev5-unknown-linux-gnu/include
 /usr/local/lib/gcc-lib/alphaev5-unknown-linux-gnu/egcs-2.90.23/include
 /usr/include
End of search list.
egcsbug2.cc:2: egcsbug2.h: No such file or directory
loki1 studio++/tests 40% ECC -v -I. -c egcsbug2.cc
Reading specs from
/usr/local/lib/gcc-lib/alphaev5-unknown-linux-gnu/egcs-2.90.23/specs
gcc version egcs-2.90.23 980102 (egcs-1.0.1 release)
 /usr/local/lib/gcc-lib/alphaev5-unknown-linux-gnu/egcs-2.90.23/cpp
-lang-c++ -v -I. -undef -D__GNUC__=2 -D__GNUG__=2 -D__cplusplus
-D__GNUC_MINOR__=90 -D__alpha -D__alpha__ -D__linux__ -D__linux
-D_LONGLONG -Dlinux -Dunix -D__ELF__ -D__alpha -D__alpha__ -D__linux__
-D__linux -D_LONGLONG -D__linux__ -D__unix__ -D__ELF__ -D__linux
-D__unix -Asystem(linux) -Acpu(alpha) -Amachine(alpha) -D__EXCEPTIONS
-D__LANGUAGE_C__ -D__LANGUAGE_C -DLANGUAGE_C -D__LANGUAGE_C_PLUS_PLUS__
-D__LANGUAGE_C_PLUS_PLUS -D__cplusplus egcsbug2.cc /tmp/cca30794.ii
GNU CPP version egcs-2.90.23 980102 (egcs-1.0.1 release) (Alpha
Linux/ELF)
#include "..." search starts here:
#include <...> search starts here:
 .
 /usr/local/include/g++
 /usr/local/include
 /usr/local/alphaev5-unknown-linux-gnu/include
 /usr/local/lib/gcc-lib/alphaev5-unknown-linux-gnu/egcs-2.90.23/include
 /usr/include
End of search list.
 /usr/local/lib/gcc-lib/alphaev5-unknown-linux-gnu/egcs-2.90.23/cc1plus
/tmp/cca30794.ii -quiet -dumpbase egcsbug2.cc -version -o
/tmp/cca30794.s
GNU C++ version egcs-2.90.23 980102 (egcs-1.0.1 release)
(alphaev5-unknown-linux-gnu) compiled by GNU C version egcs-2.90.23
980102 (egcs-1.0.1 release).
 as -nocpp -o egcsbug2.o /tmp/cca30794.s
loki1 studio++/tests 41% 

-- 
Dick Hadsell			914-381-8400  Fax: 914-381-9790
Reply-to:			hadsell@blueskystudios.com
Blue Sky | VIFX			http://www.blueskystudios.com
1 South Road, Harrison, NY 10528



More information about the Gcc-bugs mailing list