delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2010/10/12/13:55:27

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: No, hits=-1.7 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE
X-Spam-Check-By: sourceware.org
MIME-Version: 1.0
Date: Tue, 12 Oct 2010 12:55:09 -0500
Message-ID: <AANLkTi=MrFKWwRD9nkdH5tJe51o63iA__q70SKT9B1y2@mail.gmail.com>
Subject: ld fails when -L/lib is on the command line
From: Nathan Thern <nthern AT gmail DOT com>
To: cygwin <cygwin AT cygwin DOT com>
X-IsSubscribed: yes
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

A complicated project I'm building fails on this call to gcc:
gcc -shared <object files> -L<lib_path_in_build_tree> -L/lib
-L/usr/lib <build_libs> <std_libs> -o .libs/cyg<lib>.dll
-Wl,--enable-auto-image-base -Xlinker --out-implib -Xlinker
.libs/lib<lib>.dll.a

If I remove the -L/lib, the call succeeds. Using the -v option to gcc,
I see that it's actually a call to
/usr/lib/gcc/i686-pc-cygwin/4.3.4/collect2.exe (which claims to be
ld.exe) that fails. Unfortunately, the gcc command is actually called
from "libtool --mode=install", so can't see any way to expunge the
offending -L/lib. How do I get this build to succeed?

regards,
NT

P.S. Also, is this a bug in the gcc-4.3.4 linker, or is it some other problem?

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