Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove 64-bit macOS check and everything based on it #1512

Merged
merged 4 commits into from
Apr 24, 2024

Conversation

ryandesign
Copy link
Contributor

This check doesn't work and nothing based on it is needed so remove all of it.

More specifics in each commit message.

As of Mac OS X 10.6 (released 2009), compilers build 64-bit by default
on 64-bit systems, and 10.6 is the last OS version that runs on 32-bit
systems. Naturally, users need to install a Java that matches the
architecture they want to build for, and as with any other software they
should supply -arch flags in CFLAGS, CXXFLAGS, and LDFLAGS if they
want to build for a non-default architecture.
As long as a C++ compiler is used to link any program that is composed
at least partly of object files produced by a C++ compiler, there is no
need for the build system to check for or know which C++ standard
library is being used. Not all systems use libstdc++ by default (some
use libc++), and the user might choose a different one by specifying a
-stdlib flag in CXXFLAGS.
This code never took effect because the apple_osx variable on which is
was based was always "no". The claim that modern 64-bit Macs build
32-bit by default is false; compilers on macOS have built 64-bit by
default on 64-bit systems ever since Mac OS X 10.6 was released (2009).
There are also other 64-bit architectures than x86_64: current Macs use
arm64 while Macs of decades past used ppc64.

Mac OS X 10.6 was the last time Java was included with macOS; since
then, users have been expected to install a Java distribution of their
choosing -- and there are many to choose from, ever since Oracle made
the license for their Java distribution less appealing. It's the user's
responsibility to select a Java distribution that matches the
architecture they want to build for, and to specify -arch flags in
CFLAGS, CXXFLAGS, and LDFLAGS if that architecture is not their
compiler's default. No assumptions about this should be made by build
systems.
This check doesn't work and isn't needed. On 64-bit macOS, configure
output says:

checking for 64-bit Apple OSX... no

When it was first added in af4e52c, it checked whether "host" matched
"x86_64-*-darwin*" which would have been true on x86_64 Macs (but there
are other Macs with 64-bit processors: current Macs use arm64 processors
and Macs of decades past used ppc64 processors). Then in 2f11fb0 it was
changed to check whether "host_os" matched "darwin*" which would have
been true on all Macs, both 64-bit and 32-bit. Finally in d9f59fd it was
changed to check if "host_os" matches "x86_64-*darwin*" which will never
be true. Nothing based on this check is needed so the check can be
removed.
@linas linas merged commit 69c026f into opencog:master Apr 24, 2024
1 check passed
@ryandesign ryandesign deleted the 64-bit-macos branch April 25, 2024 01:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants