1# 2# CDDL HEADER START 3# 4# The contents of this file are subject to the terms of the 5# Common Development and Distribution License (the "License"). 6# You may not use this file except in compliance with the License. 7# 8# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 9# or http://www.opensolaris.org/os/licensing. 10# See the License for the specific language governing permissions 11# and limitations under the License. 12# 13# When distributing Covered Code, include this CDDL HEADER in each 14# file and include the License file at usr/src/OPENSOLARIS.LICENSE. 15# If applicable, add the following below this CDDL HEADER, with the 16# fields enclosed by brackets "[]" replaced with your own identifying 17# information: Portions Copyright [yyyy] [name of copyright owner] 18# 19# CDDL HEADER END 20# 21 22# 23# Copyright 2008 Sun Microsystems, Inc. All rights reserved. 24# Use is subject to license terms. 25# 26# ident "%Z%%M% %I% %E% SMI" 27# 28 29# The link-editor related source files and Makefile files are normally unified 30# across all presently maintained release gates. However, some of the compiler 31# pre-processor flags, linker flags are different among the releases. This 32# file is used to specify such flags. 33# 34# This file is included by ./Makefile.com, but may also be included directly 35# in the case where the utility is relying on the contents of 36# ../../Makefile.com. 37# 38# This file should be the only file which is different among the presently 39# maintained release workspaces and the files that generate the link-editors 40# and related tools. 41 42# 43# CPPFEATUREMACROS provides for selectively turning on/off features within the 44# build of ld.so.1 and liblddbg.so. 45# 46# Current values for ld.so.1 are: 47# 48# LD_BREADTH_DISABLED 49# per bug id 4313765, the LD_BREADTH= environment variable is no 50# longer checked. However, on older releases we still want to 51# keep this check valid. 52# 53# EXPAND_RELATIVE 54# per bug id 4336980 (and 4336878), relative path expansion is 55# insured at process startup. This implementation can come at 56# some cost unless the corresponding getcwd() implementation from 57# libc_pic.a is also available. On older releases defer any 58# relative pathname expansion until it is required. 59# 60# ISSOLOAD_BASENAME_DISABLED 61# The bugfix for bug#4469400 updates the logic by which 62# shared objects are loaded into memory (and makes it 63# more precise). However - this update to logic can 64# mess up the loading of objects which have a dependency 65# on both '/usr/lib/lwp/libthread.so.1' and 66# '/usr/lib/libthread.so.1'. The error that occurs is that 67# both libraries are loaded into memory - which doesn't 68# work out very well. This fix re-enables the `loose' 69# logic which was implemented on older releases to avoid 70# exposing problems with multiple libthreads. Since Soliars9 71# again only has one libthread - we can use the more precise 72# logic. 73# 74# SIEBEL_DISABLE 75# Prior to Solaris 10, bug fixes 4651709 and 4651493 were deter- 76# mined to be inappropriate for patch releases as they broke the 77# Siebel server. Siebel agree to fix their code in preparation 78# for these changes to become default in Solaris 10. Users who 79# want these fixes in patch releases can set LD__FIX__1. 80# 81# 82# Current value for liblddbg.so is: 83# 84# DEMANGLE 85# enable use of the "demangle" debug token. Old versions of the 86# demangle library libdemangle.so.1 used an excessive amount of 87# stack space that could cause debugging a threaded application 88# (with say LD_DEBUG=symbols,demangle) to segv because of an 89# exhausted stack. See 4376081. DEMANGLE should not be enabled 90# for patch builds. 91# 92# Note that demangling support within liblddbg.so.1 is always 93# available, as tools such as elfdump(1) and pvs(1) may call this 94# directly. These tools aren't threaded, and thus don't expose 95# the problems raised by enabling ld.so.1's debugging output. 96# 97# 98# Although most files are unified among on10-gate, on81-patch, and on28-patch 99# gates, some files in libld and rtld need to use #ifdef to distinguish between 100# the patch release, and for the packages targeting to the pre-libc/libthread 101# unified environment. These values are available for CPPFLAGS: 102# 103# SGS_PRE_UNIFIED_PROCESS 104# 105# is set if the target release is for pre-libc/libthread unified 106# environment. This is used for rtld and crle. 107 108# 109# Common Macro definitions 110# 111VAR_CPPFLAGS= 112 113VAR_LINTFLAGS64= -Xarch=$(MACH64:sparcv9=v9) 114VAR_I386_ARCH= intel 115 116VAR_PLAT_sparc= sparc 117VAR_PLAT_i386= intel/ia32 118VAR_PLAT_amd64= intel/amd64 119 120VAR_POUND_1= 121VAR_POUND_2= $(POUND_SIGN) 122VAR_POUND_3= $(POUND_SIGN) 123 124# 125# VAR_AVLDIR - directory to find avl.c in. 126# 127# The avl.c file is under usr/src/common/avl in Solaris 10 (and later), 128# but in earlier releases it is not present (problem to be solved). 129# 130# The avl.h and avl_impl.h files are under usr/src/uts/common/sys in 131# Solaris 10 (and later). They are under usr/src/cmd/sgs/tools/common/sys 132# in Solaris 9 and earlier. 133# 134# For Solaris 9 and earlier releases, we will have our own copy of the 135# files avl.c, avl.h and avl_impl.h until these files are back ported into 136# the system. 137# 138VAR_AVLDIR= $(SRCBASE)/common/avl 139VAR_AVLINCDIR= 140 141# 142# VAR_DTRDIR - directory to find dtrace_data.c in. 143# 144# In Solaris 10 and earlier releases, dtrace_data.c was maintained as separate 145# files under sgs/rtld. This file is now under usr/src/common/dtrace. 146# 147VAR_DTRDIR= $(SRCBASE)/common/dtrace 148 149# 150# VAR_SGSBINPROG 151# 152# For Solaris 10 and earlier releases, the SGS components were installed in 153# /usr/ccs/bin. These components are now installed in /usr/bin with associated 154# symbolic links for compatibility. For previous behavior, set the VAR_SGSBIN* 155# variables to the appropriate ROOTCCSBIN* rule and set the VAR_SGSCCSLINK* 156# rules to null. 157# 158VAR_SGSBIN= $(ROOTBIN) 159VAR_SGSBINPROG= $(ROOTPROG) 160VAR_SGSBIN64= $(ROOTBIN64) 161VAR_SGSBINPROG64= $(ROOTPROG64) 162 163VAR_SGSCCSLINK= $(ROOTCCSBINLINK) 164VAR_SGSCCSLINK64= $(ROOTCCSBINLINK64) 165 166# 167# ld 168# 169VAR_LD_NATIVE_LLDLIBS= 170VAR_LD_LLDFLAGS= '-R$$ORIGIN/../../lib' 171VAR_LD_LLDFLAGS64 = '-R$$ORIGIN/../../../lib/$(MACH64)' 172 173# 174# on 5.10 we no longer link against libdl - However we still 175# need to link against it when building the SUNWonld package (which 176# may run on 5.9 or 5.8 systems). 177# 178# Below are two macros - they should be toggled one way or the other 179# depending upon whether or not the base build provides '-ldl' or 180# the build of SUNWonld does. 181# 182VAR_PKG_DL_LIB = -ldl 183VAR_DL_LIB = 184 185# 186# elfdump 187# 188VAR_ELFDUMP_LLDFLAGS= '-R$$ORIGIN/../../lib' 189VAR_ELFDUMP_LLDFLAGS64 ='-R$$ORIGIN/../../../lib/$(MACH64)' 190 191# 192# elfedit 193# 194VAR_ELFEDIT_LLDFLAGS= '-R$$ORIGIN/../../lib' 195VAR_ELFEDIT_LLDFLAGS64 ='-R$$ORIGIN/../../../lib/$(MACH64)' 196 197# 198# lddstub 199# 200VAR_LDDSTUB_INTERP= -I'$$ORIGIN/ld.so.1' 201 202# 203# libconv 204# 205VAR_LIBCONV_CPPFLAGS= 206 207# 208# libdl 209# 210VAR_LIBDL_ROOT4LINK_LIBLINKPATH= ../../lib/ 211VAR_LIBDL_ETCDYNLIB= 212 213# 214# libelf 215# 216VAR_LIBELF_LDLIBS= 217VAR_LIBELF_ROOTDEMODIR_DIRMODE= 755 218 219# 220# libld 221# 222VAR_LIBLD_CPPFLAGS= $(VAR_COM_CPPFLAGS) \ 223 $(VAR_AVLINCDIR) 224VAR_LIBLD_64_ROOTFS_LIBDIR= $(ROOT)/lib/$(MACH64) 225 226# 227# Tools 228# 229VAR_TOOLS_CPPFLAGS= $(VAR_AVLINCDIR) 230 231# 232# liblddbg 233# 234VAR_LIBLDDBG_V9_ROOTFS_LIBDIR= $(ROOT)/lib/$(MACH64) 235VAR_LIBLDDBG_CPPFLAGS=-DDEMANGLE 236 237# 238# librtld_db 239# 240VAR_LIBRTLD_DB_RDB_DEMO_LINTFLAGS64= $(VAR_LINTFLAGS64) 241 242# 243# rtld 244# 245VAR_RTLD_CPICLIB= -L ../../../../lib/libc/$(MACH) 246VAR_RTLD_CPICLIB64= -L ../../../../lib/libc/$(MACH64) 247VAR_RTLD_SONAME= /lib/ld.so.1 248VAR_RTLD_V9_SONAME= /lib/sparcv9/ld.so.1 249 250VAR_RTLD_ETCDYNLIB= 251VAR_RTLD_CPPFEATUREMACROS= \ 252 -DLD_BREADTH_DISABLED \ 253 -DEXPAND_RELATIVE \ 254 -DISSOLOAD_BASENAME_DISABLED 255VAR_RTLD_CPPFLAGS= $(VAR_AVLINCDIR) 256VAR_RTLD_EXTRASUBDIRS= mdbmod 257