X-Spam-Check-By: sourceware.org Message-ID: Date: Mon, 21 Aug 2006 15:15:36 -0400 From: "Wang Yiping" To: cygwin AT cygwin DOT com Subject: Re: gcc-3.4.4 compile dietlibc error on cygwin MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline X-IsSubscribed: yes Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Dear Reads: In my first letter, I just tried to cross-compiled the dietlibc in cygwin. In order to cross-compile programs that depends on dietlibc such as nash, one must get a HOST diet execution from the dietlibc and then run diet some-arch-gcc yourfile.c. Although dietlibc supports cross-compile, but It doesn't support create host diet.exe in cygwin directly from it's Makefile. Just do the following, you can get diet.exe then you can do cross-compiling other programs depended on dietlibc. 1. patch the diet.c $ diff -Nur diet.c diet-cygwin.c --- diet.c 2004-07-29 06:40:21.000000000 -0400 +++ diet-cygwin.c 2006-08-19 22:27:13.468750000 -0400 @@ -3,8 +3,8 @@ #include #include #include -#include - +//#include +#define __write2 printf #include "dietfeatures.h" /* goal: 2. compile the diet.exe $ i686-pc-cygwin-gcc diet-cygwin.c -I./include -DDIETHOME=\"/tmp/dietlibc-0.27\ " -DVERSION=\"dietlibc-0.27\" -o diet-cygwin 3. in your programs, change the diet name to your newly diet.exe e.g. in /tmp/mkinitrd-3.5.13/nash/Makefile CC:=/tmp/dietlibc-0.27/diet-cygwin $(CC) then do the cross-compiling, you will get the nash Best Regards Andy -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/