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