Print this page
5196 The cw wrapper restricts gcc to -O2
*** 21,30 ****
--- 21,31 ----
#
# Copyright (c) 1989, 2010, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2012 by Delphix. All rights reserved.
# Copyright 2014 Garrett D'Amore <garrett@damore.org>
+ # Copyright 2014 Gary Mills
#
#
# Makefile.master, global definitions for system source
#
*** 412,430 ****
sparc_ASFLAGS= $(sparc_AS_XARCH)
sparcv9_ASFLAGS=$(sparcv9_AS_XARCH)
i386_ASFLAGS= $(i386_AS_XARCH)
amd64_ASFLAGS= $(amd64_AS_XARCH)
#
! sparc_COPTFLAG= -xO3
! sparcv9_COPTFLAG= -xO3
! i386_COPTFLAG= -O
! amd64_COPTFLAG= -xO3
! COPTFLAG= $($(MACH)_COPTFLAG)
! COPTFLAG64= $($(MACH64)_COPTFLAG)
# When -g is used, the compiler globalizes static objects
# (gives them a unique prefix). Disable that.
CNOGLOBAL= -W0,-noglobal
# Direct the Sun Studio compiler to use a static globalization prefix based on the
--- 413,450 ----
sparc_ASFLAGS= $(sparc_AS_XARCH)
sparcv9_ASFLAGS=$(sparcv9_AS_XARCH)
i386_ASFLAGS= $(i386_AS_XARCH)
amd64_ASFLAGS= $(amd64_AS_XARCH)
+ # Default adjustments to specified gcc optimization level
#
! # For -O and -O1
! ADJUST_OPT1=
! # For -O2
! ADJUST_OPT2= -_gcc=-fno-strict-aliasing \
! -_gcc=-fno-unit-at-a-time \
! -_gcc=-fno-optimize-sibling-calls
! sparc_ADJCOPT= $(ADJUST_OPT2)
! sparcv9_ADJCOPT= $(ADJUST_OPT2)
! i386_ADJCOPT= $(ADJUST_OPT1)
! amd64_ADJCOPT= $(ADJUST_OPT2)
+ # Symbols that can be redefined in individual Makefiles
+ ADJCOPT= $($(MACH)_ADJCOPT)
+ ADJCOPT64= $($(MACH64)_ADJCOPT)
+
+ # These symbols are sometimes redefined in individual Makefiles
+ sparc_COPTFLAG= -_cc=-xO3 -_gcc=-O2
+ sparcv9_COPTFLAG= -_cc=-xO3 -_gcc=-O2
+ i386_COPTFLAG= -_cc=-O -_gcc=-O
+ amd64_COPTFLAG= -_cc=-xO3 -_gcc=-O2
+
+ # Documented symbols that can be redefined in individual Makefiles
+ COPTFLAG= $(ADJCOPT) $($(MACH)_COPTFLAG)
+ COPTFLAG64= $(ADJCOPT64) $($(MACH64)_COPTFLAG)
+
# When -g is used, the compiler globalizes static objects
# (gives them a unique prefix). Disable that.
CNOGLOBAL= -W0,-noglobal
# Direct the Sun Studio compiler to use a static globalization prefix based on the
*** 601,622 ****
amd64_CCFLAGS= $(amd64_XARCH) -compat=5 \
-Qoption ccfe -messages=no%anachronism \
-Qoption ccfe -features=no%conststrings \
$(CCERRWARN)
! sparc_CCOPTFLAG= -O
! sparcv9_CCOPTFLAG= -O
! i386_CCOPTFLAG= -O
! amd64_CCOPTFLAG= -O
! CCOPTFLAG= $($(MACH)_CCOPTFLAG)
! CCOPTFLAG64= $($(MACH64)_CCOPTFLAG)
! CCFLAGS= $(CCOPTFLAG) $($(MACH)_CCFLAGS) $(CCSOURCEDEBUGFLAGS) \
! $(CCUSERFLAGS)
! CCFLAGS64= $(CCOPTFLAG64) $($(MACH64)_CCFLAGS) $(CCSOURCEDEBUGFLAGS) \
! $(CCUSERFLAGS64)
#
#
#
ELFWRAP_FLAGS =
ELFWRAP_FLAGS64 = -64
--- 621,645 ----
amd64_CCFLAGS= $(amd64_XARCH) -compat=5 \
-Qoption ccfe -messages=no%anachronism \
-Qoption ccfe -features=no%conststrings \
$(CCERRWARN)
! sparc_CCOPTFLAG= -_CC=-O -_g++=-O
! sparcv9_CCOPTFLAG= -_CC=-O -_g++=-O
! i386_CCOPTFLAG= -_CC=-O -_g++=-O
! amd64_CCOPTFLAG= -_CC=-O -_g++=-O
! ADJCCOPT= $(ADJUST_OPT1)
! ADJCCOPT64= $(ADJUST_OPT1)
+ CCOPTFLAG= $(ADJCCOPT) $($(MACH)_CCOPTFLAG)
+ CCOPTFLAG64= $(ADJCCOPT) $($(MACH64)_CCOPTFLAG)
+ CCFLAGS= $(CCOPTFLAG) $($(MACH)_CCFLAGS) \
+ $(CCSOURCEDEBUGFLAGS) $(CCUSERFLAGS)
+ CCFLAGS64= $(CCOPTFLAG64) $($(MACH64)_CCFLAGS) \
+ $(CCSOURCEDEBUGFLAGS) $(CCUSERFLAGS64)
+
#
#
#
ELFWRAP_FLAGS =
ELFWRAP_FLAGS64 = -64