From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from fgw22-4.mail.saunalahti.fi (fgw22-4.mail.saunalahti.fi [62.142.5.109]) by sourceware.org (Postfix) with ESMTPS id 9110C3858D32 for ; Sun, 12 Feb 2023 20:02:02 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 9110C3858D32 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=wippies.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=wippies.com Received: from [10.0.0.80] (mobile-access-2e8429-181.dhcp.inet.fi [46.132.41.181]) by fgw22.mail.saunalahti.fi (Halon) with ESMTPSA id 1c24f3e2-ab10-11ed-9ddd-005056bdf889; Sun, 12 Feb 2023 22:02:00 +0200 (EET) Message-ID: Date: Sun, 12 Feb 2023 22:01:57 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.7.2 Subject: Re: Problem cross-compiling gcc To: Christer Solskogen , gcc-help@gcc.gnu.org References: From: Kai Ruottu In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,KAM_DMARC_STATUS,NICE_REPLY_A,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: Christer Solskogen via Gcc-help kirjoitti 12.2.2023 klo 19.51: > While cross compiling gcc with musl I see this: > > checking for exported symbols... /home/solskogen/gcc/libcc1/configure: > line 15053: -T: command not found > yes > checking for -rdynamic... /home/solskogen/gcc/libcc1/configure: line > 15063: -T: command not found > no > checking for library containing dlopen... none required > checking for -fPIC -shared... yes > configure: error: >    Building GCC with plugin support requires a host that supports >    -fPIC, -shared, -ldl and -rdynamic. > make[1]: *** [Makefile:11890: configure-libcc1] Error 1 > > This is the configure line: /home/solskogen/gcc/configure > --prefix=/usr --libexecdir=/lib --host=aarch64-centrix-linux-musl > --target=aarch64-centrix-linux-musl --build=x86_64-pc-linux-gnu What is intersting in this case is WHICH GCC the build tries to use when compiling libgcc. It should be the 'aarch64-centrix-linux-musl' targeted cross-GCC, used for the becoming $host system to create the executables and libraries for it. So what are the CC_FOR_TARGET, GCC_FOR_TARGET, CXX_FOR_TARGET and GXX_FOR_TARGET in the main Makefile and in the one used for libgcc?  My habit has been years to define these in environment before running configure. Maybe these simply don't work in the "native Canadian Cross" case. (To create a native GCC with a cross-GCC).