public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH] Darwin: homogenize spelling of macOS
@ 2023-08-31 11:13 FX Coudert
  2023-08-31 11:27 ` Iain Sandoe
  0 siblings, 1 reply; 4+ messages in thread
From: FX Coudert @ 2023-08-31 11:13 UTC (permalink / raw)
  To: GCC Patches; +Cc: Iain Sandoe

[-- Attachment #1: Type: text/plain, Size: 631 bytes --]

This patch homogenizes to some extent the use of “Mac OS X” or “OS X” or “Mac OS” in the gcc/ folder to “macOS”, which is the modern way of writing it. It is not a global replacement though, and each use was audited.

- When referring to specific versions that used the “OS X” or “Mac OS” as their name, it was kept.
- All uses referring to powerpc*-apple-darwin* were kept as-is, because those versions all predate the change to “macOS”.
- I did not touch Ada or D
- I did not touch testsuite comments

Tested by building on x86_64-apple-darwin, and generating the docs.
OK to push?

FX



[-- Attachment #2: 0001-Darwin-homogenize-spelling-of-macOS.patch --]
[-- Type: application/octet-stream, Size: 16430 bytes --]

From 207d1e4af90455c3ff153a462d5f3c7e59d09274 Mon Sep 17 00:00:00 2001
From: Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
Date: Thu, 31 Aug 2023 13:00:20 +0200
Subject: [PATCH] Darwin: homogenize spelling of macOS

gcc/ChangeLog:
	* config.in: Regenerate.
	* config/darwin-c.cc: Change spelling to macOS.
	* config/darwin-driver.cc: Likewise.
	* config/darwin.h: Likewise.
	* configure.ac: Likewise.
	* doc/contrib.texi: Likewise.
	* doc/extend.texi: Likewise.
	* doc/invoke.texi: Likewise.
	* doc/plugins.texi: Likewise.
	* doc/tm.texi: Regenerate.
	* doc/tm.texi.in: Change spelling to macOS.
	* plugin.cc: Likewise.

gcc/analyzer/ChangeLog:
	* kf.cc: Change spelling to macOS.

gcc/c-family/ChangeLog:
	* c.opt: Change spelling to macOS.

gcc/fortran/ChangeLog:
	* gfortran.texi: Likewise.

gcc/jit/ChangeLog:
	* jit-playback.cc: Change spelling to macOS.

gcc/objc/ChangeLog:
	* objc-act.cc: Change spelling to macOS.
---
 gcc/analyzer/kf.cc          | 2 +-
 gcc/c-family/c.opt          | 2 +-
 gcc/config.in               | 6 ++----
 gcc/config/darwin-c.cc      | 8 ++++----
 gcc/config/darwin-driver.cc | 2 +-
 gcc/config/darwin.h         | 4 ++--
 gcc/configure.ac            | 4 ++--
 gcc/doc/contrib.texi        | 2 +-
 gcc/doc/extend.texi         | 4 ++--
 gcc/doc/invoke.texi         | 8 ++++----
 gcc/doc/plugins.texi        | 2 +-
 gcc/doc/tm.texi             | 2 +-
 gcc/doc/tm.texi.in          | 2 +-
 gcc/fortran/gfortran.texi   | 2 +-
 gcc/jit/jit-playback.cc     | 2 +-
 gcc/objc/objc-act.cc        | 2 +-
 gcc/plugin.cc               | 4 ++--
 17 files changed, 28 insertions(+), 30 deletions(-)

diff --git a/gcc/analyzer/kf.cc b/gcc/analyzer/kf.cc
index 219421005c1..e5bd7459f27 100644
--- a/gcc/analyzer/kf.cc
+++ b/gcc/analyzer/kf.cc
@@ -1654,7 +1654,7 @@ register_known_functions (known_function_manager &kfm)
        like this:
 	 extern int *___errno(void) __attribute__((__const__));
 	 #define errno (*(___errno()))
-       and OS X like this:
+       and macOS like this:
 	 extern int * __error(void);
 	 #define errno (*__error())
        and similarly __errno for newlib.
diff --git a/gcc/c-family/c.opt b/gcc/c-family/c.opt
index 2242524cd3e..7348ad42ee0 100644
--- a/gcc/c-family/c.opt
+++ b/gcc/c-family/c.opt
@@ -1988,7 +1988,7 @@ Implement resolution of DR 150 for matching of template template arguments.
 
 fnext-runtime
 ObjC ObjC++ LTO RejectNegative Var(flag_next_runtime)
-Generate code for NeXT (Apple Mac OS X) runtime environment.
+Generate code for NeXT (Apple macOS) runtime environment.
 
 fnil-receivers
 ObjC ObjC++ Var(flag_nil_receivers) Init(1)
diff --git a/gcc/config.in b/gcc/config.in
index 5cf51bc1b01..f0071456f03 100644
--- a/gcc/config.in
+++ b/gcc/config.in
@@ -622,15 +622,13 @@
 #endif
 
 
-/* Define if your Mac OS X assembler supports -mllvm -x86-pad-for-align=false.
-   */
+/* Define if your macOS assembler supports -mllvm -x86-pad-for-align=false. */
 #ifndef USED_FOR_TARGET
 #undef HAVE_AS_MLLVM_X86_PAD_FOR_ALIGN
 #endif
 
 
-/* Define if your Mac OS X assembler supports the -mmacos-version-min option.
-   */
+/* Define if your macOS assembler supports the -mmacos-version-min option. */
 #ifndef USED_FOR_TARGET
 #undef HAVE_AS_MMACOSX_VERSION_MIN_OPTION
 #endif
diff --git a/gcc/config/darwin-c.cc b/gcc/config/darwin-c.cc
index ded0cd46c76..4be1d5ce51b 100644
--- a/gcc/config/darwin-c.cc
+++ b/gcc/config/darwin-c.cc
@@ -555,7 +555,7 @@ find_subframework_header (cpp_reader *pfile, const char *header, cpp_dir **dirp)
   return 0;
 }
 
-/* Given an OS X version VERSION_STR, return it as a statically-allocated array
+/* Given an macOS version VERSION_STR, return it as a statically-allocated array
    of three integers. If VERSION_STR is invalid, return NULL.
 
    VERSION_STR must consist of one, two, or three tokens, each separated by
@@ -612,7 +612,7 @@ parse_version (const char *version_str)
   return version_array;
 }
 
-/* Given VERSION -- a three-component OS X version represented as an array of
+/* Given VERSION -- a three-component macOS version represented as an array of
    non-negative integers -- return a statically-allocated string suitable for
    the legacy __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ macro.  If VERSION
    is invalid and cannot be coerced into a valid form, return NULL.
@@ -645,7 +645,7 @@ version_as_legacy_macro (const unsigned long *version)
   return result;
 }
 
-/* Given VERSION -- a three-component OS X version represented as an array of
+/* Given VERSION -- a three-component macOS version represented as an array of
    non-negative integers -- return a statically-allocated string suitable for
    the modern __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ macro.  If VERSION
    is invalid, return NULL.
@@ -675,7 +675,7 @@ version_as_modern_macro (const unsigned long *version)
 
 /* Return the value of darwin_macosx_version_min, suitably formatted for the
    __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ macro.  Values representing
-   OS X 10.9 and earlier are encoded using the legacy four-character format,
+   macOS 10.9 and earlier are encoded using the legacy four-character format,
    while 10.10 and later use a modern six-character format.  (For example,
    "10.9" produces "1090", and "10.10.1" produces "101001".)  If
    darwin_macosx_version_min is invalid and cannot be coerced into a valid
diff --git a/gcc/config/darwin-driver.cc b/gcc/config/darwin-driver.cc
index 9c1dcc3d794..1028e152a18 100644
--- a/gcc/config/darwin-driver.cc
+++ b/gcc/config/darwin-driver.cc
@@ -440,7 +440,7 @@ darwin_driver_init (unsigned int *decoded_options_count,
 	}
     }
 
-  /* We will need to know the OS X version we're trying to build for here
+  /* We will need to know the macOS version we're trying to build for here
      so that we can figure out the mechanism and source for the sysroot to
      be used.  */
   if (!seen_version_min)
diff --git a/gcc/config/darwin.h b/gcc/config/darwin.h
index e0e8672a455..1b3f1bd984c 100644
--- a/gcc/config/darwin.h
+++ b/gcc/config/darwin.h
@@ -1,4 +1,4 @@
-/* Target definitions for Darwin (Mac OS X) systems.
+/* Target definitions for Darwin (macOS) systems.
    Copyright (C) 1989-2023 Free Software Foundation, Inc.
    Contributed by Apple Computer Inc.
 
@@ -27,7 +27,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
 #define CONFIG_DARWIN_H
 
 /* The definitions in this file are common to all processor types
-   running Darwin, which is the kernel for Mac OS X.  Darwin is
+   running Darwin, which is the kernel for macOS.  Darwin is
    basically a BSD user layer laid over a Mach kernel, then evolved
    for many years (at NeXT) in parallel with other Unix systems.  So
    while the runtime is a somewhat idiosyncratic Mach-based thing,
diff --git a/gcc/configure.ac b/gcc/configure.ac
index 62c31d8e02d..cb4be11facd 100644
--- a/gcc/configure.ac
+++ b/gcc/configure.ac
@@ -4325,7 +4325,7 @@ case "$target_os" in
       gcc_cv_as_mmacosx_version_min,
       [-mmacosx-version-min=10.1], [.text],,
       [AC_DEFINE(HAVE_AS_MMACOSX_VERSION_MIN_OPTION, 1,
-	[Define if your Mac OS X assembler supports the -mmacos-version-min option.])])
+	[Define if your macOS assembler supports the -mmacos-version-min option.])])
     ;;
 esac
 
@@ -4762,7 +4762,7 @@ foo:	nop
           gcc_cv_as_mllvm_x86_pad_for_align,
           [-mllvm -x86-pad-for-align=false], [.text],,
           [AC_DEFINE(HAVE_AS_MLLVM_X86_PAD_FOR_ALIGN, 1,
-	    [Define if your Mac OS X assembler supports -mllvm -x86-pad-for-align=false.])])
+	    [Define if your macOS assembler supports -mllvm -x86-pad-for-align=false.])])
        ;;
     esac
 
diff --git a/gcc/doc/contrib.texi b/gcc/doc/contrib.texi
index d7b73e179a5..031c4ec44ce 100644
--- a/gcc/doc/contrib.texi
+++ b/gcc/doc/contrib.texi
@@ -1515,7 +1515,7 @@ Gael Thomas for @code{VMClassLoader} boot packages support suggestions.
 
 @item
 Andreas Tobler for Darwin and Solaris testing and fixing, @code{Qt4}
-support for Darwin/OS X, @code{Graphics2D} support, @code{gtk+}
+support for Darwin / macOS, @code{Graphics2D} support, @code{gtk+}
 updates.
 
 @item
diff --git a/gcc/doc/extend.texi b/gcc/doc/extend.texi
index 400284b85f5..80dd2a84b0b 100644
--- a/gcc/doc/extend.texi
+++ b/gcc/doc/extend.texi
@@ -24178,7 +24178,7 @@ attribute, do change the value of preprocessor macros like
 
 The following pragmas are available for all architectures running the
 Darwin operating system.  These are useful for compatibility with other
-Mac OS compilers.
+macOS compilers.
 
 @table @code
 @cindex pragma, mark
@@ -25376,7 +25376,7 @@ compiled separately.
 @end table
 
 G++ implements the Borland model on targets where the linker supports it,
-including ELF targets (such as GNU/Linux), Mac OS X and Microsoft Windows.
+including ELF targets (such as GNU/Linux), macOS and Microsoft Windows.
 Otherwise G++ implements neither automatic model.
 
 You have the following options for dealing with template instantiations:
diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
index d6098d673a5..06941d79cd8 100644
--- a/gcc/doc/invoke.texi
+++ b/gcc/doc/invoke.texi
@@ -4837,7 +4837,7 @@ Use @var{class-name} as the name of the class to instantiate for each
 literal string specified with the syntax @code{@@"@dots{}"}.  The default
 class name is @code{NXConstantString} if the GNU runtime is being used, and
 @code{NSConstantString} if the NeXT runtime is being used (see below).  On
-Darwin (macOS, MacOS X) platforms, the @option{-fconstant-cfstrings} option, if
+Darwin / macOS platforms, the @option{-fconstant-cfstrings} option, if
 also present, overrides the @option{-fconstant-string-class} setting and cause
 @code{@@"@dots{}"} literals to be laid out as constant CoreFoundation strings.
 Note that @option{-fconstant-cfstrings} is an alias for the target-specific
@@ -4851,7 +4851,7 @@ runtime.  This is the default for most types of systems.
 @opindex fnext-runtime
 @item -fnext-runtime
 Generate output compatible with the NeXT runtime.  This is the default
-for NeXT-based systems, including Darwin and Mac OS X@.  The macro
+for NeXT-based systems, including Darwin / macOS.  The macro
 @code{__NEXT_RUNTIME__} is predefined if (and only if) this option is
 used.
 
@@ -11486,7 +11486,7 @@ possible.
 Produce debugging information in DWARF format (if that is supported).
 The value of @var{version} may be either 2, 3, 4 or 5; the default
 version for most targets is 5 (with the exception of VxWorks, TPF and
-Darwin/Mac OS X, which default to version 2, and AIX, which defaults
+Darwin / macOS, which default to version 2, and AIX, which defaults
 to version 4).
 
 Note that with DWARF Version 2, some ports require and always
@@ -30069,7 +30069,7 @@ the same as @option{-mbig}.
 
 @opindex mdynamic-no-pic
 @item -mdynamic-no-pic
-On Darwin and Mac OS X systems, compile code so that it is not
+On Darwin / macOS systems, compile code so that it is not
 relocatable, but that its external references are relocatable.  The
 resulting code is suitable for applications, but not shared
 libraries.
diff --git a/gcc/doc/plugins.texi b/gcc/doc/plugins.texi
index 26df8b490df..f9a23180ed8 100644
--- a/gcc/doc/plugins.texi
+++ b/gcc/doc/plugins.texi
@@ -44,7 +44,7 @@ Plugins are loaded with
 
 Where @var{name} is the plugin name and @var{ext} is the platform-specific
 dynamic library extension. It should be @code{dll} on Windows/MinGW,
-@code{dylib} on Darwin/Mac OS X, and @code{so} on all other platforms.
+@code{dylib} on Darwin/macOS, and @code{so} on all other platforms.
 The plugin arguments are parsed by GCC and passed to respective
 plugins as key-value pairs. Multiple plugins can be invoked by
 specifying multiple @option{-fplugin} arguments.
diff --git a/gcc/doc/tm.texi b/gcc/doc/tm.texi
index d0d47b0d471..180ad9ac0a9 100644
--- a/gcc/doc/tm.texi
+++ b/gcc/doc/tm.texi
@@ -5791,7 +5791,7 @@ many ulps below or above those boundaries result could be.
 Set this macro to 1 to use the "NeXT" Objective-C message sending conventions
 by default.  This calling convention involves passing the object, the selector
 and the method arguments all at once to the method-lookup library function.
-This is the usual setting when targeting Darwin/Mac OS X systems, which have
+This is the usual setting when targeting Darwin / macOS systems, which have
 the NeXT runtime installed.
 
 If the macro is set to 0, the "GNU" Objective-C message sending convention
diff --git a/gcc/doc/tm.texi.in b/gcc/doc/tm.texi.in
index 4ac96dc357d..4faa8a1edf5 100644
--- a/gcc/doc/tm.texi.in
+++ b/gcc/doc/tm.texi.in
@@ -4012,7 +4012,7 @@ macro, a reasonable default is used.
 Set this macro to 1 to use the "NeXT" Objective-C message sending conventions
 by default.  This calling convention involves passing the object, the selector
 and the method arguments all at once to the method-lookup library function.
-This is the usual setting when targeting Darwin/Mac OS X systems, which have
+This is the usual setting when targeting Darwin / macOS systems, which have
 the NeXT runtime installed.
 
 If the macro is set to 0, the "GNU" Objective-C message sending convention
diff --git a/gcc/fortran/gfortran.texi b/gcc/fortran/gfortran.texi
index f476a3719f5..e7ffc294dc8 100644
--- a/gcc/fortran/gfortran.texi
+++ b/gcc/fortran/gfortran.texi
@@ -978,7 +978,7 @@ low level file descriptor corresponding to an open Fortran unit. Then,
 using e.g. the @code{ISO_C_BINDING} feature, one can call the
 underlying system call to flush dirty data to stable storage, such as
 @code{fsync} on POSIX, @code{_commit} on MingW, or @code{fcntl(fd,
-F_FULLSYNC, 0)} on Mac OS X. The following example shows how to call
+F_FULLSYNC, 0)} on macOS. The following example shows how to call
 fsync:
 
 @smallexample
diff --git a/gcc/jit/jit-playback.cc b/gcc/jit/jit-playback.cc
index 9b757382f7a..7249ce8cadb 100644
--- a/gcc/jit/jit-playback.cc
+++ b/gcc/jit/jit-playback.cc
@@ -3024,7 +3024,7 @@ invoke_driver (const char *ctxt_progname,
   ADD_ARG ("-fno-use-linker-plugin");
 
 #if defined (DARWIN_X86) || defined (DARWIN_PPC)
-  /* OS X's linker defaults to treating undefined symbols as errors.
+  /* macOS's linker defaults to treating undefined symbols as errors.
      If the context has any imported functions or globals they will be
      undefined until the .so is dynamically-linked into the process.
      Ensure that the driver passes in "-undefined dynamic_lookup" to the
diff --git a/gcc/objc/objc-act.cc b/gcc/objc/objc-act.cc
index e4c49e664e1..186a29cd270 100644
--- a/gcc/objc/objc-act.cc
+++ b/gcc/objc/objc-act.cc
@@ -3314,7 +3314,7 @@ objc_build_string_object (tree string)
   length = TREE_STRING_LENGTH (string) - 1;
 
   /* The target may have different ideas on how to construct an ObjC string
-     literal.  On Darwin (Mac OS X), for example, we may wish to obtain a
+     literal.  On Darwin / macOS, for example, we may wish to obtain a
      constant CFString reference instead.
      At present, this is only supported for the NeXT runtime.  */
   if (flag_next_runtime
diff --git a/gcc/plugin.cc b/gcc/plugin.cc
index 142f3fa4131..c3e40b2cf75 100644
--- a/gcc/plugin.cc
+++ b/gcc/plugin.cc
@@ -190,10 +190,10 @@ add_new_plugin (const char* plugin_name)
 #if defined(__MINGW32__)
       static const char plugin_ext[] = ".dll";
 #elif defined(__APPLE__)
-      /* Mac OS has two types of libraries: dynamic libraries (.dylib) and
+      /* macOS has two types of libraries: dynamic libraries (.dylib) and
          plugins (.bundle). Both can be used with dlopen()/dlsym() but the
          former cannot be linked at build time (i.e., with the -lfoo linker
-         option). A GCC plugin is therefore probably a Mac OS plugin but their
+         option). A GCC plugin is therefore probably a macOS plugin but their
          use seems to be quite rare and the .bundle extension is more of a
          recommendation rather than the rule. This raises the questions of how
          well they are supported by tools (e.g., libtool). So to avoid
-- 
2.39.2 (Apple Git-143)


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

* Re: [PATCH] Darwin: homogenize spelling of macOS
  2023-08-31 11:13 [PATCH] Darwin: homogenize spelling of macOS FX Coudert
@ 2023-08-31 11:27 ` Iain Sandoe
  2023-08-31 16:12   ` Sandra Loosemore
  0 siblings, 1 reply; 4+ messages in thread
From: Iain Sandoe @ 2023-08-31 11:27 UTC (permalink / raw)
  To: FX Coudert; +Cc: GCC Patches, sandra Loosemoe

Hi FX,

+Sandra

> On 31 Aug 2023, at 12:13, FX Coudert <fxcoudert@gmail.com> wrote:
> 
> This patch homogenizes to some extent the use of “Mac OS X” or “OS X” or “Mac OS” in the gcc/ folder to “macOS”, which is the modern way of writing it. It is not a global replacement though, and each use was audited.
> 
> - When referring to specific versions that used the “OS X” or “Mac OS” as their name, it was kept.
> - All uses referring to powerpc*-apple-darwin* were kept as-is, because those versions all predate the change to “macOS”.
> - I did not touch Ada or D
> - I did not touch testsuite comments
> 
> Tested by building on x86_64-apple-darwin, and generating the docs.
> OK to push?

I think this is useful for user (or configurer)-facing documentation and help strings.

Being picky, there is one change where the reference is to 10.9 and earlier which are all Mac OS X (but that’s in a code comment so no need to change it).

OK from the Darwin perspective (for the code changes),
please wait for any comments from Sandra on the documentation changes.

thanks
Iain

> 
> FX
> 
> 
> <0001-Darwin-homogenize-spelling-of-macOS.patch>


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

* Re: [PATCH] Darwin: homogenize spelling of macOS
  2023-08-31 11:27 ` Iain Sandoe
