GNU bug report logs - #8912
cross-compile code for LD setup does not use the right system macro

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: Eric PAIRE <eric.paire@HIDDEN>; merged with #68494; dated Tue, 21 Jun 2011 15:25:02 UTC; Maintainer for libtool is bug-libtool@HIDDEN.
Merged 8912 68494. Request was from Mike Frysinger <vapier@HIDDEN> to control <at> debbugs.gnu.org. Full text available.

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


Received: (at 8912) by debbugs.gnu.org; 16 Jan 2024 01:32:22 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Jan 15 20:32:22 2024
Received: from localhost ([127.0.0.1]:47320 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1rPYJR-0007ba-T5
	for submit <at> debbugs.gnu.org; Mon, 15 Jan 2024 20:32:22 -0500
Received: from woodpecker.gentoo.org ([140.211.166.183]:57332
 helo=smtp.gentoo.org) by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <vapier@HIDDEN>) id 1rPYJO-0007bH-O3
 for 8912 <at> debbugs.gnu.org; Mon, 15 Jan 2024 20:32:19 -0500
Received: by smtp.gentoo.org (Postfix, from userid 559)
 id DF95B3432A0; Tue, 16 Jan 2024 01:32:12 +0000 (UTC)
From: Mike Frysinger <vapier@HIDDEN>
To: Eric PAIRE <eric.paire@HIDDEN>
Subject: Re: cross-compile code for LD setup does not use the right system
 macro
User-Agent: GNU debbugs/0
Message-Id: <20240116013212.DF95B3432A0@HIDDEN>
Date: Tue, 16 Jan 2024 01:32:12 +0000 (UTC)
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 8912
Cc: 8912 <at> debbugs.gnu.org, "bug-libtool@HIDDEN" <bug-libtool@HIDDEN>
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: -3.3 (---)

On Tue, 21 Jun 2011 14:12:02 +0200, Eric PAIRE wrote:
> While compiling on 64-bit Linux a package that will be executed on a 32-bit Linux ([--build=x86_64-unknown-linux-gnu] --host=i686-pc-linux-gnu), I am facing an issue with the value of the LD macro generated in libtool, as the libtool part of configure does not add the '-m elf_i386' option for LD to generate a 32-bit object/program.

can you share an example project/configure/config.log showing the problem ?

> Actually, the problem is that libtool.m4 checks for the build system type with $host, whereas it should be $build. I have understood that $build is the system on which the program is generated (64-bit in my case) and $host the system on which the program created (32-bit in my case) is meant to run. So the right macro should test build system, and not host.

this is incorrect.  $build controls where things are compiling.
$host controls where the things will run.  please see:
https://www.gnu.org/savannah-checkouts/gnu/autoconf/manual/autoconf-2.72/html_node/Specifying-Target-Triplets.html
-mike




Information forwarded to bug-libtool@HIDDEN:
bug#8912; Package libtool. Full text available.

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


Received: (at submit) by debbugs.gnu.org; 21 Jun 2011 15:24:36 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Jun 21 11:24:35 2011
Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1QZ2oc-0002I2-Vl
	for submit <at> debbugs.gnu.org; Tue, 21 Jun 2011 11:24:35 -0400
Received: from eggs.gnu.org ([140.186.70.92])
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <eric.paire@HIDDEN>) id 1QYzou-0004gy-Jl
	for submit <at> debbugs.gnu.org; Tue, 21 Jun 2011 08:12:41 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <eric.paire@HIDDEN>) id 1QYzoo-00040q-Ff
	for submit <at> debbugs.gnu.org; Tue, 21 Jun 2011 08:12:35 -0400
X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,HTML_MESSAGE,
	RCVD_IN_DNSWL_MED autolearn=unavailable version=3.3.1
Received: from lists.gnu.org ([140.186.70.17]:36709)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <eric.paire@HIDDEN>) id 1QYzoo-00040m-9z
	for submit <at> debbugs.gnu.org; Tue, 21 Jun 2011 08:12:34 -0400
Received: from eggs.gnu.org ([140.186.70.92]:50101)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <eric.paire@HIDDEN>) id 1QYzon-0000QI-2q
	for bug-libtool@HIDDEN; Tue, 21 Jun 2011 08:12:34 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <eric.paire@HIDDEN>) id 1QYzol-00040R-MK
	for bug-libtool@HIDDEN; Tue, 21 Jun 2011 08:12:33 -0400
Received: from eu1sys200aog101.obsmtp.com ([207.126.144.111]:39147)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <eric.paire@HIDDEN>) id 1QYzol-0003zA-Ap
	for bug-libtool@HIDDEN; Tue, 21 Jun 2011 08:12:31 -0400
Received: from beta.dmz-eu.st.com ([164.129.1.35]) (using TLSv1) by
	eu1sys200aob101.postini.com ([207.126.147.11]) with SMTP
	ID DSNKTgCKnPAIRlZr7t+iRolABXg7XuLhlWeb@HIDDEN;
	Tue, 21 Jun 2011 12:12:31 UTC
Received: from zeta.dmz-eu.st.com (ns2.st.com [164.129.230.9])
	by beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 70070F3
	for <bug-libtool@HIDDEN>; Tue, 21 Jun 2011 12:12:08 +0000 (GMT)
Received: from Webmail-eu.st.com (safex1hubcas1.st.com [10.75.90.14])
	by zeta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 0339B261D
	for <bug-libtool@HIDDEN>; Tue, 21 Jun 2011 12:12:08 +0000 (GMT)
Received: from SAFEX1MAIL2.st.com ([10.75.90.4]) by SAFEX1HUBCAS1.st.com
	([10.75.90.14]) with mapi; Tue, 21 Jun 2011 14:12:07 +0200
From: Eric PAIRE <eric.paire@HIDDEN>
To: "bug-libtool@HIDDEN" <bug-libtool@HIDDEN>
Date: Tue, 21 Jun 2011 14:12:02 +0200
Subject: cross-compile code for LD setup does not use the right system macro
Thread-Topic: cross-compile code for LD setup does not use the right system
	macro
Thread-Index: AcwwDG2OKSKVhUDVQB2hnTfVB6PWJg==
Message-ID: <68B811F07A63BA48BF0F49F7D822D419C48B31BBB4@HIDDEN>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach: yes
X-MS-TNEF-Correlator: 
acceptlanguage: en-US
Content-Type: multipart/mixed;
	boundary="_004_68B811F07A63BA48BF0F49F7D822D419C48B31BBB4SAFEX1MAIL2st_"
MIME-Version: 1.0
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6, seldom 2.4 (older,
	4)
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3)
X-Received-From: 140.186.70.17
X-Spam-Score: -6.6 (------)
X-Debbugs-Envelope-To: submit
X-Mailman-Approved-At: Tue, 21 Jun 2011 11:24:33 -0400
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.11
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/pipermail/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: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -6.6 (------)

--_004_68B811F07A63BA48BF0F49F7D822D419C48B31BBB4SAFEX1MAIL2st_
Content-Type: multipart/alternative;
	boundary="_000_68B811F07A63BA48BF0F49F7D822D419C48B31BBB4SAFEX1MAIL2st_"

--_000_68B811F07A63BA48BF0F49F7D822D419C48B31BBB4SAFEX1MAIL2st_
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

Hi all,

While compiling on 64-bit Linux a package that will be executed on a 32-bit=
 Linux ([--build=3Dx86_64-unknown-linux-gnu] --host=3Di686-pc-linux-gnu), I=
 am facing an issue with the value of the LD macro generated in libtool, as=
 the libtool part of configure does not add the '-m elf_i386' option for LD=
 to generate a 32-bit object/program.

Actually, the problem is that libtool.m4 checks for the build system type w=
ith $host, whereas it should be $build. I have understood that $build is th=
e system on which the program is generated (64-bit in my case) and $host th=
e system on which the program created (32-bit in my case) is meant to run. =
So the right macro should test build system, and not host.

You will find attached a fix proposal.

Thanks,
Eric PAIRE


--_000_68B811F07A63BA48BF0F49F7D822D419C48B31BBB4SAFEX1MAIL2st_
Content-Type: text/html; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

