fixes for host gcc 4.6.1
[zpugcc/jano.git] / toolchain / gcc / libgloss / config / dos.mh
blobc5874cb424ba4881c76b0b59c6d615fc5c2fe83a
1 NEWLIB_CFLAGS = `if [ -d ${objroot}/newlib ]; then echo -I${objroot}/newlib/targ-include -I${srcroot}/newlib/libc/include; fi`
2 NEWLIB_LDFLAGS = `if [ -d ${objroot}/newlib ]; then echo -B${objroot}/newlib/; fi`
4 INCLUDES = -I.
5 # Note that when building the library, ${MULTILIB} is not the way multilib
6 # options are passed; they're passed in $(CFLAGS).
7 CFLAGS_FOR_TARGET = -O2 -g ${MULTILIB} ${INCLUDES} ${NEWLIB_CFLAGS}
8 LDFLAGS_FOR_TARGET = ${MULTILIB} ${NEWLIB_LDFLAGS}
9 ARFLAGS_FOR_TARGET = qc
11 # find the tools used to build libgloss. As this is a DOS build in a
12 # 3way cross, we have to specify the name as it lives prebuilt in Unix
13 # land. The freshly built tools are for the wrong architecture.
14 CC_FOR_TARGET = `t='$(program_transform_name)'; echo gcc | sed -e $$t`
16 AS_FOR_TARGET = `t='$(program_transform_name)'; echo as | sed -e $$t`
18 AR_FOR_TARGET = `t='$(program_transform_name)'; echo ar | sed -e $$t`
20 LD_FOR_TARGET = `t='$(program_transform_name)'; echo ld | sed -e $$t`
22 RANLIB_FOR_TARGET = `t='$(program_transform_name)'; echo ranlib | sed -e $$t`
24 OBJDUMP_FOR_TARGET = `t='$(program_transform_name)'; echo objdump | sed -e $$t`
26 OBJCOPY_FOR_TARGET = `t='$(program_transform_name)'; echo objcopy | sed -e $$t`
29 # Using CFLAGS here may be confusing if the user has given a special
30 # CFLAGS intended for use on the host, since we are passing it to the
31 # cross-compiler; I'm not sure what to do about this.  INCLUDES is
32 # from the top level Makefile.
33 # FIXME: But isn't CFLAGS what is used to pass multilib options when
34 # building the library?
36 .c.o:
37         rootme=`pwd` ; \
38         echo CC_FOR_TARGET is ${CC_FOR_TARGET} ; \
39         $(CC_FOR_TARGET) $(CFLAGS_FOR_TARGET) $(INCLUDES) -c $<
41 .c.s:
42         rootme=`pwd` ; \
43         echo CC_FOR_TARGET is ${CC_FOR_TARGET} ; \
44         $(CC_FOR_TARGET) $(CFLAGS_FOR_TARGET) -S $(INCLUDES) $<
46 .S.o:
47         rootme=`pwd` ; \
48         echo CC_FOR_TARGET is ${CC_FOR_TARGET} ; \
49         $(CC_FOR_TARGET) $(CFLAGS_FOR_TARGET) $(INCLUDES) -c $<
51 .s.o:
52         rootme=`pwd` ; \
53         echo AS_FOR_TARGET is ${AS_FOR_TARGET} ; \
54         $(AS_FOR_TARGET) $(ASFLAGS_FOR_TARGET) $(INCLUDES) -o $*.o $<