Gsoc 2012 project

yangwei weiyang wei.a.yang at gmail.com
Mon Feb 13 13:36:43 UTC 2012


Hi Joel:
     In the last weekend i have investigated the open project "Build Rtems
with Clang". I read the wiki link about this open project and
some patches for the LLVM/Clang, it seems that the Clang has a basic
support for i386-rtems target. And then i clone the repository
of LLVM/Clang, newlib, rtems and all related toolchains for build rtems.
After build and install the LLVM/Clang-3.0, i build a test case
for target i386-rtems using Clang, it is OK. So i patched the newlib
patches and then build the newlib using Clang-3.0, but there are
some coredump for Clang. The error log is blow:
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
clang-3.0: /sdb1/LLVM/llvm-3.0.src/lib/Target/TargetData.cpp:401: uint64_t
llvm::TargetData::getTypeSizeInBits(llvm::Type*) const: Assertion
`Ty->isSized() && "Cannot getTypeInfo() on a type that is unsized!"' failed.
Stack dump:
0.    Program arguments: /usr/local/bin/clang-3.0 -cc1 -triple
i386--rtems4.11 -S -disable-free -disable-llvm-verifier -main-file-name
regexec.c -mrelocation-model static -mdisable-fp-elim -mconstructor-aliases
-target-cpu pentium4 -momit-leaf-frame-pointer -g -coverage-file
/tmp/regexec-GCwqS9.s -resource-dir /usr/local/bin/../lib/clang/3.0
-isystem
/sdb1/rtems-llvm/newlib-rtems/build-1.20/i386-rtems4.11/newlib/targ-include
-isystem /sdb1/rtems-llvm/newlib-rtems/newlib-1.20.0/newlib/libc/include -D
PACKAGE_NAME="newlib" -D PACKAGE_TARNAME="newlib" -D
PACKAGE_VERSION="1.20.0" -D PACKAGE_STRING="newlib 1.20.0" -D
PACKAGE_BUGREPORT="" -D PACKAGE_URL="" -D _COMPILING_NEWLIB -D
MALLOC_PROVIDED -D EXIT_PROVIDED -D SIGNAL_PROVIDED -D
REENTRANT_SYSCALLS_PROVIDED -D HAVE_NANOSLEEP -D HAVE_BLKSIZE -D HAVE_FCNTL
-D HAVE_ASSERT_FUNC -D _NO_GETLOGIN -D _NO_GETPWENT -D _NO_GETUT -D
_NO_GETPASS -D _NO_SIGSET -D _NO_WORDEXP -D _NO_POPEN -D _GNU_SOURCE -I .
-I ../../../../../newlib-1.20.0/newlib/libc/posix -fmodule-cache-path
/var/tmp/clang-module-cache -O2 -ferror-limit 19 -fmessage-length 80
-fno-builtin -fgnu-runtime -fobjc-runtime-has-arc -fobjc-runtime-has-weak
-fobjc-fragile-abi -fdiagnostics-show-option -fcolor-diagnostics -o
/tmp/regexec-GCwqS9.s -x c
../../../../../newlib-1.20.0/newlib/libc/posix/regexec.c
1.    <eof> parser at end of file
2.    Per-module optimization passes
3.    Running pass 'CallGraph Pass Manager' on module
'../../../../../newlib-1.20.0/newlib/libc/posix/regexec.c'.
4.    Running pass 'Loop Pass Manager' on function '@regexec'
5.    Running pass 'Loop Invariant Code Motion' on basic block '%140'
clang-3: error: unable to execute command: Aborted (core dumped)
clang-3: error: clang frontend command failed due to signal 2 (use -v to
see invocation)
clang-3: note: diagnostic msg: Please submit a bug report to  and include
command line arguments and all diagnostic information.
clang-3: note: diagnostic msg: Preprocessed source(s) are located at:
clang-3: note: diagnostic msg: /tmp/regexec-82Lcft.i
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
But when i copy the error build command to build the single regexec.c it is
build successfully, Could you tell me why?
And i think there are a lot of work to do to make LLVM/Clang support Rtems,
like intergrate the LLVM/Clang into Rtems make system,
support more architectures using Clang build Rtems, and fix more bugs to
make Clang build Rtems more stable like FreeBSD Clang project.
Whether this project as a Gsoc project is suitable, Joel? Thank you!

WeiYang
Best Regards

在 2012年2月9日 下午11:10,Yang Wei <wei.a.yang at gmail.com>写道:

>
> 在 2012-2-9,6:03,Joel Sherrill <joel.sherrill at oarcorp.com> 写道:
>
>
>
> On 02/07/2012 08:34 AM, yangwei weiyang wrote:
>
> Hi all:
>     From the mail of Joel I know that the Google summer of code 2012 is
> going to start and RTEMS will be absolutely a member of organizations.
> There are lots of projects i am interested in from the Wiki open project
> section. The most favorite one for me is "Bus Space API". So i want to know
> as much information as possible.
>     First i have read "Bus Space API" section carefully at the Wiki, And
> also know some basic backgroud through the IRC log. The bus_space API is
> originally from NetBSD, its goal is to allow a single driver source file to
> manipulate a set of devices on different system architectures, and to allow
> a single driver object file to manipulate a set of devices on multiple bus
> types on a single architecture. It is implemented in the BSP layer and the
> architecture layer, that  means different architecture and machine must
> implement its own bus space type and
> functions. But the goal of  "Bus Space API" project is to easing the ports
> of BSD drivers to RTEMS, so in order to realize its goal, should we port
> bus_space API to RTEMS BSP layer and architecture layer or adapt the
> bus_space API in the RTEMS score which make BSP layer and architecture
> layer unchanged or changed minimum?
>     So i want to know more information about this project, are there some
> protential mentors to help me?
>
> This is indeed an important project. Unfortunately, after discussing it
> with another
> core developer, we think it may be beyond a GSOC project.
>
> First, it requires deep knowledge across RTEMS, boards, target
> architectures, etc.
> We are afraid that by the time we mentored you enough to solve the
> problem,
> (1) we could have implemented it and (2) the summer would be over. :)
>
> Another factor is that a couple of the core developers are currently
> supposed to be funded to do this as soon as they finish up another project.
> Based on the schedule, they should be nearly finished before the GSOC
> students accepted are announced. They are only committed to implementing
> the BSP/target side of this for a couple of architectures.
>
> Joel, thank you for your suggest. One of goals of Gsoc project is to take
> the students into
> the open source development, and another goal is to benefit the
> organization. So if this project
> is too big to implement for students that it should be splitted into some
> small parts or he will turn
> to other projects.
>
> This leaves you the option of proposing to implement this for the remaining
> architectures. But it also puts you down stream of another schedule which
> is
> a risk.
>
> I wouldn't want you to be at risk of even starting on time. Is there
> another
> project you would like to do?
>
> Yes, except the Bus API project, I also have an interested project to
> participate in which is about
> support the LLVM/Clang to Rtems. So i want to know how about the progress
> of this project and
> whether this project is suitable as a Gsoc project?
>
>
> Wei Yang
> Best Regards
>
>
> Wei Yang
> Best Regards
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/devel/attachments/20120213/28d56cac/attachment.html>


More information about the devel mailing list