xref: /titanic_44/usr/src/cmd/sgs/Makefile.var (revision 6a634c9dca3093f3922e4b7ab826d7bdf17bf78e)
17c478bd9Sstevel@tonic-gate#
27c478bd9Sstevel@tonic-gate# CDDL HEADER START
37c478bd9Sstevel@tonic-gate#
47c478bd9Sstevel@tonic-gate# The contents of this file are subject to the terms of the
55aefb655Srie# Common Development and Distribution License (the "License").
65aefb655Srie# You may not use this file except in compliance with the License.
77c478bd9Sstevel@tonic-gate#
87c478bd9Sstevel@tonic-gate# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
97c478bd9Sstevel@tonic-gate# or http://www.opensolaris.org/os/licensing.
107c478bd9Sstevel@tonic-gate# See the License for the specific language governing permissions
117c478bd9Sstevel@tonic-gate# and limitations under the License.
127c478bd9Sstevel@tonic-gate#
137c478bd9Sstevel@tonic-gate# When distributing Covered Code, include this CDDL HEADER in each
147c478bd9Sstevel@tonic-gate# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
157c478bd9Sstevel@tonic-gate# If applicable, add the following below this CDDL HEADER, with the
167c478bd9Sstevel@tonic-gate# fields enclosed by brackets "[]" replaced with your own identifying
177c478bd9Sstevel@tonic-gate# information: Portions Copyright [yyyy] [name of copyright owner]
187c478bd9Sstevel@tonic-gate#
197c478bd9Sstevel@tonic-gate# CDDL HEADER END
207c478bd9Sstevel@tonic-gate#
215aefb655Srie
225aefb655Srie#
23*20c1c355SRod Evans# Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
247c478bd9Sstevel@tonic-gate#
257c478bd9Sstevel@tonic-gate
2656deab07SRod Evans# The link-editor related source files and Makefile files have at times been
2756deab07SRod Evans# unified across all presently maintained release gates.  However, some of the
2856deab07SRod Evans# compiler pre-processor flags and link-editor flags are different among the
2956deab07SRod Evans# releases.  This file is used to specify such flags.
307c478bd9Sstevel@tonic-gate#
3156deab07SRod Evans# This file is included by ./Makefile.com, but may also be included directly in
3256deab07SRod Evans# the case where the utility is relying on the contents of ../../Makefile.com.
337c478bd9Sstevel@tonic-gate#
345aefb655Srie# This file should be the only file which is different among the presently
3556deab07SRod Evans# maintained release workspaces, when the sources are unified.
367c478bd9Sstevel@tonic-gate#
377c478bd9Sstevel@tonic-gate# CPPFEATUREMACROS provides for selectively turning on/off features within the
3856deab07SRod Evans# various link-editor components.  Presently, none are set.
397c478bd9Sstevel@tonic-gate#
4056deab07SRod Evans# Some source files need to use #ifdef to distinguish between the patch release,
4156deab07SRod Evans# and for the packages targeting to the pre-libc/libthread unified environment.
4256deab07SRod Evans# These values are available for CPPFLAGS:
437c478bd9Sstevel@tonic-gate#
447c478bd9Sstevel@tonic-gate#	SGS_PRE_UNIFIED_PROCESS
457c478bd9Sstevel@tonic-gate#
467c478bd9Sstevel@tonic-gate#		is set if the target release is for pre-libc/libthread unified
477c478bd9Sstevel@tonic-gate#		environment. This is used for rtld and crle.
487c478bd9Sstevel@tonic-gate
497c478bd9Sstevel@tonic-gate#
507c478bd9Sstevel@tonic-gate# Common Macro definitions
517c478bd9Sstevel@tonic-gate#
520bb07399SNick ToddVAR_LINTFLAGS64=	-m64
535aefb655Srie
547c478bd9Sstevel@tonic-gateVAR_PLAT_sparc=		sparc
557c478bd9Sstevel@tonic-gateVAR_PLAT_i386=		intel/ia32
567c478bd9Sstevel@tonic-gateVAR_PLAT_amd64=		intel/amd64
577c478bd9Sstevel@tonic-gate
587c478bd9Sstevel@tonic-gate#
597c478bd9Sstevel@tonic-gate# VAR_AVLDIR - directory to find avl.c in.
607c478bd9Sstevel@tonic-gate#
6167298654Sdamico# The avl.c file is under usr/src/common/avl in Solaris 10 (and later),
6267298654Sdamico# but in earlier releases it is not present (problem to be solved).
637c478bd9Sstevel@tonic-gate#
6467298654Sdamico# The avl.h and avl_impl.h files are under usr/src/uts/common/sys in
6567298654Sdamico# Solaris 10 (and later). They are under usr/src/cmd/sgs/tools/common/sys
6667298654Sdamico# in Solaris 9 and earlier.
677c478bd9Sstevel@tonic-gate#
687c478bd9Sstevel@tonic-gate# For Solaris 9 and earlier releases, we will have our own copy of the
697c478bd9Sstevel@tonic-gate# files avl.c, avl.h and avl_impl.h until these files are back ported into
707c478bd9Sstevel@tonic-gate# the system.
717c478bd9Sstevel@tonic-gate#
727c478bd9Sstevel@tonic-gateVAR_AVLDIR=		$(SRCBASE)/common/avl
73b24ab676SJeff BonwickVAR_AVLINCDIR=		-I $(SRCBASE)/uts/common
747c478bd9Sstevel@tonic-gate
757c478bd9Sstevel@tonic-gate#
76e127a3e7Sraf# VAR_DTRDIR - directory to find dtrace_data.c in.
77e127a3e7Sraf#
7867298654Sdamico# In Solaris 10 and earlier releases, dtrace_data.c was maintained as separate
7967298654Sdamico# files under sgs/rtld.  This file is now under usr/src/common/dtrace.
80e127a3e7Sraf#
81e127a3e7SrafVAR_DTRDIR=             $(SRCBASE)/common/dtrace
82e127a3e7Sraf
83e127a3e7Sraf#
8467298654Sdamico# VAR_SGSBINPROG
8567298654Sdamico#
8667298654Sdamico# For Solaris 10 and earlier releases, the SGS components were installed in
8767298654Sdamico# /usr/ccs/bin.  These components are now installed in /usr/bin with associated
8867298654Sdamico# symbolic links for compatibility. For previous behavior, set the VAR_SGSBIN*
8967298654Sdamico# variables to the appropriate ROOTCCSBIN* rule and set the VAR_SGSCCSLINK*
9067298654Sdamico# rules to null.
9167298654Sdamico#
9267298654SdamicoVAR_SGSBIN=		$(ROOTBIN)
9367298654SdamicoVAR_SGSBINPROG=		$(ROOTPROG)
9467298654SdamicoVAR_SGSBIN64=		$(ROOTBIN64)
9567298654SdamicoVAR_SGSBINPROG64=	$(ROOTPROG64)
9667298654Sdamico
9767298654SdamicoVAR_SGSCCSLINK=		$(ROOTCCSBINLINK)
9867298654SdamicoVAR_SGSCCSLINK64=	$(ROOTCCSBINLINK64)
9967298654Sdamico
10067298654Sdamico#
1017c478bd9Sstevel@tonic-gate# ld
1027c478bd9Sstevel@tonic-gate#
103b02637afSrieVAR_LD_LLDFLAGS=	'-R$$ORIGIN/../../lib'
104b02637afSrieVAR_LD_LLDFLAGS64 =	'-R$$ORIGIN/../../../lib/$(MACH64)'
1057c478bd9Sstevel@tonic-gate
1067c478bd9Sstevel@tonic-gate#
1077c478bd9Sstevel@tonic-gate# elfdump
1087c478bd9Sstevel@tonic-gate#
109b02637afSrieVAR_ELFDUMP_LLDFLAGS=	'-R$$ORIGIN/../../lib'
110b02637afSrieVAR_ELFDUMP_LLDFLAGS64 ='-R$$ORIGIN/../../../lib/$(MACH64)'
1117c478bd9Sstevel@tonic-gate
1127c478bd9Sstevel@tonic-gate#
113d29b2c44Sab196087# elfedit
114d29b2c44Sab196087#
115d29b2c44Sab196087VAR_ELFEDIT_LLDFLAGS=	'-R$$ORIGIN/../../lib'
116d29b2c44Sab196087VAR_ELFEDIT_LLDFLAGS64 ='-R$$ORIGIN/../../../lib/$(MACH64)'
117d29b2c44Sab196087
118d29b2c44Sab196087#
1197c478bd9Sstevel@tonic-gate# lddstub
1207c478bd9Sstevel@tonic-gate#
1217c478bd9Sstevel@tonic-gateVAR_LDDSTUB_INTERP=	-I'$$ORIGIN/ld.so.1'
1227c478bd9Sstevel@tonic-gate
1237c478bd9Sstevel@tonic-gate#
1247c478bd9Sstevel@tonic-gate# libld
1257c478bd9Sstevel@tonic-gate#
126*20c1c355SRod EvansVAR_LIBLD_CPPFLAGS=		$(VAR_AVLINCDIR)
1277c478bd9Sstevel@tonic-gateVAR_LIBLD_64_ROOTFS_LIBDIR=	$(ROOT)/lib/$(MACH64)
1287c478bd9Sstevel@tonic-gate
1297c478bd9Sstevel@tonic-gate#
1307c478bd9Sstevel@tonic-gate# Tools
1317c478bd9Sstevel@tonic-gate#
1327c478bd9Sstevel@tonic-gateVAR_TOOLS_CPPFLAGS=		$(VAR_AVLINCDIR)
1337c478bd9Sstevel@tonic-gate
1347c478bd9Sstevel@tonic-gate#
1357c478bd9Sstevel@tonic-gate# liblddbg
1367c478bd9Sstevel@tonic-gate#
137*20c1c355SRod EvansVAR_LIBLDDBG_64_ROOTFS_LIBDIR=	$(ROOT)/lib/$(MACH64)
1387c478bd9Sstevel@tonic-gate
1397c478bd9Sstevel@tonic-gate#
1407c478bd9Sstevel@tonic-gate# rtld
1417c478bd9Sstevel@tonic-gate#
1427c478bd9Sstevel@tonic-gateVAR_RTLD_CPICLIB=	-L ../../../../lib/libc/$(MACH)
1437c478bd9Sstevel@tonic-gateVAR_RTLD_CPICLIB64=	-L ../../../../lib/libc/$(MACH64)
144