Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8205649

Make clang stack flags independent of OS

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 11
    • Component/s: infrastructure
    • Labels:
      None
    • Subcomponent:
    • Resolved In Build:
      b20

      Backports

        Description

        Currently we have clang stack alignment flags defined only for macosx

        They should be TOOLCHAIN_CFLAGS_JVM flags instead

        --- a/make/autoconf/flags-cflags.m4
        +++ b/make/autoconf/flags-cflags.m4
        @@ -470,6 +470,14 @@ AC_DEFUN([FLAGS_SETUP_CFLAGS_HELPER],
             # COMMON to gcc and clang
             TOOLCHAIN_CFLAGS_JVM="-pipe -fno-rtti -fno-exceptions \
                 -fvisibility=hidden -fno-strict-aliasing -fno-omit-frame-pointer"
        +
        + if test "x$TOOLCHAIN_TYPE" = xclang; then
        + # In principle the stack alignment below is cpu- and ABI-dependent and
        + # should agree with values of StackAlignmentInBytes in various
        + # src/hotspot/cpu/*/globalDefinitions_*.hpp files, but this value
        + # currently works for all platforms.
        + TOOLCHAIN_CFLAGS_JVM="$TOOLCHAIN_CFLAGS_JVM -mno-omit-leaf-frame-pointer -mstack-alignment=16"
        + fi
           fi
         
           if test "x$TOOLCHAIN_TYPE" = xgcc; then
        @@ -601,10 +609,6 @@ AC_DEFUN([FLAGS_SETUP_CFLAGS_HELPER],
             fi
           fi
         
        - if test "x$OPENJDK_TARGET_OS" = xmacosx; then
        - OS_CFLAGS_JVM="$OS_CFLAGS_JVM -mno-omit-leaf-frame-pointer -mstack-alignment=16"
        - fi
        -
           # Optional POSIX functionality needed by the JVM
           #
           # Check if clock_gettime is available and in which library. This indicates

          Attachments

            Issue Links

              Activity

                People

                Assignee:
                martin Martin Buchholz
                Reporter:
                martin Martin Buchholz
                Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                  Dates

                  Created:
                  Updated:
                  Resolved: