Name clashes - was: Re: [RFR]: 8186723: Add SuperH as new architecture for linux

John Paul Adrian Glaubitz glaubitz at physik.fu-berlin.de
Thu Aug 24 12:44:30 UTC 2017


On 08/24/2017 01:21 PM, John Paul Adrian Glaubitz wrote:
> Ok, so let's continue here as I'm not sure whether this issue should be addressed
> before merging the above changeset.  In my opinion, it's generally rather suboptimal
> approach to use any global defines without surrounding underscores. But I am currently
> undecided what would be the best approach to resolve this problem.

I think there are three options:

a) Use something similar as on x86/x86_64 to rename "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
   AC_SUBST(OPENJDK_$1_CPU_LEGACY)

   # And the second legacy naming of the cpu.
   # Ie i386 and amd64 instead of x86 and x86_64.
   OPENJDK_$1_CPU_LEGACY_LIB="$OPENJDK_$1_CPU"
   if test "x$OPENJDK_$1_CPU" = xx86; then
     OPENJDK_$1_CPU_LEGACY_LIB="i386"
   elif test "x$OPENJDK_$1_CPU" = xx86_64; then
     OPENJDK_$1_CPU_LEGACY_LIB="amd64"
   fi
   AC_SUBST(OPENJDK_$1_CPU_LEGACY_LIB

b) Rename VAR_CPU for Alpha and SuperH:

    alpha => dec_alpha
    sh    => superh

c) Pass OPENJDK_$1_CPU_LEGACY with underscores.

    This one might have ramifications on other targets depending
    on how OPENJDK_$1_CPU_LEGACY is used throughout the code.

Suggestions?

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