summaryrefslogtreecommitdiff
path: root/usr/src/Makefile.master
diff options
context:
space:
mode:
authorwesolows <none@none>2005-09-20 15:07:36 -0700
committerwesolows <none@none>2005-09-20 15:07:36 -0700
commit02e56f3f1bfc8d9977bafb8cb5202f576dcded27 (patch)
tree8f0d8950da265495d12f4426149833d90ece5a8e /usr/src/Makefile.master
parentf9e4eebb64f2b4ca90bbafdaa2b24257309e2638 (diff)
downloadillumos-gate-02e56f3f1bfc8d9977bafb8cb5202f576dcded27.tar.gz
6237094 perl build should honor $(CC)
6272179 relocation processing should be bypassed when building libgenunix et al 6307198 Need to pass in -save_args option when the new gcc is available 6310495 gcc and sun4 rootnex don't get along 6310534 new gcc options should be used to build ON 6319181 cw needs -xbuiltin support
Diffstat (limited to 'usr/src/Makefile.master')
-rw-r--r--usr/src/Makefile.master36
1 files changed, 26 insertions, 10 deletions
diff --git a/usr/src/Makefile.master b/usr/src/Makefile.master
index 0514eb6424..138c03e677 100644
--- a/usr/src/Makefile.master
+++ b/usr/src/Makefile.master
@@ -2,9 +2,8 @@
# CDDL HEADER START
#
# The contents of this file are subject to the terms of the
-# Common Development and Distribution License, Version 1.0 only
-# (the "License"). You may not use this file except in compliance
-# with the License.
+# Common Development and Distribution License (the "License").
+# You may not use this file except in compliance with the License.
#
# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
# or http://www.opensolaris.org/os/licensing.
@@ -19,12 +18,15 @@
#
# CDDL HEADER END
#
+
#
# Copyright 2005 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
# ident "%Z%%M% %I% %E% SMI"
#
+
+#
# Makefile.master, global definitions for system source
#
ROOT= /proto
@@ -295,13 +297,12 @@ amd64_AS_XARCH= -xarch=amd64 -P -Ui386 -U__i386
#
# XX64 future versions of gcc will make -mcmodel=kernel imply -mno-red-zone
#
-sparc_STAND_FLAGS=
-sparcv9_STAND_FLAGS=
+sparc_STAND_FLAGS= -_gcc=-ffreestanding
+sparcv9_STAND_FLAGS= -_gcc=-ffreestanding
i386_STAND_FLAGS= -_gcc=-ffreestanding
amd64_STAND_FLAGS= -Wu,-xmodel=kernel
SAVEARGS= -Wu,-save_args
-$(__GNUC64)SAVEARGS=
amd64_STAND_FLAGS += $(SAVEARGS)
STAND_FLAGS_32 = $($(MACH)_STAND_FLAGS)
@@ -357,20 +358,28 @@ COPTFLAG64= $($(MACH64)_COPTFLAG)
# (gives them a unique prefix). Disable that.
CNOGLOBAL= -W0,-noglobal
+# Normally, gcc uses indirect DWARF strings to save space. However,
+# this causes relocations that ctfconvert cannot handle. Disable this.
+CDWARFSTR= -_gcc=-fno-dwarf2-indirect-strings
+
+# Sometimes we want all symbols and types in debugging information even
+# if they aren't used.
+CALLSYMS= -W0,-xdbggen=no%usedonly
+
#
# Flags used to build in debug mode for ctf generation. Bugs in the Devpro
# compilers currently prevent us from building with cc-emitted DWARF.
#
-CTF_FLAGS_sparc = -g -Wc,-Qiselect-T1 $(C99MODE) $(CNOGLOBAL)
-CTF_FLAGS_i386 = -g $(C99MODE) $(CNOGLOBAL)
+CTF_FLAGS_sparc = -g -Wc,-Qiselect-T1 $(C99MODE) $(CNOGLOBAL) $(CDWARFSTR)
+CTF_FLAGS_i386 = -g $(C99MODE) $(CNOGLOBAL) $(CDWARFSTR)
CTF_FLAGS = $(CTF_FLAGS_$(MACH))
#
# Flags used with genoffsets
#
GOFLAGS = -_noecho \
- -_gcc=-fno-eliminate-unused-debug-symbols \
- -_gcc=-fno-eliminate-unused-debug-types
+ $(CALLSYMS) \
+ $(CDWARFSTR)
OFFSETS_CREATE = $(GENOFFSETS) -s $(CTFSTABS) -r $(CTFCONVERT) \
$(CC) $(GOFLAGS) $(CFLAGS) $(CPPFLAGS)
@@ -611,6 +620,12 @@ AS= $(NATIVEAS)
LD= $(NATIVELD)
LINT= $(NATIVELINT)
+# The real compilers used for this build
+CW_CC_CMD= $(CC) -_compiler
+CW_CCC_CMD= $(CCC) -_compiler
+REAL_CC= $(CW_CC_CMD:sh)
+REAL_CCC= $(CW_CCC_CMD:sh)
+
# Pass -Y flag to cpp (method of which is release-dependent)
CCYFLAG= -Y I,
@@ -635,6 +650,7 @@ ZNODELETE= -znodelete
ZNODLOPEN= -znodlopen
ZNODUMP= -znodump
ZNOLAZYLOAD= -znolazyload
+ZNORELOC= -znoreloc
ZNOVERSION= -znoversion
ZREDLOCSYM= -zredlocsym
ZTEXT= -ztext