diff options
author | Christopher Faylor <me@cgf.cx> | 2001-10-10 01:57:43 +0000 |
---|---|---|
committer | Christopher Faylor <me@cgf.cx> | 2001-10-10 01:57:43 +0000 |
commit | bc6aa7e1b4893cfe80f0ceaceb3b10d8e4e3ab53 (patch) | |
tree | 9df5102f1e769bcee26c599ccd34036615e82971 | |
parent | d3fee5eccbdbc3d22aad40f6ddb9d16cd2343588 (diff) | |
download | cygnal-bc6aa7e1b4893cfe80f0ceaceb3b10d8e4e3ab53.tar.gz cygnal-bc6aa7e1b4893cfe80f0ceaceb3b10d8e4e3ab53.tar.bz2 cygnal-bc6aa7e1b4893cfe80f0ceaceb3b10d8e4e3ab53.zip |
* Makefile.common: Avoid adding -I options to compile if they already exist in
CC or C*FLAGS. This prevents warnings from newer versions of gcc.
-rw-r--r-- | winsup/ChangeLog | 6 | ||||
-rw-r--r-- | winsup/Makefile.common | 23 |
2 files changed, 24 insertions, 5 deletions
diff --git a/winsup/ChangeLog b/winsup/ChangeLog index caba4ed79..d950361d9 100644 --- a/winsup/ChangeLog +++ b/winsup/ChangeLog @@ -1,3 +1,9 @@ +Sun Oct 7 23:08:46 2001 Christopher Faylor <cgf@cygnus.com> + + * Makefile.common: Avoid adding -I options to compile if they already + exist in CC or C*FLAGS. This prevents warnings from newer versions of + gcc. + Tue May 15 01:09:56 2001 Christopher Faylor <cgf@cygnus.com> * Makefile.common: Change method for finding current directory. diff --git a/winsup/Makefile.common b/winsup/Makefile.common index e9774ef98..700b6f00f 100644 --- a/winsup/Makefile.common +++ b/winsup/Makefile.common @@ -54,7 +54,9 @@ endif w32api_source:=$(updir)/w32api w32api_build:=$(bupdir)/w32api -w32api_include:=$(w32api_source)/include +ifeq (,${findstring $(w32api_source),$(CFLAGS) $(CXXFLAGS) $(CXX) $(CC)}) +w32api_include:=-I$(w32api_source)/include +endif w32api_lib:=$(w32api_build)/lib newlib_source:=$(updir1)/newlib newlib_build:=$(bupdir1)/newlib @@ -64,8 +66,16 @@ mingw_build:=$(bupdir)/mingw mingw_source:=$(updir)/mingw utils_build:=$(bupdir)/utils utils_source:=$(updir)/utils +ifeq (,${findstring $(newlib_source),$(CFLAGS) $(CXXFLAGS) $(CXX) $(CC)}) +newlib_include:=-I$(newlib_source)/libc/include +newlib_sys_include:=-I$(newlib_source)/libc/sys +endif +ifeq (,${findstring $(cygwin_source)/include,$(CFLAGS) $(CXXFLAGS) $(CXX) $(CC)}) +cygwin_include:=-I$(cygwin_source)/include +endif +cygwin_include:=-I$(cygwin_source)/include -INCLUDES:=-I. -I$(cygwin_source)/include -I$(cygwin_source) -I$(newlib_source)/libc/sys/cygwin -I$(newlib_source)/libc/include -I$(w32api_include) +INCLUDES:=-I. $(cygwin_include) -I$(cygwin_source) $(newlib_sys_include) $(newlib_include) $(w32api_include) ifdef CONFIG_DIR INCLUDES+=-I$(CONFIG_DIR) endif @@ -92,11 +102,14 @@ o=.E endif libgcc:=${subst \,/,${shell $(CC_FOR_TARGET) -print-libgcc-file-name}} -GCC_INCLUDE:=${word 1,${dir $(libgcc)}}/include +gcc_libdir:=${word 1,${dir $(libgcc)}} +ifeq (,${findstring $(gcc_libdir),$(CFLAGS) $(CXXFLAGS) $(CXX) $(CC)}) +GCC_INCLUDE:=-I$(gcc_libdir)/include +endif -COMPILE_CXX:=$(CXX) $c -nostdinc++ $(ALL_CXXFLAGS) -I$(GCC_INCLUDE) \ +COMPILE_CXX:=$(CXX) $c -nostdinc++ $(ALL_CXXFLAGS) $(GCC_INCLUDE) \ -fno-rtti -fno-exceptions -COMPILE_CC:=$(CC) $c -nostdinc $(ALL_CFLAGS) -I$(GCC_INCLUDE) +COMPILE_CC:=$(CC) $c -nostdinc $(ALL_CFLAGS) $(GCC_INCLUDE) vpath %.a $(cygwin_build):$(w32api_lib):$(newlib_build)/libc:$(newlib_build)/libm |