* uSTL Template
@ 2009-08-21 4:22 Uwe Kindler
2009-08-21 7:44 ` John Dallaway
0 siblings, 1 reply; 8+ messages in thread
From: Uwe Kindler @ 2009-08-21 4:22 UTC (permalink / raw)
To: John Dallaway; +Cc: ecos-patches
Hi John,
did you forget to add the uSTL template to the CVS or was it missing in
my ZIP archive?.
Regards, Uwe
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: uSTL Template
2009-08-21 4:22 uSTL Template Uwe Kindler
@ 2009-08-21 7:44 ` John Dallaway
2009-08-21 9:05 ` cetoni GmbH - Uwe Kindler
2009-08-21 9:05 ` Uwe Kindler
0 siblings, 2 replies; 8+ messages in thread
From: John Dallaway @ 2009-08-21 7:44 UTC (permalink / raw)
To: Uwe Kindler; +Cc: ecos-patches
Hi Uwe
Uwe Kindler wrote:
> did you forget to add the uSTL template to the CVS or was it missing in
> my ZIP archive?.
I should have mentioned in my previous e-mail that providing a ustl
template seems like overkill when the only non-inferrable differences
relative to the default template are two eCos packages. It is very easy
to add the uSTL package and (optionally) file I/O package to the default
template. Templates can be very useful but we need to avoid a
proliferation of them for configurations which are easy to attain by
another route.
John Dallaway
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: uSTL Template
2009-08-21 7:44 ` John Dallaway
2009-08-21 9:05 ` cetoni GmbH - Uwe Kindler
@ 2009-08-21 9:05 ` Uwe Kindler
2009-08-21 9:20 ` John Dallaway
1 sibling, 1 reply; 8+ messages in thread
From: Uwe Kindler @ 2009-08-21 9:05 UTC (permalink / raw)
To: John Dallaway; +Cc: ecos-patches
Hi John,
o.k. you are right.
But then it would be good to state somewhere, that the user should start
from the default package and then add File I/O and uSTL package. I will
try to provide a little piece of SGML documentation for uSTL package
that gives some hints for first use and then refers to the online uSTL
documentation.
Regards, Uwe
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: uSTL Template
2009-08-21 7:44 ` John Dallaway
@ 2009-08-21 9:05 ` cetoni GmbH - Uwe Kindler
2009-08-21 13:05 ` Sergei Gavrikov
2009-08-21 9:05 ` Uwe Kindler
1 sibling, 1 reply; 8+ messages in thread
From: cetoni GmbH - Uwe Kindler @ 2009-08-21 9:05 UTC (permalink / raw)
To: John Dallaway; +Cc: ecos-patches
Hi John,
o.k. you are right.
But then it would be good to state somewhere, that the user should start
from the default package and then add File I/O and uSTL package. I will
try to provide a little piece of SGML documentation for uSTL package
that gives some hints for first use and then refers to the online uSTL
documentation.
Regards, Uwe
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: uSTL Template
2009-08-21 9:05 ` Uwe Kindler
@ 2009-08-21 9:20 ` John Dallaway
0 siblings, 0 replies; 8+ messages in thread
From: John Dallaway @ 2009-08-21 9:20 UTC (permalink / raw)
To: Uwe Kindler; +Cc: ecos-patches
Uwe Kindler wrote:
> o.k. you are right.
>
> But then it would be good to state somewhere, that the user should start
> from the default package and then add File I/O and uSTL package. I will
> try to provide a little piece of SGML documentation for uSTL package
> that gives some hints for first use and then refers to the online uSTL
> documentation.
Good idea. Maybe you can move the contents of your README file to
doc/ustl.sgml.
John Dallaway
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: uSTL Template
2009-08-21 9:05 ` cetoni GmbH - Uwe Kindler
@ 2009-08-21 13:05 ` Sergei Gavrikov
2009-08-21 14:58 ` cetoni GmbH - Uwe Kindler
0 siblings, 1 reply; 8+ messages in thread
From: Sergei Gavrikov @ 2009-08-21 13:05 UTC (permalink / raw)
To: cetoni GmbH - Uwe Kindler; +Cc: John Dallaway, ecos-patches
[-- Attachment #1: Type: text/plain, Size: 4928 bytes --]
On Fri, Aug 21, 2009 at 11:04:53AM +0200, cetoni GmbH - Uwe Kindler wrote:
> Hi John,
>
> o.k. you are right.
>
> But then it would be good to state somewhere, that the user should start
> from the default package and then add File I/O and uSTL package. I will
> try to provide a little piece of SGML documentation for uSTL package
> that gives some hints for first use and then refers to the online uSTL
> documentation.
>
> Regards, Uwe
Hello
They did break my phone line (=ADSL=internet=mail=ecos-lists) :-) So, I
missed the interesting things which occured these days (ustl, lwip).
Uwe, just now I tried uSTL package on synthetic target using latest CVS.
Unfortunately, I ran in that old linkage issue.
The uSTL's bktrace.cpp has
#if linux
#include <execinfo.h>
#else
...
i.e. for Linux synthetic build gcc includes host's header and then we'll
get a few unresolved externals on the linkage stage. My old proposal was
wrap that check with !__ECOS__ for example and add something like this
-D__ECOS__=1 in the package's CFLAGS, but, in fact, it would enough
scribble '#if 0' for that linux check in bktrace.cpp and do not make a
mess of things in CDL. The choice is yours.
Off-topic. Just curiously enough, why eCos cannot identify itself via
CPP? We know some CPP definitions for other OSes (environments), like
bsd, linux, cygwin, mingw, win32, mingw, djgpp, etc. I grep eCos tree
for __ECOS and found differrent variants of the own-identification :-)
What's about global definition and standard for eCos build? It would
arange a porting style.
Well, the eCos libraries with uSTL were built with i386-elf-gcc (4.3.2)
from eCosCentric. Host: Ubuntu 8.04.3 LTS. eCos: updated CVS tree. The
below is a description of the results.
Appendix
i. Synopsis of my test drive (cut from bash history and commented a bit)
##
# My eCos from scratch
##
echo $ECOS_REPOSITORY
/opt/trunk/devo/ecos/packages
# clean up my ecos repo
rm -r /opt/trunk/devo
# use clean CVS copy
cp -a /opt/trunk/clean /opt/trunk/devo
##
# Build
##
mkdir tests ; cd tests
# configure ecos as
ecosconfig new linux
ecosconfig add fileio ustl
# use stable, well tested toolchain from eCosCentric
ecosconfig import /dev/stdin << EOT
cdl_option CYGBLD_GLOBAL_COMMAND_PREFIX {
user_value i386-elf
};
EOT
ecosconfig tree
make -s headers
# First, check uSTL build itself, I expect to see no warnings
make -s -C language/cxx/ustl/current
I saw 1 warning with GCC 4.3.2.
/opt/trunk/devo/ecos/packages/language/cxx/ustl/current/src/uexception.cpp: In member function 'virtual void ustl::exception::read(ustl::istream&)':
/opt/trunk/devo/ecos/packages/language/cxx/ustl/current/src/uexception.cpp:38: warning: 'stmSize' may be used uninitialized in this function
I attached that uexception.cpp.patch. Well, that's minor thing.
# make libraries
make -s
# workaround for an absent libgcc_eh.a
sed -i 's,libgcc_eh.a,,' install/lib/target.ld
# Try to build bvts
make -s -C language/cxx/ustl/current tests TESTS=tests/bvt00
/opt/home/sg/Desktop/ustl_test/install/lib/libtarget.a(language_cxx_ustl_bktrace.o): In function `ustl::CBacktrace::GetSymbols()':
/opt/trunk/devo/ecos/packages/language/cxx/ustl/current/src/bktrace.cpp:73: undefined reference to `backtrace_symbols'
/opt/home/sg/Desktop/ustl_test/install/lib/libtarget.a(language_cxx_ustl_bktrace.o): In function `CBacktrace':
/opt/trunk/devo/ecos/packages/language/cxx/ustl/current/src/bktrace.cpp:24: undefined reference to `backtrace'
collect2: ld returned 1 exit status
make: *** [/opt/home/sg/Desktop/ustl_test/install/tests/language/cxx/ustl/current/tests/bvt00] Error 1
Ooops, it's that <execinfo.h>'s deal. I applied that attached
bktrace.cpp.patch and repeat all the above from scratch. Then
it was possible to run all without any issues.
##
# Batch
##
# try run bvts, all should pass, but bvt25 (no fs)
for t in install/tests/language/cxx/ustl/current/tests/bvt??
do
echo $t ; $t -nw -io ;
done | tee bvt.log
All passed successfully, but bvt25.
Note: all as the above was repeated from scratch, but, for uSTL build
without fileio
cdl_component CYGCLS_USTL_FSTREAMS {
inferred_value 0
};
i.e.
ecosconfig new linux
ecosconfig add ustl
to be sure that __cxa_pure_virtual issue went away from the infra's
sprintfs tests. I did not observe the issue.
Other issue(s)
I could not link bvt23 using host gcc-4.2.4 (Ubuntu 8.04.3 LTS). I'm
sorry, I cannot investigate in that. I use and used i386-elf-gcc from
eCosCentric for the testing as I do it as well.
Foreigners ;-)
grep -rl '^M' language
language/cxx/ustl/current/README
language/cxx/ustl/current/cdl/ustl.cdl
language/cxx/ustl/current/src/twothreads.cpp
language/cxx/ustl/current/src/ustlecos.cpp
language/cxx/ustl/current/include/config.h
language/cxx/ustl/current/include/ustlecos.h
language/cxx/ustl/current/ChangeLog
Well, Uwe, that was my brief look. Thank you for distribution.
Regards,
Sergei
[-- Attachment #2: bktrace.cpp.patch --]
[-- Type: text/x-diff, Size: 797 bytes --]
Index: language/cxx/ustl/current/src/bktrace.cpp
===================================================================
RCS file: /cvs/ecos/ecos/packages/language/cxx/ustl/current/src/bktrace.cpp,v
retrieving revision 1.1
diff -u -5 -p -r1.1 bktrace.cpp
--- language/cxx/ustl/current/src/bktrace.cpp 20 Aug 2009 17:00:31 -0000 1.1
+++ language/cxx/ustl/current/src/bktrace.cpp 21 Aug 2009 11:20:59 -0000
@@ -4,11 +4,11 @@
// This file is free software, distributed under the MIT License.
#include "bktrace.h"
#include "sostream.h"
#include "mistream.h"
-#if linux && __GNUC__
+#if 0 // linux && __GNUC__
#include <execinfo.h>
#else
static inline int backtrace (void**, int) { return (0); }
static inline char** backtrace_symbols (void* const*, int) { return (NULL); }
#endif
[-- Attachment #3: uexception.cpp.patch --]
[-- Type: text/x-diff, Size: 908 bytes --]
Index: language/cxx/ustl/current/src/uexception.cpp
===================================================================
RCS file: /cvs/ecos/ecos/packages/language/cxx/ustl/current/src/uexception.cpp,v
retrieving revision 1.1
diff -u -5 -p -r1.1 uexception.cpp
--- language/cxx/ustl/current/src/uexception.cpp 20 Aug 2009 17:00:31 -0000 1.1
+++ language/cxx/ustl/current/src/uexception.cpp 21 Aug 2009 11:21:20 -0000
@@ -33,11 +33,11 @@ void exception::info (string& msgbuf, co
}
/// Reads the exception from stream \p is.
void exception::read (istream& is)
{
- uint32_t stmSize;
+ uint32_t stmSize = 0;
xfmt_t fmt = xfmt_Exception;
is >> fmt >> stmSize >> m_Backtrace;
assert (fmt == m_Format && "The saved exception is of a different type.");
assert ((stmSize + 8) - exception::stream_size() <= is.remaining() && "The saved exception data is corrupt.");
m_Format = fmt;
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: uSTL Template
2009-08-21 13:05 ` Sergei Gavrikov
@ 2009-08-21 14:58 ` cetoni GmbH - Uwe Kindler
2009-08-21 15:59 ` Sergei Gavrikov
0 siblings, 1 reply; 8+ messages in thread
From: cetoni GmbH - Uwe Kindler @ 2009-08-21 14:58 UTC (permalink / raw)
To: Sergei Gavrikov; +Cc: ecos-patches
Hi Sergei,
thank you for testing.
I think both patches are o.k. Could you please provide both patches with
a changelog entry?
Thank you very much.
Regards, Uwe
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: uSTL Template
2009-08-21 14:58 ` cetoni GmbH - Uwe Kindler
@ 2009-08-21 15:59 ` Sergei Gavrikov
0 siblings, 0 replies; 8+ messages in thread
From: Sergei Gavrikov @ 2009-08-21 15:59 UTC (permalink / raw)
To: cetoni GmbH - Uwe Kindler; +Cc: ecos-patches
[-- Attachment #1: Type: text/plain, Size: 783 bytes --]
On Fri, Aug 21, 2009 at 04:58:38PM +0200, cetoni GmbH - Uwe Kindler wrote:
> Hi Sergei,
>
> thank you for testing.
>
> I think both patches are o.k. Could you please provide both patches with
> a changelog entry?
>
> Thank you very much.
>
> Regards, Uwe
Hello Uwe,
Done. But, IMO, that's excessive thing, instead I would ask John to
reformat a few of the sources with dos2unix (including CL) and just to
apply these things silently (i.e. without excessive changelogging). I
remember that we discussed those my tweaks with you together before a
pushing of the package on CVS (I dropped on the list in those days), and
you just forgot to apply those 2 cent tweaks. May be it's possible to
fulfil a "re-checkin" of the stuff with tweaks, clean CL and unix NLs?
Regards,
Sergei
[-- Attachment #2: ustl_synth.patch --]
[-- Type: text/x-diff, Size: 2551 bytes --]
Index: language/cxx/ustl/current/ChangeLog
===================================================================
RCS file: /cvs/ecos/ecos/packages/language/cxx/ustl/current/ChangeLog,v
retrieving revision 1.1
diff -u -5 -p -r1.1 ChangeLog
--- language/cxx/ustl/current/ChangeLog 20 Aug 2009 17:00:31 -0000 1.1
+++ language/cxx/ustl/current/ChangeLog 21 Aug 2009 15:36:56 -0000
@@ -1,5 +1,12 @@
+2009-08-21 Sergei Gavrikov <sergei.gavrikov@gmail.com>
+
+ * src/bktrace.cpp: denied an inclusion host's header <execinfo.h>
+ (eCos builds for Linux synthetic target).
+ * src/uexception.cpp:exception::read(): initialed local
+ varibale stmSize to satisfy compiler's suspicion.
+
2009-08-20 Uwe Kindler <uwe_kindler@web.de>
* Initial contribution of uSTL library
//===========================================================================
Index: language/cxx/ustl/current/src/bktrace.cpp
===================================================================
RCS file: /cvs/ecos/ecos/packages/language/cxx/ustl/current/src/bktrace.cpp,v
retrieving revision 1.1
diff -u -5 -p -r1.1 bktrace.cpp
--- language/cxx/ustl/current/src/bktrace.cpp 20 Aug 2009 17:00:31 -0000 1.1
+++ language/cxx/ustl/current/src/bktrace.cpp 21 Aug 2009 15:36:57 -0000
@@ -4,11 +4,11 @@
// This file is free software, distributed under the MIT License.
#include "bktrace.h"
#include "sostream.h"
#include "mistream.h"
-#if linux && __GNUC__
+#if 0 // linux && __GNUC__
#include <execinfo.h>
#else
static inline int backtrace (void**, int) { return (0); }
static inline char** backtrace_symbols (void* const*, int) { return (NULL); }
#endif
Index: language/cxx/ustl/current/src/uexception.cpp
===================================================================
RCS file: /cvs/ecos/ecos/packages/language/cxx/ustl/current/src/uexception.cpp,v
retrieving revision 1.1
diff -u -5 -p -r1.1 uexception.cpp
--- language/cxx/ustl/current/src/uexception.cpp 20 Aug 2009 17:00:31 -0000 1.1
+++ language/cxx/ustl/current/src/uexception.cpp 21 Aug 2009 15:36:57 -0000
@@ -33,11 +33,11 @@ void exception::info (string& msgbuf, co
}
/// Reads the exception from stream \p is.
void exception::read (istream& is)
{
- uint32_t stmSize;
+ uint32_t stmSize = 0;
xfmt_t fmt = xfmt_Exception;
is >> fmt >> stmSize >> m_Backtrace;
assert (fmt == m_Format && "The saved exception is of a different type.");
assert ((stmSize + 8) - exception::stream_size() <= is.remaining() && "The saved exception data is corrupt.");
m_Format = fmt;
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2009-08-21 15:59 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-08-21 4:22 uSTL Template Uwe Kindler
2009-08-21 7:44 ` John Dallaway
2009-08-21 9:05 ` cetoni GmbH - Uwe Kindler
2009-08-21 13:05 ` Sergei Gavrikov
2009-08-21 14:58 ` cetoni GmbH - Uwe Kindler
2009-08-21 15:59 ` Sergei Gavrikov
2009-08-21 9:05 ` Uwe Kindler
2009-08-21 9:20 ` John Dallaway
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).