From ccf2cfd97b824d93d995e251043903e447e2da61 Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Fri, 13 Sep 2002 13:39:52 +0000 Subject: 2002-09-13 Joel Sherrill * 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. --- make/compilers/gcc-target-default.cfg | 79 +---------------------------------- 1 file changed, 2 insertions(+), 77 deletions(-) (limited to 'make/compilers') 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 -- cgit v1.2.3