243N/A#
243N/A# CDDL HEADER START
243N/A#
243N/A# The contents of this file are subject to the terms of the
243N/A# Common Development and Distribution License (the "License").
243N/A# You may not use this file except in compliance with the License.
243N/A#
243N/A# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
243N/A# or http://www.opensolaris.org/os/licensing.
243N/A# See the License for the specific language governing permissions
243N/A# and limitations under the License.
243N/A#
243N/A# When distributing Covered Code, include this CDDL HEADER in each
243N/A# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
243N/A# If applicable, add the following below this CDDL HEADER, with the
243N/A# fields enclosed by brackets "[]" replaced with your own identifying
243N/A# information: Portions Copyright [yyyy] [name of copyright owner]
243N/A#
243N/A# CDDL HEADER END
243N/A#
243N/A
243N/A#
5680N/A# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
243N/A#
5680N/ABUILD_BITS= 64
3817N/A# There are a large number of macros in the GCB code written
3817N/A# specifically for GCC's preprocessor. Studio does not expand
3817N/A# these macros the same way GCC does, and the resulting gdb is
3817N/A# not usable. Building gdb with a GCC >= 4.7.2 produces very
3817N/A# good results, even on SPARC.
5680N/ACOMPILER= gcc
243N/Ainclude ../../make-rules/shared-macros.mk
243N/A
243N/ACOMPONENT_NAME= gdb
6418N/ACOMPONENT_VERSION= 7.11
844N/ACOMPONENT_ARCHIVE_HASH= \
6418N/A sha256:9382f5534aa0754169e1e09b5f1a3b77d1fa8c59c1e57617e06af37cb29c669a
6418N/A
6418N/ATPNO= 27358
6418N/A
6418N/A# The traditional output from gmake test omits some
6418N/A# test results information that is contained in the
6418N/A# build/<arch>/gdb/testsuite/gdb.sum file, so use that file instead
6418N/A# for test results comparison.
6418N/ACOMPONENT_POST_TEST_ACTION += \
6418N/A ( $(MV) $(COMPONENT_TEST_OUTPUT) $(COMPONENT_TEST_OUTPUT)-orig ; \
6418N/A $(CP) $(BUILD_DIR_64)/gdb/testsuite/gdb.sum $(COMPONENT_TEST_OUTPUT) )
243N/A
6418N/A# Results output is different on Intel vs. SPARC.
6418N/A# Note that comparisons against master results
6418N/A# are not clean since results will still vary.
6418N/ACOMPONENT_TEST_MASTER = \
6418N/A $(COMPONENT_TEST_RESULTS_DIR)/results-$(MACH)-$(BITS).master
2899N/A
6418N/A# Test transforms retain only relevant results output.
6418N/ACOMPONENT_TEST_TRANSFORMS += \
6418N/A '-n ' \
6418N/A '-e "/^FAIL/p" ' \
6418N/A '-e "/^KFAIL/p" ' \
6418N/A '-e "/^PASS/p" ' \
6418N/A '-e "/^UNRESOLVED/p" ' \
6418N/A '-e "/^UNSUPPORTED/p" ' \
6418N/A '-e "/^UNTESTED/p" ' \
6418N/A '-e "/^XFAIL/p" ' \
6418N/A '-e "/^\# of /p" '
6418N/A
6418N/A# Test results vary from run to run and machine to machine,
6418N/A# so master test results will not match, and are not
6418N/A# appropriate for a full Userland test run
6418N/A$(SKIP_TEST_AT_TOP_LEVEL)
6418N/A
5680N/Ainclude $(WS_MAKE_RULES)/gnu-component.mk
243N/A
2148N/A
2148N/A# GDB wants the GNU utilities
6418N/APATH=/usr/gnu/bin:$(GCC_ROOT)/bin:/usr/bin:/usr/perl/$(PERL_VERSION)/bin
243N/A
5783N/A# Specify the C Standard to use when building
6418N/ACC += -std=gnu99
5783N/A
2074N/ACFLAGS_sparc = -g -O2 -mcpu=ultrasparc -mtune=ultrasparc
2074N/ACFLAGS_sparc += -mno-unaligned-doubles
2074N/ACFLAGS_sparc += -mapp-regs -mhard-float
2074N/ACFLAGS_i386 = -g -O2 -march=opteron -mtune=opteron
2074N/ACFLAGS_EXTRA = -Wall -Wno-long-long -Wcast-align -fno-omit-frame-pointer
2074N/A
2074N/ACFLAGS = $(CC_BITS) $(CFLAGS_EXTRA) $(CFLAGS_$(MACH))
2074N/ACXXFLAGS = $(CC_BITS) $(CFLAGS_EXTRA) $(CFLAGS_$(MACH))
5680N/ACPPFLAGS = -D_REENTRANT -I$(USRINCDIR)/ncurses
243N/A
243N/ACONFIGURE_OPTIONS += --with-x=no
243N/ACONFIGURE_OPTIONS += --with-curses
2074N/ACONFIGURE_OPTIONS += --disable-werror
2074N/ACONFIGURE_OPTIONS += --enable-plugins
2074N/ACONFIGURE_OPTIONS += --enable-tui
2074N/ACONFIGURE_OPTIONS += --without-auto-load-safe-path
2074N/ACONFIGURE_OPTIONS += --with-python=yes
5680N/ACONFIGURE_OPTIONS += --with-libexpat-prefix=$(USRLIBDIR)
370N/ACONFIGURE_OPTIONS += --infodir=$(CONFIGURE_INFODIR)
6418N/ACONFIGURE_OPTIONS += --with-system-zlib
6418N/A
243N/A
2074N/A# Generate the newly added Solaris instruction and
2074N/A# register tables which weren't there by default.
2074N/ACOMPONENT_PRE_CONFIGURE_ACTION = \
2074N/A ( cd $(SOURCE_DIR)/gdb/features ; \
2074N/A $(GMAKE) all )
2074N/A
6418N/A# Ensure PATH is set during build;
6418N/A# need /usr/perl5/$(PERL_VERSION)/bin from PATH to access
6418N/A# pod2man perl script, used to create manpages
6418N/ACOMPONENT_BUILD_ENV += PATH=$(PATH)
6418N/A
6418N/A# build the manpages
6418N/ACOMPONENT_POST_BUILD_ACTION = \
6418N/A ( cd $(BUILD_DIR_64)/gdb/doc ; \
6418N/A $(GMAKE) man )
6418N/A
2074N/ACOMPONENT_POST_INSTALL_ACTION = \
2074N/A ( cd $(PROTOUSRDIR)/share/gdb/python/gdb ; \
2074N/A $(PYTHON) -m compileall . ; \
2074N/A cd $(PROTOUSRDIR)/share/gdb/python/gdb/command ; \
2074N/A $(PYTHON) -m compileall . ; \
2074N/A cd $(PROTOUSRDIR)/share/gdb/python/gdb/function ; \
2074N/A $(PYTHON) -m compileall . ; \
5680N/A cd $(PROTOUSRBINDIR)/ ; \
2074N/A /usr/bin/strip -x gdb ; \
2074N/A cd $(COMPONENT_DIR) ; \
2074N/A $(INSTALL) -m 0755 $(COMPONENT_DIR)/Solaris/gdbtui \
2074N/A $(PROTOUSRBINDIR)/ ; \
2074N/A $(INSTALL) -m 0644 $(SOURCE_DIR)/gdb/doc/gdb.info \
2074N/A $(PROTOUSRSHAREDIR)/info/ ; \
2074N/A $(INSTALL) -m 0644 $(SOURCE_DIR)/gdb/doc/gdb.info-1 \
2074N/A $(PROTOUSRSHAREDIR)/info/ ; \
2074N/A $(INSTALL) -m 0644 $(SOURCE_DIR)/gdb/doc/gdb.info-2 \
2074N/A $(PROTOUSRSHAREDIR)/info/ ; \
2074N/A $(INSTALL) -m 0644 $(SOURCE_DIR)/gdb/doc/gdb.info-3 \
2074N/A $(PROTOUSRSHAREDIR)/info/ ; \
2074N/A $(INSTALL) -m 0644 $(SOURCE_DIR)/gdb/doc/gdb.info-4 \
2074N/A $(PROTOUSRSHAREDIR)/info/ ; \
2074N/A $(INSTALL) -m 0644 $(SOURCE_DIR)/gdb/doc/gdb.info-5 \
2074N/A $(PROTOUSRSHAREDIR)/info/ ; \
2074N/A $(INSTALL) -m 0644 $(SOURCE_DIR)/gdb/doc/gdb.info-6 \
2074N/A $(PROTOUSRSHAREDIR)/info/ ; \
2074N/A $(INSTALL) -m 0644 $(SOURCE_DIR)/gdb/doc/gdb.info-7 \
2074N/A $(PROTOUSRSHAREDIR)/info/ ; \
2074N/A $(INSTALL) -m 0644 $(SOURCE_DIR)/gdb/doc/annotate.info \
2074N/A $(PROTOUSRSHAREDIR)/info/ ; \
2074N/A $(INSTALL) -m 0644 $(SOURCE_DIR)/gdb/doc/stabs.info \
6418N/A $(PROTOUSRSHAREDIR)/info/ ; \
6418N/A $(MKDIR) $(PROTOGNUSHAREMAN1) ; \
6418N/A $(MKDIR) $(PROTOUSRSHAREMAN1DIR) ; \
6418N/A $(INSTALL) -m 0444 $(BUILD_DIR_64)/gdb/doc/gdb.1 \
6418N/A $(PROTOUSRSHAREMAN1DIR) )
2074N/A
2074N/A# Disable ASLR: it's a debugger and we do not want to risk
2074N/A# altering the results of the debugging experiment.
2074N/AASLR_MODE=$(ASLR_DISABLE)
2074N/A
3817N/AREQUIRED_PACKAGES += compress/xz
3817N/AREQUIRED_PACKAGES += library/expat
3817N/AREQUIRED_PACKAGES += library/ncurses
3817N/AREQUIRED_PACKAGES += library/readline
3817N/AREQUIRED_PACKAGES += library/zlib
3817N/AREQUIRED_PACKAGES += shell/ksh93
3817N/AREQUIRED_PACKAGES += system/library/math
3817N/AREQUIRED_PACKAGES += text/texinfo