tech-pkg archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: lang/gcc12 on mac
On 6/23/24 12:48, Jonathan Perkin wrote:
* On 2024-06-23 at 13:21 BST, Jason Bacon wrote:
+.if !defined(CLTOOLS_VERSION)
+CLTOOLS_VERSION!= pkgutil
--pkg-info=com.apple.pkg.CLTools_Executables | awk '$$1 == "version:" {
print $2 }'
+.endif
This isn't accurate, on my host it returns the same as you, but I do not
use this, I use Xcode installed under /Applications which is a
completely different version.
I would do it based on CC_VERSION, which needs some work for clang.
Ideally I'd like to see it be the same as OPSYS_VERSION where we can
perform numeric comparisons rather than string matching.
CC_VERSION seems to be clang-15.0.0 for both SDK 13.3 and 14.4.
Running the following to get all predefined cpp macros:
cc -dM -E -x c /dev/null
The only difference in the output for 13.3 and 14.4 is
< #define __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ 130300
< #define __ENVIRONMENT_OS_VERSION_MIN_REQUIRED__ 130300
---
> #define __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ 140000
> #define __ENVIRONMENT_OS_VERSION_MIN_REQUIRED__ 140000
In either case, the output shows
#define __clang_version__ "15.0.0 (clang-1500.3.9.4)"
Am I missing something?
--
Life is a game. Play hard. Play fair. Have fun.
Home |
Main Index |
Thread Index |
Old Index