User:Imate900/GDC Cross-Compiler-Part2: Difference between revisions

no edit summary
No edit summary
No edit summary
Line 1:
== Step 2 - Native Compiler ==
 
Once you port [[Newlib]] to your OS (and install it to /usr/native), support ELF, and configure the packages to your OS, you may now do a native build of gdc to your OS.
 
Prepare for the build:
Line 17:
 
=== gcc ===
cd /usr/src/gcc-x.x.x
./gcc/d/setup-gcc.sh
 
Go to /usr/src/gcc-x.x.x/gcc/d, open d-lang.cc and look at line 188.
You'll see this
 
const char* cygwin_d_os_versym = D_OS_VERSYM;
 
Change D_OS_VERSYM to whatever you want, since it is a string, like "MyOS".
(Wilkie told me not to set it to NULL, it will make the compiler to segfault)
 
Now build GDC:
 
cd /usr/src/build-native/gcc
/usr/src/gcc-x.x.x/configure --build=`./config.guess` --host=$HOST --target=$TARGET --prefix=$PREFIX --disable-nls \
Anonymous user