GNU bug report logs - #25944
libtool link mode execution ignores --target=* option

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: libtool; Reported by: "N. Ohkawa" <n.ohkawa@HIDDEN>; dated Fri, 3 Mar 2017 05:21:01 UTC; Maintainer for libtool is bug-libtool@HIDDEN.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 3 Mar 2017 05:20:53 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Mar 03 00:20:53 2017
Received: from localhost ([127.0.0.1]:37282 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1cjfe9-0006yP-FA
	for submit <at> debbugs.gnu.org; Fri, 03 Mar 2017 00:20:53 -0500
Received: from eggs.gnu.org ([208.118.235.92]:44296)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <n.ohkawa@HIDDEN>) id 1cjfcj-0006vp-OZ
 for submit <at> debbugs.gnu.org; Fri, 03 Mar 2017 00:19:26 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <n.ohkawa@HIDDEN>) id 1cjfcd-00077L-M8
 for submit <at> debbugs.gnu.org; Fri, 03 Mar 2017 00:19:20 -0500
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,FREEMAIL_FROM,
 HTML_MESSAGE,T_DKIM_INVALID autolearn=disabled version=3.3.2
Received: from lists.gnu.org ([2001:4830:134:3::11]:57968)
 by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32)
 (Exim 4.71) (envelope-from <n.ohkawa@HIDDEN>) id 1cjfcd-000779-IL
 for submit <at> debbugs.gnu.org; Fri, 03 Mar 2017 00:19:19 -0500
Received: from eggs.gnu.org ([2001:4830:134:3::10]:35265)
 by lists.gnu.org with esmtp (Exim 4.71)
 (envelope-from <n.ohkawa@HIDDEN>) id 1cjfcc-00058x-H2
 for bug-libtool@HIDDEN; Fri, 03 Mar 2017 00:19:19 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <n.ohkawa@HIDDEN>) id 1cjfcb-00076x-NS
 for bug-libtool@HIDDEN; Fri, 03 Mar 2017 00:19:18 -0500
Received: from mail-lf0-x230.google.com ([2a00:1450:4010:c07::230]:36814)
 by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16)
 (Exim 4.71) (envelope-from <n.ohkawa@HIDDEN>) id 1cjfcb-00075t-GO
 for bug-libtool@HIDDEN; Fri, 03 Mar 2017 00:19:17 -0500
Received: by mail-lf0-x230.google.com with SMTP id y193so42687053lfd.3
 for <bug-libtool@HIDDEN>; Thu, 02 Mar 2017 21:19:15 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=mime-version:from:date:message-id:subject:to;
 bh=5R83g6r67yrzJsqhSze7MArKFeXyBHN+e925OMWWHPE=;
 b=HKIOjg99EcnJl6mAa3Dh2+Yc52fqdUMDxbKT40o3M9jfLxzkR8tac8+j/xKZL5V7il
 c3hWLGc3kC6L2PurgAAtDZ80vhBNAxd8zOm0Q9XsPjATV30X36WSzpfIfu+K5rzsO3iO
 u04lVsA726XIKntL3p4flJnVENw13IIGD+leLphpy7M+J5ioD03V48t3v3/7gKZVX/b+
 WWJxY07F9hwE+Z7jFyhTX+CA7RDWuQnrDDlCU8Dncl1YoEUE7ELLfhWXppw5RElu59Rq
 2bXOJC/9+a7vSqsxP3L7Oc6lBC1n799KkvGzoW2FAIHkh1BKizrD/yIj+IpbIOX6y/RO
 ikRg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:mime-version:from:date:message-id:subject:to;
 bh=5R83g6r67yrzJsqhSze7MArKFeXyBHN+e925OMWWHPE=;
 b=k+2yUrEEENlL55FZMBuHnptWnoI6d826A8/xdGbnbsF6lG4ufh00grJCMMzjUid9cI
 5z0Qo21jN1WDXsenbi5y+prwdZtlHR0rgcjO0R9avE6T32dajzPd3UqYRrs1VpOwJC1t
 +RGlKNnBYN+cK4XCdqWWwcn7EXyal1+ygOgkfDNtVjg8eKna1Qmy4cwZJmPX8G8ImzX2
 paBXSQiZGqU3hOGvmGFcWi95StigFcNZM3ltArvTUuaYKvqlQFa4BpcIMkubueXxwUQ7
 GOOnHv1WDCv7Ycidjwz2Y88xHn+QZNXXfjZVd3l4kgEE7DPmEabs7swFvMA5IkhXFDys
 5QiQ==
