Skip to content

Commit

Permalink
Remove attempt to force x86_64 Java build on macOS
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
ryandesign committed Apr 24, 2024
1 parent 7aa12d0 commit a9d8bce
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -776,14 +776,6 @@ AC_SUBST(REGEX_CFLAGS)
JNIfound=no

if test "x$enable_java_bindings" = "xyes"; then

if test x${apple_osx} = xyes; then
# Java on Apple OSX requires a 64-bit build. However, even
# modern 64-bit Apple machines build 32-bit binaries by default.
# So force a 64-bit build if a 64-bit CPU is found.
CFLAGS="-arch x86_64 ${CFLAGS}"
fi

absolute_srcdir=`(cd "$srcdir"; pwd)`
JAVA_SRCDIR=$absolute_srcdir/bindings/java
if test "$native_win32" = yes; then
Expand Down

0 comments on commit a9d8bce

Please sign in to comment.