diff options
author | levine <levine@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1999-09-23 16:16:29 +0000 |
---|---|---|
committer | levine <levine@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1999-09-23 16:16:29 +0000 |
commit | 23c7eb58e71ec3b6a18367713d6863bddba66988 (patch) | |
tree | bbe797b1af73ca9c239c7ae4126a0d86d349e61d | |
parent | e2c45134ee588d84f8e929ba2e4e3f397b81b827 (diff) | |
download | ATCD-23c7eb58e71ec3b6a18367713d6863bddba66988.tar.gz |
ChangeLogTag: Thu Sep 23 11:13:38 1999 Wei Chiang <wei.chiang@nokia.com>
-rw-r--r-- | ChangeLog-99b | 10 | ||||
-rw-r--r-- | ace/OS.cpp | 9 | ||||
-rw-r--r-- | ace/OS.h | 10 | ||||
-rw-r--r-- | ace/OS.i | 18 | ||||
-rw-r--r-- | ace/Synch.cpp | 5 | ||||
-rw-r--r-- | include/makeinclude/platform_chorus.GNU | 45 | ||||
-rw-r--r-- | include/makeinclude/rules.bin.GNU | 29 |
7 files changed, 103 insertions, 23 deletions
diff --git a/ChangeLog-99b b/ChangeLog-99b index dba056af6eb..cfd205251d8 100644 --- a/ChangeLog-99b +++ b/ChangeLog-99b @@ -1,3 +1,13 @@ +Thu Sep 23 11:13:38 1999 Wei Chiang <wei.chiang@nokia.com> + + * ace/OS.*,Synch.cpp: Chorus compiler (g++) seems to be + confused by "int" and "int&" in overloaded operations. + A dummy variables to full Chorus compiler is added to + cond_init (ACE_cond_t*, ACE_condattr_t&, LPCTSTR void*). + + * include/makeinclude/rules.bin.GNU,platform_chorus.GNU: + updated to support linking of TAO executables for Chorus. + Wed Sep 22 19:30:49 1999 Randall Sharo <rasb@eci.esys.com> * ace/OS.i (sema_wait): on VxWorks, update tv to return diff --git a/ace/OS.cpp b/ace/OS.cpp index eb33d215e31..a7b6c4c6e35 100644 --- a/ace/OS.cpp +++ b/ace/OS.cpp @@ -5468,12 +5468,21 @@ ACE_OS::rwlock_init (ACE_rwlock_t *rw, if (ACE_OS::condattr_init (attributes, type) == 0) { if (ACE_OS::mutex_init (&rw->lock_, type, name1, arg) == 0 +#if defined(CHORUS) + && ACE_OS::cond_init (&rw->waiting_readers_, + attributes, name2, arg, 0) == 0 + && ACE_OS::cond_init (&rw->waiting_writers_, + attributes, name3, arg, 0) == 0 + && ACE_OS::cond_init (&rw->waiting_important_writer_, + attributes, name4, arg, 0) == 0) +#else /* ! CHORUS */ && ACE_OS::cond_init (&rw->waiting_readers_, attributes, name2, arg) == 0 && ACE_OS::cond_init (&rw->waiting_writers_, attributes, name3, arg) == 0 && ACE_OS::cond_init (&rw->waiting_important_writer_, attributes, name4, arg) == 0) +#endif /* ! CHORUS */ { // Success! rw->ref_count_ = 0; @@ -5398,7 +5398,15 @@ public: static int cond_init (ACE_cond_t *cv, ACE_condattr_t &attributes, LPCTSTR name = 0, - void *arg = 0); + void *arg = 0 +#if defined(CHORUS) + , + int dummy = 0 +#endif /* CHORUS */ + ); + // Use a "dummy" prameter to overcome Chorus compiler error: + // Parameters int and int are regarded as the same + static int cond_signal (ACE_cond_t *cv); static int cond_timedwait (ACE_cond_t *cv, ACE_mutex_t *m, @@ -2403,7 +2403,11 @@ ACE_INLINE int ACE_OS::cond_init (ACE_cond_t *cv, ACE_condattr_t &attributes, LPCTSTR name, - void *arg) + void *arg +#if defined(CHORUS) + , int +#endif + ) { // ACE_TRACE ("ACE_OS::cond_init"); ACE_UNUSED_ARG (name); @@ -2447,7 +2451,11 @@ ACE_OS::cond_init (ACE_cond_t *cv, int type, LPCTSTR name, void *arg) { ACE_condattr_t attributes; if (ACE_OS::condattr_init (attributes, type) == 0 - && ACE_OS::cond_init (cv, attributes, name, arg) == 0) + && ACE_OS::cond_init (cv, attributes, name, arg +#if defined(CHORUS) + , 0 +#endif /* CHORUS */ + ) == 0) { (void) ACE_OS::condattr_destroy (attributes); return 0; @@ -4229,7 +4237,11 @@ ACE_OS::event_init (ACE_event_t *event, int result = ACE_OS::cond_init (&event->condition_, type, name, - arg); + arg +#if defined(CHORUS) + , 0 +#endif /* CHORUS */ + ); if (result == 0) result = ACE_OS::mutex_init (&event->lock_, type, diff --git a/ace/Synch.cpp b/ace/Synch.cpp index ff4ef5878ae..4c74f47fe07 100644 --- a/ace/Synch.cpp +++ b/ace/Synch.cpp @@ -772,8 +772,13 @@ ACE_Condition_Thread_Mutex (const ACE_Thread_Mutex &m, #endif /* ACE_HAS_FSU_PTHREADS */ // ACE_TRACE ("ACE_Condition_Thread_Mutex::ACE_Condition_Thread_Mutex"); +#if defined(CHORUS) + if (ACE_OS::cond_init (&this->cond_, attributes.attributes_, + name, arg, 0) != 0) +#else /* ! CHORUS */ if (ACE_OS::cond_init (&this->cond_, attributes.attributes_, name, arg) != 0) +#endif /* ! CHORUS */ ACE_ERROR ((LM_ERROR, ASYS_TEXT ("%p\n"), ASYS_TEXT ("ACE_Condition_Thread_Mutex::ACE_Condition_Thread_Mutex"))); } diff --git a/include/makeinclude/platform_chorus.GNU b/include/makeinclude/platform_chorus.GNU index d0c2a428fa2..83ec4941d8d 100644 --- a/include/makeinclude/platform_chorus.GNU +++ b/include/makeinclude/platform_chorus.GNU @@ -12,10 +12,25 @@ shared_libs = static_libs = 1 # -# The following file includes definitions such as $(CC), $(XDIR), etc. +# Directory where the Chorus Development System is installed # -include $(MERGEDIR)/dtool/htgt-cf.rf -CLASSIXDIR=$(MERGEDIR) +ifndef CLX_CDSPATH + CLX_CDSPATH = /vob/k_bbansw/chorus_r321_bin/CDS +endif #CLX_CDSPATH +ifndef CLX_CDSVERSION + CLX_CDSVERSION = 4.3 +endif #CLX_CDSVERSION +ifndef CLX_CDSHOST + CLX_CDSHOST = solaris +endif #CLX_CDSHOST +ifndef CLASSIXDIR + CLASSIXDIR=$(MERGEDIR) +endif #CLASSIXDIR + +XROOT = $(CLX_CDSPATH)/powerpc/$(CLX_CDSHOST)/$(CLX_CDSVERSION) +XDIR = $(XROOT)/powerpc-elf +CC = $(XDIR)/bin/gcc -B$(XROOT)/lib/gcc-lib/ + # # Tool PATH # @@ -36,8 +51,19 @@ CCFLAGS += $(CFLAGS) -fno-implicit-templates \ -nostdinc \ -pipe \ -fno-rtti \ + -mstrict-align \ + -fwritable-strings \ + -fsigned-char \ + "-msoft-float" \ + -mno-sdata \ -D_POSIX_THREADS \ - -D_POSIX_THREAD_SAFE_FUNCTIONS + -D_POSIX_THREAD_SAFE_FUNCTIONS \ + "-DNO_FPU_SUPPORT" + +ifeq ($(exceptions),1) +else # ! exceptions + CCFLAGS += -fno-exceptions +endif # ! exceptions #DCFLAGS += -gstabs+ INCLDIRS += -I$(INC_DIR)/posix \ @@ -47,7 +73,7 @@ INCLDIRS += -I$(INC_DIR)/posix \ -I$(INC_DIR)/CC DLD = LD = $(XDIR)/bin/ld -LDFLAGS += -r $(CLASSIXDIR)/lib/CC/libC.a $(CLASSIXDIR)/lib/classix/libcx.u.a +#LDFLAGS += -r $(CLASSIXDIR)/lib/CC/libC.a $(CLASSIXDIR)/lib/classix/libcx.u.a MATHLIB = -L$(CLASSIXDIR)/lib/libm -lm LINK.cc.override = $(LD) -u _main -u _premain @@ -64,6 +90,15 @@ CHORUSLINK=true # $(RM) helloCxx_u.xp.o # $(RM) helloCxx_u.ct.o +POSTLINK= -r $(CLASSIXDIR)/lib/CC/libC.a $(CLASSIXDIR)/lib/classix/libcx.u.a; \ + mv $@ $@.xp.o; \ + $(CLASSIXDIR)/dtool/mkctors $@.xp.o > $@.ct.s; \ + $(CXX) -c $@.ct.s; \ + $(RM) $@.ct.s; \ + $(LD) $(LDOPTIONS) -e _start -o $@ $(MERGEDIR)/lib/crt/crth.u.o $(MERGEDIR)/lib/crt/crt0.o $(MERGEDIR)/lib/crt/crti.o $@.xp.o $@.ct.o $(MERGEDIR)/lib/crt/crtn.o -dn -T $(MERGEDIR)/src/act/slots/act_u.ld; \ + $(RM) $@.xp.o; \ + $(RM) $@.ct.o + OCFLAGS += -O PIC = -fPIC diff --git a/include/makeinclude/rules.bin.GNU b/include/makeinclude/rules.bin.GNU index d3d2d9f2bc9..dc03ff9eaa0 100644 --- a/include/makeinclude/rules.bin.GNU +++ b/include/makeinclude/rules.bin.GNU @@ -1,26 +1,27 @@ #---------------------------------------------------------------------------- -# $Id$ +# $Id$ # -# Build binaries -# GNU version -# Requires GNU make +# Build binaries +# GNU version +# Requires GNU make #---------------------------------------------------------------------------- ifndef OBJEXT -OBJEXT=o -endif + OBJEXT=o +endif # ! OBJEXT -VOBJS = $(subst .cpp,.$(OBJEXT),$(foreach file,$(SRC),$(VDIR)$(notdir $(file)))) +VOBJS = \ + $(subst .cpp,.$(OBJEXT),$(foreach file,$(SRC),$(VDIR)$(notdir $(file)))) ifeq ($(CHORUSLINK),true) $(BIN): %: $(VDIR)%.o $(VOBJS) - $(LINK.cc) -o $@.xp.o $^ -u _main -u _premain $(VLDLIBS) $(LDFLAGS)$(POSTLINK) - $(MERGEDIR)/dtool/mkctors $@.xp.o > $@.ct.s - $(CXX) -c $@.ct.s - $(RM) $@.ct.s - $(LD) $(LDOPTIONS) -e _start -o $@ $(MERGEDIR)/lib/crt/crth.u.o $(MERGEDIR)/lib/crt/crt0.o $(MERGEDIR)/lib/crt/crti.o $@.xp.o $@.ct.o $(MERGEDIR)/lib/crt/crtn.o -dn -T $(MERGEDIR)/src/act/slots/act_u.ld - $(RM) $@.xp.o - $(RM) $@.ct.o + $(LINK.cc) -o $@ $^ $(VLDLIBS) $(LDFLAGS) $(POSTLINK) +# $(MERGEDIR)/dtool/mkctors $@.xp.o > $@.ct.s +# $(CXX) -c $@.ct.s +# $(RM) $@.ct.s +# $(LD) $(LDOPTIONS) -e _start -o $@ $(MERGEDIR)/lib/crt/crth.u.o $(MERGEDIR)/lib/crt/crt0.o $(MERGEDIR)/lib/crt/crti.o $@.xp.o $@.ct.o $(MERGEDIR)/lib/crt/crtn.o -dn -T $(MERGEDIR)/src/act/slots/act_u.ld +# $(RM) $@.xp.o +# $(RM) $@.ct.o else $(BIN): %: $(VDIR)%.o $(VOBJS) $(LINK.cc) -o $@ $^ $(LDFLAGS) $(VLDLIBS) $(POSTLINK) |