X-Gm-Message-State: AMke39kvsQTfZRj2i4zuP6F3pDF0RgLQHb2cPU8scTuTfcuitLx+NtXzH+xF1b0tNu2JXcNU5QeLmDWYoHz+3Q==
X-Received: by 10.25.19.90 with SMTP id j87mr256682lfi.182.1488518354283; Thu,
 02 Mar 2017 21:19:14 -0800 (PST)
MIME-Version: 1.0
Received: by 10.25.31.9 with HTTP; Thu, 2 Mar 2017 21:19:13 -0800 (PST)
From: "N. Ohkawa" <n.ohkawa@HIDDEN>
Date: Fri, 3 Mar 2017 14:19:13 +0900
Message-ID: <CA+vbTX8K5T-a79cbtEK6cu6U-hQhDofuy9ieUPP9XrP4z1iKow@HIDDEN>
Subject: libtool link mode execution ignores --target=* option
To: bug-libtool@HIDDEN
Content-Type: multipart/alternative; boundary=001a11408214bfb30d0549ccaf11
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 2001:4830:134:3::11
X-Spam-Score: -4.0 (----)
X-Debbugs-Envelope-To: submit
X-Mailman-Approved-At: Fri, 03 Mar 2017 00:20:52 -0500
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -4.0 (----)

--001a11408214bfb30d0549ccaf11
Content-Type: text/plain; charset=UTF-8

Hi,


I try to cross-compile my lib using clang and target toolchain.
In link phase, I get this error.

clang-3.9: error: unable to execute command: Executable "ld" doesn't exist!
clang-3.9: error: linker command failed with exit code 1 (use -v to see
invocation)

'make' command try to link by

/bin/bash ../libtool  --tag=CC   --mode=link clang [options include
--target=target-host-prefix]

And then, 'libtool' script executes

clang [options without --target=target-host-prefix]

So, clang try to use 'ld' unexpectedly, not 'target-host-prefix-ld'.
libtool script drops --target=* at the func_mode_link function.
I think --target=* should be passed through unchanged,
like --sysroot=*, -stdlib=* and other options.


Regards,
Noriyuki

--001a11408214bfb30d0549ccaf11
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">Hi,=C2=A0<div><br></div><div><br></div><div>I try to cross=
-compile my lib using clang and target toolchain.<div><div>In link phase, I=
 get this error.<br></div><div><br></div><div>clang-3.9: error: unable to e=
xecute command: Executable &quot;ld&quot; doesn&#39;t exist!<br></div><div>=
<div>clang-3.9: error: linker command failed with exit code 1 (use -v to se=
e invocation)</div></div></div></div><div><br></div><div>&#39;make&#39; com=
mand try to link by<br></div><div><br></div><div>/bin/bash ../libtool =C2=
=A0--tag=3DCC =C2=A0 --mode=3Dlink clang [options include --target=3Dtarget=
-host-prefix]<br></div><div><br></div><div>And then, &#39;libtool&#39; scri=
pt executes</div><div><br></div><div>clang [options without --target=3Dtarg=
et-host-prefix]<br></div><div><br></div><div>So, clang try to use &#39;ld&#=
39; unexpectedly, not &#39;target-host-prefix-ld&#39;.</div><div>libtool sc=
ript drops --target=3D* at the func_mode_link function.<br></div><div>I thi=
nk --target=3D* should be passed through unchanged,<br></div><div>like=C2=
=A0--sysroot=3D*, -stdlib=3D* and other options.</div><div><br></div><div><=
br></div><div>Regards,</div><div>Noriyuki</div><div><br></div><div><br></di=
v><div><br></div><div><br></div></div>

--001a11408214bfb30d0549ccaf11--




Acknowledgement sent to "N. Ohkawa" <n.ohkawa@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-libtool@HIDDEN. Full text available.
Report forwarded to bug-libtool@HIDDEN:
bug#25944; Package libtool. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Mon, 25 Nov 2019 12:00:02 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.