summaryrefslogtreecommitdiffstats
path: root/make/compilers
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>1998-05-18 16:38:38 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>1998-05-18 16:38:38 +0000
commit6ee6abb40debde1c502c724fcede99a1ba89ba2c (patch)
tree5f1f8a80f206c06df762edea78869ce3fb60571d /make/compilers
parent60fa6305763a659156ad183a2000ebe446dcc1c5 (diff)
downloadrtems-6ee6abb40debde1c502c724fcede99a1ba89ba2c.tar.bz2
Added C++ rule.
Added CROSS_TARGET conditionals so unix port can share this file.
Diffstat (limited to 'make/compilers')
-rw-r--r--make/compilers/gcc-target-default.cfg23
1 files changed, 22 insertions, 1 deletions
diff --git a/make/compilers/gcc-target-default.cfg b/make/compilers/gcc-target-default.cfg
index 377d76de26..b540fc2360 100644
--- a/make/compilers/gcc-target-default.cfg
+++ b/make/compilers/gcc-target-default.cfg
@@ -20,6 +20,23 @@ INCLUDE_KA9Q_yes_V = -I$(PROJECT_INCLUDE)/ka9q
INCLUDE_KA9Q = $(INCLUDE_KA9Q_$(HAS_KA9Q)_V)
ifeq ($(RTEMS_USE_GCC272),yes)
+ifeq ($(RTEMS_CROSS_TARGET),no)
+
+ifdef RTEMS_LIBC_DIR
+RTEMS_LIBC_INCLUDES := -I$(RTEMS_LIBC_DIR)/include
+endif
+
+# Used for posix bsps
+CFLAGS_DEFAULT = $(CPU_DEFINES) $(CPU_CFLAGS) -Wall -ansi -fasm -g \
+ -I$(PROJECT_INCLUDE) \
+ $(INCLUDE_KA9Q) \
+ $(RTEMS_LIBC_INCLUDES) $(DEFINES)
+
+ASMFLAGS=$(CPU_DEFINES) $(CPU_CFLAGS) -g \
+ -I$(PROJECT_INCLUDE) \
+ $(RTEMS_LIBC_INCLUDES) $(DEFINES)
+else
+# Used for embedded bsps
# Ask gcc where it finds its own include files
GCC_INCLUDE=$(shell $(CC) $(CPU_CFLAGS) -print-file-name=include)
@@ -31,6 +48,7 @@ CFLAGS_DEFAULT = $(CPU_DEFINES) $(CPU_CFLAGS) -Wall -ansi -fasm -g \
ASMFLAGS=$(CPU_DEFINES) $(CPU_CFLAGS) -g \
-nostdinc -I$(PROJECT_INCLUDE) \
-I$(RTEMS_LIBC_DIR)/include -I$(GCC_INCLUDE) $(DEFINES)
+endif
# default location of Standard C Library
ifndef LIBC_LIBC
@@ -160,12 +178,13 @@ MKLIB=echo library is complete:
#
COMPILE.c=$(CC) $(CFLAGS) $(XCFLAGS) -c
+COMPILE.cc=$(CXX) $(CFLAGS) $(CXXFLAGS) -fno-rtti $(XCFLAGS) -c
${ARCH}/%.o: %.c
${COMPILE.c} -o $@ $<
${ARCH}/%.o: %.cc
- ${COMPILE.c} -o $@ $<
+ ${COMPILE.cc} -o $@ $<
${ARCH}/%.o: %.S
${COMPILE.c} -DASM -o $@ $<
@@ -239,7 +258,9 @@ CONSTRUCTOR=
LIBC_LOW=
+ifndef LIBGCC
LIBGCC = $(shell $(CC) $(CFLAGS) -print-libgcc-file-name)
+endif
LINK_OBJS=\
$(CONSTRUCTOR) \