This is the mail archive of the cygwin@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

patch for cross-compilation bootstrap



I found this patch useful to allow me to bootstrap winsup/cygwin
when building a cross-compiler, linux hosted, for i386-cygwin targets.
This is a diff against :pserver:anoncvs@anoncvs.cygnus.com:/cvs/src.
It overcomes the problem that -nostdinc prevents the cross-compiler
from finding stddef.h.

@ spa:src$;cvs -z3 diff -u winsup/Makefile.common
Index: winsup/Makefile.common
===================================================================
RCS file: /cvs/src/src/winsup/Makefile.common,v
retrieving revision 1.23
diff -u -r1.23 Makefile.common
--- Makefile.common	2001/02/22 12:37:32	1.23
+++ Makefile.common	2001/04/25 02:38:38
@@ -88,9 +88,12 @@
 libgcc:=${subst \,/,${shell $(CC_FOR_TARGET) -print-libgcc-file-name}}
 GCC_INCLUDE:=${word 1,${dir $(libgcc)}}/include
 
+tgt_cpp:=$(shell $(CC_FOR_TARGET) -print-prog-name=cpp0)
+cpp_sysdirs:=$(shell $(tgt_cpp) -v </dev/null 2>&1 | grep gcc-lib)
+
 COMPILE_CXX:=$(CXX) $c -nostdinc++ $(ALL_CXXFLAGS) -I$(GCC_INCLUDE) \
 	     -fno-rtti -fno-exceptions
-COMPILE_CC:=$(CC) $c -nostdinc $(ALL_CFLAGS) -I$(GCC_INCLUDE)
+COMPILE_CC:=$(CC) $c -nostdinc $(ALL_CFLAGS) -I$(GCC_INCLUDE) $(patsubst %,-isystem %,$(cpp_sysdirs))
 
 vpath %.a	$(cygwin_build):$(w32api_lib):$(newlib_build)/libc:$(newlib_build)/libm
 





--
Want to unsubscribe from this list?
Check out: http://cygwin.com/ml/#unsubscribe-simple


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]