changeset 139:79d72068f491 ecos-sw-2000-11-24

Merge from eCos master repository on 2000-11-24-16:52:55-GMT
author jlarmour
date Fri, 24 Nov 2000 17:42:47 +0000
parents 289bf90c6a9b
children b9721305fd46
files packages/ecos.db packages/hal/sh/arch/current/ChangeLog packages/hal/sh/arch/current/include/arch.inc packages/hal/sh/arch/current/include/basetype.h packages/hal/sh/arch/current/src/sh.ld packages/hal/sh/arch/current/src/vectors.S packages/services/memalloc/common/current/ChangeLog packages/services/memalloc/common/current/cdl/memalloc.cdl packages/services/memalloc/common/current/src/heapgen.tcl
diffstat 9 files changed, 53 insertions(+), 27 deletions(-) [+]
line wrap: on
line diff
--- a/packages/ecos.db
+++ b/packages/ecos.db
@@ -427,6 +427,7 @@ package CYGPKG_DEVS_ETH_ARM_EDB7XXX {
         description     "Ethernet driver for Cirrus Logic EDB7xxx development boards."
 }
 
+
 package CYGPKG_DEVS_ETH_ARM_EBSA285 {
 	alias 		{ "Intel EBSA285 with PRO/100+ ethernet driver"
 			   devs_eth_arm_ebsa285 ebsa285_eth_driver }
--- a/packages/hal/sh/arch/current/ChangeLog
+++ b/packages/hal/sh/arch/current/ChangeLog
@@ -1,3 +1,13 @@
+2000-11-24  Jonathan Larmour  <jlarmour@redhat.com>
+
+	* src/sh.ld: _reset should be adorned with CYG_LABEL_DEFN
+	* src/vectors.S: CYG_LABEL_DEFN should have been used everywhere
+	that CYG_LABEL_NAME was used, except for the scheduler lock which
+	is special as it is defined in C as an asm alias.
+	* include/arch.inc: Similarly here for symbol macros
+
+	* include/basetype.h (CYG_LABEL_NAME): Delete. This is now obsolete.
+
 2000-11-22  Jesper Skov  <jskov@redhat.com>
 
 	* src/sh.ld: Added mangling to all symbols.
--- a/packages/hal/sh/arch/current/include/arch.inc
+++ b/packages/hal/sh/arch/current/include/arch.inc
@@ -68,16 +68,16 @@ CYG_LABEL_DEFN(name):
 CYG_LABEL_DEFN(name):
 
 #define SYM_PTR_REF(name)	\
-        .globl CYG_LABEL_NAME(name);		\
-$##name:	.long	CYG_LABEL_NAME(name)
+        .globl CYG_LABEL_DEFN(name);		\
+$##name:	.long	CYG_LABEL_DEFN(name)
 
 # We need this macro because the SH assembler is lacking the nice
 # inline immediate constant feature of the ARM assembler. So we have
 # to define constants ourselves, and sometimes we need more than one of
 # the same type. This allows the symbols used to change.
 #define SYM_PTR_REFn(name,n)	\
-        .globl CYG_LABEL_NAME(name);		\
-$##name##n:	.long	CYG_LABEL_NAME(name)
+        .globl CYG_LABEL_DEFN(name);		\
+$##name##n:	.long	CYG_LABEL_DEFN(name)
 
 #include <cyg/hal/platform.inc>
 	        
--- a/packages/hal/sh/arch/current/include/basetype.h
+++ b/packages/hal/sh/arch/current/include/basetype.h
@@ -58,10 +58,8 @@
 
 #ifdef linux
 # define CYG_LABEL_DEFN(_name_) _name_
-# define CYG_LABEL_NAME(_name_) _name_
 #else
 # define CYG_LABEL_DEFN(_name_) _##_name_
-# define CYG_LABEL_NAME(_name_) _##_name_
 #endif
 
 //-----------------------------------------------------------------------------
--- a/packages/hal/sh/arch/current/src/sh.ld
+++ b/packages/hal/sh/arch/current/src/sh.ld
@@ -44,7 +44,7 @@
 #include <cyg/hal/basetype.h>
 
 STARTUP(vectors.o)
-ENTRY(CYG_LABEL_NAME(_reset))
+ENTRY(CYG_LABEL_DEFN(_reset))
 #ifdef EXTRAS
 INPUT(extras.o)
 #endif
--- a/packages/hal/sh/arch/current/src/vectors.S
+++ b/packages/hal/sh/arch/current/src/vectors.S
@@ -93,10 +93,10 @@ FUNC_START(_reset)
         .align   2
 $_reset_platform:
 #ifdef CYG_HAL_STARTUP_RAM
-        .long   CYG_LABEL_NAME(_reset_platform)
+        .long   CYG_LABEL_DEFN(_reset_platform)
 #else
         // Uncached "shadow" address
-        .long   CYG_LABEL_NAME(_reset_platform)+0x20000000
+        .long   CYG_LABEL_DEFN(_reset_platform)+0x20000000
 #endif
                 
 #---------------------------------------------------------------------------
@@ -281,7 +281,7 @@ 1:
 
         .align   2
 $hal_vsr_table_int:
-        .long    CYG_LABEL_NAME(hal_vsr_table)+CYGNUM_HAL_VECTOR_INTERRUPT*4
+        .long    CYG_LABEL_DEFN(hal_vsr_table)+CYGNUM_HAL_VECTOR_INTERRUPT*4
 
 #---------------------------------------------------------------------------
 # Common interrupt handling code.
@@ -614,8 +614,12 @@ FUNC_START(hal_interrupt_stack_call_pend
         
 #ifdef CYGFUN_HAL_COMMON_KERNEL_SUPPORT
         SYM_PTR_REF(cyg_interrupt_call_pending_DSRs)
-        SYM_PTR_REF(cyg_scheduler_sched_lock)
         SYM_PTR_REF(interrupt_end)
+        # cyg_scheduler_sched_lock is special as it is defined as an asm alias
+        
+        .globl cyg_scheduler_sched_lock
+$cyg_scheduler_sched_lock:	.long	cyg_scheduler_sched_lock
+        
 #endif
 
 #---------------------------------------------------------------------------
@@ -704,7 +708,7 @@ 1:      mov.l   @r0+,r3                 
 #else
 
         # Jump to remaining setup code. Relative branch is OK since VMA=LMA.
-        bra   CYG_LABEL_NAME(complete_setup)
+        bra   CYG_LABEL_DEFN(complete_setup)
          nop
                 
 #endif
@@ -806,7 +810,7 @@ 9:
 
         .data
 
-        .extern CYG_LABEL_NAME(hal_default_isr)
+        .extern CYG_LABEL_DEFN(hal_default_isr)
 #ifdef CYGIMP_HAL_COMMON_INTERRUPTS_CHAIN
 #define CYG_ISR_TABLE_SIZE    1
 #else
@@ -815,7 +819,7 @@ 9:
 
 SYM_DEF(hal_interrupt_handlers)
         .rept   CYG_ISR_TABLE_SIZE
-        .long   CYG_LABEL_NAME(hal_default_isr)
+        .long   CYG_LABEL_DEFN(hal_default_isr)
         .endr
 
 SYM_DEF(hal_interrupt_data)
--- a/packages/services/memalloc/common/current/ChangeLog
+++ b/packages/services/memalloc/common/current/ChangeLog
@@ -1,3 +1,12 @@
+2000-11-24  Jonathan Larmour  <jlarmour@redhat.com>
+
+	* cdl/memalloc.cdl: Invoke heapgen.tcl with build directory
+	surrounded by quotes (and do so in a portable way).
+
+	* src/heapgen.tcl: recurse back in on cygwin with correct quoting
+	to allow directories containing spaces. Also in a Solaris shell
+	compatible way.
+
 2000-11-21  Jonathan Larmour  <jlarmour@redhat.com>
 
 	* cdl/memalloc.cdl (CYGSEM_MEMALLOC_MALLOC_ZERO_RETURNS_NULL): 
--- a/packages/services/memalloc/common/current/cdl/memalloc.cdl
+++ b/packages/services/memalloc/common/current/cdl/memalloc.cdl
@@ -231,9 +231,9 @@ cdl_package CYGPKG_MEMALLOC {
         # an absolute path.
         make -priority 50 {
             heaps.cxx : heapgeninc.tcl <PACKAGE>/src/heapgen.tcl
-            sh -c "cd $(REPOSITORY)/$(PACKAGE)/src ; sh heapgen.tcl $(PREFIX) `pwd`"
-            @cp heaps.hxx $(PREFIX)/include/pkgconf/heaps.hxx
-            @chmod u+w $(PREFIX)/include/pkgconf/heaps.hxx
+            sh -c "PWD=`pwd` ; cd $(REPOSITORY)/$(PACKAGE)/src ; sh heapgen.tcl \"$(PREFIX)\" \"$$PWD\""
+            @cp heaps.hxx "$(PREFIX)"/include/pkgconf/heaps.hxx
+            @chmod u+w "$(PREFIX)"/include/pkgconf/heaps.hxx
         }
 
         make_object {
--- a/packages/services/memalloc/common/current/src/heapgen.tcl
+++ b/packages/services/memalloc/common/current/src/heapgen.tcl
@@ -1,9 +1,9 @@
 #!/bin/sh
 # these lines restart using the tcl shell \
-  exec sh -c "if ( echo | tclsh ) 2>/dev/null ; then \
+    exec sh -c "if ( echo | cygtclsh80 ) 2>/dev/null ; then \
+      exec cygtclsh80 \"${0}\" \"\`echo \\\"\\\`cygpath -ws \\\"${1}\\\" \\\`\\\" |sed 's#\\\\\\\\#/#g'\`\" \"\`echo \\\"\\\`cygpath -ws \\\"${2}\\\" \\\`\\\" |sed 's#\\\\\\\\#/#g'\`\" ; \
+    elif ( echo | tclsh ) 2>/dev/null ; then \
       exec tclsh \"${0}\" ${1+${*}} ; \
-    elif ( echo | cygtclsh80 ) 2>/dev/null ; then \
-      exec cygtclsh80 \"${0}\" `echo "\`cygpath -w ${1} 2>/dev/null\`" |sed 's#\\\\#/#g'` `echo "\`cygpath -w ${2} 2>/dev/null\`" |sed 's#\\\\#/#g'` ; \
     else \
       echo Could not find TCL interpreter ; \
       exit 1 ; \
@@ -56,10 +56,6 @@
 
 set debug 0
 
-if { $argc != 2 } {
-    error "Usage: heapgen.tcl installdir builddir"
-}
-
 proc dputs { args } {
     global debug
     if { $debug > 0 } {
@@ -71,15 +67,23 @@ proc dputs { args } {
     }
 }
 
+dputs "argc=" $argc
+dputs "argv=" $argv
+
+if { $argc != 2 } {
+    error "Usage: heapgen.tcl installdir builddir"
+}
+
 set installdir [ lindex $argv 0 ]
 set builddir   [ lindex $argv 1 ]
 
+dputs "builddir=" $builddir
+dputs "installdir=" $installdir
+dputs "pwd=" [pwd]
+
 # Fetch relevant config data placed in the generated file heapgeninc.tcl
 source [ file join $builddir heapgeninc.tcl ]
 
-dputs "builddir=" $builddir
-dputs "installdir=" $installdir
-dputs "pwd=" [pwd]
 dputs "memlayout_h=" $memlayout_h
 
 # ----------------------------------------------------------------------------