public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug ada/111909] New: Filename case sensitivity defaulted wrongly on macOS
@ 2023-10-21 15:22 simon at pushface dot org
  2023-10-22  1:20 ` [Bug ada/111909] " egallager at gcc dot gnu.org
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: simon at pushface dot org @ 2023-10-21 15:22 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111909

            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=56167&action=edit
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.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug ada/111909] Filename case sensitivity defaulted wrongly on macOS
  2023-10-21 15:22 [Bug ada/111909] New: Filename case sensitivity defaulted wrongly on macOS simon at pushface dot org
@ 2023-10-22  1:20 ` egallager at gcc dot gnu.org
  2023-10-30 14:00 ` egallager at gcc dot gnu.org
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: egallager at gcc dot gnu.org @ 2023-10-22  1:20 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111909

Eric Gallager <egallager at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |egallager at gcc dot gnu.org

--- Comment #1 from Eric Gallager <egallager at gcc dot gnu.org> ---
Cross-referencing against some related issues:
https://github.com/iains/gcc-darwin-arm64/issues/101
Bug 81114

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug ada/111909] Filename case sensitivity defaulted wrongly on macOS
  2023-10-21 15:22 [Bug ada/111909] New: Filename case sensitivity defaulted wrongly on macOS simon at pushface dot org
  2023-10-22  1:20 ` [Bug ada/111909] " egallager at gcc dot gnu.org
@ 2023-10-30 14:00 ` egallager at gcc dot gnu.org
  2023-11-28 16:48 ` cvs-commit at gcc dot gnu.org
  2024-03-13 14:56 ` simon at pushface dot org
  3 siblings, 0 replies; 5+ messages in thread
From: egallager at gcc dot gnu.org @ 2023-10-30 14:00 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111909

Eric Gallager <egallager at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                URL|                            |https://gcc.gnu.org/piperma
                   |                            |il/gcc-patches/2023-October
                   |                            |/634636.html
           Keywords|                            |patch
   Last reconfirmed|                            |2023-10-30
           Assignee|unassigned at gcc dot gnu.org      |simon at pushface dot org
             Status|UNCONFIRMED                 |ASSIGNED
     Ever confirmed|0                           |1

--- Comment #2 from Eric Gallager <egallager at gcc dot gnu.org> ---
Patch posted to mailing lists:
https://gcc.gnu.org/pipermail/gcc-patches/2023-October/634636.html

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug ada/111909] Filename case sensitivity defaulted wrongly on macOS
  2023-10-21 15:22 [Bug ada/111909] New: Filename case sensitivity defaulted wrongly on macOS simon at pushface dot org
  2023-10-22  1:20 ` [Bug ada/111909] " egallager at gcc dot gnu.org
  2023-10-30 14:00 ` egallager at gcc dot gnu.org
@ 2023-11-28 16:48 ` cvs-commit at gcc dot gnu.org
  2024-03-13 14:56 ` simon at pushface dot org
  3 siblings, 0 replies; 5+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2023-11-28 16:48 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111909

--- Comment #3 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Marc Poulhi?s <dkm@gcc.gnu.org>:

https://gcc.gnu.org/g:396db92d3aa7412dd7133563fecbc6237fa81c02

commit r14-5936-g396db92d3aa7412dd7133563fecbc6237fa81c02
Author: Simon Wright <simon@pushface.org>
Date:   Tue Nov 28 14:56:36 2023 +0100

    Fix PR ada/111909 On Darwin, determine filesystem case sensitivity at
runtime

    In gcc/ada/adaint.c(__gnat_get_file_names_case_sensitive), the current
    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 means that on aarch64-apple-darwin, file names are treated as
    case-sensitive, which is not the default case.

    The true default position is that macOS file systems are
    case-insensitive, iOS file systems are case-sensitive.

    Apple provide a header file <TargetConditionals.h> which permits a
    compile-time check for the compiler target (e.g. OSX vs IOS); if
    TARGET_OS_IOS is defined as 1, this is a build for iOS.

    2023-11-22  Simon Wright  <simon@pushface.org>

    gcc/ada/

            PR ada/111909
            * adaint.c
            (__gnat_get_file_names_case_sensitive): Split out the __APPLE__
            check and remove the checks for __arm__, __arm64__. For Apple,
            file names are by default case-insensitive unless TARGET_OS_IOS is
            set.

    Signed-off-by: Simon Wright <simon@pushface.org>

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug ada/111909] Filename case sensitivity defaulted wrongly on macOS
  2023-10-21 15:22 [Bug ada/111909] New: Filename case sensitivity defaulted wrongly on macOS simon at pushface dot org
                   ` (2 preceding siblings ...)
  2023-11-28 16:48 ` cvs-commit at gcc dot gnu.org
@ 2024-03-13 14:56 ` simon at pushface dot org
  3 siblings, 0 replies; 5+ messages in thread
From: simon at pushface dot org @ 2024-03-13 14:56 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111909

simon at pushface dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |FIXED
             Status|ASSIGNED                    |RESOLVED

--- Comment #4 from simon at pushface dot org ---
Fixed on mainline.

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2024-03-13 14:56 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-10-21 15:22 [Bug ada/111909] New: Filename case sensitivity defaulted wrongly on macOS simon at pushface dot org
2023-10-22  1:20 ` [Bug ada/111909] " egallager at gcc dot gnu.org
2023-10-30 14:00 ` egallager at gcc dot gnu.org
2023-11-28 16:48 ` cvs-commit at gcc dot gnu.org
2024-03-13 14:56 ` simon at pushface dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).