← Back to team overview

openjdk team mailing list archive

Bug#893089: openjdk-11: FTBFS on mips* - uses -m32 / -m64

 

Source: openjdk-11
Version: 11~4-2
Severity: important
Tags: patch

Hi,

openjdk-11 FTBFS on mips* (and I expect others which have not built yet)
with this error:
> configure: Using default toolchain gcc (GNU Compiler Collection)
> configure: Will use user supplied compiler CC=mips-linux-gnu-gcc-7
> checking for mips-linux-gnu-gcc-7... /usr/bin/mips-linux-gnu-gcc-7
> checking resolved symbolic links for CC... no symlink
> configure: Using gcc C compiler version 7.3.0 [mips-linux-gnu-gcc-7 (Debian 7.3.0-11) 7.3.0]
> checking for mips-linux-gnu-/usr/bin/mips-linux-gnu-gcc-7... /usr/bin/mips-linux-gnu-gcc-7
> checking whether the C compiler works... no
> configure: error: in `/<<PKGBUILDDIR>>/build':
> configure: error: C compiler cannot create executables
> See `config.log' for more details
> configure exiting with result code 77
> make: *** [debian/rules:817: stamps/configure] Error 77
> dpkg-buildpackage: error: debian/rules build-arch subprocess returned exit status 2

This happens because the build system inserts a -m32 or -m64 option on
all architectures except arm*.

For Debian this can probably be removed completely, or at least changed
to whitelist the architectures this is supported on (these are the x86,
powerpc, s390 and sparc families I think). I've attached a patch which
does the latter.

Thanks,
James
--- a/make/autoconf/flags.m4
+++ b/make/autoconf/flags.m4
@@ -236,10 +236,11 @@ AC_DEFUN_ONCE([FLAGS_PRE_TOOLCHAIN],
   if test "x$TOOLCHAIN_TYPE" = xxlc; then
     MACHINE_FLAG="-q${OPENJDK_TARGET_CPU_BITS}"
   elif test "x$TOOLCHAIN_TYPE" != xmicrosoft; then
-    if test "x$OPENJDK_TARGET_CPU" != xaarch64 &&
-        test "x$OPENJDK_TARGET_CPU" != xarm; then
-      MACHINE_FLAG="-m${OPENJDK_TARGET_CPU_BITS}"
-    fi
+    case "$OPENJDK_TARGET_CPU" in
+      x86*|ppc*|s390*|sparc*)
+        MACHINE_FLAG="-m${OPENJDK_TARGET_CPU_BITS}"
+        ;;
+    esac
   fi
 
   # FIXME: global flags are not used yet...

Attachment: signature.asc
Description: OpenPGP digital signature