Marcel Telka
2022-09-10 0f8a2ff9b08c58b3aa0c4a58d52dd6d870aee664
Remove support for Sun Studio from build framework

7 files modified
192 ■■■■■ changed files
components/openindiana/illumos-gate/Makefile 1 ●●●● patch | view | raw | blame | history
make-rules/makemaker.mk 4 ●●●● patch | view | raw | blame | history
make-rules/modulebuild.mk 2 ●●● patch | view | raw | blame | history
make-rules/shared-macros.mk 166 ●●●●● patch | view | raw | blame | history
tools/Makefile 2 ●●●●● patch | view | raw | blame | history
tools/build-watch.pl 2 ●●●●● patch | view | raw | blame | history
transforms/defaults 15 ●●●●● patch | view | raw | blame | history
components/openindiana/illumos-gate/Makefile
@@ -103,7 +103,6 @@
      echo export BLD_JAVA_8=; \
      echo export CW_NO_SHADOW=1; \
      echo export __GNUC=\"\"; \
      echo export ONLY_LINT_DEFS=-I\$$SPRO_ROOT/sunstudio12.1/prod/include/lint; \
      echo export ONNV_BUILDNUM=$(ONNV_BUILDNUM); \
      echo export PKGVERS_BRANCH=$(ONNV_BUILDNUM); \
      echo export BOOTBANNER1=\"$(DISTRIBUTION_NAME) $(DISTRIBUTION_VERSION) Version ^v ^w-bit\") > \
make-rules/makemaker.mk
@@ -23,7 +23,7 @@
# Common perl environment
COMMON_PERL_ENV +=    MAKE=$(GMAKE)
COMMON_PERL_ENV +=    PATH=$(dir $(CC)):$(SPRO_VROOT)/bin:$(PATH)
COMMON_PERL_ENV +=    PATH=$(dir $(CC)):$(PATH)
COMMON_PERL_ENV +=    LANG=""
COMMON_PERL_ENV +=    CC="$(CC)"
COMMON_PERL_ENV +=    CFLAGS="$(CC_BITS) $(PERL_OPTIMIZE)"
@@ -76,7 +76,7 @@
    $(ENV) $(CLONEY_ARGS) $(CLONEY) $(SOURCE_DIR) $(@D)
    $(COMPONENT_PRE_CONFIGURE_ACTION)
    (cd $(@D) ; $(COMPONENT_CONFIGURE_ENV) $(PERL) $(PERL_FLAGS) \
                Makefile.PL $(PERL_STUDIO_OVERWRITE) $(CONFIGURE_OPTIONS))
                Makefile.PL $(CONFIGURE_OPTIONS))
    $(COMPONENT_POST_CONFIGURE_ACTION)
    $(TOUCH) $@
make-rules/modulebuild.mk
@@ -31,7 +31,7 @@
    $(ENV) $(CLONEY_ARGS) $(CLONEY) $(SOURCE_DIR) $(@D)
    $(COMPONENT_PRE_CONFIGURE_ACTION)
    (cd $(@D) ; $(COMPONENT_CONFIGURE_ENV) $(PERL) $(PERL_FLAGS) \
                                Build.PL $(COMPONENT_CONFIGURE_ARGS) $(PERL_STUDIO_OVERWRITE) $(CONFIGURE_OPTIONS))
                Build.PL $(COMPONENT_CONFIGURE_ARGS) $(CONFIGURE_OPTIONS))
        $(COMPONENT_POST_CONFIGURE_ACTION)
        $(TOUCH) $@
