Hi,
I'm busy porting a C++ application to L4. From various comments on the mailing list I know that I cannot make use of exceptions and RTTI, but unfortunately the program links against a library that makes heavy use of both. What should I do?
Is there any documentation or guidelines on porting C++ apps to L4?
Thanks,
Derick
I'm busy porting a C++ application to L4. From various comments on the mailing list I know that I cannot make use of exceptions and RTTI, but unfortunately the program links against a library that makes heavy use of both. What should I do?
Is there any documentation or guidelines on porting C++ apps to L4?
it depends. If if you need to use libraries that link against dielibc (my case) tou cannot use this features, my case was with L4VFS. But if you are using libraries and servers that are fully compatible with C++, you just need to:
1 - in your makefile, use the l4env_freebsd mode (MODE = l4env_freebsd) 2 - link your app with stdc++ (LIBS += -lstdc++) 3 - use the flags -nostdlib so that your program doesn't link with the library from the system (CXXFLAGS = -nostdlib)
Just following the cxx_hello example...
hope i've helped.
Tiago
On 5/24/05, Tiago Jorge tjpj@lasige.di.fc.ul.pt wrote:
I'm busy porting a C++ application to L4. From various comments on the mailing list I know that I cannot make use of exceptions and RTTI, but unfortunately the program links against a library that makes heavy use of both. What should I do?
Is there any documentation or guidelines on porting C++ apps to L4?
it depends. If if you need to use libraries that link against dielibc (my case) tou cannot use this features, my case was with L4VFS. But if you are using libraries and servers that are fully compatible with C++, you just need to:
1 - in your makefile, use the l4env_freebsd mode (MODE = l4env_freebsd) 2 - link your app with stdc++ (LIBS += -lstdc++) 3 - use the flags -nostdlib so that your program doesn't link with the library from the system (CXXFLAGS = -nostdlib)
Just following the cxx_hello example...
hope i've helped.
Tiago
I am using the l4env_freebsd mode (cannot use dietlibc because I need STL). Do I understand correctly that RTTI and exceptions can be used with libstdc++?
The next issue I have stumbled upon is that pthread_yield() can't be found. Other pthread functions work fine (I do include <pthread.h> and pthread.h is found by the include paths).
Thanks in advance,
Derick
I am using the l4env_freebsd mode (cannot use dietlibc because I need STL). Do I understand correctly that RTTI and exceptions can be used with libstdc++?
correct. Take a look here. http://os.inf.tu-dresden.de/l4env/doc/oskit_support/index.html
The next issue I have stumbled upon is that pthread_yield() can't be found. Other pthread functions work fine (I do include <pthread.h> and pthread.h is found by the include paths).
In my case, i've ported all the code from pthreads to l4thread, trought the L4Env thread package. I did the same with the locks.
Thanks in advance,
Derick
l4-hackers@os.inf.tu-dresden.de