Re: [RFR]: 8186786: Name collisions with autoconf definitions on alpha and sh

2017-08-25 Thread John Paul Adrian Glaubitz

On 08/25/2017 11:28 PM, John Paul Adrian Glaubitz wrote:

Webrev can be found in [1].


Updated webrev in [1]. Removed the quotes around alpha and sh in
the comments to make it more consistent with the rest of the comments.

Adrian


[1] http://cr.openjdk.java.net/~glaubitz/8186786/webrev.02/


--
 .''`.  John Paul Adrian Glaubitz
: :' :  Debian Developer - glaub...@debian.org
`. `'   Freie Universitaet Berlin - glaub...@physik.fu-berlin.de
  `-GPG: 62FF 8A75 84E0 2956 9546  0006 7426 3B37 F5B5 F913



[RFR]: 8186786: Name collisions with autoconf definitions on alpha and sh

2017-08-25 Thread John Paul Adrian Glaubitz

Hi!

Please review the following change which fixes the build on alpha and
sh which fails due to name collisions with the autoconf definitions
-D$ARCH which expand to "-Dalpha" and "-Dsh" respectively on alpha
and sh.

The resulting build failure consequently is:

=== Output from failing command(s) repeated here ===
/usr/bin/printf "* For target 
support_native_java.desktop_libmlib_image_mlib_ImageAffine.o:\n"
* For target support_native_java.desktop_libmlib_image_mlib_ImageAffine.o:
(/bin/grep -v -e "^Note: including file:" <  
/<>/build/make-support/failure-logs/support_native_java.desktop_libmlib_image_mlib_ImageAffine.o.log
 || true) | /usr/bin/head -n 12
:0:7: error: expected ';', ',' or ')' before numeric constant
/<>/src/jdk/src/java.desktop/share/native/libmlib_image/mlib_image_proto.h:152:50:
 note: in expansion of macro 'alpha'
const mlib_image *alpha);
  ^
:0:7: error: expected ';', ',' or ')' before numeric constant
/<>/src/jdk/src/java.desktop/share/native/libmlib_image/mlib_image_proto.h:161:58:
 note: in expansion of macro 'alpha'
const mlib_image *alpha);
  ^
:0:7: error: expected ';', ',' or ')' before numeric constant
/<>/src/jdk/src/java.desktop/share/native/libmlib_image/mlib_image_proto.h:170:55:
 note: in expansion of macro 'alpha'
 const mlib_image *alpha);
   ^
if test `/usr/bin/wc -l < 
/<>/build/make-support/failure-logs/support_native_java.desktop_libmlib_image_mlib_ImageAffine.o.log`
 -gt 12; then /bin/echo "   ... (rest of output omitted)" ; fi
   ... (rest of output omitted)
/usr/bin/printf "\n* All command lines available in 
/<>/build/make-support/failure-logs.\n"

* All command lines available in 
/<>/build/make-support/failure-logs.
/usr/bin/printf "=== End of repeated output ===\n"
=== End of repeated output ===

To resolve this issue, it was enough extend the following code from common/
autoconf/platform.m4 to redefine OPENJDK_$1_CPU_LEGACY on alpha and sh:

  # Also store the legacy naming of the cpu.
  # Ie i586 and amd64 instead of x86 and x86_64
  OPENJDK_$1_CPU_LEGACY="$OPENJDK_$1_CPU"
  if test "x$OPENJDK_$1_CPU" = xx86; then
OPENJDK_$1_CPU_LEGACY="i586"
  elif test "x$OPENJDK_$1_OS" != xmacosx && test "x$OPENJDK_$1_CPU" = xx86_64; 
then
# On all platforms except MacOSX replace x86_64 with amd64.
OPENJDK_$1_CPU_LEGACY="amd64"
  fi

Webrev can be found in [1].

Thanks,
Adrian


[1] http://cr.openjdk.java.net/~glaubitz/8186786/webrev.01/


--
 .''`.  John Paul Adrian Glaubitz
: :' :  Debian Developer - glaub...@debian.org
`. `'   Freie Universitaet Berlin - glaub...@physik.fu-berlin.de
  `-GPG: 62FF 8A75 84E0 2956 9546  0006 7426 3B37 F5B5 F913