make-rules/shared-macros.mk
@@ -554,14 +554,8 @@
# BUILD_TOOLS is the root of all tools not normally installed on the system.
BUILD_TOOLS ?=    /opt
SPRO_VERSION =    12.1
SPRO_ROOT =    $(BUILD_TOOLS)/sunstudio$(SPRO_VERSION)
SPRO_VROOT =    $(SPRO_ROOT)
PARFAIT_ROOT =    $(BUILD_TOOLS)/parfait/parfait-tools-1.0.1/
PARFAIT= $(PARFAIT_ROOT)/bin/parfait
export PARFAIT_NATIVESUNCC=$(SPRO_VROOT)/bin/cc
export PARFAIT_NATIVESUNCXX=$(SPRO_VROOT)/bin/CC
export PARFAIT_NATIVEGCC=$(GCC_ROOT)/bin/gcc
export PARFAIT_NATIVEGXX=$(GCC_ROOT)/bin/g++
@@ -630,16 +624,6 @@
GFORTRAN_RUNTIME_PKG = system/library/gfortran-$(GCC_VERSION_MAJOR)-runtime
GOBJC_RUNTIME_PKG    = system/library/gobjc-$(GCC_VERSION_MAJOR)-runtime
CC.studio.32 =    $(SPRO_VROOT)/bin/cc
CXX.studio.32 =    $(SPRO_VROOT)/bin/CC
F77.studio.32 = $(SPRO_VROOT)/bin/f77
FC.studio.32 =  $(SPRO_VROOT)/bin/f90
CC.studio.64 =    $(SPRO_VROOT)/bin/cc
CXX.studio.64 =    $(SPRO_VROOT)/bin/CC
F77.studio.64 = $(SPRO_VROOT)/bin/f77
FC.studio.64 =  $(SPRO_VROOT)/bin/f90
CC.gcc.32 =    $(GCC_ROOT)/bin/gcc
CXX.gcc.32 =    $(GCC_ROOT)/bin/g++
F77.gcc.32 =    $(GCC_ROOT)/bin/gfortran
@@ -684,11 +668,6 @@
endif
lint.32 =    $(SPRO_VROOT)/bin/lint -m32
lint.64 =    $(SPRO_VROOT)/bin/lint -m64
LINT =        $(lint.$(BITS))
LD =        /usr/bin/ld
PYTHON.2.7.VENDOR_PACKAGES.32 = /usr/lib/python2.7/vendor-packages
@@ -708,10 +687,6 @@
PYTHON.3.9.VENDOR_PACKAGES = $(PYTHON.3.9.VENDOR_PACKAGES.$(BITS))
ifeq   ($(strip $(PARFAIT_BUILD)),yes)
CC.studio.32 =    $(WS_TOOLS)/parfait/cc
CXX.studio.32 =    $(WS_TOOLS)/parfait/CC
CC.studio.64 =    $(WS_TOOLS)/parfait/cc
CXX.studio.64 =    $(WS_TOOLS)/parfait/CC
CC.gcc.32 =    $(WS_TOOLS)/parfait/gcc
CXX.gcc.32 =    $(WS_TOOLS)/parfait/g++
CC.gcc.64 =    $(WS_TOOLS)/parfait/gcc
@@ -836,7 +811,7 @@
# Optimally we should ask perl which C compiler was used but it doesn't
# result in a full path name.  Only "c" is being recorded
# inside perl builds while we actually need a full path to
# the studio compiler.
# the compiler.
#PERL_CC :=    $(shell $(PERL) -e 'use Config; print $$Config{cc}')
PKG_MACROS +=   PERL_ARCH=$(PERL_ARCH)
@@ -1044,7 +1019,7 @@
# XPG6 mode.  This option enables XPG6 conformance, plus extensions.
# Amongst other things, this option will cause system calls like
# popen (3C) and system (3C) to invoke the standards-conforming
# shell, /usr/xpg4/bin/sh, instead of /usr/bin/sh.  Add studio_XPG6MODE to
# shell, /usr/xpg4/bin/sh, instead of /usr/bin/sh.  Add CPP_XPG6MODE to
# CFLAGS instead of using this directly
CPP_XPG6MODE=    -D_XOPEN_SOURCE=600 -D__EXTENSIONS__=1 -D_XPG6
@@ -1052,121 +1027,23 @@
# _XOPEN_SOURCE=600 and C99 are illegal. -D__EXTENSIONS__=1 is legal in C++.
CPP_XPG5MODE=   -D_XOPEN_SOURCE=500 -D__EXTENSIONS__=1 -D_XPG5
#
# Studio C compiler flag sets to ease feature selection.  Add the required
# feature to your Makefile with CFLAGS += $(FEATURE_MACRO) and add to the
# component build with CONFIGURE_OPTIONS += CFLAGS="$(CFLAGS)" or similiar.
#
# Generate 32/64 bit objects
CC_BITS =    -m$(BITS)
# Code generation instruction set and optimization 'hints'.  Use studio_XBITS
# and not the .arch.bits variety directly.
studio_XBITS.sparc.32 =    -xtarget=ultra2 -xarch=sparcvis -xchip=ultra2
studio_XBITS.sparc.64 =
ifneq   ($(strip $(PARFAIT_BUILD)),yes)
studio_XBITS.sparc.64 += -xtarget=ultra2
endif
studio_XBITS.sparc.64 += -xarch=sparcvis -xchip=ultra2
studio_XBITS.i386.32 =    -xchip=pentium
studio_XBITS.i386.64 =    -xchip=generic -Ui386 -U__i386
studio_XBITS = $(studio_XBITS.$(MACH).$(BITS))
# Turn on recognition of supported C99 language features and enable the 1999 C
# standard library semantics of routines that appear in    both the 1990 and
# 1999 C standard. To use set studio_C99MODE=$(studio_99_ENABLE) in your
# component Makefile.
studio_C99_ENABLE =        -xc99=all
# Turn off recognition of C99 language features, and do not enable the 1999 C
# standard library semantics of routines that appeared in both the 1990    and
# 1999 C standard.  To use set studio_C99MODE=$(studio_99_DISABLE) in your
# component Makefile.
studio_C99_DISABLE =    -xc99=none
# Use the compiler default 'xc99=all,no_lib'
studio_C99MODE =
# For C++, compatibility with C99 (which is technically illegal) is
# enabled in a different way. So, we must use a different macro for it.
studio_cplusplus_C99_ENABLE =     -xlang=c99
# Turn it off.
studio_cplusplus_C99_DISABLE =
# And this is the macro you should actually use
studio_cplusplus_C99MODE =
# Turn on C99 for gcc
gcc_C99_ENABLE =    -std=c99
# Allow zero-sized struct/union declarations and void functions with return
# statements.
studio_FEATURES_EXTENSIONS =    -features=extensions
# Control the Studio optimization level.
studio_OPT.sparc.32 =    -xO4
studio_OPT.sparc.64 =    -xO4
studio_OPT.i386.32 =    -xO4
studio_OPT.i386.64 =    -xO4
studio_OPT =        $(studio_OPT.$(MACH).$(BITS))
# Studio PIC code generation.  Use CC_PIC instead to select PIC code generation.
studio_PIC =     -KPIC -DPIC
# The Sun Studio 11 compiler has changed the behaviour of integer
# wrap arounds and so a flag is needed to use the legacy behaviour
# (without this flag panics/hangs could be exposed within the source).
# This is used through studio_IROPTS, not the 'sparc' variety.
studio_IROPTS.sparc =    -W2,-xwrap_int
studio_IROPTS =        $(studio_IROPTS.$(MACH))
# Control register usage for generated code.  SPARC ABI requires system
# libraries not to use application registers.  x86 requires 'no%frameptr' at
# x04 or higher.
# We should just use -xregs but we need to workaround 7030022. Note
# that we can't use the (documented) -Wc,-xregs workaround because
# libtool really hates -Wc and thinks it should be -Wl. Instead
# we use an (undocumented) option which actually happens to be what
# CC would use.
studio_XREGS.sparc =    -Qoption cg -xregs=no%appl
studio_XREGS.i386 =    -xregs=no%frameptr
studio_XREGS =        $(studio_XREGS.$(MACH))
# libraries not to use application registers.
gcc_XREGS.sparc =    -mno-app-regs
gcc_XREGS.i386 =
gcc_XREGS =        $(gcc_XREGS.$(MACH))
# Set data alignment on sparc to reasonable values, 8 byte alignment for 32 bit
# objects and 16 byte alignment for 64 bit objects.  This is added to CFLAGS by
# default.
studio_ALIGN.sparc.32 =    -xmemalign=8s
studio_ALIGN.sparc.64 =    -xmemalign=16s
studio_ALIGN =        $(studio_ALIGN.$(MACH).$(BITS))
# Studio shorthand for building multi-threaded code,  enables -D_REENTRANT and
# linking with threadin support.  This is added to CFLAGS by default, override
# studio_MT to turn this off.
studio_MT =        -mt
# See CPP_XPG6MODE comment above.
studio_XPG6MODE =    $(studio_C99MODE) $(CPP_XPG6MODE)
XPG6MODE =        $(studio_XPG6MODE)
XPG6MODE =        $(CPP_XPG6MODE)
# See CPP_XPG5MODE comment above. You can only use this in C++, not in C99.
studio_XPG5MODE =    $(studio_cplusplus_C99MODE) $(CPP_XPG5MODE)
XPG5MODE =        $(studio_XPG5MODE)
# Default Studio C compiler flags.  Add the required feature to your Makefile
# with CFLAGS += $(FEATURE_MACRO) and add to the component build with
# CONFIGURE_OPTIONS += CFLAGS="$(CFLAGS)" or similiar.  In most cases, it
# should not be necessary to add CFLAGS to any environment other than the
# configure environment.
CFLAGS.studio +=    $(studio_OPT) $(studio_XBITS) $(studio_XREGS) \
            $(studio_IROPTS) $(studio_C99MODE) $(studio_ALIGN) \
            $(studio_MT)
