Danny Backx | 1 Jan 09:29 2007
Picon

Proposed patch for newlib/libc/sys/wince

Two patches are attached.
The change to trace.c modifies (lowers) the default verbosity of newlib
in debugging sessions.
The changes to malloc.c and glob.c change calls to printf into calls to
WCETRACE.

Objections to committing this ?

	Danny
--

-- 
Danny Backx ; danny.backx - at - scarlet.be ; http://danny.backx.info
Attachment (x): text/x-patch, 7495 bytes
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Cegcc-devel mailing list
Cegcc-devel@...
https://lists.sourceforge.net/lists/listinfo/cegcc-devel
Israel Lins Albuquerque | 9 Jan 18:09 2007
Picon

Problem with virtual fuctions

Well I'm compiling with arm-wince-cegcc-g++, because, I use classes... but some fuctions are virtuals, and when I compile an project using those classes, the '.exe' don't work the pocket show an alert ' "AppName" is not a valid Windows CE application', and when I take out the 'virtual' declaration of all fuctions the application works fine. What's hapend? I have any ideas for this...

Bem, eu estou compilando usando arm-wince-cegcc-g++, porque eu uso classes... mas algumas funções são virtuais, e quando eu compilo um projeto
usando essas classes, o '.exe', não funciona o pocket me mostra um alerta ' "Aplicação" não é um aplicativo válido para Windows CE', porém se retiro a especificação 'virtual' de todas as funções, a aplicação funciona corretamente! O que está havendo? Não tenho ideias sobre isto...

Have a nice day...
Tenham um bom dia...

Israel Lins Albuquerque

__________________________________________________
Fale com seus amigos de graça com o novo Yahoo! Messenger
http://br.messenger.yahoo.com/

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Cegcc-devel mailing list
Cegcc-devel@...
https://lists.sourceforge.net/lists/listinfo/cegcc-devel
Cool_Zer0 | 12 Jan 15:55 2007
Picon

Compiling FFMPEG

Hi there!

I'm interested on compiling FFMPEG for Windows CE (Windows Mobile 5.0).
Anyone knows if it will be possible with CeGcc?

Thanks

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
Cool_Zer0 | 12 Jan 20:37 2007
Picon

Compiling FFMPEG

Hi there!

I'm interested on compiling FFMPEG for Windows CE (Windows Mobile 5.0).
Anyone knows if it will be possible with CeGcc?

Thanks

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
Danny Backx | 13 Jan 08:45 2007
Picon

Re: Compiling FFMPEG

On Fri, 2007-01-12 at 14:55 +0000, Cool_Zer0 wrote:
> Hi there!
> 
> I'm interested on compiling FFMPEG for Windows CE (Windows Mobile 5.0).
> Anyone knows if it will be possible with CeGcc?

To a large extent : Yes it is. I just compiled ffmpeg using this :
  ./configure --cross-compile --cc=arm-wince-cegcc-gcc
--arch=arm-wince-cegcc
  make

This compiled a lot of stuff without problem (several large
directories), it eventually failed in the libavformat directory on
grab.c which required include files that I don't have :

grab.c:25:22: error: sys/mman.h: No such file or directory
grab.c:28:28: error: linux/videodev.h: No such file or directory

