public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: Simon Marchi <simark@simark.ca>
To: "H.J. Lu" <hjl.tools@gmail.com>
Cc: GCC Patches <gcc-patches@gcc.gnu.org>,
	"H.J. Lu via Binutils" <binutils@sourceware.org>,
	Aaron Merey <amerey@redhat.com>,
	Andreas Schwab <schwab@linux-m68k.org>,
	Tom Tromey <tom@tromey.com>, GDB <gdb-patches@sourceware.org>
Subject: Re: V2 [PATCH] PKG_CHECK_MODULES: Check if $pkg_cv_[]$1[]_LIBS works
Date: Tue, 28 Jul 2020 11:13:35 -0400	[thread overview]
Message-ID: <3209078a-429a-4be7-b151-93c3f4a53655@simark.ca> (raw)
In-Reply-To: <CAMe9rOobJcEydFKYdj8Eqp17oOtVSg7T2sUgQegYHK-D2ec1Pg@mail.gmail.com>

On 2020-07-28 11:05 a.m., H.J. Lu via Gdb-patches wrote:
>> Can you clarify how this magic works, is this standard autoconf?  Because I am trying this
>> on Fedora, so pretty much the same setup as you, and I don't see this behavior:
>>
>> $ /home/simark/src/binutils-gdb/configure CC="gcc -m32" CXX="g++ -m32"
>> checking build system type... x86_64-pc-linux-gnu
>> checking host system type... x86_64-pc-linux-gnu
>> checking target system type... x86_64-pc-linux-gnu
>> ...
>>
> 
> I checked it again.  I also passed i686-linux, not  --host=,  to configure.

Ok I see, the configure line you pasted was wrapped by your email client so was not very readable.

Doing `./configure <triplet>` looks like a deprecated way to set all build/host/target, as the
warning message it shows implies:

  configure: WARNING: you should use --build, --host, --target

Anyway, my point still stands: the problem is you not using a pkg-config configured properly for
the cross compilation you are attempting, not pkg.m4.

>>
>> And even if it worked, why would it set "build" to i686, it doesn't make sense.  The gcc you
>> compile with, and its environment, is still x86_64, not i686.
>>
>> So *if* it works, it would be a shortcut for setting --host=i686-something, maybe.  So
>> regardless of how that above works, that doesn't remove the need to configure pkg-config
>> correctly for the host system.
>>
>> If you don't want to learn about with pkg-config and deal with it, then please say "I think
>> we should not use pkg-config", and ideally give supporting points.  Please don't unilaterally
>> push patches just to paper over your own problems.  You just make it so that somebody will
>> need to untangle more mess later.
> 
> I am OK to remove pkg.m4.

Well I am not.  I find it quite handy to avoid having to hardcode necessary CFLAGS and LDFLAGS
required to build against a library, so I think it's better to use pkg-config if the libraries
we want to use provide a .pc file.

I propose that we revert the patch for now to go back to the pristing pkg.m4 version.

Simon

  reply	other threads:[~2020-07-28 15:13 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20200502022903.175852-1-amerey@redhat.com>
2020-05-05 16:41 ` [PATCH] config/debuginfod.m4: Use PKG_CHECK_MODULES Jeff Law
2020-05-05 21:23   ` Aaron Merey
2020-05-08 20:56     ` Tom Tromey
2020-07-16 22:17       ` Aaron Merey
2020-07-16 22:37       ` Aaron Merey
2020-07-19 15:43         ` Simon Marchi
2020-07-21 15:20           ` Tom Tromey
2020-07-21 18:11             ` Aaron Merey
2020-07-24 20:03               ` Aaron Merey
2020-07-25 16:01                 ` H.J. Lu
2020-07-27 15:31                   ` [PATCH] config/debuginfod.m4: Restore AC_CHECK_LIB check H.J. Lu
2020-07-27 16:11                     ` Aaron Merey
2020-07-27 19:14                       ` [PATCH] PKG_CHECK_MODULES: Check if $pkg_cv_[]$1[]_LIBS works H.J. Lu
2020-07-27 19:32                         ` V2 " H.J. Lu
2020-07-28 10:45                           ` H.J. Lu
2020-07-28 12:46                             ` Simon Marchi
2020-07-28 13:33                               ` H.J. Lu
2020-07-28 13:51                                 ` Andreas Schwab
2020-07-28 13:56                                   ` H.J. Lu
2020-07-28 14:01                                     ` Simon Marchi
2020-07-28 14:11                                       ` H.J. Lu
2020-07-28 14:34                                         ` Simon Marchi
2020-07-28 15:05                                           ` H.J. Lu
2020-07-28 15:13                                             ` Simon Marchi [this message]
2020-07-28 16:07                                               ` H.J. Lu
2020-07-28 16:28                                                 ` Simon Marchi
2020-07-28 17:26                                                   ` H.J. Lu
2020-07-28 17:43                                                     ` Simon Marchi
2020-07-28 18:31                                                       ` H.J. Lu
2020-07-28 18:47                                                         ` Simon Marchi
2020-07-28 18:57                                                           ` H.J. Lu
2020-07-28 14:54                                         ` Andreas Schwab
2020-07-28 13:53                                 ` H.J. Lu
2020-07-28 13:54                                 ` Simon Marchi
2020-07-28 12:54                           ` Mark Wielaard
2020-07-28 13:27                             ` [PATCH] PKG_CHECK_MODULES: Properly check " H.J. Lu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3209078a-429a-4be7-b151-93c3f4a53655@simark.ca \
    --to=simark@simark.ca \
    --cc=amerey@redhat.com \
    --cc=binutils@sourceware.org \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=gdb-patches@sourceware.org \
    --cc=hjl.tools@gmail.com \
    --cc=schwab@linux-m68k.org \
    --cc=tom@tromey.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).