XPG5MODE =        $(CPP_XPG5MODE)
#
# GNU C compiler flag sets to ease feature selection.  Add the required
@@ -1218,33 +1095,6 @@
# Add compiler specific 'default' features
CFLAGS +=    $(CFLAGS.$(COMPILER))
# Studio C++ requires -norunpath to avoid adding its location into the RUNPATH
# to C++ applications.
studio_NORUNPATH =     -norunpath
# To link in standard mode (the default mode) without any C++ libraries
# (except libCrun), use studio_LIBRARY_NONE in your component Makefile.
studio_LIBRARY_NONE =     -library=%none
# Don't link C++ with any C++ Runtime or Standard C++ library
studio_CXXLIB_NONE =    -xnolib
# Link C++ with the Studio C++ Runtime and Standard C++ library.  This is the
# default for "standard" mode.
studio_CXXLIB_CSTD =    -library=Cstd,Crun
# link C++ with the Studio  C++ Runtime and Apache Standard C++ library
studio_CXXLIB_APACHE =    -library=stdcxx4,Crun
# Add the C++ ABI compatibility flags for older ABI compatibility.  The default
# is "standard mode" (-compat=5)
studio_COMPAT_VERSION_4 =    -compat=4
# Tell the compiler that we don't want the studio runpath added to the
# linker flags.  We never want the Studio location added to the RUNPATH.
CXXFLAGS +=    $($(COMPILER)_NORUNPATH)
# Build 32 or 64 bit objects in C++ as well.
CXXFLAGS +=    $(CC_BITS)
@@ -1357,11 +1207,7 @@
    LD_EXEC_OPTIONS="$(LD_EXEC_OPTIONS)"
