From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from BL0PR02CU006.outbound.protection.outlook.com (mail-eastusazolkn19013051.outbound.protection.outlook.com [52.103.11.51]) by sourceware.org (Postfix) with ESMTPS id A71D63858D1E for ; Sun, 6 Aug 2023 20:35:33 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org A71D63858D1E Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=live.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=live.com ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=maqTaR7UgVwaaOHCW7HhwIq2/5+AoFCR2K+wW2u8Z4ASUgrCqfhpuWkCeXTfuyepEkauFUjtN6qQ4ogKX/5xumUX8nde2gfaH2Ye7M79bTlVzFM27eacGzUYr+wGiC0kWZYKbyYJj/11BYRbIAWGPAVBF4Wvg8sapgFzJfOMQILmPL8Ab5S+bJlK8Tw9Vo+TDpWoNBnprxW5s0FXyQ9VFidvvoNl0LvIuUH0rEN1UU10ffDoMWaeDXlqTeqy8EjDosfdg5sTOMF201+uqv/8JtD45c1xube0mIlQ83vkyBFvENn/O6PKxJIUYvbiRRujbo8bH8HssUpATTGQF8X7kw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=lo7je8eaE9eL5KW1Pqtk2mFpUQzCxw74kglMSBEo6GI=; b=HTk7spf5cgpHR3Lpa7pqVXRgbxZo50aNECK5fqIPFk/2zDtsReqE0o4ik60HnZSVOI0B5N96gSY2y+8JqtEZKkJ4qwC0HC6/P8guTyGHldM7w/NVbqn/Qm/jkXvFeN2tgl7uTxKILYI+FAYsHfbQZfvnkx9kmLROUZ8xScYLWa9cI89ySfuXJX0s0HOwW5fv8rvKhOx9phXZHqHJl5WOjhfRqomaQa/pu2Bp5Ns+w3N7tH+MHQ/cI8d5t0FHQgrTpEBdJUuH0jJPXck0rPrl1GD3vlTcuE/bUIS1B9TYD23sP1mZ7CXYfQ/VNwOlj9k8ef9yfACggeOgPbsSu3ZYnA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=live.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=lo7je8eaE9eL5KW1Pqtk2mFpUQzCxw74kglMSBEo6GI=; b=RRZFTXY405oqMfqnsJEhsbS9iqjiyPYF/6J2qlRSNj+IC2wrMH89aHhI1M6w2BYUCSrDE07ZcxgMoiSf5njPDjV1xCzmJiQMw+VRgyQDcOuh6515AUIVg0lDriFV4wNJbHTNisPrxm+CxwOkE5t35bBi3anQZPyi/aNnX3HTJ1+byVYFNKDzaqzf3VmmKOl8fVnAJ3k7qE2116X3TO+qyyURNQZ/89wxbZKWSwmpbA+Q4uFCRsWn9HOgDvMJYBH+wU6vBITUoGKx7/8fNHhE/TZuLIHVpmG+mKWvVCxeQxLe/4dtC93UlTznjBLm2qGCbxnhlmCM6mLCWbdMku+qFA== Received: from DM6PR05MB4697.namprd05.prod.outlook.com (2603:10b6:5:18::13) by DS0PR05MB10015.namprd05.prod.outlook.com (2603:10b6:8:dd::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6652.25; Sun, 6 Aug 2023 20:35:32 +0000 Received: from DM6PR05MB4697.namprd05.prod.outlook.com ([fe80::6f78:8041:f44c:589d]) by DM6PR05MB4697.namprd05.prod.outlook.com ([fe80::6f78:8041:f44c:589d%4]) with mapi id 15.20.6652.025; Sun, 6 Aug 2023 20:35:32 +0000 From: unlvsur unlvsur To: Kai Ruottu , "gcc-help@gcc.gnu.org" Subject: RE: How to set sysroot for cross compiling? Thread-Topic: How to set sysroot for cross compiling? Thread-Index: AQHZxPcHgl3CtdrDsUqH8EUuQsUrf6/Wy9EAgAA8EK2AAADiAIAAAzwtgAFOZACAAjOTgIADMytO Date: Sun, 6 Aug 2023 20:35:32 +0000 Message-ID: References: <875y5xzqpl.fsf@aarsen.me> <87fs51y211.fsf@aarsen.me> <878rasxwtv.fsf@aarsen.me> In-Reply-To: Accept-Language: en-US, zh-CN Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-tmn: [CGkhrdVRD7WY47TnNQqMvAF6/o0IwLzsjvUe6O1piSFyeQ8QdoycRtLHfPLfHsQUEjF+94WsnQI=] x-ms-publictraffictype: Email x-ms-traffictypediagnostic: DM6PR05MB4697:EE_|DS0PR05MB10015:EE_ x-ms-office365-filtering-correlation-id: fc62f7ff-11c1-4e0b-5a41-08db96bcae38 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: JcO7mol5CIrBN7MICWuTMlu3Y5u8Njq//CxnFbm7c0SP0ocdYcBdj/6JCMn/mYlmiuKjs8e4/tEnjXmXatMg9BevKiPoh4+8GNxgfBH54ncqSOeOyj505cTjBeQLjM+cwaQd9jYBUfBP0gTTO2fv6OidFHmQbyyTmYpLTFvoS+IF5YIZldC02tRomHPOBQgvaIEAZpU5JLCfpwa30oTZ1DN/fuLXfsJ67N0mKc6TeFJOoEXfOoIqDESye9OB7mq8Dd7WsanP5ivaXxPsGbtXVjY+OlMpRrunDz9LF/rHeO3rcrjtsz1PybQVTQ9xq2tyls7LrXOtiG9jK+6pAXlS71UkqVsM0sgKwUUdim7gM3bJFRCbj+yuDpKjHneGzxvbXVaTZGZEom4Edw0J2g0dkDt5hj2tejaafhCN4Pb+MOeWhX/1wvcizRO6mySlgEnj2aZLyB6XQ3Z9DHwj30vAT0cowPORSqCIQ5GVwPD6vfE9TISbLn0e82+sbIxR2GZBrR4fOG8/XToi3rQEVlZvPV5jkRC85bqmzBw5n4+Vl+VWPsn5UiBifpTU5Y5jAFYsWlqgaqqwwZpLS83bnZen8MAUhqC6C5dFi6/bPul7x/k= x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?iso-8859-2?Q?V7u+mZd39sWypusvdrgr0LEXTD7SZtzbSAewcD86HIDKHrlaj/umOHy0/S?= =?iso-8859-2?Q?ZTpA0C1DAd5zYvDnqJRmKylFsdIldrUQ9osiOM6fLhdTwofqb/sWFS0He1?= =?iso-8859-2?Q?VNtiuSpIA6MdQpVD7/RP7eVWKsKC6xOHb5VyWqfHnOydWSKon7DL41eWvq?= =?iso-8859-2?Q?fZdSGJSI0cQh14ZNcupCNH09cZ8CtKaaX3ZWd87NFyAq5756Ton1gtGErw?= =?iso-8859-2?Q?WRQ67Yog4sUuTWpDaXjUsWWQUQ0uoWA5KvK0LIHMED3TdpbvwWKlJKDava?= =?iso-8859-2?Q?ZkRxinuwmwPxeo4Ansba+we3+QgjnbBSI67RB6/Vk2crg2YpeV6U4b/LTn?= =?iso-8859-2?Q?fEiEO8rbuLKrzY+zx3aMqAqSMw7dV/dtZ2gpraUzMM793JrNdea5y9U0fR?= =?iso-8859-2?Q?151GLXMB91vBfnjH6tJc/nGV6c+lJPZ2zKNnaqkuMpAsMiuRqOHqZqOZsd?= =?iso-8859-2?Q?nN45vcuhX30WRct6OfqhNIpfaHMDnPjsChy3nClIzgkAlRk76L2aSOz1Lf?= =?iso-8859-2?Q?wh2GR1lkx5AG681srHLEq/8IkQJ2T5qxwIojfSHaj1EcSyFhFWNFrOS26U?= =?iso-8859-2?Q?8gCl6ORTaulW727VYfaQqlNnVxjLf3Rxq6jz/+tZK2fZomg+E8B9fyUSik?= =?iso-8859-2?Q?9WVRvtbbANNWyOXHOCRCpvfgcBnIvwpVe42ZRhJ3bCLz0E+7iDvAMXms1p?= =?iso-8859-2?Q?HptpjyHV+M19TVWqj4CMecrMZedsL1Kl7XpEKb4YISmhXQSf61MAHDPNik?= =?iso-8859-2?Q?iifuQ7chyQnM/8fd13jeuNadEfFcS2ICSe79yw3rXRu795XSUxg2K24kMx?= =?iso-8859-2?Q?qmzIofQQ/MXlrB6uu1YEx2Ke+mH4ejHlPausbRCDITiTHWoz7qH+SHWmqI?= =?iso-8859-2?Q?2sKG94juQgHCNeMiiT1upf5VlpsLEdQ7RdUq9j7zZ9LF3JF8eS0m+3atbw?= =?iso-8859-2?Q?ID64ToIejgfzpl0aCSOZxbwojedFn+zy2NKmp4pwvA8JF1u5Js+6WYv+Gb?= =?iso-8859-2?Q?hKnNrv/lA0mbxDjdBWU3sZJo1uwuSmTJC4YLUhwlxolrp5S2SfoUTYvEBX?= =?iso-8859-2?Q?jz0hicllkwJeSxudGBEZrqM4pVeFPWTUdbB6jBrpp+JRzAQJvJDJ/ZbZ4K?= =?iso-8859-2?Q?xB99IdeX8EB8nbFjnP+WjmyiV0RL+mP1uYNmf8cqJDOtudyw5MnCURogQ6?= =?iso-8859-2?Q?+S/WA4Mp0W5vUZSgGfXaJ0nCc1Q3sDrsG7COzD10JB14x8ASiAFMHOYcMD?= =?iso-8859-2?Q?Rxn9NgllVXZrbt1sRXUPqP9s/WSUXnlp9ZIInozPtt96xpi5ekMgfoH/mT?= =?iso-8859-2?Q?DZYFTXobBE37KozboXvy9m2f33XW0o/SJuKcSexXE2ShdYE=3D?= Content-Type: multipart/alternative; boundary="_000_DM6PR05MB469716E7254E69D095BAF8E1D60FADM6PR05MB4697namp_" MIME-Version: 1.0 X-OriginatorOrg: sct-15-20-4823-7-msonline-outlook-84f76.templateTenant X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: DM6PR05MB4697.namprd05.prod.outlook.com X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-CrossTenant-Network-Message-Id: fc62f7ff-11c1-4e0b-5a41-08db96bcae38 X-MS-Exchange-CrossTenant-originalarrivaltime: 06 Aug 2023 20:35:32.3487 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-rms-persistedconsumerorg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DS0PR05MB10015 X-Spam-Status: No, score=-2.5 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,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: --_000_DM6PR05MB469716E7254E69D095BAF8E1D60FADM6PR05MB4697namp_ Content-Type: text/plain; charset="iso-8859-2" Content-Transfer-Encoding: quoted-printable x86_64-ubuntu-linux-gnu-g++ -v Using built-in specs. COLLECT_GCC=3Dx86_64-ubuntu-linux-gnu-g++ COLLECT_LTO_WRAPPER=3D/home/cqwrteur/toolchains/x86_64-pc-linux-gnu/x86_64-= ubuntu-linux-gnu/libexec/gcc/x86_64-ubuntu-linux-gnu/14.0.0/lto-wrapper Target: x86_64-ubuntu-linux-gnu Configured with: /home/cqwrteur/toolchains_build/gcc/configure --with-gxx-l= ibcxx-include-dir=3D/home/cqwrteur/toolchains/x86_64-pc-linux-gnu/x86_64-ub= untu-linux-gnu/x86_64-ubuntu-linux-gnu/include/c++/v1 --prefix=3D/home/cqwr= teur/toolchains/x86_64-pc-linux-gnu/x86_64-ubuntu-linux-gnu --build=3Dx86_6= 4-pc-linux-gnu --host=3Dx86_64-pc-linux-gnu --target=3Dx86_64-ubuntu-linux-= gnu --disable-nls --disable-werror --enable-languages=3Dc,c++ --enable-mult= ilib --with-multilib-list=3Dm32,m64,mx32 --disable-bootstrap --disable-libs= tdcxx-verbose --with-libstdcxx-eh-pool-obj-count=3D0 --disable-sjlj-excepti= ons --enable-libstdcxx-threads --enable-libstdcxx-backtrace Thread model: posix Supported LTO compression algorithms: zlib zstd gcc version 14.0.0 20230802 (experimental) (GCC) Sent from Mail for Windows From: Kai Ruottu Sent: Friday, August 4, 2023 15:43 To: Arsen Arsenovi=E6; unlvsur unlvsur Cc: gcc-help@gcc.gnu.org Subject: Re: How to set sysroot for cross compiling? Arsen Arsenovi=E6 via Gcc-help kirjoitti 3.8.2023 klo 13.06: > unlvsur unlvsur writes: > >> i do set with multilib list, the problem is that gcc gets very messed up= when >> trying to find where the libs located at build. >> >> like only trying to find lib64 in $targettriple/$targettriple/lib, lib32= in >> $targettriple/$targettriple/lib/32, libx32 in >> $targettriple/$targettriple/lib/x32 >> >> It won't find anywhere else for libc > Please post more information. This could, perhaps, be binutils > misconfiguration. Sounds sane if one forgot to use the '--with-sysroot=3D' when configuring the GNU binutils for the target system. Here seemingly 'x86_64-linux-androideabi' when mentioning these three multilib directories. > It'd be good to see your configuration, gcc -v output, your filesystem > layout, etc. I checked if I ever had tried building any '*-linux-androideabi' targeted crosstoolchains. This happened last in 2015 for the 'arm-linux-androideabi' and with the latest gcc-4.7, gcc-4.8 and gcc-4.9 sources being available then. The Android release being "10c" or something from where the target C libraries were used. All builds succeeded as expected. Maybe I could check now the 'x86_64-linux-androideabi' target with the "Android release 21" or somehow for which I seem to have the 'lib32', 'libx32' and 'lib64' subdir stuff for the '/usr' native install place. Maybe there are newer "NDK"s for Android nowadays. Telling for which Android release one aims to build the toolchain is recommended so someone could use the same target stuff. Wondering where on earth the '$targettriple/$targettriple/lib' was adopted for this job. The target libraries should be in the "native mirror" places, '$sysroot/usr/lib*' and the target headers in the '$sysroot/usr/include', not in the '$prefix/$targettriple/lib*' and '$prefix/$targettriple/include' which is the default if one doesn't use the '--with-sysroot=3D'. How the '$targettriple' became doubled in the install place? --_000_DM6PR05MB469716E7254E69D095BAF8E1D60FADM6PR05MB4697namp_--