delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2006/11/15/05:16:55

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 DOT gnu AT tiscali DOT it>
User-Agent: Mozilla Thunderbird 1.0.2 (Windows/20050317)
MIME-Version: 1.0
To: Dave Korn <dave DOT korn AT artimi DOT com>
CC: cygwin AT cygwin DOT com
Subject: Re: [Fwd: Re: ld: cannot perform PE operations on not PE files ...]
References: <02a501c7089e$6395b8c0$a501a8c0 AT CAM DOT ARTIMI DOT COM>
In-Reply-To: <02a501c7089e$6395b8c0$a501a8c0@CAM.ARTIMI.COM>
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT 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/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019