delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2013/08/16/04:51:17

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:date:message-id:subject:from:to
:content-type; q=dns; s=default; b=Zad6aWHowSkP9m1Gm9o3XpwFuHqk2
jHzR4eKNw3995TBgwukFcjvEv3tYkOx4teoDgD9AntCmkb4Y2yl5ctOznt0olh8k
GCxKmX/75TVXAUaNVhmjdEJOlCVuNs0GtkXXGgOizgqcJjWSWBlNnP0X52vKQTHb
dSN/w/fFnPG39I=
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:date:message-id:subject:from:to
:content-type; s=default; bh=DIV8OBIGJoQpsmQ7/X/+yhop/no=; b=wwb
P/fPFgQltbjXxxq7xJR7bOq5RKwsRwKMfYcQUvqlcyjvmHhTQ9PsjF7+lfuDo/Mp
udJsDFVoKaRmfy0aOMfD+R+a+psfUEvdP4zn2Za2DF06ECSUnEvv41AnYqAbZee7
mG/Ae5mzqOlx580AzOPWW6PYmmwIghCTyQ4ZTjBs=
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
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
X-Spam-SWARE-Status: No, score=-2.7 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,RCVD_IN_HOSTKARMA_YE,SPF_PASS autolearn=ham version=3.3.2
MIME-Version: 1.0
X-Received: by 10.152.116.109 with SMTP id jv13mr352580lab.30.1376643056570; Fri, 16 Aug 2013 01:50:56 -0700 (PDT)
Date: Fri, 16 Aug 2013 10:50:56 +0200
Message-ID: <CAKw7uVjHcZbuxhAYjtBeZ=kiNF2hhuWUNLRuo+y8t5tZsj7f6Q@mail.gmail.com>
Subject: GNU ld -O option breaks compilation
From: =?UTF-8?Q?V=C3=A1clav_Zeman?= <vhaisman AT gmail DOT com>
To: cygwin AT cygwin DOT com

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

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

- Raw text -


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