[7. June 2013] Youporn available now | [19. April 2013] A-400 Advanced Network Setup | [11 Jan. 2013] Customize your A-400 Home Screen

Firmware: A-400 [13 May 2013] | C-300 [30 Nov. 2012] | A-300 [30 Nov. 2012] | C-200 RC1 [13 June 2013] | A-200/A-210 RC1 [13 June 2013]

Just got your NMT | WIKI has the answers | Search the forum | Forum Rules/Policy | Firmware & Official NMT News | Popcornhour manuals



User(s) browsing this thread: 1 Guest(s)
Thread Closed 
lundmans Toolchain Guide Addition
03-03-2008, 09:42 PM
Post: #1
lundmans Toolchain Guide Addition
I've been working on trying to get lundman's guide to compile g++ properly but was unable to by following his instructions exactly.

Guide: http://lundman.net/wiki/index.php/NMT:cross

(What I did is in bold)
Quote:--cut--
# Now recompile gcc fully.
cd ../build/
rm -rf *

# Recreate the sys-include folder by linking it to the usr/include folder (Not sure if everyone will need to but it was needed for me to even get gcc to complile.
# Then copy over the libstdc++-v3 folder from the gcc source.

ln -s /usr/local/$ARCH/$CTARGET/usr/include/ /usr/local/$ARCH/$CTARGET/sys-include
cp -R ../gcc-4.0.4/libstdc++-v3/ /usr/local/$ARCH/$CTARGET/sys-include/


../gcc-4.0.4/configure \
--target=$CTARGET \
--prefix=/usr/local/mips \
--with-sysroot=/usr/local/mips/$CTARGET \
--enable-languages=c,c++ \
--enable-shared \
--disable-checking \
--disable-werror \
--disable-__cxa_atexit \
--enable-target-optspace \
--disable-nls \
--enable-multilib \
--with-float=soft \
--enable-sjlj-exceptions \
--enable-threads=posix


# It is likely it will fail on __ctype_touplow_t*, this is quite easy to fix.
# http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14939
# I went with the #ifdef changes of ../gcc-4.0.4/libstdc++-v3/config/locale/generic/c_locale.h
# and ../gcc-4.0.4/libstdc++-v3/config/os/gnu-linux/ctype_base.h

make
make install

# You can now remove the libstdc++-v3 folder you copied over to compile g++ as it is not needed from what I can tell.

rm -rf /usr/local/$ARCH/$CTARGET/sys-include/libstdc++-v3

I'm not sure if this will work for everyone but it worked for me. A simple Hello World application in c++ (and c) ran just fine on my PCH.

Code:
/opt/sybhttpd/localhost.drives/USB_DRIVE_A-1/hello # ./hellocpp
Hello World!
/opt/sybhttpd/localhost.drives/USB_DRIVE_A-1/hello # ./helloc
Hello World!
Find all posts by this user
Thread Closed 


Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  Compiling with nmt toolchain ssuukk 18 4,840 09-26-2010 06:09 AM
Last Post: ssuukk
  A110 Toolchain versions thica 44 9,548 08-13-2010 07:52 PM
Last Post: avanegmond
  developer guide Luck 8 2,073 11-24-2009 08:03 PM
Last Post: Luck
  network media tank toolchain Zaphot 143 70,789 10-15-2009 10:38 PM
Last Post: pac^man
  100 series toolchain tweak.. lordy 0 1,094 10-08-2009 12:19 PM
Last Post: lordy
  Cygwin - Toolchain/DirectFB - Install-Tutorial jo-the-ripper 9 12,202 09-14-2009 12:43 PM
Last Post: philofred
  Trouble with the "Alternative Install" guide MukiEX 1 1,056 07-25-2009 09:26 PM
Last Post: dc11ab
Question toolchain for win32? neonmnt 3 1,374 07-17-2009 03:49 PM
Last Post: lordy
  Anyone have a Toolchain setup for cross compile? Takenover83 7 2,716 06-07-2009 10:38 PM
Last Post: Takenover83
  Big favour for any toolchain experts : gawk (gnu awk) lordy 2 1,147 06-07-2009 10:56 AM
Last Post: lordy

Forum Jump: