Index: cpukit/ChangeLog
===================================================================
--- cpukit/ChangeLog	(revision be3e0f7e42ff04f5a34b35efa925aaf6737f1794)
+++ cpukit/ChangeLog	(revision 1462016612c05a752f9e261d64d0c04db1d9ceca)
@@ -1,2 +1,13 @@
+2002-07-22	Ralf Corsepius <corsepiu@faw.uni-ulm.de>
+
+	* aclocal/env-rtemsbsp.m4: Remove RTEMS_BSP_SPECS, PROJECT_RELEASE.
+	Add project_libdir, libdir. New GCC_SPECS. Various cleanups.
+	* aclocal/env-rtemscpu.m4: Remove RTEMS_BSP_SPECS, PROJECT_RELEASE.
+	Add project_libdir, libdir. New GCC_SPECS. Various cleanups.
+	* aclocal/rtems-top.m4: New PROJECT_ROOT handling.
+	* automake/compile.am: Remove RTEMS_BSP_SPECS, LD* flags, LINK,
+	references to bsp_specs. Use project_libdir instead of
+	$(PROJECT_RELEASE)/lib.
+
 2002-07-17	Ralf Corsepius <corsepiu@faw.uni-ulm.de>
 
Index: cpukit/aclocal/env-rtemsbsp.m4
===================================================================
--- cpukit/aclocal/env-rtemsbsp.m4	(revision be3e0f7e42ff04f5a34b35efa925aaf6737f1794)
+++ cpukit/aclocal/env-rtemsbsp.m4	(revision 1462016612c05a752f9e261d64d0c04db1d9ceca)
@@ -22,18 +22,15 @@
 AC_SUBST(RTEMS_BSP)
 
-RTEMS_BSP_SPECS="-specs bsp_specs -qrtems"
-AC_SUBST(RTEMS_BSP_SPECS)
-
-GCC_SPECS="-B\$(PROJECT_ROOT)/lib/ -B\$(PROJECT_ROOT)/$RTEMS_BSP/lib/"
-AC_SUBST(GCC_SPECS)
-
 PROJECT_INCLUDE="\$(PROJECT_ROOT)/$RTEMS_BSP/lib/include"
 AC_SUBST(PROJECT_INCLUDE)
 
-PROJECT_RELEASE="\$(PROJECT_ROOT)/$RTEMS_BSP"   
-AC_SUBST(PROJECT_RELEASE)
+project_libdir="${PROJECT_ROOT}/$RTEMS_BSP/lib"   
+AC_SUBST(project_libdir)
 
-RTEMS_ROOT=$PROJECT_ROOT/c/$RTEMS_BSP
+RTEMS_ROOT="$PROJECT_ROOT/c/$RTEMS_BSP"
 AC_SUBST(RTEMS_ROOT)
+
+GCC_SPECS="-isystem \$(PROJECT_INCLUDE)"
+AC_SUBST(GCC_SPECS)
 
 RTEMS_ENABLE_BARE
@@ -45,3 +42,4 @@
 
 includedir="\${exec_prefix}/${RTEMS_BSP}/lib/include"
+libdir="\${exec_prefix}/${RTEMS_BSP}/lib"
 ])
Index: cpukit/aclocal/env-rtemscpu.m4
===================================================================
--- cpukit/aclocal/env-rtemscpu.m4	(revision be3e0f7e42ff04f5a34b35efa925aaf6737f1794)
+++ cpukit/aclocal/env-rtemscpu.m4	(revision 1462016612c05a752f9e261d64d0c04db1d9ceca)
@@ -6,7 +6,4 @@
 if test x"$multilib" = x"yes"; then
 ## FIXME: There is no multilib BSP
-  RTEMS_BSP_SPECS=""
-  AC_SUBST(RTEMS_BSP_SPECS)
-
   if test -n "$with_multisubdir"; then
     MULTIBUILDTOP=`echo "/$with_multisubdir" | sed 's,/[[^\\/]]*,../,g'`
@@ -19,6 +16,5 @@
   AC_SUBST(MULTISUBDIR)
 
