This is the mail archive of the crossgcc@sourceware.org mailing list for the crossgcc project.

See the CrossGCC FAQ for lots more information.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Where's the Cross-GCC FAQ ?


Dave,
All,

On Wednesday 03 December 2008 00:27:16 Dave Nadler wrote:
> We wait to hear how it worked Yann !
> And also a list of what cygwin pieces you needed to install... ;-)
> Thanks for your efforts,
> Best Regards, Dave
> 
> PS: Just to be really clear about what I hope to get:
> - build and host environment is cygwin
> - target environment is bare-metal small MIPS machine
> - target libraries are needed to support any components
>    expected by the compiler, including basic memory allocation
>    and library routines needed to support C++...

Now for me to be very clear:

I am not paid for my work on crosstool-NG.

I am working on crosstool-NG on my spare time, because I have a need for it.
It takes me a lot of time, more than 3 hours a day after I come back from
work, plus more than 6 hours saturdays and sundays. That is above 30 hours a
week (*). This for about the last two years.

I exclusively have Linux machines at home, I don't have any Windows-based real
machine at hand, and thus have to rely on emulation (qemu) to run such a
machine. Cygwin is but a layer on top of Windows to emulate POSIX, and thus is
a real pain to work with... The last measurements I have give a ratio of 180
(yes, one hundred and eighty) when running crosstool-NG under this emulation,
compared to running crosstool-NG on the real Linux system (**).

Porting to Cygwin is a real pain, I can not afford working on it any longer.
I am not ready to do someone else's job.

Now, should soneone be really interested, I am ready to look at patches.
There shouldn't be a lot of work, crosstool-NG by itself is only shell
scripts and Makefiles, writen with portability in mind. The only problems
may arise with the components, which might need Cygwin-related patches or
build instructions. In my kindness, attached is an as-yet untested patch
to try and fix MPFR build. That won't go in the repository, and I'll revert
my changes, as I can't test it. Bite your teeth on it, who ever wants to...

BTW, I also have a girlfriend, a house that needs working on, friends...
Real life, I call it, and that's what matters most for me.

Regards,
Yann E. MORIN.

(*) building a single complete toolchain ranges from about 25 minutes, up to
    35 minutes, mostly due to using glibc vs. uClibc. Bare metal is a special
    case that takes approx. 5 minutes, but those are not too common. So testing
    a change in crosstool-NG can take long...

(**) timings are done on a Core 2 Quad @ 2830MHz, with 4GiB RAM, an ageing SATA
     80GiB disk. The emulated system is a WinXP with 768MiB RAM, an 8GiB virtual
     disk in a (contiguous?) file, with Cygwin 1.5.25-25, running on the same
     real machine.
     Time to extract GMP + MPFR + binutils + gcc + gdb:
      - real system:       ~54 seconds
      - emulated system: ~3600 seconds (more than 59 minutes in fact)
      - ratio: ~66
     Time to build GMP-4.2.4:
      - real system:       ~40 seconds
      - emulated system: ~7200 seconds (2 hours and few secs in fact)
      - ratio: ~180
     So we are, more than probably, bound to the virtual CPU more than we are
     to the virtual disk.

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +0/33 662376056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| --==< ^_^ >==-- `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
`------------------------------^-------^------------------^--------------------'
Index: ct-ng.trunk/scripts/build/mpfr.sh
===================================================================
--- ct-ng.trunk/scripts/build/mpfr.sh	(revision 1256)
+++ ct-ng.trunk/scripts/build/mpfr.sh	(working copy)
@@ -61,6 +61,13 @@
 
     CT_DoStep INFO "Installing MPFR"
 
+    mpfr_opt=
+    # Under Cygwin, we can't build a thread-safe MPFR library
+    case "${CT_HOST}" in
+        *-cygwin)   mpfr_opt="--disable-thread-safe";;
+        *)          mpfr_opt="--enable-thread-safe";;
+    esac
+
     CT_DoLog EXTRA "Configuring MPFR"
     CFLAGS="${CT_CFLAGS_FOR_HOST}"              \
     CT_DoExecLog ALL                            \
@@ -68,8 +75,9 @@
         --build=${CT_BUILD}                     \
         --host=${CT_HOST}                       \
         --prefix="${CT_PREFIX_DIR}"             \
-        --enable-thread-safe                    \
-        --disable-shared --enable-static        \
+        ${mpfr_opt}                             \
+        --disable-shared                        \
+        --enable-static                         \
         --with-gmp="${CT_PREFIX_DIR}"
 
     CT_DoLog EXTRA "Building MPFR"
@@ -94,6 +102,13 @@
 
     CT_DoStep INFO "Installing MPFR for the target"
 
+    mpfr_opt=
+    # Under Cygwin, we can't build a thread-safe MPFR library
+    case "${CT_TARGET}" in
+        *-cygwin)   mpfr_opt="--disable-thread-safe";;
+        *)          mpfr_opt="--enable-thread-safe";;
+    esac
+
     CT_DoLog EXTRA "Configuring MPFR"
     CFLAGS="${CT_CFLAGS_FOR_TARGET}"            \
     CT_DoExecLog ALL                            \
@@ -101,8 +116,9 @@
         --build=${CT_BUILD}                     \
         --host=${CT_TARGET}                     \
         --prefix=/usr                           \
-        --enable-thread-safe                    \
-        --disable-shared --enable-static        \
+        ${mpfr_opt}                             \
+        --disable-shared                        \
+        --enable-static                         \
         --with-gmp="${CT_SYSROOT_DIR}/usr"
 
     CT_DoLog EXTRA "Building MPFR"

--
For unsubscribe information see http://sourceware.org/lists.html#faq

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]