< prev index next >

make/autoconf/toolchain.m4

Print this page


   1 #
   2 # Copyright (c) 2011, 2019, Oracle and/or its affiliates. All rights reserved.
   3 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4 #
   5 # This code is free software; you can redistribute it and/or modify it
   6 # under the terms of the GNU General Public License version 2 only, as
   7 # published by the Free Software Foundation.  Oracle designates this
   8 # particular file as subject to the "Classpath" exception as provided
   9 # by Oracle in the LICENSE file that accompanied this code.
  10 #
  11 # This code is distributed in the hope that it will be useful, but WITHOUT
  12 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  13 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  14 # version 2 for more details (a copy is included in the LICENSE file that
  15 # accompanied this code).
  16 #
  17 # You should have received a copy of the GNU General Public License version
  18 # 2 along with this work; if not, write to the Free Software Foundation,
  19 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20 #
  21 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22 # or visit www.oracle.com if you need additional information or have any


 269       AC_MSG_NOTICE([Valid toolchains: $VALID_TOOLCHAINS.])
 270       AC_MSG_ERROR([Cannot continue.])
 271     fi
 272     TOOLCHAIN_TYPE=$with_toolchain_type
 273   else
 274     # No flag given, use default
 275     TOOLCHAIN_TYPE=$DEFAULT_TOOLCHAIN
 276   fi
 277   AC_SUBST(TOOLCHAIN_TYPE)
 278 
 279   # on AIX, check for xlclang++ on the PATH and TOOLCHAIN_PATH and use it if it is available
 280   if test "x$OPENJDK_TARGET_OS" = xaix; then
 281     if test "x$TOOLCHAIN_PATH" != x; then
 282       XLC_TEST_PATH=${TOOLCHAIN_PATH}/
 283     fi
 284 
 285     XLCLANG_VERSION_OUTPUT=`${XLC_TEST_PATH}xlclang++ -qversion 2>&1 | $HEAD -n 1`
 286     $ECHO "$XLCLANG_VERSION_OUTPUT" | $GREP "IBM XL C/C++ for AIX" > /dev/null
 287     if test $? -eq 0; then
 288       AC_MSG_NOTICE([xlclang++ output: $XLCLANG_VERSION_OUTPUT])
 289     else
 290       AC_MSG_ERROR([xlclang++ version output check failed, output: $XLCLANG_VERSION_OUTPUT])
 291     fi
 292   fi
 293 
 294   TOOLCHAIN_CC_BINARY_clang="clang"
 295   TOOLCHAIN_CC_BINARY_gcc="gcc"
 296   TOOLCHAIN_CC_BINARY_microsoft="cl$EXE_SUFFIX"
 297   TOOLCHAIN_CC_BINARY_solstudio="cc"
 298   TOOLCHAIN_CC_BINARY_xlc="xlclang"
 299 
 300   TOOLCHAIN_CXX_BINARY_clang="clang++"
 301   TOOLCHAIN_CXX_BINARY_gcc="g++"
 302   TOOLCHAIN_CXX_BINARY_microsoft="cl$EXE_SUFFIX"
 303   TOOLCHAIN_CXX_BINARY_solstudio="CC"
 304   TOOLCHAIN_CXX_BINARY_xlc="xlclang++"








 305 
 306   # Use indirect variable referencing
 307   toolchain_var_name=TOOLCHAIN_DESCRIPTION_$TOOLCHAIN_TYPE
 308   TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
 309   toolchain_var_name=TOOLCHAIN_MINIMUM_VERSION_$TOOLCHAIN_TYPE
 310   TOOLCHAIN_MINIMUM_VERSION=${!toolchain_var_name}
 311   toolchain_var_name=TOOLCHAIN_MINIMUM_LD_VERSION_$TOOLCHAIN_TYPE
 312   TOOLCHAIN_MINIMUM_LD_VERSION=${!toolchain_var_name}
 313   toolchain_var_name=TOOLCHAIN_CC_BINARY_$TOOLCHAIN_TYPE
 314   TOOLCHAIN_CC_BINARY=${!toolchain_var_name}
 315   toolchain_var_name=TOOLCHAIN_CXX_BINARY_$TOOLCHAIN_TYPE
 316   TOOLCHAIN_CXX_BINARY=${!toolchain_var_name}
 317 
 318   TOOLCHAIN_SETUP_FILENAME_PATTERNS
 319 
 320   if test "x$TOOLCHAIN_TYPE" = "x$DEFAULT_TOOLCHAIN"; then
 321     AC_MSG_NOTICE([Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)])
 322   else
 323     AC_MSG_NOTICE([Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN.])
 324   fi


   1 #
   2 # Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved.
   3 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4 #
   5 # This code is free software; you can redistribute it and/or modify it
   6 # under the terms of the GNU General Public License version 2 only, as
   7 # published by the Free Software Foundation.  Oracle designates this
   8 # particular file as subject to the "Classpath" exception as provided
   9 # by Oracle in the LICENSE file that accompanied this code.
  10 #
  11 # This code is distributed in the hope that it will be useful, but WITHOUT
  12 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  13 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  14 # version 2 for more details (a copy is included in the LICENSE file that
  15 # accompanied this code).
  16 #
  17 # You should have received a copy of the GNU General Public License version
  18 # 2 along with this work; if not, write to the Free Software Foundation,
  19 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20 #
  21 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22 # or visit www.oracle.com if you need additional information or have any


 269       AC_MSG_NOTICE([Valid toolchains: $VALID_TOOLCHAINS.])
 270       AC_MSG_ERROR([Cannot continue.])
 271     fi
 272     TOOLCHAIN_TYPE=$with_toolchain_type
 273   else
 274     # No flag given, use default
 275     TOOLCHAIN_TYPE=$DEFAULT_TOOLCHAIN
 276   fi
 277   AC_SUBST(TOOLCHAIN_TYPE)
 278 
 279   # on AIX, check for xlclang++ on the PATH and TOOLCHAIN_PATH and use it if it is available
 280   if test "x$OPENJDK_TARGET_OS" = xaix; then
 281     if test "x$TOOLCHAIN_PATH" != x; then
 282       XLC_TEST_PATH=${TOOLCHAIN_PATH}/
 283     fi
 284 
 285     XLCLANG_VERSION_OUTPUT=`${XLC_TEST_PATH}xlclang++ -qversion 2>&1 | $HEAD -n 1`
 286     $ECHO "$XLCLANG_VERSION_OUTPUT" | $GREP "IBM XL C/C++ for AIX" > /dev/null
 287     if test $? -eq 0; then
 288       AC_MSG_NOTICE([xlclang++ output: $XLCLANG_VERSION_OUTPUT])
 289       XLC_USES_CLANG=true

 290     fi
 291   fi
 292 
 293   TOOLCHAIN_CC_BINARY_clang="clang"
 294   TOOLCHAIN_CC_BINARY_gcc="gcc"
 295   TOOLCHAIN_CC_BINARY_microsoft="cl$EXE_SUFFIX"
 296   TOOLCHAIN_CC_BINARY_solstudio="cc"
 297   TOOLCHAIN_CC_BINARY_xlc="xlc_r"
 298 
 299   TOOLCHAIN_CXX_BINARY_clang="clang++"
 300   TOOLCHAIN_CXX_BINARY_gcc="g++"
 301   TOOLCHAIN_CXX_BINARY_microsoft="cl$EXE_SUFFIX"
 302   TOOLCHAIN_CXX_BINARY_solstudio="CC"
 303   TOOLCHAIN_CXX_BINARY_xlc="xlC_r"
 304 
 305   if test "x$OPENJDK_TARGET_OS" = xaix; then
 306     if test "x$XLC_USES_CLANG" = xtrue; then
 307       AC_MSG_NOTICE([xlclang++ detected, using it])
 308       TOOLCHAIN_CC_BINARY_xlc="xlclang"
 309       TOOLCHAIN_CXX_BINARY_xlc="xlclang++"
 310     fi
 311   fi
 312 
 313   # Use indirect variable referencing
 314   toolchain_var_name=TOOLCHAIN_DESCRIPTION_$TOOLCHAIN_TYPE
 315   TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
 316   toolchain_var_name=TOOLCHAIN_MINIMUM_VERSION_$TOOLCHAIN_TYPE
 317   TOOLCHAIN_MINIMUM_VERSION=${!toolchain_var_name}
 318   toolchain_var_name=TOOLCHAIN_MINIMUM_LD_VERSION_$TOOLCHAIN_TYPE
 319   TOOLCHAIN_MINIMUM_LD_VERSION=${!toolchain_var_name}
 320   toolchain_var_name=TOOLCHAIN_CC_BINARY_$TOOLCHAIN_TYPE
 321   TOOLCHAIN_CC_BINARY=${!toolchain_var_name}
 322   toolchain_var_name=TOOLCHAIN_CXX_BINARY_$TOOLCHAIN_TYPE
 323   TOOLCHAIN_CXX_BINARY=${!toolchain_var_name}
 324 
 325   TOOLCHAIN_SETUP_FILENAME_PATTERNS
 326 
 327   if test "x$TOOLCHAIN_TYPE" = "x$DEFAULT_TOOLCHAIN"; then
 328     AC_MSG_NOTICE([Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)])
 329   else
 330     AC_MSG_NOTICE([Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN.])
 331   fi


< prev index next >