summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2002-09-13 13:39:52 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2002-09-13 13:39:52 +0000
commitccf2cfd97b824d93d995e251043903e447e2da61 (patch)
treecd6fde86109aa6dda1a83065ec16cb1fd8e53dfe
parentcb727744e8d36fe1562103debfaa13a645c651bb (diff)
downloadrtems-ccf2cfd97b824d93d995e251043903e447e2da61.tar.bz2
2002-09-13 Joel Sherrill <joel@OARcorp.com>
* Part of addressing PR281. * main.cfg: Added recognition of VARIANT=DEBUG on command line. * compilers/gcc-target-default.cfg: Removed remaining support for RTEMS_USE_GCC272 and RTEMS_LIBC_DIR as well as added -qrtems_debug as one of the LDFLAGS when the debug variant is specified.
-rw-r--r--c/src/make/compilers/gcc-target-default.cfg79
-rw-r--r--make/ChangeLog8
-rw-r--r--make/compilers/gcc-target-default.cfg79
-rw-r--r--make/main.cfg8
4 files changed, 19 insertions, 155 deletions
diff --git a/c/src/make/compilers/gcc-target-default.cfg b/c/src/make/compilers/gcc-target-default.cfg
index 4293988e50..4d7a6c5b3c 100644
--- a/c/src/make/compilers/gcc-target-default.cfg
+++ b/c/src/make/compilers/gcc-target-default.cfg
@@ -27,39 +27,6 @@ CFLAGS = $(CFLAGS_DEFAULT) $(XCFLAGS)
CXXFLAGS = $(CFLAGS_DEFAULT) $(XCXXFLAGS)
ASFLAGS = $(CPU_ASFLAGS) $(XASFLAGS)
-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
-CPPFLAGS += \
- -I$(PROJECT_INCLUDE) \
- $(RTEMS_LIBC_INCLUDES)
-else
-# Used for embedded bsps
-# Ask gcc where it finds its own include files
-GCC_INCLUDE=$(shell $(CC) $(CPU_CFLAGS) -print-file-name=include $(GCCSED))
-
-CPPFLAGS += -nostdinc \
- -I$(PROJECT_INCLUDE) \
- -I$(GCC_INCLUDE) \
- -I$(RTEMS_LIBC_DIR)/sys-include \
- -I$(RTEMS_LIBC_DIR)/include
-endif
-
-# default location of Standard C Library
-ifndef LIBC_LIBC
-LIBC_LIBC=$(RTEMS_LIBC_DIR)/lib/libc.a
-endif
-
-ifndef LIBC_LIBM
-LIBC_LIBM=$(RTEMS_LIBC_DIR)/lib/libm.a
-endif
-
-else
# NOTE: GCCSPECS probably belongs to CPPFLAGS
# Unfortunately, many custom/*.cfg files do not pass CPPFLAGS
# to their gcc-2.8 make-exe rules
@@ -70,16 +37,6 @@ CXX += $(GCCSPECS)
CPPFLAGS +=
-# default location of Standard C Library
-ifndef LIBC_LIBC
-LIBC_LIBC=$(shell $(CC) $(CPU_CFLAGS) -print-file-name=libc.a $(GCCSED))
-endif
-
-ifndef LIBC_LIBM
-LIBC_LIBM=$(shell $(CC) $(CPU_CFLAGS) -print-file-name=libm.a $(GCCSED))
-endif
-endif
-
# Define this to yes if C++ is included in the development environment.
# This requires that at least the GNU C++ compiler and libg++ be installed.
ifeq ($(HAS_CPLUSPLUS),yes)
@@ -90,10 +47,8 @@ endif
CFLAGS_DEBUG_V+=-Wno-unused
CXXFLAGS_DEBUG_V+=
-ifeq ($(RTEMS_USE_GCC272),no)
CFLAGS_DEBUG_V+=-qrtems_debug
CXXFLAGS_DEBUG_V+=-qrtems_debug
-endif
# when debugging, optimize flag: typically empty
# some compilers do allow optimization with their "-g"
@@ -140,7 +95,7 @@ LDFLAGS_DYNAMIC_LIBNAME_V = -h $(DYNAMIC_VERSION_LIBNAME)
# ld flags for profiling, debugging
LDFLAGS_PROFILE_V =
-LDFLAGS_DEBUG_V =
+LDFLAGS_DEBUG_V = -qrtems_debug
LDFLAGS=$(LDFLAGS_PROFILE) $(LDFLAGS_DEBUG) $(LD_PATHS:%=-L %)
@@ -237,23 +192,10 @@ else
START_FILE=$(PROJECT_RELEASE)/lib/$(START_BASE)$(LIB_VARIANT).o
endif
-CONSTRUCTOR=
-
-LIBC_LOW=
-
-ifndef LIBGCC
-LIBGCC = $(shell $(CC) $(CFLAGS) -print-libgcc-file-name $(GCCSED))
-endif
-
#
# NOTE: a rule to link an rtems' application should look similar to this
# (cf. "make-exe" in make/custom/*.cfg):
#
-# gcc27:
-# $(PGM): $(LINK_FILES)
-# $(LD) $(LDFLAGS) -o $@ $(LINK_OBJS) \
-# --start-group $(LINK_LIBS) --end-group
-#
# gcc28:
# $(PGM): $(LINK_FILES)
# $(CC) $(CFLAGS) -o $@ $(LINK_OBJS) $(LINK_LIBS)
@@ -272,17 +214,6 @@ LINK_FILES =\
$(PROJECT_RELEASE)/lib/librtemsbsp$(LIBSUFFIX_VA) \
$(PROJECT_RELEASE)/lib/librtemscpu$(LIBSUFFIX_VA)
-ifeq ($(RTEMS_USE_GCC272),yes)
-LINK_LIBS = $(PROJECT_RELEASE)/lib/librtemsall$(LIBSUFFIX_VA)
-ifeq ($(RTEMS_CROSS_TARGET),yes)
-# NOTE: add libc and libgcc only for embedded targets
-# LIBC_LIBM should not be needed by rtems itself.
-# FIXME: If a BSP requires libm, its make/custom/*.cfg file should add
-# LIBC_LIBM to LINK_LIBS (untested)
-LINK_LIBS += $(LIBC_LIBC) $(LIBGCC)
-endif
-endif
-
LINK_LIBS += $(LD_LIBS)
#
@@ -292,13 +223,7 @@ ifndef LINKCMDS
LINKCMDS=$(PROJECT_RELEASE)/lib/linkcmds
endif
-ifeq ($(RTEMS_USE_GCC272),yes)
define make-rel
- $(LD) $(LDFLAGS_INCOMPLETE) $(XLDFLAGS) -o $@ $^
-endef
-else
-define make-rel
- $(LINK.c) $(AM_CFLAGS) $(AM_LDFLAGS) \
+ $(LINK.c) $(CFLAGS) $(AM_CFLAGS) $(AM_LDFLAGS) \
-qnolinkcmds -nostdlib -Wl,-r $(XLDFLAGS) -o $@ $^
endef
-endif
diff --git a/make/ChangeLog b/make/ChangeLog
index bd2167d014..297df2d57c 100644
--- a/make/ChangeLog
+++ b/make/ChangeLog
@@ -1,3 +1,11 @@
+2002-09-13 Joel Sherrill <joel@OARcorp.com>
+
+ * Part of addressing PR281.
+ * main.cfg: Added recognition of VARIANT=DEBUG on command line.
+ * compilers/gcc-target-default.cfg: Removed remaining support for
+ RTEMS_USE_GCC272 and RTEMS_LIBC_DIR as well as added -qrtems_debug
+ as one of the LDFLAGS when the debug variant is specified.
+
2002-08-12 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
* custom/posix.cfg: Don't include host.cfg.
diff --git a/make/compilers/gcc-target-default.cfg b/make/compilers/gcc-target-default.cfg
index 4293988e50..4d7a6c5b3c 100644
--- a/make/compilers/gcc-target-default.cfg
+++ b/make/compilers/gcc-target-default.cfg
@@ -27,39 +27,6 @@ CFLAGS = $(CFLAGS_DEFAULT) $(XCFLAGS)
CXXFLAGS = $(CFLAGS_DEFAULT) $(XCXXFLAGS)
ASFLAGS = $(CPU_ASFLAGS) $(XASFLAGS)
-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
-CPPFLAGS += \
- -I$(PROJECT_INCLUDE) \
- $(RTEMS_LIBC_INCLUDES)
-else
-# Used for embedded bsps
-# Ask gcc where it finds its own include files
-GCC_INCLUDE=$(shell $(CC) $(CPU_CFLAGS) -print-file-name=include $(GCCSED))
-
-CPPFLAGS += -nostdinc \
- -I$(PROJECT_INCLUDE) \
- -I$(GCC_INCLUDE) \
- -I$(RTEMS_LIBC_DIR)/sys-include \
- -I$(RTEMS_LIBC_DIR)/include
-endif
-
-# default location of Standard C Library
-ifndef LIBC_LIBC
-LIBC_LIBC=$(RTEMS_LIBC_DIR)/lib/libc.a
-endif
-
-ifndef LIBC_LIBM
-LIBC_LIBM=$(RTEMS_LIBC_DIR)/lib/libm.a
-endif
-
-else
# NOTE: GCCSPECS probably belongs to CPPFLAGS
# Unfortunately, many custom/*.cfg files do not pass CPPFLAGS
# to their gcc-2.8 make-exe rules
@@ -70,16 +37,6 @@ CXX += $(GCCSPECS)
CPPFLAGS +=
-# default location of Standard C Library
-ifndef LIBC_LIBC
-LIBC_LIBC=$(shell $(CC) $(CPU_CFLAGS) -print-file-name=libc.a $(GCCSED))
-endif
-
-ifndef LIBC_LIBM
-LIBC_LIBM=$(shell $(CC) $(CPU_CFLAGS) -print-file-name=libm.a $(GCCSED))
-endif
-endif
-
# Define this to yes if C++ is included in the development environment.
# This requires that at least the GNU C++ compiler and libg++ be installed.
ifeq ($(HAS_CPLUSPLUS),yes)
@@ -90,10 +47,8 @@ endif
CFLAGS_DEBUG_V+=-Wno-unused
CXXFLAGS_DEBUG_V+=
-ifeq ($(RTEMS_USE_GCC272),no)
CFLAGS_DEBUG_V+=-qrtems_debug
CXXFLAGS_DEBUG_V+=-qrtems_debug
-endif
# when debugging, optimize flag: typically empty
# some compilers do allow optimization with their "-g"
@@ -140,7 +95,7 @@ LDFLAGS_DYNAMIC_LIBNAME_V = -h $(DYNAMIC_VERSION_LIBNAME)
# ld flags for profiling, debugging
LDFLAGS_PROFILE_V =
-LDFLAGS_DEBUG_V =
+LDFLAGS_DEBUG_V = -qrtems_debug
LDFLAGS=$(LDFLAGS_PROFILE) $(LDFLAGS_DEBUG) $(LD_PATHS:%=-L %)
@@ -237,23 +192,10 @@ else
START_FILE=$(PROJECT_RELEASE)/lib/$(START_BASE)$(LIB_VARIANT).o
endif
-CONSTRUCTOR=
-
-LIBC_LOW=
-
-ifndef LIBGCC
-LIBGCC = $(shell $(CC) $(CFLAGS) -print-libgcc-file-name $(GCCSED))
-endif
-
#
# NOTE: a rule to link an rtems' application should look similar to this
# (cf. "make-exe" in make/custom/*.cfg):
#
-# gcc27:
-# $(PGM): $(LINK_FILES)
-# $(LD) $(LDFLAGS) -o $@ $(LINK_OBJS) \
-# --start-group $(LINK_LIBS) --end-group
-#
# gcc28:
# $(PGM): $(LINK_FILES)
# $(CC) $(CFLAGS) -o $@ $(LINK_OBJS) $(LINK_LIBS)
@@ -272,17 +214,6 @@ LINK_FILES =\
$(PROJECT_RELEASE)/lib/librtemsbsp$(LIBSUFFIX_VA) \
$(PROJECT_RELEASE)/lib/librtemscpu$(LIBSUFFIX_VA)
-ifeq ($(RTEMS_USE_GCC272),yes)
-LINK_LIBS = $(PROJECT_RELEASE)/lib/librtemsall$(LIBSUFFIX_VA)
-ifeq ($(RTEMS_CROSS_TARGET),yes)
-# NOTE: add libc and libgcc only for embedded targets
-# LIBC_LIBM should not be needed by rtems itself.
-# FIXME: If a BSP requires libm, its make/custom/*.cfg file should add
-# LIBC_LIBM to LINK_LIBS (untested)
-LINK_LIBS += $(LIBC_LIBC) $(LIBGCC)
-endif
-endif
-
LINK_LIBS += $(LD_LIBS)
#
@@ -292,13 +223,7 @@ ifndef LINKCMDS
LINKCMDS=$(PROJECT_RELEASE)/lib/linkcmds
endif
-ifeq ($(RTEMS_USE_GCC272),yes)
define make-rel
- $(LD) $(LDFLAGS_INCOMPLETE) $(XLDFLAGS) -o $@ $^
-endef
-else
-define make-rel
- $(LINK.c) $(AM_CFLAGS) $(AM_LDFLAGS) \
+ $(LINK.c) $(CFLAGS) $(AM_CFLAGS) $(AM_LDFLAGS) \
-qnolinkcmds -nostdlib -Wl,-r $(XLDFLAGS) -o $@ $^
endef
-endif
diff --git a/make/main.cfg b/make/main.cfg
index 900af71485..dc4f00b6c3 100644
--- a/make/main.cfg
+++ b/make/main.cfg
@@ -21,9 +21,15 @@ PROJECT_TOOLS = $(PROJECT_RELEASE)/build-tools
# This is where the object files get put.
#
+ifeq ($(VARIANT),)
ARCH=o-optimize
-
VARIANT=
+else
+ifeq ($(VARIANT),DEBUG)
+ARCH=o-debug
+VARIANT=DEBUG
+endif
+endif
#
# Initial target for make(1)