# PERL options which depend on C options should be placed here
# Don't trust Perl $Config{optimize}, we can get Studio flags
PERL_OPTIMIZE =$(gcc_OPT)
# We need this to overwrite options of perl used to compile illumos-gate
PERL_STUDIO_OVERWRITE = cc="$(CC)" cccdlflags="$(CC_BITS) $(CC_PIC)" ld="$(CC) $(CC_BITS)" ccname="$(shell basename $(CC))" optimize="$(gcc_OPT)"
PERL_OPTIMIZE :=    $(shell $(PERL) -e 'use Config; print $$Config{optimize}')
# Allow user to override default maximum number of archives
NUM_EXTRA_ARCHIVES= 1 2 3 4 5 6 7 8 9 10
tools/Makefile
@@ -38,8 +38,6 @@
        $(RM) parfait/$$i ; \
        echo "#!/bin/ksh" > parfait/$$i ; \
        echo "IFS=" >> parfait/$$i ; \
        echo "export PARFAIT_NATIVESUNCC=$(SPRO_VROOT)/bin/cc" >> parfait/$$i ; \
        echo "export PARFAIT_NATIVESUNCXX=$(SPRO_VROOT)/bin/CC" >> parfait/$$i ; \
        echo "export PARFAIT_NATIVEGCC=$(GCC_ROOT)/bin/gcc" >> parfait/$$i ; \
        echo "export PARFAIT_NATIVEGXX=$(GCC_ROOT)/bin/g++" >> parfait/$$i ; \
        echo "exec" $(PARFAIT_ROOT)/bin/parfait-$$i '$$*' >> parfait/$$i ; \
tools/build-watch.pl
@@ -46,8 +46,6 @@
    '^/usr/lib/locale/',    # ignore locale support
    '^/usr/share/lib/make/',    # ignore make bits
    '^/usr/share/lib/zoneinfo/',    # ignore timezone info
    '/SUNWspro/',        # ignore compiler bits
    '/sunstudio12.1/',    # ignore more compiler bits
    '^/ws/',        # nothing in /ws can be interesting
    '^\.[/\.]{0,1}$'    # ignore ., .., and ./
);
transforms/defaults
@@ -43,21 +43,6 @@
<transform dir path=usr/share/lib/java$ -> default group sys>
<transform dir path=usr/share/lib/java/javadoc$ -> default group other>
#
# C++ libraries compiled with GCC have incompatible ABI with Studio-compiled,
# so they go to separate directory if we need several library versions.
# Here we set default directories permissions which should be compatible
# with SFE directory permissions.
#
<transform dir path=usr/g\+\+/lib/pkgconfig$ -> default group other>
<transform dir path=usr/g\+\+/lib/.*/pkgconfig$ -> default group other>
<transform dir path=usr/g\+\+/share$ -> default group sys>
<transform dir path=usr/g\+\+/share/aclocal$ -> default group other>
<transform dir path=usr/g\+\+/share/doc$ -> default group other>
<transform dir path=usr/g\+\+/share/lib$ -> default group sys>
<transform dir path=usr/g\+\+/share/lib/java$ -> default group sys>
<transform dir path=usr/g\+\+/lib/java/javadoc$ -> default group other>
#
# Users added by our packages should be blocked from ftp access by default
#