From 4090ebe85c7947db664c0839a2090d0076b7a9da Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Fri, 3 Dec 1999 13:25:00 +0000 Subject: Patch rtems-rc-19991123-rc-3.diff from Ralf Corsepius : The patch below provides * automake support for score/cpu/powerpc * The hack to propagate values from *.cfg to automake configuration * A fix for librdbg/powerpc/mcp750/Makefile.am (Was completely corrupted before) * Fixes some files which apparently where missing in rtems-rc-19991123-rc-2.diff * some minor configuration related patches To apply: rm -rf ./c/src/exec/score/cpu/powerpc/wrap patch -p1 < rtems-rc-19991123-rc-3.diff Attention: c/src/exec/score/cpu/[configure.in|aclocal.m4|configure] should be removed after applying the patch. Modifications had been made to the score/cpu/powerpc directory after the snapshot this was based on. In particular, the mpc750 and other_cpu directories had been renamed to new_exception_processing and old_exception_processing. After this patch was applied, modifications were made to account for this. --- Makefile.am | 1 + c/src/exec/configure.in | 2 +- c/src/exec/rtems/optman/Makefile.am | 6 +-- c/src/exec/score/cpu/configure.in | 62 ---------------------- c/src/exec/score/cpu/powerpc/Makefile.am | 6 +-- c/src/exec/score/cpu/sh/configure.in | 1 + c/src/exec/score/cpu/sh/rtems/score/Makefile.am | 4 -- c/src/librdbg/src/powerpc/mcp750/Makefile.am | 44 +++++++-------- .../powerpc/new_exception_processing/Makefile.am | 44 +++++++-------- c/src/make/Makefile.am | 7 +++ c/src/make/configure.in | 4 +- c/src/optman/rtems/Makefile.am | 6 +-- c/src/tests/psxtests/psxsem01/init.c | 1 + cpukit/score/cpu/powerpc/Makefile.am | 6 +-- testsuites/psxtests/psxsem01/init.c | 1 + 15 files changed, 63 insertions(+), 132 deletions(-) delete mode 100644 c/src/exec/score/cpu/configure.in diff --git a/Makefile.am b/Makefile.am index e29c56f737..a8e55340a5 100644 --- a/Makefile.am +++ b/Makefile.am @@ -23,6 +23,7 @@ aclocal/canonical-host.m4 \ aclocal/canonical-target-name.m4 \ aclocal/canonicalize-tools.m4 \ aclocal/check-bsps.m4 \ +aclocal/check-bsp-cache.m4 \ aclocal/check-cpu.m4 \ aclocal/check-cxx.m4 \ aclocal/check-files-in.m4 \ diff --git a/c/src/exec/configure.in b/c/src/exec/configure.in index a022f79567..c0d0de3624 100644 --- a/c/src/exec/configure.in +++ b/c/src/exec/configure.in @@ -67,7 +67,7 @@ if test "$HAS_ITRON_API" = "yes"; then cfg_subdirs="$cfg_subdirs itron" fi AC_CONFIG_SUBDIRS($cfg_subdirs) -AC_CONFIG_SUBDIRS(score/cpu) +AC_CONFIG_SUBDIRS(score/cpu/$RTEMS_CPU) PROJECT_INCLUDE="\$(PROJECT_ROOT)/$RTEMS_BSP/lib/include" AC_SUBST(PROJECT_INCLUDE) diff --git a/c/src/exec/rtems/optman/Makefile.am b/c/src/exec/rtems/optman/Makefile.am index d85aef17ad..b7cc699a13 100644 --- a/c/src/exec/rtems/optman/Makefile.am +++ b/c/src/exec/rtems/optman/Makefile.am @@ -16,13 +16,9 @@ PGMS = $(C_FILES:%.c=$(ARCH)/%.rel) include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg include $(top_srcdir)/../../../automake/lib.am -TMPINSTALL_FILES = \ -$(PROJECT_RELEASE)/lib \ +TMPINSTALL_FILES += \ $(C_FILES:%.c=$(PROJECT_RELEASE)/lib/%$(LIB_VARIANT).rel) -$(PROJECT_RELEASE)/lib: - @$(mkinstalldirs) $@ - $(PROJECT_RELEASE)/lib/%$(LIB_VARIANT).rel: $(ARCH)/%.rel $(INSTALL_DATA) $< $@ diff --git a/c/src/exec/score/cpu/configure.in b/c/src/exec/score/cpu/configure.in deleted file mode 100644 index de885e607e..0000000000 --- a/c/src/exec/score/cpu/configure.in +++ /dev/null @@ -1,62 +0,0 @@ -dnl Process this file with autoconf to produce a configure script. -dnl -dnl $Id$ - -AC_PREREQ(2.13) -AC_INIT(no_cpu) -RTEMS_TOP(../../../../..) -AC_CONFIG_AUX_DIR(../../../../..) - -AC_PROG_MAKE_SET -RTEMS_CANONICAL_TARGET_CPU - -AM_MAINTAINER_MODE -RTEMS_ENABLE_MULTIPROCESSING -RTEMS_ENABLE_POSIX -RTEMS_ENABLE_ITRON -RTEMS_ENABLE_INLINES -RTEMS_ENABLE_LIBCDIR - -RTEMS_ENV_RTEMSBSP - -AC_PROG_INSTALL - -RTEMS_CHECK_CPU -RTEMS_CANONICAL_HOST - -RTEMS_PROJECT_ROOT - -dnl check target cc -RTEMS_PROG_CC_FOR_TARGET -RTEMS_CANONICALIZE_TOOLS - -RTEMS_CHECK_NEWLIB - -# Check if there is custom/*.cfg for this BSP -RTEMS_CHECK_CUSTOM_BSP(RTEMS_BSP) -RTEMS_CHECK_MULTIPROCESSING(RTEMS_BSP) -RTEMS_CHECK_POSIX_API(RTEMS_BSP) -RTEMS_CHECK_ITRON_API(RTEMS_BSP) - -# The only use of System V IPC is the UNIX port when multiprocessing. -if test "$HAS_MP" = "yes"; then - RTEMS_CHECK_SYSV_UNIX -fi - -# find all the Executive Makefiles -if test -f $srcdir/$RTEMS_CPU/configure; then -cfg_subdirs="$RTEMS_CPU" -else -RTEMS_CHECK_MAKEFILE($RTEMS_CPU) -fi - -AC_CONFIG_SUBDIRS($cfg_subdirs) - -AM_CONDITIONAL(HAS_POSIX,test "$HAS_POSIX_API" = "yes") -AM_CONDITIONAL(HAS_ITRON,test "$HAS_ITRON_API" = "yes") - -# Try to explicitly list a Makefile here -AC_OUTPUT( -Makefile -$makefiles -) diff --git a/c/src/exec/score/cpu/powerpc/Makefile.am b/c/src/exec/score/cpu/powerpc/Makefile.am index aeff71be34..cbddc2bca7 100644 --- a/c/src/exec/score/cpu/powerpc/Makefile.am +++ b/c/src/exec/score/cpu/powerpc/Makefile.am @@ -5,10 +5,10 @@ AUTOMAKE_OPTIONS = foreign 1.4 ACLOCAL_AMFLAGS = -I $(RTEMS_TOPdir)/aclocal -if MPC750 -CPUDIR = mpc750 +if PPC_NEW_EXCEPTION_PROCESSING +CPUDIR = new_exception_processing else -CPUDIR = other_cpu +CPUDIR = old_exception_processing endif SUBDIRS = shared $(CPUDIR) diff --git a/c/src/exec/score/cpu/sh/configure.in b/c/src/exec/score/cpu/sh/configure.in index 46afcfd04c..dad4bc91c4 100644 --- a/c/src/exec/score/cpu/sh/configure.in +++ b/c/src/exec/score/cpu/sh/configure.in @@ -29,6 +29,7 @@ RTEMS_CHECK_NEWLIB # Check if there is custom/*.cfg for this BSP RTEMS_CHECK_CUSTOM_BSP(RTEMS_BSP) +RTEMS_CHECK_BSP_CACHE(RTEMS_BSP) PROJECT_INCLUDE="\$(PROJECT_ROOT)/$RTEMS_BSP/lib/include" AC_SUBST(PROJECT_INCLUDE) diff --git a/c/src/exec/score/cpu/sh/rtems/score/Makefile.am b/c/src/exec/score/cpu/sh/rtems/score/Makefile.am index cd110b7fc8..3008d9cef9 100644 --- a/c/src/exec/score/cpu/sh/rtems/score/Makefile.am +++ b/c/src/exec/score/cpu/sh/rtems/score/Makefile.am @@ -11,10 +11,6 @@ noinst_HEADERS = \ iosh7032.h ispsh7032.h \ iosh7045.h ispsh7045.h -## HACK: this should not be here -## Currently needed to get RTEMS_CPU_MODEL -include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg - # # (OPTIONAL) Add local stuff here using += # diff --git a/c/src/librdbg/src/powerpc/mcp750/Makefile.am b/c/src/librdbg/src/powerpc/mcp750/Makefile.am index a619510005..3e846b54f9 100644 --- a/c/src/librdbg/src/powerpc/mcp750/Makefile.am +++ b/c/src/librdbg/src/powerpc/mcp750/Makefile.am @@ -46,29 +46,22 @@ RPCGEN = @RPCGEN@ AWK = @AWK@ include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg -include $(RTEMS_ROOT)/make/lib.cfg +include $(top_srcdir)/../../../automake/lib.am -INSTALL_CHANGE = @INSTALL_CHANGE@ -mkinstalldirs = $(SHELL) $(top_srcdir)/@RTEMS_TOPdir@/mkinstalldirs +PREINSTALL_FILES = \ +$(PROJECT_INCLUDE)/rdbg \ +$(PROJECT_INCLUDE)/rdbg/remdeb.h -INSTALLDIRS = $(PROJECT_INCLUDE)/rdbg +$(PROJECT_INCLUDE)/rdbg: + @$(mkinstalldirs) $@ -$(INSTALLDIRS): - @$(mkinstalldirs) $(INSTALLDIRS) +TMPINSTALL_FILES += \ +$(PROJECT_RELEASE)/lib/$(LIBNAME)$(LIBVARIANT).a # # Add local stuff here using += # -DEFINES += -CPPFLAGS += -# -# Enable traces in RDBG -# -#CFLAGS += -DDDEBUG -# -CFLAGS += - # # Add your list of files to delete here. The config files # already know how to delete some stuff, so you may want @@ -76,15 +69,16 @@ CFLAGS += # 'make clobber' already includes 'make clean' # -CLEAN_ADDITIONS += $(LIB) $(H_FILES) $(GEN_C_FILES) -CLOBBER_ADDITIONS += +CLEANFILES += $(LIB) $(H_FILES) $(GEN_C_FILES) FRONTEND = \"$(RTEMS_CPU)/@RTEMS_BSP@/remdeb_f.x\" -all: ${ARCH} $(LIB) - @$(INSTALL_VARIANT) -m 644 $(LIB) $(PROJECT_RELEASE)/lib +$(PROJECT_RELEASE)/lib/$(LIBNAME)$(LIBVARIANT).a: $(LIB) + $(INSTALL_DATA) $< $@ -$(LIB): $(SRCS) ${OBJS} +all: ${ARCH} $(PREINSTALL_FILES) $(TMPINSTALL_FILES) + +$(LIB): ${OBJS} $(make-library) remdeb.h: $(X_FILES) @@ -92,7 +86,9 @@ remdeb.h: $(X_FILES) ( pwd=`pwd`; cd $(srcdir)/../..; \ $(RPCGEN) -h -DFRONTEND=$(FRONTEND) \ -o $$pwd/$@ remdeb.x ) - @$(INSTALL_CHANGE) -m 755 $@ $(PROJECT_INCLUDE)/rdbg + +$(PROJECT_INCLUDE)/rdbg/remdeb.h: remdeb.h + $(INSTALL_DATA) $< $@ remdeb_xdr.c: $(X_FILES) @rm -f $@ @@ -108,6 +104,6 @@ remdeb_svc.c: $(X_FILES) $(AWK) -f $(srcdir)/../../awk.svc THEPROG="remdeb.h" tmpSvc.c >$@ @rm -f tmpSvc.c -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - cd $(top_builddir) \ - && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status +EXTRA_DIST = remdeb_f.x + +include $(top_srcdir)/../../../automake/local.am diff --git a/c/src/librdbg/src/powerpc/new_exception_processing/Makefile.am b/c/src/librdbg/src/powerpc/new_exception_processing/Makefile.am index a619510005..3e846b54f9 100644 --- a/c/src/librdbg/src/powerpc/new_exception_processing/Makefile.am +++ b/c/src/librdbg/src/powerpc/new_exception_processing/Makefile.am @@ -46,29 +46,22 @@ RPCGEN = @RPCGEN@ AWK = @AWK@ include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg -include $(RTEMS_ROOT)/make/lib.cfg +include $(top_srcdir)/../../../automake/lib.am -INSTALL_CHANGE = @INSTALL_CHANGE@ -mkinstalldirs = $(SHELL) $(top_srcdir)/@RTEMS_TOPdir@/mkinstalldirs +PREINSTALL_FILES = \ +$(PROJECT_INCLUDE)/rdbg \ +$(PROJECT_INCLUDE)/rdbg/remdeb.h -INSTALLDIRS = $(PROJECT_INCLUDE)/rdbg +$(PROJECT_INCLUDE)/rdbg: + @$(mkinstalldirs) $@ -$(INSTALLDIRS): - @$(mkinstalldirs) $(INSTALLDIRS) +TMPINSTALL_FILES += \ +$(PROJECT_RELEASE)/lib/$(LIBNAME)$(LIBVARIANT).a # # Add local stuff here using += # -DEFINES += -CPPFLAGS += -# -# Enable traces in RDBG -# -#CFLAGS += -DDDEBUG -# -CFLAGS += - # # Add your list of files to delete here. The config files # already know how to delete some stuff, so you may want @@ -76,15 +69,16 @@ CFLAGS += # 'make clobber' already includes 'make clean' # -CLEAN_ADDITIONS += $(LIB) $(H_FILES) $(GEN_C_FILES) -CLOBBER_ADDITIONS += +CLEANFILES += $(LIB) $(H_FILES) $(GEN_C_FILES) FRONTEND = \"$(RTEMS_CPU)/@RTEMS_BSP@/remdeb_f.x\" -all: ${ARCH} $(LIB) - @$(INSTALL_VARIANT) -m 644 $(LIB) $(PROJECT_RELEASE)/lib +$(PROJECT_RELEASE)/lib/$(LIBNAME)$(LIBVARIANT).a: $(LIB) + $(INSTALL_DATA) $< $@ -$(LIB): $(SRCS) ${OBJS} +all: ${ARCH} $(PREINSTALL_FILES) $(TMPINSTALL_FILES) + +$(LIB): ${OBJS} $(make-library) remdeb.h: $(X_FILES) @@ -92,7 +86,9 @@ remdeb.h: $(X_FILES) ( pwd=`pwd`; cd $(srcdir)/../..; \ $(RPCGEN) -h -DFRONTEND=$(FRONTEND) \ -o $$pwd/$@ remdeb.x ) - @$(INSTALL_CHANGE) -m 755 $@ $(PROJECT_INCLUDE)/rdbg + +$(PROJECT_INCLUDE)/rdbg/remdeb.h: remdeb.h + $(INSTALL_DATA) $< $@ remdeb_xdr.c: $(X_FILES) @rm -f $@ @@ -108,6 +104,6 @@ remdeb_svc.c: $(X_FILES) $(AWK) -f $(srcdir)/../../awk.svc THEPROG="remdeb.h" tmpSvc.c >$@ @rm -f tmpSvc.c -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - cd $(top_builddir) \ - && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status +EXTRA_DIST = remdeb_f.x + +include $(top_srcdir)/../../../automake/local.am diff --git a/c/src/make/Makefile.am b/c/src/make/Makefile.am index a149c4a3ac..01bac334d9 100644 --- a/c/src/make/Makefile.am +++ b/c/src/make/Makefile.am @@ -41,5 +41,12 @@ endif SUBDIRS = compilers custom +include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg + +@RTEMS_BSP@.cache: Makefile + $(RM) $@ + @echo rtems_cv_RTEMS_CPU_MODEL=\$${rtems_cv_RTEMS_CPU_MODEL=$(RTEMS_CPU_MODEL)} >> $@ + @echo rtems_cv_RTEMS_BSP_FAMILY=\$${rtems_cv_RTEMS_BSP_FAMILY=$(RTEMS_BSP_FAMILY)} >> $@ + include $(top_srcdir)/../../../automake/subdirs.am include $(top_srcdir)/../../../automake/local.am diff --git a/c/src/make/configure.in b/c/src/make/configure.in index 01c9f0fc50..24068a65bf 100644 --- a/c/src/make/configure.in +++ b/c/src/make/configure.in @@ -128,5 +128,7 @@ host.cfg bsp.cfg custom/Makefile custom/default.cfg -compilers/Makefile +compilers/Makefile, +make $RTEMS_BSP.cache, +RTEMS_BSP=${RTEMS_BSP} ) diff --git a/c/src/optman/rtems/Makefile.am b/c/src/optman/rtems/Makefile.am index d85aef17ad..b7cc699a13 100644 --- a/c/src/optman/rtems/Makefile.am +++ b/c/src/optman/rtems/Makefile.am @@ -16,13 +16,9 @@ PGMS = $(C_FILES:%.c=$(ARCH)/%.rel) include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg include $(top_srcdir)/../../../automake/lib.am -TMPINSTALL_FILES = \ -$(PROJECT_RELEASE)/lib \ +TMPINSTALL_FILES += \ $(C_FILES:%.c=$(PROJECT_RELEASE)/lib/%$(LIB_VARIANT).rel) -$(PROJECT_RELEASE)/lib: - @$(mkinstalldirs) $@ - $(PROJECT_RELEASE)/lib/%$(LIB_VARIANT).rel: $(ARCH)/%.rel $(INSTALL_DATA) $< $@ diff --git a/c/src/tests/psxtests/psxsem01/init.c b/c/src/tests/psxtests/psxsem01/init.c index 32dac252a5..b81de1d12e 100644 --- a/c/src/tests/psxtests/psxsem01/init.c +++ b/c/src/tests/psxtests/psxsem01/init.c @@ -243,3 +243,4 @@ void *POSIX_Init( return NULL; /* just so the compiler thinks we returned something */ } + diff --git a/cpukit/score/cpu/powerpc/Makefile.am b/cpukit/score/cpu/powerpc/Makefile.am index aeff71be34..cbddc2bca7 100644 --- a/cpukit/score/cpu/powerpc/Makefile.am +++ b/cpukit/score/cpu/powerpc/Makefile.am @@ -5,10 +5,10 @@ AUTOMAKE_OPTIONS = foreign 1.4 ACLOCAL_AMFLAGS = -I $(RTEMS_TOPdir)/aclocal -if MPC750 -CPUDIR = mpc750 +if PPC_NEW_EXCEPTION_PROCESSING +CPUDIR = new_exception_processing else -CPUDIR = other_cpu +CPUDIR = old_exception_processing endif SUBDIRS = shared $(CPUDIR) diff --git a/testsuites/psxtests/psxsem01/init.c b/testsuites/psxtests/psxsem01/init.c index 32dac252a5..b81de1d12e 100644 --- a/testsuites/psxtests/psxsem01/init.c +++ b/testsuites/psxtests/psxsem01/init.c @@ -243,3 +243,4 @@ void *POSIX_Init( return NULL; /* just so the compiler thinks we returned something */ } + -- cgit v1.2.3