From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM12-DM6-obe.outbound.protection.outlook.com (mail-dm6nam12on2123.outbound.protection.outlook.com [40.107.243.123]) by sourceware.org (Postfix) with ESMTPS id EDF453857B8C for ; Fri, 17 Jun 2022 05:33:49 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org EDF453857B8C ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=E1InZ/pUBY4S8X32t9aa1sZOD3SU90jev6Cfg4xJq26rEkQhu5dOdgd60JSSLUUcYB8RS6S6p+bQ2TYUUnm5sPWSqAl7pSD0nOjcpLQvXkGq5Jm783RvmBQsITat2rhfgjeTzhGRlZj4ijCWopBBJFQWU5zmHApf+MC+/IfcAoa3T10GcqMvqTnbTE+0ym4+D4lo7pOnSc2fKkJxmFfu14gz44bgX7SeoyVarHRN+RnbMdG7eO5QS8BEueCGvYgD/2uZCy6cWwIL5EEH+a7NaXJ7H3FO8+QJKMdYx6WT7koSO0VHyTQLSvWKr7UwsnBqjeJMIw5B7GbEEA7IDZc8NA== 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=z59HV+g/Rg5BNTkj9rBDfVCjQyrGPXNywstgg4dzkxE=; b=L1pc6Q5JrNSpb+fNJNEAlO30xP9GrJg5Soyqzw+CsW1xwQWdoK82nymsSihSm0p53JDBcKYMT6EXBXnDRRrpY3bGtrLmcreUP80XQrH0E9mAYpHyV22m++m0UheCc+8zJGq0YS7EvUJjk6Lgf9PBsF2QqOuObXy927O+Mi+1HAlaHwrZqd7ysl8M1ktNnG99iwXXtO3/NPr3y0rSzPOpG3STGTnXgy84jehADkhSZrKkaii1N8KWdkPRHziG/NU6Kl+2gU4hs419AL4v71LrImPUIoJYIQaxUBlFc7Fi3sdTqFBODYYjDcdwrL2BN7XphlRNTzQHISutzNpdlSyq7w== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=amperecomputing.com; dmarc=pass action=none header.from=amperecomputing.com; dkim=pass header.d=amperecomputing.com; arc=none Received: from BYAPR01MB5464.prod.exchangelabs.com (2603:10b6:a03:129::28) by MW2PR0102MB3353.prod.exchangelabs.com (2603:10b6:302:5::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5332.15; Fri, 17 Jun 2022 05:33:45 +0000 Received: from BYAPR01MB5464.prod.exchangelabs.com ([fe80::9481:e220:fdbb:af7b]) by BYAPR01MB5464.prod.exchangelabs.com ([fe80::9481:e220:fdbb:af7b%7]) with mapi id 15.20.5353.014; Fri, 17 Jun 2022 05:33:45 +0000 From: Gary Oblock To: Gary Oblock via Gcc-help Subject: Re: A ARM target question Thread-Topic: A ARM target question Thread-Index: AQHYf6sIEjzuSSqSXEOz8QZYBXfvNK1QvDwAgAClaSWAAEkbgIABaLAb Date: Fri, 17 Jun 2022 05:33:45 +0000 Message-ID: References: In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: msip_labels: MSIP_Label_5b82cb1d-c2e0-4643-920a-bbe7b2d7cc47_Enabled=True; MSIP_Label_5b82cb1d-c2e0-4643-920a-bbe7b2d7cc47_SiteId=3bc2b170-fd94-476d-b0ce-4229bdc904a7; MSIP_Label_5b82cb1d-c2e0-4643-920a-bbe7b2d7cc47_SetDate=2022-06-17T05:33:44.843Z; MSIP_Label_5b82cb1d-c2e0-4643-920a-bbe7b2d7cc47_Name=Confidential; MSIP_Label_5b82cb1d-c2e0-4643-920a-bbe7b2d7cc47_ContentBits=0; MSIP_Label_5b82cb1d-c2e0-4643-920a-bbe7b2d7cc47_Method=Standard; suggested_attachment_session_id: dd700150-6b58-8dea-47d3-a3f9645de0b1 x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: b91de521-e283-4eb2-28e0-08da5022f275 x-ms-traffictypediagnostic: MW2PR0102MB3353:EE_ x-microsoft-antispam-prvs: x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: Ji23XCmCGeBoFzGhYR82SIWeuYmEHwPWJ0fagCexT1dcH2fDjp0am4OZyegEoGJFPHRs5sLS3AY+xucXASTznJx6uoSG33Qh1scpmClRUq932yInJFjSmXWIY9s6cVBN+6UtEcfcLOOxa2i6ZJO06QGhV4w3MJd2U3zLI0h2sR2NiArWfRNT1dU20AYGY0veR0/WeLZ5UbNIh+MP1N819zPjwUVvTtOhIr70cthjn/B3ulRts9GsqXjNPlLYIFZAdAXuOnvYDoDMNfxnxT7ukLevuoUwdbsmw2ypQduUxfdI+p1Dp6YzV7e/8/FrqzjW799OXLlx8cQtub2XAVpVHayDKSErbEuDkvFg5ESQjv/qFfqdHAxl4TXHjTCxgcI5dsvtZ3omZRvRVWzY79ouWLeCj3IlLCn9h/VuW64F/zd/CXk8o6PRGVGQbn5HNQd26xVxrsu+skqJLe1X7aptDtZmKjuwaZmrma2nTGRhIIW3xR7U7wyCUaiB3NwaCx4KlIS6PPsEqWNSKsy4/UExUu0D1jnIy45GFrRYcpH3ipzncWAQ85JHplSABGX3++2COW+y0GM+8ZdgVppOdB9Iv0gqWp+xMyRjYTYNwfTkT4PIGZOvvP/D3qE5yhj4p9yhgB28gShoLNe4aT2Hd+epHAKoTpf4lhZRm3fDtGcjIMQRlSRG4Lq5u49PQmMEe3j1MKP0lVZ3fkBCo8mS6PbbFg== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BYAPR01MB5464.prod.exchangelabs.com; PTR:; CAT:NONE; SFS:(13230016)(4636009)(366004)(7696005)(33656002)(6916009)(64756008)(8936002)(316002)(66556008)(26005)(6506007)(53546011)(8676002)(66946007)(76116006)(38100700002)(86362001)(9686003)(66446008)(83380400001)(3480700007)(71200400001)(498600001)(66476007)(38070700005)(122000001)(19627405001)(52536014)(5660300002)(2906002)(55016003)(186003); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?Windows-1252?Q?ohTn/mTuH0C8LjN8x6JfVUcDndLTgo2PR7t3o/+/ZI6ElZVqXNrlCoA+?= =?Windows-1252?Q?+G+BivBJLXGobabaC5GIPEf7/pyQCG+AjyTJTZI9In4Sb8ZB1KNHdAax?= =?Windows-1252?Q?HlDZnRDlTN4BRRgxd7j6KpZMzuZDpjvfA8dYVp3+9jJmaN3UZEJTVD6+?= =?Windows-1252?Q?+RgwilPo0SO+qYhU+SBDYkcSHhOSGFjSpWo+KXKMjEXsp7GGlrJcEnNL?= =?Windows-1252?Q?LHg7BSjmqIGkGzyAAtzxsAuoSct1cSEno2ybc425Jvp1UI3nGakS/f32?= =?Windows-1252?Q?3KJoMuGxcDpWrFcQbbtd880pLCfEh0y5ep49aGl4hroA70iHf0e9bSxO?= =?Windows-1252?Q?6RMk5t9SeNZPLfbFYaT0631XYB2Ur3U7RELBqo3k57DMnAFb6k8qtHEJ?= =?Windows-1252?Q?jwF4K+cWoeMiA0E0d/yl2jLAEpIUtco7R05surGGhyVYaItP6RsjXm87?= =?Windows-1252?Q?2hyxUfSiGmDeml0asXJJAn4ZNJm1LHSFHDe4uzKOCxp3l8ko0p3G1eWU?= =?Windows-1252?Q?AjYOLkFdmnPSPPVdr6n86Z/KhoxlSZWTA7Y05cUuKRWM3oyGfD8d99Bs?= =?Windows-1252?Q?B52G9PN1uzYYLCj6srVoSeFM+ZbJ9myZsFechSu2bBXTeriogXV9fKrK?= =?Windows-1252?Q?YUllHo0Ol2U/xvdnfUvxYR07hKI+Wp3VqT2ViNZDhzcXBshKq+XaI1oc?= =?Windows-1252?Q?AMLKcpY/AFo2yj+lQevlbwtbiJKbxKAlhfbihueBSw9pQTPy0Bsn8liC?= =?Windows-1252?Q?XdVsnwRJSqLbLXfQ9B1YFMetMJRWztOh46mFJvIb/+zlTjJHAPkjkjdF?= =?Windows-1252?Q?CkKJydlO2v0KUZr3WFNrrNEPqBmabYe5aiG90VV/WV2UY7Z1MRovpeHK?= =?Windows-1252?Q?eh/YAlcZIDYhBhtvev0Gca1GW7Dw6S1Gk5jUqY6VgcVYwxOkAgLpm55w?= =?Windows-1252?Q?7SyE6QSHvg0j8KJMyKtb9tXDNaciQuAso3tK8tL/ipmz/H1vBH7cfyhG?= =?Windows-1252?Q?n2H6qwak0LZ7W9x2d3h4usxtEj7iWA+mpvszOSvfDuczDkNDuIAuazt4?= =?Windows-1252?Q?d19sFWsOIg0xdykb+vt4aqC9FBjcuMOfvDz+NngEy4NZ1pG5GWqLbjkm?= =?Windows-1252?Q?DWqlDDGyIBOSMs0q2MZtR0GERyEBYZa02v9ygK89tdO+baAo9MORXNYs?= =?Windows-1252?Q?89cE6tbmWEcE8fwhBUuCoz172ucHpgRoITaqbL6HjjQxBlUBCQC/+qaJ?= =?Windows-1252?Q?Qu8E1x9Pf7CqKxr++lPI0+HBBAyGqVPCxPXMlsDA2Wb3WSFzfEmMIZoz?= =?Windows-1252?Q?TsQ7ikC5vFCKFnWj3MU5Pg8/awZw3GladfhKstpYcmPz60osu/+TgqYt?= =?Windows-1252?Q?DekNUZc/B/Eh63hhDIlwKv800/7N3bMV2/UYOZaWpWf5dhxWs2w4aMDR?= =?Windows-1252?Q?Oed8hFot7D+cOltN1JzjyBy/g39XJCWYghnmp5rxMsVUgovo5d51iS1/?= =?Windows-1252?Q?w9Tt/Q1O3NBWd3muAxnAiCj4Rwg2kvo3JpUfJKiV61CF+hwQfxGaR5oj?= =?Windows-1252?Q?6KY7l312VLWg2SJpCMtXJqxgpWMi6aVZO+9nzG518bdEUYvg5eyE/5uG?= =?Windows-1252?Q?iMNI0I9xkBBeuOyKimB7k7NDc4fChRHseltXz3DS0eV4d8TAXiijxd/4?= =?Windows-1252?Q?knxkT9cQzTOc9HrSlwvR+CkXtcoh0it/JGrA8/6dpzceI26EIzpLKe93?= =?Windows-1252?Q?T8r8jbq39UTuw01QePtZsNBM5hNTS46cC7MhgXUcQ9cP2LzalZNsTFhi?= =?Windows-1252?Q?4pEN2NBzt0jivbwhD1dmckcattdsV2AGpa6y4leqN5bIvaNY2cgcdVxx?= =?Windows-1252?Q?hwkWKXtw/gD8zg=3D=3D?= MIME-Version: 1.0 X-OriginatorOrg: amperecomputing.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: BYAPR01MB5464.prod.exchangelabs.com X-MS-Exchange-CrossTenant-Network-Message-Id: b91de521-e283-4eb2-28e0-08da5022f275 X-MS-Exchange-CrossTenant-originalarrivaltime: 17 Jun 2022 05:33:45.2908 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 3bc2b170-fd94-476d-b0ce-4229bdc904a7 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: d9Bs1XrmtJoQFZbTVu9mrcORgvnc4aBezimvDPAko0QVt/BcGfjIGEMK6GKB8HPqetQB+1B3BjF0fJCruTLJue4Nu8tuvm6OP2bVi4Mh9iw= X-MS-Exchange-Transport-CrossTenantHeadersStamped: MW2PR0102MB3353 X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, HTML_MESSAGE, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_PASS, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org Content-Type: text/plain; charset="Windows-1252" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.29 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: Fri, 17 Jun 2022 05:33:52 -0000 Stefan, I'm not at all clear which of those many config parameters are meaningfull. I borrowed your --target and tried to build with this: ../sources/configure --prefix=3D$BASE/install --disable-bootstrap --enable-= language=3Dc --disable-multilib --target=3Darm-linux-gnueabihf That failed like this: echo | /home/gary/gcc_build_cross/objdir/./gcc/xgcc -B/home/gary/gcc_build_= cross/objdir/./gcc/ -E -dM - | \ sed -n -e 's/^#define \([^_][a-zA-Z0-9_]*\).*/\1/p' \ -e 's/^#define \(_[^_A-Z][a-zA-Z0-9_]*\).*/\1/p' | \ sort -u > tmp-macro_list cc1: error: no include path in which to search for stdc-predef.h There was another error after this: checking for arm-linux-gnueabihf-gcc... /home/gary/gcc_build_cross/objdir/.= /gcc/xgcc -B/home/gary/gcc_build_cross/objdir/./gcc/ -B/home/gary/gcc_build= _cross/install/arm-linux-gnueabihf/bin/ -B/home/gary/gcc_build_cross/instal= l/arm-linux-gnueabihf/lib/ -isystem /home/gary/gcc_build_cross/install/arm-= linux-gnueabihf/include -isystem /home/gary/gcc_build_cross/install/arm-lin= ux-gnueabihf/sys-include checking for suffix of object files... configure: error: in `/home/gary/gcc= _build_cross/objdir/arm-linux-gnueabihf/libgcc': configure: error: cannot compute suffix of object files: cannot compile See `config.log' for more details make[1]: *** [Makefile:15371: configure-target-libgcc] Error 1 Any idea what went wrong? Note I looked at the config.log and there were lo= ts of errors there too (not that they were helpful to me.) Many years ago I set up a simple GCC cross compiler for mips as the starting point for the person creating a new target for a new chip. It didn't seems so crazy hard as this is proving to be. Thanks, Gary ________________________________ From: Stefan Ring Sent: Thursday, June 16, 2022 12:45 AM To: Gary Oblock Subject: Re: A ARM target question [EXTERNAL EMAIL NOTICE: This email originated from an external sender. Plea= se be mindful of safe email handling and proprietary information protection= practices.] On Thu, Jun 16, 2022 at 5:36 AM Gary Oblock wrot= e: > > Stefan, > > Frankly, I don't know. But, honestly, I don't think it matters if it's 64= machine running > in Thumb-2 mode for if it's 32-bit machine. I'm trying to pry this out of= my FW group > but like I said I'm pretty sure that it doesn't matter. What does matter = is it has to > use the GCC 12 code base because of the things GCC 12 is capable of doing= . > This is a big experiment to see what if and not a production quality effo= rt. > > I'm not sure GCC 12 or the latest binutils support Thumb-2. Do you know i= f they do? > If they do what would I used for "--target=3D*-*-*" ? It would be preferable to respond to the mailing list. I just checked in an Ubuntu impish chroot. It=92s gcc 11.2, but I=92m certain it will still work with gcc 12. For arm it=92s usually a good idea to follow what Ubuntu does. (impish32)sr@odroid:~$ cat h.c #include int main() { printf("Hello thumb!\n"); return 0; } (impish32)sr@odroid:~$ gcc -c -O2 h.c (impish32)sr@odroid:~$ objdump -d h.o h.o: file format elf32-littlearm Disassembly of section .text.startup: 00000000
: 0: 4803 ldr r0, [pc, #12] ; (10 ) 2: b508 push {r3, lr} 4: 4478 add r0, pc 6: f7ff fffe bl 0 a: 2000 movs r0, #0 c: bd08 pop {r3, pc} e: bf00 nop 10: 00000008 .word 0x00000008 Sure looks like Thumb 2 to me. AFAIK you don=92t need to do anything to enable Thumb support, but if it=92s not the default by configuring with --with-mode=3Dthumb, you can always enable it with -mthumb. (impish32)sr@odroid:~$ gcc h.o (impish32)sr@odroid:~$ ./a.out Hello thumb! (impish32)sr@odroid:~$ gcc -v Using built-in specs. COLLECT_GCC=3Dgcc COLLECT_LTO_WRAPPER=3D/usr/lib/gcc/arm-linux-gnueabihf/11/lto-wrapper Target: arm-linux-gnueabihf Configured with: ../src/configure -v --with-pkgversion=3D'Ubuntu 11.2.0-7ubuntu2' --with-bugurl=3Dfile:///usr/share/doc/gcc-11/README.Bugs --enable-languages=3Dc,ada,c++,go,d,fortran,objc,obj-c++,m2 --prefix=3D/usr --with-gcc-major-version-only --program-suffix=3D-11 --program-prefix=3Darm-linux-gnueabihf- --enable-shared --enable-linker-build-id --libexecdir=3D/usr/lib --without-included-gettext --enable-threads=3Dposix --libdir=3D/usr/lib --enable-nls --enable-bootstrap --enable-clocale=3Dgnu --enable-libstdcxx-debug --enable-libstdcxx-time=3Dyes --with-default-libstdcxx-abi=3Dnew --enable-gnu-unique-object --disable-libitm --disable-libquadmath --disable-libquadmath-support --enable-plugin --enable-default-pie --with-system-zlib --enable-libphobos-checking=3Drelease --with-target-system-zlib=3Dauto --enable-objc-gc=3Dauto --enable-multiarch --disable-sjlj-exceptions --with-arch=3Darmv7-a+fp --with-float=3Dhard --with-mode=3Dthumb --disable-werror --enable-checking=3Drelease --build=3Darm-linux-gnueabihf --host=3Darm-linux-gnueabihf --target=3Darm-linux-gnueabihf Thread model: posix Supported LTO compression algorithms: zlib zstd gcc version 11.2.0 (Ubuntu 11.2.0-7ubuntu2)