From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Jeffrey Walton Newsgroups: gmane.comp.lib.gnulib.bugs,gmane.emacs.devel Subject: Re: Emacs 28.1 doesn't compile on Mac OS 10.7.5 Date: Sun, 17 Apr 2022 10:51:33 -0400 Message-ID: References: <20220415.135547.28187788939231142.wl@gnu.org> <3F594037-7DF0-406B-A8DB-8709F76D7583@acm.org> <20220415.172301.1386462415020611428.wl@gnu.org> <2BC45081-033F-4796-891E-D052149C8BCB@acm.org> <67901569-bf14-b973-9de2-0f5d68aafe96@cs.ucla.edu> <79eee929-3cbe-8a5c-8ef2-06517572d83a@cs.ucla.edu> <73BFD071-DF6F-4310-974B-CD51DE1CDC29@ryandesign.com> Reply-To: noloader@gmail.com Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="19669"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Filipp Gunbin , Werner LEMBERG , Gnulib bugs , Emacs-Devel To: gnulib@ryandesign.com Original-X-From: bug-gnulib-bounces+gnu-bug-gnulib=m.gmane-mx.org@gnu.org Sun Apr 17 16:52:27 2022 Return-path: Envelope-to: gnu-bug-gnulib@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ng6GJ-0004vW-8X for gnu-bug-gnulib@m.gmane-mx.org; Sun, 17 Apr 2022 16:52:27 +0200 Original-Received: from localhost ([::1]:38082 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ng6GH-0000sT-QZ for gnu-bug-gnulib@m.gmane-mx.org; Sun, 17 Apr 2022 10:52:25 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:44060) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ng6GD-0000qO-FH; Sun, 17 Apr 2022 10:52:21 -0400 Original-Received: from mail-lj1-x22b.google.com ([2a00:1450:4864:20::22b]:33328) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ng6GA-0003vi-46; Sun, 17 Apr 2022 10:52:19 -0400 Original-Received: by mail-lj1-x22b.google.com with SMTP id r18so14431720ljp.0; Sun, 17 Apr 2022 07:52:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:reply-to:from:date:message-id :subject:to:cc:content-transfer-encoding; bh=AhKKsBNyjfI+obQzxiW4lLSVcE4OucfvnJwFkvkOfDg=; b=H2B3PX2tJL35iZIjl8cz0J3WJUHAmQBaGTDK3DCLxo2HTKa/h7rjbKh/tSTMn9mv2S lyBnrApf8RwAdrsPYuNdGM0TmuA7JFZKM2uM1Ub71p2BI5TYLfBhLz+bBMvcxzlrQiOj 88MLiqdE0ccTOFhph9jxdFFR0+YGpoHD7Brf+V1x3bKm1W/0FDjzSpj+V3/y1IsMueLt fSJ8U2oUfYyk/hVDQ/DKFq6lUSY+Inlpag6kgkfI8jc5xuR0CBpKPyD/AVU3E7hV+g9J DqS7QtwUW4XY3ynk0huC87gL0xtit6x/pSokFDYF7pQk/jcs4oej0vQwILkjk3jy6Vr2 Du1w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:reply-to :from:date:message-id:subject:to:cc:content-transfer-encoding; bh=AhKKsBNyjfI+obQzxiW4lLSVcE4OucfvnJwFkvkOfDg=; b=bwMsGF8rVwzpCvunwpipjowcka5lwPmLqh9xqIVAi3IMb/WAZfZRBRgve2/4NQCfrI /wrNJ3qIZyVh21TZuHzXNf35kA7DtQyVZ1kBHXquR7ZYGfE6OKGk9TyW5dSmjnKqsF+e yZum56Zq1my9n0TvSqjI08Ig9Tt50qSUggeTRCWqbFyoX/4TpAi5O3A+agoMPJp85gB6 yY69h1pDoynSe7lxrtsgvIdgrQz/icprQFT/xVpVyyemETxi0j1nqrbSRciUbTDn9fwC AtdtRVKvhZvQPhEcihDlFj3fPNvQVCAUoo8Sa8k6SmM4/I3wnP+XyJzKpDBIVAeKDS3P p3Qg== X-Gm-Message-State: AOAM530v/RVDrrTqGlxQzm8w3c8G/HxzfdMeS81/eDq/i6TBb8sJtK/a F/NE7Jm1nsxnCaIIvkClZuwa5r0TC9CmK4NPz3c= X-Google-Smtp-Source: ABdhPJxu51EyqG8rDY4gPAVjCsefNRTBIWkF/R1tY/2u07fp3w32ky2w3t3/Uj7bv3lzECy80+zvC2RXr+tC9Q9maoU= X-Received: by 2002:a05:651c:1508:b0:24b:1fd1:37e9 with SMTP id e8-20020a05651c150800b0024b1fd137e9mr4767147ljf.233.1650207131964; Sun, 17 Apr 2022 07:52:11 -0700 (PDT) In-Reply-To: <73BFD071-DF6F-4310-974B-CD51DE1CDC29@ryandesign.com> Received-SPF: pass client-ip=2a00:1450:4864:20::22b; envelope-from=noloader@gmail.com; helo=mail-lj1-x22b.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: bug-gnulib@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gnulib discussion list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnulib-bounces+gnu-bug-gnulib=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnulib" Xref: news.gmane.io gmane.comp.lib.gnulib.bugs:45792 gmane.emacs.devel:288559 Archived-At: On Sun, Apr 17, 2022 at 10:33 AM Ryan Schmidt wrote= : > > On Apr 17, 2022, at 02:54, Paul Eggert wrote: > > > On 4/16/22 20:28, Jeffrey Walton wrote: > >> maybe you should define a couple of macros > >> like GNULIB_LLVM_CLANG_VER and GNULIB_APPLE_CLANG_VER > > > > I hope we don't need to do that. This is software archaeology (Mac OS X= 10.7.5 is so old that neither the Subject: line nor my patch got its name = right, and nobody mentioned the mistake :-) and these macros would clutter = the code for little benefit. Most Clang-specific code nowadays shouldn't us= e Clang version numbers; it should use __has_builtin etc. > > I agree you should detect features if you can. If you can't, and you need= to look at the compiler version, you need to first establish whether you'r= e using Apple Clang or open source clang, since the two use different versi= on numbering schemes. If __clang__ is defined and __apple_build_version__ i= s defined, you're using Apple Clang and you could inspect that constant dir= ectly or you could look at __clang_major__, __clang_minor__, and/or __clang= _patchlevel__ interpreted as Apple Clang version numbers. If __clang__ is d= efined and __apple_build_version__ is not defined, you're using open source= clang and can look at the __clang_*__ defines interpreted as open source c= lang version numbers. > > > Some sample output from my system: > > $ clang -dM -E - < /dev/null | egrep '__(clang|apple)' > #define __apple_build_version__ 4250028 > #define __clang__ 1 > #define __clang_major__ 4 > #define __clang_minor__ 2 > #define __clang_patchlevel__ 0 > #define __clang_version__ "4.2 (clang-425.0.28)" > > $ clang -v > Apple LLVM version 4.2 (clang-425.0.28) (based on LLVM 3.2svn) > Target: x86_64-apple-darwin11.4.2 > Thread model: posix > > $ xcodebuild -version > Xcode 4.6.3 > Build version 4H1503 > > $ sw_vers > ProductName: Mac OS X > ProductVersion: 10.7.5 > BuildVersion: 11G63 One other thing that is helpful is this cross reference for version numbers: https://gist.github.com/yamaya/2924292 If you cut a feature in for LLVM Clang, then you can lookup the Apple Clang version if you don't have an Apple machine with the compiler handy. Jeff