Defs-linux.gmk revision 157
0N/A# Copyright (c) 1999, 2007, Oracle and/or its affiliates. All rights reserved. 0N/A# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 0N/A# This code is free software; you can redistribute it and/or modify it 0N/A# under the terms of the GNU General Public License version 2 only, as 0N/A# published by the Free Software Foundation. Oracle designates this 0N/A# particular file as subject to the "Classpath" exception as provided 0N/A# by Oracle in the LICENSE file that accompanied this code. 0N/A# This code is distributed in the hope that it will be useful, but WITHOUT 0N/A# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 0N/A# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 0N/A# version 2 for more details (a copy is included in the LICENSE file that 0N/A# accompanied this code). 0N/A# You should have received a copy of the GNU General Public License version 0N/A# 2 along with this work; if not, write to the Free Software Foundation, 0N/A# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 5012N/A# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 0N/A# Makefile to specify compiler flags for programs and libraries 5012N/A# targeted to Linux. Should not contain any rules. 0N/A# Warning: the following variables are overriden by Defs.gmk. Set 5012N/A# values will be silently ignored: 5012N/A# CFLAGS (set $(OTHER_CFLAGS) instead) 0N/A# CPPFLAGS (set $(OTHER_CPPFLAGS) instead) 5012N/A# CXXFLAGS (set $(OTHER_CXXFLAGS) instead) 5012N/A# LDFLAGS (set $(OTHER_LDFAGS) instead) 0N/A# LDLIBS (set $(EXTRA_LIBS) instead) 0N/A# LDLIBS_COMMON (set $(EXTRA_LIBS) instead) 5012N/A# Part of INCREMENTAL_BUILD mechanism. # platform specific include files # suffix used for make dependencies files. # The suffix applied to the library name for FDLIBM # The suffix applied to scripts (.bat for windows, nothing for unix) # CC compiler object code output directive flag value # Default HPI libraries. Build will build only native, unless # overriden at the make command line. This makes it convenient for # people doing, say, a pthreads port -- they can create a posix # directory here, and say "gnumake HPIS=posix" at the top # For all platforms, do not omit the frame pointer register usage. # We need this frame pointer to make it easy to walk the stacks. # This should be the default on X86, but ia64 and amd64 may not have this # Add in platform specific optimizations for all opt levels # If NO_OPTIMIZATIONS is defined in the environment, turn all optimzations off # Selection of warning messages # Treat compiler warnings as errors, if warnings not allowed # Linux 64bit machines use Dwarf2, which can be HUGE, have fastdebug use -g1 # FASTDEBUG: Optimize the code in the -g versions, gives us a faster debug java # Libraries need to locate other libraries at runtime, and you can tell # a library where to look by way of the dynamic runpaths (RPATH or RUNPATH) # buried inside the .so. The $ORIGIN says to look relative to where # the library itself is and it can be followed with relative paths from # that. By default we always look in $ORIGIN, optionally we add relative # paths if the Makefile sets LD_RUNPATH_EXTRAS to those relative paths. # On Linux we add a flag -z origin, not sure if this is necessary, but # The environment variable LD_LIBRARY_PATH will over-ride these runpaths. # Try: 'readelf -d lib*.so' to see these settings in a library. # -L paths for finding and -ljava # -static-libgcc is a gcc-3 flag to statically link libgcc, gcc-2.9x always # statically link libgcc but will print a warning with the flag. We don't # want the warning, so check gcc version first. # Automatic precompiled header option to use (if COMPILE_APPROACH=batch) # (See Rules.gmk) The gcc 5 compiler might have an option for this? # Debug 'strip -g' leaves local function Elf symbols (better stack traces) # Use: ld $(LD_MAPFILE_FLAG) mapfile *.o # Path and option to link against the VM, if you have to. Note that # there are libraries that link against only -ljava, but they do get # -L to the -ljvm, this is because -ljava depends on -ljvm, whereas # the library itself should not. # We want to privatize JVM symbols on Solaris. This is so the user can # write a function called FindClass and this should not override the # FindClass that is inside the JVM. At this point in time we are not # concerned with other JNI libraries because we hope that there will # not be as many clashes there. # USE_EXECNAME forces the launcher to look up argv[0] on $PATH, and put the # resulting resolved absolute name of the executable in the environment # variable EXECNAME. That executable name is then used that to locate the # If your platform has DPS, it will have Type1 fonts too, in which case # it is best to enable DPS support until such time as 2D's rasteriser # can fully handle Type1 fonts in all cases. Default is "yes". # HAVE_DPS should only be "no" if the platform has no DPS headers or libs # DPS (Displayable PostScript) is available on Solaris machines