I would expect that you can solve this by installing some development
package. I've not dug deeper, I think the point is clear :
dannypc: {25} ls -l */*.a
-rw-rw-r-- 1 danny backx 12193296 Jan 13 08:41 libavcodec/libavcodec.a
-rw-rw-r-- 1 danny backx    73852 Jan 13 08:32 libavutil/libavutil.a

I've not played with other configure options like the ones to build
shared libraries, but we've done that with cegcc so I expect there's a
way to do that as well.

	Danny
--

-- 
Danny Backx ; danny.backx - at - scarlet.be ; http://danny.backx.info
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Cegcc-devel mailing list
Cegcc-devel@...
https://lists.sourceforge.net/lists/listinfo/cegcc-devel
Danny Backx | 13 Jan 18:05 2007
Picon

Re: Proposed patch for newlib/libc/sys/wince

On Sat, 2007-01-13 at 15:02 +0000, Pedro Alves wrote:
> Hi Danny,
> 
> Danny Backx escreveu:
> > The change to trace.c modifies (lowers) the default verbosity of newlib
> > in debugging sessions.
> How does this lower the default verbosity?  In fact it makes it more 
> verbose by default.  Wrong patch?

Apparently so. Sorry about the mixup.

> I'm ok with lowering the default, even ok with making it 0 by default, 
> since we have a registry key to
> make it more verbose, or you can call WCETRACE_DEBUGGER_SET(int) in the 
> debugger directly.
> A patch to make it less verbose is pre-approved.
Ok, done.

> > The changes to malloc.c and glob.c change calls to printf into calls to
> > WCETRACE.
> >   
> This part is ok.

Applied.

	Danny
--

-- 
Danny Backx ; danny.backx - at - scarlet.be ; http://danny.backx.info
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Cegcc-devel mailing list
Cegcc-devel@...
https://lists.sourceforge.net/lists/listinfo/cegcc-devel
Danny Backx | 13 Jan 18:17 2007
Picon

Re: Problem with virtual fuctions

Would it be possible to send a minimalistic example that shows the
problem ?

	Danny

On Tue, 2007-01-09 at 14:09 -0300, Israel Lins Albuquerque wrote:
> Well I'm compiling with arm-wince-cegcc-g++, because, I use classes...
> but some fuctions are virtuals, and when I compile an project using
> those classes, the '.exe' don't work the pocket show an alert '
> "AppName" is not a valid Windows CE application', and when I take out
> the 'virtual' declaration of all fuctions the application works fine.
> What's hapend? I have any ideas for this...
> 
> Bem, eu estou compilando usando arm-wince-cegcc-g++, porque eu uso
> classes... mas algumas funções são virtuais, e quando eu compilo um
> projeto 
> usando essas classes, o '.exe', não funciona o pocket me mostra um
> alerta ' "Aplicação" não é um aplicativo válido para Windows CE',
> porém se retiro a especificação 'virtual' de todas as funções, a
> aplicação funciona corretamente! O que está havendo? Não tenho ideias
> sobre isto...
> 
> Have a nice day...
> Tenham um bom dia...
> 
> Israel Lins Albuquerque

--

-- 
Danny Backx ; danny.backx - at - scarlet.be ; http://danny.backx.info
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Cegcc-devel mailing list
Cegcc-devel@...
https://lists.sourceforge.net/lists/listinfo/cegcc-devel
Pedro Alves | 13 Jan 17:11 2007
Picon

Re: Problem with virtual fuctions

Hi Israel,

Israel Lins Albuquerque wrote:
> Well I'm compiling with arm-wince-cegcc-g++, because, I use classes... 
> but some fuctions are virtuals, and when I compile an project using 
> those classes, the '.exe' don't work the pocket show an alert ' 
> "AppName" is not a valid Windows CE application', and when I take out 
> the 'virtual' declaration of all fuctions the application works fine. 
> What's hapend? I have any ideas for this...
>

We have seen these '"AppName" is not a valid Windows CE application' 
errors before, but I have never seen them associated
with virtual functions.  The usual suspect is some broken import lib.  
What version of the toolchain are you using? Is it current svn?
If not, I strongly encourage you to compile the toolchain yourself. 
A minimal (and complete/buildable) test case would be great.  If we 
can't reproduce the problem it is very hard to come
up with a fix.  Try reducing as much as you can while still being able 
to see the problem.  That usually helps in finding the culprit itself.

(snipping Portuguese translation, since most people here don't 
understand it; this is an English only mailing list.)

Cheers,
Pedro Alves

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
Cool_Zer0 | 15 Jan 17:06 2007
Picon

timeGetTime()

Hi there,

Looks like CeGcc doesn't know what timeGetTime() is...

ffmpeg contains this piece of code:


#if defined(CONFIG_WINCE)
/* Skip includes on WinCE. */
#elif defined(__MINGW32__)
#include <sys/types.h>
#include <sys/timeb.h>
#elif defined(CONFIG_OS2)
#include <string.h>
#include <sys/time.h>
#else
#include <unistd.h>
#include <fcntl.h>
#include <sys/time.h>
#endif
#include <time.h>

