From fb2205a11b25796f47b950ab64ff9e2446a55301 Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Tue, 9 Sep 2008 16:30:27 +0000 Subject: 2008-09-09 Joel Sherrill * leaf.cfg, compilers/gcc-target-default.cfg, custom/bf537Stamp.cfg, custom/gen5200.cfg, custom/gen83xx.cfg, custom/genmcf548x.cfg, custom/mbx8xx.cfg, custom/mpc55xx.cfg, custom/nds.cfg, custom/pc386.cfg, custom/tqm8xx.cfg: Remove use of AM_LDFLAGS. Ensure LDFLAGS works all the time. Clean up BSPs which defined their own make-exe rules inappropriately. --- make/ChangeLog | 9 +++++++++ make/compilers/gcc-target-default.cfg | 19 +------------------ make/custom/bf537Stamp.cfg | 14 -------------- make/custom/gen5200.cfg | 2 +- make/custom/gen83xx.cfg | 2 +- make/custom/genmcf548x.cfg | 22 +++++----------------- make/custom/mbx8xx.cfg | 2 +- make/custom/mpc55xx.cfg | 9 ++------- make/custom/nds.cfg | 8 ++------ make/custom/pc386.cfg | 2 +- make/custom/tqm8xx.cfg | 2 +- make/leaf.cfg | 4 ++-- 12 files changed, 26 insertions(+), 69 deletions(-) diff --git a/make/ChangeLog b/make/ChangeLog index 32f464abfa..9d656b6e97 100644 --- a/make/ChangeLog +++ b/make/ChangeLog @@ -1,3 +1,12 @@ +2008-09-09 Joel Sherrill + + * leaf.cfg, compilers/gcc-target-default.cfg, custom/bf537Stamp.cfg, + custom/gen5200.cfg, custom/gen83xx.cfg, custom/genmcf548x.cfg, + custom/mbx8xx.cfg, custom/mpc55xx.cfg, custom/nds.cfg, + custom/pc386.cfg, custom/tqm8xx.cfg: Remove use of AM_LDFLAGS. Ensure + LDFLAGS works all the time. Clean up BSPs which defined their own + make-exe rules inappropriately. + 2008-09-03 Sebastian Huber * custom/gen5200.cfg: More CPU_CFLAGS: -meabi -msdata -fno-common. diff --git a/make/compilers/gcc-target-default.cfg b/make/compilers/gcc-target-default.cfg index 44133e6da9..3fd7bf3828 100644 --- a/make/compilers/gcc-target-default.cfg +++ b/make/compilers/gcc-target-default.cfg @@ -68,30 +68,13 @@ endif # List of library paths without -L LD_PATHS= $(PROJECT_RELEASE)/lib -# libraries you want EVERYONE to link with -#LD_LIBS= - -# ld flag to ensure pure-text -#LDFLAGS_MUST_BE_PURE_V = - -# ld flag for [un]shared objects -#LDFLAGS_STATIC_LIBRARIES_V = -#LDFLAGS_SHARED_LIBRARIES_V = - # ld flag for incomplete link LDFLAGS_INCOMPLETE = -r -# Special linker options when building lib.so -LDFLAGS_DYNAMIC_V = ?? - -# Some dynamic linking systems want the preferred name recorded in the binary -# ref: src/libxil/Makefile -LDFLAGS_DYNAMIC_LIBNAME_V = -h $(DYNAMIC_VERSION_LIBNAME) - # ld flags for profiling, debugging LDFLAGS_DEBUG_V = -qrtems_debug -LDFLAGS=$(LDFLAGS_DEBUG) $(LD_PATHS:%=-L %) +LDFLAGS += $(LDFLAGS_DEBUG) $(LD_PATHS:%=-L %) # # Stuff to clean and clobber for the compiler and its tools diff --git a/make/custom/bf537Stamp.cfg b/make/custom/bf537Stamp.cfg index 532df9f3a6..666bb8971b 100644 --- a/make/custom/bf537Stamp.cfg +++ b/make/custom/bf537Stamp.cfg @@ -12,22 +12,8 @@ RTEMS_BSP_FAMILY=bf537Stamp # This contains the compiler options necessary to select the CPU model # and (hopefully) optimize for it. -# CPU_CFLAGS = # optimize flag: typically -O2 # gcc-4.2.0 segfaults on -OX > -O0 CFLAGS_OPTIMIZE_V = -O2 -g - -# The following are definitions of make-exe which will work using ld as -# is currently required. - -define make-exe - $(LINK.c) $(AM_CFLAGS) $(AM_LDFLAGS) \ - $(LDLIBS) -o $@ \ - $(LINK_OBJS) $(LINK_LIBS) - $(NM) -g -n $@ > $(basename $@).num - $(SIZE) $@ -endef - -# Miscellaneous additions go here diff --git a/make/custom/gen5200.cfg b/make/custom/gen5200.cfg index f4d1fb1c69..39cdc313c1 100644 --- a/make/custom/gen5200.cfg +++ b/make/custom/gen5200.cfg @@ -22,4 +22,4 @@ CPU_CFLAGS = -mcpu=603e -mstrict-align \ # optimize flag: typically -O2 CFLAGS_OPTIMIZE_V = -O2 -g -fno-keep-inline-functions -AM_LDFLAGS += -qnolinkcmds -T $(RTEMS_LINKCMDS) +LDFLAGS += -qnolinkcmds -T $(RTEMS_LINKCMDS) diff --git a/make/custom/gen83xx.cfg b/make/custom/gen83xx.cfg index b99e461d35..d8faa53327 100644 --- a/make/custom/gen83xx.cfg +++ b/make/custom/gen83xx.cfg @@ -26,4 +26,4 @@ CPU_CFLAGS = -mcpu=603e -mstrict-align -fno-strict-aliasing \ # optimize flag: typically -O2 CFLAGS_OPTIMIZE_V = -O2 -g -fno-keep-inline-functions -funit-at-a-time -W -Wno-unused -AM_LDFLAGS+= -qnolinkcmds -T $(RTEMS_LINKCMDS) +LDFLAGS += -qnolinkcmds -T $(RTEMS_LINKCMDS) diff --git a/make/custom/genmcf548x.cfg b/make/custom/genmcf548x.cfg index 680ac6d0d2..480a7a4c40 100644 --- a/make/custom/genmcf548x.cfg +++ b/make/custom/genmcf548x.cfg @@ -21,22 +21,10 @@ CFLAGS_OPTIMIZE_V = -O2 -g -fomit-frame-pointer #MTARGET=ram #endif +LDFLAGS = -qnolinkcmds -Wl,-T$(RTEMS_LINKCMDS) -# The following are definitions of make-exe which will work using ld as -# is currently required. - - -define make-exe - $(LINK.c) $(AM_CFLAGS) $(AM_LDFLAGS) -o $(basename $@).nxe \ - $(LINK_OBJS) $(LINK_LIBS) -qnolinkcmds -Wl,-T$(RTEMS_LINKCMDS) - $(OBJCOPY) -O binary --strip-all $(basename $@).nxe $@ - $(SIZE) $(basename $@).nxe +define bsp-post-link + $(OBJCOPY) -O binary --strip-all $(basename $@).exe \ + $(basename $@)$(DOWNEXT) + $(default-bsp-post-link) endef -define make-cxx-exe - $(LINK.cc) $(AM_CFLAGS) $(AM_LDFLAGS) -o $(basename $@).nxe \ - $(LINK_OBJS) $(LINK_LIBS) -qnolinkcmds -Wl,-T$(RTEMS_LINKCMDS) - $(OBJCOPY) -O binary --strip-all $(basename $@).nxe $@ - $(SIZE) $(basename $@).nxe -endef - -# Miscellaneous additions go here diff --git a/make/custom/mbx8xx.cfg b/make/custom/mbx8xx.cfg index 621a1d76d2..dc67fa4c28 100644 --- a/make/custom/mbx8xx.cfg +++ b/make/custom/mbx8xx.cfg @@ -51,7 +51,7 @@ CFLAGS_OPTIMIZE_V = -O2 -g -fno-keep-inline-functions # Override default start file START_BASE= -AM_LDFLAGS += $(MBX8xx_LDFLAGS) +LDFLAGS += $(MBX8xx_LDFLAGS) define bsp-post-link cp $(basename $@).exe $(basename $@)$(DOWNEXT) diff --git a/make/custom/mpc55xx.cfg b/make/custom/mpc55xx.cfg index c77ea020b9..a178903206 100644 --- a/make/custom/mpc55xx.cfg +++ b/make/custom/mpc55xx.cfg @@ -16,12 +16,7 @@ RTEMS_CPU_MODEL = mpc55xx RTEMS_BSP_FAMILY = mpc55xxevb # FIXME -CPU_CFLAGS = -mcpu=8540 -meabi -msdata -fno-common -funit-at-a-time -D__ppc_generic -mstrict-align -D$(RTEMS_BOARD_MODEL) +CPU_CFLAGS = -mcpu=8540 -meabi -msdata -fno-common -funit-at-a-time \ + -D__ppc_generic -mstrict-align -D$(RTEMS_BOARD_MODEL) CFLAGS_OPTIMIZE_V = -O2 -g -fno-keep-inline-functions - -define make-exe - $(LINK.c) $(AM_CFLAGS) $(AM_LDFLAGS)-o $(basename $@).exe $(LINK_OBJS) $(LINK_LIBS) - $(NM) -g -n $(basename $@).exe > $(basename $@).num - $(SIZE) $(basename $@).exe -endef diff --git a/make/custom/nds.cfg b/make/custom/nds.cfg index 7d88e2e953..004496e75e 100644 --- a/make/custom/nds.cfg +++ b/make/custom/nds.cfg @@ -23,9 +23,6 @@ CPU_CFLAGS = -mcpu=$(RTEMS_CPU_MODEL) -msoft-float -mstructure-size-boundary=8 CFLAGS_OPTIMIZE_V = -O2 #CFLAGS_OPTIMIZE_V = -Os -# The following are definitions of make-exe which will work using ld as -# is currently required. - NDSTOOL = $(PROJECT_TOOLS)/ndstool ifeq ($(RTEMS_MAKEFILE_PATH),) @@ -37,8 +34,7 @@ endif define bsp-post-link $(default-bsp-post-link) $(OBJCOPY) -O binary $(basename $@).exe $(basename $@).bin - $(NDSTOOL) -c $(basename $@).nds -9 $(basename $@).bin -7 $(COPROC_ELF_PATH)/coproc.bin + $(NDSTOOL) -c $(basename $@).nds -9 $(basename $@).bin \ + -7 $(COPROC_ELF_PATH)/coproc.bin rm -f $(basename $@).bin endef - -# Miscellaneous additions go here diff --git a/make/custom/pc386.cfg b/make/custom/pc386.cfg index 4be98089d5..ce65fe8a95 100644 --- a/make/custom/pc386.cfg +++ b/make/custom/pc386.cfg @@ -44,7 +44,7 @@ START16FILE=$(PROJECT_RELEASE)/lib/start16$(LIB_VARIANT).bin START16ADDR=0x00097C00 HEADERADDR=0x00097E00 -AM_LDFLAGS+= -Wl,-Ttext,$(RELOCADDR) +LDFLAGS += -Wl,-Ttext,$(RELOCADDR) define bsp-post-link $(default-bsp-post-link) diff --git a/make/custom/tqm8xx.cfg b/make/custom/tqm8xx.cfg index c1063a788e..12c6820be7 100644 --- a/make/custom/tqm8xx.cfg +++ b/make/custom/tqm8xx.cfg @@ -18,7 +18,7 @@ CPU_CFLAGS = -mcpu=860 -Dmpc860 -D$(RTEMS_TQM_MODEL) \ CFLAGS_OPTIMIZE_V = -O2 -g -fno-keep-inline-functions RTEMS_LINKCMDS=linkcmds.tqm8xx -AM_LDFLAGS+= -qnolinkcmds -T $(RTEMS_LINKCMDS) +LDFLAGS += -qnolinkcmds -T $(RTEMS_LINKCMDS) define bsp-post-link cp $(basename $@).exe $(basename $@)$(DOWNEXT) diff --git a/make/leaf.cfg b/make/leaf.cfg index 218dcdc4cc..4515951bc8 100644 --- a/make/leaf.cfg +++ b/make/leaf.cfg @@ -117,12 +117,12 @@ endif DOWNEXT=.ralf define bsp-link-c - $(LINK.c) $(CPU_CFLAGS) $(AM_CFLAGS) $(AM_LDFLAGS) \ + $(LINK.c) $(CPU_CFLAGS) $(AM_CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \ -o $(basename $@).exe $(LINK_OBJS) $(LINK_LIBS) endef define bsp-link-cxx - $(LINK.cc) $(CPU_CFLAGS) $(AM_CFLAGS) $(AM_LDFLAGS) \ + $(LINK.cc) $(CPU_CFLAGS) $(AM_CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \ -o $(basename $@).exe $(LINK_OBJS) $(LINK_LIBS) endef -- cgit v1.2.3