From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-il1-x141.google.com (mail-il1-x141.google.com [IPv6:2607:f8b0:4864:20::141]) by sourceware.org (Postfix) with ESMTPS id 85DFD387090F; Tue, 28 Jul 2020 14:11:57 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 85DFD387090F Received: by mail-il1-x141.google.com with SMTP id j9so12889330ilc.11; Tue, 28 Jul 2020 07:11:57 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=inCe0XY7pGQZ7pDJVuqanmCeL68mKbs0xZtfnIgUevs=; b=ug8I1jY+LCTQIaAmqVklHovOYw1jbGg0dYbK4jsSRzMxycjloBDW48hEDY6yQtg8Y/ xdNDClNRaI2iiGYcdzymBu1E7w5ql7sJ4aUur82yiwL9rZa50S+B5eASfjit5sHrhx1F 8OCkZzPpUwBe4AxCQfWw9fidlO/Kbe8RkpGR0Dqr7mHgxR95YY4mgEisY/5KAhFIV/OR sF2ayharc5lcVHbzEw2tDn+e1PiUB88ce6JGmmYeVbGHqm6SXkRhilEKNe5Nj0yHxlhh 8w2PkNS0BYDsUpaBe5vZp15sUpMM9M6RNPU4qhXaK4E1Zg9UWzsqg+/Kx1ZCCvC9Cogu PTlQ== X-Gm-Message-State: AOAM533e0pBP9MBHm7qQKPvXRS1DO4TenqHQhlLDrKS6EELHugFXLQWs +bzNXB8MruvYau47P5FbOf2FoOUzMJEkodEJYM1rdRbX X-Google-Smtp-Source: ABdhPJzjXGtgXE7J4rkyzE0O5hj4u21lLuaXj4/ydpujAB/nOfMVBRtEvPk4xr4fUFgojy/OS505g9ow2mQeDDAxKZA= X-Received: by 2002:a92:bf0c:: with SMTP id z12mr28231336ilh.151.1595945517064; Tue, 28 Jul 2020 07:11:57 -0700 (PDT) MIME-Version: 1.0 References: <20200502022903.175852-1-amerey@redhat.com> <87a72ino27.fsf@tromey.com> <64517fee-8b8f-84b2-a116-c3d146ff1119@simark.ca> <87eep4hp3s.fsf@tromey.com> <996bd0f9-cec5-119c-19ea-b127cf1bb95d@simark.ca> <87r1svyche.fsf@igel.home> In-Reply-To: From: "H.J. Lu" Date: Tue, 28 Jul 2020 07:11:21 -0700 Message-ID: Subject: Re: V2 [PATCH] PKG_CHECK_MODULES: Check if $pkg_cv_[]$1[]_LIBS works To: Simon Marchi Cc: Andreas Schwab , "H.J. Lu via Binutils" , Tom Tromey , GCC Patches , GDB , Aaron Merey Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-3.2 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Jul 2020 14:11:58 -0000 On Tue, Jul 28, 2020 at 7:01 AM Simon Marchi wrote: > > On 2020-07-28 9:56 a.m., H.J. Lu wrote: > > On Tue, Jul 28, 2020 at 6:51 AM Andreas Schwab wrote: > >> > >> On Jul 28 2020, H.J. Lu via Binutils wrote: > >> > >>> On x86, the native GCC can support -m32 and -m64. "gcc -m32" or "gcc -m64" > >>> are not cross compiling. > >> > >> You cannot link -m64 and -m32 together. > >> > >>> I didn't set PKG_CONFIG_LIBDIR and I don't want to set it. > >> > >> Then use the correct pkg-config for your target. If you think > >> pkg-config is broken, then fix _that_. > >> > > > > I did: > > > > RUNTESTFLAGS="--target_board 'unix{-m32}'" CC="gcc -m32 -fno-lto > > -fcf-protection" > > CXX="g++ -fno-lto -m32 -fcf-protection" /exp > > ort/gnu/import/git/gitlab/x86-binutils/configure \ > > --enable-targets=x86_64-linux \ > > i686-linux \ > > --enable-plugins --disable-gdb --disable-gdbserver --disable-libdecnumbe > > r --disable-readline --disable-sim --with-sysroot=/ --with-system-zlib \ > > --prefix=/usr/local \ > > --with-local-prefix=/usr/local > > configure: WARNING: you should use --build, --host, --target > > checking build system type... i686-pc-linux-gnu > > checking host system type... i686-pc-linux-gnu > > checking target system type... i686-pc-linux-gnu > > So... is your build system a 32-bit one? Why does the above say i686-pc-linux-gnu > and not x86_64-something? > My system supports both -m32 and -m64. Depending on CC, configure selects i686 or x86-64 target. -- H.J.