From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Alan Third Newsgroups: gmane.emacs.devel Subject: Re: macOS fullscreen crashes Date: Sat, 1 Dec 2018 16:09:43 +0000 Message-ID: <20181201160943.GA94458@breton.holly.idiocy.org> References: <20181130110458.GA54580@breton.holly.idiocy.org> <20181201131851.GA65351@breton.holly.idiocy.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="5mCyUwZo2JvN/JJP" Content-Transfer-Encoding: 8bit X-Trace: blaine.gmane.org 1543680471 5933 195.159.176.226 (1 Dec 2018 16:07:51 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 1 Dec 2018 16:07:51 +0000 (UTC) User-Agent: Mutt/1.10.1 (2018-07-13) Cc: emacs-devel@gnu.org To: "Charles A. Roelli" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Dec 01 17:07:47 2018 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gT7o1-0001Oo-Jf for ged-emacs-devel@m.gmane.org; Sat, 01 Dec 2018 17:07:45 +0100 Original-Received: from localhost ([::1]:41760 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gT7q8-0001I5-0Y for ged-emacs-devel@m.gmane.org; Sat, 01 Dec 2018 11:09:56 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:37221) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gT7q1-0001Hz-B7 for emacs-devel@gnu.org; Sat, 01 Dec 2018 11:09:50 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gT7q0-0008Az-7E for emacs-devel@gnu.org; Sat, 01 Dec 2018 11:09:49 -0500 Original-Received: from mail-wr1-x435.google.com ([2a00:1450:4864:20::435]:38785) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gT7pz-00088q-VO for emacs-devel@gnu.org; Sat, 01 Dec 2018 11:09:48 -0500 Original-Received: by mail-wr1-x435.google.com with SMTP id v13so8052652wrw.5 for ; Sat, 01 Dec 2018 08:09:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=LnSrl9INoxM58p/hQjGZhgSL9W564V/sLknNsMdu6ac=; b=l+4y3XbBwapMZVV1rcBMy3bW7KCe0eBAPesmMy9wKAZsqYreL6DdtQGU/dd8DYKVpb wLYctVWJbMWFgoEWPlK1zjXZlbh7Xxq41K2rMBeza5sgko1x8MLEJ2G36IIYWEQikgpV CxCvqT9cbBCCw7/A83hT1GNm3EF50cVI6DBJ79Yh7a3AmYlhWa3I0uTOkPCEyYoD8BpX U1rcU4xzEfBdVyEP7XIqXt0TOaK6kw21uzBTNbqRf80XN4W0vkScz9Xx/41uPYB04Rr6 oLDEIuoaOQvPFi3ktRn33kWeR3dU1oE2Jl4Q/oTL1D9sAswdBGCULMbUjqtRLYCHU96+ fPGg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition :content-transfer-encoding:in-reply-to:user-agent; bh=LnSrl9INoxM58p/hQjGZhgSL9W564V/sLknNsMdu6ac=; b=Q74Ymt2siZ3LUqxHKqTVpst70IR8mtdRdx/3/e2ieqIq9qp5gl+cJQw++GV21oSP0P f7aCT/NWYh9m3BjujKBfZn2WkF4lf7hhrcflbdo1bIiizp7Rdl+aFhcQknii0W7QT+kg 8+qBzq4eSUBD/xoXhdipNHoixQ/Ur59tbWEZsPsXDOo/RSY93MH3pFqNSeBprE/6zSwh SNkuJWEX4AKgJiZuJZa/zsqBz3Jq7eNJdrFVgUb2xuNQVg7GvxUMZznqZa3Y1x3b3DCa KLQmRq5VxjBcQsTWZq8bbMrS0k9HVhw9IG6X1IWt7pv6zuoKzfMOXEKTw8z+K0fcWcgm EEjw== X-Gm-Message-State: AA+aEWYgUKyv5ys4fKBP3ucwMehriB59T6Rg9hkJkW4IjTYhPi60JrCe hykjjNVhkKf0NUSkuQvx33E= X-Google-Smtp-Source: AFSGD/XlKtYMhPH1S9GD01FrHgoTHrRTgqXkfAJLxpMbXI65oSQxSfDoqXhR74IaRolWbgvli2mIjA== X-Received: by 2002:a5d:6648:: with SMTP id f8mr2479988wrw.117.1543680586754; Sat, 01 Dec 2018 08:09:46 -0800 (PST) Original-Received: from breton.holly.idiocy.org (ip6-2001-08b0-03f8-8129-c0c6-f0c8-876b-ed70.holly.idiocy.org. [2001:8b0:3f8:8129:c0c6:f0c8:876b:ed70]) by smtp.gmail.com with ESMTPSA id b7sm6244968wrs.47.2018.12.01.08.09.45 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 01 Dec 2018 08:09:45 -0800 (PST) Content-Disposition: inline In-Reply-To: X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::435 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:231559 Archived-At: --5mCyUwZo2JvN/JJP Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit On Sat, Dec 01, 2018 at 03:45:57PM +0100, Charles A. Roelli wrote: > > Date: Sat, 1 Dec 2018 13:18:51 +0000 > > From: Alan Third > > > > BTW, it looks like there are two different sets of macros for this, > > there are the ones we’re using, and newer ones defined in > > Availability.h that have two underscores at the start. It looks like > > the newer ones are a bit neater. If you use > > > > -mmacosx-version-min=10.x > > > > it disables a great many deprecation warnings that you get if you just > > set MAC_OS_X_VERSION_MIN_REQUIRED like we do. > > > > I don’t think we should be changing anything at the moment, and I > > don’t know if those macros are available on macOS 10.6 so they may not > > be much use to us, but it is nice how it makes the compiler output a > > lot quieter. > > __MAC_OS_X_VERSION_MIN_REQUIRED and __MAC_OS_X_VERSION_MAX_ALLOWED are > available in 10.6 (and the use of, e.g. -mmacosx-version-min=10.x, is > recommended in Availability.h). But it's unlikely that FSF GCC would > support the "-mmacosx-version-min" flag, so we may not be able to use > it. Good to know. Doessetting __MAC_OS_X_VERSION_MIN_REQUIRED directly work just as well? > Thanks, this looks good. We should also mention in NEWS that this is > a change in build behavior from previous Emacs versions (and that this > change was originally made in Emacs 26.1 but not mentioned in its NEWS). I’m not sure that there’s any reason to mention that it was available in 26.1 but undocumented. Is that standard practice? Anyway, patch attached. -- Alan Third --5mCyUwZo2JvN/JJP Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="0001-Add-notes-about-cross-compiling-macOS-versions.patch" >From 532abecb72f12c83c2b2f129fbc5f56387f5895c Mon Sep 17 00:00:00 2001 From: Alan Third Date: Sat, 1 Dec 2018 13:36:58 +0000 Subject: [PATCH] ; Add notes about cross-compiling macOS versions --- etc/NEWS | 3 +++ nextstep/INSTALL | 29 +++++++++++++++++++++++++++++ 2 files changed, 32 insertions(+) diff --git a/etc/NEWS b/etc/NEWS index 399508cacc..103dbf127e 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -178,6 +178,9 @@ optional argument to do so. * Changes in Emacs 26.2 on Non-Free Operating Systems +** macOS features can now be detected at at run-time as well as at +build-time. See nextstep/INSTALL for details. + * Installation Changes in Emacs 26.1 diff --git a/nextstep/INSTALL b/nextstep/INSTALL index 64f8f8fcf7..726a897c37 100644 --- a/nextstep/INSTALL +++ b/nextstep/INSTALL @@ -45,6 +45,35 @@ files will be installed under whatever 'prefix' is set to (defaults to require 'sudo' for "make install"). +Targeting different macOS versions +---------------------------------- + +The Emacs build process automatically enables or disables macOS +features according to the version of macOS it is being built on. It +is possible to override this automatic configuration if you are +targeting a different version of macOS, or wish to build one +executable that is able to enable or disable features at run-time. + +To build a version compatible with an older version of macOS use this +flag: + + -DMAC_OS_X_VERSION_MIN_REQUIRED=x + +and to build for a newer version of macOS: + + -DMAC_OS_X_VERSION_MAX_ALLOWED=x + +For example, to enable run-time checks for features available between +macOS 10.6, and 10.12 inclusive: + + ./configure --with-ns CFLAGS="-DMAC_OS_X_VERSION_MIN_REQUIRED=1060 \ + -DMAC_OS_X_VERSION_MAX_ALLOWED=101200 -g3 -O2" + +The macOS version numbers are formatted as 10x0 for macOS up to 10.10, +and 10xx00 for macOS 10.10 and above. A full list is provided in +/usr/include/AvailabilityMacros.h. + + Installation ------------ -- 2.19.1 --5mCyUwZo2JvN/JJP--