forked from Imagelibrary/rtems
Patch rtems-rc-4.5.0-7-cvs.diff from Ralf Corsepius <corsepiu@faw.uni-ulm.de>.
The patch contains:
* Many small cleanups wrt. make VARIANT=[DEBUG|PROFILE] support
* several modifications to make/custom/*.cfg
* Merger with the mvme2307.cfg you had posted two weeks ago (Please
check it, I did not check it against to version you posted today).
* Added a check to the toplevel configure.in to refuse building inside
of the source tree.
This commit is contained in:
@@ -54,7 +54,7 @@ if test "$no_recursion" != yes; then
|
||||
echo configuring in $target_subdir/$ac_config_dir
|
||||
|
||||
case "$srcdir" in
|
||||
.) ;;
|
||||
## .) ;;
|
||||
*)
|
||||
if test -d $target_subdir/$ac_config_dir || mkdir $target_subdir/$ac_config_dir; then :;
|
||||
else
|
||||
@@ -72,8 +72,8 @@ changequote(, )dnl
|
||||
changequote([, ])dnl
|
||||
|
||||
case "$srcdir" in
|
||||
.) # No --srcdir option. We are building in place.
|
||||
ac_sub_srcdir=$srcdir ;;
|
||||
## .) # No --srcdir option. We are building in place.
|
||||
## ac_sub_srcdir=$srcdir ;;
|
||||
/*) # Absolute path.
|
||||
ac_sub_srcdir=$srcdir/$ac_config_dir ;;
|
||||
*) # Relative path.
|
||||
|
||||
@@ -41,5 +41,11 @@ depend: depend-am
|
||||
${ARCH}:
|
||||
mkdir ${ARCH}
|
||||
|
||||
clean:
|
||||
$(RM) -r o-optimize o-debug o-profile
|
||||
clean-local:
|
||||
$(RM) -r o-optimize o-debug o-profile $(CLEANDIRS)
|
||||
$(RM) Depends-o-optimize.tmp Depends-o-debug.tmp Depends-o-profile.tmp
|
||||
|
||||
distclean-local:
|
||||
$(RM) Depends-o-optimize Depends-o-debug Depends-o-profile
|
||||
|
||||
PROJECT_TOOLS = $(PROJECT_RELEASE)/build-tools
|
||||
|
||||
@@ -50,11 +50,10 @@ $(REL): $(C_O_FILES) $(S_O_FILES)
|
||||
$(make-rel)
|
||||
|
||||
all-local: $(ARCH) $(PREINSTALL_FILES) $(REL)
|
||||
## all: $(ARCH)/rtems.o
|
||||
## all-local: $(ARCH)/rtems.o
|
||||
all-local: $(TMPINSTALL_FILES)
|
||||
|
||||
clean-local:
|
||||
$(RM) -r ../o-optimize ../o-debug ../o-profile
|
||||
CLEANDIRS = ../o-optimize ../o-debug ../o-profile
|
||||
|
||||
EXTRA_DIST = $(C_FILES) $(S_FILES)
|
||||
|
||||
|
||||
@@ -48,8 +48,7 @@ $(REL): $(C_O_FILES) $(S_O_FILES)
|
||||
|
||||
all-local: $(ARCH) $(PREINSTALL_FILES) $(REL) $(ARCH)/rtems.o $(TMPINSTALL_FILES)
|
||||
|
||||
clean-local:
|
||||
$(RM) -r ../o-optimize ../o-debug ../o-profile
|
||||
CLEANDIRS = ../o-optimize ../o-debug ../o-profile
|
||||
|
||||
UNUSED_FILES = irq_stub.S
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@ MAKE_FILES = README directory.cfg leaf.cfg lib.cfg
|
||||
|
||||
rtems_make_DATA = $(MAKE_FILES) $(GENERIC_FILES)
|
||||
|
||||
noinst_DATA = main.cfg
|
||||
noinst_DATA = main.cfg leaf.cfg
|
||||
|
||||
rtemsdir = $(prefix)
|
||||
rtems_bspdir = $(rtemsdir)/@RTEMS_BSP@
|
||||
|
||||
@@ -113,7 +113,7 @@ AC_LINK_FILES($cfg_dir/Templates/Makefile.leaf,Templates/Makefile.leaf)
|
||||
AC_LINK_FILES($cfg_dir/Templates/Makefile.dir,Templates/Makefile.dir)
|
||||
AC_LINK_FILES($cfg_dir/compilers/gcc-target-default.cfg,compilers/gcc-target-default.cfg)
|
||||
AC_LINK_FILES($cfg_dir/directory.cfg,directory.cfg)
|
||||
AC_LINK_FILES($cfg_dir/leaf.cfg,leaf.cfg)
|
||||
AC_LINK_FILES(leaf.cfg,leaf.cfg)
|
||||
AC_LINK_FILES($cfg_dir/lib.cfg,lib.cfg)
|
||||
AC_LINK_FILES($cfg_dir/README,README)
|
||||
|
||||
|
||||
@@ -6,10 +6,4 @@
|
||||
#
|
||||
# NOTE: This file does not get exported from the source tree
|
||||
#
|
||||
|
||||
#
|
||||
# where things are relative to PROJECT_ROOT; shouldn't need to change,
|
||||
# but could be overridden in custom files.
|
||||
#
|
||||
|
||||
PROJECT_TOOLS = $(PROJECT_RELEASE)/build-tools
|
||||
# Now, it's empty :)
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
|
||||
dnl Process this file with autoconf to produce a configure script.
|
||||
dnl
|
||||
dnl $Id$
|
||||
@@ -7,6 +6,14 @@ AC_PREREQ(2.13)
|
||||
AC_INIT(c)
|
||||
RTEMS_TOP(.)
|
||||
|
||||
# Abort if trying to build inside of the source tree.
|
||||
if test -f VERSION; then
|
||||
rm -f config.cache config.log confdefs.h
|
||||
AC_MSG_ERROR([***]
|
||||
[Attempt to build inside of the source tree]
|
||||
[Please use a separate build directory, instead] )
|
||||
fi
|
||||
|
||||
RTEMS_CANONICAL_TARGET_CPU
|
||||
AM_INIT_AUTOMAKE(rtems,$RTEMS_VERSION,no)
|
||||
AM_MAINTAINER_MODE
|
||||
|
||||
@@ -66,13 +66,21 @@ endef
|
||||
# This contains the compiler options necessary to select the CPU model
|
||||
# and (hopefully) optimize for it.
|
||||
#
|
||||
CPU_CFLAGS = -mcpu=604
|
||||
CPU_CFLAGS = -mcpu=604 -mmultiple -mstring -mstrict-align
|
||||
|
||||
# optimize flag: typically -0, could use -O4 or -fast
|
||||
# -O4 is ok for RTEMS
|
||||
# NOTE: some level of -O may be actually required by inline assembler
|
||||
#CFLAGS_OPTIMIZE_V=-O4 -fno-keep-inline-functions
|
||||
CFLAGS_OPTIMIZE_V=-O4 -mmultiple -mstring -mstrict-align -mcpu=604
|
||||
CFLAGS_OPTIMIZE_V = -O4
|
||||
|
||||
# debug flags: typically none, but at least -O1 is required due to this
|
||||
# BSP using inlined code
|
||||
CFLAGS_DEBUG_V = -O1
|
||||
|
||||
# profile flags: typically none, but at least -O1 is required due to this
|
||||
# BSP using inlined code
|
||||
CFLAGS_PROFILE_V = -O1
|
||||
|
||||
# The following is a linkcmds file which will work without using the
|
||||
# -specs system in gcc 2.8.
|
||||
@@ -87,12 +95,11 @@ CFLAGS_OPTIMIZE_V=-O4 -mmultiple -mstring -mstrict-align -mcpu=604
|
||||
# $(LD_LIBS) \
|
||||
# -Wl,-\( -Wl,-lc -Wl,-lrtemsall -Wl,-lgcc -Wl,-\)
|
||||
define make-exe
|
||||
$(LINK.c) $(LDLIBS) -o $@ $(LINK_OBJS) $(LINK_LIBS)
|
||||
$(LINK.c) $(AM_CFLAGS) $(AM_LDFLAGS) -o $@ $(LINK_OBJS) $(LINK_LIBS)
|
||||
$(NM) -g -n $@ > $(basename $@).num
|
||||
$(SIZE) $@
|
||||
#
|
||||
# The following builds bootable images for the board. But the way
|
||||
# the build procedure jumps around the tree is not cool.
|
||||
# The following commands make a bootable image but will not work outside
|
||||
# the build tree.
|
||||
# test -d ${PROJECT_RELEASE}/bin || mkdir ${PROJECT_RELEASE}/bin
|
||||
# $(CP) $@ $(PROJECT_ROOT)/powerpc-rtems/c/mvme2307/lib/libbsp/powerpc/$(RTEMS_BSP_FAMILY)/bootloader/$(ARCH); \
|
||||
# ( cd $(PROJECT_ROOT)/powerpc-rtems/c/mvme2307/lib/libbsp/powerpc/$(RTEMS_BSP_FAMILY)/bootloader; \
|
||||
|
||||
@@ -71,7 +71,7 @@ define make-exe
|
||||
endef
|
||||
else
|
||||
define make-exe
|
||||
$(LINK.c) $(LDLIBS) \
|
||||
$(LINK.c) $(AM_CFLAGS) $(AM_LDFLAGS) \
|
||||
-Wl,-defsym -Wl,MC68302_BASE=$(MC68302_BASE) \
|
||||
-o $@ \
|
||||
$(LINK_OBJS) $(LINK_LIBS)
|
||||
|
||||
@@ -62,8 +62,7 @@ define make-exe
|
||||
endef
|
||||
else
|
||||
define make-exe
|
||||
$(LINK.c) \
|
||||
$(LDLIBS) -o $@ \
|
||||
$(LINK.c) $(AM_CFLAGS) $(AM_LDFLAGS) -o $@ \
|
||||
$(LINK_OBJS) $(LINK_LIBS)
|
||||
$(NM) -g -n $@ > $(basename $@).num
|
||||
$(OBJCOPY) -oformat binary $@ $(basename $@).bin
|
||||
|
||||
Reference in New Issue
Block a user