From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 22EDC3858412; Sat, 21 Oct 2023 15:22:05 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 22EDC3858412 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1697901725; bh=VbRLDzUNS3FfdFLMegeiz3NZp1BOfMus6KT/I+e16FE=; h=From:To:Subject:Date:From; b=uZVeFQC/et04UVXzoAL9PQT5UdKY0K+oiXYCiby+Q7HwXxJfDEZznFSb6dmvV+gtH YXUkK/rREU4RJw99dAioLA0AIxG4+qsN3PAwGXPAO7cZPgoLjHfxi6L4behZwOjUsJ dd7NMF2p4Nv7WrShnNi+qzKUz0TzEW97Js/TTzK8= From: "simon at pushface dot org" To: gcc-bugs@gcc.gnu.org Subject: [Bug ada/111909] New: Filename case sensitivity defaulted wrongly on macOS Date: Sat, 21 Oct 2023 15:22:04 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: ada X-Bugzilla-Version: 14.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: simon at pushface dot org 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 cc target_milestone attachments.created 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=3D111909 Bug ID: 111909 Summary: Filename case sensitivity defaulted wrongly on macOS Product: gcc Version: 14.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: ada Assignee: unassigned at gcc dot gnu.org Reporter: simon at pushface dot org CC: dkm at gcc dot gnu.org Target Milestone: --- Created attachment 56167 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=3D56167&action=3Dedit Demo of code to determine case sensitivity In gcc/ada/adaint.c(__gnat_get_file_names_case_sensitive), the assumption for __APPLE__ is that file names are case-insensitive unless __arm__ or __arm64__ are defined, in which case file names are declared case-sensitive. The associated comment is "By default, we suppose filesystems aren't case sensitive on Windows and Darwin (but they are on arm-darwin)." This change was made in commit b54d1d39d30c (in github gcc-mirror). This means that on aarch64-apple-darwin, file names are declared case-sensitive. I understand that GCC does not currently support iOS/tvOS/watchOS, so we could assume macOS. On macOS, the default filesystem is case-insensitive; changing this function to reflect that would be an improvement. However, it's possible to create case-sensitive filesystems, and some users do when dealing with OSS code. It would be good to check the actual filesystem in use.=