From nobody Sun Nov 19 18:59:40 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 4SYKh50tJ8z51Bm3 for ; Sun, 19 Nov 2023 18:59:49 +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 4SYKh40xYjz4TwN for ; Sun, 19 Nov 2023 18:59:48 +0000 (UTC) (envelope-from jfc@mit.edu) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=mit.edu header.s=outgoing header.b=bcK+YHc0; 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 oc11exedge2.exchange.mit.edu (OC11EXEDGE2.EXCHANGE.MIT.EDU [18.9.3.18]) by outgoing-exchange-3.mit.edu (8.14.7/8.12.4) with ESMTP id 3AJIxi9S014702 for ; Sun, 19 Nov 2023 13:59:44 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mit.edu; s=outgoing; t=1700420385; bh=t/B1j2UkGVbCT7pPfNr564x824mGWHhEAtscre04eq0=; h=From:Subject:Date:Message-ID:Content-Type:MIME-Version; b=bcK+YHc0H38Nt2+jmNup1c/h9OpFMH4hEj6LzmCtqavWQLpU0CsfR8ANJsqEtWCsF N1jDoFbyDjeMNuCx5TxamDhh8f8L0kOTS3pXLp1fCSgjY3+naZRO8G9qMu9xEGrQ1A OaFwdSxbVTmw1Ddw8zvvNUZsH7bvMmaa4RR19J31ODigZM2ez8b41JXTAAHByJC0Bn VJ89al/1jIh0/o6u2JNZUwzUdryhD34ZZFoghe3bOb1/iOpCwEzwm21+xfJOWP5uEN ZAspZbFMtaBOjjJ8kGCXQg+/gg1lMeplccyQBlbn9zv3h8yQGiOz6rU/izYemngaUA /2jiKx7ut1R4A== Received: from oc11expo11.exchange.mit.edu (18.9.4.16) by oc11exedge2.exchange.mit.edu (18.9.3.18) with Microsoft SMTP Server (TLS) id 15.0.1497.48; Sun, 19 Nov 2023 13:59:38 -0500 Received: from oc11exhyb4.exchange.mit.edu (18.9.1.100) by oc11expo11.exchange.mit.edu (18.9.4.16) with Microsoft SMTP Server (TLS) id 15.0.1497.42; Sun, 19 Nov 2023 13:59:43 -0500 Received: from NAM12-BN8-obe.outbound.protection.outlook.com (104.47.55.168) by oc11exhyb4.exchange.mit.edu (18.9.1.100) with Microsoft SMTP Server (TLS) id 15.0.1497.48 via Frontend Transport; Sun, 19 Nov 2023 13:59:43 -0500 Received: from SA3PR01MB8450.prod.exchangelabs.com (2603:10b6:806:382::17) by DM8PR01MB7173.prod.exchangelabs.com (2603:10b6:8:f::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7002.26; Sun, 19 Nov 2023 18:59:42 +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; Sun, 19 Nov 2023 18:59:42 +0000 From: "John F Carr" To: FreeBSD ARM List Subject: 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: AQHaGxqMufXGvpaLwkO0BNa12fRLhg== Date: Sun, 19 Nov 2023 18:59:40 +0000 Message-ID: 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_|DM8PR01MB7173:EE_ x-ms-office365-filtering-correlation-id: 889dd5cb-237f-4eaa-c2ce-08dbe931af33 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: cNYiyt5IO/joVyDMlBPuljOpby9MFCM0BToSs96HAi8bXXmWBb92gW5NdZGcZI8HSeUSAg29BAKheF7H6W3E52Nj0smXL55Tv4PyXgsCuktxkrBBQ2PVGPswNxcyfMqbPmn55DPiZlfBDZMIA7+ObkZ+u5Ho2tbPP7c5HUDX+r22bCYJBkHc+ovMS6SoI2es7ylPW77U5Rt22LpsiHJ4lPpli4ghZkRdCOSW9iDATNFRvUYWmnlNDzDPK1k4kjQj6G2arRBQHp1yORKqE4PNQ8UfFUVMOMxlIgDmjZ50BAfk+/gNcMpipxoJP1J9MUx3Gb/acx8zaYtF0x/PST0ehiu0NGhYHYq9fwZ8BPeZgiPdSOWbxKWpMb9u3Aeg0jopkpTZk2k7on978mMINF6mP2F0HCCWlCySYfofydy14fzb4pTsXEdBm8V9VFG910j6+cy4zEX2IL6H8MLmnjFMtWeR2xnSiefD77vIzmwbyJrK4cvTR/ulBdBJPWDqBpThCnKYRvSX4gMdIKk4067Yj9+g/ASYyaL1L0HZZIvEXZjjJRuyBDS/iIukx9hI8n+2syBaHUn6gXtdoRviPRpWGj5pr2wO+9KCdWquMGGJPkI6zQoc6sBb6KPFlYiBzlq/ 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)(366004)(396003)(230922051799003)(1800799012)(451199024)(186009)(64100799003)(5660300002)(2906002)(8676002)(8936002)(41300700001)(66476007)(316002)(64756008)(786003)(6916009)(66946007)(91956017)(66556008)(66446008)(76116006)(75432002)(86362001)(38070700009)(478600001)(6486002)(71200400001)(36756003)(6512007)(6506007)(2616005)(122000001)(83380400001)(33656002)(38100700002);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?kQXEpv0vRLhLUS1++xB9SvCDIWKvOCTzowOatYo0Nhg9Q0wYflf74rlxTAZi?= =?us-ascii?Q?C4TSwNea14xmukT77aRwE6Yd5lnU8uYLSV4R7h5wT9Db/1CVQzDh3RJme6pD?= =?us-ascii?Q?KzWmoiN6tv7UPAXzUpn7c9X+SBLSnRqReXGFMFSIK9mDFRG9Q0Mwnv5PbcEl?= =?us-ascii?Q?TXJpGnuH+JlHCiXw4k2lSuosoB8BVvcotbPeTu5xiIraY4eEL01JNt62mW+I?= =?us-ascii?Q?yQ04E3L0sdGMpPdOld+4Tqz9GYF5L/pg6kOswz2uumSMkTeoUz6ebun63ABY?= =?us-ascii?Q?wtJ+PKFe6Km96ZfH2DYJzwYG7z4ktPuLY8uCBxy4bFNyLpSKTkhr+9Dx+x/0?= =?us-ascii?Q?8vIri61XvAaoMKCtPnmmwOta3updi2MgURSKMMKxJjI7Fk1yjeMOps8jlafZ?= =?us-ascii?Q?ag8IKchsvNuwTpiPsvHjTRmyVUjGVbtxiB9A0P5WdlOx7VxvmPvV8CVkcwlk?= =?us-ascii?Q?3goqq7UlVR1lCC7VXDxpvGIwhyDpOA6Ii8h2iyG9H2Jt0U8KIH1RKSb/AnNr?= =?us-ascii?Q?SOCvsaPoNkdels70WmYqFDFd8yd1JFNWhSsLdG9zQuK4t7iSjLo846COirq+?= =?us-ascii?Q?9vukSOL/MpoRCkgRExGncCdnwzzxDwmusHjTteYT8Sqg9JXl77uri07PF9Yk?= =?us-ascii?Q?FG8GsU+lc1nCKHEEqWBQTrlzUbxM/vgYMzm40wIC1LW+qcCKPzRndwr8olCW?= =?us-ascii?Q?HfUWqUSzEiyer6OKQ0xOQAIfAI+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a2g1+TtK1PITNMPsbTXQ4V97HfwAzVmz+KvT1MTmc/eg?= Content-Type: text/plain; charset="us-ascii" Content-ID: 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: 889dd5cb-237f-4eaa-c2ce-08dbe931af33 X-MS-Exchange-CrossTenant-originalarrivaltime: 19 Nov 2023 18:59:40.4660 (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: sW2R39NifNYJKRBsfgjuifP/lUY+RkqX9upai06TnU1m1zCYXFMiVuSvFdjT2taW X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM8PR01MB7173 X-OriginatorOrg: mit.edu X-Spamd-Result: default: False [-5.86 / 15.00]; DWL_DNSWL_LOW(-1.00)[mit.edu:dkim]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_SHORT(-0.96)[-0.957]; DMARC_POLICY_ALLOW(-0.50)[mit.edu,none]; RCVD_DKIM_ARC_DNSWL_MED(-0.50)[]; RCVD_IN_DNSWL_MED(-0.40)[18.9.28.13:from,18.9.3.18:received]; R_SPF_ALLOW(-0.20)[+ip4:18.9.28.0/24]; R_DKIM_ALLOW(-0.20)[mit.edu:s=outgoing]; MIME_GOOD(-0.10)[text/plain]; FROM_EQ_ENVFROM(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[104.47.55.168:received]; MLMMJ_DEST(0.00)[freebsd-arm@freebsd.org]; RCVD_TLS_LAST(0.00)[]; MIME_TRACE(0.00)[0:+]; DKIM_TRACE(0.00)[mit.edu:+]; ARC_NA(0.00)[]; ASN(0.00)[asn:3, ipnet:18.9.0.0/16, country:US]; FROM_HAS_DN(0.00)[]; RCVD_COUNT_FIVE(0.00)[6]; TO_DN_ALL(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; RCPT_COUNT_ONE(0.00)[1]; PREVIOUSLY_DELIVERED(0.00)[freebsd-arm@freebsd.org]; MID_RHS_MATCH_FROM(0.00)[] X-Rspamd-Queue-Id: 4SYKh40xYjz4TwN X-Spamd-Bar: ----- I have been building 13.2 with the following line in /etc/make.conf: CPUTYPE?=3Darmv8a+aes+crc+sha2 This matches my processor (Ampere eMAG), which llvm does not know by name. 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. Using an empty string for CPUTYPE_32 did not work either. According to /usr/share/examples/etc/make.conf, I should be able to use CPUTYPE=3Darmv7. Is this supposed to work? Is there a /etc/make.conf variable that sets -march=3D but not -mcpu=3D? # Meta data file /usr/obj/usr/src/arm64.aarch64/libexec/rtld-elf32/crtbrand= .o.meta CMD cc -target aarch64-unknown-freebsd14.0 --sysroot=3D/usr/obj/usr/src/arm= 64.aarch64/tmp -B/usr/obj/usr/src/arm64.aarch64/tmp/usr/bin -O2 -pipe -fno-= common -march=3Darmv8a+aes+crc+sha2 -mcpu=3Darmv8a+aes+crc+sha2 -m32 -targ= et armv7-unknown-freebsd14.0-gnueabihf -DCOMPAT_LIBCOMPAT=3D\"32\" -DCOMP= AT_libcompat=3D\"32\" -DCOMPAT_LIB32 --sysroot=3D/usr/obj/usr/src/arm64.a= arch64/tmp -B/usr/obj/usr/src/arm64.aarch64/tmp/usr/lib32 -Wall -DFREEBSD= _ELF -DIN_RTLD -ffreestanding -I/usr/src/lib/csu/common -I/usr/src/libexec/= rtld-elf/arm -I/usr/src/libexec/rtld-elf -fpic -DPIC -I/usr/src/libexec/rt= ld-elf/rtld-libc -mfpu=3Dnone -g -gz=3Dzlib -std=3Dgnu99 -Wno-format-zero-l= ength -Wsystem-headers -Werror -Wall -Wno-format-y2k -W -Wno-unused-paramet= er -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wreturn-type -= Wcast-qual -Wwrite-strings -Wswitch -Wshadow -Wunused-parameter -Wchar-subs= cripts -Wnested-externs -Wold-style-definition -Wno-pointer-sign -Wdate-tim= e -Wformat=3D2 -Wno-format-extra-args -Werror -Wmissing-variable-declaratio= ns -Wthread-safety -Wno-empty-body -Wno-string-plus-int -Wno-unused-const-v= ariable -Wno-error=3Dunused-but-set-parameter -Qunused-arguments -DLOC= ORE -c /usr/src/lib/csu/common/crtbrand.S -o crtbrand.o CMD CWD /usr/obj/usr/src/arm64.aarch64/libexec/rtld-elf32 TARGET crtbrand.o OODATE /usr/src/lib/csu/common/crtbrand.S -- command output -- clang: error: unsupported argument 'armv8a+aes+crc+sha2' to option '-mcpu= =3D' clang: error: ignoring extension 'sha2' because the 'invalid' architecture = does not support it [-Werror,-Winvalid-command-line-argument] clang: error: ignoring extension 'aes' because the 'invalid' architecture d= oes not support it [-Werror,-Winvalid-command-line-argument] clang: error: unsupported argument 'armv8a+aes+crc+sha2' to option '-mcpu= =3D' clang: error: ignoring extension 'sha2' because the 'invalid' architecture = does not support it [-Werror,-Winvalid-command-line-argument] clang: error: ignoring extension 'aes' because the 'invalid' architecture d= oes not support it [-Werror,-Winvalid-command-line-argument]