< prev index next >

common/autoconf/flags.m4

Print this page


   1 #
   2 # Copyright (c) 2011, 2015, 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


 240 
 241   if test "x$TOOLCHAIN_TYPE" = xgcc; then
 242     PICFLAG="-fPIC"
 243     C_FLAG_REORDER=''
 244     CXX_FLAG_REORDER=''
 245 
 246     if test "x$OPENJDK_TARGET_OS" = xmacosx; then
 247       # Linking is different on MacOSX
 248       if test "x$STATIC_BUILD" = xtrue; then
 249         SHARED_LIBRARY_FLAGS ='-undefined dynamic_lookup'
 250       else
 251         SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
 252       fi
 253       SET_EXECUTABLE_ORIGIN='-Wl,-rpath,@loader_path/.'
 254       SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
 255       SET_SHARED_LIBRARY_NAME='-Wl,-install_name,@rpath/[$]1'
 256       SET_SHARED_LIBRARY_MAPFILE=''
 257     else
 258       # Default works for linux, might work on other platforms as well.
 259       SHARED_LIBRARY_FLAGS='-shared'
 260       SET_EXECUTABLE_ORIGIN='-Wl,-rpath,\$$$$ORIGIN[$]1'
 261       SET_SHARED_LIBRARY_ORIGIN="-Wl,-z,origin $SET_EXECUTABLE_ORIGIN"





 262       SET_SHARED_LIBRARY_NAME='-Wl,-soname=[$]1'
 263       SET_SHARED_LIBRARY_MAPFILE='-Wl,-version-script=[$]1'
 264     fi
 265   elif test "x$TOOLCHAIN_TYPE" = xclang; then
 266     C_FLAG_REORDER=''
 267     CXX_FLAG_REORDER=''
 268 
 269     if test "x$OPENJDK_TARGET_OS" = xmacosx; then
 270       # Linking is different on MacOSX
 271       PICFLAG=''
 272       SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
 273       SET_EXECUTABLE_ORIGIN='-Wl,-rpath,@loader_path/.'
 274       SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
 275       SET_SHARED_LIBRARY_NAME='-Wl,-install_name,@rpath/[$]1'
 276       SET_SHARED_LIBRARY_MAPFILE=''
 277     else
 278       # Default works for linux, might work on other platforms as well.
 279       PICFLAG='-fPIC'
 280       SHARED_LIBRARY_FLAGS='-shared'
 281       SET_EXECUTABLE_ORIGIN='-Wl,-rpath,\$$$$ORIGIN[$]1'
 282       SET_SHARED_LIBRARY_ORIGIN="-Wl,-z,origin $SET_EXECUTABLE_ORIGIN"





 283       SET_SHARED_LIBRARY_NAME='-Wl,-soname=[$]1'
 284       SET_SHARED_LIBRARY_MAPFILE='-Wl,-version-script=[$]1'
 285     fi
 286   elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
 287     PICFLAG="-KPIC"
 288     C_FLAG_REORDER='-xF'
 289     CXX_FLAG_REORDER='-xF'
 290     SHARED_LIBRARY_FLAGS="-G"
 291     SET_EXECUTABLE_ORIGIN='-R\$$$$ORIGIN[$]1'
 292     SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
 293     SET_SHARED_LIBRARY_NAME='-h [$]1'
 294     SET_SHARED_LIBRARY_MAPFILE='-M[$]1'
 295   elif test "x$TOOLCHAIN_TYPE" = xxlc; then
 296     PICFLAG="-qpic=large"
 297     C_FLAG_REORDER=''
 298     CXX_FLAG_REORDER=''
 299     SHARED_LIBRARY_FLAGS="-qmkshrobj"
 300     SET_EXECUTABLE_ORIGIN=""
 301     SET_SHARED_LIBRARY_ORIGIN=''
 302     SET_SHARED_LIBRARY_NAME=''


   1 #
   2 # Copyright (c) 2011, 2016, 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


 240 
 241   if test "x$TOOLCHAIN_TYPE" = xgcc; then
 242     PICFLAG="-fPIC"
 243     C_FLAG_REORDER=''
 244     CXX_FLAG_REORDER=''
 245 
 246     if test "x$OPENJDK_TARGET_OS" = xmacosx; then
 247       # Linking is different on MacOSX
 248       if test "x$STATIC_BUILD" = xtrue; then
 249         SHARED_LIBRARY_FLAGS ='-undefined dynamic_lookup'
 250       else
 251         SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
 252       fi
 253       SET_EXECUTABLE_ORIGIN='-Wl,-rpath,@loader_path/.'
 254       SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
 255       SET_SHARED_LIBRARY_NAME='-Wl,-install_name,@rpath/[$]1'
 256       SET_SHARED_LIBRARY_MAPFILE=''
 257     else
 258       # Default works for linux, might work on other platforms as well.
 259       SHARED_LIBRARY_FLAGS='-shared'
 260       if test "x$OPENJDK_TARGET_OS_ENV" = xbsd.netbsd; then
 261         # -rpath $ORIGIN is broken on NetBSD.
 262         SET_EXECUTABLE_ORIGIN=''
 263       else
 264         SET_EXECUTABLE_ORIGIN='-Wl,-z,origin -Wl,-rpath,\$$$$ORIGIN[$]1'
 265       fi
 266       SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
 267       SET_SHARED_LIBRARY_NAME='-Wl,-soname=[$]1'
 268       SET_SHARED_LIBRARY_MAPFILE='-Wl,-version-script=[$]1'
 269     fi
 270   elif test "x$TOOLCHAIN_TYPE" = xclang; then
 271     C_FLAG_REORDER=''
 272     CXX_FLAG_REORDER=''
 273 
 274     if test "x$OPENJDK_TARGET_OS" = xmacosx; then
 275       # Linking is different on MacOSX
 276       PICFLAG=''
 277       SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
 278       SET_EXECUTABLE_ORIGIN='-Wl,-rpath,@loader_path/.'
 279       SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
 280       SET_SHARED_LIBRARY_NAME='-Wl,-install_name,@rpath/[$]1'
 281       SET_SHARED_LIBRARY_MAPFILE=''
 282     else
 283       # Default works for linux, might work on other platforms as well.
 284       PICFLAG='-fPIC'
 285       SHARED_LIBRARY_FLAGS='-shared'
 286       if test "x$OPENJDK_TARGET_OS_ENV" = xbsd.netbsd; then
 287         # -rpath $ORIGIN is broken on NetBSD.
 288         SET_EXECUTABLE_ORIGIN=''
 289       else
 290         SET_EXECUTABLE_ORIGIN='-Wl,-z,origin -Wl,-rpath,\$$$$ORIGIN[$]1'
 291       fi
 292       SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
 293       SET_SHARED_LIBRARY_NAME='-Wl,-soname=[$]1'
 294       SET_SHARED_LIBRARY_MAPFILE='-Wl,-version-script=[$]1'
 295     fi
 296   elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
 297     PICFLAG="-KPIC"
 298     C_FLAG_REORDER='-xF'
 299     CXX_FLAG_REORDER='-xF'
 300     SHARED_LIBRARY_FLAGS="-G"
 301     SET_EXECUTABLE_ORIGIN='-R\$$$$ORIGIN[$]1'
 302     SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
 303     SET_SHARED_LIBRARY_NAME='-h [$]1'
 304     SET_SHARED_LIBRARY_MAPFILE='-M[$]1'
 305   elif test "x$TOOLCHAIN_TYPE" = xxlc; then
 306     PICFLAG="-qpic=large"
 307     C_FLAG_REORDER=''
 308     CXX_FLAG_REORDER=''
 309     SHARED_LIBRARY_FLAGS="-qmkshrobj"
 310     SET_EXECUTABLE_ORIGIN=""
 311     SET_SHARED_LIBRARY_ORIGIN=''
 312     SET_SHARED_LIBRARY_NAME=''


< prev index next >