summaryrefslogtreecommitdiffstats
path: root/make/compilers
diff options
context:
space:
mode:
Diffstat (limited to 'make/compilers')
-rw-r--r--make/compilers/Makefile.am7
-rw-r--r--make/compilers/gcc-no_bsp.cfg8
-rw-r--r--make/compilers/gcc-portsw.cfg8
-rw-r--r--make/compilers/gcc-target-default.cfg20
4 files changed, 19 insertions, 24 deletions
diff --git a/make/compilers/Makefile.am b/make/compilers/Makefile.am
index cfc9545c90..d4b915b525 100644
--- a/make/compilers/Makefile.am
+++ b/make/compilers/Makefile.am
@@ -4,10 +4,7 @@
AUTOMAKE_OPTIONS = foreign 1.4
-EXTRA_DIST = \
-gcc-no_bsp.cfg \
-gcc-portsw.cfg \
-gcc-target-default.cfg
+EXTRA_DIST = gcc-no_bsp.cfg gcc-portsw.cfg gcc-target-default.cfg
## -------------------------------------------------------
-include $(top_srcdir)/automake/local.am
+include $(top_srcdir)/automake/host.am
diff --git a/make/compilers/gcc-no_bsp.cfg b/make/compilers/gcc-no_bsp.cfg
index af2a88f580..63f9187020 100644
--- a/make/compilers/gcc-no_bsp.cfg
+++ b/make/compilers/gcc-no_bsp.cfg
@@ -78,10 +78,6 @@ CFLAGS_OPTIMIZE_V=-O4 -fomit-frame-pointer
# debug flag; typically -g
CFLAGS_DEBUG_V=-g -Wno-unused
-# when debugging, optimize flag: typically empty
-# some compilers do allow optimization with their "-g"
-CFLAGS_DEBUG_OPTIMIZE_V=
-
# profile flag; use gprof(1)
CFLAGS_PROFILE_V=-pg
@@ -211,10 +207,10 @@ ${ARCH}/%: %.sh
$(CHMOD) +x $@
# Dependency files for use by gmake
-# NOTE: we don't put in $(TARGET_ARCH)
+# NOTE: we don't put them into $(ARCH)
# so that 'make clean' doesn't blow it away
-DEPEND=Depends-$(TARGET_ARCH:o-%=%)
+DEPEND=Depends-${ARCH}
CLEAN_DEPEND=$(DEPEND).tmp
CLOBBER_DEPEND=$(DEPEND)
diff --git a/make/compilers/gcc-portsw.cfg b/make/compilers/gcc-portsw.cfg
index 2d67ebb099..ddcec0ed0e 100644
--- a/make/compilers/gcc-portsw.cfg
+++ b/make/compilers/gcc-portsw.cfg
@@ -59,10 +59,6 @@ CFLAGS_OPTIMIZE_V=-Os
# debug flag; typically -g
CFLAGS_DEBUG_V=-g -O0 -DRTEMS_DEBUG -DSTACK_CHECKER_ON
-# when debugging, optimize flag: typically empty
-# some compilers do allow optimization with their "-g"
-CFLAGS_DEBUG_OPTIMIZE_V=
-
# profile flag; use gprof(1)
CFLAGS_PROFILE_V=
@@ -198,10 +194,10 @@ ${ARCH}/%: %.sh
$(CHMOD) -f g+w $@
# Dependency files for use by gmake
-# NOTE: we don't put in $(TARGET_ARCH)
+# NOTE: we don't put them into $(ARCH)
# so that 'make clean' doesn't blow it away
-DEPEND=Depends-$(TARGET_ARCH:o-%=%)
+DEPEND=Depends-${ARCH}
CLEAN_DEPEND=$(DEPEND).tmp
CLOBBER_DEPEND=$(DEPEND)
diff --git a/make/compilers/gcc-target-default.cfg b/make/compilers/gcc-target-default.cfg
index 88b5e58c0d..fb5dfbad62 100644
--- a/make/compilers/gcc-target-default.cfg
+++ b/make/compilers/gcc-target-default.cfg
@@ -93,21 +93,21 @@ ifeq ($(RTEMS_USE_GCC272),no)
CFLAGS_DEBUG_V+=-qrtems_debug
endif
-# when debugging, optimize flag: typically empty
-# some compilers do allow optimization with their "-g"
-CFLAGS_DEBUG_OPTIMIZE_V=-g
-
# profile flag; use gprof(1)
CFLAGS_PROFILE_V=-pg
+ifndef AUTOMAKE
# default is to optimize
CFLAGS_OPTIMIZE=$(CFLAGS_OPTIMIZE_V)
+endif
# dynamic libraries
#CFLAGS_DYNAMIC_V=-fpic
#ASFLAGS_DYNAMIC_V=
+ifndef AUTOMAKE
CFLAGS += $(CFLAGS_OPTIMIZE) $(CFLAGS_DEBUG) $(CFLAGS_PROFILE)
+endif
# List of library paths without -L
LD_PATHS= $(PROJECT_RELEASE)/lib
@@ -186,7 +186,7 @@ ${ARCH}/%.o: %.S
# Make foo.rel from foo.o
${ARCH}/%.rel: ${ARCH}/%.o
- ${LD} $(LDFLAGS_INCOMPLETE) -o $@ $^
+ ${make-rel}
# create $(ARCH)/pgm from pgm.sh
${ARCH}/%: %.sh
@@ -214,7 +214,7 @@ ifneq ($(words $(C_FILES) $(CC_FILES) $(S_FILES)), 0)
# Replace foo.o with $(ARCH)/foo.o
# Replace $(ARCH) value with string $(ARCH)
# so that it will for debug and profile cases
- $(COMPILE.c) -M $^ | \
+ $(COMPILE.c) $(AM_CPPFLAGS) $(AM_CFLAGS) -M $^ | \
$(SED) -e 's?^\(.*\)\.o[ ]*:?$$(ARCH)/\1.o:?' \
-e 's?$(ARCH)/?$$(ARCH)/?' >$(DEPEND).tmp
$(MV) $(DEPEND).tmp $(DEPEND)
@@ -289,7 +289,13 @@ 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) \
+ -qnolinkcmds -nostdlib -Wl,-r $(XLDFLAGS) -o $@ $^
+endef
+endif