@ 2023-08-31 16:12   ` Sandra Loosemore
  2023-08-31 16:21     ` FX Coudert
  0 siblings, 1 reply; 4+ messages in thread
From: Sandra Loosemore @ 2023-08-31 16:12 UTC (permalink / raw)
  To: Iain Sandoe, FX Coudert; +Cc: GCC Patches

On 8/31/23 05:27, Iain Sandoe wrote:
> Hi FX,
> 
> +Sandra
> 
>> On 31 Aug 2023, at 12:13, FX Coudert <fxcoudert@gmail.com> wrote:
>>
>> This patch homogenizes to some extent the use of “Mac OS X” or “OS X” or “Mac OS” in the gcc/ folder to “macOS”, which is the modern way of writing it. It is not a global replacement though, and each use was audited.
>>
>> - When referring to specific versions that used the “OS X” or “Mac OS” as their name, it was kept.
>> - All uses referring to powerpc*-apple-darwin* were kept as-is, because those versions all predate the change to “macOS”.
>> - I did not touch Ada or D
>> - I did not touch testsuite comments
>>
>> Tested by building on x86_64-apple-darwin, and generating the docs.
>> OK to push?
> 
> I think this is useful for user (or configurer)-facing documentation and help strings.
> 
> Being picky, there is one change where the reference is to 10.9 and earlier which are all Mac OS X (but that’s in a code comment so no need to change it).
> 
> OK from the Darwin perspective (for the code changes),
> please wait for any comments from Sandra on the documentation changes.

I can't claim any particular knowledge of macOS or its correct historical 
naming, so I'm happy to defer to experts on that.  I did look over the patch 
and didn't spot anything that looked scary, at least.

-Sandra

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

* Re: [PATCH] Darwin: homogenize spelling of macOS
  2023-08-31 16:12   ` Sandra Loosemore
@ 2023-08-31 16:21     ` FX Coudert
  0 siblings, 0 replies; 4+ messages in thread
From: FX Coudert @ 2023-08-31 16:21 UTC (permalink / raw)
  To: Sandra Loosemore; +Cc: Iain Sandoe, GCC Patches

Hi,

Thanks Sandra and Iain.
Patch pushed.

FX

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

end of thread, other threads:[~2023-08-31 16:21 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-08-31 11:13 [PATCH] Darwin: homogenize spelling of macOS FX Coudert
2023-08-31 11:27 ` Iain Sandoe
2023-08-31 16:12   ` Sandra Loosemore
2023-08-31 16:21     ` FX Coudert

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).