-  PROJECT_ROOT="../../${RTEMS_TOPdir}/\$(MULTIBUILDTOP)\$(top_builddir)"
-  GCC_SPECS="-isystem \$(PROJECT_ROOT)/lib/include"
+  GCC_SPECS="-isystem \$(PROJECT_INCLUDE)"
   AC_SUBST(GCC_SPECS)
 
@@ -26,8 +22,8 @@
   AC_SUBST(PROJECT_INCLUDE)
 
-  PROJECT_RELEASE="\$(PROJECT_ROOT)"
-  AC_SUBST(PROJECT_RELEASE)
+  project_libdir="\$(PROJECT_ROOT)/lib"
+  AC_SUBST(project_libdir)
 
-  RTEMS_ROOT=${PROJECT_ROOT}
+  RTEMS_ROOT="${PROJECT_ROOT}"
   AC_SUBST(RTEMS_ROOT)
 
Index: cpukit/aclocal/rtems-top.m4
===================================================================
--- cpukit/aclocal/rtems-top.m4	(revision be3e0f7e42ff04f5a34b35efa925aaf6737f1794)
+++ cpukit/aclocal/rtems-top.m4	(revision 1462016612c05a752f9e261d64d0c04db1d9ceca)
@@ -36,7 +36,5 @@
 AC_SUBST(PROJECT_TOPdir)
 
-AS_IF([test "${with_project_root+set}" = set],
-  [PROJECT_ROOT="${with_project_root}${RTEMS_TOPdir}/\$(top_builddir)"],
-  [PROJECT_ROOT="${RTEMS_TOPdir}/\$(top_builddir)"])
+PROJECT_ROOT="${with_project_root}${RTEMS_TOPdir}/\$(MULTIBUILDTOP)\$(top_builddir)"
 AC_SUBST(PROJECT_ROOT)
 
Index: cpukit/automake/compile.am
===================================================================
--- cpukit/automake/compile.am	(revision be3e0f7e42ff04f5a34b35efa925aaf6737f1794)
+++ cpukit/automake/compile.am	(revision 1462016612c05a752f9e261d64d0c04db1d9ceca)
@@ -46,5 +46,5 @@
 CFLAGS_DEFAULT=-g -Wall
 ## gcc >= 2.8.x
-GCCSPECS = $(GCC_SPECS) $(RTEMS_BSP_SPECS)
+GCCSPECS = $(GCC_SPECS)
 else
 ## fall back to the old style compilers/*.cfg
@@ -64,18 +64,7 @@
 # some compilers do allow optimization with their "-g"
 CFLAGS_DEBUG_OPTIMIZE_V=-g
-LDFLAGS_DEBUG_V =
 
 # profile flag; use gprof(1)
 CFLAGS_PROFILE_V=-pg
-LDFLAGS_PROFILE_V =
-
-# List of library paths without -L
-LD_PATHS= $(PROJECT_RELEASE)/lib
-
-# ld flag for incomplete link
-LDFLAGS_INCOMPLETE = -r
-
-# ld flags for profiling, debugging
-LDFLAGS=$(LDFLAGS_PROFILE) $(LDFLAGS_DEBUG) $(LD_PATHS:%=-L %)
 
 #
@@ -86,6 +75,4 @@
 	$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
 CCLD = $(CC)
-LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
-        $(AM_LDFLAGS) $(LDFLAGS) -o $@
 
 CCASCOMPILE = $(CCAS) $(AM_CCASFLAGS) $(CCASFLAGS)
@@ -133,16 +120,4 @@
 @ENDIF@
 
-if RTEMS_USE_GCC
-## gcc >= 2.8
-define make-rel
-	$(LINK) -qnolinkcmds -nostdlib -Wl,-r $(XLDFLAGS) $^
-endef
-else
-## non-gcc
-define make-rel
-	$(LINK) $(XLDFLAGS) $^
-endef
-endif
-
 ## -------------------------------------------------------------------------
 
@@ -187,5 +162,5 @@
 ## gcc >= gcc-2.8
 RTEMS_CFLAGS_OPTIMIZE_V =
-RTEMS_CFLAGS_DEBUG_V = -qrtems_debug -Wno-unused
+RTEMS_CFLAGS_DEBUG_V = -Wno-unused
 RTEMS_CFLAGS_PROFILE_V =
 
