From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 2C48F3858421; Wed, 29 Nov 2023 07:10:15 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 2C48F3858421 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1701241815; bh=fOF1NtshgAfUAzroUqtOWY13VfwhEwa2jGNnjCgksYQ=; h=From:To:Subject:Date:From; b=B0V/qzYYnIvYkkBZ7zsAR7UAMUOlBSQLpbWNI4b0sK4xLECAn+SU1hin644qxUzgF QwwLNIRfbTHjzEOi6+Vs9cwt5cQT+utc0aTgvpuw4dsTAqCjVr884XkDgXex+2EYWc FEkDwU0Ykr7mKWI0OExyfeWYwSFw25kNsaqpmzXE= From: "matoro_gcc_bugzilla at matoro dot tk" To: gcc-bugs@gcc.gnu.org Subject: [Bug driver/112759] New: [13 regression] mips -march=native detection broken with gcc 13+ Date: Wed, 29 Nov 2023 07:10:14 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: driver X-Bugzilla-Version: 13.1.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: matoro_gcc_bugzilla at matoro dot tk X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D112759 Bug ID: 112759 Summary: [13 regression] mips -march=3Dnative detection broken with gcc 13+ Product: gcc Version: 13.1.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: driver Assignee: unassigned at gcc dot gnu.org Reporter: matoro_gcc_bugzilla at matoro dot tk Target Milestone: --- Since gcc 13 - and presumably 66c48be23e0fa5ee7474b4b078e013f901c71eed since that is the only recent change to this area - detection of -march=3Dnative = on mips is broken, defaulting to mips1. With gcc 13: # gcc -march=3Dnative -Q --help=3Dtarget | grep "arch=3D" | head -n 1 -march=3DISA mips1 # gcc --version gcc (Gentoo 13.2.1_p20231014 p9) 13.2.1 20231014 With gcc 12: # gcc -march=3Dnative -Q --help=3Dtarget | grep "arch=3D" | head -n 1 -march=3DISA octeon2 # gcc --version gcc (Gentoo 12.3.1_p20230825 p2) 12.3.1 20230825 Contents of my /proc/cpuinfo are attached. strace seems to indicate that i= t is reading the data at least: openat(AT_FDCWD, "/proc/cpuinfo", O_RDONLY) =3D 3 statx(3, "", AT_STATX_SYNC_AS_STAT|AT_NO_AUTOMOUNT|AT_EMPTY_PATH, STATX_BASIC_STATS, {stx_mask=3DSTATX_BASIC_STATS|STATX_MNT_ID, stx_attribut= es=3D0, stx_mode=3DS_IFREG|0444, stx_size=3D0, ...}) =3D 0 read(3, "system type\t\t: EBB6800 (CN6880p2"..., 1024) =3D 1024 close(3) =3D 0=