Hello
I was hacking around gccgo (go implementation in gcc) and I can get the runtime and the compiler compiled when using gcc-4.7-RC-20120314. But the issue becomes rest of Genode not liking a newer gcc.
Has anyone else had success with either GCC 4.7 or a SVN version of GCC?
My current issue is: Library libc MERGE libc.lib.so fd_alloc.o: In function `Libc::file_descriptor_allocator()': /home/taruti/genohack/genode/libports/src/lib/libc/fd_alloc.cc:26: undefined reference to `__dso_handle' /usr/local/genode-gcc/bin/genode-x86-ld: fd_alloc.o: relocation R_X86_64_PC32 against undefined hidden symbol `__dso_handle' can not be used when making a shared object
Has anyone got an idea how to solve this?
ps. if someone is trying this, one has to compile libsupc++ explicitely with -fPIC to get cxx working.
- Taru Karttunen
Hi Taru,
On 03/19/2012 05:40 AM, Taru Karttunen wrote:
Hello
I was hacking around gccgo (go implementation in gcc) and I can get the runtime and the compiler compiled when using gcc-4.7-RC-20120314. But the issue becomes rest of Genode not liking a newer gcc.
Has anyone else had success with either GCC 4.7 or a SVN version of GCC?
My current issue is: Library libc MERGE libc.lib.so fd_alloc.o: In function `Libc::file_descriptor_allocator()': /home/taruti/genohack/genode/libports/src/lib/libc/fd_alloc.cc:26: undefined reference to `__dso_handle' /usr/local/genode-gcc/bin/genode-x86-ld: fd_alloc.o: relocation R_X86_64_PC32 against undefined hidden symbol `__dso_handle' can not be used when making a shared object
Has anyone got an idea how to solve this?
ps. if someone is trying this, one has to compile libsupc++ explicitely with -fPIC to get cxx working.
- Taru Karttunen
I just tried to build gcc-4.7-RC-20120314 using the Genode 'tool_chain' script, but got compile errors:
../../../../contrib/gcc-4.7.0-RC-20120314/gcc/config/i386/i386.c:25840:118: error: ‘VOID_FTYPE_PLONGLONG_LONGLONG’ undeclared here (not in a function) ../../../../contrib/gcc-4.7.0-RC-20120314/gcc/config/i386/i386.c:25840:3: warning: missing initializer ../../../../contrib/gcc-4.7.0-RC-20120314/gcc/config/i386/i386.c:25840:3: warning: (near initialization for ‘bdesc_special_args[21].flag’) ../../../../contrib/gcc-4.7.0-RC-20120314/gcc/config/i386/i386.c:25889:111: error: ‘V4DI_FTYPE_PV4DI’ undeclared here (not in a function) ../../../../contrib/gcc-4.7.0-RC-20120314/gcc/config/i386/i386.c:25889:3: warning: missing initializer ../../../../contrib/gcc-4.7.0-RC-20120314/gcc/config/i386/i386.c:25889:3: warning: (near initialization for ‘bdesc_special_args[55].flag’) ../../../../contrib/gcc-4.7.0-RC-20120314/gcc/config/i386/i386.c:25890:108: error: ‘V4SI_FTYPE_PCV4SI_V4SI’ undeclared here (not in a function) ../../../../contrib/gcc-4.7.0-RC-20120314/gcc/config/i386/i386.c:25890:3: warning: missing initializer ../../../../contrib/gcc-4.7.0-RC-20120314/gcc/config/i386/i386.c:25890:3: warning: (near initialization for ‘bdesc_special_args[56].flag’) ../../../../contrib/gcc-4.7.0-RC-20120314/gcc/config/i386/i386.c:25891:108: error: ‘V2DI_FTYPE_PCV2DI_V2DI’ undeclared here (not in a function) ../../../../contrib/gcc-4.7.0-RC-20120314/gcc/config/i386/i386.c:25891:3: warning: missing initializer ../../../../contrib/gcc-4.7.0-RC-20120314/gcc/config/i386/i386.c:25891:3: warning: (near initialization for ‘bdesc_special_args[57].flag’) ../../../../contrib/gcc-4.7.0-RC-20120314/gcc/config/i386/i386.c:25892:117: error: ‘V8SI_FTYPE_PCV8SI_V8SI’ undeclared here (not in a function) ../../../../contrib/gcc-4.7.0-RC-20120314/gcc/config/i386/i386.c:25892:3: warning: missing initializer ../../../../contrib/gcc-4.7.0-RC-20120314/gcc/config/i386/i386.c:25892:3: warning: (near initialization for ‘bdesc_special_args[58].flag’) ../../../../contrib/gcc-4.7.0-RC-20120314/gcc/config/i386/i386.c:25893:117: error: ‘V4DI_FTYPE_PCV4DI_V4DI’ undeclared here (not in a function) ../../../../contrib/gcc-4.7.0-RC-20120314/gcc/config/i386/i386.c:25893:3: warning: missing initializer ../../../../contrib/gcc-4.7.0-RC-20120314/gcc/config/i386/i386.c:25893:3: warning: (near initialization for ‘bdesc_special_args[59].flag’)
...
Did you get these errors, too? If you did, could you please tell me how you fixed them and if you had to fix anything else to build your GCC?
Christian
On Mon, 19 Mar 2012 16:50:43 +0100, Christian Prochaska <christian.prochaska@...1...> wrote:
Did you get these errors, too? If you did, could you please tell me how you fixed them and if you had to fix anything else to build your GCC?
Hello
Can you try with https://raw.github.com/taruti/genode/master/tool/tool_chain that repo contains only the tool_chain, the tree needs fixes to build.
- Taru Karttunen
On Fri, 23 Mar 2012 10:42:45 +0200, Taru Karttunen <taruti@...102...> wrote:
Can you try with https://raw.github.com/taruti/genode/master/tool/tool_chain that repo contains only the tool_chain, the tree needs fixes to build.
Seems like it likes to build everything statically, and that causes things to fail further down the road.
checking if libtool supports shared libraries... no checking whether to build shared libraries... no checking whether to build static libraries... yes
- Taru Karttunen
Hi Taru,
On 03/23/2012 09:42 AM, Taru Karttunen wrote:
Can you try with https://raw.github.com/taruti/genode/master/tool/tool_chain that repo contains only the tool_chain, the tree needs fixes to build.
I have a fix for the '__dso_handle' problem in https://github.com/cproc/genode/tree/gcc-4.7.0, but unfortunately there's still more to do, since apparently exception handling in dynamically linked Genode applications is not working anymore with GCC 4.7.0:
[init -> test-ldso] Starting ldso ... [init -> test-ldso] Starting application ... environ: 7fff07734fa8 [init -> test-ldso] C++ runtime: int [init -> test-ldso] void* abort(): abort called
Christian
Hi Taru,
On 03/24/2012 07:23 AM, Taru Karttunen wrote:
Seems like it likes to build everything statically, and that causes things to fail further down the road.
checking if libtool supports shared libraries... no checking whether to build shared libraries... no checking whether to build static libraries... yes
the ldso test works for me now (at least on linux_x86) with the updated changes in https://github.com/cproc/genode/tree/gcc-4.7.0 . Please let me know if you get more problems with GCC 4.7.0 and Genode.
Christian
Hello
This appears to be a working version of gcc 4.7.1 for Genode. https://github.com/taruti/genode/commits/gcc47
ps. I am hacking on gccgo support.
- Taru Karttunen
Hi Taru,
This appears to be a working version of gcc 4.7.1 for Genode. https://github.com/taruti/genode/commits/gcc47
this looks good. As we have planned to update our tool chain for the upcoming release anyway, your work is very much appreciated. Does the new patch supersedes the patch set in Christian Prochaska's gcc-4.7.0 branch?
https://github.com/cproc/genode/commits/gcc-4.7.0
ps. I am hacking on gccgo support.
Cool! I am looking forward to it and I am sure that I'm not the only one. :-)
Cheers Norman
On Mon, 03 Sep 2012 17:24:44 +0200, Norman Feske <norman.feske@...1...> wrote:
This appears to be a working version of gcc 4.7.1 for Genode. https://github.com/taruti/genode/commits/gcc47
this looks good. As we have planned to update our tool chain for the upcoming release anyway, your work is very much appreciated. Does the new patch supersedes the patch set in Christian Prochaska's gcc-4.7.0 branch?
The flow was more or less my initial attempt -> Christian made some fixes to that -> my current port. There is a cherrypicked patch from Christian's repo on the gcc47 branch.
- Taru Karttunen
Hi Taru,
The flow was more or less my initial attempt -> Christian made some fixes to that -> my current port. There is a cherrypicked patch from Christian's repo on the gcc47 branch.
thanks for clarifying. I have just opened an issue for the tool-chain upgrade:
https://github.com/genodelabs/genode/issues/346
Cheers Norman