X-Spam-Check-By: sourceware.org
Message-ID: <455AE9D2.1090806@tiscali.it>
Date: Wed, 15 Nov 2006 11:20:02 +0100
From: "Salvatore D'Angelo" <koala.gnu@tiscali.it>
User-Agent: Mozilla Thunderbird 1.0.2 (Windows/20050317)
MIME-Version: 1.0
To: Dave Korn <dave.korn@artimi.com>
CC: cygwin@cygwin.com
Subject: Re: [Fwd: Re: ld: cannot perform PE operations on not PE files ...]
References: <02a501c7089e$6395b8c0$a501a8c0@CAM.ARTIMI.COM>
In-Reply-To: <02a501c7089e$6395b8c0$a501a8c0@CAM.ARTIMI.COM>
Content-Type: text/plain; charset=ISO-8859-15; format=flowed
Content-Transfer-Encoding: 7bit
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com

Thx Dave for suggestion, but Loic Grein (member of the list) told me 
that your patch should work fine both on linux and cygwin.
I tried and it work fine.
Thanks a lot to everybody for your help.
Bye

Dave Korn ha scritto:

>On 14 November 2006 17:45, Salvatore D'Angelo wrote:
>
>  
>
>>Dave you're right. I forgot to add -r.
>>Thanks a lot. Your solution work fine.
>>
>>The problem now is that I should change the Makefile in order to have
>>two different behaviour in CYGWIN and linux.
>>    
>>
>
>  Actually, if I haven't messed up, the workaround method using -r should be
>fine for linux too - have you tried it?
>
>  
>
>>The solutions are:
>>
>>1. use if statements in order to execute different statements on linux
>>and cygwin. The question now is how I can do that. I mean what is the
>>variable I have to check with ifdef?
>>    
>>
>
>  If you actually /needed/ to know, you could find out by $(shell uname) or
>some similar variant, but I think the solution I gave should work fine on
>linux and cygwin without needing to do anything different between the two.
>
>
>  
>
>>2. Install binutils cross and set target i686-pc-linux. In this way I
>>have to change only the name of tools used to compile and link. But I do
>>not know how to do that. Could someone suggest me a link?
>>    
>>
>
>  Oh, it'll be easier to just show you how.  (Bulding a cross-compiler can be
>ever so tricky, but building cross binutils is almost always a breeze):
>
>Step 1:  Download and untar the sources, create a directory for building in.
>
>cd /tmp
>wget http://tinyurl.com/y7a7hu
>tar xfvj binutils-2.17.tar.bz2
>mkdir obj
>
>
>Step 2:  Configure, build and install the sources.
>
>cd obj
>../binutils-2.17/configure -v --prefix=/usr/local \
>        --target=i686-pc-linux 2>&1 | tee conf.log
>make all 2>&1 | tee build.log
>make install 2>&1 | tee install.log
>[optional] make -k check 2>&1 | tee check.log
>
>Step 3:  Tidy up.
>
>cd ..
>rm -rf obj binutils-2.17
>
>  Now all you need to do is make sure you've got /usr/local/bin in your $PATH,
>and away you go; set AS to i686-pc-linux-as and LD to i686-pc-linux-ld in your
>makefile.
>
>  
>
>>please cc my address since I am not subscribed at the list
>>    
>>
>
>  I remembered this time!
>
>    cheers,
>      DaveK
>
>[*] - the tinyurl points to
>http://www.mirrorservice.org/sites/ftp.gnu.org/gnu/binutils/binutils-2.17.tar.
>bz2 but avoids getting line-wrapped by the mailer!
>  
>



--
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/