<html xmlns:v=3D"urn:schemas-microsoft-com:vml" xmlns:o=3D"urn:schemas-micr=
osoft-com:office:office" xmlns:w=3D"urn:schemas-microsoft-com:office:word" =
xmlns:m=3D"http://schemas.microsoft.com/office/2004/12/omml" xmlns=3D"http:=
//www.w3.org/TR/REC-html40"><head><meta http-equiv=3DContent-Type content=
=3D"text/html; charset=3Dus-ascii"><meta name=3DGenerator content=3D"Micros=
oft Word 12 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
	{font-family:Calibri;
	panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
	{margin:0in;
	margin-bottom:.0001pt;
	font-size:11.0pt;
	font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
	{mso-style-priority:99;
	color:blue;
	text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
	{mso-style-priority:99;
	color:purple;
	text-decoration:underline;}
span.EmailStyle17
	{mso-style-type:personal-compose;
	font-family:"Calibri","sans-serif";
	color:windowtext;}
.MsoChpDefault
	{mso-style-type:export-only;}
@page WordSection1
	{size:8.5in 11.0in;
	margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
	{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext=3D"edit" spidmax=3D"1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext=3D"edit">
<o:idmap v:ext=3D"edit" data=3D"1" />
</o:shapelayout></xml><![endif]--></head><body lang=3DEN-US link=3Dblue vli=
nk=3Dpurple><div class=3DWordSection1><p class=3DMsoNormal>Hi all,<o:p></o:=
p></p><p class=3DMsoNormal><o:p>&nbsp;</o:p></p><p class=3DMsoNormal>While =
compiling on 64-bit Linux a package that will be executed on a 32-bit Linux=
 ([--build=3Dx86_64-unknown-linux-gnu] --host=3Di686-pc-linux-gnu), I am fa=
cing an issue with the value of the LD macro generated in libtool, as the l=
ibtool part of configure does not add the '-m elf_i386' option for LD to ge=
nerate a 32-bit object/program.<o:p></o:p></p><p class=3DMsoNormal><o:p>&nb=
sp;</o:p></p><p class=3DMsoNormal>Actually, the problem is that libtool.m4 =
checks for the build system type with $host, whereas it should be $build. I=
 have understood that $build is the system on which the program is generate=
d (64-bit in my case) and $host the system on which the program created (32=
-bit in my case) is meant to run. So the right macro should test build syst=
em, and not host.<o:p></o:p></p><p class=3DMsoNormal><o:p>&nbsp;</o:p></p><=
p class=3DMsoNormal>You will find attached a fix proposal.<o:p></o:p></p><p=
 class=3DMsoNormal><o:p>&nbsp;</o:p></p><p class=3DMsoNormal>Thanks,<o:p></=
o:p></p><p class=3DMsoNormal>Eric PAIRE<o:p></o:p></p><p class=3DMsoNormal>=
<o:p>&nbsp;</o:p></p></div></body></html>=

--_000_68B811F07A63BA48BF0F49F7D822D419C48B31BBB4SAFEX1MAIL2st_--

--_004_68B811F07A63BA48BF0F49F7D822D419C48B31BBB4SAFEX1MAIL2st_
Content-Type: application/octet-stream; name="PATCH.libtool"
Content-Description: PATCH.libtool
Content-Disposition: attachment; filename="PATCH.libtool"; size=532;
	creation-date="Tue, 21 Jun 2011 14:06:47 GMT";
	modification-date="Tue, 21 Jun 2011 13:57:22 GMT"
Content-Transfer-Encoding: base64

LS0tIGxpYnRvb2wtMi40L2xpYmx0ZGwvbTQvbGlidG9vbC5tNC5vbGQJMjAxMC0wOS0yMiAxMDo0
MToxOS4wMDAwMDAwMDAgKzAyMDAKKysrIGxpYnRvb2wtMi40L2xpYmx0ZGwvbTQvbGlidG9vbC5t
NAkyMDExLTA2LTIxIDEzOjU2OjQ2LjAwMDAwMDAwMCArMDIwMApAQCAtMTI3NSw3ICsxMjc1LDcg
QEAKICAgaWYgQUNfVFJZX0VWQUwoYWNfY29tcGlsZSk7IHRoZW4KICAgICBjYXNlIGAvdXNyL2Jp
bi9maWxlIGNvbmZ0ZXN0Lm9gIGluCiAgICAgICAqMzItYml0KikKLQljYXNlICRob3N0IGluCisJ
Y2FzZSAkYnVpbGQgaW4KIAkgIHg4Nl82NC0qa2ZyZWVic2QqLWdudSkKIAkgICAgTEQ9IiR7TEQt
bGR9IC1tIGVsZl9pMzg2X2Zic2QiCiAJICAgIDs7CkBAIC0xMjk0LDcgKzEyOTQsNyBAQAogCWVz
YWMKIAk7OwogICAgICAgKjY0LWJpdCopCi0JY2FzZSAkaG9zdCBpbgorCWNhc2UgJGJ1aWxkIGlu
CiAJICB4ODZfNjQtKmtmcmVlYnNkKi1nbnUpCiAJICAgIExEPSIke0xELWxkfSAtbSBlbGZfeDg2
XzY0X2Zic2QiCiAJICAgIDs7Cg==

--_004_68B811F07A63BA48BF0F49F7D822D419C48B31BBB4SAFEX1MAIL2st_--




Acknowledgement sent to Eric PAIRE <eric.paire@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-libtool@HIDDEN. Full text available.
Report forwarded to owner <at> debbugs.gnu.org, bug-libtool@HIDDEN:
bug#8912; 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: Sat, 20 Jan 2024 12:30:02 UTC

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