forked from Imagelibrary/rtems
2008-09-09 Joel Sherrill <joel.sherrill@OARcorp.com>
* 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.
This commit is contained in:
@@ -1,3 +1,12 @@
|
||||
2008-09-09 Joel Sherrill <joel.sherrill@OARcorp.com>
|
||||
|
||||
* 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 <sebastian.huber@embedded-brains.de>
|
||||
|
||||
* custom/gen5200.cfg: More CPU_CFLAGS: -meabi -msdata -fno-common.
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user