5. libjscore.a - WebKit porting to Mona OS

Finally got libjscore.a. The next thing we should do is to use libjscore.a.
jsc command uses libjscore.a. So let's build jsc.


Modified WebKit/WebKitBuild/Release/JavaScriptCore/Makefile.jsc to use our cross compiler.
"make -f Makefile.jsc" shows 1438 lines of "undefined reference error" :D


After added "-L /home/taro/mona/lib/ -l monapi-imp -l monalibc-imp", # of lines became 905.
It seems very tough work, but relax. But there are many duplications.
We can remove duplication using Linux commands.

% make -f Makefile.jsc 2>&1|grep undefined| cut -d '`' -f 2|sort|uniq

Here is a whole list.

  • QChar::category(unsigned int)'
  • QChar::category(unsigned int)' follow
  • QChar::direction(unsigned int)'
  • QChar::direction(unsigned int)' follow
  • QChar::toCaseFolded(unsigned int)'
  • QChar::toCaseFolded(unsigned short)'
  • QChar::toLower(unsigned int)'
  • QChar::toUpper(unsigned int)'
  • QCoreApplication::QCoreApplication(int&, char**)'
  • QCoreApplication::~QCoreApplication()'
  • QString::free(QString::Data*)'
  • QString::grow(int)'
  • QString::operator=(QString const&)'
  • QString::realloc(int)'
  • QString::shared_null'
  • QString::toLower() const'
  • QString::toUpper() const'
  • QString::toUtf8() const'
  • QString::vsprintf(char const*, char*)'
  • QThreadStorageData::QThreadStorageData(void (*)(void*))'
  • QThreadStorageData::get() const'
  • QThreadStorageData::set(void*)'
  • QUnicodeTables::properties(unsigned int)'
  • WTF::Mutex::Mutex()'
  • WTF::Mutex::lock()'
  • WTF::Mutex::unlock()'
  • WTF::Mutex::~Mutex()'
  • WTF::OSAllocator::commit(void*, unsigned int, bool, bool)'
  • WTF::OSAllocator::commit(void*, unsigned int, bool, bool)' follow
  • WTF::OSAllocator::decommit(void*, unsigned int)'
  • WTF::OSAllocator::releaseDecommitted(void*, unsigned int)'
  • WTF::OSAllocator::reserveAndCommit(unsigned int, WTF::OSAllocator::Usage, bool, bool, bool)'
  • WTF::OSAllocator::reserveUncommitted(unsigned int, WTF::OSAllocator::Usage, bool, bool, bool)'
  • WTF::ThreadCondition::ThreadCondition()'
  • WTF::ThreadCondition::broadcast()'
  • WTF::ThreadCondition::timedWait(WTF::Mutex&, double)'
  • WTF::ThreadCondition::~ThreadCondition()'
  • WTF::createThreadInternal(void* (*)(void*), void*, char const*)'
  • WTF::initializeCurrentThreadInternal(char const*)'
  • WTF::initializeThreading()'
  • WTF::waitForThreadCompletion(unsigned int, void**)'
  • qFree(void*)'

Q prefixed class methods are from QT. WTF prefixed methods are OS depenedent.
So we need following.

  • Mutex -> We have!
  • Allocator -> We have!
  • Thread Condition -> We have!
  • create thread -> We have!
  • qFree, QChar, QCoreApplication, QString -> what?