2ronwalf#
2ronwalf# CDDL HEADER START
2ronwalf#
2ronwalf# The contents of this file are subject to the terms of the
2ronwalf# Common Development and Distribution License (the "License").
2ronwalf# You may not use this file except in compliance with the License.
2ronwalf#
2ronwalf# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
2ronwalf# or http://www.opensolaris.org/os/licensing.
2ronwalf# See the License for the specific language governing permissions
2ronwalf# and limitations under the License.
2ronwalf#
2ronwalf# When distributing Covered Code, include this CDDL HEADER in each
2ronwalf# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
2ronwalf# If applicable, add the following below this CDDL HEADER, with the
2ronwalf# fields enclosed by brackets "[]" replaced with your own identifying
2ronwalf# information: Portions Copyright [yyyy] [name of copyright owner]
2ronwalf#
2ronwalf# CDDL HEADER END
2ronwalf#
2ronwalf
2ronwalf#
2ronwalf# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
2ronwalf#
2ronwalf
2ronwalfCOMPILER=gcc
2ronwalf
2ronwalfinclude ../../make-rules/shared-macros.mk
2ronwalf
2ronwalfCOMPONENT_NAME= gdb
2ronwalfCOMPONENT_VERSION= 7.6
2ronwalfCOMPONENT_SRC= $(COMPONENT_NAME)-$(COMPONENT_VERSION)
2ronwalfCOMPONENT_ARCHIVE= $(COMPONENT_SRC).tar.gz
2ronwalfCOMPONENT_ARCHIVE_HASH= \
2ronwalf sha256:8070389a5dcc104eb0be483d582729f98ed4d761ad19cedd3f17b5d2502faa36
2ronwalfCOMPONENT_ARCHIVE_URL= http://ftp.gnu.org/gnu/gdb/$(COMPONENT_ARCHIVE)
2ronwalfCOMPONENT_PROJECT_URL = http://www.gnu.org/software/gdb/
2ronwalfCOMPONENT_BUGDB= utility/gdb
2ronwalf
2ronwalfTPNO= 17258
2ronwalf
2ronwalfinclude $(WS_MAKE_RULES)/prep.mk
2ronwalfinclude $(WS_MAKE_RULES)/configure.mk
2ronwalfinclude $(WS_MAKE_RULES)/ips.mk
2ronwalf
2ronwalf# GDB wants the GNU utilities
2ronwalfPATH=/usr/gnu/bin:$(GCC_ROOT)/bin:/usr/bin:/usr/perl5/bin
2ronwalf
2ronwalfCFLAGS_sparc = -g -O2 -mcpu=ultrasparc -mtune=ultrasparc
2ronwalfCFLAGS_sparc += -mno-unaligned-doubles
2ronwalfCFLAGS_sparc += -mapp-regs -mhard-float
2ronwalfCFLAGS_i386 = -g -O2 -march=opteron -mtune=opteron
2ronwalfCFLAGS_EXTRA = -Wall -Wno-long-long -Wcast-align -fno-omit-frame-pointer
2ronwalf
2ronwalfCFLAGS = $(CC_BITS) $(CFLAGS_EXTRA) $(CFLAGS_$(MACH))
2ronwalfCXXFLAGS = $(CC_BITS) $(CFLAGS_EXTRA) $(CFLAGS_$(MACH))
2ronwalfCPPFLAGS = -D_REENTRANT -I/usr/include/ncurses
2ronwalf
2ronwalf# `echo $(CFLAGS)` and `echo $(LDFLAGS)` used to
14daenzerorama# work around problem with extra blank characters
14daenzerorama# inserted into configrue option strings during
14daenzerorama# nested configure invocations within the gdb build.
14daenzerorama
14daenzeroramaCONFIGURE_ENV += CFLAGS="`echo $(CFLAGS)`"
14daenzeroramaCONFIGURE_ENV += CPPFLAGS="`echo $(CPPFLAGS)`"
2ronwalfCONFIGURE_ENV += LDFLAGS="`echo $(LDFLAGS)`"
2ronwalf
2ronwalfCONFIGURE_OPTIONS += --with-x=no
2ronwalfCONFIGURE_OPTIONS += --with-curses
2ronwalfCONFIGURE_OPTIONS += --disable-werror
2ronwalfCONFIGURE_OPTIONS += --enable-plugins
2ronwalfCONFIGURE_OPTIONS += --enable-tui
2ronwalfCONFIGURE_OPTIONS += --without-auto-load-safe-path
2ronwalfCONFIGURE_OPTIONS += --with-python=yes
2ronwalfCONFIGURE_OPTIONS += --with-libexpat-prefix=/usr/lib
2ronwalfCONFIGURE_OPTIONS += --infodir=$(CONFIGURE_INFODIR)
2ronwalf
2ronwalf# Generate the newly added Solaris instruction and
2ronwalf# register tables which weren't there by default.
2ronwalfCOMPONENT_PRE_CONFIGURE_ACTION = \
2ronwalf ( cd $(SOURCE_DIR)/gdb/features ; \
2ronwalf $(GMAKE) all )
2ronwalf
2ronwalfCOMPONENT_POST_INSTALL_ACTION = \
2ronwalf ( cd $(PROTOUSRDIR)/share/gdb/python/gdb ; \
2ronwalf $(PYTHON) -m compileall . ; \
2ronwalf cd $(PROTOUSRDIR)/share/gdb/python/gdb/command ; \
2ronwalf $(PYTHON) -m compileall . ; \
2ronwalf cd $(PROTOUSRDIR)/share/gdb/python/gdb/function ; \
2ronwalf $(PYTHON) -m compileall . ; \
2ronwalf cd $(PROTOUSRBINDIR64)/ ; \
2ronwalf /usr/bin/strip -x gdb ; \
2ronwalf cd $(COMPONENT_DIR) ; \
14daenzerorama $(INSTALL) -m 0755 $(COMPONENT_DIR)/Solaris/gdbtui \
14daenzerorama $(PROTOUSRBINDIR)/ ; \
14daenzerorama $(INSTALL) -m 0644 $(SOURCE_DIR)/gdb/doc/gdb.info \
14daenzerorama $(PROTOUSRSHAREDIR)/info/ ; \
14daenzerorama $(INSTALL) -m 0644 $(SOURCE_DIR)/gdb/doc/gdb.info-1 \
14daenzerorama $(PROTOUSRSHAREDIR)/info/ ; \
14daenzerorama $(INSTALL) -m 0644 $(SOURCE_DIR)/gdb/doc/gdb.info-2 \
14daenzerorama $(PROTOUSRSHAREDIR)/info/ ; \
14daenzerorama $(INSTALL) -m 0644 $(SOURCE_DIR)/gdb/doc/gdb.info-3 \
14daenzerorama $(PROTOUSRSHAREDIR)/info/ ; \
14daenzerorama $(INSTALL) -m 0644 $(SOURCE_DIR)/gdb/doc/gdb.info-4 \
14daenzerorama $(PROTOUSRSHAREDIR)/info/ ; \
14daenzerorama $(INSTALL) -m 0644 $(SOURCE_DIR)/gdb/doc/gdb.info-5 \
14daenzerorama $(PROTOUSRSHAREDIR)/info/ ; \
14daenzerorama $(INSTALL) -m 0644 $(SOURCE_DIR)/gdb/doc/gdb.info-6 \
14daenzerorama $(PROTOUSRSHAREDIR)/info/ ; \
14daenzerorama $(INSTALL) -m 0644 $(SOURCE_DIR)/gdb/doc/gdb.info-7 \
14daenzerorama $(PROTOUSRSHAREDIR)/info/ ; \
14daenzerorama $(INSTALL) -m 0644 $(SOURCE_DIR)/gdb/doc/gdbint.info \
14daenzerorama $(PROTOUSRSHAREDIR)/info/ ; \
14daenzerorama $(INSTALL) -m 0644 $(SOURCE_DIR)/gdb/doc/gdbint.info-1 \
14daenzerorama $(PROTOUSRSHAREDIR)/info/ ; \
14daenzerorama $(INSTALL) -m 0644 $(SOURCE_DIR)/gdb/doc/gdbint.info-2 \
14daenzerorama $(PROTOUSRSHAREDIR)/info/ ; \
14daenzerorama $(INSTALL) -m 0644 $(SOURCE_DIR)/gdb/doc/annotate.info \
14daenzerorama $(PROTOUSRSHAREDIR)/info/ ; \
14daenzerorama $(INSTALL) -m 0644 $(SOURCE_DIR)/gdb/doc/stabs.info \
2ronwalf $(PROTOUSRSHAREDIR)/info/ )
# Disable ASLR: it's a debugger and we do not want to risk
# altering the results of the debugging experiment.
ASLR_MODE=$(ASLR_DISABLE)
# common targets
build: $(BUILD_64)
install: $(INSTALL_64)
test: $(NO_TESTS)
REQUIRED_PACKAGES += compress/xz
REQUIRED_PACKAGES += library/expat
REQUIRED_PACKAGES += library/ncurses
REQUIRED_PACKAGES += library/readline
REQUIRED_PACKAGES += library/zlib
REQUIRED_PACKAGES += runtime/python-26
REQUIRED_PACKAGES += shell/ksh93
REQUIRED_PACKAGES += system/library
REQUIRED_PACKAGES += system/library/math
REQUIRED_PACKAGES += system/linker