(...)

/**
 * gets the current time in micro seconds.
 */
int64_t av_gettime(void)
{
#if defined(CONFIG_WINCE)
    return timeGetTime() * INT64_C(1000);
#elif defined(__MINGW32__)
    struct timeb tb;
    _ftime(&tb);
    return ((int64_t)tb.time * INT64_C(1000) + (int64_t)tb.millitm) * INT64_C(1000);
#else
    struct timeval tv;
    gettimeofday(&tv,NULL);
    return (int64_t)tv.tv_sec * 1000000 + tv.tv_usec;
#endif


When compiling...
os_support.o: In function `av_gettime':
/root/ffmpeg/libavformat/os_support.c:45: undefined reference to `timeGetTime'
collect2: ld returned 1 exit status


Any suggestions?

Thanks


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Cegcc-devel mailing list
Cegcc-devel@...
https://lists.sourceforge.net/lists/listinfo/cegcc-devel
Pedro Alves | 13 Jan 17:23 2007
Picon

Re: Proposed implementation of getenv and friends

Danny Backx escreveu:
> Pedro,
>
> Attached is a proposed implementation for getenv, setenv, unsetenv. I
> would put this in src/mingw/mingwex/getenv.c . A test program is in the
> other attachment.
>
>   
Based on the Makefile.in patch looks like you meant mingw/mingwex/wince/

> I would propose using this to get libgcov to work on mingw32ce.
>
> Comments, or can I commit and change libgcov to use this ?
>
>   

Humm, I had an instant reaction to say no, then I though about it some
more, and I was inclined to say yes, but... thinking some more, I don't
think this is appropriate for common mingw/ code.   Please keep reading.

> + * We store stuff in HKEY_CURRENT_USER under the key "environment".
> + *

I think whatever comes out of this patch, it this needs to be put into
an addicional subdir, like
HKEY_CURRENT_USER/MinGWce/environment, or
HKEY_CURRENT_USER/gcov/environment.
As it is, there is a risk of collision.  Plus, if we in the future add
more keys to the registry, they'll
be grouped.

> +
> +char *getenv(const char *name)
> +{
>
>   
(...)
> +	r = RegOpenKeyEx(HKEY_CURRENT_USER, env, 0, 0, &k);
> +	if (r != ERROR_SUCCESS)
> +		return -1;
> +
>   
Return NULL ?

---

The thing with this kind of global environ implementation is that since
it delegates all work to the registry it should be ok to have it in
a static lib, (each dll/exe gets a copy), there is a major difference
to the the common implementations found in other operating systems.
The problem is that all apps will read/write to/from the same keys,
which is racy, while the most (all, maybe it is specified in some standard)
other implementations guaranty that each process has a private environment.
One way to solve that, is to have the app/dll read/cache the environ at
startup, and then read/write to the cached version.  This brings up
a new problem,because then a dll linked with a static getenv, would
change its local environ cache and the other dlls and the main app
wouldn't see it. The easiest way to solve that would be to put
getenv/setenv/etc, in a dll of its own... This is where I come to
the conclusion that it is better to have a local private getenv in
libgcov and use that wrapped in __MINGWCE32__.  I don't have a
problem with dlls, but I don't think this case it justifies an
extra dependency.  This is the same rationale I used to introduce
src/gcc/libstdc++-v3/config/os/mingw32ce/runtimeopts.h, and replaced
every getenv call in libstdc++ with runtime_opts::force_new_p().

Cheers,
Pedro Alves

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV

Gmane