X-Recipient: archive-cygwin AT delorie DOT com DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:mime-version:in-reply-to:references:date :message-id:subject:from:to:content-type :content-transfer-encoding; q=dns; s=default; b=BXPt89g+byAbvAwI 06nl/0bfGk7UvBdV0Rm/jKz8LAYqdFaTZmAGF0Xvb9dHUfwN5/vs5wOpmNwDuTwb 6etEZsgqBggILiNqqOMXZWw/PhVvbssKjkQ4haLgT6BbBSP5TM0sIEoN+yvCACTt twkApKc1Fe/bFFrzZIw0wTRViKY= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:mime-version:in-reply-to:references:date :message-id:subject:from:to:content-type :content-transfer-encoding; s=default; bh=Qh5dQj7cemFBep4NC9v/3R qRQ64=; b=gMpadArc1LT+xezpBjkWWsSukEOpqsAhrmrwlA5y/h8U3lHNJWqcw6 W8AOpoMH5Xyg90Nmz2m+d4XHZdBSFebr0WnTo+uqjGuud0iln5jvnG90GwiY+7hi YwdE4ypjrYMgAp9d+8x26wsc3oYr2GRpR4HCDFqsaWH1/RzxMR7+A= Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: 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 X-Spam-SWARE-Status: No, score=-3.4 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,KHOP_THREADED,RCVD_IN_DNSWL_LOW,RCVD_IN_HOSTKARMA_YE,SPF_PASS autolearn=ham version=3.3.2 MIME-Version: 1.0 X-Received: by 10.112.55.173 with SMTP id t13mr1087461lbp.39.1376656193570; Fri, 16 Aug 2013 05:29:53 -0700 (PDT) In-Reply-To: <20130816104848.GG2562@calimero.vinschen.de> References: <20130816104848 DOT GG2562 AT calimero DOT vinschen DOT de> Date: Fri, 16 Aug 2013 14:29:53 +0200 Message-ID: Subject: Re: GNU ld -O option breaks compilation From: =?UTF-8?Q?V=C3=A1clav_Zeman?= To: cygwin AT cygwin DOT com Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id r7GCUI2g025761 On 16 August 2013 12:48, Corinna Vinschen wrote: > On Aug 16 10:50, Václav Zeman wrote: >> I am getting compilation error when I try to use the GNU ld's -O option: >> >> `--> cat test.c >> int >> main () >> { >> return 0; >> } >> >> `--> gcc -Wl,-O -o test test.c >> /usr/lib/gcc/x86_64-pc-cygwin/4.8.1/../../../../lib/libcygwin.a(libcmain.o): >> In function `main': >> /usr/src/debug/cygwin-1.7.24-1/winsup/cygwin/lib/libcmain.c:39: >> undefined reference to `WinMain' >> /usr/src/debug/cygwin-1.7.24-1/winsup/cygwin/lib/libcmain.c:39:(.text.startup+0x7e): >> relocation truncated to fit: R_X86_64_PC32 against undefined symbol >> `WinMain' >> collect2: error: ld returned 1 exit status > > Per the ld info pages, the -O option is only designed to work for > ELF shared libraries so far. Ok. I have expected it to do nothing (no optimization) on non-ELF targets. -- VZ -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple