Subversion Repositories DevTools

Rev

Rev 5726 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 5726 Rev 5859
Line 245... Line 245...
245
gcc_depend	+=
245
gcc_depend	+=
246
 
246
 
247
ifeq ($(USE_GCCDEPEND),0)
247
ifeq ($(USE_GCCDEPEND),0)
248
	# Build GCC predefs and default include paths
248
	# Build GCC predefs and default include paths
249
	#..
249
	#..
250
GCC_MACHINE	:= $(shell test -f $(GCC_CC) && $(GCC_CC) -dumpmachine)
250
	GCC_MACHINE	:= $(shell test -f $(GCC_CC) && $(GCC_CC) -dumpmachine)
251
GCC_VERSION	:= $(shell test -f $(GCC_CC) && $(GCC_CC) -dumpversion)
251
	GCC_VERSION	:= $(shell test -f $(GCC_CC) && $(GCC_CC) -dumpversion)
-
 
252
	GCC_CPATH := $(shell $(GCC_CC) -v -dM -E - </dev/null 2>&1 | sed -e '/^\#include <\.\.\.>/,/End of search list\./!d;//d')
252
 
253
 
253
gcc_depend	+= -D__GNUC__=$(word 1,$(subst .,$(space),$(GCC_VERSION)))
254
	gcc_depend	+= -D__GNUC__=$(word 1,$(subst .,$(space),$(GCC_VERSION)))
254
gcc_depend	+= -D__GNUC_MINOR__=$(word 2,$(subst .,$(space),$(GCC_VERSION)))
255
	gcc_depend	+= -D__GNUC_MINOR__=$(word 2,$(subst .,$(space),$(GCC_VERSION)))
255
gcc_depend	+= -D__STDC__ -D__STDC_HOSTED__
256
	gcc_depend	+= -D__STDC__ -D__STDC_HOSTED__
256
 
257
 
257
ifdef GCC_TARGET
258
	ifdef GCC_TARGET
258
ifneq "$(findstring Linux,$(GCC_TARGET))" ""
259
		ifneq "$(findstring Linux,$(GCC_TARGET))" ""
259
gcc_depend	+= -Dunix -D__unix -D__unix__
260
			gcc_depend	+= -Dunix -D__unix -D__unix__
260
gcc_depend	+= -Dlinux -D__linux -D__linux__
261
			gcc_depend	+= -Dlinux -D__linux -D__linux__
261
endif
262
		endif
262
ifneq "$(findstring i386,$(GCC_TARGET))" ""
263
		ifneq "$(findstring i386,$(GCC_TARGET))" ""
263
gcc_depend	+= -Di386 -D__i386 -D__i386__
264
			gcc_depend	+= -Di386 -D__i386 -D__i386__
264
endif
265
		endif
265
ifneq "$(findstring armv4,$(GCC_TARGET))" ""
266
		ifneq "$(findstring armv4,$(GCC_TARGET))" ""
266
gcc_depend	+= -Darm -D__arm -D__arm__
267
			gcc_depend	+= -Darm -D__arm -D__arm__
267
gcc_depend	+= -D__ARM_ARCH__=4
268
			gcc_depend	+= -D__ARM_ARCH__=4
268
endif
269
		endif
269
ifneq "$(findstring armv9,$(GCC_TARGET))" ""
270
		ifneq "$(findstring armv9,$(GCC_TARGET))" ""
270
gcc_depend	+= -Darm -D__arm -D__arm__
271
			gcc_depend	+= -Darm -D__arm -D__arm__
271
gcc_depend	+= -D__ARM_ARCH__=9
272
			gcc_depend	+= -D__ARM_ARCH__=9
272
endif
273
		endif
273
 
-
 
274
endif
274
	endif
275
 
-
 
276
gcc_depend	+= -Y $(GCC_ROOT)/lib/gcc-lib/$(GCC_MACHINE)/$(GCC_VERSION)/include
-
 
277
gcc_depend	+= -Y $(GCC_ROOT)/include
-
 
278
endif
275
endif
279
 
276
 
280
ifdef GCC_DEPEND
277
ifdef GCC_DEPEND
281
gcc_depend	+= $(GCC_DEPEND)
278
gcc_depend	+= $(GCC_DEPEND)
282
endif
279
endif
Line 301... Line 298...
301
ccdep_flags	+= \
298
ccdep_flags	+= \
302
		$(patsubst %,%,$(CFLAGS)) \
299
		$(patsubst %,%,$(CFLAGS)) \
303
		$(patsubst %,%,$(gcc_depend)) \
300
		$(patsubst %,%,$(gcc_depend)) \
304
		$(patsubst %,%,$(gcc_defines)) \
301
		$(patsubst %,%,$(gcc_defines)) \
305
		$(patsubst %,-D%,$(cc_defines)) \
302
		$(patsubst %,-D%,$(cc_defines)) \
-
 
303
		$(patsubst %,-Y %,$(GCC_CPATH)) \
306
		$(patsubst %,-I %,$(INCDIRS)) \
304
		$(patsubst %,-I %,$(INCDIRS)) \
307
		$(patsubst %,-I %,$(cc_includes))
305
		$(patsubst %,-I %,$(cc_includes))
308
 
306
 
309
ifeq ($(USE_GCCDEPEND),0)
307
ifeq ($(USE_GCCDEPEND),0)
310
ccdep_flags	+= \
308
ccdep_flags	+= \