[RFR]: 8186786: Name collisions with autoconf definitions on alpha and sh
David Holmes
david.holmes at oracle.com
Sun Aug 27 21:44:39 UTC 2017
Hi Adrian,
On 26/08/2017 7:28 AM, John Paul Adrian Glaubitz wrote:
> 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:" <
> /<<PKGBUILDDIR>>/build/make-support/failure-logs/support_native_java.desktop_libmlib_image_mlib_ImageAffine.o.log
> || true) | /usr/bin/head -n 12
> <command-line>:0:7: error: expected ';', ',' or ')' before numeric constant
> /<<PKGBUILDDIR>>/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);
> ^~~~~
> <command-line>:0:7: error: expected ';', ',' or ')' before numeric constant
> /<<PKGBUILDDIR>>/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);
> ^~~~~
> <command-line>:0:7: error: expected ';', ',' or ')' before numeric constant
> /<<PKGBUILDDIR>>/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 <
> /<<PKGBUILDDIR>>/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
> /<<PKGBUILDDIR>>/build/make-support/failure-logs.\n"
>
> * All command lines available in
> /<<PKGBUILDDIR>>/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
I think this highlights a problem with the existence and use of the
-D$OPENJDK_$1_CPU_LEGACY"
definition in the flags. But trying to change that would be a big
undertaking. So your solution seems the only viable one.
Thanks,
David
> Webrev can be found in [1].
>
> Thanks,
> Adrian
>
>> [1] http://cr.openjdk.java.net/~glaubitz/8186786/webrev.01/
>
More information about the build-dev
mailing list