From nobody Mon Nov 20 15:27:14 2023 X-Original-To: freebsd-arm@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SYrwl5088z51Rfx for ; Mon, 20 Nov 2023 15:27:35 +0000 (UTC) (envelope-from jfc@mit.edu) Received: from outgoing-exchange-3.mit.edu (outgoing-exchange-3.mit.edu [18.9.28.13]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "*.outgoing-exchange.mit.edu", Issuer "InCommon RSA Server CA 2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4SYrwk5WJ2z4PYQ for ; Mon, 20 Nov 2023 15:27:34 +0000 (UTC) (envelope-from jfc@mit.edu) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=mit.edu header.s=outgoing header.b="iPvFXgH/"; spf=pass (mx1.freebsd.org: domain of jfc@mit.edu designates 18.9.28.13 as permitted sender) smtp.mailfrom=jfc@mit.edu; dmarc=pass (policy=none) header.from=mit.edu Received: from w92exedge3.exchange.mit.edu (W92EXEDGE3.EXCHANGE.MIT.EDU [18.7.73.15]) by outgoing-exchange-3.mit.edu (8.14.7/8.12.4) with ESMTP id 3AKFR5Bq031924 for ; Mon, 20 Nov 2023 10:27:32 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mit.edu; s=outgoing; t=1700494052; bh=NRFBZi3brR+1r7YDRxFJwEr1oOystHS6aq7Jz33FAbg=; h=From:Subject:Date:Message-ID:Content-Type:MIME-Version; b=iPvFXgH/B3wduv6wpAKQhDLBn/J6t9RN7kPyVIQR6jWoS+RXVK5fSp0tGC8RhqbC/ 9bjCoK6Aw7d2cOjDoEwJLOzIQ2x0sUKmytcNcxDHTiCy5cRfLsGQ9bI/CtoaML4Egg 2zBcsdtU2ksZruJrgLf7k5UvT9xq1IHKavz5W0/zsCinWsXSbF7gAd9Dy/2Rnads6Q jG/XpgTemPr/cD1YJucrhY380SRRd9cH6VF/e7OACBs4veN9PE+mOdie4H5vDRPEkt tcwDgC0PgrG1KtzfAZlXRwGgFyLZQR6Dgqa2z22QSS4KOuTXPYJqZWZUCx5RUT+2C/ wK06k9VLiH6Uw== Received: from w92exhyb3.exchange.mit.edu (18.7.71.73) by w92exedge3.exchange.mit.edu (18.7.73.15) with Microsoft SMTP Server (TLS) id 15.0.1497.48; Mon, 20 Nov 2023 10:26:51 -0500 Received: from oc11exhyb7.exchange.mit.edu (18.9.1.112) by w92exhyb3.exchange.mit.edu (18.7.71.73) with Microsoft SMTP Server (TLS) id 15.0.1497.48; Mon, 20 Nov 2023 10:27:17 -0500 Received: from NAM11-CO1-obe.outbound.protection.outlook.com (104.47.56.169) by oc11exhyb7.exchange.mit.edu (18.9.1.112) with Microsoft SMTP Server (TLS) id 15.0.1497.48 via Frontend Transport; Mon, 20 Nov 2023 10:27:16 -0500 Received: from SA3PR01MB8450.prod.exchangelabs.com (2603:10b6:806:382::17) by BY3PR01MB6770.prod.exchangelabs.com (2603:10b6:a03:360::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7002.28; Mon, 20 Nov 2023 15:27:14 +0000 Received: from SA3PR01MB8450.prod.exchangelabs.com ([fe80::79a2:b3b5:bcdf:bdf0]) by SA3PR01MB8450.prod.exchangelabs.com ([fe80::79a2:b3b5:bcdf:bdf0%7]) with mapi id 15.20.7002.026; Mon, 20 Nov 2023 15:27:14 +0000 From: "John F Carr" To: FreeBSD ARM List Subject: Re: Setting CPUFLAGS breaks aarch64 13.2 -> 14.0 cross compile due to invalid -mcpu= Thread-Topic: Setting CPUFLAGS breaks aarch64 13.2 -> 14.0 cross compile due to invalid -mcpu= Thread-Index: AQHaGxqM72Tzgo01YkO/V3ykGJU+5bCDVdIA Date: Mon, 20 Nov 2023 15:27:14 +0000 Message-ID: References: In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-publictraffictype: Email x-ms-traffictypediagnostic: SA3PR01MB8450:EE_|BY3PR01MB6770:EE_ x-ms-office365-filtering-correlation-id: a5372e6d-7595-4ea0-ac3b-08dbe9dd2c96 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: wpe2URdLR2Qn19F1auMgFjvhmHp2Nd7rJuBmBSgg5up6R5PNHz/dsXpXKOgrwoPXp2LUNiedlZ8l0pmTj2HaIlImmqzmcTs9X6AJ0Fyj5hs9XBZOmT3krd/nPibXaTILhr5gT+V4GoywhAo6kTLVFeXAnPMS6UrFGJpA21Ex2G0GBwyOrrCGIt/9x5Dj9DHCnQm9985zjQBZo0yhftJ9zYRrzMT2V4+/CbeOR6WeiVqzdg5cyuKyle/SIHgQBfmlFqTchTgxkJF29y3QrydwhwEXILtMYN0tFF+2OOIdb/dknz/u35+7X/nSBPBO9R1R04Jg8GUA9HgMGYSrpfssxgmHv+gP3iN+bjKmddtcNMqcUr2PKj22CqoNKA7Enr5wsJFOSx50c1xIzQw1EkEoTJqHgNaztzIt6HHg+/NYC7amNeTtVnK4XnuR3i19xYrPKtM2wdsAUyN71szNfLObtVu2At2KVMTMwg+G7lOTlItSHaZzZSI3FwRLqbkQhLsPCDpIbw+0XnfupkGL2df98CO4CDLVdeZab4asDGOS+N1ppobSI3dqXBxh/JauODsbY9HwJNBkUgTQOCYVF3ydkDvNVmQjj5LPKlkIBOcpYiUpsBDLisdfzoU+MTsnnpNe x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:SA3PR01MB8450.prod.exchangelabs.com;PTR:;CAT:NONE;SFS:(13230031)(136003)(39860400002)(376002)(346002)(396003)(366004)(230922051799003)(451199024)(64100799003)(1800799012)(186009)(75432002)(76116006)(66476007)(66556008)(66446008)(66946007)(91956017)(786003)(6916009)(64756008)(316002)(53546011)(6512007)(36756003)(71200400001)(6506007)(2616005)(478600001)(6486002)(38070700009)(38100700002)(122000001)(83380400001)(33656002)(86362001)(5660300002)(2906002)(41300700001)(8676002)(8936002);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?vALl9qEKEWkeXBaELFRcEQLuJzzRbsRo+anFMaT0qA/7Nyhj3v6T4ahkJat2?= =?us-ascii?Q?js4hEyPQG3Dcn2es8TocZuwE98xWoHzA+KwPSo/VYtFecd0PE63S+I+nzs+7?= =?us-ascii?Q?uhbjll/sUgwzkwwWNZjAoXgYSVWVFpBJ5EJh26ypvfHR1NXFF1WvwfFIbAOA?= =?us-ascii?Q?vs5cS/founn7qZgkTmIRxK1lpun+jaPQMNZEPR/f4M03IApe7w7iSz5I3sFN?= =?us-ascii?Q?GlPKKoLqPOo0ZIxpUc3kEjVeXyTKu4iPgKgqCeYM+kqcMRQbUdeQkGZKIw2p?= =?us-ascii?Q?LDUE6m3bLVIX6ck2Zi8qCEHhlxVYOq2gTmXAqpBbnR2sQmvbq2++JPuA/Y/z?= =?us-ascii?Q?9bT89ARmqPKeaf5zdAJIG1HMit+9csF8auYoJpjnbvzgE5147F5sAB57HRQA?= =?us-ascii?Q?WDalLWQ4AX87urkdjbk0yP8E5GdrmP3wF6m2qgRLap7j5la1k2lNndwNynFA?= =?us-ascii?Q?2w9xBhTi6fY+nNi/GFv5Ib6kgO3ILUNqc0RLZJ2/QsjkycU788h7HBAevVY1?= =?us-ascii?Q?DqD4+vnjl9IM0k4CECIAzX1285CL1MsTKi2paqZLiS3GuJXBm2CwHgOVKh3G?= =?us-ascii?Q?HmX5gslfWkEOKBzI8hmRUN4MD+8JZYmAsBvckLnl3PV9UflOYcX0HH5vF+yA?= =?us-ascii?Q?FWF0TAgfH20DC8Gaa1+jHNWnVK8HR1WC/2b6nMCmPuoEMAbWCxowN43zOhac?= =?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FeMoTiDLqd25CXuD9yzbIdO0uO?= =?us-ascii?Q?wwynolU/4Nz54w/YAYN8BP4GI83JNxx8kH9Qq1keHv/d?= Content-Type: text/plain; charset="us-ascii" Content-ID: <4C5ED5F0CF3D58418FC627E405D0E355@prod.exchangelabs.com> Content-Transfer-Encoding: quoted-printable List-Id: Porting FreeBSD to ARM processors List-Archive: https://lists.freebsd.org/archives/freebsd-arm List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-arm@freebsd.org MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: SA3PR01MB8450.prod.exchangelabs.com X-MS-Exchange-CrossTenant-Network-Message-Id: a5372e6d-7595-4ea0-ac3b-08dbe9dd2c96 X-MS-Exchange-CrossTenant-originalarrivaltime: 20 Nov 2023 15:27:14.8115 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 64afd9ba-0ecf-4acf-bc36-935f6235ba8b X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: WeB7s3jBIioIQI4XP3PLKv8YaVK8tx+PyqoymUjjbGG4e8MzQACLDldMjKoK0LTf X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY3PR01MB6770 X-OriginatorOrg: mit.edu X-Spamd-Result: default: False [-5.90 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; DWL_DNSWL_LOW(-1.00)[mit.edu:dkim]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_SHORT(-1.00)[-1.000]; RCVD_DKIM_ARC_DNSWL_MED(-0.50)[]; DMARC_POLICY_ALLOW(-0.50)[mit.edu,none]; R_DKIM_ALLOW(-0.20)[mit.edu:s=outgoing]; R_SPF_ALLOW(-0.20)[+ip4:18.9.28.0/24]; RCVD_IN_DNSWL_LOW(-0.20)[18.9.1.112:received,18.7.73.15:received]; RCVD_IN_DNSWL_MED(-0.20)[18.9.28.13:from]; MIME_GOOD(-0.10)[text/plain]; RCVD_TLS_LAST(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; PREVIOUSLY_DELIVERED(0.00)[freebsd-arm@freebsd.org]; TO_DN_ALL(0.00)[]; RCPT_COUNT_ONE(0.00)[1]; MIME_TRACE(0.00)[0:+]; FROM_HAS_DN(0.00)[]; RCVD_COUNT_FIVE(0.00)[6]; MID_RHS_MATCH_FROM(0.00)[]; ASN(0.00)[asn:3, ipnet:18.9.0.0/16, country:US]; DKIM_TRACE(0.00)[mit.edu:+]; RCVD_IN_DNSWL_NONE(0.00)[104.47.56.169:received]; FROM_EQ_ENVFROM(0.00)[]; ARC_NA(0.00)[]; MLMMJ_DEST(0.00)[freebsd-arm@freebsd.org] X-Rspamd-Queue-Id: 4SYrwk5WJ2z4PYQ X-Spamd-Bar: ----- On Nov 19, 2023, at 13:59, John F Carr wrote: >=20 > I have been building 13.2 with the following line in /etc/make.conf: >=20 > CPUTYPE?=3Darmv8a+aes+crc+sha2 >=20 > This matches my processor (Ampere eMAG), which llvm does not > know by name. >=20 > Now I want to upgrade to 14.0. I can't build from source on 13.2. > Compiling 32 bit objects fails because $CPUTYPE is not valid > for armv7. Setting CPUTYPE_32?=3Darmv7 does not work either. > That generates an invalid compiler option -mcpu=3Darmv7. > Setting CPUTYPE=3Darmv7 needs to generate only -march=3Darmv7 > and not -mcpu=3Darmv7. The make infrastructure generates both. >=20 > Using an empty string for CPUTYPE_32 did not work either. >=20 > According to /usr/share/examples/etc/make.conf, I should be > able to use CPUTYPE=3Darmv7. >=20 > Is this supposed to work? Is there a /etc/make.conf variable that > sets -march=3D but not -mcpu=3D? >=20 The patch below fixes my problem and I have now upgraded to 14.0 without further difficulty. commit 9c92d91a3a617f262c9c6907038f34805e1b8ecd (marmota) Author: John F. Carr Date: Mon Nov 20 10:07:30 2023 -0500 Allow CPUFLAGS_32=3Darmv7 diff --git a/share/mk/bsd.compat.mk b/share/mk/bsd.compat.mk index 0c387bcb020c..85f6c6d5932d 100644 --- a/share/mk/bsd.compat.mk +++ b/share/mk/bsd.compat.mk @@ -65,7 +65,7 @@ LIB32WMAKEFLAGS=3D \ .elif ${COMPAT_ARCH} =3D=3D "aarch64" HAS_COMPAT+=3D 32 -.if empty(LIB32CPUTYPE) +.if empty(${LIB32CPUTYPE:Narmv7*}) LIB32CPUFLAGS=3D -march=3Darmv7 .else LIB32CPUFLAGS=3D -mcpu=3D${LIB32CPUTYPE}