[RFR]: 8186723: Add SuperH as new architecture for linux

Thomas Stüfe thomas.stuefe at gmail.com
Thu Aug 24 09:57:19 UTC 2017


Hi Adrian,

On Thu, Aug 24, 2017 at 11:18 AM, John Paul Adrian Glaubitz <
glaubitz at physik.fu-berlin.de> wrote:

> Hi Thomas!
>
> On 08/24/2017 10:57 AM, Thomas Stüfe wrote:
>
>> Out of curiosity, would that not be __sh__ instead of SH? Who defines SH?
>>
>
> This definition comes from common/autoconf/flags.m4:
>
>   # Setup target CPU
>   $2COMMON_CCXXFLAGS_JDK="[$]$2COMMON_CCXXFLAGS_JDK \
>       $OPENJDK_$1_ADD_LP64 \
>       -DARCH='\"$OPENJDK_$1_CPU_LEGACY\"' -D$OPENJDK_$1_CPU_LEGACY"
>
> It's used in the same way for other architectures like SPARC and M68K.
>
> Although I am not 100% sure where the uppercase definitions comes from.
>
> However, looking at a build log, one finds:
>
> ( /usr/bin/sh4-linux-gnu-g++-6 -I/<<PKGBUILDDIR>>/build/hotsp
> ot/variant-zero/libjvm/objs/precompiled -std=gnu++98 -D_GNU_SOURCE
> -D_REENTRANT -fcheck-new -fno-delete-null-pointer-checks
> -fno-lifetime-dse -DLINUX -pipe -fPIC -fno-rtti -fno-exceptions
> -fvisibility=hidden -fno-strict-aliasing -fno-omit-frame-pointer
> -DVM_LITTLE_ENDIAN -Wpointer-arith -Wsign-compare -Wunused-function
> -Wunused-value -Woverloaded-virtual -Wno-format-zero-length -Wtype-limits
> -Wuninitialized -DPRODUCT -DTARGET_ARCH_zero -DINCLUDE_SUFFIX_OS=_linux
> -DINCLUDE_SUFFIX_CPU=_zero -DTARGET_COMPILER_gcc -DSH
> -DHOTSPOT_LIB_ARCH='"sh"' -DDEB_MULTIARCH="\"sh4-linux-gnu\"" -DZERO
> -DCC_INTERP -DZERO_LIBARCH='"sh"' -DINCLUDE_JVMCI=0
> -I/<<PKGBUILDDIR>>/src/hotspot/src/share/vm -I/<<PKGBUILDDIR>>/src/hotspot/src/os/linux/vm
> -I/<<PKGBUILDDIR>>/src/hotspot/src/os/posix/vm
> -I/<<PKGBUILDDIR>>/src/hotspot/src/cpu/zero/vm
> -I/<<PKGBUILDDIR>>/src/hotspot/src/os_cpu/linux_zero/vm
> -I/<<PKGBUILDDIR>>/build/hotspot/variant-zero/gensrc
> -I/<<PKGBUILDDIR>>/src/hotspot/src/share/vm/precompiled
> -I/<<PKGBUILDDIR>>/src/hotspot/src/share/vm/prims -Wdate-time
> -D_FORTIFY_SOURCE=2 -g -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -Wformat
> -fno-stack-protector -Wno-deprecated-declarations -Wdate-time
> -D_FORTIFY_SOURCE=2 -g -O3 -DTHIS_FILE='"utf8.cpp"' -c -MMD -MF
> /<<PKGBUILDDIR>>/build/hotspot/variant-zero/libjvm/objs/utf8.d -o
> /<<PKGBUILDDIR>>/build/hotspot/variant-zero/libjvm/objs/utf8.o
> /<<PKGBUILDDIR>>/src/hotspot/src/share/vm/utilities/utf8.cpp >
> >(/usr/bin/tee /<<PKGBUILDDIR>>/build/hotspot/variant-zero/libjvm/objs/utf8.o.log)
> 2> >(/usr/bin/tee /<<PKGBUILDDIR>>/build/hotspot/variant-zero/libjvm/objs/utf8.o.log
> >&2) || ( exitcode=$? && /bin/cp /<<PKGBUILDDIR>>/build/hotspot
> /variant-zero/libjvm/objs/utf8.o.log /<<PKGBUILDDIR>>/build/make-su
> pport/failure-logs/hotspot_variant-zero_libjvm_objs_utf8.o.log && /bin/cp
> /<<PKGBUILDDIR>>/build/hotspot/variant-zero/libjvm/objs/utf8.o.cmdline
> /<<PKGBUILDDIR>>/build/make-support/failure-logs/hotspot_var
> iant-zero_libjvm_objs_utf8.o.cmdline && exit $exitcode ) )
> /bin/sed -e 's/#.*//' -e 's/^[^:]*: *//' -e 's/ *\\$//' -e 's/^[
>  ]*//' -e '/^$/ d' -e 's/$/ :/'  /<<PKGBUILDDIR>>/build/hotspot
> /variant-zero/libjvm/objs/utf8.d > /<<PKGBUILDDIR>>/build/hotspot
> /variant-zero/libjvm/objs/utf8.d.targets
> Compiling verificationType.cpp (for libjvm.so)
>
> So, -DSH is passed to the compiler.
>
> Also, is LE the norm and BE needs to be mentioned in particular instead of
>> the other way around, like with PowerPC?
>>
> Yes. On Linux, the default endianess for SuperH is little-endian.
>
>
Ah, I see it. "sh" was introduced by you in JDK-8186313 in platform.m4
(VAR_CPU). I just wondered why this macro was so shortish and whether we
would risk potential name clashes with other macros.

I am fine with this change. Reviewed.

Cheers, Thomas




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


More information about the hotspot-dev mailing list