From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr1-x42e.google.com (mail-wr1-x42e.google.com [IPv6:2a00:1450:4864:20::42e]) by sourceware.org (Postfix) with ESMTPS id 6FAE43858D39 for ; Tue, 11 Jan 2022 11:09:47 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 6FAE43858D39 Received: by mail-wr1-x42e.google.com with SMTP id r28so3867194wrc.3 for ; Tue, 11 Jan 2022 03:09:47 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=L0AsG+P8BpKhygcbCbGZaF3ZBQMVEwf6wijabWs4fEU=; b=tq/fuNyM1Ta015HbJOXFCefSRlMOBc8AZ7le4fOXiys+FUc16ByoEMJU+ebzPx2yti 8wZqpp8cmMjy31ATHdqViZyP4GvzV5VneLrV1CIY6RL5d8rn+DNqLFVWdiFkagwByBXW H3Mu9G+jFjMYjNt4SJAct+5O/lbianAsl+6f18B0a3V/ZjW5/z4EXppgFrRItMjl3U0b mMiRqplQDPHzVumS0V2lbL7NOuPOtwRvp7jFFkcIqLcobGFJrBrnYqikjdFauiS0wYYC +7y13ZwN73aYC3NJAoO/pXmIuEWUCXX5MoOOhvuYi86hms5AsFiwvgt/bUJgLrGNRcQk wO7A== X-Gm-Message-State: AOAM533LVrZn/YwxyI7XgWq7GXwHQcidW6sbd6OL9bIK1IAP/ZV9NTNH OLRBGV09swdD+yQNvpu/AUxK5FhqAIuefGZ0A7Q= X-Google-Smtp-Source: ABdhPJwFwhJJC/zTHwDvJXQ7hZVAJAZD+5r8s55CW/dybToid+Jdi2/jCrBDBAYJS3U9HPMzKbjwYrMj/+OvY5UZGTI= X-Received: by 2002:adf:cd09:: with SMTP id w9mr3264734wrm.395.1641899386485; Tue, 11 Jan 2022 03:09:46 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Jonathan Wakely Date: Tue, 11 Jan 2022 11:09:34 +0000 Message-ID: Subject: Re: [EXTERNAL] Re: Compiling GCC 11 for Windows targeting ARM on Linux To: Thomas Sobczynski Cc: Xi Ruoyao , "gcc-help@gcc.gnu.org" Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-1.0 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, KAM_SHORT, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: gcc-help@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-help mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Jan 2022 11:09:48 -0000 On Tue, 11 Jan 2022 at 02:50, Thomas Sobczynski via Gcc-help wrote: > > You need to install arm-none-eabi-gcc on Linux, because otherwise you > won't be able to build libgcc for arm-none-eabi (note that "arm-none- > eabi-gcc.exe", which is just compiled, can't run on Linux). You may use > "make all-gcc" and "make install-gcc" to skip libgcc, but a GCC build > without libgcc is almost completely useless (such a build is only useful > if you'll build libgcc manually later, or you are debugging GCC itself). > > -- > Xi Ruoyao > School of Aerospace Science and Technology, Xidian University > > > Thank you, Xi, for pointing out the need for the native cross toolchain a= s well as clarifying the linker flags. I installed the native Linux toolcha= in for bare-metal ARM, removed my config file edits, and tried again to bui= ld for a Windows host targeting ARM. > > I am seeing a new error, but it seems to occur further in the build proce= ss, so I feel like I'm a step closer. More context around the error is past= ed below. > > checking whether the arm-none-eabi-gcc linker (/usr/lib/gcc/arm-none-= eabi/9.2.1/../../../arm-none-eabi/bin/ld) supports shared libraries... yes > checking dynamic linker characteristics... no > checking how to hardcode library paths into programs... immediate > checking for shl_load... configure: error: Link tests are not allowed aft= er GCC_NO_EXECUTABLES. > make[1]: *** [Makefile:13331: configure-target-libstdc++-v3] Error 1 > > I tried explicitly adding "--disable-shared" to the "configure" script pa= rameters, so I'm confused about why I'm seeing "... supports shared librari= es... yes". Because the checks for dlopen are done whether or not you are building .so files. Adding --with-newlib will fix that error. That's no longer necessary on the Git master branch, because I fixed it yesterday, see https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D103866