diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 000000000..65b7361c5 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,62 @@ +# Process For Accepting Third Party Code Contributions + +To improve tracking of contributions to this project we will use a process +modelled on the modified DCO 1.1 and use a "sign-off" procedure on patches that +are being emailed around or contributed in any other way. + +The sign-off is a simple line at the end of the explanation for the patch, +which certifies that you wrote it or otherwise have the right to pass it on as +an open-source patch. The rules are pretty simple: if you can certify the +below: + + Developer's Certificate of Origin 1.1 + + By making a contribution to this project, I certify that: + + (a). The contribution was created in whole or in part by me and I + have the right to submit it under the open source license + indicated in the file; or + + (b). The contribution is based upon previous work that, to the best + of my knowledge, is covered under an appropriate open source + License and I have the right under that license to submit that + work with modifications, whether created in whole or in part + by me, under the same open source license (unless I am + permitted to submit under a different license), as indicated + in the file; or + + (c). The contribution was provided directly to me by some other + person who certified (a), (b) or (c) and I have not modified + it. + + (d). The contribution is made free of any other party's intellectual + property claims or rights. + + (e). I understand and agree that this project and the contribution + are public and that a record of the contribution (including all + personal information I submit with it, including my sign-off) is + maintained indefinitely and may be redistributed consistent with + project or the open source license(s) involved. + +then you just add a line saying + + Signed-off-by: Random J Developer + +using your real name (sorry, no pseudonyms or anonymous contributions.) + +# Quick HOWTO + +1. Make sure you have a [GitHub account](https://github.com/signup/free) + +2. Fork the repo. + +3. Make the changes and run the testcases. We only take pull requests with +passing tests. + +4. If it is applicable, improve or add the current testcases to cover for the +new functionality. + +5. Push to your fork and submit a pull request. + +After 5. the pull request will be reviewed and checked. We may suggest some +changes or improvements or alternatives. diff --git a/DFP.txt b/DFP.txt new file mode 100644 index 000000000..19b05c5bf --- /dev/null +++ b/DFP.txt @@ -0,0 +1,76 @@ +DFP usage notes: + +The Advance Toolchain currently provides Decimal Floating Point compiler +and library support in a standalone toolchain. + +In order to be able to reference DFP defined symbols (including constants +and functions) one's source code must define the following: + +#define __STDC_WANT_DEC_FP__ 1 + +or build the source with the following define flag: +-D__STDC_WANT_DEC_FP__=1 + +GNU99 compatibility is required to pick up some DFP prototypes. It will +define __USE_ISOC99. Use the following compilation flag: +-std=gnu99 + +NOTE: -std=gnu99 IS NOT THE SAME AS __USE_ISOC99 though -std=gnu99 DOES +DEFINE __USE_ISOC99! + +NOTE: If you forget to use -std=gnu99 you may notice that you will get very +screwy results when you call dfp math functions. If the compiler can't +find the prototypes (due to missing defines) it will attempt to create a +default prototype which will have the incorrect return type. + +The following include files provide the constants and function prototypes +provided by DFP but only when __STDC_WANT_DEC_FP__ is defined to '1'. + + /* fe_dec_getround(), fe_dec_setround(), and rounding mode + * enumeration types provided by an implicit #include + * + + /* All math function prototypes for d32/d64/d128, polymorphic + * classification macros, comparison macros, and DEC_NAN and + * DEC_INFINITY macros. This includes an implicit #include + * to pick up new DFP only prototypes defined in + * include/bits/dfpcalls.h. */ + #include + + /* Type dependent floating point macros for DFP support + * traditionally defined in float.h. */ + #include + +The Decimal Floating Point IEEE types are as follows: + + _Decimal32 + _Decimal64 + _Decimal128 + +The printf format flags follow: + + %H - for _Decimal32 + %D - for _Decimal64 + %DD - for _Decimal128 + +The scanf format flags follow: + + %DF - for _Decimal32 + %DD - for _Decimal64 + %DL - for _Decimal128 + +The floating point suffix for DFP constants follows: + + 'DF' for _Decimal32, e.g. _Decimal32 d32 = 1.045DF; + 'DD' for _Decimal64, e.g. _Decimal64 d64 = 1.4738273DD; + 'DL' for _Decimal128, e.g. _Decimal128 d128 = 1.0823382394823945DL; + +NOTE: Assigning a naked constant to a DFP variable will actually be +performing a binary to decimal conversion and, depending on the precision, +can assign an incorrect number. Always use the decimal floating point +suffix! + +A compilation and link for a DFP program will look like the following: + +/opt/at05/bin/gcc test_dfp.c -o dfp -D__STDC_WANT_DEC_FP__=1 -std=gnu99 -ldfp diff --git a/LICENSE b/LICENSE new file mode 100644 index 000000000..5466baa84 --- /dev/null +++ b/LICENSE @@ -0,0 +1,159 @@ +Apache License + +Version 2.0, January 2004 + +http://www.apache.org/licenses/ + +TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + +1. Definitions. + +"License" shall mean the terms and conditions for use, reproduction, and +distribution as defined by Sections 1 through 9 of this document. + +"Licensor" shall mean the copyright owner or entity authorized by the copyright +owner that is granting the License. + +"Legal Entity" shall mean the union of the acting entity and all other entities +that control, are controlled by, or are under common control with that entity. +For the purposes of this definition, "control" means (i) the power, direct or +indirect, to cause the direction or management of such entity, whether by +contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the +outstanding shares, or (iii) beneficial ownership of such entity. + +"You" (or "Your") shall mean an individual or Legal Entity exercising +permissions granted by this License. + +"Source" form shall mean the preferred form for making modifications, +including but not limited to software source code, documentation source, and +configuration files. + +"Object" form shall mean any form resulting from mechanical transformation or +translation of a Source form, including but not limited to compiled object +code, generated documentation, and conversions to other media types. + +"Work" shall mean the work of authorship, whether in Source or Object form, +made available under the License, as indicated by a copyright notice that is +included in or attached to the work (an example is provided in the Appendix +below). + +"Derivative Works" shall mean any work, whether in Source or Object form, that +is based on (or derived from) the Work and for which the editorial revisions, +annotations, elaborations, or other modifications represent, as a whole, an +original work of authorship. For the purposes of this License, Derivative Works +shall not include works that remain separable from, or merely link (or bind by +name) to the interfaces of, the Work and Derivative Works thereof. + +"Contribution" shall mean any work of authorship, including the original +version of the Work and any modifications or additions to that Work or +Derivative Works thereof, that is intentionally submitted to Licensor for +inclusion in the Work by the copyright owner or by an individual or Legal +Entity authorized to submit on behalf of the copyright owner. For the purposes +of this definition, "submitted" means any form of electronic, verbal, or +written communication sent to the Licensor or its representatives, including +but not limited to communication on electronic mailing lists, source code +control systems, and issue tracking systems that are managed by, or on behalf +of, the Licensor for the purpose of discussing and improving the Work, but +excluding communication that is conspicuously marked or otherwise designated in +writing by the copyright owner as "Not a Contribution." + +"Contributor" shall mean Licensor and any individual or Legal Entity on behalf +of whom a Contribution has been received by Licensor and subsequently +incorporated within the Work. + +2. Grant of Copyright License. Subject to the terms and conditions of this +License, each Contributor hereby grants to You a perpetual, worldwide, +non-exclusive, no-charge, royalty-free, irrevocable copyright license to +reproduce, prepare Derivative Works of, publicly display, publicly perform, +sublicense, and distribute the Work and such Derivative Works in Source or +Object form. + +3. Grant of Patent License. Subject to the terms and conditions of this +License, each Contributor hereby grants to You a perpetual, worldwide, +non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this +section) patent license to make, have made, use, offer to sell, sell, import, +and otherwise transfer the Work, where such license applies only to those +patent claims licensable by such Contributor that are necessarily infringed by +their Contribution(s) alone or by combination of their Contribution(s) with the +Work to which such Contribution(s) was submitted. If You institute patent +litigation against any entity (including a cross-claim or counterclaim in a +lawsuit) alleging that the Work or a Contribution incorporated within the Work +constitutes direct or contributory patent infringement, then any patent +licenses granted to You under this License for that Work shall terminate as of +the date such litigation is filed. + +4. Redistribution. You may reproduce and distribute copies of the Work or +Derivative Works thereof in any medium, with or without modifications, and in +Source or Object form, provided that You meet the following conditions: + + You must give any other recipients of the Work or Derivative Works a copy +of this License; and + You must cause any modified files to carry prominent notices stating that +You changed the files; and + You must retain, in the Source form of any Derivative Works that You +distribute, all copyright, patent, trademark, and attribution notices from the +Source form of the Work, excluding those notices that do not pertain to any +part of the Derivative Works; and + If the Work includes a "NOTICE" text file as part of its distribution, then +any Derivative Works that You distribute must include a readable copy of the +attribution notices contained within such NOTICE file, excluding those notices +that do not pertain to any part of the Derivative Works, in at least one of the +following places: within a NOTICE text file distributed as part of the +Derivative Works; within the Source form or documentation, if provided along +with the Derivative Works; or, within a display generated by the Derivative +Works, if and wherever such third-party notices normally appear. The contents +of the NOTICE file are for informational purposes only and do not modify the +License. You may add Your own attribution notices within Derivative Works that +You distribute, alongside or as an addendum to the NOTICE text from the Work, +provided that such additional attribution notices cannot be construed as +modifying the License. + + You may add Your own copyright statement to Your modifications and may +provide additional or different license terms and conditions for use, +reproduction, or distribution of Your modifications, or for any such Derivative +Works as a whole, provided Your use, reproduction, and distribution of the Work +otherwise complies with the conditions stated in this License. + +5. Submission of Contributions. Unless You explicitly state otherwise, any +Contribution intentionally submitted for inclusion in the Work by You to the +Licensor shall be under the terms and conditions of this License, without any +additional terms or conditions. Notwithstanding the above, nothing herein shall +supersede or modify the terms of any separate license agreement you may have +executed with Licensor regarding such Contributions. + +6. Trademarks. This License does not grant permission to use the trade names, +trademarks, service marks, or product names of the Licensor, except as required +for reasonable and customary use in describing the origin of the Work and +reproducing the content of the NOTICE file. + +7. Disclaimer of Warranty. Unless required by applicable law or agreed to in +writing, Licensor provides the Work (and each Contributor provides its +Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +KIND, either express or implied, including, without limitation, any warranties +or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A +PARTICULAR PURPOSE. You are solely responsible for determining the +appropriateness of using or redistributing the Work and assume any risks +associated with Your exercise of permissions under this License. + +8. Limitation of Liability. In no event and under no legal theory, whether in +tort (including negligence), contract, or otherwise, unless required by +applicable law (such as deliberate and grossly negligent acts) or agreed to in +writing, shall any Contributor be liable to You for damages, including any +direct, indirect, special, incidental, or consequential damages of any +character arising as a result of this License or out of the use or inability to +use the Work (including but not limited to damages for loss of goodwill, work +stoppage, computer failure or malfunction, or any and all other commercial +damages or losses), even if such Contributor has been advised of the +possibility of such damages. + +9. Accepting Warranty or Additional Liability. While redistributing the Work or +Derivative Works thereof, You may choose to offer, and charge a fee for, +acceptance of support, warranty, indemnity, or other liability obligations +and/or rights consistent with this License. However, in accepting such +obligations, You may act only on Your own behalf and on Your sole +responsibility, not on behalf of any other Contributor, and only if You agree +to indemnify, defend, and hold each Contributor harmless for any liability +incurred by, or claims asserted against, such Contributor by reason of your +accepting any such warranty or additional liability. + +END OF TERMS AND CONDITIONS diff --git a/Makefile b/Makefile new file mode 100644 index 000000000..4d97c2fb3 --- /dev/null +++ b/Makefile @@ -0,0 +1,1422 @@ +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Advance Toolchain main Makefile +# +# This file is where all the build starts. +# +# Common targets: +# all - Default target. Build and package the Advance Toolchain. +# Options: +# DESTDIR - Specify the directory where the AT directory +# will be created, e.g.: DESTDIR=/opt +# +# AT_CONFIGSET - Indicates which config set to use. +# Possible values include the name of directories +# inside configs/, e.g.: AT_CONFIGSET=7.0 +# +# BUILD_DEBUG_ON - Forces that all build stages be +# retained. Possible values are "yes" or "no". +# If set to "yes", all temporary build steps are +# retained, regardless of the package setting on +# ATCFG_HOLD_* variables. +# +# BUILD_ARCH - Specify which archicteture this toolchain +# will be targeting. Most config sets have their +# default values, but in same cases the config +# set is able to build toolchains for different +# architectures, e.g.: BUILD_ARCH=ppc64le or +# BUILD_ARCH=ppc64 +# +# AT_MAKE_CHECK - Specify if package testing should be +# done during the build. Setting this to a value +# other than 'none' will enable testing for all +# packages that have atcfg_make_check defined in +# their stage file. This can be overridden at +# the package level by setting the value of +# ATSRC_PACKAGE_MAKE_CHECK in a package's +# source file. The values for this variable are: +# - none: do not enable package testing at the +# global level +# - strict_fail: Enable package testing at the +# global level and cause the build to fail if +# a package's testing fails. +# - silent_fail: Enable package testing at the +# global level but do not cause the build to +# fail if the package's testing fails. +# +# BUILD_IGNORE_COMPAT - Tells to ignore runtime-compat +# package building. If not provided, it's inferred +# by the contents of AT_OLD_KERNEL on the specific +# .mk config file. +# +# BUILD_IGNORE_AT_COMPAT - Tells to ignore atXX-compat +# package building. If not provided, it's inferred +# by the contents of other configset variables. +# +# pack - Create a tarball with all the source code necessary to build AT +# on another server. +# +# clone - Clone a config set, copying or symlinking its files. +# Options: +# FROM - Name of the config set being cloned. +# +# TO - Name of config set being create. +# +# +# test / fvtr - Runs the build and the FVTR test suite to validate it. +# Options: +# TEST_NAME - Name of a particular test suite case to +# run (this limits the test case run to this +# single test). +# + +# Make sure we're running a recent enough GNU make version.' +ifneq (3.81,$(firstword $(sort $(MAKE_VERSION) 3.81))) + $(error "This file requires GNU make 3.81 or newer version.") +endif + +# Set the proper shell to use +SHELL := /bin/bash +# Some shells don't load all the standard values (Ubuntu), so we have to +# manually set all those we need. +USER ?= $(shell whoami) + +# Set some basic path information +ifndef AT_BASE + AT_BASE := $(shell pwd) +endif +CONFIG_ROOT := $(AT_BASE)/configs +SCRIPTS_ROOT := $(AT_BASE)/scripts +SCRIPTS_REPO := $(SCRIPTS_ROOT)/repository +HELPERS_ROOT := $(SCRIPTS_ROOT)/helpers +RPMSPEC_ROOT := $(SCRIPTS_ROOT)/specs +SKELETONS_ROOT := $(SCRIPTS_ROOT)/skeletons +UTILITIES_ROOT := $(SCRIPTS_ROOT)/utilities +FETCH_SOURCES := $(AT_BASE)/sources +FETCH_PATCHES := $(AT_BASE)/patches + +# Define the build timestamp +AT_TODAY := $(shell date "+%Y%m%d") + +# Only set build environment for targets other the 'clone', 'edit' and 'pack' +ifneq "$(MAKECMDGOALS)" "clone" +ifneq "$(MAKECMDGOALS)" "edit" +ifneq "$(MAKECMDGOALS)" "pack" + +# Begin setting build environment ***** +# ********************************************************* + +# Find the host arch where the AT is being build +HOST_ARCH := $(shell uname -m 2>&1) + +# Check for the required config parameter (config path) +ifndef AT_CONFIGSET + AT_CONFIGSET := $(shell ls -d $(CONFIG_ROOT)/[0-9]*.[0-9] | awk -F '/' '{ print $$NF }' | sort -n | tail -1) + ifeq ($(AT_CONFIGSET),) + $(error Couldn't infer AT_CONFIGSET variable, and no hint was given... Bailing out!) + else + $(warning AT_CONFIGSET variable not informed... Using latest one ($(AT_CONFIGSET)).) + endif +endif + +# Verify the setting of AT_MAKE_CHECK + +ifdef AT_MAKE_CHECK + ifneq ($(AT_MAKE_CHECK),none) + ifneq ($(AT_MAKE_CHECK),strict_fail) + ifneq ($(AT_MAKE_CHECK),silent_fail) + $(warning unrecognized value for AT_MAKE_CHECK... value none assumed.) + AT_MAKE_CHECK := none + endif + endif + endif +else + AT_MAKE_CHECK := none +endif + +CONFIG := $(CONFIG_ROOT)/$(AT_CONFIGSET) +CONFIG_SPEC := $(CONFIG)/specs +DEBH_ROOT := $(CONFIG)/deb + +# Load all config directives for the build +include $(CONFIG)/base.mk +include $(CONFIG)/build.mk +include $(CONFIG)/sanity.mk + + +# Define a simple check for file validation +# $(call file_exists,) +define file_exists + if [[ -r $1 ]]; then \ + echo "found"; \ + else \ + echo "none"; \ + fi +endef + +# Define a verification for progname +# $(call find_prg,) +define find_prg + for DIR in $$(echo $${PATH} | tr ":" "\t"); do \ + if [[ -x "$${DIR}/$1" ]]; then \ + echo "$${DIR}/$1"; \ + break; \ + fi; \ + done +endef + +# Assign some essential tools for the build to defines and verify its existence +# lsb_release +LSBTOOL := $(strip $(shell $(call find_prg,lsb_release))) +ifeq ($(LSBTOOL),) + $(error Program lsb_release not installed... Bailing out!) +endif +# ld +GCC_LD := $(strip $(shell $(call find_prg,ld))) +ifeq ($(GCC_LD),) + $(error Program linker not found... Bailing out!) +endif +# as +GCC_AS := $(strip $(shell $(call find_prg,as))) +ifeq ($(GCC_AS),) + $(error Basic assembler not found... Bailing out!) +endif +# gcc +SYSTEM_CC := $(strip $(shell $(call find_prg,gcc))) +ifeq ($(SYSTEM_CC),) + $(error No gcc system toolchain installed... Bailing out!) +endif +# g++ +SYSTEM_CXX := $(strip $(shell $(call find_prg,g++))) +ifeq ($(SYSTEM_CXX),) + $(error No g++ system toolchain installed... Bailing out!) +endif +# autoconf +AUTOCONF := $(strip $(shell $(call find_prg,autoconf))) +ifeq ($(AUTOCONF),) + $(error No autoconf installed... Bailing out!) +endif + +# Load basic utilities +ifeq ($(strip $(shell $(call file_exists,$(HELPERS_ROOT)/utilities.mk))),found) + include $(HELPERS_ROOT)/utilities.mk +else + $(error Couldn't find the utilities helper macro... Bailing out!) +endif + +# Collect the distro version in which it's being run +DISTRO_INFO := $(shell $(call get_distro_info)) +DISTRO_ID := $(shell echo $(DISTRO_INFO) | cut -d ' ' -f 1) +DISTRO_AB := $(shell echo $(DISTRO_INFO) | cut -d ' ' -f 2) +DISTRO_FM := $(shell echo $(DISTRO_ID) | cut -d '-' -f 1) +DISTRO_FILE := $(CONFIG)/distros/$(DISTRO_ID).mk + +# Check if the running distro is supported for builds +ifeq ($(strip $(shell $(call file_exists,$(DISTRO_FILE)))),found) + include $(DISTRO_FILE) +else + $(error Distro $(DISTRO_ID) not supported... Bailing out!) +endif + +# When doing a cross build, if the executables should be 32 bit +# reset the HOST_ARCH from x86_64 to i686. +ifeq ($(HOST_ARCH),x86_64) + ifeq ($(BUILD_CROSS_32),yes) + HOST_ARCH := i686 + endif +endif + +# Prepare the SUB_MAKE variable to use in recipes sub make calls +export SUB_MAKE = $(MAKE) + +# Set more path information +BUILD_ID := $(DISTRO_ID)_$(HOST_ARCH)_$(BUILD_ARCH) + +# First things first... Check for general build sanity before proceeding +BASE_SANITY := $(strip $(shell $(call base_sanity))) + +# Define some internal version name variables +AT_VER_REV := $(AT_MAJOR_VERSION)-$(AT_REVISION_NUMBER) +AT_MAJOR := $(AT_NAME)$(AT_MAJOR_VERSION) +ifeq ($(AT_INTERNAL),none) + AT_FULL_VER := $(AT_VER_REV) +else + AT_FULL_VER := $(AT_VER_REV)-$(AT_INTERNAL) +endif +AT_VER_REV_INTERNAL := $(AT_NAME)$(AT_FULL_VER) + +# Macro to check the terminal in which we are being executed +define check_terminal + if [[ ! (("$${TERM:0:6}" == "screen" || $${#TMUX} -gt 0)) ]]; then \ + echo "no_session"; \ + else \ + echo "session"; \ + fi +endef + +# Check which kind of terminal are we running on... +TERMINAL := $(shell $(call check_terminal)) +# If its not a session safe terminal kind, issue a warning... +ifeq ($(TERMINAL),no_session) + $(warning **************************************************) + $(warning You are running this build from a bare shell...) + $(warning Please consider using screen or tmux for this.) + $(warning **************************************************) +endif + +# Macro to get all packages name's +define get_package_list + for package in $$(find $(CONFIG)/packages/* -type d -print); do \ + [[ -r $${package}/sources ]] && \ + echo $$(basename $${package}); \ + done +endef + +# Macro to get all packages built. +# Extract the list from $(build_targets) variable. +define get_built_packages + $(sort $(foreach name,$(basename $(notdir $(build_targets))),\ + $(shell echo $(name) | cut -d_ -f1))) +endef + +# Export settings for the FVTR +# $(call build_fvtr_conf,) +define build_fvtr_conf + AT_KERNEL=$(AT_KERNEL); \ + utilities=$(UTILITIES_ROOT); \ + echo "AT_NAME=\"${AT_NAME}\"" > $(CONFIG_EXPT); \ + echo "AT_MAJOR_VERSION=\"${AT_MAJOR_VERSION}\"" >> $(CONFIG_EXPT); \ + echo "AT_REVISION_NUMBER=\"${AT_REVISION_NUMBER}\"" >> $(CONFIG_EXPT); \ + echo "AT_INTERNAL=\"${AT_INTERNAL}\"" >> $(CONFIG_EXPT); \ + echo "AT_DEST=\"${AT_DEST}\"" >> $(CONFIG_EXPT); \ + echo "AT_BUILD_ARCH=\"${BUILD_ARCH}\"" >> $(CONFIG_EXPT); \ + echo "AT_CROSS_BUILD=\"${CROSS_BUILD}\"" >> $(CONFIG_EXPT); \ + echo "AT_TARGET=\"${TARGET}\"" >> $(CONFIG_EXPT); \ + echo "AT_HOST_ARCH=\"${HOST_ARCH}\"" >> $(CONFIG_EXPT); \ + echo "AT_BUILD_LOAD_ARCH=\"${BUILD_LOAD_ARCH}\"" >> $(CONFIG_EXPT); \ + echo "AT_OPTMD_LIBS=\"${BUILD_ACTIVE_MULTILIBS}\"" >> $(CONFIG_EXPT); \ + for PKG in $1; do \ + source $(CONFIG)/packages/$${PKG}/sources; \ + PKG_NAME=$$(echo "$${PKG}" | awk '{print toupper($$0)}'); \ + echo "AT_$${PKG_NAME}_VER=$${ATSRC_PACKAGE_VER}" >> $(CONFIG_EXPT); \ + done; \ + echo created +endef + +# Pack the assigned source packages to include them into the distribution +# tarball +# $(call pack_source_pkgs,) +define pack_source_pkgs + set -e; \ + AT_KERNEL=$(AT_KERNEL); \ + utilities=$(UTILITIES_ROOT); \ + rm -f $(SRC_TAR_FILE); \ + for PKG in $1; do \ + source $(CONFIG)/packages/$${PKG}/sources; \ + if [[ "$${ATSRC_PACKAGE_DISTRIB}" == "yes" ]]; then \ + tar_pkgs="$${tar_pkgs} $$(basename $${ATSRC_PACKAGE_WORK})"; \ + fi; \ + unset $${!ATSRC_PACKAGE_*}; \ + done; \ + tar_pkgst=$$(echo $${tar_pkgs#$${tar_pkgs%%[![:space:]]*}}); \ + tar cpzf $(SRC_TAR_FILE) -C $(SOURCE) $${tar_pkgst}; \ + set +e +endef + +# Define a logging macro for a given command +# $(call runandlog,,) +define runandlog + { echo "Logging the following command at:"; \ + date; \ + echo; \ + set -x; \ + $2; \ + ret=$${?}; \ + set +x; \ + echo; \ + date; \ + echo "-----------------------------------------------------"; \ + } >> $1 2>&1 +endef + +# Create path if needed and return its name +# $(call mkpath,,) +define mkpath + if [[ -n "$1" ]]; then \ + fpath=$$(echo $1 | sed 's|//*|/|g'); \ + if [[ -r $${fpath} ]]; then \ + if [[ "$2" == "yes" ]]; then \ + rm -rf $${fpath}/*; \ + fi; \ + elif [[ -e $${fpath} ]]; then \ + echo "You can't access this path: $${fpath}. Aborting."; \ + exit 1; \ + else \ + mkdir -p $${fpath}; \ + fi; \ + echo $${fpath}; \ + unset fpath; \ + else \ + echo $1; \ + fi +endef + +# Find the number of SMT cores available +# $(call get_smt_cores) +define get_smt_cores + if [[ -r /proc/cpuinfo ]]; then \ + CPU_TYPE=$$(cat /proc/cpuinfo | grep cpu | cut -f 2 -d ':' | sort -u | sed 's@^ @@' | cut -f 1 -d ' '); \ + CORES_FOUND=$$(cat /proc/cpuinfo | grep "processor" | wc -l); \ + echo $${CORES_FOUND}; \ + else \ + echo 0; \ + fi +endef + +# Sanity checks for ld and gcc +# $(call sanity_gcc) +define sanity_gcc + if [[ $$(gcc -v --help 2>&1 | grep secure-plt | wc -l) -eq 0 ]]; then \ + echo "Failure. Host GCC is too old."; \ + exit 1; \ + fi +endef +# $(call sanity_ld) +define sanity_ld + if [[ $$($(GCC_LD) --help 2>&1 | grep bss-plt | wc -l) -eq 0 ]]; then \ + echo "Failure. Host $(GCC_LD) is too old."; \ + exit 1; \ + fi +endef + +# Create a script to call make again with the same arguments +# $(call create_remake) +define create_remake + echo "#/bin/bash" > remake.sh; \ + echo -n "make DESTDIR='$(DESTDIR)'" >> remake.sh; \ + echo -n " AT_CONFIGSET='$(AT_CONFIGSET)'" >> remake.sh; \ + echo -n " BUILD_ARCH='$(BUILD_ARCH)'" >> remake.sh; \ + echo -n " AT_DIR_NAME='$(AT_DIR_NAME)' \"\$${@}\"" >> remake.sh; \ + chmod +x remake.sh; \ + echo created +endef + +# Set the required variables for optimized libraries targets. +# +# Parameters: +# 1. : Name of the component being built, e.g.: glibc +# +# Description: +# This macro filters the conditions to call provide_proc_tuned macro and +# clears the $(_tuned-archdeps) variable. +# In the end the following variables will be properly configured: +# - tuned_targets +# - _tuned-archdeps +# - _-deps - only if necessary +# - _-32-deps - only if necessary +# - _-64-deps - only if necessary +# +# Example: +# $(call provide_tuneds,) +define provide_tuneds + # Hack around an issue where foreach iterates over a null variable + ifneq ($(TUNED_PROCESSORS),) + # List this package as a dependency in the global tuned target + tuned-targets += $(RCPTS)/$(1)_tuned.rcpt + $(foreach proc,$(TUNED_PROCESSORS),\ + $(eval $(call provide_proc_tuned,$(1),$(proc)))) + $(1)_tuned-archdeps += $($(1)_tuned-32-archdeps) \ + $($(1)_tuned-64-archdeps) + endif +endef + +# Setup the variables of a optimized library according to the processor +# and depending on cross compiler settings. +# +# Parameters: +# 1. : Name of the component being built, e.g.: glibc +# 2. : Name of the processor to which this component is going to be +# optimized to, e.g.: power7 +define provide_proc_tuned + ifeq (x$(CROSS_BUILD),xyes) + ifeq (x$(BUILD_TUNED_ON_CROSS),xyes) + $(call set_provides_arch_tuned,$(1),$(2)) + endif + else + $(call set_provides_arch_tuned,$(1),$(2)) + endif +endef + +# Define the required variables of optimized libraries according to its target. +# +# Parameters: +# 1. : Name of the component being built, e.g.: glibc +# 2. : Name of the processor to which this component is going to be +# optimized to, e.g.: power7 +# Check if this target doesn't require bi-arch tuned libs. +define set_provides_arch_tuned + ifdef $(1)_tuned-deps + $(1)_tuned-archdeps += $(RCPTS)/$(1)_$(2).tuned.b.rcpt + $(1)_$(2)-deps := $($(1)_tuned-deps) + else + ifdef BUILD_TARGET_ARCH32 + $(1)_tuned-32-archdeps += $(RCPTS)/$(1)_$(2)-32.tuned.b.rcpt + $(1)_$(2)-32-deps := $($(1)_tuned-32-deps) + endif + ifdef BUILD_TARGET_ARCH64 + $(1)_tuned-64-archdeps += $(RCPTS)/$(1)_$(2)-64.tuned.b.rcpt + $(1)_$(2)-64-deps := $($(1)_tuned-64-deps) + endif + endif +endef + +# This macro filters and prepares the requirements for the given target_name +# +# Parameters: +# 1. : This is the target name to base your requirements. +# 2. : This is the kind of requires to define (multi = +# 32/64 deps, single = no 32/64 deps). +# 3. : This informs the inclusion of this dependency for cross +# builds (cross_yes = build on cross, cross_no = don't +# build on cross). +# 4. : (Optional) This informs to skip this dependency for +# builds on given arch (skip_ppc64 = skip on ppc64 build, +# skip_ppc64le = skipe on ppc64le build). +# +# Description: +# This macro filters the conditions to call the set_provides_arch macro and +# clears the $(-archdeps) variable. +# +# Example: +# $(call set_provides,,,[,]) +define set_provides + $(1)-archdeps := + ifneq ($(CROSS_BUILD),yes) + ifneq ($(4),skip_$(BUILD_ARCH)) + $(call set_provides_arch,$(1),$(2)) + endif + else + ifeq ($(3),cross_yes) + $(call set_provides_arch,$(1),$(2)) + endif + endif +endef + +# This macro prepares the requirements for the given target_name +# +# Parameters: +# 1. : This is the target name to base your requirements. +# 2. : This is the kind of requires to define (multi = +# 32/64 deps, single = no 32/64 deps). +# +# Description: +# This macro defines the variables $(-archdeps) that should be +# used to set the dependencies of the master target . It also +# includes the target as a dependency to "all" through the variable +# $(build_targets) +# +# Example: +# $(call set_provides_arch,,,) +define set_provides_arch + ifeq ($(2),multi) + ifdef BUILD_TARGET_ARCH32 + $(1)-archdeps += $(RCPTS)/$(1)-32.b.rcpt + endif + ifdef BUILD_TARGET_ARCH64 + $(1)-archdeps += $(RCPTS)/$(1)-64.b.rcpt + endif + else + $(1)-archdeps := $(RCPTS)/$(1).b.rcpt + endif + build_targets += $(RCPTS)/$(1).rcpt +endef + +define collect_logs + @echo -en "Collecting log information... "; + @+{ unset commit_info; \ + if [[ -f commit.info ]]; then \ + cp -p commit.info $(AT_WD); \ + commit_info="./commit.info"; \ + fi; \ + cd $(AT_WD) && \ + tar czf collected_logs.tar.gz \ + ./logs/* ./dynamic $${commit_info} \ + $$(find ./builds -name 'config.[hlms]*' \ + -print); \ + mv -f $(AT_WD)/collected_logs.tar.gz $(AT_BASE)/collected_logs-$(AT_VER_REV_INTERNAL).$(BUILD_ID)_$$(date --rfc-3339=seconds | tr ' ' '_' | tr ':' '.' | cut -c -19).tar.gz; \ + unset commit_info; \ + } > /dev/null 2>&1 + @echo 'done!' +endef + +# This is a simple heuristics to find out if we need to build the atXX-compat +# RPM package. It's loose and wide in tending to choose a build instead of a +# build denial (it considers "compat" and "supported" previous AT distros), so +# if you are sure that you must skip this package build, state it clearly on +# the config files (preferably on the distro.mk related file), or the check +# could be further restrained. +# Having said that, there is a quick description of its logic: +# We first collect all the supported and compat distros related to this build, +# and for each of them, (from earliest to oldest) we try to locate base support +# for it on the previous AT version. If base support is found, we try to +# identify if the particular build being done was supported (BE or LE). If it's +# found, we send back a "no" as a GO for the build of atXX-compat, otherwise, +# we send back a "yes" as a NO GO (ignore) for the build of atXX-compat. +# Note that we could restrain it further, looking only for AT previous +# "supported" distros, but I'm not sure that it's the correct path to follow. +define build_at_compat_rpm + compat_distros=$$(echo $(AT_COMPAT_DISTROS) \ + $(AT_SUPPORTED_DISTROS) | \ + sed 's|RHEL|redhat-|g' | \ + sed 's|SLES_|suse-|g' | \ + tr ' ' '\n' | sort -ru | tr '\n' ' '); \ + if [[ -n "$${compat_distros}" ]]; then \ + for distro in $${compat_distros}; do \ + distro_file="$(CONFIG_ROOT)/$(AT_PREVIOUS_VERSION)/distros/$${distro}.mk"; \ + if [[ -f $${distro_file} ]]; then \ + supp_archs="$$(cat $${distro_file} | \ + grep -o '^AT_SUPPORTED_ARCHS.*$$' | \ + sed 's|AT_SUPPORTED_ARCHS := ||g') "; \ + if [[ "$${supp_archs}" != "$${supp_archs/$(BUILD_ARCH) /}" ]]; then \ + at_comp_found="true"; \ + break; \ + fi; \ + fi; \ + done; \ + if [[ "$${at_comp_found}" == "true" ]]; then \ + echo "no"; \ + else \ + echo "yes"; \ + fi; \ + else \ + echo "yes"; \ + fi +endef + +# Copy files from $(1) to $(2) if it exists. +# +# Parameters: +# 1. : Name of the file to be copied. +# 2. : Destination where the source file will be saved. +define copy_if_exists + if [[ -n "$(1)" && -e "$(1)" ]]; then \ + echo "- $$(basename $(1))"; \ + cp $(1) $(2); \ + fi +endef + +# Create a path, if it fails try to use super-user permission. +# $(call sudo_mkdir, ) +define sudo_mkdir + if [[ ! (-r $1) ]]; then \ + mkdir -p $1; \ + if [[ ! (-r $1) ]]; then \ + echo "Cannot create $1, trying as super-user..."; \ + sudo mkdir -p $(1) && sudo chown "$${USER}." $(1); \ + fi; \ + fi +endef + +# Define the installation path +# DESTDIR, is optional and should be externally defined. +DESTDIR ?= /opt + +ifneq ($(AT_INTERNAL),none) + AT_MAJOR_INTERNAL := $(AT_MAJOR)-$(AT_INTERNAL) + AT_DIR_NAME ?= $(AT_VER_REV_INTERNAL) +else + AT_MAJOR_INTERNAL := $(AT_MAJOR) + AT_DIR_NAME ?= $(AT_MAJOR) +endif + +AT_DEST := $(shell echo $(DESTDIR)/$(AT_DIR_NAME) | sed 's|//*|/|g') +MESSAGE := $(shell $(call sudo_mkdir,$(AT_DEST))) +ifneq ($(MESSAGE),) + $(warning $(MESSAGE)) +endif +ifeq ($(strip $(shell $(call file_exists,$(AT_DEST)))),none) + $(error Couldn't create directory $(AT_DEST)... Bailing out!) +endif + +# If the user wants to use a prespecified AT_BUILD we don't care. Otherwise we +# use the current working directory. +ifndef AT_WD + AT_WD := $(AT_BASE)/$(AT_VER_REV_INTERNAL).$(BUILD_ID) +endif + +# Define the actual TEMP_INSTALL path to use on build +TEMP_INSTALL := $(AT_BASE)/tmp.$(AT_VER_REV_INTERNAL).$(BUILD_ID) + +# Prepare the list of all packages +PACKAGES_LIST := $(strip $(shell $(call get_package_list))) + +# Prepare the tuned processors and libs list +TUNED_PROCESSORS := $(sort $(BUILD_ACTIVE_MULTILIBS)) + +# Define and create the build structure folders +LOGS := $(strip $(shell $(call mkpath,$(AT_WD)/logs,no))) +RPMS := $(strip $(shell $(call mkpath,$(AT_WD)/rpms,no))) +DEBS := $(strip $(shell $(call mkpath,$(AT_WD)/debs,no))) +PACKS := $(strip $(shell $(call mkpath,$(AT_WD)/tarball,no))) +RCPTS := $(strip $(shell $(call mkpath,$(AT_WD)/receipts,no))) +BUILD := $(strip $(shell $(call mkpath,$(AT_WD)/builds,no))) +SOURCE := $(strip $(shell $(call mkpath,$(AT_WD)/sources,no))) +DYNAMIC_ROOT := $(strip $(shell $(call mkpath,$(AT_WD)/dynamic,no))) +DYNAMIC_SPEC := $(strip $(shell $(call mkpath,$(DYNAMIC_ROOT)/spec,no))) +DYNAMIC_LOAD := $(strip $(shell $(call mkpath,$(DYNAMIC_ROOT)/load,no))) +TEMP_INSTALL := $(strip $(shell $(call mkpath,$(TEMP_INSTALL),no))) +ifeq ($(AT_USE_FEDORA_RELNAM),yes) + RELNOT_FILE := $(RPMS)/release_notes.$(AT_NAME)-$(AT_FULL_VER).tmp + SRC_TAR_FILE := $(PACKS)/$(AT_NAME)-src-$(AT_FULL_VER).tgz +else + RELNOT_FILE := $(RPMS)/release_notes.$(AT_MAJOR_INTERNAL)-$(AT_VER_REV).tmp + SRC_TAR_FILE := $(PACKS)/advance-toolchain-$(AT_MAJOR_INTERNAL)-src-$(AT_VER_REV).tgz +endif +# Name of the exported config file. +CONFIG_EXPT := $(DYNAMIC_ROOT)/config_$(AT_VER_REV_INTERNAL).$(BUILD_ID) +# Define some fetch folder structure +FETCH_SOURCES := $(strip $(shell $(call mkpath,$(FETCH_SOURCES),no))) +FETCH_PATCHES := $(strip $(shell $(call mkpath,$(FETCH_PATCHES),no))) + +# If everything is fine until here, load some more defines with macros +# to help the build process + +ifeq ($(strip $(shell $(call file_exists,$(HELPERS_ROOT)/rsync_and_patch.mk))),found) + include $(HELPERS_ROOT)/rsync_and_patch.mk +else + $(error Couldn't find the rsync_and_patch helper macro... Bailing out!) +endif + +ifeq ($(strip $(shell $(call file_exists,$(HELPERS_ROOT)/build_stage.mk))),found) + include $(HELPERS_ROOT)/build_stage.mk +else + $(error Couldn't find the build_stage helper macro... Bailing out!) +endif + +ifeq ($(strip $(shell $(call file_exists,$(HELPERS_ROOT)/standard_buildf.mk))),found) + include $(HELPERS_ROOT)/standard_buildf.mk +else + $(error Couldn't find the standard_buildf helper macro... Bailing out!) +endif + +# Check the number of cores on the build machine +NUM_CORES := $(strip $(shell $(call get_smt_cores))) +ifeq ($(NUM_CORES),0) + $(error Couldn't find the number of cores available... Bailing out!) +endif + +# Load architecture dependent settings. +ifeq ($(strip $(shell \ + $(call file_exists, \ + $(CONFIG)/arch/$(HOST_ARCH).$(BUILD_ARCH).mk))), \ + found) + include $(CONFIG)/arch/$(HOST_ARCH).$(BUILD_ARCH).mk +else + $(error Build on host $(HOST_ARCH) targeting $(BUILD_ARCH) is not supported.) +endif + + +ifneq ($(strip $(shell $(call create_remake))),created) + $(error Failed to create remake.sh. Bailing out!) +endif + +# Run distro sanity check to validate the build system +ifdef distro_sanity + ifeq ($(CROSS_BUILD),yes) + AT_PKGS_CHECK := $(sort $(AT_CROSS_PKGS_REQ) $(AT_COMMON_PKGS_REQ)) + AT_PGMS_CHECK := $(sort $(AT_CROSS_PGMS_REQ) $(AT_COMMON_PGMS_REQ)) + else + AT_PKGS_CHECK := $(sort $(AT_NATIVE_PKGS_REQ) $(AT_COMMON_PKGS_REQ)) + AT_PGMS_CHECK := $(sort $(AT_NATIVE_PGMS_REQ) $(AT_COMMON_PGMS_REQ)) + endif + PKG_DISTRO_SANITY := $(strip $(shell $(call check_packages,$(AT_PKGS_CHECK)))) + PGM_DISTRO_SANITY := $(strip $(shell $(call check_programs,$(AT_PGMS_CHECK)))) + ifeq ($(PKG_DISTRO_SANITY),abort) + $(error Missing critical requirements for the build process to proceed. Check ./sanity.log for a detailed missing requirements description.) + endif + ifeq ($(PGM_DISTRO_SANITY),abort) + $(error Missing critical requirements for the build process to proceed. Check ./sanity.log for a detailed missing requirements description.) + endif +endif + +# Determine the BUILD_IGNORE_COMPAT if still undefined and set it based on +# distro.mk AT_OLD_KERNEL. If AT_OLD_KERNEL isn't defined there, there is no +# compatibility version to build to. +ifeq ($(AT_OLD_KERNEL),) + BUILD_IGNORE_COMPAT ?= yes +else + BUILD_IGNORE_COMPAT ?= no +endif + +# If BUILD_IGNORE_AT_COMPAT if still undefined, we try to set it based on +# a heuristics to check the requirement of its build. We must keep in mind +# that there is no clear rule to dismiss the creation of this package, so in +# this heuristics, we try to be as wide and loose as possible to include the +# build of this package. If it's required *not* to build it, please be +# explicit, setting this override on the build process itself, or on the global +# build.mk or on the specific distro.mk file of the build. +ifeq ($(BUILD_IGNORE_AT_COMPAT),) + ifneq ($(AT_PREVIOUS_VERSION),) + BUILD_IGNORE_AT_COMPAT := $(shell $(call build_at_compat_rpm)) + else + BUILD_IGNORE_AT_COMPAT := yes + endif +endif + + +# If it was defined that the atXX-compat rpm package should be build, we must +# guarantee that there is a previous AT version defined to base this build. If +# it is defined, we should set the variables used for the atXX-compat spec +# file, otherwise, we must print a warning message and abort the build due to +# missing critical information on the config files. +ifneq ($(BUILD_IGNORE_AT_COMPAT),yes) + ifeq ($(AT_PREVIOUS_VERSION),) + $(warning No AT_PREVIOUS_VERSION defined, so we can't build the atXX-compat package.) + $(warning If you need to do so, please configure the AT_PREVIOUS_VERSION properly and) + $(warning run the build again.) + $(error Aborting build due to missing required config information...) + else + BUILD_OLD_AT_VERSION := $(AT_PREVIOUS_VERSION) + BUILD_OLD_AT_INSTALL := $(strip $(shell echo $(AT_DEST) | sed "s/$(AT_DIR_NAME)/at$(AT_PREVIOUS_VERSION)/")) + endif +endif + + +# Determine the default system Toolchain to use +ifeq ($(CROSS_BUILD),no) + # Run a test compilation to verify the system toolchain + DEFAULT_COMPILER := $(shell \ + echo "int main() { return 0; }" > ./sample.c; \ + $(SYSTEM_CC) ./sample.c; \ + echo $$(file a.out | sed 's|^.*ELF ||' | sed 's|-bit.*$$||'); \ + rm -f ./sample.c ./a.out \ + ) + # Find out which CPU we are doing the build + AT_BUILD_CPU := $(shell cat /proc/cpuinfo | grep '^cpu' | cut -d ':' -f 2 | sort -u | sed 's@^ @@g' | cut -d ' ' -f 1 | tr [:upper:] [:lower:]) +else + SYSTEM_CC := $(SYSTEM_CC) -m$(ENV_BUILD_ARCH) + SYSTEM_CXX := $(SYSTEM_CXX) -m$(ENV_BUILD_ARCH) + DEST_CROSS ?= $(strip $(shell $(call mkpath,$(AT_DEST)/ppc,no))) +endif + +# Make sure the environment won't affect the build. +# Under some circumstances if PYTHONPATH is defined, it may break the builds +# or the tests of python and gdb. +unexport PYTHONPATH + +# ********************************************************* +# Finish setting build environment ***** + +# Continue processing for targets 'clone', 'edit' and 'pack' +endif +endif +endif + +# Directories where artifacts created by this system will be saved after +# running collect-artifacts. +ARTIFACTS := $(strip $(shell $(call mkpath,$(AT_BASE)/artifacts,yes))) + +# Default +build_targets := +.DEFAULT_GOAL := all + +.PHONY: all test destclean cleanall clean collect clone edit pack + +all: package release + $(call collect_logs) + +test: fvtr tarball_test + +fvtr: $(RCPTS)/fvtr.rcpt + +$(RCPTS)/fvtr.rcpt: $(RCPTS)/package.rcpt + @echo "Running FVTR for $(AT_VER_REV_INTERNAL)..." + @+{ cd fvtr; \ + AT_WD=$(AT_WD) \ + AT_PREVIOUS_VERSION=$(AT_PREVIOUS_VERSION) \ + AT_DIR_NAME=$(AT_DIR_NAME) \ + ./fvtr.sh -f \ + $(DYNAMIC_ROOT)/config_$(AT_VER_REV_INTERNAL).$(BUILD_ID) \ + $(TEST_NAME) \ + 2>&1 \ + | tee $(LOGS)/test-suite_$(AT_VER_REV_INTERNAL).$(BUILD_ID).log; \ + test "$${PIPESTATUS[0]}" -eq "0"; \ + }; + +tarball_test: $(RCPTS)/source_tarball.rcpt + @+{ echo "Checking the source tarball..."; \ + if [[ "$(CROSS_BUILD)" == "no" ]]; then \ + $(call runandlog,$(LOGS)/_tarball_check.log,$(UTILITIES_ROOT)/check_tarball.sh $(AT_MAJOR_VERSION) $(SRC_TAR_FILE)); \ + if [[ $${ret} -ne 0 ]]; then \ + echo "Problem checking source tarball."; \ + exit 1; \ + fi; \ + fi; \ + echo "Completed source tarball check!"; \ + }; + +clean: destclean + +cleanall: destclean + @echo "Cleaning pristine sources and patches..." + @echo "- $(FETCH_SOURCES)" + @rm -rf $(FETCH_SOURCES) + @echo "- $(FETCH_PATCHES)" + @rm -rf $(FETCH_PATCHES) + +destclean: localclean + @echo "Removing installation from $(AT_DEST)..." + @echo "- $(AT_DEST)" + @rm -rf $(AT_DEST)/* + @+{ rmdir $(AT_DEST); \ + if [[ -e $(AT_DEST) ]]; then \ + echo "Cannot remove $(AT_DEST), trying as super-user..."; \ + sudo rmdir $(AT_DEST); \ + fi; \ + }; + +clean-fvtr: $(RCPTS)/collect-fvtr.rcpt + @echo "Cleaning FVTR logs... " + @find fvtr/ -name '*.log' -delete + +clean-temp: + @echo "Cleaning $(TEMP_INSTALL)" + @rm -rf ${TEMP_INSTALL} + +localclean: collect clean-temp clean-fvtr + @echo "Cleaning build related folders..." + @echo "- $(AT_WD)" + @rm -rf $(AT_WD) + @echo "- $(FETCH_SOURCES)/*.lock" + @rm -rf $(FETCH_SOURCES)/*.lock + @echo "- $(FETCH_PATCHES)/*.lock" + @rm -rf $(FETCH_PATCHES)/*.lock + @echo "- $(AT_BASE)/remake.sh" + @rm -f $(AT_BASE)/remake.sh + @echo "- $(AT_BASE)/sanity.log" + @rm -f $(AT_BASE)/sanity.log + +collect: collect-fvtr + $(call collect_logs) + +collect-fvtr: $(RCPTS)/collect-fvtr.rcpt + +# Copy all generated files (packages, source code tarball, config file, logs, +# etc.) to the directory specified by ARTIFACTS. +# This is useful for the BuildBot in order to find all of these files in a +# standard place. +collect-artifacts: + @echo "Collecting artifacts..." + @$(call copy_if_exists,$(CONFIG_EXPT),$(ARTIFACTS)) + @$(call copy_if_exists,$(AT_BASE)/sanity.log,$(ARTIFACTS)) + @$(call copy_if_exists,$(shell ls -t $(AT_BASE)/collected_logs-* \ + | head -n 1),\ + $(ARTIFACTS)); + @$(call copy_if_exists,$(RELNOT_FILE),$(ARTIFACTS)) + @$(call copy_if_exists,$(SRC_TAR_FILE),$(ARTIFACTS)) + @{ \ + for pkg in $(RPMS)/$(HOST_ARCH)/* $(DEBS)/*.deb; do \ + $(call copy_if_exists,$${pkg},$(ARTIFACTS)); \ + done; \ + unset pkg; \ + } + + +# This rule updates the revision of all "config/source" files of AT to the +# latest commit. Alternatively, you may update a specific package, passing +# the name as a parameter. See update_revision.sh for more information. +# +# usage: +# make DESTDIR=~ AT_CONFIGSET=next update-revision +update-revision: + @+{ packages=$(filter-out $@,$(MAKECMDGOALS)); \ + if [[ -z "$${packages}" ]]; then \ + packages="$(filter-out kernel,$(FETCH_PACKAGE_LIST))"; \ + fi; \ + for pkg in $${packages}; do \ + . $(UTILITIES_ROOT)/update_revision.sh $(CONFIG)/packages/$${pkg}/sources; \ + done; \ + } + +# Defining an empty rule whenever update-revision is defined. This allows us to +# pass parameters to the update-revision rule. +ifeq (update-revision,$(firstword $(MAKECMDGOALS))) +%: + @: +endif + +clone: + @+{ if [[ -n "$(FROM)" && -n "$(TO)" ]]; then \ + echo "Clonning config from $(FROM) to $(TO)..."; \ + { pushd "$(CONFIG_ROOT)"; \ + find $(FROM) -type d -print | sed 's/^$(FROM)*/$(TO)/g' | xargs mkdir -p; \ + contents=$$(find $(FROM) ! -type d -print); \ + for source in $${contents}; do \ + target=$$(echo $${source} | sed 's/^$(FROM)/$(TO)/g'); \ + if [[ -n "$$(echo $${source} | grep '\/distros\/.*$$')" ]]; then \ + if [[ -n "$$(ls -l $${source} | grep '^l')" ]]; then \ + if [[ -z "$$(readlink $${source} | grep -E '^\.\.\/')" ]]; then \ + cp -a $${source} $${target}; \ + continue; \ + fi; \ + fi; \ + fi; \ + if [[ -n "$$(echo $${source} | grep -e '\/base.mk' -e '\/build.mk' -e '\/sanity.mk')" ]]; then \ + cp -a $${source} $${target}; \ + continue; \ + fi; \ + prefix=$$(dirname $$(echo $${source} | sed -e 's/[^\/]\+\//\.\.\//g')); \ + ln -sf $${prefix}/$${source} $${target}; \ + done; \ + popd; \ + } > /dev/null 2>&1; \ + else \ + echo "Please inform FROM= TO=."; \ + fi; \ + } + +edit: + @+{ if [[ -n "$(FROM)" && -n "$(TYPE)" ]]; then \ + echo "Materializing config files of type $(TYPE) of config version $(FROM)..."; \ + { pushd "$(CONFIG_ROOT)/$(FROM)/$(TYPE)"; \ + if [[ -n "$(FILE)" ]]; then \ + cp -L $(FILE) $(FILE).orig && rm -rf $(FILE) && mv $(FILE).orig $(FILE); \ + else \ + for file in $$(find . -type l -print); do \ + cp -L $${file} $${file}.orig && rm -rf $${file} && mv $${file}.orig $${file}; \ + done; \ + fi; \ + popd; \ + } > /dev/null 2>&1; \ + else \ + echo "Please inform at least FROM= TYPE=."; \ + fi; \ + } + +# Generate a pack for usage on a build pack area +pack: hash + @echo "Preparing the build pack..." + @+{ TMP_DIR=$$(mktemp -d "/tmp/atpack-XXXXXXX"); \ + tar -cpvz -X "$(HELPERS_ROOT)/pack-exclude.lst" -f "$${TMP_DIR}/at-$(AT_TODAY).tgz" ./ > \ + "$${TMP_DIR}/at-$(AT_TODAY).included" 2>&1; \ + mv "$${TMP_DIR}/at-$(AT_TODAY).tgz" . ; \ + mv "$${TMP_DIR}/at-$(AT_TODAY).included" . ; \ + rm -rf "$${TMP_DIR}"; \ + } > /dev/null 2>&1 + @echo "- Built pack tarball: at-$(AT_TODAY).tgz" + @echo "- Included file list: at-$(AT_TODAY).included" + +# Update the commit.info with the branch/commit in use +hash: + @+{ if [[ -d ./.git ]]; then \ + echo "commit: $$(git rev-parse --short HEAD)" > commit.info; \ + echo "branch: $$(git rev-parse --abbrev-ref HEAD)" >> commit.info; \ + echo "File commit.info updated successfully."; \ + else \ + echo "No commit/branch info available. Are you running it from a build"; \ + echo "pack area? Run it from a working git sandbox to collect usefull"; \ + echo "values."; \ + fi; \ + } + +# Clean targets definitions +release: $(RCPTS)/release-notes.rcpt + +# Select the packaging system +ifeq ($(DISTRO_FM),ubuntu) + pack-sys := deb +endif +ifeq ($(DISTRO_FM),debian) + pack-sys := deb +endif +ifeq ($(DISTRO_FM),redhat) + pack-sys := rpm +endif +ifeq ($(DISTRO_FM),centos) + pack-sys := rpm +endif +ifeq ($(DISTRO_FM),fedora) + pack-sys := rpm +endif +ifeq ($(DISTRO_FM),suse) + pack-sys := rpm +endif +ifeq ($(DISTRO_FM),opensuse) + pack-sys := rpm +endif +ifeq ($(DISTRO_FM),unknown) + $(error Unknown distribution. There is no packaging system available.) +endif + +package: $(RCPTS)/package.rcpt + +rpm: $(RCPTS)/rpm.rcpt + +deb: $(RCPTS)/deb.rcpt + +build: $(RCPTS)/build.rcpt + +distributed_scripts: $(RCPTS)/distributed_scripts.rcpt + +toolchain: $(RCPTS)/toolchain.rcpt + +3rdparty_libs: $(RCPTS)/3rdparty_libs.rcpt + +corelibs: $(RCPTS)/corelibs.rcpt + +debug: $(RCPTS)/debug.rcpt + +tuned: $(RCPTS)/tuned.rcpt + +# Only append specific rules for targets other the 'clone', 'edit' and 'pack' +ifneq "$(MAKECMDGOALS)" "clone" +ifneq "$(MAKECMDGOALS)" "edit" +ifneq "$(MAKECMDGOALS)" "pack" + +# Include the rules for specific packages +include $(CONFIG)/packages/*/*.mk + +# Rules to fetch the sources and patches of every package +include $(SKELETONS_ROOT)/prefetch_target.mk + +# Create configuration file for the FVTR +ifeq ($(strip $(shell $(call build_fvtr_conf,$(call get_built_packages)))),) + $(error Failed to create the config file for the FVTR... Bailing out!) +endif + +endif +endif +endif + +# Targets that need receipt generation + +$(RCPTS)/package.rcpt: $(RCPTS)/$(pack-sys).rcpt $(RCPTS)/source_tarball.rcpt + @touch $@ + +# Build and include the monitor (watch_ldconfig) utility +$(RCPTS)/monitor.rcpt: $(RCPTS)/toolchain.rcpt + @echo "Preparing the system's ld.so.cache monitor" + @+{ $(AT_DEST)/bin/gcc -O2 -DAT_LDCONFIG_PATH=$(AT_DEST)/sbin/ldconfig \ + $(SCRIPTS_ROOT)/utilities/watch_ldconfig.c -o $(AT_DEST)/bin/watch_ldconfig; \ + echo "Monitor sucesfully compiled."; \ + echo "Updating the SPEC files"; \ + group=$$( ls $(DYNAMIC_SPEC)/ | grep "toolchain\$$" ); \ + echo "$(AT_DEST)/bin/watch_ldconfig" \ + >> $(DYNAMIC_SPEC)/$${group}/ldconfig.filelist; \ + echo "/etc/cron.d/$(AT_VER_REV_INTERNAL)_ldconfig" \ + >> $(DYNAMIC_SPEC)/$${group}/ldconfig.filelist; \ + echo "All done."; \ + } > $(LOGS)/_watch_ldconfig.log 2>&1 + @touch $@ + +$(RCPTS)/toolchain.rcpt: $(RCPTS)/gcc_4.rcpt \ + $(RCPTS)/tuned.rcpt + @touch $@ + + +$(RCPTS)/corelibs.rcpt: $(zlib_1-archdeps) \ + $(openssl_1-archdeps) \ + $(libauxv_1-archdeps) \ + $(libhugetlbfs_1-archdeps) \ + $(libvecpf_1-archdeps) + @touch $@ + +# Cross builds don't require valgrind, neither oprofile +debug-reqs := $(valgrind_1-archdeps) $(oprofile_1-archdeps) + +$(RCPTS)/debug.rcpt: $(gdb_1-archdeps) $(debug-reqs) + @touch $@ + + +# Generate release-notes +$(RCPTS)/release-notes.rcpt: + @echo "Begin generating the release-notes for $(AT_VER_REV_INTERNAL)..." + @+{ echo "Building release-notes.$(AT_MAJOR).html"; \ + export utilities=$(UTILITIES_ROOT); \ + $(call runandlog,$(LOGS)/_release_notes_build.log,\ + $(call build_release_notes,$(PACKAGES_LIST))); \ + echo "Completed release-notes.$(AT_MAJOR).html build"; \ + } > $(LOGS)/_release_notes.log 2>&1 + @echo "Completed release-notes for $(AT_VER_REV_INTERNAL)" + @touch $@ + +# Extra libraries +$(RCPTS)/3rdparty_libs.rcpt: $(3rdparty_libs-reqs) + @touch $@ + +# CPU-optimized libraries +$(RCPTS)/tuned.rcpt: $(tuned-targets) + @touch $@ + + +# DEB packages build +$(RCPTS)/deb.rcpt: $(RCPTS)/build.rcpt $(RCPTS)/distributed_scripts.rcpt + @echo "Begin DEB packaging for $(AT_FULL_VER)..." + @+{ echo "Buiding DEB packages for $(AT_FULL_VER)."; \ + export AT_STEPID=deb; \ + echo "- Preparing the environment vars."; \ + { $(call deb_setenv); } > \ + $(LOGS)/_$${AT_STEPID}-01_deb_setenv.log 2>&1; \ + echo "- Preparing the filelist of included packages..."; \ + $(call runandlog,$(LOGS)/_$${AT_STEPID}-02_pkg_set_filelists.log, \ + $(UTILITIES_ROOT)/pkg_build_filelists.sh); \ + if [[ $${ret} -ne 0 ]]; then \ + echo "Failed while creating file lists."; \ + exit 1; \ + fi; \ + echo "- Effectively build the requested DEBs..."; \ + $(call runandlog,$(LOGS)/_$${AT_STEPID}-03_pkg_build_deb.log, \ + $(UTILITIES_ROOT)/pkg_build_deb.sh); \ + if [[ $${ret} -ne 0 ]]; then \ + echo "Problem running pkg_build_deb.sh."; \ + exit 1; \ + fi; \ + echo "Everything completed."; \ + } > $(LOGS)/_deb.log 2>&1 + @echo "Completed DEB packages for $(AT_FULL_VER)" + @touch $@ + + +# RPM packages build +$(RCPTS)/rpm.rcpt: $(RCPTS)/build.rcpt $(RCPTS)/distributed_scripts.rcpt + @echo "Begin RPM packaging for $(AT_VER_REV_INTERNAL)..." + @+{ echo "Buiding RPM packages for $(AT_VER_REV_INTERNAL)."; \ + export AT_STEPID=rpm; \ + echo "- Preparing the environment vars."; \ + { $(call rpm_setenv); } > \ + $(LOGS)/_$${AT_STEPID}-01_rpm_setenv.log 2>&1; \ + echo "- Preparing the filelist of included packages..."; \ + $(call runandlog,$(LOGS)/_$${AT_STEPID}-02_pkg_build_filelists.log, \ + $(UTILITIES_ROOT)/pkg_build_filelists.sh); \ + if [[ $${ret} -ne 0 ]]; then \ + echo "Failed while creating file lists."; \ + exit 1; \ + fi; \ + echo "- Building the required RPM packages..."; \ + $(call runandlog,$(LOGS)/_$${AT_STEPID}-03_pkg_build_rpm.log, \ + $(UTILITIES_ROOT)/pkg_build_rpm.sh); \ + if [[ $${ret} -ne 0 ]]; then \ + echo "Failed while creating file lists."; \ + exit 1; \ + fi; \ + echo "Everything completed."; \ + } > $(LOGS)/_rpm.log 2>&1 + @echo "Completed RPM packages for $(AT_VER_REV_INTERNAL)" + @touch $@ + +# Create the source code tarball. +# We can't create it until the build is ready, because some stages apply +# patches to the source code. +$(RCPTS)/source_tarball.rcpt: $(RCPTS)/build.rcpt $(RCPTS)/distributed_scripts.rcpt + @echo "Begin to package source code for $(AT_VER_REV_INTERNAL)..." + @+{ echo "Packing distributable sources in a tarball..."; \ + $(call pack_source_pkgs,$(call get_built_packages)); \ + } > $(LOGS)/_source_tarball.log 2>&1 + @echo "Completed packaging source code for $(AT_VER_REV_INTERNAL)" + @touch $@ + +# Cross builds don't require compat, corelibs neither 3rdparty +ifeq ($(CROSS_BUILD),no) + build-reqs := $(RCPTS)/corelibs.rcpt $(RCPTS)/3rdparty_libs.rcpt $(RCPTS)/monitor.rcpt + ifneq ($(BUILD_IGNORE_COMPAT),yes) + build-reqs += $(RCPTS)/glibc_compat.rcpt + endif +endif +$(RCPTS)/build.rcpt: $(RCPTS)/toolchain.rcpt $(RCPTS)/debug.rcpt \ + $(build-reqs) $(build_targets) + @echo "Running ldconfig with final configs on installed" \ + "$(AT_VER_REV_INTERNAL)" + @+{ set -x; \ + if [[ "$(CROSS_BUILD)" == "no" ]]; then \ + cat "$(DYNAMIC_LOAD)/sysinc.ld.conf" \ + >> $(AT_DEST)/etc/ld.so.conf; \ + $(AT_DEST)/sbin/ldconfig; \ + fi; \ + set +x; \ + } > $(LOGS)/_build.log 2>&1 + @echo "Completed $(AT_VER_REV_INTERNAL) build" + @touch $@ + +$(RCPTS)/distributed_scripts.rcpt: + @echo "Installing package scripts..." + @+{ echo "Setting final destination for package scripts."; \ + if [[ "$(CROSS_BUILD)" == "no" ]]; then \ + mkdir -p $(AT_DEST)/scripts; \ + echo "Copying package scripts there."; \ + cp $(SCRIPTS_ROOT)/distributed/* $(AT_DEST)/scripts; \ + echo "Completed copy."; \ + fi; \ + } > $(LOGS)/_distributed_scripts.log + @echo "Completed install of package scripts!" + @touch $@ + + +# Base toolchain build +ifeq ($(BUILD_IGNORE_COMPAT),no) + ldconfig_2-reqs := $(glibc_compat-archdeps) +endif +$(RCPTS)/ldconfig_2.rcpt: $(glibc_2-archdeps) \ + $(glibc_tuned-archdeps) \ + $(libdfp_1-archdeps) \ + $(libdfp_tuned-archdeps) \ + $(zlib_1-archdeps) \ + $(zlib_tuned-archdeps) \ + $(ldconfig_2-reqs) + @echo "Second dynamic loader cache update..." + @+{ echo "Run needed dependency"; \ + if [[ "$(CROSS_BUILD)" == "no" ]]; then \ + export AT_STEPID=ldconfig_2; \ + $(call runandlog,$(LOGS)/_$${AT_STEPID}-1_ld.so.config.log,$(call prepare_loader_cache,2)); \ + if [[ $${ret} -ne 0 ]]; then \ + echo "Problem running the second ldconfig."; \ + exit 1; \ + fi; \ + fi; \ + } > $(LOGS)/_ldconfig_2.log + @echo "Completed second dynamic loader cache update!" + @touch $@ + +$(RCPTS)/ldconfig_1.rcpt: $(glibc_1-archdeps) + @echo "First dynamic loader cache update..." + @+{ echo "Run needed dependency"; \ + if [[ "$(CROSS_BUILD)" == "no" ]]; then \ + export AT_STEPID=ldconfig_1; \ + $(call runandlog,$(LOGS)/_$${AT_STEPID}-1_ld.so.config.log,$(call prepare_loader_cache,1)); \ + if [[ $${ret} -ne 0 ]]; then \ + echo "Problem running first ldconfig."; \ + exit 1; \ + fi; \ + fi; \ + } > $(LOGS)/_ldconfig_1.log + @echo "Completed first dynamic loader cache update!" + @touch $@ + +$(RCPTS)/%.b.rcpt: $(RCPTS)/%.a.rcpt + @echo "Starting the build of $(*F)..." + @+{ echo "Checking dependencies"; \ + pkg="$(shell echo $(*F) | grep -E -o '^[^_-]+_*' | grep -E -o '[^_-]+')"; \ + stage_n="$(shell echo $(*F) | sed 's/.*_\([^._-]\+\)-\?.*/\1/g')"; \ + bitsize="$(shell echo $(*F) | grep -E -o '\-[0-9]+' | grep -E -o '[0-9]+')"; \ + echo "$(*F)" | grep tuned && tuned_target=yes; \ + [[ -z "$${stage_n}" ]] && stage_n=1; \ + echo "original=$(*F) p=$${pkg} s=$${stage_n} b=$${bitsize}"; \ + echo "Setting basic environment for execution."; \ + export AT_BASE=$(AT_BASE); \ + export AT_WORK_PATH=$(SOURCE); \ + export AT_KERNEL=$(AT_KERNEL); \ + export AT_STEPID=$(*F); \ + export AT_BIT_SIZE=$${bitsize}; \ + if [[ "$${tuned_target}x" == "yesx" ]]; then \ + stage_file=stage_optimized; \ + export AT_OPTIMIZE_CPU=$${stage_n}; \ + else \ + stage_file=stage_$${stage_n}; \ + fi; \ + echo "Preparing the build environment vars."; \ + { $(call build_setenv); } > \ + $(LOGS)/_$${AT_STEPID}-1_build_setenv.log 2>&1; \ + echo "Configuring source and build paths."; \ + source $(CONFIG)/packages/$${pkg}/sources; \ + echo "Setting the required stage configs."; \ + source $(CONFIG)/packages/$${pkg}/$${stage_file}; \ + echo "Preparing the build path and move there."; \ + { $(call build_stage2,$${ATSRC_PACKAGE_WORK},$${ATCFG_BUILD_STAGE_T},$(*F)); } > \ + $(LOGS)/_$${AT_STEPID}-2_build_stage.log 2>&1; \ + echo "Doing the actual build and install steps."; \ + { $(call standard_buildf); } > \ + $(LOGS)/_$${AT_STEPID}-3_standard_buildf.log 2>&1; \ + echo "Completed main build, cleaning it now."; \ + { $(call clean_stage); } > \ + $(LOGS)/_$${AT_STEPID}-5_clean_stage.log 2>&1; \ + echo "Everything completed."; \ + } > $(LOGS)/_$(*F).log 2>&1 + @echo "Completed the build of $(*F)!" + @touch $@ + +$(RCPTS)/bso_clearance.rcpt: + @echo "Checking and clearing the outbound BSO..." + @bso_active=$$(curl http://www.ibm.com/us/en -s -k -o - | grep -o 'Firewall'); \ + if [[ "$${bso_active}" == "Firewall" ]]; then \ + echo "BSO Firewall closed. Inform your credentials:"; \ + echo -n "e-mail: " && read USER_ID; \ + echo -n "password: " && read -s USER_PASSWD; \ + echo; \ + curl https://www.ibm.com:443/ -s -k -o - \ + -d "au_pxytimetag=$$(date +%s)&uname=$${USER_ID}&pwd=$${USER_PASSWD}&ok=OK" | \ + sed -e 's:.*

::g' -e 's:

.*::g' -e 's:<[^>]*>:\n:g' | \ + head -n 3; \ + fi + @echo "Completed the outbound BSO clearing!" + @touch $@ + +$(RCPTS)/collect-fvtr.rcpt: + @echo "Collecting FVTR logs... " + @find fvtr/ -name '*.log' -exec cp --parents -t $(LOGS) {} + + +$(RCPTS)/rsync_%.rcpt: $(RCPTS)/copy_%.rcpt \ + $(RCPTS)/patch_%.rcpt + @touch $@ + +$(RCPTS)/copy_%.rcpt: $(RCPTS)/fetch_%_source.rcpt \ + $(RCPTS)/fetch_%_patches.rcpt + @echo "Starting $(*F) copy..." + @+{ echo "Preparing the copy environemnt."; \ + export AT_BASE=$(AT_BASE); \ + export AT_KERNEL=$(AT_KERNEL); \ + export AT_WORK_PATH=$(SOURCE); \ + export AT_STEPID=copy_$(*F); \ + source $(CONFIG)/packages/$(*F)/sources; \ + echo "Copying the source code."; \ + { $(call rsync_and_patch,$${ATSRC_PACKAGE_SRC},$${ATSRC_PACKAGE_WORK},$(FETCH_PATCHES),$${ATSRC_PACKAGE_PATCHES},$${ATSRC_PACKAGE_TARS},delete); } > \ + $(LOGS)/_$${AT_STEPID}-rsync_and_patch.log 2>&1; \ + if [[ -e $(TEMP_INSTALL)/$(*F)-copy-queue ]]; then \ + echo "Copying patches."; \ + cp -v -t $${ATSRC_PACKAGE_WORK} \ + $$(cat $(TEMP_INSTALL)/$(*F)-copy-queue); \ + fi; \ + } > $(LOGS)/_copy_$(*F).log 2>&1 + @echo "Completed $(*F) copy!" + @touch $@ + +$(RCPTS)/patch_%.rcpt: $(RCPTS)/copy_%.rcpt + @echo "Applying patches to $(*F)..." + @+{ echo "Preparing the patch environment."; \ + export AT_BASE=$(AT_BASE); \ + export AT_KERNEL=$(AT_KERNEL); \ + export AT_WORK_PATH=$(SOURCE); \ + export AT_STEPID=patch_$(*F); \ + source $(CONFIG)/packages/$(*F)/sources; \ + if [[ "$$(type -t atsrc_apply_patches)" == "function" ]]; then \ + echo "Applying patches."; \ + pushd $${ATSRC_PACKAGE_WORK}; \ + atsrc_apply_patches || exit 1; \ + popd; \ + else \ + echo "$(*F) doesn't have patches."; \ + fi; \ + } > $(LOGS)/_patch_$(*F).log 2>&1 + @echo "Applied patches to $(*F)!" + @touch $@ + +# Enable secondary expansion for the targets following the next one. +.SECONDEXPANSION: + +# The following implicit target define the dependencies for optimized libraries. +$(RCPTS)/%.tuned.a.rcpt: $$($$(*F)-deps) + @touch $@ +# If your target don't require secondary expansion, avoid to add it after the +# target .SECONDEXPANSION. +# It won't fail, but will help to identify which targets require such kind of +# feature. diff --git a/README-x86.txt b/README-x86.txt new file mode 100644 index 000000000..a138fa77f --- /dev/null +++ b/README-x86.txt @@ -0,0 +1,244 @@ +Note: the build scripts only run on SLES 10 (and its Service Pack updates) and +on RHEL5 (and its update releases) for the Advance Toolchain 5.0 and below. For +Advance Toolchain 6.0 and above, the build scripts only run on SLES 11 (and its +Service Pack updates) and RHEL6 (and its update releases). + +Dependencies: + + The best way to prevent dependency problems is to just install + everything. Toolchain builds have a million dependencies. The + following are the known dependencies: + + autoconf + automake + libtool + BASH (bourne again shell) + CVS client + rsync + rpm + rpmbuild + bison + awk + sed + flex + flex-64bit + All gcc rpms including devel and 64 bit. + All glibc rpms including devel and 64 bit. + All binutils rpms including devel and 64 bit. + Subversion client - With Neon support + texinfo-4.8-22 - Required for binutils which needs 'makeinfo'. + perl - for running Uwe Gansert's create_package_descr script + ncurses - provides the termcap information needed by GDB + ncurses-devel - provides the termcap information needed by GDB + terminfo - just to be sure. + openssl - required header files + openssl-64bit - required header files + openssl-devel - required header files + openssl-devel-64bit - required header files + expect - For GDB + python - For GDB + python-urlgrabber - for createrepo + rpm-python - for createrepo + createrepo + git client - for GLIBC checkout (repo migrated from CVS to git) + +Also verify if libstdc++ and libsupc++ are installed in /usr/lib and /usr/lib64. +If any of them is missing, please copy them from /usr/lib/gcc/-// +and /usr/lib/gcc/-//64/ to /usr/lib and /usr/lib64 respectively. + +Directory Layout (creation sequences described in next section): +-------------------------------------------------------------------------- +# The Advance Toolchain base directory where toolchains are built: +//at + +# Build scripts directory: +//at/scripts/ + +# Patches directory: +//at/patches/ + +# Sources directory: +//at/sources/ + +# Working directory for a particular AT version build. Scripts that have +# to be modified for a particular build version are stored here as well. +//at/atX.Y-Z/ + +# Sources are copied to this location and patched by the build script: +//at/atX.Y-Z/src/ + +# Sources are built in this directory: +//at/atX.Y-Z/build/ + +# Where the binary .rpm files are located after rpmbuild: +//at/atX.Y-Z/rpms/ + +# Where the build stages log files located after a build: +//at/atX.Y-Z/logs/ + +# Powerpc-cpu installs are done here temporarily before they're copied to +# the toolchain destination directory. +//at/atX.Y-Z/install/ + +# Where the toolchain is always installed (Note, subsequent rebuilds of the +# advance toolchain will overwrite the previous toolchain in /opt/atX.Y). +/opt/atX.Y/ + +Requirements: + //at-YYYYMMDD.tgz + //README.txt + +UIUC NCSA Build Topography: + + buildbox - This host is on a private network and the only + network connection to it is ssh/scp to/from lbuild. + buildbox has lots of local disk. It only has one user + on it, root. This machine executes the toolchain + build. + + lbuild - Fully Internet connected box. Also has read and write + access to AFS (a networked filesystem). Connect + to this host use userids, not root. Repository + creation and update scripts run on this machine. + + linuxpatch.ncsa.uiuc.edu - Fully Internet connected box. It's + the ftp server and it serves data out of the AFS + filesystem starting at + /afs/ncsa.uiuc.edu/ftp/lpatch/pub if anonymously + connected or /afs/ncsa.uiuc.edu/ftp/lpatch/ if + connecting with ftp using the lpatch account. + +Preconditions: + +User Steps: +-------------------------------------------------------------------------- +1.) Determine where you want the Advance Toolchain base directory to be + located. The base directory is where all toolchains will be built. + A good location would be $HOME/at/. Create this directory, e.g. + + mkdir -p $HOME/at + +2.) Change directory to the Advance Toolchain base directory that you just + built. Unpack the archive elements using the following tar extract + command. It is essential that this be done in the Advance Toolchain + base directory: + + cd $HOME/at + tar -xzf //at-YYYYMMDD.tgz ./configs ./scripts ./patches + +3.) Verify the +x execute permissions on the scripts in the scripts + directory ($HOME/at/scripts) for this user. Update the scripts with + chmod +x if they're not set to have execute permissions. + +4.) Verify that the current working directory is the Advance Toolchain + base directory $HOME/at/. From the Advance Toolchain base directory + invoke the 'pre.sh' script with the following parameters: + 1.) The path to the config.at file + 2.) The path to the at build base directory + + cd $HOME/at/ + $HOME/at/scripts/pre.sh $HOME/at/configs/ $PWD + + Based upon the file this will determine if new sources need + to be downloaded into the Advance Toolchain base directory's 'sources' + directory. The name is specified in the build request e-mail. + + NOTE: The 'pre.sh' script will tell you which directory it created for + you to do the next versioned toolchain build in, e.g. + + $HOME/at/at5.0-1 + +------------------------------------------------------------------------------ +If you're fetching sources on a system that is different than the one +that will be doing the build, pay attention that pre.sh freezes the current +distro and version to be used, so if it was ran on a RedHat 5, the build must +happen on that distro and will be rejected by subsequent scripts on any other +one. Also, performimg fetch on anything other than RHEL or SLES will be rejected +by the scripts. With that said, do the following step: + +4.1) On the prefetch machine make sure you're in the Advance Toolchain base + directory: + + cd $HOME/at + +4.2) Archive the Advance Toolchain base directory: + tar -czf $HOME/at-`date +%Y%m%d`.tgz ./ + +4.3) Copy the archive to the build machine under the exact same username as + that used to run the pre.sh script on the prefetch machine. + +4.4) Create the Advance Toolchain build directory in the EXACT SAME PLACE + on the build machine as where it was located on the prefetch machine. + + mkdir $HOME/at + +4.5) Change directory to the Advance Toolchain build directory: + + cd $HOME/at + +4.6) Unpack the Advance Toolchain base directory in the exact same place + where it was packed but on the build machine: + + tar -xzf //at-.tgz ./ + +------------------------------------------------------------------------------ + +5.) Change directory to the newly created directory for this build indicated + by the 'pre.sh' script highlighted above, i.e. + + cd $HOME/at/at5.0-1 + + NOTE: The 'pre.sh' script also created a unique self-contained wrapper + script in this directory called 'at.sh'. This was constructed from + script fragments and the information in the file. + +6.) Kick off the versioned toolchain build by invoking the local 'at.sh' + wrapper script, e.g. + sh at.sh + + Log files are kept in $HOME/at/atX.Y-Z/logs/ + + A Binary RPM is created and placed in the 'rpms' directory off the + current build directory: + $HOME/at/atX.Y-Z/rpms/ppc64/advanced-toolchain-atX.Y-cross-X.Y-Z.ppc64.rpm + + RPMs install into the 'AT_DEST' directory indicated in the config.at file, e.g. + /opt/at5.0/ + +7.) Copy the original script archive onto lbuild. Unpack the config + directory and scripts directory on said server in the exact same + place where you placed it on buildbox. + + mkdir $HOME/at + cd $HOME/at + tar -xzf //at.tgz ./configs ./scripts + +8.) Copy the resultant rpms onto lbuild in the exact same place they + were installed by the build scripts on the buildbox, i.e. + + $HOME/at/at5.0-1/rpms/ppc64/ + +9.) For good measure copy the log files from the buildbox to lbuild. + This way if they need to be collated you have them all in one + place. + + $HOME/at/atX.Y-Z/logs + +10.) The cross-compiler RPM currently does not need to be signed. + +11.) The cross-compiler RPM should be manually copied to the repository. i.e. + If it is a SLES10 build, then it should go into + + /afs/ncsa.uiuc.edu/ftp/lpatch/toolchain/at/suse/SLES_10/atX.Y/ + +Congratulations there should now be a cross-compiler RPM into the designated +Linux distribution repository. + +12.) Copy the generated build logs to the private FTP server and make + it available for further reference. i.e. + + cp $ATHOME/at5.0-5/logs_2012-06-21 00:55:31-05:00.tar.gz \ + /afs/.ncsa/ftp/lpatch/private/toolchain/logs_[buildnumber].tar.gz + + Include a link to this log file in the e-mail notification when + the build is done. diff --git a/README.txt b/README.txt new file mode 100644 index 000000000..dce0b1f84 --- /dev/null +++ b/README.txt @@ -0,0 +1,284 @@ +This set of scripts are targeted for building AT 7.0 and up. If you intend to build any of the prior AT versions (AT 6.0 and below), You should use the old script set. One exception to this is ppc476, which is build by this set of scripts too. + +This README comprises the following topics: + +1. Requirements + 1.1. Distros + 1.2. Packages +2. Directory structure + 2.1. Main source skeleton + 2.2. Temporary build skeleton +3. Build instructions + 3.1. One command build "do-it-all" approach + 3.2. Fetch pristine sources + 3.3. Build packages + 3.4. Pack everything + + +1. Requirements: +================ +Although the script was designed to run in any distro, the task of a toolchain generation is an Herculean one. And unlike some people may think, a toolchain has a lot of dependencies for its build. We will list below the package requirements and supported distros that our "configsets" impose on our Advance Toolchain (AT) build process. + +1.1. Distros: +============= +Depending on the AT version being built, our "configsets" support a set of distros. Some of them are related below: +- AT 7.x: RedHat 6, SuSE 11, Fedora 18 and Ubuntu LTS (actual 12.04 and planned 14.04). +- ppc476: RedHat 6, SuSE 11, Fedora 18 and Ubuntu LTS (actual 12.04 and planned 14.04). +The build will be targeted to the distro being used to build it. This means that a build done on a RedHat will generate rpm packages compatible with RedHat packages. +By compatibility with the building distro, we mean that the AT being build will depend (as little as possible) on the packages provided by that particular distro. + +1.2. Packages: +============== +There are some packages that are required for any kind of development on any distro (assembler, linker, compiler, etc). Besides them, there are some other packages specifically needed by a toolchain build (math and floating point libs, etc), and yet some others required by some of the packages that we pack inside our AT distro (basically dependency libs like expat). The build scripts usually check their availability on the build machine, but instead of trying a build and +see it miserably fail, asking for these packages, we provide the list below for your convenience: + + autoconf + automake >= 1.10 + libtool + m4 + BASH (bourne again shell) + CVS client + rsync + rpm + rpmbuild + bison + awk + sed + flex + flex-64bit + All gcc rpms including devel and 64 bit. + All glibc rpms including devel and 64 bit. + All binutils rpms including devel and 64 bit. + Subversion client - With Neon support + texinfo-4.8-22 - Required for binutils which needs 'makeinfo'. + perl - for running Uwe Gansert's create_package_descr script + ncurses - provides the termcap information needed by GDB + ncurses-devel - provides the termcap information needed by GDB + terminfo - just to be sure. + openssl - required header files + openssl-64bit - required header files + openssl-devel - required header files + openssl-devel-64bit - required header files + expect - For GDB + python - For GDB + python-urlgrabber - for createrepo + rpm-python - for createrepo + createrepo + gpg + popt-devel - for oprofile + popt-devel-64bit - for oprofile + qt-devel - for oprofile + qt-devel-64bit - for oprofile + libxslt - for valgrind + libxslt-devel - for valgrind + docbook-xsl-stylesheets - for valgrind + git client - for GLIBC checkout (repo migrated from CVS to git) + java-1_5_0-ibm-devel (for Oprofile) + xmllint + lsb-release + bzip2-devel + imake or xorg-x11-utils (for OpenSSL) + papi-devel - for oprofile + papi-devel-64bit - for oprofile + + Special cases: + RHEL 5 and SLES 10 only provide older versions of some + packages. So it's necessary to manually build and install them. + Make sure they are always installed in /usr/local. + + List of manually installed packages on RHEL 5 and SLES 10: + automake >= 1.10 + autoconf >= 2.60 + libtool >= 2.2.4 + m4 >= 1.4.9 + flex >= 2.5.37 + + After installing automake, it is necessary to configure it by running the following command: + echo '/usr/share/aclocal/' > /usr/local/share/aclocal/dirlist + +Also verify if libstdc++ and libsupc++ are installed in /usr/lib and /usr/lib64. +If any of them is missing, please copy them from /usr/lib/gcc/-// and /usr/lib/gcc/-//64/ to /usr/lib and /usr/lib64 respectively. + + + +2. Directory structure: +======================= +The build process assemble some directory hierarchies once its tar file is expanded. This hierarchy is really simple, with its structure defined in section 2.1. Once the build is started it creates a series of other working and temporary directories described in section 2.2. On both cases, we are assuming a root sandbox area named that is the base for your builds and that you had previously created in an area that you have write access. + +2.1. Main source skeleton +========================= +Right after expanding the tarball file with the build scripts, you should have the following directory hierarchy inside your : + +/configs/ +/scripts/ +/Makefile +/README.txt +/README-x86.txt + +The most important places that we must check for are those two folders (configs and scripts). These two comprises the whole build system. As the name suggests, the configs directory hold all the supported "configsets" that guides the build scripts present in the scripts directory. If you take a look inside configs, you'll see a series of another directories there, named after the AT versions that we support. They are: + +/configs/6.0/ +/configs/7.0/ +/configs/7.1/ +/configs/ppc476-tools + +Although there is a folder named 6.0, we don't use it to build AT 6.0. It's there for historical reasons and it serves as a basis for all the other configsets (7.0, 7.1 and ppc476-tools). Don't mess with it's files content's unless you know exactly what you're doing. As many of these files are referenced inside the other configsets, you may inadvertently broke other configsets by changing anything on them. +Also, if you are altering some package config file inside your actual configset, be sure to "materialize" that file before performing the change (more information about what is it and how to do so can be found *here[wiki-page-url]*). +Now, lets take a quick look inside a configset directory to find out how it's assembled. We will use a to represent it, but it could be any of the configsets that we have (7.0, 7.1 or ppc476-tools). + +/arch/ +/distros/ +/packages/ +/release_notes/ +/specs/ +/base.mk +/build.mk +/sanity.mk + +Each and every configset must have this structure/files to assure that the build system framework will interpret them correctly to produce the proper build. Lets step over each of them with a brief overview of its purpose. + +- arch directory and files + The arch directory contains a series of files, being the most important of them the default.mk and i686.mk, which are used to prepare concise instructs for the build script framework, and they are used indirectly (included) by the other files present there, which follows the template ..mk name. These files have specific information for the given combination of architectures used in the build process. For more information about the contents of these files, check *here[wiki-page-url]*. + +- distros directory and files + The distros directory contains a series of files, which are used to define some important information about the distro being supported in the build process. They follow the naming template -.mk (all low caps) of the distro as exposed by 'lsb_release -a' command. It contains required distro specific information used by the build and packing processes. The build of this configset is *only* supported by the distros contained here. + +- packages directory + The packages directory contains a series of directories, each of them specific to the package being included in the build of this configset. Each package sub directory holds a set of files used to instruct the pristine source fetch, all the build stages of the package and all the dependencies of this package related to the others that make up this configset. These files are: + + /packages//.mk + /packages//sources + /packages//specfile + /packages//stage_ + + All of these files are required to define a package for build inclusion, so lets check what each of them holds... + + . .mk holds the dependency information of the package related to other stages or packages present in this configset. + . sources holds information about package version, name, description, documentation URL, pristine fetch URL, patches to apply and from where to grab them. + . specfile holds information about the package usable for the granular AT package generation. + . stage_ holds some standard functions that instruct the build process for that specific . + +- release_notes directory + The release_notes directory holds template parts used to build the whole release_notes.html file. If there are some changes required by this configset release, it should be done in those templates. + +- specs directory + The specs directory holds base templates for the specfiles used on rpm package build stage. This folder should have at least the files main.spec, monolithic.spec and monolithic_cross.spec. These set of files are used as templates to build the monolithic spec file, as well as the monolithic cross spec file. There are some other files planned to be there, related to the granular spec file/package generation, but they are still just a planned feature. + +- base.mk file + This file contains information about the AT version being build, if it's an alpha, a release candidate internal release, or a final public release. It also contains a set to change the final name location of the AT install directory (usually inside /opt). + +- build.mk file + This file contains information about the general build options used to build AT. This includes some standard gcc support options, which is the base processor architecture being supported, which processors architecture where will be optimizations available and which policy of package generation will be used (today we only support monolithic). + +- sanity.mk file + This file contains a macro definition to perform general sanity checks at the beginning of the build process. It should check for general requirements on the build system in order to run the build. Any package or program check required by the build should be set on the distro specific sanity check, not here. + +This covers our overview of configsets. If your are interested in more information about the configset structure, purpose and content, take a look here: https://ltc3.linux.ibm.com/wiki/LoP_Toolchain/Advance_Toolchain/Education/ConfigSets + + +2.2. Temporary build skeleton +============================= +Once you start a build, the script framework creates two very specific directories related to the configset being built as well as the host architecture and the distro that it uses. One of them is clearly a temporary place where all the temporary installs are made, and its name is tmp.at._. The directory name for a build of AT 7.1-0 alpha1 on a powerpc64 machine running SuSE 11 would be named as tmp.at7.1-0-alpha1.suse-11_ppc64. Inside of this directory every package install is done inside a subdirectory named like _. For example, binutils stage 1 is installed inside a directory named binutils_1. The path structure on the temp directory is: + +/_ + +For the normal work area, the named is the same as the temp one, but without the tmp. prefix, so it follows this template at._. This folder holds the directory where all the packages are built, the directory where all the packages sources' are prepared (copied and patched), the directory where all stages receipts of the completed steps are saved (for dependency tracking by make), the directory where all the logs, for all building stages are saved, and finally a directory where the final rpm/deb packages are saved and a directory where the final tarball with all the distributable sources is saved. These paths are: + +/builds - This one holds the component package builds +/logs - This one holds the log files of the build +/receipts - This one holds the control receipts used by make dependency control +/rpms - This one holds the generated final packages (rpm/deb) +/sources - This one holds the packages patched source files +/tarball - This one holds the final generated sources tarball + + +3. Build instructions: +====================== +The build framework is activated by a normal make, with some specific parameters to indicate options to be used for the build. The almost mandatory option is the AT_CONFIGSET parameter to indicate which configset to use for the build. The make has a lot of targets available, including some special isolated targets, like "fetch" to try to grab all the pristine sources and defined patches again. I'll list below some of the options available: + +- Special targets: + all: perform all the required steps from fetch to package build + fetch: perform only the fetch stage + toolchain: build only the packages required for the base toolchain + +- Additional parameters: + AT_CONFIGSET: inform the configset to use for the build + DESTDIR: inform an alternate place to base and install everything + BUILD_ARCH: inform the target architecture to generate the toolchain + +- Examples: + # Fetches all sources defined on configset 7.0 + make fetch AT_CONFIGSET=7.0 + + # Perform all required steps to build AT but base and install it on ${PWD}/work (${PWD}/work will be like the "chroot" of this build). It's only usefull on *test builds*. + make all AT_CONFIGSET=7.0 DESTDIR=${PWD}/work + + +3.1. One command build "do-it-all" approach +=========================================== +The simplest way of building AT with a single command would be something like this: + +# For normal builds +make all AT_CONFIGSET= -j16 + +# For test builds (used only to validate changes in the configset) +make all AT_CONFIGSET= DESTDIR= -j16 + +Note: If your system have cores and memory available, I highly recommend the usage of make's -j option with the highest number possible on it. This will really speedup the build. Note that -j16 in these examples is merely illustrative. + + +3.2. Fetch pristine sources +=========================== +Sometimes you don't have a fast internet connection available, and fetching a lot of different packages from different sources my slow it down to a craw... In this case, I recommend the usage of another approach, with individual commands for each step of the build. In such case, it's better to do a sequential fetch prior to attempt the full parallel build. For such situations, use this command for a single, sequential fetch operation: + +# For normal builds +make fetch AT_CONFIGSET= + +# For test builds (used only to validate changes in the configset) +make fetch AT_CONFIGSET= DESTDIR= + + +3.3. Build packages +=================== +Once the pristine sources and the required patches were fetched, you can go on and request the AT build by issuing the following command: + +# For normal builds +make build AT_CONFIGSET= -j16 + +# For test builds (used only to validate changes in the configset) +make build AT_CONFIGSET= DESTDIR= -j16 + +This single command will try to complete all the required dependencies to perform the build, and deliver a complete AT package into the default "/opt/atX.X" directory, or into the requested DESTDIR directory. +Keep in mind that it will be nice to adjust your -j make parameter to you building hardware to take full advantage of it and decrease the required build time. + +Note: If you find a problem on the build stage (or any other stage as well), you can try to understand what went wrong by looking at the log files at /logs. It's highly possible that the build problem is reported there. If you need to send those logs (with more info related) to someone else, just use the following command: + +# To collect build logs (normal build) +make collect AT_CONFIGSET= + +# To collect build logs (test build) +make collect AT_CONFIGSET= DESTDIR= + + +3.4. Pack everything +==================== +The package target has a single recipe, so it doesn't take advantage of the -j option. This target generates rpm packages on RedHat like distros (RedHat, CentOS, Fedora), and deb packages on Debian like distros (Debian, Ubuntu). + +# For normal builds +make package AT_CONFIGSET= + +If you need to provide a release-notes.html to the final AT release, run the following command to have it built and ready for release: + +# For normal builds +make release AT_CONFIGSET= + +After the package process, you will find the following listed packages (full path) ready for standalone installation, or repository addition: + +/{rpms,debs}/ppc64/advanced-toolchain-atX.Y-runtime-X.Y-Z.ppc64.{rpm,deb} +/{rpms,debs}/ppc64/advanced-toolchain-atX.Y-devel-X.Y-Z.ppc64.{rpm,deb} +/{rpms,debs}/ppc64/advanced-toolchain-atX.Y-perf-X.Y-Z.ppc64.{rpm,deb} +/{rpms,debs}/ppc64/advanced-toolchain-atX.Y-mcore-X.Y-Z.ppc64.{rpm,deb} +/{rpms,debs}/ppc64/advanced-toolchain-atX.Y-selinux-X.Y-Z.ppc64.{rpm,deb} + + + diff --git a/configs/10.0/arch/default.mk b/configs/10.0/arch/default.mk new file mode 120000 index 000000000..e40ebb807 --- /dev/null +++ b/configs/10.0/arch/default.mk @@ -0,0 +1 @@ +../../9.0/arch/default.mk \ No newline at end of file diff --git a/configs/10.0/arch/i686.ppc64.mk b/configs/10.0/arch/i686.ppc64.mk new file mode 120000 index 000000000..21d2d32eb --- /dev/null +++ b/configs/10.0/arch/i686.ppc64.mk @@ -0,0 +1 @@ +../../9.0/arch/i686.ppc64.mk \ No newline at end of file diff --git a/configs/10.0/arch/i686.ppc64le.mk b/configs/10.0/arch/i686.ppc64le.mk new file mode 120000 index 000000000..e31a2d8ae --- /dev/null +++ b/configs/10.0/arch/i686.ppc64le.mk @@ -0,0 +1 @@ +../../9.0/arch/i686.ppc64le.mk \ No newline at end of file diff --git a/configs/10.0/arch/ppc64.ppc64.mk b/configs/10.0/arch/ppc64.ppc64.mk new file mode 120000 index 000000000..061610109 --- /dev/null +++ b/configs/10.0/arch/ppc64.ppc64.mk @@ -0,0 +1 @@ +../../9.0/arch/ppc64.ppc64.mk \ No newline at end of file diff --git a/configs/10.0/arch/ppc64le.ppc64le.mk b/configs/10.0/arch/ppc64le.ppc64le.mk new file mode 120000 index 000000000..6d5f93b14 --- /dev/null +++ b/configs/10.0/arch/ppc64le.ppc64le.mk @@ -0,0 +1 @@ +../../9.0/arch/ppc64le.ppc64le.mk \ No newline at end of file diff --git a/configs/10.0/arch/x86_64.ppc64.mk b/configs/10.0/arch/x86_64.ppc64.mk new file mode 120000 index 000000000..a77e23d31 --- /dev/null +++ b/configs/10.0/arch/x86_64.ppc64.mk @@ -0,0 +1 @@ +../../9.0/arch/x86_64.ppc64.mk \ No newline at end of file diff --git a/configs/10.0/arch/x86_64.ppc64le.mk b/configs/10.0/arch/x86_64.ppc64le.mk new file mode 120000 index 000000000..f5c41b403 --- /dev/null +++ b/configs/10.0/arch/x86_64.ppc64le.mk @@ -0,0 +1 @@ +../../9.0/arch/x86_64.ppc64le.mk \ No newline at end of file diff --git a/configs/10.0/base.mk b/configs/10.0/base.mk new file mode 100644 index 000000000..08f4906f8 --- /dev/null +++ b/configs/10.0/base.mk @@ -0,0 +1,53 @@ +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Basic build version definitions +# =============================== +# This Makefile include contains the config options included at the beginning +# of the build process that govern the subsequent generated package name, +# version and other dependent internal build variables. +# It also states which distros the build is compatible with, so that it can be +# validated at build time, as well as heuristicaly find the proper repo path +# to put the final rpms generated by the build system. + +# Versioning description +# ====================== +# +# - AT_NAME: Final build Advance Toolchain package name. +# +# - AT_MAJOR_VERSION: Changes whenever the compiler or the ABI changes. +# Should be in X.Y format, where X=compiler change, +# Y=ABI change within that compiler change cycle. All +# first major releases should be X.0. Then, if the ABI +# changes, increment the second digit (i.e. X.1). +# +# - AT_REVISION_NUMBER: The revision number. Starts at 0 and is incremented +# whenever a new official build that doesn't change the +# compiler version or the ABI is required. +# +# - AT_INTERNAL: Tag for internal releases (i.e. alpha, beta, rc). For +# GM or external releases, it should be "none". +# +# - AT_DIR_NAME: Optional name of the directory. If not defined, will +# use a combination of AT_NAME, AT_MAJOR_VERSION, +# AT_INTERNAL and AT_REVISION_NUMBER. +# +# - AT_PREVIOUS_VERSION Previous compatible AT version supported (It may be +# further restricted by distro specific settings) +# +AT_NAME := at +AT_MAJOR_VERSION := 10.0 +AT_REVISION_NUMBER := 2 +AT_INTERNAL := none +AT_PREVIOUS_VERSION := 9.0 diff --git a/configs/10.0/build.mk b/configs/10.0/build.mk new file mode 100644 index 000000000..cec13fdb6 --- /dev/null +++ b/configs/10.0/build.mk @@ -0,0 +1,77 @@ +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generic build support options +# ============================= +# Most of these options are self explanatory, Some highlights on obscure ones +# - BUILD_ARCH must contain the target toolchain arch (ppc64/ppc32) +# - BUILD_LOAD_ARCH tell us the CPU base to use for loader compatibility (GLIBC). +# - BUILD_BASE_ARCH tell us the CPU base to use for base code generation (GCC). +# - BUILD_OPTIMIZATION tells which is the default base optimization level (GCC). +# - BUILD_WITH_LONGDOUBLE tells us to build with support for longdoubles. +# - BUILD_WITH_DFP_STANDALONE tells us to build with libdfp as standalone library. +# - BUILD_RPM_PACKAGER tells us the name / email of packager for this release. +# - BUILD_RPMS must be set to "granular" or "monolithic" to indicate the kind of +# rpms to be generated by the build script. See the documentation notes. + +# When running on ppc64le, BUILD_ARCH defaults to ppc64le. +# In the rest, it defaults to ppc64. +ifeq ($(HOST_ARCH),ppc64le) + BUILD_ARCH ?= ppc64le +endif +BUILD_ARCH ?= ppc64 + +# When building for ppc64le, the CPU base is power8. +# In the rest, it defaults to power7. +ifeq ($(BUILD_ARCH),ppc64le) + BUILD_LOAD_ARCH ?= power8 + BUILD_BASE_ARCH ?= power8 +endif +BUILD_LOAD_ARCH ?= power7 +BUILD_BASE_ARCH ?= power7 + +BUILD_OPTIMIZATION := power8 +BUILD_WITH_LONGDOUBLE := yes +BUILD_WITH_DFP_STANDALONE := yes +BUILD_RPM_PACKAGER := +BUILD_RPM_VENDOR := +BUILD_RPMS := monolithic +BUILD_GCC_LANGUAGES := c,c++,fortran,go + +# List supported CPUs to build for active, compat and embed +# ========================================================= +# - List of valid CPUs for active and compat: +# * power4, power5, power5+, power6, power6x and power7 + +# CPU base on ppc64le is power8. +# Otherwise, CPU base is power7. +ifeq ($(BUILD_ARCH),ppc64le) + BUILD_ACTIVE_MULTILIBS := power9 +else + BUILD_ACTIVE_MULTILIBS := power8 power9 +endif + +# Download options +# ================ +# Should be either 'yes' or 'no'. Mostly self explanatory options. +# - BUILD_GET_SOURCES tell us to force grab sources +# - BUILD_GET_MPS tell us to grab patches from mailing lists +# - BUILD_GET_ADDONS tell us to grab related package addons +# - BUILD_EXCLUSIVE_CROSS tell us that the build is *exclusively* cross +# - BUILD_DEFAULT_RETRIES tell the default number of retries when fetching sources +BUILD_GET_SOURCES := yes +BUILD_GET_MPS := yes +BUILD_GET_ADDONS := yes +BUILD_EXCLUSIVE_CROSS := no +BUILD_DEFAULT_RETRIES := 5 diff --git a/configs/10.0/deb/monolithic/changelog b/configs/10.0/deb/monolithic/changelog new file mode 120000 index 000000000..7f945c4fc --- /dev/null +++ b/configs/10.0/deb/monolithic/changelog @@ -0,0 +1 @@ +../../../8.0/deb/monolithic/changelog \ No newline at end of file diff --git a/configs/10.0/deb/monolithic/compat b/configs/10.0/deb/monolithic/compat new file mode 120000 index 000000000..dc8b73e4f --- /dev/null +++ b/configs/10.0/deb/monolithic/compat @@ -0,0 +1 @@ +../../../8.0/deb/monolithic/compat \ No newline at end of file diff --git a/configs/10.0/deb/monolithic/control b/configs/10.0/deb/monolithic/control new file mode 120000 index 000000000..f8dab6732 --- /dev/null +++ b/configs/10.0/deb/monolithic/control @@ -0,0 +1 @@ +../../../9.0/deb/monolithic/control \ No newline at end of file diff --git a/configs/10.0/deb/monolithic/copyright b/configs/10.0/deb/monolithic/copyright new file mode 120000 index 000000000..e0c7d7435 --- /dev/null +++ b/configs/10.0/deb/monolithic/copyright @@ -0,0 +1 @@ +../../../8.0/deb/monolithic/copyright \ No newline at end of file diff --git a/configs/10.0/deb/monolithic/devel-dbg.postinst b/configs/10.0/deb/monolithic/devel-dbg.postinst new file mode 120000 index 000000000..5f99d4689 --- /dev/null +++ b/configs/10.0/deb/monolithic/devel-dbg.postinst @@ -0,0 +1 @@ +../../../9.0/deb/monolithic/devel-dbg.postinst \ No newline at end of file diff --git a/configs/10.0/deb/monolithic/devel.postinst b/configs/10.0/deb/monolithic/devel.postinst new file mode 120000 index 000000000..9cc89b552 --- /dev/null +++ b/configs/10.0/deb/monolithic/devel.postinst @@ -0,0 +1 @@ +../../../8.0/deb/monolithic/devel.postinst \ No newline at end of file diff --git a/configs/10.0/deb/monolithic/devel.postrm b/configs/10.0/deb/monolithic/devel.postrm new file mode 120000 index 000000000..82211decf --- /dev/null +++ b/configs/10.0/deb/monolithic/devel.postrm @@ -0,0 +1 @@ +../../../8.0/deb/monolithic/devel.postrm \ No newline at end of file diff --git a/configs/10.0/deb/monolithic/devel.prerm b/configs/10.0/deb/monolithic/devel.prerm new file mode 120000 index 000000000..19ba06c53 --- /dev/null +++ b/configs/10.0/deb/monolithic/devel.prerm @@ -0,0 +1 @@ +../../../8.0/deb/monolithic/devel.prerm \ No newline at end of file diff --git a/configs/10.0/deb/monolithic/mcore-libs-dbg.postinst b/configs/10.0/deb/monolithic/mcore-libs-dbg.postinst new file mode 120000 index 000000000..048576588 --- /dev/null +++ b/configs/10.0/deb/monolithic/mcore-libs-dbg.postinst @@ -0,0 +1 @@ +../../../9.0/deb/monolithic/mcore-libs-dbg.postinst \ No newline at end of file diff --git a/configs/10.0/deb/monolithic/mcore-libs.postinst b/configs/10.0/deb/monolithic/mcore-libs.postinst new file mode 120000 index 000000000..3cc5667f9 --- /dev/null +++ b/configs/10.0/deb/monolithic/mcore-libs.postinst @@ -0,0 +1 @@ +../../../8.0/deb/monolithic/mcore-libs.postinst \ No newline at end of file diff --git a/configs/10.0/deb/monolithic/mcore-libs.postrm b/configs/10.0/deb/monolithic/mcore-libs.postrm new file mode 120000 index 000000000..958a4c4b4 --- /dev/null +++ b/configs/10.0/deb/monolithic/mcore-libs.postrm @@ -0,0 +1 @@ +../../../8.0/deb/monolithic/mcore-libs.postrm \ No newline at end of file diff --git a/configs/10.0/deb/monolithic/perf-dbg.postinst b/configs/10.0/deb/monolithic/perf-dbg.postinst new file mode 120000 index 000000000..b4ce5be1f --- /dev/null +++ b/configs/10.0/deb/monolithic/perf-dbg.postinst @@ -0,0 +1 @@ +../../../9.0/deb/monolithic/perf-dbg.postinst \ No newline at end of file diff --git a/configs/10.0/deb/monolithic/perf.postinst b/configs/10.0/deb/monolithic/perf.postinst new file mode 120000 index 000000000..fde21469e --- /dev/null +++ b/configs/10.0/deb/monolithic/perf.postinst @@ -0,0 +1 @@ +../../../8.0/deb/monolithic/perf.postinst \ No newline at end of file diff --git a/configs/10.0/deb/monolithic/perf.postrm b/configs/10.0/deb/monolithic/perf.postrm new file mode 120000 index 000000000..0bfcf2236 --- /dev/null +++ b/configs/10.0/deb/monolithic/perf.postrm @@ -0,0 +1 @@ +../../../8.0/deb/monolithic/perf.postrm \ No newline at end of file diff --git a/configs/10.0/deb/monolithic/rules b/configs/10.0/deb/monolithic/rules new file mode 100755 index 000000000..411b90b24 --- /dev/null +++ b/configs/10.0/deb/monolithic/rules @@ -0,0 +1,72 @@ +#!/usr/bin/make -f +# +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +PACKAGES=$(shell dh_listpackages) + +build: + dh_testdir + dh_testroot + dh_prep + +clean: + dh_testdir + dh_testroot + dh_clean -d + +binary-indep: build + +binary-arch: build binary-cp + dh_installdirs + dh_installdocs + dh_installchangelogs + +# Copy the packages' files. + dh_install --fail-missing + +# Strip binaries + perl debian/dh_strip --dest=__AT_DEST__ --exclude=getconf --exclude=libgo. --exclude=ld- --dbg-package=advance-toolchain-__AT_MAJOR_INTERNAL__-runtime-dbg -p advance-toolchain-__AT_MAJOR_INTERNAL__-runtime + perl debian/dh_strip --dest=__AT_DEST__ --dbg-package=advance-toolchain-__AT_MAJOR_INTERNAL__-mcore-libs-dbg -p advance-toolchain-__AT_MAJOR_INTERNAL__-mcore-libs + perl debian/dh_strip --dest=__AT_DEST__ --exclude=getconf --dbg-package=advance-toolchain-__AT_MAJOR_INTERNAL__-devel-dbg -p advance-toolchain-__AT_MAJOR_INTERNAL__-devel + perl debian/dh_strip --dest=__AT_DEST__ --dbg-package=advance-toolchain-__AT_MAJOR_INTERNAL__-perf-dbg -p advance-toolchain-__AT_MAJOR_INTERNAL__-perf + + dh_compress + dh_makeshlibs --version-info + dh_installdeb + dh_shlibdeps --exclude=typedef --exclude=testdata + dh_gencontrol + dh_md5sums + dh_builddeb + +binary-cp: build + mkdir -p debian/tmp/__AT_DEST__ + rsync -a --delete --delete-excluded \ + --exclude=etc/ld.so.cache \ + --exclude=compat/include \ + --exclude=share/info/dir \ + __AT_DEST__ debian/tmp/__AT_DEST__/../ + # Set a cronjob to run AT's ldconfig when the system's ldconfig is + # executed. + mkdir -p debian/tmp/etc/cron.d/ + echo "@reboot __AT_DEST__/bin/watch_ldconfig &" \ + > debian/tmp/etc/cron.d/__AT_VER_REV_INTERNAL___ldconfig + gzip -9nvf debian/tmp/__AT_DEST__/share/info/*.info* + # Prepare the area for golang + mkdir -p debian/tmp/__GO_DEST__ + rsync -a --delete __TMP_DIR__/golang_1/__GO_DEST__ debian/tmp/__GO_DEST__/../ + +binary: binary-indep binary-arch +.PHONY: build clean binary-indep binary-arch binary diff --git a/configs/10.0/deb/monolithic/runtime-dbg.postinst b/configs/10.0/deb/monolithic/runtime-dbg.postinst new file mode 120000 index 000000000..7a1a9e4a4 --- /dev/null +++ b/configs/10.0/deb/monolithic/runtime-dbg.postinst @@ -0,0 +1 @@ +../../../9.0/deb/monolithic/runtime-dbg.postinst \ No newline at end of file diff --git a/configs/10.0/deb/monolithic/runtime.postinst b/configs/10.0/deb/monolithic/runtime.postinst new file mode 120000 index 000000000..2f58c3537 --- /dev/null +++ b/configs/10.0/deb/monolithic/runtime.postinst @@ -0,0 +1 @@ +../../../8.0/deb/monolithic/runtime.postinst \ No newline at end of file diff --git a/configs/10.0/deb/monolithic/runtime.postrm b/configs/10.0/deb/monolithic/runtime.postrm new file mode 120000 index 000000000..a1779526c --- /dev/null +++ b/configs/10.0/deb/monolithic/runtime.postrm @@ -0,0 +1 @@ +../../../8.0/deb/monolithic/runtime.postrm \ No newline at end of file diff --git a/configs/10.0/deb/monolithic/trusty_dh_change_dest.patch b/configs/10.0/deb/monolithic/trusty_dh_change_dest.patch new file mode 120000 index 000000000..a29fe455b --- /dev/null +++ b/configs/10.0/deb/monolithic/trusty_dh_change_dest.patch @@ -0,0 +1 @@ +../../../9.0/deb/monolithic/trusty_dh_change_dest.patch \ No newline at end of file diff --git a/configs/10.0/deb/monolithic/xenial_dh_change_dest.patch b/configs/10.0/deb/monolithic/xenial_dh_change_dest.patch new file mode 100644 index 000000000..b64a398d6 --- /dev/null +++ b/configs/10.0/deb/monolithic/xenial_dh_change_dest.patch @@ -0,0 +1,120 @@ +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +--- a/dh_strip 2016-03-31 15:10:24.000000000 -0300 ++++ b/dh_strip 2016-06-21 15:41:20.761949931 -0300 +@@ -13,7 +13,7 @@ use Debian::Debhelper::Dh_Lib; + + =head1 SYNOPSIS + +-B [S>] [B<-X>I] [B<--dbg-package=>I] [B<--keep-debug>] ++B [S>] [B<-X>I] [B<--dbg-package=>I] [B<--keep-debug>] [B<--dest=>I] + + =head1 DESCRIPTION + +@@ -43,6 +43,18 @@ Exclude files that contain I anywh + stripped. You may use this option multiple times to build up a list of + things to exclude. + ++=item B<--dest=>I ++ ++Typically, debug information is always placed under /usr/lib/debug on debian ++packages. However, it is sometimes desirable to install to an alternative ++prefix, such as /opt. The value passed through B is prepended to ++/lib/debug (notice that the 'usr' part has been removed), and becomes the ++installation path for debug information. For instance, the following command ++will install all debug information into a package named foo-deb.deb and under ++I. ++ ++ dh_strip --dbg-package=foo-dbg --dest=/opt ++ + =item B<--dbg-package=>I + + B in the package build directory. B<--dbg-package> ++file in F in the package build directory. B<--dbg-package> + is easier to use than this option, but this option is more flexible. + + This option implies B<--no-automatic-dbgsym> and I be used +@@ -137,8 +149,10 @@ Debian policy, version 3.0.1 + + =cut + ++my $dest; + init(options => { + "keep-debug" => \$dh{K_FLAG}, ++ "dest=s" => \$dest, + 'dbgsym-migration=s' => \$dh{MIGRATE_DBGSYM}, + 'automatic-dbgsym!' => \$dh{ENABLE_DBGSYM}, + # Deprecated variants +@@ -252,21 +266,38 @@ sub make_debug { + + my ($base_file)=$file=~/^\Q$tmp\E(.*)/; + my ($debug_path, $debug_build_id); ++ my ($base_debug_path, $debug_symlink, $debug_dir); ++ ++ $debug_path=$desttmp."${dest}/lib/debug/".$base_file; ++ $base_debug_path="${dest}/lib/debug/".$base_file; ++ ++ # Make symlinks based on the build-ID + + if ($use_build_id && + `LC_ALL=C readelf -n $file`=~ /^\s+Build ID: ([0-9a-f]{2})([0-9a-f]+)$/m) { +- $debug_path=$desttmp."/usr/lib/debug/.build-id/$1/$2.debug"; ++ $debug_symlink=$desttmp."${dest}/lib/debug/.build-id/$1/$2"; + $debug_build_id="${1}${2}"; +- } +- elsif ($use_build_id > 1) { +- # For dbgsyms, we need build-id (else it will not be +- # co-installable). +- return; ++ ++ # Create the directory ++ $debug_dir=dirname($debug_symlink); ++ if(! -d $debug_dir) { ++ doit("install", "-d", $debug_dir); ++ } ++ ++ # Create the symlinks ++ if(! -l "$debug_symlink") { ++ doit("ln", "-s", "$base_file", "$debug_symlink"); ++ } ++ if(! -l "$debug_symlink.debug") { ++ doit("ln", "-s", "$base_debug_path", "$debug_symlink.debug"); ++ } + } + else { +- $debug_path=$desttmp."/usr/lib/debug/".$base_file; ++ $debug_path=$desttmp."${dest}/lib/debug/".$base_file; + } +- my $debug_dir=dirname($debug_path); ++ ++ # Create the build-id directory ++ $debug_dir=dirname($debug_path); + if (! -d $debug_dir) { + install_dir($debug_dir); + } +@@ -275,7 +306,7 @@ sub make_debug { + } + else { + # Compat 9 OR a dbgsym package. +- doit($objcopy, "--only-keep-debug", "--compress-debug-sections", $file, $debug_path); ++ doit($objcopy, "--only-keep-debug", $file, $debug_path); + } + + if ($use_build_id and defined($debug_build_id)) { diff --git a/configs/10.0/deb/monolithic_cross b/configs/10.0/deb/monolithic_cross new file mode 120000 index 000000000..1858b105e --- /dev/null +++ b/configs/10.0/deb/monolithic_cross @@ -0,0 +1 @@ +../../9.0/deb/monolithic_cross/ \ No newline at end of file diff --git a/configs/10.0/distros/centos-6.mk b/configs/10.0/distros/centos-6.mk new file mode 100644 index 000000000..59776eb14 --- /dev/null +++ b/configs/10.0/distros/centos-6.mk @@ -0,0 +1,88 @@ +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Distro dependent basic definitions for RedHat Enterprise Server 6 +# ================================================================= +# This Makefile include contains the definitions for the distro being used +# for the build process. It contains kernel version infos and distro specific +# sanity checks. + +# Informs the distro supported power archs +AT_SUPPORTED_ARCHS := ppc64 + +# You may force the BUILD_IGNORE_AT_COMPAT general condition by distro +#BUILD_IGNORE_AT_COMPAT := yes + +# Kernel version to build toolchain against +# - As this distro only supports one arch variation (ppc64), there is no +# need to conditionally define these versions based on arch. +AT_KERNEL := 2.6.32 # Current distro kernel version for runtime. +AT_OLD_KERNEL := 2.6.18 # Previous distro kernel version for runtime-compat. + +# Inform the mainly supported distros +AT_SUPPORTED_DISTROS := "RHEL6 RHEL7" + +# Inform the compatibility supported distros +AT_COMPAT_DISTROS := RHEL5 + +# Sign the repository and packages +AT_SIGN_PKGS := yes +AT_SIGN_REPO := yes +AT_SIGN_PKGS_CROSS := no +AT_SIGN_REPO_CROSS := yes + +# ID of GNUPG key used to sign our packages (main/compat) +AT_GPG_KEYID := 6976A827 +AT_GPG_KEYIDC := 3052930D +AT_GPG_KEYIDL := 6976A827 +# ID of GNUPG key used to sign our repositories (main/compat) +AT_GPG_REPO_KEYID := 3052930D +AT_GPG_REPO_KEYIDC := 3052930D +AT_GPG_REPO_KEYIDL := 6976A827 + +# Options required by the command to update the repository metadata +AT_REPOCMD_OPTS := -p -s sha1 --simple-md-filenames --no-database + +# Moved here from build.mk since the value for this variable +# depends on the distro. +# For a cross build the executables in the toolchain (gcc, ld, etc.) +# should be built as 32 bit. +BUILD_CROSS_32 := yes + +# As some distros have special requirements for configuration upon final +# AT installation, put in this macro, the final configurations required +# after the main build and prior to the rpm build +define distro_final_config + echo "nothing to do." +endef + +# Inform the list of packages to check +ifndef AT_DISTRO_REQ_PKGS + AT_CROSS_PKGS_REQ := + AT_NATIVE_PKGS_REQ := \(ibm-java2-ppc64-sdk-5.0\|java-1.5.0-ibm-devel\) \ + libxslt popt-devel qt-devel readline \ + readline-devel + AT_COMMON_PKGS_REQ := zlib-devel ncurses-devel flex bison texinfo \ + createrepo glibc-devel subversion cvs gawk autoconf \ + rsync curl bc automake imake + AT_CROSS_PGMS_REQ := + AT_NATIVE_PGMS_REQ := + AT_COMMON_PGMS_REQ := git_1.7 + AT_JAVA_VERSIONS := 5 +endif + +# If needed, define the necessary distro related sanity checks. +define distro_sanity + echo "nothing to test here" +endef diff --git a/configs/10.0/distros/centos-7.mk b/configs/10.0/distros/centos-7.mk new file mode 100644 index 000000000..77cf7cfb5 --- /dev/null +++ b/configs/10.0/distros/centos-7.mk @@ -0,0 +1,115 @@ +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Distro dependent basic definitions for RedHat Enterprise Server 7 +# ================================================================= +# This Makefile include contains the definitions for the distro being used +# for the build process. It contains kernel version infos and distro specific +# sanity checks. + +# Informs the distro supported power archs +AT_SUPPORTED_ARCHS := ppc64 ppc64le + +# You may force the BUILD_IGNORE_AT_COMPAT general condition by distro +#BUILD_IGNORE_AT_COMPAT := yes + +# Kernel version to build toolchain against +# - As this distro may support any arch variation combination (ppc64le/ppc64), +# there is a need to conditionally define these versions based on arch. +ifeq ($(BUILD_ARCH),ppc64le) + # Current distro kernel version for runtime. + AT_KERNEL := 3.10 + # Previous distro kernel version for runtime-compat. + AT_OLD_KERNEL := +else + # Current distro kernel version for runtime. + AT_KERNEL := 3.10 + # Previous distro kernel version for runtime-compat. + AT_OLD_KERNEL := 2.6.32 +endif + +# Inform the mainly supported distros +AT_SUPPORTED_DISTROS := RHEL7 + +# Inform the compatibility supported distros +AT_COMPAT_DISTROS := RHEL6 + +# Sign the repository and packages +AT_SIGN_PKGS := yes +AT_SIGN_REPO := yes +AT_SIGN_PKGS_CROSS := no +AT_SIGN_REPO_CROSS := yes + +# ID of GNUPG key used to sign our packages (main/compat) +AT_GPG_KEYID := 6976A827 +AT_GPG_KEYIDC := 6976A827 +AT_GPG_KEYIDL := 6976A827 +# ID of GNUPG key used to sign our repositories (main/compat) +AT_GPG_REPO_KEYID := 6976A827 +AT_GPG_REPO_KEYIDC := 3052930D +AT_GPG_REPO_KEYIDL := 6976A827 + +# Options required by the command to update the repository metadata +AT_REPOCMD_OPTS := -p -s sha1 --simple-md-filenames --no-database + +# Moved here from build.mk since the value for this variable +# depends on the distro. +# For a cross build the executables in the toolchain (gcc, ld, etc.) +# should be built as 32 bit. +BUILD_CROSS_32 := no + +# As some distros have special requirements for configuration upon final +# AT installation, put in this macro, the final configurations required +# after the main build and prior to the rpm build +define distro_final_config + echo "nothing to do." +endef + +# Due to a problem found on RHEL 7.0 GA there is a package that doesn't fall +# into the default dependencies and should be added manually for checking here +# libstdc++-static (in this case, either i686 and x86_64) must be available for +# the build to proceed. If RedHat fixes its internal dependencies later on, +# this check could be safely removed. + +# Inform the list of packages to check +ifndef AT_DISTRO_REQ_PKGS + AT_CROSS_PKGS_REQ := + AT_NATIVE_PKGS_REQ := libxslt docbook-style-xsl qt-devel \ + autogen-libopts + AT_COMMON_PKGS_REQ := zlib-devel ncurses-devel flex bison texinfo \ + createrepo glibc-devel subversion cvs gawk \ + rsync curl bc automake libstdc\\+\\+-static \ + redhat-lsb-core autoconf bzip2-[0-9] libtool-[0-9] \ + gzip rpm-build-[0-9] rpm-sign gcc-c++ imake + AT_CROSS_PGMS_REQ := + AT_NATIVE_PGMS_REQ := + AT_COMMON_PGMS_REQ := git_1.7 + AT_JAVA_VERSIONS := 7 +endif + +# Complete the list of packages to check that are based on arch being build +ifeq ($(BUILD_ARCH),ppc64le) + AT_NATIVE_PKGS_REQ += \(ibm-java2-ppc64le-sdk-7.1\|java-1.7.1-ibm-devel\) + AT_NATIVE_PKGS_REQ += glibc-devel bzip2-devel popt-devel +else + AT_NATIVE_PKGS_REQ += \(ibm-java2-ppc64-sdk-7.0\|java-1.7.1-ibm-devel\) \ + glibc-devel-.*\.ppc$$ glibc-devel-.*\.ppc64$$ \ + bzip2-devel-.*\.ppc$$ bzip2-devel-.*\.ppc64$$ \ + popt-devel-.*\.ppc$$ popt-devel-.*\.ppc64$$ +endif + +# If needed, define the necessary distro related sanity checks. +define distro_sanity + echo "nothing to test here" +endef diff --git a/configs/10.0/distros/opensuse-12.mk b/configs/10.0/distros/opensuse-12.mk new file mode 120000 index 000000000..3c37d8702 --- /dev/null +++ b/configs/10.0/distros/opensuse-12.mk @@ -0,0 +1 @@ +suse-12.mk \ No newline at end of file diff --git a/configs/10.0/distros/redhat-7.mk b/configs/10.0/distros/redhat-7.mk new file mode 120000 index 000000000..38d89590d --- /dev/null +++ b/configs/10.0/distros/redhat-7.mk @@ -0,0 +1 @@ +../../9.0/distros/redhat-7.mk \ No newline at end of file diff --git a/configs/10.0/distros/suse-12.mk b/configs/10.0/distros/suse-12.mk new file mode 120000 index 000000000..670ee3039 --- /dev/null +++ b/configs/10.0/distros/suse-12.mk @@ -0,0 +1 @@ +../../9.0/distros/suse-12.mk \ No newline at end of file diff --git a/configs/10.0/distros/ubuntu-14.mk b/configs/10.0/distros/ubuntu-14.mk new file mode 120000 index 000000000..5d5a5d86a --- /dev/null +++ b/configs/10.0/distros/ubuntu-14.mk @@ -0,0 +1 @@ +../../9.0/distros/ubuntu-14.mk \ No newline at end of file diff --git a/configs/10.0/distros/ubuntu-16.mk b/configs/10.0/distros/ubuntu-16.mk new file mode 100644 index 000000000..15bfb338f --- /dev/null +++ b/configs/10.0/distros/ubuntu-16.mk @@ -0,0 +1,82 @@ +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Distro dependent basic definitions for Ubuntu 16.04 LTS +# ======================================================= +# This Makefile include contains the definitions for the distro being used +# for the build process. It contains kernel version infos and distro specific +# sanity checks. + +# Informs the distro supported power archs +AT_SUPPORTED_ARCHS := ppc64le + +# You may force the BUILD_IGNORE_AT_COMPAT general condition by distro +#BUILD_IGNORE_AT_COMPAT := yes + +# Kernel version to build toolchain against +# - As this distro only supports one arch variation (ppc64le), there is no +# need to conditionally define these versions based on arch. +AT_KERNEL := 4.4 # Current distro kernel version for runtime. +# TODO: fill this when our packaging system starts supporting runtime-compat +# on Ubuntu. +#AT_OLD_KERNEL := # Previous distro kernel version for runtime-compat. + +# Inform the mainly supported distros +AT_SUPPORTED_DISTROS := xenial + +# Inform the compatibility supported distros +#AT_COMPAT_DISTROS := + +# Sign the repository and packages +#AT_SIGN_PKGS := yes +#AT_SIGN_REPO := yes +#AT_SIGN_PKGS_CROSS := no +#AT_SIGN_REPO_CROSS := yes + +# ID of GNUPG key used to sign our packages (main/compat) +AT_GPG_KEYID := 6976A827 +AT_GPG_KEYIDC := 3052930D +# ID of GNUPG key used to sign our repositories (main/compat) +AT_GPG_REPO_KEYID := 3052930D +AT_GPG_REPO_KEYIDC := 3052930D + +# Options required by the command to update the repository metadata +AT_REPOCMD_OPTS := -p -s sha1 --simple-md-filenames --no-database + +# As some distros have special requirements for configuration upon final +# AT installation, put in this macro, the final configurations required +# after the main build and prior to the rpm build +define distro_final_config + echo "nothing to do." +endef + +# Inform the list of packages to check +ifndef AT_DISTRO_REQ_PKGS + AT_CROSS_PKGS_REQ := + AT_NATIVE_PKGS_REQ := libxslt libpopt-dev libqt4-dev \ + libc6-dev libbz2-dev xsltproc docbook-xsl + AT_COMMON_PKGS_REQ := zlib1g-dev libncurses5-dev ncurses-term flex bison \ + texinfo subversion cvs gawk fakeroot debhelper \ + autoconf rsync curl bc libxml2-utils automake \ + dpkg-sig xutils-dev libtool + AT_CROSS_PGMS_REQ := + AT_NATIVE_PGMS_REQ := pkg-config /opt/ibm/java-ppc64le-80/jre/bin/java + AT_COMMON_PGMS_REQ := git_2.7 + AT_JAVA_VERSIONS := 8 +endif + +# If needed, define the necessary distro related sanity checks. +define distro_sanity + echo "nothing to test here" +endef diff --git a/configs/10.0/packages/binutils/binutils.mk b/configs/10.0/packages/binutils/binutils.mk new file mode 120000 index 000000000..cfefba8c1 --- /dev/null +++ b/configs/10.0/packages/binutils/binutils.mk @@ -0,0 +1 @@ +../../../9.0/packages/binutils/binutils.mk \ No newline at end of file diff --git a/configs/10.0/packages/binutils/sources b/configs/10.0/packages/binutils/sources new file mode 100644 index 000000000..c3b7d46ee --- /dev/null +++ b/configs/10.0/packages/binutils/sources @@ -0,0 +1,66 @@ +#!/usr/bin/env bash +# +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# binutils source package and build info +# ====================================== +# + +ATSRC_PACKAGE_NAME="GNU Binutils" +ATSRC_PACKAGE_VER=2.27 +ATSRC_PACKAGE_REV=3645ea6fd346 +ATSRC_PACKAGE_LICENSE="GPL 2.0" +ATSRC_PACKAGE_DOCLINK="http://sourceware.org/binutils/docs/" +ATSRC_PACKAGE_RELFIXES= +ATSRC_PACKAGE_STR_VER="${ATSRC_PACKAGE_NAME} ${ATSRC_PACKAGE_VER}-${ATSRC_PACKAGE_REV}" +ATSRC_PACKAGE_PRE="test -d binutils-${ATSRC_PACKAGE_VER}-${ATSRC_PACKAGE_REV}" +# git.linux.ibm.com is a mirror of sourceware.org. +ATSRC_PACKAGE_CO=([0]="git clone git://git.linux.ibm.com/binutils-gdb/binutils-gdb.git binutils" \ + [1]="git clone git://sourceware.org/git/binutils-gdb.git binutils") +ATSRC_PACKAGE_GIT="git checkout -b binutils-${ATSRC_PACKAGE_VER}${ATSRC_PACKAGE_REV:+-${ATSRC_PACKAGE_REV}} ${ATSRC_PACKAGE_REV}" +ATSRC_PACKAGE_POST="mv binutils binutils-${ATSRC_PACKAGE_VER}${ATSRC_PACKAGE_REV:+-${ATSRC_PACKAGE_REV}}" +ATSRC_PACKAGE_SRC=${AT_BASE}/sources/binutils-${ATSRC_PACKAGE_VER}-${ATSRC_PACKAGE_REV} +ATSRC_PACKAGE_WORK=${AT_WORK_PATH}/binutils +# Disabled until check-ld is resolved +ATSRC_PACKAGE_MAKE_CHECK=none +ATSRC_PACKAGE_MLS= +ATSRC_PACKAGE_ALOC= +ATSRC_PACKAGE_PATCHES= +ATSRC_PACKAGE_TARS= +ATSRC_PACKAGE_DISTRIB=yes +ATSRC_PACKAGE_BUNDLE=main_toolchain + +atsrc_get_patches () +{ + at_get_patch_and_trim \ + https://sourceware.org/ml/binutils/2016-04/msg00427.html \ + fix-powerpc64-ld-tests.patch 18 \ + e5890c30d453ac040d00f893e7eecef5 || return ${?} + + at_get_patch_and_trim \ + https://sourceware.org/ml/binutils-cvs/2016-04/msg00195.html \ + be-support-on-ppc64le-emu.patch 34 \ + 79548cdef8a2326b759392e45bc9cc2a || return ${?} +} + +atsrc_apply_patches () +{ + patch -R -p1 < fix-powerpc64-ld-tests.patch || return ${?} + # Remove changes on Changelog. + tail -n 20 be-support-on-ppc64le-emu.patch | unexpand \ + > trimmed-be-support-on-ppc64le-emu.patch + patch -R -p1 < trimmed-be-support-on-ppc64le-emu.patch || return ${?} +} diff --git a/configs/10.0/packages/binutils/specfile b/configs/10.0/packages/binutils/specfile new file mode 120000 index 000000000..c90865c02 --- /dev/null +++ b/configs/10.0/packages/binutils/specfile @@ -0,0 +1 @@ +../../../9.0/packages/binutils/specfile \ No newline at end of file diff --git a/configs/10.0/packages/binutils/stage_1 b/configs/10.0/packages/binutils/stage_1 new file mode 120000 index 000000000..f02e0fdb9 --- /dev/null +++ b/configs/10.0/packages/binutils/stage_1 @@ -0,0 +1 @@ +../../../9.0/packages/binutils/stage_1 \ No newline at end of file diff --git a/configs/10.0/packages/binutils/stage_2 b/configs/10.0/packages/binutils/stage_2 new file mode 100644 index 000000000..7d28d59cd --- /dev/null +++ b/configs/10.0/packages/binutils/stage_2 @@ -0,0 +1,87 @@ +#!/usr/bin/env bash +# +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# + +ATCFG_HOLD_TEMP_INSTALL='no' +ATCFG_HOLD_TEMP_BUILD='no' +# Build in a new directory +ATCFG_BUILD_STAGE_T='dir' + +# Conditional configure command +atcfg_configure() { + if [[ "${cross_build}" == "no" ]]; then + # Configure command for native builds + CC=${at_dest}/bin/gcc \ + CXX=${at_dest}/bin/g++ \ + CFLAGS="-g -O2 -Wno-error=unused-function" \ + CXXFLAGS="-g -O2 -Wno-error=unused-function" \ + ${ATSRC_PACKAGE_WORK}/configure --build=${host} \ + --host=${target} \ + --target=${target} \ + ${alternate_target:+--enable-targets=${alternate_target}} \ + --with-sysroot=/ \ + --prefix=${at_dest} \ + --libdir=${at_dest}/lib${compiler##32} \ + --disable-gdb \ + --disable-readline \ + --disable-libdecnumber \ + --disable-sim \ + --disable-nls \ + --enable-shared \ + --enable-plugins \ + --enable-install-libiberty=./ \ + --enable-gold + else + # Configure command for cross builds + CC=${system_cc} \ + CXX=${system_cxx} \ + CFLAGS="-g -O -Wno-error=unused-function" \ + CXXFLAGS="-g -O -Wno-error=unused-function" \ + ${ATSRC_PACKAGE_WORK}/configure --build=${host} \ + --host=${host} \ + --target=${target} \ + ${target64:+--enable-targets=${target64}} \ + --with-sysroot=${dest_cross} \ + --prefix=${at_dest} \ + --disable-gdb \ + --disable-readline \ + --disable-libdecnumber \ + --disable-sim \ + --disable-nls \ + --enable-plugins \ + --enable-gold + fi +} + + +# Make command for build +atcfg_make() { + ${SUB_MAKE} all +} + +# Make command for build +atcfg_make_check() { + PATH=${at_dest}/bin:${PATH} \ + ${SUB_MAKE} check +} + + +# Install command for build +atcfg_install() { + ${SUB_MAKE} install DESTDIR=${install_place} +} diff --git a/configs/10.0/packages/binutils/stage_3 b/configs/10.0/packages/binutils/stage_3 new file mode 120000 index 000000000..eac4afc42 --- /dev/null +++ b/configs/10.0/packages/binutils/stage_3 @@ -0,0 +1 @@ +../../../9.0/packages/binutils/stage_3 \ No newline at end of file diff --git a/configs/10.0/packages/boost/boost.mk b/configs/10.0/packages/boost/boost.mk new file mode 120000 index 000000000..a9f13a56d --- /dev/null +++ b/configs/10.0/packages/boost/boost.mk @@ -0,0 +1 @@ +../../../9.0/packages/boost/boost.mk \ No newline at end of file diff --git a/configs/10.0/packages/boost/sources b/configs/10.0/packages/boost/sources new file mode 100644 index 000000000..e0cc8afab --- /dev/null +++ b/configs/10.0/packages/boost/sources @@ -0,0 +1,60 @@ +#!/usr/bin/env bash +# +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# Boost source package and build info +# ================================== +# +ATSRC_PACKAGE_NAME="Boost" +ATSRC_PACKAGE_VER=1.61.0 +ATSRC_PACKAGE_VERID="${ATSRC_PACKAGE_VER}${ATSRC_PACKAGE_REV:+-${ATSRC_PACKAGE_REV}}" +ATSRC_PACKAGE_DOCLINK="http://www.boost.org/doc/libs/${ATSRC_PACKAGE_VER//./_}/" +ATSRC_PACKAGE_RELFIXES= +ATSRC_PACKAGE_STR_VER="${ATSRC_PACKAGE_NAME} ${ATSRC_PACKAGE_VER}" +ATSRC_PACKAGE_LICENSE="Boost Software License 1.0" +ATSRC_PACKAGE_PRE="test -d boost_${ATSRC_PACKAGE_VER//./_}" +ATSRC_PACKAGE_CO=([0]="wget -N https://iweb.dl.sourceforge.net/project/boost/boost/${ATSRC_PACKAGE_VER}/boost_${ATSRC_PACKAGE_VER//./_}.tar.bz2" + [1]="wget -N https://superb-dca2.dl.sourceforge.net/project/boost/boost/${ATSRC_PACKAGE_VER}/boost_${ATSRC_PACKAGE_VER//./_}.tar.bz2") +ATSRC_PACKAGE_POST="tar jxf boost_${ATSRC_PACKAGE_VER//./_}.tar.bz2" +ATSRC_PACKAGE_SRC="${AT_BASE}/sources/boost_${ATSRC_PACKAGE_VER//./_}" +ATSRC_PACKAGE_WORK=${AT_WORK_PATH}/boost +ATSRC_PACKAGE_MLS="" +ATSRC_PACKAGE_ALOC="" +ATSRC_PACKAGE_PATCHES="" +ATSRC_PACKAGE_TARS="" +ATSRC_PACKAGE_MAKE_CHECK="" +ATSRC_PACKAGE_DISTRIB=no +ATSRC_PACKAGE_BUNDLE=mcore-libs + +atsrc_get_patches () +{ + # Patch to increase the cache line size to 128 bytes for lockfree data + # structures to get better performance on big systems. + at_get_patch_and_trim \ + https://github.com/boostorg/lockfree/commit/303b103e8a7b17e52a74988be0fabb97da6dca6e.patch \ + 0001-lockfree-increase-the-lockfree-cache-line-size.patch 32 \ + e10e3dd4cc3a04843372b47c22ca5b57 || return ${?} + + return 0 +} + +atsrc_apply_patches () +{ + patch -p2 < 0001-lockfree-increase-the-lockfree-cache-line-size.patch \ + || return ${?} + + return 0 +} diff --git a/configs/10.0/packages/boost/specfile b/configs/10.0/packages/boost/specfile new file mode 120000 index 000000000..6991e4db9 --- /dev/null +++ b/configs/10.0/packages/boost/specfile @@ -0,0 +1 @@ +../../../9.0/packages/boost/specfile \ No newline at end of file diff --git a/configs/10.0/packages/boost/stage_1 b/configs/10.0/packages/boost/stage_1 new file mode 100644 index 000000000..b669950b0 --- /dev/null +++ b/configs/10.0/packages/boost/stage_1 @@ -0,0 +1,117 @@ +#!/usr/bin/env bash +# +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# Boost build parameters for stage 1 32/64 bits +# ========================================= +# + +# Include some standard functions +source ${utilities}/bitsize_selection.sh + +# Tell the build system to hold the temp install folder +ATCFG_HOLD_TEMP_INSTALL='no' +# Tell the build system to hold the temp build folder +ATCFG_HOLD_TEMP_BUILD='no' +# Build in the source code directory +ATCFG_BUILD_STAGE_T='link' + +atcfg_pre_hacks () +{ + local libdir=$(find_build_libdir ${AT_BIT_SIZE}) + + if [[ "${cross_build}" == "yes" ]]; then + # Set the AT's GCC as compiler. + echo "using gcc : power : \ + ${at_dest}/bin/${target64:-${target}}-g++ ;" \ + > user-config.jam + # Cross compiler fails on bzip2. + B2_PARAM="-sNO_BZIP2=1" + install_dir="${install_transfer_cross}/usr" + else + install_dir=${install_transfer} + # The --user-config switch is used in cross builds to select + # AT's gcc as compiler. On native builds, we provide an empty + # user-config.jam file. + touch user-config.jam + fi + + if [[ "${AT_BIT_SIZE}" -eq "32" ]]; then + # Clear the build and than apply a hack for SLES 11 + # SLES 11 doesnt provide a symlink named libbz2.so that points + # to its 32-bit version, so the linker does not find it. + mkdir -p ${at_active_build}/tmp + local libbz2=$(find /lib /usr/lib -name "libbz2.so.1.*" 2> \ + /dev/null | head -n 1) + if [[ -n "${libbz2}" ]]; then + ln -s ${libbz2} ${at_active_build}/tmp/libbz2.so + fi + local linker_flags="linkflags=-L${at_active_build}/tmp" + fi + + # The build of Boost is memory hungry. The compilation of some files + # uses too much RAM and we have to limit the amount of threads in order + # to protect it against OOM. + # 490 MiB / thread is known to be a safe value. + local mem=$(free -m | awk '/Mem/ { print $2 }') + THREADS=$(expr ${mem} / 900) + # It doesn't make sense to run more threads than the amount of cores + # available. + [[ ${THREADS} -gt ${num_cores} ]] && THREADS=${num_cores} + # Workaround a bug on b2 + # It segfaults when building Boost with more than 32 threads. We + # prevent this limiting the number of threads to 32. + [[ ${THREADS} -gt 32 ]] && THREADS=32 + B2_PARAM="${B2_PARAM} \ + -j ${THREADS} \ + -q \ + --build-dir=${at_active_build}/build \ + --stagedir=${at_active_build}/stage \ + --libdir=${install_dir}/${libdir} \ + --user-config=user-config.jam \ + address-model=${AT_BIT_SIZE} \ + cflags=-O3 \ + cxxflags=-O3 \ + link=static,shared \ + ${linker_flags}" +} + +atcfg_configure () +{ + # Avoid using Python on 32-bit and cross compiler because AT only + # builds it for 64 bits native. + if [[ ${AT_BIT_SIZE} -eq 32 || "${cross_build}" == "yes" ]]; then + local extra_parms="--without-libraries=python" + else + local python_exe=$(ls -d ${at_dest}/bin/python[0-9].[0-9]) + local extra_parms="--with-python=${python_exe} \ + --with-python-root=${at_dest}" + fi + + PATH=${at_dest}/bin:${PATH} \ + ./bootstrap.sh --with-toolset=gcc --prefix="${install_dir}" \ + ${extra_parms} +} + +atcfg_make () +{ + PATH=${at_dest}/bin:${PATH} ./b2 -a ${B2_PARAM} +} + +atcfg_install () +{ + PATH=${at_dest}/bin:${PATH} ./b2 ${B2_PARAM} install +} diff --git a/configs/10.0/packages/expat/expat.mk b/configs/10.0/packages/expat/expat.mk new file mode 120000 index 000000000..619082ef2 --- /dev/null +++ b/configs/10.0/packages/expat/expat.mk @@ -0,0 +1 @@ +../../../9.0/packages/expat/expat.mk \ No newline at end of file diff --git a/configs/10.0/packages/expat/sources b/configs/10.0/packages/expat/sources new file mode 100644 index 000000000..23ac9eb67 --- /dev/null +++ b/configs/10.0/packages/expat/sources @@ -0,0 +1,40 @@ +#!/usr/bin/env bash +# +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# GLIBC source package and build info +# =================================== +# + +ATSRC_PACKAGE_NAME="Expat XML Parser" +ATSRC_PACKAGE_VER=2.2.0 +ATSRC_PACKAGE_DOCLINK="http://www.xml.com/pub/a/1999/09/expat/index.html" +ATSRC_PACKAGE_RELFIXES= +ATSRC_PACKAGE_STR_VER="${ATSRC_PACKAGE_NAME} ${ATSRC_PACKAGE_VER}" +ATSRC_PACKAGE_LICENSE="MIT License" +ATSRC_PACKAGE_PRE="test -d expat-${ATSRC_PACKAGE_VER}" +ATSRC_PACKAGE_CO=([0]="wget -N http://iweb.dl.sourceforge.net/project/expat/expat/${ATSRC_PACKAGE_VER}/expat-${ATSRC_PACKAGE_VER}.tar.bz2" + [1]="wget -N http://superb-dca2.dl.sourceforge.net/project/expat/expat/${ATSRC_PACKAGE_VER}/expat-${ATSRC_PACKAGE_VER}.tar.bz2") +ATSRC_PACKAGE_POST="tar -xjf expat-${ATSRC_PACKAGE_VER}.tar.bz2" +ATSRC_PACKAGE_SRC=${AT_BASE}/sources/expat-${ATSRC_PACKAGE_VER} +ATSRC_PACKAGE_WORK=${AT_WORK_PATH}/expat +ATSRC_PACKAGE_MLS= +ATSRC_PACKAGE_PATCHES= +ATSRC_PACKAGE_ALOC= +ATSRC_PACKAGE_TARS= +ATSRC_PACKAGE_MAKE_CHECK= +ATSRC_PACKAGE_DISTRIB=no +ATSRC_PACKAGE_BUNDLE=main_toolchain diff --git a/configs/10.0/packages/expat/specfile b/configs/10.0/packages/expat/specfile new file mode 120000 index 000000000..b568b1bf8 --- /dev/null +++ b/configs/10.0/packages/expat/specfile @@ -0,0 +1 @@ +../../../9.0/packages/expat/specfile \ No newline at end of file diff --git a/configs/10.0/packages/expat/stage_1 b/configs/10.0/packages/expat/stage_1 new file mode 120000 index 000000000..5857fb39b --- /dev/null +++ b/configs/10.0/packages/expat/stage_1 @@ -0,0 +1 @@ +../../../9.0/packages/expat/stage_1 \ No newline at end of file diff --git a/configs/10.0/packages/gcc/gcc.mk b/configs/10.0/packages/gcc/gcc.mk new file mode 120000 index 000000000..1e7c2aa08 --- /dev/null +++ b/configs/10.0/packages/gcc/gcc.mk @@ -0,0 +1 @@ +../../../9.0/packages/gcc/gcc.mk \ No newline at end of file diff --git a/configs/10.0/packages/gcc/sources b/configs/10.0/packages/gcc/sources new file mode 100644 index 000000000..a6787427e --- /dev/null +++ b/configs/10.0/packages/gcc/sources @@ -0,0 +1,55 @@ +#!/usr/bin/env bash +# +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# GCC source package and build info +# ================================= +# + +ATSRC_PACKAGE_NAME="GCC (GNU Compiler Collection)" +ATSRC_PACKAGE_SUBPACKAGE_NAME_0="GNU Standard C++ Library v3 (Libstdc++-v3)" +ATSRC_PACKAGE_SUBPACKAGE_NAME_1="GNU Libgomp" +ATSRC_PACKAGE_VER=6.2.1 +ATSRC_PACKAGE_REV=243722 +ATSRC_PACKAGE_LICENSE="GPL 3.0" +ATSRC_PACKAGE_DOCLINK="https://gcc.gnu.org/onlinedocs/gcc-6.2.0/gcc/" +ATSRC_PACKAGE_SUBPACKAGE_DOCLINK_0="https://gcc.gnu.org/libstdc++/" +ATSRC_PACKAGE_SUBPACKAGE_DOCLINK_1="https://gcc.gnu.org/onlinedocs/libgomp/" +ATSRC_PACKAGE_RELFIXES= +ATSRC_PACKAGE_NAMESUFFIX="[C, C++ (g++), fortran, Go]" +ATSRC_PACKAGE_STR_VER="${ATSRC_PACKAGE_NAME} ${ATSRC_PACKAGE_VER}-ibm-r${ATSRC_PACKAGE_REV}" +ATSRC_PACKAGE_PRE="test -d gcc-${ATSRC_PACKAGE_VER}-${ATSRC_PACKAGE_REV}" +ATSRC_PACKAGE_CO=([0]="svn co --revision ${ATSRC_PACKAGE_REV} svn://gcc.gnu.org/svn/gcc/branches/ibm/gcc-6-branch") +ATSRC_PACKAGE_POST="mv gcc-6-branch gcc-${ATSRC_PACKAGE_VER}-${ATSRC_PACKAGE_REV}" +ATSRC_PACKAGE_SRC=${AT_BASE}/sources/gcc-${ATSRC_PACKAGE_VER}-${ATSRC_PACKAGE_REV} +ATSRC_PACKAGE_WORK=${AT_WORK_PATH}/gcc +ATSRC_PACKAGE_MLS= +ATSRC_PACKAGE_ALOC= +ATSRC_PACKAGE_PATCHES= +ATSRC_PACKAGE_TARS= +ATSRC_PACKAGE_MAKE_CHECK= +ATSRC_PACKAGE_DISTRIB=yes +ATSRC_PACKAGE_BUNDLE=main_toolchain + +atsrc_get_patches () +{ + # Patch to add link-time optimization to some GCC libraries. + at_get_patch \ + https://raw.githubusercontent.com/powertechpreview/powertechpreview/26747dc0bfb0f8f30de9ebad78847a96d3191ba5/GCC%20PowerPC%20Backport/6/gcc-6-lto.patch \ + b10bdbf545205f142715dc25e087b1e7 || return ${?} + + return 0 +} diff --git a/configs/10.0/packages/gcc/specfile b/configs/10.0/packages/gcc/specfile new file mode 120000 index 000000000..f21375e67 --- /dev/null +++ b/configs/10.0/packages/gcc/specfile @@ -0,0 +1 @@ +../../../9.0/packages/gcc/specfile \ No newline at end of file diff --git a/configs/10.0/packages/gcc/stage_1 b/configs/10.0/packages/gcc/stage_1 new file mode 100644 index 000000000..d70299881 --- /dev/null +++ b/configs/10.0/packages/gcc/stage_1 @@ -0,0 +1,208 @@ +#!/usr/bin/env bash +# +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# GCC build parameters for stage 1 +# ================================ +# + +ATCFG_HOLD_TEMP_INSTALL='no' +ATCFG_HOLD_TEMP_BUILD='no' +# Build in a new directory +ATCFG_BUILD_STAGE_T='dir' + +# Required pre build hacks +atcfg_pre_hacks() { + # Overwrite the existing DEV-PHASE with Advance-Toolchain-XX + mv ${ATSRC_PACKAGE_WORK}/gcc/DEV-PHASE ${ATSRC_PACKAGE_WORK}/gcc/DEV-PHASE.back + echo "Advance-Toolchain-${at_major_internal}" > ${ATSRC_PACKAGE_WORK}/gcc/DEV-PHASE + # Overwrite the existing REVISION with the current SVN revision date + mv ${ATSRC_PACKAGE_WORK}/gcc/REVISION ${ATSRC_PACKAGE_WORK}/gcc/REVISION.back + sed "s/branch merged/branch, revision: ${ATSRC_PACKAGE_REV} merged/" ${ATSRC_PACKAGE_WORK}/gcc/REVISION.back \ + > ${ATSRC_PACKAGE_WORK}/gcc/REVISION + # IBM maintains branches on the svn repository for GCC. Such branches + # do not update the release timestamp (gcc/DATESTAMP). The following + # lines patch the release timestamp with the date of latest entry in + # the IBM branch ChangeLog, if the ChangeLog exists. If it doesn't + # exist, then we are probably not using an IBM branch. + if [ -f ${ATSRC_PACKAGE_WORK}/gcc/ChangeLog.ibm ]; then + mv ${ATSRC_PACKAGE_WORK}/gcc/DATESTAMP ${ATSRC_PACKAGE_WORK}/gcc/DATESTAMP.back + echo "$(head -n 1 ${ATSRC_PACKAGE_WORK}/gcc/ChangeLog.ibm | cut -f 1 -d " " | sed "s/-//g")" \ + > ${ATSRC_PACKAGE_WORK}/gcc/DATESTAMP + else + echo "WARNING: Not using an IBM branch" + fi +} + +# Pre configure settings or commands to run +atcfg_pre_configure() { + cc_64=${system_cc} + cxx_64=${system_cxx} + libdir="${at_dest}/lib" + if [[ "${cross_build}" == "no" ]]; then + if [[ "${build_arch}" == ppc64* ]]; then + if [[ "${default_compiler}" == "32" ]]; then + cc_64="${gcc64}" + cxx_64="${gpp64}" + fi + libdir="${at_dest}/lib64" + fi + fi +} + +# Conditional configure command +atcfg_configure() { + if [[ "${cross_build}" == "no" ]]; then + if [[ "${distro_fm}" == "ubuntu" ]]; then + # Ubuntu requires a different path for include and libs + # due to its solution for multiarch support. + multiarch=yes + fi + + # Configure command for native builds + CC="${cc_64}" \ + CXX="${cxx_64}" \ + AS="${at_dest}/bin/as" \ + LD="${at_dest}/bin/ld" \ + ${ATSRC_PACKAGE_WORK}/configure \ + --build=${host} \ + --host=${host} \ + --target=${target} \ + --with-cpu=${default_cpu} \ + --prefix="${at_dest}" \ + ${secure_plt:+--enable-secureplt} \ + ${disable_multilib:+--disable-multilib} \ + --disable-threads \ + --disable-shared \ + --disable-libmudflap \ + --disable-libssp \ + --disable-bootstrap \ + --disable-libgomp \ + --disable-lto \ + --disable-plugin \ + --with-mpfr-include="${at_dest}/include" \ + --with-mpfr-lib="${libdir}" \ + --with-gmp-include="${at_dest}/include" \ + --with-gmp-lib="${libdir}" \ + --with-mpc-include="${at_dest}/include" \ + --with-mpc-lib="${libdir}" \ + --enable-languages=c,c++ \ + --with-as="${at_dest}/bin/as" \ + --with-ld="${at_dest}/bin/ld" \ + ${multiarch:+--enable-multiarch} + else + # Configure command for cross builds + CC="${cc_64}" \ + CXX="${cxx_64}" \ + LD_FOR_TARGET="${at_dest}/bin/${target}-ld" \ + AS_FOR_TARGET="${at_dest}/bin/${target}-as" \ + AR_FOR_TARGET="${at_dest}/bin/${target}-ar" \ + RANLIB_FOR_TARGET="${at_dest}/bin/${target}-ranlib" \ + ${ATSRC_PACKAGE_WORK}/configure \ + --build=${host} \ + --host=${host} \ + --target=${target64:-${target}} \ + --with-cpu=${default_cpu} \ + --prefix="${at_dest}" \ + ${secure_plt:+--enable-secureplt} \ + ${disable_multilib:+--disable-multilib} \ + --disable-threads \ + --disable-shared \ + --disable-libmudflap \ + --disable-libssp \ + --disable-bootstrap \ + --disable-libgomp \ + --disable-libatomic \ + --disable-decimal-float \ + --disable-libquadmath \ + --disable-libcc1 \ + --disable-plugin \ + --with-mpfr-include="${tmp_dir}/include" \ + --with-mpfr-lib="${tmp_dir}/lib" \ + --with-gmp-include="${tmp_dir}/include" \ + --with-gmp-lib="${tmp_dir}/lib" \ + --with-mpc-include="${tmp_dir}/include" \ + --with-mpc-lib="${tmp_dir}/lib" \ + --enable-languages=c \ + --with-as="${at_dest}/bin/${target}-as" \ + --with-ld="${at_dest}/bin/${target}-ld" \ + --with-newlib \ + --without-headers + fi +} + +# Make build command +atcfg_make() { + # gcc_cv_libc_provides_ssp=yes - GCC needs glibc headers in order to + # detect if the standard C library supports stack protection. + # However, the glibc headers aren't available at this stage. + ${SUB_MAKE} all \ + gcc_cv_libc_provides_ssp=yes +} + +# Pre install settings or commands to run +atcfg_pre_install() { + # The gcc install recipe must be able to find the following folders + # so that it can perform its tasks properly, as installing target + # host binaries on cross builds. The binutils package will create + # this folders on its install. As our installs are atomic, we need + # to provide them before hand, so GCC finds it and its install + # recipe can perform properly. + [[ -d "${install_place}/${at_dest}/${target}/bin" ]] || \ + mkdir -p "${install_place}/${at_dest}/${target}/bin" + [[ -d "${install_place}/${at_dest}/${target}/lib" ]] || \ + mkdir -p "${install_place}/${at_dest}/${target}/lib" +} + +# Install build command +atcfg_install() { + make install -j1 DESTDIR=${install_place} +} + +# Post install settings or commands to run +atcfg_post_install() { + # Create the required symlinks to install + if [[ "${cross_build}" == "no" ]]; then + pushd ${install_place}/${at_dest}/bin + if [[ ! -e ${target}-gcc ]]; then + echo -e "#!/bin/bash\nexec ${at_dest}/bin/gcc \"${@}\"" > ${target}-gcc + chmod a+x ${target}-gcc + fi + if [[ ! -e ${target}-g++ ]]; then + echo -e "#!/bin/bash\nexec ${at_dest}/bin/g++ \"${@}\"" > ${target}-g++ + chmod a+x ${target}-g++ + fi + if [[ ! -e ${target}-c++ ]]; then + ln -f ${target}-g++ ${target}-c++ + fi + popd + + # This hack isn't necessary on ppc64le. + if [[ "${build_arch}" == "ppc64" ]]; then + # The following files will be installed by GLIBC, so no + # need to have them properly mapped into the filelist + # (not installed into ${install_place} for mapping) + if [[ ! -e "${at_dest}/lib/ld.so.1" ]]; then + ln -s /lib/ld.so.1 "${at_dest}/lib/ld.so.1" + fi + if [[ ! -e "${at_dest}/lib/libc.so.6" ]]; then + ln -s /lib/libc.so.6 "${at_dest}/lib/libc.so.6" + fi + fi + # Remove unnecessary python scripts + find "${install_place}/${at_dest}" -name "libstdc++.so.*-gdb.py" -print -delete + fi +} diff --git a/configs/10.0/packages/gcc/stage_2 b/configs/10.0/packages/gcc/stage_2 new file mode 100644 index 000000000..6ae1e75a6 --- /dev/null +++ b/configs/10.0/packages/gcc/stage_2 @@ -0,0 +1,203 @@ +#!/usr/bin/env bash +# +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# GCC build parameters for stage 2 +# ================================ +# + +ATCFG_HOLD_TEMP_INSTALL='no' +ATCFG_HOLD_TEMP_BUILD='no' +# Build in a new directory +ATCFG_BUILD_STAGE_T='dir' + + +# Required post install hacks (this one is run after the final install move) +atcfg_posti_hacks() { + # Hack the static library to satisfy GLIBC build + for LIB in $(find "${at_dest}/lib" -name libgcc.a); do + [[ -e ${LIB%\.a}_eh.a ]] || ln -s libgcc.a ${LIB%\.a}_eh.a + [[ -e ${LIB%\.a}_s.a ]] || ln -s libgcc.a ${LIB%\.a}_s.a + done +} + +atcfg_pre_hacks() { + # Revision 224095 on gcc introduces the --with-advance-toolchain + # option, which can be used to select the dynamic linker from the + # Advance Toolchain, instead of the one provided by the system. + # However, this switch assumes that the Advance Toolchain is installed + # under /opt/atx.x, which is not necessarily true during advance + # toolchain builds. + # + # The following lines patch the gcc source, in order to allow the use + # of the --with-advance-toolchain during advance toolchain builds. + echo ${destdir} + sed -i -e "/\/opt\/\$with_advance_toolchain/s@/opt@${destdir}@" "${ATSRC_PACKAGE_WORK}/gcc/config.gcc" +} + +# Pre configure settings or commands to run +atcfg_pre_configure() { + cc_64="${system_cc}" + cxx_64="${system_cxx}" + libdir="${at_dest}/lib" + if [[ "${cross_build}" == "no" ]]; then + if [[ "${build_arch}" == ppc64* ]]; then + if [[ "${default_compiler}" == "32" ]]; then + cc_64="${gcc64}" + cxx_64="${gpp64}" + fi + libdir="${at_dest}/lib64" + fi + fi +} + +# Conditional configure command +atcfg_configure() { + if [[ "${cross_build}" == "no" ]]; then + # Configure command for native builds + CC="${cc_64}" \ + CXX="${cxx_64}" \ + CFLAGS="-O2" \ + CXXFLAGS="-O2" \ + AS="${at_dest}/bin/as" \ + LD="${at_dest}/bin/ld" \ + ${ATSRC_PACKAGE_WORK}/configure \ + --build=${target64:-${target}} \ + --host=${target64:-${target}} \ + --target=${target64:-${target}} \ + --with-cpu=${default_cpu} \ + --prefix=${at_dest} \ + ${with_longdouble:+--with-long-double-128} \ + ${with_dfp_standalone:+--enable-decimal-float} \ + ${secure_plt:+--enable-secureplt} \ + ${disable_multilib:+--disable-multilib} \ + --with-advance-toolchain=$(basename ${at_dest}) \ + --with-local-prefix=${at_dest} \ + --enable-threads=posix \ + --enable-languages=c,c++ \ + --enable-__cxa_atexit \ + --enable-shared \ + --disable-checking \ + --disable-libmudflap \ + --disable-libssp \ + --disable-lto \ + --disable-libgomp \ + --disable-plugin \ + --without-ppl \ + --without-cloog \ + --with-gmp-include="${at_dest}/include" \ + --with-gmp-lib=${libdir} \ + --with-mpfr-include="${at_dest}/include" \ + --with-mpfr-lib=${libdir} \ + --with-mpc-include="${at_dest}/include" \ + --with-mpc-lib=${libdir} \ + --with-as="${at_dest}/bin/as" \ + --with-ld="${at_dest}/bin/ld" + else + # Configure command for cross builds + CC="${cc_64}" \ + CXX="${cxx_64}" \ + LD_FOR_TARGET="${at_dest}/bin/${target}-ld" \ + AS_FOR_TARGET="${at_dest}/bin/${target}-as" \ + AR_FOR_TARGET="${at_dest}/bin/${target}-ar" \ + NM_FOR_TARGET="${at_dest}/bin/${target}-nm" \ + RANLIB_FOR_TARGET="${at_dest}/bin/${target}-ranlib" \ + ${ATSRC_PACKAGE_WORK}/configure \ + --build=${host} \ + --host=${host} \ + --target=${target64:-${target}} \ + --with-cpu=${default_cpu} \ + --prefix=${at_dest} \ + ${with_longdouble:+--with-long-double-128} \ + ${secure_plt:+--enable-secureplt} \ + ${disable_multilib:+--disable-multilib} \ + --with-advance-toolchain=$(basename ${at_dest}) \ + --with-local-prefix=${at_dest} \ + --enable-languages=c \ + --enable-__cxa_atexit \ + --enable-threads=posix \ + --disable-libmudflap \ + --disable-libssp \ + --disable-libgomp \ + --disable-libatomic \ + --disable-libquadmath \ + --disable-lto \ + --disable-decimal-float \ + --disable-libcc1 \ + --disable-plugin \ + --with-mpfr-include="${tmp_dir}/include" \ + --with-mpfr-lib="${tmp_dir}/lib" \ + --with-gmp-include="${tmp_dir}/include" \ + --with-gmp-lib="${tmp_dir}/lib" \ + --with-mpc-include="${tmp_dir}/include" \ + --with-mpc-lib="${tmp_dir}/lib" \ + --without-ppl \ + --without-cloog \ + --with-host-libstdcxx="-L${libdir} -L${tmp_dir}/lib -lstdc++ -lsupc++ -lm -lgmp -lgmpxx -lmpfr -lmpc" \ + --with-build-sysroot="${dest_cross}" \ + --with-sysroot="${dest_cross}" \ + --with-native-system-header-dir="/usr/include" + fi +} + +# Make build command +atcfg_make() { + # With -isystem we make sure that system's gcc (stage1) will recognize AT + # headers as system headers and give them special treatment. + ${SUB_MAKE} STAGE1_CFLAGS="-isystem ${at_dest}/include" STAGE1_CXXFLAGS="-isystem ${at_dest}/include" all +} + +# Pre install settings or commands to run +atcfg_pre_install() { + # The gcc install recipe must be able to find the following folders + # so that it can perform its tasks properly, as installing target + # host binaries on cross builds. The binutils package will create + # this folders on its install. As our installs are atomic, we need + # to provide them before hand, so GCC finds it and its install + # recipe can perform properly. + [[ -d "${install_place}/${at_dest}/${target}/bin" ]] || \ + mkdir -p "${install_place}/${at_dest}/${target}/bin" + [[ -d "${install_place}/${at_dest}/${target}/lib" ]] || \ + mkdir -p "${install_place}/${at_dest}/${target}/lib" +} + +# Install build command +atcfg_install() { + make install -j1 DESTDIR=${install_place} +} + +# Post install settings or commands to run +atcfg_post_install() { + # Fixes to cross build install + if [[ "${cross_build}" == "yes" ]]; then + # Create the required symlinks to install + pushd ${install_place}/${at_dest}/bin + if [[ ! -e ${target}-gcc ]]; then + echo -e "#!/bin/bash\nexec ${at_dest}/bin/gcc \"${@}\"" > ${target}-gcc + chmod a+x ${target}-gcc + fi + if [[ ! -e ${target}-g++ ]]; then + echo -e "#!/bin/bash\nexec ${at_dest}/bin/g++ \"${@}\"" > ${target}-g++ + chmod a+x ${target}-g++ + fi + if [[ ! -e ${target}-c++ ]]; then + ln -f ${target}-g++ ${target}-c++ + fi + popd + fi + # Remove unnecessary python scripts + find "${install_place}/${at_dest}" -name "libstdc++.so.*-gdb.py" -print -delete +} diff --git a/configs/10.0/packages/gcc/stage_3 b/configs/10.0/packages/gcc/stage_3 new file mode 100644 index 000000000..75e355e08 --- /dev/null +++ b/configs/10.0/packages/gcc/stage_3 @@ -0,0 +1,160 @@ +#!/usr/bin/env bash +# +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# GCC build parameters for stage 3 +# ================================ +# + +ATCFG_HOLD_TEMP_INSTALL='no' +ATCFG_HOLD_TEMP_BUILD='no' +# Build in a new directory +ATCFG_BUILD_STAGE_T='dir' +# Don't fail if stage final install place doesn't exist +if [[ "${cross_build}" == "yes" ]]; then + ATCFG_INSTALL_PEDANTIC="no" +fi + +# Required pre build hacks +atcfg_pre_hacks() { + # Clean static lib hack done on gcc stage 2 for GLIBC build. + for Z in $(find "${at_dest}/lib" -name libgcc.a); do + [[ -h ${Z%\.a}_s.a ]] && rm -f ${Z%\.a}_s.a + [[ -h ${Z%\.a}_eh.a ]] && rm -f ${Z%\.a}_eh.a + done + # Should run only on a native build... Skip these on cross + if [[ "${cross_build}" == "no" ]]; then + # Hack required to avoid a bug where gcc picks up the wrong crti.o, + # causing ld to segfault in the stage3 build. We move the GCC required + # static libs to a separate place and use it in the build. + if [[ ! -d "${at_dest}/tmp/gcc_3" ]]; then + mkdir -p ${at_dest}/tmp/gcc_3 + fi + if [[ "${build_arch}" == ppc64* ]]; then + cp -t ${at_dest}/tmp/gcc_3 \ + ${at_dest}/lib64/*gmp* \ + ${at_dest}/lib64/*mpfr* \ + ${at_dest}/lib64/*mpc* \ + ${at_dest}/lib64/libsupc++.a \ + ${at_dest}/lib64/libstdc++.a + else + cp -t ${at_dest}/tmp/gcc_3 \ + ${at_dest}/lib/*gmp* \ + ${at_dest}/lib/*mpfr* \ + ${at_dest}/lib/*mpc* + fi + fi +} + +# Required post install hacks (this one is run after the final install move) +atcfg_posti_hacks() { + # Cleanup the temp files + rm -rf ${at_dest}/tmp +} + +# Conditional pre configure settings or commands to run +atcfg_pre_configure() { + if [[ "${cross_build}" == "no" ]]; then + cc_64=${system_cc} + cxx_64=${system_cxx} + libdir="${at_dest}/tmp/gcc_3" + if [[ "${build_arch}" == ppc64* ]]; then + if [[ "${default_compiler}" == "32" ]]; then + cc_64="${gcc64}" + cxx_64="${gpp64}" + fi + fi + glibc=$(CC="${at_dest}/bin/${target}-gcc" \ + ${utilities}/get_glibc_version.sh) + fi +} + +# Conditional configure command for builds +atcfg_configure() { + if [[ "${cross_build}" == "no" ]]; then + CC="${cc_64}" \ + CXX="${cxx_64}" \ + CFLAGS="-O2 -mminimal-toc" \ + CXXFLAGS="-O2 -mminimal-toc" \ + AS="${at_dest}/bin/as" \ + LD="${at_dest}/bin/ld" \ + LDFLAGS="-L${libdir}" \ + POSTSTAGE1_LDFLAGS="-L${libdir} -lstdc++ -lsupc++ -lm -lgmp -lgmpxx -lmpfr -lmpc" \ + ${ATSRC_PACKAGE_WORK}/configure \ + --build=${target64:-$target} \ + --host=${target64:-$target} \ + --target=${target64:-$target} \ + --prefix="${at_dest}" \ + ${with_longdouble:+--with-long-double-128} \ + ${with_dfp_standalone:+--enable-decimal-float} \ + ${secure_plt:+--enable-secureplt} \ + ${disable_multilib:+--disable-multilib} \ + --with-advance-toolchain=$(basename ${at_dest}) \ + --with-glibc-version=${glibc} \ + --with-local-prefix=${at_dest} \ + --enable-threads=posix \ + --enable-languages=c,c++ \ + --enable-__cxa_atexit \ + --enable-shared \ + --enable-checking=release \ + --enable-gnu-indirect-function \ + --enable-linker-build-id \ + --disable-libgomp \ + --with-gmp-include="${at_dest}/include" \ + --with-gmp-lib=${libdir} \ + --with-mpfr-include="${at_dest}/include" \ + --with-mpfr-lib=${libdir} \ + --with-mpc-include="${at_dest}/include" \ + --with-mpc-lib=${libdir} \ + --without-ppl \ + --without-cloog \ + --without-libelf \ + --with-as="${at_dest}/bin/as" \ + --with-ld="${at_dest}/bin/ld" \ + --with-cpu=${build_base_arch} \ + --with-tune=${build_optimization} + else + echo "No configure on gcc_3 cross stage" + fi +} + +# Make build command +atcfg_make() { + if [[ "${cross_build}" == "no" ]]; then + # With -isystem we make sure that system's gcc (stage1) will recognize + # AT headers as system headers and give them special treatment. + ${SUB_MAKE} STAGE1_CFLAGS="-isystem ${at_dest}/include" STAGE1_CXXFLAGS="-isystem ${at_dest}/include" all + else + echo "No make all on gcc_3 cross stage" + fi +} + +# Conditional install build command +atcfg_install() { + if [[ "${cross_build}" == "no" ]]; then + make install -j1 DESTDIR=${install_place} + else + echo "No make install on gcc_3 cross stage" + fi +} + +# Conditional post install settings or commands to run +atcfg_post_install() { + if [[ "${cross_build}" == "no" ]]; then + # Remove unnecessary python scripts + find "${install_place}/${at_dest}/lib" "${install_place}/${at_dest}/lib64" -name "libstdc++.so.*-gdb.py" -print -delete + fi +} diff --git a/configs/10.0/packages/gcc/stage_4 b/configs/10.0/packages/gcc/stage_4 new file mode 100644 index 000000000..871bebca4 --- /dev/null +++ b/configs/10.0/packages/gcc/stage_4 @@ -0,0 +1,264 @@ +#!/usr/bin/env bash +# +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# GCC build parameters for stage 4 +# ================================ +# + +ATCFG_HOLD_TEMP_INSTALL='no' +ATCFG_HOLD_TEMP_BUILD='no' +# Build in a new directory +ATCFG_BUILD_STAGE_T='dir' + +# Conditional pre configure settings or commands to run +atcfg_pre_configure() { + glibc=$(CC="${at_dest}/bin/${target}-gcc" \ + ${utilities}/get_glibc_version.sh) +} + +# ATCFG_CONFIGURE SETTINGS +# ========================================================= +# Conditional configure command +atcfg_configure() { + if [[ "${cross_build}" == "no" ]]; then + # Configure command for native builds + #TODO: Enable gotools. + PATH=${at_dest}/bin:${PATH} \ + CC="${at_dest}/bin/gcc" \ + CFLAGS="-O2" \ + CXXFLAGS="-O2" \ + CFLAGS_FOR_TARGET="-O3" \ + CXXFLAGS_FOR_TARGET="-O3" \ + AS="${at_dest}/bin/as" \ + LD="${at_dest}/bin/ld" \ + LDFLAGS="-L${at_dest}/lib64" \ + ${ATSRC_PACKAGE_WORK}/configure \ + --build=${target64:-$target} \ + --host=${target64:-$target} \ + --target=${target64:-$target} \ + --with-cpu=${default_cpu} \ + --prefix="${at_dest}" \ + ${with_longdouble:+--with-long-double-128} \ + ${with_dfp_standalone:+--enable-decimal-float} \ + ${secure_plt:+--enable-secureplt} \ + ${disable_multilib:+--disable-multilib} \ + --with-advance-toolchain=$(basename ${at_dest}) \ + --with-glibc-version=${glibc} \ + --with-local-prefix=${at_dest} \ + --enable-threads=posix \ + --enable-languages=${build_gcc_languages} \ + --enable-__cxa_atexit \ + --enable-shared \ + --enable-checking=release \ + --enable-lto \ + --enable-gnu-indirect-function \ + --enable-initfini-array \ + --enable-linker-build-id \ + --with-system-zlib \ + --with-gmp-include="${at_dest}/include" \ + --with-gmp-lib="${at_dest}/lib64" \ + --with-mpfr-include="${at_dest}/include" \ + --with-mpfr-lib="${at_dest}/lib64" \ + --with-mpc-include="${at_dest}/include" \ + --with-mpc-lib="${at_dest}/lib64" \ + --without-ppl \ + --without-cloog \ + --without-libelf \ + --with-host-libstdcxx="-L${at_dest}/lib64 -lstdc++ -lsupc++ -lgmp -lgmpxx -lm" \ + --with-cpu=${build_base_arch} \ + --with-tune=${build_optimization} + else + # Configure command for cross builds + CC="${system_cc}" \ + CXX="${system_cxx}" \ + LD_FOR_TARGET="${at_dest}/bin/${target}-ld" \ + AS_FOR_TARGET="${at_dest}/bin/${target}-as" \ + AR_FOR_TARGET="${at_dest}/bin/${target}-ar" \ + RANLIB_FOR_TARGET="${at_dest}/bin/${target}-ranlib" \ + NM_FOR_TARGET="${at_dest}/bin/${target}-nm" \ + ${ATSRC_PACKAGE_WORK}/configure \ + --build=${host} \ + --host=${host} \ + --target=${target64:-${target}} \ + --prefix="${at_dest}" \ + --enable-shared \ + ${with_longdouble:+--with-long-double-128} \ + ${with_dfp:+--enable-decimal-float} \ + ${secure_plt:+--enable-secureplt} \ + ${disable_multilib:+--disable-multilib} \ + --with-advance-toolchain=$(basename ${at_dest}) \ + --with-glibc-version=${glibc} \ + --with-local-prefix=${at_dest} \ + --enable-threads=posix \ + --enable-languages=${build_gcc_languages} \ + --enable-__cxa_atexit \ + --enable-lto \ + --enable-gnu-indirect-function \ + --enable-cross \ + --enable-initfini-array \ + --enable-linker-build-id \ + --disable-gotools \ + --disable-libcc1 \ + --disable-bootstrap \ + --with-as="${at_dest}/bin/${target}-as" \ + --with-ld="${at_dest}/bin/${target}-ld" \ + --with-mpfr-include="${tmp_dir}/include" \ + --with-mpfr-lib="${tmp_dir}/lib" \ + --with-gmp-include="${tmp_dir}/include" \ + --with-gmp-lib="${tmp_dir}/lib" \ + --with-mpc-include="${tmp_dir}/include" \ + --with-mpc-lib="${tmp_dir}/lib" \ + --without-ppl \ + --without-cloog \ + --without-libelf \ + --with-sysroot="${dest_cross}" \ + --with-host-libstdcxx="-L${at_dest}/lib -L${tmp_dir}/lib -lstdc++ -lsupc++ -lgmp -lgmpxx -lm" \ + --with-cpu=${build_base_arch} \ + --with-tune=${build_optimization} + fi +} + + +atcfg_pre_make() { + if [[ "${cross_build}" == "no" ]]; then + local lto_patch=gcc-6-lto.patch + + pushd ${ATSRC_PACKAGE_WORK} + if [[ ! -r ${lto_patch} ]]; then + echo "No gcc libstdc++ patch found!" + exit 1 + fi + # Ignore when the patch is already applied + patch -sfR --dry-run -p1 -i ${lto_patch} > /dev/null \ + || patch -p1 < ${lto_patch} + if [[ ${?} -ne 0 ]]; then + echo "Error applying gcc libstdc++ patch!" + exit 1 + fi + popd + fi +} + +# Make build command +atcfg_make() { + if [[ "${cross_build}" == "no" ]]; then + # Make build command + # libgo_cv_lib_setcontext_clobbers=no must be set for + # 32 bit go builds to work correctly. Once + # RH BZ 1018072 is fixed then setting the variable is + # no longer needed and the build will work. + # TODO: Remove LIBRARY_PATH. + # We need to set LIBRARY_PATH in order to build Go tools. + LIBRARY_PATH="${at_dest}/lib64" \ + PATH=${at_dest}/bin:${PATH} libgo_cv_lib_setcontext_clobbers_tls=no \ + ${SUB_MAKE} STAGE1_CFLAGS="-g -O" profiledbootstrap + else + PATH=${at_dest}/bin:${PATH} libgo_cv_lib_setcontext_clobbers_tls=no \ + ${SUB_MAKE} STAGE1_CFLAGS="-g -O" + fi +} + + +# Pre install settings or commands to run +atcfg_pre_install() { + # The gcc install recipe must be able to find the following folders + # so that it can perform its tasks properly, as installing target + # host binaries on cross builds. The binutils package will create + # this folders on its install. As our installs are atomic, we need + # to provide them before hand, so GCC finds it and its install + # recipe can perform properly. + [[ -d "${install_place}/${at_dest}/${target}/bin" ]] || \ + mkdir -p "${install_place}/${at_dest}/${target}/bin" + [[ -d "${install_place}/${at_dest}/${target}/lib" ]] || \ + mkdir -p "${install_place}/${at_dest}/${target}/lib" +} + +# Install build command +atcfg_install() { + PATH=${at_dest}/bin:${PATH} \ + make install -j1 DESTDIR=${install_place} +} + +# Post install settings or commands to run +atcfg_post_install() { + if [[ "${cross_build}" == "yes" ]]; then + # Place some additional files for build process + mkdir -p ${install_place}/${dest_cross}/usr/lib + if [[ "${build_arch}" == ppc64* ]]; then + # We need to manually copy these + cp -d ${install_place}/${at_dest}/${target64}/lib/libgcc_s.so* ${install_place}/${dest_cross}/usr/lib/ + cp -d ${install_place}/${at_dest}/${target64}/lib/libstdc++.so* ${install_place}/${dest_cross}/usr/lib/ + else + cp -d ${install_place}/${at_dest}/${target}/lib/libgcc_s.so* ${install_place}/${dest_cross}/usr/lib/ + cp -d ${install_place}/${at_dest}/${target}/lib/libstdc++.so* ${install_place}/${dest_cross}/usr/lib/ + fi + # Remove 32-bit go libraries as it is not supported on go >= 1.4.2. + if [[ -n "${target32}" ]]; then + find "${install_place}/${at_dest}/${target64}/lib/" \ + -depth -name "libgo.*" -o -name "libgo*begin.*" \ + | xargs rm + rm -rf ${install_place}/${at_dest}/${target64}/lib/go/ + fi + # This was needed to fix the cross build which defaults to ${target64} + # targets but now, we are assuming that every build should have the + # triple shortcut installed, so we create gcc ${target32}-* symlinks + pushd ${install_place}/${at_dest}/bin + for CMD in c++ cpp g++ gcc gcov gfortran; do + if [[ -x ${target64}-${CMD} ]] && \ + [[ ! -f ${target32}-${CMD} ]]; then + ln -sfn ${target64}-${CMD} ${target32}-${CMD} + fi + done + popd + else + pushd ${install_place}/${at_dest}/bin + # This is necessary for some applications to work + if [[ ! -e "cc" ]]; then + ln -s "gcc" "cc" + fi + popd + # Remove unnecessary python scripts + find "${install_place}/${at_dest}" -name "libstdc++.so.*-gdb.py" -print -delete + # Remove 32-bit go libraries as it is not supported on go >= 1.4.2. + if [[ -n "${target32}" ]]; then + find "${install_place}/${at_dest}/lib/" -depth \ + -name "libgo.*" -o -name "libgo*begin.*" \ + | xargs rm + rm -rf ${install_place}/${at_dest}/lib/go/ + fi + set -e + # Hack around to avoid ld.so.cache getting the libs from the + # system as ldconfig puts platform based directories preceding + # other directories. + check_dirs= + if [[ -n "${target32}" ]]; then + check_dirs="${install_transfer}/lib" + fi + if [[ -n "${target64}" ]]; then + if [[ -n "${target32}" ]]; then + check_dirs="${install_transfer}/lib64 ${check_dirs}" + else + check_dirs="${install_transfer}/lib64" + fi + fi + for dir in ${check_dirs}; do + ${AT_BASE}/scripts/utilities/create_lib_symlinks.sh \ + "${dir}" "${dir}/${build_load_arch}" + done + set +e + fi +} diff --git a/configs/10.0/packages/gcc/stage_optimized b/configs/10.0/packages/gcc/stage_optimized new file mode 100644 index 000000000..3b915ebbc --- /dev/null +++ b/configs/10.0/packages/gcc/stage_optimized @@ -0,0 +1,137 @@ +#!/usr/bin/env bash +# +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# GCC build parameters for stage optimized +# ======================================== +# + +ATCFG_HOLD_TEMP_INSTALL='no' +ATCFG_HOLD_TEMP_BUILD='no' +# Build in a new directory +ATCFG_BUILD_STAGE_T='dir' + + +atcfg_pre_configure() { + # Check the need of a cross-compiler build + if [[ "${at_build_cpu}" == "${AT_OPTIMIZE_CPU}" ]]; then + echo cross-compiling=no >> ./configparms + else + echo cross-compiling=yes >> ./configparms + fi +} + + +atcfg_configure() { + PATH=${at_dest}/bin:${PATH} \ + CC="${at_dest}/bin/gcc" \ + CFLAGS="-O2" \ + CXXFLAGS="-O2" \ + CFLAGS_FOR_TARGET="-O3" \ + CXXFLAGS_FOR_TARGET="-O3" \ + AS="${at_dest}/bin/as" \ + LD="${at_dest}/bin/ld" \ + LDFLAGS="-L${at_dest}/lib64" \ + ${ATSRC_PACKAGE_WORK}/configure \ + --build=${target64:-$target} \ + --host=${target64:-$target} \ + --target=${target64:-$target} \ + --prefix="${at_dest}" \ + ${with_longdouble:+--with-long-double-128} \ + ${with_dfp_standalone:+--enable-decimal-float} \ + ${secure_plt:+--enable-secureplt} \ + ${disable_multilib:+--disable-multilib} \ + --with-advance-toolchain=$(basename ${at_dest}) \ + --with-local-prefix=${at_dest} \ + --enable-threads=posix \ + --enable-languages=${build_gcc_languages} \ + --enable-__cxa_atexit \ + --enable-shared \ + --enable-checking=release \ + --enable-gnu-indirect-function \ + --enable-lto \ + --enable-linker-build-id \ + --disable-bootstrap \ + --with-gmp-include="${at_dest}/include" \ + --with-gmp-lib="${at_dest}/lib64" \ + --with-mpfr-include="${at_dest}/include" \ + --with-mpfr-lib="${at_dest}/lib64" \ + --with-mpc-include="${at_dest}/include" \ + --with-mpc-lib="${at_dest}/lib64" \ + --without-ppl \ + --without-cloog \ + --without-libelf \ + --with-system-zlib \ + --with-host-libstdcxx="-L${at_dest}/lib64 -lstdc++ -lsupc++ -lgmp -lgmpxx -lm" \ + --with-cpu=${AT_OPTIMIZE_CPU/ppc/} \ + --with-tune=${AT_OPTIMIZE_CPU/ppc/} +} + + +atcfg_make() { + # libgo_cv_lib_setcontext_clobbers=no must be set for + # 32 bit go builds to work correctly. Once + # RH BZ 1018072 is fixed then setting the variable is + # no longer needed and the build will work. + PATH=${at_dest}/bin:${PATH} \ + libgo_cv_lib_setcontext_clobbers_tls=no \ + ${SUB_MAKE} all +} + + +atcfg_install() { + PATH=${at_dest}/bin:${PATH} \ + make -j1 DESTDIR=${install_place} install-target +} + + +atcfg_post_install() { + # Remove unneeded install files + rm -rf ${install_place}/${at_dest}/lib/gcc + find "${install_place}" -type f -name "*.o" -print -delete + find "${install_place}" -type f -name "*.a" -print -delete + find "${install_place}" -type f -name "*.la" -print -delete + find "${install_place}" -type f -name "*.py" -print -delete + # Save all libraries into a tar file + pushd "${install_place}/${at_dest}/lib" + local flist=$(find . -name "*.so" -o -name "*.so.*") + [[ -n "${flist}" ]] && \ + tar czf "${install_place}/${AT_OPTIMIZE_CPU}.tar.gz" \ + ${flist} + popd + pushd "${install_place}/${at_dest}/lib64" + local flist=$(find . -name "*.so" -o -name "*.so.*") + [[ -n "${flist}" ]] && \ + tar czf "${install_place}/${AT_OPTIMIZE_CPU}_64.tar.gz" \ + ${flist} + popd + # Remove all installed built files + rm -rf "${install_place}/${at_dest}" + # Create processor lib/lib64 targets + mkdir -p "${install_place}/${at_dest}/lib/${AT_OPTIMIZE_CPU}" + mkdir -p "${install_place}/${at_dest}/lib64/${AT_OPTIMIZE_CPU}" + # Place saved libs on created final target + pushd "${install_place}/${at_dest}/lib/${AT_OPTIMIZE_CPU}" + [[ -e "${install_place}/${AT_OPTIMIZE_CPU}.tar.gz" ]] && \ + tar xzf "${install_place}/${AT_OPTIMIZE_CPU}.tar.gz" + popd + pushd "${install_place}/${at_dest}/lib64/${AT_OPTIMIZE_CPU}" + [[ -e "${install_place}/${AT_OPTIMIZE_CPU}_64.tar.gz" ]] && \ + tar xzf "${install_place}/${AT_OPTIMIZE_CPU}_64.tar.gz" + popd + rm -f "${install_place}/${AT_OPTIMIZE_CPU}.tar.gz" \ + "${install_place}/${AT_OPTIMIZE_CPU}_64.tar.gz" +} diff --git a/configs/10.0/packages/gdb/gdb.mk b/configs/10.0/packages/gdb/gdb.mk new file mode 120000 index 000000000..bc9f118a3 --- /dev/null +++ b/configs/10.0/packages/gdb/gdb.mk @@ -0,0 +1 @@ +../../../9.0/packages/gdb/gdb.mk \ No newline at end of file diff --git a/configs/10.0/packages/gdb/sources b/configs/10.0/packages/gdb/sources new file mode 100644 index 000000000..5082d2975 --- /dev/null +++ b/configs/10.0/packages/gdb/sources @@ -0,0 +1,42 @@ +#!/usr/bin/env bash +# +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# GDB source package and build info +# ================================= +# +ATSRC_PACKAGE_NAME="GDB (GNU Debugger)" +ATSRC_PACKAGE_VER=7.11.1 +ATSRC_PACKAGE_REV=140bf80050b3 +ATSRC_PACKAGE_LICENSE="GPL 2.0" +ATSRC_PACKAGE_DOCLINK="http://sourceware.org/gdb/current/onlinedocs/gdb/" +ATSRC_PACKAGE_RELFIXES= +ATSRC_PACKAGE_STR_VER="${ATSRC_PACKAGE_NAME} ${ATSRC_PACKAGE_VER}${ATSRC_PACKAGE_REV:+-${ATSRC_PACKAGE_REV}}" +ATSRC_PACKAGE_PRE="test -d gdb-${ATSRC_PACKAGE_VER}${ATSRC_PACKAGE_REV:+-${ATSRC_PACKAGE_REV}}" +# git.linux.ibm.com is a mirror of sourceware.org. +ATSRC_PACKAGE_CO=([0]="git clone git://git.linux.ibm.com/binutils-gdb/binutils-gdb.git gdb" \ + [1]="git clone git://sourceware.org/git/binutils-gdb.git gdb") +ATSRC_PACKAGE_GIT="git checkout -b gdb-${ATSRC_PACKAGE_VER}${ATSRC_PACKAGE_REV:+-${ATSRC_PACKAGE_REV}} ${ATSRC_PACKAGE_REV}" +ATSRC_PACKAGE_POST="mv gdb gdb-${ATSRC_PACKAGE_VER}${ATSRC_PACKAGE_REV:+-${ATSRC_PACKAGE_REV}}" +ATSRC_PACKAGE_SRC="${AT_BASE}/sources/gdb-${ATSRC_PACKAGE_VER}${ATSRC_PACKAGE_REV:+-${ATSRC_PACKAGE_REV}}" +ATSRC_PACKAGE_WORK=${AT_WORK_PATH}/gdb +ATSRC_PACKAGE_MLS= +ATSRC_PACKAGE_ALOC= +ATSRC_PACKAGE_TARS= +ATSRC_PACKAGE_PATCHES= +ATSRC_PACKAGE_MAKE_CHECK="" +ATSRC_PACKAGE_DISTRIB=yes +ATSRC_PACKAGE_BUNDLE=devel diff --git a/configs/10.0/packages/gdb/specfile b/configs/10.0/packages/gdb/specfile new file mode 120000 index 000000000..99faa65e8 --- /dev/null +++ b/configs/10.0/packages/gdb/specfile @@ -0,0 +1 @@ +../../../9.0/packages/gdb/specfile \ No newline at end of file diff --git a/configs/10.0/packages/gdb/stage_1 b/configs/10.0/packages/gdb/stage_1 new file mode 120000 index 000000000..e57230f84 --- /dev/null +++ b/configs/10.0/packages/gdb/stage_1 @@ -0,0 +1 @@ +../../../9.0/packages/gdb/stage_1 \ No newline at end of file diff --git a/configs/10.0/packages/glibc/glibc.mk b/configs/10.0/packages/glibc/glibc.mk new file mode 120000 index 000000000..39ac284c0 --- /dev/null +++ b/configs/10.0/packages/glibc/glibc.mk @@ -0,0 +1 @@ +../../../9.0/packages/glibc/glibc.mk \ No newline at end of file diff --git a/configs/10.0/packages/glibc/sources b/configs/10.0/packages/glibc/sources new file mode 100644 index 000000000..4b9fad7dc --- /dev/null +++ b/configs/10.0/packages/glibc/sources @@ -0,0 +1,65 @@ +#!/usr/bin/env bash +# +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# GLIBC source package and build info +# =================================== +# + +ATSRC_PACKAGE_NAME="GNU C Library" +ATSRC_PACKAGE_VER=2.24 +ATSRC_PACKAGE_REV=0271fac6ade2 +ATSRC_PACKAGE_LICENSE="LGPL 2.1" +ATSRC_PACKAGE_DOCLINK="http://www.gnu.org/software/libc/manual/html_node/index.html" +ATSRC_PACKAGE_RELFIXES= +ATSRC_PACKAGE_STR_VER="${ATSRC_PACKAGE_NAME} ${ATSRC_PACKAGE_VER}-ibm" +ATSRC_PACKAGE_PRE="test -d glibc-${ATSRC_PACKAGE_VER}-${ATSRC_PACKAGE_REV}" +# git://git.linux.ibm.com/toolchain-mirrors/glibc.git is a mirror of the git://sourceware.org/git/glibc.git +ATSRC_PACKAGE_CO=([0]="git clone git://git.linux.ibm.com/toolchain-mirrors/glibc.git" \ + [1]="git clone git://sourceware.org/git/glibc.git") +ATSRC_PACKAGE_GIT="git checkout -b glibc-${ATSRC_PACKAGE_VER}${ATSRC_PACKAGE_REV:+-${ATSRC_PACKAGE_REV}} ${ATSRC_PACKAGE_REV}" +ATSRC_PACKAGE_POST="mv glibc glibc-${ATSRC_PACKAGE_VER}${ATSRC_PACKAGE_REV:+-${ATSRC_PACKAGE_REV}}" +ATSRC_PACKAGE_SRC=${AT_BASE}/sources/glibc-${ATSRC_PACKAGE_VER}${ATSRC_PACKAGE_REV:+-${ATSRC_PACKAGE_REV}} +ATSRC_PACKAGE_WORK=${AT_WORK_PATH}/glibc +ATSRC_PACKAGE_MAKE_CHECK= +ATSRC_PACKAGE_PORTS= +ATSRC_PACKAGE_DISTRIB=yes +ATSRC_PACKAGE_BUNDLE=main_toolchain + +atsrc_get_patches () +{ + # Only enable TLE if: + # * Supported by hardware + # * Not a setuid program + # * Environment contains GLIBC_ELISION_ENABLE=yes + at_get_patch \ + https://raw.githubusercontent.com/powertechpreview/powertechpreview/26747dc0bfb0f8f30de9ebad78847a96d3191ba5/GLIBC%20PowerPC%20Backport/2.22/0001-powerpc-Conditionally-enable-TLE.patch \ + 801c05ea780220e8b4cf931af8c86946 || return ${?} + + # TODO: Remove this patch after it's backported to glibc 2.24. + at_get_patch \ + http://pokgsa.ibm.com/home/t/u/tulioqm/web/public/patches/glibc/florian-tcmalloc-fix.patch \ + 88204e55e255fc4661da066eefe1dd1f || return ${?} +} + +atsrc_apply_patches () +{ + patch -p1 < 0001-powerpc-Conditionally-enable-TLE.patch || return ${?} + + patch -p1 < florian-tcmalloc-fix.patch || return ${?} + + return 0 +} diff --git a/configs/10.0/packages/glibc/specfile b/configs/10.0/packages/glibc/specfile new file mode 120000 index 000000000..71f3f1bcb --- /dev/null +++ b/configs/10.0/packages/glibc/specfile @@ -0,0 +1 @@ +../../../9.0/packages/glibc/specfile \ No newline at end of file diff --git a/configs/10.0/packages/glibc/stage_1 b/configs/10.0/packages/glibc/stage_1 new file mode 120000 index 000000000..a53162b5b --- /dev/null +++ b/configs/10.0/packages/glibc/stage_1 @@ -0,0 +1 @@ +../../../9.0/packages/glibc/stage_1 \ No newline at end of file diff --git a/configs/10.0/packages/glibc/stage_2 b/configs/10.0/packages/glibc/stage_2 new file mode 120000 index 000000000..c985773e8 --- /dev/null +++ b/configs/10.0/packages/glibc/stage_2 @@ -0,0 +1 @@ +../../../9.0/packages/glibc/stage_2 \ No newline at end of file diff --git a/configs/10.0/packages/glibc/stage_compat b/configs/10.0/packages/glibc/stage_compat new file mode 120000 index 000000000..a0366335e --- /dev/null +++ b/configs/10.0/packages/glibc/stage_compat @@ -0,0 +1 @@ +../../../9.0/packages/glibc/stage_compat \ No newline at end of file diff --git a/configs/10.0/packages/glibc/stage_optimized b/configs/10.0/packages/glibc/stage_optimized new file mode 120000 index 000000000..4da59e893 --- /dev/null +++ b/configs/10.0/packages/glibc/stage_optimized @@ -0,0 +1 @@ +../../../9.0/packages/glibc/stage_optimized \ No newline at end of file diff --git a/configs/10.0/packages/gmp/gmp.mk b/configs/10.0/packages/gmp/gmp.mk new file mode 120000 index 000000000..41ef67c6e --- /dev/null +++ b/configs/10.0/packages/gmp/gmp.mk @@ -0,0 +1 @@ +../../../9.0/packages/gmp/gmp.mk \ No newline at end of file diff --git a/configs/10.0/packages/gmp/sources b/configs/10.0/packages/gmp/sources new file mode 100644 index 000000000..dfed20657 --- /dev/null +++ b/configs/10.0/packages/gmp/sources @@ -0,0 +1,41 @@ +#!/usr/bin/env bash +# +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# GMP source package and build info +# ================================= +# + +ATSRC_PACKAGE_NAME="GNU Multiple Precision Library" +ATSRC_PACKAGE_VER=6.1.1 +ATSRC_PACKAGE_REV= +ATSRC_PACKAGE_LICENSE="GPL 3.0" +ATSRC_PACKAGE_DOCLINK="http://gmplib.org/manual/" +ATSRC_PACKAGE_RELFIXES= +ATSRC_PACKAGE_STR_VER="${ATSRC_PACKAGE_NAME} ${ATSRC_PACKAGE_VER}" +ATSRC_PACKAGE_PRE="test -d gmp-${ATSRC_PACKAGE_VER}" +ATSRC_PACKAGE_CO=([0]="wget -N http://ftpmirror.gnu.org/gmp/gmp-${ATSRC_PACKAGE_VER}${ATSRC_PACKAGE_REV}.tar.bz2" \ + [1]="wget -N ftp://ftp.unicamp.br/pub/gnu/gmp/gmp-${ATSRC_PACKAGE_VER}${ATSRC_PACKAGE_REV}.tar.bz2") +ATSRC_PACKAGE_POST="tar -xjf gmp-${ATSRC_PACKAGE_VER}${ATSRC_PACKAGE_REV}.tar.bz2" +ATSRC_PACKAGE_SRC=${AT_BASE}/sources/gmp-${ATSRC_PACKAGE_VER} +ATSRC_PACKAGE_WORK=${AT_WORK_PATH}/gmp +ATSRC_PACKAGE_MLS= +ATSRC_PACKAGE_ALOC= +ATSRC_PACKAGE_PATCHES= +ATSRC_PACKAGE_TARS= +ATSRC_PACKAGE_MAKE_CHECK= +ATSRC_PACKAGE_DISTRIB=yes +ATSRC_PACKAGE_BUNDLE=main_toolchain diff --git a/configs/10.0/packages/gmp/specfile b/configs/10.0/packages/gmp/specfile new file mode 120000 index 000000000..b8200f413 --- /dev/null +++ b/configs/10.0/packages/gmp/specfile @@ -0,0 +1 @@ +../../../9.0/packages/gmp/specfile \ No newline at end of file diff --git a/configs/10.0/packages/gmp/stage_1 b/configs/10.0/packages/gmp/stage_1 new file mode 120000 index 000000000..7581499b1 --- /dev/null +++ b/configs/10.0/packages/gmp/stage_1 @@ -0,0 +1 @@ +../../../9.0/packages/gmp/stage_1 \ No newline at end of file diff --git a/configs/10.0/packages/gmp/stage_2 b/configs/10.0/packages/gmp/stage_2 new file mode 120000 index 000000000..03f0d6dc1 --- /dev/null +++ b/configs/10.0/packages/gmp/stage_2 @@ -0,0 +1 @@ +../../../9.0/packages/gmp/stage_2 \ No newline at end of file diff --git a/configs/10.0/packages/golang/golang.mk b/configs/10.0/packages/golang/golang.mk new file mode 120000 index 000000000..cee9c595e --- /dev/null +++ b/configs/10.0/packages/golang/golang.mk @@ -0,0 +1 @@ +../../../9.0/packages/golang/golang.mk \ No newline at end of file diff --git a/configs/10.0/packages/golang/sources b/configs/10.0/packages/golang/sources new file mode 100644 index 000000000..2d39eb9d8 --- /dev/null +++ b/configs/10.0/packages/golang/sources @@ -0,0 +1,48 @@ +#!/usr/bin/env bash +# +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# Golang source package and build info +# ====================================== +# + +ATSRC_PACKAGE_NAME="Golang" +ATSRC_PACKAGE_VER=1.7 +ATSRC_PACKAGE_REV=80d91b80c8b0 +ATSRC_PACKAGE_LICENSE="BSD License" +ATSRC_PACKAGE_DOCLINK="http://golang.org/doc/" +ATSRC_PACKAGE_RELFIXES= +ATSRC_PACKAGE_STR_VER="${ATSRC_PACKAGE_NAME} ${ATSRC_PACKAGE_VER}${ATSRC_PACKAGE_REV:+-${ATSRC_PACKAGE_REV}}" +ATSRC_PACKAGE_PRE="test -d golang-${ATSRC_PACKAGE_VER}${ATSRC_PACKAGE_REV:+-${ATSRC_PACKAGE_REV}}" +ATSRC_PACKAGE_CO=([0]="git clone https://github.com/powertechpreview/go.git golang") +ATSRC_PACKAGE_GIT="git checkout -b golang-${ATSRC_PACKAGE_VER}${ATSRC_PACKAGE_REV:+-${ATSRC_PACKAGE_REV}} ${ATSRC_PACKAGE_REV}" +ATSRC_PACKAGE_POST="mv golang golang-${ATSRC_PACKAGE_VER}${ATSRC_PACKAGE_REV:+-${ATSRC_PACKAGE_REV}}" +ATSRC_PACKAGE_SRC="${AT_BASE}/sources/golang-${ATSRC_PACKAGE_VER}${ATSRC_PACKAGE_REV:+-${ATSRC_PACKAGE_REV}}" +ATSRC_PACKAGE_WORK=${AT_WORK_PATH}/golang +ATSRC_PACKAGE_MLS= +ATSRC_PACKAGE_ALOC= +ATSRC_PACKAGE_PATCHES= +ATSRC_PACKAGE_TARS= +ATSRC_PACKAGE_DISTRIB=no +ATSRC_PACKAGE_BUNDLE=golang + +atsrc_get_patches () +{ + # Built with Go 1.5.2 on amd64. + at_get_patch \ + http://ausgsa.ibm.com/projects/p/ppctoolchain/web/public/download/go-linux-ppc64le-bootstrap.tbz \ + 74fa545069655c854bdee70c0536dfa5 || return ${?} +} diff --git a/configs/10.0/packages/golang/specfile b/configs/10.0/packages/golang/specfile new file mode 120000 index 000000000..e1baa1566 --- /dev/null +++ b/configs/10.0/packages/golang/specfile @@ -0,0 +1 @@ +../../../9.0/packages/golang/specfile \ No newline at end of file diff --git a/configs/10.0/packages/golang/stage_1 b/configs/10.0/packages/golang/stage_1 new file mode 120000 index 000000000..25efe94aa --- /dev/null +++ b/configs/10.0/packages/golang/stage_1 @@ -0,0 +1 @@ +../../../9.0/packages/golang/stage_1 \ No newline at end of file diff --git a/configs/10.0/packages/groups b/configs/10.0/packages/groups new file mode 120000 index 000000000..91218f9fd --- /dev/null +++ b/configs/10.0/packages/groups @@ -0,0 +1 @@ +../../9.0/packages/groups \ No newline at end of file diff --git a/configs/10.0/packages/kernel/kernel.mk b/configs/10.0/packages/kernel/kernel.mk new file mode 120000 index 000000000..fdbcd3970 --- /dev/null +++ b/configs/10.0/packages/kernel/kernel.mk @@ -0,0 +1 @@ +../../../9.0/packages/kernel/kernel.mk \ No newline at end of file diff --git a/configs/10.0/packages/kernel/sources b/configs/10.0/packages/kernel/sources new file mode 120000 index 000000000..15f243244 --- /dev/null +++ b/configs/10.0/packages/kernel/sources @@ -0,0 +1 @@ +../../../9.0/packages/kernel/sources \ No newline at end of file diff --git a/configs/10.0/packages/kernel/specfile b/configs/10.0/packages/kernel/specfile new file mode 120000 index 000000000..c3fcb69ce --- /dev/null +++ b/configs/10.0/packages/kernel/specfile @@ -0,0 +1 @@ +../../../9.0/packages/kernel/specfile \ No newline at end of file diff --git a/configs/10.0/packages/kernel/stage_h b/configs/10.0/packages/kernel/stage_h new file mode 120000 index 000000000..f2b3629e1 --- /dev/null +++ b/configs/10.0/packages/kernel/stage_h @@ -0,0 +1 @@ +../../../9.0/packages/kernel/stage_h \ No newline at end of file diff --git a/configs/10.0/packages/libauxv/libauxv.mk b/configs/10.0/packages/libauxv/libauxv.mk new file mode 120000 index 000000000..096bfac08 --- /dev/null +++ b/configs/10.0/packages/libauxv/libauxv.mk @@ -0,0 +1 @@ +../../../9.0/packages/libauxv/libauxv.mk \ No newline at end of file diff --git a/configs/10.0/packages/libauxv/sources b/configs/10.0/packages/libauxv/sources new file mode 120000 index 000000000..b0460f903 --- /dev/null +++ b/configs/10.0/packages/libauxv/sources @@ -0,0 +1 @@ +../../../9.0/packages/libauxv/sources \ No newline at end of file diff --git a/configs/10.0/packages/libauxv/specfile b/configs/10.0/packages/libauxv/specfile new file mode 120000 index 000000000..f26c696d5 --- /dev/null +++ b/configs/10.0/packages/libauxv/specfile @@ -0,0 +1 @@ +../../../9.0/packages/libauxv/specfile \ No newline at end of file diff --git a/configs/10.0/packages/libauxv/stage_1 b/configs/10.0/packages/libauxv/stage_1 new file mode 120000 index 000000000..dca19d0c7 --- /dev/null +++ b/configs/10.0/packages/libauxv/stage_1 @@ -0,0 +1 @@ +../../../9.0/packages/libauxv/stage_1 \ No newline at end of file diff --git a/configs/10.0/packages/libdfp/libdfp.mk b/configs/10.0/packages/libdfp/libdfp.mk new file mode 120000 index 000000000..f3609cbd7 --- /dev/null +++ b/configs/10.0/packages/libdfp/libdfp.mk @@ -0,0 +1 @@ +../../../9.0/packages/libdfp/libdfp.mk \ No newline at end of file diff --git a/configs/10.0/packages/libdfp/sources b/configs/10.0/packages/libdfp/sources new file mode 100644 index 000000000..2df296c16 --- /dev/null +++ b/configs/10.0/packages/libdfp/sources @@ -0,0 +1,43 @@ +#!/usr/bin/env bash +# +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# LIBDFP source package and build info +# ==================================== +# + +ATSRC_PACKAGE_NAME="Decimal Floating Point C Library" +ATSRC_PACKAGE_VER=1.0.13 +ATSRC_PACKAGE_REV=62cdd3a +ATSRC_PACKAGE_LICENSE="Lesser GPL 2.1" +ATSRC_PACKAGE_DOCLINK="https://raw.github.com/libdfp/libdfp/master/README.user" +ATSRC_PACKAGE_RELFIXES= +ATSRC_PACKAGE_STR_VER="${ATSRC_PACKAGE_NAME} ${ATSRC_PACKAGE_VER}-r${ATSRC_PACKAGE_REV}" +ATSRC_PACKAGE_VERID="${ATSRC_PACKAGE_VER}${ATSRC_PACKAGE_REV:+-${ATSRC_PACKAGE_REV}}" +ATSRC_PACKAGE_PRE="test -d libdfp-${ATSRC_PACKAGE_VERID}" +ATSRC_PACKAGE_CO=([0]="wget -O libdfp-${ATSRC_PACKAGE_VERID}.tar.gz https://github.com/libdfp/libdfp/archive/${ATSRC_PACKAGE_REV}.tar.gz") +ATSRC_PACKAGE_GIT="" +# Use --transform to give a better name to Libdfp directory. +ATSRC_PACKAGE_POST="tar xzf libdfp-${ATSRC_PACKAGE_VERID}.tar.gz --transform=s/libdfp-${ATSRC_PACKAGE_REV}[^\\/]*/libdfp-${ATSRC_PACKAGE_VERID}/" +ATSRC_PACKAGE_SRC=${AT_BASE}/sources/libdfp-${ATSRC_PACKAGE_VERID} +ATSRC_PACKAGE_WORK=${AT_WORK_PATH}/libdfp +ATSRC_PACKAGE_MLS="" +ATSRC_PACKAGE_PATCHES="" +ATSRC_PACKAGE_ALOC="" +ATSRC_PACKAGE_TARS="" +ATSRC_PACKAGE_MAKE_CHECK="" +ATSRC_PACKAGE_DISTRIB=yes +ATSRC_PACKAGE_BUNDLE=toolchain_extra diff --git a/configs/10.0/packages/libdfp/specfile b/configs/10.0/packages/libdfp/specfile new file mode 120000 index 000000000..87cd1691d --- /dev/null +++ b/configs/10.0/packages/libdfp/specfile @@ -0,0 +1 @@ +../../../9.0/packages/libdfp/specfile \ No newline at end of file diff --git a/configs/10.0/packages/libdfp/stage_1 b/configs/10.0/packages/libdfp/stage_1 new file mode 120000 index 000000000..22de7d9f4 --- /dev/null +++ b/configs/10.0/packages/libdfp/stage_1 @@ -0,0 +1 @@ +../../../9.0/packages/libdfp/stage_1 \ No newline at end of file diff --git a/configs/10.0/packages/libdfp/stage_optimized b/configs/10.0/packages/libdfp/stage_optimized new file mode 120000 index 000000000..3e937bc02 --- /dev/null +++ b/configs/10.0/packages/libdfp/stage_optimized @@ -0,0 +1 @@ +../../../9.0/packages/libdfp/stage_optimized \ No newline at end of file diff --git a/configs/10.0/packages/libhugetlbfs/libhugetlbfs.mk b/configs/10.0/packages/libhugetlbfs/libhugetlbfs.mk new file mode 120000 index 000000000..e52e2fcd0 --- /dev/null +++ b/configs/10.0/packages/libhugetlbfs/libhugetlbfs.mk @@ -0,0 +1 @@ +../../../9.0/packages/libhugetlbfs/libhugetlbfs.mk \ No newline at end of file diff --git a/configs/10.0/packages/libhugetlbfs/sources b/configs/10.0/packages/libhugetlbfs/sources new file mode 100644 index 000000000..01900e108 --- /dev/null +++ b/configs/10.0/packages/libhugetlbfs/sources @@ -0,0 +1,40 @@ +#!/usr/bin/env bash +# +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# Libhugetlbfs source package and build info +# ========================================== +# +ATSRC_PACKAGE_NAME="Libhugetlbfs" +ATSRC_PACKAGE_VER=2.20 +ATSRC_PACKAGE_REV=e441800 +ATSRC_PACKAGE_LICENSE="Lesser GPL 2.1" +ATSRC_PACKAGE_DOCLINK="https://github.com/libhugetlbfs/libhugetlbfs" +ATSRC_PACKAGE_RELFIXES= +ATSRC_PACKAGE_STR_VER="${ATSRC_PACKAGE_NAME} ${ATSRC_PACKAGE_VER}-${ATSRC_PACKAGE_REV}" +ATSRC_PACKAGE_PRE="test -d libhugetlbfs-${ATSRC_PACKAGE_VER}.${ATSRC_PACKAGE_REV}" +ATSRC_PACKAGE_CO=([0]="git clone https://github.com/libhugetlbfs/libhugetlbfs.git libhugetlbfs") +ATSRC_PACKAGE_GIT="git checkout -b libhugetlbfs-${ATSRC_PACKAGE_VER}-${ATSRC_PACKAGE_REV} ${ATSRC_PACKAGE_REV}" +ATSRC_PACKAGE_POST="mv libhugetlbfs libhugetlbfs-${ATSRC_PACKAGE_VER}.${ATSRC_PACKAGE_REV}" +ATSRC_PACKAGE_SRC="${AT_BASE}/sources/libhugetlbfs-${ATSRC_PACKAGE_VER}.${ATSRC_PACKAGE_REV}" +ATSRC_PACKAGE_WORK=${AT_WORK_PATH}/libhugetlbfs +ATSRC_PACKAGE_MLS="" +ATSRC_PACKAGE_ALOC="" +ATSRC_PACKAGE_PATCHES="" +ATSRC_PACKAGE_TARS="" +ATSRC_PACKAGE_MAKE_CHECK= +ATSRC_PACKAGE_DISTRIB=yes +ATSRC_PACKAGE_BUNDLE=toolchain_extra diff --git a/configs/10.0/packages/libhugetlbfs/specfile b/configs/10.0/packages/libhugetlbfs/specfile new file mode 120000 index 000000000..5de5622cd --- /dev/null +++ b/configs/10.0/packages/libhugetlbfs/specfile @@ -0,0 +1 @@ +../../../9.0/packages/libhugetlbfs/specfile \ No newline at end of file diff --git a/configs/10.0/packages/libhugetlbfs/stage_1 b/configs/10.0/packages/libhugetlbfs/stage_1 new file mode 120000 index 000000000..c68444df0 --- /dev/null +++ b/configs/10.0/packages/libhugetlbfs/stage_1 @@ -0,0 +1 @@ +../../../9.0/packages/libhugetlbfs/stage_1 \ No newline at end of file diff --git a/configs/10.0/packages/libpfm/libpfm.mk b/configs/10.0/packages/libpfm/libpfm.mk new file mode 120000 index 000000000..288032412 --- /dev/null +++ b/configs/10.0/packages/libpfm/libpfm.mk @@ -0,0 +1 @@ +../../../9.0/packages/libpfm/libpfm.mk \ No newline at end of file diff --git a/configs/10.0/packages/libpfm/sources b/configs/10.0/packages/libpfm/sources new file mode 100644 index 000000000..72684cf1c --- /dev/null +++ b/configs/10.0/packages/libpfm/sources @@ -0,0 +1,40 @@ +#!/usr/bin/env bash +# +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# Libpfm source package and build info +# ==================================== +# + +ATSRC_PACKAGE_NAME="Libpfm" +ATSRC_PACKAGE_VER=4.7.1 +ATSRC_PACKAGE_REV=ebb8be7 +ATSRC_PACKAGE_LICENSE="MIT" +ATSRC_PACKAGE_DOCLINK="http://perfmon2.sourceforge.net/docs_v4.html" +ATSRC_PACKAGE_RELFIXES= +ATSRC_PACKAGE_STR_VER="${ATSRC_PACKAGE_NAME} ${ATSRC_PACKAGE_VER}${ATSRC_PACKAGE_REV:+-${ATSRC_PACKAGE_REV}}" +ATSRC_PACKAGE_PRE="test -d libpfm-${ATSRC_PACKAGE_VER}${ATSRC_PACKAGE_REV:+-${ATSRC_PACKAGE_REV}}" +ATSRC_PACKAGE_CO=([0]="git archive --prefix=libpfm-${ATSRC_PACKAGE_VER}${ATSRC_PACKAGE_REV:+-${ATSRC_PACKAGE_REV}}/ --remote=git://git.code.sf.net/p/perfmon2/libpfm4 ${ATSRC_PACKAGE_REV} > libpfm-${ATSRC_PACKAGE_VER}${ATSRC_PACKAGE_REV:+-${ATSRC_PACKAGE_REV}}.tar") +ATSRC_PACKAGE_POST="tar -xf libpfm-${ATSRC_PACKAGE_VER}${ATSRC_PACKAGE_REV:+-${ATSRC_PACKAGE_REV}}.tar" +ATSRC_PACKAGE_SRC="${AT_BASE}/sources/libpfm-${ATSRC_PACKAGE_VER}${ATSRC_PACKAGE_REV:+-${ATSRC_PACKAGE_REV}}" +ATSRC_PACKAGE_WORK=${AT_WORK_PATH}/libpfm +ATSRC_PACKAGE_MLS= +ATSRC_PACKAGE_ALOC= +ATSRC_PACKAGE_PATCHES= +ATSRC_PACKAGE_TARS= +ATSRC_PACKAGE_MAKE_CHECK= +ATSRC_PACKAGE_DISTRIB=no +ATSRC_PACKAGE_BUNDLE=profile diff --git a/configs/10.0/packages/libpfm/specfile b/configs/10.0/packages/libpfm/specfile new file mode 120000 index 000000000..4df92102c --- /dev/null +++ b/configs/10.0/packages/libpfm/specfile @@ -0,0 +1 @@ +../../../9.0/packages/libpfm/specfile \ No newline at end of file diff --git a/configs/10.0/packages/libpfm/stage_1 b/configs/10.0/packages/libpfm/stage_1 new file mode 120000 index 000000000..ef0ff8784 --- /dev/null +++ b/configs/10.0/packages/libpfm/stage_1 @@ -0,0 +1 @@ +../../../9.0/packages/libpfm/stage_1 \ No newline at end of file diff --git a/configs/10.0/packages/libsphde/libsphde.mk b/configs/10.0/packages/libsphde/libsphde.mk new file mode 120000 index 000000000..4b300568b --- /dev/null +++ b/configs/10.0/packages/libsphde/libsphde.mk @@ -0,0 +1 @@ +../../../9.0/packages/libsphde/libsphde.mk \ No newline at end of file diff --git a/configs/10.0/packages/libsphde/sources b/configs/10.0/packages/libsphde/sources new file mode 100644 index 000000000..0724b02af --- /dev/null +++ b/configs/10.0/packages/libsphde/sources @@ -0,0 +1,43 @@ +#!/usr/bin/env bash +# +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# SPHDE source package and build info +# ================================== +# + +ATSRC_PACKAGE_NAME="SPHDE" +ATSRC_PACKAGE_VER=1.4.0 +ATSRC_PACKAGE_REV=23f745a38d3c +ATSRC_PACKAGE_LICENSE="Eclipse Public License 1.0" +ATSRC_PACKAGE_DOCLINK="http://sphde.github.io/sphde/" +ATSRC_PACKAGE_RELFIXES= +ATSRC_PACKAGE_STR_VER="${ATSRC_PACKAGE_NAME} ${ATSRC_PACKAGE_VER}-${ATSRC_PACKAGE_REV}" +ATSRC_PACKAGE_VERID="${ATSRC_PACKAGE_VER}${ATSRC_PACKAGE_REV:+-${ATSRC_PACKAGE_REV}}" +ATSRC_PACKAGE_PRE="test -d sphde-${ATSRC_PACKAGE_VERID}" +ATSRC_PACKAGE_CO=([0]="wget -O sphde-${ATSRC_PACKAGE_VERID}.tar.gz https://github.com/sphde/sphde/archive/${ATSRC_PACKAGE_REV}.tar.gz") +ATSRC_PACKAGE_GIT="" +# Use --transform to give a better name to SPHDE directory. +ATSRC_PACKAGE_POST="tar xzf sphde-${ATSRC_PACKAGE_VERID}.tar.gz --transform=s/sphde-${ATSRC_PACKAGE_REV}[^\\/]*/sphde-${ATSRC_PACKAGE_VERID}/" +ATSRC_PACKAGE_SRC="${AT_BASE}/sources/sphde-${ATSRC_PACKAGE_VERID}" +ATSRC_PACKAGE_WORK=${AT_WORK_PATH}/sphde +ATSRC_PACKAGE_MLS= +ATSRC_PACKAGE_ALOC= +ATSRC_PACKAGE_PATCHES= +ATSRC_PACKAGE_TARS= +ATSRC_PACKAGE_MAKE_CHECK= +ATSRC_PACKAGE_DISTRIB=no +ATSRC_PACKAGE_BUNDLE=mcore-libs diff --git a/configs/10.0/packages/libsphde/specfile b/configs/10.0/packages/libsphde/specfile new file mode 120000 index 000000000..6ca4db75d --- /dev/null +++ b/configs/10.0/packages/libsphde/specfile @@ -0,0 +1 @@ +../../../9.0/packages/libsphde/specfile \ No newline at end of file diff --git a/configs/10.0/packages/libsphde/stage_1 b/configs/10.0/packages/libsphde/stage_1 new file mode 120000 index 000000000..203b9cbfb --- /dev/null +++ b/configs/10.0/packages/libsphde/stage_1 @@ -0,0 +1 @@ +../../../9.0/packages/libsphde/stage_1 \ No newline at end of file diff --git a/configs/10.0/packages/liburcu/liburcu.mk b/configs/10.0/packages/liburcu/liburcu.mk new file mode 120000 index 000000000..f40207c70 --- /dev/null +++ b/configs/10.0/packages/liburcu/liburcu.mk @@ -0,0 +1 @@ +../../../9.0/packages/liburcu/liburcu.mk \ No newline at end of file diff --git a/configs/10.0/packages/liburcu/sources b/configs/10.0/packages/liburcu/sources new file mode 100644 index 000000000..66b7097ae --- /dev/null +++ b/configs/10.0/packages/liburcu/sources @@ -0,0 +1,47 @@ +#!/usr/bin/env bash +# +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# URCU source package and build info +# ================================== +# + +ATSRC_PACKAGE_NAME="Userspace RCU" +ATSRC_PACKAGE_VER=0.9.2 +ATSRC_PACKAGE_LICENSE="Lesser GPL 2.1" +ATSRC_PACKAGE_DOCLINK="http://lttng.org/urcu" +ATSRC_PACKAGE_RELFIXES= +ATSRC_PACKAGE_STR_VER="${ATSRC_PACKAGE_NAME} ${ATSRC_PACKAGE_VER}" +ATSRC_PACKAGE_PRE="test -d userspace-rcu-${ATSRC_PACKAGE_VER}" +ATSRC_PACKAGE_CO=([0]="wget -N http://lttng.org/files/urcu/userspace-rcu-${ATSRC_PACKAGE_VER}.tar.bz2") +ATSRC_PACKAGE_POST="tar -xjf userspace-rcu-${ATSRC_PACKAGE_VER}.tar.bz2" +ATSRC_PACKAGE_SRC="${AT_BASE}/sources/userspace-rcu-${ATSRC_PACKAGE_VER}" +ATSRC_PACKAGE_WORK=${AT_WORK_PATH}/userspace-rcu +ATSRC_PACKAGE_MAKE_CHECK="" +ATSRC_PACKAGE_DISTRIB=yes +ATSRC_PACKAGE_BUNDLE=mcore-libs + +atsrc_get_patches () +{ + at_get_patch \ + https://raw.githubusercontent.com/powertechpreview/powertechpreview/26747dc0bfb0f8f30de9ebad78847a96d3191ba5/URCU%20Patches/userspace-rcu-0.9.2-ppc64le.patch \ + d227fca038c60e39c9fcfaa66a5d12a2 || return ${?} +} + +atsrc_apply_patches () +{ + patch -p1 < userspace-rcu-0.9.2-ppc64le.patch || return ${?} +} diff --git a/configs/10.0/packages/liburcu/specfile b/configs/10.0/packages/liburcu/specfile new file mode 120000 index 000000000..3a150e648 --- /dev/null +++ b/configs/10.0/packages/liburcu/specfile @@ -0,0 +1 @@ +../../../9.0/packages/liburcu/specfile \ No newline at end of file diff --git a/configs/10.0/packages/liburcu/stage_1 b/configs/10.0/packages/liburcu/stage_1 new file mode 120000 index 000000000..7865b2465 --- /dev/null +++ b/configs/10.0/packages/liburcu/stage_1 @@ -0,0 +1 @@ +../../../9.0/packages/liburcu/stage_1 \ No newline at end of file diff --git a/configs/10.0/packages/libvecpf/libvecpf.mk b/configs/10.0/packages/libvecpf/libvecpf.mk new file mode 120000 index 000000000..592cf747e --- /dev/null +++ b/configs/10.0/packages/libvecpf/libvecpf.mk @@ -0,0 +1 @@ +../../../9.0/packages/libvecpf/libvecpf.mk \ No newline at end of file diff --git a/configs/10.0/packages/libvecpf/sources b/configs/10.0/packages/libvecpf/sources new file mode 120000 index 000000000..58a261f07 --- /dev/null +++ b/configs/10.0/packages/libvecpf/sources @@ -0,0 +1 @@ +../../../9.0/packages/libvecpf/sources \ No newline at end of file diff --git a/configs/10.0/packages/libvecpf/specfile b/configs/10.0/packages/libvecpf/specfile new file mode 120000 index 000000000..0ea427798 --- /dev/null +++ b/configs/10.0/packages/libvecpf/specfile @@ -0,0 +1 @@ +../../../9.0/packages/libvecpf/specfile \ No newline at end of file diff --git a/configs/10.0/packages/libvecpf/stage_1 b/configs/10.0/packages/libvecpf/stage_1 new file mode 120000 index 000000000..0fd94338f --- /dev/null +++ b/configs/10.0/packages/libvecpf/stage_1 @@ -0,0 +1 @@ +../../../9.0/packages/libvecpf/stage_1 \ No newline at end of file diff --git a/configs/10.0/packages/mpc/mpc.mk b/configs/10.0/packages/mpc/mpc.mk new file mode 120000 index 000000000..9fe0acc60 --- /dev/null +++ b/configs/10.0/packages/mpc/mpc.mk @@ -0,0 +1 @@ +../../../9.0/packages/mpc/mpc.mk \ No newline at end of file diff --git a/configs/10.0/packages/mpc/sources b/configs/10.0/packages/mpc/sources new file mode 120000 index 000000000..46d33ace2 --- /dev/null +++ b/configs/10.0/packages/mpc/sources @@ -0,0 +1 @@ +../../../9.0/packages/mpc/sources \ No newline at end of file diff --git a/configs/10.0/packages/mpc/specfile b/configs/10.0/packages/mpc/specfile new file mode 120000 index 000000000..2cb85fe23 --- /dev/null +++ b/configs/10.0/packages/mpc/specfile @@ -0,0 +1 @@ +../../../9.0/packages/mpc/specfile \ No newline at end of file diff --git a/configs/10.0/packages/mpc/stage_1 b/configs/10.0/packages/mpc/stage_1 new file mode 120000 index 000000000..cb40affad --- /dev/null +++ b/configs/10.0/packages/mpc/stage_1 @@ -0,0 +1 @@ +../../../9.0/packages/mpc/stage_1 \ No newline at end of file diff --git a/configs/10.0/packages/mpc/stage_2 b/configs/10.0/packages/mpc/stage_2 new file mode 120000 index 000000000..215a3aea7 --- /dev/null +++ b/configs/10.0/packages/mpc/stage_2 @@ -0,0 +1 @@ +../../../9.0/packages/mpc/stage_2 \ No newline at end of file diff --git a/configs/10.0/packages/mpfr/mpfr.mk b/configs/10.0/packages/mpfr/mpfr.mk new file mode 120000 index 000000000..b3926fd2f --- /dev/null +++ b/configs/10.0/packages/mpfr/mpfr.mk @@ -0,0 +1 @@ +../../../9.0/packages/mpfr/mpfr.mk \ No newline at end of file diff --git a/configs/10.0/packages/mpfr/sources b/configs/10.0/packages/mpfr/sources new file mode 100644 index 000000000..b429ac88d --- /dev/null +++ b/configs/10.0/packages/mpfr/sources @@ -0,0 +1,41 @@ +#!/usr/bin/env bash +# +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# MPFR source package and build info +# ================================== +# + +ATSRC_PACKAGE_NAME="GNU MPFR Library" +ATSRC_PACKAGE_VER=3.1.4 +ATSRC_PACKAGE_REV=10201 +ATSRC_PACKAGE_LICENSE="GPL 3.0" +ATSRC_PACKAGE_DOCLINK="http://www.mpfr.org/mpfr-current/mpfr.html" +ATSRC_PACKAGE_RELFIXES= +ATSRC_PACKAGE_VERREV=${ATSRC_PACKAGE_VER}${ATSRC_PACKAGE_REV:+-${ATSRC_PACKAGE_REV}} +ATSRC_PACKAGE_STR_VER="${ATSRC_PACKAGE_NAME} ${ATSRC_PACKAGE_VERREV}" +ATSRC_PACKAGE_PRE="test -d mpfr-${ATSRC_PACKAGE_VERREV}" +ATSRC_PACKAGE_CO=([0]="svn co --revision ${ATSRC_PACKAGE_REV} svn://scm.gforge.inria.fr/svn/mpfr/branches/${ATSRC_PACKAGE_VER%.*} mpfr-${ATSRC_PACKAGE_VERREV}") +ATSRC_PACKAGE_POST="" +ATSRC_PACKAGE_SRC=${AT_BASE}/sources/mpfr-${ATSRC_PACKAGE_VERREV} +ATSRC_PACKAGE_WORK=${AT_WORK_PATH}/mpfr +ATSRC_PACKAGE_MLS= +ATSRC_PACKAGE_ALOC= +ATSRC_PACKAGE_PATCHES= +ATSRC_PACKAGE_TARS= +ATSRC_PACKAGE_MAKE_CHECK= +ATSRC_PACKAGE_DISTRIB=yes +ATSRC_PACKAGE_BUNDLE=main_toolchain diff --git a/configs/10.0/packages/mpfr/specfile b/configs/10.0/packages/mpfr/specfile new file mode 120000 index 000000000..ed03fbff7 --- /dev/null +++ b/configs/10.0/packages/mpfr/specfile @@ -0,0 +1 @@ +../../../9.0/packages/mpfr/specfile \ No newline at end of file diff --git a/configs/10.0/packages/mpfr/stage_1 b/configs/10.0/packages/mpfr/stage_1 new file mode 120000 index 000000000..d7af64e12 --- /dev/null +++ b/configs/10.0/packages/mpfr/stage_1 @@ -0,0 +1 @@ +../../../9.0/packages/mpfr/stage_1 \ No newline at end of file diff --git a/configs/10.0/packages/mpfr/stage_2 b/configs/10.0/packages/mpfr/stage_2 new file mode 120000 index 000000000..62f8da03b --- /dev/null +++ b/configs/10.0/packages/mpfr/stage_2 @@ -0,0 +1 @@ +../../../9.0/packages/mpfr/stage_2 \ No newline at end of file diff --git a/configs/10.0/packages/openssl/openssl.mk b/configs/10.0/packages/openssl/openssl.mk new file mode 120000 index 000000000..0bb3680c7 --- /dev/null +++ b/configs/10.0/packages/openssl/openssl.mk @@ -0,0 +1 @@ +../../../9.0/packages/openssl/openssl.mk \ No newline at end of file diff --git a/configs/10.0/packages/openssl/sources b/configs/10.0/packages/openssl/sources new file mode 120000 index 000000000..c28411bc5 --- /dev/null +++ b/configs/10.0/packages/openssl/sources @@ -0,0 +1 @@ +../../../9.0/packages/openssl/sources \ No newline at end of file diff --git a/configs/10.0/packages/openssl/specfile b/configs/10.0/packages/openssl/specfile new file mode 120000 index 000000000..f15dd03a5 --- /dev/null +++ b/configs/10.0/packages/openssl/specfile @@ -0,0 +1 @@ +../../../9.0/packages/openssl/specfile \ No newline at end of file diff --git a/configs/10.0/packages/openssl/stage_1 b/configs/10.0/packages/openssl/stage_1 new file mode 120000 index 000000000..827d2ee48 --- /dev/null +++ b/configs/10.0/packages/openssl/stage_1 @@ -0,0 +1 @@ +../../../9.0/packages/openssl/stage_1 \ No newline at end of file diff --git a/configs/10.0/packages/openssl/stage_optimized b/configs/10.0/packages/openssl/stage_optimized new file mode 120000 index 000000000..085c2334d --- /dev/null +++ b/configs/10.0/packages/openssl/stage_optimized @@ -0,0 +1 @@ +../../../9.0/packages/openssl/stage_optimized \ No newline at end of file diff --git a/configs/10.0/packages/oprofile/oprofile.mk b/configs/10.0/packages/oprofile/oprofile.mk new file mode 120000 index 000000000..2050d9ac0 --- /dev/null +++ b/configs/10.0/packages/oprofile/oprofile.mk @@ -0,0 +1 @@ +../../../9.0/packages/oprofile/oprofile.mk \ No newline at end of file diff --git a/configs/10.0/packages/oprofile/sources b/configs/10.0/packages/oprofile/sources new file mode 100644 index 000000000..a1c26b259 --- /dev/null +++ b/configs/10.0/packages/oprofile/sources @@ -0,0 +1,41 @@ +#!/usr/bin/env bash +# +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# oProfile source package and build info +# ====================================== +# +ATSRC_PACKAGE_NAME="OProfile" +ATSRC_PACKAGE_VER=1.1.0 +ATSRC_PACKAGE_REV=6b4aaf9a6c8 +ATSRC_PACKAGE_LICENSE="GPL 2.0" +ATSRC_PACKAGE_DOCLINK="http://oprofile.sourceforge.net/docs/" +ATSRC_PACKAGE_RELFIXES= +ATSRC_PACKAGE_NAMESUFFIX="with Java Support" +ATSRC_PACKAGE_STR_VER="${ATSRC_PACKAGE_NAME} ${ATSRC_PACKAGE_VER}${ATSRC_PACKAGE_REV:+-${ATSRC_PACKAGE_REV}}" +ATSRC_PACKAGE_PRE="test -d oprofile-${ATSRC_PACKAGE_VER}${ATSRC_PACKAGE_REV:+-${ATSRC_PACKAGE_REV}}" +ATSRC_PACKAGE_CO=([0]="git archive --prefix=oprofile-${ATSRC_PACKAGE_VER}${ATSRC_PACKAGE_REV:+-${ATSRC_PACKAGE_REV}}/ --remote=git://git.code.sf.net/p/oprofile/oprofile ${ATSRC_PACKAGE_REV} > oprofile-${ATSRC_PACKAGE_VER}${ATSRC_PACKAGE_REV:+-${ATSRC_PACKAGE_REV}}.tar") +ATSRC_PACKAGE_GIT= +ATSRC_PACKAGE_POST="tar -xf oprofile-${ATSRC_PACKAGE_VER}${ATSRC_PACKAGE_REV:+-${ATSRC_PACKAGE_REV}}.tar" +ATSRC_PACKAGE_SRC="${AT_BASE}/sources/oprofile-${ATSRC_PACKAGE_VER}${ATSRC_PACKAGE_REV:+-${ATSRC_PACKAGE_REV}}" +ATSRC_PACKAGE_WORK=${AT_WORK_PATH}/oprofile +ATSRC_PACKAGE_ALOC= +ATSRC_PACKAGE_MLS= +ATSRC_PACKAGE_PATCHES= +ATSRC_PACKAGE_TARS= +ATSRC_PACKAGE_MAKE_CHECK= +ATSRC_PACKAGE_DISTRIB=yes +ATSRC_PACKAGE_BUNDLE=profile diff --git a/configs/10.0/packages/oprofile/specfile b/configs/10.0/packages/oprofile/specfile new file mode 120000 index 000000000..495fd8ed6 --- /dev/null +++ b/configs/10.0/packages/oprofile/specfile @@ -0,0 +1 @@ +../../../9.0/packages/oprofile/specfile \ No newline at end of file diff --git a/configs/10.0/packages/oprofile/stage_1 b/configs/10.0/packages/oprofile/stage_1 new file mode 120000 index 000000000..deb896a2b --- /dev/null +++ b/configs/10.0/packages/oprofile/stage_1 @@ -0,0 +1 @@ +../../../9.0/packages/oprofile/stage_1 \ No newline at end of file diff --git a/configs/10.0/packages/paflib/paflib.mk b/configs/10.0/packages/paflib/paflib.mk new file mode 120000 index 000000000..122585b63 --- /dev/null +++ b/configs/10.0/packages/paflib/paflib.mk @@ -0,0 +1 @@ +../../../9.0/packages/paflib/paflib.mk \ No newline at end of file diff --git a/configs/10.0/packages/paflib/sources b/configs/10.0/packages/paflib/sources new file mode 100644 index 000000000..f3b6b1a1e --- /dev/null +++ b/configs/10.0/packages/paflib/sources @@ -0,0 +1,43 @@ +#!/usr/bin/env bash +# +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# PAFlib source package and build info +# ==================================== +# + +ATSRC_PACKAGE_NAME="IBM Power Architecture Facilities Library" +ATSRC_PACKAGE_VER=0.3.0 +ATSRC_PACKAGE_REV=5ee1c36 +ATSRC_PACKAGE_LICENSE="MIT License" +ATSRC_PACKAGE_DOCLINK="https://github.com/paflib/paflib/wiki/" +ATSRC_PACKAGE_RELFIXES= +ATSRC_PACKAGE_STR_VER="${ATSRC_PACKAGE_NAME} ${ATSRC_PACKAGE_VER}${ATSRC_PACKAGE_REV:+-${ATSRC_PACKAGE_REV}}" +ATSRC_PACKAGE_VERID="${ATSRC_PACKAGE_VER}${ATSRC_PACKAGE_REV:+-${ATSRC_PACKAGE_REV}}" +ATSRC_PACKAGE_PRE="test -d paflib-${ATSRC_PACKAGE_VERID}" +ATSRC_PACKAGE_CO=([0]="wget -O paflib-${ATSRC_PACKAGE_VERID}.tar.gz https://github.com/paflib/paflib/archive/${ATSRC_PACKAGE_REV}.tar.gz") +ATSRC_PACKAGE_GIT="" +# Use --transform to give a better name to PAFLib directory. +ATSRC_PACKAGE_POST="tar xzf paflib-${ATSRC_PACKAGE_VERID}.tar.gz --transform=s/paflib-${ATSRC_PACKAGE_REV}[^\\/]*/paflib-${ATSRC_PACKAGE_VERID}/" +ATSRC_PACKAGE_SRC=${AT_BASE}/sources/paflib-${ATSRC_PACKAGE_VERID} +ATSRC_PACKAGE_WORK=${AT_WORK_PATH}/paflib +ATSRC_PACKAGE_MLS= +ATSRC_PACKAGE_ALOC= +ATSRC_PACKAGE_PATCHES= +ATSRC_PACKAGE_TARS= +ATSRC_PACKAGE_MAKE_CHECK= +ATSRC_PACKAGE_DISTRIB=no +ATSRC_PACKAGE_BUNDLE=toolchain_extra diff --git a/configs/10.0/packages/paflib/specfile b/configs/10.0/packages/paflib/specfile new file mode 120000 index 000000000..e74ed9941 --- /dev/null +++ b/configs/10.0/packages/paflib/specfile @@ -0,0 +1 @@ +../../../9.0/packages/paflib/specfile \ No newline at end of file diff --git a/configs/10.0/packages/paflib/stage_1 b/configs/10.0/packages/paflib/stage_1 new file mode 120000 index 000000000..e6ff7b071 --- /dev/null +++ b/configs/10.0/packages/paflib/stage_1 @@ -0,0 +1 @@ +../../../9.0/packages/paflib/stage_1 \ No newline at end of file diff --git a/configs/10.0/packages/python/python.mk b/configs/10.0/packages/python/python.mk new file mode 120000 index 000000000..e26773a0f --- /dev/null +++ b/configs/10.0/packages/python/python.mk @@ -0,0 +1 @@ +../../../9.0/packages/python/python.mk \ No newline at end of file diff --git a/configs/10.0/packages/python/sources b/configs/10.0/packages/python/sources new file mode 100644 index 000000000..9b340e432 --- /dev/null +++ b/configs/10.0/packages/python/sources @@ -0,0 +1,76 @@ +#!/usr/bin/env bash +# +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# GLIBC source package and build info +# =================================== +# + +ATSRC_PACKAGE_NAME="Python" +ATSRC_PACKAGE_VER=3.5.1 +ATSRC_PACKAGE_LICENSE="Python Software Foundation License 2" +ATSRC_PACKAGE_DOCLINK="http://docs.python.org/release/3.4/" +ATSRC_PACKAGE_RELFIXES= +ATSRC_PACKAGE_STR_VER="${ATSRC_PACKAGE_NAME} ${ATSRC_PACKAGE_VER}" +ATSRC_PACKAGE_PRE="test -d Python-${ATSRC_PACKAGE_VER}" +ATSRC_PACKAGE_CO=([0]="wget -N --no-check-certificate http://www.python.org/ftp/python/${ATSRC_PACKAGE_VER}/Python-${ATSRC_PACKAGE_VER}.tgz") +ATSRC_PACKAGE_POST="tar -zxf Python-${ATSRC_PACKAGE_VER}.tgz" +ATSRC_PACKAGE_SRC=${AT_BASE}/sources/Python-${ATSRC_PACKAGE_VER} +ATSRC_PACKAGE_WORK=${AT_WORK_PATH}/python +ATSRC_PACKAGE_MLS= +ATSRC_PACKAGE_PATCHES= +ATSRC_PACKAGE_ALOC= +ATSRC_PACKAGE_TARS= +ATSRC_PACKAGE_MAKE_CHECK= +ATSRC_PACKAGE_DISTRIB=no +ATSRC_PACKAGE_BUNDLE=toolchain_extra + +atsrc_get_patches () +{ + at_get_patch \ + https://raw.githubusercontent.com/powertechpreview/powertechpreview/26747dc0bfb0f8f30de9ebad78847a96d3191ba5/Python%20Fixes/python-3.5.1-getlib64s1.patch \ + 15ffa7f1c39763b7bf3cca0fd70bf421 || return ${?} + + at_get_patch \ + https://raw.githubusercontent.com/powertechpreview/powertechpreview/26747dc0bfb0f8f30de9ebad78847a96d3191ba5/Python%20Fixes/python-3.5.1-fix_stack_overflow.patch \ + 5238ce9ddef9e3b2b4084f38dc4a5e45 || return ${?} + + at_get_patch_and_trim \ + https://hg.python.org/cpython/raw-rev/10dad6da1b28 \ + python-3.5.1-fix_integer_overflow.patch 37 \ + d88bc498669a73f70b9aaa18307485c8 || return ${?} +} + +atsrc_apply_patches () +{ + patch -p1 < python-3.5.1-getlib64s1.patch || return ${?} + patch -p1 < python-3.5.1-fix_stack_overflow.patch || return ${?} + patch -p1 < python-3.5.1-fix_integer_overflow.patch || return ${?} +} + +atsrc_package_verify_make_log () +{ + if [[ -n "${1}" ]]; then + modline=$(cat "${1}" | awk '/Logging the following command/ { line = ""; getline ts; } \ + /Failed to build these modules:/ { getline line; } \ + END { print line; }') + if [[ "${modline}" != "" ]]; then + echo "Python modules not built: ${modline}" + return 1 + fi + fi + return 0 +} diff --git a/configs/10.0/packages/python/specfile b/configs/10.0/packages/python/specfile new file mode 120000 index 000000000..3193e03de --- /dev/null +++ b/configs/10.0/packages/python/specfile @@ -0,0 +1 @@ +../../../9.0/packages/python/specfile \ No newline at end of file diff --git a/configs/10.0/packages/python/stage_1 b/configs/10.0/packages/python/stage_1 new file mode 120000 index 000000000..c5626c3ff --- /dev/null +++ b/configs/10.0/packages/python/stage_1 @@ -0,0 +1 @@ +../../../9.0/packages/python/stage_1 \ No newline at end of file diff --git a/configs/10.0/packages/tbb/sources b/configs/10.0/packages/tbb/sources new file mode 100644 index 000000000..10ce6caab --- /dev/null +++ b/configs/10.0/packages/tbb/sources @@ -0,0 +1,71 @@ +#!/usr/bin/env bash +# +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# TBB source package and build info +# ======================================= +# + +ATSRC_PACKAGE_NAME="Thread Building Blocks" +ATSRC_PACKAGE_VER=4.4u5 +ATSRC_PACKAGE_REV=20160526 +ATSRC_PACKAGE_LICENSE="GPL 2.0" +ATSRC_PACKAGE_DOCLINK="https://www.threadingbuildingblocks.org/documentation" +ATSRC_PACKAGE_RELFIXES= +ATSRC_PACKAGE_STR_VER="${ATSRC_PACKAGE_NAME} ${ATSRC_PACKAGE_VER}-${ATSRC_PACKAGE_REV}" +ATSRC_PACKAGE_VERID="44_${ATSRC_PACKAGE_REV}oss" +ATSRC_PACKAGE_PRE="test -d tbb${ATSRC_PACKAGE_VERID}" +ATSRC_PACKAGE_CO=([0]="wget -N --no-check-certificate https://www.threadingbuildingblocks.org/sites/default/files/software_releases/source/tbb${ATSRC_PACKAGE_VERID}_src_0.tgz") +ATSRC_PACKAGE_GIT= +ATSRC_PACKAGE_POST="tar xzf tbb${ATSRC_PACKAGE_VERID}_src_0.tgz" +ATSRC_PACKAGE_SRC=${AT_BASE}/sources/tbb${ATSRC_PACKAGE_VERID} +ATSRC_PACKAGE_WORK=${AT_WORK_PATH}/tbb +ATSRC_PACKAGE_MLS="" +ATSRC_PACKAGE_ALOC="" +ATSRC_PACKAGE_PATCHES="" +ATSRC_PACKAGE_TARS="" +# Disable make check testing due to failures +ATSRC_PACKAGE_MAKE_CHECK=none +ATSRC_PACKAGE_DISTRIB=yes +ATSRC_PACKAGE_BUNDLE=mcore-libs + +# This is a package function to verify the make_check log. +# In some cases 'make check' will return 0 even though the log shows that +# there some failures did occur. Define this function for +# packages where that has happened. Due to differences in the implementations +# of 'make check' or 'make test' the strings that indicate failure could +# be different. + +atsrc_package_verify_make_check_log () +{ + if [[ -n "${1}" ]]; then + grep -i "error[: ]" "${1}" > /dev/null + return ${?} + fi +} + +atsrc_get_patches () +{ + at_get_patch \ + https://github.com/powertechpreview/powertechpreview/raw/42cfbcf3d4a2fb7f9216069397df0dff9fc0f651/TBB%20PowerPC%20Patches/4.3/ppc64-tbb-4.3-fix.tgz \ + 11708da1a42542608a345c8f0b71dfc6 || return ${?} +} + +atsrc_apply_patches () +{ + tar xzf ppc64-tbb-4.3-fix.tgz || return ${?} + patch -p1 < inteltbb_set_compiler.patch || return ${?} +} diff --git a/configs/10.0/packages/tbb/specfile b/configs/10.0/packages/tbb/specfile new file mode 120000 index 000000000..11949f7ae --- /dev/null +++ b/configs/10.0/packages/tbb/specfile @@ -0,0 +1 @@ +../../../9.0/packages/tbb/specfile \ No newline at end of file diff --git a/configs/10.0/packages/tbb/stage_1 b/configs/10.0/packages/tbb/stage_1 new file mode 120000 index 000000000..08e0a61dd --- /dev/null +++ b/configs/10.0/packages/tbb/stage_1 @@ -0,0 +1 @@ +../../../9.0/packages/tbb/stage_1 \ No newline at end of file diff --git a/configs/10.0/packages/tbb/tbb.mk b/configs/10.0/packages/tbb/tbb.mk new file mode 120000 index 000000000..863bafed5 --- /dev/null +++ b/configs/10.0/packages/tbb/tbb.mk @@ -0,0 +1 @@ +../../../9.0/packages/tbb/tbb.mk \ No newline at end of file diff --git a/configs/10.0/packages/tcmalloc/sources b/configs/10.0/packages/tcmalloc/sources new file mode 100644 index 000000000..74ab58285 --- /dev/null +++ b/configs/10.0/packages/tcmalloc/sources @@ -0,0 +1,56 @@ +#!/usr/bin/env bash +# +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# Tcmalloc source package and build info +# ================================== +# + +ATSRC_PACKAGE_NAME="TCMalloc" +ATSRC_PACKAGE_VER=2.5 +ATSRC_PACKAGE_REV=632de29 +ATSRC_PACKAGE_LICENSE="BSD License" +ATSRC_PACKAGE_DOCLINK="http://htmlpreview.github.io/?https://github.com/gperftools/gperftools/blob/master/doc/tcmalloc.html" +ATSRC_PACKAGE_RELFIXES= +ATSRC_PACKAGE_STR_VER="${ATSRC_PACKAGE_NAME} ${ATSRC_PACKAGE_VER}${ATSRC_PACKAGE_REV:+-${ATSRC_PACKAGE_REV}}" +ATSRC_PACKAGE_VERID="${ATSRC_PACKAGE_VER}${ATSRC_PACKAGE_REV:+-${ATSRC_PACKAGE_REV}}" +ATSRC_PACKAGE_PRE="test -d gperftools-${ATSRC_PACKAGE_VERID}" +ATSRC_PACKAGE_CO=([0]="wget -O gperftools-${ATSRC_PACKAGE_VERID}.tar.gz https://github.com/gperftools/gperftools/archive/${ATSRC_PACKAGE_REV}.tar.gz") +ATSRC_PACKAGE_GIT="" +# Use --transform to give a better name to Gperftools directory. +ATSRC_PACKAGE_POST="tar xzf gperftools-${ATSRC_PACKAGE_VERID}.tar.gz --transform=s/gperftools-${ATSRC_PACKAGE_REV}[^\\/]*/gperftools-${ATSRC_PACKAGE_VERID}/" +ATSRC_PACKAGE_SRC="${AT_BASE}/sources/gperftools-${ATSRC_PACKAGE_VERID}" +ATSRC_PACKAGE_WORK=${AT_WORK_PATH}/gperftools +ATSRC_PACKAGE_MLS="" +ATSRC_PACKAGE_ALOC="" +ATSRC_PACKAGE_PATCHES="" +ATSRC_PACKAGE_TARS="" +ATSRC_PACKAGE_MAKE_CHECK="" +ATSRC_PACKAGE_DISTRIB=no +ATSRC_PACKAGE_BUNDLE=toolchain_extra + +atsrc_get_patches () +{ + at_get_patch \ + https://github.com/gperftools/gperftools/commit/7852eeb75b9375cf52a7da01be044da6e915dd08.patch \ + f41cc9694a060099bef28a13043a1dc9 || return ${?} +} + +atsrc_apply_patches () +{ + patch -p1 < 7852eeb75b9375cf52a7da01be044da6e915dd08.patch \ + || return ${?} +} diff --git a/configs/10.0/packages/tcmalloc/specfile b/configs/10.0/packages/tcmalloc/specfile new file mode 120000 index 000000000..f0896a002 --- /dev/null +++ b/configs/10.0/packages/tcmalloc/specfile @@ -0,0 +1 @@ +../../../9.0/packages/tcmalloc/specfile \ No newline at end of file diff --git a/configs/10.0/packages/tcmalloc/stage_1 b/configs/10.0/packages/tcmalloc/stage_1 new file mode 120000 index 000000000..ef6e3a336 --- /dev/null +++ b/configs/10.0/packages/tcmalloc/stage_1 @@ -0,0 +1 @@ +../../../9.0/packages/tcmalloc/stage_1 \ No newline at end of file diff --git a/configs/10.0/packages/tcmalloc/tcmalloc.mk b/configs/10.0/packages/tcmalloc/tcmalloc.mk new file mode 120000 index 000000000..24e1ba851 --- /dev/null +++ b/configs/10.0/packages/tcmalloc/tcmalloc.mk @@ -0,0 +1 @@ +../../../9.0/packages/tcmalloc/tcmalloc.mk \ No newline at end of file diff --git a/configs/10.0/packages/valgrind/sources b/configs/10.0/packages/valgrind/sources new file mode 100644 index 000000000..e8572f738 --- /dev/null +++ b/configs/10.0/packages/valgrind/sources @@ -0,0 +1,74 @@ +#!/usr/bin/env bash +# +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# Valgrind source package and build info +# ====================================== +# + +ATSRC_PACKAGE_NAME="Valgrind" +ATSRC_PACKAGE_VER=3.11.0 +# Don't update the Valgrind revision without updating the VEX revision too. +# They have to be in sync. +ATSRC_PACKAGE_REV=16119 +ATSRC_PACKAGE_VEX_REV=3285 +ATSRC_PACKAGE_LICENSE="GPL 2.0" +ATSRC_PACKAGE_DOCLINK="http://valgrind.org/docs/" +ATSRC_PACKAGE_RELFIXES= +ATSRC_PACKAGE_VER_REV="${ATSRC_PACKAGE_VER}-${ATSRC_PACKAGE_REV}" +ATSRC_PACKAGE_STR_VER="${ATSRC_PACKAGE_NAME} ${ATSRC_PACKAGE_VER}" +ATSRC_PACKAGE_PRE="test -d valgrind-${ATSRC_PACKAGE_VER_REV}" +ATSRC_PACKAGE_CO=([0]="svn co --revision ${ATSRC_PACKAGE_REV} --ignore-externals svn://svn.valgrind.org/valgrind/trunk valgrind-${ATSRC_PACKAGE_VER_REV}") +# TODO: Downloading Valgrind and VEX in different steps is sub-optimal for +# caching mechanisms. +# VEX is part of the Valgrind code, but it's kept in a different repository. +# When checking out Valgrind, the VEX repository is downloaded automatically +# via a SVN external propery. However, the Valgrind repository doesn't +# synchronize its own revision with the VEX repository and whenever we +# checkout a specific revision from trunk, it will always get the latest +# revision from VEX, causing failures on Valgrind. +ATSRC_PACKAGE_POST="svn co svn://svn.valgrind.org/vex/trunk valgrind-${ATSRC_PACKAGE_VER_REV}/VEX -r ${ATSRC_PACKAGE_VEX_REV}" +ATSRC_PACKAGE_SRC="${AT_BASE}/sources/valgrind-${ATSRC_PACKAGE_VER_REV}" +ATSRC_PACKAGE_WORK=${AT_WORK_PATH}/valgrind +ATSRC_PACKAGE_MLS="" +ATSRC_PACKAGE_ALOC='' +ATSRC_PACKAGE_PATCHES='' +ATSRC_PACKAGE_TARS='' +ATSRC_PACKAGE_MAKE_CHECK= +ATSRC_PACKAGE_DISTRIB=yes +ATSRC_PACKAGE_BUNDLE=profile + +atsrc_get_patches () +{ + at_get_patch \ + https://github.com/powertechpreview/powertechpreview/raw/be030afbf8d78018ab77aeea58092e03d483e8ce/Valgrind%20iTrace%20Patches/3.11/vg-3110-itrace.v1.tgz \ + 337042b8ea29d476b69d439c154d62f0 || return ${?} + + return 0 +} + +atsrc_apply_patches () +{ + tar xzf vg-3110-itrace.v1.tgz || return ${?} + + # Apply these patches to hook the itrace subdirectories into the + # valgrind makefile and configure scripts. + patch -p0 < add-itrace-bits-to-Makefile.am.diff || return ${?} + patch -p0 < add-itrace-bits-to-configure.ac.diff || return ${?} + patch -p0 < add-itrace-bits-to-check_headers_and_includes.diff || return ${?} + + return 0 +} diff --git a/configs/10.0/packages/valgrind/specfile b/configs/10.0/packages/valgrind/specfile new file mode 120000 index 000000000..718c8fb10 --- /dev/null +++ b/configs/10.0/packages/valgrind/specfile @@ -0,0 +1 @@ +../../../9.0/packages/valgrind/specfile \ No newline at end of file diff --git a/configs/10.0/packages/valgrind/stage_1 b/configs/10.0/packages/valgrind/stage_1 new file mode 120000 index 000000000..03277f37d --- /dev/null +++ b/configs/10.0/packages/valgrind/stage_1 @@ -0,0 +1 @@ +../../../9.0/packages/valgrind/stage_1 \ No newline at end of file diff --git a/configs/10.0/packages/valgrind/valgrind.mk b/configs/10.0/packages/valgrind/valgrind.mk new file mode 120000 index 000000000..62074476a --- /dev/null +++ b/configs/10.0/packages/valgrind/valgrind.mk @@ -0,0 +1 @@ +../../../9.0/packages/valgrind/valgrind.mk \ No newline at end of file diff --git a/configs/10.0/packages/zlib/sources b/configs/10.0/packages/zlib/sources new file mode 120000 index 000000000..7fa9c8277 --- /dev/null +++ b/configs/10.0/packages/zlib/sources @@ -0,0 +1 @@ +../../../9.0/packages/zlib/sources \ No newline at end of file diff --git a/configs/10.0/packages/zlib/specfile b/configs/10.0/packages/zlib/specfile new file mode 120000 index 000000000..c5fe8de7d --- /dev/null +++ b/configs/10.0/packages/zlib/specfile @@ -0,0 +1 @@ +../../../9.0/packages/zlib/specfile \ No newline at end of file diff --git a/configs/10.0/packages/zlib/stage_1 b/configs/10.0/packages/zlib/stage_1 new file mode 120000 index 000000000..62de3c074 --- /dev/null +++ b/configs/10.0/packages/zlib/stage_1 @@ -0,0 +1 @@ +../../../9.0/packages/zlib/stage_1 \ No newline at end of file diff --git a/configs/10.0/packages/zlib/stage_optimized b/configs/10.0/packages/zlib/stage_optimized new file mode 120000 index 000000000..d5f9faf4b --- /dev/null +++ b/configs/10.0/packages/zlib/stage_optimized @@ -0,0 +1 @@ +../../../9.0/packages/zlib/stage_optimized \ No newline at end of file diff --git a/configs/10.0/packages/zlib/zlib.mk b/configs/10.0/packages/zlib/zlib.mk new file mode 120000 index 000000000..9d61f50ef --- /dev/null +++ b/configs/10.0/packages/zlib/zlib.mk @@ -0,0 +1 @@ +../../../9.0/packages/zlib/zlib.mk \ No newline at end of file diff --git a/configs/10.0/release_notes/release_notes-body.html b/configs/10.0/release_notes/release_notes-body.html new file mode 120000 index 000000000..5322be2a5 --- /dev/null +++ b/configs/10.0/release_notes/release_notes-body.html @@ -0,0 +1 @@ +../../9.0/release_notes/release_notes-body.html \ No newline at end of file diff --git a/configs/10.0/release_notes/release_notes-features.html b/configs/10.0/release_notes/release_notes-features.html new file mode 120000 index 000000000..a93ab2704 --- /dev/null +++ b/configs/10.0/release_notes/release_notes-features.html @@ -0,0 +1 @@ +../../9.0/release_notes/release_notes-features.html \ No newline at end of file diff --git a/configs/10.0/release_notes/release_notes-group_entry.html b/configs/10.0/release_notes/release_notes-group_entry.html new file mode 120000 index 000000000..9af600842 --- /dev/null +++ b/configs/10.0/release_notes/release_notes-group_entry.html @@ -0,0 +1 @@ +../../9.0/release_notes/release_notes-group_entry.html \ No newline at end of file diff --git a/configs/10.0/release_notes/release_notes-inst.html b/configs/10.0/release_notes/release_notes-inst.html new file mode 100644 index 000000000..e57365e0e --- /dev/null +++ b/configs/10.0/release_notes/release_notes-inst.html @@ -0,0 +1,200 @@ + + + + + + + + + diff --git a/configs/10.0/release_notes/release_notes-online_doc.html b/configs/10.0/release_notes/release_notes-online_doc.html new file mode 120000 index 000000000..04ee48222 --- /dev/null +++ b/configs/10.0/release_notes/release_notes-online_doc.html @@ -0,0 +1 @@ +../../9.0/release_notes/release_notes-online_doc.html \ No newline at end of file diff --git a/configs/10.0/release_notes/release_notes-package_line.html b/configs/10.0/release_notes/release_notes-package_line.html new file mode 120000 index 000000000..78aeb9fa6 --- /dev/null +++ b/configs/10.0/release_notes/release_notes-package_line.html @@ -0,0 +1 @@ +../../9.0/release_notes/release_notes-package_line.html \ No newline at end of file diff --git a/configs/10.0/release_notes/release_notes-style.html b/configs/10.0/release_notes/release_notes-style.html new file mode 120000 index 000000000..e20b5d86f --- /dev/null +++ b/configs/10.0/release_notes/release_notes-style.html @@ -0,0 +1 @@ +../../9.0/release_notes/release_notes-style.html \ No newline at end of file diff --git a/configs/10.0/release_notes/relfixes.html b/configs/10.0/release_notes/relfixes.html new file mode 100644 index 000000000..358a39773 --- /dev/null +++ b/configs/10.0/release_notes/relfixes.html @@ -0,0 +1,88 @@ +
  • POWER9 enablement.
  • +
  • POWER8 Optimized scheduler.
  • +
  • Requires at least POWER7 for ppc64 and POWER8 for ppc64le.
  • +
  • POWER8 Transactional Memory enablement.
  • +
  • POWER8 Crypto Operations enablement.
  • +
  • POWER8 Fusion enablement.
  • +
  • POWER8 optimized system libraries.
  • +
  • GCC creates binaries using --mcpu=power8 --mtune=power9 by default on ppc64le.
  • +
  • Support for Go Programming Language.
  • +
  • Support for split stack.
  • + +

    New features in 10.0-2

    + + + +

    Previous releases

    + +

    New features in 10.0-1

    + + +

    New features in 10.0-0

    +
      +
    • Support for Ubuntu 16.04.
    • +
    • GCC provides fixes for complex IEEE 128-bit floating point and support for IEEE 128-bit floating point built-ins.
    • +
    • GCC creates binaries using --mcpu=power8 --mtune=power8 by default on ppc64le.
    • +
    • Valgrind provides a fix for missing support for wbit field on mtfsfi instruction.
    • +
    • Valgrind Itrace provides a new option to only start instruction tracing when a given function starts.
    • +
    • Cross-compiler packages are now signed.
    • +
    • OpenSSL provides 6 security advisories.
    • +
    + +

    New features in 9.0-3

    + diff --git a/configs/10.0/sanity.mk b/configs/10.0/sanity.mk new file mode 100644 index 000000000..9b6bc17b2 --- /dev/null +++ b/configs/10.0/sanity.mk @@ -0,0 +1,19 @@ +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# This file holds some sanity checks to run on the build machine, to verify +# its general required components for the building process. +define base_sanity + echo "Base sanity checks passed." +endef \ No newline at end of file diff --git a/configs/10.0/specs/main.spec b/configs/10.0/specs/main.spec new file mode 120000 index 000000000..34a762485 --- /dev/null +++ b/configs/10.0/specs/main.spec @@ -0,0 +1 @@ +../../9.0/specs/main.spec \ No newline at end of file diff --git a/configs/10.0/specs/metapkgs.spec b/configs/10.0/specs/metapkgs.spec new file mode 120000 index 000000000..88d1a0e9b --- /dev/null +++ b/configs/10.0/specs/metapkgs.spec @@ -0,0 +1 @@ +../../9.0/specs/metapkgs.spec \ No newline at end of file diff --git a/configs/10.0/specs/monolithic.spec b/configs/10.0/specs/monolithic.spec new file mode 120000 index 000000000..345af69ac --- /dev/null +++ b/configs/10.0/specs/monolithic.spec @@ -0,0 +1 @@ +../../9.0/specs/monolithic.spec \ No newline at end of file diff --git a/configs/10.0/specs/monolithic_at-compat.spec b/configs/10.0/specs/monolithic_at-compat.spec new file mode 120000 index 000000000..3864611f9 --- /dev/null +++ b/configs/10.0/specs/monolithic_at-compat.spec @@ -0,0 +1 @@ +../../9.0/specs/monolithic_at-compat.spec \ No newline at end of file diff --git a/configs/10.0/specs/monolithic_compat.spec b/configs/10.0/specs/monolithic_compat.spec new file mode 120000 index 000000000..48a77bdd7 --- /dev/null +++ b/configs/10.0/specs/monolithic_compat.spec @@ -0,0 +1 @@ +../../9.0/specs/monolithic_compat.spec \ No newline at end of file diff --git a/configs/10.0/specs/monolithic_cross.spec b/configs/10.0/specs/monolithic_cross.spec new file mode 120000 index 000000000..f6badeff9 --- /dev/null +++ b/configs/10.0/specs/monolithic_cross.spec @@ -0,0 +1 @@ +../../9.0/specs/monolithic_cross.spec \ No newline at end of file diff --git a/configs/10.0/specs/monolithic_golang.spec b/configs/10.0/specs/monolithic_golang.spec new file mode 100644 index 000000000..1de06e800 --- /dev/null +++ b/configs/10.0/specs/monolithic_golang.spec @@ -0,0 +1,56 @@ +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +Name: advance-toolchain +Version: %{at_major_version} +Release: %{at_revision_number} +License: GPL, LGPL +Group: Development/Libraries +Summary: Advance Toolchain + +%description +The advance toolchain is a self contained toolchain which provides preview +toolchain functionality in GCC, binutils and GLIBC, as well as the debug and +profile tools GDB, Valgrind and OProfile. +It also provides a group of optimized threading libraries as well. + +#################################################### +%package golang-at +Summary: Golang for ppc64le +AutoReqProv: no +Provides: advance-toolchain-golang = %{at_major_version}-%{at_revision_number} + + +%description golang-at +The advance toolchain is a self contained toolchain which provides preview +toolchain functionality in GCC, binutils, GLIBC, GDB, Valgrind, and OProfile. +The 'golang' package contains the Golang binaries for ppc64le. + +#################################################### +# On newer rpm versions, it's common to strip debug info and to compile python +# files. We only want to compress man pages. +%define __os_install_post /usr/lib/rpm/brp-compress + +%prep + +%build + +%install +# Prepare a build sandbox area for golang +mkdir -p ${RPM_BUILD_ROOT}$(dirname %{_golang}) +cp -af %{_tmpdir}/golang_1/%{_golang} ${RPM_BUILD_ROOT}$(dirname %{_golang}) + +#################################################### +%files golang-at -f %{at_work}/golang.list +%defattr(-,root,root) diff --git a/configs/6.0/arch/default.mk b/configs/6.0/arch/default.mk new file mode 100644 index 000000000..26d08c522 --- /dev/null +++ b/configs/6.0/arch/default.mk @@ -0,0 +1,47 @@ +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Default settings for all scenarios. +# Define at least BUILD_TARGET_ARCH* before including this file. + +# Generate code with non-executable .plt and .got sections for powerpc-linux. +SECURE_PLT ?= secure-plt + +# DEFAULT_CPU is used by gcc in order to set the default value of -m[32|64] +DEFAULT_CPU ?= default32 + +# Generate 32-bit binaries by default when not set. +# This is a legacy value. +COMPILER ?= 32 + +# We only build for Linux + glibc. +BUILD_TARGET_OSLIB ?= linux +CANONICALIZED_MACHINE := $(BUILD_TARGET_OSLIB) +CANONICALIZED_NAME_ID := $(CANONICALIZED_MACHINE)$(BUILD_TARGET_POSTFIX) + +ifdef BUILD_TARGET_ARCH32 + # Name of the target used when installing headers. It may be the name of the + # directory or a prefix of the name. + HEADER_TARGET ?= ppc + CTARGET_32 := $(BUILD_TARGET_ARCH32)-$(CANONICALIZED_NAME_ID) + TARGET32 := $(CTARGET_32) +endif + +ifdef BUILD_TARGET_ARCH64 + # Name of the target used when installing headers. It may be the name of the + # directory or a prefix of the name. + HEADER_TARGET64 ?= ppc64 + CTARGET_64 := $(BUILD_TARGET_ARCH64)-$(CANONICALIZED_NAME_ID) + TARGET64 := $(CTARGET_64) +endif diff --git a/configs/6.0/arch/i686.mk b/configs/6.0/arch/i686.mk new file mode 100644 index 000000000..7355969db --- /dev/null +++ b/configs/6.0/arch/i686.mk @@ -0,0 +1,20 @@ +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Set default variables when host=i686. +# This file must be included by another. + +include $(CONFIG)/arch/default.mk + +HOST := $(HOST_ARCH)-linux diff --git a/configs/6.0/arch/i686.ppc64.mk b/configs/6.0/arch/i686.ppc64.mk new file mode 100644 index 000000000..2f7fee79b --- /dev/null +++ b/configs/6.0/arch/i686.ppc64.mk @@ -0,0 +1,30 @@ +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Set default variables when host=i686 targeting ppc64. + +# Generate 64-bit binaries by default. +COMPILER := 64 +BUILD_TARGET_ARCH32 := powerpc +BUILD_TARGET_ARCH64 := powerpc64 + +include $(CONFIG)/arch/i686.mk + +CROSS_BUILD := yes +ENV_BUILD_ARCH := 32 + +# Re-define previously declared variables +DEFAULT_CPU := default64 +TARGET := $(CTARGET_64) +ALTERNATE_TARGET := $(CTARGET_32) diff --git a/configs/6.0/arch/ppc64.ppc64.mk b/configs/6.0/arch/ppc64.ppc64.mk new file mode 100644 index 000000000..a70b442bc --- /dev/null +++ b/configs/6.0/arch/ppc64.ppc64.mk @@ -0,0 +1,29 @@ +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Set default variables when host=ppc64, targeting ppc64. + +# Generate 64-bit binaries by default. +COMPILER := 64 +BUILD_TARGET_ARCH32 := powerpc +BUILD_TARGET_ARCH64 ?= powerpc64 + +include $(CONFIG)/arch/default.mk + +TARGET := $(CTARGET_64) +ALTERNATE_TARGET := $(CTARGET_32) +DEFAULT_CPU := default64 +HOST := $(CTARGET_64) +CROSS_BUILD := no +ENV_BUILD_ARCH := 32 diff --git a/configs/6.0/base.mk b/configs/6.0/base.mk new file mode 100644 index 000000000..222e5ac38 --- /dev/null +++ b/configs/6.0/base.mk @@ -0,0 +1,52 @@ +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Basic build version definitions +# =============================== +# This Makefile include contains the config options included at the beginning +# of the build process that govern the subsequent generated package name, +# version and other dependent internal build variables. +# It also states which distros the build is compatible with, so that it can be +# validated at build time, as well as heuristicaly find the proper repo path +# to put the final rpms generated by the build system. + +# Versioning description +# ====================== +# +# - AT_NAME: Final build Advance Toolchain package name. +# +# - AT_MAJOR_VERSION: Changes whenever the compiler or the ABI changes. +# Should be in X.Y format, where X=compiler change, +# Y=ABI change within that compiler change cycle. All +# first major releases should be X.0. Then, if the ABI +# changes, increment the second digit (i.e. X.1). +# +# - AT_REVISION_NUMBER: The revision number. Starts at 0 and is incremented +# whenever a new official build that doesn't change the +# compiler version or the ABI is required. +# +# - AT_INTERNAL: Tag for internal releases (i.e. alpha, beta, rc). For +# GM or external releases, it should be "none". +# +# - AT_DIR_NAME: Optional name of the directory. If not defined, will +# use a combination of ATNAME, AT_MAJOR_VERSION, +# AT_INTERNAL and AT_REVISION_NUMBER. +# +# - AT_PREVIOUS_VERSION Previous compatible AT version supported (It may be +# further restricted by distro specific settings) +AT_NAME := at +AT_MAJOR_VERSION := 6.0 +AT_REVISION_NUMBER := 4 +AT_INTERNAL := none +AT_PREVIOUS_VERSION := 5.0 diff --git a/configs/6.0/build.mk b/configs/6.0/build.mk new file mode 100644 index 000000000..2d198deac --- /dev/null +++ b/configs/6.0/build.mk @@ -0,0 +1,58 @@ +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generic build support options +# ============================= +# Most of these options are self explanatory, Some highlights on obscure ones +# - BUILD_ARCH must contain the target toolchain arch (ppc64/ppc32) +# - BUILD_CROSS_32 tell us to build (yes) or not (no) a cross on 32 bit system. +# - BUILD_LOAD_ARCH tell us the CPU base to use for loader compatibility (GLIBC). +# - BUILD_BASE_ARCH tell us the CPU base to use for base code generation (GCC). +# - BUILD_OPTIMIZATION tells which is the default base optimization level (GCC). +# - BUILD_WITH_LONGDOUBLE tells us to build with support for longdoubles. +# - BUILD_WITH_DFP_STANDALONE tells us to build with libdfp as standalone library. +# - BUILD_RPM_PACKAGER tells us the name / email of packager for this release. +# - BUILD_RPMS must be set to "granular" or "monolithic" to indicate the kind of +# rpms to be generated by the build script. See the documentation notes. +BUILD_ARCH := ppc64 +BUILD_CROSS_32 := yes +BUILD_LOAD_ARCH := power4 +BUILD_BASE_ARCH := power6 +BUILD_OPTIMIZATION := power7 +BUILD_WITH_LONGDOUBLE := yes +BUILD_WITH_DFP_STANDALONE := yes +BUILD_RPM_PACKAGER := +BUILD_RPM_VENDOR := +BUILD_RPMS := monolithic +BUILD_GCC_LANGUAGES := c,c++,fortran + +# List supported CPUs to build for active, compat and embed +# ========================================================= +# - List of valid CPUs for active and compat: +# * power4, power5, power5+, power6, power6x and power7 +BUILD_ACTIVE_MULTILIBS := power7 + +# Download options +# ================ +# Should be either 'yes' or 'no'. Mostly self explanatory options. +# - BUILD_GET_SOURCES tell us to force grab sources +# - BUILD_GET_MPS tell us to grab patches from mailing lists +# - BUILD_GET_ADDONS tell us to grab related package addons +# - BUILD_EXCLUSIVE_CROSS tell us that the build is *exclusively* cross +# - BUILD_DEFAULT_RETRIES tell the default number of retries when fetching sources +BUILD_GET_SOURCES := yes +BUILD_GET_MPS := yes +BUILD_GET_ADDONS := yes +BUILD_EXCLUSIVE_CROSS := no +BUILD_DEFAULT_RETRIES := 5 diff --git a/configs/6.0/distros/centos-6.mk b/configs/6.0/distros/centos-6.mk new file mode 120000 index 000000000..b8dd2bf9b --- /dev/null +++ b/configs/6.0/distros/centos-6.mk @@ -0,0 +1 @@ +redhat-6.mk \ No newline at end of file diff --git a/configs/6.0/distros/redhat-6.mk b/configs/6.0/distros/redhat-6.mk new file mode 100644 index 000000000..89e89dd1d --- /dev/null +++ b/configs/6.0/distros/redhat-6.mk @@ -0,0 +1,82 @@ +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Distro dependent basic definitions for RedHat Enterprise Server 6 +# ================================================================= +# This Makefile include contains the definitions for the distro being used +# for the build process. It contains kernel version infos and distro specific +# sanity checks. + +# Informs the distro supported power archs +AT_SUPPORTED_ARCHS := ppc64 + +# You may force the BUILD_IGNORE_AT_COMPAT general condition by distro +#BUILD_IGNORE_AT_COMPAT := yes + +# Kernel version to build toolchain against +# - As this distro only supports one arch variation (ppc64), there is no +# need to conditionally define these versions based on arch. +AT_KERNEL := 2.6.32 # Current distro kernel version for runtime. +AT_OLD_KERNEL := 2.6.18 # Previous distro kernel version for runtime-compat. + +# Inform the mainly supported distros +AT_SUPPORTED_DISTROS := RHEL6 + +# Inform the compatibility suported distros +AT_COMPAT_DISTROS := RHEL5 + +# Sign the repository and packages +AT_SIGN_PKGS := yes +AT_SIGN_REPO := yes +AT_SIGN_PKGS_CROSS := no +AT_SIGN_REPO_CROSS := yes + +# ID of GNUPG key used to sign our packages (main/compat) +AT_GPG_KEYID := 6976A827 +AT_GPG_KEYIDC := 3052930D +AT_GPG_KEYIDL := 6976A827 +# ID of GNUPG key used to sign our repositories (main/compat) +AT_GPG_REPO_KEYID := 3052930D +AT_GPG_REPO_KEYIDC := 3052930D +AT_GPG_REPO_KEYIDL := 3052930D + +# Options required by the command to update the repository metadata +AT_REPOCMD_OPTS := -p -s sha1 --simple-md-filenames --no-database + +# As some distros have special requirements for configuration upon final +# AT installation, put in this macro, the final configurations required +# after the main build and prior to the rpm build +define distro_final_config + echo "nothing to do." +endef + +# Inform the list of packages to check +ifndef AT_DISTRO_REQ_PKGS + AT_CROSS_PKGS_REQ := + AT_NATIVE_PKGS_REQ := \(ibm-java2-ppc64-sdk-5.0\|java-1.5.0-ibm-devel\) \ + libxslt popt-devel qt-devel imake \ + readline readline-devel + AT_COMMON_PKGS_REQ := zlib-devel ncurses-devel flex bison texinfo \ + createrepo glibc-devel subversion cvs gawk autoconf \ + rsync curl bc automake + AT_CROSS_PGMS_REQ := + AT_NATIVE_PGMS_REQ := + AT_COMMON_PGMS_REQ := git_1.7 + AT_JAVA_VERSIONS := 5 +endif + +# If needed, define the necessary distro related sanity checks. +define distro_sanity + echo "nothing to test here" +endef diff --git a/configs/6.0/distros/suse-11.mk b/configs/6.0/distros/suse-11.mk new file mode 100644 index 000000000..8931e5f6d --- /dev/null +++ b/configs/6.0/distros/suse-11.mk @@ -0,0 +1,82 @@ +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Distro dependent basic definitions for SuSE Enterprise Server 11 +# ================================================================ +# This Makefile include contains the definitions for the distro being used +# for the build process. It contains kernel version infos and distro specific +# sanity checks. + +# Informs the distro supported power archs +AT_SUPPORTED_ARCHS := ppc64 + +# You may force the BUILD_IGNORE_AT_COMPAT general condition by distro +#BUILD_IGNORE_AT_COMPAT := yes + +# Kernel version to build toolchain against +# - As this distro only supports one arch variation (ppc64), there is no +# need to conditionally define these versions based on arch. +AT_KERNEL := 2.6.27.26 # Current distro kernel version for runtime. +AT_OLD_KERNEL := 2.6.16 # Previous distro kernel version for runtime-compat. + +# Inform the mainly supported distros +AT_SUPPORTED_DISTROS := SLES_11 + +# Inform the compatibility suported distros +AT_COMPAT_DISTROS := SLES_10 + +# Sign the repository and packages +AT_SIGN_PKGS := yes +AT_SIGN_REPO := yes +AT_SIGN_PKGS_CROSS := no +AT_SIGN_REPO_CROSS := yes + +# ID of GNUPG key used to sign our packages (main/compat) +AT_GPG_KEYID := 3052930D +AT_GPG_KEYIDC := 3052930D +AT_GPG_KEYIDL := 3052930D +# ID of GNUPG key used to sign our repositories (main/compat) +AT_GPG_REPO_KEYID := 3052930D +AT_GPG_REPO_KEYIDC := 3052930D +AT_GPG_REPO_KEYIDL := 3052930D + +# Options required by the command to update the repository metadata +AT_REPOCMD_OPTS := -p + +# As some distros have special requirements for configuration upon final +# AT installation, put in this macro, the final configurations required +# after the main build and prior to the rpm build +define distro_final_config + echo "nothing to do." +endef + +# Inform the list of packages to check +ifndef AT_DISTRO_REQ_PKGS + AT_CROSS_PKGS_REQ := + AT_NATIVE_PKGS_REQ := \(ibm-java2-ppc64-sdk-5.0\|java-1.5.0-ibm-devel\) \ + libxslt popt-devel docbook-xsl-stylesheets \ + xorg-x11-util-devel readline readline-devel + AT_COMMON_PKGS_REQ := zlib-devel ncurses-devel flex bison texinfo \ + createrepo subversion cvs gawk autoconf rsync curl \ + bc automake + AT_CROSS_PGMS_REQ := + AT_NATIVE_PGMS_REQ := + AT_COMMON_PGMS_REQ := git_1.7 + AT_JAVA_VERSIONS := 5 +endif + +# If needed, define the necessary distro related sanity checks. +define distro_sanity + echo "nothing to test here" +endef diff --git a/configs/6.0/packages/amino/amino.mk b/configs/6.0/packages/amino/amino.mk new file mode 100644 index 000000000..20ab9ca87 --- /dev/null +++ b/configs/6.0/packages/amino/amino.mk @@ -0,0 +1,31 @@ +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# +# +$(eval $(call set_provides,amino_1,multi,cross_no)) + +amino: $(RCPTS)/amino_1.rcpt + +# Add it to the target 3rdparty_libs +3rdparty_libs-reqs += $(RCPTS)/amino_1.rcpt + +$(RCPTS)/amino_1.rcpt: $(amino_1-archdeps) + @touch $@ + +$(RCPTS)/amino_1-32.a.rcpt: $(patsubst %,$(RCPTS)/%.rcpt,gcc_4 rsync_amino) + @touch $@ + +$(RCPTS)/amino_1-64.a.rcpt: $(patsubst %,$(RCPTS)/%.rcpt,gcc_4 rsync_amino) + @touch $@ diff --git a/configs/6.0/packages/amino/sources b/configs/6.0/packages/amino/sources new file mode 100644 index 000000000..952437cf6 --- /dev/null +++ b/configs/6.0/packages/amino/sources @@ -0,0 +1,41 @@ +#!/usr/bin/env bash +# +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# Amino source package and build info +# ================================== +# + +ATSRC_PACKAGE_NAME="Amino Concurrent Building Block" +ATSRC_PACKAGE_VER=1.1 +ATSRC_PACKAGE_REV=688 +ATSRC_PACKAGE_DOCLINK="http://amino-cbbs.sourceforge.net" +ATSRC_PACKAGE_RELFIXES= +ATSRC_PACKAGE_STR_VER="${ATSRC_PACKAGE_NAME} ${ATSRC_PACKAGE_VER}" +ATSRC_PACKAGE_LICENSE="Apache Software License 2.0" +ATSRC_PACKAGE_PRE="test -d amino-cbb-${ATSRC_PACKAGE_VER}" +ATSRC_PACKAGE_CO=("svn co --revision ${ATSRC_PACKAGE_REV} svn://svn.code.sf.net/p/amino-cbbs/svn/trunk/amino/cpp") +ATSRC_PACKAGE_POST="mv cpp amino-cbb-${ATSRC_PACKAGE_VER}" +ATSRC_PACKAGE_SRC="${AT_BASE}/sources/amino-cbb-${ATSRC_PACKAGE_VER}" +ATSRC_PACKAGE_WORK=${AT_WORK_PATH}/amino-cbb +ATSRC_PACKAGE_MLS="" +ATSRC_PACKAGE_ALOC="" +ATSRC_PACKAGE_PATCHES="" +ATSRC_PACKAGE_TARS="" +ATSRC_PACKAGE_MAKE_CHECK="" +ATSRC_PACKAGE_DISTRIB=no +ATSRC_PACKAGE_BUILDCROSS=no +ATSRC_PACKAGE_BUNDLE=mcore-libs diff --git a/configs/6.0/packages/amino/specfile b/configs/6.0/packages/amino/specfile new file mode 100644 index 000000000..d46c60911 --- /dev/null +++ b/configs/6.0/packages/amino/specfile @@ -0,0 +1,14 @@ +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# diff --git a/configs/6.0/packages/amino/stage_1 b/configs/6.0/packages/amino/stage_1 new file mode 100644 index 000000000..c602f11b8 --- /dev/null +++ b/configs/6.0/packages/amino/stage_1 @@ -0,0 +1,69 @@ +#!/usr/bin/env bash +# +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# Amino build parameters for stage 1 32/64 bits +# ========================================= +# + +# Include some standard functions +source ${utilities}/bitsize_selection.sh + +# Tell the build system to hold the temp install folder +ATCFG_HOLD_TEMP_INSTALL='no' +# Tell the build system to hold the temp build folder +ATCFG_HOLD_TEMP_BUILD='no' +# Build in the source code directory +ATCFG_BUILD_STAGE_T='link' + +atcfg_configure () +{ + if [[ "${AT_BIT_SIZE}" -eq "32" ]]; then + echo "#define PPC32_LINUX_GCC" > ./include/amino/platform.h + echo "PLATFORM=ppc-linux-gcc" > ./bin/makeOpts.mk + else + echo "#define PPC64_LINUX_GCC" > ./include/amino/platform.h + echo "PLATFORM=ppc64-linux-gcc" > ./bin/makeOpts.mk + fi +} + +atcfg_make () +{ + PATH=${at_dest}/bin:${PATH} \ + CC="${at_dest}/bin/gcc -m${AT_BIT_SIZE}" \ + CCC="${at_dest}/bin/g++ -m${AT_BIT_SIZE}" \ + OPTFLAG="-g -O2 -fpic" \ + AS="${at_dest}/bin/as" \ + AR="${at_dest}/bin/ar" \ + RANLIB="${at_dest}/bin/ar" \ + AMINO_ROOT="${ATSRC_PACKAGE_WORK}" \ + make prod +} + +atcfg_install () +{ + local libdir=${at_dest}/$(find_build_libdir ${AT_BIT_SIZE}) + + mkdir -p "${install_place}/${libdir}" \ + "${install_place}/${at_dest}/include" + install -m 777 lib/libalg.so "${install_place}/${libdir}" + install -m 777 lib/libclfalloc.so "${install_place}/${libdir}" + install -m 777 lib/libstm.so "${install_place}/${libdir}" + install -m 755 lib/libalg.a "${install_place}/${libdir}" + install -m 755 lib/libclfalloc.a "${install_place}/${libdir}" + install -m 755 lib/libstm.a "${install_place}/${libdir}" + cp -rv include/amino/ "${install_place}/${at_dest}/include" +} diff --git a/configs/6.0/packages/binutils/binutils.mk b/configs/6.0/packages/binutils/binutils.mk new file mode 100644 index 000000000..d334d010f --- /dev/null +++ b/configs/6.0/packages/binutils/binutils.mk @@ -0,0 +1,57 @@ +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# +# +$(eval $(call set_provides,binutils_1,single,cross_yes)) +$(eval $(call set_provides,binutils_2,single,cross_yes)) +# The 3rd binutils build is only necessary when targeting a 64-bit environment +# and building OProfile for 32-bit. +ifneq ($(ALTERNATE_TARGET),) + $(eval $(call set_provides,binutils_3,single,cross_no)) +endif + +ifeq ($(CROSS_BUILD),no) + binutils_2-req = $(RCPTS)/ldconfig_2.rcpt +else + binutils_2-req = +endif + + +binutils_1: $(RCPTS)/binutils_1.rcpt + +binutils_2: $(RCPTS)/binutils_2.rcpt + +binutils_3: $(RCPTS)/binutils_3.rcpt + + +$(RCPTS)/binutils_1.rcpt: $(binutils_1-archdeps) + @touch $@ + +$(RCPTS)/binutils_2.rcpt: $(binutils_2-archdeps) + @touch $@ + +$(RCPTS)/binutils_3.rcpt: $(binutils_3-archdeps) + @touch $@ + + +$(RCPTS)/binutils_1.a.rcpt: $(RCPTS)/rsync_binutils.rcpt + @touch $@ + +$(RCPTS)/binutils_2.a.rcpt: $(RCPTS)/glibc_2.rcpt $(RCPTS)/gcc_3.rcpt $(binutils_2-req) + @touch $@ + +$(RCPTS)/binutils_3.a.rcpt: $(RCPTS)/gcc_4.rcpt + @touch $@ + diff --git a/configs/6.0/packages/binutils/sources b/configs/6.0/packages/binutils/sources new file mode 100644 index 000000000..fc2eed807 --- /dev/null +++ b/configs/6.0/packages/binutils/sources @@ -0,0 +1,43 @@ +#!/usr/bin/env bash +# +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# binutils source package and build info +# ====================================== +# + +ATSRC_PACKAGE_NAME="GNU Binutils" +ATSRC_PACKAGE_VER=2.23 +ATSRC_PACKAGE_REV=5c3ec1de +ATSRC_PACKAGE_LICENSE="GPL 2.0" +ATSRC_PACKAGE_DOCLINK="http://sourceware.org/binutils/docs/" +ATSRC_PACKAGE_RELFIXES= +ATSRC_PACKAGE_STR_VER="${ATSRC_PACKAGE_NAME} ${ATSRC_PACKAGE_VER}-${ATSRC_PACKAGE_REV}" +ATSRC_PACKAGE_VERID="${ATSRC_PACKAGE_VER}${ATSRC_PACKAGE_REV:+-${ATSRC_PACKAGE_REV}}" +ATSRC_PACKAGE_PRE="test -d binutils-${ATSRC_PACKAGE_VERID}" +ATSRC_PACKAGE_CO=([0]="wget -O binutils-${ATSRC_PACKAGE_VERID}.tar.gz https://github.com/tuliom/at-binutils/archive/${ATSRC_PACKAGE_REV}.tar.gz") +ATSRC_PACKAGE_GIT="" +# Use --transform to give a better name to Binutils directory. +ATSRC_PACKAGE_POST="tar xzf binutils-${ATSRC_PACKAGE_VERID}.tar.gz --transform=s/at-binutils-${ATSRC_PACKAGE_REV}[^\\/]*/binutils-${ATSRC_PACKAGE_VERID}/" +ATSRC_PACKAGE_SRC=${AT_BASE}/sources/binutils-${ATSRC_PACKAGE_VERID} +ATSRC_PACKAGE_WORK=${AT_WORK_PATH}/binutils +ATSRC_PACKAGE_MLS= +ATSRC_PACKAGE_ALOC= +ATSRC_PACKAGE_PATCHES= +ATSRC_PACKAGE_TARS= +ATSRC_PACKAGE_DISTRIB=yes +ATSRC_PACKAGE_BUILDCROSS=yes +ATSRC_PACKAGE_BUNDLE=toolchain diff --git a/configs/6.0/packages/binutils/specfile b/configs/6.0/packages/binutils/specfile new file mode 100644 index 000000000..d46c60911 --- /dev/null +++ b/configs/6.0/packages/binutils/specfile @@ -0,0 +1,14 @@ +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# diff --git a/configs/6.0/packages/binutils/stage_1 b/configs/6.0/packages/binutils/stage_1 new file mode 100644 index 000000000..7d3f6ad6a --- /dev/null +++ b/configs/6.0/packages/binutils/stage_1 @@ -0,0 +1,110 @@ +#!/usr/bin/env bash +# +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# binutils build parameters for stage 1 +# ===================================== +# + +ATCFG_HOLD_TEMP_INSTALL='no' +ATCFG_HOLD_TEMP_BUILD='no' +# Build in a new directory +ATCFG_BUILD_STAGE_T='dir' + +# Conditional configure command +atcfg_configure() { + if [[ "${cross_build}" == "no" ]]; then + # Configure command for native builds + CC=${system_cc} \ + CFLAGS="-g -O" \ + CXXFLAGS="-g -O" \ + ${ATSRC_PACKAGE_WORK}/configure --build=${host} \ + --host=${host} \ + --target=${target} \ + ${alternate_target:+--enable-targets=${alternate_target}} \ + --prefix=${at_dest} \ + --disable-gdb \ + --disable-readline \ + --disable-libdecnumber \ + --disable-sim \ + --disable-nls + else + # Configure command for cross builds + CC=${system_cc} \ + CFLAGS="-g -O" \ + CXXFLAGS="-g -O" \ + ${ATSRC_PACKAGE_WORK}/configure --build=${host} \ + --host=${host} \ + --target=${target} \ + ${alternate_target:+--enable-targets=${alternate_target}} \ + --with-sysroot=${dest_cross} \ + --prefix=${at_dest} \ + --disable-gdb \ + --disable-readline \ + --disable-libdecnumber \ + --disable-sim \ + --disable-nls + fi +} + +# Make command for build +atcfg_make() { + ${SUB_MAKE} all +} + +# atcfg_make_check() done at stage_2 + +# Install command for build +atcfg_install() { + make install DESTDIR=${install_place} +} + +# Post install settings or commands to run +atcfg_post_install() { + # Create the required symlinks to install, which are a requirement for + # cross builds, but now, we are assuming that every build should have the + # triple shortcut installed. So, create binutils ${target(32|64)}-* symlinks + pushd ${install_place}/${at_dest}/bin + for CMD in addr2line ar as c++filt ld nm objcopy objdump ranlib size strings strip; do + if [[ -x ${CMD} ]] && [[ ! -e ${target32}-${CMD} ]]; then + ln -sfn ${CMD} ${target32}-${CMD} + fi + done + for CMD in addr2line ar c++filt nm objcopy objdump ranlib size strings strip; do + if [[ -x ${CMD} ]] && [[ ! -e ${target64}-${CMD} ]]; then + ln -sfn ${CMD} ${target64}-${CMD} + fi + done + if [[ "${target}" == "${target64}" ]]; then + if [[ ! -e ${target64}-as ]]; then + echo -e "#!/bin/bash\nexec ${at_dest}/bin/as \"${@}\"" > ${target64}-as + chmod a+x ${target64}-as + fi + if [[ ! -e ${target64}-ld ]]; then + echo -e "#!/bin/bash\nexec ${at_dest}/bin/ld \"${@}\"" > ${target64}-ld + chmod a+x ${target64}-ld + fi + fi + # This was needed to fix the cross build which defaults to ${target64} + # target. So, create binutils ${target32}-* symlinks + for CMD in addr2line ar as c++filt elfedit embedspu gprof ld nm objcopy objdump ranlib readelf size strings strip; do + if [[ -x ${target64}-${CMD} ]] && \ + [[ ! -f ${target32}-${CMD} ]]; then + ln -sfn ${target64}-${CMD} ${target32}-${CMD} + fi + done + popd +} diff --git a/configs/6.0/packages/binutils/stage_2 b/configs/6.0/packages/binutils/stage_2 new file mode 100644 index 000000000..7f6ef57cd --- /dev/null +++ b/configs/6.0/packages/binutils/stage_2 @@ -0,0 +1,83 @@ +#!/usr/bin/env bash +# +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# + +ATCFG_HOLD_TEMP_INSTALL='no' +ATCFG_HOLD_TEMP_BUILD='no' +# Build in a new directory +ATCFG_BUILD_STAGE_T='dir' + +# Conditional configure command +atcfg_configure() { + if [[ "${cross_build}" == "no" ]]; then + # Configure command for native builds + CC=${at_dest}/bin/gcc \ + CXX=${at_dest}/bin/g++ \ + CFLAGS="-g -O2" \ + CXXFLAGS="-g -O2" \ + ${ATSRC_PACKAGE_WORK}/configure --build=${host} \ + --host=${target} \ + --target=${target} \ + ${alternate_target:+--enable-targets=${alternate_target}} \ + --prefix=${at_dest} \ + --libdir=${at_dest}/lib${compiler##32} \ + --disable-gdb \ + --disable-readline \ + --disable-libdecnumber \ + --disable-sim \ + --disable-nls \ + --enable-shared \ + --enable-plugins + else + # Configure command for cross builds + CC=${system_cc} \ + CXX=${system_cxx} \ + CFLAGS="-g -O" \ + CXXFLAGS="-g -O" \ + ${ATSRC_PACKAGE_WORK}/configure --build=${host} \ + --host=${host} \ + --target=${target} \ + ${target64:+--enable-targets=${target64}} \ + --with-sysroot=${dest_cross} \ + --prefix=${at_dest} \ + --disable-gdb \ + --disable-readline \ + --disable-libdecnumber \ + --disable-sim \ + --disable-nls \ + --enable-plugins + fi +} + + +# Make command for build +atcfg_make() { + ${SUB_MAKE} all +} + +# Make command for build +atcfg_make_check() { + PATH=${at_dest}/bin:${PATH} \ + ${SUB_MAKE} check +} + + +# Install command for build +atcfg_install() { + ${SUB_MAKE} install DESTDIR=${install_place} +} diff --git a/configs/6.0/packages/binutils/stage_3 b/configs/6.0/packages/binutils/stage_3 new file mode 100644 index 000000000..e8ffa2880 --- /dev/null +++ b/configs/6.0/packages/binutils/stage_3 @@ -0,0 +1,66 @@ +#!/usr/bin/env bash +# +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# binutils build parameters for 32 bits +# ===================================== +# + +ATCFG_HOLD_TEMP_INSTALL='no' +ATCFG_HOLD_TEMP_BUILD='no' +# Build in a new directory +ATCFG_BUILD_STAGE_T='dir' + + +# Configure command for native builds +atcfg_configure() { + PATH=${at_dest}/bin:${PATH} \ + CC="${at_dest}/bin/gcc" \ + CXX="${at_dest}/bin/g++" \ + CFLAGS="-m32 -g -O2" \ + CXXFLAGS="-m32 -g -O2" \ + ${ATSRC_PACKAGE_WORK}/configure \ + --build=${target32} \ + --host=${target32} \ + --target=${target32} \ + --prefix="${at_dest}" \ + --libdir="${at_dest}/lib" \ + --disable-nls \ + --disable-gdb \ + --disable-readline \ + --disable-libdecnumber \ + --disable-sim \ + --enable-shared \ + --enable-plugins +} + + +# Make command for build +atcfg_make() { + PATH=${at_dest}/bin:${PATH} \ + ${SUB_MAKE} all-libiberty all-bfd +} + +# atcfg_make_check() is done at stage_2 + +# Install command for build +atcfg_install() { + PATH=${at_dest}/bin:${PATH} \ + ${SUB_MAKE} install-libiberty install-bfd DESTDIR=${install_place} +} + +# SPECIAL SETTINGS +# ========================================================= diff --git a/configs/6.0/packages/boost/boost.mk b/configs/6.0/packages/boost/boost.mk new file mode 100644 index 000000000..f9ea4a2b5 --- /dev/null +++ b/configs/6.0/packages/boost/boost.mk @@ -0,0 +1,32 @@ +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# +# +$(eval $(call set_provides,boost_1,multi,cross_no)) + +boost: $(RCPTS)/boost_1.rcpt + +# Add it to the target 3rdparty_libs +3rdparty_libs-reqs += $(RCPTS)/boost_1.rcpt + +$(RCPTS)/boost_1.rcpt: $(boost_1-archdeps) + @touch $@ + +$(RCPTS)/boost_1-32.a.rcpt: $(patsubst %,$(RCPTS)/%.rcpt,gcc_4 rsync_boost) + @touch $@ + +$(RCPTS)/boost_1-64.a.rcpt: $(patsubst %,$(RCPTS)/%.rcpt,gcc_4 rsync_boost \ + python_1.b) + @touch $@ diff --git a/configs/6.0/packages/boost/sources b/configs/6.0/packages/boost/sources new file mode 100644 index 000000000..4b07ee182 --- /dev/null +++ b/configs/6.0/packages/boost/sources @@ -0,0 +1,53 @@ +#!/usr/bin/env bash +# +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# Boost source package and build info +# ================================== +# +ATSRC_PACKAGE_NAME="Boost" +ATSRC_PACKAGE_VER=1.50.0 +ATSRC_PACKAGE_DOCLINK="http://www.boost.org/doc/libs/1_50_0/" +ATSRC_PACKAGE_RELFIXES= +ATSRC_PACKAGE_STR_VER="${ATSRC_PACKAGE_NAME} ${ATSRC_PACKAGE_VER}" +ATSRC_PACKAGE_LICENSE="Boost Software License 1.0" +ATSRC_PACKAGE_PRE="test -d boost_1_50_0" +ATSRC_PACKAGE_CO=([0]="wget -N http://sourceforge.net/projects/boost/files/boost/1.50.0/boost_1_50_0.tar.bz2") +ATSRC_PACKAGE_POST="tar -xjf boost_1_50_0.tar.bz2" +ATSRC_PACKAGE_SRC="${AT_BASE}/sources/boost_1_50_0" +ATSRC_PACKAGE_WORK=${AT_WORK_PATH}/boost +ATSRC_PACKAGE_MLS="" +ATSRC_PACKAGE_ALOC="" +ATSRC_PACKAGE_PATCHES="" +ATSRC_PACKAGE_TARS="" +ATSRC_PACKAGE_MAKE_CHECK="" +ATSRC_PACKAGE_DISTRIB=no +ATSRC_PACKAGE_BUILDCROSS=no +ATSRC_PACKAGE_BUNDLE=mcore-libs + +atsrc_get_patches () +{ + at_get_patch \ + https://github.com/powertechpreview/powertechpreview/raw/master/Boost%20Patches/boost-1.50-qi_parse.tgz \ + 4328eb714909d1a25d60b50ed97c9d79 || return ${?} +} + +atsrc_apply_patches () +{ + tar xzf boost-1.50-qi_parse.tgz \ + && patch -p1 < boost-1.50-qi_parse.patch \ + || return ${?} +} diff --git a/configs/6.0/packages/boost/specfile b/configs/6.0/packages/boost/specfile new file mode 100644 index 000000000..d46c60911 --- /dev/null +++ b/configs/6.0/packages/boost/specfile @@ -0,0 +1,14 @@ +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# diff --git a/configs/6.0/packages/boost/stage_1 b/configs/6.0/packages/boost/stage_1 new file mode 100644 index 000000000..e1cf56c5f --- /dev/null +++ b/configs/6.0/packages/boost/stage_1 @@ -0,0 +1,99 @@ +#!/usr/bin/env bash +# +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# Boost build parameters for stage 1 32/64 bits +# ========================================= +# + +# Include some standard functions +source ${utilities}/bitsize_selection.sh + +# Tell the build system to hold the temp install folder +ATCFG_HOLD_TEMP_INSTALL='no' +# Tell the build system to hold the temp build folder +ATCFG_HOLD_TEMP_BUILD='no' +# Build in the source code directory +ATCFG_BUILD_STAGE_T='link' + +atcfg_pre_hacks () +{ + local libdir=$(find_build_libdir ${AT_BIT_SIZE}) + + if [[ "${AT_BIT_SIZE}" -eq "32" ]]; then + # Clear the build and than apply a hack for SLES 11 + # SLES 11 doesnt provide a symlink named libbz2.so that points + # to its 32-bit version, so the linker does not find it. + mkdir -p ${at_active_build}/tmp + local libbz2=$(find /lib /usr/lib -name "libbz2.so.1.*" 2> \ + /dev/null | head -n 1) + if [[ -n "${libbz2}" ]]; then + ln -s ${libbz2} ${at_active_build}/tmp/libbz2.so + fi + local linker_flags="linkflags=-L${at_active_build}/tmp" + fi + + # The build of Boost is memory hungry. The compilation of some files + # uses too much RAM and we have to limit the amount of threads in order + # to protect it against OOM. + # 490 MiB / thread is known to be a safe value. + local mem=$(free -m | awk '/Mem/ { print $2 }') + THREADS=$(expr ${mem} / 490) + # It doesn't make sense to run more threads than the amount of cores + # available. + [[ ${THREADS} -gt ${num_cores} ]] && THREADS=${num_cores} + # Workaround a bug on b2 + # It segfaults when building Boost with more than 32 threads. We + # prevent this limiting the number of threads to 32. + [[ ${THREADS} -gt 32 ]] && THREADS=32 + B2_PARAM="-j ${THREADS} \ + -q \ + --build-dir=${at_active_build}/build \ + --stagedir=${at_active_build}/stage \ + --libdir=${install_transfer}/${libdir} \ + address-model=${AT_BIT_SIZE} \ + cflags=-O3 \ + cxxflags=-O3 \ + link=static,shared \ + ${linker_flags}" +} + + +atcfg_configure () +{ + # Avoid using 32-bit Python because AT only builds for 64 bits.' + if [[ ${AT_BIT_SIZE} -eq 32 ]]; then + local extra_parms="--without-libraries=python" + else + local python_exe=$(ls -d ${at_dest}/bin/python[0-9].[0-9]) + local extra_parms="--with-python=${python_exe} \ + --with-python-root=${at_dest}" + fi + + PATH=${at_dest}/bin:${PATH} \ + ./bootstrap.sh --prefix="${install_transfer}" \ + ${extra_parms} +} + +atcfg_make () +{ + PATH=${at_dest}/bin:${PATH} ./b2 -a ${B2_PARAM} +} + +atcfg_install () +{ + PATH=${at_dest}/bin:${PATH} ./b2 ${B2_PARAM} install +} diff --git a/configs/6.0/packages/expat/expat.mk b/configs/6.0/packages/expat/expat.mk new file mode 100644 index 000000000..86bd38a11 --- /dev/null +++ b/configs/6.0/packages/expat/expat.mk @@ -0,0 +1,25 @@ +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# +# +$(eval $(call set_provides,expat_1,single,cross_yes)) + +expat_1: $(RCPTS)/expat_1.rcpt + +$(RCPTS)/expat_1.rcpt: $(expat_1-archdeps) + @touch $@ + +$(RCPTS)/expat_1.a.rcpt: $(patsubst %,$(RCPTS)/%.rcpt,gcc_4 rsync_expat) + @touch $@ diff --git a/configs/6.0/packages/expat/sources b/configs/6.0/packages/expat/sources new file mode 100644 index 000000000..9ab0ad4e7 --- /dev/null +++ b/configs/6.0/packages/expat/sources @@ -0,0 +1,40 @@ +#!/usr/bin/env bash +# +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# GLIBC source package and build info +# =================================== +# + +ATSRC_PACKAGE_NAME="Expat XML Parser" +ATSRC_PACKAGE_VER=2.0.1 +ATSRC_PACKAGE_DOCLINK="http://www.xml.com/pub/a/1999/09/expat/index.html" +ATSRC_PACKAGE_RELFIXES= +ATSRC_PACKAGE_STR_VER="${ATSRC_PACKAGE_NAME} ${ATSRC_PACKAGE_VER}" +ATSRC_PACKAGE_LICENSE="MIT License" +ATSRC_PACKAGE_PRE="test -d expat-${ATSRC_PACKAGE_VER}" +ATSRC_PACKAGE_CO=([0]="wget -N http://downloads.sourceforge.net/project/expat/expat/${ATSRC_PACKAGE_VER}/expat-${ATSRC_PACKAGE_VER}.tar.gz") +ATSRC_PACKAGE_POST="tar -xzf expat-${ATSRC_PACKAGE_VER}.tar.gz" +ATSRC_PACKAGE_SRC=${AT_BASE}/sources/expat-${ATSRC_PACKAGE_VER} +ATSRC_PACKAGE_WORK=${AT_WORK_PATH}/expat +ATSRC_PACKAGE_MLS= +ATSRC_PACKAGE_PATCHES= +ATSRC_PACKAGE_ALOC= +ATSRC_PACKAGE_TARS= +ATSRC_PACKAGE_MAKE_CHECK= +ATSRC_PACKAGE_DISTRIB=no +ATSRC_PACKAGE_BUILDCROSS=yes +ATSRC_PACKAGE_BUNDLE=toolchain diff --git a/configs/6.0/packages/expat/specfile b/configs/6.0/packages/expat/specfile new file mode 100644 index 000000000..d46c60911 --- /dev/null +++ b/configs/6.0/packages/expat/specfile @@ -0,0 +1,14 @@ +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# diff --git a/configs/6.0/packages/expat/stage_1 b/configs/6.0/packages/expat/stage_1 new file mode 100644 index 000000000..ff9b0b56b --- /dev/null +++ b/configs/6.0/packages/expat/stage_1 @@ -0,0 +1,66 @@ +#!/usr/bin/env bash +# +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# Expat build parameters for stage 1 +# ========================================= +# + +# Tell the build system to hold the temp install folder +ATCFG_HOLD_TEMP_INSTALL='no' +# Tell the build system to hold the temp build folder +ATCFG_HOLD_TEMP_BUILD='no' +# Build in a new directory +ATCFG_BUILD_STAGE_T='dir' + +atcfg_configure() { + # Expat is built for the same architecture GDB is built to. + # Which means that in a cross compiler build it's build for the host + # architecture (i.e. i686) instead of the target arch (i.e. ppc64). + + # Default values for native builds + local cc_path="${at_dest}/bin/gcc -m${compiler}" + local libdir="${at_dest}/lib${compiler##32}" + if [[ "${cross_build}" == "yes" ]]; then + # Cross compiler settings + cc_path="${system_cc}" + libdir="${at_dest}/lib" + fi + + PATH=${at_dest}/bin:${PATH} \ + CC="${cc_path}" \ + CFLAGS="-g -O3" CXXFLAGS="-g -O3" \ + ${ATSRC_PACKAGE_WORK}/configure \ + --build=${host} \ + --host=${host} \ + --prefix=${at_dest} \ + --exec-prefix=${at_dest} \ + --libdir="${libdir}" \ + --bindir="${at_dest}/bin" \ + --mandir="${at_dest}/share/man" \ + --disable-shared +} + + +atcfg_make() { + PATH=${at_dest}/bin:${PATH} ${SUB_MAKE} +} + + +atcfg_install() { + PATH=${at_dest}/bin:${PATH} \ + ${SUB_MAKE} install DESTDIR=${install_place} +} diff --git a/configs/6.0/packages/gcc/gcc.mk b/configs/6.0/packages/gcc/gcc.mk new file mode 100644 index 000000000..e64f002d7 --- /dev/null +++ b/configs/6.0/packages/gcc/gcc.mk @@ -0,0 +1,72 @@ +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# +# +$(eval $(call set_provides,gcc_1,single,cross_yes)) +$(eval $(call set_provides,gcc_2,single,cross_yes)) +$(eval $(call set_provides,gcc_3,single,cross_yes)) +$(eval $(call set_provides,gcc_4,single,cross_yes)) + +# List of dependencies in order to build the tuned libraries. +gcc_tuned-deps := $(RCPTS)/gcc_4.rcpt +# Enable tuned targets +$(eval $(call provide_tuneds,gcc)) + +# gcc_4 doesn't require mpc_2 on cross. +ifeq ($(CROSS_BUILD),no) + gcc_4-reqs += $(RCPTS)/mpc_2.rcpt +endif + + +gcc_1: $(RCPTS)/gcc_1.rcpt + +gcc_2: $(RCPTS)/gcc_2.rcpt + +gcc_3: $(RCPTS)/gcc_3.rcpt + +gcc_4: $(RCPTS)/gcc_4.rcpt + +gcc_tuned: $(RCPTS)/gcc_tuned.rcpt + +$(RCPTS)/gcc_1.rcpt: $(gcc_1-archdeps) + @touch $@ + +$(RCPTS)/gcc_2.rcpt: $(gcc_2-archdeps) + @touch $@ + +$(RCPTS)/gcc_3.rcpt: $(gcc_3-archdeps) + @touch $@ + +$(RCPTS)/gcc_4.rcpt: $(gcc_4-archdeps) + @touch $@ + + +$(RCPTS)/gcc_1.a.rcpt: $(RCPTS)/binutils_1.rcpt \ + $(RCPTS)/mpc_1.rcpt \ + $(RCPTS)/kernel_h.rcpt \ + $(RCPTS)/rsync_gcc.rcpt + @touch $@ + +$(RCPTS)/gcc_2.a.rcpt: $(RCPTS)/glibc_h.rcpt + @touch $@ + +$(RCPTS)/gcc_3.a.rcpt: $(RCPTS)/ldconfig_1.rcpt + @touch $@ + +$(RCPTS)/gcc_4.a.rcpt: $(RCPTS)/binutils_2.rcpt $(gcc_4-reqs) + @touch $@ + +$(RCPTS)/gcc_tuned.rcpt: $(gcc_tuned-archdeps) + @touch $@ diff --git a/configs/6.0/packages/gcc/sources b/configs/6.0/packages/gcc/sources new file mode 100644 index 000000000..2a77f7f70 --- /dev/null +++ b/configs/6.0/packages/gcc/sources @@ -0,0 +1,43 @@ +#!/usr/bin/env bash +# +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# Include sources used functions +# ============================== +source "${utilities}/sources_expandable.sh" + +# GCC source package and build info +# ================================= +ATSRC_PACKAGE_NAME="GNU Compiler Collection" +ATSRC_PACKAGE_VER=4.7 +ATSRC_PACKAGE_REV=198644 +ATSRC_PACKAGE_STR_VER="${ATSRC_PACKAGE_NAME} ${ATSRC_PACKAGE_VER}-ibm-r${ATSRC_PACKAGE_REV}" +ATSRC_PACKAGE_LICENSE="GPL 3.0" +ATSRC_PACKAGE_DOCLINK="http://gcc.gnu.org/onlinedocs/gcc-4.7.1/gcc/" +ATSRC_PACKAGE_NAMESUFFIX="$(supported_languages ${build_gcc_languages})" +ATSRC_PACKAGE_PRE="test -d gcc-${ATSRC_PACKAGE_VER}-${ATSRC_PACKAGE_REV}" +ATSRC_PACKAGE_CO=([0]="svn co --revision ${ATSRC_PACKAGE_REV} svn://gcc.gnu.org/svn/gcc/branches/ibm/gcc-4_7-branch") +ATSRC_PACKAGE_POST="mv gcc-4_7-branch gcc-${ATSRC_PACKAGE_VER}-${ATSRC_PACKAGE_REV}" +ATSRC_PACKAGE_SRC=${AT_BASE}/sources/gcc-${ATSRC_PACKAGE_VER}-${ATSRC_PACKAGE_REV} +ATSRC_PACKAGE_WORK=${AT_WORK_PATH}/gcc +ATSRC_PACKAGE_MLS= +ATSRC_PACKAGE_ALOC="http://downloads.sourceforge.net/sourceforge/powertechprev/ppc64-gcc-4.7-libstdc++.tgz" +ATSRC_PACKAGE_PATCHES= +ATSRC_PACKAGE_TARS="ppc64-gcc-4.7-libstdc++.tgz" +ATSRC_PACKAGE_MAKE_CHECK= +ATSRC_PACKAGE_DISTRIB=yes +ATSRC_PACKAGE_BUILDCROSS=yes +ATSRC_PACKAGE_BUNDLE=toolchain diff --git a/configs/6.0/packages/gcc/specfile b/configs/6.0/packages/gcc/specfile new file mode 100644 index 000000000..d46c60911 --- /dev/null +++ b/configs/6.0/packages/gcc/specfile @@ -0,0 +1,14 @@ +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# diff --git a/configs/6.0/packages/gcc/stage_1 b/configs/6.0/packages/gcc/stage_1 new file mode 100644 index 000000000..8199f3dc8 --- /dev/null +++ b/configs/6.0/packages/gcc/stage_1 @@ -0,0 +1,183 @@ +#!/usr/bin/env bash +# +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# GCC build parameters for stage 1 +# ================================ +# + +ATCFG_HOLD_TEMP_INSTALL='no' +ATCFG_HOLD_TEMP_BUILD='no' +# Build in a new directory +ATCFG_BUILD_STAGE_T='dir' + +# GCC BUILD HACKS +# ========================================================= +# Required pre build hacks +atcfg_pre_hacks() { + # Overwrite the existing DEV-PHASE with Advance-Toolchain-XX + mv ${ATSRC_PACKAGE_WORK}/gcc/DEV-PHASE ${ATSRC_PACKAGE_WORK}/gcc/DEV-PHASE.back + echo "Advance-Toolchain-${at_major_internal}" > ${ATSRC_PACKAGE_WORK}/gcc/DEV-PHASE + # Overwrite the existing REVISION with the current SVN revision date + mv ${ATSRC_PACKAGE_WORK}/gcc/REVISION ${ATSRC_PACKAGE_WORK}/gcc/REVISION.back + sed "s/[0-9]*]$/"${ATSRC_PACKAGE_REV}"]/" ${ATSRC_PACKAGE_WORK}/gcc/REVISION.back > ${ATSRC_PACKAGE_WORK}/gcc/REVISION +} + + +# ATCFG_CONFIGURE SETTINGS +# ========================================================= +# Pre configure settings or commands to run +atcfg_pre_configure() { + cc_64=${system_cc} + cxx_64=${system_cxx} + libdir="${at_dest}/lib" + if [[ "${cross_build}" == "no" ]]; then + if [[ "${build_arch}" == "ppc64" ]]; then + if [[ "${default_compiler}" == "32" ]]; then + cc_64="${gcc64}" + cxx_64="${gpp64}" + fi + libdir="${at_dest}/lib64" + fi + fi +} +# Conditional configure command +atcfg_configure() { + if [[ "${cross_build}" == "no" ]]; then + # Configure command for native builds + CC="${cc_64}" \ + CXX="${cxx_64}" \ + AS="${at_dest}/bin/as" \ + LD="${at_dest}/bin/ld" \ + ${ATSRC_PACKAGE_WORK}/configure \ + --build=${host} \ + --host=${host} \ + --target=${target} \ + --with-cpu=${default_cpu} \ + --prefix="${at_dest}" \ + ${secure_plt:+--enable-secureplt} \ + ${disable_multilib:+--disable-multilib} \ + --disable-threads \ + --disable-shared \ + --disable-libmudflap \ + --disable-libssp \ + --disable-bootstrap \ + --disable-libgomp \ + --disable-lto \ + --with-mpfr-include="${at_dest}/include" \ + --with-mpfr-lib="${libdir}" \ + --with-gmp-include="${at_dest}/include" \ + --with-gmp-lib="${libdir}" \ + --with-mpc-include="${at_dest}/include" \ + --with-mpc-lib="${libdir}" \ + --enable-languages=c,c++ \ + --with-as="${at_dest}/bin/as" \ + --with-ld="${at_dest}/bin/ld" + else + # Configure command for cross builds + CC="${cc_64}" \ + CXX="${cxx_64}" \ + AS="${at_dest}/bin/${target}-as" \ + LD="${at_dest}/bin/${target}-ld" \ + AR="${at_dest}/bin/${target}-ar" \ + RANLIB="${at_dest}/bin/${target}-ranlib" \ + AS_FOR_TARGET="${at_dest}/bin/${target}-as" \ + AR_FOR_TARGET="${at_dest}/bin/${target}-ar" \ + RANLIB_FOR_TARGET="${at_dest}/bin/${target}-ranlib" \ + ${ATSRC_PACKAGE_WORK}/configure \ + --build=${host} \ + --host=${host} \ + --target=${target64:-${target}} \ + --with-cpu=${default_cpu} \ + --prefix="${at_dest}" \ + ${secure_plt:+--enable-secureplt} \ + ${disable_multilib:+--disable-multilib} \ + --disable-threads \ + --disable-shared \ + --disable-libmudflap \ + --disable-libssp \ + --disable-bootstrap \ + --disable-libgomp \ + --disable-decimal-float \ + --disable-libquadmath \ + --with-mpfr-include="${at_dest}/include" \ + --with-mpfr-lib="${libdir}" \ + --with-gmp-include="${at_dest}/include" \ + --with-gmp-lib="${libdir}" \ + --with-mpc-include="${at_dest}/include" \ + --with-mpc-lib="${libdir}" \ + --enable-languages=c \ + --with-as="${at_dest}/bin/${target}-as" \ + --with-ld="${at_dest}/bin/${target}-ld" \ + --with-newlib \ + --without-headers + fi +} + +# Make build command +atcfg_make() { + ${SUB_MAKE} all +} + +# Pre install settings or commands to run +atcfg_pre_install() { + # The cross compiler must be able to install the target host binaries + # properly, but to do so it needs these folders created, as the + # binutils package will do so on its install. As our installs are + # atomic, we need to provide them before hand, so GCC finds it and + # places its files there properly. + if [[ "${cross_build}" == "yes" ]]; then + [[ -d "${install_place}/${at_dest}/${target}/bin" ]] || \ + mkdir -p "${install_place}/${at_dest}/${target}/bin" + [[ -d "${install_place}/${at_dest}/${target}/lib" ]] || \ + mkdir -p "${install_place}/${at_dest}/${target}/lib" + fi +} + +# Install build command +atcfg_install() { + make install -j1 DESTDIR=${install_place} +} + +# Post install settings or commands to run +atcfg_post_install() { + # Create the required symlinks to install + if [[ "${cross_build}" == "no" ]]; then + pushd ${install_place}/${at_dest}/bin + if [[ ! -e ${target}-gcc ]]; then + echo -e "#!/bin/bash\nexec ${at_dest}/bin/gcc \"${@}\"" > ${target}-gcc + chmod a+x ${target}-gcc + fi + if [[ ! -e ${target}-g++ ]]; then + echo -e "#!/bin/bash\nexec ${at_dest}/bin/g++ \"${@}\"" > ${target}-g++ + chmod a+x ${target}-g++ + fi + if [[ ! -e ${target}-c++ ]]; then + ln -f ${target}-g++ ${target}-c++ + fi + popd + # The following files will be installed by GLIBC, so no need to have them properly + # mapped into the filelist (not installed into ${install_place} for mapping) + if [[ ! -e "${at_dest}/lib/ld.so.1" ]]; then + ln -s /lib/ld.so.1 "${at_dest}/lib/ld.so.1" + fi + if [[ ! -e "${at_dest}/lib/libc.so.6" ]]; then + ln -s /lib/libc.so.6 "${at_dest}/lib/libc.so.6" + fi + # Remove unnecessary python scripts + find "${install_place}/${at_dest}" -name "libstdc++.so.*-gdb.py" -print -delete + fi +} diff --git a/configs/6.0/packages/gcc/stage_2 b/configs/6.0/packages/gcc/stage_2 new file mode 100644 index 000000000..6cf2fcea7 --- /dev/null +++ b/configs/6.0/packages/gcc/stage_2 @@ -0,0 +1,189 @@ +#!/usr/bin/env bash +# +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# GCC build parameters for stage 2 +# ================================ +# + +ATCFG_HOLD_TEMP_INSTALL='no' +ATCFG_HOLD_TEMP_BUILD='no' +# Build in a new directory +ATCFG_BUILD_STAGE_T='dir' + +# Required post install hacks (this one is run after the final install move) +atcfg_posti_hacks() { + # Hack the static library to satisfy GLIBC build + for LIB in $(find "${at_dest}/lib" -name libgcc.a); do + [[ -e ${LIB%\.a}_eh.a ]] || ln -s libgcc.a ${LIB%\.a}_eh.a + [[ -e ${LIB%\.a}_s.a ]] || ln -s libgcc.a ${LIB%\.a}_s.a + done +} + +# Pre configure settings or commands to run +atcfg_pre_configure() { + cc_64="${system_cc}" + cxx_64="${system_cxx}" + libdir="${at_dest}/lib" + if [[ "${cross_build}" == "no" ]]; then + if [[ "${build_arch}" == "ppc64" ]]; then + if [[ "${default_compiler}" == "32" ]]; then + cc_64="${gcc64}" + cxx_64="${gpp64}" + fi + libdir="${at_dest}/lib64" + fi + fi +} + +# Configure command +atcfg_configure() { + if [[ "${cross_build}" == "no" ]]; then + # Configure command for native builds + CC="${cc_64}" \ + CXX="${cxx_64}" \ + CFLAGS="-O2" \ + CXXFLAGS="-O2" \ + AS="${at_dest}/bin/as" \ + LD="${at_dest}/bin/ld" \ + ${ATSRC_PACKAGE_WORK}/configure \ + --build=${target64:-${target}} \ + --host=${target64:-${target}} \ + --target=${target64:-${target}} \ + --with-cpu=${default_cpu} \ + --prefix=${at_dest} \ + ${with_longdouble:+--with-long-double-128} \ + ${with_dfp_standalone:+--enable-decimal-float} \ + ${secure_plt:+--enable-secureplt} \ + ${disable_multilib:+--disable-multilib} \ + --enable-threads=posix \ + --enable-languages=c,c++ \ + --enable-__cxa_atexit \ + --disable-shared \ + --disable-checking \ + --disable-libmudflap \ + --disable-libssp \ + --disable-lto \ + --disable-libgomp \ + --without-ppl \ + --without-cloog \ + --with-gmp-include="${at_dest}/include" \ + --with-gmp-lib=${libdir} \ + --with-mpfr-include="${at_dest}/include" \ + --with-mpfr-lib=${libdir} \ + --with-mpc-include="${at_dest}/include" \ + --with-mpc-lib=${libdir} \ + --with-as="${at_dest}/bin/as" \ + --with-ld="${at_dest}/bin/ld" + else + # Configure command for cross builds + CC="${cc_64}" \ + CXX="${cxx_64}" \ + LD="${at_dest}/bin/${target}-ld" \ + AS="${at_dest}/bin/${target}-as" \ + AR="${at_dest}/bin/${target}-ar" \ + NM="${at_dest}/bin/${target}-nm" \ + RANLIB="${at_dest}/bin/${target}-ranlib" \ + AS_FOR_TARGET="${at_dest}/bin/${target}-as" \ + AR_FOR_TARGET="${at_dest}/bin/${target}-ar" \ + NM_FOR_TARGET="${at_dest}/bin/${target}-nm" \ + RANLIB_FOR_TARGET="${at_dest}/bin/${target}-ranlib" \ + ${ATSRC_PACKAGE_WORK}/configure \ + --build=${host} \ + --host=${host} \ + --target=${target64:-${target}} \ + --with-cpu=${default_cpu} \ + --prefix=${at_dest} \ + ${with_longdouble:+--with-long-double-128} \ + ${secure_plt:+--enable-secureplt} \ + ${disable_multilib:+--disable-multilib} \ + --enable-languages=c \ + --enable-__cxa_atexit \ + --enable-threads=posix \ + --disable-libmudflap \ + --disable-libssp \ + --disable-libgomp \ + --disable-libquadmath \ + --disable-lto \ + --disable-decimal-float \ + --with-mpfr-include="${at_dest}/include" \ + --with-mpfr-lib=${libdir} \ + --with-gmp-include="${at_dest}/include" \ + --with-gmp-lib=${libdir} \ + --with-mpc-include="${at_dest}/include" \ + --with-mpc-lib=${libdir} \ + --without-ppl \ + --without-cloog \ + --with-host-libstdcxx="-L${libdir} -lstdc++ -lsupc++ -lm -lgmp -lgmpxx -lmpfr -lmpc" \ + --with-build-sysroot="${dest_cross}" \ + --with-sysroot="${dest_cross}" \ + --with-headers="${dest_cross}/usr/include" + fi +} + +# Make build command +atcfg_make() { + ${SUB_MAKE} all +} + +# Pre install settings or commands to run +atcfg_pre_install() { + # The cross compiler must be able to install the target host binaries + # properly, but to do so it needs these folders created, as the + # binutils package will do so on its install. As our installs are + # atomic, we need to provide them before hand, so GCC finds it and + # places its files there properly. + if [[ "${cross_build}" == "yes" ]]; then + [[ -d "${install_place}/${at_dest}/${target}/bin" ]] || \ + mkdir -p "${install_place}/${at_dest}/${target}/bin" + [[ -d "${install_place}/${at_dest}/${target}/lib" ]] || \ + mkdir -p "${install_place}/${at_dest}/${target}/lib" + fi +} + +# Install build command +atcfg_install() { + make install -j1 DESTDIR=${install_place} +} + +# Post install settings or commands to run +atcfg_post_install() { + # Fixes to cross build install + if [[ "${cross_build}" == "yes" ]]; then + # This copy is required because gcc has a problem in the cross build, + # the sys-include folder is created directly into destination prefix, + # but this brokes the isolated install build that we use, and these files + # are missed in the final file list generated for the RPM build + cp -a ${at_dest}/${target}/sys-include \ + ${install_place}/${at_dest}/${target} + # Create the required symlinks to install + pushd ${install_place}/${at_dest}/bin + if [[ ! -e ${target}-gcc ]]; then + echo -e "#!/bin/bash\nexec ${at_dest}/bin/gcc \"${@}\"" > ${target}-gcc + chmod a+x ${target}-gcc + fi + if [[ ! -e ${target}-g++ ]]; then + echo -e "#!/bin/bash\nexec ${at_dest}/bin/g++ \"${@}\"" > ${target}-g++ + chmod a+x ${target}-g++ + fi + if [[ ! -e ${target}-c++ ]]; then + ln -f ${target}-g++ ${target}-c++ + fi + popd + fi + # Remove unnecessary python scripts + find "${install_place}/${at_dest}" -name "libstdc++.so.*-gdb.py" -print -delete +} diff --git a/configs/6.0/packages/gcc/stage_3 b/configs/6.0/packages/gcc/stage_3 new file mode 100644 index 000000000..30687dba5 --- /dev/null +++ b/configs/6.0/packages/gcc/stage_3 @@ -0,0 +1,184 @@ +#!/usr/bin/env bash +# +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# GCC build parameters for stage 3 +# ================================ +# + +ATCFG_HOLD_TEMP_INSTALL='no' +ATCFG_HOLD_TEMP_BUILD='no' +# Build in a new directory +ATCFG_BUILD_STAGE_T='dir' +# Don't fail if final stage install place wasn't built +if [[ "${cross_build}" == "yes" ]]; then + ATCFG_INSTALL_PEDANTIC="no" +fi + +# GCC BUILD HACKS +# ========================================================= +# Required pre build hacks +atcfg_pre_hacks() { + # Clean static lib hack done on gcc stage 2 for GLIBC build. + for Z in $(find "${at_dest}/lib" -name libgcc.a); do + [[ -h ${Z%\.a}_s.a ]] && rm -f ${Z%\.a}_s.a + [[ -h ${Z%\.a}_eh.a ]] && rm -f ${Z%\.a}_eh.a + done + # Patch GCC source to use correct GLIBC (if not patched yet). + check_gcc=$(grep rpath ${ATSRC_PACKAGE_WORK}/gcc/config/rs6000/linux64.h | sed "s/.*rpath.*/rpath/" | head -n 1) + if [[ -z ${check_gcc} ]]; then + s1="s@\(GLIBC_DYNAMIC_LINKER[^/]*\)\( \"\)\(.*\)@\1\2"${at_dest}"\3@" + s2="s@%{!shared: %{!static:@%{!static: %{!shared:@" + s3="s@\(GNU_USER_DYNAMIC_LINKER32 \"\}\}\)@\1 --enable-new-dtags -rpath "${at_dest}"\/lib@" + s4="s@\(GNU_USER_DYNAMIC_LINKER64 \"\}\}\)@\1 --enable-new-dtags -rpath "${at_dest}"\/lib64@" + s5="s@\(GNU_USER_DYNAMIC_LINKER \"\}\}\)@\1 --enable-new-dtags -rpath "${at_dest}"\/lib@" + for F in ${ATSRC_PACKAGE_WORK}/gcc/config/rs6000/{linux64.h,sysv4.h}; do + sed -e "${s1}" -e "${s2}" -e "${s3}" -e "${s4}" -e "${s5}" < "${F}" > tmp.$$ && \ + { cmp -s tmp.$$ "${F}" || mv -f tmp.$$ "${F}"; } || \ + exit 1 + rm -f tmp.$$ + done + # Check and validate the applied patch + check_gcc=$(grep rpath ${ATSRC_PACKAGE_WORK}/gcc/config/rs6000/linux64.h | sed "s/.*rpath.*/rpath/" | head -n 1) + if [[ -z ${check_gcc} ]]; then + # Restore original files for sanity. The sed lines above append + # text to the original line, not replace them. + cp ${ATSRC_PACKAGE_SRC}/gcc/config/rs6000/linux64.h ${ATSRC_PACKAGE_WORK}/gcc/config/rs6000/ + cp ${ATSRC_PACKAGE_SRC}/gcc/config/rs6000/sysv4.h ${ATSRC_PACKAGE_WORK}/gcc/config/rs6000/ + echo "Failed patching gcc for stage 3 build." + exit 1 + fi + fi + # Should run only on a native build... Skip these on cross + if [[ "${cross_build}" == "no" ]]; then + # Hack required to avoid a bug where gcc picks up the wrong crti.o, + # causing ld to segfault in the stage3 build. We move the GCC required + # static libs to a separate place and use it in the build. + if [[ ! -d "${at_dest}/tmp/gcc_3" ]]; then + mkdir -p ${at_dest}/tmp/gcc_3 + fi + if [[ "${build_arch}" == "ppc64" ]]; then + cp -t ${at_dest}/tmp/gcc_3 \ + ${at_dest}/lib64/*gmp* \ + ${at_dest}/lib64/*mpfr* \ + ${at_dest}/lib64/*mpc* + else + cp -t ${at_dest}/tmp/gcc_3 \ + ${at_dest}/lib/*gmp* \ + ${at_dest}/lib/*mpfr* \ + ${at_dest}/lib/*mpc* + fi + fi +} +# Required post install hacks (this one is run after the final install move) +atcfg_posti_hacks() { + # Cleanup the temp files + rm -rf ${at_dest}/tmp +} + + +# ATCFG_CONFIGURE SETTINGS +# ========================================================= +# Conditional pre-configure directives +atcfg_pre_configure() { + if [[ "${cross_build}" == "no" ]]; then + # Pre configure settings or commands to run + cc_64=${system_cc} + cxx_64=${system_cxx} + libdir="${at_dest}/tmp/gcc_3" + if [[ "${cross_build}" == "no" ]]; then + if [[ "${build_arch}" == "ppc64" ]]; then + if [[ "${default_compiler}" == "32" ]]; then + cc_64="${gcc64}" + cxx_64="${gpp64}" + fi + fi + fi + fi +} +# Conditional configure directives +atcfg_configure() { + if [[ "${cross_build}" == "no" ]]; then + # Configure command for native builds + CC="${cc_64}" \ + CXX="${cxx_64}" \ + CFLAGS="-O2 -mminimal-toc" \ + CXXFLAGS="-O2 -mminimal-toc" \ + AS="${at_dest}/bin/as" \ + LD="${at_dest}/bin/ld" \ + LDFLAGS="-L${libdir}" \ + ${ATSRC_PACKAGE_WORK}/configure \ + --build=${target64:-$target} \ + --host=${target64:-$target} \ + --target=${target64:-$target} \ + --prefix="${at_dest}" \ + ${with_longdouble:+--with-long-double-128} \ + ${with_dfp_standalone:+--enable-decimal-float} \ + ${secure_plt:+--enable-secureplt} \ + ${disable_multilib:+--disable-multilib} \ + --enable-threads=posix \ + --enable-languages=c,c++ \ + --enable-__cxa_atexit \ + --enable-shared \ + --enable-checking=release \ + --enable-gnu-indirect-function \ + --disable-libgomp \ + --with-gmp-include="${at_dest}/include" \ + --with-gmp-lib=${libdir} \ + --with-mpfr-include="${at_dest}/include" \ + --with-mpfr-lib=${libdir} \ + --with-mpc-include="${at_dest}/include" \ + --with-mpc-lib=${libdir} \ + --without-ppl \ + --without-cloog \ + --without-libelf \ + --with-host-libstdcxx="-L${libdir} -lstdc++ -lsupc++ -lm -lgmp -lgmpxx -lmpfr -lmpc" \ + --with-as="${at_dest}/bin/as" \ + --with-ld="${at_dest}/bin/ld" \ + --with-cpu=${build_base_arch} \ + --with-tune=${build_optimization} + fi +} + + +# ATCFG_MAKE SETTINGS +# ========================================================= +# Conditional build directives +atcfg_make() { + if [[ "${cross_build}" == "no" ]]; then + # Make build command + ${SUB_MAKE} all + fi +} + + +# ATCFG_INSTALL SETTINGS +# ========================================================= +# Conditional install directives +atcfg_install() { + if [[ "${cross_build}" == "no" ]]; then + # Install build command + make install -j1 DESTDIR=${install_place} + fi +} +# Conditional post install settings or commands to run +atcfg_post_install() { + if [[ "${cross_build}" == "no" ]]; then + # Post install settings or commands to run + # Remove unnecessary python scripts + find "${install_place}/${at_dest}/lib" "${install_place}/${at_dest}/lib64" -name "libstdc++.so.*-gdb.py" -print -delete + fi +} diff --git a/configs/6.0/packages/gcc/stage_4 b/configs/6.0/packages/gcc/stage_4 new file mode 100644 index 000000000..d478dcbeb --- /dev/null +++ b/configs/6.0/packages/gcc/stage_4 @@ -0,0 +1,215 @@ +#!/usr/bin/env bash +# +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# GCC build parameters for stage 4 +# ================================ +# + +ATCFG_HOLD_TEMP_INSTALL='no' +ATCFG_HOLD_TEMP_BUILD='no' +# Build in a new directory +ATCFG_BUILD_STAGE_T='dir' + + +# ATCFG_CONFIGURE SETTINGS +# ========================================================= +# Conditional configure command +atcfg_configure() { + if [[ "${cross_build}" == "no" ]]; then + # Configure command for native builds + PATH=${at_dest}/bin:${PATH} \ + CC="${at_dest}/bin/gcc" \ + CFLAGS="-O2" \ + CXXFLAGS="-O2" \ + CFLAGS_FOR_TARGET="-O3" \ + CXXFLAGS_FOR_TARGET="-O3" \ + AS="${at_dest}/bin/as" \ + LD="${at_dest}/bin/ld" \ + LDFLAGS="-L${at_dest}/lib64" \ + ${ATSRC_PACKAGE_WORK}/configure \ + --build=${target64:-$target} \ + --host=${target64:-$target} \ + --target=${target64:-$target} \ + --with-cpu=${default_cpu} \ + --prefix="${at_dest}" \ + ${with_longdouble:+--with-long-double-128} \ + ${with_dfp_standalone:+--enable-decimal-float} \ + ${secure_plt:+--enable-secureplt} \ + ${disable_multilib:+--disable-multilib} \ + --enable-threads=posix \ + --enable-languages=${build_gcc_languages} \ + --enable-__cxa_atexit \ + --enable-shared \ + --enable-checking=release \ + --enable-lto \ + --enable-gnu-indirect-function \ + --with-gmp-include="${at_dest}/include" \ + --with-gmp-lib="${at_dest}/lib64" \ + --with-mpfr-include="${at_dest}/include" \ + --with-mpfr-lib="${at_dest}/lib64" \ + --with-mpc-include="${at_dest}/include" \ + --with-mpc-lib="${at_dest}/lib64" \ + --without-ppl \ + --without-cloog \ + --without-libelf \ + --with-host-libstdcxx="-L${at_dest}/lib64 -lstdc++ -lsupc++ -lgmp -lgmpxx -lm" \ + --with-cpu=${build_base_arch} \ + --with-tune=${build_optimization} + else + # Configure command for cross builds + CC="${system_cc}" \ + CXX="${system_cxx}" \ + AS="${at_dest}/bin/${target}-as" \ + LD="${at_dest}/bin/${target}-ld" \ + NM="${at_dest}/bin/${target}-nm" \ + AR="${at_dest}/bin/${target}-ar" \ + RANLIB="${at_dest}/bin/${target}-ranlib" \ + AS_FOR_TARGET="${at_dest}/bin/${target}-as" \ + AR_FOR_TARGET="${at_dest}/bin/${target}-ar" \ + RANLIB_FOR_TARGET="${at_dest}/bin/${target}-ranlib" \ + NM_FOR_TARGET="${at_dest}/bin/${target}-nm" \ + ${ATSRC_PACKAGE_WORK}/configure \ + --build=${host} \ + --host=${host} \ + --target=${target64:-${target}} \ + --prefix="${at_dest}" \ + ${with_longdouble:+--with-long-double-128} \ + ${with_dfp:+--enable-decimal-float} \ + ${secure_plt:+--enable-secureplt} \ + ${disable_multilib:+--disable-multilib} \ + --enable-threads=posix \ + --enable-languages=${build_gcc_languages} \ + --enable-__cxa_atexit \ + --enable-shared \ + --enable-lto \ + --enable-gnu-indirect-function \ + --enable-cross \ + --disable-bootstrap \ + --with-as="${at_dest}/bin/${target}-as" \ + --with-ld="${at_dest}/bin/${target}-ld" \ + --with-gmp-include="${at_dest}/include" \ + --with-gmp-lib="${at_dest}/lib" \ + --with-mpfr-include="${at_dest}/include" \ + --with-mpfr-lib="${at_dest}/lib" \ + --with-mpc-include="${at_dest}/include" \ + --with-mpc-lib="${at_dest}/lib" \ + --without-ppl \ + --without-cloog \ + --without-libelf \ + --with-sysroot="${dest_cross}" \ + --with-host-libstdcxx="-L${at_dest}/lib -lstdc++ -lsupc++ -lgmp -lgmpxx -lm" \ + --with-cpu=${build_base_arch} \ + --with-tune=${build_optimization} + fi +} + + +# Conditional commands for native/cross builds +atcfg_pre_make() { + if [[ "${cross_build}" == "no" ]]; then + # Pre make settings or commands + pushd ${ATSRC_PACKAGE_WORK} + if [[ ! -r ppc64-gcc-4.7-libstdc++.patch ]]; then + echo "No gcc libstdc++ patch found!" + exit 1 + fi + # Ignore when the patch is already applied + patch -sfR --dry-run -p1 -i ppc64-gcc-4.7-libstdc++.patch > /dev/null \ + || patch -p1 < ppc64-gcc-4.7-libstdc++.patch + if [[ ${?} -ne 0 ]]; then + echo "Error applying gcc libstdc++ patch!" + exit 1 + fi + popd + fi +} + +# Make build command +atcfg_make() { + if [[ "${cross_build}" == "no" ]]; then + # Make build command + PATH=${at_dest}/bin:${PATH} ${SUB_MAKE} STAGE1_CFLAGS="-g -O" profiledbootstrap + else + PATH=${at_dest}/bin:${PATH} ${SUB_MAKE} STAGE1_CFLAGS="-g -O" + fi +} + +# Pre install settings or commands to run +atcfg_pre_install() { + # The cross compiler must be able to install the target host binaries + # properly, but to do so it needs these folders created, as the + # binutils package will do so on its install. As our installs are + # atomic, we need to provide them before hand, so GCC finds it and + # places its files there properly. + if [[ "${cross_build}" == "yes" ]]; then + [[ -d "${install_place}/${at_dest}/${target}/bin" ]] || \ + mkdir -p "${install_place}/${at_dest}/${target}/bin" + [[ -d "${install_place}/${at_dest}/${target}/lib" ]] || \ + mkdir -p "${install_place}/${at_dest}/${target}/lib" + fi +} + +# Install build command +atcfg_install() { + PATH=${at_dest}/bin:${PATH} \ + make install -j1 DESTDIR=${install_place} +} + +# Post install settings or commands to run +atcfg_post_install() { + if [[ "${cross_build}" == "yes" ]]; then + # Place some additional files for build process + mkdir -p ${install_place}/${dest_cross}/usr/lib + if [[ "${build_arch}" == "ppc64" ]]; then + # We need to manually copy these + cp -d ${install_place}/${at_dest}/${target64}/lib/libgcc_s.so* ${install_place}/${dest_cross}/usr/lib/ + cp -d ${install_place}/${at_dest}/${target64}/lib/libstdc++.so* ${install_place}/${dest_cross}/usr/lib/ + else + cp -d ${install_place}/${at_dest}/${target}/lib/libgcc_s.so* ${install_place}/${dest_cross}/usr/lib/ + cp -d ${install_place}/${at_dest}/${target}/lib/libstdc++.so* ${install_place}/${dest_cross}/usr/lib/ + fi + # This was needed to fix the cross build which defaults to ${target64} + # targets but now, we are assuming that every build should have the + # triple shortcut installed, so we create gcc ${target32}-* symlinks + pushd ${install_place}/${at_dest}/bin + for CMD in c++ cpp g++ gcc gcov gfortran; do + if [[ -x ${target64}-${CMD} ]] && \ + [[ ! -f ${target32}-${CMD} ]]; then + ln -sfn ${target64}-${CMD} ${target32}-${CMD} + fi + done + popd + else + pushd ${install_place}/${at_dest}/bin + # This is necessary for some applications to work + if [[ ! -e "cc" ]]; then + ln -s "gcc" "cc" + fi + popd + # Remove unnecessary python scripts + find "${install_place}/${at_dest}" -name "libstdc++.so.*-gdb.py" -print -delete + set -e + # Hack around to avoid ld.so.cache getting the libs from the + # system as ldconfig puts platform based directories preceding + # other directories. + for dir in "${install_transfer}/lib" "${install_transfer}/lib64"; do + ${AT_BASE}/scripts/utilities/create_lib_symlinks.sh \ + "${dir}" "${dir}/${build_load_arch}" + done + set +e + fi +} diff --git a/configs/6.0/packages/gcc/stage_optimized b/configs/6.0/packages/gcc/stage_optimized new file mode 100644 index 000000000..02ded127f --- /dev/null +++ b/configs/6.0/packages/gcc/stage_optimized @@ -0,0 +1,117 @@ +#!/usr/bin/env bash +# +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# GCC build parameters for stage optimized +# ======================================== +# + +ATCFG_HOLD_TEMP_INSTALL='no' +ATCFG_HOLD_TEMP_BUILD='no' +# Build in a new directory +ATCFG_BUILD_STAGE_T='dir' + +# Pre configure settings or commands to run +atcfg_pre_configure() { + # Check the need of a cross-compiler build + if [[ "${at_build_cpu}" == "${AT_OPTIMIZE_CPU}" ]]; then + echo cross-compiling=no >> ./configparms + else + echo cross-compiling=yes >> ./configparms + fi +} + +# Configure command for native builds +atcfg_configure() { + PATH=${at_dest}/bin:${PATH} \ + CC="${at_dest}/bin/gcc" \ + CFLAGS="-O2" \ + CXXFLAGS="-O2" \ + CFLAGS_FOR_TARGET="-O3" \ + CXXFLAGS_FOR_TARGET="-O3" \ + AS="${at_dest}/bin/as" \ + LD="${at_dest}/bin/ld" \ + LDFLAGS="-L${at_dest}/lib64" \ + ${ATSRC_PACKAGE_WORK}/configure \ + --build=${target64:-$target} \ + --host=${target64:-$target} \ + --target=${target64:-$target} \ + --prefix="${at_dest}" \ + ${with_longdouble:+--with-long-double-128} \ + ${with_dfp_standalone:+--enable-decimal-float} \ + ${secure_plt:+--enable-secureplt} \ + --enable-threads=posix \ + --enable-languages=${build_gcc_languages} \ + --enable-__cxa_atexit \ + --enable-shared \ + --enable-checking=release \ + --enable-gnu-indirect-function \ + --enable-lto \ + --disable-bootstrap \ + --with-gmp-include="${at_dest}/include" \ + --with-gmp-lib="${at_dest}/lib64" \ + --with-mpfr-include="${at_dest}/include" \ + --with-mpfr-lib="${at_dest}/lib64" \ + --with-mpc-include="${at_dest}/include" \ + --with-mpc-lib="${at_dest}/lib64" \ + --without-ppl \ + --without-cloog \ + --without-libelf \ + --with-host-libstdcxx="-L${at_dest}/lib64 -lstdc++ -lsupc++ -lgmp -lgmpxx -lm" \ + --with-cpu=${AT_OPTIMIZE_CPU/ppc/} \ + --with-tune=${AT_OPTIMIZE_CPU/ppc/} +} + +# Make build command +atcfg_make() { + PATH=${at_dest}/bin:${PATH} ${SUB_MAKE} all +} + +# Install build command +atcfg_install() { + PATH=${at_dest}/bin:${PATH} make install -j1 DESTDIR=${install_place} +} + +# Post install settings or commands to run +atcfg_post_install() { + # Remove unneeded install files + rm -rf ${install_place}/${at_dest}/lib/gcc + rm -rf $(find "${install_place}/${at_dest}" -type f -name "*.o" -print) + rm -rf $(find "${install_place}/${at_dest}" -type f -name "*.a" -print) + rm -rf $(find "${install_place}/${at_dest}" -type f -name "*.la" -print) + rm -rf $(find "${install_place}/${at_dest}" -type f -name "*.py" -print) + # Save all libraries into a tar file + pushd "${install_place}/${at_dest}/lib" + tar czf "${install_place}/${AT_OPTIMIZE_CPU}.tar.gz" \ + $(find . -name "*.so" -o -name "*.so.*") + popd + pushd "${install_place}/${at_dest}/lib64" + tar czf "${install_place}/${AT_OPTIMIZE_CPU}_64.tar.gz" \ + $(find . -name "*.so" -o -name "*.so.*") + popd + # Remove all installed built files + rm -rf "${install_place}/${at_dest}" + # Create processor lib/lib64 targets + mkdir -p "${install_place}/${at_dest}/lib/${AT_OPTIMIZE_CPU}" + mkdir -p "${install_place}/${at_dest}/lib64/${AT_OPTIMIZE_CPU}" + # Place saved libs on created final target + pushd "${install_place}/${at_dest}/lib/${AT_OPTIMIZE_CPU}" + tar xzf "${install_place}/${AT_OPTIMIZE_CPU}.tar.gz" + popd + pushd "${install_place}/${at_dest}/lib64/${AT_OPTIMIZE_CPU}" + tar xzf "${install_place}/${AT_OPTIMIZE_CPU}_64.tar.gz" + popd +} diff --git a/configs/6.0/packages/gdb/gdb.mk b/configs/6.0/packages/gdb/gdb.mk new file mode 100644 index 000000000..bade82fc5 --- /dev/null +++ b/configs/6.0/packages/gdb/gdb.mk @@ -0,0 +1,33 @@ +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# +# +$(eval $(call set_provides,gdb_1,single,cross_yes)) + +gdb-deps := +ifeq ($(CROSS_BUILD),no) + gdb-deps := python_1 +endif + +gdb_1: $(RCPTS)/gdb_1.rcpt + +$(RCPTS)/gdb_1.rcpt: $(gdb_1-archdeps) + @touch $@ + +$(RCPTS)/gdb_1.a.rcpt: $(patsubst %,$(RCPTS)/%.rcpt,gcc_4 \ + expat_1 \ + rsync_gdb \ + $(gdb-deps)) + @touch $@ diff --git a/configs/6.0/packages/gdb/sources b/configs/6.0/packages/gdb/sources new file mode 100644 index 000000000..d0a25f45d --- /dev/null +++ b/configs/6.0/packages/gdb/sources @@ -0,0 +1,42 @@ +#!/usr/bin/env bash +# +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# GDB source package and build info +# ================================= +# +ATSRC_PACKAGE_NAME="GDB" +ATSRC_PACKAGE_VER=7.5 +ATSRC_PACKAGE_REV=5c7aee5d +ATSRC_PACKAGE_DATE=20121128 +ATSRC_PACKAGE_STR_VER="${ATSRC_PACKAGE_NAME} ${ATSRC_PACKAGE_VER}${ATSRC_PACKAGE_REV:+-${ATSRC_PACKAGE_REV}}" +ATSRC_PACKAGE_LICENSE="" +ATSRC_PACKAGE_DOCLINK="http://sourceware.org/gdb/current/onlinedocs/gdb/" +ATSRC_PACKAGE_VERID="${ATSRC_PACKAGE_VER}${ATSRC_PACKAGE_REV:+-${ATSRC_PACKAGE_REV}}" +ATSRC_PACKAGE_PRE="test -d gdb-${ATSRC_PACKAGE_VER}${ATSRC_PACKAGE_REV:+-${ATSRC_PACKAGE_REV}}" +ATSRC_PACKAGE_CO=([0]="wget -O gdb-${ATSRC_PACKAGE_VERID}.tar.gz https://github.com/tuliom/at-gdb/archive/${ATSRC_PACKAGE_REV}.tar.gz") +ATSRC_PACKAGE_GIT= +ATSRC_PACKAGE_POST="tar -xzf gdb-${ATSRC_PACKAGE_VERID}.tar.gz --transform=s/at-gdb-${ATSRC_PACKAGE_REV}[^\\/]*/gdb-${ATSRC_PACKAGE_VERID}/" +ATSRC_PACKAGE_SRC="${AT_BASE}/sources/gdb-${ATSRC_PACKAGE_VER}${ATSRC_PACKAGE_REV:+-${ATSRC_PACKAGE_REV}}" +ATSRC_PACKAGE_WORK=${AT_WORK_PATH}/gdb +ATSRC_PACKAGE_MLS="http://sourceware.org/cgi-bin/get-raw-msg?listname=gdb-patches&date=2011-11&msgid=4EB46474.2040206%40linux.vnet.ibm.com gdb-fix-watchpoint-fork.patch 64" +ATSRC_PACKAGE_PATCHES="-p1 dt-debug.diff -p1 gdb-fix-watchpoint-fork.patch" +ATSRC_PACKAGE_ALOC="http://downloads.sourceforge.net/sourceforge/powertechprev/dt-debug-fix.tgz" +ATSRC_PACKAGE_TARS="dt-debug-fix.tgz" +ATSRC_PACKAGE_MAKE_CHECK="" +ATSRC_PACKAGE_DISTRIB=yes +ATSRC_PACKAGE_BUILDCROSS=yes +ATSRC_PACKAGE_BUNDLE=devel diff --git a/configs/6.0/packages/gdb/specfile b/configs/6.0/packages/gdb/specfile new file mode 100644 index 000000000..d46c60911 --- /dev/null +++ b/configs/6.0/packages/gdb/specfile @@ -0,0 +1,14 @@ +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# diff --git a/configs/6.0/packages/gdb/stage_1 b/configs/6.0/packages/gdb/stage_1 new file mode 100644 index 000000000..c897cc19d --- /dev/null +++ b/configs/6.0/packages/gdb/stage_1 @@ -0,0 +1,82 @@ +#!/usr/bin/env bash +# +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# GDB build parameters for stage 1 +# ================================ +# + +source ${AT_BASE}/scripts/utilities/bitsize_selection.sh + +# Tell the build system to hold the temp install folder +ATCFG_HOLD_TEMP_INSTALL='no' +# Tell the build system to hold the temp build folder +ATCFG_HOLD_TEMP_BUILD='no' +# Build in a new directory +ATCFG_BUILD_STAGE_T='dir' + + +atcfg_configure() { + local base_libdir="lib64" + local enable_bfd="--enable-64-bit-bfd" + local bit_size=64 + + if [[ "${cross_build}" == "yes" ]]; then + CC="${system_cc}" \ + CFLAGS="-g -m32" \ + ${ATSRC_PACKAGE_WORK}/configure --build=${host} \ + --host=${host} \ + --target=${target64:-$target} \ + --prefix="${at_dest}" \ + --libdir="${at_dest}/lib" \ + --with-expat \ + --with-expat-include="${at_dest}/include" \ + --with-expat-lib="${at_dest}/lib" \ + --with-separate-debug-dir="/usr/lib64/debug" + else + if [[ "${build_arch}" == "ppc" ]]; then + base_libdir="lib" + enable_bfd= + fi + PATH=${at_dest}/bin:${PATH} \ + CC="${at_dest}/bin/gcc" \ + CFLAGS="-g -m${bit_size}" \ + PYTHONHOME="${at_dest}" \ + ${ATSRC_PACKAGE_WORK}/configure \ + --host=${target} \ + --target=${target} \ + --build=${target} \ + --prefix="${at_dest}" \ + --libdir="${at_dest}/${base_libdir}" \ + ${enable_bfd} \ + --disable-sim \ + --with-expat \ + --with-expat-include="${at_dest}/include" \ + --with-expat-lib="${at_dest}/${base_libdir}" \ + --with-python="${at_dest}/bin/python" \ + --with-separate-debug-dir="/usr/${base_libdir}/debug" + fi +} + +atcfg_make() { + PATH=${at_dest}/bin:${PATH} ${SUB_MAKE} +} + + +atcfg_install() { + PATH=${at_dest}/bin:${PATH} \ + ${SUB_MAKE} install DESTDIR=${install_place} +} diff --git a/configs/6.0/packages/glibc/glibc.mk b/configs/6.0/packages/glibc/glibc.mk new file mode 100644 index 000000000..516115a99 --- /dev/null +++ b/configs/6.0/packages/glibc/glibc.mk @@ -0,0 +1,81 @@ +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Set main dependencies based on kind of build requested for this target +# multi = 32/64, single = compiler default bitsize only (usually 64) +$(eval $(call set_provides,glibc_h,multi,cross_yes)) +$(eval $(call set_provides,glibc_1,multi,cross_yes)) +$(eval $(call set_provides,glibc_2,multi,cross_no)) +$(eval $(call set_provides,glibc_compat,multi,cross_no)) + +# List of dependencies in order to build the tuned libraries for 32 or +# 64 bits. +glibc_tuned-32-deps := $(RCPTS)/gcc_3.rcpt \ + $(RCPTS)/rsync_glibc.rcpt +glibc_tuned-64-deps := $(RCPTS)/gcc_3.rcpt \ + $(RCPTS)/rsync_glibc.rcpt +# Enable tuned targets +$(eval $(call provide_tuneds,glibc)) + +glibc_h: $(RCPTS)/glibc_h.rcpt + +glibc_1: $(RCPTS)/glibc_1.rcpt + +glibc_2: $(RCPTS)/glibc_2.rcpt + +glibc_compat: $(RCPTS)/glibc_compat.rcpt + +glibc_tuned: $(RCPTS)/glibc_tuned.rcpt + +$(RCPTS)/glibc_h.rcpt: $(glibc_h-archdeps) + @touch $@ + +$(RCPTS)/glibc_1.rcpt: $(glibc_1-archdeps) + @touch $@ + +$(RCPTS)/glibc_2.rcpt: $(glibc_2-archdeps) + @touch $@ + +$(RCPTS)/glibc_compat.rcpt: $(glibc_compat-archdeps) + @touch $@ + + +$(RCPTS)/glibc_h-32.a.rcpt: $(RCPTS)/gcc_1.rcpt $(RCPTS)/rsync_glibc.rcpt + @touch $@ + +# Depends on 32-bit version only when providing it. +$(RCPTS)/glibc_h-64.a.rcpt: $(RCPTS)/gcc_1.rcpt $(RCPTS)/rsync_glibc.rcpt \ + $(filter %glibc_h-32.b.rcpt,$(glibc_h-archdeps)) + @touch $@ + +$(RCPTS)/glibc_1-32.a.rcpt: $(RCPTS)/gcc_2.rcpt + @touch $@ + +$(RCPTS)/glibc_1-64.a.rcpt: $(RCPTS)/gcc_2.rcpt + @touch $@ + +$(RCPTS)/glibc_2-32.a.rcpt: $(RCPTS)/gcc_3.rcpt + @touch $@ + +$(RCPTS)/glibc_2-64.a.rcpt: $(RCPTS)/gcc_3.rcpt + @touch $@ + +$(RCPTS)/glibc_compat-32.a.rcpt: $(RCPTS)/gcc_3.rcpt + @touch $@ + +$(RCPTS)/glibc_compat-64.a.rcpt: $(RCPTS)/gcc_3.rcpt + @touch $@ + +$(RCPTS)/glibc_tuned.rcpt: $(glibc_tuned-archdeps) + @touch $@ diff --git a/configs/6.0/packages/glibc/sources b/configs/6.0/packages/glibc/sources new file mode 100644 index 000000000..d60d9119c --- /dev/null +++ b/configs/6.0/packages/glibc/sources @@ -0,0 +1,43 @@ +#!/usr/bin/env bash +# +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# GLIBC source package and build info +# =================================== +# + +ATSRC_PACKAGE_NAME="GNU C Library" +ATSRC_PACKAGE_VER=2.16 +ATSRC_PACKAGE_STR_VER="${ATSRC_PACKAGE_NAME} ${ATSRC_PACKAGE_VER}-ibm" +ATSRC_PACKAGE_LICENSE="LGPL 2.1" +ATSRC_PACKAGE_DOCLINK="http://www.gnu.org/software/libc/manual/html_node/index.html" +ATSRC_PACKAGE_PRE="test -d glibc-${ATSRC_PACKAGE_VER}" +# git://git.linux.ibm.com/toolchain-mirrors/glibc.git is a mirror of the git://sourceware.org/git/glibc.git +ATSRC_PACKAGE_CO=([0]="git clone git://git.linux.ibm.com/toolchain-mirrors/glibc.git" \ + [1]="git clone git://sourceware.org/git/glibc.git") +ATSRC_PACKAGE_GIT="git checkout -b glibc-${ATSRC_PACKAGE_VER}${ATSRC_PACKAGE_REV:+-${ATSRC_PACKAGE_REV}} origin/ibm/${ATSRC_PACKAGE_VER}/master" +ATSRC_PACKAGE_POST="mv glibc glibc-${ATSRC_PACKAGE_VER}${ATSRC_PACKAGE_REV:+-${ATSRC_PACKAGE_REV}}" +ATSRC_PACKAGE_SRC=${AT_BASE}/sources/glibc-${ATSRC_PACKAGE_VER} +ATSRC_PACKAGE_WORK=${AT_WORK_PATH}/glibc +ATSRC_PACKAGE_MLS= +ATSRC_PACKAGE_PATCHES= +ATSRC_PACKAGE_ALOC= +ATSRC_PACKAGE_TARS= +ATSRC_PACKAGE_MAKE_CHECK= +ATSRC_PACKAGE_PORTS="git clone git://sourceware.org/git/glibc-ports.git" +ATSRC_PACKAGE_DISTRIB=yes +ATSRC_PACKAGE_BUILDCROSS=yes +ATSRC_PACKAGE_BUNDLE=toolchain diff --git a/configs/6.0/packages/glibc/specfile b/configs/6.0/packages/glibc/specfile new file mode 100644 index 000000000..d46c60911 --- /dev/null +++ b/configs/6.0/packages/glibc/specfile @@ -0,0 +1,14 @@ +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# diff --git a/configs/6.0/packages/glibc/stage_1 b/configs/6.0/packages/glibc/stage_1 new file mode 100644 index 000000000..688ab20d5 --- /dev/null +++ b/configs/6.0/packages/glibc/stage_1 @@ -0,0 +1,187 @@ +#!/usr/bin/env bash +# +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# GLIBC build parameters for stage 1 32/64 bits +# ============================================= +# + +# We can't use the newly built gcc to compile glibc because it will set the +# dynamic linker to be ${dest}/lib/ld.so.1, which isn't installed until the +# glibc build finishes. So trying to run anything compiled with the new gcc +# will fail, in particular, glibc configure tests. I suppose you might be +# able to supply glibc configure with lots of libc_cv_* variables to +# avoid this, but then you'd forever be changing this script to keep up with +# new glibc configure tests. +# Note that dynamically linked programs built here with the old host gcc are +# subtly broken too; The glibc build sets their dynamic linker to +# ${dest}/lib/ld.so.1 but doesn't provide rpath. Which means you'll get the +# new ld.so trying to use the system libc.so, which doesn't work. ld.so and +# libc.so share data structures so are tightly coupled. To run the new +# programs, you need to set LD_LIBRARY_PATH for them, or better (so as to not +# affect forked commands that might need the system libs), run ld.so.1 +# explicitly, passing --library-path as is done for localedef below. +# This is one of the reasons why you need to build glibc twice. + +# Include some standard functions +source ${utilities}/bitsize_selection.sh + +ATCFG_HOLD_TEMP_INSTALL='no' +ATCFG_HOLD_TEMP_BUILD='no' +# Build in a new directory +ATCFG_BUILD_STAGE_T='dir' + +# Required post install hacks (this one is run after the final install move) +atcfg_posti_hacks() { + # Set location of base directory to replace depending on ${cross_build} + if [[ "${cross_build}" == "no" ]]; then + basedir="${at_dest}" + else + basedir="${dest_cross}/usr/" + fi + + local bindir=${basedir}/$(find_build_bindir ${AT_BIT_SIZE}) + local libdir=${basedir}/$(find_build_libdir ${AT_BIT_SIZE}) + + # Set the name of the loader to use based on bit size + local ld_so="ld${AT_BIT_SIZE%32}.so.1" + + set -e + # Replace ${libdir}/libc.so with a version compatible with binutils + # built with the --with_sysroot option set to ${at_dest} + [[ -e ${libdir}/libc.so ]] && mv -f ${libdir}/libc.so ${libdir}/libc.so.orig + echo "/* GNU ld script" > ${libdir}/libc.so + echo " Use the shared library, but some functions are only in" >> ${libdir}/libc.so + echo " the static library, so try that secondarily." >> ${libdir}/libc.so + echo " You will notice that the paths do not contain ${at_dest}." >> ${libdir}/libc.so + echo " This is because the Advance Toolchain binutils uses" >> ${libdir}/libc.so + echo " --with-sysroot which causes the linker to append ${at_dest}" >> ${libdir}/libc.so + echo " onto the paths found in this ld script. */" >> ${libdir}/libc.so + echo "GROUP ( libc.so.6 libc_nonshared.a AS_NEEDED ( ${ld_so} ) )" >> ${libdir}/libc.so + [[ -e ${libdir}/libc.so.orig ]] && rm ${libdir}/libc.so.orig + set +e + + if [[ "${cross_build}" == "no" ]]; then + local ld_so=${libdir}/ld${AT_BIT_SIZE%32}.so.1 + + # Generate the required locales + # Remove the locale-archive, because localedef does not read + # empty files. This was a dummy file created during the + rm -f "${libdir}/locale/locale-archive" + # Temporarily save the current build directory + local build_stage_work="$(pwd)" + pushd ${build_stage_work}/localedata > /dev/null + ${SUB_MAKE} -C "${ATSRC_PACKAGE_WORK}/localedata" \ + objdir="${build_stage_work}" \ + install_root="/" \ + subdir=localedata \ + install-locales + popd > /dev/null + fi +} + +atcfg_pre_configure() { + local base_libdir=$(find_build_libdir ${AT_BIT_SIZE}) + local base_bindir=$(find_build_bindir ${AT_BIT_SIZE}) + local base_sbindir=$(find_build_sbindir ${AT_BIT_SIZE}) + local base_libexecdir=$(find_build_libexecdir ${AT_BIT_SIZE}) + if [[ "${cross_build}" == "no" ]]; then + echo cross-compiling=yes > ./configparms + echo slibdir="${at_dest}/${base_libdir}" >> ./configparms + echo libdir="${at_dest}/${base_libdir}" >> ./configparms + echo bindir="${at_dest}/${base_bindir}" >> ./configparms + echo sbindir="${at_dest}/${base_sbindir}" >> ./configparms + echo libexecdir="${at_dest}/${base_libexecdir}" >> ./configparms + echo rootsbindir="${at_dest}/${base_sbindir}" >> ./configparms + else + echo cross-compiling=yes > ./configparms + fi +} + +atcfg_configure() { + local base_target=$(find_build_target ${AT_BIT_SIZE}) + if [[ "${cross_build}" == "no" ]]; then + # Configure command for native builds + AUTOCONF="${autoconf}" \ + CC="${at_dest}/bin/gcc -m${AT_BIT_SIZE}" \ + CFLAGS="-g -O2 ${secure_plt:+-msecure-plt}" \ + libc_cv_forced_unwind="yes" \ + libc_cv_c_cleanup="yes" \ + ${ATSRC_PACKAGE_WORK}/configure --build=${host} \ + --host=${base_target} \ + --prefix="${at_dest}" \ + --with-headers="${at_dest}/include" \ + --with-tls \ + --enable-add-ons=nptl \ + --without-cvs \ + --without-selinux \ + --enable-kernel="${kernel}" + else + # Configure command for cross builds + AUTOCONF="${autoconf}" \ + CC="${at_dest}/bin/${target64:-${target}}-gcc -m${AT_BIT_SIZE}" \ + CFLAGS="-g -O2" \ + AR="${at_dest}/bin/${target}-ar" \ + AS="${at_dest}/bin/${target}-as" \ + RANLIB="${at_dest}/bin/${target}-ranlib" \ + libc_cv_forced_unwind="yes" \ + libc_cv_c_cleanup="yes" \ + ${ATSRC_PACKAGE_WORK}/configure --build=${host} \ + --host=${base_target} \ + --prefix="/usr" \ + --with-headers="${dest_cross}/usr/include" \ + --with-tls \ + --enable-add-ons=nptl \ + --disable-profile \ + --without-gd \ + --with-cpu=${build_load_arch} \ + --without-cvs \ + --with-tls \ + --with-__thread \ + --without-selinux \ + --enable-kernel="${kernel}" + fi +} + +atcfg_make() { + ${SUB_MAKE} +} + +atcfg_install() { + if [[ "${cross_build}" == "no" ]]; then + ${SUB_MAKE} install install_root="${install_place}" + else + ${SUB_MAKE} install install_root="${install_place}/${dest_cross}" + fi +} + +atcfg_post_install() { + local base_libdir=$(find_build_libdir ${AT_BIT_SIZE}) + if [[ "${cross_build}" == "no" ]]; then + rm -rf "${install_transfer}/var/db/Makefile" + # Prepare the locale archive for inclusion in RPM. + # We can't generate it yet because the files aren't available + # on ${at_dest} yet, so we need a dummy file to guarantee it'll + # be included in the package later. + mkdir -p "${install_transfer}/${base_libdir}/locale" + touch "${install_transfer}/${base_libdir}/locale/locale-archive" + + # Re-use time zone information available in the system. + ln -s /usr/share/zoneinfo/ ${install_transfer}/share/zoneinfo + else + rm -rf "${install_place}/${dest_cross}/var/db/Makefile" + fi +} diff --git a/configs/6.0/packages/glibc/stage_2 b/configs/6.0/packages/glibc/stage_2 new file mode 100644 index 000000000..c41ee43a3 --- /dev/null +++ b/configs/6.0/packages/glibc/stage_2 @@ -0,0 +1,151 @@ +#!/usr/bin/env bash +# +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# GLIBC build parameters for stage 2 32/64 bits +# ============================================= +# + +# The build of glibc was almost full featured. In this build the new GCC is +# used to compile a highly optimized glibc with all the required features. + +# Include some standard functions +source ${utilities}/bitsize_selection.sh + +ATCFG_HOLD_TEMP_INSTALL='no' +ATCFG_HOLD_TEMP_BUILD='no' +# Build in a new directory +ATCFG_BUILD_STAGE_T='dir' + +# GLIBC BUILD HACKS +# ========================================================= +# Required pre build hacks +atcfg_pre_hacks() { + # Hack the glibc source so that the -rpath option we add on all shared libs + # and executable wont bomb ld.so, which checks that -rpath is not given. + s1="s@assert (\(info\[DT_R.*PATH\]\) == NULL)@\1 = NULL@" + for F in "${ATSRC_PACKAGE_WORK}/elf/dynamic-link.h"; do + sed -e "${s1}" < "${F}" > tmp.$$ \ + && { cmp -s tmp.$$ "${F}" || mv -f tmp.$$ "${F}"; } || exit 1 + rm -f tmp.$$ + done +} +# Required post install hacks (this one is run after the final install move) +atcfg_posti_hacks() { + local base_libdir=$(find_build_libdir ${AT_BIT_SIZE}) + # Set the base library path + libdir=${at_dest}/${base_libdir} + # Find the proper glibc final libc filename + libname=$(basename $(ls ${libdir}/libc{-[0-9]*,}.so)) + # Set the name of the loader to use based on bit size + local ld_so="ld${AT_BIT_SIZE%32}.so.1" + # Replace ${at_dest}/lib/libc.so with a version compatible with binutils + # built with the --with_sysroot option set to ${at_dest} + [[ -e ${libdir}/libc.so ]] && \ + mv -f ${libdir}/libc.so ${libdir}/libc.so.orig + echo "/* GNU ld script" > ${libdir}/libc.so + echo " Use the shared library, but some functions are only in" >> ${libdir}/libc.so + echo " the static library, so try that secondarily." >> ${libdir}/libc.so + echo " You will notice that the paths do not contain ${at_dest}." >> ${libdir}/libc.so + echo " This is because the Advance Toolchain binutils uses" >> ${libdir}/libc.so + echo " --with-sysroot which causes the linker to append ${at_dest}" >> ${libdir}/libc.so + echo " onto the paths found in this ld script. */" >> ${libdir}/libc.so + echo "GROUP ( libc.so.6 libc_nonshared.a AS_NEEDED ( ${ld_so} ) )" >> ${libdir}/libc.so + [[ -e ${libdir}/libc.so.orig ]] \ + && rm ${libdir}/libc.so.orig +} + + +# ATCFG_CONFIGURE SETTINGS +# ========================================================= +# Pre configure settings or commands to run +atcfg_pre_configure() { + local base_libdir=$(find_build_libdir ${AT_BIT_SIZE}) + local base_bindir=$(find_build_bindir ${AT_BIT_SIZE}) + local base_sbindir=$(find_build_sbindir ${AT_BIT_SIZE}) + local base_libexecdir=$(find_build_libexecdir ${AT_BIT_SIZE}) + echo slibdir="${at_dest}/${base_libdir}" > ./configparms + echo libdir="${at_dest}/${base_libdir}" >> ./configparms + echo bindir="${at_dest}/${base_bindir}" >> ./configparms + echo sbindir="${at_dest}/${base_sbindir}" >> ./configparms + echo libexecdir="${at_dest}/${base_libexecdir}" >> ./configparms + echo rootsbindir="${at_dest}/${base_sbindir}" >> ./configparms + echo cross-compiling=no >> ./configparms +} +# Configure command for builds +atcfg_configure() { + local base_target=$(find_build_target ${AT_BIT_SIZE}) + PATH=${at_dest}/bin:${PATH} \ + AUTOCONF="${autoconf}" \ + CC="${at_dest}/bin/gcc -m${AT_BIT_SIZE}" \ + CXX="${at_dest}/bin/g++ -m${AT_BIT_SIZE}" \ + CFLAGS="-g -O3 ${with_longdouble:+-mlong-double-128}" \ + CXXFLAGS="-g -O3" \ + ${ATSRC_PACKAGE_WORK}/configure --build=${host} \ + --host=${base_target} \ + --prefix="${at_dest}" \ + --with-headers="${at_dest}/include" \ + --enable-add-ons=nptl \ + --with-tls \ + --with-__thread \ + --enable-shared \ + --enable-multi-arch \ + --enable-experimental-malloc \ + --without-cvs \ + --with-cpu=${build_load_arch/ppc/} \ + --enable-kernel="${kernel}" \ + --without-selinux \ + --enable-obsolete-rpc +} + + +# ATCFG_MAKE SETTINGS +# ========================================================= +# Make build command +atcfg_make() { + PATH=${at_dest}/bin:${PATH} ${SUB_MAKE} +} + + +# ATCFG_INSTALL SETTINGS +# ========================================================= +# Conditional install command +atcfg_install() { + if [[ "${cross_build}" == "no" ]]; then + # Native install build command + PATH=${at_dest}/bin:${PATH} ${SUB_MAKE} install install_root="${install_place}" + else + # Cross install build command + PATH=${at_dest}/bin:${PATH} ${SUB_MAKE} install install_root="${install_place}/${dest_cross}" + fi +} +# Conditional post install command +atcfg_post_install() { + local base_libdir=$(find_build_libdir ${AT_BIT_SIZE}) + if [[ "${cross_build}" == "no" ]]; then + # Native post install settings or commands to run + # Remove unused Makefile from install + rm -rf "${install_transfer}/var/db/Makefile" + # Removing the created ld.so.cache to avoid further problems + rm -rf "${install_transfer}/etc/ld.so.cache" + else + # Cross post install settings or commands to run + # Remove unused Makefile from install + rm -rf "${install_place}/${dest_cross}/var/db/Makefile" + # Removing the created ld.so.cache to avoid further problems + rm -rf "${install_place}/${dest_cross}/etc/ld.so.cache" + fi +} diff --git a/configs/6.0/packages/glibc/stage_compat b/configs/6.0/packages/glibc/stage_compat new file mode 100644 index 000000000..d262cbf78 --- /dev/null +++ b/configs/6.0/packages/glibc/stage_compat @@ -0,0 +1,127 @@ +#!/usr/bin/env bash +# +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# GLIBC build parameters for compat 32/64 bits +# ============================================ +# + +# Include some standard functions +source ${utilities}/bitsize_selection.sh + +ATCFG_HOLD_TEMP_INSTALL='no' +ATCFG_HOLD_TEMP_BUILD='no' +# Build in a new directory +ATCFG_BUILD_STAGE_T='dir' + +atcfg_posti_hacks() { + local base_libdir=$(find_build_libdir ${AT_BIT_SIZE}) + # Set the base library path + libdir=${at_dest}/${base_libdir} + # Find the proper glibc final libc filename + libname=$(basename $(ls ${libdir}/libc{-[0-9]*,}.so)) + # Set the name of the loader to use based on bit size + local ld_so="ld${AT_BIT_SIZE%32}.so.1" + # Replace ${libdir}/libc.so with a version compatible with binutils + # built with the --with_sysroot option set to ${at_dest} + [[ -e ${libdir}/libc.so ]] && \ + mv -f ${libdir}/libc.so ${libdir}/libc.so.orig + echo "/* GNU ld script" > ${libdir}/libc.so + echo " Use the shared library, but some functions are only in" >> ${libdir}/libc.so + echo " the static library, so try that secondarily." >> ${libdir}/libc.so + echo " You will notice that the paths do not contain ${at_dest}." >> ${libdir}/libc.so + echo " This is because the Advance Toolchain binutils uses" >> ${libdir}/libc.so + echo " --with-sysroot which causes the linker to append ${at_dest}" >> ${libdir}/libc.so + echo " onto the paths found in this ld script. */" >> ${libdir}/libc.so + echo "GROUP ( libc.so.6 libc_nonshared.a AS_NEEDED ( ${ld_so} ) )" >> ${libdir}/libc.so + [[ -e ${libdir}/libc.so.orig ]] && \ + rm ${libdir}/libc.so.orig +} + + +atcfg_pre_configure() { + local base_libdir=$(find_build_libdir ${AT_BIT_SIZE}) + local base_bindir=$(find_build_bindir ${AT_BIT_SIZE}) + local base_sbindir=$(find_build_sbindir ${AT_BIT_SIZE}) + local base_libexecdir=$(find_build_libexecdir ${AT_BIT_SIZE}) + echo slibdir="${at_dest}/${base_libdir}" > ./configparms + echo libdir="${at_dest}/${base_libdir}" >> ./configparms + echo bindir="${at_dest}/${base_bindir}" >> ./configparms + echo sbindir="${at_dest}/${base_sbindir}" >> ./configparms + echo libexecdir="${at_dest}/${base_libexecdir}" >> ./configparms + echo rootsbindir="${at_dest}/${base_sbindir}" >> ./configparms + echo cross-compiling=no >> ./configparms +} + + +atcfg_configure() { + local base_target=$(find_build_target ${AT_BIT_SIZE}) + PATH=${at_dest}/bin:${PATH} \ + AUTOCONF="${autoconf}" \ + CC="${at_dest}/bin/gcc -m${AT_BIT_SIZE}" \ + CXX="${at_dest}/bin/g++ -m${AT_BIT_SIZE}" \ + CFLAGS="-g -O3 ${with_longdouble:+-mlong-double-128}" \ + CXXFLAGS="-g -O3" \ + ${ATSRC_PACKAGE_WORK}/configure --build=${target} \ + --host=${base_target} \ + --prefix="${at_dest}" \ + --with-headers="${at_dest}/include" \ + --enable-add-ons=nptl \ + --with-tls \ + --with-__thread \ + --enable-shared \ + --enable-multi-arch \ + --without-cvs \ + --with-cpu=${build_load_arch} \ + --without-selinux \ + --enable-kernel="${compat_kernel}" +} + + +atcfg_make() { + PATH=${at_dest}/bin:${PATH} ${SUB_MAKE} +} + + +atcfg_install() { + PATH=${at_dest}/bin:${PATH} ${SUB_MAKE} install install_root="${install_place}" +} + +atcfg_post_install() { + set -e + # Reuse time zone information available in the system. + ln -s /etc/localtime ${install_transfer}/etc/localtime + ln -s /usr/share/zoneinfo/ ${install_transfer}/share/zoneinfo + # Compat only needs runtime functionality. + rm -rf "${install_transfer}/include" \ + "${install_transfer}/share/info" \ + "${install_transfer}/var" + # Remove development files. + find "${install_transfer}/lib*" \ + -name '*.a' \ + -o -name '*.o' \ + -o -name '*.la' \ + | xargs rm -vf + # Removing the created ld.so.cache to avoid further problems. + rm -rf "${install_transfer}/etc/ld.so.cache" + # Move final required files to compat folder. + mkdir -p "${install_transfer}/compat" + find "${install_transfer}" -maxdepth 1 \ + ! -path "${install_transfer}/compat" \ + ! -path "${install_transfer}" \ + -execdir mv -v -t "${install_transfer}/compat" {} + + set +e +} diff --git a/configs/6.0/packages/glibc/stage_h b/configs/6.0/packages/glibc/stage_h new file mode 100644 index 000000000..1c90cbe72 --- /dev/null +++ b/configs/6.0/packages/glibc/stage_h @@ -0,0 +1,142 @@ +#!/usr/bin/env bash +# +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# GLIBC build parameters for the header stage 32/64 bits +# ============================================= +# + +# Preparation for the second gcc build. The first stage gcc isn't able to +# build the next components properly. We need to setup glibc headers and some +# glibc objects in order to build a self-contained compiler. + +# Include some standard functions +source ${utilities}/bitsize_selection.sh + +ATCFG_HOLD_TEMP_INSTALL='no' +ATCFG_HOLD_TEMP_BUILD='no' +# Build in a new directory +ATCFG_BUILD_STAGE_T='dir' + +# ATCFG_CONFIGURE SETTINGS +# ========================================================= +# Pre configure settings or commands to run +atcfg_pre_configure() { + echo cross-compiling=yes > ./configparms +} +# Conditional configure command +atcfg_configure() { + local base_target=$(find_build_target ${AT_BIT_SIZE}) + if [[ "${cross_build}" == "no" ]]; then + # Configure command for native builds + AUTOCONF=${autoconf} \ + CC="${at_dest}/bin/gcc -m${AT_BIT_SIZE}" \ + CFLAGS="-g -O2" \ + libc_cv_forced_unwind="yes" \ + libc_cv_c_cleanup="yes" \ + ${ATSRC_PACKAGE_WORK}/configure --build=${host} \ + --host=${base_target} \ + --prefix=${at_dest} \ + --with-headers="${at_dest}/include" \ + --with-tls \ + --without-fp \ + --disable-profile \ + --disable-sanity-checks \ + --enable-add-ons=nptl \ + --without-cvs + else + AUTOCONF=${autoconf} \ + CC="${at_dest}/bin/${target64:-${target}}-gcc -m${AT_BIT_SIZE}" \ + CFLAGS="-g -O2" \ + AR="${at_dest}/bin/${target}-ar" \ + AS="${at_dest}/bin/${target}-as" \ + RANLIB="${at_dest}/bin/${target}-ranlib" \ + libc_cv_forced_unwind="yes" \ + libc_cv_c_cleanup="yes" \ + ${ATSRC_PACKAGE_WORK}/configure --build=${host} \ + --host=${base_target} \ + --prefix="/usr" \ + --with-headers="${dest_cross}/usr/include" \ + --with-tls \ + --disable-profile \ + --disable-sanity-checks \ + --enable-add-ons=nptl \ + --without-cvs + fi +} + + +# ATCFG_MAKE SETTINGS +# ========================================================= +# Conditional make command +atcfg_make() { + if [[ "${cross_build}" == "no" ]]; then + # Native make build command + echo "No need to perform a make at this stage" + else + # Cross make build command + # We need to build the following in order to link shared libraries: + make csu/subdir_lib + fi +} + + +# ATCFG_INSTALL SETTINGS +# ========================================================= +# Conditional install command +atcfg_install() { + if [[ "${cross_build}" == "no" ]]; then + # Install build command + ${SUB_MAKE} install-headers install_root="${install_place}" install-bootstrap-headers="yes" + else + # Install build command + ${SUB_MAKE} install-headers install_root="${install_place}/${dest_cross}" install-bootstrap-headers="yes" + fi +} +# Conditional post install command +atcfg_post_install() { + local base_libdir=$(find_build_libdir ${AT_BIT_SIZE}) + if [[ "${cross_build}" == "no" ]]; then + # Post install settings or commands to run + # The following is required because these two files arent copied + # by make install-headers: + [[ ! -d "${install_place}/${at_dest}/include/bits" ]] && \ + mkdir -p ${install_place}/${at_dest}/include/bits + cp bits/stdio_lim.h ${install_place}/${at_dest}/include/bits/ + [[ ! -d "${install_place}/${at_dest}/include/gnu" ]] && \ + mkdir -p ${install_place}/${at_dest}/include/gnu + cp ${ATSRC_PACKAGE_WORK}/include/gnu/stubs.h ${install_place}/${at_dest}/include/gnu/ + else + # Post install settings or commands to run + # The following is required because these two files arent copied + # by make install-headers: + [[ ! -d "${install_place}/${dest_cross}/usr/include/bits" ]] && \ + mkdir -p ${install_place}/${dest_cross}/usr/include/bits + cp bits/stdio_lim.h ${install_place}/${dest_cross}/usr/include/bits/ + [[ ! -d "${install_place}/${dest_cross}/usr/include/gnu" ]] && \ + mkdir -p ${install_place}/${dest_cross}/usr/include/gnu + cp ${ATSRC_PACKAGE_WORK}/include/gnu/stubs.h ${install_place}/${dest_cross}/usr/include/gnu/ + [[ ! -d "${install_place}/${dest_cross}/usr/${base_libdir}" ]] && \ + mkdir -p ${install_place}/${dest_cross}/usr/${base_libdir} + cp csu/crt1.o csu/crti.o csu/crtn.o ${install_place}/${dest_cross}/usr/${base_libdir}/ + # "libgcc_s.so" requires a "libc.so" to link against. However, + # since we will never actually execute its code, it doesnt matter what + # it contains. So, treating "/dev/null" as a C source file, we produce + # a dummy "libc.so": + ${at_dest}/bin/${target64:-${target}}-gcc -nostdlib -m${AT_BIT_SIZE} -nostartfiles \ + -shared -x c /dev/null -o ${install_place}/${dest_cross}/usr/${base_libdir}/libc.so + fi +} diff --git a/configs/6.0/packages/glibc/stage_optimized b/configs/6.0/packages/glibc/stage_optimized new file mode 100644 index 000000000..bd673dbcc --- /dev/null +++ b/configs/6.0/packages/glibc/stage_optimized @@ -0,0 +1,142 @@ +#!/usr/bin/env bash +# +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# GLIBC build parameters for CPU optimized 32 bits +# ================================================ +# + +# Include some standard functions +source ${utilities}/bitsize_selection.sh + +ATCFG_HOLD_TEMP_INSTALL='no' +ATCFG_HOLD_TEMP_BUILD='no' +# Build in a new directory +ATCFG_BUILD_STAGE_T='dir' + +# GLIBC BUILD HACKS +# ========================================================= +# Required post install hacks (this one is run after the final install move) +atcfg_posti_hacks() { + local base_libdir=$(find_build_libdir ${AT_BIT_SIZE}) + # Set the base library path + libdir=${at_dest}/${base_libdir} + # Find the proper glibc final libc filename + libname=$(basename $(ls ${libdir}/${AT_OPTIMIZE_CPU}/libc{-[0-9]*,}.so)) + # Replace ${libdir}/${AT_OPTIMIZE_CPU}/libc.so with a version compatible with binutils + # built with the --with_sysroot option set to ${at_dest} + [[ -e ${libdir}/${AT_OPTIMIZE_CPU}/libc.so ]] && \ + mv -f ${libdir}/${AT_OPTIMIZE_CPU}/libc.so ${libdir}/${AT_OPTIMIZE_CPU}/libc.so.orig + echo "/* GNU ld script" > ${libdir}/${AT_OPTIMIZE_CPU}/libc.so + echo " Use the shared library, but some functions are only in" >> ${libdir}/${AT_OPTIMIZE_CPU}/libc.so + echo " the static library, so try that secondarily." >> ${libdir}/${AT_OPTIMIZE_CPU}/libc.so + echo " You will notice that the paths do not contain ${at_dest}." >> ${libdir}/${AT_OPTIMIZE_CPU}/libc.so + echo " This is because the Advance Toolchain binutils uses" >> ${libdir}/${AT_OPTIMIZE_CPU}/libc.so + echo " --with-sysroot which causes the linker to append ${at_dest}" >> ${libdir}/${AT_OPTIMIZE_CPU}/libc.so + echo " onto the paths found in this ld script. */" >> ${libdir}/${AT_OPTIMIZE_CPU}/libc.so + echo "GROUP ( libc.so.6 libc_nonshared.a AS_NEEDED ( ld.so.1 ) )" >> ${libdir}/${AT_OPTIMIZE_CPU}/libc.so + [[ -e ${libdir}/${AT_OPTIMIZE_CPU}/libc.so.orig ]] && \ + rm ${libdir}/${AT_OPTIMIZE_CPU}/libc.so.orig +} + + +# ATCFG_CONFIGURE SETTINGS +# ========================================================= +# Pre configure settings or commands to run +atcfg_pre_configure() { + local base_libdir=$(find_build_libdir ${AT_BIT_SIZE}) + local base_bindir=$(find_build_bindir ${AT_BIT_SIZE}) + local base_sbindir=$(find_build_sbindir ${AT_BIT_SIZE}) + local base_libexecdir=$(find_build_libexecdir ${AT_BIT_SIZE}) + echo slibdir="${at_dest}/${base_libdir}" > ./configparms + echo libdir="${at_dest}/${base_libdir}" >> ./configparms + echo bindir="${at_dest}/${base_bindir}" >> ./configparms + echo sbindir="${at_dest}/${base_sbindir}" >> ./configparms + echo libexecdir="${at_dest}/${base_libexecdir}" >> ./configparms + echo rootsbindir="${at_dest}/${base_sbindir}" >> ./configparms + if [[ "${at_build_cpu}" == "${AT_OPTIMIZE_CPU}" ]]; then + echo cross-compiling=no >> ./configparms + else + echo cross-compiling=yes >> ./configparms + fi +} +# Configure command for native builds +atcfg_configure() { + local base_target=$(find_build_target ${AT_BIT_SIZE}) + PATH=${at_dest}/bin:${PATH} \ + AUTOCONF="${autoconf}" \ + CC="${at_dest}/bin/gcc -m${AT_BIT_SIZE}" \ + CXX="${at_dest}/bin/g++ -m${AT_BIT_SIZE}" \ + CFLAGS="-g -O3 ${with_longdouble:+-mlong-double-128}" \ + CXXFLAGS="-g -O3" \ + ${ATSRC_PACKAGE_WORK}/configure --build=${target} \ + --host=${base_target} \ + --prefix="${at_dest}" \ + --with-headers="${at_dest}/include" \ + --enable-add-ons=nptl \ + --with-tls \ + --with-__thread \ + --enable-shared \ + --enable-multi-arch \ + --enable-experimental-malloc \ + --without-cvs \ + --enable-obsolete-rpc \ + --with-cpu=${AT_OPTIMIZE_CPU/ppc/} \ + --enable-kernel="${kernel}" \ + --without-selinux \ + --enable-obsolete-rpc +} + + +# ATCFG_MAKE SETTINGS +# ========================================================= +# Make build command +atcfg_make() { + PATH=${at_dest}/bin:${PATH} ${SUB_MAKE} +} + + +# ATCFG_INSTALL SETTINGS +# ========================================================= +# Install build command +atcfg_install() { + PATH=${at_dest}/bin:${PATH} ${SUB_MAKE} install install_root="${install_place}" +} +# Post install settings or commands to run +atcfg_post_install() { + local base_libdir=$(find_build_libdir ${AT_BIT_SIZE}) + # Remove unneeded install files + find "${install_place}/${at_dest}" -type d -name "gconv" -print -execdir rm -rf {} + + find "${install_place}/${at_dest}" -type d -name "audit" -print -execdir rm -rf {} + + find "${install_place}/${at_dest}" -name "ld*.so.*" -print -delete + find "${install_place}/${at_dest}" -name "ld*.so" -print -delete + find "${install_place}/${at_dest}" -name "libdl*.so*" -print -delete + find "${install_place}/${at_dest}" -name "libdl.a" -print -delete + find "${install_place}/${at_dest}" -name "libmemusage.so.*" -print -delete + # Save all libraries into a tar file + pushd "${install_place}/${at_dest}/${base_libdir}" + tar czf "${install_place}/${AT_OPTIMIZE_CPU}.tar.gz" \ + $(find . -name "*.so" -o -name "*.so.*" -o -name "*.a") + popd + # Remove all installed built files + rm -rf "${install_place}/${at_dest}" + # Create processor lib target + mkdir -p "${install_place}/${at_dest}/${base_libdir}/${AT_OPTIMIZE_CPU}" + # Place saved libs on created final target + pushd "${install_place}/${at_dest}/${base_libdir}/${AT_OPTIMIZE_CPU}" + tar xzf "${install_place}/${AT_OPTIMIZE_CPU}.tar.gz" + popd +} diff --git a/configs/6.0/packages/gmp/gmp.mk b/configs/6.0/packages/gmp/gmp.mk new file mode 100644 index 000000000..8af61ff7f --- /dev/null +++ b/configs/6.0/packages/gmp/gmp.mk @@ -0,0 +1,44 @@ +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# In a native build, the first stage of this packages is created using the +# system toolchain. +# As soon as the new toolchain is fully featured, we rebuild this package. +# In a cross compiler, this package is built for the host architecture, +# using the system toolchain, which is already fully featured. So, we don't +# need to rebuild it. +# +$(eval $(call set_provides,gmp_1,single,cross_yes)) +$(eval $(call set_provides,gmp_2,single,cross_no)) + + +gmp_1: $(RCPTS)/gmp_1.rcpt + +gmp_2: $(RCPTS)/gmp_2.rcpt + + +# Build it using the system toolchain +$(RCPTS)/gmp_1.rcpt: $(gmp_1-archdeps) + @touch $@ + +# Rebuild it using the new fully featured toolchain +$(RCPTS)/gmp_2.rcpt: $(gmp_2-archdeps) + @touch $@ + + +$(RCPTS)/gmp_1.a.rcpt: $(RCPTS)/rsync_gmp.rcpt + @touch $@ + +$(RCPTS)/gmp_2.a.rcpt: $(RCPTS)/binutils_2.rcpt + @touch $@ diff --git a/configs/6.0/packages/gmp/sources b/configs/6.0/packages/gmp/sources new file mode 100644 index 000000000..22f9aaeec --- /dev/null +++ b/configs/6.0/packages/gmp/sources @@ -0,0 +1,41 @@ +#!/usr/bin/env bash +# +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# GMP source package and build info +# ================================= +# + +ATSRC_PACKAGE_NAME="GNU Multiple Precision Library" +ATSRC_PACKAGE_VER=4.3.2 +ATSRC_PACKAGE_LICENSE="GPL 3.0" +ATSRC_PACKAGE_DOCLINK="http://gmplib.org/manual/" +ATSRC_PACKAGE_RELFIXES= +ATSRC_PACKAGE_STR_VER="${ATSRC_PACKAGE_NAME} ${ATSRC_PACKAGE_VER}" +ATSRC_PACKAGE_PRE="test -d gmp-${ATSRC_PACKAGE_VER}" +ATSRC_PACKAGE_CO=([0]="wget -N http://ftpmirror.gnu.org/gmp/gmp-${ATSRC_PACKAGE_VER}.tar.bz2" \ + [1]="wget -N ftp://ftp.unicamp.br/pub/gnu/gmp/gmp-${ATSRC_PACKAGE_VER}${ATSRC_PACKAGE_REV}.tar.bz2") +ATSRC_PACKAGE_POST="tar -xjf gmp-${ATSRC_PACKAGE_VER}.tar.bz2" +ATSRC_PACKAGE_SRC=${AT_BASE}/sources/gmp-${ATSRC_PACKAGE_VER} +ATSRC_PACKAGE_WORK=${AT_WORK_PATH}/gmp +ATSRC_PACKAGE_MLS= +ATSRC_PACKAGE_ALOC= +ATSRC_PACKAGE_PATCHES= +ATSRC_PACKAGE_TARS= +ATSRC_PACKAGE_MAKE_CHECK= +ATSRC_PACKAGE_DISTRIB=yes +ATSRC_PACKAGE_BUILDCROSS=yes +ATSRC_PACKAGE_BUNDLE=toolchain diff --git a/configs/6.0/packages/gmp/specfile b/configs/6.0/packages/gmp/specfile new file mode 100644 index 000000000..d46c60911 --- /dev/null +++ b/configs/6.0/packages/gmp/specfile @@ -0,0 +1,14 @@ +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# diff --git a/configs/6.0/packages/gmp/stage_1 b/configs/6.0/packages/gmp/stage_1 new file mode 100644 index 000000000..0a3488c6f --- /dev/null +++ b/configs/6.0/packages/gmp/stage_1 @@ -0,0 +1,75 @@ +#!/usr/bin/env bash +# +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# GMP build parameters for stage 1 +# ================================ +# + +# Tell the build system to hold the temp install folder +ATCFG_HOLD_TEMP_INSTALL='no' +# Tell the build system to hold the temp build folder +ATCFG_HOLD_TEMP_BUILD='no' +# Build in a new directory +ATCFG_BUILD_STAGE_T='dir' + +# Pre configure settings or commands to run +atcfg_pre_configure () { + cc_64=${system_cc} + cxx_64=${system_cxx} + libdir=${at_dest}/lib + if [[ "${cross_build}" != "yes" ]]; then + if [[ "${build_arch}" == ppc64* ]]; then + libdir=${at_dest}/lib64 + if [[ ! -d ${libdir} ]]; then + mkdir -p ${libdir} + fi + if [[ "${default_compiler}" == "32" ]]; then + cc_64="${gcc64}" + cxx_64="${gpp64}" + lib_stdcxx=$(find /usr/lib/gcc/ -name libstdc++.a | grep "\/64\/") + lib_supcxx=$(find /usr/lib/gcc/ -name libsupc++.a | grep "\/64\/") + cp ${lib_stdcxx} ${lib_supcxx} ${libdir} + fi + fi + fi +} + +# Configure native build command +atcfg_configure () { + CC=${cc_64} \ + CXX=${cxx_64} \ + CFLAGS="-g -O" \ + CXXFLAGS="-g -O" \ + ${ATSRC_PACKAGE_WORK}/configure --build=${host} \ + --host=${host} \ + --target=${host} \ + --prefix=${at_dest} \ + --exec-prefix=${at_dest} \ + --libdir=${libdir} \ + --enable-cxx \ + --disable-shared +} + +# Make build command +atcfg_make () { + ${SUB_MAKE} all +} + +# Install build command +atcfg_install () { + make install DESTDIR=${install_place} +} diff --git a/configs/6.0/packages/gmp/stage_2 b/configs/6.0/packages/gmp/stage_2 new file mode 100644 index 000000000..da43f7d3b --- /dev/null +++ b/configs/6.0/packages/gmp/stage_2 @@ -0,0 +1,63 @@ +#!/usr/bin/env bash +# +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# GMP build parameters for stage 2 +# ================================ +# + +# Tell the build system to hold the temp install folder +ATCFG_HOLD_TEMP_INSTALL='no' +# Tell the build system to hold the temp build folder +ATCFG_HOLD_TEMP_BUILD='no' +# Build in a new directory +ATCFG_BUILD_STAGE_T='dir' + +# Pre configure settings or commands to run +atcfg_pre_configure() { + libdir=${at_dest}/lib + if [[ "${build_arch}" == ppc64* ]]; then + libdir=${at_dest}/lib64 + fi +} + +# Configure native build command +atcfg_configure () { + PATH=${at_dest}/bin:${PATH} \ + CC="${at_dest}/bin/gcc -m${compiler}" \ + CXX="${at_dest}/bin/g++ -m${compiler}" \ + CFLAGS="-g -O3" \ + CXXFLAGS="-g -O3" \ + ${ATSRC_PACKAGE_WORK}/configure --build=${target} \ + --host=${target} \ + --target=${target} \ + --prefix=${at_dest} \ + --exec-prefix=${at_dest} \ + --libdir=${libdir} \ + --enable-cxx \ + --disable-shared +} + +# Make build command +atcfg_make () { + PATH=${at_dest}/bin:${PATH} ${SUB_MAKE} all +} + +# Install build command +atcfg_install () { + PATH=${at_dest}/bin:${PATH} \ + ${SUB_MAKE} install DESTDIR=${install_place} +} diff --git a/configs/6.0/packages/groups b/configs/6.0/packages/groups new file mode 100644 index 000000000..0dafca3df --- /dev/null +++ b/configs/6.0/packages/groups @@ -0,0 +1,50 @@ +#!/bin/bash +# +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# +# +# +# +# + +# The following lines containintg #* at the beginning should remain as is, and +# be replicated when this file is cloned, or new groups are added. + +#* toolchain: Base toolchain packages with additional support libraries, including some additional floating point support libraries +#* devel: Development tools +#* profile: Additional performance and debugging tools +#* mcore-libs: Additional multi core support libraries + +# This filters below are used to isolate toolchain devel and runtime files where +# propriate. They are arrays of *Extended* Regular Expressions (ERE). + +# Filters to use on runtime package file exclusion (sed ERE) +runtime_exclude=('/^.*\.a$/d' \ + '/^.*\/include\/.*$/d' \ + '/^.*\/share\/info\/.*$/d' \ + '/^.*\/pkgconfig\/.*$/d') + +# Filters to use on runtime package file inclusion (grep ERE) +runtime_include= + +# Filters to use on devel package file exclusion (sed ERE) +devel_exclude=('/^.*\/sbin\/ldconfig$/d') + +# Filters to use on devel package file inclusion (grep ERE) +devel_include=('^.*\.a$' \ + '^.*\/include\/.*$' \ + '^.*\/share\/info\/.*$' \ + '^.*\/pkgconfig\/.*$') diff --git a/configs/6.0/packages/kernel/kernel.mk b/configs/6.0/packages/kernel/kernel.mk new file mode 100644 index 000000000..cc90e346e --- /dev/null +++ b/configs/6.0/packages/kernel/kernel.mk @@ -0,0 +1,25 @@ +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# +# +$(eval $(call set_provides,kernel_h,single,cross_yes)) + +kernel_h: $(RCPTS)/kernel_h.rcpt + +$(RCPTS)/kernel_h.rcpt: $(kernel_h-archdeps) + @touch $@ + +$(RCPTS)/kernel_h.a.rcpt: $(RCPTS)/rsync_kernel.rcpt + @touch $@ diff --git a/configs/6.0/packages/kernel/sources b/configs/6.0/packages/kernel/sources new file mode 100644 index 000000000..58485fa99 --- /dev/null +++ b/configs/6.0/packages/kernel/sources @@ -0,0 +1,47 @@ +#!/usr/bin/env bash +# +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# + +# Internal variables to find download path +# ======================================== +ATSRC_PACKAGE_SRC_PATH=$([[ "$(expr ${AT_KERNEL} : '\([0-9]\)*')" == "3" ]] && \ + echo "v$(expr ${AT_KERNEL} : '\([0-9]\)*').x" || \ + echo "v$(expr ${AT_KERNEL} : '\([0-9][.][0-9]\)*')") + +# KERNEL source package and build info +# ==================================== +ATSRC_PACKAGE_NAME="Linux kernel" +ATSRC_PACKAGE_VER=${AT_KERNEL} +ATSRC_PACKAGE_LICENSE="GPL 2.0" +ATSRC_PACKAGE_DOCLINK="https://www.kernel.org/doc/" +ATSRC_PACKAGE_RELFIXES= +ATSRC_PACKAGE_STR_VER="${ATSRC_PACKAGE_NAME} ${ATSRC_PACKAGE_VER}" +ATSRC_PACKAGE_PRE="test -d linux-${ATSRC_PACKAGE_VER}" +ATSRC_PACKAGE_CO=([0]="wget -N http://www.kernel.org/pub/linux/kernel/${ATSRC_PACKAGE_SRC_PATH}/linux-${ATSRC_PACKAGE_VER}.tar.gz" \ + [1]="wget -N http://kernel.c3sl.ufpr.br/pub/linux/kernel/${ATSRC_PACKAGE_SRC_PATH}/linux-${ATSRC_PACKAGE_VER}.tar.gz") +ATSRC_PACKAGE_POST="tar -xzf linux-${ATSRC_PACKAGE_VER}.tar.gz" +ATSRC_PACKAGE_SRC=${AT_BASE}/sources/linux-${ATSRC_PACKAGE_VER} +ATSRC_PACKAGE_WORK=${AT_WORK_PATH}/kernel +ATSRC_PACKAGE_MLS= +ATSRC_PACKAGE_ALOC= +ATSRC_PACKAGE_PATCHES= +ATSRC_PACKAGE_TARS= +ATSRC_PACKAGE_DISTRIB=yes +ATSRC_PACKAGE_INCLUDED=yes +ATSRC_PACKAGE_BUILDCROSS=yes +ATSRC_PACKAGE_BUNDLE=toolchain +ATSRC_PACKAGE_EXCLUDE_RN=yes diff --git a/configs/6.0/packages/kernel/specfile b/configs/6.0/packages/kernel/specfile new file mode 100644 index 000000000..d46c60911 --- /dev/null +++ b/configs/6.0/packages/kernel/specfile @@ -0,0 +1,14 @@ +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# diff --git a/configs/6.0/packages/kernel/stage_h b/configs/6.0/packages/kernel/stage_h new file mode 100644 index 000000000..e22242ce6 --- /dev/null +++ b/configs/6.0/packages/kernel/stage_h @@ -0,0 +1,134 @@ +#!/usr/bin/env bash +# +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# Kernel build parameters for stage 1 +# =================================== +# + +# Tell the build system to hold the temp install folder +ATCFG_HOLD_TEMP_INSTALL='no' +# Tell the build system to hold the temp build folder +ATCFG_HOLD_TEMP_BUILD='no' +# The kernel only supports build in the same directory of the source code' +ATCFG_BUILD_STAGE_T='link' + +# Required pre build hacks +atcfg_pre_hacks() { + # These directories are intended for native builds only. + if [[ "${cross_build}" == "yes" ]]; then + return 0 + fi + + # Preparing ${install_place}/${at_dest} folder structure + if [[ ! -d ${install_place}/${at_dest}/include/linux ]]; then + mkdir -p ${install_place}/${at_dest}/include/linux + mkdir -p ${install_place}/${at_dest}/include/asm + if [[ -n "${header_target}" ]]; then + mkdir -p ${install_place}/${at_dest}/include/asm-${header_target} + fi + if [[ -n "${header_target64}" ]]; then + mkdir -p ${install_place}/${at_dest}/include/asm-${header_target64} + fi + mkdir -p ${install_place}/${at_dest}/include/asm-generic + fi +} + +# Pre configure settings +atcfg_pre_configure() { + if [[ "${cross_build}" == "yes" ]]; then + return 0 + fi + # Continue with native builds + if [[ -e "/usr/include/sys/capability.h" ]]; then + mkdir -p ${install_place}/${at_dest}/include/sys + rsync -rptgoq --delete /usr/include/sys/capability.h ${install_place}/${at_dest}/include/sys + fi + # Make the headers available for the compat package + if [[ ! -d ${install_transfer}/compat ]]; then + mkdir -p ${install_transfer}/compat + fi + cp -rf ${install_transfer}/include \ + ${install_transfer}/compat/ + if [[ -e "./headers" ]]; then + rm -rf ./headers + fi +} + +# Configure command for build +atcfg_configure() { + echo "No need for configure on kernel install headers" +} + +# Make build command +atcfg_make() { + echo "No need for make all on kernel install headers" +} + +# Install command for native builds +atcfg_install() { + if [[ "${cross_build}" == "no" ]]; then + make headers_install ARCH=powerpc INSTALL_HDR_PATH=./headers + else + make headers_install ARCH=powerpc CROSS_COMPILE=${target}- \ + INSTALL_HDR_PATH=${install_place}/${dest_cross}/usr + fi +} + +# Post install settings or commands to run +atcfg_post_install() { + if [[ "${cross_build}" == "yes" ]]; then + return 0 + fi + # Continue with native build + pushd ./headers + for dir in $(ls -d ./include/*); do + rsync -rptgoq --delete ${dir} \ + ${install_place}/${at_dest}/include/ + if [[ ${?} -ne 0 ]]; then + echo "rsync of system kernel headers in ${dir} to ${install_place}/${at_dest}/include/ failed!" + exit 1 + fi + rsync -rptgoq --delete ${dir} \ + ${install_transfer}/compat/include/ + if [[ ${?} -ne 0 ]]; then + echo "rsync of system kernel headers in ${dir} to ${install_transfer}/compat/include/ failed!" + exit 1 + fi + done + cputable_h=$(find include -name cputable.h) + if [[ -z ${cputable_h} ]]; then + echo "Unable to find cputable.h in the kernel headers. Aborting!" + exit 1 + fi + cp ${cputable_h} \ + ${install_place}/${at_dest}/include/asm-ppc/cputable.h + cp ${cputable_h} \ + ${install_place}/${at_dest}/include/asm-ppc64/cputable.h + unset -v cputable_h + sigcontext_h=$(find include -name sigcontext.h) + if [[ -z ${sigcontext_h} ]]; then + echo "Unable to find sigcontext.h in the kernel headers. Aborting!" + exit 1 + fi + cp ${sigcontext_h} \ + ${install_place}/${at_dest}/include/asm-ppc/sigcontext.h + cp ${sigcontext_h} \ + ${install_place}/${at_dest}/include/asm-ppc64/sigcontext.h + unset -v sigcontext_h + popd + rm -rf ./headers +} diff --git a/configs/6.0/packages/libauxv/libauxv.mk b/configs/6.0/packages/libauxv/libauxv.mk new file mode 100644 index 000000000..79b769267 --- /dev/null +++ b/configs/6.0/packages/libauxv/libauxv.mk @@ -0,0 +1,28 @@ +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# +# +$(eval $(call set_provides,libauxv_1,multi,cross_no)) + +libauxv_1: $(RCPTS)/libauxv_1.rcpt + +$(RCPTS)/libauxv_1.rcpt: $(libauxv_1-archdeps) + @touch $@ + +$(RCPTS)/libauxv_1-32.a.rcpt: $(patsubst %,$(RCPTS)/%.rcpt,gcc_4 rsync_libauxv) + @touch $@ + +$(RCPTS)/libauxv_1-64.a.rcpt: $(patsubst %,$(RCPTS)/%.rcpt,gcc_4 rsync_libauxv) + @touch $@ diff --git a/configs/6.0/packages/libauxv/sources b/configs/6.0/packages/libauxv/sources new file mode 100644 index 000000000..923b9cdfe --- /dev/null +++ b/configs/6.0/packages/libauxv/sources @@ -0,0 +1,44 @@ +#!/usr/bin/env bash +# +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# Libauxv source package and build info +# ================================== +# + +ATSRC_PACKAGE_NAME="Libauxv" +ATSRC_PACKAGE_VER=0.1.0 +ATSRC_PACKAGE_REV=036949da +ATSRC_PACKAGE_LICENSE="BSD License" +ATSRC_PACKAGE_DOCLINK="https://www.ibm.com/developerworks/wikis/display/LinuxP/Optimized+Libraries" +ATSRC_PACKAGE_RELFIXES= +ATSRC_PACKAGE_STR_VER="${ATSRC_PACKAGE_NAME} ${ATSRC_PACKAGE_VER}-${ATSRC_PACKAGE_REV}" +ATSRC_PACKAGE_VERID="${ATSRC_PACKAGE_VER}${ATSRC_PACKAGE_REV:+-${ATSRC_PACKAGE_REV}}" +ATSRC_PACKAGE_PRE="test -d libauxv-${ATSRC_PACKAGE_VERID}" +ATSRC_PACKAGE_CO=([0]="wget -O libauxv-${ATSRC_PACKAGE_VERID}.tar.gz https://github.com/Libauxv/libauxv/archive/${ATSRC_PACKAGE_REV}.tar.gz") +ATSRC_PACKAGE_GIT="" +# Use --transform to give a better name to Libauxv directory. +ATSRC_PACKAGE_POST="tar xzf libauxv-${ATSRC_PACKAGE_VERID}.tar.gz --transform=s/libauxv-${ATSRC_PACKAGE_REV}[^\\/]*/libauxv-${ATSRC_PACKAGE_VERID}/" +ATSRC_PACKAGE_SRC="${AT_BASE}/sources/libauxv-${ATSRC_PACKAGE_VERID}" +ATSRC_PACKAGE_WORK=${AT_WORK_PATH}/libauxv +ATSRC_PACKAGE_MLS="" +ATSRC_PACKAGE_ALOC="" +ATSRC_PACKAGE_PATCHES="" +ATSRC_PACKAGE_TARS="" +ATSRC_PACKAGE_MAKE_CHECK="" +ATSRC_PACKAGE_DISTRIB=no +ATSRC_PACKAGE_BUILDCROSS=no +ATSRC_PACKAGE_BUNDLE=toolchain diff --git a/configs/6.0/packages/libauxv/specfile b/configs/6.0/packages/libauxv/specfile new file mode 100644 index 000000000..d46c60911 --- /dev/null +++ b/configs/6.0/packages/libauxv/specfile @@ -0,0 +1,14 @@ +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# diff --git a/configs/6.0/packages/libauxv/stage_1 b/configs/6.0/packages/libauxv/stage_1 new file mode 100644 index 000000000..321061fc7 --- /dev/null +++ b/configs/6.0/packages/libauxv/stage_1 @@ -0,0 +1,75 @@ +#!/usr/bin/env bash +# +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# Libauxv build parameters for stage 1 32 or 64 bits +# ============================================ +# + +source ${AT_BASE}/scripts/utilities/bitsize_selection.sh + +# Tell the build system to hold the temp install folder +ATCFG_HOLD_TEMP_INSTALL='no' +# Tell the build system to hold the temp build folder +ATCFG_HOLD_TEMP_BUILD='no' +# Build in a new directory +ATCFG_BUILD_STAGE_T='dir' + +atcfg_configure() { + local base_target=$(find_build_target ${AT_BIT_SIZE}) + local base_libdir=$(find_build_libdir ${AT_BIT_SIZE}) + local base_bindir=$(find_build_bindir ${AT_BIT_SIZE}) + PATH=${at_dest}/bin:${PATH} \ + CC="${at_dest}/bin/gcc -m${AT_BIT_SIZE}" \ + CFLAGS="-g -O2 -fpic" \ + ${ATSRC_PACKAGE_WORK}/configure \ + --build=${target} \ + --host=${base_target} \ + --prefix=${at_dest} \ + --exec-prefix=${at_dest} \ + --libdir="${at_dest}/${base_libdir}" \ + --bindir="${at_dest}/${base_bindir}" \ + --enable-shared \ + --enable-static +} + + +atcfg_make() { + PATH=${at_dest}/bin:${PATH} ${SUB_MAKE} +} + +atcfg_make_check() { + # Package testing not done for cross build. + if [[ "${cross_build}" == 'no' ]]; then + PATH=${at_dest}/bin:${PATH} ${SUB_MAKE} check + fi +} + +atcfg_install() { + PATH=${at_dest}/bin:${PATH} \ + ${SUB_MAKE} install install_root=${install_place} +} + + +atcfg_post_install() { + # Remove duplicated files prior to 64 bits final install when building + # for the alternate target because the main target already provide + # them. + local base_target=$(find_build_target ${AT_BIT_SIZE}) + if [[ "${base_target}" == "${alternate_target}" ]]; then + rm -rf ${install_place}/${at_dest}/{include,share} + fi +} diff --git a/configs/6.0/packages/libdfp/libdfp.mk b/configs/6.0/packages/libdfp/libdfp.mk new file mode 100644 index 000000000..a01abfc65 --- /dev/null +++ b/configs/6.0/packages/libdfp/libdfp.mk @@ -0,0 +1,48 @@ +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# +# +$(eval $(call set_provides,libdfp_1,multi,cross_no)) + +# List of dependencies in order to build the tuned libraries for 32 or +# 64 bits. +libdfp_tuned-32-deps := $(RCPTS)/rsync_libdfp.rcpt \ + $(RCPTS)/gcc_3.rcpt \ + $(RCPTS)/glibc_2-32.b.rcpt \ + $(glibc_tuned-32-archdeps) +libdfp_tuned-64-deps := $(RCPTS)/rsync_libdfp.rcpt \ + $(RCPTS)/gcc_3.rcpt \ + $(RCPTS)/glibc_2-64.b.rcpt \ + $(glibc_tuned-64-archdeps) +# Enable tuned targets +$(eval $(call provide_tuneds,libdfp)) + +libdfp_1: $(RCPTS)/libdfp_1.rcpt + +libdfp_tuned: $(RCPTS)/libdfp_tuned.rcpt + +$(RCPTS)/libdfp_1.rcpt: $(libdfp_1-archdeps) + @touch $@ + +$(RCPTS)/libdfp_1-32.a.rcpt: $(patsubst %,$(RCPTS)/%.rcpt,gcc_3 glibc_2-32.b \ + rsync_libdfp) + @touch $@ + +$(RCPTS)/libdfp_1-64.a.rcpt: $(patsubst %,$(RCPTS)/%.rcpt,gcc_3 glibc_2-64.b \ + rsync_libdfp) + @touch $@ + +$(RCPTS)/libdfp_tuned.rcpt: $(libdfp_tuned-archdeps) + @touch $@ diff --git a/configs/6.0/packages/libdfp/sources b/configs/6.0/packages/libdfp/sources new file mode 100644 index 000000000..ce6fd8980 --- /dev/null +++ b/configs/6.0/packages/libdfp/sources @@ -0,0 +1,43 @@ +#!/usr/bin/env bash +# +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# LIBDFP source package and build info +# ==================================== +# + +ATSRC_PACKAGE_NAME="Decimal Floating Point C Library" +ATSRC_PACKAGE_VER=1.0.8 +ATSRC_PACKAGE_REV=8bd61e9b +ATSRC_PACKAGE_LICENSE="Lesser GPL 2.1" +ATSRC_PACKAGE_DOCLINK="https://raw.github.com/libdfp/libdfp/master/README.user" +ATSRC_PACKAGE_STR_VER="${ATSRC_PACKAGE_NAME} ${ATSRC_PACKAGE_VER}-r${ATSRC_PACKAGE_REV}" +ATSRC_PACKAGE_VERID="${ATSRC_PACKAGE_VER}${ATSRC_PACKAGE_REV:+-${ATSRC_PACKAGE_REV}}" +ATSRC_PACKAGE_PRE="test -d libdfp-${ATSRC_PACKAGE_VERID}" +ATSRC_PACKAGE_CO=([0]="wget -O libdfp-${ATSRC_PACKAGE_VERID}.tar.gz https://github.com/libdfp/libdfp/archive/${ATSRC_PACKAGE_REV}.tar.gz") +ATSRC_PACKAGE_GIT="" +# Use --transform to give a better name to Libdfp directory. +ATSRC_PACKAGE_POST="tar xzf libdfp-${ATSRC_PACKAGE_VERID}.tar.gz --transform=s/libdfp-${ATSRC_PACKAGE_REV}[^\\/]*/libdfp-${ATSRC_PACKAGE_VERID}/" +ATSRC_PACKAGE_SRC=${AT_BASE}/sources/libdfp-${ATSRC_PACKAGE_VERID} +ATSRC_PACKAGE_WORK=${AT_WORK_PATH}/libdfp +ATSRC_PACKAGE_MLS="" +ATSRC_PACKAGE_PATCHES="" +ATSRC_PACKAGE_ALOC="" +ATSRC_PACKAGE_TARS="" +ATSRC_PACKAGE_MAKE_CHECK="" +ATSRC_PACKAGE_DISTRIB=yes +ATSRC_PACKAGE_BUILDCROSS=no +ATSRC_PACKAGE_BUNDLE=toolchain diff --git a/configs/6.0/packages/libdfp/specfile b/configs/6.0/packages/libdfp/specfile new file mode 100644 index 000000000..d46c60911 --- /dev/null +++ b/configs/6.0/packages/libdfp/specfile @@ -0,0 +1,14 @@ +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# diff --git a/configs/6.0/packages/libdfp/stage_1 b/configs/6.0/packages/libdfp/stage_1 new file mode 100644 index 000000000..dd3cef256 --- /dev/null +++ b/configs/6.0/packages/libdfp/stage_1 @@ -0,0 +1,84 @@ +#!/usr/bin/env bash +# +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +source ${AT_BASE}/scripts/utilities/bitsize_selection.sh + +# LIBDFP build parameters for stage 1 32 or 64 bits +# =========================================== +# + +atcfg_configure() { + local base_libdir=$(find_build_libdir ${AT_BIT_SIZE}) + local base_target=$(find_build_target ${AT_BIT_SIZE}) + PATH=${at_dest}/bin:${PATH} \ + AUTOCONF="${autoconf}" \ + CC="${at_dest}/bin/gcc" \ + CXX="${at_dest}/bin/g++" \ + CFLAGS="-Wl,-zrelro -g -O3 -m${AT_BIT_SIZE}" \ + CXXFLAGS="-g -O3 -m${AT_BIT_SIZE}" \ + ${ATSRC_PACKAGE_WORK}/configure \ + --build=${base_target} \ + --host=${base_target} \ + --prefix="${at_dest}" \ + --libdir="${at_dest}/${base_libdir}" \ + --includedir="${at_dest}/include" \ + --with-backend=libdecnumber \ + --enable-decimal-float=dpd \ + --with-cpu="${build_base_arch}" +} + +atcfg_make() { + PATH=${at_dest}/bin:${PATH} ${SUB_MAKE} +} + + +atcfg_make_check() { + # Package testing not done on cross build + if [[ "${cross_build}" == 'no' ]]; then + PATH=${at_dest}/bin:${PATH} ${SUB_MAKE} check + fi +} + + +atcfg_install() { + PATH=${at_dest}/bin:${PATH} \ + install_root=${install_place} \ + ${SUB_MAKE} install +} + +atcfg_post_install() { + local base_libdir=$(find_build_libdir ${AT_BIT_SIZE}) + set -e + if [[ "${cross_build}" == 'no' ]]; then + # Hack around to avoid ld.so.cache getting the libs from the + # system as ldconfig puts platform based directories preceding + # other directories. + ${AT_BASE}/scripts/utilities/create_lib_symlinks.sh \ + "${install_transfer}/${base_libdir}/" \ + "${install_transfer}/${base_libdir}/${build_load_arch}" + fi + set +e +} + +# SPECIAL SETTINGS +# ========================================================= +# Tell the build system to hold the temp install folder +ATCFG_HOLD_TEMP_INSTALL='no' +# Tell the build system to hold the temp build folder +ATCFG_HOLD_TEMP_BUILD='no' +# Build in a new directory +ATCFG_BUILD_STAGE_T='dir' diff --git a/configs/6.0/packages/libdfp/stage_optimized b/configs/6.0/packages/libdfp/stage_optimized new file mode 100644 index 000000000..4dcf7b819 --- /dev/null +++ b/configs/6.0/packages/libdfp/stage_optimized @@ -0,0 +1,86 @@ +#!/usr/bin/env bash +# +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +source ${AT_BASE}/scripts/utilities/bitsize_selection.sh + +# LIBDFP build parameters for stage 1 32 bits +# =========================================== + + +# Tell the build system to hold the temp install folder +ATCFG_HOLD_TEMP_INSTALL='no' +# Tell the build system to hold the temp build folder +ATCFG_HOLD_TEMP_BUILD='no' +# Build in a new directory +ATCFG_BUILD_STAGE_T='dir' +# + +atcfg_configure() { + local base_libdir=$(find_build_libdir ${AT_BIT_SIZE}) + local base_target=$(find_build_target ${AT_BIT_SIZE}) + PATH=${at_dest}/bin:${PATH} \ + AUTOCONF="${autoconf}" \ + CC="${at_dest}/bin/gcc" \ + CXX="${at_dest}/bin/g++" \ + CFLAGS="-Wl,-zrelro -g -O3 -m${AT_BIT_SIZE}" \ + CXXFLAGS="-g -O3 -m${AT_BIT_SIZE}" \ + ${ATSRC_PACKAGE_WORK}/configure \ + --build=${base_target} \ + --host=${base_target} \ + --prefix="${at_dest}" \ + --libdir="${at_dest}/${base_libdir}" \ + --includedir="${at_dest}/include" \ + --with-backend=libdecnumber \ + --enable-decimal-float=dpd \ + --with-cpu=${AT_OPTIMIZE_CPU/ppc/} +} + +atcfg_make() { + PATH=${at_dest}/bin:${PATH} ${SUB_MAKE} +} + +atcfg_make_check() { + # Package testing not done on cross build + if [[ "${cross_build}" == 'no' ]]; then + PATH=${at_dest}/bin:${PATH} ${SUB_MAKE} check + fi +} + +atcfg_install() { + PATH=${at_dest}/bin:${PATH} \ + install_root=${install_place} \ + ${SUB_MAKE} install +} + + +atcfg_post_install() { + local base_libdir=$(find_build_libdir ${AT_BIT_SIZE}) + # Save all libraries into a tar file + pushd "${install_place}/${at_dest}/${base_libdir}" + tar czf "${install_place}/${AT_OPTIMIZE_CPU}.tar.gz" \ + $(find . -name "*.so" -o -name "*.so.*" -o -name "*.a") + popd + # Remove all installed built files + rm -rf "${install_place}/${at_dest}" + # Create processor lib target + mkdir -p "${install_place}/${at_dest}/${base_libdir}/${AT_OPTIMIZE_CPU}" + # Place saved libs on created final target + pushd "${install_place}/${at_dest}/${base_libdir}/${AT_OPTIMIZE_CPU}" + tar xzf "${install_place}/${AT_OPTIMIZE_CPU}.tar.gz" + popd + set +e +} diff --git a/configs/6.0/packages/libhugetlbfs/libhugetlbfs.mk b/configs/6.0/packages/libhugetlbfs/libhugetlbfs.mk new file mode 100644 index 000000000..32ee8e99c --- /dev/null +++ b/configs/6.0/packages/libhugetlbfs/libhugetlbfs.mk @@ -0,0 +1,25 @@ +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# +# +$(eval $(call set_provides,libhugetlbfs_1,single,cross_no)) + +libhugetlbfs_1: $(RCPTS)/libhugetlbfs_1.rcpt + +$(RCPTS)/libhugetlbfs_1.rcpt: $(libhugetlbfs_1-archdeps) + @touch $@ + +$(RCPTS)/libhugetlbfs_1.a.rcpt: $(patsubst %,$(RCPTS)/%.rcpt,gcc_4 rsync_libhugetlbfs) + @touch $@ diff --git a/configs/6.0/packages/libhugetlbfs/sources b/configs/6.0/packages/libhugetlbfs/sources new file mode 100644 index 000000000..0cd2e2d67 --- /dev/null +++ b/configs/6.0/packages/libhugetlbfs/sources @@ -0,0 +1,39 @@ +#!/usr/bin/env bash +# +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# Libhugetlbfs source package and build info +# ========================================== +# +ATSRC_PACKAGE_NAME="Libhugetlbfs" +ATSRC_PACKAGE_VER=2.9 +ATSRC_PACKAGE_LICENSE="Lesser GPL 2.1" +ATSRC_PACKAGE_DOCLINK="https://github.com/libhugetlbfs/libhugetlbfs" +ATSRC_PACKAGE_RELFIXES= +ATSRC_PACKAGE_STR_VER="${ATSRC_PACKAGE_NAME} ${ATSRC_PACKAGE_VER}" +ATSRC_PACKAGE_PRE="test -d libhugetlbfs-${ATSRC_PACKAGE_VER}" +ATSRC_PACKAGE_CO=([0]="wget -O libhugetlbfs-${ATSRC_PACKAGE_VER}.tar.gz https://github.com/libhugetlbfs/libhugetlbfs/archive/${ATSRC_PACKAGE_VER}.tar.gz") +ATSRC_PACKAGE_POST="tar -xzf libhugetlbfs-${ATSRC_PACKAGE_VER}.tar.gz" +ATSRC_PACKAGE_SRC="${AT_BASE}/sources/libhugetlbfs-${ATSRC_PACKAGE_VER}" +ATSRC_PACKAGE_WORK=${AT_WORK_PATH}/libhugetlbfs +ATSRC_PACKAGE_MLS="" +ATSRC_PACKAGE_ALOC="" +ATSRC_PACKAGE_PATCHES="" +ATSRC_PACKAGE_TARS="" +ATSRC_PACKAGE_MAKE_CHECK="" +ATSRC_PACKAGE_DISTRIB=yes +ATSRC_PACKAGE_BUILDCROSS=no +ATSRC_PACKAGE_BUNDLE=toolchain diff --git a/configs/6.0/packages/libhugetlbfs/specfile b/configs/6.0/packages/libhugetlbfs/specfile new file mode 100644 index 000000000..d46c60911 --- /dev/null +++ b/configs/6.0/packages/libhugetlbfs/specfile @@ -0,0 +1,14 @@ +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# diff --git a/configs/6.0/packages/libhugetlbfs/stage_1 b/configs/6.0/packages/libhugetlbfs/stage_1 new file mode 100644 index 000000000..53349fa73 --- /dev/null +++ b/configs/6.0/packages/libhugetlbfs/stage_1 @@ -0,0 +1,69 @@ +#!/usr/bin/env bash +# +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# Libhugetlbfs build parameters for stage 1 +# ================================================= +# + +ATCFG_HOLD_TEMP_INSTALL='no' +# Tell the build system to hold the temp build folder +ATCFG_HOLD_TEMP_BUILD='no' +# Build in a new directory +ATCFG_BUILD_STAGE_T='link' + + +atcfg_configure() +{ + if [ ! -f "version" ]; then + echo "${ATSRC_PACKAGE_VER}" > version + fi + cat Makefile | \ + sed "/PREFIX =/s/^PREFIX =/PREFIX \?=/" | \ + sed "/EXEDIR =/s/^EXEDIR =/EXEDIR \?=/" > Makefile.temp + [[ ${?} -eq 0 ]] && mv Makefile.temp Makefile || exit 1 +} + + +atcfg_make() +{ + # Libhugetlbfs doesn't support parallel builds + PATH="${at_dest}/bin:${PATH}" \ + PREFIX="${at_dest}" \ + EXEDIR="${at_dest}/bin" \ + make -j1 +} + + +atcfg_make_check() +{ + # Package testing not done for a cross build + if [[ "${cross_build}" == 'no' ]]; then + PATH="${at_dest}/bin:${PATH}" \ + PREFIX="${at_dest}" \ + EXEDIR="${at_dest}/bin" \ + make -j1 tests + fi +} + + +atcfg_install() +{ + PATH="${at_dest}/bin:${PATH}" \ + PREFIX="${at_dest}" \ + EXEDIR="${at_dest}/bin" \ + make -j1 install DESTDIR="${install_place}" +} diff --git a/configs/6.0/packages/libpfm/libpfm.mk b/configs/6.0/packages/libpfm/libpfm.mk new file mode 100644 index 000000000..52bf67eb3 --- /dev/null +++ b/configs/6.0/packages/libpfm/libpfm.mk @@ -0,0 +1,28 @@ +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# +# +$(eval $(call set_provides,libpfm_1,multi,cross_no)) + +libpfm_1: $(RCPTS)/libpfm_1.rcpt + +$(RCPTS)/libpfm_1.rcpt: $(libpfm_1-archdeps) + @touch $@ + +$(RCPTS)/libpfm_1-32.a.rcpt: $(patsubst %,$(RCPTS)/%.rcpt,gcc_4 rsync_libpfm) + @touch $@ + +$(RCPTS)/libpfm_1-64.a.rcpt: $(patsubst %,$(RCPTS)/%.rcpt,gcc_4 rsync_libpfm) + @touch $@ diff --git a/configs/6.0/packages/libpfm/sources b/configs/6.0/packages/libpfm/sources new file mode 100644 index 000000000..a0704b83a --- /dev/null +++ b/configs/6.0/packages/libpfm/sources @@ -0,0 +1,41 @@ +#!/usr/bin/env bash +# +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# Libpfm source package and build info +# ==================================== +# + +ATSRC_PACKAGE_NAME="Libpfm" +ATSRC_PACKAGE_VER=4.3.0 +ATSRC_PACKAGE_REV=600c8cbd +ATSRC_PACKAGE_LICENSE="MIT" +ATSRC_PACKAGE_DOCLINK="http://perfmon2.sourceforge.net/docs_v4.html" +ATSRC_PACKAGE_RELFIXES= +ATSRC_PACKAGE_STR_VER="${ATSRC_PACKAGE_NAME} ${ATSRC_PACKAGE_VER}${ATSRC_PACKAGE_REV:+-${ATSRC_PACKAGE_REV}}" +ATSRC_PACKAGE_PRE="test -d libpfm-${ATSRC_PACKAGE_VER}${ATSRC_PACKAGE_REV:+-${ATSRC_PACKAGE_REV}}" +ATSRC_PACKAGE_CO=([0]="git archive --prefix=libpfm-${ATSRC_PACKAGE_VER}${ATSRC_PACKAGE_REV:+-${ATSRC_PACKAGE_REV}}/ --remote=git://git.code.sf.net/p/perfmon2/libpfm4 ${ATSRC_PACKAGE_REV} > libpfm-${ATSRC_PACKAGE_VER}${ATSRC_PACKAGE_REV:+-${ATSRC_PACKAGE_REV}}.tar") +ATSRC_PACKAGE_POST="tar -xf libpfm-${ATSRC_PACKAGE_VER}${ATSRC_PACKAGE_REV:+-${ATSRC_PACKAGE_REV}}.tar" +ATSRC_PACKAGE_SRC="${AT_BASE}/sources/libpfm-${ATSRC_PACKAGE_VER}${ATSRC_PACKAGE_REV:+-${ATSRC_PACKAGE_REV}}" +ATSRC_PACKAGE_WORK=${AT_WORK_PATH}/libpfm +ATSRC_PACKAGE_MLS= +ATSRC_PACKAGE_ALOC= +ATSRC_PACKAGE_PATCHES= +ATSRC_PACKAGE_TARS= +ATSRC_PACKAGE_MAKE_CHECK= +ATSRC_PACKAGE_DISTRIB=no +ATSRC_PACKAGE_BUILDCROSS=no +ATSRC_PACKAGE_BUNDLE=profile diff --git a/configs/6.0/packages/libpfm/specfile b/configs/6.0/packages/libpfm/specfile new file mode 100644 index 000000000..d46c60911 --- /dev/null +++ b/configs/6.0/packages/libpfm/specfile @@ -0,0 +1,14 @@ +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# diff --git a/configs/6.0/packages/libpfm/stage_1 b/configs/6.0/packages/libpfm/stage_1 new file mode 100644 index 000000000..282f5fd26 --- /dev/null +++ b/configs/6.0/packages/libpfm/stage_1 @@ -0,0 +1,65 @@ +#!/usr/bin/env bash +# +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +source ${AT_BASE}/scripts/utilities/bitsize_selection.sh + +# +# Libpfm build parameters for stage 1 32 or 64 bits +# =========================================== +# + +# Tell the build system to hold the temp install folder +ATCFG_HOLD_TEMP_INSTALL='no' +# Tell the build system to hold the temp build folder +ATCFG_HOLD_TEMP_BUILD='no' +# Build in a new directory +ATCFG_BUILD_STAGE_T='link' + + +atcfg_pre_configure() { + # Clean any previous build mess + ${SUB_MAKE} distclean >/dev/null +} +atcfg_configure() { + cat config.mk | \ + sed -e "s/^PREFIX=.*$/PREFIX="${at_dest//\//\\/}"/g" > config.mk.tmp + [[ ${?} -eq 0 ]] && mv config.mk.tmp config.mk || exit 1 +} + + +# Libpfm doesn't support parallel builds +atcfg_make() { + local base_libdir=$(find_build_libdir ${AT_BIT_SIZE}) + PATH="${at_dest}/bin:${PATH}" \ + CC="${at_dest}/bin/gcc" \ + ${SUB_MAKE} LIBDIR=${at_dest}/${base_libdir} \ + BITMODE=${AT_BIT_SIZE} \ + OPTIM="-m${AT_BIT_SIZE} -O3" +} + + +# make check function not needed because tests are run during make +#atcfg_make_check() { +#} + +atcfg_install() { + local base_libdir=$(find_build_libdir ${AT_BIT_SIZE}) + PATH="${at_dest}/bin:${PATH}" \ + ${SUB_MAKE} LDCONFIG=true LIBDIR=${at_dest}/${base_libdir} \ + BITMODE=${AT_BIT_SIZE} \ + DESTDIR=${install_place} install +} diff --git a/configs/6.0/packages/libsphde/libsphde.mk b/configs/6.0/packages/libsphde/libsphde.mk new file mode 100644 index 000000000..38ef92275 --- /dev/null +++ b/configs/6.0/packages/libsphde/libsphde.mk @@ -0,0 +1,33 @@ +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# +# +$(eval $(call set_provides,libsphde_1,multi,cross_no)) + +libsphde: $(RCPTS)/libsphde_1.rcpt + +# Add it to the target 3rdparty_libs +3rdparty_libs-reqs += $(RCPTS)/libsphde_1.rcpt + +$(RCPTS)/libsphde_1.rcpt: $(libsphde_1-archdeps) + @touch $@ + +$(RCPTS)/libsphde_1-32.a.rcpt: $(patsubst %,$(RCPTS)/%.rcpt,gcc_4.b \ + rsync_libsphde) + @touch $@ + +$(RCPTS)/libsphde_1-64.a.rcpt: $(patsubst %,$(RCPTS)/%.rcpt,gcc_4.b \ + rsync_libsphde) + @touch $@ diff --git a/configs/6.0/packages/libsphde/sources b/configs/6.0/packages/libsphde/sources new file mode 100644 index 000000000..6a974386d --- /dev/null +++ b/configs/6.0/packages/libsphde/sources @@ -0,0 +1,44 @@ +#!/usr/bin/env bash +# +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# SPHDE source package and build info +# ================================== +# + +ATSRC_PACKAGE_NAME="SPHDE" +ATSRC_PACKAGE_VER=0.9 +ATSRC_PACKAGE_REV=6d3dc37d +ATSRC_PACKAGE_LICENSE="Eclipse Public License 1.0" +ATSRC_PACKAGE_DOCLINK="http://sphde.github.io/sphde/" +ATSRC_PACKAGE_RELFIXES= +ATSRC_PACKAGE_STR_VER="${ATSRC_PACKAGE_NAME} ${ATSRC_PACKAGE_VER}-${ATSRC_PACKAGE_REV}" +ATSRC_PACKAGE_VERID="${ATSRC_PACKAGE_VER}${ATSRC_PACKAGE_REV:+-${ATSRC_PACKAGE_REV}}" +ATSRC_PACKAGE_PRE="test -d sphde-${ATSRC_PACKAGE_VERID}" +ATSRC_PACKAGE_CO=([0]="wget -O sphde-${ATSRC_PACKAGE_VERID}.tar.gz https://github.com/sphde/sphde/archive/${ATSRC_PACKAGE_REV}.tar.gz") +ATSRC_PACKAGE_GIT="" +# Use --transform to give a better name to SPHDE directory. +ATSRC_PACKAGE_POST="tar xzf sphde-${ATSRC_PACKAGE_VERID}.tar.gz --transform=s/sphde-${ATSRC_PACKAGE_REV}[^\\/]*/sphde-${ATSRC_PACKAGE_VERID}/" +ATSRC_PACKAGE_SRC="${AT_BASE}/sources/sphde-${ATSRC_PACKAGE_VERID}" +ATSRC_PACKAGE_WORK=${AT_WORK_PATH}/sphde +ATSRC_PACKAGE_MLS= +ATSRC_PACKAGE_ALOC= +ATSRC_PACKAGE_PATCHES= +ATSRC_PACKAGE_TARS= +ATSRC_PACKAGE_MAKE_CHECK= +ATSRC_PACKAGE_DISTRIB=no +ATSRC_PACKAGE_BUILDCROSS=no +ATSRC_PACKAGE_BUNDLE=mcore-libs diff --git a/configs/6.0/packages/libsphde/specfile b/configs/6.0/packages/libsphde/specfile new file mode 100644 index 000000000..d46c60911 --- /dev/null +++ b/configs/6.0/packages/libsphde/specfile @@ -0,0 +1,14 @@ +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# diff --git a/configs/6.0/packages/libsphde/stage_1 b/configs/6.0/packages/libsphde/stage_1 new file mode 100644 index 000000000..ecf9fed4b --- /dev/null +++ b/configs/6.0/packages/libsphde/stage_1 @@ -0,0 +1,76 @@ +#!/usr/bin/env bash +# +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# SPHDE build parameters for stage 1 32/64 bits +# ========================================= +# + +# Include some standard functions +source ${utilities}/bitsize_selection.sh + +# Tell the build system to hold the temp install folder +ATCFG_HOLD_TEMP_INSTALL='no' +# Tell the build system to hold the temp build folder +ATCFG_HOLD_TEMP_BUILD='no' +# Build in a new directory +ATCFG_BUILD_STAGE_T='dir' + +atcfg_configure () +{ + local bindir=${at_dest}/$(find_build_bindir ${AT_BIT_SIZE}) + local libdir=${at_dest}/$(find_build_libdir ${AT_BIT_SIZE}) + local base_target=$(find_build_target ${AT_BIT_SIZE}) + + PATH=${at_dest}/bin:${PATH} \ + CC="${at_dest}/bin/gcc" \ + CXX="${at_dest}/bin/g++" \ + CFLAGS="-Wl,-zrelro -m${AT_BIT_SIZE} -O3 -g" \ + CXXFLAGS="-m${AT_BIT_SIZE} -O3 -g" \ + ${ATSRC_PACKAGE_WORK}/configure --build=${base_target} \ + --host=${base_target} \ + --libdir="${libdir}" \ + --bindir="${bindir}" \ + --includedir="${at_dest}/include" +} + +atcfg_make () +{ + PATH=${at_dest}/bin:${PATH} ${SUB_MAKE} +} + +atcfg_make_check() { + # Package testing not done for cross build. + if [[ "${cross_build}" == 'no' ]]; then + PATH=${at_dest}/bin:${PATH} ${SUB_MAKE} check + fi +} + +atcfg_install () +{ + PATH=${at_dest}/bin:${PATH} \ + ${SUB_MAKE} install DESTDIR=${install_place} +} + +atcfg_post_install() { + # Remove duplicated files prior to final install when building + # for the alternate target because the main target already provides + # them. + local base_target=$(find_build_target ${AT_BIT_SIZE}) + if [[ "${base_target}" == "${alternate_target}" ]]; then + rm -rf ${install_place}/${at_dest}/include + fi +} diff --git a/configs/6.0/packages/liburcu/liburcu.mk b/configs/6.0/packages/liburcu/liburcu.mk new file mode 100644 index 000000000..cdaa43ee3 --- /dev/null +++ b/configs/6.0/packages/liburcu/liburcu.mk @@ -0,0 +1,31 @@ +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# +# +$(eval $(call set_provides,liburcu_1,multi,cross_no)) + +liburcu: $(RCPTS)/liburcu_1.rcpt + +# Add it to the target 3rdparty_libs +3rdparty_libs-reqs += $(RCPTS)/liburcu_1.rcpt + +$(RCPTS)/liburcu_1.rcpt: $(liburcu_1-archdeps) + @touch $@ + +$(RCPTS)/liburcu_1-32.a.rcpt: $(patsubst %,$(RCPTS)/%.rcpt,gcc_4 rsync_liburcu) + @touch $@ + +$(RCPTS)/liburcu_1-64.a.rcpt: $(patsubst %,$(RCPTS)/%.rcpt,gcc_4 rsync_liburcu) + @touch $@ diff --git a/configs/6.0/packages/liburcu/sources b/configs/6.0/packages/liburcu/sources new file mode 100644 index 000000000..54438396d --- /dev/null +++ b/configs/6.0/packages/liburcu/sources @@ -0,0 +1,40 @@ +#!/usr/bin/env bash +# +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# URCU source package and build info +# ================================== +# + +ATSRC_PACKAGE_NAME="Userspace RCU" +ATSRC_PACKAGE_VER=0.6.4 +ATSRC_PACKAGE_LICENSE="Lesser GPL 2.1" +ATSRC_PACKAGE_DOCLINK="http://lttng.org/urcu" +ATSRC_PACKAGE_RELFIXES= +ATSRC_PACKAGE_STR_VER="${ATSRC_PACKAGE_NAME} ${ATSRC_PACKAGE_VER}" +ATSRC_PACKAGE_PRE="test -d userspace-rcu-${ATSRC_PACKAGE_VER}" +ATSRC_PACKAGE_CO=([0]="wget -N http://lttng.org/files/urcu/userspace-rcu-${ATSRC_PACKAGE_VER}.tar.bz2") +ATSRC_PACKAGE_POST="tar -xjf userspace-rcu-${ATSRC_PACKAGE_VER}.tar.bz2" +ATSRC_PACKAGE_SRC="${AT_BASE}/sources/userspace-rcu-${ATSRC_PACKAGE_VER}" +ATSRC_PACKAGE_WORK=${AT_WORK_PATH}/userspace-rcu +ATSRC_PACKAGE_MLS="" +ATSRC_PACKAGE_ALOC="" +ATSRC_PACKAGE_PATCHES="" +ATSRC_PACKAGE_TARS="" +ATSRC_PACKAGE_MAKE_CHECK="" +ATSRC_PACKAGE_DISTRIB=yes +ATSRC_PACKAGE_BUILDCROSS=no +ATSRC_PACKAGE_BUNDLE=mcore-libs diff --git a/configs/6.0/packages/liburcu/specfile b/configs/6.0/packages/liburcu/specfile new file mode 100644 index 000000000..d46c60911 --- /dev/null +++ b/configs/6.0/packages/liburcu/specfile @@ -0,0 +1,14 @@ +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# diff --git a/configs/6.0/packages/liburcu/stage_1 b/configs/6.0/packages/liburcu/stage_1 new file mode 100644 index 000000000..dd7df3cde --- /dev/null +++ b/configs/6.0/packages/liburcu/stage_1 @@ -0,0 +1,66 @@ +#!/usr/bin/env bash +# +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# URCU build parameters for stage 1 32/64 bits +# ========================================= +# + +# Include some standard functions +source ${utilities}/bitsize_selection.sh + +# Tell the build system to hold the temp install folder +ATCFG_HOLD_TEMP_INSTALL='no' +# Tell the build system to hold the temp build folder +ATCFG_HOLD_TEMP_BUILD='no' +# Build in the source code directory +ATCFG_BUILD_STAGE_T='link' + +atcfg_configure () +{ + local bindir=${at_dest}/$(find_build_bindir ${AT_BIT_SIZE}) + local libdir=${at_dest}/$(find_build_libdir ${AT_BIT_SIZE}) + local base_target=$(find_build_target ${AT_BIT_SIZE}) + + PATH=${at_dest}/bin:${PATH} \ + CC="${at_dest}/bin/gcc" \ + CFLAGS="-g -O2 -fpic -m${AT_BIT_SIZE}" \ + ${ATSRC_PACKAGE_WORK}/configure --host=${base_target} \ + --prefix="${at_dest}" \ + --exec-prefix="${at_dest}" \ + --libdir="${libdir}" \ + --bindir="${bindir}" \ + --enable-shared \ + --enable-static +} + +atcfg_make () +{ + PATH=${at_dest}/bin:${PATH} ${SUB_MAKE} +} + +atcfg_make_check() { + # Package testing not done for cross build. + if [[ "${cross_build}" == 'no' ]]; then + PATH=${at_dest}/bin:${PATH} ${SUB_MAKE} check + fi +} + +atcfg_install () +{ + PATH=${at_dest}/bin:${PATH} \ + ${SUB_MAKE} install DESTDIR=${install_place} +} diff --git a/configs/6.0/packages/mpc/mpc.mk b/configs/6.0/packages/mpc/mpc.mk new file mode 100644 index 000000000..738c1a38e --- /dev/null +++ b/configs/6.0/packages/mpc/mpc.mk @@ -0,0 +1,43 @@ +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# In a native build, the first stage of this packages is created using the +# system toolchain. +# As soon as the new toolchain is fully featured, we rebuild this package. +# In a cross compiler, this package is built for the host architecture, +# using the system toolchain, which is already fully featured. So, we don't +# need to rebuild it. +# +$(eval $(call set_provides,mpc_1,single,cross_yes)) +$(eval $(call set_provides,mpc_2,single,cross_no)) + + +mpc_1: $(RCPTS)/mpc_1.rcpt + +mpc_2: $(RCPTS)/mpc_2.rcpt + +# Build it using the system toolchain +$(RCPTS)/mpc_1.rcpt: $(mpc_1-archdeps) + @touch $@ + +# Rebuild it using the new fully featured toolchain +$(RCPTS)/mpc_2.rcpt: $(mpc_2-archdeps) + @touch $@ + + +$(RCPTS)/mpc_1.a.rcpt: $(RCPTS)/mpfr_1.rcpt $(RCPTS)/rsync_mpc.rcpt + @touch $@ + +$(RCPTS)/mpc_2.a.rcpt: $(RCPTS)/mpfr_2.rcpt + @touch $@ diff --git a/configs/6.0/packages/mpc/sources b/configs/6.0/packages/mpc/sources new file mode 100644 index 000000000..8c9fa851b --- /dev/null +++ b/configs/6.0/packages/mpc/sources @@ -0,0 +1,40 @@ +#!/usr/bin/env bash +# +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# MPC source package and build info +# ================================= +# + +ATSRC_PACKAGE_NAME="GNU MPC Library" +ATSRC_PACKAGE_VER=0.8.2 +ATSRC_PACKAGE_LICENSE="GPL 3.0" +ATSRC_PACKAGE_DOCLINK="http://www.multiprecision.org/index.php?prog=mpc&page=documentation" +ATSRC_PACKAGE_RELFIXES= +ATSRC_PACKAGE_STR_VER="${ATSRC_PACKAGE_NAME} ${ATSRC_PACKAGE_VER}" +ATSRC_PACKAGE_PRE="test -d mpc-${ATSRC_PACKAGE_VER}" +ATSRC_PACKAGE_CO=([0]="wget -N http://www.multiprecision.org/mpc/download/mpc-${ATSRC_PACKAGE_VER}.tar.gz") +ATSRC_PACKAGE_POST="tar -xzf mpc-${ATSRC_PACKAGE_VER}.tar.gz" +ATSRC_PACKAGE_SRC=${AT_BASE}/sources/mpc-${ATSRC_PACKAGE_VER} +ATSRC_PACKAGE_WORK=${AT_WORK_PATH}/mpc +ATSRC_PACKAGE_MLS= +ATSRC_PACKAGE_ALOC= +ATSRC_PACKAGE_PATCHES= +ATSRC_PACKAGE_TARS= +ATSRC_PACKAGE_MAKE_CHECK= +ATSRC_PACKAGE_DISTRIB=yes +ATSRC_PACKAGE_BUILDCROSS=yes +ATSRC_PACKAGE_BUNDLE=toolchain diff --git a/configs/6.0/packages/mpc/specfile b/configs/6.0/packages/mpc/specfile new file mode 100644 index 000000000..d46c60911 --- /dev/null +++ b/configs/6.0/packages/mpc/specfile @@ -0,0 +1,14 @@ +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# diff --git a/configs/6.0/packages/mpc/stage_1 b/configs/6.0/packages/mpc/stage_1 new file mode 100644 index 000000000..3e6e0c49e --- /dev/null +++ b/configs/6.0/packages/mpc/stage_1 @@ -0,0 +1,68 @@ +#!/usr/bin/env bash +# +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +ATCFG_HOLD_TEMP_INSTALL='no' +ATCFG_HOLD_TEMP_BUILD='no' +# Build in a new directory +ATCFG_BUILD_STAGE_T='dir' + +# Pre configure settings or commands to run +atcfg_pre_configure() { + cc_64=${system_cc} + cxx_64=${system_cxx} + libdir=${at_dest}/lib + if [[ "${cross_build}" != "yes" ]]; then + if [[ "${build_arch}" == ppc64* ]]; then + if [[ "${default_compiler}" == "32" ]]; then + cc_64="${gcc64}" + cxx_64="${gpp64}" + fi + libdir=${at_dest}/lib64 + fi + fi +} + +# Configure command for native builds +atcfg_configure() { + CC=${cc_64} \ + CXX=${cxx_64} \ + CFLAGS="-g -O" \ + CXXFLAGS="-g -O" \ + ${ATSRC_PACKAGE_WORK}/configure --build=${host} \ + --host=${host} \ + --target=${host} \ + --prefix=${at_dest} \ + --exec-prefix=${at_dest} \ + --with-gmp-include=${at_dest}/include \ + --with-gmp-lib=${libdir} \ + --with-mpfr-include=${at_dest}/include \ + --with-mpfr-lib=${libdir} \ + --libdir=${libdir} \ + --disable-shared +} + +# Make build command +atcfg_make() { + ${SUB_MAKE} all +} + +# atcfg_make_check(): Don't add here, used in stage_2 + +# Install build command +atcfg_install() { + make install DESTDIR=${install_place} +} diff --git a/configs/6.0/packages/mpc/stage_2 b/configs/6.0/packages/mpc/stage_2 new file mode 100644 index 000000000..0704ca148 --- /dev/null +++ b/configs/6.0/packages/mpc/stage_2 @@ -0,0 +1,71 @@ +#!/usr/bin/env bash +# +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# Tell the build system to hold the temp install folder +ATCFG_HOLD_TEMP_INSTALL='no' +# Tell the build system to hold the temp build folder +ATCFG_HOLD_TEMP_BUILD='no' +# The kernel only supports build in the same directory of the source code' +ATCFG_BUILD_STAGE_T='link' + +# Pre configure settings or commands to run +atcfg_pre_configure() { + # Set libdir accordingly + libdir=${at_dest}/lib + if [[ "${build_arch}" == ppc64* ]]; then + libdir=${at_dest}/lib64 + fi +} +# Configure command for native builds +atcfg_configure() { + PATH=${at_dest}/bin:${PATH} \ + CC=${at_dest}/bin/gcc \ + CXX=${at_dest}/bin/g++ \ + CFLAGS="-g -O3 -m${compiler}" \ + CXXFLAGS="-g -O3 -m${compiler}" \ + ${ATSRC_PACKAGE_WORK}/configure --build=${target} \ + --host=${target} \ + --target=${target} \ + --prefix=${at_dest} \ + --exec-prefix=${at_dest} \ + --with-gmp-include=${at_dest}/include \ + --with-gmp-lib=${libdir} \ + --with-mpfr-include=${at_dest}/include \ + --with-mpfr-lib=${libdir} \ + --libdir=${libdir} \ + --disable-shared +} + +# Make build command +atcfg_make() { + PATH=${at_dest}/bin:${PATH} \ + ${SUB_MAKE} all +} + +atcfg_make_check() { + # Package testing not done for cross build. + if [[ "${cross_build}" == 'no' ]]; then + ${SUB_MAKE} check + fi +} + + +# Install build command +atcfg_install() { + PATH=${at_dest}/bin:${PATH} \ + ${SUB_MAKE} install DESTDIR=${install_place} +} diff --git a/configs/6.0/packages/mpfr/mpfr.mk b/configs/6.0/packages/mpfr/mpfr.mk new file mode 100644 index 000000000..24568e7a7 --- /dev/null +++ b/configs/6.0/packages/mpfr/mpfr.mk @@ -0,0 +1,44 @@ +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# In a native build, the first stage of this packages is created using the +# system toolchain. +# As soon as the new toolchain is fully featured, we rebuild this package. +# In a cross compiler, this package is built for the host architecture, +# using the system toolchain, which is already fully featured. So, we don't +# need to rebuild it. +# +$(eval $(call set_provides,mpfr_1,single,cross_yes)) +$(eval $(call set_provides,mpfr_2,single,cross_no)) + + +mpfr_1: $(RCPTS)/mpfr_1.rcpt + +mpfr_2: $(RCPTS)/mpfr_2.rcpt + + +# Build it using the system toolchain +$(RCPTS)/mpfr_1.rcpt: $(mpfr_1-archdeps) + @touch $@ + +# Rebuild it using the new fully featured toolchain +$(RCPTS)/mpfr_2.rcpt: $(mpfr_2-archdeps) + @touch $@ + + +$(RCPTS)/mpfr_1.a.rcpt: $(RCPTS)/gmp_1.rcpt $(RCPTS)/rsync_mpfr.rcpt + @touch $@ + +$(RCPTS)/mpfr_2.a.rcpt: $(RCPTS)/gmp_2.rcpt + @touch $@ diff --git a/configs/6.0/packages/mpfr/sources b/configs/6.0/packages/mpfr/sources new file mode 100644 index 000000000..a0873b810 --- /dev/null +++ b/configs/6.0/packages/mpfr/sources @@ -0,0 +1,41 @@ +#!/usr/bin/env bash +# +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# MPFR source package and build info +# ================================== +# + +ATSRC_PACKAGE_NAME="GNU MPFR Library" +ATSRC_PACKAGE_VER=3.0.1 +ATSRC_PACKAGE_LICENSE="GPL 3.0" +ATSRC_PACKAGE_DOCLINK="http://www.mpfr.org/mpfr-current/mpfr.html" +ATSRC_PACKAGE_RELFIXES= +ATSRC_PACKAGE_STR_VER="${ATSRC_PACKAGE_NAME} ${ATSRC_PACKAGE_VER}" +ATSRC_PACKAGE_PRE="test -d mpfr-${ATSRC_PACKAGE_VER}" +ATSRC_PACKAGE_CO=([0]="wget -N http://www.mpfr.org/mpfr-${ATSRC_PACKAGE_VER}/mpfr-${ATSRC_PACKAGE_VER}.tar.bz2" \ + [1]="wget -N http://ftpmirror.gnu.org/mpfr/mpfr-${ATSRC_PACKAGE_VER}.tar.bz2") +ATSRC_PACKAGE_POST="tar -xjf mpfr-${ATSRC_PACKAGE_VER}.tar.bz2" +ATSRC_PACKAGE_SRC=${AT_BASE}/sources/mpfr-${ATSRC_PACKAGE_VER} +ATSRC_PACKAGE_WORK=${AT_WORK_PATH}/mpfr +ATSRC_PACKAGE_MLS= +ATSRC_PACKAGE_ALOC= +ATSRC_PACKAGE_PATCHES= +ATSRC_PACKAGE_TARS= +ATSRC_PACKAGE_MAKE_CHECK= +ATSRC_PACKAGE_DISTRIB=yes +ATSRC_PACKAGE_BUILDCROSS=yes +ATSRC_PACKAGE_BUNDLE=toolchain diff --git a/configs/6.0/packages/mpfr/specfile b/configs/6.0/packages/mpfr/specfile new file mode 100644 index 000000000..d46c60911 --- /dev/null +++ b/configs/6.0/packages/mpfr/specfile @@ -0,0 +1,14 @@ +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# diff --git a/configs/6.0/packages/mpfr/stage_1 b/configs/6.0/packages/mpfr/stage_1 new file mode 100644 index 000000000..311c548ef --- /dev/null +++ b/configs/6.0/packages/mpfr/stage_1 @@ -0,0 +1,75 @@ +#!/usr/bin/env bash +# +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# MPFR build parameters for stage 1 +# ================================= +# + +ATCFG_HOLD_TEMP_INSTALL='no' +ATCFG_HOLD_TEMP_BUILD='no' +# Build in a new directory +ATCFG_BUILD_STAGE_T='dir' + +# Pre configure settings or commands to run +atcfg_pre_configure() { + cc_64=${system_cc} + cxx_64=${system_cxx} + libdir=${at_dest}/lib + if [[ "${cross_build}" != "yes" ]]; then + if [[ "${build_arch}" == ppc64* ]]; then + if [[ "${default_compiler}" == "32" ]]; then + cc_64="${gcc64}" + cxx_64="${gpp64}" + fi + libdir=${at_dest}/lib64 + fi + fi +} + +# Configure build command +atcfg_configure() { + CC=${cc_64} \ + CXX=${cxx_64} \ + CFLAGS="-g -O" \ + CXXFLAGS="-g -O" \ + ${ATSRC_PACKAGE_WORK}/configure --build=${host} \ + --host=${host} \ + --target=${host} \ + --prefix=${at_dest} \ + --exec-prefix=${at_dest} \ + --with-gmp-include=${at_dest}/include \ + --with-gmp-lib=${libdir} \ + --libdir=${libdir} \ + --disable-shared +} + +# Make build command +atcfg_make() { + ${SUB_MAKE} all +} + +atcfg_make_check() { + # Package testing not done for cross build. + if [[ "${cross_build}" == 'no' ]]; then + ${SUB_MAKE} check + fi +} + +# Install build command +atcfg_install() { + make install DESTDIR=${install_place} +} diff --git a/configs/6.0/packages/mpfr/stage_2 b/configs/6.0/packages/mpfr/stage_2 new file mode 100644 index 000000000..8df7f94b2 --- /dev/null +++ b/configs/6.0/packages/mpfr/stage_2 @@ -0,0 +1,73 @@ +#!/usr/bin/env bash +# +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# MPFR build parameters for stage 2 +# ================================= +# + +# Tell the build system to hold the temp install folder +ATCFG_HOLD_TEMP_INSTALL='no' +# Tell the build system to hold the temp build folder +ATCFG_HOLD_TEMP_BUILD='no' +# The kernel only supports build in the same directory of the source code' +ATCFG_BUILD_STAGE_T='link' + +# ATCFG_CONFIGURE SETTINGS +# ========================================================= +# Pre configure settings or commands to run +atcfg_pre_configure() { + # Set libdir accordingly + libdir=${at_dest}/lib + if [[ "${build_arch}" == ppc64* ]]; then + libdir=${at_dest}/lib64 + fi +} +# Configure build command +atcfg_configure() { + PATH=${at_dest}/bin:${PATH} \ + CC=${at_dest}/bin/gcc \ + CXX=${at_dest}/bin/g++ \ + CFLAGS="-g -O3 -m${compiler}" \ + CXXFLAGS="-g -O3 -m${compiler}" \ + ${ATSRC_PACKAGE_WORK}/configure --build=${target} \ + --host=${target} \ + --target=${target} \ + --prefix=${at_dest} \ + --exec-prefix=${at_dest} \ + --with-gmp-include=${at_dest}/include \ + --with-gmp-lib=${libdir} \ + --libdir=${libdir} \ + --disable-shared +} + + +# ATCFG_MAKE SETTINGS +# ========================================================= +# Make build command +atcfg_make() { + PATH=${at_dest}/bin:${PATH} \ + ${SUB_MAKE} all +} + + +# ATCFG_INSTALL SETTINGS +# ========================================================= +# Install build command +atcfg_install() { + PATH=${at_dest}/bin:${PATH} \ + ${SUB_MAKE} install DESTDIR=${install_place} +} diff --git a/configs/6.0/packages/openssl/openssl.mk b/configs/6.0/packages/openssl/openssl.mk new file mode 100644 index 000000000..8964bc6fe --- /dev/null +++ b/configs/6.0/packages/openssl/openssl.mk @@ -0,0 +1,42 @@ +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# +# +$(eval $(call set_provides,openssl_1,multi,cross_no)) + +# List of dependencies in order to build the tuned libraries for 32 or +# 64 bits. +openssl_tuned-32-deps := $(RCPTS)/gcc_4.rcpt \ + $(RCPTS)/rsync_openssl.rcpt +openssl_tuned-64-deps := $(RCPTS)/gcc_4.rcpt \ + $(RCPTS)/rsync_openssl.rcpt +# Enable tuned targets +$(eval $(call provide_tuneds,openssl)) + +openssl_1: $(RCPTS)/openssl_1.rcpt + +openssl_tuned: $(RCPTS)/openssl_tuned.rcpt + +$(RCPTS)/openssl_1.rcpt: $(openssl_1-archdeps) + @touch $@ + +$(RCPTS)/openssl_1-32.a.rcpt: $(patsubst %,$(RCPTS)/%.rcpt,gcc_4 rsync_openssl) + @touch $@ + +$(RCPTS)/openssl_1-64.a.rcpt: $(patsubst %,$(RCPTS)/%.rcpt,gcc_4 rsync_openssl) + @touch $@ + +$(RCPTS)/openssl_tuned.rcpt: $(openssl_tuned-archdeps) + @touch $@ diff --git a/configs/6.0/packages/openssl/sources b/configs/6.0/packages/openssl/sources new file mode 100644 index 000000000..c4c1651f8 --- /dev/null +++ b/configs/6.0/packages/openssl/sources @@ -0,0 +1,39 @@ +#!/usr/bin/env bash +# +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# OpenSSL source package and build info +# ===================================== +# + +ATSRC_PACKAGE_NAME="Open Secure Sockets Layer" +ATSRC_PACKAGE_VER="1.0.1k" +ATSRC_PACKAGE_LICENSE="BSD and GPL 2.0" +ATSRC_PACKAGE_DOCLINK="http://www.openssl.org/docs/" +ATSRC_PACKAGE_RELFIXES= +ATSRC_PACKAGE_STR_VER="${ATSRC_PACKAGE_NAME} ${ATSRC_PACKAGE_VER}" +ATSRC_PACKAGE_PRE="test -d openssl-${ATSRC_PACKAGE_VER}" +ATSRC_PACKAGE_CO=([0]="wget -N http://www.openssl.org/source/openssl-${ATSRC_PACKAGE_VER}.tar.gz") +ATSRC_PACKAGE_POST="tar -xzf openssl-${ATSRC_PACKAGE_VER}.tar.gz" +ATSRC_PACKAGE_SRC="${AT_BASE}/sources/openssl-${ATSRC_PACKAGE_VER}" +ATSRC_PACKAGE_WORK=${AT_WORK_PATH}/openssl +ATSRC_PACKAGE_MLS= +ATSRC_PACKAGE_ALOC= +ATSRC_PACKAGE_PATCHES= +ATSRC_PACKAGE_TARS= +ATSRC_PACKAGE_DISTRIB=no +ATSRC_PACKAGE_BUILDCROSS=no +ATSRC_PACKAGE_BUNDLE=toolchain diff --git a/configs/6.0/packages/openssl/specfile b/configs/6.0/packages/openssl/specfile new file mode 100644 index 000000000..d46c60911 --- /dev/null +++ b/configs/6.0/packages/openssl/specfile @@ -0,0 +1,14 @@ +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# diff --git a/configs/6.0/packages/openssl/stage_1 b/configs/6.0/packages/openssl/stage_1 new file mode 100644 index 000000000..afe041f9c --- /dev/null +++ b/configs/6.0/packages/openssl/stage_1 @@ -0,0 +1,123 @@ +#!/usr/bin/env bash +# +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +source ${AT_BASE}/scripts/utilities/bitsize_selection.sh + +# OpenSSL build parameters for stage 1 32 or 64 bits +# ========================================= +# + +ATCFG_HOLD_TEMP_INSTALL='no' +# Tell the build system to hold the temp build folder +ATCFG_HOLD_TEMP_BUILD='no' +# Build in a new directory +ATCFG_BUILD_STAGE_T='link' + +atcfg_pre_configure() { + PATH=${at_dest}/bin:${PATH} ./config --test-sanity +} + +atcfg_configure() { + local base_libdir=$(find_build_libdir ${AT_BIT_SIZE}) + local base_target=$(find_build_target ${AT_BIT_SIZE}) + local openssl_tgt="" + + # OpenSSL uses different architecture names + case "${base_target}" in + powerpc64-*) + openssl_tgt="linux-ppc64" + ;; + powerpc-*) + # For linux-ppc builds, OpenSSL uses the default -m + # value of the compiler. + openssl_tgt="linux-ppc -m32" + ;; + powerpc64le-*) + openssl_tgt="linux-ppc64le" + ;; + *) + echo "Unknown word size ${AT_BIT_SIZE}" + return 1 + ;; + esac + + PATH=${at_dest}/bin:${PATH} \ + AR="${at_dest}/bin/ar" \ + AS="${at_dest}/bin/as" \ + CC="${at_dest}/bin/gcc" \ + CXX="${at_dest}/bin/g++" \ + LD="${at_dest}/bin/ld" \ + RANLIB="${at_dest}/bin/ranlib" \ + ./Configure ${openssl_tgt} \ + --prefix="${at_dest}" --libdir="${base_libdir}" \ + no-idea no-rc5 shared threads zlib-dynamic \ + -Wa,--noexecstack -g enable-ssl2 +} + + +atcfg_pre_make() { + PATH=${at_dest}/bin:${PATH} make -j1 depend +} +# Make build command +atcfg_make() { + PATH=${at_dest}/bin:${PATH} make -j1 +} + +atcfg_make_check() { + # Package testing not done for cross build. + if [[ "${cross_build}" == 'no' ]]; then + PATH=${at_dest}/bin:${PATH} make -j1 test + fi +} + + +atcfg_install() { + local install_arg="install_sw" + if [[ "${AT_BIT_SIZE}" == "64" ]]; then + install_arg="install" + fi + PATH=${at_dest}/bin:${PATH} \ + make MANDIR="${at_dest}/share/man" \ + INSTALL_PREFIX=${install_place} -j1 ${install_arg} +} + +atcfg_post_install() { + # Save all libraries into a tar file + local base_libdir=$(find_build_libdir ${AT_BIT_SIZE}) + if [[ "${build_arch}" == "ppc" ]]; then + pushd "${install_transfer}/lib" + tar czf "${install_place}/openssl_32.tar.gz" * + popd + # Remove all installed built files + rm -rf "${install_transfer}/*" + mkdir "${install_transfer}/lib" + # Place saved libs on created final target + pushd "${install_transfer}/lib" + tar xzf "${install_place}/openssl_32.tar.gz" + popd + fi + set -e + if [[ "${cross_build}" == 'no' ]]; then + # Hack around to avoid ld.so.cache getting the libs from the + # system as ldconfig puts platform based directories preceding + # other directories. + ${AT_BASE}/scripts/utilities/create_lib_symlinks.sh \ + "${install_transfer}/${base_libdir}/" \ + "${install_transfer}/${base_libdir}/${build_load_arch}" + fi + set +e +} diff --git a/configs/6.0/packages/openssl/stage_optimized b/configs/6.0/packages/openssl/stage_optimized new file mode 100644 index 000000000..1cff819b0 --- /dev/null +++ b/configs/6.0/packages/openssl/stage_optimized @@ -0,0 +1,112 @@ +#!/usr/bin/env bash +# +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# OpenSSL build parameters for CPU optimized 32 or 64 bits +# ========================================= +# + +# Tell the build system to hold the temp install folder +ATCFG_HOLD_TEMP_INSTALL='no' +# Tell the build system to hold the temp build folder +ATCFG_HOLD_TEMP_BUILD='no' +# Build in a new directory +ATCFG_BUILD_STAGE_T='link' + +source ${AT_BASE}/scripts/utilities/bitsize_selection.sh + +atcfg_pre_configure() { + PATH=${at_dest}/bin:${PATH} ./config --test-sanity +} + + +atcfg_configure() { + local base_libdir=$(find_build_libdir ${AT_BIT_SIZE}) + local base_target=$(find_build_target ${AT_BIT_SIZE}) + local openssl_tgt="" + + # OpenSSL uses different architecture names + case "${base_target}" in + powerpc64-*) + openssl_tgt="linux-ppc64" + ;; + powerpc-*) + # For linux-ppc builds, OpenSSL uses the default -m + # value of the compiler. + openssl_tgt="linux-ppc -m32" + ;; + powerpc64le-*) + openssl_tgt="linux-ppc64le" + ;; + *) + echo "Unknown word size ${AT_BIT_SIZE}" + return 1 + ;; + esac + + PATH=${at_dest}/bin:${PATH} \ + AR="${at_dest}/bin/ar" \ + AS="${at_dest}/bin/as" \ + CC="${at_dest}/bin/gcc" \ + CXX="${at_dest}/bin/g++" \ + LD="${at_dest}/bin/ld" \ + RANLIB="${at_dest}/bin/ranlib" \ + CFLAGS="-O3 -mcpu=${AT_OPTIMIZE_CPU/ppc/} -mtune=${AT_OPTIMIZE_CPU/ppc/} \ + -fpeel-loops -funroll-loops -ffast-math -ftree-vectorize" \ + ./Configure ${openssl_tgt} \ + --prefix="${at_dest}" --libdir="${base_libdir}" \ + no-idea no-rc5 shared threads zlib-dynamic \ + -Wa,--noexecstack -g +} + + +# MAKE SETTINGS +# ========================================================= +# Pre make settings or commands o run +atcfg_pre_make() { + PATH=${at_dest}/bin:${PATH} make -j1 depend +} +atcfg_make() { + PATH=${at_dest}/bin:${PATH} make -j1 +} + + +# INSTALL SETTINGS +# ========================================================= +# Install build command +atcfg_install() { + PATH=${at_dest}/bin:${PATH} \ + make MANDIR="${at_dest}/share/man" \ + INSTALL_PREFIX=${install_place} -j1 install_sw +} +# Post install settings or commands to run +atcfg_post_install() { + local base_libdir=$(find_build_libdir ${AT_BIT_SIZE}) + # Save all libraries into a tar file + pushd "${install_place}/${at_dest}/${base_libdir}" + tar czf "${install_place}/${AT_OPTIMIZE_CPU}.tar.gz" \ + $(find . -name "*.so" -o -name "*.so.*" -o -name "*.a" \ + -o -name "*.pc") || return 1 + popd + # Remove all installed built files + rm -rf "${install_place}/${at_dest}" + # Create processor lib target + mkdir -p "${install_place}/${at_dest}/${base_libdir}/${AT_OPTIMIZE_CPU}" + # Place saved libs on created final target + pushd "${install_place}/${at_dest}/${base_libdir}/${AT_OPTIMIZE_CPU}" + tar xzf "${install_place}/${AT_OPTIMIZE_CPU}.tar.gz" || return 1 + popd +} diff --git a/configs/6.0/packages/oprofile/oprofile.mk b/configs/6.0/packages/oprofile/oprofile.mk new file mode 100644 index 000000000..f13a22309 --- /dev/null +++ b/configs/6.0/packages/oprofile/oprofile.mk @@ -0,0 +1,28 @@ +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# +# +$(eval $(call set_provides,oprofile_1,multi,cross_no)) + +oprofile_1: $(RCPTS)/oprofile_1.rcpt + +$(RCPTS)/oprofile_1.rcpt: $(oprofile_1-archdeps) + @touch $@ + +$(RCPTS)/oprofile_1-32.a.rcpt: $(patsubst %,$(RCPTS)/%.rcpt,gcc_4 libpfm_1-32.b binutils_3 rsync_oprofile) + @touch $@ + +$(RCPTS)/oprofile_1-64.a.rcpt: $(patsubst %,$(RCPTS)/%.rcpt,gcc_4 libpfm_1-64.b rsync_oprofile) + @touch $@ diff --git a/configs/6.0/packages/oprofile/sources b/configs/6.0/packages/oprofile/sources new file mode 100644 index 000000000..e4453d0f5 --- /dev/null +++ b/configs/6.0/packages/oprofile/sources @@ -0,0 +1,40 @@ +#!/usr/bin/env bash +# +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# oProfile source package and build info +# ====================================== +# +ATSRC_PACKAGE_NAME="OProfile" +ATSRC_PACKAGE_VER=0.9.8 +ATSRC_PACKAGE_REV=c82b967e +ATSRC_PACKAGE_STR_VER="${ATSRC_PACKAGE_NAME} ${ATSRC_PACKAGE_VER}${ATSRC_PACKAGE_REV:+-${ATSRC_PACKAGE_REV}}" +ATSRC_PACKAGE_LICENSE="GPL 2.0" +ATSRC_PACKAGE_DOCLINK="http://oprofile.sourceforge.net/docs/" +ATSRC_PACKAGE_PRE="test -d oprofile-${ATSRC_PACKAGE_VER}${ATSRC_PACKAGE_REV:+-${ATSRC_PACKAGE_REV}}" +ATSRC_PACKAGE_CO=([0]="git archive --prefix=oprofile-${ATSRC_PACKAGE_VER}${ATSRC_PACKAGE_REV:+-${ATSRC_PACKAGE_REV}}/ --remote=git://git.code.sf.net/p/oprofile/oprofile ${ATSRC_PACKAGE_REV} > oprofile-${ATSRC_PACKAGE_VER}${ATSRC_PACKAGE_REV:+-${ATSRC_PACKAGE_REV}}.tar") +ATSRC_PACKAGE_GIT= +ATSRC_PACKAGE_POST="tar -xf oprofile-${ATSRC_PACKAGE_VER}${ATSRC_PACKAGE_REV:+-${ATSRC_PACKAGE_REV}}.tar" +ATSRC_PACKAGE_SRC="${AT_BASE}/sources/oprofile-${ATSRC_PACKAGE_VER}${ATSRC_PACKAGE_REV:+-${ATSRC_PACKAGE_REV}}" +ATSRC_PACKAGE_WORK=${AT_WORK_PATH}/oprofile +ATSRC_PACKAGE_ALOC='http://downloads.sourceforge.net/sourceforge/powertechprev/oprofile-0.9.8-qt-disable.tar.gz' +ATSRC_PACKAGE_MLS= +ATSRC_PACKAGE_PATCHES='-p1 op-qt-disable.patch' +ATSRC_PACKAGE_TARS='oprofile-0.9.8-qt-disable.tar.gz' +ATSRC_PACKAGE_MAKE_CHECK= +ATSRC_PACKAGE_DISTRIB=yes +ATSRC_PACKAGE_BUILDCROSS=no +ATSRC_PACKAGE_BUNDLE=profile diff --git a/configs/6.0/packages/oprofile/specfile b/configs/6.0/packages/oprofile/specfile new file mode 100644 index 000000000..d46c60911 --- /dev/null +++ b/configs/6.0/packages/oprofile/specfile @@ -0,0 +1,14 @@ +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# diff --git a/configs/6.0/packages/oprofile/stage_1 b/configs/6.0/packages/oprofile/stage_1 new file mode 100644 index 000000000..b09f13862 --- /dev/null +++ b/configs/6.0/packages/oprofile/stage_1 @@ -0,0 +1,119 @@ +#!/usr/bin/env bash +# +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# oProfile build parameters for stage 1 32 or 64 bits +# ============================================= +# + +# Tell the build system to hold the temp install folder +ATCFG_HOLD_TEMP_INSTALL='no' +# Tell the build system to hold the temp build folder +ATCFG_HOLD_TEMP_BUILD='no' +# Build in a new directory +ATCFG_BUILD_STAGE_T='link' + +source ${AT_BASE}/scripts/utilities/bitsize_selection.sh + +atcfg_pre_configure() { + # Completely clean the build prior to any build + if [[ -e "Makefile" ]]; then + make distclean + fi + # Reconfigure the build with an autogen.sh + sh ./autogen.sh || return 1 + + # Export build variables required by java.sh script + export pack_sys java_versions + # Get Java path. + java_path=$(${AT_BASE}/scripts/utilities/java.sh) + if [[ ${?} -ne 0 ]]; then + echo "Could not find a useful java." + return 1 + fi +} + +atcfg_configure() { + local base_libdir=$(find_build_libdir ${AT_BIT_SIZE}) + PATH=${at_dest}/bin:${PATH} \ + CC="${at_dest}/bin/gcc -m${AT_BIT_SIZE}" \ + CXX="${at_dest}/bin/g++ -m${AT_BIT_SIZE}" \ + CFLAGS="-g" \ + CXXFLAGS="-g" \ + ${at_active_build}/configure --prefix="${at_dest}" \ + --libdir="${at_dest}/${base_libdir}" \ + --with-java="${java_path}" \ + --with-binutils="${at_dest}" \ + --with-binutils-libname=${base_libdir} \ + --disable-werror \ + --disable-gui \ + --with-kernel=/usr +} + + +atcfg_make() { + PATH=${at_dest}/bin:${PATH} \ + ${SUB_MAKE} +} + + +atcfg_install() { + PATH=${at_dest}/bin:${PATH} \ + ${SUB_MAKE} install DESTDIR=${install_place} +} + + +atcfg_post_install() { + local base_libdir=$(find_build_libdir ${AT_BIT_SIZE}) + local base_target=$(find_build_target ${AT_BIT_SIZE}) + + if [[ "${base_target}" == "${alternate_target}" ]]; then + # Keep only the complement arch libraries when building for the + # alternate target. For the main target, we install everything. + # Save all libraries into a tar file + pushd "${install_place}/${at_dest}" + tar czf "${install_place}/complement_arch_libs.tar.gz" \ + ${base_libdir} + popd + # Remove all installed built files + rm -rf "${install_place}/${at_dest}" + # Create processor lib target + mkdir -p "${install_place}/${at_dest}" + # Place saved libs on created final target + pushd "${install_place}/${at_dest}" + tar xzf "${install_place}/complement_arch_libs.tar.gz" + popd + fi + + # Prepare the loader configuration in the main target only in order to + # avoid concurrent access to the file. + if [[ "${base_target}" == "${target}" ]]; then + [[ ! -d ${install_transfer}/etc/ld.so.conf.d ]] && \ + mkdir -p ${install_transfer}/etc/ld.so.conf.d + echo "${at_dest}/${base_libdir}/oprofile" > \ + ${install_transfer}/etc/ld.so.conf.d/oprofile.conf + # Provide an entry for the alternate target as well. + if [[ -n "${alternate_target}" ]]; then + if [[ "${base_libdir}" == "lib" ]]; then + local alt_lib=lib64 + else + local alt_lib=lib + fi + echo "${at_dest}/${alt_lib}/oprofile" >> \ + ${install_transfer}/etc/ld.so.conf.d/oprofile.conf + fi + fi +} diff --git a/configs/6.0/packages/python/python.mk b/configs/6.0/packages/python/python.mk new file mode 100644 index 000000000..697dbe9f0 --- /dev/null +++ b/configs/6.0/packages/python/python.mk @@ -0,0 +1,25 @@ +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# +# +$(eval $(call set_provides,python_1,single,cross_no)) + +python_1: $(RCPTS)/python_1.rcpt + +$(RCPTS)/python_1.rcpt: $(python_1-archdeps) + @touch $@ + +$(RCPTS)/python_1.a.rcpt: $(patsubst %,$(RCPTS)/%.rcpt,gcc_4 expat_1 openssl_1-64.b ldconfig_2 rsync_python) + @touch $@ diff --git a/configs/6.0/packages/python/sources b/configs/6.0/packages/python/sources new file mode 100644 index 000000000..7f5d9c80c --- /dev/null +++ b/configs/6.0/packages/python/sources @@ -0,0 +1,50 @@ +#!/usr/bin/env bash +# +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# GLIBC source package and build info +# =================================== +# + +ATSRC_PACKAGE_NAME="Python" +ATSRC_PACKAGE_VER=2.6.6 +ATSRC_PACKAGE_LICENSE="Python Software Foundation License 2" +ATSRC_PACKAGE_DOCLINK="http://docs.python.org/release/2.6/" +ATSRC_PACKAGE_RELFIXES= +ATSRC_PACKAGE_STR_VER="${ATSRC_PACKAGE_NAME} ${ATSRC_PACKAGE_VER}" +ATSRC_PACKAGE_PRE="test -d Python-${ATSRC_PACKAGE_VER}" +ATSRC_PACKAGE_CO=([0]="wget -N --no-check-certificate http://python.org/ftp/python/${ATSRC_PACKAGE_VER}/Python-${ATSRC_PACKAGE_VER}.tgz") +ATSRC_PACKAGE_POST="tar -xzf Python-${ATSRC_PACKAGE_VER}.tgz" +ATSRC_PACKAGE_SRC=${AT_BASE}/sources/Python-${ATSRC_PACKAGE_VER} +ATSRC_PACKAGE_WORK=${AT_WORK_PATH}/python +ATSRC_PACKAGE_MLS= +ATSRC_PACKAGE_PATCHES="-p1 python-fix.patch \ + -p1 fix-test_structmember-on-64bit-bigendian.patch \ + -p0 fix-dbm_contains-on-64bit-bigendian.patch \ + -p0 bug_11946.patch \ + -p0 2.6-fix-test_setgroups.patch \ + -p1 python-rm-bsddb.patch" +ATSRC_PACKAGE_ALOC="https://github.com/powertechpreview/powertechpreview/raw/master/Python%20Fixes/python-fix.tar.gz \ + http://bugs.python.org/file25199/fix-test_structmember-on-64bit-bigendian.patch \ + http://bugs.python.org/file18644/fix-dbm_contains-on-64bit-bigendian.patch \ + http://bugs.python.org/file21827/bug_11946.patch \ + http://bugs.python.org/file19877/2.6-fix-test_setgroups.patch \ + https://github.com/powertechpreview/powertechpreview/raw/master/Python%20Fixes/python-rm-bsddb.tgz" +ATSRC_PACKAGE_TARS='python-fix.tar.gz python-rm-bsddb.tgz' +ATSRC_PACKAGE_MAKE_CHECK= +ATSRC_PACKAGE_DISTRIB=no +ATSRC_PACKAGE_BUILDCROSS=no +ATSRC_PACKAGE_BUNDLE=toolchain diff --git a/configs/6.0/packages/python/specfile b/configs/6.0/packages/python/specfile new file mode 100644 index 000000000..d46c60911 --- /dev/null +++ b/configs/6.0/packages/python/specfile @@ -0,0 +1,14 @@ +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# diff --git a/configs/6.0/packages/python/stage_1 b/configs/6.0/packages/python/stage_1 new file mode 100644 index 000000000..3fc631b9b --- /dev/null +++ b/configs/6.0/packages/python/stage_1 @@ -0,0 +1,77 @@ +#!/usr/bin/env bash +# +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# Python build parameters for stage 1 32 bits +# =========================================== +# + +# Tell the build system to hold the temp install folder +ATCFG_HOLD_TEMP_INSTALL='no' +# Tell the build system to hold the temp build folder +ATCFG_HOLD_TEMP_BUILD='no' +# Build in a new directory +ATCFG_BUILD_STAGE_T='dir' + +atcfg_post_hacks() { + rm -f ${install_transfer}/lib/libstdc++.so.6.0.*-gdb.py \ + ${install_transfer}/lib64/libstdc++.so.6.0.*-gdb.py +} + +atcfg_configure() { + PATH=${at_dest}/bin:${PATH} \ + CC="${at_dest}/bin/gcc -m${compiler}" \ + CXX="${at_dest}/bin/g++ -m${compiler}" \ + CFLAGS="-g -O2 -Wformat" \ + CXXFLAGS="-g -O2" \ + ${ATSRC_PACKAGE_WORK}/configure \ + --build=${target} \ + --host=${target} \ + --target=${target} \ + --prefix=${at_dest} \ + --exec-prefix=${at_dest} \ + --libdir="${at_dest}/lib${compiler##32}" \ + --enable-shared +} + +atcfg_make() { + PATH=${at_dest}/bin:${PATH} ${SUB_MAKE} +} + +atcfg_make_check() { + # Package testing not done on a cross build. + + if [[ "${cross_build}" == 'no' ]]; then + PATH=${at_dest}/bin:${PATH} ${SUB_MAKE} test + fi +} + +atcfg_install() { + PATH=${at_dest}/bin:${PATH} \ + ${SUB_MAKE} DESTDIR="${install_place}" install libainstall +} + +atcfg_post_install() { + # Some projects (Boost) can't identify the Python headers directory + # when it's named pythonX.Ym. So, it's necessary to create the + # symlink pythonX.Y -> pythonX.Ym. + if [ -d ${install_transfer}/include/python*m ]; then + pushd ${install_transfer}/include > /dev/null + local dir=$(ls -1d python*m | head -n 1) + ln -s ${dir} ${dir/%m/} + popd + fi +} diff --git a/configs/6.0/packages/tbb/sources b/configs/6.0/packages/tbb/sources new file mode 100644 index 000000000..bf25a42c5 --- /dev/null +++ b/configs/6.0/packages/tbb/sources @@ -0,0 +1,41 @@ +#!/usr/bin/env bash +# +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# TBB source package and build info +# ======================================= +# + +ATSRC_PACKAGE_NAME="Thread Building Blocks" +ATSRC_PACKAGE_VER=4.0 +ATSRC_PACKAGE_REV=20111109oss +ATSRC_PACKAGE_LICENSE="GPL 2.0" +ATSRC_PACKAGE_DOCLINK="https://www.threadingbuildingblocks.org/documentation" +ATSRC_PACKAGE_RELFIXES= +ATSRC_PACKAGE_STR_VER="$(echo ${ATSRC_PACKAGE_VER} | sed 's/\.//')_${ATSRC_PACKAGE_REV}" +ATSRC_PACKAGE_PRE="test -d tbb${ATSRC_PACKAGE_STR_VER}" +ATSRC_PACKAGE_CO=([0]="wget -N --no-check-certificate https://www.threadingbuildingblocks.org/sites/default/files/software_releases/source/tbb40_20111109oss_src.tgz") +ATSRC_PACKAGE_POST="tar -xzf tbb${ATSRC_PACKAGE_STR_VER}_src.tgz" +ATSRC_PACKAGE_SRC=${AT_BASE}/sources/tbb${ATSRC_PACKAGE_STR_VER} +ATSRC_PACKAGE_WORK=${AT_WORK_PATH}/tbb +ATSRC_PACKAGE_MLS="" +ATSRC_PACKAGE_ALOC="https://github.com/powertechpreview/powertechpreview/raw/42cfbcf3d4a2fb7f9216069397df0dff9fc0f651/TBB%20PowerPC%20Patches/4.0/ppc64-tbb-4.0-20111109.3.tgz" +ATSRC_PACKAGE_PATCHES="-p1 ppc64-intel_tbb-4.0-20111109.3.patch" +ATSRC_PACKAGE_TARS="ppc64-tbb-4.0-20111109.3.tgz" +ATSRC_PACKAGE_MAKE_CHECK="" +ATSRC_PACKAGE_DISTRIB=yes +ATSRC_PACKAGE_BUILDCROSS=no +ATSRC_PACKAGE_BUNDLE=mcore-libs diff --git a/configs/6.0/packages/tbb/specfile b/configs/6.0/packages/tbb/specfile new file mode 100644 index 000000000..d46c60911 --- /dev/null +++ b/configs/6.0/packages/tbb/specfile @@ -0,0 +1,14 @@ +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# diff --git a/configs/6.0/packages/tbb/stage_1 b/configs/6.0/packages/tbb/stage_1 new file mode 100644 index 000000000..f78146039 --- /dev/null +++ b/configs/6.0/packages/tbb/stage_1 @@ -0,0 +1,98 @@ +#!/usr/bin/env bash +# +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# TBB build parameters for stage 1 32/64 bits +# =========================================== +# + +# Include some standard functions +source ${utilities}/bitsize_selection.sh + +# Tell the build system to hold the temp install folder +ATCFG_HOLD_TEMP_INSTALL='no' +# Tell the build system to hold the temp build folder +ATCFG_HOLD_TEMP_BUILD='no' +# Build in the source code directory +ATCFG_BUILD_STAGE_T='link' + +atcfg_configure () +{ + # No configure required for Thread Building Blocks + echo "No configure to run." +} + +atcfg_pre_make () +{ + # Thread Building Blocks has some env var name clash with our + # scripts. Unset them now before build + unset compiler + unset target +} + +atcfg_make () +{ + PATH=${at_dest}/bin:${PATH} \ + LDFLAGS="-m${AT_BIT_SIZE}" \ + CXXFLAGS="-m${AT_BIT_SIZE}" \ + ${SUB_MAKE} +} + +atcfg_make_check () +{ + # Package testing not done on cross build + if [[ "${cross_build}" == 'no' ]]; then + PATH=${at_dest}/bin:${PATH} \ + LDFLAGS="-m${AT_BIT_SIZE}" \ + CXXFLAGS="-m${AT_BIT_SIZE}" \ + ${SUB_MAKE} test + fi +} + +atcfg_pre_install () +{ + local libdir=$(find_build_libdir ${AT_BIT_SIZE}) + + # Prepare the install folders for manual installation + mkdir -p ${install_transfer}/${libdir} \ + ${install_transfer}/include/tbb \ + ${install_transfer}/include/tbb/compat \ + ${install_transfer}/include/tbb/internal \ + ${install_transfer}/include/tbb/machine +} + +atcfg_install () +{ + local libdir=$(find_build_libdir ${AT_BIT_SIZE}) + + for LIB in $(ls build/linux_ppc*/*.so.*); do + LIB_DEST=$(basename ${LIB} | sed "s/\.so\..*$/\.so/") + install -m 755 ${LIB} \ + ${install_transfer}/${libdir}/$(basename ${LIB}) + pushd ${install_transfer}/${libdir} && \ + ln -s $(basename ${LIB}) ${LIB_DEST} && popd + done + + # Include files + install -m 644 include/tbb/*.h \ + ${install_transfer}/include/tbb + install -m 644 include/tbb/compat/* \ + ${install_transfer}/include/tbb/compat + install -m 644 include/tbb/internal/* \ + ${install_transfer}/include/tbb/internal + install -m 644 include/tbb/machine/* \ + ${install_transfer}/include/tbb/machine +} diff --git a/configs/6.0/packages/tbb/tbb.mk b/configs/6.0/packages/tbb/tbb.mk new file mode 100644 index 000000000..c472db7a6 --- /dev/null +++ b/configs/6.0/packages/tbb/tbb.mk @@ -0,0 +1,33 @@ +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# +# +$(eval $(call set_provides,tbb_1,multi,cross_no)) + +tbb: $(RCPTS)/tbb_1.rcpt + +# Add it to the target 3rdparty_libs +3rdparty_libs-reqs += $(RCPTS)/tbb_1.rcpt + +$(RCPTS)/tbb_1.rcpt: $(tbb_1-archdeps) + @touch $@ + +$(RCPTS)/tbb_1-32.a.rcpt: $(patsubst %,$(RCPTS)/%.rcpt,gcc_4 \ + rsync_tbb) + @touch $@ + +$(RCPTS)/tbb_1-64.a.rcpt: $(patsubst %,$(RCPTS)/%.rcpt,gcc_4 \ + rsync_tbb) + @touch $@ diff --git a/configs/6.0/packages/tcmalloc/sources b/configs/6.0/packages/tcmalloc/sources new file mode 100644 index 000000000..365984add --- /dev/null +++ b/configs/6.0/packages/tcmalloc/sources @@ -0,0 +1,44 @@ +#!/usr/bin/env bash +# +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# Tcmalloc source package and build info +# ================================== +# + +ATSRC_PACKAGE_NAME="TCMalloc" +ATSRC_PACKAGE_VER=2.0 +ATSRC_PACKAGE_REV=e94a4ff9 +ATSRC_PACKAGE_LICENSE="BSD License" +ATSRC_PACKAGE_DOCLINK="http://goog-perftools.sourceforge.net/doc/tcmalloc.html" +ATSRC_PACKAGE_RELFIXES= +ATSRC_PACKAGE_STR_VER="${ATSRC_PACKAGE_NAME} ${ATSRC_PACKAGE_VER}" +ATSRC_PACKAGE_VERID="${ATSRC_PACKAGE_VER}${ATSRC_PACKAGE_REV:+-${ATSRC_PACKAGE_REV}}" +ATSRC_PACKAGE_PRE="test -d gperftools-${ATSRC_PACKAGE_VERID}" +ATSRC_PACKAGE_CO=([0]="wget -O gperftools-${ATSRC_PACKAGE_VERID}.tar.gz https://github.com/p-gperftools/gperftools/archive/${ATSRC_PACKAGE_REV}.tar.gz") +ATSRC_PACKAGE_GIT="" +# Use --transform to give a better name to Gperftools directory. +ATSRC_PACKAGE_POST="tar xzf gperftools-${ATSRC_PACKAGE_VERID}.tar.gz --transform=s/gperftools-${ATSRC_PACKAGE_REV}[^\\/]*/gperftools-${ATSRC_PACKAGE_VERID}/" +ATSRC_PACKAGE_SRC="${AT_BASE}/sources/gperftools-${ATSRC_PACKAGE_VERID}" +ATSRC_PACKAGE_WORK=${AT_WORK_PATH}/gperftools +ATSRC_PACKAGE_MLS="" +ATSRC_PACKAGE_ALOC="" +ATSRC_PACKAGE_PATCHES="" +ATSRC_PACKAGE_TARS="" +ATSRC_PACKAGE_MAKE_CHECK="" +ATSRC_PACKAGE_DISTRIB=no +ATSRC_PACKAGE_BUILDCROSS=no +ATSRC_PACKAGE_BUNDLE=toolchain diff --git a/configs/6.0/packages/tcmalloc/specfile b/configs/6.0/packages/tcmalloc/specfile new file mode 100644 index 000000000..d46c60911 --- /dev/null +++ b/configs/6.0/packages/tcmalloc/specfile @@ -0,0 +1,14 @@ +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# diff --git a/configs/6.0/packages/tcmalloc/stage_1 b/configs/6.0/packages/tcmalloc/stage_1 new file mode 100644 index 000000000..52df16d50 --- /dev/null +++ b/configs/6.0/packages/tcmalloc/stage_1 @@ -0,0 +1,74 @@ +#!/usr/bin/env bash +# +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# Tcmalloc build parameters for stage 1 32/64 bits +# ========================================= +# + +# Include some standard functions +source ${utilities}/bitsize_selection.sh + +# Tell the build system to hold the temp install folder +ATCFG_HOLD_TEMP_INSTALL='no' +# Tell the build system to hold the temp build folder +ATCFG_HOLD_TEMP_BUILD='no' +# In some cases, it's necessary to run autogen.sh, forcing it to use a +# different source directory for 32 and 64 bits. +ATCFG_BUILD_STAGE_T='link' + +atcfg_configure () +{ + local libdir=${at_dest}/$(find_build_libdir ${AT_BIT_SIZE}) + + # When downloading the source code directly from the repository, it + # may be necessary to generate the configure script. + if [[ ! -e "./configure" ]]; then + ./autogen.sh || return 1 + fi + + PATH=${at_dest}/bin:${PATH} \ + AR="${at_dest}/bin/ar" \ + AS="${at_dest}/bin/as" \ + CC="${at_dest}/bin/gcc" \ + CXX="${at_dest}/bin/g++" \ + LD="${at_dest}/bin/ld" \ + RANLIB="${at_dest}/bin/ranlib" \ + CFLAGS="-g -m${AT_BIT_SIZE} -O3 -DTCMALLOC_LARGE_PAGES64K" \ + CXXFLAGS="-g -m${AT_BIT_SIZE} -O3 -DTCMALLOC_LARGE_PAGES64K" \ + LDFLAGS="-Wl,-Bsymbolic" \ + ./configure --prefix="${at_dest}" \ + --libdir="${libdir}" +} + +atcfg_make () +{ + PATH=${at_dest}/bin:${PATH} ${SUB_MAKE} +} + +atcfg_make_check () +{ + # Package testing not done for a cross build + if [[ "${cross_build}" == 'no' ]]; then + PATH=${at_dest}/bin:${PATH} ${SUB_MAKE} check + fi +} + +atcfg_install () +{ + PATH=${at_dest}/bin:${PATH} \ + ${SUB_MAKE} DESTDIR=${install_place} install +} diff --git a/configs/6.0/packages/tcmalloc/tcmalloc.mk b/configs/6.0/packages/tcmalloc/tcmalloc.mk new file mode 100644 index 000000000..73e1a5339 --- /dev/null +++ b/configs/6.0/packages/tcmalloc/tcmalloc.mk @@ -0,0 +1,33 @@ +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# +# +$(eval $(call set_provides,tcmalloc_1,multi,cross_no)) + +tcmalloc: $(RCPTS)/tcmalloc_1.rcpt + +# Add it to the target 3rdparty_libs +3rdparty_libs-reqs += $(RCPTS)/tcmalloc_1.rcpt + +$(RCPTS)/tcmalloc_1.rcpt: $(tcmalloc_1-archdeps) + @touch $@ + +$(RCPTS)/tcmalloc_1-32.a.rcpt: $(patsubst %,$(RCPTS)/%.rcpt,gcc_4 \ + rsync_tcmalloc) + @touch $@ + +$(RCPTS)/tcmalloc_1-64.a.rcpt: $(patsubst %,$(RCPTS)/%.rcpt,gcc_4 \ + rsync_tcmalloc) + @touch $@ diff --git a/configs/6.0/packages/valgrind/sources b/configs/6.0/packages/valgrind/sources new file mode 100644 index 000000000..d03aea0df --- /dev/null +++ b/configs/6.0/packages/valgrind/sources @@ -0,0 +1,67 @@ +#!/usr/bin/env bash +# +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# Valgrind source package and build info +# ====================================== +# + +ATSRC_PACKAGE_NAME="Valgrind" +ATSRC_PACKAGE_VER=3.8.1 +ATSRC_PACKAGE_STR_VER="${ATSRC_PACKAGE_NAME} ${ATSRC_PACKAGE_VER}" +ATSRC_PACKAGE_LICENSE="GPL 2.0" +ATSRC_PACKAGE_DOCLINK="http://valgrind.org/docs/" +ATSRC_PACKAGE_PRE="test -d valgrind-${ATSRC_PACKAGE_VER}" +ATSRC_PACKAGE_CO=([0]="wget -N http://valgrind.org/downloads/valgrind-${ATSRC_PACKAGE_VER}.tar.bz2") +ATSRC_PACKAGE_POST="tar -xjf valgrind-${ATSRC_PACKAGE_VER}.tar.bz2" +ATSRC_PACKAGE_SRC="${AT_BASE}/sources/valgrind-${ATSRC_PACKAGE_VER}" +ATSRC_PACKAGE_WORK=${AT_WORK_PATH}/valgrind +ATSRC_PACKAGE_MLS="" +ATSRC_PACKAGE_ALOC='http://downloads.sourceforge.net/sourceforge/powertechprev/ppc64-valgrind-3.8.1-itrace-tool-2.0.tgz http://downloads.sourceforge.net/sourceforge/powertechprev/ppc64-valgrind-3.8.1-dfp-fixes.tar.gz http://downloads.sourceforge.net/sourceforge/powertechprev/vg-p8-libc.tgz http://downloads.sourceforge.net/sourceforge/powertechprev/vg-syscall2.tgz http://downloads.sourceforge.net/sourceforge/powertechprev/vg-syscall259.tgz http://downloads.sourceforge.net/sourceforge/powertechprev/vg-itrace-insn-skipping-fix.tgz http://downloads.sourceforge.net/sourceforge/powertechprev/vg-ignore_zero_sized_sections.tgz http://downloads.sourceforge.net/sourceforge/powertechprev/vg-syscall-209-211.tgz http://downloads.sourceforge.net/sourceforge/powertechprev/vg-muldo-overflow.tgz http://downloads.sourceforge.net/sourceforge/powertechprev/vg-snan-fix.tgz http://downloads.sourceforge.net/sourceforge/powertechprev/vg-dcbtct1.tgz http://downloads.sourceforge.net/sourceforge/powertechprev/vg-large-java-xmx.tgz http://downloads.sourceforge.net/sourceforge/powertechprev/vg-itrace-exit-when-done.tgz http://downloads.sourceforge.net/sourceforge/powertechprev/vg-itrace-numKinsns-option-fix.tgz http://downloads.sourceforge.net/sourceforge/powertechprev/vg-381-itrace-manual.tgz' +ATSRC_PACKAGE_PATCHES="-p1 ppc64-valgrind-3.8.1-itrace-tool-2.0.patch \ + -p0 ppc64-dfp-rounding-fix.patch \ + -p1 vg-p8-libc.patch \ + -p1 vg-syscall2.patch \ + -p1 vg-syscall259.patch \ + -p1 vg-itrace-insn-skipping-fix.patch \ + -p0 vg-ignore_zero_sized_sections.patch \ + -p1 vg-syscall-209-211.patch \ + -p1 vg-muldo-overflow.patch \ + -p1 vg-snan-fix.patch \ + -p1 vg-dcbtct1.patch \ + -p1 vg-large-java-xmx.patch \ + -p1 vg-itrace-exit-when-done.patch \ + -p1 vg-itrace-numKinsns-option-fix.patch \ + -p1 vg-381-itrace-manual.patch" +ATSRC_PACKAGE_TARS="ppc64-valgrind-3.8.1-itrace-tool-2.0.tgz \ + ppc64-valgrind-3.8.1-dfp-fixes.tar.gz \ + vg-p8-libc.tgz \ + vg-syscall2.tgz \ + vg-syscall259.tgz \ + vg-itrace-insn-skipping-fix.tgz \ + vg-ignore_zero_sized_sections.tgz \ + vg-syscall-209-211.tgz \ + vg-muldo-overflow.tgz \ + vg-snan-fix.tgz \ + vg-dcbtct1.tgz \ + vg-large-java-xmx.tgz \ + vg-itrace-exit-when-done.tgz \ + vg-itrace-numKinsns-option-fix.tgz \ + vg-381-itrace-manual.tgz" +ATSRC_PACKAGE_MAKE_CHECK="" +ATSRC_PACKAGE_DISTRIB=yes +ATSRC_PACKAGE_BUILDCROSS=no +ATSRC_PACKAGE_BUNDLE=profile diff --git a/configs/6.0/packages/valgrind/specfile b/configs/6.0/packages/valgrind/specfile new file mode 100644 index 000000000..d46c60911 --- /dev/null +++ b/configs/6.0/packages/valgrind/specfile @@ -0,0 +1,14 @@ +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# diff --git a/configs/6.0/packages/valgrind/stage_1 b/configs/6.0/packages/valgrind/stage_1 new file mode 100644 index 000000000..440208d23 --- /dev/null +++ b/configs/6.0/packages/valgrind/stage_1 @@ -0,0 +1,96 @@ +#!/usr/bin/env bash +# +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# Valgrind build parameters for stage 1 +# ===================================== +# +# CONFIGURE SETTINGS +# ========================================================= +# Pre configure settings or commands to run +atcfg_pre_configure() { + # Completely clean the build prior to any build + if [[ -e "Makefile" ]]; then + make distclean + fi + # Reconfigure the build with an autogen.sh + if [[ -e ./autogen.sh ]]; then + sh ./autogen.sh || exit 1 + else + # Tarballs dont provide autogen.sh + aclocal + autoheader + automake -a + autoconf + fi +} +# Configure command for native builds +atcfg_configure() { + PATH=${at_dest}/bin:${PATH} \ + CC="${at_dest}/bin/gcc" \ + CXX="${at_dest}/bin/g++" \ + CFLAGS="-g" \ + GDB="${at_dest}/bin/gdb" \ + "${at_active_build}/configure" \ + --prefix="${at_dest}" \ + ${target64:---enable-only32bit} \ + --with-mpicc=none +} + + +# MAKE SETTINGS +# ========================================================= +# Make build command +atcfg_make() { + PATH=${at_dest}/bin:${PATH} \ + ${SUB_MAKE} +} + +atcfg_make_check() { + if [[ "${cross_build}" == 'no' ]]; then + PATH=${at_dest}/bin:${PATH} \ + ${SUB_MAKE} check + fi +} + + +# INSTALL SETTINGS +# ========================================================= +# Pre install settings or commands to run +atcfg_pre_install() { + ${SUB_MAKE} -C docs html-docs +} +# Install build command +atcfg_install() { + PATH=${at_dest}/bin:${PATH} \ + ${SUB_MAKE} DESTDIR=${install_place} install +} +# Post install settings or commands to run +atcfg_post_install() { + # Copy vgi2qt files + cp ${at_active_build}/itrace/vgi2qt/vgi2qt ${install_transfer}/bin/ + chmod +x ${at_active_build}/itrace/vgi2qt/vitrace + cp ${at_active_build}/itrace/vgi2qt/vitrace ${install_transfer}/bin/ +} + +# SPECIAL SETTINGS +# ========================================================= +# Tell the build system to hold the temp install folder +ATCFG_HOLD_TEMP_INSTALL='no' +# Tell the build system to hold the temp build folder +ATCFG_HOLD_TEMP_BUILD='no' +# Build in a new directory +ATCFG_BUILD_STAGE_T='link' diff --git a/configs/6.0/packages/valgrind/valgrind.mk b/configs/6.0/packages/valgrind/valgrind.mk new file mode 100644 index 000000000..53baf7f4f --- /dev/null +++ b/configs/6.0/packages/valgrind/valgrind.mk @@ -0,0 +1,26 @@ +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# +# +$(eval $(call set_provides,valgrind_1,single,cross_no)) + +valgrind_1: $(RCPTS)/valgrind_1.rcpt + +$(RCPTS)/valgrind_1.rcpt: $(valgrind_1-archdeps) + @touch $@ + +$(RCPTS)/valgrind_1.a.rcpt: $(patsubst %,$(RCPTS)/%.rcpt,gcc_4 gdb_1 rsync_valgrind) + @touch $@ + diff --git a/configs/6.0/packages/zlib/sources b/configs/6.0/packages/zlib/sources new file mode 100644 index 000000000..bcca4e00d --- /dev/null +++ b/configs/6.0/packages/zlib/sources @@ -0,0 +1,41 @@ +#!/usr/bin/env bash +# +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# ZLIB source package and build info +# ================================== +# + +ATSRC_PACKAGE_NAME="ZLIB Compression Library" +ATSRC_PACKAGE_VER=1.2.6 +ATSRC_PACKAGE_LICENSE="Zlib License" +ATSRC_PACKAGE_DOCLINK="http://www.zlib.net/manual.html" +ATSRC_PACKAGE_RELFIXES= +ATSRC_PACKAGE_STR_VER="${ATSRC_PACKAGE_NAME} ${ATSRC_PACKAGE_VER}" +ATSRC_PACKAGE_PRE="test -d zlib-${ATSRC_PACKAGE_VER}" +ATSRC_PACKAGE_CO=([0]="wget -N http://zlib.net/zlib-${ATSRC_PACKAGE_VER}.tar.bz2" \ + [1]="wget -N http://downloads.sourceforge.net/project/libpng/zlib/${ATSRC_PACKAGE_VER}/zlib-${ATSRC_PACKAGE_VER}.tar.bz2") +ATSRC_PACKAGE_POST="tar -xjf zlib-${ATSRC_PACKAGE_VER}.tar.bz2" +ATSRC_PACKAGE_SRC="${AT_BASE}/sources/zlib-${ATSRC_PACKAGE_VER}" +ATSRC_PACKAGE_WORK=${AT_WORK_PATH}/zlib +ATSRC_PACKAGE_MLS="" +ATSRC_PACKAGE_ALOC="" +ATSRC_PACKAGE_PATCHES="" +ATSRC_PACKAGE_TARS="" +ATSRC_PACKAGE_MAKE_CHECK="" +ATSRC_PACKAGE_DISTRIB=no +ATSRC_PACKAGE_BUILDCROSS=no +ATSRC_PACKAGE_BUNDLE=toolchain diff --git a/configs/6.0/packages/zlib/specfile b/configs/6.0/packages/zlib/specfile new file mode 100644 index 000000000..d46c60911 --- /dev/null +++ b/configs/6.0/packages/zlib/specfile @@ -0,0 +1,14 @@ +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# diff --git a/configs/6.0/packages/zlib/stage_1 b/configs/6.0/packages/zlib/stage_1 new file mode 100644 index 000000000..9eebf0f13 --- /dev/null +++ b/configs/6.0/packages/zlib/stage_1 @@ -0,0 +1,73 @@ +#!/usr/bin/env bash +# +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +source ${AT_BASE}/scripts/utilities/bitsize_selection.sh + + +# ZLIB build parameters for stage 1 32 or 64 bits +# ========================================= +# + +# Tell the build system to hold the temp install folder +ATCFG_HOLD_TEMP_INSTALL='no' +# Tell the build system to hold the temp build folder +ATCFG_HOLD_TEMP_BUILD='no' +# Build in a new directory +ATCFG_BUILD_STAGE_T='link' + +atcfg_configure() { + local base_libdir=$(find_build_libdir ${AT_BIT_SIZE}) + PATH=${at_dest}/bin:${PATH} \ + CC="${at_dest}/bin/gcc -m${AT_BIT_SIZE}" \ + CFLAGS="-g -O3 -mcpu=${build_load_arch}" \ + CXXFLAGS="-g -O3 -mcpu=${build_load_arch}" \ + ${ATSRC_PACKAGE_WORK}/configure \ + --prefix="${at_dest}" \ + --libdir="${at_dest}/${base_libdir}" +} + +atcfg_make() { + PATH=${at_dest}/bin:${PATH} \ + ${SUB_MAKE} +} + +atcfg_make_check() { + # Package testing not done for a cross build. + if [[ "${cross_build}" == 'no' ]]; then + PATH=${at_dest}/bin:${PATH} \ + ${SUB_MAKE} check + fi +} + +atcfg_install() { + PATH=${at_dest}/bin:${PATH} \ + ${SUB_MAKE} install DESTDIR=${install_place} +} + +atcfg_post_install() { + local base_libdir=$(find_build_libdir ${AT_BIT_SIZE}) + set -e + if [[ "${cross_build}" == 'no' ]]; then + # Hack around to avoid ld.so.cache getting the libs from the + # system as ldconfig puts platform based directories preceding + # other directories. + ${AT_BASE}/scripts/utilities/create_lib_symlinks.sh \ + "${install_transfer}/${base_libdir}/" \ + "${install_transfer}/${base_libdir}/${build_load_arch}" + fi + set +e +} diff --git a/configs/6.0/packages/zlib/stage_optimized b/configs/6.0/packages/zlib/stage_optimized new file mode 100644 index 000000000..54d89b05b --- /dev/null +++ b/configs/6.0/packages/zlib/stage_optimized @@ -0,0 +1,64 @@ +#!/usr/bin/env bash +# +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +source ${AT_BASE}/scripts/utilities/bitsize_selection.sh + +# ZLIB build parameters for optimized stage 32/64 bits +# ================================================= +# + +ATCFG_HOLD_TEMP_INSTALL='no' +# Tell the build system to hold the temp build folder +ATCFG_HOLD_TEMP_BUILD='no' +# Build in a new directory +ATCFG_BUILD_STAGE_T='link' + +atcfg_configure() { + local base_libdir=$(find_build_libdir ${AT_BIT_SIZE}) + PATH=${at_dest}/bin:${PATH} \ + CC="${at_dest}/bin/gcc -m${AT_BIT_SIZE}" \ + CFLAGS="-g -O3 -mcpu=${AT_OPTIMIZE_CPU/ppc/}" \ + CXXFLAGS="-g -O3 -mcpu=${AT_OPTIMIZE_CPU/ppc/}" \ + ${ATSRC_PACKAGE_WORK}/configure \ + --prefix="${at_dest}" \ + --libdir="${at_dest}/${base_libdir}/${AT_OPTIMIZE_CPU}" +} + + +atcfg_make() { + PATH=${at_dest}/bin:${PATH} \ + ${SUB_MAKE} +} + +atcfg_make_check() { + # Package testing not done for a cross build. + if [[ "${cross_build}" == 'no' ]]; then + PATH=${at_dest}/bin:${PATH} \ + ${SUB_MAKE} check + fi +} + +atcfg_install() { + PATH=${at_dest}/bin:${PATH} \ + ${SUB_MAKE} install DESTDIR=${install_place} +} +# Post install settings or commands to run + +atcfg_post_install() { + # Remove unneeded installed files + rm -rf "${install_place}/${at_dest}/"{include,share} +} diff --git a/configs/6.0/packages/zlib/zlib.mk b/configs/6.0/packages/zlib/zlib.mk new file mode 100644 index 000000000..756799f9e --- /dev/null +++ b/configs/6.0/packages/zlib/zlib.mk @@ -0,0 +1,44 @@ +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# +# +$(eval $(call set_provides,zlib_1,multi,cross_no)) + +# List of dependencies in order to build the tuned libraries for 32 or +# 64 bits. +zlib_tuned-32-deps := $(RCPTS)/gcc_3.rcpt \ + $(RCPTS)/rsync_zlib.rcpt \ + $(glibc_tuned-32-archdeps) +zlib_tuned-64-deps := $(RCPTS)/gcc_3.rcpt \ + $(RCPTS)/rsync_zlib.rcpt \ + $(glibc_tuned-64-archdeps) +# Enable tuned targets +$(eval $(call provide_tuneds,zlib)) + +zlib_1: $(RCPTS)/zlib_1.rcpt + +zlib_tuned: $(RCPTS)/zlib_tuned.rcpt + +$(RCPTS)/zlib_1.rcpt: $(zlib_1-archdeps) + @touch $@ + +$(RCPTS)/zlib_1-32.a.rcpt: $(patsubst %,$(RCPTS)/%.rcpt,gcc_3 rsync_zlib) + @touch $@ + +$(RCPTS)/zlib_1-64.a.rcpt: $(patsubst %,$(RCPTS)/%.rcpt,gcc_3 rsync_zlib) + @touch $@ + +$(RCPTS)/zlib_tuned.rcpt: $(zlib_tuned-archdeps) + @touch $@ diff --git a/configs/6.0/release_notes/release_notes-body.html b/configs/6.0/release_notes/release_notes-body.html new file mode 100644 index 000000000..dc1765825 --- /dev/null +++ b/configs/6.0/release_notes/release_notes-body.html @@ -0,0 +1,232 @@ + + + + + + + + Release Notes for the Advance Toolchain __VERSION_RELEASE__ + + + +
    +
    + +

    Release Notes for the Advance Toolchain __VERSION_RELEASE__

    +
    +
    + | Features + | Previous Releases + | Support + | Installation + | Documentation + | Legal Notices | +
    +
    + __FEATURES__ + back to top +
    + +

    Support

    +

    Customer support for the Advance Toolchain (AT) is provided in one of three ways:

    +
      +
    1. If you are using AT as directed by an IBM product team (ex.: IBM XL Compiler or PowerVM Lx86) please report suspected AT problems to IBM Support using that product name and entitlement.
    2. +
    3. IBM's Support Line for Linux Offering in the United States now provides support for AT as well. If you have a contract with a U.S. Support Line for Linux contract, place a call to IBM Support: +
        +
      • Dial 1-800-426-IBM-SERV
      • +
      • Option #2 (Other business products or solutions)
      • +
      • Option #2 (Software)
      • +
      • Option #7 (Other OS/Linux)
      • +
    4. +
    5. All other users can use an electronic forum that is monitored Monday through Friday. For questions regarding the use of or to report a suspected defect in AT, click here. +
        +
      • Log in.
      • +
      • Start a topic.
      • +
      • Enter and save your question or problem.
      • +
      • An initial response will be attempted within 2 business days.
      • +
    6. +
    + back to top +
    + +

    Installation

    + __INST__ +

    Manual installation

    +

    If you are installing the rpms manually you will need to install them in the following order (due to prerequisites):

    +

    + advance-toolchain-__VERSION__-runtime-__VERSION_RELEASE__
    + advance-toolchain-__VERSION__-devel-__VERSION_RELEASE__
    + advance-toolchain-__VERSION__-perf-__VERSION_RELEASE__
    + advance-toolchain-__VERSION__-mcore-libs-__VERSION_RELEASE__
    + advance-toolchain-__VERSION__-runtime-at__OLD_VERSION__-compat-__VERSION_RELEASE__
    +

    +

    If you are updating a previous installation, you need to update as a batch, so rpm can solve the dependencies, i.e.:

    +

    + rpm -Uvh advance-toolchain-__VERSION__-runtime-__VERSION_RELEASE__.ppc64.rpm \
    advance-toolchain-__VERSION__-devel-__VERSION_RELEASE__.ppc64.rpm \
    advance-toolchain-__VERSION__-perf-__VERSION_RELEASE__.ppc64.rpm \
    + advance-toolchain-__VERSION__-mcore-__VERSION_RELEASE__.ppc64.rpm \
    + advance-toolchain-__VERSION__-runtime-at__OLD_VERSION__-compat-__VERSION_RELEASE__.ppc64.rpm
    +

    +

    The rpm command should always be run as root. Failure to do so will result in an error similar to this:

    +

    + error: can't create transaction lock on /var/lib/rpm/__db.000 +

    +

    Important notes

    +
      +
    • Timezone files: If you need to use something different than Factory, then you should copy the timezone file you want from /opt/__VERSION__/share/zoneinfo to /opt/__VERSION__/etc/localtime
    • +
    • advance-toolchain-__VERSION__-runtime-compat-__VERSION_RELEASE__: DO NOT INSTALL it on SLES10 and beyond or RHEL5 and beyond. These are intended for runtime compatibility on SLES9 and RHEL4 only (see below).
    • +
    +

    Installation on SLES9 and RHEL4 - Runtime compatibility

    +

    Users running applications on SLES9 or RHEL4 may install the compatibility rpm advance-toolchain-__VERSION__-runtime-compat-__VERSION_RELEASE__ in order to get the Advance Toolchain runtime libraries.

    +

    Installation of the cross-compiler (x86)

    +

    You can download advance-toolchain-__VERSION__-cross-__VERSION_RELEASE__ and install in a x86 machine to build Power binaries on it. Binaries generated by the cross-compiler will run on a Power system with the same version of the Advance Toolchain installed.

    + back to top +
    + +

    Documentation

    +

    The official documentation for the Advance Toolchain is available at the IBM Power Linux Community website.

    + back to top +
    + + +

    Legal notices

    + +

    In order to comply with the GPL and LGPL licenses, the source code for the following packages is available:

    +
      +
    • binutils
    • +
    • gcc
    • +
    • gdb
    • +
    • glibc
    • +
    • gmp
    • +
    • Threading Building Blocks
    • +
    • libdfp
    • +
    • libhugetlbfs
    • +
    • linux kernel
    • +
    • mpc
    • +
    • mpfr
    • +
    • oprofile
    • +
    • Userspace RCU
    • +
    • Valgrind
    • +
    +

    Please look for the advance-toolchain-at00-src-0.0-0.tgz file in the repository.

    + +

    Amino CBB
    + Copyright (c) 2008 IBM Corporation

    +

    + Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
    + http://www.apache.org/licenses/LICENSE-2.0
    +
    + Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. +

    + +

    Expat
    + Copyright (c) 1998, 1999, 2000 Thai Open Source Software Center Ltd and Clark Cooper
    + Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006 Expat maintainers.

    +

    + Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
    +
    + The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
    +
    + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +

    + +

    Gperftools
    + Copyright (c) 2005, Google Inc. All rights reserved.

    +

    + Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
    +
    + * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
    + * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
    + * Neither the name of Google Inc. nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
    +
    + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +

    + +

    Libauxv
    +

    +

    + Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
    +
    + * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
    + * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
    + * Neither the name of the IBM Corporation nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
    +
    + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL IBM CORPORATION BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +

    + +

    Libpfm
    + Copyright (c) 2002-2006 Hewlett-Packard Development Company, L.P.

    +

    + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions:
    +
    + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software.
    +
    + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, + INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A + PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT + HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF + CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE + OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
    +

    +
    + +

    OpenSSL
    + Copyright (c) 1998-2011 The OpenSSL Project. All rights reserved.
    + Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com). All rights reserved.

    +

    * Note: this distribution of OpenSSL does not include the IDEA and RC5 algorithms

    +

    + Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
    +
    + 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
    +
    + 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
    +
    + 3. All advertising materials mentioning features or use of this software must display the following acknowledgment: "This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
    +
    + 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to endorse or promote products derived from this software without prior written permission. For written permission, please contact openssl-core@openssl.org.
    +
    + 5. Products derived from this software may not be called "OpenSSL" nor may "OpenSSL" appear in their names without prior written permission of the OpenSSL Project.
    +
    + 6. Redistributions of any form whatsoever must retain the following acknowledgment: "This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit (http://www.openssl.org/)"
    +
    + THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
    +
    + This product includes cryptographic software written by Eric Young (eay@cryptsoft.com). This product includes software written by Tim Hudson (tjh@cryptsoft.com). +

    + +

    Python
    + Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Python Software Foundation; All Rights Reserved

    +

    + PYTHON SOFTWARE FOUNDATION LICENSE VERSION 2
    + --------------------------------------------
    +
    + 1. This LICENSE AGREEMENT is between the Python Software Foundation ("PSF"), and the Individual or Organization ("Licensee") accessing and otherwise using this software ("Python") in source or binary form and its associated documentation.
    +
    + 2. Subject to the terms and conditions of this License Agreement, PSF hereby grants Licensee a nonexclusive, royalty-free, world-wide license to reproduce, analyze, test, perform and/or display publicly, prepare derivative works, distribute, and otherwise use Python alone or in any derivative version, provided, however, that PSF's License Agreement and PSF's notice of copyright, i.e., "Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Python Software Foundation; All Rights Reserved" are retained in Python alone or in any derivative version prepared by Licensee.
    +
    + 3. In the event Licensee prepares a derivative work that is based on or incorporates Python or any part thereof, and wants to make the derivative work available to others as provided herein, then Licensee hereby agrees to include in any such work a brief summary of the changes made to Python.
    +
    + 4. PSF is making Python available to Licensee on an "AS IS" basis. PSF MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED. BY WAY OF EXAMPLE, BUT NOT LIMITATION, PSF MAKES NO AND DISCLAIMS ANY REPRESENTATION OR WARRANTY OF MERCHANTABILITY OR FITNESS FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF PYTHON WILL NOT INFRINGE ANY THIRD PARTY RIGHTS.
    +
    + 5. PSF SHALL NOT BE LIABLE TO LICENSEE OR ANY OTHER USERS OF PYTHON FOR ANY INCIDENTAL, SPECIAL, OR CONSEQUENTIAL DAMAGES OR LOSS AS A RESULT OF MODIFYING, DISTRIBUTING, OR OTHERWISE USING PYTHON, OR ANY DERIVATIVE THEREOF, EVEN IF ADVISED OF THE POSSIBILITY THEREOF.
    +
    + 6. This License Agreement will automatically terminate upon a material breach of its terms and conditions.
    +
    + 7. Nothing in this License Agreement shall be deemed to create any relationship of agency, partnership, or joint venture between PSF and Licensee. This License Agreement does not grant permission to use PSF trademarks or trade name in a trademark sense to endorse or promote products or services of Licensee, or any third party.
    +
    + 8. By copying, installing or otherwise using Python, Licensee agrees to be bound by the terms and conditions of this License Agreement. +

    + +

    SPHDE
    + Copyright (c) 2012 IBM Corporation

    +

    Distributed through the Eclipse Public License 1.0. The source code for this project is available on GitHub.

    +
    + + diff --git a/configs/6.0/release_notes/release_notes-features.html b/configs/6.0/release_notes/release_notes-features.html new file mode 100644 index 000000000..59e8fcd31 --- /dev/null +++ b/configs/6.0/release_notes/release_notes-features.html @@ -0,0 +1,7 @@ + +

    Features in __VERSION_RELEASE__

    +
      +
    • The Advance Toolchain is a self contained toolchain which isn't reliant on the base system toolchain.
    • + __GROUPS_ENTRIES__ + __AT_FEATURES__ +
    diff --git a/configs/6.0/release_notes/release_notes-group_entry.html b/configs/6.0/release_notes/release_notes-group_entry.html new file mode 100644 index 000000000..da081cf9d --- /dev/null +++ b/configs/6.0/release_notes/release_notes-group_entry.html @@ -0,0 +1,4 @@ +
  • __GROUP_DEFINITION__: +
      + __PACKAGE_LINES__ +
  • diff --git a/configs/6.0/release_notes/release_notes-inst.html b/configs/6.0/release_notes/release_notes-inst.html new file mode 100644 index 000000000..98ac294a0 --- /dev/null +++ b/configs/6.0/release_notes/release_notes-inst.html @@ -0,0 +1,137 @@ + + + + + + + diff --git a/configs/6.0/release_notes/release_notes-online_doc.html b/configs/6.0/release_notes/release_notes-online_doc.html new file mode 100644 index 000000000..1a534cd29 --- /dev/null +++ b/configs/6.0/release_notes/release_notes-online_doc.html @@ -0,0 +1 @@ +online docs \ No newline at end of file diff --git a/configs/6.0/release_notes/release_notes-package_line.html b/configs/6.0/release_notes/release_notes-package_line.html new file mode 100644 index 000000000..6fbf022fb --- /dev/null +++ b/configs/6.0/release_notes/release_notes-package_line.html @@ -0,0 +1 @@ +
  • __PACKAGE_NAME__ - __PACKAGE_VERSION____PACKAGE_REVISION____PACKAGE_NAME_SUFFIX____ONLINE_DOCS__
  • diff --git a/configs/6.0/release_notes/release_notes-style.html b/configs/6.0/release_notes/release_notes-style.html new file mode 100644 index 000000000..90c142fd8 --- /dev/null +++ b/configs/6.0/release_notes/release_notes-style.html @@ -0,0 +1,80 @@ + a.link { + font-family:"Lucida Sans Unicode", "Lucida Grande", sans-serif; + color:#0099FF; + font-size:12px; + text-align:justify; + } + body { + background-color:#404040; + } + h1 { + font-family:Georgia, serif; + color:black; + text-align:center; + } + h2 { + font-family:Georgia, serif; + color:#404040; + text-align:left; + } + h3 { + font-family:Georgia, serif; + color:#606060; + text-align:left; + } + li { + color:black; + font-family:"Lucida Sans Unicode", "Lucida Grande", sans-serif; + font-size:12px; + text-align:justify; + } + p { + color:black; + font-family:"Lucida Sans Unicode", "Lucida Grande", sans-serif; + font-size:12px; + text-align:justify; + } + p.code { + color:#333333; + font-family:"Courier New", Courier, monospace; + font-size:12px; + text-align:left; + } + p.codebox { + color:#303030; + background-color:#F8F8F8; + font-family:"Courier New", Courier, monospace; + font-size:12px; + text-align:left; + margin:10px white; + border:2px outset #A0A0A0; + width:75%; + padding:12px; + } + p.menu { + color:black; + font-family:"Lucida Sans Unicode", "Lucida Grande", sans-serif; + font-size:12px; + text-align:center; + } + pre.codebox { + color:#303030; + background-color:#F8F8F8; + font-family:"Courier New", Courier, monospace; + font-size:12px; + text-align:left; + border:2px outset #A0A0A0; + padding:12px; + } + span.code { + color:#333333; + font-family:"Courier New", Courier, monospace; + font-size:12px; + text-align:left; + } + div.content { + width:50%; + border:2px outset #989898; + background-color:white; + padding:12px; + } diff --git a/configs/6.0/release_notes/relfixes.html b/configs/6.0/release_notes/relfixes.html new file mode 100644 index 000000000..e69de29bb diff --git a/configs/6.0/sanity.mk b/configs/6.0/sanity.mk new file mode 100644 index 000000000..9b6bc17b2 --- /dev/null +++ b/configs/6.0/sanity.mk @@ -0,0 +1,19 @@ +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# This file holds some sanity checks to run on the build machine, to verify +# its general required components for the building process. +define base_sanity + echo "Base sanity checks passed." +endef \ No newline at end of file diff --git a/configs/6.0/specs/main.spec b/configs/6.0/specs/main.spec new file mode 100644 index 000000000..8bfd74915 --- /dev/null +++ b/configs/6.0/specs/main.spec @@ -0,0 +1,24 @@ +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +Name: advance-toolchain-%{at_major}__CROSS__ +Version: %{at_major_version} +Release: %{at_revision_number} +AutoReqProv: no +Requires: __CROSS_DEPS_PLACE_HOLDER__ +License: GPL, LGPL +Packager: __RPM_PACKAGER__ +Vendor: __RPM_VENDOR__ +Group: Development/Libraries +Summary: Advance Toolchain diff --git a/configs/6.0/specs/metapkgs.spec b/configs/6.0/specs/metapkgs.spec new file mode 100644 index 000000000..99b06e8c8 --- /dev/null +++ b/configs/6.0/specs/metapkgs.spec @@ -0,0 +1,117 @@ +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +%description +The advance toolchain is a self contained toolchain which provides preview +toolchain functionality in GCC, binutils and GLIBC, as well as the debug and +profile tools GDB, Valgrind and OProfile. +It also provides a group of optimized threading libraries as well. + +#################################################### +%package runtime +Summary: Advance Toolchain +Requires: __AT_RUNTIME_REQ__ +Group: Development/Libraries +AutoReqProv: no +Requires: __RUNTIME_DEPENDENT_PACKAGES__ + +%description runtime +The advance toolchain is a self contained toolchain which provides preview +toolchain functionality in GCC, binutils, GLIBC, GDB, Valgrind, and OProfile. +This package contains the runtime libraries to run programs built with the +advance toolchain. + +#################################################### +%package runtime-compat +Summary: Advance Toolchain +Requires: __AT_RUNTIME_COMPAT_REQ__Conflicts: advance-toolchain-%{at_major}-runtime +Group: Development/Libraries +AutoReqProv: no +Requires: __RUNCOMPAT_DEPENDENT_PACKAGES__ + +%description runtime-compat +The advance toolchain is a self contained toolchain which provides preview +toolchain functionality in GCC, binutils, GLIBC, GDB, Valgrind, and OProfile. + + +#################################################### +%package devel +Summary: Advance Toolchain +Requires: advance-toolchain-%{at_major}-runtime = %{at_major_version}-%{at_revision_number}, __AT_DEVEL_REQ__ +Group: Development/Libraries +AutoReqProv: no +Provides: advance-toolchain-devel = %{at_major_version}-%{at_revision_number} +Requires: __DEVEL_DEPENDENT_PACKAGES__ + +%description devel +The advance toolchain is a self contained toolchain which provides preview +toolchain functionality in GCC, binutils, GLIBC, GDB, Valgrind, and OProfile. +This package provides the packages necessary to build applications that use the +features provided by the Advance Toolchain. + + +#################################################### +%package mcore-libs +Summary: Advance Toolchain +Requires: advance-toolchain-%{at_major}-runtime = %{at_major_version}-%{at_revision_number}, __AT_MCORE_LIBS_REQ__ +Group: Development/Libraries +AutoReqProv: no +Requires: __MCORE_DEPENDENT_PACKAGES__ + +%description mcore-libs +The advance toolchain is a self contained toolchain which provides preview +toolchain functionality in GCC, binutils, GLIBC, GDB, Valgrind, and OProfile. +This package provides the necessary libraries to build multi-threaded applications +using the specialized multi-threaded libraries Amino-CBB, URCU and Threading +Building Blocks. + + +#################################################### +%package perf +Summary: Advance Toolchain +Requires: advance-toolchain-%{at_major}-devel = %{at_major_version}-%{at_revision_number}, __AT_PERF_REQ__ +Group: Development/Libraries +AutoReqProv: no +Requires: __PERF_DEPENDENT_PACKAGES__ +Provides: advance-toolchain-perf = %{at_major_version}-%{at_revision_number} + +%description perf +The advance toolchain is a self contained toolchain which provides preview +toolchain functionality in GCC, binutils, GLIBC, GDB, Valgrind, and OProfile. +This package 'perf' package contains the performance library install targets +for Valgrind and OProfile. + + +#################################################### +%files runtime + +#--------------------------------------------------- +%files runtime-compat + +#--------------------------------------------------- +%files devel + +#--------------------------------------------------- +%files perf + +#--------------------------------------------------- +%files mcore-libs + + + + + + + +Requires: __DEPENDENT_PACKAGES__ diff --git a/configs/6.0/specs/monolithic.spec b/configs/6.0/specs/monolithic.spec new file mode 100644 index 000000000..98c9b4ebd --- /dev/null +++ b/configs/6.0/specs/monolithic.spec @@ -0,0 +1,319 @@ +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +%description +The advance toolchain is a self contained toolchain which provides preview +toolchain functionality in GCC, binutils and GLIBC, as well as the debug and +profile tools GDB, Valgrind and OProfile. +It also provides a group of optimized threading libraries as well. + +#################################################### +%package runtime +Summary: Advance Toolchain +Requires: __RUNTIME_REQ__ +Group: Development/Libraries +AutoReqProv: no +Provides: advance-toolchain-runtime = %{at_major_version}-%{at_revision_number} + +%description runtime +The advance toolchain is a self contained toolchain which provides preview +toolchain functionality in GCC, binutils, GLIBC, GDB, Valgrind, and OProfile. + + +#################################################### +%package devel +Summary: Advance Toolchain +Requires: advance-toolchain-%{at_major}-runtime = %{at_major_version}-%{at_revision_number}, __DEVEL_REQ__ +Group: Development/Libraries +AutoReqProv: no +Provides: advance-toolchain-devel = %{at_major_version}-%{at_revision_number} + +%description devel +The advance toolchain is a self contained toolchain which provides preview +toolchain functionality in GCC, binutils, GLIBC, GDB, Valgrind, and OProfile. +This package provides the packages necessary to build applications that use the +features provided by the Advance Toolchain. + + +#################################################### +%package mcore-libs +Summary: Advance Toolchain +Requires: advance-toolchain-%{at_major}-runtime = %{at_major_version}-%{at_revision_number}, __MCORE-LIBS_REQ__ +Group: Development/Libraries +AutoReqProv: no +Provides: advance-toolchain-mcore-libs = %{at_major_version}-%{at_revision_number} + +%description mcore-libs +The advance toolchain is a self contained toolchain which provides preview +toolchain functionality in GCC, binutils, GLIBC, GDB, Valgrind, and OProfile. +This package provides the necessary libraries to build multi-threaded applications +using the specialized multi-threaded libraries Amino-CBB, URCU and Threading +Building Blocks. + + +#################################################### +%package perf +Summary: Advance Toolchain +Requires: advance-toolchain-%{at_major}-devel = %{at_major_version}-%{at_revision_number}, __PROFILE_REQ__ +Group: Development/Libraries +AutoReqProv: no +Provides: advance-toolchain-perf = %{at_major_version}-%{at_revision_number} + +%description perf +The advance toolchain is a self contained toolchain which provides preview +toolchain functionality in GCC, binutils, GLIBC, GDB, Valgrind, and OProfile. +This package 'perf' package contains the performance library install targets +for Valgrind and OProfile. + + +#################################################### +%package selinux +Summary: Advance Toolchain +Requires: advance-toolchain-%{at_major}-runtime = %{at_major_version}-%{at_revision_number} +Requires(post): /usr/sbin/semanage, /sbin/restorecon +Requires(postun): /usr/sbin/semanage, /sbin/restorecon +Group: Development/Libraries + +%description selinux +The advance toolchain is a self contained toolchain which provides preview +toolchain functionality in GCC, binutils, GLIBC, GDB, Valgrind, and OProfile. +The 'selinux' package contains the required labels for a system +running SElinux. + + +#################################################### +# On newer rpm versions, it's common to strip debug info and to compile python +# files. We only want to compress man pages. +%define __os_install_post /usr/lib/rpm/brp-compress + +# These have been known to be different on different distributions +%define _datadir %{_prefix}/share +%define _libexecdir %{_prefix}/libexec +%define _mandir %{_prefix}/share/man +%define _infodir %{_prefix}/share/info +%define _scriptdir %{_prefix}/scripts +# Some distributions set this to 'lib64' by default +%define _libdir %{_prefix}/lib +%define _bindir %{_prefix}/bin + +%prep +# Do not include find_dependencies.sh on AT < 9.0. +rm -rf %{_scriptdir}/find_dependencies.sh + +# Do not include tle_on.sh on AT < 9.0. +rm -rf %{_scriptdir}/tle_on.sh + +%build + +%install +# Prepare a new build sandbox area +mkdir -p ${RPM_BUILD_ROOT}$(dirname %{_prefix}) +cp -af %{_prefix} ${RPM_BUILD_ROOT}$(dirname %{_prefix}) +# Remove ld.so.cache from rpm build install tree +rm -rf ${RPM_BUILD_ROOT}%{_prefix}/compat \ + ${RPM_BUILD_ROOT}%{_prefix}/etc/ld.so.cache \ + ${RPM_BUILD_ROOT}%{_prefix}/etc/ldconfig.log +# Copy the compatibility init script to the correct place +mkdir -p ${RPM_BUILD_ROOT}/etc/rc.d/init.d +# Remove info/dir from installation dir +rm ${RPM_BUILD_ROOT}%{_infodir}/dir +# Compress all of the info files. +gzip -9nvf ${RPM_BUILD_ROOT}%{_infodir}/*.info* +# Set a cronjob to run AT's ldconfig when the system's ldconfig is executed. +mkdir -p ${RPM_BUILD_ROOT}/etc/cron.d/ +echo "@reboot %{_bindir}/watch_ldconfig &" > ${RPM_BUILD_ROOT}/etc/cron.d/%{at_ver_rev_internal}_ldconfig + +#################################################### +%pre runtime +_host_power_arch=$(LD_SHOW_AUXV=1 /bin/true | grep AT_PLATFORM | grep -i power | sed 's/.*power//') +if [[ "${_host_power_arch}" != "" && "${_host_power_arch}" < "%{_min_power_arch}" ]]; then + echo "The system is power${_host_power_arch} but must be at least power%{_min_power_arch} to install this RPM." + exit 1 +fi +# Get distro glibc installed version +GLIBC_VER=$(rpm -q --queryformat='%{VERSION}\n' glibc | sort -u) +GLIBC_ABS=$(echo "${GLIBC_VER}" | awk 'BEGIN { FS="." }; { print $1$2 }' -) +if [[ ${GLIBC_ABS} -gt %{at_glibc_ver} ]]; then + echo "Your current glibc version ${GLIBC_VER} is higher than the one provided by the advance toolchain glibc." + echo "Please, consider the possibility of installing a newer version of advance toolchain." +fi + +#--------------------------------------------------- +%pre perf +# We need to create this special user for OProfile +getent group oprofile >/dev/null || groupadd -r oprofile +getent passwd oprofile >/dev/null || \ +useradd -r -g oprofile -d /home/oprofile -s /sbin/nologin \ +-c "Special user account to be used by OProfile" oprofile +exit 0 + + +#################################################### +%post runtime +# Automatically set the timezone +rm -f %{_prefix}/etc/localtime +ln -s /etc/localtime %{_prefix}/etc/localtime +# Do this in every .spec file because they may only install a subset. +# We never know the order rpm is going to update AT's packages. +# So we only need to update the ldconf cache when ldconfig is available +if [[ -f %{_sbindir}/ldconfig ]]; then + %{_sbindir}/ldconfig +fi + +#--------------------------------------------------- +%post devel +# Update the info directory entries +for INFO in $(ls %{_infodir}/*.info.gz); do + install-info ${INFO} %{_infodir}/dir > /dev/null 2>&1 || : +done +# Run this setup script right after install +%{_prefix}/scripts/at-create-ibmcmp-cfg.sh +# Do this in every .spec file because they may only install a subset. +# We never know the order rpm is going to update AT's packages. +# So we only need to update the ldconf cache when ldconfig is available +if [[ -f %{_sbindir}/ldconfig ]]; then + %{_sbindir}/ldconfig +fi + +#--------------------------------------------------- +%post perf +# Do this in every .spec file because they may only install a subset. +# We never know the order rpm is going to update AT's packages. +# So we only need to update the ldconf cache when ldconfig is available +if [[ -f %{_sbindir}/ldconfig ]]; then + %{_sbindir}/ldconfig +fi + +#--------------------------------------------------- +%post mcore-libs +# Do this in every .spec file because they may only install a subset. +# We never know the order rpm is going to update AT's packages. +# So we only need to update the ldconf cache when ldconfig is available +if [[ -f %{_sbindir}/ldconfig ]]; then + %{_sbindir}/ldconfig +fi + +#--------------------------------------------------- +%post selinux +semanage fcontext -a -t etc_t '%{_prefix}/etc(/.*)?' 2>/dev/null +semanage fcontext -a -t ld_so_cache_t '%{_prefix}/etc/ld.so.cache' 2>/dev/null +semanage fcontext -a -t locale_t '%{_prefix}/etc/localtime' 2>/dev/null +restorecon -R %{_prefix}/etc +semanage fcontext -a -t locale_t '%{_prefix}/share/locale/locale.alias' \ + 2>/dev/null +restorecon -R %{_prefix}/share/locale +semanage fcontext -a -t locale_t '%{_prefix}/share/zoneinfo/Factory' \ + 2>/dev/null +restorecon -R %{_prefix}/share/zoneinfo + + +#################################################### +%preun devel +# Update the info directory entries +if [ "$1" = 0 ]; then + for INFO in $(ls %{_infodir}/*.info.gz); do + install-info --delete ${INFO} %{_infodir}/dir > /dev/null 2>&1 || : + done +fi + + +#################################################### +%postun runtime +# Remove the directory only when uninstalling +if [[ ${1} -eq 0 ]]; then + if [[ -d %{_prefix} ]]; then + rm -rf %{_prefix} + fi +fi +# Only remove ldconfig if it's' a bash script file +if file /usr/sbin/ldconfig | grep "bash script" > /dev/null; then + at_installs=$(find /opt/ -maxdepth 1 -type d -name 'at[0-9].[0-9]*' \ + 2>/dev/null | wc -l) + if [[ "${at_installs}" -eq "0" ]]; then + rm -f /usr/sbin/ldconfig + fi +fi + +#--------------------------------------------------- +%postun devel +# Update the loader cache after uninstall +# We never know the order rpm is going to remove/update AT's packages. +# So we only need to update the ldconf cache when ldconfig is still available +if [[ -f %{_sbindir}/ldconfig ]]; then + %{_sbindir}/ldconfig +fi + +#--------------------------------------------------- +%postun perf +# Update the loader cache after uninstall +# We never know the order rpm is going to remove/update AT's packages. +# So we only need to update the ldconf cache when ldconfig is still available +if [[ -f %{_sbindir}/ldconfig ]]; then + %{_sbindir}/ldconfig +fi + +#--------------------------------------------------- +%postun mcore-libs +# Update the loader cache after uninstall +# We never know the order rpm is going to remove/update AT's packages. +# So we only need to update the ldconf cache when ldconfig is still available +if [[ -f %{_sbindir}/ldconfig ]]; then + %{_sbindir}/ldconfig +fi + +#--------------------------------------------------- +%postun selinux +if [ $1 -eq 0 ] ; then # final removal + semanage fcontext -d -t locale_t '%{_prefix}/share/zoneinfo/Factory' \ + 2>/dev/null + restorecon -R %{_prefix}/share/zoneinfo + semanage fcontext -d -t locale_t \ + '%{_prefix}/share/locale/locale.alias' 2>/dev/null + restorecon -R %{_prefix}/share/locale + semanage fcontext -d -t locale_t '%{_prefix}/etc/localtime' 2>/dev/null + semanage fcontext -d -t ld_so_cache_t '%{_prefix}/etc/ld.so.cache' \ + 2>/dev/null + semanage fcontext -d -t etc_t '%{_prefix}/etc(/.*)?' 2>/dev/null + restorecon -R %{_prefix}/etc +fi + + +#################################################### +%files runtime -f %{at_work}/runtime.list +%defattr(-,root,root) +# Script for creating a wrapper ld for using the system +# libhugetlbfs/ld.hugetlbfs linker +%{_scriptdir}/createldhuge-1.0.sh +#Script for restoring the original Advance Toolchain ld. +%{_scriptdir}/restoreld.sh +# Config script for XLC/XLF +%{_scriptdir}/at-create-ibmcmp-cfg.sh + +# License text for the scripts distributed in the package. +%doc %{_scriptdir}/LICENSE + +#--------------------------------------------------- +%files devel -f %{at_work}/devel.list +%defattr(-,root,root) + +#--------------------------------------------------- +%files perf -f %{at_work}/profile.list +%defattr(-,root,root) + +#--------------------------------------------------- +%files mcore-libs -f %{at_work}/mcore-libs.list +%defattr(-,root,root) + +#--------------------------------------------------- +%files selinux diff --git a/configs/6.0/specs/monolithic_at-compat.spec b/configs/6.0/specs/monolithic_at-compat.spec new file mode 100644 index 000000000..526799e0b --- /dev/null +++ b/configs/6.0/specs/monolithic_at-compat.spec @@ -0,0 +1,81 @@ +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +%description +The advance toolchain is a self contained toolchain which provides preview +toolchain functionality in GCC, binutils and GLIBC, as well as the debug and +profile tools GDB, Valgrind and OProfile. +It also provides a group of optimized threading libraries as well. + +#################################################### +%package runtime-at__AT_OLD_VER__-compat +Summary: Advance Toolchain +Conflicts: advance-toolchain-at__AT_OLD_VER__-runtime +Requires: advance-toolchain-%{at_major}-runtime = %{at_major_version}-%{at_revision_number} +Requires(post): /sbin/chkconfig +Requires(preun): /sbin/chkconfig +Requires(preun): /sbin/service +Requires(postun): /sbin/service +Group: Development/Libraries + +%description runtime-at__AT_OLD_VER__-compat +The advance toolchain is a self contained toolchain which provides preview +toolchain functionality in GCC, binutils, GLIBC, GDB, Valgrind, and OProfile. +This package provides a runtime compatibility mode for programs compiled with +version __AT_OLD_VER__ of the Advance Toolchain. + +#################################################### +# On newer rpm versions, it's common to strip debug info and to compile python +# files. We only want to compress man pages. +%define __os_install_post /usr/lib/rpm/brp-compress + +%prep + +%build + +%install +# Prepare a new build sandbox area +mkdir -p ${RPM_BUILD_ROOT}$(dirname %{_prefix}) +# Prepare the required directories for install +if [[ ! -d "${RPM_BUILD_ROOT}/etc/rc.d/init.d" ]]; then + mkdir -p ${RPM_BUILD_ROOT}/etc/rc.d/init.d +fi +mv %{_rpmdir}/%{at_major}-runtime-at__AT_OLD_VER__-compat \ + ${RPM_BUILD_ROOT}/etc/rc.d/init.d/ +chmod +x ${RPM_BUILD_ROOT}/etc/rc.d/init.d/%{at_major}-runtime-at__AT_OLD_VER__-compat +mkdir -p ${RPM_BUILD_ROOT}__AT_OLD_DEST__/lib \ + ${RPM_BUILD_ROOT}__AT_OLD_DEST__/lib64 + +%post runtime-at__AT_OLD_VER__-compat +/sbin/chkconfig --add %{at_major}-runtime-at__AT_OLD_VER__-compat + +%preun runtime-at__AT_OLD_VER__-compat +if [ $1 -eq 0 ] ; then + /sbin/service %{at_major}-runtime-at__AT_OLD_VER__-compat stop \ + >/dev/null 2>&1 + /sbin/chkconfig --del %{at_major}-runtime-at__AT_OLD_VER__-compat +fi + +%postun runtime-at__AT_OLD_VER__-compat +if [ "$1" -ge "1" ] ; then + /sbin/service %{at_major}-runtime-at__AT_OLD_VER__-compat condrestart \ + >/dev/null 2>&1 || : +fi + +#################################################### +%files runtime-at__AT_OLD_VER__-compat +%defattr(-,root,root) +/etc/rc.d/init.d/%{at_major}-runtime-at__AT_OLD_VER__-compat +__AT_OLD_DEST__/lib +__AT_OLD_DEST__/lib64 diff --git a/configs/6.0/specs/monolithic_compat.spec b/configs/6.0/specs/monolithic_compat.spec new file mode 100644 index 000000000..b175ddca7 --- /dev/null +++ b/configs/6.0/specs/monolithic_compat.spec @@ -0,0 +1,105 @@ +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +%description +The advance toolchain is a self contained toolchain which provides preview +toolchain functionality in GCC, binutils and GLIBC, as well as the debug and +profile tools GDB, Valgrind and OProfile. +It also provides a group of optimized threading libraries as well. + +#################################################### +%package runtime-compat +Summary: Advance Toolchain +Requires: __COMPAT_REQ__ +Conflicts: advance-toolchain-%{at_major}-runtime +Group: Development/Libraries +AutoReqProv: no + +%description runtime-compat +The advance toolchain is a self contained toolchain which provides preview +toolchain functionality in GCC, binutils, GLIBC, GDB, Valgrind, and OProfile. + + +#################################################### +# On newer rpm versions, it's common to strip debug info and to compile python +# files. We only want to compress man pages. +%define __os_install_post /usr/lib/rpm/brp-compress + +# These have been known to be different on different distributions +%define _bindir %{_prefix}/bin +%define _sbindir %{_prefix}/sbin +%define _scriptdir %{_prefix}/scripts +%define _libexecdir %{_prefix}/libexec +# Some distributions set this to 'lib64' by default +%define _libdir %{_prefix}/lib + +# Compat packages may use different variables with same values. +%define _compatprefix %{_prefix} +%define _compatbindir %{_prefix}/bin +%define _compatdatadir %{_datadir} +%define _compatlibdir %{_prefix}/lib +%define _compatlibexecdir %{_prefix}/libexec +%define _compatsbindir %{_prefix}/sbin + +%prep + +%build + +%install +mkdir -p ${RPM_BUILD_ROOT}/$(dirname %{_prefix}) +# Make compat the root dir. +cp -af %{_prefix}/compat ${RPM_BUILD_ROOT}/%{_prefix} +# Remove loader temporary files from rpm build install tree +rm -rf ${RPM_BUILD_ROOT}/%{_prefix}/etc/ld.so.cache \ + ${RPM_BUILD_ROOT}/%{_prefix}/etc/ldconfig.log +# Ensure runtime-compat won't distribute header files (usually kernel headers, +# necessary for building glibc). +rm -rf ${RPM_BUILD_ROOT}/%{_prefix}/include/ + +#################################################### +%pre runtime-compat +_host_power_arch=$(LD_SHOW_AUXV=1 /bin/true | grep AT_PLATFORM | grep -i power | sed 's/.*power//') +if [[ "${_host_power_arch}" != "" && "${_host_power_arch}" < "%{_min_power_arch}" ]]; then + echo "The system is power${_host_power_arch} but must be at least power%{_min_power_arch} to install this RPM." + exit 1 +fi + +#################################################### +%post runtime-compat +# Do this in every .spec file because they may only install a subset. +%{_prefix}/sbin/ldconfig + + + +#################################################### +%postun runtime-compat +# Remove the directory only when uninstalling +if [[ "${1}" -eq "0" ]]; then + if [[ -d %{_prefix} ]]; then + rm -rf %{_prefix} + fi +fi +# Only remove ldconfig if it's' a bash script file +if file /usr/sbin/ldconfig | grep "bash script" > /dev/null; then + at_installs=$(find /opt/ -maxdepth 1 -type d -name 'at[0-9].[0-9]*' \ + 2>/dev/null | wc -l) + if [[ "${at_installs}" -eq "0" ]]; then + rm -f /usr/sbin/ldconfig + fi +fi + + +#################################################### +%files runtime-compat -f %{at_work}/compat.list +%defattr(-,root,root) diff --git a/configs/6.0/specs/monolithic_cross.spec b/configs/6.0/specs/monolithic_cross.spec new file mode 100644 index 000000000..980953101 --- /dev/null +++ b/configs/6.0/specs/monolithic_cross.spec @@ -0,0 +1,81 @@ +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Required to install info manuals. +Requires(post): info +Requires(preun): info + +%description +The advance toolchain is a self contained toolchain which provides preview +toolchain functionality in GCC, binutils, GLIBC, and GDB. + +# On newer rpm versions, it's common to strip debug info and to compile python +# files. We only want to compress man pages. +%define __os_install_post /usr/lib/rpm/brp-compress + +# These have been known to be different on different distributions +%define _mandir %{_prefix}/share/man +%define _infodir %{_prefix}/share/info +%define _tgtmandir __DEST_CROSS__/usr/share/man +%define _tgtinfodir __DEST_CROSS__/usr/share/info +%define _libexecdir %{_prefix}/libexec +%define _datadir %{_prefix}/share +%define _mandir %{_prefix}/share/man +%define _infodir %{_prefix}/share/info +# Some distributions set this to 'lib64' by default +%define _libdir %{_prefix}/lib + +%prep +%build +%install +mkdir -p ${RPM_BUILD_ROOT}$(dirname %{_prefix}) +cp -af %{_prefix} ${RPM_BUILD_ROOT}$(dirname %{_prefix}) +# Remove info/dir from installation dir +rm -f ${RPM_BUILD_ROOT}%{_infodir}/dir \ + ${RPM_BUILD_ROOT}%{_tgtinfodir}/dir +# Compress all of the info files. +gzip -9nvf ${RPM_BUILD_ROOT}%{_infodir}/*.info* +gzip -9nvf ${RPM_BUILD_ROOT}%{_tgtinfodir}/*.info* + + +%postun +if [[ ${1} -eq 0 ]]; then + if [[ -d "%{_prefix}" ]]; then + rm -rf %{_prefix} + fi +fi + +%post +# Update the info directory entries +for INFO in $(ls %{_infodir}/*.info.gz); do + install-info ${INFO} %{_infodir}/dir > /dev/null 2>&1 || : +done +for INFO in $(ls %{_tgtinfodir}/*.info.gz); do + install-info ${INFO} %{_tgtinfodir}/dir > /dev/null 2>&1 || : +done + +%preun +# Update the info directory entries +if [ "$1" = 0 ]; then + for INFO in $(ls %{_infodir}/*.info.gz); do + install-info --delete ${INFO} %{_infodir}/dir > /dev/null 2>&1 || : + done + for INFO in $(ls %{_tgtinfodir}/*.info.gz); do + install-info --delete ${INFO} %{_tgtinfodir}/dir > /dev/null 2>&1 || : + done +fi + + +%files -f %{at_work}/cross_files.list +%defattr(-,root,root) diff --git a/configs/7.0/arch/default.mk b/configs/7.0/arch/default.mk new file mode 120000 index 000000000..183443809 --- /dev/null +++ b/configs/7.0/arch/default.mk @@ -0,0 +1 @@ +../../6.0/arch/default.mk \ No newline at end of file diff --git a/configs/7.0/arch/i686.mk b/configs/7.0/arch/i686.mk new file mode 120000 index 000000000..0c60c627f --- /dev/null +++ b/configs/7.0/arch/i686.mk @@ -0,0 +1 @@ +../../6.0/arch/i686.mk \ No newline at end of file diff --git a/configs/7.0/arch/i686.ppc64.mk b/configs/7.0/arch/i686.ppc64.mk new file mode 120000 index 000000000..4dbcded2b --- /dev/null +++ b/configs/7.0/arch/i686.ppc64.mk @@ -0,0 +1 @@ +../../6.0/arch/i686.ppc64.mk \ No newline at end of file diff --git a/configs/7.0/arch/ppc64.ppc64.mk b/configs/7.0/arch/ppc64.ppc64.mk new file mode 120000 index 000000000..d56452950 --- /dev/null +++ b/configs/7.0/arch/ppc64.ppc64.mk @@ -0,0 +1 @@ +../../6.0/arch/ppc64.ppc64.mk \ No newline at end of file diff --git a/configs/7.0/base.mk b/configs/7.0/base.mk new file mode 100644 index 000000000..9a91855d9 --- /dev/null +++ b/configs/7.0/base.mk @@ -0,0 +1,52 @@ +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Basic build version definitions +# =============================== +# This Makefile include contains the config options included at the beginning +# of the build process that govern the subsequent generated package name, +# version and other dependent internal build variables. +# It also states which distros the build is compatible with, so that it can be +# validated at build time, as well as heuristicaly find the proper repo path +# to put the final rpms generated by the build system. + +# Versioning description +# ====================== +# +# - AT_NAME: Final build Advance Toolchain package name. +# +# - AT_MAJOR_VERSION: Changes whenever the compiler or the ABI changes. +# Should be in X.Y format, where X=compiler change, +# Y=ABI change within that compiler change cycle. All +# first major releases should be X.0. Then, if the ABI +# changes, increment the second digit (i.e. X.1). +# +# - AT_REVISION_NUMBER: The revision number. Starts at 0 and is incremented +# whenever a new official build that doesn't change the +# compiler version or the ABI is required. +# +# - AT_INTERNAL: Tag for internal releases (i.e. alpha, beta, rc). For +# GM or external releases, it should be "none". +# +# - AT_DIR_NAME: Optional name of the directory. If not defined, will +# use a combination of ATNAME, AT_MAJOR_VERSION, +# AT_INTERNAL and AT_REVISION_NUMBER. +# +# - AT_PREVIOUS_VERSION Previous compatible AT version supported (It may be +# further restricted by distro specific settings) +AT_NAME := at +AT_MAJOR_VERSION := 7.0 +AT_REVISION_NUMBER := 9 +AT_INTERNAL := none +AT_PREVIOUS_VERSION := 6.0 diff --git a/configs/7.0/build.mk b/configs/7.0/build.mk new file mode 100644 index 000000000..662a90743 --- /dev/null +++ b/configs/7.0/build.mk @@ -0,0 +1,58 @@ +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generic build support options +# ============================= +# Most of these options are self explanatory, Some highlights on obscure ones +# - BUILD_ARCH must contain the target toolchain arch (ppc64/ppc32) +# - BUILD_CROSS_32 tell us to build (yes) or not (no) a cross on 32 bit system. +# - BUILD_LOAD_ARCH tell us the CPU base to use for loader compatibility (GLIBC). +# - BUILD_BASE_ARCH tell us the CPU base to use for base code generation (GCC). +# - BUILD_OPTIMIZATION tells which is the default base optimization level (GCC). +# - BUILD_WITH_LONGDOUBLE tells us to build with support for longdoubles. +# - BUILD_WITH_DFP_STANDALONE tells us to build with libdfp as standalone library. +# - BUILD_RPM_PACKAGER tells us the name / email of packager for this release. +# - BUILD_RPMS must be set to "granular" or "monolithic" to indicate the kind of +# rpms to be generated by the build script. See the documentation notes. +BUILD_ARCH := ppc64 +BUILD_CROSS_32 := yes +BUILD_LOAD_ARCH := power7 +BUILD_BASE_ARCH := power7 +BUILD_OPTIMIZATION := power8 +BUILD_WITH_LONGDOUBLE := yes +BUILD_WITH_DFP_STANDALONE := yes +BUILD_RPM_PACKAGER := +BUILD_RPM_VENDOR := +BUILD_RPMS := monolithic +BUILD_GCC_LANGUAGES := c,c++,fortran + +# List supported CPUs to build for active, compat and embed +# ========================================================= +# - List of valid CPUs for active and compat: +# * power4, power5, power5+, power6, power6x and power7 +BUILD_ACTIVE_MULTILIBS := power8 + +# Download options +# ================ +# Should be either 'yes' or 'no'. Mostly self explanatory options. +# - BUILD_GET_SOURCES tell us to force grab sources +# - BUILD_GET_MPS tell us to grab patches from mailing lists +# - BUILD_GET_ADDONS tell us to grab related package addons +# - BUILD_EXCLUSIVE_CROSS tell us that the build is *exclusively* cross +# - BUILD_DEFAULT_RETRIES tell the default number of retries when fetching sources +BUILD_GET_SOURCES := yes +BUILD_GET_MPS := yes +BUILD_GET_ADDONS := yes +BUILD_EXCLUSIVE_CROSS := no +BUILD_DEFAULT_RETRIES := 5 diff --git a/configs/7.0/distros/centos-6.mk b/configs/7.0/distros/centos-6.mk new file mode 120000 index 000000000..b8dd2bf9b --- /dev/null +++ b/configs/7.0/distros/centos-6.mk @@ -0,0 +1 @@ +redhat-6.mk \ No newline at end of file diff --git a/configs/7.0/distros/redhat-6.mk b/configs/7.0/distros/redhat-6.mk new file mode 100644 index 000000000..2d142db97 --- /dev/null +++ b/configs/7.0/distros/redhat-6.mk @@ -0,0 +1,83 @@ +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Distro dependent basic definitions for RedHat Enterprise Server 6 +# ================================================================= +# This Makefile include contains the definitions for the distro being used +# for the build process. It contains kernel version infos and distro specific +# sanity checks. + +# Informs the distro supported power archs +AT_SUPPORTED_ARCHS := ppc64 + +# You may force the BUILD_IGNORE_AT_COMPAT general condition by distro +#BUILD_IGNORE_AT_COMPAT := yes + +# Kernel version to build toolchain against +# - As this distro only supports one arch variation (ppc64), there is no +# need to conditionally define these versions based on arch. +AT_KERNEL := 2.6.32 # Current distro kernel version for runtime. +AT_OLD_KERNEL := 2.6.18 # Previous distro kernel version for runtime-compat. + +# Inform the mainly supported distros +AT_SUPPORTED_DISTROS := "RHEL6 RHEL7" + +# Inform the compatibility suported distros +AT_COMPAT_DISTROS := RHEL5 + +# Sign the repository and packages +AT_SIGN_PKGS := yes +AT_SIGN_REPO := yes +AT_SIGN_PKGS_CROSS := no +AT_SIGN_REPO_CROSS := yes + +# ID of GNUPG key used to sign our packages (main/compat) +AT_GPG_KEYID := 6976A827 +AT_GPG_KEYIDC := 3052930D +AT_GPG_KEYIDL := 6976A827 +# ID of GNUPG key used to sign our repositories (main/compat) +AT_GPG_REPO_KEYID := 3052930D +AT_GPG_REPO_KEYIDC := 3052930D +AT_GPG_REPO_KEYIDL := 6976A827 + +# Options required by the command to update the repository metadata +AT_REPOCMD_OPTS := -p -s sha1 --simple-md-filenames --no-database + +# As some distros have special requirements for configuration upon final +# AT installation, put in this macro, the final configurations required +# after the main build and prior to the rpm build +define distro_final_config + echo "nothing to do." +endef + +# Inform the list of packages to check +ifndef AT_DISTRO_REQ_PKGS + AT_CROSS_PKGS_REQ := + AT_NATIVE_PKGS_REQ := \(ibm-java2-ppc64-sdk-5.0\|java-1.5.0-ibm-devel\) \ + libxslt popt-devel qt-devel imake \ + readline readline-devel + + AT_COMMON_PKGS_REQ := zlib-devel ncurses-devel flex bison texinfo \ + createrepo glibc-devel subversion cvs gawk autoconf \ + rsync curl bc automake + AT_CROSS_PGMS_REQ := + AT_NATIVE_PGMS_REQ := + AT_COMMON_PGMS_REQ := git_1.7 + AT_JAVA_VERSIONS := 5 +endif + +# If needed, define the necessary distro related sanity checks. +define distro_sanity + echo "nothing to test here" +endef diff --git a/configs/7.0/distros/suse-11.mk b/configs/7.0/distros/suse-11.mk new file mode 100644 index 000000000..1066902d1 --- /dev/null +++ b/configs/7.0/distros/suse-11.mk @@ -0,0 +1,84 @@ +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Distro dependent basic definitions for SuSE Enterprise Server 11 +# ================================================================ +# This Makefile include contains the definitions for the distro being used +# for the build process. It contains kernel version infos and distro specific +# sanity checks. + +# Informs the distro supported power archs +AT_SUPPORTED_ARCHS := ppc64 + +# You may force the BUILD_IGNORE_AT_COMPAT general condition by distro +#BUILD_IGNORE_AT_COMPAT := yes + +# Kernel version to build toolchain against +# SLES 11 was released with Linux 2.6.27 however, PAFLib requires a feature +# that is only available on 2.6.32. +# - As this distro only supports one arch variation (ppc64), there is no +# need to conditionally define these versions based on arch. +AT_KERNEL := 2.6.32 # Current distro kernel version for runtime. +AT_OLD_KERNEL := 2.6.16 # Previous distro kernel version for runtime-compat. + +# Inform the mainly supported distros +AT_SUPPORTED_DISTROS := SLES_11 + +# Inform the compatibility suported distros +AT_COMPAT_DISTROS := SLES_10 + +# Sign the repository and packages +AT_SIGN_PKGS := yes +AT_SIGN_REPO := yes +AT_SIGN_PKGS_CROSS := no +AT_SIGN_REPO_CROSS := yes + +# ID of GNUPG key used to sign our packages (main/compat) +AT_GPG_KEYID := 3052930D +AT_GPG_KEYIDC := 3052930D +AT_GPG_KEYIDL := 3052930D +# ID of GNUPG key used to sign our repositories (main/compat) +AT_GPG_REPO_KEYID := 3052930D +AT_GPG_REPO_KEYIDC := 3052930D +AT_GPG_REPO_KEYIDL := 3052930D + +# Options required by the command to update the repository metadata +AT_REPOCMD_OPTS := -p + +# As some distros have special requirements for configuration upon final +# AT installation, put in this macro, the final configurations required +# after the main build and prior to the rpm build +define distro_final_config + echo "nothing to do." +endef + +# Inform the list of packages to check +ifndef AT_DISTRO_REQ_PKGS + AT_CROSS_PKGS_REQ := + AT_NATIVE_PKGS_REQ := \(ibm-java2-ppc64-sdk-5.0\|java-1.5.0-ibm-devel\) \ + libxslt popt-devel docbook-xsl-stylesheets \ + xorg-x11-util-devel readline readline-devel + AT_COMMON_PKGS_REQ := zlib-devel ncurses-devel flex bison texinfo \ + createrepo subversion cvs gawk autoconf rsync curl \ + bc automake + AT_CROSS_PGMS_REQ := + AT_NATIVE_PGMS_REQ := + AT_COMMON_PGMS_REQ := git_1.7 + AT_JAVA_VERSIONS := 5 +endif + +# If needed, define the necessary distro related sanity checks. +define distro_sanity + echo "nothing to test here" +endef diff --git a/configs/7.0/packages/amino/amino.mk b/configs/7.0/packages/amino/amino.mk new file mode 120000 index 000000000..3fdfb5a13 --- /dev/null +++ b/configs/7.0/packages/amino/amino.mk @@ -0,0 +1 @@ +../../../6.0/packages/amino/amino.mk \ No newline at end of file diff --git a/configs/7.0/packages/amino/sources b/configs/7.0/packages/amino/sources new file mode 120000 index 000000000..3434bbf81 --- /dev/null +++ b/configs/7.0/packages/amino/sources @@ -0,0 +1 @@ +../../../6.0/packages/amino/sources \ No newline at end of file diff --git a/configs/7.0/packages/amino/specfile b/configs/7.0/packages/amino/specfile new file mode 120000 index 000000000..eec206555 --- /dev/null +++ b/configs/7.0/packages/amino/specfile @@ -0,0 +1 @@ +../../../6.0/packages/amino/specfile \ No newline at end of file diff --git a/configs/7.0/packages/amino/stage_1 b/configs/7.0/packages/amino/stage_1 new file mode 120000 index 000000000..883c329ad --- /dev/null +++ b/configs/7.0/packages/amino/stage_1 @@ -0,0 +1 @@ +../../../6.0/packages/amino/stage_1 \ No newline at end of file diff --git a/configs/7.0/packages/binutils/binutils.mk b/configs/7.0/packages/binutils/binutils.mk new file mode 120000 index 000000000..32b96ff1b --- /dev/null +++ b/configs/7.0/packages/binutils/binutils.mk @@ -0,0 +1 @@ +../../../6.0/packages/binutils/binutils.mk \ No newline at end of file diff --git a/configs/7.0/packages/binutils/sources b/configs/7.0/packages/binutils/sources new file mode 100644 index 000000000..0c9c94c43 --- /dev/null +++ b/configs/7.0/packages/binutils/sources @@ -0,0 +1,43 @@ +#!/usr/bin/env bash +# +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# binutils source package and build info +# ====================================== +# + +ATSRC_PACKAGE_NAME="GNU Binutils" +ATSRC_PACKAGE_VER=2.23 +ATSRC_PACKAGE_REV=92f180eb +ATSRC_PACKAGE_LICENSE="GPL 2.0" +ATSRC_PACKAGE_DOCLINK="http://sourceware.org/binutils/docs/" +ATSRC_PACKAGE_RELFIXES= +ATSRC_PACKAGE_STR_VER="${ATSRC_PACKAGE_NAME} ${ATSRC_PACKAGE_VER}-${ATSRC_PACKAGE_REV}" +ATSRC_PACKAGE_VERID="${ATSRC_PACKAGE_VER}${ATSRC_PACKAGE_REV:+-${ATSRC_PACKAGE_REV}}" +ATSRC_PACKAGE_PRE="test -d binutils-${ATSRC_PACKAGE_VERID}" +ATSRC_PACKAGE_CO=([0]="wget -O binutils-${ATSRC_PACKAGE_VERID}.tar.gz https://github.com/tuliom/at-binutils/archive/${ATSRC_PACKAGE_REV}.tar.gz") +ATSRC_PACKAGE_GIT="" +# Use --transform to give a better name to Binutils directory. +ATSRC_PACKAGE_POST="tar xzf binutils-${ATSRC_PACKAGE_VERID}.tar.gz --transform=s/at-binutils-${ATSRC_PACKAGE_REV}[^\\/]*/binutils-${ATSRC_PACKAGE_VERID}/" +ATSRC_PACKAGE_SRC=${AT_BASE}/sources/binutils-${ATSRC_PACKAGE_VERID} +ATSRC_PACKAGE_WORK=${AT_WORK_PATH}/binutils +ATSRC_PACKAGE_MLS= +ATSRC_PACKAGE_ALOC= +ATSRC_PACKAGE_PATCHES= +ATSRC_PACKAGE_TARS= +ATSRC_PACKAGE_DISTRIB=yes +ATSRC_PACKAGE_BUILDCROSS=yes +ATSRC_PACKAGE_BUNDLE=toolchain diff --git a/configs/7.0/packages/binutils/specfile b/configs/7.0/packages/binutils/specfile new file mode 100644 index 000000000..d46c60911 --- /dev/null +++ b/configs/7.0/packages/binutils/specfile @@ -0,0 +1,14 @@ +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# diff --git a/configs/7.0/packages/binutils/stage_1 b/configs/7.0/packages/binutils/stage_1 new file mode 120000 index 000000000..8187b016a --- /dev/null +++ b/configs/7.0/packages/binutils/stage_1 @@ -0,0 +1 @@ +../../../6.0/packages/binutils/stage_1 \ No newline at end of file diff --git a/configs/7.0/packages/binutils/stage_2 b/configs/7.0/packages/binutils/stage_2 new file mode 120000 index 000000000..3c451cd51 --- /dev/null +++ b/configs/7.0/packages/binutils/stage_2 @@ -0,0 +1 @@ +../../../6.0/packages/binutils/stage_2 \ No newline at end of file diff --git a/configs/7.0/packages/binutils/stage_3 b/configs/7.0/packages/binutils/stage_3 new file mode 120000 index 000000000..97dd316d8 --- /dev/null +++ b/configs/7.0/packages/binutils/stage_3 @@ -0,0 +1 @@ +../../../6.0/packages/binutils/stage_3 \ No newline at end of file diff --git a/configs/7.0/packages/boost/boost.mk b/configs/7.0/packages/boost/boost.mk new file mode 120000 index 000000000..ae093ab59 --- /dev/null +++ b/configs/7.0/packages/boost/boost.mk @@ -0,0 +1 @@ +../../../6.0/packages/boost/boost.mk \ No newline at end of file diff --git a/configs/7.0/packages/boost/sources b/configs/7.0/packages/boost/sources new file mode 120000 index 000000000..d579be947 --- /dev/null +++ b/configs/7.0/packages/boost/sources @@ -0,0 +1 @@ +../../../6.0/packages/boost/sources \ No newline at end of file diff --git a/configs/7.0/packages/boost/specfile b/configs/7.0/packages/boost/specfile new file mode 120000 index 000000000..2656f8218 --- /dev/null +++ b/configs/7.0/packages/boost/specfile @@ -0,0 +1 @@ +../../../6.0/packages/boost/specfile \ No newline at end of file diff --git a/configs/7.0/packages/boost/stage_1 b/configs/7.0/packages/boost/stage_1 new file mode 120000 index 000000000..4c9c88c48 --- /dev/null +++ b/configs/7.0/packages/boost/stage_1 @@ -0,0 +1 @@ +../../../6.0/packages/boost/stage_1 \ No newline at end of file diff --git a/configs/7.0/packages/expat/expat.mk b/configs/7.0/packages/expat/expat.mk new file mode 120000 index 000000000..be0d52613 --- /dev/null +++ b/configs/7.0/packages/expat/expat.mk @@ -0,0 +1 @@ +../../../6.0/packages/expat/expat.mk \ No newline at end of file diff --git a/configs/7.0/packages/expat/sources b/configs/7.0/packages/expat/sources new file mode 120000 index 000000000..cafea7195 --- /dev/null +++ b/configs/7.0/packages/expat/sources @@ -0,0 +1 @@ +../../../6.0/packages/expat/sources \ No newline at end of file diff --git a/configs/7.0/packages/expat/specfile b/configs/7.0/packages/expat/specfile new file mode 120000 index 000000000..a654fe2e5 --- /dev/null +++ b/configs/7.0/packages/expat/specfile @@ -0,0 +1 @@ +../../../6.0/packages/expat/specfile \ No newline at end of file diff --git a/configs/7.0/packages/expat/stage_1 b/configs/7.0/packages/expat/stage_1 new file mode 120000 index 000000000..1d671ad24 --- /dev/null +++ b/configs/7.0/packages/expat/stage_1 @@ -0,0 +1 @@ +../../../6.0/packages/expat/stage_1 \ No newline at end of file diff --git a/configs/7.0/packages/gcc/gcc.mk b/configs/7.0/packages/gcc/gcc.mk new file mode 120000 index 000000000..d4ea6aa7c --- /dev/null +++ b/configs/7.0/packages/gcc/gcc.mk @@ -0,0 +1 @@ +../../../6.0/packages/gcc/gcc.mk \ No newline at end of file diff --git a/configs/7.0/packages/gcc/sources b/configs/7.0/packages/gcc/sources new file mode 100644 index 000000000..1bdd96e7e --- /dev/null +++ b/configs/7.0/packages/gcc/sources @@ -0,0 +1,48 @@ +#!/usr/bin/env bash +# +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# Include sources used functions +# ============================== +source "${utilities}/sources_expandable.sh" + +# GCC source package and build info +# ================================= +ATSRC_PACKAGE_NAME="GCC (GNU Compiler Collection)" +ATSRC_PACKAGE_SUBPACKAGE_NAME_0="GNU Standard C++ Library v3 (Libstdc++-v3)" +ATSRC_PACKAGE_SUBPACKAGE_NAME_1="GNU Libgomp" +ATSRC_PACKAGE_VER=4.8.5 +ATSRC_PACKAGE_REV=227152 +ATSRC_PACKAGE_LICENSE="GPL 3.0" +ATSRC_PACKAGE_DOCLINK="http://gcc.gnu.org/onlinedocs/gcc-4.8.3/gcc/" +ATSRC_PACKAGE_SUBPACKAGE_DOCLINK_0="https://gcc.gnu.org/libstdc++/" +ATSRC_PACKAGE_SUBPACKAGE_DOCLINK_1="https://gcc.gnu.org/onlinedocs/libgomp/" +ATSRC_PACKAGE_RELFIXES= +ATSRC_PACKAGE_NAMESUFFIX="$(supported_languages ${build_gcc_languages})" +ATSRC_PACKAGE_STR_VER="${ATSRC_PACKAGE_NAME} ${ATSRC_PACKAGE_VER}-ibm-r${ATSRC_PACKAGE_REV}" +ATSRC_PACKAGE_PRE="test -d gcc-${ATSRC_PACKAGE_VER}-${ATSRC_PACKAGE_REV}" +ATSRC_PACKAGE_CO=([0]="svn co --revision ${ATSRC_PACKAGE_REV} svn://gcc.gnu.org/svn/gcc/branches/ibm/gcc-4_8-branch") +ATSRC_PACKAGE_POST="mv gcc-4_8-branch gcc-${ATSRC_PACKAGE_VER}-${ATSRC_PACKAGE_REV}" +ATSRC_PACKAGE_SRC=${AT_BASE}/sources/gcc-${ATSRC_PACKAGE_VER}-${ATSRC_PACKAGE_REV} +ATSRC_PACKAGE_WORK=${AT_WORK_PATH}/gcc +ATSRC_PACKAGE_MLS= +ATSRC_PACKAGE_ALOC="https://github.com/powertechpreview/powertechpreview/raw/master/GCC%20libstdc%2B%2B%20PowerPC%20Patches/4.7/ppc64-gcc-4.7-libstdc%2B%2B.tgz" +ATSRC_PACKAGE_PATCHES="" +ATSRC_PACKAGE_TARS="ppc64-gcc-4.7-libstdc++.tgz" +ATSRC_PACKAGE_MAKE_CHECK= +ATSRC_PACKAGE_DISTRIB=yes +ATSRC_PACKAGE_BUILDCROSS=yes +ATSRC_PACKAGE_BUNDLE=toolchain diff --git a/configs/7.0/packages/gcc/specfile b/configs/7.0/packages/gcc/specfile new file mode 100644 index 000000000..d46c60911 --- /dev/null +++ b/configs/7.0/packages/gcc/specfile @@ -0,0 +1,14 @@ +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# diff --git a/configs/7.0/packages/gcc/stage_1 b/configs/7.0/packages/gcc/stage_1 new file mode 100644 index 000000000..fc881a046 --- /dev/null +++ b/configs/7.0/packages/gcc/stage_1 @@ -0,0 +1,184 @@ +#!/usr/bin/env bash +# +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# GCC build parameters for stage 1 +# ================================ +# + +ATCFG_HOLD_TEMP_INSTALL='no' +ATCFG_HOLD_TEMP_BUILD='no' +# Build in a new directory +ATCFG_BUILD_STAGE_T='dir' + +# Required pre build hacks +atcfg_pre_hacks() { + # Overwrite the existing DEV-PHASE with Advance-Toolchain-XX + mv ${ATSRC_PACKAGE_WORK}/gcc/DEV-PHASE ${ATSRC_PACKAGE_WORK}/gcc/DEV-PHASE.back + echo "Advance-Toolchain-${at_major_internal}" > ${ATSRC_PACKAGE_WORK}/gcc/DEV-PHASE + # Overwrite the existing REVISION with the current SVN revision date + mv ${ATSRC_PACKAGE_WORK}/gcc/REVISION ${ATSRC_PACKAGE_WORK}/gcc/REVISION.back + sed "s/branch merged/branch, revision: ${ATSRC_PACKAGE_REV} merged/" ${ATSRC_PACKAGE_WORK}/gcc/REVISION.back \ + > ${ATSRC_PACKAGE_WORK}/gcc/REVISION + mv ${ATSRC_PACKAGE_WORK}/gcc/DATESTAMP ${ATSRC_PACKAGE_WORK}/gcc/DATESTAMP.back + echo "$(head -n 1 ${ATSRC_PACKAGE_WORK}/gcc/ChangeLog.ibm | cut -f 1 -d " " | sed "s/-//g")" \ + > ${ATSRC_PACKAGE_WORK}/gcc/DATESTAMP +} + +# Pre configure settings or commands to run +atcfg_pre_configure() { + cc_64=${system_cc} + cxx_64=${system_cxx} + libdir="${at_dest}/lib" + if [[ "${cross_build}" == "no" ]]; then + if [[ "${build_arch}" == "ppc64" ]]; then + if [[ "${default_compiler}" == "32" ]]; then + cc_64="${gcc64}" + cxx_64="${gpp64}" + fi + libdir="${at_dest}/lib64" + fi + fi +} + +# Conditional configure command +atcfg_configure() { + if [[ "${cross_build}" == "no" ]]; then + # Configure command for native builds + CC="${cc_64}" \ + CXX="${cxx_64}" \ + AS="${at_dest}/bin/as" \ + LD="${at_dest}/bin/ld" \ + ${ATSRC_PACKAGE_WORK}/configure \ + --build=${host} \ + --host=${host} \ + --target=${target} \ + --with-cpu=${default_cpu} \ + --prefix="${at_dest}" \ + ${secure_plt:+--enable-secureplt} \ + ${disable_multilib:+--disable-multilib} \ + --disable-threads \ + --disable-shared \ + --disable-libmudflap \ + --disable-libssp \ + --disable-bootstrap \ + --disable-libgomp \ + --disable-lto \ + --with-mpfr-include="${at_dest}/include" \ + --with-mpfr-lib="${libdir}" \ + --with-gmp-include="${at_dest}/include" \ + --with-gmp-lib="${libdir}" \ + --with-mpc-include="${at_dest}/include" \ + --with-mpc-lib="${libdir}" \ + --enable-languages=c,c++ \ + --with-as="${at_dest}/bin/as" \ + --with-ld="${at_dest}/bin/ld" + else + # Configure command for cross builds + CC="${cc_64}" \ + CXX="${cxx_64}" \ + AS="${at_dest}/bin/${target}-as" \ + LD="${at_dest}/bin/${target}-ld" \ + AR="${at_dest}/bin/${target}-ar" \ + RANLIB="${at_dest}/bin/${target}-ranlib" \ + AS_FOR_TARGET="${at_dest}/bin/${target}-as" \ + AR_FOR_TARGET="${at_dest}/bin/${target}-ar" \ + RANLIB_FOR_TARGET="${at_dest}/bin/${target}-ranlib" \ + ${ATSRC_PACKAGE_WORK}/configure \ + --build=${host} \ + --host=${host} \ + --target=${target64:-${target}} \ + --with-cpu=${default_cpu} \ + --prefix="${at_dest}" \ + ${secure_plt:+--enable-secureplt} \ + ${disable_multilib:+--disable-multilib} \ + --disable-threads \ + --disable-shared \ + --disable-libmudflap \ + --disable-libssp \ + --disable-bootstrap \ + --disable-libgomp \ + --disable-libatomic \ + --disable-decimal-float \ + --disable-libquadmath \ + --with-mpfr-include="${at_dest}/include" \ + --with-mpfr-lib="${libdir}" \ + --with-gmp-include="${at_dest}/include" \ + --with-gmp-lib="${libdir}" \ + --with-mpc-include="${at_dest}/include" \ + --with-mpc-lib="${libdir}" \ + --enable-languages=c \ + --with-as="${at_dest}/bin/${target}-as" \ + --with-ld="${at_dest}/bin/${target}-ld" \ + --with-newlib \ + --without-headers + fi +} + +# Make build command +atcfg_make() { + ${SUB_MAKE} all +} + +# Pre install settings or commands to run +atcfg_pre_install() { + # The cross compiler must be able to install the target host binaries + # properly, but to do so it needs these folders created, as the + # binutils package will do so on its install. As our installs are + # atomic, we need to provide them before hand, so GCC finds it and + # places its files there properly. + if [[ "${cross_build}" == "yes" ]]; then + [[ -d "${install_place}/${at_dest}/${target}/bin" ]] || \ + mkdir -p "${install_place}/${at_dest}/${target}/bin" + [[ -d "${install_place}/${at_dest}/${target}/lib" ]] || \ + mkdir -p "${install_place}/${at_dest}/${target}/lib" + fi +} + +# Install build command +atcfg_install() { + make install -j1 DESTDIR=${install_place} +} + +# Post install settings or commands to run +atcfg_post_install() { + # Create the required symlinks to install + if [[ "${cross_build}" == "no" ]]; then + pushd ${install_place}/${at_dest}/bin + if [[ ! -e ${target}-gcc ]]; then + echo -e "#!/bin/bash\nexec ${at_dest}/bin/gcc \"${@}\"" > ${target}-gcc + chmod a+x ${target}-gcc + fi + if [[ ! -e ${target}-g++ ]]; then + echo -e "#!/bin/bash\nexec ${at_dest}/bin/g++ \"${@}\"" > ${target}-g++ + chmod a+x ${target}-g++ + fi + if [[ ! -e ${target}-c++ ]]; then + ln -f ${target}-g++ ${target}-c++ + fi + popd + # The following files will be installed by GLIBC, so no need to have them properly + # mapped into the filelist (not installed into ${install_place} for mapping) + if [[ ! -e "${at_dest}/lib/ld.so.1" ]]; then + ln -s /lib/ld.so.1 "${at_dest}/lib/ld.so.1" + fi + if [[ ! -e "${at_dest}/lib/libc.so.6" ]]; then + ln -s /lib/libc.so.6 "${at_dest}/lib/libc.so.6" + fi + # Remove unnecessary python scripts + find "${install_place}/${at_dest}" -name "libstdc++.so.*-gdb.py" -print -delete + fi +} diff --git a/configs/7.0/packages/gcc/stage_2 b/configs/7.0/packages/gcc/stage_2 new file mode 100644 index 000000000..62a7e4e20 --- /dev/null +++ b/configs/7.0/packages/gcc/stage_2 @@ -0,0 +1,193 @@ +#!/usr/bin/env bash +# +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# GCC build parameters for stage 2 +# ================================ +# + +ATCFG_HOLD_TEMP_INSTALL='no' +ATCFG_HOLD_TEMP_BUILD='no' +# Build in a new directory +ATCFG_BUILD_STAGE_T='dir' + + +# Required post install hacks (this one is run after the final install move) +atcfg_posti_hacks() { + # Hack the static library to satisfy GLIBC build + for LIB in $(find "${at_dest}/lib" -name libgcc.a); do + [[ -e ${LIB%\.a}_eh.a ]] || ln -s libgcc.a ${LIB%\.a}_eh.a + [[ -e ${LIB%\.a}_s.a ]] || ln -s libgcc.a ${LIB%\.a}_s.a + done +} + +# Pre configure settings or commands to run +atcfg_pre_configure() { + cc_64="${system_cc}" + cxx_64="${system_cxx}" + libdir="${at_dest}/lib" + if [[ "${cross_build}" == "no" ]]; then + if [[ "${build_arch}" == ppc64* ]]; then + if [[ "${default_compiler}" == "32" ]]; then + cc_64="${gcc64}" + cxx_64="${gpp64}" + fi + libdir="${at_dest}/lib64" + fi + fi +} + +# Conditional configure command +atcfg_configure() { + if [[ "${cross_build}" == "no" ]]; then + # Configure command for native builds + CC="${cc_64}" \ + CXX="${cxx_64}" \ + CFLAGS="-O2" \ + CXXFLAGS="-O2" \ + AS="${at_dest}/bin/as" \ + LD="${at_dest}/bin/ld" \ + ${ATSRC_PACKAGE_WORK}/configure \ + --build=${target64:-${target}} \ + --host=${target64:-${target}} \ + --target=${target64:-${target}} \ + --with-cpu=${default_cpu} \ + --prefix=${at_dest} \ + ${with_longdouble:+--with-long-double-128} \ + ${with_dfp_standalone:+--enable-decimal-float} \ + ${secure_plt:+--enable-secureplt} \ + ${disable_multilib:+--disable-multilib} \ + --enable-threads=posix \ + --enable-languages=c,c++ \ + --enable-__cxa_atexit \ + --disable-shared \ + --disable-checking \ + --disable-libmudflap \ + --disable-libssp \ + --disable-lto \ + --disable-libgomp \ + --without-ppl \ + --without-cloog \ + --with-gmp-include="${at_dest}/include" \ + --with-gmp-lib=${libdir} \ + --with-mpfr-include="${at_dest}/include" \ + --with-mpfr-lib=${libdir} \ + --with-mpc-include="${at_dest}/include" \ + --with-mpc-lib=${libdir} \ + --with-as="${at_dest}/bin/as" \ + --with-ld="${at_dest}/bin/ld" + else + # Configure command for cross builds + CC="${cc_64}" \ + CXX="${cxx_64}" \ + LD="${at_dest}/bin/${target}-ld" \ + AS="${at_dest}/bin/${target}-as" \ + AR="${at_dest}/bin/${target}-ar" \ + NM="${at_dest}/bin/${target}-nm" \ + RANLIB="${at_dest}/bin/${target}-ranlib" \ + AS_FOR_TARGET="${at_dest}/bin/${target}-as" \ + AR_FOR_TARGET="${at_dest}/bin/${target}-ar" \ + NM_FOR_TARGET="${at_dest}/bin/${target}-nm" \ + RANLIB_FOR_TARGET="${at_dest}/bin/${target}-ranlib" \ + ${ATSRC_PACKAGE_WORK}/configure \ + --build=${host} \ + --host=${host} \ + --target=${target64:-${target}} \ + --with-cpu=${default_cpu} \ + --prefix=${at_dest} \ + ${with_longdouble:+--with-long-double-128} \ + ${secure_plt:+--enable-secureplt} \ + ${disable_multilib:+--disable-multilib} \ + --enable-languages=c \ + --enable-__cxa_atexit \ + --enable-threads=posix \ + --disable-libmudflap \ + --disable-libssp \ + --disable-libgomp \ + --disable-libatomic \ + --disable-libquadmath \ + --disable-lto \ + --disable-decimal-float \ + --with-mpfr-include="${at_dest}/include" \ + --with-mpfr-lib=${libdir} \ + --with-gmp-include="${at_dest}/include" \ + --with-gmp-lib=${libdir} \ + --with-mpc-include="${at_dest}/include" \ + --with-mpc-lib=${libdir} \ + --without-ppl \ + --without-cloog \ + --with-host-libstdcxx="-L${libdir} -lstdc++ -lsupc++ -lm -lgmp -lgmpxx -lmpfr -lmpc" \ + --with-build-sysroot="${dest_cross}" \ + --with-sysroot="${dest_cross}" \ + --with-headers="${dest_cross}/usr/include" + fi +} + +# Pre install settings or commands to run +atcfg_pre_install() { + # The cross compiler must be able to install the target host binaries + # properly, but to do so it needs these folders created, as the + # binutils package will do so on its install. As our installs are + # atomic, we need to provide them before hand, so GCC finds it and + # places its files there properly. + if [[ "${cross_build}" == "yes" ]]; then + [[ -d "${install_place}/${at_dest}/${target}/bin" ]] || \ + mkdir -p "${install_place}/${at_dest}/${target}/bin" + [[ -d "${install_place}/${at_dest}/${target}/lib" ]] || \ + mkdir -p "${install_place}/${at_dest}/${target}/lib" + fi +} + +# Make build command +atcfg_make() { + # With -isystem we make sure that system's gcc (stage1) will recognize AT + # headers as system headers and give them special treatment. + ${SUB_MAKE} STAGE1_CFLAGS="-isystem ${at_dest}/include" STAGE1_CXXFLAGS="-isystem ${at_dest}/include" all +} + +# Install build command +atcfg_install() { + make install -j1 DESTDIR=${install_place} +} + +# Post install settings or commands to run +atcfg_post_install() { + # Fixes to cross build install + if [[ "${cross_build}" == "yes" ]]; then + # This copy is required because gcc has a problem in the cross build, + # the sys-include folder is created directly into destination prefix, + # but this brokes the isolated install build that we use, and these files + # are missed in the final file list generated for the RPM build + cp -a ${at_dest}/${target}/sys-include \ + ${install_place}/${at_dest}/${target} + # Create the required symlinks to install + pushd ${install_place}/${at_dest}/bin + if [[ ! -e ${target}-gcc ]]; then + echo -e "#!/bin/bash\nexec ${at_dest}/bin/gcc \"${@}\"" > ${target}-gcc + chmod a+x ${target}-gcc + fi + if [[ ! -e ${target}-g++ ]]; then + echo -e "#!/bin/bash\nexec ${at_dest}/bin/g++ \"${@}\"" > ${target}-g++ + chmod a+x ${target}-g++ + fi + if [[ ! -e ${target}-c++ ]]; then + ln -f ${target}-g++ ${target}-c++ + fi + popd + fi + # Remove unnecessary python scripts + find "${install_place}/${at_dest}" -name "libstdc++.so.*-gdb.py" -print -delete +} diff --git a/configs/7.0/packages/gcc/stage_3 b/configs/7.0/packages/gcc/stage_3 new file mode 100644 index 000000000..b73315765 --- /dev/null +++ b/configs/7.0/packages/gcc/stage_3 @@ -0,0 +1,179 @@ +#!/usr/bin/env bash +# +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# GCC build parameters for stage 3 +# ================================ +# + +ATCFG_HOLD_TEMP_INSTALL='no' +ATCFG_HOLD_TEMP_BUILD='no' +# Build in a new directory +ATCFG_BUILD_STAGE_T='dir' +# Don't fail if stage final install place doesn't exist +if [[ "${cross_build}" == "yes" ]]; then + ATCFG_INSTALL_PEDANTIC="no" +fi + +# Required pre build hacks +atcfg_pre_hacks() { + # Clean static lib hack done on gcc stage 2 for GLIBC build. + for Z in $(find "${at_dest}/lib" -name libgcc.a); do + [[ -h ${Z%\.a}_s.a ]] && rm -f ${Z%\.a}_s.a + [[ -h ${Z%\.a}_eh.a ]] && rm -f ${Z%\.a}_eh.a + done + # Patch GCC source to use correct GLIBC (if not patched yet). + check_gcc=$(grep rpath ${ATSRC_PACKAGE_WORK}/gcc/config/rs6000/linux64.h | sed "s/.*rpath.*/rpath/" | head -n 1) + if [[ -z ${check_gcc} ]]; then + s1="s@\(GLIBC_DYNAMIC_LINKER[^/]*\)\( \"\)\(.*\)@\1\2"${at_dest}"\3@" + s2="s@%{!shared: %{!static:@%{!static: %{!shared:@" + s3="s@\(GNU_USER_DYNAMIC_LINKER32 \"\}\}\)@\1 --enable-new-dtags -rpath "${at_dest}"\/lib@" + s4="s@\(GNU_USER_DYNAMIC_LINKER64 \"\}\}\)@\1 --enable-new-dtags -rpath "${at_dest}"\/lib64@" + s5="s@\(GNU_USER_DYNAMIC_LINKER \"\}\}\)@\1 --enable-new-dtags -rpath "${at_dest}"\/lib@" + for F in ${ATSRC_PACKAGE_WORK}/gcc/config/rs6000/{linux64.h,sysv4.h}; do + sed -e "${s1}" -e "${s2}" -e "${s3}" -e "${s4}" -e "${s5}" < "${F}" > tmp.$$ && \ + { cmp -s tmp.$$ "${F}" || mv -f tmp.$$ "${F}"; } || \ + exit 1 + rm -f tmp.$$ + done + # Check and validate the applied patch + check_gcc=$(grep rpath ${ATSRC_PACKAGE_WORK}/gcc/config/rs6000/linux64.h | sed "s/.*rpath.*/rpath/" | head -n 1) + if [[ -z ${check_gcc} ]]; then + # Restore original files for sanity. The sed lines above append + # text to the original line, not replace them. + cp ${ATSRC_PACKAGE_SRC}/gcc/config/rs6000/linux64.h ${ATSRC_PACKAGE_WORK}/gcc/config/rs6000/ + cp ${ATSRC_PACKAGE_SRC}/gcc/config/rs6000/sysv4.h ${ATSRC_PACKAGE_WORK}/gcc/config/rs6000/ + echo "Failed patching gcc for stage 3 build." + exit 1 + fi + fi + # Should run only on a native build... Skip these on cross + if [[ "${cross_build}" == "no" ]]; then + # Hack required to avoid a bug where gcc picks up the wrong crti.o, + # causing ld to segfault in the stage3 build. We move the GCC required + # static libs to a separate place and use it in the build. + if [[ ! -d "${at_dest}/tmp/gcc_3" ]]; then + mkdir -p ${at_dest}/tmp/gcc_3 + fi + if [[ "${build_arch}" == "ppc64" ]]; then + cp -t ${at_dest}/tmp/gcc_3 \ + ${at_dest}/lib64/*gmp* \ + ${at_dest}/lib64/*mpfr* \ + ${at_dest}/lib64/*mpc* + else + cp -t ${at_dest}/tmp/gcc_3 \ + ${at_dest}/lib/*gmp* \ + ${at_dest}/lib/*mpfr* \ + ${at_dest}/lib/*mpc* + fi + fi +} + +# Required post install hacks (this one is run after the final install move) +atcfg_posti_hacks() { + # Cleanup the temp files + rm -rf ${at_dest}/tmp +} + +# Conditional pre configure settings or commands to run +atcfg_pre_configure() { + if [[ "${cross_build}" == "no" ]]; then + cc_64=${system_cc} + cxx_64=${system_cxx} + libdir="${at_dest}/tmp/gcc_3" + if [[ "${cross_build}" == "no" ]]; then + if [[ "${build_arch}" == "ppc64" ]]; then + if [[ "${default_compiler}" == "32" ]]; then + cc_64="${gcc64}" + cxx_64="${gpp64}" + fi + fi + fi + fi +} + +# Conditional configure command for builds +atcfg_configure() { + if [[ "${cross_build}" == "no" ]]; then + CC="${cc_64}" \ + CXX="${cxx_64}" \ + CFLAGS="-O2 -mminimal-toc" \ + CXXFLAGS="-O2 -mminimal-toc" \ + AS="${at_dest}/bin/as" \ + LD="${at_dest}/bin/ld" \ + LDFLAGS="-L${libdir}" \ + ${ATSRC_PACKAGE_WORK}/configure \ + --build=${target64:-$target} \ + --host=${target64:-$target} \ + --target=${target64:-$target} \ + --prefix="${at_dest}" \ + ${with_longdouble:+--with-long-double-128} \ + ${with_dfp_standalone:+--enable-decimal-float} \ + ${secure_plt:+--enable-secureplt} \ + ${disable_multilib:+--disable-multilib} \ + --enable-threads=posix \ + --enable-languages=c,c++ \ + --enable-__cxa_atexit \ + --enable-shared \ + --enable-checking=release \ + --enable-gnu-indirect-function \ + --disable-libgomp \ + --with-gmp-include="${at_dest}/include" \ + --with-gmp-lib=${libdir} \ + --with-mpfr-include="${at_dest}/include" \ + --with-mpfr-lib=${libdir} \ + --with-mpc-include="${at_dest}/include" \ + --with-mpc-lib=${libdir} \ + --without-ppl \ + --without-cloog \ + --without-libelf \ + --with-host-libstdcxx="-L${libdir} -lstdc++ -lsupc++ -lm -lgmp -lgmpxx -lmpfr -lmpc" \ + --with-as="${at_dest}/bin/as" \ + --with-ld="${at_dest}/bin/ld" \ + --with-cpu=${build_base_arch} \ + --with-tune=${build_optimization} + else + echo "No configure on gcc_3 cross stage" + fi +} + +# Make build command +atcfg_make() { + if [[ "${cross_build}" == "no" ]]; then + # With -isystem we make sure that system's gcc (stage1) will recognize + # AT headers as system headers and give them special treatment. + ${SUB_MAKE} STAGE1_CFLAGS="-isystem ${at_dest}/include" STAGE1_CXXFLAGS="-isystem ${at_dest}/include" all + else + echo "No make all on gcc_3 cross stage" + fi +} + +# Conditional install build command +atcfg_install() { + if [[ "${cross_build}" == "no" ]]; then + make install -j1 DESTDIR=${install_place} + else + echo "No make install on gcc_3 cross stage" + fi +} + +# Conditional post install settings or commands to run +atcfg_post_install() { + if [[ "${cross_build}" == "no" ]]; then + # Remove unnecessary python scripts + find "${install_place}/${at_dest}/lib" "${install_place}/${at_dest}/lib64" -name "libstdc++.so.*-gdb.py" -print -delete + fi +} diff --git a/configs/7.0/packages/gcc/stage_4 b/configs/7.0/packages/gcc/stage_4 new file mode 120000 index 000000000..968fbc33b --- /dev/null +++ b/configs/7.0/packages/gcc/stage_4 @@ -0,0 +1 @@ +../../../6.0/packages/gcc/stage_4 \ No newline at end of file diff --git a/configs/7.0/packages/gcc/stage_optimized b/configs/7.0/packages/gcc/stage_optimized new file mode 100644 index 000000000..27881b4b9 --- /dev/null +++ b/configs/7.0/packages/gcc/stage_optimized @@ -0,0 +1,126 @@ +#!/usr/bin/env bash +# +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# GCC build parameters for stage optimized +# ======================================== +# + +ATCFG_HOLD_TEMP_INSTALL='no' +ATCFG_HOLD_TEMP_BUILD='no' +# Build in a new directory +ATCFG_BUILD_STAGE_T='dir' + + +atcfg_pre_configure() { + # Check the need of a cross-compiler build + if [[ "${at_build_cpu}" == "${AT_OPTIMIZE_CPU}" ]]; then + echo cross-compiling=no >> ./configparms + else + echo cross-compiling=yes >> ./configparms + fi +} + + +atcfg_configure() { + PATH=${at_dest}/bin:${PATH} \ + CC="${at_dest}/bin/gcc" \ + CFLAGS="-O2" \ + CXXFLAGS="-O2" \ + CFLAGS_FOR_TARGET="-O3" \ + CXXFLAGS_FOR_TARGET="-O3" \ + AS="${at_dest}/bin/as" \ + LD="${at_dest}/bin/ld" \ + LDFLAGS="-L${at_dest}/lib64" \ + ${ATSRC_PACKAGE_WORK}/configure \ + --build=${target64:-$target} \ + --host=${target64:-$target} \ + --target=${target64:-$target} \ + --prefix="${at_dest}" \ + ${with_longdouble:+--with-long-double-128} \ + ${with_dfp_standalone:+--enable-decimal-float} \ + ${secure_plt:+--enable-secureplt} \ + ${disable_multilib:+--disable-multilib} \ + --enable-threads=posix \ + --enable-languages=${build_gcc_languages} \ + --enable-__cxa_atexit \ + --enable-shared \ + --enable-checking=release \ + --enable-gnu-indirect-function \ + --enable-lto \ + --disable-bootstrap \ + --with-gmp-include="${at_dest}/include" \ + --with-gmp-lib="${at_dest}/lib64" \ + --with-mpfr-include="${at_dest}/include" \ + --with-mpfr-lib="${at_dest}/lib64" \ + --with-mpc-include="${at_dest}/include" \ + --with-mpc-lib="${at_dest}/lib64" \ + --without-ppl \ + --without-cloog \ + --without-libelf \ + --with-host-libstdcxx="-L${at_dest}/lib64 -lstdc++ -lsupc++ -lgmp -lgmpxx -lm" \ + --with-cpu=${AT_OPTIMIZE_CPU/ppc/} \ + --with-tune=${AT_OPTIMIZE_CPU/ppc/} +} + + +atcfg_make() { + PATH=${at_dest}/bin:${PATH} ${SUB_MAKE} all +} + + +atcfg_install() { + PATH=${at_dest}/bin:${PATH} make install -j1 DESTDIR=${install_place} +} + + +atcfg_post_install() { + # Remove unneeded install files + rm -rf ${install_place}/${at_dest}/lib/gcc + rm -rf $(find "${install_place}/${at_dest}" -type f -name "*.o" -print) + rm -rf $(find "${install_place}/${at_dest}" -type f -name "*.a" -print) + rm -rf $(find "${install_place}/${at_dest}" -type f -name "*.la" -print) + rm -rf $(find "${install_place}/${at_dest}" -type f -name "*.py" -print) + # Save all libraries into a tar file + pushd "${install_place}/${at_dest}/lib" + local flist=$(find . -name "*.so" -o -name "*.so.*") + [[ -n "${flist}" ]] && \ + tar czf "${install_place}/${AT_OPTIMIZE_CPU}.tar.gz" \ + ${flist} + popd + pushd "${install_place}/${at_dest}/lib64" + local flist=$(find . -name "*.so" -o -name "*.so.*") + [[ -n "${flist}" ]] && \ + tar czf "${install_place}/${AT_OPTIMIZE_CPU}_64.tar.gz" \ + ${flist} + popd + # Remove all installed built files + rm -rf "${install_place}/${at_dest}" + # Create processor lib/lib64 targets + mkdir -p "${install_place}/${at_dest}/lib/${AT_OPTIMIZE_CPU}" + mkdir -p "${install_place}/${at_dest}/lib64/${AT_OPTIMIZE_CPU}" + # Place saved libs on created final target + pushd "${install_place}/${at_dest}/lib/${AT_OPTIMIZE_CPU}" + [[ -e "${install_place}/${AT_OPTIMIZE_CPU}.tar.gz" ]] && \ + tar xzf "${install_place}/${AT_OPTIMIZE_CPU}.tar.gz" + popd + pushd "${install_place}/${at_dest}/lib64/${AT_OPTIMIZE_CPU}" + [[ -e "${install_place}/${AT_OPTIMIZE_CPU}_64.tar.gz" ]] && \ + tar xzf "${install_place}/${AT_OPTIMIZE_CPU}_64.tar.gz" + popd + rm -f "${install_place}/${AT_OPTIMIZE_CPU}.tar.gz" \ + "${install_place}/${AT_OPTIMIZE_CPU}_64.tar.gz" +} diff --git a/configs/7.0/packages/gdb/gdb.mk b/configs/7.0/packages/gdb/gdb.mk new file mode 120000 index 000000000..59359efaa --- /dev/null +++ b/configs/7.0/packages/gdb/gdb.mk @@ -0,0 +1 @@ +../../../6.0/packages/gdb/gdb.mk \ No newline at end of file diff --git a/configs/7.0/packages/gdb/sources b/configs/7.0/packages/gdb/sources new file mode 100644 index 000000000..b52a8fc7d --- /dev/null +++ b/configs/7.0/packages/gdb/sources @@ -0,0 +1,75 @@ +#!/usr/bin/env bash +# +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# GDB source package and build info +# ================================= +# +ATSRC_PACKAGE_NAME="GDB (GNU Debugger)" +ATSRC_PACKAGE_VER=7.6 +ATSRC_PACKAGE_REV=12f5c4cc +ATSRC_PACKAGE_LICENSE="GPL 2.0" +ATSRC_PACKAGE_DOCLINK="http://sourceware.org/gdb/current/onlinedocs/gdb/" +ATSRC_PACKAGE_RELFIXES= +ATSRC_PACKAGE_STR_VER="${ATSRC_PACKAGE_NAME} ${ATSRC_PACKAGE_VER}${ATSRC_PACKAGE_REV:+-${ATSRC_PACKAGE_REV}}" +ATSRC_PACKAGE_VERID="${ATSRC_PACKAGE_VER}${ATSRC_PACKAGE_REV:+-${ATSRC_PACKAGE_REV}}" +ATSRC_PACKAGE_PRE="test -d gdb-${ATSRC_PACKAGE_VERID}" +ATSRC_PACKAGE_CO=([0]="wget -O gdb-${ATSRC_PACKAGE_VERID}.tar.gz https://github.com/tuliom/at-gdb/archive/${ATSRC_PACKAGE_REV}.tar.gz") +ATSRC_PACKAGE_GIT="" +# Use --transform to give a better name to GDB directory. +ATSRC_PACKAGE_POST="tar xzf gdb-${ATSRC_PACKAGE_VERID}.tar.gz --transform=s/at-gdb-${ATSRC_PACKAGE_REV}[^\\/]*/gdb-${ATSRC_PACKAGE_VERID}/" +ATSRC_PACKAGE_SRC="${AT_BASE}/sources/gdb-${ATSRC_PACKAGE_VERID}" +ATSRC_PACKAGE_WORK=${AT_WORK_PATH}/gdb +ATSRC_PACKAGE_MLS= +ATSRC_PACKAGE_ALOC= +ATSRC_PACKAGE_TARS= +ATSRC_PACKAGE_PATCHES= +ATSRC_PACKAGE_MAKE_CHECK="" +ATSRC_PACKAGE_DISTRIB=yes +ATSRC_PACKAGE_BUILDCROSS=yes +ATSRC_PACKAGE_BUNDLE=devel + +atsrc_get_patches () +{ + at_get_patch \ + https://github.com/powertechpreview/powertechpreview/raw/master/GDB%20Patches/gdb-ignore-linux-vdso.tgz \ + 10bdbcac7947ac59b7f55cb7b8562ac5 || return ${?} + + at_get_patch_and_trim \ + 'https://sourceware.org/cgi-bin/get-raw-msg?listname=gdb-patches&date=2014-07&msgid=1405380516-13496-1-git-send-email-emachado%40linux.vnet.ibm.com' \ + gdb-hw_bp.patch 19 \ + 9c0a4aa35289a8e703219d78fd223ef6 || return ${?} + + at_get_patch_and_trim \ + 'https://sourceware.org/cgi-bin/get-raw-msg?listname=gdb-patches&date=2014-09&msgid=1410525085-29172-1-git-send-email-emachado%40linux.vnet.ibm.com' \ + gdb-pr17379.patch 104 \ + 0c7d73f06933449acb651e3fc4e43c38 || return ${?} + + at_get_patch_and_trim \ + 'https://sourceware.org/cgi-bin/get-raw-msg?listname=gdb-patches&date=2014-09&msgid=1409947102-32166-1-git-send-email-emachado%40linux.vnet.ibm.com' \ + gdb-ptrace.patch 62 \ + 9cca648d83424f9551ed142a2cfb8632 || return ${?} +} + +atsrc_apply_patches () +{ + tar xzf gdb-ignore-linux-vdso.tgz || return ${?} + + patch -p1 < ignore-linux-vdso.patch || return ${?} + patch -p1 < gdb-hw_bp.patch || return ${?} + patch -p1 < gdb-pr17379.patch || return ${?} + patch -p1 < gdb-ptrace.patch || return ${?} +} diff --git a/configs/7.0/packages/gdb/specfile b/configs/7.0/packages/gdb/specfile new file mode 120000 index 000000000..734992f87 --- /dev/null +++ b/configs/7.0/packages/gdb/specfile @@ -0,0 +1 @@ +../../../6.0/packages/gdb/specfile \ No newline at end of file diff --git a/configs/7.0/packages/gdb/stage_1 b/configs/7.0/packages/gdb/stage_1 new file mode 120000 index 000000000..ea8b0b63d --- /dev/null +++ b/configs/7.0/packages/gdb/stage_1 @@ -0,0 +1 @@ +../../../6.0/packages/gdb/stage_1 \ No newline at end of file diff --git a/configs/7.0/packages/glibc/glibc.mk b/configs/7.0/packages/glibc/glibc.mk new file mode 120000 index 000000000..ba8d96f96 --- /dev/null +++ b/configs/7.0/packages/glibc/glibc.mk @@ -0,0 +1 @@ +../../../../configs/6.0/packages/glibc/glibc.mk \ No newline at end of file diff --git a/configs/7.0/packages/glibc/sources b/configs/7.0/packages/glibc/sources new file mode 100644 index 000000000..d706c0a6a --- /dev/null +++ b/configs/7.0/packages/glibc/sources @@ -0,0 +1,45 @@ +#!/usr/bin/env bash +# +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# GLIBC source package and build info +# =================================== +# + +ATSRC_PACKAGE_NAME="GNU C Library" +ATSRC_PACKAGE_VER=2.18 +ATSRC_PACKAGE_REV=803014d +ATSRC_PACKAGE_LICENSE="LGPL 2.1" +ATSRC_PACKAGE_DOCLINK="http://www.gnu.org/software/libc/manual/html_node/index.html" +ATSRC_PACKAGE_RELFIXES= +ATSRC_PACKAGE_STR_VER="${ATSRC_PACKAGE_NAME} ${ATSRC_PACKAGE_VER}-ibm" +ATSRC_PACKAGE_PRE="test -d glibc-${ATSRC_PACKAGE_VER}-${ATSRC_PACKAGE_REV}" +# git://git.linux.ibm.com/toolchain-mirrors/glibc.git is a mirror of the git://sourceware.org/git/glibc.git +ATSRC_PACKAGE_CO=([0]="git clone git://git.linux.ibm.com/toolchain-mirrors/glibc.git" \ + [1]="git clone git://sourceware.org/git/glibc.git") +ATSRC_PACKAGE_GIT="git checkout -b glibc-${ATSRC_PACKAGE_VER}${ATSRC_PACKAGE_REV:+-${ATSRC_PACKAGE_REV}} ${ATSRC_PACKAGE_REV}" +ATSRC_PACKAGE_POST="mv glibc glibc-${ATSRC_PACKAGE_VER}${ATSRC_PACKAGE_REV:+-${ATSRC_PACKAGE_REV}}" +ATSRC_PACKAGE_SRC=${AT_BASE}/sources/glibc-${ATSRC_PACKAGE_VER}${ATSRC_PACKAGE_REV:+-${ATSRC_PACKAGE_REV}} +ATSRC_PACKAGE_WORK=${AT_WORK_PATH}/glibc +ATSRC_PACKAGE_MLS= +ATSRC_PACKAGE_PATCHES= +ATSRC_PACKAGE_ALOC= +ATSRC_PACKAGE_TARS= +ATSRC_PACKAGE_MAKE_CHECK= +ATSRC_PACKAGE_PORTS= +ATSRC_PACKAGE_DISTRIB=yes +ATSRC_PACKAGE_BUILDCROSS=yes +ATSRC_PACKAGE_BUNDLE=toolchain diff --git a/configs/7.0/packages/glibc/specfile b/configs/7.0/packages/glibc/specfile new file mode 120000 index 000000000..45673f509 --- /dev/null +++ b/configs/7.0/packages/glibc/specfile @@ -0,0 +1 @@ +../../../../configs/6.0/packages/glibc/specfile \ No newline at end of file diff --git a/configs/7.0/packages/glibc/stage_1 b/configs/7.0/packages/glibc/stage_1 new file mode 100644 index 000000000..e1a40edff --- /dev/null +++ b/configs/7.0/packages/glibc/stage_1 @@ -0,0 +1,189 @@ +#!/usr/bin/env bash +# +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# GLIBC build parameters for stage 1 32/64 bits +# ============================================= +# + +# We can't use the newly built gcc to compile glibc because it will set the +# dynamic linker to be ${dest}/lib/ld.so.1, which isn't installed until the +# glibc build finishes. So trying to run anything compiled with the new gcc +# will fail, in particular, glibc configure tests. I suppose you might be +# able to supply glibc configure with lots of libc_cv_* variables to +# avoid this, but then you'd forever be changing this script to keep up with +# new glibc configure tests. +# Note that dynamically linked programs built here with the old host gcc are +# subtly broken too; The glibc build sets their dynamic linker to +# ${dest}/lib/ld.so.1 but doesn't provide rpath. Which means you'll get the +# new ld.so trying to use the system libc.so, which doesn't work. ld.so and +# libc.so share data structures so are tightly coupled. To run the new +# programs, you need to set LD_LIBRARY_PATH for them, or better (so as to not +# affect forked commands that might need the system libs), run ld.so.1 +# explicitly, passing --library-path as is done for localedef below. +# This is one of the reasons why you need to build glibc twice. + +# Include some standard functions +source ${utilities}/bitsize_selection.sh + +ATCFG_HOLD_TEMP_INSTALL='no' +ATCFG_HOLD_TEMP_BUILD='no' +# Build in a new directory +ATCFG_BUILD_STAGE_T='dir' + +# Required post install hacks (this one is run after the final install move) +atcfg_posti_hacks() { + # Set location of base directory to replace depending on ${cross_build} + if [[ "${cross_build}" == "no" ]]; then + basedir="${at_dest}" + else + basedir="${dest_cross}/usr/" + fi + + local bindir=${basedir}/$(find_build_bindir ${AT_BIT_SIZE}) + local libdir=${basedir}/$(find_build_libdir ${AT_BIT_SIZE}) + + set -e + # Set the name of the loader to use based on bit size + local ld_so="ld${AT_BIT_SIZE%32}.so.1" + # Replace ${libdir}/libc.so with a version compatible with binutils + # built with the --with_sysroot option set to ${at_dest} + [[ -e ${libdir}/libc.so ]] && mv -f ${libdir}/libc.so ${libdir}/libc.so.orig + echo "/* GNU ld script" > ${libdir}/libc.so + echo " Use the shared library, but some functions are only in" >> ${libdir}/libc.so + echo " the static library, so try that secondarily." >> ${libdir}/libc.so + echo " You will notice that the paths do not contain ${at_dest}." >> ${libdir}/libc.so + echo " This is because the Advance Toolchain binutils uses" >> ${libdir}/libc.so + echo " --with-sysroot which causes the linker to append ${at_dest}" >> ${libdir}/libc.so + echo " onto the paths found in this ld script. */" >> ${libdir}/libc.so + echo "GROUP ( libc.so.6 libc_nonshared.a AS_NEEDED ( ${ld_so} ) )" >> ${libdir}/libc.so + [[ -e ${libdir}/libc.so.orig ]] && rm ${libdir}/libc.so.orig + set +e + + if [[ "${cross_build}" == "no" ]]; then + local ld_so=${libdir}/ld${AT_BIT_SIZE%32}.so.1 + + # Generate the required locales + # Remove the locale-archive, because localedef does not read + # empty files. This was a dummy file created during the + rm -f "${libdir}/locale/locale-archive" + # Temporarily save the current build directory + local build_stage_work="$(pwd)" + pushd ${build_stage_work}/localedata > /dev/null + ${SUB_MAKE} -C "${ATSRC_PACKAGE_WORK}/localedata" \ + objdir="${build_stage_work}" \ + install_root="/" \ + subdir=localedata \ + install-locales + popd > /dev/null + fi +} + +atcfg_pre_configure() { + local base_libdir=$(find_build_libdir ${AT_BIT_SIZE}) + local base_bindir=$(find_build_bindir ${AT_BIT_SIZE}) + local base_sbindir=$(find_build_sbindir ${AT_BIT_SIZE}) + local base_libexecdir=$(find_build_libexecdir ${AT_BIT_SIZE}) + if [[ "${cross_build}" == "no" ]]; then + echo cross-compiling=yes > ./configparms + echo slibdir="${at_dest}/${base_libdir}" >> ./configparms + echo libdir="${at_dest}/${base_libdir}" >> ./configparms + echo bindir="${at_dest}/${base_bindir}" >> ./configparms + echo sbindir="${at_dest}/${base_sbindir}" >> ./configparms + echo libexecdir="${at_dest}/${base_libexecdir}" >> ./configparms + echo rootsbindir="${at_dest}/${base_sbindir}" >> ./configparms + else + echo cross-compiling=yes > ./configparms + fi +} + +atcfg_configure() { + local base_target=$(find_build_target ${AT_BIT_SIZE}) + if [[ "${cross_build}" == "no" ]]; then + AUTOCONF="${autoconf}" \ + CC="${at_dest}/bin/gcc -m${AT_BIT_SIZE}" \ + CFLAGS="-g -O2 ${secure_plt:+-msecure-plt}" \ + libc_cv_forced_unwind="yes" \ + libc_cv_c_cleanup="yes" \ + ${ATSRC_PACKAGE_WORK}/configure \ + --build=${host} \ + --host=${base_target} \ + --prefix="${at_dest}" \ + --with-headers="${at_dest}/include" \ + --with-tls \ + --enable-add-ons=nptl \ + --without-cvs \ + --without-gd \ + --with-cpu=${build_load_arch/ppc/} \ + --without-selinux \ + --enable-kernel="${kernel}" + else + AUTOCONF="${autoconf}" \ + CC="${at_dest}/bin/${target64:-${target}}-gcc -m${AT_BIT_SIZE}" \ + CFLAGS="-g -O2" \ + AR="${at_dest}/bin/${target}-ar" \ + AS="${at_dest}/bin/${target}-as" \ + RANLIB="${at_dest}/bin/${target}-ranlib" \ + libc_cv_forced_unwind="yes" \ + libc_cv_c_cleanup="yes" \ + ${ATSRC_PACKAGE_WORK}/configure \ + --build=${host} \ + --host=${base_target} \ + --prefix="/usr" \ + --with-headers="${dest_cross}/usr/include" \ + --with-tls \ + --enable-add-ons=nptl \ + --disable-profile \ + --without-gd \ + --with-cpu=${build_load_arch} \ + --without-cvs \ + --with-tls \ + --with-__thread \ + --without-gd \ + --without-selinux \ + --enable-kernel="${kernel}" + fi +} + +atcfg_make() { + ${SUB_MAKE} +} + +atcfg_install() { + if [[ "${cross_build}" == "no" ]]; then + ${SUB_MAKE} install install_root="${install_place}" + else + ${SUB_MAKE} install install_root="${install_place}/${dest_cross}" + fi +} + +atcfg_post_install() { + local base_libdir=$(find_build_libdir ${AT_BIT_SIZE}) + if [[ "${cross_build}" == "no" ]]; then + rm -rf "${install_transfer}/var/db/Makefile" + # Prepare the locale archive for inclusion in RPM. + # We can't generate it yet because the files aren't available + # on ${at_dest} yet, so we need a dummy file to guarantee it'll + # be included in the package later. + mkdir -p "${install_transfer}/${base_libdir}/locale" + touch "${install_transfer}/${base_libdir}/locale/locale-archive" + + # Re-use time zone information available in the system. + ln -s /usr/share/zoneinfo/ ${install_transfer}/share/zoneinfo + else + rm -rf "${install_place}/${dest_cross}/var/db/Makefile" + fi +} diff --git a/configs/7.0/packages/glibc/stage_2 b/configs/7.0/packages/glibc/stage_2 new file mode 100644 index 000000000..5bc347310 --- /dev/null +++ b/configs/7.0/packages/glibc/stage_2 @@ -0,0 +1,150 @@ +#!/usr/bin/env bash +# +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# GLIBC build parameters for stage 2 32/64 bits +# ============================================= +# + +# The build of glibc was almost full featured. In this build the new GCC is +# used to compile a highly optimized glibc with all the required features. + +# Include some standard functions +source ${utilities}/bitsize_selection.sh + +ATCFG_HOLD_TEMP_INSTALL='no' +ATCFG_HOLD_TEMP_BUILD='no' +# Build in a new directory +ATCFG_BUILD_STAGE_T='dir' + + +# Required pre build hacks +atcfg_pre_hacks() { + # Hack the glibc source so that the -rpath option we add on all shared libs + # and executable wont bomb ld.so, which checks that -rpath is not given. + s1="s@assert (\(info\[DT_R.*PATH\]\) == NULL)@\1 = NULL@" + for F in "${ATSRC_PACKAGE_WORK}/elf/dynamic-link.h"; do + sed -e "${s1}" < "${F}" > tmp.$$ && \ + { cmp -s tmp.$$ "${F}" || mv -f tmp.$$ "${F}"; } || exit 1 + rm -f tmp.$$ + done +} + +# Required post install hacks (this one is run after the final install move) +atcfg_posti_hacks() { + local base_libdir=$(find_build_libdir ${AT_BIT_SIZE}) + # Set the base library path + libdir=${at_dest}/${base_libdir} + # Find the proper glibc final libc filename + libname=$(basename $(ls ${libdir}/libc{-[0-9]*,}.so)) + # Set the name of the loader to use based on bit size + local ld_so=$(basename $(ls ${libdir}/ld${AT_BIT_SIZE%32}.so.[0-9])) + # Replace ${at_dest}/lib/libc.so with a version compatible with binutils + # built with the --with_sysroot option set to ${at_dest} + [[ -e ${libdir}/libc.so ]] && \ + mv -f ${libdir}/libc.so ${libdir}/libc.so.orig + echo "/* GNU ld script" > ${libdir}/libc.so + echo " Use the shared library, but some functions are only in" >> ${libdir}/libc.so + echo " the static library, so try that secondarily." >> ${libdir}/libc.so + echo " You will notice that the paths do not contain ${at_dest}." >> ${libdir}/libc.so + echo " This is because the Advance Toolchain binutils uses" >> ${libdir}/libc.so + echo " --with-sysroot which causes the linker to append ${at_dest}" >> ${libdir}/libc.so + echo " onto the paths found in this ld script. */" >> ${libdir}/libc.so + echo "GROUP ( libc.so.6 libc_nonshared.a AS_NEEDED ( ${ld_so} ) )" >> ${libdir}/libc.so + [[ -e ${libdir}/libc.so.orig ]] && \ + rm ${libdir}/libc.so.orig +} + +# Pre configure settings or commands to run +atcfg_pre_configure() { + local base_libdir=$(find_build_libdir ${AT_BIT_SIZE}) + local base_bindir=$(find_build_bindir ${AT_BIT_SIZE}) + local base_sbindir=$(find_build_sbindir ${AT_BIT_SIZE}) + local base_libexecdir=$(find_build_libexecdir ${AT_BIT_SIZE}) + echo slibdir="${at_dest}/${base_libdir}" > ./configparms + echo libdir="${at_dest}/${base_libdir}" >> ./configparms + echo bindir="${at_dest}/${base_bindir}" >> ./configparms + echo sbindir="${at_dest}/${base_sbindir}" >> ./configparms + echo libexecdir="${at_dest}/${base_libexecdir}" >> ./configparms + echo rootsbindir="${at_dest}/${base_sbindir}" >> ./configparms + echo cross-compiling=no >> ./configparms +} + +# Configure command for builds +atcfg_configure() { + local base_target=$(find_build_target ${AT_BIT_SIZE}) + PATH=${at_dest}/bin:${PATH} \ + AUTOCONF="${autoconf}" \ + CC="${at_dest}/bin/gcc -m${AT_BIT_SIZE}" \ + CXX="${at_dest}/bin/g++ -m${AT_BIT_SIZE}" \ + CFLAGS="-g -O3 ${with_longdouble:+-mlong-double-128}" \ + CXXFLAGS="-g -O3" \ + ${ATSRC_PACKAGE_WORK}/configure \ + --build=${host} \ + --host=${base_target} \ + --prefix="${at_dest}" \ + --with-headers="${at_dest}/include" \ + --enable-add-ons=nptl \ + --with-tls \ + --with-__thread \ + --enable-shared \ + --enable-multi-arch \ + --enable-experimental-malloc \ + --without-cvs \ + --with-cpu=${build_load_arch/ppc/} \ + --without-gd \ + --without-selinux \ + --enable-kernel="${kernel}" \ + --enable-obsolete-rpc +} + +# Make build command +atcfg_make() { + PATH=${at_dest}/bin:${PATH} ${SUB_MAKE} +} + +# Conditional install build command +atcfg_install() { + if [[ "${cross_build}" == "no" ]]; then + PATH=${at_dest}/bin:${PATH} ${SUB_MAKE} install install_root="${install_place}" + else + PATH=${at_dest}/bin:${PATH} ${SUB_MAKE} install install_root="${install_place}/${dest_cross}" + fi +} + +# Conditinal post install settings or commands to run +atcfg_post_install() { + local base_libdir=$(find_build_libdir ${AT_BIT_SIZE}) + if [[ "${cross_build}" == "no" ]]; then + # Remove unused Makefile from install + rm -rf "${install_transfer}/var/db/Makefile" + # Removing the created ld.so.cache to avoid further problems + rm -rf "${install_transfer}/etc/ld.so.cache" + set -e + # Hack around to avoid ld.so.cache getting the libs from the + # system as ldconfig puts platform based directories preceding + # other directories. + ${AT_BASE}/scripts/utilities/create_lib_symlinks.sh \ + "${install_transfer}/${base_libdir}/" \ + "${install_transfer}/${base_libdir}/${build_load_arch}" + set +e + else + # Remove unused Makefile from install + rm -rf "${install_place}/${dest_cross}/var/db/Makefile" + # Removing the created ld.so.cache to avoid further problems + rm -rf "${install_place}/${dest_cross}/etc/ld.so.cache" + fi +} diff --git a/configs/7.0/packages/glibc/stage_compat b/configs/7.0/packages/glibc/stage_compat new file mode 100644 index 000000000..71cf1f0f5 --- /dev/null +++ b/configs/7.0/packages/glibc/stage_compat @@ -0,0 +1,131 @@ +#!/usr/bin/env bash +# +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# GLIBC build parameters for compat 32/64 bits +# ============================================ +# + +# Include some standard functions +source ${utilities}/bitsize_selection.sh + +ATCFG_HOLD_TEMP_INSTALL='no' +ATCFG_HOLD_TEMP_BUILD='no' +# Build in a new directory +ATCFG_BUILD_STAGE_T='dir' + + +atcfg_posti_hacks() { + local base_libdir=$(find_build_libdir ${AT_BIT_SIZE}) + # Set the base library path + libdir=${at_dest}/${base_libdir} + # Find the proper glibc final libc filename + libname=$(basename $(ls ${libdir}/libc{-[0-9]*,}.so)) + # Set the name of the loader to use based on bit size + local ld_so=$(basename $(ls ${libdir}/ld${AT_BIT_SIZE%32}.so.[0-9])) + # Replace ${libdir}/libc.so with a version compatible with binutils + # built with the --with_sysroot option set to ${at_dest} + [[ -e ${libdir}/libc.so ]] && \ + mv -f ${libdir}/libc.so ${libdir}/libc.so.orig + echo "/* GNU ld script" > ${libdir}/libc.so + echo " Use the shared library, but some functions are only in" >> ${libdir}/libc.so + echo " the static library, so try that secondarily." >> ${libdir}/libc.so + echo " You will notice that the paths do not contain ${at_dest}." >> ${libdir}/libc.so + echo " This is because the Advance Toolchain binutils uses" >> ${libdir}/libc.so + echo " --with-sysroot which causes the linker to append ${at_dest}" >> ${libdir}/libc.so + echo " onto the paths found in this ld script. */" >> ${libdir}/libc.so + echo "GROUP ( libc.so.6 libc_nonshared.a AS_NEEDED ( ${ld_so} ) )" >> ${libdir}/libc.so + [[ -e ${libdir}/libc.so.orig ]] && \ + rm ${libdir}/libc.so.orig +} + + +atcfg_pre_configure() { + local base_libdir=$(find_build_libdir ${AT_BIT_SIZE}) + local base_bindir=$(find_build_bindir ${AT_BIT_SIZE}) + local base_sbindir=$(find_build_sbindir ${AT_BIT_SIZE}) + local base_libexecdir=$(find_build_libexecdir ${AT_BIT_SIZE}) + echo slibdir="${at_dest}/${base_libdir}" > ./configparms + echo libdir="${at_dest}/${base_libdir}" >> ./configparms + echo bindir="${at_dest}/${base_bindir}" >> ./configparms + echo sbindir="${at_dest}/${base_sbindir}" >> ./configparms + echo libexecdir="${at_dest}/${base_libexecdir}" >> ./configparms + echo rootsbindir="${at_dest}/${base_sbindir}" >> ./configparms + echo cross-compiling=no >> ./configparms +} + + +atcfg_configure() { + local base_target=$(find_build_target ${AT_BIT_SIZE}) + PATH=${at_dest}/bin:${PATH} \ + AUTOCONF="${autoconf}" \ + CC="${at_dest}/bin/gcc -m${AT_BIT_SIZE}" \ + CXX="${at_dest}/bin/g++ -m${AT_BIT_SIZE}" \ + CFLAGS="-g -O3 ${with_longdouble:+-mlong-double-128}" \ + CXXFLAGS="-g -O3" \ + ${ATSRC_PACKAGE_WORK}/configure --build=${target} \ + --host=${base_target} \ + --prefix="${at_dest}" \ + --with-headers="${at_dest}/include" \ + --enable-add-ons=nptl \ + --with-tls \ + --with-__thread \ + --enable-shared \ + --enable-multi-arch \ + --without-cvs \ + --without-gd \ + --without-selinux \ + --with-cpu=${build_load_arch} \ + --enable-kernel="${compat_kernel}" +} + + +atcfg_make() { + PATH=${at_dest}/bin:${PATH} ${SUB_MAKE} +} + + +atcfg_install() { + PATH=${at_dest}/bin:${PATH} \ + ${SUB_MAKE} install install_root="${install_place}" +} + + +atcfg_post_install() { + set -e + # Reuse time zone information available in the system. + ln -s /etc/localtime ${install_transfer}/etc/localtime + ln -s /usr/share/zoneinfo/ ${install_transfer}/share/zoneinfo + # Compat only needs runtime functionality. + rm -rf "${install_transfer}/include" \ + "${install_transfer}/share/info" \ + "${install_transfer}/var" + # Remove development files. + find "${install_transfer}/" \ + -name '*.a' \ + -o -name '*.o' \ + -o -name '*.la' \ + | xargs rm -vf + # Removing the created ld.so.cache to avoid further problems. + rm -rf "${install_transfer}/etc/ld.so.cache" + # Move final required files to compat folder. + mkdir -p "${install_transfer}/compat" + find "${install_transfer}" -maxdepth 1 \ + ! -path "${install_transfer}/compat" \ + ! -path "${install_transfer}" \ + -execdir mv -v -t "${install_transfer}/compat" {} + + set +e +} diff --git a/configs/7.0/packages/glibc/stage_h b/configs/7.0/packages/glibc/stage_h new file mode 100644 index 000000000..eb36fee5a --- /dev/null +++ b/configs/7.0/packages/glibc/stage_h @@ -0,0 +1,137 @@ +#!/usr/bin/env bash +# +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# GLIBC build parameters for the headers stage 32/64 bits +# ============================================= +# + +# Preparation for the second gcc build. The first stage gcc isn't able to +# build the next components properly. We need to setup glibc headers and some +# glibc objects in order to build a self-contained compiler. + +# Include some standard functions +source ${utilities}/bitsize_selection.sh + +ATCFG_HOLD_TEMP_INSTALL='no' +ATCFG_HOLD_TEMP_BUILD='no' +# Build in a new directory +ATCFG_BUILD_STAGE_T='dir' + +# Pre configure settings or commands to run +atcfg_pre_configure() { + echo "cross-compiling=yes" > ./configparms +} + +# Conditional configure command +atcfg_configure() { + local base_target=$(find_build_target ${AT_BIT_SIZE}) + if [[ "${cross_build}" == "no" ]]; then + # Configure command for native builds + AUTOCONF=${autoconf} \ + CC="${at_dest}/bin/gcc -m${AT_BIT_SIZE}" \ + CFLAGS="-g -O2" \ + libc_cv_forced_unwind="yes" \ + libc_cv_c_cleanup="yes" \ + ${ATSRC_PACKAGE_WORK}/configure \ + --build=${host} \ + --host=${base_target} \ + --prefix=${at_dest} \ + --with-headers="${at_dest}/include" \ + --with-tls \ + --without-fp \ + --disable-profile \ + --disable-sanity-checks \ + --enable-add-ons=nptl \ + --without-gd \ + --without-selinux \ + --without-cvs + else + # Configure command for cross builds + AUTOCONF=${autoconf} \ + CC="${at_dest}/bin/${target64:-${target}}-gcc -m${AT_BIT_SIZE}" \ + CFLAGS="-g -O2" \ + AR="${at_dest}/bin/${target}-ar" \ + AS="${at_dest}/bin/${target}-as" \ + RANLIB="${at_dest}/bin/${target}-ranlib" \ + libc_cv_forced_unwind="yes" \ + libc_cv_c_cleanup="yes" \ + ${ATSRC_PACKAGE_WORK}/configure \ + --build=${host} \ + --host=${base_target} \ + --prefix="/usr" \ + --with-headers="${dest_cross}/usr/include" \ + --with-tls \ + --disable-profile \ + --disable-sanity-checks \ + --enable-add-ons=nptl \ + --without-gd \ + --without-selinux \ + --without-cvs + fi +} + +# Conditional make command +atcfg_make() { + if [[ "${cross_build}" == "no" ]]; then + echo "No need to perform a make at this stage" + else + # We need to build the following in order to link shared libraries: + make csu/subdir_lib + fi +} + +# Conditional install command +atcfg_install() { + if [[ "${cross_build}" == "no" ]]; then + ${SUB_MAKE} install-headers install_root="${install_place}" install-bootstrap-headers="yes" + else + ${SUB_MAKE} install-headers install_root="${install_place}/${dest_cross}" install-bootstrap-headers="yes" + fi +} + +# Conditional post install settings or commands to run +atcfg_post_install() { + local base_libdir=$(find_build_libdir ${AT_BIT_SIZE}) + if [[ "${cross_build}" == "no" ]]; then + # The following is required because these two files arent copied + # by make install-headers: + [[ ! -d "${install_place}/${at_dest}/include/bits" ]] && \ + mkdir -p ${install_place}/${at_dest}/include/bits + cp bits/stdio_lim.h ${install_place}/${at_dest}/include/bits/ + [[ ! -d "${install_place}/${at_dest}/include/gnu" ]] && \ + mkdir -p ${install_place}/${at_dest}/include/gnu + cp ${ATSRC_PACKAGE_WORK}/include/gnu/stubs.h ${install_place}/${at_dest}/include/gnu/ + else + # The following is required because these two files arent copied + # by make install-headers: + [[ ! -d "${install_place}/${dest_cross}/usr/include/bits" ]] && \ + mkdir -p ${install_place}/${dest_cross}/usr/include/bits + cp bits/stdio_lim.h ${install_place}/${dest_cross}/usr/include/bits/ + [[ ! -d "${install_place}/${dest_cross}/usr/include/gnu" ]] && \ + mkdir -p ${install_place}/${dest_cross}/usr/include/gnu + cp ${ATSRC_PACKAGE_WORK}/include/gnu/stubs.h ${install_place}/${dest_cross}/usr/include/gnu/ + [[ ! -d "${install_place}/${dest_cross}/usr/${base_libdir}" ]] && \ + mkdir -p ${install_place}/${dest_cross}/usr/${base_libdir} + cp csu/crt1.o csu/crti.o csu/crtn.o ${install_place}/${dest_cross}/usr/${base_libdir}/ + # "libgcc_s.so" requires a "libc.so" to link against. However, + # since we will never actually execute its code, it doesnt matter what + # it contains. So, treating "/dev/null" as a C source file, we produce + # a dummy "libc.so": + ${at_dest}/bin/${target64:-${target}}-gcc -nostdlib -m${AT_BIT_SIZE} -nostartfiles \ + -shared -x c /dev/null -o ${install_place}/${dest_cross}/usr/${base_libdir}/libc.so + fi +} diff --git a/configs/7.0/packages/glibc/stage_optimized b/configs/7.0/packages/glibc/stage_optimized new file mode 100644 index 000000000..598d0c1c9 --- /dev/null +++ b/configs/7.0/packages/glibc/stage_optimized @@ -0,0 +1,144 @@ +#!/usr/bin/env bash +# +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# GLIBC build parameters for CPU optimized 32/64 bits +# =================================================== +# + +# Include some standard functions +source ${utilities}/bitsize_selection.sh + +ATCFG_HOLD_TEMP_INSTALL='no' +ATCFG_HOLD_TEMP_BUILD='no' +# Build in a new directory +ATCFG_BUILD_STAGE_T='dir' + +# GLIBC BUILD HACKS +# ========================================================= +# Required post install hacks (this one is run after the final install move) +atcfg_posti_hacks() { + local base_libdir=$(find_build_libdir ${AT_BIT_SIZE}) + # Set the base library path + libdir=${at_dest}/${base_libdir} + # Find the proper glibc final libc filename + libname=$(basename $(ls ${libdir}/${AT_OPTIMIZE_CPU}/libc{-[0-9]*,}.so)) + local ld_so=$(basename $(ls ${libdir}/ld${AT_BIT_SIZE%32}.so.[0-9])) + # Replace ${libdir}/${AT_OPTIMIZE_CPU}/libc.so with a version compatible with binutils + # built with the --with_sysroot option set to ${at_dest} + [[ -e ${libdir}/${AT_OPTIMIZE_CPU}/libc.so ]] && \ + mv -f ${libdir}/${AT_OPTIMIZE_CPU}/libc.so ${libdir}/${AT_OPTIMIZE_CPU}/libc.so.orig + echo "/* GNU ld script" > ${libdir}/${AT_OPTIMIZE_CPU}/libc.so + echo " Use the shared library, but some functions are only in" >> ${libdir}/${AT_OPTIMIZE_CPU}/libc.so + echo " the static library, so try that secondarily." >> ${libdir}/${AT_OPTIMIZE_CPU}/libc.so + echo " You will notice that the paths do not contain ${at_dest}." >> ${libdir}/${AT_OPTIMIZE_CPU}/libc.so + echo " This is because the Advance Toolchain binutils uses" >> ${libdir}/${AT_OPTIMIZE_CPU}/libc.so + echo " --with-sysroot which causes the linker to append ${at_dest}" >> ${libdir}/${AT_OPTIMIZE_CPU}/libc.so + echo " onto the paths found in this ld script. */" >> ${libdir}/${AT_OPTIMIZE_CPU}/libc.so + echo "GROUP ( libc.so.6 libc_nonshared.a AS_NEEDED ( ${ld_so} ) )" >> ${libdir}/${AT_OPTIMIZE_CPU}/libc.so + [[ -e ${libdir}/${AT_OPTIMIZE_CPU}/libc.so.orig ]] && \ + rm ${libdir}/${AT_OPTIMIZE_CPU}/libc.so.orig +} + + +# ATCFG_CONFIGURE SETTINGS +# ========================================================= +# Pre configure settings or commands to run +atcfg_pre_configure() { + local base_libdir=$(find_build_libdir ${AT_BIT_SIZE}) + local base_bindir=$(find_build_bindir ${AT_BIT_SIZE}) + local base_sbindir=$(find_build_sbindir ${AT_BIT_SIZE}) + local base_libexecdir=$(find_build_libexecdir ${AT_BIT_SIZE}) + echo slibdir="${at_dest}/${base_libdir}" > ./configparms + echo libdir="${at_dest}/${base_libdir}" >> ./configparms + echo bindir="${at_dest}/${base_bindir}" >> ./configparms + echo sbindir="${at_dest}/${base_sbindir}" >> ./configparms + echo libexecdir="${at_dest}/${base_libexecdir}" >> ./configparms + echo rootsbindir="${at_dest}/${base_sbindir}" >> ./configparms + if [[ "${at_build_cpu}" == "${AT_OPTIMIZE_CPU}" ]]; then + echo cross-compiling=no >> ./configparms + else + echo cross-compiling=yes >> ./configparms + fi +} +# Configure command for native builds +atcfg_configure() { + local base_target=$(find_build_target ${AT_BIT_SIZE}) + PATH=${at_dest}/bin:${PATH} \ + AUTOCONF="${autoconf}" \ + CC="${at_dest}/bin/gcc -m${AT_BIT_SIZE}" \ + CXX="${at_dest}/bin/g++ -m${AT_BIT_SIZE}" \ + CFLAGS="-g -O3 ${with_longdouble:+-mlong-double-128}" \ + CXXFLAGS="-g -O3" \ + ${ATSRC_PACKAGE_WORK}/configure --build=${target} \ + --host=${base_target} \ + --prefix="${at_dest}" \ + --with-headers="${at_dest}/include" \ + --enable-add-ons=nptl \ + --with-tls \ + --with-__thread \ + --enable-shared \ + --enable-multi-arch \ + --enable-experimental-malloc \ + --without-cvs \ + --enable-obsolete-rpc \ + --without-gd \ + --without-selinux \ + --with-cpu=${AT_OPTIMIZE_CPU/ppc/} \ + --enable-kernel="${kernel}" \ + --enable-obsolete-rpc +} + + +# ATCFG_MAKE SETTINGS +# ========================================================= +# Make build command +atcfg_make() { + PATH=${at_dest}/bin:${PATH} ${SUB_MAKE} +} + + +# ATCFG_INSTALL SETTINGS +# ========================================================= +# Install build command +atcfg_install() { + PATH=${at_dest}/bin:${PATH} ${SUB_MAKE} install install_root="${install_place}" +} +# Post install settings or commands to run +atcfg_post_install() { + local base_libdir=$(find_build_libdir ${AT_BIT_SIZE}) + # Remove unneeded install files + find "${install_place}/${at_dest}" -type d -name "gconv" -print -execdir rm -rf {} + + find "${install_place}/${at_dest}" -type d -name "audit" -print -execdir rm -rf {} + + find "${install_place}/${at_dest}" -name "ld*.so.*" -print -delete + find "${install_place}/${at_dest}" -name "ld*.so" -print -delete + find "${install_place}/${at_dest}" -name "libdl*.so*" -print -delete + find "${install_place}/${at_dest}" -name "libdl.a" -print -delete + find "${install_place}/${at_dest}" -name "libmemusage.so.*" -print -delete + # Save all libraries into a tar file + pushd "${install_place}/${at_dest}/${base_libdir}" + tar czf "${install_place}/${AT_OPTIMIZE_CPU}.tar.gz" \ + $(find . -name "*.so" -o -name "*.so.*" -o -name "*.a") + popd + # Remove all installed built files + rm -rf "${install_place}/${at_dest}" + # Create processor lib target + mkdir -p "${install_place}/${at_dest}/${base_libdir}/${AT_OPTIMIZE_CPU}" + # Place saved libs on created final target + pushd "${install_place}/${at_dest}/${base_libdir}/${AT_OPTIMIZE_CPU}" + tar xzf "${install_place}/${AT_OPTIMIZE_CPU}.tar.gz" + popd +} diff --git a/configs/7.0/packages/gmp/gmp.mk b/configs/7.0/packages/gmp/gmp.mk new file mode 120000 index 000000000..0f2a4ea23 --- /dev/null +++ b/configs/7.0/packages/gmp/gmp.mk @@ -0,0 +1 @@ +../../../6.0/packages/gmp/gmp.mk \ No newline at end of file diff --git a/configs/7.0/packages/gmp/sources b/configs/7.0/packages/gmp/sources new file mode 120000 index 000000000..94581d07a --- /dev/null +++ b/configs/7.0/packages/gmp/sources @@ -0,0 +1 @@ +../../../6.0/packages/gmp/sources \ No newline at end of file diff --git a/configs/7.0/packages/gmp/specfile b/configs/7.0/packages/gmp/specfile new file mode 120000 index 000000000..cea92b6dc --- /dev/null +++ b/configs/7.0/packages/gmp/specfile @@ -0,0 +1 @@ +../../../6.0/packages/gmp/specfile \ No newline at end of file diff --git a/configs/7.0/packages/gmp/stage_1 b/configs/7.0/packages/gmp/stage_1 new file mode 120000 index 000000000..86bbf6902 --- /dev/null +++ b/configs/7.0/packages/gmp/stage_1 @@ -0,0 +1 @@ +../../../6.0/packages/gmp/stage_1 \ No newline at end of file diff --git a/configs/7.0/packages/gmp/stage_2 b/configs/7.0/packages/gmp/stage_2 new file mode 120000 index 000000000..4d1183b52 --- /dev/null +++ b/configs/7.0/packages/gmp/stage_2 @@ -0,0 +1 @@ +../../../6.0/packages/gmp/stage_2 \ No newline at end of file diff --git a/configs/7.0/packages/groups b/configs/7.0/packages/groups new file mode 120000 index 000000000..a5c89d7d4 --- /dev/null +++ b/configs/7.0/packages/groups @@ -0,0 +1 @@ +../../6.0/packages/groups \ No newline at end of file diff --git a/configs/7.0/packages/kernel/kernel.mk b/configs/7.0/packages/kernel/kernel.mk new file mode 120000 index 000000000..47d120bc8 --- /dev/null +++ b/configs/7.0/packages/kernel/kernel.mk @@ -0,0 +1 @@ +../../../6.0/packages/kernel/kernel.mk \ No newline at end of file diff --git a/configs/7.0/packages/kernel/sources b/configs/7.0/packages/kernel/sources new file mode 120000 index 000000000..d716611a4 --- /dev/null +++ b/configs/7.0/packages/kernel/sources @@ -0,0 +1 @@ +../../../6.0/packages/kernel/sources \ No newline at end of file diff --git a/configs/7.0/packages/kernel/specfile b/configs/7.0/packages/kernel/specfile new file mode 120000 index 000000000..3469adcf3 --- /dev/null +++ b/configs/7.0/packages/kernel/specfile @@ -0,0 +1 @@ +../../../6.0/packages/kernel/specfile \ No newline at end of file diff --git a/configs/7.0/packages/kernel/stage_h b/configs/7.0/packages/kernel/stage_h new file mode 120000 index 000000000..0ae1afc58 --- /dev/null +++ b/configs/7.0/packages/kernel/stage_h @@ -0,0 +1 @@ +../../../6.0/packages/kernel/stage_h \ No newline at end of file diff --git a/configs/7.0/packages/libauxv/libauxv.mk b/configs/7.0/packages/libauxv/libauxv.mk new file mode 120000 index 000000000..99a43adb0 --- /dev/null +++ b/configs/7.0/packages/libauxv/libauxv.mk @@ -0,0 +1 @@ +../../../6.0/packages/libauxv/libauxv.mk \ No newline at end of file diff --git a/configs/7.0/packages/libauxv/sources b/configs/7.0/packages/libauxv/sources new file mode 100644 index 000000000..7bab6f520 --- /dev/null +++ b/configs/7.0/packages/libauxv/sources @@ -0,0 +1,44 @@ +#!/usr/bin/env bash +# +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# Libauxv source package and build info +# ================================== +# + +ATSRC_PACKAGE_NAME="Libauxv" +ATSRC_PACKAGE_VER=0.1.0 +ATSRC_PACKAGE_REV=1502aec0 +ATSRC_PACKAGE_LICENSE="BSD License" +ATSRC_PACKAGE_DOCLINK="https://www.ibm.com/developerworks/wikis/display/LinuxP/Optimized+Libraries" +ATSRC_PACKAGE_RELFIXES= +ATSRC_PACKAGE_STR_VER="${ATSRC_PACKAGE_NAME} ${ATSRC_PACKAGE_VER}-${ATSRC_PACKAGE_REV}" +ATSRC_PACKAGE_VERID="${ATSRC_PACKAGE_VER}${ATSRC_PACKAGE_REV:+-${ATSRC_PACKAGE_REV}}" +ATSRC_PACKAGE_PRE="test -d libauxv-${ATSRC_PACKAGE_VERID}" +ATSRC_PACKAGE_CO=([0]="wget -O libauxv-${ATSRC_PACKAGE_VERID}.tar.gz https://github.com/Libauxv/libauxv/archive/${ATSRC_PACKAGE_REV}.tar.gz") +ATSRC_PACKAGE_GIT="" +# Use --transform to give a better name to Libauxv directory. +ATSRC_PACKAGE_POST="tar xzf libauxv-${ATSRC_PACKAGE_VERID}.tar.gz --transform=s/libauxv-${ATSRC_PACKAGE_REV}[^\\/]*/libauxv-${ATSRC_PACKAGE_VERID}/" +ATSRC_PACKAGE_SRC="${AT_BASE}/sources/libauxv-${ATSRC_PACKAGE_VERID}" +ATSRC_PACKAGE_WORK=${AT_WORK_PATH}/libauxv +ATSRC_PACKAGE_MLS="" +ATSRC_PACKAGE_ALOC="" +ATSRC_PACKAGE_PATCHES="" +ATSRC_PACKAGE_TARS="" +ATSRC_PACKAGE_MAKE_CHECK="" +ATSRC_PACKAGE_DISTRIB=no +ATSRC_PACKAGE_BUILDCROSS=no +ATSRC_PACKAGE_BUNDLE=toolchain diff --git a/configs/7.0/packages/libauxv/specfile b/configs/7.0/packages/libauxv/specfile new file mode 120000 index 000000000..a97962278 --- /dev/null +++ b/configs/7.0/packages/libauxv/specfile @@ -0,0 +1 @@ +../../../6.0/packages/libauxv/specfile \ No newline at end of file diff --git a/configs/7.0/packages/libauxv/stage_1 b/configs/7.0/packages/libauxv/stage_1 new file mode 120000 index 000000000..c9b26d37e --- /dev/null +++ b/configs/7.0/packages/libauxv/stage_1 @@ -0,0 +1 @@ +../../../6.0/packages/libauxv/stage_1 \ No newline at end of file diff --git a/configs/7.0/packages/libdfp/libdfp.mk b/configs/7.0/packages/libdfp/libdfp.mk new file mode 120000 index 000000000..4e1742ca2 --- /dev/null +++ b/configs/7.0/packages/libdfp/libdfp.mk @@ -0,0 +1 @@ +../../../6.0/packages/libdfp/libdfp.mk \ No newline at end of file diff --git a/configs/7.0/packages/libdfp/sources b/configs/7.0/packages/libdfp/sources new file mode 100644 index 000000000..a2ca96121 --- /dev/null +++ b/configs/7.0/packages/libdfp/sources @@ -0,0 +1,44 @@ +#!/usr/bin/env bash +# +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# LIBDFP source package and build info +# ==================================== +# + +ATSRC_PACKAGE_NAME="Decimal Floating Point C Library" +ATSRC_PACKAGE_VER=1.0.10 +ATSRC_PACKAGE_REV=fc7bc0ad +ATSRC_PACKAGE_LICENSE="Lesser GPL 2.1" +ATSRC_PACKAGE_DOCLINK="https://raw.github.com/libdfp/libdfp/master/README.user" +ATSRC_PACKAGE_RELFIXES= +ATSRC_PACKAGE_STR_VER="${ATSRC_PACKAGE_NAME} ${ATSRC_PACKAGE_VER}-r${ATSRC_PACKAGE_REV}" +ATSRC_PACKAGE_VERID="${ATSRC_PACKAGE_VER}${ATSRC_PACKAGE_REV:+-${ATSRC_PACKAGE_REV}}" +ATSRC_PACKAGE_PRE="test -d libdfp-${ATSRC_PACKAGE_VERID}" +ATSRC_PACKAGE_CO=([0]="wget -O libdfp-${ATSRC_PACKAGE_VERID}.tar.gz https://github.com/libdfp/libdfp/archive/${ATSRC_PACKAGE_REV}.tar.gz") +ATSRC_PACKAGE_GIT="" +# Use --transform to give a better name to Libdfp directory. +ATSRC_PACKAGE_POST="tar xzf libdfp-${ATSRC_PACKAGE_VERID}.tar.gz --transform=s/libdfp-${ATSRC_PACKAGE_REV}[^\\/]*/libdfp-${ATSRC_PACKAGE_VERID}/" +ATSRC_PACKAGE_SRC=${AT_BASE}/sources/libdfp-${ATSRC_PACKAGE_VERID} +ATSRC_PACKAGE_WORK=${AT_WORK_PATH}/libdfp +ATSRC_PACKAGE_MLS="" +ATSRC_PACKAGE_PATCHES="" +ATSRC_PACKAGE_ALOC="" +ATSRC_PACKAGE_TARS="" +ATSRC_PACKAGE_MAKE_CHECK="" +ATSRC_PACKAGE_DISTRIB=yes +ATSRC_PACKAGE_BUILDCROSS=no +ATSRC_PACKAGE_BUNDLE=toolchain diff --git a/configs/7.0/packages/libdfp/specfile b/configs/7.0/packages/libdfp/specfile new file mode 120000 index 000000000..ba6213c00 --- /dev/null +++ b/configs/7.0/packages/libdfp/specfile @@ -0,0 +1 @@ +../../../6.0/packages/libdfp/specfile \ No newline at end of file diff --git a/configs/7.0/packages/libdfp/stage_1 b/configs/7.0/packages/libdfp/stage_1 new file mode 120000 index 000000000..d4e38568e --- /dev/null +++ b/configs/7.0/packages/libdfp/stage_1 @@ -0,0 +1 @@ +../../../6.0/packages/libdfp/stage_1 \ No newline at end of file diff --git a/configs/7.0/packages/libdfp/stage_optimized b/configs/7.0/packages/libdfp/stage_optimized new file mode 120000 index 000000000..58698873f --- /dev/null +++ b/configs/7.0/packages/libdfp/stage_optimized @@ -0,0 +1 @@ +../../../6.0/packages/libdfp/stage_optimized \ No newline at end of file diff --git a/configs/7.0/packages/libhugetlbfs/libhugetlbfs.mk b/configs/7.0/packages/libhugetlbfs/libhugetlbfs.mk new file mode 120000 index 000000000..74cc94edf --- /dev/null +++ b/configs/7.0/packages/libhugetlbfs/libhugetlbfs.mk @@ -0,0 +1 @@ +../../../6.0/packages/libhugetlbfs/libhugetlbfs.mk \ No newline at end of file diff --git a/configs/7.0/packages/libhugetlbfs/sources b/configs/7.0/packages/libhugetlbfs/sources new file mode 120000 index 000000000..62d319b3b --- /dev/null +++ b/configs/7.0/packages/libhugetlbfs/sources @@ -0,0 +1 @@ +../../../6.0/packages/libhugetlbfs/sources \ No newline at end of file diff --git a/configs/7.0/packages/libhugetlbfs/specfile b/configs/7.0/packages/libhugetlbfs/specfile new file mode 120000 index 000000000..0558d292e --- /dev/null +++ b/configs/7.0/packages/libhugetlbfs/specfile @@ -0,0 +1 @@ +../../../6.0/packages/libhugetlbfs/specfile \ No newline at end of file diff --git a/configs/7.0/packages/libhugetlbfs/stage_1 b/configs/7.0/packages/libhugetlbfs/stage_1 new file mode 120000 index 000000000..f5b48c848 --- /dev/null +++ b/configs/7.0/packages/libhugetlbfs/stage_1 @@ -0,0 +1 @@ +../../../6.0/packages/libhugetlbfs/stage_1 \ No newline at end of file diff --git a/configs/7.0/packages/libpfm/libpfm.mk b/configs/7.0/packages/libpfm/libpfm.mk new file mode 120000 index 000000000..c6be6a734 --- /dev/null +++ b/configs/7.0/packages/libpfm/libpfm.mk @@ -0,0 +1 @@ +../../../6.0/packages/libpfm/libpfm.mk \ No newline at end of file diff --git a/configs/7.0/packages/libpfm/sources b/configs/7.0/packages/libpfm/sources new file mode 100644 index 000000000..a8a37bb88 --- /dev/null +++ b/configs/7.0/packages/libpfm/sources @@ -0,0 +1,40 @@ +#!/usr/bin/env bash +# +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# Libpfm source package and build info +# ==================================== +# + +ATSRC_PACKAGE_NAME="Libpfm" +ATSRC_PACKAGE_VER=4.6.0 +ATSRC_PACKAGE_REV=cbd838f7 +ATSRC_PACKAGE_LICENSE="MIT" +ATSRC_PACKAGE_DOCLINK="http://perfmon2.sourceforge.net/docs_v4.html" +ATSRC_PACKAGE_RELFIXES= +ATSRC_PACKAGE_STR_VER="${ATSRC_PACKAGE_NAME} ${ATSRC_PACKAGE_VER}${ATSRC_PACKAGE_REV:+-${ATSRC_PACKAGE_REV}}" +ATSRC_PACKAGE_PRE="test -d libpfm-${ATSRC_PACKAGE_VER}${ATSRC_PACKAGE_REV:+-${ATSRC_PACKAGE_REV}}" +ATSRC_PACKAGE_CO=([0]="git archive --prefix=libpfm-${ATSRC_PACKAGE_VER}${ATSRC_PACKAGE_REV:+-${ATSRC_PACKAGE_REV}}/ --remote=git://git.code.sf.net/p/perfmon2/libpfm4 ${ATSRC_PACKAGE_REV} > libpfm-${ATSRC_PACKAGE_VER}${ATSRC_PACKAGE_REV:+-${ATSRC_PACKAGE_REV}}.tar") +ATSRC_PACKAGE_POST="tar -xf libpfm-${ATSRC_PACKAGE_VER}${ATSRC_PACKAGE_REV:+-${ATSRC_PACKAGE_REV}}.tar" +ATSRC_PACKAGE_SRC="${AT_BASE}/sources/libpfm-${ATSRC_PACKAGE_VER}${ATSRC_PACKAGE_REV:+-${ATSRC_PACKAGE_REV}}" +ATSRC_PACKAGE_WORK=${AT_WORK_PATH}/libpfm +ATSRC_PACKAGE_MLS= +ATSRC_PACKAGE_ALOC= +ATSRC_PACKAGE_PATCHES= +ATSRC_PACKAGE_TARS= +ATSRC_PACKAGE_MAKE_CHECK= +ATSRC_PACKAGE_DISTRIB=no +ATSRC_PACKAGE_BUNDLE=profile diff --git a/configs/7.0/packages/libpfm/specfile b/configs/7.0/packages/libpfm/specfile new file mode 120000 index 000000000..7b2feadae --- /dev/null +++ b/configs/7.0/packages/libpfm/specfile @@ -0,0 +1 @@ +../../../6.0/packages/libpfm/specfile \ No newline at end of file diff --git a/configs/7.0/packages/libpfm/stage_1 b/configs/7.0/packages/libpfm/stage_1 new file mode 120000 index 000000000..1f5d4b719 --- /dev/null +++ b/configs/7.0/packages/libpfm/stage_1 @@ -0,0 +1 @@ +../../../6.0/packages/libpfm/stage_1 \ No newline at end of file diff --git a/configs/7.0/packages/libsphde/libsphde.mk b/configs/7.0/packages/libsphde/libsphde.mk new file mode 100644 index 000000000..38ef92275 --- /dev/null +++ b/configs/7.0/packages/libsphde/libsphde.mk @@ -0,0 +1,33 @@ +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# +# +$(eval $(call set_provides,libsphde_1,multi,cross_no)) + +libsphde: $(RCPTS)/libsphde_1.rcpt + +# Add it to the target 3rdparty_libs +3rdparty_libs-reqs += $(RCPTS)/libsphde_1.rcpt + +$(RCPTS)/libsphde_1.rcpt: $(libsphde_1-archdeps) + @touch $@ + +$(RCPTS)/libsphde_1-32.a.rcpt: $(patsubst %,$(RCPTS)/%.rcpt,gcc_4.b \ + rsync_libsphde) + @touch $@ + +$(RCPTS)/libsphde_1-64.a.rcpt: $(patsubst %,$(RCPTS)/%.rcpt,gcc_4.b \ + rsync_libsphde) + @touch $@ diff --git a/configs/7.0/packages/libsphde/sources b/configs/7.0/packages/libsphde/sources new file mode 100644 index 000000000..bba312045 --- /dev/null +++ b/configs/7.0/packages/libsphde/sources @@ -0,0 +1,44 @@ +#!/usr/bin/env bash +# +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# SPHDE source package and build info +# ================================== +# + +ATSRC_PACKAGE_NAME="SPHDE" +ATSRC_PACKAGE_VER=1.0.0 +ATSRC_PACKAGE_REV=70299bfc +ATSRC_PACKAGE_LICENSE="Eclipse Public License 1.0" +ATSRC_PACKAGE_DOCLINK="http://sphde.github.io/sphde/" +ATSRC_PACKAGE_RELFIXES= +ATSRC_PACKAGE_STR_VER="${ATSRC_PACKAGE_NAME} ${ATSRC_PACKAGE_VER}-${ATSRC_PACKAGE_REV}" +ATSRC_PACKAGE_VERID="${ATSRC_PACKAGE_VER}${ATSRC_PACKAGE_REV:+-${ATSRC_PACKAGE_REV}}" +ATSRC_PACKAGE_PRE="test -d sphde-${ATSRC_PACKAGE_VERID}" +ATSRC_PACKAGE_CO=([0]="wget -O sphde-${ATSRC_PACKAGE_VERID}.tar.gz https://github.com/sphde/sphde/archive/${ATSRC_PACKAGE_REV}.tar.gz") +ATSRC_PACKAGE_GIT="" +# Use --transform to give a better name to SPHDE directory. +ATSRC_PACKAGE_POST="tar xzf sphde-${ATSRC_PACKAGE_VERID}.tar.gz --transform=s/sphde-${ATSRC_PACKAGE_REV}[^\\/]*/sphde-${ATSRC_PACKAGE_VERID}/" +ATSRC_PACKAGE_SRC="${AT_BASE}/sources/sphde-${ATSRC_PACKAGE_VERID}" +ATSRC_PACKAGE_WORK=${AT_WORK_PATH}/sphde +ATSRC_PACKAGE_MLS= +ATSRC_PACKAGE_ALOC= +ATSRC_PACKAGE_PATCHES= +ATSRC_PACKAGE_TARS= +ATSRC_PACKAGE_MAKE_CHECK= +ATSRC_PACKAGE_DISTRIB=no +ATSRC_PACKAGE_BUILDCROSS=no +ATSRC_PACKAGE_BUNDLE=mcore-libs diff --git a/configs/7.0/packages/libsphde/specfile b/configs/7.0/packages/libsphde/specfile new file mode 120000 index 000000000..6b84fccdd --- /dev/null +++ b/configs/7.0/packages/libsphde/specfile @@ -0,0 +1 @@ +../../../6.0/packages/libsphde/specfile \ No newline at end of file diff --git a/configs/7.0/packages/libsphde/stage_1 b/configs/7.0/packages/libsphde/stage_1 new file mode 120000 index 000000000..ca1c4ec09 --- /dev/null +++ b/configs/7.0/packages/libsphde/stage_1 @@ -0,0 +1 @@ +../../../6.0/packages/libsphde/stage_1 \ No newline at end of file diff --git a/configs/7.0/packages/libsphdecompat/libsphdecompat.mk b/configs/7.0/packages/libsphdecompat/libsphdecompat.mk new file mode 100644 index 000000000..b5fed18a1 --- /dev/null +++ b/configs/7.0/packages/libsphdecompat/libsphdecompat.mk @@ -0,0 +1,33 @@ +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# +# +$(eval $(call set_provides,libsphdecompat_1,multi,cross_no)) + +libsphdecompat: $(RCPTS)/libsphdecompat_1.rcpt + +# Add it to the target 3rdparty_libs +3rdparty_libs-reqs += $(RCPTS)/libsphdecompat_1.rcpt + +$(RCPTS)/libsphdecompat_1.rcpt: $(libsphdecompat_1-archdeps) + @touch $@ + +$(RCPTS)/libsphdecompat_1-32.a.rcpt: $(patsubst %,$(RCPTS)/%.rcpt,gcc_4.b \ + rsync_libsphdecompat) + @touch $@ + +$(RCPTS)/libsphdecompat_1-64.a.rcpt: $(patsubst %,$(RCPTS)/%.rcpt,gcc_4.b \ + rsync_libsphdecompat) + @touch $@ diff --git a/configs/7.0/packages/libsphdecompat/sources b/configs/7.0/packages/libsphdecompat/sources new file mode 100644 index 000000000..58e5ac889 --- /dev/null +++ b/configs/7.0/packages/libsphdecompat/sources @@ -0,0 +1,47 @@ +#!/usr/bin/env bash +# +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# SPHDE broke compatibility with previous versions after commit ID 8e1f2549, so +# we provide this SPHDE_COMPAT to maintain the old compatibility. +# +# SPHDE_COMPAT source package and build info +# ================================== +# + +ATSRC_PACKAGE_NAME="SPHDE Compat" +ATSRC_PACKAGE_VER=1.0.0 +ATSRC_PACKAGE_REV=f3a39432 +ATSRC_PACKAGE_LICENSE="Eclipse Public License 1.0" +ATSRC_PACKAGE_DOCLINK="http://sphde.github.io/sphde/" +ATSRC_PACKAGE_RELFIXES= +ATSRC_PACKAGE_STR_VER="${ATSRC_PACKAGE_NAME} ${ATSRC_PACKAGE_VER}-${ATSRC_PACKAGE_REV}" +ATSRC_PACKAGE_VERID="${ATSRC_PACKAGE_VER}${ATSRC_PACKAGE_REV:+-${ATSRC_PACKAGE_REV}}" +ATSRC_PACKAGE_PRE="test -d sphde_compat-${ATSRC_PACKAGE_VERID}" +ATSRC_PACKAGE_CO=([0]="wget -O sphde_compat-${ATSRC_PACKAGE_VERID}.tar.gz https://github.com/sphde/sphde/archive/${ATSRC_PACKAGE_REV}.tar.gz") +ATSRC_PACKAGE_GIT="" +# Use --transform to give a better name to SPHDE_COMPAT directory. +ATSRC_PACKAGE_POST="tar xzf sphde_compat-${ATSRC_PACKAGE_VERID}.tar.gz --transform=s/sphde-${ATSRC_PACKAGE_REV}[^\\/]*/sphde_compat-${ATSRC_PACKAGE_VERID}/" +ATSRC_PACKAGE_SRC="${AT_BASE}/sources/sphde_compat-${ATSRC_PACKAGE_VERID}" +ATSRC_PACKAGE_WORK=${AT_WORK_PATH}/sphde_compat +ATSRC_PACKAGE_MLS= +ATSRC_PACKAGE_ALOC= +ATSRC_PACKAGE_PATCHES= +ATSRC_PACKAGE_TARS= +ATSRC_PACKAGE_MAKE_CHECK= +ATSRC_PACKAGE_DISTRIB=no +ATSRC_PACKAGE_BUILDCROSS=no +ATSRC_PACKAGE_BUNDLE=mcore-libs diff --git a/configs/7.0/packages/libsphdecompat/specfile b/configs/7.0/packages/libsphdecompat/specfile new file mode 100644 index 000000000..d46c60911 --- /dev/null +++ b/configs/7.0/packages/libsphdecompat/specfile @@ -0,0 +1,14 @@ +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# diff --git a/configs/7.0/packages/libsphdecompat/stage_1 b/configs/7.0/packages/libsphdecompat/stage_1 new file mode 100644 index 000000000..47861aed8 --- /dev/null +++ b/configs/7.0/packages/libsphdecompat/stage_1 @@ -0,0 +1,79 @@ +#!/usr/bin/env bash +# +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# SPHDE_COMPAT build parameters for stage 1 32/64 bits +# ========================================= +# + +# Include some standard functions +source ${utilities}/bitsize_selection.sh + +# Tell the build system to hold the temp install folder +ATCFG_HOLD_TEMP_INSTALL='no' +# Tell the build system to hold the temp build folder +ATCFG_HOLD_TEMP_BUILD='no' +# Build in a new directory +ATCFG_BUILD_STAGE_T='dir' + +atcfg_configure () +{ + local bindir=${at_dest}/$(find_build_bindir ${AT_BIT_SIZE}) + local libdir=${at_dest}/$(find_build_libdir ${AT_BIT_SIZE}) + local base_target=$(find_build_target ${AT_BIT_SIZE}) + + PATH=${at_dest}/bin:${PATH} \ + CC="${at_dest}/bin/gcc" \ + CXX="${at_dest}/bin/g++" \ + CFLAGS="-Wl,-zrelro -m${AT_BIT_SIZE} -O3 -g" \ + CXXFLAGS="-m${AT_BIT_SIZE} -O3 -g" \ + ${ATSRC_PACKAGE_WORK}/configure --build=${base_target} \ + --host=${base_target} \ + --libdir="${libdir}" \ + --bindir="${bindir}" \ + --disable-static \ + --includedir="${at_dest}/include" +} + +atcfg_make () +{ + PATH=${at_dest}/bin:${PATH} ${SUB_MAKE} +} + +atcfg_make_check() +{ + # Package testing not done for cross build. + if [[ "${cross_build}" == 'no' ]]; then + PATH=${at_dest}/bin:${PATH} ${SUB_MAKE} check + fi +} + +atcfg_install () +{ + PATH=${at_dest}/bin:${PATH} \ + ${SUB_MAKE} install DESTDIR=${install_place} +} + +atcfg_post_install() +{ + # This compat package only supports runtime. Remove all files used + # in development. + rm -rf \ + ${install_place}/${at_dest}/bin \ + ${install_place}/${at_dest}/bin64 \ + ${install_place}/${at_dest}/include + find ${install_place}/${at_dest} -regex '.*\.\(a\|la\|so\)' -delete +} diff --git a/configs/7.0/packages/liburcu/liburcu.mk b/configs/7.0/packages/liburcu/liburcu.mk new file mode 120000 index 000000000..4063a85dd --- /dev/null +++ b/configs/7.0/packages/liburcu/liburcu.mk @@ -0,0 +1 @@ +../../../6.0/packages/liburcu/liburcu.mk \ No newline at end of file diff --git a/configs/7.0/packages/liburcu/sources b/configs/7.0/packages/liburcu/sources new file mode 120000 index 000000000..a97db31e1 --- /dev/null +++ b/configs/7.0/packages/liburcu/sources @@ -0,0 +1 @@ +../../../6.0/packages/liburcu/sources \ No newline at end of file diff --git a/configs/7.0/packages/liburcu/specfile b/configs/7.0/packages/liburcu/specfile new file mode 120000 index 000000000..bb34deaea --- /dev/null +++ b/configs/7.0/packages/liburcu/specfile @@ -0,0 +1 @@ +../../../6.0/packages/liburcu/specfile \ No newline at end of file diff --git a/configs/7.0/packages/liburcu/stage_1 b/configs/7.0/packages/liburcu/stage_1 new file mode 120000 index 000000000..910e2c265 --- /dev/null +++ b/configs/7.0/packages/liburcu/stage_1 @@ -0,0 +1 @@ +../../../6.0/packages/liburcu/stage_1 \ No newline at end of file diff --git a/configs/7.0/packages/libvecpf/libvecpf.mk b/configs/7.0/packages/libvecpf/libvecpf.mk new file mode 100644 index 000000000..90673836e --- /dev/null +++ b/configs/7.0/packages/libvecpf/libvecpf.mk @@ -0,0 +1,28 @@ +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# +# +$(eval $(call set_provides,libvecpf_1,multi,cross_no)) + +libvecpf_1: $(RCPTS)/libvecpf_1.rcpt + +$(RCPTS)/libvecpf_1.rcpt: $(libvecpf_1-archdeps) + @touch $@ + +$(RCPTS)/libvecpf_1-32.a.rcpt: $(patsubst %,$(RCPTS)/%.rcpt,gcc_4 rsync_libvecpf) + @touch $@ + +$(RCPTS)/libvecpf_1-64.a.rcpt: $(patsubst %,$(RCPTS)/%.rcpt,gcc_4 rsync_libvecpf) + @touch $@ diff --git a/configs/7.0/packages/libvecpf/sources b/configs/7.0/packages/libvecpf/sources new file mode 100644 index 000000000..0639f0aa8 --- /dev/null +++ b/configs/7.0/packages/libvecpf/sources @@ -0,0 +1,44 @@ +#!/usr/bin/env bash +# +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# Libvecpf source package and build info +# ================================== +# + +ATSRC_PACKAGE_NAME="Libvecpf" +ATSRC_PACKAGE_VER=1.0.0 +ATSRC_PACKAGE_REV=05eb00ee +ATSRC_PACKAGE_LICENSE="BSD License" +ATSRC_PACKAGE_DOCLINK="https://github.com/Libvecpf/libvecpf" +ATSRC_PACKAGE_RELFIXES= +ATSRC_PACKAGE_STR_VER="${ATSRC_PACKAGE_NAME} ${ATSRC_PACKAGE_VER}-${ATSRC_PACKAGE_REV}" +ATSRC_PACKAGE_VERID="${ATSRC_PACKAGE_VER}${ATSRC_PACKAGE_REV:+-${ATSRC_PACKAGE_REV}}" +ATSRC_PACKAGE_PRE="test -d libvecpf-${ATSRC_PACKAGE_VERID}" +ATSRC_PACKAGE_CO=([0]="wget -O libvecpf-${ATSRC_PACKAGE_VERID}.tar.gz https://github.com/Libvecpf/libvecpf/archive/${ATSRC_PACKAGE_REV}.tar.gz") +ATSRC_PACKAGE_GIT="" +# Use --transform to give a better name to Libvecpf directory. +ATSRC_PACKAGE_POST="tar xzf libvecpf-${ATSRC_PACKAGE_VERID}.tar.gz --transform=s/libvecpf-${ATSRC_PACKAGE_REV}[^\\/]*/libvecpf-${ATSRC_PACKAGE_VERID}/" +ATSRC_PACKAGE_SRC="${AT_BASE}/sources/libvecpf-${ATSRC_PACKAGE_VERID}" +ATSRC_PACKAGE_WORK=${AT_WORK_PATH}/libvecpf +ATSRC_PACKAGE_MLS="" +ATSRC_PACKAGE_ALOC="" +ATSRC_PACKAGE_PATCHES="" +ATSRC_PACKAGE_TARS="" +ATSRC_PACKAGE_MAKE_CHECK="" +ATSRC_PACKAGE_DISTRIB=yes +ATSRC_PACKAGE_BUILDCROSS=no +ATSRC_PACKAGE_BUNDLE=toolchain diff --git a/configs/7.0/packages/libvecpf/specfile b/configs/7.0/packages/libvecpf/specfile new file mode 100644 index 000000000..d46c60911 --- /dev/null +++ b/configs/7.0/packages/libvecpf/specfile @@ -0,0 +1,14 @@ +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# diff --git a/configs/7.0/packages/libvecpf/stage_1 b/configs/7.0/packages/libvecpf/stage_1 new file mode 100644 index 000000000..1c533c5d3 --- /dev/null +++ b/configs/7.0/packages/libvecpf/stage_1 @@ -0,0 +1,73 @@ +#!/usr/bin/env bash +# +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +source ${AT_BASE}/scripts/utilities/bitsize_selection.sh + +# Libvecpf build parameters for stage 1 32 or 64 bits +# ============================================ +# + +# Tell the build system to hold the temp install folder +ATCFG_HOLD_TEMP_INSTALL='no' +# Tell the build system to hold the temp build folder +ATCFG_HOLD_TEMP_BUILD='no' +# Build in a new directory +ATCFG_BUILD_STAGE_T='dir' + +atcfg_configure() { + local base_target=$(find_build_target ${AT_BIT_SIZE}) + local base_libdir=$(find_build_libdir ${AT_BIT_SIZE}) + PATH=${at_dest}/bin:${PATH} \ + CC="${at_dest}/bin/gcc -m${AT_BIT_SIZE}" \ + CFLAGS="-g -O2 -fpic" \ + ${ATSRC_PACKAGE_WORK}/configure \ + --build=${base_target} \ + --host=${base_target} \ + --prefix=${at_dest} \ + --exec-prefix=${at_dest} \ + --libdir="${at_dest}/${base_libdir}" \ + --enable-shared \ + --enable-static \ + --enable-vsx +} + + +atcfg_make() { + PATH=${at_dest}/bin:${PATH} ${SUB_MAKE} +} + +atcfg_make_check() { + # Package testing is not done on a cross build. + if [[ "${cross_build}" == 'no' ]]; then + PATH=${at_dest}/bin:${PATH} ${SUB_MAKE} check + fi +} + +atcfg_install() { + PATH=${at_dest}/bin:${PATH} \ + ${SUB_MAKE} install install_root=${install_place} +} + + +atcfg_post_install() { + local base_target=$(find_build_target ${AT_BIT_SIZE}) + + # Remove duplicated files during the alternate target installation + if [[ "${base_target}" == "${alternate_target}" ]]; then + rm -rf ${install_place}/${at_dest}/{include,share} + fi +} diff --git a/configs/7.0/packages/mpc/mpc.mk b/configs/7.0/packages/mpc/mpc.mk new file mode 120000 index 000000000..dcd42d33f --- /dev/null +++ b/configs/7.0/packages/mpc/mpc.mk @@ -0,0 +1 @@ +../../../6.0/packages/mpc/mpc.mk \ No newline at end of file diff --git a/configs/7.0/packages/mpc/sources b/configs/7.0/packages/mpc/sources new file mode 120000 index 000000000..6c8cce521 --- /dev/null +++ b/configs/7.0/packages/mpc/sources @@ -0,0 +1 @@ +../../../6.0/packages/mpc/sources \ No newline at end of file diff --git a/configs/7.0/packages/mpc/specfile b/configs/7.0/packages/mpc/specfile new file mode 120000 index 000000000..020c08f6b --- /dev/null +++ b/configs/7.0/packages/mpc/specfile @@ -0,0 +1 @@ +../../../6.0/packages/mpc/specfile \ No newline at end of file diff --git a/configs/7.0/packages/mpc/stage_1 b/configs/7.0/packages/mpc/stage_1 new file mode 120000 index 000000000..b9cad3bc6 --- /dev/null +++ b/configs/7.0/packages/mpc/stage_1 @@ -0,0 +1 @@ +../../../6.0/packages/mpc/stage_1 \ No newline at end of file diff --git a/configs/7.0/packages/mpc/stage_2 b/configs/7.0/packages/mpc/stage_2 new file mode 120000 index 000000000..524137bc8 --- /dev/null +++ b/configs/7.0/packages/mpc/stage_2 @@ -0,0 +1 @@ +../../../6.0/packages/mpc/stage_2 \ No newline at end of file diff --git a/configs/7.0/packages/mpfr/mpfr.mk b/configs/7.0/packages/mpfr/mpfr.mk new file mode 120000 index 000000000..269e6f5e2 --- /dev/null +++ b/configs/7.0/packages/mpfr/mpfr.mk @@ -0,0 +1 @@ +../../../6.0/packages/mpfr/mpfr.mk \ No newline at end of file diff --git a/configs/7.0/packages/mpfr/sources b/configs/7.0/packages/mpfr/sources new file mode 120000 index 000000000..43000d88d --- /dev/null +++ b/configs/7.0/packages/mpfr/sources @@ -0,0 +1 @@ +../../../6.0/packages/mpfr/sources \ No newline at end of file diff --git a/configs/7.0/packages/mpfr/specfile b/configs/7.0/packages/mpfr/specfile new file mode 120000 index 000000000..79b5daf33 --- /dev/null +++ b/configs/7.0/packages/mpfr/specfile @@ -0,0 +1 @@ +../../../6.0/packages/mpfr/specfile \ No newline at end of file diff --git a/configs/7.0/packages/mpfr/stage_1 b/configs/7.0/packages/mpfr/stage_1 new file mode 120000 index 000000000..440dc9ce4 --- /dev/null +++ b/configs/7.0/packages/mpfr/stage_1 @@ -0,0 +1 @@ +../../../6.0/packages/mpfr/stage_1 \ No newline at end of file diff --git a/configs/7.0/packages/mpfr/stage_2 b/configs/7.0/packages/mpfr/stage_2 new file mode 120000 index 000000000..05266ff9e --- /dev/null +++ b/configs/7.0/packages/mpfr/stage_2 @@ -0,0 +1 @@ +../../../6.0/packages/mpfr/stage_2 \ No newline at end of file diff --git a/configs/7.0/packages/openssl/openssl.mk b/configs/7.0/packages/openssl/openssl.mk new file mode 120000 index 000000000..f84edab47 --- /dev/null +++ b/configs/7.0/packages/openssl/openssl.mk @@ -0,0 +1 @@ +../../../6.0/packages/openssl/openssl.mk \ No newline at end of file diff --git a/configs/7.0/packages/openssl/sources b/configs/7.0/packages/openssl/sources new file mode 100644 index 000000000..43ae05ce8 --- /dev/null +++ b/configs/7.0/packages/openssl/sources @@ -0,0 +1,51 @@ +#!/usr/bin/env bash +# +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# OpenSSL source package and build info +# ===================================== +# + +ATSRC_PACKAGE_NAME="Open Secure Sockets Layer" +ATSRC_PACKAGE_VER="1.0.1t" +ATSRC_PACKAGE_LICENSE="BSD and GPL 2.0" +ATSRC_PACKAGE_DOCLINK="http://www.openssl.org/docs/" +ATSRC_PACKAGE_RELFIXES= +ATSRC_PACKAGE_STR_VER="${ATSRC_PACKAGE_NAME} ${ATSRC_PACKAGE_VER}" +ATSRC_PACKAGE_PRE="test -d openssl-${ATSRC_PACKAGE_VER}" +ATSRC_PACKAGE_CO=([0]="wget -N -O openssl-${ATSRC_PACKAGE_VER}.tar.gz https://github.com/openssl/openssl/archive/OpenSSL_${ATSRC_PACKAGE_VER//\./_}.tar.gz") +ATSRC_PACKAGE_POST="tar -xzf openssl-${ATSRC_PACKAGE_VER}.tar.gz --transform=s/openssl-OpenSSL_${ATSRC_PACKAGE_VER//\./_}[^\\/]*/openssl-${ATSRC_PACKAGE_VER}/" +ATSRC_PACKAGE_SRC="${AT_BASE}/sources/openssl-${ATSRC_PACKAGE_VER}" +ATSRC_PACKAGE_WORK=${AT_WORK_PATH}/openssl +ATSRC_PACKAGE_MLS= +ATSRC_PACKAGE_ALOC= +ATSRC_PACKAGE_PATCHES= +ATSRC_PACKAGE_TARS= +ATSRC_PACKAGE_DISTRIB=no +ATSRC_PACKAGE_BUILDCROSS=no +ATSRC_PACKAGE_BUNDLE=toolchain + +atsrc_get_patches () { + at_get_patch \ + https://github.com/powertechpreview/powertechpreview/raw/master/OpenSSL%20Patches/openssl-1.0.1m-ppc64le.tgz \ + 2203d3459be4bbe1dc5b93ecc91a4e4c || return ${?} +} + +atsrc_apply_patches () { + tar zxf openssl-1.0.1m-ppc64le.tgz || return ${?} + + patch -p1 < openssl-1.0.1m-ppc-asm-update.v2.patch || return ${?} +} diff --git a/configs/7.0/packages/openssl/specfile b/configs/7.0/packages/openssl/specfile new file mode 120000 index 000000000..1a505a4d0 --- /dev/null +++ b/configs/7.0/packages/openssl/specfile @@ -0,0 +1 @@ +../../../6.0/packages/openssl/specfile \ No newline at end of file diff --git a/configs/7.0/packages/openssl/stage_1 b/configs/7.0/packages/openssl/stage_1 new file mode 120000 index 000000000..d8053124e --- /dev/null +++ b/configs/7.0/packages/openssl/stage_1 @@ -0,0 +1 @@ +../../../6.0/packages/openssl/stage_1 \ No newline at end of file diff --git a/configs/7.0/packages/openssl/stage_optimized b/configs/7.0/packages/openssl/stage_optimized new file mode 120000 index 000000000..34cdc4158 --- /dev/null +++ b/configs/7.0/packages/openssl/stage_optimized @@ -0,0 +1 @@ +../../../6.0/packages/openssl/stage_optimized \ No newline at end of file diff --git a/configs/7.0/packages/oprofile/oprofile.mk b/configs/7.0/packages/oprofile/oprofile.mk new file mode 120000 index 000000000..96a4f1c26 --- /dev/null +++ b/configs/7.0/packages/oprofile/oprofile.mk @@ -0,0 +1 @@ +../../../6.0/packages/oprofile/oprofile.mk \ No newline at end of file diff --git a/configs/7.0/packages/oprofile/sources b/configs/7.0/packages/oprofile/sources new file mode 100644 index 000000000..d091b63aa --- /dev/null +++ b/configs/7.0/packages/oprofile/sources @@ -0,0 +1,42 @@ +#!/usr/bin/env bash +# +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# oProfile source package and build info +# ====================================== +# +ATSRC_PACKAGE_NAME="OProfile" +ATSRC_PACKAGE_VER=0.9.9 +ATSRC_PACKAGE_REV=f72665b5 +ATSRC_PACKAGE_LICENSE="GPL 2.0" +ATSRC_PACKAGE_DOCLINK="http://oprofile.sourceforge.net/docs/" +ATSRC_PACKAGE_RELFIXES= +ATSRC_PACKAGE_NAMESUFFIX="with Java Support" +ATSRC_PACKAGE_STR_VER="${ATSRC_PACKAGE_NAME} ${ATSRC_PACKAGE_VER}${ATSRC_PACKAGE_REV:+-${ATSRC_PACKAGE_REV}}" +ATSRC_PACKAGE_PRE="test -d oprofile-${ATSRC_PACKAGE_VER}${ATSRC_PACKAGE_REV:+-${ATSRC_PACKAGE_REV}}" +ATSRC_PACKAGE_CO=([0]="git archive --prefix=oprofile-${ATSRC_PACKAGE_VER}${ATSRC_PACKAGE_REV:+-${ATSRC_PACKAGE_REV}}/ --remote=git://git.code.sf.net/p/oprofile/oprofile ${ATSRC_PACKAGE_REV} > oprofile-${ATSRC_PACKAGE_VER}${ATSRC_PACKAGE_REV:+-${ATSRC_PACKAGE_REV}}.tar") +ATSRC_PACKAGE_GIT= +ATSRC_PACKAGE_POST="tar -xf oprofile-${ATSRC_PACKAGE_VER}${ATSRC_PACKAGE_REV:+-${ATSRC_PACKAGE_REV}}.tar" +ATSRC_PACKAGE_SRC="${AT_BASE}/sources/oprofile-${ATSRC_PACKAGE_VER}${ATSRC_PACKAGE_REV:+-${ATSRC_PACKAGE_REV}}" +ATSRC_PACKAGE_WORK=${AT_WORK_PATH}/oprofile +ATSRC_PACKAGE_ALOC='https://github.com/powertechpreview/powertechpreview/raw/master/Oprofile%20Patches/oprofile-0.9.8-qt-disable.tar.gz' +ATSRC_PACKAGE_MLS= +ATSRC_PACKAGE_PATCHES='-p1 op-qt-disable.patch' +ATSRC_PACKAGE_TARS='oprofile-0.9.8-qt-disable.tar.gz' +ATSRC_PACKAGE_MAKE_CHECK= +ATSRC_PACKAGE_DISTRIB=yes +ATSRC_PACKAGE_BUILDCROSS=no +ATSRC_PACKAGE_BUNDLE=profile diff --git a/configs/7.0/packages/oprofile/specfile b/configs/7.0/packages/oprofile/specfile new file mode 120000 index 000000000..78b844dda --- /dev/null +++ b/configs/7.0/packages/oprofile/specfile @@ -0,0 +1 @@ +../../../6.0/packages/oprofile/specfile \ No newline at end of file diff --git a/configs/7.0/packages/oprofile/stage_1 b/configs/7.0/packages/oprofile/stage_1 new file mode 120000 index 000000000..1af41b405 --- /dev/null +++ b/configs/7.0/packages/oprofile/stage_1 @@ -0,0 +1 @@ +../../../6.0/packages/oprofile/stage_1 \ No newline at end of file diff --git a/configs/7.0/packages/paflib/paflib.mk b/configs/7.0/packages/paflib/paflib.mk new file mode 100644 index 000000000..a437c653f --- /dev/null +++ b/configs/7.0/packages/paflib/paflib.mk @@ -0,0 +1,31 @@ +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# +# +$(eval $(call set_provides,paflib_1,multi,cross_no)) + +paflib: $(RCPTS)/paflib_1.rcpt + +#Add it to the target 3rdparty_libs +3rdparty_libs-reqs += $(RCPTS)/paflib_1.rcpt + +$(RCPTS)/paflib_1.rcpt: $(paflib_1-archdeps) + @touch $@ + +$(RCPTS)/paflib_1-32.a.rcpt: $(RCPTS)/gcc_4.rcpt $(RCPTS)/rsync_paflib.rcpt + @touch $@ + +$(RCPTS)/paflib_1-64.a.rcpt: $(RCPTS)/gcc_4.rcpt $(RCPTS)/rsync_paflib.rcpt + @touch $@ diff --git a/configs/7.0/packages/paflib/sources b/configs/7.0/packages/paflib/sources new file mode 100644 index 000000000..56e1b1d7d --- /dev/null +++ b/configs/7.0/packages/paflib/sources @@ -0,0 +1,44 @@ +#!/usr/bin/env bash +# +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# PAFlib source package and build info +# ==================================== +# + +ATSRC_PACKAGE_NAME="IBM Power Architecture Facilities Library" +ATSRC_PACKAGE_VER=0.1-2 +ATSRC_PACKAGE_REV=a3865969 +ATSRC_PACKAGE_LICENSE="MIT License" +ATSRC_PACKAGE_DOCLINK="https://github.com/paflib/paflib/wiki/" +ATSRC_PACKAGE_RELFIXES= +ATSRC_PACKAGE_STR_VER="${ATSRC_PACKAGE_NAME} ${ATSRC_PACKAGE_VER}${ATSRC_PACKAGE_REV:+-${ATSRC_PACKAGE_REV}}" +ATSRC_PACKAGE_VERID="${ATSRC_PACKAGE_VER}${ATSRC_PACKAGE_REV:+-${ATSRC_PACKAGE_REV}}" +ATSRC_PACKAGE_PRE="test -d paflib-${ATSRC_PACKAGE_VERID}" +ATSRC_PACKAGE_CO=([0]="wget -O paflib-${ATSRC_PACKAGE_VERID}.tar.gz https://github.com/paflib/paflib/archive/${ATSRC_PACKAGE_REV}.tar.gz") +ATSRC_PACKAGE_GIT="" +# Use --transform to give a better name to PAFLib directory. +ATSRC_PACKAGE_POST="tar xzf paflib-${ATSRC_PACKAGE_VERID}.tar.gz --transform=s/paflib-${ATSRC_PACKAGE_REV}[^\\/]*/paflib-${ATSRC_PACKAGE_VERID}/" +ATSRC_PACKAGE_SRC=${AT_BASE}/sources/paflib-${ATSRC_PACKAGE_VERID} +ATSRC_PACKAGE_WORK=${AT_WORK_PATH}/paflib +ATSRC_PACKAGE_MLS= +ATSRC_PACKAGE_ALOC= +ATSRC_PACKAGE_PATCHES= +ATSRC_PACKAGE_TARS= +ATSRC_PACKAGE_MAKE_CHECK= +ATSRC_PACKAGE_DISTRIB=no +ATSRC_PACKAGE_BUILDCROSS=no +ATSRC_PACKAGE_BUNDLE=toolchain diff --git a/configs/7.0/packages/paflib/specfile b/configs/7.0/packages/paflib/specfile new file mode 100644 index 000000000..d46c60911 --- /dev/null +++ b/configs/7.0/packages/paflib/specfile @@ -0,0 +1,14 @@ +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# diff --git a/configs/7.0/packages/paflib/stage_1 b/configs/7.0/packages/paflib/stage_1 new file mode 100644 index 000000000..376d425fe --- /dev/null +++ b/configs/7.0/packages/paflib/stage_1 @@ -0,0 +1,126 @@ +#!/usr/bin/env bash +# +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# PAFlib build parameters for stage 1 32/64 bits +# =========================================== +# + +# Include some standard functions +source ${utilities}/bitsize_selection.sh + +source ${scripts}/utils.sh + +# Tell the build system to hold the temp install folder +ATCFG_HOLD_TEMP_INSTALL='no' +# Tell the build system to hold the temp build folder +ATCFG_HOLD_TEMP_BUILD='no' +# PAFLib requires to copy the source code directory because we run autogen.sh +# on every build. If this call happens at the same time, it may fail. +ATCFG_BUILD_STAGE_T='link' + +atcfg_pre_configure () { + # Completely clean the build prior to any build + if [[ -e "Makefile" ]]; then + make distclean + fi + + set -e + # Parse automake version + am_path=$(which automake) + am_ver=$(get_gnu_version ${am_path}) + am_major=$(echo ${am_ver} | awk -F . '{print $1}') + am_minor=$(echo ${am_ver} | awk -F . '{print $2}') + set +e + # Work around a PAFLib incompatibility with automake 1.14. + # We can safely remove this when PAFLib changes its behavior with files + # in sub-directories. + if [[ ${am_major} -le 1 && ${am_minor} -lt 14 ]]; then + # Re-recreate configure script. + sh ./autogen.sh + fi +} + +atcfg_configure () { + local libdir=${at_dest}/$(find_build_libdir ${AT_BIT_SIZE}) + + # However, it also requires to run configure from a different + # directory. So we're forced to duplicate source code and build in + # another directory (build/ in this case). + rm -rf build/ + mkdir build/ + pushd build > /dev/null + + PATH=${at_dest}/bin:${PATH} \ + CC="${at_dest}/bin/gcc -m${AT_BIT_SIZE}" \ + CXX="${at_dest}/bin/g++ -m${AT_BIT_SIZE}" \ + CFLAGS="-g -O" \ + CXXFLAGS="-g -O" \ + ../configure --build=${host} \ + --host=${host} \ + --target=${host} \ + --prefix=${at_dest} \ + --libdir=${libdir} \ + || return ${?} + popd > /dev/null +} + +atcfg_make () { + pushd build > /dev/null + # We're forced to use -f in order to work around an issue with the + # mtime value of the files. As git doesn't preserve it, GNU make + # thinks that it must re-generate the Makefile upon every execution + # because some m4 files do have the same mtime of Makefile.im. + PATH=${at_dest}/bin:${PATH} \ + ${SUB_MAKE} all -f ./Makefile || return ${?} + popd > /dev/null +} + +atcfg_make_check () { + # Package testing is not done on a cross build + if [[ "${cross_build}" == 'no' ]]; then + pushd build > /dev/null + # We're forced to use -f in order to work around an issue with the + # mtime value of the files. As git doesn't preserve it, GNU make + # thinks that it must re-generate the Makefile upon every execution + # because some m4 files do have the same mtime of Makefile.im. + PATH=${at_dest}/bin:${PATH} \ + ${SUB_MAKE} check -f ./Makefile || return ${?} + popd > /dev/null + fi +} + +atcfg_install () { + pushd build > /dev/null + # We're forced to use -f in order to work around an issue with the + # mtime value of the files. As git doesn't preserve it, GNU make + # thinks that it must re-generate the Makefile upon every execution + # because some m4 files do have the same mtime of Makefile.im. + PATH=${at_dest}/bin:${PATH} \ + make install DESTDIR=${install_place} -f ./Makefile \ + || return ${?} + popd > /dev/null +} + +atcfg_post_install() { + # Remove duplicated files prior final install when building + # for the alternate target because the main target already provide + # them. + local base_target=$(find_build_target ${AT_BIT_SIZE}) + if [[ "${base_target}" == "${alternate_target}" ]]; then + rm -rf ${install_place}/${at_dest}/{include,share} + fi +} diff --git a/configs/7.0/packages/python/python.mk b/configs/7.0/packages/python/python.mk new file mode 120000 index 000000000..fcfeba629 --- /dev/null +++ b/configs/7.0/packages/python/python.mk @@ -0,0 +1 @@ +../../../6.0/packages/python/python.mk \ No newline at end of file diff --git a/configs/7.0/packages/python/sources b/configs/7.0/packages/python/sources new file mode 120000 index 000000000..e4c7421dc --- /dev/null +++ b/configs/7.0/packages/python/sources @@ -0,0 +1 @@ +../../../6.0/packages/python/sources \ No newline at end of file diff --git a/configs/7.0/packages/python/specfile b/configs/7.0/packages/python/specfile new file mode 100644 index 000000000..d46c60911 --- /dev/null +++ b/configs/7.0/packages/python/specfile @@ -0,0 +1,14 @@ +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# diff --git a/configs/7.0/packages/python/stage_1 b/configs/7.0/packages/python/stage_1 new file mode 120000 index 000000000..57f5d695f --- /dev/null +++ b/configs/7.0/packages/python/stage_1 @@ -0,0 +1 @@ +../../../6.0/packages/python/stage_1 \ No newline at end of file diff --git a/configs/7.0/packages/tbb/sources b/configs/7.0/packages/tbb/sources new file mode 120000 index 000000000..e4e3e5ba0 --- /dev/null +++ b/configs/7.0/packages/tbb/sources @@ -0,0 +1 @@ +../../../6.0/packages/tbb/sources \ No newline at end of file diff --git a/configs/7.0/packages/tbb/specfile b/configs/7.0/packages/tbb/specfile new file mode 120000 index 000000000..6d0714007 --- /dev/null +++ b/configs/7.0/packages/tbb/specfile @@ -0,0 +1 @@ +../../../6.0/packages/tbb/specfile \ No newline at end of file diff --git a/configs/7.0/packages/tbb/stage_1 b/configs/7.0/packages/tbb/stage_1 new file mode 120000 index 000000000..08373d709 --- /dev/null +++ b/configs/7.0/packages/tbb/stage_1 @@ -0,0 +1 @@ +../../../6.0/packages/tbb/stage_1 \ No newline at end of file diff --git a/configs/7.0/packages/tbb/tbb.mk b/configs/7.0/packages/tbb/tbb.mk new file mode 120000 index 000000000..2783dea99 --- /dev/null +++ b/configs/7.0/packages/tbb/tbb.mk @@ -0,0 +1 @@ +../../../6.0/packages/tbb/tbb.mk \ No newline at end of file diff --git a/configs/7.0/packages/tcmalloc/sources b/configs/7.0/packages/tcmalloc/sources new file mode 100644 index 000000000..168b55384 --- /dev/null +++ b/configs/7.0/packages/tcmalloc/sources @@ -0,0 +1,44 @@ +#!/usr/bin/env bash +# +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# Tcmalloc source package and build info +# ================================== +# + +ATSRC_PACKAGE_NAME="TCMalloc" +ATSRC_PACKAGE_VER=2.0 +ATSRC_PACKAGE_REV=df239890 +ATSRC_PACKAGE_LICENSE="BSD License" +ATSRC_PACKAGE_DOCLINK="http://goog-perftools.sourceforge.net/doc/tcmalloc.html" +ATSRC_PACKAGE_RELFIXES= +ATSRC_PACKAGE_STR_VER="${ATSRC_PACKAGE_NAME} ${ATSRC_PACKAGE_VER}${ATSRC_PACKAGE_REV:+-${ATSRC_PACKAGE_REV}}" +ATSRC_PACKAGE_VERID="${ATSRC_PACKAGE_VER}${ATSRC_PACKAGE_REV:+-${ATSRC_PACKAGE_REV}}" +ATSRC_PACKAGE_PRE="test -d gperftools-${ATSRC_PACKAGE_VERID}" +ATSRC_PACKAGE_CO=([0]="wget -O gperftools-${ATSRC_PACKAGE_VERID}.tar.gz https://github.com/p-gperftools/gperftools/archive/${ATSRC_PACKAGE_REV}.tar.gz") +ATSRC_PACKAGE_GIT="" +# Use --transform to give a better name to Gperftools directory. +ATSRC_PACKAGE_POST="tar xzf gperftools-${ATSRC_PACKAGE_VERID}.tar.gz --transform=s/gperftools-${ATSRC_PACKAGE_REV}[^\\/]*/gperftools-${ATSRC_PACKAGE_VERID}/" +ATSRC_PACKAGE_SRC="${AT_BASE}/sources/gperftools-${ATSRC_PACKAGE_VERID}" +ATSRC_PACKAGE_WORK=${AT_WORK_PATH}/gperftools +ATSRC_PACKAGE_MLS="" +ATSRC_PACKAGE_ALOC="" +ATSRC_PACKAGE_PATCHES="" +ATSRC_PACKAGE_TARS="" +ATSRC_PACKAGE_MAKE_CHECK="" +ATSRC_PACKAGE_DISTRIB=no +ATSRC_PACKAGE_BUILDCROSS=no +ATSRC_PACKAGE_BUNDLE=toolchain diff --git a/configs/7.0/packages/tcmalloc/specfile b/configs/7.0/packages/tcmalloc/specfile new file mode 120000 index 000000000..f902019c2 --- /dev/null +++ b/configs/7.0/packages/tcmalloc/specfile @@ -0,0 +1 @@ +../../../6.0/packages/tcmalloc/specfile \ No newline at end of file diff --git a/configs/7.0/packages/tcmalloc/stage_1 b/configs/7.0/packages/tcmalloc/stage_1 new file mode 120000 index 000000000..86e92f920 --- /dev/null +++ b/configs/7.0/packages/tcmalloc/stage_1 @@ -0,0 +1 @@ +../../../6.0/packages/tcmalloc/stage_1 \ No newline at end of file diff --git a/configs/7.0/packages/tcmalloc/tcmalloc.mk b/configs/7.0/packages/tcmalloc/tcmalloc.mk new file mode 120000 index 000000000..f96053a3e --- /dev/null +++ b/configs/7.0/packages/tcmalloc/tcmalloc.mk @@ -0,0 +1 @@ +../../../6.0/packages/tcmalloc/tcmalloc.mk \ No newline at end of file diff --git a/configs/7.0/packages/valgrind/sources b/configs/7.0/packages/valgrind/sources new file mode 100644 index 000000000..00cfd3a73 --- /dev/null +++ b/configs/7.0/packages/valgrind/sources @@ -0,0 +1,70 @@ +#!/usr/bin/env bash +# +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# Valgrind source package and build info +# ====================================== +# + +ATSRC_PACKAGE_NAME="Valgrind" +ATSRC_PACKAGE_VER=3.9.0 +ATSRC_PACKAGE_REV= +ATSRC_PACKAGE_LICENSE="GPL 2.0" +ATSRC_PACKAGE_DOCLINK="http://valgrind.org/docs/" +ATSRC_PACKAGE_RELFIXES= +ATSRC_PACKAGE_STR_VER="${ATSRC_PACKAGE_NAME} ${ATSRC_PACKAGE_VER}" +ATSRC_PACKAGE_PRE="test -d valgrind-${ATSRC_PACKAGE_VER}" +ATSRC_PACKAGE_CO=([0]="wget http://valgrind.org/downloads/valgrind-${ATSRC_PACKAGE_VER}.tar.bz2") +ATSRC_PACKAGE_POST="tar -xjf valgrind-${ATSRC_PACKAGE_VER}.tar.bz2" +ATSRC_PACKAGE_SRC="${AT_BASE}/sources/valgrind-${ATSRC_PACKAGE_VER}" +ATSRC_PACKAGE_WORK=${AT_WORK_PATH}/valgrind +ATSRC_PACKAGE_MLS="" +ATSRC_PACKAGE_ALOC='' +ATSRC_PACKAGE_PATCHES='' +ATSRC_PACKAGE_TARS='' +ATSRC_PACKAGE_MAKE_CHECK= +ATSRC_PACKAGE_DISTRIB=yes +ATSRC_PACKAGE_BUILDCROSS=no +ATSRC_PACKAGE_BUNDLE=profile + +atsrc_get_patches () +{ + at_get_patch \ + https://github.com/powertechpreview/powertechpreview/raw/master/Valgrind%20Core%20Patches/3.9.0/vg-390-ppc64le-1.0.tar.gz \ + 4c7ce773c0626c218531ce3c26270f21 || return ${?} + at_get_patch \ + https://github.com/powertechpreview/powertechpreview/raw/master/Valgrind%20Core%20Patches/3.9.0/vg-390-gdb-testsuite.tgz \ + fc24e63c92ed2a3dfcbd13f21e229162 || return ${?} + at_get_patch \ + https://github.com/powertechpreview/powertechpreview/raw/master/Valgrind%20iTrace%20Patches/3.9/vg-390-itrace.v4.tgz \ + 5115a611998f851ea2eca859efea7c12 || return ${?} + at_get_patch \ + https://github.com/powertechpreview/powertechpreview/raw/master/Valgrind%20iTrace%20Patches/3.10/vg_3100_itrace-vi2qt-cl-parsing.tgz \ + c52826dc725f5acfbb79cc8059a8b5b6 || return ${?} +} + +atsrc_apply_patches () +{ + tar xzf vg-390-ppc64le-1.0.tar.gz || return ${?} + tar xzf vg-390-gdb-testsuite.tgz || return ${?} + tar xzf vg-390-itrace.v4.tgz || return ${?} + tar xzf vg_3100_itrace-vi2qt-cl-parsing.tgz || return ${?} + + patch -p1 < 0001-Port-for-ppc64-little-endian.patch || return ${?} + patch -p1 < vg-390-gdb-testsuite.patch || return ${?} + patch -p1 < vg-390-itrace.patch || return ${?} + patch -p1 < vg_3100_itrace-vi2qt-cl-parsing.patch || return ${?} +} diff --git a/configs/7.0/packages/valgrind/specfile b/configs/7.0/packages/valgrind/specfile new file mode 100644 index 000000000..d46c60911 --- /dev/null +++ b/configs/7.0/packages/valgrind/specfile @@ -0,0 +1,14 @@ +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# diff --git a/configs/7.0/packages/valgrind/stage_1 b/configs/7.0/packages/valgrind/stage_1 new file mode 120000 index 000000000..6dbc13444 --- /dev/null +++ b/configs/7.0/packages/valgrind/stage_1 @@ -0,0 +1 @@ +../../../6.0/packages/valgrind/stage_1 \ No newline at end of file diff --git a/configs/7.0/packages/valgrind/valgrind.mk b/configs/7.0/packages/valgrind/valgrind.mk new file mode 120000 index 000000000..1f34f2eea --- /dev/null +++ b/configs/7.0/packages/valgrind/valgrind.mk @@ -0,0 +1 @@ +../../../6.0/packages/valgrind/valgrind.mk \ No newline at end of file diff --git a/configs/7.0/packages/zlib/sources b/configs/7.0/packages/zlib/sources new file mode 120000 index 000000000..7c6c238d4 --- /dev/null +++ b/configs/7.0/packages/zlib/sources @@ -0,0 +1 @@ +../../../6.0/packages/zlib/sources \ No newline at end of file diff --git a/configs/7.0/packages/zlib/specfile b/configs/7.0/packages/zlib/specfile new file mode 120000 index 000000000..a3d03c4a4 --- /dev/null +++ b/configs/7.0/packages/zlib/specfile @@ -0,0 +1 @@ +../../../6.0/packages/zlib/specfile \ No newline at end of file diff --git a/configs/7.0/packages/zlib/stage_1 b/configs/7.0/packages/zlib/stage_1 new file mode 120000 index 000000000..fcc5f517c --- /dev/null +++ b/configs/7.0/packages/zlib/stage_1 @@ -0,0 +1 @@ +../../../6.0/packages/zlib/stage_1 \ No newline at end of file diff --git a/configs/7.0/packages/zlib/stage_optimized b/configs/7.0/packages/zlib/stage_optimized new file mode 120000 index 000000000..a5b1688d1 --- /dev/null +++ b/configs/7.0/packages/zlib/stage_optimized @@ -0,0 +1 @@ +../../../6.0/packages/zlib/stage_optimized \ No newline at end of file diff --git a/configs/7.0/packages/zlib/zlib.mk b/configs/7.0/packages/zlib/zlib.mk new file mode 120000 index 000000000..d3caa939c --- /dev/null +++ b/configs/7.0/packages/zlib/zlib.mk @@ -0,0 +1 @@ +../../../6.0/packages/zlib/zlib.mk \ No newline at end of file diff --git a/configs/7.0/release_notes/release_notes-body.html b/configs/7.0/release_notes/release_notes-body.html new file mode 100644 index 000000000..6875f0183 --- /dev/null +++ b/configs/7.0/release_notes/release_notes-body.html @@ -0,0 +1,259 @@ + + + + + + + + Release Notes for the Advance Toolchain __VERSION_RELEASE__ + + + +
    +
    + +

    Release Notes for the Advance Toolchain __VERSION_RELEASE__

    +
    +
    + | Features + | Previous Releases + | Support + | Installation + | Documentation + | Legal Notices | +
    +
    + __FEATURES__ + back to top +
    + +

    Support

    +

    Customer support for the Advance Toolchain (AT) is provided in one of three ways:

    +
      +
    1. If you are using AT as directed by an IBM product team (ex.: IBM XL Compiler or PowerVM Lx86) please report suspected AT problems to IBM Support using that product name and entitlement.
    2. +
    3. IBM's Support Line for Linux Offerings now provides support for the Advance Toolchain as well. If you have a contract with a Support Line for Linux, place a call to IBM Support, e.g. for United States: +
        +
      • Dial 1-800-426-IBM-SERV
      • +
      • Option #2 (Other business products or solutions)
      • +
      • Option #2 (Software)
      • +
      • Option #7 (Other OS/Linux)
      • +
      + For other countries click here. +
    4. +
    5. All other users can use an electronic forum that is monitored Monday through Friday. For questions regarding the use of or to report a suspected defect in AT, click here. +
        +
      • Log in.
      • +
      • Start a topic.
      • +
      • Enter and save your question or problem.
      • +
      • An initial response will be attempted within 2 business days.
      • +
    6. +
    + back to top +
    + +

    Installation

    + __INST__ +

    Manual installation

    +

    If you are installing the rpms manually you will need to install them in the following order (due to prerequisites):

    +

    + advance-toolchain-__VERSION__-runtime-__VERSION_RELEASE__
    + advance-toolchain-__VERSION__-devel-__VERSION_RELEASE__
    + advance-toolchain-__VERSION__-perf-__VERSION_RELEASE__
    + advance-toolchain-__VERSION__-mcore-libs-__VERSION_RELEASE__
    + advance-toolchain-__VERSION__-runtime-at__OLD_VERSION__-compat-__VERSION_RELEASE__
    +

    +

    If you are updating a previous installation, you need to update as a batch, so rpm can solve the dependencies, i.e.:

    +

    + rpm -Uvh advance-toolchain-__VERSION__-runtime-__VERSION_RELEASE__.ppc64.rpm \
    advance-toolchain-__VERSION__-devel-__VERSION_RELEASE__.ppc64.rpm \
    advance-toolchain-__VERSION__-perf-__VERSION_RELEASE__.ppc64.rpm \
    + advance-toolchain-__VERSION__-mcore-__VERSION_RELEASE__.ppc64.rpm \
    + advance-toolchain-__VERSION__-runtime-at__OLD_VERSION__-compat-__VERSION_RELEASE__.ppc64.rpm
    +

    +

    The rpm command should always be run as root. Failure to do so will result in an error similar to this:

    +

    + error: can't create transaction lock on /var/lib/rpm/__db.000 +

    +

    Important notes

    +
      +
    • Timezone files: If you need to use something different than Factory, then you should copy the timezone file you want from /opt/__VERSION__/share/zoneinfo to /opt/__VERSION__/etc/localtime
    • +
    • advance-toolchain-__VERSION__-runtime-compat-__VERSION_RELEASE__: DO NOT INSTALL it on SLES10 and beyond or RHEL5 and beyond. These are intended for runtime compatibility on SLES9 and RHEL4 only (see below).
    • +
    +

    Installation on SLES9 and RHEL4 - Runtime compatibility

    +

    Users running applications on SLES9 or RHEL4 may install the compatibility rpm advance-toolchain-__VERSION__-runtime-compat-__VERSION_RELEASE__ in order to get the Advance Toolchain runtime libraries.

    +

    Installation of the cross-compiler (x86)

    +

    You can download advance-toolchain-__VERSION__-cross-__VERSION_RELEASE__ and install in a x86 machine to build Power binaries on it. Binaries generated by the cross-compiler will run on a Power system with the same version of the Advance Toolchain installed.

    + back to top +
    + +

    Documentation

    +

    The official documentation for the Advance Toolchain is available at the IBM Power Linux Community website.

    + back to top +
    + + +

    Legal notices

    + +

    In order to comply with the GPL and LGPL licenses, the source code for the following packages is available:

    +
      +
    • binutils
    • +
    • gcc
    • +
    • gdb
    • +
    • glibc
    • +
    • gmp
    • +
    • Threading Building Blocks
    • +
    • libdfp
    • +
    • libhugetlbfs
    • +
    • linux kernel
    • +
    • mpc
    • +
    • mpfr
    • +
    • oprofile
    • +
    • Userspace RCU
    • +
    • Valgrind
    • +
    +

    Please look for the advance-toolchain-at00-src-0.0-0.tgz file in the repository.

    + +

    Amino CBB
    + Copyright (c) 2008 IBM Corporation

    +

    + Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
    + http://www.apache.org/licenses/LICENSE-2.0
    +
    + Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. +

    + +

    Expat
    + Copyright (c) 1998, 1999, 2000 Thai Open Source Software Center Ltd and Clark Cooper
    + Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006 Expat maintainers.

    +

    + Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
    +
    + The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
    +
    + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +

    + +

    Gperftools
    + Copyright (c) 2005, Google Inc. All rights reserved.

    +

    + Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
    +
    + * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
    + * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
    + * Neither the name of Google Inc. nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
    +
    + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +

    + +

    Libauxv
    +

    +

    + Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
    +
    + * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
    + * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
    + * Neither the name of the IBM Corporation nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
    +
    + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL IBM CORPORATION BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +

    + +

    Libpfm
    + Copyright (c) 2002-2006 Hewlett-Packard Development Company, L.P.

    +

    + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions:
    +
    + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software.
    +
    + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, + INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A + PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT + HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF + CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE + OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
    +

    + +

    OpenSSL
    + Copyright (c) 1998-2011 The OpenSSL Project. All rights reserved.
    + Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com). All rights reserved.

    +

    * Note: this distribution of OpenSSL does not include the IDEA and RC5 algorithms

    +

    + Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
    +
    + 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
    +
    + 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
    +
    + 3. All advertising materials mentioning features or use of this software must display the following acknowledgment: "This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
    +
    + 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to endorse or promote products derived from this software without prior written permission. For written permission, please contact openssl-core@openssl.org.
    +
    + 5. Products derived from this software may not be called "OpenSSL" nor may "OpenSSL" appear in their names without prior written permission of the OpenSSL Project.
    +
    + 6. Redistributions of any form whatsoever must retain the following acknowledgment: "This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit (http://www.openssl.org/)"
    +
    + THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
    +
    + This product includes cryptographic software written by Eric Young (eay@cryptsoft.com). This product includes software written by Tim Hudson (tjh@cryptsoft.com). +

    + +

    + PAFLib
    + Copyright IBM Corp. 2013 +

    +

    +Permission is hereby granted, free of charge, to any person obtaining a copy
    +of this software and associated documentation files (the "Software"), to deal
    +in the Software without restriction, including without limitation the rights
    +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
    +copies of the Software, and to permit persons to whom the Software is
    +furnished to do so, subject to the following conditions:
    +
    +The above copyright notice and this permission notice shall be included in
    +all copies or substantial portions of the Software.
    +
    +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
    +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
    +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
    +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
    +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM
    , +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
    +THE SOFTWARE. +

    + +

    Python
    + Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Python Software Foundation; All Rights Reserved

    +

    + PYTHON SOFTWARE FOUNDATION LICENSE VERSION 2
    + --------------------------------------------
    +
    + 1. This LICENSE AGREEMENT is between the Python Software Foundation ("PSF"), and the Individual or Organization ("Licensee") accessing and otherwise using this software ("Python") in source or binary form and its associated documentation.
    +
    + 2. Subject to the terms and conditions of this License Agreement, PSF hereby grants Licensee a nonexclusive, royalty-free, world-wide license to reproduce, analyze, test, perform and/or display publicly, prepare derivative works, distribute, and otherwise use Python alone or in any derivative version, provided, however, that PSF's License Agreement and PSF's notice of copyright, i.e., "Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Python Software Foundation; All Rights Reserved" are retained in Python alone or in any derivative version prepared by Licensee.
    +
    + 3. In the event Licensee prepares a derivative work that is based on or incorporates Python or any part thereof, and wants to make the derivative work available to others as provided herein, then Licensee hereby agrees to include in any such work a brief summary of the changes made to Python.
    +
    + 4. PSF is making Python available to Licensee on an "AS IS" basis. PSF MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED. BY WAY OF EXAMPLE, BUT NOT LIMITATION, PSF MAKES NO AND DISCLAIMS ANY REPRESENTATION OR WARRANTY OF MERCHANTABILITY OR FITNESS FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF PYTHON WILL NOT INFRINGE ANY THIRD PARTY RIGHTS.
    +
    + 5. PSF SHALL NOT BE LIABLE TO LICENSEE OR ANY OTHER USERS OF PYTHON FOR ANY INCIDENTAL, SPECIAL, OR CONSEQUENTIAL DAMAGES OR LOSS AS A RESULT OF MODIFYING, DISTRIBUTING, OR OTHERWISE USING PYTHON, OR ANY DERIVATIVE THEREOF, EVEN IF ADVISED OF THE POSSIBILITY THEREOF.
    +
    + 6. This License Agreement will automatically terminate upon a material breach of its terms and conditions.
    +
    + 7. Nothing in this License Agreement shall be deemed to create any relationship of agency, partnership, or joint venture between PSF and Licensee. This License Agreement does not grant permission to use PSF trademarks or trade name in a trademark sense to endorse or promote products or services of Licensee, or any third party.
    +
    + 8. By copying, installing or otherwise using Python, Licensee agrees to be bound by the terms and conditions of this License Agreement. +

    + +

    SPHDE
    + Copyright (c) 2012 IBM Corporation

    +

    Distributed through the Eclipse Public License 1.0. The source code for this project is available on GitHub.

    + +
    +
    + + diff --git a/configs/7.0/release_notes/release_notes-features.html b/configs/7.0/release_notes/release_notes-features.html new file mode 120000 index 000000000..423b76b47 --- /dev/null +++ b/configs/7.0/release_notes/release_notes-features.html @@ -0,0 +1 @@ +../../6.0/release_notes/release_notes-features.html \ No newline at end of file diff --git a/configs/7.0/release_notes/release_notes-group_entry.html b/configs/7.0/release_notes/release_notes-group_entry.html new file mode 120000 index 000000000..a70e0431f --- /dev/null +++ b/configs/7.0/release_notes/release_notes-group_entry.html @@ -0,0 +1 @@ +../../6.0/release_notes/release_notes-group_entry.html \ No newline at end of file diff --git a/configs/7.0/release_notes/release_notes-inst.html b/configs/7.0/release_notes/release_notes-inst.html new file mode 120000 index 000000000..17e3442c3 --- /dev/null +++ b/configs/7.0/release_notes/release_notes-inst.html @@ -0,0 +1 @@ +../../6.0/release_notes/release_notes-inst.html \ No newline at end of file diff --git a/configs/7.0/release_notes/release_notes-online_doc.html b/configs/7.0/release_notes/release_notes-online_doc.html new file mode 120000 index 000000000..f186077c8 --- /dev/null +++ b/configs/7.0/release_notes/release_notes-online_doc.html @@ -0,0 +1 @@ +../../6.0/release_notes/release_notes-online_doc.html \ No newline at end of file diff --git a/configs/7.0/release_notes/release_notes-package_line.html b/configs/7.0/release_notes/release_notes-package_line.html new file mode 120000 index 000000000..2e6e881b3 --- /dev/null +++ b/configs/7.0/release_notes/release_notes-package_line.html @@ -0,0 +1 @@ +../../6.0/release_notes/release_notes-package_line.html \ No newline at end of file diff --git a/configs/7.0/release_notes/release_notes-style.html b/configs/7.0/release_notes/release_notes-style.html new file mode 120000 index 000000000..7bf6a908c --- /dev/null +++ b/configs/7.0/release_notes/release_notes-style.html @@ -0,0 +1 @@ +../../6.0/release_notes/release_notes-style.html \ No newline at end of file diff --git a/configs/7.0/release_notes/relfixes.html b/configs/7.0/release_notes/relfixes.html new file mode 100644 index 000000000..b55b6f852 --- /dev/null +++ b/configs/7.0/release_notes/relfixes.html @@ -0,0 +1,224 @@ +
  • POWER8 enablement.
  • +
  • POWER8 Optimized scheduler.
  • +
  • Requires at least POWER7.
  • +
  • POWER8 Transactional Memory enablement.
  • +
  • POWER8 Crypto Operations enablement.
  • +
  • POWER8 Fusion enablement.
  • +
  • POWER8 optimized system libraries.
  • +
  • GCC creates binaries using --mcpu=power7 --mtune=power8 by default.
  • +
  • Support for AES instructions on OpenSSL.
  • + +

    Apart from package versions listed above:

    + +

    New features in 7.0-10

    + + + +

    Previous releases

    + +

    New features in 7.0-9

    + + +

    New features in 7.0-8

    + + +

    New features in 7.0-7

    + + +

    New features in 7.0-6

    + + +

    New features in 7.0-5

    +
      +
    • Enable plugins support on Binutils.
    • +
    • GCC fix to avoid discarding the file name information when using -imacros.
    • +
    • + OProfile fixes for the following issues: +
        +
      • Update events for IBM POWER8 processor.
      • +
      +
    • +
    • Fix for Valgrind itrace not tracing the first call to library functions.
    • +
    • Fix the usage of xl_base when preparing IBM XL compilers' settings.
    • +
    + +

    New features in 7.0-4

    +
      +
    • + Binutils fixes references to __ehdr_start. +
    • +
    • + GCC changes for the following: + +
    • +
    • + GDB adds support for the new auxv entry AT_HWCAP2. +
    • +
    • + Libdfp fixes for the following issues: +
        +
      • Fix issignaling for PowerPC DFP for zero inputs.
      • +
      • Add missing fpclassify prototypes.
      • +
      +
    • +
    • + OProfile fixes for the following issues: +
        +
      • opreport from 'operf --callgraph' profile shows incorrect recursive calls.
      • +
      • Fix "Unable to open cpu_type file for reading" for IBM POWER7+.
      • +
      • Fix regression in IBM POWER8 running in POWER7 compat mode.
      • +
      • Make operf/ocount detect invalid timer mode from opcontrol.
      • +
      • Fix up event codes for marked architected events.
      • +
      • Plug timing hole between JIT agent and opjitconv that can corrupt dump.
      • +
      • Enhance ocount to support millisecond time intervals.
      • +
      +
    • +
    • + SPHDE fixes for the following issues: +
        +
      • Reset MMCR0 independently of PAF_EBB_FLAGS_RESET_PMU in the Event Based Branching.
      • +
      • Fix paf enable/disable branches by avoid to set/reset the Global Enable (GE) bit in the Event Based Branching.
      • +
      +
    • +
    + +

    New features in 7.0-3

    + + +

    New features in 7.0-2

    + + + +

    New features in 7.0-1

    + + +

    New features in 7.0-0

    +
      +
    • OProfile includes ocount, an event counting tool.
    • +
    • Valgrind fixes unhandled syscalls 171 and 259.
    • +
    diff --git a/configs/7.0/sanity.mk b/configs/7.0/sanity.mk new file mode 100644 index 000000000..9b6bc17b2 --- /dev/null +++ b/configs/7.0/sanity.mk @@ -0,0 +1,19 @@ +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# This file holds some sanity checks to run on the build machine, to verify +# its general required components for the building process. +define base_sanity + echo "Base sanity checks passed." +endef \ No newline at end of file diff --git a/configs/7.0/specs/main.spec b/configs/7.0/specs/main.spec new file mode 120000 index 000000000..6947c5984 --- /dev/null +++ b/configs/7.0/specs/main.spec @@ -0,0 +1 @@ +../../6.0/specs/main.spec \ No newline at end of file diff --git a/configs/7.0/specs/metapkgs.spec b/configs/7.0/specs/metapkgs.spec new file mode 120000 index 000000000..1827a6aed --- /dev/null +++ b/configs/7.0/specs/metapkgs.spec @@ -0,0 +1 @@ +../../6.0/specs/metapkgs.spec \ No newline at end of file diff --git a/configs/7.0/specs/monolithic.spec b/configs/7.0/specs/monolithic.spec new file mode 120000 index 000000000..cdc14155c --- /dev/null +++ b/configs/7.0/specs/monolithic.spec @@ -0,0 +1 @@ +../../6.0/specs/monolithic.spec \ No newline at end of file diff --git a/configs/7.0/specs/monolithic_at-compat.spec b/configs/7.0/specs/monolithic_at-compat.spec new file mode 120000 index 000000000..d41db2b67 --- /dev/null +++ b/configs/7.0/specs/monolithic_at-compat.spec @@ -0,0 +1 @@ +../../6.0/specs/monolithic_at-compat.spec \ No newline at end of file diff --git a/configs/7.0/specs/monolithic_compat.spec b/configs/7.0/specs/monolithic_compat.spec new file mode 120000 index 000000000..433bbbdf4 --- /dev/null +++ b/configs/7.0/specs/monolithic_compat.spec @@ -0,0 +1 @@ +../../6.0/specs/monolithic_compat.spec \ No newline at end of file diff --git a/configs/7.0/specs/monolithic_cross.spec b/configs/7.0/specs/monolithic_cross.spec new file mode 120000 index 000000000..b09683802 --- /dev/null +++ b/configs/7.0/specs/monolithic_cross.spec @@ -0,0 +1 @@ +../../6.0/specs/monolithic_cross.spec \ No newline at end of file diff --git a/configs/7.1/arch/default.mk b/configs/7.1/arch/default.mk new file mode 100644 index 000000000..a9652a851 --- /dev/null +++ b/configs/7.1/arch/default.mk @@ -0,0 +1,47 @@ +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Default settings for all scenarios. +# Define at least BUILD_TARGET_ARCH* before including this file. + +# Generate code with non-executable .plt and .got sections for powerpc-linux. +SECURE_PLT ?= secure-plt + +# DEFAULT_CPU is used by gcc in order to set the default value of -m[32|64] +DEFAULT_CPU ?= default32 + +# Generate 32-bit binaries by default when not set. +# This is a legacy value. +COMPILER ?= 32 + +# We only build for Linux + glibc. +BUILD_TARGET_OSLIB ?= linux-gnu +CANONICALIZED_MACHINE := $(BUILD_TARGET_OSLIB) +CANONICALIZED_NAME_ID := $(CANONICALIZED_MACHINE)$(BUILD_TARGET_POSTFIX) + +ifdef BUILD_TARGET_ARCH32 + # Name of the target used when installing headers. It may be the name of the + # directory or a prefix of the name. + HEADER_TARGET ?= ppc + CTARGET_32 := $(BUILD_TARGET_ARCH32)-$(CANONICALIZED_NAME_ID) + TARGET32 := $(CTARGET_32) +endif + +ifdef BUILD_TARGET_ARCH64 + # Name of the target used when installing headers. It may be the name of the + # directory or a prefix of the name. + HEADER_TARGET64 ?= ppc64 + CTARGET_64 := $(BUILD_TARGET_ARCH64)-$(CANONICALIZED_NAME_ID) + TARGET64 := $(CTARGET_64) +endif diff --git a/configs/7.1/arch/i686.ppc64.mk b/configs/7.1/arch/i686.ppc64.mk new file mode 100644 index 000000000..2fbeaaff9 --- /dev/null +++ b/configs/7.1/arch/i686.ppc64.mk @@ -0,0 +1,31 @@ +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Set default variables when host=i686 targeting ppc64. + +# Generate 64-bit binaries by default. +COMPILER := 64 +BUILD_TARGET_ARCH32 := powerpc +BUILD_TARGET_ARCH64 := powerpc64 + +include $(CONFIG)/arch/default.mk +HOST := $(HOST_ARCH)-pc-linux-gnu + +CROSS_BUILD := yes +ENV_BUILD_ARCH := 32 + +# Re-define previously declared variables +DEFAULT_CPU := default64 +TARGET := $(CTARGET_64) +ALTERNATE_TARGET := $(CTARGET_32) diff --git a/configs/7.1/arch/i686.ppc64le.mk b/configs/7.1/arch/i686.ppc64le.mk new file mode 100644 index 000000000..27e1ee8bb --- /dev/null +++ b/configs/7.1/arch/i686.ppc64le.mk @@ -0,0 +1,37 @@ +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Set default variables when host=i686 targeting ppc64le. + +# Generate 64-bit binaries by default. +COMPILER := 64 +# We only build for 64 bits on little endian, because its ABI doesn't support +# 32-bit mode. +BUILD_TARGET_ARCH64 := powerpc64le + +include $(CONFIG)/arch/default.mk +HOST := $(HOST_ARCH)-pc-linux-gnu + +DEFAULT_CPU := default64 +HEADER_TARGET64 := ppc64le +TARGET := $(CTARGET_64) + +CROSS_BUILD := yes +ENV_BUILD_ARCH := 32 + +# Change the default sysroot path in order to not conflict with other builds. +DEST_CROSS=$(strip $(shell $(call mkpath,$(AT_DEST)/$(BUILD_ARCH),no))) + +# Don't build 32-bit libraries when targeting 64-bit only. +DISABLE_MULTILIB := yes diff --git a/configs/7.1/arch/ppc64.ppc64.mk b/configs/7.1/arch/ppc64.ppc64.mk new file mode 120000 index 000000000..60337668d --- /dev/null +++ b/configs/7.1/arch/ppc64.ppc64.mk @@ -0,0 +1 @@ +../../7.0/arch/ppc64.ppc64.mk \ No newline at end of file diff --git a/configs/7.1/arch/ppc64le.ppc64le.mk b/configs/7.1/arch/ppc64le.ppc64le.mk new file mode 100644 index 000000000..a0ddccda7 --- /dev/null +++ b/configs/7.1/arch/ppc64le.ppc64le.mk @@ -0,0 +1,34 @@ +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Set default variables when host=ppc64le, targeting ppc64le. + +# Generate 64-bit binaries by default. +COMPILER := 64 +# We only build for 64 bits on little endian, because its ABI doesn't support +# 32-bit mode. +BUILD_TARGET_ARCH64 := powerpc64le + +include $(CONFIG)/arch/default.mk + +TARGET := $(CTARGET_64) +HEADER_TARGET64 := ppc64le +DEFAULT_CPU := default64 +HOST := $(CTARGET_64) + +CROSS_BUILD := no +ENV_BUILD_ARCH := 64 + +# Don't build 32-bit libraries when targeting 64-bit only. +DISABLE_MULTILIB := yes diff --git a/configs/7.1/arch/x86_64.ppc64.mk b/configs/7.1/arch/x86_64.ppc64.mk new file mode 100644 index 000000000..ae15cd410 --- /dev/null +++ b/configs/7.1/arch/x86_64.ppc64.mk @@ -0,0 +1,31 @@ +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Set default variables when host=x86_64 targeting ppc64. + +# Generate 64-bit binaries by default. +COMPILER := 64 +BUILD_TARGET_ARCH32 := powerpc +BUILD_TARGET_ARCH64 := powerpc64 + +include $(CONFIG)/arch/default.mk +HOST := $(HOST_ARCH)-pc-linux-gnu + +CROSS_BUILD := yes +ENV_BUILD_ARCH := 64 + +# Re-define previously declared variables +DEFAULT_CPU := default64 +TARGET := $(CTARGET_64) +ALTERNATE_TARGET := $(CTARGET_32) diff --git a/configs/7.1/arch/x86_64.ppc64le.mk b/configs/7.1/arch/x86_64.ppc64le.mk new file mode 100644 index 000000000..ab3431ae0 --- /dev/null +++ b/configs/7.1/arch/x86_64.ppc64le.mk @@ -0,0 +1,37 @@ +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Set default variables when host=x86_64 targeting ppc64le. + +# Generate 64-bit binaries by default. +COMPILER := 64 +# We only build for 64 bits on little endian, because its ABI doesn't support +# 32-bit mode. +BUILD_TARGET_ARCH64 := powerpc64le + +include $(CONFIG)/arch/default.mk +HOST := $(HOST_ARCH)-pc-linux-gnu + +DEFAULT_CPU := default64 +HEADER_TARGET64 := ppc64le +TARGET := $(CTARGET_64) + +CROSS_BUILD := yes +ENV_BUILD_ARCH := 64 + +# Change the default sysroot path in order to not conflict with other builds. +DEST_CROSS=$(strip $(shell $(call mkpath,$(AT_DEST)/$(BUILD_ARCH),no))) + +# Don't build 32-bit libraries when targeting 64-bit only. +DISABLE_MULTILIB := yes diff --git a/configs/7.1/base.mk b/configs/7.1/base.mk new file mode 100644 index 000000000..3fc5e8219 --- /dev/null +++ b/configs/7.1/base.mk @@ -0,0 +1,52 @@ +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Basic build version definitions +# =============================== +# This Makefile include contains the config options included at the beginning +# of the build process that govern the subsequent generated package name, +# version and other dependent internal build variables. +# It also states which distros the build is compatible with, so that it can be +# validated at build time, as well as heuristicaly find the proper repo path +# to put the final rpms generated by the build system. + +# Versioning description +# ====================== +# +# - AT_NAME: Final build Advance Toolchain package name. +# +# - AT_MAJOR_VERSION: Changes whenever the compiler or the ABI changes. +# Should be in X.Y format, where X=compiler change, +# Y=ABI change within that compiler change cycle. All +# first major releases should be X.0. Then, if the ABI +# changes, increment the second digit (i.e. X.1). +# +# - AT_REVISION_NUMBER: The revision number. Starts at 0 and is incremented +# whenever a new official build that doesn't change the +# compiler version or the ABI is required. +# +# - AT_INTERNAL: Tag for internal releases (i.e. alpha, beta, rc). For +# GM or external releases, it should be "none". +# +# - AT_DIR_NAME: Optional name of the directory. If not defined, will +# use a combination of ATNAME, AT_MAJOR_VERSION, +# AT_INTERNAL and AT_REVISION_NUMBER. +# +# - AT_PREVIOUS_VERSION Previous compatible AT version supported (It may be +# further restricted by distro specific settings) +AT_NAME := at +AT_MAJOR_VERSION := 7.1 +AT_REVISION_NUMBER := 5 +AT_INTERNAL := none +AT_PREVIOUS_VERSION := 7.0 diff --git a/configs/7.1/build.mk b/configs/7.1/build.mk new file mode 100644 index 000000000..1df89de10 --- /dev/null +++ b/configs/7.1/build.mk @@ -0,0 +1,63 @@ +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generic build support options +# ============================= +# Most of these options are self explanatory, Some highlights on obscure ones +# - BUILD_ARCH must contain the target toolchain arch (ppc64/ppc32) +# - BUILD_LOAD_ARCH tell us the CPU base to use for loader compatibility (GLIBC). +# - BUILD_BASE_ARCH tell us the CPU base to use for base code generation (GCC). +# - BUILD_OPTIMIZATION tells which is the default base optimization level (GCC). +# - BUILD_WITH_LONGDOUBLE tells us to build with support for longdoubles. +# - BUILD_WITH_DFP_STANDALONE tells us to build with libdfp as standalone library. +# - BUILD_RPM_PACKAGER tells us the name / email of packager for this release. +# - BUILD_RPMS must be set to "granular" or "monolithic" to indicate the kind of +# rpms to be generated by the build script. See the documentation notes. + +# When running on ppc64le, BUILD_ARCH defaults to ppc64le +# In the rest, it defaults to ppc64. +ifeq ($(HOST_ARCH),ppc64le) + BUILD_ARCH ?= ppc64le +endif +BUILD_ARCH ?= ppc64 + +BUILD_LOAD_ARCH := power7 +BUILD_BASE_ARCH := power7 +BUILD_OPTIMIZATION := power8 +BUILD_WITH_LONGDOUBLE := yes +BUILD_WITH_DFP_STANDALONE := yes +BUILD_RPM_PACKAGER := +BUILD_RPM_VENDOR := +BUILD_RPMS := monolithic +BUILD_GCC_LANGUAGES := c,c++,fortran,go + +# List supported CPUs to build for active, compat and embed +# ========================================================= +# - List of valid CPUs for active and compat: +# * power4, power5, power5+, power6, power6x and power7 +BUILD_ACTIVE_MULTILIBS := power8 + +# Download options +# ================ +# Should be either 'yes' or 'no'. Mostly self explanatory options. +# - BUILD_GET_SOURCES tell us to force grab sources +# - BUILD_GET_MPS tell us to grab patches from mailing lists +# - BUILD_GET_ADDONS tell us to grab related package addons +# - BUILD_EXCLUSIVE_CROSS tell us that the build is *exclusively* cross +# - BUILD_DEFAULT_RETRIES tell the default number of retries when fetching sources +BUILD_GET_SOURCES := yes +BUILD_GET_MPS := yes +BUILD_GET_ADDONS := yes +BUILD_EXCLUSIVE_CROSS := no +BUILD_DEFAULT_RETRIES := 5 diff --git a/configs/7.1/deb/monolithic/changelog b/configs/7.1/deb/monolithic/changelog new file mode 100644 index 000000000..2a9180fa9 --- /dev/null +++ b/configs/7.1/deb/monolithic/changelog @@ -0,0 +1,20 @@ +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +advance-toolchain-__AT_MAJOR_INTERNAL__ (__AT_FULL_VER__) experimental; urgency=low + + * Release of Advance Toolchain __AT_FULL_VER__ + + + -- Advance Toolchain __DATE__ diff --git a/configs/7.1/deb/monolithic/compat b/configs/7.1/deb/monolithic/compat new file mode 100644 index 000000000..f11c82a4c --- /dev/null +++ b/configs/7.1/deb/monolithic/compat @@ -0,0 +1 @@ +9 \ No newline at end of file diff --git a/configs/7.1/deb/monolithic/control b/configs/7.1/deb/monolithic/control new file mode 100644 index 000000000..1cc6bcfd2 --- /dev/null +++ b/configs/7.1/deb/monolithic/control @@ -0,0 +1,98 @@ +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +Source: advance-toolchain-__AT_MAJOR_INTERNAL__ +Section: devel +Priority: extra +Maintainer: Advance Toolchain + +Package: advance-toolchain-runtime +Architecture: ppc64el +Pre-Depends: advance-toolchain-__AT_MAJOR_INTERNAL__-runtime (= __AT_FULL_VER__) +Description: Advance Toolchain + The advance toolchain is a self contained toolchain which provides preview + toolchain functionality in GCC, binutils, GLIBC, GDB, Valgrind, and OProfile. + +Package: advance-toolchain-__AT_MAJOR_INTERNAL__-runtime +Architecture: ppc64el +Depends: ${shlibs:Depends} ${misc:Depends} +Description: Advance Toolchain + The advance toolchain is a self contained toolchain which provides preview + toolchain functionality in GCC, binutils, GLIBC, GDB, Valgrind, and OProfile. + +Package: advance-toolchain-__AT_MAJOR_INTERNAL__-runtime-compat +Architecture: ppc64el +Conflicts: advance-toolchain-__AT_MAJOR_INTERNAL__-runtime +Depends: ${shlibs:Depends} +Description: Advance Toolchain + The advance toolchain is a self contained toolchain which provides preview + toolchain functionality in GCC, binutils, GLIBC, GDB, Valgrind, and OProfile. + +Package: advance-toolchain-devel +Architecture: ppc64el +Pre-Depends: advance-toolchain-__AT_MAJOR_INTERNAL__-devel (= __AT_FULL_VER__) +Depends: ${shlibs:Depends} ${misc:Depends} +Description: Advance Toolchain + The advance toolchain is a self contained toolchain which provides preview + toolchain functionality in GCC, binutils, GLIBC, GDB, Valgrind, and OProfile. + This package provides the packages necessary to build applications that use the + features provided by the Advance Toolchain. + +Package: advance-toolchain-__AT_MAJOR_INTERNAL__-devel +Architecture: ppc64el +Pre-Depends: advance-toolchain-__AT_MAJOR_INTERNAL__-runtime (= __AT_FULL_VER__) +Depends: ${shlibs:Depends} ${misc:Depends} +Description: Advance Toolchain + The advance toolchain is a self contained toolchain which provides preview + toolchain functionality in GCC, binutils, GLIBC, GDB, Valgrind, and OProfile. + This package provides the packages necessary to build applications that use the + features provided by the Advance Toolchain. + +Package: advance-toolchain-mcore-libs +Architecture: ppc64el +Pre-Depends: advance-toolchain-__AT_MAJOR_INTERNAL__-mcore-libs (= __AT_FULL_VER__) +Description: Advance Toolchain + The advance toolchain is a self contained toolchain which provides preview + toolchain functionality in GCC, binutils, GLIBC, GDB, Valgrind, and OProfile. + This package provides the necessary libraries to build multi-threaded + applications. + +Package: advance-toolchain-__AT_MAJOR_INTERNAL__-mcore-libs +Architecture: ppc64el +Pre-Depends: advance-toolchain-__AT_MAJOR_INTERNAL__-runtime (= __AT_FULL_VER__) +Depends: ${shlibs:Depends} ${misc:Depends} +Description: Advance Toolchain + The advance toolchain is a self contained toolchain which provides preview + toolchain functionality in GCC, binutils, GLIBC, GDB, Valgrind, and OProfile. + This package provides the necessary libraries to build multi-threaded + applications. + +Package: advance-toolchain-perf +Architecture: ppc64el +Pre-Depends: advance-toolchain-__AT_MAJOR_INTERNAL__-perf (= __AT_FULL_VER__) +Description: Advance Toolchain + The advance toolchain is a self contained toolchain which provides preview + toolchain functionality in GCC, binutils, GLIBC, GDB, Valgrind, and OProfile. + This package contains the performance library install targets for Valgrind + and OProfile. + +Package: advance-toolchain-__AT_MAJOR_INTERNAL__-perf +Architecture: ppc64el +Pre-Depends: advance-toolchain-__AT_MAJOR_INTERNAL__-runtime (= __AT_FULL_VER__) +Depends: ${shlibs:Depends} ${misc:Depends} +Description: Advance Toolchain + The advance toolchain is a self contained toolchain which provides preview + toolchain functionality in GCC, binutils, GLIBC, GDB, Valgrind, and OProfile. + This package contains the performance library install targets for Valgrind + and OProfile. diff --git a/configs/7.1/deb/monolithic/copyright b/configs/7.1/deb/monolithic/copyright new file mode 100644 index 000000000..afc208b5c --- /dev/null +++ b/configs/7.1/deb/monolithic/copyright @@ -0,0 +1,46 @@ +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +License: GPL, LGPL + +Files: __AT_DEST__/scripts/* +License: BSD-3-clause +Copyright (c) 2016, IBM Corporation +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +3. Neither the name of the copyright holder nor the names of its contributors +may be used to endorse or promote products derived from this software without +specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/configs/7.1/deb/monolithic/devel.postinst b/configs/7.1/deb/monolithic/devel.postinst new file mode 100644 index 000000000..86cca5c77 --- /dev/null +++ b/configs/7.1/deb/monolithic/devel.postinst @@ -0,0 +1,29 @@ +#!/bin/bash +# +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +if [[ "${1}" == configure ]]; then + for INFO in $(ls __AT_DEST__/share/info/*.info.gz); do + ginstall-info ${INFO} \ + __AT_DEST__/share/info/dir > /dev/null 2>&1 || : + done + + # Run this setup script right after install + __AT_DEST__/scripts/at-create-ibmcmp-cfg.sh + + # Update ld.so.cache + [[ -f __AT_DEST__/sbin/ldconfig ]] && __AT_DEST__/sbin/ldconfig +fi diff --git a/configs/7.1/deb/monolithic/devel.postrm b/configs/7.1/deb/monolithic/devel.postrm new file mode 100644 index 000000000..33cad1f5d --- /dev/null +++ b/configs/7.1/deb/monolithic/devel.postrm @@ -0,0 +1,24 @@ +#!/bin/bash +# +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +if [[ "${1}" == configure ]]; then + # Update the loader cache after uninstall + # We never know the order rpm is going to remove/update AT's packages. + # So we only need to update the ldconf cache when ldconfig is still + # available + [[ -f __AT_DEST__/sbin/ldconfig ]] && __AT_DEST__/sbin/ldconfig +fi diff --git a/configs/7.1/deb/monolithic/devel.prerm b/configs/7.1/deb/monolithic/devel.prerm new file mode 100644 index 000000000..a74958821 --- /dev/null +++ b/configs/7.1/deb/monolithic/devel.prerm @@ -0,0 +1,24 @@ +#!/bin/bash +# +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +if [[ "${1}" == remove ]]; then + # Update our non standard info dir + for INFO in $(ls __AT_DEST__/share/info/*.info.gz); do + ginstall-info --delete ${INFO} \ + __AT_DEST__/share/info/dir > /dev/null 2>&1 || : + done +fi diff --git a/configs/7.1/deb/monolithic/mcore-libs.postinst b/configs/7.1/deb/monolithic/mcore-libs.postinst new file mode 100644 index 000000000..3b7fb0ff6 --- /dev/null +++ b/configs/7.1/deb/monolithic/mcore-libs.postinst @@ -0,0 +1,21 @@ +#!/bin/bash +# +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +if [[ "${1}" == configure ]]; then + # Update ld.so.cache + [[ -f __AT_DEST__/sbin/ldconfig ]] && __AT_DEST__/sbin/ldconfig +fi diff --git a/configs/7.1/deb/monolithic/mcore-libs.postrm b/configs/7.1/deb/monolithic/mcore-libs.postrm new file mode 100644 index 000000000..33cad1f5d --- /dev/null +++ b/configs/7.1/deb/monolithic/mcore-libs.postrm @@ -0,0 +1,24 @@ +#!/bin/bash +# +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +if [[ "${1}" == configure ]]; then + # Update the loader cache after uninstall + # We never know the order rpm is going to remove/update AT's packages. + # So we only need to update the ldconf cache when ldconfig is still + # available + [[ -f __AT_DEST__/sbin/ldconfig ]] && __AT_DEST__/sbin/ldconfig +fi diff --git a/configs/7.1/deb/monolithic/perf.postinst b/configs/7.1/deb/monolithic/perf.postinst new file mode 100644 index 000000000..3b7fb0ff6 --- /dev/null +++ b/configs/7.1/deb/monolithic/perf.postinst @@ -0,0 +1,21 @@ +#!/bin/bash +# +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +if [[ "${1}" == configure ]]; then + # Update ld.so.cache + [[ -f __AT_DEST__/sbin/ldconfig ]] && __AT_DEST__/sbin/ldconfig +fi diff --git a/configs/7.1/deb/monolithic/perf.postrm b/configs/7.1/deb/monolithic/perf.postrm new file mode 100644 index 000000000..33cad1f5d --- /dev/null +++ b/configs/7.1/deb/monolithic/perf.postrm @@ -0,0 +1,24 @@ +#!/bin/bash +# +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +if [[ "${1}" == configure ]]; then + # Update the loader cache after uninstall + # We never know the order rpm is going to remove/update AT's packages. + # So we only need to update the ldconf cache when ldconfig is still + # available + [[ -f __AT_DEST__/sbin/ldconfig ]] && __AT_DEST__/sbin/ldconfig +fi diff --git a/configs/7.1/deb/monolithic/rules b/configs/7.1/deb/monolithic/rules new file mode 100755 index 000000000..f7d2a2e7b --- /dev/null +++ b/configs/7.1/deb/monolithic/rules @@ -0,0 +1,63 @@ +#!/usr/bin/make -f +# +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +PACKAGES=$(shell dh_listpackages) + +build: + dh_testdir + dh_testroot + dh_prep + +clean: + dh_testdir + dh_testroot + dh_clean -d + +binary-indep: build + +binary-arch: build binary-cp + dh_installdirs + dh_installdocs + dh_installchangelogs + +# Copy the packages' files. + dh_install --fail-missing + + dh_compress + dh_makeshlibs --version-info + dh_installdeb + dh_shlibdeps + dh_gencontrol + dh_md5sums + dh_builddeb + +binary-cp: build + mkdir -p debian/tmp/__AT_DEST__ + rsync -a --delete --delete-excluded \ + --exclude=etc/ld.so.cache \ + --exclude=compat/include \ + --exclude=share/info/dir \ + __AT_DEST__ debian/tmp/__AT_DEST__/../ + # Set a cronjob to run AT's ldconfig when the system's ldconfig is + # executed. + mkdir -p debian/tmp/etc/cron.d/ + echo "@reboot __AT_DEST__/bin/watch_ldconfig &" \ + > debian/tmp/etc/cron.d/__AT_VER_REV_INTERNAL___ldconfig + gzip -9nvf debian/tmp/__AT_DEST__/share/info/*.info* + +binary: binary-indep binary-arch +.PHONY: build clean binary-indep binary-arch binary diff --git a/configs/7.1/deb/monolithic/runtime.postinst b/configs/7.1/deb/monolithic/runtime.postinst new file mode 100644 index 000000000..307d7ac37 --- /dev/null +++ b/configs/7.1/deb/monolithic/runtime.postinst @@ -0,0 +1,25 @@ +#!/bin/bash +# +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +if [[ "${1}" == configure ]]; then + # Automatically set the timezone + rm -f "__AT_DEST__/etc/localtime" + ln -s /etc/localtime "__AT_DEST__/etc/localtime" + + # Update ld.so.cache + [[ -f __AT_DEST__/sbin/ldconfig ]] && __AT_DEST__/sbin/ldconfig +fi diff --git a/configs/7.1/deb/monolithic/runtime.postrm b/configs/7.1/deb/monolithic/runtime.postrm new file mode 100644 index 000000000..fe016991e --- /dev/null +++ b/configs/7.1/deb/monolithic/runtime.postrm @@ -0,0 +1,24 @@ +#!/bin/bash +# +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +case "${1}" in + remove|purge) + if [[ -d "__AT_DEST__" ]]; then + rm -rf __AT_DEST__ + fi + ;; +esac diff --git a/configs/7.1/deb/monolithic_cross/changelog b/configs/7.1/deb/monolithic_cross/changelog new file mode 100644 index 000000000..a81dabcac --- /dev/null +++ b/configs/7.1/deb/monolithic_cross/changelog @@ -0,0 +1,20 @@ +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +advance-toolchain-__AT_MAJOR_INTERNAL__-cross__BUILD_ARCH__ (__AT_FULL_VER__) experimental; urgency=low + + * Release of Advance Toolchain __AT_FULL_VER__ + + + -- Advance Toolchain __DATE__ diff --git a/configs/7.1/deb/monolithic_cross/compat b/configs/7.1/deb/monolithic_cross/compat new file mode 100644 index 000000000..f11c82a4c --- /dev/null +++ b/configs/7.1/deb/monolithic_cross/compat @@ -0,0 +1 @@ +9 \ No newline at end of file diff --git a/configs/7.1/deb/monolithic_cross/control b/configs/7.1/deb/monolithic_cross/control new file mode 100644 index 000000000..5f87a9a0f --- /dev/null +++ b/configs/7.1/deb/monolithic_cross/control @@ -0,0 +1,33 @@ +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +Source: advance-toolchain-__AT_MAJOR_INTERNAL__-cross__BUILD_ARCH__ +Section: devel +Priority: extra +Maintainer: Advance Toolchain + +Package: advance-toolchain-cross__BUILD_ARCH__ +Architecture: i386 +Pre-Depends: advance-toolchain-__AT_MAJOR_INTERNAL__-cross__BUILD_ARCH__ (= __AT_FULL_VER__) +Description: Advance Toolchain cross compiler + The Advance Toolchain is a self contained toolchain which provides preview + toolchain functionality in GCC, binutils, GLIBC, and GDB. + +Package: advance-toolchain-__AT_MAJOR_INTERNAL__-cross__BUILD_ARCH__ +Architecture: i386 +Depends: ${shlibs:Depends} +Description: Advance Toolchain + The advance toolchain is a self contained toolchain which provides preview + toolchain functionality in GCC, binutils, GLIBC, and GDB. +Multi-Arch: foreign diff --git a/configs/7.1/deb/monolithic_cross/copyright b/configs/7.1/deb/monolithic_cross/copyright new file mode 100644 index 000000000..78a1ad1c1 --- /dev/null +++ b/configs/7.1/deb/monolithic_cross/copyright @@ -0,0 +1,16 @@ +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +License: GPL, LGPL diff --git a/configs/7.1/deb/monolithic_cross/postinst b/configs/7.1/deb/monolithic_cross/postinst new file mode 100644 index 000000000..1f4ee4251 --- /dev/null +++ b/configs/7.1/deb/monolithic_cross/postinst @@ -0,0 +1,28 @@ +#!/bin/bash +# +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +if [[ "${1}" == configure ]]; then + # Update our non standard info dirs + for INFO in $(ls __AT_DEST__/share/info/*.info.gz); do + ginstall-info ${INFO} \ + __AT_DEST__/share/info/dir > /dev/null 2>&1 || : + done + for INFO in $(ls __DEST_CROSS__/usr/share/info/*.info.gz); do + ginstall-info ${INFO} \ + __DEST_CROSS__/usr/share/info/dir > /dev/null 2>&1 || : + done +fi diff --git a/configs/7.1/deb/monolithic_cross/postrm b/configs/7.1/deb/monolithic_cross/postrm new file mode 100644 index 000000000..fe016991e --- /dev/null +++ b/configs/7.1/deb/monolithic_cross/postrm @@ -0,0 +1,24 @@ +#!/bin/bash +# +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +case "${1}" in + remove|purge) + if [[ -d "__AT_DEST__" ]]; then + rm -rf __AT_DEST__ + fi + ;; +esac diff --git a/configs/7.1/deb/monolithic_cross/prerm b/configs/7.1/deb/monolithic_cross/prerm new file mode 100644 index 000000000..71de97adc --- /dev/null +++ b/configs/7.1/deb/monolithic_cross/prerm @@ -0,0 +1,28 @@ +#!/bin/bash +# +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +if [[ "${1}" == remove ]]; then + # Update our non standard info dirs + for INFO in $(ls __AT_DEST__/share/info/*.info.gz); do + ginstall-info --delete ${INFO} \ + __AT_DEST__/share/info/dir > /dev/null 2>&1 || : + done + for INFO in $(ls __DEST_CROSS__/usr/share/info/*.info.gz); do + ginstall-info --delete ${INFO} \ + __DEST_CROSS__/usr/share/info/dir > /dev/null 2>&1 || : + done +fi diff --git a/configs/7.1/deb/monolithic_cross/rules b/configs/7.1/deb/monolithic_cross/rules new file mode 100755 index 000000000..8b43d7369 --- /dev/null +++ b/configs/7.1/deb/monolithic_cross/rules @@ -0,0 +1,66 @@ +#!/usr/bin/make -f +# +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# Set the proper shell to use +SHELL := /bin/bash + +# Get the package names to build +PACKAGE=$(shell dh_listpackages) + +build: + dh_testdir + dh_testroot + dh_prep + +clean: + dh_testdir + dh_testroot + dh_clean -d + +binary-indep: build + +binary-arch: build binary-cp + dh_installdirs + dh_installdocs + dh_installchangelogs + +# Copy the packages' files. + dh_install --fail-missing + + dh_compress +# Avoid including PPC libraries as they could break system's objdump. + dh_makeshlibs --exclude=__DEST_CROSS__ \ + --exclude=__AT_DEST__/__TARGET__ + dh_installdeb +# Avoid including PPC libraries as they could break system's ldd. + dh_shlibdeps --exclude=__DEST_CROSS__ \ + --exclude=__AT_DEST__/__TARGET__ + dh_gencontrol + dh_md5sums + dh_builddeb + +binary-cp: build + mkdir -p debian/tmp/__AT_DEST__ + rsync -a --delete --delete-excluded \ + --exclude=share/info/dir --exclude=usr/share/info/dir \ + __AT_DEST__ debian/tmp/__AT_DEST__/../ +# Compress all of the info files. + gzip -9nvf debian/tmp/__AT_DEST__/share/info/*.info* + gzip -9nvf debian/tmp/__DEST_CROSS__/usr/share/info/*.info* + +binary: binary-indep binary-arch +.PHONY: build clean binary-indep binary-arch binary diff --git a/configs/7.1/distros/centos-6.mk b/configs/7.1/distros/centos-6.mk new file mode 120000 index 000000000..b8dd2bf9b --- /dev/null +++ b/configs/7.1/distros/centos-6.mk @@ -0,0 +1 @@ +redhat-6.mk \ No newline at end of file diff --git a/configs/7.1/distros/redhat-6.mk b/configs/7.1/distros/redhat-6.mk new file mode 100644 index 000000000..afbb38bd7 --- /dev/null +++ b/configs/7.1/distros/redhat-6.mk @@ -0,0 +1,88 @@ +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Distro dependent basic definitions for RedHat Enterprise Server 6 +# ================================================================= +# This Makefile include contains the definitions for the distro being used +# for the build process. It contains kernel version infos and distro specific +# sanity checks. + +# Informs the distro supported power archs +AT_SUPPORTED_ARCHS := ppc64 + +# You may force the BUILD_IGNORE_AT_COMPAT general condition by distro +#BUILD_IGNORE_AT_COMPAT := yes + +# Kernel version to build toolchain against +# - As this distro only supports one arch variation (ppc64), there is no +# need to conditionally define these versions based on arch. +AT_KERNEL := 2.6.32 # Current distro kernel version for runtime. +AT_OLD_KERNEL := 2.6.18 # Previous distro kernel version for runtime-compat. + +# Inform the mainly supported distros +AT_SUPPORTED_DISTROS := "RHEL6 RHEL7" + +# Inform the compatibility supported distros +AT_COMPAT_DISTROS := RHEL5 + +# Sign the repository and packages +AT_SIGN_PKGS := yes +AT_SIGN_REPO := yes +AT_SIGN_PKGS_CROSS := no +AT_SIGN_REPO_CROSS := yes + +# ID of GNUPG key used to sign our packages (main/compat) +AT_GPG_KEYID := 6976A827 +AT_GPG_KEYIDC := 3052930D +AT_GPG_KEYIDL := 6976A827 +# ID of GNUPG key used to sign our repositories (main/compat) +AT_GPG_REPO_KEYID := 3052930D +AT_GPG_REPO_KEYIDC := 3052930D +AT_GPG_REPO_KEYIDL := 6976A827 + +# Options required by the command to update the repository metadata +AT_REPOCMD_OPTS := -p -s sha1 --simple-md-filenames --no-database + +# Moved here from build.mk since the value for this variable +# depends on the distro. +# For a cross build the executables in the toolchain (gcc, ld, etc.) +# should be built as 32 bit. +BUILD_CROSS_32 := yes + +# As some distros have special requirements for configuration upon final +# AT installation, put in this macro, the final configurations required +# after the main build and prior to the rpm build +define distro_final_config + echo "nothing to do." +endef + +# Inform the list of packages to check +ifndef AT_DISTRO_REQ_PKGS + AT_CROSS_PKGS_REQ := + AT_NATIVE_PKGS_REQ := \(ibm-java2-ppc64-sdk-5.0\|java-1.5.0-ibm-devel\) \ + libxslt popt-devel qt-devel imake \ + readline readline-devel + AT_COMMON_PKGS_REQ := zlib-devel ncurses-devel flex bison texinfo \ + createrepo glibc-devel subversion cvs gawk autoconf \ + rsync curl bc automake + AT_CROSS_PGMS_REQ := + AT_NATIVE_PGMS_REQ := + AT_COMMON_PGMS_REQ := git_1.7 + AT_JAVA_VERSIONS := 5 +endif + +# If needed, define the necessary distro related sanity checks. +define distro_sanity + echo "nothing to test here" +endef diff --git a/configs/7.1/distros/redhat-7.mk b/configs/7.1/distros/redhat-7.mk new file mode 100644 index 000000000..a4843d48c --- /dev/null +++ b/configs/7.1/distros/redhat-7.mk @@ -0,0 +1,115 @@ +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Distro dependent basic definitions for RedHat Enterprise Server 7 +# ================================================================= +# This Makefile include contains the definitions for the distro being used +# for the build process. It contains kernel version infos and distro specific +# sanity checks. + +# Informs the distro supported power archs +AT_SUPPORTED_ARCHS := ppc64 ppc64le + +# You may force the BUILD_IGNORE_AT_COMPAT general condition by distro +#BUILD_IGNORE_AT_COMPAT := yes + +# Kernel version to build toolchain against +# - As this distro may support any arch variation combination (ppc64le/ppc64), +# there is a need to conditionally define these versions based on arch. +ifeq ($(BUILD_ARCH),ppc64le) + # Current distro kernel version for runtime. + AT_KERNEL := 3.10 + # Previous distro kernel version for runtime-compat. + AT_OLD_KERNEL := +else + # Current distro kernel version for runtime. + AT_KERNEL := 3.10 + # Previous distro kernel version for runtime-compat. + AT_OLD_KERNEL := 2.6.32 +endif + +# Inform the mainly supported distros +AT_SUPPORTED_DISTROS := RHEL7 + +# Inform the compatibility supported distros +AT_COMPAT_DISTROS := RHEL6 + +# Sign the repository and packages +AT_SIGN_PKGS := yes +AT_SIGN_REPO := yes +AT_SIGN_PKGS_CROSS := no +AT_SIGN_REPO_CROSS := yes + +# ID of GNUPG key used to sign our packages (main/compat) +AT_GPG_KEYID := 6976A827 +AT_GPG_KEYIDC := 6976A827 +AT_GPG_KEYIDL := 6976A827 +# ID of GNUPG key used to sign our repositories (main/compat) +AT_GPG_REPO_KEYID := 6976A827 +AT_GPG_REPO_KEYIDC := 3052930D +AT_GPG_REPO_KEYIDL := 6976A827 + +# Options required by the command to update the repository metadata +AT_REPOCMD_OPTS := -p -s sha1 --simple-md-filenames --no-database + +# Moved here from build.mk since the value for this variable +# depends on the distro. +# For a cross build the executables in the toolchain (gcc, ld, etc.) +# should be built as 32 bit. +BUILD_CROSS_32 := no + +# As some distros have special requirements for configuration upon final +# AT installation, put in this macro, the final configurations required +# after the main build and prior to the rpm build +define distro_final_config + echo "nothing to do." +endef + +# Due to a problem found on RHEL 7.0 GA there is a package that doesn't fall +# into the default dependencies and should be added manually for checking here +# libstdc++-static (in this case, either i686 and x86_64) must be available for +# the build to proceed. If RedHat fixes its internal dependencies later on, +# this check could be safely removed. + +# Inform the list of packages to check +ifndef AT_DISTRO_REQ_PKGS + AT_CROSS_PKGS_REQ := + AT_NATIVE_PKGS_REQ := libxslt docbook-style-xsl qt-devel \ + autogen-libopts imake + AT_COMMON_PKGS_REQ := zlib-devel ncurses-devel flex bison texinfo \ + createrepo glibc-devel subversion cvs gawk \ + rsync curl bc automake libstdc\\+\\+-static \ + redhat-lsb-core autoconf bzip2-[0-9] libtool-[0-9] \ + gzip rpm-build-[0-9] rpm-sign gcc-c++ + AT_CROSS_PGMS_REQ := + AT_NATIVE_PGMS_REQ := + AT_COMMON_PGMS_REQ := git_1.7 + AT_JAVA_VERSIONS := 7 +endif + +# Complete the list of packages to check that are based on arch being build +ifeq ($(BUILD_ARCH),ppc64le) + AT_NATIVE_PKGS_REQ += \(ibm-java2-ppc64le-sdk-7.1\|java-1.7.1-ibm-devel\) + AT_NATIVE_PKGS_REQ += glibc-devel bzip2-devel popt-devel +else + AT_NATIVE_PKGS_REQ += \(ibm-java2-ppc64-sdk-7.0\|java-1.7.1-ibm-devel\) \ + glibc-devel-.*\.ppc$$ glibc-devel-.*\.ppc64$$ \ + bzip2-devel-.*\.ppc$$ bzip2-devel-.*\.ppc64$$ \ + popt-devel-.*\.ppc$$ popt-devel-.*\.ppc64$$ +endif + +# If needed, define the necessary distro related sanity checks. +define distro_sanity + echo "nothing to test here" +endef diff --git a/configs/7.1/distros/suse-11.mk b/configs/7.1/distros/suse-11.mk new file mode 100644 index 000000000..6d154ad69 --- /dev/null +++ b/configs/7.1/distros/suse-11.mk @@ -0,0 +1,90 @@ +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Distro dependent basic definitions for SuSE Enterprise Server 11 +# ================================================================ +# This Makefile include contains the definitions for the distro being used +# for the build process. It contains kernel version infos and distro specific +# sanity checks. + +# Informs the distro supported power archs +AT_SUPPORTED_ARCHS := ppc64 + +# You may force the BUILD_IGNORE_AT_COMPAT general condition by distro +#BUILD_IGNORE_AT_COMPAT := yes + +# Kernel version to build toolchain against +# SLES 11 was released with Linux 2.6.27 however, PAFLib requires a feature +# that is only available on 2.6.32. +# - As this distro only supports one arch variation (ppc64), there is no +# need to conditionally define these versions based on arch. +AT_KERNEL := 2.6.32 # Current distro kernel version for runtime. +AT_OLD_KERNEL := 2.6.16 # Previous distro kernel version for runtime-compat. + +# Inform the mainly supported distros +AT_SUPPORTED_DISTROS := SLES_11 + +# Inform the compatibility supported distros +AT_COMPAT_DISTROS := SLES_10 + +# Sign the repository and packages +AT_SIGN_PKGS := yes +AT_SIGN_REPO := yes +AT_SIGN_PKGS_CROSS := no +AT_SIGN_REPO_CROSS := yes + +# ID of GNUPG key used to sign our packages (main/compat) +AT_GPG_KEYID := 3052930D +AT_GPG_KEYIDC := 3052930D +AT_GPG_KEYIDL := 3052930D +# ID of GNUPG key used to sign our repositories (main/compat) +AT_GPG_REPO_KEYID := 3052930D +AT_GPG_REPO_KEYIDC := 3052930D +AT_GPG_REPO_KEYIDL := 3052930D + +# Options required by the command to update the repository metadata +AT_REPOCMD_OPTS := -p + +# Moved here from build.mk since the value for this variable +# depends on the distro. +# For a cross build the executables in the toolchain (gcc, ld, etc.) +# should be built as 32 bit. +BUILD_CROSS_32 := yes + +# As some distros have special requirements for configuration upon final +# AT installation, put in this macro, the final configurations required +# after the main build and prior to the rpm build +define distro_final_config + echo "nothing to do." +endef + +# Inform the list of packages to check +ifndef AT_DISTRO_REQ_PKGS + AT_CROSS_PKGS_REQ := + AT_NATIVE_PKGS_REQ := \(ibm-java2-ppc64-sdk-5.0\|java-1.5.0-ibm-devel\) \ + libxslt popt-devel docbook-xsl-stylesheets \ + xorg-x11-util-devel readline readline-devel + AT_COMMON_PKGS_REQ := zlib-devel ncurses-devel flex bison texinfo \ + createrepo subversion cvs gawk autoconf rsync curl \ + bc automake + AT_CROSS_PGMS_REQ := + AT_NATIVE_PGMS_REQ := + AT_COMMON_PGMS_REQ := git_1.7 + AT_JAVA_VERSIONS := 5 +endif + +# If needed, define the necessary distro related sanity checks. +define distro_sanity + echo "nothing to test here" +endef diff --git a/configs/7.1/distros/ubuntu-14.mk b/configs/7.1/distros/ubuntu-14.mk new file mode 100644 index 000000000..5c39a7c48 --- /dev/null +++ b/configs/7.1/distros/ubuntu-14.mk @@ -0,0 +1,83 @@ +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Distro dependent basic definitions for Ubuntu 14.04 LTS +# ======================================================= +# This Makefile include contains the definitions for the distro being used +# for the build process. It contains kernel version infos and distro specific +# sanity checks. + +# Informs the distro supported power archs +AT_SUPPORTED_ARCHS := ppc64le + +# You may force the BUILD_IGNORE_AT_COMPAT general condition by distro +#BUILD_IGNORE_AT_COMPAT := yes + +# Kernel version to build toolchain against +# - As this distro only supports one arch variation (ppc64le), there is no +# need to conditionally define these versions based on arch. +AT_KERNEL := 3.13 # Current distro kernel version for runtime. +# Ubuntu 14 doesn't support compat mode because it's the first version +# running on ppc64le. +#AT_OLD_KERNEL := # Previous distro kernel version for runtime-compat. + +# Inform the mainly supported distros +AT_SUPPORTED_DISTROS := trusty + +# Inform the compatibility supported distros +#AT_COMPAT_DISTROS := + +# Sign the repository and packages +#AT_SIGN_PKGS := yes +#AT_SIGN_REPO := yes +#AT_SIGN_PKGS_CROSS := no +#AT_SIGN_REPO_CROSS := yes + +# ID of GNUPG key used to sign our packages (main/compat) +AT_GPG_KEYID := 6976A827 +AT_GPG_KEYIDC := 3052930D +# ID of GNUPG key used to sign our repositories (main/compat) +AT_GPG_REPO_KEYID := 3052930D +AT_GPG_REPO_KEYIDC := 3052930D + +# Options required by the command to update the repository metadata +AT_REPOCMD_OPTS := -p -s sha1 --simple-md-filenames --no-database + +# As some distros have special requirements for configuration upon final +# AT installation, put in this macro, the final configurations required +# after the main build and prior to the rpm build +define distro_final_config + echo "nothing to do." +endef + +# Inform the list of packages to check +ifndef AT_DISTRO_REQ_PKGS + AT_CROSS_PKGS_REQ := + AT_NATIVE_PKGS_REQ := libxslt libpopt-dev libqt4-dev \ + libc6-dev libtool xutils-dev libbz2-dev xsltproc \ + docbook-xsl + AT_COMMON_PKGS_REQ := zlib1g-dev libncurses5-dev ncurses-term flex bison \ + texinfo subversion cvs gawk fakeroot debhelper \ + autoconf rsync curl bc libxml2-utils automake \ + dpkg-sig + AT_CROSS_PGMS_REQ := + AT_NATIVE_PGMS_REQ := pkg-config /opt/ibm/java-ppc64le-71/bin/java + AT_COMMON_PGMS_REQ := git_1.7 + AT_JAVA_VERSIONS := 7 +endif + +# If needed, define the necessary distro related sanity checks. +define distro_sanity + echo "nothing to test here" +endef diff --git a/configs/7.1/packages/binutils/binutils.mk b/configs/7.1/packages/binutils/binutils.mk new file mode 120000 index 000000000..9d37aa90e --- /dev/null +++ b/configs/7.1/packages/binutils/binutils.mk @@ -0,0 +1 @@ +../../../7.0/packages/binutils/binutils.mk \ No newline at end of file diff --git a/configs/7.1/packages/binutils/sources b/configs/7.1/packages/binutils/sources new file mode 100644 index 000000000..ff0884b51 --- /dev/null +++ b/configs/7.1/packages/binutils/sources @@ -0,0 +1,39 @@ +#!/usr/bin/env bash +# +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# binutils source package and build info +# ====================================== +# + +ATSRC_PACKAGE_NAME="GNU Binutils" +ATSRC_PACKAGE_VER=2.24 +ATSRC_PACKAGE_REV=d15dc58e +ATSRC_PACKAGE_LICENSE="GPL 2.0" +ATSRC_PACKAGE_DOCLINK="http://sourceware.org/binutils/docs/" +ATSRC_PACKAGE_RELFIXES= +ATSRC_PACKAGE_STR_VER="${ATSRC_PACKAGE_NAME} ${ATSRC_PACKAGE_VER}-${ATSRC_PACKAGE_REV}" +ATSRC_PACKAGE_PRE="test -d binutils-${ATSRC_PACKAGE_VER}-${ATSRC_PACKAGE_REV}" +# git.linux.ibm.com is a mirror of sourceware.org. +ATSRC_PACKAGE_CO=([0]="git clone git://git.linux.ibm.com/binutils-gdb/binutils-gdb.git binutils" \ + [1]="git clone git://sourceware.org/git/binutils-gdb.git binutils") +ATSRC_PACKAGE_GIT="git checkout -b binutils-${ATSRC_PACKAGE_VER}${ATSRC_PACKAGE_REV:+-${ATSRC_PACKAGE_REV}} ${ATSRC_PACKAGE_REV}" +ATSRC_PACKAGE_POST="mv binutils binutils-${ATSRC_PACKAGE_VER}${ATSRC_PACKAGE_REV:+-${ATSRC_PACKAGE_REV}}" +ATSRC_PACKAGE_SRC=${AT_BASE}/sources/binutils-${ATSRC_PACKAGE_VER}-${ATSRC_PACKAGE_REV} +ATSRC_PACKAGE_WORK=${AT_WORK_PATH}/binutils +ATSRC_PACKAGE_DISTRIB=yes +ATSRC_PACKAGE_BUILDCROSS=yes +ATSRC_PACKAGE_BUNDLE=toolchain diff --git a/configs/7.1/packages/binutils/specfile b/configs/7.1/packages/binutils/specfile new file mode 120000 index 000000000..17f51f7a6 --- /dev/null +++ b/configs/7.1/packages/binutils/specfile @@ -0,0 +1 @@ +../../../7.0/packages/binutils/specfile \ No newline at end of file diff --git a/configs/7.1/packages/binutils/stage_1 b/configs/7.1/packages/binutils/stage_1 new file mode 120000 index 000000000..a4b9d00e1 --- /dev/null +++ b/configs/7.1/packages/binutils/stage_1 @@ -0,0 +1 @@ +../../../7.0/packages/binutils/stage_1 \ No newline at end of file diff --git a/configs/7.1/packages/binutils/stage_2 b/configs/7.1/packages/binutils/stage_2 new file mode 120000 index 000000000..64a1cb994 --- /dev/null +++ b/configs/7.1/packages/binutils/stage_2 @@ -0,0 +1 @@ +../../../7.0/packages/binutils/stage_2 \ No newline at end of file diff --git a/configs/7.1/packages/binutils/stage_3 b/configs/7.1/packages/binutils/stage_3 new file mode 120000 index 000000000..c67500cc9 --- /dev/null +++ b/configs/7.1/packages/binutils/stage_3 @@ -0,0 +1 @@ +../../../7.0/packages/binutils/stage_3 \ No newline at end of file diff --git a/configs/7.1/packages/boost/boost.mk b/configs/7.1/packages/boost/boost.mk new file mode 120000 index 000000000..3f91356c9 --- /dev/null +++ b/configs/7.1/packages/boost/boost.mk @@ -0,0 +1 @@ +../../../7.0/packages/boost/boost.mk \ No newline at end of file diff --git a/configs/7.1/packages/boost/sources b/configs/7.1/packages/boost/sources new file mode 100644 index 000000000..c94079441 --- /dev/null +++ b/configs/7.1/packages/boost/sources @@ -0,0 +1,55 @@ +#!/usr/bin/env bash +# +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# Boost source package and build info +# ================================== +# +ATSRC_PACKAGE_NAME="Boost" +ATSRC_PACKAGE_VER=1.55.0 +ATSRC_PACKAGE_REV=bcb32779 +ATSRC_PACKAGE_VERID="${ATSRC_PACKAGE_VER}${ATSRC_PACKAGE_REV:+-${ATSRC_PACKAGE_REV}}" +ATSRC_PACKAGE_DOCLINK="http://www.boost.org/doc/libs/${ATSRC_PACKAGE_VER//./_}/" +ATSRC_PACKAGE_RELFIXES= +ATSRC_PACKAGE_STR_VER="${ATSRC_PACKAGE_NAME} ${ATSRC_PACKAGE_VER}" +ATSRC_PACKAGE_LICENSE="Boost Software License 1.0" +ATSRC_PACKAGE_PRE="test -d boost-${ATSRC_PACKAGE_VERID}" +ATSRC_PACKAGE_CO=([0]="wget -O boost-${ATSRC_PACKAGE_VERID}.tar.gz https://github.com/boost-at/boost_${ATSRC_PACKAGE_VER//./_}/archive/${ATSRC_PACKAGE_REV}.tar.gz") +ATSRC_PACKAGE_POST="tar xzf boost-${ATSRC_PACKAGE_VERID}.tar.gz --transform=s/boost_${ATSRC_PACKAGE_VER//./_}[^\\/]*/boost-${ATSRC_PACKAGE_VERID}/" +ATSRC_PACKAGE_SRC="${AT_BASE}/sources/boost-${ATSRC_PACKAGE_VERID}" +ATSRC_PACKAGE_WORK=${AT_WORK_PATH}/boost +ATSRC_PACKAGE_MLS="" +ATSRC_PACKAGE_ALOC="" +ATSRC_PACKAGE_PATCHES="" +ATSRC_PACKAGE_TARS="" +ATSRC_PACKAGE_MAKE_CHECK="" +ATSRC_PACKAGE_DISTRIB=no +ATSRC_PACKAGE_BUILDCROSS=no +ATSRC_PACKAGE_BUNDLE=mcore-libs + +atsrc_get_patches () +{ + at_get_patch \ + https://raw.githubusercontent.com/powertechpreview/powertechpreview/master/Boost%20Patches/boost_1_55_regex_lockfree.patch \ + 8822866b89f9b14456d391d520c0abd5 || return ${?} + return 0 +} + +atsrc_apply_patches () +{ + patch -p1 < boost_1_55_regex_lockfree.patch || return ${?} + return 0 +} diff --git a/configs/7.1/packages/boost/specfile b/configs/7.1/packages/boost/specfile new file mode 120000 index 000000000..92107bbda --- /dev/null +++ b/configs/7.1/packages/boost/specfile @@ -0,0 +1 @@ +../../../7.0/packages/boost/specfile \ No newline at end of file diff --git a/configs/7.1/packages/boost/stage_1 b/configs/7.1/packages/boost/stage_1 new file mode 120000 index 000000000..9ea4dd734 --- /dev/null +++ b/configs/7.1/packages/boost/stage_1 @@ -0,0 +1 @@ +../../../7.0/packages/boost/stage_1 \ No newline at end of file diff --git a/configs/7.1/packages/expat/expat.mk b/configs/7.1/packages/expat/expat.mk new file mode 120000 index 000000000..0ce030419 --- /dev/null +++ b/configs/7.1/packages/expat/expat.mk @@ -0,0 +1 @@ +../../../7.0/packages/expat/expat.mk \ No newline at end of file diff --git a/configs/7.1/packages/expat/sources b/configs/7.1/packages/expat/sources new file mode 120000 index 000000000..79c3fca92 --- /dev/null +++ b/configs/7.1/packages/expat/sources @@ -0,0 +1 @@ +../../../7.0/packages/expat/sources \ No newline at end of file diff --git a/configs/7.1/packages/expat/specfile b/configs/7.1/packages/expat/specfile new file mode 120000 index 000000000..9c126b09a --- /dev/null +++ b/configs/7.1/packages/expat/specfile @@ -0,0 +1 @@ +../../../7.0/packages/expat/specfile \ No newline at end of file diff --git a/configs/7.1/packages/expat/stage_1 b/configs/7.1/packages/expat/stage_1 new file mode 120000 index 000000000..a6dfa1adb --- /dev/null +++ b/configs/7.1/packages/expat/stage_1 @@ -0,0 +1 @@ +../../../7.0/packages/expat/stage_1 \ No newline at end of file diff --git a/configs/7.1/packages/gcc/gcc.mk b/configs/7.1/packages/gcc/gcc.mk new file mode 100644 index 000000000..45854e9d7 --- /dev/null +++ b/configs/7.1/packages/gcc/gcc.mk @@ -0,0 +1,77 @@ +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# +# +$(eval $(call set_provides,gcc_1,single,cross_yes)) +$(eval $(call set_provides,gcc_2,single,cross_yes)) +$(eval $(call set_provides,gcc_3,single,cross_yes)) +$(eval $(call set_provides,gcc_4,single,cross_yes)) + +# List of dependencies in order to build the tuned libraries. +gcc_tuned-deps := $(RCPTS)/gcc_4.rcpt +# Enable tuned targets +$(eval $(call provide_tuneds,gcc)) + +# gcc_4 doesn't require mpc_2 on cross. +ifeq ($(CROSS_BUILD),no) + gcc_4-reqs += $(RCPTS)/mpc_2.rcpt +endif + + +gcc_1: $(RCPTS)/gcc_1.rcpt + +gcc_2: $(RCPTS)/gcc_2.rcpt + +gcc_3: $(RCPTS)/gcc_3.rcpt + +gcc_4: $(RCPTS)/gcc_4.rcpt + +gcc_tuned: $(RCPTS)/gcc_tuned.rcpt + +$(RCPTS)/gcc_1.rcpt: $(gcc_1-archdeps) + @touch $@ + +$(RCPTS)/gcc_2.rcpt: $(gcc_2-archdeps) + @touch $@ + +$(RCPTS)/gcc_3.rcpt: $(gcc_3-archdeps) + @touch $@ + +$(RCPTS)/gcc_4.rcpt: $(gcc_4-archdeps) + @touch $@ + + +$(RCPTS)/gcc_1.a.rcpt: $(RCPTS)/binutils_1.rcpt \ + $(RCPTS)/mpc_1.rcpt \ + $(RCPTS)/kernel_h.rcpt \ + $(RCPTS)/rsync_gcc.rcpt + @touch $@ + +$(RCPTS)/gcc_2.a.rcpt: $(RCPTS)/gcc_1.rcpt \ + $(RCPTS)/glibc_1.rcpt \ + $(RCPTS)/ldconfig_1.rcpt + @touch $@ + +$(RCPTS)/gcc_3.a.rcpt: $(RCPTS)/ldconfig_1.rcpt \ + $(RCPTS)/gcc_2.rcpt + @touch $@ + +$(RCPTS)/gcc_4.a.rcpt: $(RCPTS)/binutils_2.rcpt \ + $(RCPTS)/gcc_3.rcpt \ + $(gcc_4-reqs) + @touch $@ + +$(RCPTS)/gcc_tuned.rcpt: $(gcc_tuned-archdeps) + @touch $@ diff --git a/configs/7.1/packages/gcc/sources b/configs/7.1/packages/gcc/sources new file mode 100644 index 000000000..e70e30d12 --- /dev/null +++ b/configs/7.1/packages/gcc/sources @@ -0,0 +1,62 @@ +#!/usr/bin/env bash +# +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# Include sources used functions +# ============================== +source "${utilities}/sources_expandable.sh" + +# GCC source package and build info +# ================================= +ATSRC_PACKAGE_NAME="GCC (GNU Compiler Collection)" +ATSRC_PACKAGE_SUBPACKAGE_NAME_0="GNU Standard C++ Library v3 (Libstdc++-v3)" +ATSRC_PACKAGE_SUBPACKAGE_NAME_1="GNU Libgomp" +ATSRC_PACKAGE_VER=4.8.5 +ATSRC_PACKAGE_REV=227152 +ATSRC_PACKAGE_LICENSE="GPL 3.0" +ATSRC_PACKAGE_DOCLINK="http://gcc.gnu.org/onlinedocs/gcc-4.8.3/gcc/" +ATSRC_PACKAGE_SUBPACKAGE_DOCLINK_0="https://gcc.gnu.org/libstdc++/" +ATSRC_PACKAGE_SUBPACKAGE_DOCLINK_1="https://gcc.gnu.org/onlinedocs/libgomp/" +ATSRC_PACKAGE_RELFIXES= +ATSRC_PACKAGE_NAMESUFFIX="$(supported_languages ${build_gcc_languages})" +ATSRC_PACKAGE_STR_VER="${ATSRC_PACKAGE_NAME} ${ATSRC_PACKAGE_VER}-ibm-r${ATSRC_PACKAGE_REV}" +ATSRC_PACKAGE_PRE="test -d gcc-${ATSRC_PACKAGE_VER}-${ATSRC_PACKAGE_REV}" +ATSRC_PACKAGE_CO=([0]="svn co --revision ${ATSRC_PACKAGE_REV} svn://gcc.gnu.org/svn/gcc/branches/ibm/gcc-4_8-branch") +ATSRC_PACKAGE_POST="mv gcc-4_8-branch gcc-${ATSRC_PACKAGE_VER}-${ATSRC_PACKAGE_REV}" +ATSRC_PACKAGE_SRC=${AT_BASE}/sources/gcc-${ATSRC_PACKAGE_VER}-${ATSRC_PACKAGE_REV} +ATSRC_PACKAGE_WORK=${AT_WORK_PATH}/gcc +ATSRC_PACKAGE_MLS= +ATSRC_PACKAGE_ALOC= +ATSRC_PACKAGE_PATCHES= +ATSRC_PACKAGE_TARS= +ATSRC_PACKAGE_MAKE_CHECK= +ATSRC_PACKAGE_DISTRIB=yes +ATSRC_PACKAGE_BUILDCROSS=yes +ATSRC_PACKAGE_BUNDLE=toolchain + +atsrc_get_patches () +{ + # Patch to add link-time optimization to some GCC libraries. + at_get_patch \ + https://github.com/powertechpreview/powertechpreview/raw/master/GCC%20PowerPC%20Backport/4.8/gcc-4.8-lto.tgz \ + 63b53f01adf40efc9f07021a6a1bcbaf || return ${?} +} + +atsrc_apply_patches () +{ + # Don't apply this patch yet. The patch is applied in a later stage. + tar xzf gcc-4.8-lto.tgz +} diff --git a/configs/7.1/packages/gcc/specfile b/configs/7.1/packages/gcc/specfile new file mode 120000 index 000000000..f82f5b9e5 --- /dev/null +++ b/configs/7.1/packages/gcc/specfile @@ -0,0 +1 @@ +../../../7.0/packages/gcc/specfile \ No newline at end of file diff --git a/configs/7.1/packages/gcc/stage_1 b/configs/7.1/packages/gcc/stage_1 new file mode 100644 index 000000000..aeff21963 --- /dev/null +++ b/configs/7.1/packages/gcc/stage_1 @@ -0,0 +1,196 @@ +#!/usr/bin/env bash +# +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# GCC build parameters for stage 1 +# ================================ +# + +ATCFG_HOLD_TEMP_INSTALL='no' +ATCFG_HOLD_TEMP_BUILD='no' +# Build in a new directory +ATCFG_BUILD_STAGE_T='dir' + +# Required pre build hacks +atcfg_pre_hacks() { + # Overwrite the existing DEV-PHASE with Advance-Toolchain-XX + mv ${ATSRC_PACKAGE_WORK}/gcc/DEV-PHASE ${ATSRC_PACKAGE_WORK}/gcc/DEV-PHASE.back + echo "Advance-Toolchain-${at_major_internal}" > ${ATSRC_PACKAGE_WORK}/gcc/DEV-PHASE + # Overwrite the existing REVISION with the current SVN revision date + mv ${ATSRC_PACKAGE_WORK}/gcc/REVISION ${ATSRC_PACKAGE_WORK}/gcc/REVISION.back + sed "s/branch merged/branch, revision: ${ATSRC_PACKAGE_REV} merged/" ${ATSRC_PACKAGE_WORK}/gcc/REVISION.back \ + > ${ATSRC_PACKAGE_WORK}/gcc/REVISION + mv ${ATSRC_PACKAGE_WORK}/gcc/DATESTAMP ${ATSRC_PACKAGE_WORK}/gcc/DATESTAMP.back + echo "$(head -n 1 ${ATSRC_PACKAGE_WORK}/gcc/ChangeLog.ibm | cut -f 1 -d " " | sed "s/-//g")" \ + > ${ATSRC_PACKAGE_WORK}/gcc/DATESTAMP +} + +# Pre configure settings or commands to run +atcfg_pre_configure() { + cc_64=${system_cc} + cxx_64=${system_cxx} + libdir="${at_dest}/lib" + if [[ "${cross_build}" == "no" ]]; then + if [[ "${build_arch}" == ppc64* ]]; then + if [[ "${default_compiler}" == "32" ]]; then + cc_64="${gcc64}" + cxx_64="${gpp64}" + fi + libdir="${at_dest}/lib64" + fi + fi +} + +# Conditional configure command +atcfg_configure() { + if [[ "${cross_build}" == "no" ]]; then + if [[ "${distro_fm}" == "ubuntu" ]]; then + # Ubuntu requires a different path for include and libs + # due to its solution for multiarch support. + multiarch=yes + fi + + # Configure command for native builds + CC="${cc_64}" \ + CXX="${cxx_64}" \ + AS="${at_dest}/bin/as" \ + LD="${at_dest}/bin/ld" \ + ${ATSRC_PACKAGE_WORK}/configure \ + --build=${host} \ + --host=${host} \ + --target=${target} \ + --with-cpu=${default_cpu} \ + --prefix="${at_dest}" \ + ${secure_plt:+--enable-secureplt} \ + ${disable_multilib:+--disable-multilib} \ + --disable-threads \ + --disable-shared \ + --disable-libmudflap \ + --disable-libssp \ + --disable-bootstrap \ + --disable-libgomp \ + --disable-lto \ + --with-mpfr-include="${at_dest}/include" \ + --with-mpfr-lib="${libdir}" \ + --with-gmp-include="${at_dest}/include" \ + --with-gmp-lib="${libdir}" \ + --with-mpc-include="${at_dest}/include" \ + --with-mpc-lib="${libdir}" \ + --enable-languages=c,c++ \ + --with-as="${at_dest}/bin/as" \ + --with-ld="${at_dest}/bin/ld" \ + ${multiarch:+--enable-multiarch} + else + # Configure command for cross builds + CC="${cc_64}" \ + CXX="${cxx_64}" \ + LD_FOR_TARGET="${at_dest}/bin/${target}-ld" \ + AS_FOR_TARGET="${at_dest}/bin/${target}-as" \ + AR_FOR_TARGET="${at_dest}/bin/${target}-ar" \ + RANLIB_FOR_TARGET="${at_dest}/bin/${target}-ranlib" \ + ${ATSRC_PACKAGE_WORK}/configure \ + --build=${host} \ + --host=${host} \ + --target=${target64:-${target}} \ + --with-cpu=${default_cpu} \ + --prefix="${at_dest}" \ + ${secure_plt:+--enable-secureplt} \ + ${disable_multilib:+--disable-multilib} \ + --disable-threads \ + --disable-shared \ + --disable-libmudflap \ + --disable-libssp \ + --disable-bootstrap \ + --disable-libgomp \ + --disable-libatomic \ + --disable-decimal-float \ + --disable-libquadmath \ + --with-mpfr-include="${at_dest}/include" \ + --with-mpfr-lib="${libdir}" \ + --with-gmp-include="${at_dest}/include" \ + --with-gmp-lib="${libdir}" \ + --with-mpc-include="${at_dest}/include" \ + --with-mpc-lib="${libdir}" \ + --enable-languages=c \ + --with-as="${at_dest}/bin/${target}-as" \ + --with-ld="${at_dest}/bin/${target}-ld" \ + --with-newlib \ + --without-headers + fi +} + +# Make build command +atcfg_make() { + # gcc_cv_libc_provides_ssp=yes - GCC needs glibc headers in order to + # detect if the standard C library supports stack protection. + # However, the glibc headers aren't available at this stage. + ${SUB_MAKE} all \ + gcc_cv_libc_provides_ssp=yes +} + +# Pre install settings or commands to run +atcfg_pre_install() { + # The gcc install recipe must be able to find the following folders + # so that it can perform its tasks properly, as installing target + # host binaries on cross builds. The binutils package will create + # this folders on its install. As our installs are atomic, we need + # to provide them before hand, so GCC finds it and its install + # recipe can perform properly. + [[ -d "${install_place}/${at_dest}/${target}/bin" ]] || \ + mkdir -p "${install_place}/${at_dest}/${target}/bin" + [[ -d "${install_place}/${at_dest}/${target}/lib" ]] || \ + mkdir -p "${install_place}/${at_dest}/${target}/lib" +} + +# Install build command +atcfg_install() { + make install -j1 DESTDIR=${install_place} +} + +# Post install settings or commands to run +atcfg_post_install() { + # Create the required symlinks to install + if [[ "${cross_build}" == "no" ]]; then + pushd ${install_place}/${at_dest}/bin + if [[ ! -e ${target}-gcc ]]; then + echo -e "#!/bin/bash\nexec ${at_dest}/bin/gcc \"${@}\"" > ${target}-gcc + chmod a+x ${target}-gcc + fi + if [[ ! -e ${target}-g++ ]]; then + echo -e "#!/bin/bash\nexec ${at_dest}/bin/g++ \"${@}\"" > ${target}-g++ + chmod a+x ${target}-g++ + fi + if [[ ! -e ${target}-c++ ]]; then + ln -f ${target}-g++ ${target}-c++ + fi + popd + + # This hack isn't necessary on ppc64le. + if [[ "${build_arch}" == "ppc64" ]]; then + # The following files will be installed by GLIBC, so no + # need to have them properly mapped into the filelist + # (not installed into ${install_place} for mapping) + if [[ ! -e "${at_dest}/lib/ld.so.1" ]]; then + ln -s /lib/ld.so.1 "${at_dest}/lib/ld.so.1" + fi + if [[ ! -e "${at_dest}/lib/libc.so.6" ]]; then + ln -s /lib/libc.so.6 "${at_dest}/lib/libc.so.6" + fi + fi + # Remove unnecessary python scripts + find "${install_place}/${at_dest}" -name "libstdc++.so.*-gdb.py" -print -delete + fi +} diff --git a/configs/7.1/packages/gcc/stage_2 b/configs/7.1/packages/gcc/stage_2 new file mode 100644 index 000000000..588b62cbc --- /dev/null +++ b/configs/7.1/packages/gcc/stage_2 @@ -0,0 +1,188 @@ +#!/usr/bin/env bash +# +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# GCC build parameters for stage 2 +# ================================ +# + +ATCFG_HOLD_TEMP_INSTALL='no' +ATCFG_HOLD_TEMP_BUILD='no' +# Build in a new directory +ATCFG_BUILD_STAGE_T='dir' + + +# Required post install hacks (this one is run after the final install move) +atcfg_posti_hacks() { + # Hack the static library to satisfy GLIBC build + for LIB in $(find "${at_dest}/lib" -name libgcc.a); do + [[ -e ${LIB%\.a}_eh.a ]] || ln -s libgcc.a ${LIB%\.a}_eh.a + [[ -e ${LIB%\.a}_s.a ]] || ln -s libgcc.a ${LIB%\.a}_s.a + done +} + +# Pre configure settings or commands to run +atcfg_pre_configure() { + cc_64="${system_cc}" + cxx_64="${system_cxx}" + libdir="${at_dest}/lib" + if [[ "${cross_build}" == "no" ]]; then + if [[ "${build_arch}" == ppc64* ]]; then + if [[ "${default_compiler}" == "32" ]]; then + cc_64="${gcc64}" + cxx_64="${gpp64}" + fi + libdir="${at_dest}/lib64" + fi + fi +} + +# Conditional configure command +atcfg_configure() { + if [[ "${cross_build}" == "no" ]]; then + # Configure command for native builds + CC="${cc_64}" \ + CXX="${cxx_64}" \ + CFLAGS="-O2" \ + CXXFLAGS="-O2" \ + AS="${at_dest}/bin/as" \ + LD="${at_dest}/bin/ld" \ + ${ATSRC_PACKAGE_WORK}/configure \ + --build=${target64:-${target}} \ + --host=${target64:-${target}} \ + --target=${target64:-${target}} \ + --with-cpu=${default_cpu} \ + --prefix=${at_dest} \ + ${with_longdouble:+--with-long-double-128} \ + ${with_dfp_standalone:+--enable-decimal-float} \ + ${secure_plt:+--enable-secureplt} \ + ${disable_multilib:+--disable-multilib} \ + --enable-threads=posix \ + --enable-languages=c,c++ \ + --enable-__cxa_atexit \ + --disable-shared \ + --disable-checking \ + --disable-libmudflap \ + --disable-libssp \ + --disable-lto \ + --disable-libgomp \ + --without-ppl \ + --without-cloog \ + --with-gmp-include="${at_dest}/include" \ + --with-gmp-lib=${libdir} \ + --with-mpfr-include="${at_dest}/include" \ + --with-mpfr-lib=${libdir} \ + --with-mpc-include="${at_dest}/include" \ + --with-mpc-lib=${libdir} \ + --with-as="${at_dest}/bin/as" \ + --with-ld="${at_dest}/bin/ld" + else + # Configure command for cross builds + CC="${cc_64}" \ + CXX="${cxx_64}" \ + LD_FOR_TARGET="${at_dest}/bin/${target}-ld" \ + AS_FOR_TARGET="${at_dest}/bin/${target}-as" \ + AR_FOR_TARGET="${at_dest}/bin/${target}-ar" \ + NM_FOR_TARGET="${at_dest}/bin/${target}-nm" \ + RANLIB_FOR_TARGET="${at_dest}/bin/${target}-ranlib" \ + ${ATSRC_PACKAGE_WORK}/configure \ + --build=${host} \ + --host=${host} \ + --target=${target64:-${target}} \ + --with-cpu=${default_cpu} \ + --prefix=${at_dest} \ + ${with_longdouble:+--with-long-double-128} \ + ${secure_plt:+--enable-secureplt} \ + ${disable_multilib:+--disable-multilib} \ + --enable-languages=c \ + --enable-__cxa_atexit \ + --enable-threads=posix \ + --disable-libmudflap \ + --disable-libssp \ + --disable-libgomp \ + --disable-libatomic \ + --disable-libquadmath \ + --disable-lto \ + --disable-decimal-float \ + --with-mpfr-include="${at_dest}/include" \ + --with-mpfr-lib=${libdir} \ + --with-gmp-include="${at_dest}/include" \ + --with-gmp-lib=${libdir} \ + --with-mpc-include="${at_dest}/include" \ + --with-mpc-lib=${libdir} \ + --without-ppl \ + --without-cloog \ + --with-host-libstdcxx="-L${libdir} -lstdc++ -lsupc++ -lm -lgmp -lgmpxx -lmpfr -lmpc" \ + --with-build-sysroot="${dest_cross}" \ + --with-sysroot="${dest_cross}" \ + --with-headers="${dest_cross}/usr/include" + fi +} + +# Make build command +atcfg_make() { + # With -isystem we make sure that system's gcc (stage1) will recognize AT + # headers as system headers and give them special treatment. + ${SUB_MAKE} STAGE1_CFLAGS="-isystem ${at_dest}/include" STAGE1_CXXFLAGS="-isystem ${at_dest}/include" all +} + +# Pre install settings or commands to run +atcfg_pre_install() { + # The gcc install recipe must be able to find the following folders + # so that it can perform its tasks properly, as installing target + # host binaries on cross builds. The binutils package will create + # this folders on its install. As our installs are atomic, we need + # to provide them before hand, so GCC finds it and its install + # recipe can perform properly. + [[ -d "${install_place}/${at_dest}/${target}/bin" ]] || \ + mkdir -p "${install_place}/${at_dest}/${target}/bin" + [[ -d "${install_place}/${at_dest}/${target}/lib" ]] || \ + mkdir -p "${install_place}/${at_dest}/${target}/lib" +} + +# Install build command +atcfg_install() { + make install -j1 DESTDIR=${install_place} +} + +# Post install settings or commands to run +atcfg_post_install() { + # Fixes to cross build install + if [[ "${cross_build}" == "yes" ]]; then + # This copy is required because gcc has a problem in the cross build, + # the sys-include folder is created directly into destination prefix, + # but this brokes the isolated install build that we use, and these files + # are missed in the final file list generated for the RPM build + cp -a ${at_dest}/${target}/sys-include \ + ${install_place}/${at_dest}/${target} + # Create the required symlinks to install + pushd ${install_place}/${at_dest}/bin + if [[ ! -e ${target}-gcc ]]; then + echo -e "#!/bin/bash\nexec ${at_dest}/bin/gcc \"${@}\"" > ${target}-gcc + chmod a+x ${target}-gcc + fi + if [[ ! -e ${target}-g++ ]]; then + echo -e "#!/bin/bash\nexec ${at_dest}/bin/g++ \"${@}\"" > ${target}-g++ + chmod a+x ${target}-g++ + fi + if [[ ! -e ${target}-c++ ]]; then + ln -f ${target}-g++ ${target}-c++ + fi + popd + fi + # Remove unnecessary python scripts + find "${install_place}/${at_dest}" -name "libstdc++.so.*-gdb.py" -print -delete +} diff --git a/configs/7.1/packages/gcc/stage_3 b/configs/7.1/packages/gcc/stage_3 new file mode 100644 index 000000000..17582bf97 --- /dev/null +++ b/configs/7.1/packages/gcc/stage_3 @@ -0,0 +1,182 @@ +#!/usr/bin/env bash +# +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# GCC build parameters for stage 3 +# ================================ +# + +ATCFG_HOLD_TEMP_INSTALL='no' +ATCFG_HOLD_TEMP_BUILD='no' +# Build in a new directory +ATCFG_BUILD_STAGE_T='dir' +# Don't fail if stage final install place doesn't exist +if [[ "${cross_build}" == "yes" ]]; then + ATCFG_INSTALL_PEDANTIC="no" +fi + +# Required pre build hacks +atcfg_pre_hacks() { + # Clean static lib hack done on gcc stage 2 for GLIBC build. + for Z in $(find "${at_dest}/lib" -name libgcc.a); do + [[ -h ${Z%\.a}_s.a ]] && rm -f ${Z%\.a}_s.a + [[ -h ${Z%\.a}_eh.a ]] && rm -f ${Z%\.a}_eh.a + done + # Patch GCC source to use correct GLIBC (if not patched yet). + check_gcc=$(grep rpath ${ATSRC_PACKAGE_WORK}/gcc/config/rs6000/linux64.h | sed "s/.*rpath.*/rpath/" | head -n 1) + if [[ -z ${check_gcc} ]]; then + s1="s@\(GLIBC_DYNAMIC_LINKER[^/]*\)\( \"\)\(.*\)@\1\2"${at_dest}"\3@" + s2="s@%{!shared: %{!static:@%{!static: %{!shared:@" + s3="s@\(GNU_USER_DYNAMIC_LINKER32 \"\}\}\)@\1 --enable-new-dtags -rpath "${at_dest}"\/lib@" + s4="s@\(GNU_USER_DYNAMIC_LINKER64 \"\}\}\)@\1 --enable-new-dtags -rpath "${at_dest}"\/lib64@" + s5="s@\(GNU_USER_DYNAMIC_LINKER \"\}\}\)@\1 --enable-new-dtags -rpath "${at_dest}"\/lib@" + for F in ${ATSRC_PACKAGE_WORK}/gcc/config/rs6000/{linux64.h,sysv4.h}; do + sed -e "${s1}" -e "${s2}" -e "${s3}" -e "${s4}" -e "${s5}" < "${F}" > tmp.$$ && \ + { cmp -s tmp.$$ "${F}" || mv -f tmp.$$ "${F}"; } || \ + exit 1 + rm -f tmp.$$ + done + # Check and validate the applied patch + check_gcc=$(grep rpath ${ATSRC_PACKAGE_WORK}/gcc/config/rs6000/linux64.h | sed "s/.*rpath.*/rpath/" | head -n 1) + if [[ -z ${check_gcc} ]]; then + # Restore original files for sanity. The sed lines above append + # text to the original line, not replace them. + cp ${ATSRC_PACKAGE_SRC}/gcc/config/rs6000/linux64.h ${ATSRC_PACKAGE_WORK}/gcc/config/rs6000/ + cp ${ATSRC_PACKAGE_SRC}/gcc/config/rs6000/sysv4.h ${ATSRC_PACKAGE_WORK}/gcc/config/rs6000/ + echo "Failed patching gcc for stage 3 build." + exit 1 + fi + fi + # Should run only on a native build... Skip these on cross + if [[ "${cross_build}" == "no" ]]; then + # Hack required to avoid a bug where gcc picks up the wrong crti.o, + # causing ld to segfault in the stage3 build. We move the GCC required + # static libs to a separate place and use it in the build. + if [[ ! -d "${at_dest}/tmp/gcc_3" ]]; then + mkdir -p ${at_dest}/tmp/gcc_3 + fi + if [[ "${build_arch}" == ppc64* ]]; then + cp -t ${at_dest}/tmp/gcc_3 \ + ${at_dest}/lib64/*gmp* \ + ${at_dest}/lib64/*mpfr* \ + ${at_dest}/lib64/*mpc* \ + ${at_dest}/lib64/libsupc++.a \ + ${at_dest}/lib64/libstdc++.a + else + cp -t ${at_dest}/tmp/gcc_3 \ + ${at_dest}/lib/*gmp* \ + ${at_dest}/lib/*mpfr* \ + ${at_dest}/lib/*mpc* + fi + fi +} + +# Required post install hacks (this one is run after the final install move) +atcfg_posti_hacks() { + # Cleanup the temp files + rm -rf ${at_dest}/tmp +} + +# Conditional pre configure settings or commands to run +atcfg_pre_configure() { + if [[ "${cross_build}" == "no" ]]; then + cc_64=${system_cc} + cxx_64=${system_cxx} + libdir="${at_dest}/tmp/gcc_3" + if [[ "${cross_build}" == "no" ]]; then + if [[ "${build_arch}" == ppc64* ]]; then + if [[ "${default_compiler}" == "32" ]]; then + cc_64="${gcc64}" + cxx_64="${gpp64}" + fi + fi + fi + fi +} + +# Conditional configure command for builds +atcfg_configure() { + if [[ "${cross_build}" == "no" ]]; then + CC="${cc_64}" \ + CXX="${cxx_64}" \ + CFLAGS="-O2 -mminimal-toc" \ + CXXFLAGS="-O2 -mminimal-toc" \ + AS="${at_dest}/bin/as" \ + LD="${at_dest}/bin/ld" \ + LDFLAGS="-L${libdir}" \ + POSTSTAGE1_LDFLAGS="-L${libdir} -lstdc++ -lsupc++ -lm -lgmp -lgmpxx -lmpfr -lmpc" \ + ${ATSRC_PACKAGE_WORK}/configure \ + --build=${target64:-$target} \ + --host=${target64:-$target} \ + --target=${target64:-$target} \ + --prefix="${at_dest}" \ + ${with_longdouble:+--with-long-double-128} \ + ${with_dfp_standalone:+--enable-decimal-float} \ + ${secure_plt:+--enable-secureplt} \ + ${disable_multilib:+--disable-multilib} \ + --enable-threads=posix \ + --enable-languages=c,c++ \ + --enable-__cxa_atexit \ + --enable-shared \ + --enable-checking=release \ + --enable-gnu-indirect-function \ + --enable-linker-build-id \ + --disable-libgomp \ + --with-gmp-include="${at_dest}/include" \ + --with-gmp-lib=${libdir} \ + --with-mpfr-include="${at_dest}/include" \ + --with-mpfr-lib=${libdir} \ + --with-mpc-include="${at_dest}/include" \ + --with-mpc-lib=${libdir} \ + --without-ppl \ + --without-cloog \ + --without-libelf \ + --with-as="${at_dest}/bin/as" \ + --with-ld="${at_dest}/bin/ld" \ + --with-cpu=${build_base_arch} \ + --with-tune=${build_optimization} + else + echo "No configure on gcc_3 cross stage" + fi +} + +# Make build command +atcfg_make() { + if [[ "${cross_build}" == "no" ]]; then + # With -isystem we make sure that system's gcc (stage1) will recognize + # AT headers as system headers and give them special treatment. + ${SUB_MAKE} STAGE1_CFLAGS="-isystem ${at_dest}/include" STAGE1_CXXFLAGS="-isystem ${at_dest}/include" all + else + echo "No make all on gcc_3 cross stage" + fi +} + +# Conditional install build command +atcfg_install() { + if [[ "${cross_build}" == "no" ]]; then + make install -j1 DESTDIR=${install_place} + else + echo "No make install on gcc_3 cross stage" + fi +} + +# Conditional post install settings or commands to run +atcfg_post_install() { + if [[ "${cross_build}" == "no" ]]; then + # Remove unnecessary python scripts + find "${install_place}/${at_dest}/lib" "${install_place}/${at_dest}/lib64" -name "libstdc++.so.*-gdb.py" -print -delete + fi +} diff --git a/configs/7.1/packages/gcc/stage_4 b/configs/7.1/packages/gcc/stage_4 new file mode 100644 index 000000000..36782c125 --- /dev/null +++ b/configs/7.1/packages/gcc/stage_4 @@ -0,0 +1,230 @@ +#!/usr/bin/env bash +# +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# GCC build parameters for stage 4 +# ================================ +# + +ATCFG_HOLD_TEMP_INSTALL='no' +ATCFG_HOLD_TEMP_BUILD='no' +# Build in a new directory +ATCFG_BUILD_STAGE_T='dir' + + +# ATCFG_CONFIGURE SETTINGS +# ========================================================= +# Conditional configure command +atcfg_configure() { + if [[ "${cross_build}" == "no" ]]; then + # Configure command for native builds + PATH=${at_dest}/bin:${PATH} \ + CC="${at_dest}/bin/gcc" \ + CFLAGS="-O2" \ + CXXFLAGS="-O2" \ + CFLAGS_FOR_TARGET="-O3" \ + CXXFLAGS_FOR_TARGET="-O3" \ + AS="${at_dest}/bin/as" \ + LD="${at_dest}/bin/ld" \ + LDFLAGS="-L${at_dest}/lib64" \ + ${ATSRC_PACKAGE_WORK}/configure \ + --build=${target64:-$target} \ + --host=${target64:-$target} \ + --target=${target64:-$target} \ + --with-cpu=${default_cpu} \ + --prefix="${at_dest}" \ + ${with_longdouble:+--with-long-double-128} \ + ${with_dfp_standalone:+--enable-decimal-float} \ + ${secure_plt:+--enable-secureplt} \ + ${disable_multilib:+--disable-multilib} \ + --enable-threads=posix \ + --enable-languages=${build_gcc_languages} \ + --enable-__cxa_atexit \ + --enable-shared \ + --enable-checking=release \ + --enable-lto \ + --enable-gnu-indirect-function \ + --enable-linker-build-id \ + --with-gmp-include="${at_dest}/include" \ + --with-gmp-lib="${at_dest}/lib64" \ + --with-mpfr-include="${at_dest}/include" \ + --with-mpfr-lib="${at_dest}/lib64" \ + --with-mpc-include="${at_dest}/include" \ + --with-mpc-lib="${at_dest}/lib64" \ + --without-ppl \ + --without-cloog \ + --without-libelf \ + --with-host-libstdcxx="-L${at_dest}/lib64 -lstdc++ -lsupc++ -lgmp -lgmpxx -lm" \ + --with-cpu=${build_base_arch} \ + --with-tune=${build_optimization} + else + # Configure command for cross builds + CC="${system_cc}" \ + CXX="${system_cxx}" \ + LD_FOR_TARGET="${at_dest}/bin/${target}-ld" \ + AS_FOR_TARGET="${at_dest}/bin/${target}-as" \ + AR_FOR_TARGET="${at_dest}/bin/${target}-ar" \ + RANLIB_FOR_TARGET="${at_dest}/bin/${target}-ranlib" \ + NM_FOR_TARGET="${at_dest}/bin/${target}-nm" \ + ${ATSRC_PACKAGE_WORK}/configure \ + --build=${host} \ + --host=${host} \ + --target=${target64:-${target}} \ + --prefix="${at_dest}" \ + --enable-shared \ + ${with_longdouble:+--with-long-double-128} \ + ${with_dfp:+--enable-decimal-float} \ + ${secure_plt:+--enable-secureplt} \ + ${disable_multilib:+--disable-multilib} \ + --enable-threads=posix \ + --enable-languages=${build_gcc_languages} \ + --enable-__cxa_atexit \ + --enable-lto \ + --enable-gnu-indirect-function \ + --enable-linker-build-id \ + --enable-cross \ + --disable-bootstrap \ + --with-as="${at_dest}/bin/${target}-as" \ + --with-ld="${at_dest}/bin/${target}-ld" \ + --with-gmp-include="${at_dest}/include" \ + --with-gmp-lib="${at_dest}/lib" \ + --with-mpfr-include="${at_dest}/include" \ + --with-mpfr-lib="${at_dest}/lib" \ + --with-mpc-include="${at_dest}/include" \ + --with-mpc-lib="${at_dest}/lib" \ + --without-ppl \ + --without-cloog \ + --without-libelf \ + --with-sysroot="${dest_cross}" \ + --with-host-libstdcxx="-L${at_dest}/lib -lstdc++ -lsupc++ -lgmp -lgmpxx -lm" \ + --with-cpu=${build_base_arch} \ + --with-tune=${build_optimization} + fi +} + +# Pre make settings or commands to run +atcfg_pre_make() { + # Name of the link time optimization patch. + local LTO_PATCH="gcc-lto.patch" + if [[ "${cross_build}" == "no" ]]; then + # Pre make settings or commands + pushd ${ATSRC_PACKAGE_WORK} + if [[ ! -f ${LTO_PATCH} ]]; then + echo "No gcc link-time optimization patch found!" + exit 1 + fi + # Ignore when the patch is already applied + patch -sfR --dry-run -p1 -i ${LTO_PATCH} > /dev/null \ + || patch -p1 < ${LTO_PATCH} + if [[ ${?} -ne 0 ]]; then + echo "Error applying gcc link-time optimization patch!" + exit 1 + fi + popd + fi +} + +# Make build command +atcfg_make() { + if [[ "${cross_build}" == "no" ]]; then + # Make build command + # libgo_cv_lib_setcontext_clobbers=no must be set for + # 32 bit go builds to work correctly. Once + # RH BZ 1018072 is fixed then setting the variable is + # no longer needed and the build will work. + PATH=${at_dest}/bin:${PATH} libgo_cv_lib_setcontext_clobbers_tls=no \ + ${SUB_MAKE} STAGE1_CFLAGS="-g -O" profiledbootstrap + else + PATH=${at_dest}/bin:${PATH} libgo_cv_lib_setcontext_clobbers_tls=no \ + ${SUB_MAKE} STAGE1_CFLAGS="-g -O" + fi +} + + +# Pre install settings or commands to run +atcfg_pre_install() { + # The gcc install recipe must be able to find the following folders + # so that it can perform its tasks properly, as installing target + # host binaries on cross builds. The binutils package will create + # this folders on its install. As our installs are atomic, we need + # to provide them before hand, so GCC finds it and its install + # recipe can perform properly. + [[ -d "${install_place}/${at_dest}/${target}/bin" ]] || \ + mkdir -p "${install_place}/${at_dest}/${target}/bin" + [[ -d "${install_place}/${at_dest}/${target}/lib" ]] || \ + mkdir -p "${install_place}/${at_dest}/${target}/lib" +} + +# Install build command +atcfg_install() { + PATH=${at_dest}/bin:${PATH} \ + make install -j1 DESTDIR=${install_place} +} +# Post install settings or commands to run +atcfg_post_install() { + if [[ "${cross_build}" == "yes" ]]; then + # Place some additional files for build process + mkdir -p ${install_place}/${dest_cross}/usr/lib + if [[ "${build_arch}" == ppc64* ]]; then + # We need to manually copy these + cp -d ${install_place}/${at_dest}/${target64}/lib/libgcc_s.so* ${install_place}/${dest_cross}/usr/lib/ + cp -d ${install_place}/${at_dest}/${target64}/lib/libstdc++.so* ${install_place}/${dest_cross}/usr/lib/ + else + cp -d ${install_place}/${at_dest}/${target}/lib/libgcc_s.so* ${install_place}/${dest_cross}/usr/lib/ + cp -d ${install_place}/${at_dest}/${target}/lib/libstdc++.so* ${install_place}/${dest_cross}/usr/lib/ + fi + # This was needed to fix the cross build which defaults to ${target64} + # targets but now, we are assuming that every build should have the + # triple shortcut installed, so we create gcc ${target32}-* symlinks + pushd ${install_place}/${at_dest}/bin + for CMD in c++ cpp g++ gcc gcov gfortran; do + if [[ -x ${target64}-${CMD} ]] && \ + [[ ! -f ${target32}-${CMD} ]]; then + ln -sfn ${target64}-${CMD} ${target32}-${CMD} + fi + done + popd + else + pushd ${install_place}/${at_dest}/bin + # This is necessary for some applications to work + if [[ ! -e "cc" ]]; then + ln -s "gcc" "cc" + fi + popd + # Remove unnecessary python scripts + find "${install_place}/${at_dest}" -name "libstdc++.so.*-gdb.py" -print -delete + set -e + # Hack around to avoid ld.so.cache getting the libs from the + # system as ldconfig puts platform based directories preceding + # other directories. + check_dirs= + if [[ -n "${target32}" ]]; then + check_dirs="${install_transfer}/lib" + fi + if [[ -n "${target64}" ]]; then + if [[ -n "${target32}" ]]; then + check_dirs="${install_transfer}/lib64 ${check_dirs}" + else + check_dirs="${install_transfer}/lib64" + fi + fi + for dir in ${check_dirs}; do + ${AT_BASE}/scripts/utilities/create_lib_symlinks.sh \ + "${dir}" "${dir}/${build_load_arch}" + done + set +e + fi +} diff --git a/configs/7.1/packages/gcc/stage_optimized b/configs/7.1/packages/gcc/stage_optimized new file mode 100644 index 000000000..2c384778e --- /dev/null +++ b/configs/7.1/packages/gcc/stage_optimized @@ -0,0 +1,134 @@ +#!/usr/bin/env bash +# +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# GCC build parameters for stage optimized +# ======================================== +# + +ATCFG_HOLD_TEMP_INSTALL='no' +ATCFG_HOLD_TEMP_BUILD='no' +# Build in a new directory +ATCFG_BUILD_STAGE_T='dir' + + +atcfg_pre_configure() { + # Check the need of a cross-compiler build + if [[ "${at_build_cpu}" == "${AT_OPTIMIZE_CPU}" ]]; then + echo cross-compiling=no >> ./configparms + else + echo cross-compiling=yes >> ./configparms + fi +} + + +atcfg_configure() { + PATH=${at_dest}/bin:${PATH} \ + CC="${at_dest}/bin/gcc" \ + CFLAGS="-O2" \ + CXXFLAGS="-O2" \ + CFLAGS_FOR_TARGET="-O3" \ + CXXFLAGS_FOR_TARGET="-O3" \ + AS="${at_dest}/bin/as" \ + LD="${at_dest}/bin/ld" \ + LDFLAGS="-L${at_dest}/lib64" \ + ${ATSRC_PACKAGE_WORK}/configure \ + --build=${target64:-$target} \ + --host=${target64:-$target} \ + --target=${target64:-$target} \ + --prefix="${at_dest}" \ + ${with_longdouble:+--with-long-double-128} \ + ${with_dfp_standalone:+--enable-decimal-float} \ + ${secure_plt:+--enable-secureplt} \ + ${disable_multilib:+--disable-multilib} \ + --enable-threads=posix \ + --enable-languages=${build_gcc_languages} \ + --enable-__cxa_atexit \ + --enable-shared \ + --enable-checking=release \ + --enable-gnu-indirect-function \ + --enable-linker-build-id \ + --enable-lto \ + --disable-bootstrap \ + --with-gmp-include="${at_dest}/include" \ + --with-gmp-lib="${at_dest}/lib64" \ + --with-mpfr-include="${at_dest}/include" \ + --with-mpfr-lib="${at_dest}/lib64" \ + --with-mpc-include="${at_dest}/include" \ + --with-mpc-lib="${at_dest}/lib64" \ + --without-ppl \ + --without-cloog \ + --without-libelf \ + --with-host-libstdcxx="-L${at_dest}/lib64 -lstdc++ -lsupc++ -lgmp -lgmpxx -lm" \ + --with-cpu=${AT_OPTIMIZE_CPU/ppc/} \ + --with-tune=${AT_OPTIMIZE_CPU/ppc/} +} + + +atcfg_make() { + # libgo_cv_lib_setcontext_clobbers=no must be set for + # 32 bit go builds to work correctly. Once + # RH BZ 1018072 is fixed then setting the variable is + # no longer needed and the build will work. + PATH=${at_dest}/bin:${PATH} \ + libgo_cv_lib_setcontext_clobbers_tls=no \ + ${SUB_MAKE} all +} + + +atcfg_install() { + PATH=${at_dest}/bin:${PATH} \ + make -j1 DESTDIR=${install_place} install-target +} + + +atcfg_post_install() { + # Remove unneeded install files + rm -rf ${install_place}/${at_dest}/lib/gcc + find "${install_place}" -type f -name "*.o" -print -delete + find "${install_place}" -type f -name "*.a" -print -delete + find "${install_place}" -type f -name "*.la" -print -delete + find "${install_place}" -type f -name "*.py" -print -delete + # Save all libraries into a tar file + pushd "${install_place}/${at_dest}/lib" + local flist=$(find . -name "*.so" -o -name "*.so.*") + [[ -n "${flist}" ]] && \ + tar czf "${install_place}/${AT_OPTIMIZE_CPU}.tar.gz" \ + ${flist} + popd + pushd "${install_place}/${at_dest}/lib64" + local flist=$(find . -name "*.so" -o -name "*.so.*") + [[ -n "${flist}" ]] && \ + tar czf "${install_place}/${AT_OPTIMIZE_CPU}_64.tar.gz" \ + ${flist} + popd + # Remove all installed built files + rm -rf "${install_place}/${at_dest}" + # Create processor lib/lib64 targets + mkdir -p "${install_place}/${at_dest}/lib/${AT_OPTIMIZE_CPU}" + mkdir -p "${install_place}/${at_dest}/lib64/${AT_OPTIMIZE_CPU}" + # Place saved libs on created final target + pushd "${install_place}/${at_dest}/lib/${AT_OPTIMIZE_CPU}" + [[ -e "${install_place}/${AT_OPTIMIZE_CPU}.tar.gz" ]] && \ + tar xzf "${install_place}/${AT_OPTIMIZE_CPU}.tar.gz" + popd + pushd "${install_place}/${at_dest}/lib64/${AT_OPTIMIZE_CPU}" + [[ -e "${install_place}/${AT_OPTIMIZE_CPU}_64.tar.gz" ]] && \ + tar xzf "${install_place}/${AT_OPTIMIZE_CPU}_64.tar.gz" + popd + rm -f "${install_place}/${AT_OPTIMIZE_CPU}.tar.gz" \ + "${install_place}/${AT_OPTIMIZE_CPU}_64.tar.gz" +} diff --git a/configs/7.1/packages/gdb/gdb.mk b/configs/7.1/packages/gdb/gdb.mk new file mode 120000 index 000000000..543b4b2e8 --- /dev/null +++ b/configs/7.1/packages/gdb/gdb.mk @@ -0,0 +1 @@ +../../../7.0/packages/gdb/gdb.mk \ No newline at end of file diff --git a/configs/7.1/packages/gdb/sources b/configs/7.1/packages/gdb/sources new file mode 100644 index 000000000..0bd4400cd --- /dev/null +++ b/configs/7.1/packages/gdb/sources @@ -0,0 +1,141 @@ +#!/usr/bin/env bash +# +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# GDB source package and build info +# ================================= +# +ATSRC_PACKAGE_NAME="GDB (GNU Debugger)" +ATSRC_PACKAGE_VER=7.7 +ATSRC_PACKAGE_REV=464e7cad +ATSRC_PACKAGE_LICENSE="GPL 2.0" +ATSRC_PACKAGE_DOCLINK="http://sourceware.org/gdb/current/onlinedocs/gdb/" +ATSRC_PACKAGE_RELFIXES= +ATSRC_PACKAGE_STR_VER="${ATSRC_PACKAGE_NAME} ${ATSRC_PACKAGE_VER}${ATSRC_PACKAGE_REV:+-${ATSRC_PACKAGE_REV}}" +ATSRC_PACKAGE_PRE="test -d gdb-${ATSRC_PACKAGE_VER}${ATSRC_PACKAGE_REV:+-${ATSRC_PACKAGE_REV}}" +# git.linux.ibm.com is a mirror of sourceware.org. +ATSRC_PACKAGE_CO=([0]="git clone git://git.linux.ibm.com/binutils-gdb/binutils-gdb.git gdb" \ + [1]="git clone git://sourceware.org/git/binutils-gdb.git gdb") +ATSRC_PACKAGE_GIT="git checkout -b gdb-${ATSRC_PACKAGE_VER}${ATSRC_PACKAGE_REV:+-${ATSRC_PACKAGE_REV}} ${ATSRC_PACKAGE_REV}" +ATSRC_PACKAGE_POST="mv gdb gdb-${ATSRC_PACKAGE_VER}${ATSRC_PACKAGE_REV:+-${ATSRC_PACKAGE_REV}}" +ATSRC_PACKAGE_SRC="${AT_BASE}/sources/gdb-${ATSRC_PACKAGE_VER}${ATSRC_PACKAGE_REV:+-${ATSRC_PACKAGE_REV}}" +ATSRC_PACKAGE_WORK=${AT_WORK_PATH}/gdb +ATSRC_PACKAGE_MLS= +ATSRC_PACKAGE_ALOC= +ATSRC_PACKAGE_TARS= +ATSRC_PACKAGE_PATCHES= +ATSRC_PACKAGE_MAKE_CHECK="" +ATSRC_PACKAGE_DISTRIB=yes +ATSRC_PACKAGE_BUILDCROSS=yes +ATSRC_PACKAGE_BUNDLE=devel + +atsrc_get_patches () +{ + at_get_patch \ + https://github.com/powertechpreview/powertechpreview/raw/master/GDB%20Patches/gdb-ignore-linux-vdso.tgz \ + 10bdbcac7947ac59b7f55cb7b8562ac5 || return ${?} + + at_get_patch_and_trim \ + 'https://www.sourceware.org/cgi-bin/get-raw-msg?listname=gdb-patches&date=2014-01&msgid=201401311641.s0VGfTZN005116%40d06av02.portsmouth.uk.ibm.com' \ + gdb-ppc64le-01.patch 1345 \ + e5c5c003078f8ddac3df88062fab5170 || return ${?} + + at_get_patch_and_trim \ + 'https://www.sourceware.org/cgi-bin/get-raw-msg?listname=gdb-patches&date=2014-01&msgid=201401311642.s0VGg05n005810%40d06av02.portsmouth.uk.ibm.com' \ + gdb-ppc64le-02.patch 14 \ + f825e00def139a8f39834d66d2d626b6 || return ${?} + + at_get_patch_and_trim \ + 'https://www.sourceware.org/cgi-bin/get-raw-msg?listname=gdb-patches&date=2014-01&msgid=201401311642.s0VGgXJw007036%40d06av02.portsmouth.uk.ibm.com' \ + gdb-ppc64le-03.patch 36 \ + 109f296095c8becc95a58c37048abc4e || return ${?} + + at_get_patch_and_trim \ + 'https://www.sourceware.org/cgi-bin/get-raw-msg?listname=gdb-patches&date=2014-01&msgid=201401311643.s0VGh5qg007869%40d06av02.portsmouth.uk.ibm.com' \ + gdb-ppc64le-04.patch 90 \ + f848204ee940c034eb67e588dea2617a || return ${?} + + at_get_patch_and_trim \ + 'https://www.sourceware.org/cgi-bin/get-raw-msg?listname=gdb-patches&date=2014-01&msgid=201401311643.s0VGhWZ9008469%40d06av02.portsmouth.uk.ibm.com' \ + gdb-ppc64le-05.patch 28 \ + 84a5146c494d372581f05f27cd196fe5 || return ${?} + + at_get_patch_and_trim \ + 'https://www.sourceware.org/cgi-bin/get-raw-msg?listname=gdb-patches&date=2014-01&msgid=201401311643.s0VGhr9L008989%40d06av02.portsmouth.uk.ibm.com' \ + gdb-ppc64le-06.patch 83 \ + 58a91bd2314d10091dbaaeea0f45dd14 || return ${?} + + at_get_patch_and_trim \ + 'https://www.sourceware.org/cgi-bin/get-raw-msg?listname=gdb-patches&date=2014-01&msgid=201401311644.s0VGiIHX009588%40d06av02.portsmouth.uk.ibm.com' \ + gdb-ppc64le-07.patch 110 \ + ad4ac9c546d7f7791278a9f9b44c68c8 || return ${?} + + at_get_patch_and_trim \ + 'https://www.sourceware.org/cgi-bin/get-raw-msg?listname=gdb-patches&date=2014-01&msgid=201401311644.s0VGidQP009944%40d06av02.portsmouth.uk.ibm.com' \ + gdb-ppc64le-08.patch 94 \ + 6dc31074169fb0e23932f5a1edd73741 || return ${?} + + at_get_patch_and_trim \ + 'https://www.sourceware.org/cgi-bin/get-raw-msg?listname=gdb-patches&date=2014-01&msgid=201401311644.s0VGiw6i010306%40d06av02.portsmouth.uk.ibm.com' \ + gdb-ppc64le-09.patch 21 \ + 859f9cee037d0f56f08c9494ebc37974 || return ${?} + + at_get_patch_and_trim \ + 'https://www.sourceware.org/cgi-bin/get-raw-msg?listname=gdb-patches&date=2014-01&msgid=201401311645.s0VGjPtp011193%40d06av02.portsmouth.uk.ibm.com' \ + gdb-ppc64le-10.patch 268 \ + c0c08f3d15719ed80c9c0637164dc33f || return ${?} + + at_get_patch_and_trim \ + 'https://www.sourceware.org/cgi-bin/get-raw-msg?listname=gdb-patches&date=2014-01&msgid=201401311645.s0VGjrRl011740%40d06av02.portsmouth.uk.ibm.com' \ + gdb-ppc64le-11.patch 273 \ + 166c549cb51a2e494ff0cce07064b9ef || return ${?} + + at_get_patch_and_trim \ + 'https://sourceware.org/cgi-bin/get-raw-msg?listname=gdb-patches&date=2014-07&msgid=1405380516-13496-1-git-send-email-emachado%40linux.vnet.ibm.com' \ + gdb-hw_bp.patch 19 \ + 9c0a4aa35289a8e703219d78fd223ef6 || return ${?} + + at_get_patch_and_trim \ + 'https://sourceware.org/cgi-bin/get-raw-msg?listname=gdb-patches&date=2014-09&msgid=1410525085-29172-1-git-send-email-emachado%40linux.vnet.ibm.com' \ + gdb-pr17379.patch 104 \ + 0c7d73f06933449acb651e3fc4e43c38 || return ${?} + + at_get_patch_and_trim \ + 'https://sourceware.org/cgi-bin/get-raw-msg?listname=gdb-patches&date=2014-09&msgid=1409947102-32166-1-git-send-email-emachado%40linux.vnet.ibm.com' \ + gdb-ptrace.patch 62 \ + 9cca648d83424f9551ed142a2cfb8632 || return ${?} +} + +atsrc_apply_patches () +{ + tar xzf gdb-ignore-linux-vdso.tgz || return ${?} + + patch -p1 < ignore-linux-vdso.patch || return ${?} + patch -p1 < gdb-ppc64le-01.patch || return ${?} + patch -p1 < gdb-ppc64le-02.patch || return ${?} + patch -p1 < gdb-ppc64le-03.patch || return ${?} + patch -p1 < gdb-ppc64le-04.patch || return ${?} + patch -p1 < gdb-ppc64le-05.patch || return ${?} + patch -p1 < gdb-ppc64le-06.patch || return ${?} + patch -p1 < gdb-ppc64le-07.patch || return ${?} + patch -p1 < gdb-ppc64le-08.patch || return ${?} + patch -p1 < gdb-ppc64le-09.patch || return ${?} + patch -p1 < gdb-ppc64le-10.patch || return ${?} + patch -p1 < gdb-ppc64le-11.patch || return ${?} + patch -p1 < gdb-hw_bp.patch || return ${?} + patch -p1 < gdb-pr17379.patch || return ${?} + patch -p1 < gdb-ptrace.patch || return ${?} +} diff --git a/configs/7.1/packages/gdb/specfile b/configs/7.1/packages/gdb/specfile new file mode 120000 index 000000000..dc0937117 --- /dev/null +++ b/configs/7.1/packages/gdb/specfile @@ -0,0 +1 @@ +../../../7.0/packages/gdb/specfile \ No newline at end of file diff --git a/configs/7.1/packages/gdb/stage_1 b/configs/7.1/packages/gdb/stage_1 new file mode 100644 index 000000000..684893ab0 --- /dev/null +++ b/configs/7.1/packages/gdb/stage_1 @@ -0,0 +1,85 @@ +#!/usr/bin/env bash +# +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# GDB build parameters for stage 1 +# ================================ +# + +source ${AT_BASE}/scripts/utilities/bitsize_selection.sh + +# Tell the build system to hold the temp install folder +ATCFG_HOLD_TEMP_INSTALL='no' +# Tell the build system to hold the temp build folder +ATCFG_HOLD_TEMP_BUILD='no' +# Build in a new directory +ATCFG_BUILD_STAGE_T='dir' + + +atcfg_configure() { + local base_libdir="lib64" + local enable_bfd="--enable-64-bit-bfd" + local bit_size=64 + + if [[ "${cross_build}" == "yes" ]]; then + CC="${system_cc}" \ + CFLAGS="-g -m${env_build_arch}" \ + ${ATSRC_PACKAGE_WORK}/configure --build=${host} \ + --host=${host} \ + --target=${target64:-$target} \ + --prefix="${at_dest}" \ + --libdir="${at_dest}/lib" \ + ${disable_multilib: +--disable_multilb} \ + --with-expat \ + --with-expat-include="${at_dest}/include" \ + --with-expat-lib="${at_dest}/lib" \ + --with-separate-debug-dir="/usr/lib64/debug" + else + if [[ "${build_arch}" == "ppc" ]]; then + base_libdir="lib" + enable_bfd= + fi + PATH=${at_dest}/bin:${PATH} \ + CC="${at_dest}/bin/gcc" \ + CFLAGS="-g -m${bit_size}" \ + PYTHONHOME="${at_dest}" \ + ${ATSRC_PACKAGE_WORK}/configure \ + --host=${target} \ + --target=${target} \ + --build=${target} \ + --prefix="${at_dest}" \ + --libdir="${at_dest}/${base_libdir}" \ + ${enable_bfd} \ + --disable-sim \ + --with-expat \ + --with-expat-include="${at_dest}/include" \ + --with-expat-lib="${at_dest}/${base_libdir}" \ + --with-python="${at_dest}/bin/python" \ + --with-separate-debug-dir="/usr/${base_libdir}/debug" + fi +} + + +atcfg_make() { + PATH=${at_dest}/bin:${PATH} \ + ${SUB_MAKE} all-gdb +} + + +atcfg_install() { + PATH=${at_dest}/bin:${PATH} \ + ${SUB_MAKE} install-gdb DESTDIR=${install_place} +} diff --git a/configs/7.1/packages/glibc/glibc.mk b/configs/7.1/packages/glibc/glibc.mk new file mode 100644 index 000000000..a96e5cb2b --- /dev/null +++ b/configs/7.1/packages/glibc/glibc.mk @@ -0,0 +1,68 @@ +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# +# +$(eval $(call set_provides,glibc_1,multi,cross_yes)) +$(eval $(call set_provides,glibc_2,multi,cross_no)) +ifeq ($(BUILD_IGNORE_COMPAT),no) + $(eval $(call set_provides,glibc_compat,multi,cross_no)) +endif + +# List of dependencies in order to build the tuned libraries for 32 or +# 64 bits. +glibc_tuned-32-deps := $(RCPTS)/gcc_3.rcpt \ + $(RCPTS)/rsync_glibc.rcpt +glibc_tuned-64-deps := $(RCPTS)/gcc_3.rcpt \ + $(RCPTS)/rsync_glibc.rcpt +# Enable tuned targets +$(eval $(call provide_tuneds,glibc)) + +glibc_1: $(RCPTS)/glibc_1.rcpt + +glibc_2: $(RCPTS)/glibc_2.rcpt + +glibc_compat: $(RCPTS)/glibc_compat.rcpt + +glibc_tuned: $(RCPTS)/glibc_tuned.rcpt + +$(RCPTS)/glibc_1.rcpt: $(glibc_1-archdeps) + @touch $@ + +$(RCPTS)/glibc_2.rcpt: $(glibc_2-archdeps) + @touch $@ + +$(RCPTS)/glibc_compat.rcpt: $(glibc_compat-archdeps) + @touch $@ + +$(RCPTS)/glibc_1-32.a.rcpt: $(RCPTS)/gcc_1.rcpt $(RCPTS)/rsync_glibc.rcpt + @touch $@ + +$(RCPTS)/glibc_1-64.a.rcpt: $(RCPTS)/gcc_1.rcpt $(RCPTS)/rsync_glibc.rcpt + @touch $@ + +$(RCPTS)/glibc_2-32.a.rcpt: $(RCPTS)/gcc_3.rcpt + @touch $@ + +$(RCPTS)/glibc_2-64.a.rcpt: $(RCPTS)/gcc_3.rcpt + @touch $@ + +$(RCPTS)/glibc_compat-32.a.rcpt: $(RCPTS)/gcc_3.rcpt + @touch $@ + +$(RCPTS)/glibc_compat-64.a.rcpt: $(RCPTS)/gcc_3.rcpt + @touch $@ + +$(RCPTS)/glibc_tuned.rcpt: $(glibc_tuned-archdeps) + @touch $@ diff --git a/configs/7.1/packages/glibc/sources b/configs/7.1/packages/glibc/sources new file mode 100644 index 000000000..24825ed3b --- /dev/null +++ b/configs/7.1/packages/glibc/sources @@ -0,0 +1,45 @@ +#!/usr/bin/env bash +# +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# GLIBC source package and build info +# =================================== +# + +ATSRC_PACKAGE_NAME="GNU C Library" +ATSRC_PACKAGE_VER=2.19 +ATSRC_PACKAGE_REV=bde2a94 +ATSRC_PACKAGE_LICENSE="LGPL 2.1" +ATSRC_PACKAGE_DOCLINK="http://www.gnu.org/software/libc/manual/html_node/index.html" +ATSRC_PACKAGE_RELFIXES= +ATSRC_PACKAGE_STR_VER="${ATSRC_PACKAGE_NAME} ${ATSRC_PACKAGE_VER}-ibm" +ATSRC_PACKAGE_PRE="test -d glibc-${ATSRC_PACKAGE_VER}-${ATSRC_PACKAGE_REV}" +# git://git.linux.ibm.com/toolchain-mirrors/glibc.git is a mirror of the git://sourceware.org/git/glibc.git +ATSRC_PACKAGE_CO=([0]="git clone git://git.linux.ibm.com/toolchain-mirrors/glibc.git" \ + [1]="git clone git://sourceware.org/git/glibc.git") +ATSRC_PACKAGE_GIT="git checkout -b glibc-${ATSRC_PACKAGE_VER}${ATSRC_PACKAGE_REV:+-${ATSRC_PACKAGE_REV}} ${ATSRC_PACKAGE_REV}" +ATSRC_PACKAGE_POST="mv glibc glibc-${ATSRC_PACKAGE_VER}${ATSRC_PACKAGE_REV:+-${ATSRC_PACKAGE_REV}}" +ATSRC_PACKAGE_SRC=${AT_BASE}/sources/glibc-${ATSRC_PACKAGE_VER}${ATSRC_PACKAGE_REV:+-${ATSRC_PACKAGE_REV}} +ATSRC_PACKAGE_WORK=${AT_WORK_PATH}/glibc +ATSRC_PACKAGE_MLS= +ATSRC_PACKAGE_PATCHES="" +ATSRC_PACKAGE_ALOC="" +ATSRC_PACKAGE_TARS= +ATSRC_PACKAGE_MAKE_CHECK= +ATSRC_PACKAGE_PORTS= +ATSRC_PACKAGE_DISTRIB=yes +ATSRC_PACKAGE_BUILDCROSS=yes +ATSRC_PACKAGE_BUNDLE=toolchain diff --git a/configs/7.1/packages/glibc/specfile b/configs/7.1/packages/glibc/specfile new file mode 120000 index 000000000..1d99e5bfd --- /dev/null +++ b/configs/7.1/packages/glibc/specfile @@ -0,0 +1 @@ +../../../7.0/packages/glibc/specfile \ No newline at end of file diff --git a/configs/7.1/packages/glibc/stage_1 b/configs/7.1/packages/glibc/stage_1 new file mode 100644 index 000000000..59ed51bf2 --- /dev/null +++ b/configs/7.1/packages/glibc/stage_1 @@ -0,0 +1,255 @@ +#!/usr/bin/env bash +# +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# GLIBC build parameters for stage 1 32/64 bits +# ============================================= +# + +# We can't use the newly built gcc to compile glibc because it will set the +# dynamic linker to be ${dest}/lib/ld.so.1, which isn't installed until the +# glibc build finishes. So trying to run anything compiled with the new gcc +# will fail, in particular, glibc configure tests. I suppose you might be +# able to supply glibc configure with lots of libc_cv_* variables to +# avoid this, but then you'd forever be changing this script to keep up with +# new glibc configure tests. +# Note that dynamically linked programs built here with the old host gcc are +# subtly broken too; The glibc build sets their dynamic linker to +# ${dest}/lib/ld.so.1 but doesn't provide rpath. Which means you'll get the +# new ld.so trying to use the system libc.so, which doesn't work. ld.so and +# libc.so share data structures so are tightly coupled. To run the new +# programs, you need to set LD_LIBRARY_PATH for them, or better (so as to not +# affect forked commands that might need the system libs), run ld.so.x +# explicitly, passing --library-path as is done for localedef below. +# This is one of the reasons why you need to build glibc twice. + +# Include some standard functions +source ${utilities}/bitsize_selection.sh + +ATCFG_HOLD_TEMP_INSTALL='no' +ATCFG_HOLD_TEMP_BUILD='no' +# Build in a new directory +ATCFG_BUILD_STAGE_T='dir' + +# Required post install hacks (this one is run after the final install move) +atcfg_posti_hacks() +{ + # Set location of base directory to replace depending on ${cross_build} + if [[ "${cross_build}" == "no" ]]; then + local basedir="${at_dest}" + local libdir=${basedir}/$(find_build_libdir ${AT_BIT_SIZE}) + else + local basedir="${dest_cross}" + # On cross compilers, libraries are installed under usr/lib*/, + # instead of lib*/. But the most important C libraries are + # still available at lib*/, e.i. ld.so. + local libdir=${basedir}/usr/$(find_build_libdir ${AT_BIT_SIZE}) + fi + + local bindir=${basedir}/$(find_build_bindir ${AT_BIT_SIZE}) + local lddir=${basedir}/$(find_build_libdir ${AT_BIT_SIZE}) + + set -e + # Set the name of the loader to use based on bit size + local ld_so=$(basename $(ls ${lddir}/ld${AT_BIT_SIZE%32}.so.[0-9])) + # Replace ${libdir}/libc.so with a version compatible with binutils + # built with the --with_sysroot option set to ${at_dest} + [[ -e ${libdir}/libc.so ]] \ + && mv -f ${libdir}/libc.so ${libdir}/libc.so.orig + cat > ${libdir}/libc.so < /dev/null + ${SUB_MAKE} -C "${ATSRC_PACKAGE_WORK}/localedata" \ + objdir="${build_stage_work}" \ + install_root="/" \ + subdir=localedata \ + install-locales + popd > /dev/null + fi +} + +atcfg_pre_configure() +{ + local base_libdir=$(find_build_libdir ${AT_BIT_SIZE}) + local base_bindir=$(find_build_bindir ${AT_BIT_SIZE}) + local base_sbindir=$(find_build_sbindir ${AT_BIT_SIZE}) + local base_libexecdir=$(find_build_libexecdir ${AT_BIT_SIZE}) + if [[ "${cross_build}" == "no" ]]; then + echo cross-compiling=yes > ./configparms + echo slibdir="${at_dest}/${base_libdir}" >> ./configparms + echo libdir="${at_dest}/${base_libdir}" >> ./configparms + echo bindir="${at_dest}/${base_bindir}" >> ./configparms + echo sbindir="${at_dest}/${base_sbindir}" >> ./configparms + echo libexecdir="${at_dest}/${base_libexecdir}" >> ./configparms + echo rootsbindir="${at_dest}/${base_sbindir}" >> ./configparms + else + echo cross-compiling=yes > ./configparms + fi +} + +atcfg_configure() +{ + local base_target=$(find_build_target ${AT_BIT_SIZE}) + if [[ "${cross_build}" == "no" ]]; then + AUTOCONF="${autoconf}" \ + CC="${at_dest}/bin/gcc -m${AT_BIT_SIZE}" \ + CFLAGS="-g -O2 ${secure_plt:+-msecure-plt}" \ + libc_cv_forced_unwind="yes" \ + libc_cv_c_cleanup="yes" \ + ${ATSRC_PACKAGE_WORK}/configure \ + --build=${host} \ + --host=${base_target} \ + --prefix="${at_dest}" \ + --with-headers="${at_dest}/include" \ + --with-tls \ + --enable-add-ons=nptl \ + --without-cvs \ + --without-gd \ + --with-cpu=${build_load_arch/ppc/} \ + --without-selinux \ + --enable-kernel="${kernel}" + else + # glibc can't detect correctly if the stack protector works on + # ppc64le. + if [[ "${base_target}" == powerpc*le-* ]]; then + disable_ssp=yes + fi + + AUTOCONF="${autoconf}" \ + CC="${at_dest}/bin/${target64:-${target}}-gcc -m${AT_BIT_SIZE}" \ + CFLAGS="-g -O2" \ + AR="${at_dest}/bin/${target}-ar" \ + AS="${at_dest}/bin/${target}-as" \ + RANLIB="${at_dest}/bin/${target}-ranlib" \ + libc_cv_forced_unwind="yes" \ + libc_cv_c_cleanup="yes" \ + ${ATSRC_PACKAGE_WORK}/configure \ + --build=${host} \ + --host=${base_target} \ + --prefix="/usr" \ + --with-headers="${dest_cross}/usr/include" \ + --with-tls \ + --enable-add-ons=nptl \ + --disable-profile \ + --without-gd \ + --with-cpu=${build_load_arch} \ + --without-cvs \ + --with-tls \ + --with-__thread \ + --without-gd \ + --without-selinux \ + --enable-kernel="${kernel}" \ + ${disable_ssp:+libc_cv_ssp="no"} + fi +} + +atcfg_make() +{ + ${SUB_MAKE} +} + +atcfg_install() +{ + if [[ "${cross_build}" == "no" ]]; then + ${SUB_MAKE} install install_root="${install_place}" + else + ${SUB_MAKE} install \ + install_root="${install_place}/${dest_cross}" + fi +} + +atcfg_post_install() +{ + local base_libdir=$(find_build_libdir ${AT_BIT_SIZE}) + if [[ "${cross_build}" == "no" ]]; then + rm -rf "${install_transfer}/var/db/Makefile" + # Prepare the locale archive for inclusion in RPM. + # We can't generate it yet because the files aren't available + # on ${at_dest} yet, so we need a dummy file to guarantee it'll + # be included in the package later. + mkdir -p "${install_transfer}/${base_libdir}/locale" + touch "${install_transfer}/${base_libdir}/locale/locale-archive" + + # Re-use time zone information available in the system. + ln -s /usr/share/zoneinfo/ ${install_transfer}/share/zoneinfo + else + rm -rf "${install_place}/${dest_cross}/var/db/Makefile" + fi + + local basedirs="" + # Set location of base directory to replace depending on ${cross_build} + if [[ "${cross_build}" == "no" ]]; then + basedirs="${install_transfer}" + else + basedirs="${install_place}/${dest_cross} \ + ${install_place}/${dest_cross}/usr" + fi + + # The powerpc64le ABIv2 doesn't support 32 bits yet. However, we still + # plan to provide libraries under lib64 instead of lib in order to let + # AT work in the same way as for powerpc64 (this approach is also used + # by Fedora). However, GCC expects files under lib/ when built with + # --disable-multilib, so we need to symlink lib/ to lib64/. + if [[ "${cross_build}" == "yes" ]] \ + && [[ "${target}" == powerpc64le* ]] \ + && [[ -z "${target32}" && -n "${target64}" ]]; then + for dir in ${basedirs}; do + pushd ${dir} > /dev/null + ln -s lib64 lib + popd + done + fi + # Remove duplicated header files prior to final install when building + # for the alternate target because the main target already provides + # them. Leave only the non-common headers. + local base_target=$(find_build_target ${AT_BIT_SIZE}) + # Check the correct install place (native x cross) + if [[ "${cross_build}" == "yes" ]]; then + local check_install="${install_place}/${dest_cross}/usr/include" + else + local check_install="${install_place}/${at_dest}/include" + fi + # Perform the clean of these unneeded include files + if [[ "${base_target}" == "${alternate_target}" ]]; then + # Run the remove command to clean up include files + find ${check_install} -type f \ + -not -name "stubs-${AT_BIT_SIZE}.h" \ + -delete + # Clean any remaining empty directories + find ${check_install} \ + -depth -empty \ + -delete + fi +} diff --git a/configs/7.1/packages/glibc/stage_2 b/configs/7.1/packages/glibc/stage_2 new file mode 120000 index 000000000..3bb23dabe --- /dev/null +++ b/configs/7.1/packages/glibc/stage_2 @@ -0,0 +1 @@ +../../../7.0/packages/glibc/stage_2 \ No newline at end of file diff --git a/configs/7.1/packages/glibc/stage_compat b/configs/7.1/packages/glibc/stage_compat new file mode 120000 index 000000000..5fdfa6abf --- /dev/null +++ b/configs/7.1/packages/glibc/stage_compat @@ -0,0 +1 @@ +../../../7.0/packages/glibc/stage_compat \ No newline at end of file diff --git a/configs/7.1/packages/glibc/stage_optimized b/configs/7.1/packages/glibc/stage_optimized new file mode 120000 index 000000000..032671588 --- /dev/null +++ b/configs/7.1/packages/glibc/stage_optimized @@ -0,0 +1 @@ +../../../7.0/packages/glibc/stage_optimized \ No newline at end of file diff --git a/configs/7.1/packages/gmp/gmp.mk b/configs/7.1/packages/gmp/gmp.mk new file mode 120000 index 000000000..f83e2eb4e --- /dev/null +++ b/configs/7.1/packages/gmp/gmp.mk @@ -0,0 +1 @@ +../../../7.0/packages/gmp/gmp.mk \ No newline at end of file diff --git a/configs/7.1/packages/gmp/sources b/configs/7.1/packages/gmp/sources new file mode 100644 index 000000000..4de3a3521 --- /dev/null +++ b/configs/7.1/packages/gmp/sources @@ -0,0 +1,49 @@ +#!/usr/bin/env bash +# +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# GMP source package and build info +# ================================= +# + +ATSRC_PACKAGE_NAME="GNU Multiple Precision Library" +ATSRC_PACKAGE_VER=4.3.2 +ATSRC_PACKAGE_LICENSE="GPL 3.0" +ATSRC_PACKAGE_DOCLINK="http://gmplib.org/manual/" +ATSRC_PACKAGE_RELFIXES= +ATSRC_PACKAGE_STR_VER="${ATSRC_PACKAGE_NAME} ${ATSRC_PACKAGE_VER}" +ATSRC_PACKAGE_PRE="test -d gmp-${ATSRC_PACKAGE_VER}" +ATSRC_PACKAGE_CO=([0]="wget -N http://ftpmirror.gnu.org/gmp/gmp-${ATSRC_PACKAGE_VER}.tar.bz2" \ + [1]="wget -N ftp://ftp.unicamp.br/pub/gnu/gmp/gmp-${ATSRC_PACKAGE_VER}.tar.bz2") +ATSRC_PACKAGE_POST="tar -xjf gmp-${ATSRC_PACKAGE_VER}.tar.bz2" +ATSRC_PACKAGE_SRC=${AT_BASE}/sources/gmp-${ATSRC_PACKAGE_VER} +ATSRC_PACKAGE_WORK=${AT_WORK_PATH}/gmp +ATSRC_PACKAGE_MAKE_CHECK= +ATSRC_PACKAGE_DISTRIB=yes +ATSRC_PACKAGE_BUILDCROSS=yes +ATSRC_PACKAGE_BUNDLE=toolchain + +atsrc_get_patches () +{ + at_get_patch \ + 'https://gist.github.com/anonymous/8441569/raw/ec36c484e56c16d84acc751aaa5877b527da6166/gmp-ppc64le.patch' \ + decbd259b2b7fc2c0afba1ee3bac3478 || return ${?} +} + +atsrc_apply_patches () +{ + patch -p1 < gmp-ppc64le.patch || return ${?} +} diff --git a/configs/7.1/packages/gmp/specfile b/configs/7.1/packages/gmp/specfile new file mode 120000 index 000000000..61f99a9c7 --- /dev/null +++ b/configs/7.1/packages/gmp/specfile @@ -0,0 +1 @@ +../../../7.0/packages/gmp/specfile \ No newline at end of file diff --git a/configs/7.1/packages/gmp/stage_1 b/configs/7.1/packages/gmp/stage_1 new file mode 120000 index 000000000..da88b999a --- /dev/null +++ b/configs/7.1/packages/gmp/stage_1 @@ -0,0 +1 @@ +../../../7.0/packages/gmp/stage_1 \ No newline at end of file diff --git a/configs/7.1/packages/gmp/stage_2 b/configs/7.1/packages/gmp/stage_2 new file mode 120000 index 000000000..60f97755b --- /dev/null +++ b/configs/7.1/packages/gmp/stage_2 @@ -0,0 +1 @@ +../../../7.0/packages/gmp/stage_2 \ No newline at end of file diff --git a/configs/7.1/packages/groups b/configs/7.1/packages/groups new file mode 120000 index 000000000..88749936e --- /dev/null +++ b/configs/7.1/packages/groups @@ -0,0 +1 @@ +../../7.0/packages/groups \ No newline at end of file diff --git a/configs/7.1/packages/kernel/kernel.mk b/configs/7.1/packages/kernel/kernel.mk new file mode 120000 index 000000000..9b99dbf88 --- /dev/null +++ b/configs/7.1/packages/kernel/kernel.mk @@ -0,0 +1 @@ +../../../7.0/packages/kernel/kernel.mk \ No newline at end of file diff --git a/configs/7.1/packages/kernel/sources b/configs/7.1/packages/kernel/sources new file mode 120000 index 000000000..3442512e5 --- /dev/null +++ b/configs/7.1/packages/kernel/sources @@ -0,0 +1 @@ +../../../7.0/packages/kernel/sources \ No newline at end of file diff --git a/configs/7.1/packages/kernel/specfile b/configs/7.1/packages/kernel/specfile new file mode 120000 index 000000000..5f316d11d --- /dev/null +++ b/configs/7.1/packages/kernel/specfile @@ -0,0 +1 @@ +../../../7.0/packages/kernel/specfile \ No newline at end of file diff --git a/configs/7.1/packages/kernel/stage_h b/configs/7.1/packages/kernel/stage_h new file mode 120000 index 000000000..ca0170ed1 --- /dev/null +++ b/configs/7.1/packages/kernel/stage_h @@ -0,0 +1 @@ +../../../7.0/packages/kernel/stage_h \ No newline at end of file diff --git a/configs/7.1/packages/libauxv/libauxv.mk b/configs/7.1/packages/libauxv/libauxv.mk new file mode 120000 index 000000000..b95bac5de --- /dev/null +++ b/configs/7.1/packages/libauxv/libauxv.mk @@ -0,0 +1 @@ +../../../7.0/packages/libauxv/libauxv.mk \ No newline at end of file diff --git a/configs/7.1/packages/libauxv/sources b/configs/7.1/packages/libauxv/sources new file mode 120000 index 000000000..f7a43487a --- /dev/null +++ b/configs/7.1/packages/libauxv/sources @@ -0,0 +1 @@ +../../../7.0/packages/libauxv/sources \ No newline at end of file diff --git a/configs/7.1/packages/libauxv/specfile b/configs/7.1/packages/libauxv/specfile new file mode 120000 index 000000000..0ed509026 --- /dev/null +++ b/configs/7.1/packages/libauxv/specfile @@ -0,0 +1 @@ +../../../7.0/packages/libauxv/specfile \ No newline at end of file diff --git a/configs/7.1/packages/libauxv/stage_1 b/configs/7.1/packages/libauxv/stage_1 new file mode 120000 index 000000000..09c946c76 --- /dev/null +++ b/configs/7.1/packages/libauxv/stage_1 @@ -0,0 +1 @@ +../../../7.0/packages/libauxv/stage_1 \ No newline at end of file diff --git a/configs/7.1/packages/libdfp/libdfp.mk b/configs/7.1/packages/libdfp/libdfp.mk new file mode 120000 index 000000000..233f7996f --- /dev/null +++ b/configs/7.1/packages/libdfp/libdfp.mk @@ -0,0 +1 @@ +../../../7.0/packages/libdfp/libdfp.mk \ No newline at end of file diff --git a/configs/7.1/packages/libdfp/sources b/configs/7.1/packages/libdfp/sources new file mode 120000 index 000000000..fca9c3fbf --- /dev/null +++ b/configs/7.1/packages/libdfp/sources @@ -0,0 +1 @@ +../../../7.0/packages/libdfp/sources \ No newline at end of file diff --git a/configs/7.1/packages/libdfp/specfile b/configs/7.1/packages/libdfp/specfile new file mode 120000 index 000000000..5c7155500 --- /dev/null +++ b/configs/7.1/packages/libdfp/specfile @@ -0,0 +1 @@ +../../../7.0/packages/libdfp/specfile \ No newline at end of file diff --git a/configs/7.1/packages/libdfp/stage_1 b/configs/7.1/packages/libdfp/stage_1 new file mode 120000 index 000000000..d82968cde --- /dev/null +++ b/configs/7.1/packages/libdfp/stage_1 @@ -0,0 +1 @@ +../../../7.0/packages/libdfp/stage_1 \ No newline at end of file diff --git a/configs/7.1/packages/libdfp/stage_optimized b/configs/7.1/packages/libdfp/stage_optimized new file mode 120000 index 000000000..c303d7396 --- /dev/null +++ b/configs/7.1/packages/libdfp/stage_optimized @@ -0,0 +1 @@ +../../../7.0/packages/libdfp/stage_optimized \ No newline at end of file diff --git a/configs/7.1/packages/libhugetlbfs/libhugetlbfs.mk b/configs/7.1/packages/libhugetlbfs/libhugetlbfs.mk new file mode 120000 index 000000000..e29a201b2 --- /dev/null +++ b/configs/7.1/packages/libhugetlbfs/libhugetlbfs.mk @@ -0,0 +1 @@ +../../../7.0/packages/libhugetlbfs/libhugetlbfs.mk \ No newline at end of file diff --git a/configs/7.1/packages/libhugetlbfs/sources b/configs/7.1/packages/libhugetlbfs/sources new file mode 100644 index 000000000..05a5b0d05 --- /dev/null +++ b/configs/7.1/packages/libhugetlbfs/sources @@ -0,0 +1,44 @@ +#!/usr/bin/env bash +# +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# Libhugetlbfs source package and build info +# ========================================== +# +ATSRC_PACKAGE_NAME="Libhugetlbfs" +ATSRC_PACKAGE_VER=2.17 +ATSRC_PACKAGE_REV=23f929ae +ATSRC_PACKAGE_LICENSE="Lesser GPL 2.1" +ATSRC_PACKAGE_DOCLINK="https://github.com/libhugetlbfs/libhugetlbfs" +ATSRC_PACKAGE_RELFIXES= +ATSRC_PACKAGE_STR_VER="${ATSRC_PACKAGE_NAME} ${ATSRC_PACKAGE_VER}-${ATSRC_PACKAGE_REV}" +ATSRC_PACKAGE_PRE="test -d libhugetlbfs-${ATSRC_PACKAGE_VER}.${ATSRC_PACKAGE_REV}" +ATSRC_PACKAGE_CO=([0]="git clone https://github.com/libhugetlbfs/libhugetlbfs.git libhugetlbfs") +ATSRC_PACKAGE_GIT="git checkout -b libhugetlbfs-${ATSRC_PACKAGE_VER}-${ATSRC_PACKAGE_REV} ${ATSRC_PACKAGE_REV}" +ATSRC_PACKAGE_POST="mv libhugetlbfs libhugetlbfs-${ATSRC_PACKAGE_VER}.${ATSRC_PACKAGE_REV}" +ATSRC_PACKAGE_SRC="${AT_BASE}/sources/libhugetlbfs-${ATSRC_PACKAGE_VER}.${ATSRC_PACKAGE_REV}" +ATSRC_PACKAGE_WORK=${AT_WORK_PATH}/libhugetlbfs +ATSRC_PACKAGE_MLS="" +ATSRC_PACKAGE_ALOC="https://github.com/powertechpreview/powertechpreview/raw/master/Libhugetlbfs%20Patches/libhugetlbfs-ppc64le.tgz" +ATSRC_PACKAGE_PATCHES="-p1 ppc64le-1.patch \ + -p1 ppc64le-2.patch \ + -p1 ppc64le-3.patch \ + -p1 ppc64le-4.patch" +ATSRC_PACKAGE_TARS="libhugetlbfs-ppc64le.tgz" +ATSRC_PACKAGE_MAKE_CHECK="" +ATSRC_PACKAGE_DISTRIB=yes +ATSRC_PACKAGE_BUILDCROSS=no +ATSRC_PACKAGE_BUNDLE=toolchain diff --git a/configs/7.1/packages/libhugetlbfs/specfile b/configs/7.1/packages/libhugetlbfs/specfile new file mode 120000 index 000000000..c3f4b0404 --- /dev/null +++ b/configs/7.1/packages/libhugetlbfs/specfile @@ -0,0 +1 @@ +../../../7.0/packages/libhugetlbfs/specfile \ No newline at end of file diff --git a/configs/7.1/packages/libhugetlbfs/stage_1 b/configs/7.1/packages/libhugetlbfs/stage_1 new file mode 120000 index 000000000..505eb1c6f --- /dev/null +++ b/configs/7.1/packages/libhugetlbfs/stage_1 @@ -0,0 +1 @@ +../../../7.0/packages/libhugetlbfs/stage_1 \ No newline at end of file diff --git a/configs/7.1/packages/libpfm/libpfm.mk b/configs/7.1/packages/libpfm/libpfm.mk new file mode 120000 index 000000000..3657fab00 --- /dev/null +++ b/configs/7.1/packages/libpfm/libpfm.mk @@ -0,0 +1 @@ +../../../7.0/packages/libpfm/libpfm.mk \ No newline at end of file diff --git a/configs/7.1/packages/libpfm/sources b/configs/7.1/packages/libpfm/sources new file mode 120000 index 000000000..30125d59b --- /dev/null +++ b/configs/7.1/packages/libpfm/sources @@ -0,0 +1 @@ +../../../7.0/packages/libpfm/sources \ No newline at end of file diff --git a/configs/7.1/packages/libpfm/specfile b/configs/7.1/packages/libpfm/specfile new file mode 120000 index 000000000..1ecfddcb0 --- /dev/null +++ b/configs/7.1/packages/libpfm/specfile @@ -0,0 +1 @@ +../../../7.0/packages/libpfm/specfile \ No newline at end of file diff --git a/configs/7.1/packages/libpfm/stage_1 b/configs/7.1/packages/libpfm/stage_1 new file mode 120000 index 000000000..af3136dce --- /dev/null +++ b/configs/7.1/packages/libpfm/stage_1 @@ -0,0 +1 @@ +../../../7.0/packages/libpfm/stage_1 \ No newline at end of file diff --git a/configs/7.1/packages/libsphde/libsphde.mk b/configs/7.1/packages/libsphde/libsphde.mk new file mode 120000 index 000000000..0e54b7aed --- /dev/null +++ b/configs/7.1/packages/libsphde/libsphde.mk @@ -0,0 +1 @@ +../../../7.0/packages/libsphde/libsphde.mk \ No newline at end of file diff --git a/configs/7.1/packages/libsphde/sources b/configs/7.1/packages/libsphde/sources new file mode 120000 index 000000000..02527839e --- /dev/null +++ b/configs/7.1/packages/libsphde/sources @@ -0,0 +1 @@ +../../../7.0/packages/libsphde/sources \ No newline at end of file diff --git a/configs/7.1/packages/libsphde/specfile b/configs/7.1/packages/libsphde/specfile new file mode 120000 index 000000000..f6530329a --- /dev/null +++ b/configs/7.1/packages/libsphde/specfile @@ -0,0 +1 @@ +../../../7.0/packages/libsphde/specfile \ No newline at end of file diff --git a/configs/7.1/packages/libsphde/stage_1 b/configs/7.1/packages/libsphde/stage_1 new file mode 120000 index 000000000..54a3da324 --- /dev/null +++ b/configs/7.1/packages/libsphde/stage_1 @@ -0,0 +1 @@ +../../../7.0/packages/libsphde/stage_1 \ No newline at end of file diff --git a/configs/7.1/packages/libsphdecompat/libsphdecompat.mk b/configs/7.1/packages/libsphdecompat/libsphdecompat.mk new file mode 120000 index 000000000..57199c644 --- /dev/null +++ b/configs/7.1/packages/libsphdecompat/libsphdecompat.mk @@ -0,0 +1 @@ +../../../7.0/packages/libsphdecompat/libsphdecompat.mk \ No newline at end of file diff --git a/configs/7.1/packages/libsphdecompat/sources b/configs/7.1/packages/libsphdecompat/sources new file mode 120000 index 000000000..7922e205a --- /dev/null +++ b/configs/7.1/packages/libsphdecompat/sources @@ -0,0 +1 @@ +../../../7.0/packages/libsphdecompat/sources \ No newline at end of file diff --git a/configs/7.1/packages/libsphdecompat/specfile b/configs/7.1/packages/libsphdecompat/specfile new file mode 120000 index 000000000..371d04466 --- /dev/null +++ b/configs/7.1/packages/libsphdecompat/specfile @@ -0,0 +1 @@ +../../../7.0/packages/libsphdecompat/specfile \ No newline at end of file diff --git a/configs/7.1/packages/libsphdecompat/stage_1 b/configs/7.1/packages/libsphdecompat/stage_1 new file mode 120000 index 000000000..18ed631ea --- /dev/null +++ b/configs/7.1/packages/libsphdecompat/stage_1 @@ -0,0 +1 @@ +../../../7.0/packages/libsphdecompat/stage_1 \ No newline at end of file diff --git a/configs/7.1/packages/liburcu/liburcu.mk b/configs/7.1/packages/liburcu/liburcu.mk new file mode 120000 index 000000000..0b8452aa3 --- /dev/null +++ b/configs/7.1/packages/liburcu/liburcu.mk @@ -0,0 +1 @@ +../../../7.0/packages/liburcu/liburcu.mk \ No newline at end of file diff --git a/configs/7.1/packages/liburcu/sources b/configs/7.1/packages/liburcu/sources new file mode 100644 index 000000000..5475648e6 --- /dev/null +++ b/configs/7.1/packages/liburcu/sources @@ -0,0 +1,59 @@ +#!/usr/bin/env bash +# +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# URCU source package and build info +# ================================== +# + +ATSRC_PACKAGE_NAME="Userspace RCU" +ATSRC_PACKAGE_VER=0.8.8 +ATSRC_PACKAGE_LICENSE="Lesser GPL 2.1" +ATSRC_PACKAGE_DOCLINK="http://lttng.org/urcu" +ATSRC_PACKAGE_RELFIXES= +ATSRC_PACKAGE_STR_VER="${ATSRC_PACKAGE_NAME} ${ATSRC_PACKAGE_VER}" +ATSRC_PACKAGE_PRE="test -d userspace-rcu-${ATSRC_PACKAGE_VER}" +ATSRC_PACKAGE_CO=([0]="wget -N http://lttng.org/files/urcu/userspace-rcu-${ATSRC_PACKAGE_VER}.tar.bz2") +ATSRC_PACKAGE_POST="tar -xjf userspace-rcu-${ATSRC_PACKAGE_VER}.tar.bz2" +ATSRC_PACKAGE_SRC="${AT_BASE}/sources/userspace-rcu-${ATSRC_PACKAGE_VER}" +ATSRC_PACKAGE_WORK=${AT_WORK_PATH}/userspace-rcu +ATSRC_PACKAGE_MAKE_CHECK="" +ATSRC_PACKAGE_DISTRIB=yes +ATSRC_PACKAGE_BUILDCROSS=no +ATSRC_PACKAGE_BUNDLE=mcore-libs + +atsrc_get_patches () +{ + at_get_patch \ + https://github.com/powertechpreview/powertechpreview/raw/master/URCU%20Patches/urcu-config.tgz \ + 541abeecac6ea905ed1748df896bd961 || return ${?} + + at_get_patch_and_trim \ + https://www.mail-archive.com/opensuse-commit%40opensuse.org/msg50545.html \ + userspace-rcu-ppc64le.patch 81 \ + bb8744a6c5e4871f395985c5d182e827 || return ${?} +} + +atsrc_apply_patches () +{ + tar xzf urcu-config.tgz || return ${?} + + # Remove changes on openSUSE:Factory. + tail -n 38 userspace-rcu-ppc64le.patch | unexpand \ + > trimmed-userspace-rcu-ppc64le.patch + patch -p1 < trimmed-userspace-rcu-ppc64le.patch || return ${?} + patch -p1 < urcu-config.patch || return ${?} +} diff --git a/configs/7.1/packages/liburcu/specfile b/configs/7.1/packages/liburcu/specfile new file mode 120000 index 000000000..cd2e08992 --- /dev/null +++ b/configs/7.1/packages/liburcu/specfile @@ -0,0 +1 @@ +../../../7.0/packages/liburcu/specfile \ No newline at end of file diff --git a/configs/7.1/packages/liburcu/stage_1 b/configs/7.1/packages/liburcu/stage_1 new file mode 120000 index 000000000..a9d45eea4 --- /dev/null +++ b/configs/7.1/packages/liburcu/stage_1 @@ -0,0 +1 @@ +../../../7.0/packages/liburcu/stage_1 \ No newline at end of file diff --git a/configs/7.1/packages/libvecpf/libvecpf.mk b/configs/7.1/packages/libvecpf/libvecpf.mk new file mode 120000 index 000000000..c7b2436ee --- /dev/null +++ b/configs/7.1/packages/libvecpf/libvecpf.mk @@ -0,0 +1 @@ +../../../7.0/packages/libvecpf/libvecpf.mk \ No newline at end of file diff --git a/configs/7.1/packages/libvecpf/sources b/configs/7.1/packages/libvecpf/sources new file mode 120000 index 000000000..72e2af706 --- /dev/null +++ b/configs/7.1/packages/libvecpf/sources @@ -0,0 +1 @@ +../../../7.0/packages/libvecpf/sources \ No newline at end of file diff --git a/configs/7.1/packages/libvecpf/specfile b/configs/7.1/packages/libvecpf/specfile new file mode 120000 index 000000000..dccff1bb5 --- /dev/null +++ b/configs/7.1/packages/libvecpf/specfile @@ -0,0 +1 @@ +../../../7.0/packages/libvecpf/specfile \ No newline at end of file diff --git a/configs/7.1/packages/libvecpf/stage_1 b/configs/7.1/packages/libvecpf/stage_1 new file mode 120000 index 000000000..246e35b89 --- /dev/null +++ b/configs/7.1/packages/libvecpf/stage_1 @@ -0,0 +1 @@ +../../../7.0/packages/libvecpf/stage_1 \ No newline at end of file diff --git a/configs/7.1/packages/mpc/mpc.mk b/configs/7.1/packages/mpc/mpc.mk new file mode 120000 index 000000000..19ebd3658 --- /dev/null +++ b/configs/7.1/packages/mpc/mpc.mk @@ -0,0 +1 @@ +../../../7.0/packages/mpc/mpc.mk \ No newline at end of file diff --git a/configs/7.1/packages/mpc/sources b/configs/7.1/packages/mpc/sources new file mode 120000 index 000000000..0076ead2c --- /dev/null +++ b/configs/7.1/packages/mpc/sources @@ -0,0 +1 @@ +../../../7.0/packages/mpc/sources \ No newline at end of file diff --git a/configs/7.1/packages/mpc/specfile b/configs/7.1/packages/mpc/specfile new file mode 120000 index 000000000..02f8d8e65 --- /dev/null +++ b/configs/7.1/packages/mpc/specfile @@ -0,0 +1 @@ +../../../7.0/packages/mpc/specfile \ No newline at end of file diff --git a/configs/7.1/packages/mpc/stage_1 b/configs/7.1/packages/mpc/stage_1 new file mode 120000 index 000000000..30255fbed --- /dev/null +++ b/configs/7.1/packages/mpc/stage_1 @@ -0,0 +1 @@ +../../../7.0/packages/mpc/stage_1 \ No newline at end of file diff --git a/configs/7.1/packages/mpc/stage_2 b/configs/7.1/packages/mpc/stage_2 new file mode 120000 index 000000000..6e2d45fea --- /dev/null +++ b/configs/7.1/packages/mpc/stage_2 @@ -0,0 +1 @@ +../../../7.0/packages/mpc/stage_2 \ No newline at end of file diff --git a/configs/7.1/packages/mpfr/mpfr.mk b/configs/7.1/packages/mpfr/mpfr.mk new file mode 120000 index 000000000..1732585ae --- /dev/null +++ b/configs/7.1/packages/mpfr/mpfr.mk @@ -0,0 +1 @@ +../../../7.0/packages/mpfr/mpfr.mk \ No newline at end of file diff --git a/configs/7.1/packages/mpfr/sources b/configs/7.1/packages/mpfr/sources new file mode 120000 index 000000000..9b9139376 --- /dev/null +++ b/configs/7.1/packages/mpfr/sources @@ -0,0 +1 @@ +../../../7.0/packages/mpfr/sources \ No newline at end of file diff --git a/configs/7.1/packages/mpfr/specfile b/configs/7.1/packages/mpfr/specfile new file mode 120000 index 000000000..6dde86a31 --- /dev/null +++ b/configs/7.1/packages/mpfr/specfile @@ -0,0 +1 @@ +../../../7.0/packages/mpfr/specfile \ No newline at end of file diff --git a/configs/7.1/packages/mpfr/stage_1 b/configs/7.1/packages/mpfr/stage_1 new file mode 120000 index 000000000..64d8c1ed8 --- /dev/null +++ b/configs/7.1/packages/mpfr/stage_1 @@ -0,0 +1 @@ +../../../7.0/packages/mpfr/stage_1 \ No newline at end of file diff --git a/configs/7.1/packages/mpfr/stage_2 b/configs/7.1/packages/mpfr/stage_2 new file mode 120000 index 000000000..a2a7aa8f2 --- /dev/null +++ b/configs/7.1/packages/mpfr/stage_2 @@ -0,0 +1 @@ +../../../7.0/packages/mpfr/stage_2 \ No newline at end of file diff --git a/configs/7.1/packages/openssl/openssl.mk b/configs/7.1/packages/openssl/openssl.mk new file mode 120000 index 000000000..5e3c76353 --- /dev/null +++ b/configs/7.1/packages/openssl/openssl.mk @@ -0,0 +1 @@ +../../../7.0/packages/openssl/openssl.mk \ No newline at end of file diff --git a/configs/7.1/packages/openssl/sources b/configs/7.1/packages/openssl/sources new file mode 120000 index 000000000..a6832087f --- /dev/null +++ b/configs/7.1/packages/openssl/sources @@ -0,0 +1 @@ +../../../7.0/packages/openssl/sources \ No newline at end of file diff --git a/configs/7.1/packages/openssl/specfile b/configs/7.1/packages/openssl/specfile new file mode 120000 index 000000000..9f88b38c6 --- /dev/null +++ b/configs/7.1/packages/openssl/specfile @@ -0,0 +1 @@ +../../../7.0/packages/openssl/specfile \ No newline at end of file diff --git a/configs/7.1/packages/openssl/stage_1 b/configs/7.1/packages/openssl/stage_1 new file mode 100644 index 000000000..081b91595 --- /dev/null +++ b/configs/7.1/packages/openssl/stage_1 @@ -0,0 +1,123 @@ +#!/usr/bin/env bash +# +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +source ${AT_BASE}/scripts/utilities/bitsize_selection.sh + +# OpenSSL build parameters for stage 1 32 or 64 bits +# ========================================= +# + +ATCFG_HOLD_TEMP_INSTALL='no' +# Tell the build system to hold the temp build folder +ATCFG_HOLD_TEMP_BUILD='no' +# Build in a new directory +ATCFG_BUILD_STAGE_T='link' + +atcfg_pre_configure() { + PATH=${at_dest}/bin:${PATH} ./config --test-sanity +} + +atcfg_configure() { + local base_libdir=$(find_build_libdir ${AT_BIT_SIZE}) + local base_target=$(find_build_target ${AT_BIT_SIZE}) + local openssl_tgt="" + + # OpenSSL uses different architecture names + case "${base_target}" in + powerpc64-*) + openssl_tgt="linux-ppc64" + ;; + powerpc-*) + # For linux-ppc builds, OpenSSL uses the default -m + # value of the compiler. + openssl_tgt="linux-ppc -m32" + ;; + powerpc64le-*) + openssl_tgt="linux-ppc64le" + ;; + *) + echo "Unknown word size ${AT_BIT_SIZE}" + return 1 + ;; + esac + + PATH=${at_dest}/bin:${PATH} \ + AR="${at_dest}/bin/ar" \ + AS="${at_dest}/bin/as" \ + CC="${at_dest}/bin/gcc" \ + CXX="${at_dest}/bin/g++" \ + LD="${at_dest}/bin/ld" \ + RANLIB="${at_dest}/bin/ranlib" \ + ./Configure ${openssl_tgt} \ + --prefix="${at_dest}" --libdir="${base_libdir}" \ + no-idea no-rc5 shared threads zlib-dynamic \ + -Wa,--noexecstack -g +} + + +atcfg_pre_make() { + PATH=${at_dest}/bin:${PATH} make -j1 depend +} +# Make build command +atcfg_make() { + PATH=${at_dest}/bin:${PATH} make -j1 +} + +atcfg_make_check() { + # Package testing not done for cross build. + if [[ "${cross_build}" == 'no' ]]; then + PATH=${at_dest}/bin:${PATH} make -j1 test + fi +} + + +atcfg_install() { + local install_arg="install_sw" + if [[ "${AT_BIT_SIZE}" == "64" ]]; then + install_arg="install" + fi + PATH=${at_dest}/bin:${PATH} \ + make MANDIR="${at_dest}/share/man" \ + INSTALL_PREFIX=${install_place} -j1 ${install_arg} +} + +atcfg_post_install() { + # Save all libraries into a tar file + local base_libdir=$(find_build_libdir ${AT_BIT_SIZE}) + if [[ "${build_arch}" == "ppc" ]]; then + pushd "${install_transfer}/lib" + tar czf "${install_place}/openssl_32.tar.gz" * + popd + # Remove all installed built files + rm -rf "${install_transfer}/*" + mkdir "${install_transfer}/lib" + # Place saved libs on created final target + pushd "${install_transfer}/lib" + tar xzf "${install_place}/openssl_32.tar.gz" + popd + fi + set -e + if [[ "${cross_build}" == 'no' ]]; then + # Hack around to avoid ld.so.cache getting the libs from the + # system as ldconfig puts platform based directories preceding + # other directories. + ${AT_BASE}/scripts/utilities/create_lib_symlinks.sh \ + "${install_transfer}/${base_libdir}/" \ + "${install_transfer}/${base_libdir}/${build_load_arch}" + fi + set +e +} diff --git a/configs/7.1/packages/openssl/stage_optimized b/configs/7.1/packages/openssl/stage_optimized new file mode 120000 index 000000000..b0e3f6d37 --- /dev/null +++ b/configs/7.1/packages/openssl/stage_optimized @@ -0,0 +1 @@ +../../../7.0/packages/openssl/stage_optimized \ No newline at end of file diff --git a/configs/7.1/packages/oprofile/oprofile.mk b/configs/7.1/packages/oprofile/oprofile.mk new file mode 120000 index 000000000..f7543993f --- /dev/null +++ b/configs/7.1/packages/oprofile/oprofile.mk @@ -0,0 +1 @@ +../../../7.0/packages/oprofile/oprofile.mk \ No newline at end of file diff --git a/configs/7.1/packages/oprofile/sources b/configs/7.1/packages/oprofile/sources new file mode 120000 index 000000000..eff7b4749 --- /dev/null +++ b/configs/7.1/packages/oprofile/sources @@ -0,0 +1 @@ +../../../7.0/packages/oprofile/sources \ No newline at end of file diff --git a/configs/7.1/packages/oprofile/specfile b/configs/7.1/packages/oprofile/specfile new file mode 120000 index 000000000..892c2b23a --- /dev/null +++ b/configs/7.1/packages/oprofile/specfile @@ -0,0 +1 @@ +../../../7.0/packages/oprofile/specfile \ No newline at end of file diff --git a/configs/7.1/packages/oprofile/stage_1 b/configs/7.1/packages/oprofile/stage_1 new file mode 120000 index 000000000..ea80816b2 --- /dev/null +++ b/configs/7.1/packages/oprofile/stage_1 @@ -0,0 +1 @@ +../../../7.0/packages/oprofile/stage_1 \ No newline at end of file diff --git a/configs/7.1/packages/paflib/paflib.mk b/configs/7.1/packages/paflib/paflib.mk new file mode 120000 index 000000000..10bda1de4 --- /dev/null +++ b/configs/7.1/packages/paflib/paflib.mk @@ -0,0 +1 @@ +../../../7.0/packages/paflib/paflib.mk \ No newline at end of file diff --git a/configs/7.1/packages/paflib/sources b/configs/7.1/packages/paflib/sources new file mode 120000 index 000000000..ab19c9a94 --- /dev/null +++ b/configs/7.1/packages/paflib/sources @@ -0,0 +1 @@ +../../../7.0/packages/paflib/sources \ No newline at end of file diff --git a/configs/7.1/packages/paflib/specfile b/configs/7.1/packages/paflib/specfile new file mode 120000 index 000000000..079e8ef32 --- /dev/null +++ b/configs/7.1/packages/paflib/specfile @@ -0,0 +1 @@ +../../../7.0/packages/paflib/specfile \ No newline at end of file diff --git a/configs/7.1/packages/paflib/stage_1 b/configs/7.1/packages/paflib/stage_1 new file mode 120000 index 000000000..36c5f70b7 --- /dev/null +++ b/configs/7.1/packages/paflib/stage_1 @@ -0,0 +1 @@ +../../../7.0/packages/paflib/stage_1 \ No newline at end of file diff --git a/configs/7.1/packages/python/python.mk b/configs/7.1/packages/python/python.mk new file mode 120000 index 000000000..d5a6ac3ef --- /dev/null +++ b/configs/7.1/packages/python/python.mk @@ -0,0 +1 @@ +../../../7.0/packages/python/python.mk \ No newline at end of file diff --git a/configs/7.1/packages/python/sources b/configs/7.1/packages/python/sources new file mode 100644 index 000000000..00ae19ad7 --- /dev/null +++ b/configs/7.1/packages/python/sources @@ -0,0 +1,133 @@ +#!/usr/bin/env bash +# +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# GLIBC source package and build info +# =================================== +# + +ATSRC_PACKAGE_NAME="Python" +ATSRC_PACKAGE_VER=2.7.7 +ATSRC_PACKAGE_LICENSE="Python Software Foundation License 2" +ATSRC_PACKAGE_DOCLINK="http://docs.python.org/release/2.7/" +ATSRC_PACKAGE_RELFIXES= +ATSRC_PACKAGE_STR_VER="${ATSRC_PACKAGE_NAME} ${ATSRC_PACKAGE_VER}" +ATSRC_PACKAGE_PRE="test -d Python-${ATSRC_PACKAGE_VER}" +ATSRC_PACKAGE_CO=([0]="wget -N --no-check-certificate http://www.python.org/ftp/python/${ATSRC_PACKAGE_VER}/Python-${ATSRC_PACKAGE_VER}.tgz") +ATSRC_PACKAGE_POST="tar -zxf Python-${ATSRC_PACKAGE_VER}.tgz" +ATSRC_PACKAGE_SRC=${AT_BASE}/sources/Python-${ATSRC_PACKAGE_VER} +ATSRC_PACKAGE_WORK=${AT_WORK_PATH}/python +ATSRC_PACKAGE_MLS= +ATSRC_PACKAGE_PATCHES="" +ATSRC_PACKAGE_ALOC="" +ATSRC_PACKAGE_TARS="" +ATSRC_PACKAGE_MAKE_CHECK= +ATSRC_PACKAGE_DISTRIB=no +ATSRC_PACKAGE_BUILDCROSS=no +ATSRC_PACKAGE_BUNDLE=toolchain + +atsrc_get_patches () +{ + at_get_patch \ + https://github.com/powertechpreview/powertechpreview/raw/master/Python%20Fixes/python-2.7.6-fix.tar.gz \ + 94725d67cfdfb1c3d25763d5dc318e18 || return ${?} + + at_get_patch \ + https://github.com/atgreen/libffi/commit/d3d099b40c122550279789200263346f120f6909.patch \ + ff61fb6ae3cebb91b11023462901dc6b \ + libffi-ppc64le-1.patch || return ${?} + + at_get_patch \ + https://github.com/atgreen/libffi/commit/164283f4ac5972ce2ab5e015cc2ab1014c23276c.patch \ + 35f7892a704e899037b36a67e1d85c3d \ + libffi-ppc64le-2.patch || return ${?} + + at_get_patch \ + https://github.com/atgreen/libffi/commit/a97cf1fae575d8bfd5259c5c422025ad43911326.patch \ + cd1a0c2ef1c3bea7e6003c37f9c8dbd3 \ + libffi-ppc64le-3.patch || return ${?} + + at_get_patch \ + https://github.com/atgreen/libffi/commit/1c06515d927d9de1582438d4eb5953890e79c5c7.patch \ + 3b47aef31c3753450e17eb68c5881089 \ + libffi-ppc64le-4.patch || return ${?} + + at_get_patch \ + https://github.com/atgreen/libffi/commit/362851379a49ce07d3e36e82c4e5c7b6cc16a352.patch \ + 8576891656ca4eedc2accc0eacf1fcf5 \ + libffi-ppc64le-5.patch || return ${?} + + at_get_patch \ + https://github.com/atgreen/libffi/commit/83f65b63d9764a9cc7688fc5cda5ee2bd23faf54.patch \ + c2d2a44feaa4ec4ea67436eb5e74046d \ + libffi-ppc64le-6.patch || return ${?} + + at_get_patch \ + https://github.com/atgreen/libffi/commit/16d56c51aded374730920a4acde76ff3d2860ae1.patch \ + 85cd6e185f9f402981af3df7950b1fa8 \ + libffi-ppc64le-7.patch || return ${?} + + at_get_patch \ + https://github.com/powertechpreview/powertechpreview/raw/master/Python%20Fixes/python-2.7.6-test_gdb.tgz \ + cdbc24302748300bdb42aa041d1b1e58 || return ${?} + + at_get_patch \ + https://github.com/powertechpreview/powertechpreview/raw/master/Python%20Fixes/python-2.7.7-skip-tests.tgz \ + 9a8d7dc7bbba7d33ae2a913c8e9fa0f1 || return ${?} +} + +atsrc_apply_patches () +{ + tar xzf python-2.7.6-fix.tar.gz || return ${?} + tar xzf python-2.7.6-test_gdb.tgz || return ${?} + tar xzf python-2.7.7-skip-tests.tgz || return ${?} + + patch -p2 < python-2.7.6-fix.patch || return ${?} + + # In the following patches, we are not interested in changes to the + # ChangeLog nor to the testsuite. + for i in `seq 1 7` + do + patchname=libffi-ppc64le-${i}.patch + filterdiff \ + --clean \ + --strip 1 \ + --strip-match 1 \ + --exclude="ChangeLog" \ + --exclude="testsuite*" \ + --addprefix=" Modules/_ctypes/libffi/" \ + ${patchname} > ${patchname}.filter + patch -p0 < ${patchname}.filter || return ${?} + done + + patch -p1 < python-2.7.6-test_gdb.patch || return ${?} + patch -p1 < python-2.7.7-skip-tests.patch || return ${?} +} + +atsrc_package_verify_make_log () +{ + if [[ -n "${1}" ]]; then + modline=$(cat "${1}" | awk '/Logging the following command/ { line = ""; getline ts; } \ + /Failed to build these modules:/ { getline line; } \ + END { print line; }') + if [[ "${modline}" != "" ]]; then + echo "Python modules not built: ${modline}" + return 1 + fi + fi + return 0 +} + diff --git a/configs/7.1/packages/python/specfile b/configs/7.1/packages/python/specfile new file mode 120000 index 000000000..8fb183618 --- /dev/null +++ b/configs/7.1/packages/python/specfile @@ -0,0 +1 @@ +../../../7.0/packages/python/specfile \ No newline at end of file diff --git a/configs/7.1/packages/python/stage_1 b/configs/7.1/packages/python/stage_1 new file mode 120000 index 000000000..de0ee6d26 --- /dev/null +++ b/configs/7.1/packages/python/stage_1 @@ -0,0 +1 @@ +../../../7.0/packages/python/stage_1 \ No newline at end of file diff --git a/configs/7.1/packages/tbb/sources b/configs/7.1/packages/tbb/sources new file mode 100644 index 000000000..fdecbdad4 --- /dev/null +++ b/configs/7.1/packages/tbb/sources @@ -0,0 +1,72 @@ +#!/usr/bin/env bash +# +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# TBB source package and build info +# ======================================= +# + +ATSRC_PACKAGE_NAME="Thread Building Blocks" +ATSRC_PACKAGE_VER=4.2u1 +ATSRC_PACKAGE_REV=20131003 +ATSRC_PACKAGE_LICENSE="GPL 2.0" +ATSRC_PACKAGE_DOCLINK="https://www.threadingbuildingblocks.org/documentation" +ATSRC_PACKAGE_RELFIXES= +ATSRC_PACKAGE_STR_VER="${ATSRC_PACKAGE_NAME} ${ATSRC_PACKAGE_VER}-${ATSRC_PACKAGE_REV}" +ATSRC_PACKAGE_VERID="42_${ATSRC_PACKAGE_REV}oss" +ATSRC_PACKAGE_PRE="test -d tbb${ATSRC_PACKAGE_VERID}" +ATSRC_PACKAGE_CO=([0]="wget -N --no-check-certificate https://www.threadingbuildingblocks.org/sites/default/files/software_releases/source/tbb${ATSRC_PACKAGE_VERID}_src.tgz") +ATSRC_PACKAGE_GIT= +ATSRC_PACKAGE_POST="tar xzf tbb${ATSRC_PACKAGE_VERID}_src.tgz" +ATSRC_PACKAGE_SRC=${AT_BASE}/sources/tbb${ATSRC_PACKAGE_VERID} +ATSRC_PACKAGE_WORK=${AT_WORK_PATH}/tbb +ATSRC_PACKAGE_MLS="" +ATSRC_PACKAGE_ALOC="" +ATSRC_PACKAGE_PATCHES="" +ATSRC_PACKAGE_TARS="" +# Disable make check testing due to failures +ATSRC_PACKAGE_MAKE_CHECK=none +ATSRC_PACKAGE_DISTRIB=yes +ATSRC_PACKAGE_BUILDCROSS=no +ATSRC_PACKAGE_BUNDLE=mcore-libs + +atsrc_get_patches () +{ + at_get_patch \ + https://raw.githubusercontent.com/powertechpreview/powertechpreview/42cfbcf3d4a2fb7f9216069397df0dff9fc0f651/TBB%20PowerPC%20Patches/4.2/Add-Advance-Toolchain-support.patch \ + 5778f79b7653da15855a39a1db9e0c3c || return ${?} +} + +atsrc_apply_patches () +{ + patch -p1 < Add-Advance-Toolchain-support.patch \ + || return ${?} +} + +# This is a package function to verify the make_check log. +# In some cases 'make check' will return 0 even though the log shows that +# there some failures did occur. Define this function for +# packages where that has happened. Due to differences in the implementations +# of 'make check' or 'make test' the strings that indicate failure could +# be different. + +atsrc_package_verify_make_check_log () +{ + if [[ -n "${1}" ]]; then + grep -i "error[: ]" "${1}" > /dev/null + return ${?} + fi +} diff --git a/configs/7.1/packages/tbb/specfile b/configs/7.1/packages/tbb/specfile new file mode 120000 index 000000000..501439427 --- /dev/null +++ b/configs/7.1/packages/tbb/specfile @@ -0,0 +1 @@ +../../../7.0/packages/tbb/specfile \ No newline at end of file diff --git a/configs/7.1/packages/tbb/stage_1 b/configs/7.1/packages/tbb/stage_1 new file mode 120000 index 000000000..85bbe4060 --- /dev/null +++ b/configs/7.1/packages/tbb/stage_1 @@ -0,0 +1 @@ +../../../7.0/packages/tbb/stage_1 \ No newline at end of file diff --git a/configs/7.1/packages/tbb/tbb.mk b/configs/7.1/packages/tbb/tbb.mk new file mode 120000 index 000000000..c067a36f4 --- /dev/null +++ b/configs/7.1/packages/tbb/tbb.mk @@ -0,0 +1 @@ +../../../7.0/packages/tbb/tbb.mk \ No newline at end of file diff --git a/configs/7.1/packages/tcmalloc/sources b/configs/7.1/packages/tcmalloc/sources new file mode 100644 index 000000000..b75deece8 --- /dev/null +++ b/configs/7.1/packages/tcmalloc/sources @@ -0,0 +1,44 @@ +#!/usr/bin/env bash +# +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# Tcmalloc source package and build info +# ================================== +# + +ATSRC_PACKAGE_NAME="TCMalloc" +ATSRC_PACKAGE_VER=2.1 +ATSRC_PACKAGE_REV=b8c4ba72 +ATSRC_PACKAGE_LICENSE="BSD License" +ATSRC_PACKAGE_DOCLINK="http://goog-perftools.sourceforge.net/doc/tcmalloc.html" +ATSRC_PACKAGE_RELFIXES= +ATSRC_PACKAGE_STR_VER="${ATSRC_PACKAGE_NAME} ${ATSRC_PACKAGE_VER}${ATSRC_PACKAGE_REV:+-${ATSRC_PACKAGE_REV}}" +ATSRC_PACKAGE_VERID="${ATSRC_PACKAGE_VER}${ATSRC_PACKAGE_REV:+-${ATSRC_PACKAGE_REV}}" +ATSRC_PACKAGE_PRE="test -d gperftools-${ATSRC_PACKAGE_VERID}" +ATSRC_PACKAGE_CO=([0]="wget -O gperftools-${ATSRC_PACKAGE_VERID}.tar.gz https://github.com/gperftools/gperftools/archive/${ATSRC_PACKAGE_REV}.tar.gz") +ATSRC_PACKAGE_GIT="" +# Use --transform to give a better name to Gperftools directory. +ATSRC_PACKAGE_POST="tar xzf gperftools-${ATSRC_PACKAGE_VERID}.tar.gz --transform=s/gperftools-${ATSRC_PACKAGE_REV}[^\\/]*/gperftools-${ATSRC_PACKAGE_VERID}/" +ATSRC_PACKAGE_SRC="${AT_BASE}/sources/gperftools-${ATSRC_PACKAGE_VERID}" +ATSRC_PACKAGE_WORK=${AT_WORK_PATH}/gperftools +ATSRC_PACKAGE_MLS="" +ATSRC_PACKAGE_ALOC="" +ATSRC_PACKAGE_PATCHES="" +ATSRC_PACKAGE_TARS="" +ATSRC_PACKAGE_MAKE_CHECK="" +ATSRC_PACKAGE_DISTRIB=no +ATSRC_PACKAGE_BUILDCROSS=no +ATSRC_PACKAGE_BUNDLE=toolchain diff --git a/configs/7.1/packages/tcmalloc/specfile b/configs/7.1/packages/tcmalloc/specfile new file mode 120000 index 000000000..ff2945723 --- /dev/null +++ b/configs/7.1/packages/tcmalloc/specfile @@ -0,0 +1 @@ +../../../7.0/packages/tcmalloc/specfile \ No newline at end of file diff --git a/configs/7.1/packages/tcmalloc/stage_1 b/configs/7.1/packages/tcmalloc/stage_1 new file mode 120000 index 000000000..099b6cb3f --- /dev/null +++ b/configs/7.1/packages/tcmalloc/stage_1 @@ -0,0 +1 @@ +../../../7.0/packages/tcmalloc/stage_1 \ No newline at end of file diff --git a/configs/7.1/packages/tcmalloc/tcmalloc.mk b/configs/7.1/packages/tcmalloc/tcmalloc.mk new file mode 120000 index 000000000..a462c91e7 --- /dev/null +++ b/configs/7.1/packages/tcmalloc/tcmalloc.mk @@ -0,0 +1 @@ +../../../7.0/packages/tcmalloc/tcmalloc.mk \ No newline at end of file diff --git a/configs/7.1/packages/valgrind/sources b/configs/7.1/packages/valgrind/sources new file mode 120000 index 000000000..9b9c82887 --- /dev/null +++ b/configs/7.1/packages/valgrind/sources @@ -0,0 +1 @@ +../../../7.0/packages/valgrind/sources \ No newline at end of file diff --git a/configs/7.1/packages/valgrind/specfile b/configs/7.1/packages/valgrind/specfile new file mode 120000 index 000000000..a4b632016 --- /dev/null +++ b/configs/7.1/packages/valgrind/specfile @@ -0,0 +1 @@ +../../../7.0/packages/valgrind/specfile \ No newline at end of file diff --git a/configs/7.1/packages/valgrind/stage_1 b/configs/7.1/packages/valgrind/stage_1 new file mode 120000 index 000000000..30dfb1aa0 --- /dev/null +++ b/configs/7.1/packages/valgrind/stage_1 @@ -0,0 +1 @@ +../../../7.0/packages/valgrind/stage_1 \ No newline at end of file diff --git a/configs/7.1/packages/valgrind/valgrind.mk b/configs/7.1/packages/valgrind/valgrind.mk new file mode 120000 index 000000000..bb1f31b3e --- /dev/null +++ b/configs/7.1/packages/valgrind/valgrind.mk @@ -0,0 +1 @@ +../../../7.0/packages/valgrind/valgrind.mk \ No newline at end of file diff --git a/configs/7.1/packages/zlib/sources b/configs/7.1/packages/zlib/sources new file mode 120000 index 000000000..99d9358da --- /dev/null +++ b/configs/7.1/packages/zlib/sources @@ -0,0 +1 @@ +../../../7.0/packages/zlib/sources \ No newline at end of file diff --git a/configs/7.1/packages/zlib/specfile b/configs/7.1/packages/zlib/specfile new file mode 120000 index 000000000..03538dbd6 --- /dev/null +++ b/configs/7.1/packages/zlib/specfile @@ -0,0 +1 @@ +../../../7.0/packages/zlib/specfile \ No newline at end of file diff --git a/configs/7.1/packages/zlib/stage_1 b/configs/7.1/packages/zlib/stage_1 new file mode 120000 index 000000000..78c8024d9 --- /dev/null +++ b/configs/7.1/packages/zlib/stage_1 @@ -0,0 +1 @@ +../../../7.0/packages/zlib/stage_1 \ No newline at end of file diff --git a/configs/7.1/packages/zlib/stage_optimized b/configs/7.1/packages/zlib/stage_optimized new file mode 120000 index 000000000..da0a7defa --- /dev/null +++ b/configs/7.1/packages/zlib/stage_optimized @@ -0,0 +1 @@ +../../../7.0/packages/zlib/stage_optimized \ No newline at end of file diff --git a/configs/7.1/packages/zlib/zlib.mk b/configs/7.1/packages/zlib/zlib.mk new file mode 120000 index 000000000..46ff72edb --- /dev/null +++ b/configs/7.1/packages/zlib/zlib.mk @@ -0,0 +1 @@ +../../../7.0/packages/zlib/zlib.mk \ No newline at end of file diff --git a/configs/7.1/release_notes/release_notes-body.html b/configs/7.1/release_notes/release_notes-body.html new file mode 100644 index 000000000..911c1a66a --- /dev/null +++ b/configs/7.1/release_notes/release_notes-body.html @@ -0,0 +1,252 @@ + + + + + + + + Release Notes for the Advance Toolchain __VERSION_RELEASE__ + + + +
    +
    + +

    Release Notes for the Advance Toolchain __VERSION_RELEASE__

    +
    +
    + | Features + | Previous Releases + | Support + | Installation + | Documentation + | Legal Notices | +
    +
    + __FEATURES__ + back to top +
    + +

    Support

    +

    Customer support for the Advance Toolchain (AT) is provided in one of three ways:

    +
      +
    1. If you are using AT as directed by an IBM product team (ex.: IBM XL Compiler or PowerVM Lx86) please report suspected AT problems to IBM Support using that product name and entitlement.
    2. +
    3. IBM's Support Line for Linux Offerings now provides support for the Advance Toolchain as well. If you have a contract with a Support Line for Linux, place a call to IBM Support, e.g. for United States: +
        +
      • Dial 1-800-426-IBM-SERV
      • +
      • Option #2 (Other business products or solutions)
      • +
      • Option #2 (Software)
      • +
      • Option #7 (Other OS/Linux)
      • +
      + For other countries click here. +
    4. +
    5. All other users can use an electronic forum that is monitored Monday through Friday. For questions regarding the use of or to report a suspected defect in AT, click here. +
        +
      • Log in.
      • +
      • Start a topic.
      • +
      • Enter and save your question or problem.
      • +
      • An initial response will be attempted within 2 business days.
      • +
    6. +
    + back to top +
    + +

    Installation

    + __INST__ +

    Manual installation for rpms

    +

    If you are installing the rpms manually you will need to install them in the following order (due to prerequisites):

    +
    +advance-toolchain-__VERSION__-runtime-__VERSION_RELEASE__
    +advance-toolchain-__VERSION__-devel-__VERSION_RELEASE__
    +advance-toolchain-__VERSION__-perf-__VERSION_RELEASE__
    +advance-toolchain-__VERSION__-mcore-libs-__VERSION_RELEASE__
    +advance-toolchain-__VERSION__-runtime-at__OLD_VERSION__-compat-__VERSION_RELEASE__
    +				
    +

    If you are updating a previous installation, you need to update as a batch, so rpm can solve the dependencies, i.e.:

    +
    +rpm -Uvh advance-toolchain-__VERSION__-runtime-__VERSION_RELEASE__.ppc64.rpm \
    +         advance-toolchain-__VERSION__-devel-__VERSION_RELEASE__.ppc64.rpm \
    +         advance-toolchain-__VERSION__-perf-__VERSION_RELEASE__.ppc64.rpm \
    +         advance-toolchain-__VERSION__-mcore-__VERSION_RELEASE__.ppc64.rpm \
    +         advance-toolchain-__VERSION__-runtime-at__OLD_VERSION__-compat-__VERSION_RELEASE__.ppc64.rpm
    +				
    +

    The rpm command should always be run as root. Failure to do so will result in an error similar to this:

    +

    + error: can't create transaction lock on /var/lib/rpm/__db.000 +

    +

    Important notes

    +
      +
    • Timezone files: If you need to use something different than Factory, then you should copy the timezone file you want from /opt/__VERSION__/share/zoneinfo to /opt/__VERSION__/etc/localtime
    • +
    • advance-toolchain-__VERSION__-runtime-compat-__VERSION_RELEASE__: DO NOT INSTALL it on RHEL7 and beyond. These are intended for runtime compatibility on RHEL6 only (see below).
    • +
    +

    Installation for runtime compatibility on previous distribution versions

    +

    Users running applications on previous distributions of SLES or RHEL may install the compatibility rpm advance-toolchain-__VERSION__-runtime-compat-__VERSION_RELEASE__ in order to get the Advance Toolchain runtime libraries.

    +

    Installation of the cross-compiler (x86)

    +

    You can download advance-toolchain-__VERSION__-cross-__VERSION_RELEASE__ and install in a x86 machine to build Power binaries on it. Binaries generated by the cross-compiler will run on a Power system with the same version of the Advance Toolchain installed.

    + back to top +
    + +

    Documentation

    +

    The official documentation for the Advance Toolchain is available at the IBM Power Linux Community website.

    + back to top +
    + + +

    Legal notices

    + +

    In order to comply with the GPL and LGPL licenses, the source code for the following packages is available:

    +
      +
    • binutils
    • +
    • gcc
    • +
    • gdb
    • +
    • glibc
    • +
    • gmp
    • +
    • Threading Building Blocks
    • +
    • libdfp
    • +
    • libhugetlbfs
    • +
    • linux kernel
    • +
    • mpc
    • +
    • mpfr
    • +
    • oprofile
    • +
    • Userspace RCU
    • +
    • Valgrind
    • +
    +

    Please look for the advance-toolchain-__VERSION__-src-__VERSION_RELEASE__.tgz file in the repository.

    + +

    Expat
    + Copyright (c) 1998, 1999, 2000 Thai Open Source Software Center Ltd and Clark Cooper
    + Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006 Expat maintainers.

    +

    + Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
    +
    + The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
    +
    + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +

    + +

    Gperftools
    + Copyright (c) 2005, Google Inc. All rights reserved.

    +

    + Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
    +
    + * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
    + * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
    + * Neither the name of Google Inc. nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
    +
    + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +

    + +

    Libauxv
    +

    +

    + Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
    +
    + * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
    + * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
    + * Neither the name of the IBM Corporation nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
    +
    + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL IBM CORPORATION BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +

    + +

    Libpfm
    + Copyright (c) 2002-2006 Hewlett-Packard Development Company, L.P.

    +

    + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions:
    +
    + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software.
    +
    + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, + INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A + PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT + HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF + CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE + OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
    +

    + +

    OpenSSL
    + Copyright (c) 1998-2011 The OpenSSL Project. All rights reserved.
    + Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com). All rights reserved.

    +

    * Note: this distribution of OpenSSL does not include the IDEA and RC5 algorithms

    +

    + Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
    +
    + 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
    +
    + 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
    +
    + 3. All advertising materials mentioning features or use of this software must display the following acknowledgment: "This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
    +
    + 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to endorse or promote products derived from this software without prior written permission. For written permission, please contact openssl-core@openssl.org.
    +
    + 5. Products derived from this software may not be called "OpenSSL" nor may "OpenSSL" appear in their names without prior written permission of the OpenSSL Project.
    +
    + 6. Redistributions of any form whatsoever must retain the following acknowledgment: "This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit (http://www.openssl.org/)"
    +
    + THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
    +
    + This product includes cryptographic software written by Eric Young (eay@cryptsoft.com). This product includes software written by Tim Hudson (tjh@cryptsoft.com). +

    + +

    + PAFLib
    + Copyright IBM Corp. 2013 +

    +

    +Permission is hereby granted, free of charge, to any person obtaining a copy
    +of this software and associated documentation files (the "Software"), to deal
    +in the Software without restriction, including without limitation the rights
    +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
    +copies of the Software, and to permit persons to whom the Software is
    +furnished to do so, subject to the following conditions:
    +
    +The above copyright notice and this permission notice shall be included in
    +all copies or substantial portions of the Software.
    +
    +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
    +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
    +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
    +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
    +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM
    , +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
    +THE SOFTWARE. +

    + +

    Python
    + Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Python Software Foundation; All Rights Reserved

    +

    + PYTHON SOFTWARE FOUNDATION LICENSE VERSION 2
    + --------------------------------------------
    +
    + 1. This LICENSE AGREEMENT is between the Python Software Foundation ("PSF"), and the Individual or Organization ("Licensee") accessing and otherwise using this software ("Python") in source or binary form and its associated documentation.
    +
    + 2. Subject to the terms and conditions of this License Agreement, PSF hereby grants Licensee a nonexclusive, royalty-free, world-wide license to reproduce, analyze, test, perform and/or display publicly, prepare derivative works, distribute, and otherwise use Python alone or in any derivative version, provided, however, that PSF's License Agreement and PSF's notice of copyright, i.e., "Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Python Software Foundation; All Rights Reserved" are retained in Python alone or in any derivative version prepared by Licensee.
    +
    + 3. In the event Licensee prepares a derivative work that is based on or incorporates Python or any part thereof, and wants to make the derivative work available to others as provided herein, then Licensee hereby agrees to include in any such work a brief summary of the changes made to Python.
    +
    + 4. PSF is making Python available to Licensee on an "AS IS" basis. PSF MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED. BY WAY OF EXAMPLE, BUT NOT LIMITATION, PSF MAKES NO AND DISCLAIMS ANY REPRESENTATION OR WARRANTY OF MERCHANTABILITY OR FITNESS FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF PYTHON WILL NOT INFRINGE ANY THIRD PARTY RIGHTS.
    +
    + 5. PSF SHALL NOT BE LIABLE TO LICENSEE OR ANY OTHER USERS OF PYTHON FOR ANY INCIDENTAL, SPECIAL, OR CONSEQUENTIAL DAMAGES OR LOSS AS A RESULT OF MODIFYING, DISTRIBUTING, OR OTHERWISE USING PYTHON, OR ANY DERIVATIVE THEREOF, EVEN IF ADVISED OF THE POSSIBILITY THEREOF.
    +
    + 6. This License Agreement will automatically terminate upon a material breach of its terms and conditions.
    +
    + 7. Nothing in this License Agreement shall be deemed to create any relationship of agency, partnership, or joint venture between PSF and Licensee. This License Agreement does not grant permission to use PSF trademarks or trade name in a trademark sense to endorse or promote products or services of Licensee, or any third party.
    +
    + 8. By copying, installing or otherwise using Python, Licensee agrees to be bound by the terms and conditions of this License Agreement. +

    + +

    SPHDE
    + Copyright (c) 2012 IBM Corporation

    +

    Distributed through the Eclipse Public License 1.0. The source code for this project is available on GitHub.

    + +
    +
    + + diff --git a/configs/7.1/release_notes/release_notes-features.html b/configs/7.1/release_notes/release_notes-features.html new file mode 120000 index 000000000..423b76b47 --- /dev/null +++ b/configs/7.1/release_notes/release_notes-features.html @@ -0,0 +1 @@ +../../6.0/release_notes/release_notes-features.html \ No newline at end of file diff --git a/configs/7.1/release_notes/release_notes-group_entry.html b/configs/7.1/release_notes/release_notes-group_entry.html new file mode 120000 index 000000000..a70e0431f --- /dev/null +++ b/configs/7.1/release_notes/release_notes-group_entry.html @@ -0,0 +1 @@ +../../6.0/release_notes/release_notes-group_entry.html \ No newline at end of file diff --git a/configs/7.1/release_notes/release_notes-inst.html b/configs/7.1/release_notes/release_notes-inst.html new file mode 120000 index 000000000..17e3442c3 --- /dev/null +++ b/configs/7.1/release_notes/release_notes-inst.html @@ -0,0 +1 @@ +../../6.0/release_notes/release_notes-inst.html \ No newline at end of file diff --git a/configs/7.1/release_notes/release_notes-online_doc.html b/configs/7.1/release_notes/release_notes-online_doc.html new file mode 120000 index 000000000..f186077c8 --- /dev/null +++ b/configs/7.1/release_notes/release_notes-online_doc.html @@ -0,0 +1 @@ +../../6.0/release_notes/release_notes-online_doc.html \ No newline at end of file diff --git a/configs/7.1/release_notes/release_notes-package_line.html b/configs/7.1/release_notes/release_notes-package_line.html new file mode 120000 index 000000000..2e6e881b3 --- /dev/null +++ b/configs/7.1/release_notes/release_notes-package_line.html @@ -0,0 +1 @@ +../../6.0/release_notes/release_notes-package_line.html \ No newline at end of file diff --git a/configs/7.1/release_notes/release_notes-style.html b/configs/7.1/release_notes/release_notes-style.html new file mode 120000 index 000000000..7bf6a908c --- /dev/null +++ b/configs/7.1/release_notes/release_notes-style.html @@ -0,0 +1 @@ +../../6.0/release_notes/release_notes-style.html \ No newline at end of file diff --git a/configs/7.1/release_notes/relfixes.html b/configs/7.1/release_notes/relfixes.html new file mode 100644 index 000000000..2bdd848bc --- /dev/null +++ b/configs/7.1/release_notes/relfixes.html @@ -0,0 +1,171 @@ +
  • Little endian enablement.
  • +
  • POWER8 enablement.
  • +
  • POWER8 Optimized scheduler.
  • +
  • POWER7 only.
  • +
  • POWER8 Transactional Memory enablement.
  • +
  • POWER8 Crypto Operations enablement.
  • +
  • POWER8 Fusion enablement.
  • +
  • POWER8 optimized system libraries.
  • +
  • GCC creates binaries using --mcpu=power7 --mtune=power8 by default.
  • +
  • Support for AES instructions on OpenSSL.
  • +
  • Technology preview of the Go Programming Language.
  • + +

    Apart from package versions listed above:

    + +

    New features in 7.1-5

    + + + +

    Previous releases

    + +

    New features in 7.1-4

    + + +

    New features in 7.1-3

    + + + +

    Previous releases

    + +

    New features in 7.1-2

    + + +

    New features in 7.1-1

    +
      +
    • + OProfile provides: +
        +
      • Update events for IBM POWER8 processor.
      • +
      • Support support for JVMTI.
      • +
      +
    • +
    + +

    New features in 7.1-0

    +
      +
    • + GCC fixes for the following issues: + +
    • +
    • + Libdfp fixes for the following issues: +
        +
      • Fix issignaling for PowerPC DFP for zero inputs.
      • +
      • Add missing fpclassify prototypes.
      • +
      • Optimization fixes for POWER7 and POWER8.
      • +
      +
    • +
    • + OProfile fixes for the following issues: +
        +
      • opreport from 'operf --callgraph' profile shows incorrect recursive calls.
      • +
      • Fix "Unable to open cpu_type file for reading" for IBM POWER7+.
      • +
      • Fix regression in IBM POWER8 running in POWER7 compat mode.
      • +
      • Make operf/ocount detect invalid timer mode from opcontrol.
      • +
      • Fix up event codes for marked architected events.
      • +
      • Plug timing hole between JIT agent and opjitconv that can corrupt dump.
      • +
      • Enhance ocount to support millisecond time intervals.
      • +
      +
    • +
    • + SPHDE fixes for the following issues: +
        +
      • Reset MMCR0 independently of PAF_EBB_FLAGS_RESET_PMU in the Event Based Branching.
      • +
      • Fix paf enable/disable branches by avoid to set/reset the Global Enable (GE) bit in the Event Based Branching.
      • +
      +
    • +
    • Glibc provides optimized versions of: isinf/isinff, finite/finitef, llrint/llrintf, llround/llroundf and strrchr.
    • +
    + +

    New features in 7.0-3

    + diff --git a/configs/7.1/sanity.mk b/configs/7.1/sanity.mk new file mode 100644 index 000000000..9b6bc17b2 --- /dev/null +++ b/configs/7.1/sanity.mk @@ -0,0 +1,19 @@ +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# This file holds some sanity checks to run on the build machine, to verify +# its general required components for the building process. +define base_sanity + echo "Base sanity checks passed." +endef \ No newline at end of file diff --git a/configs/7.1/specs/main.spec b/configs/7.1/specs/main.spec new file mode 100644 index 000000000..eb0d3c55c --- /dev/null +++ b/configs/7.1/specs/main.spec @@ -0,0 +1,24 @@ +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +Name: advance-toolchain-%{at_major}__CROSS____TARGET_ARCH__ +Version: %{at_major_version} +Release: %{at_revision_number} +AutoReqProv: no +Requires: __CROSS_DEPS_PLACE_HOLDER__ +License: GPL, LGPL +Packager: __RPM_PACKAGER__ +Vendor: __RPM_VENDOR__ +Group: Development/Libraries +Summary: Advance Toolchain diff --git a/configs/7.1/specs/metapkgs.spec b/configs/7.1/specs/metapkgs.spec new file mode 120000 index 000000000..b32461b0a --- /dev/null +++ b/configs/7.1/specs/metapkgs.spec @@ -0,0 +1 @@ +../../7.0/specs/metapkgs.spec \ No newline at end of file diff --git a/configs/7.1/specs/monolithic.spec b/configs/7.1/specs/monolithic.spec new file mode 120000 index 000000000..10e640aff --- /dev/null +++ b/configs/7.1/specs/monolithic.spec @@ -0,0 +1 @@ +../../7.0/specs/monolithic.spec \ No newline at end of file diff --git a/configs/7.1/specs/monolithic_at-compat.spec b/configs/7.1/specs/monolithic_at-compat.spec new file mode 120000 index 000000000..8360029a2 --- /dev/null +++ b/configs/7.1/specs/monolithic_at-compat.spec @@ -0,0 +1 @@ +../../7.0/specs/monolithic_at-compat.spec \ No newline at end of file diff --git a/configs/7.1/specs/monolithic_compat.spec b/configs/7.1/specs/monolithic_compat.spec new file mode 120000 index 000000000..87d3851df --- /dev/null +++ b/configs/7.1/specs/monolithic_compat.spec @@ -0,0 +1 @@ +../../7.0/specs/monolithic_compat.spec \ No newline at end of file diff --git a/configs/7.1/specs/monolithic_cross.spec b/configs/7.1/specs/monolithic_cross.spec new file mode 100644 index 000000000..21a78ff41 --- /dev/null +++ b/configs/7.1/specs/monolithic_cross.spec @@ -0,0 +1,91 @@ +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Add support for relocation. +Prefix: %{_prefix} +# Required to install info manuals. +Requires(post): info +Requires(preun): info + +%description +The advance toolchain is a self contained toolchain which provides preview +toolchain functionality in GCC, binutils, GLIBC, and GDB. + +# On newer rpm versions, it's common to strip debug info and to compile python +# files. We only want to compress man pages. +%define __os_install_post /usr/lib/rpm/brp-compress + +# Relative paths of directories. +%define datadir_r share +%define infodir_r share/info +# Some distributions set this to 'lib64' by default. +%define libdir_r lib +%define libexecdir_r libexec +%define mandir_r share/man +%define tgtinfodir_r __DEST_CROSS_REL__/usr/share/info +%define tgtmandir_r __DEST_CROSS_REL__/usr/share/man + +# These have been known to be different on different distributions. +%define _datadir %{_prefix}/%{datadir_r} +%define _infodir %{_prefix}/%{infodir_r} +%define _libdir %{_prefix}/%{libdir_r} +%define _libexecdir %{_prefix}/%{libexecdir_r} +%define _mandir %{_prefix}/%{mandir_r} +%define _tgtinfodir %{_prefix}/%{tgtinfodir_r} +%define _tgtmandir %{_prefix}/%{tgtmandir_r} + +%prep +%build +%install +mkdir -p ${RPM_BUILD_ROOT}$(dirname %{_prefix}) +cp -af %{_prefix} ${RPM_BUILD_ROOT}$(dirname %{_prefix}) +# Remove info/dir from installation dir +rm -f ${RPM_BUILD_ROOT}%{_infodir}/dir \ + ${RPM_BUILD_ROOT}%{_tgtinfodir}/dir +# Compress all of the info files. +gzip -9nvf ${RPM_BUILD_ROOT}%{_infodir}/*.info* +gzip -9nvf ${RPM_BUILD_ROOT}%{_tgtinfodir}/*.info* + + +%postun +if [[ ${1} -eq 0 ]]; then + if [[ -d "${RPM_INSTALL_PREFIX}" ]]; then + rm -rf ${RPM_INSTALL_PREFIX} + fi +fi + +%post +# Update the info directory entries +for INFO in $(ls ${RPM_INSTALL_PREFIX}/%{infodir_r}/*.info.gz); do + install-info ${INFO} ${RPM_INSTALL_PREFIX}/%{infodir_r}/dir +done +for INFO in $(ls ${RPM_INSTALL_PREFIX}/%{tgtinfodir_r}/*.info.gz); do + install-info ${INFO} ${RPM_INSTALL_PREFIX}/%{tgtinfodir_r}/dir +done + +%preun +# Update the info directory entries +if [ "$1" = 0 ]; then + for INFO in $(ls ${RPM_INSTALL_PREFIX}/%{infodir_r}/*.info.gz); do + install-info --delete ${INFO} \ + ${RPM_INSTALL_PREFIX}/%{infodir_r}/dir + done + for INFO in $(ls ${RPM_INSTALL_PREFIX}/%{tgtinfodir_r}/*.info.gz); do + install-info --delete ${INFO} \ + ${RPM_INSTALL_PREFIX}/%{tgtinfodir_r}/dir + done +fi + +%files -f %{at_work}/cross_files.list +%defattr(-,root,root) diff --git a/configs/8.0/arch/default.mk b/configs/8.0/arch/default.mk new file mode 120000 index 000000000..bdb35147f --- /dev/null +++ b/configs/8.0/arch/default.mk @@ -0,0 +1 @@ +../../7.1/arch/default.mk \ No newline at end of file diff --git a/configs/8.0/arch/i686.ppc64.mk b/configs/8.0/arch/i686.ppc64.mk new file mode 120000 index 000000000..1aa9b9537 --- /dev/null +++ b/configs/8.0/arch/i686.ppc64.mk @@ -0,0 +1 @@ +../../7.1/arch/i686.ppc64.mk \ No newline at end of file diff --git a/configs/8.0/arch/i686.ppc64le.mk b/configs/8.0/arch/i686.ppc64le.mk new file mode 120000 index 000000000..f11e2f8d2 --- /dev/null +++ b/configs/8.0/arch/i686.ppc64le.mk @@ -0,0 +1 @@ +../../7.1/arch/i686.ppc64le.mk \ No newline at end of file diff --git a/configs/8.0/arch/ppc64.ppc64.mk b/configs/8.0/arch/ppc64.ppc64.mk new file mode 120000 index 000000000..5fa9acca9 --- /dev/null +++ b/configs/8.0/arch/ppc64.ppc64.mk @@ -0,0 +1 @@ +../../7.1/arch/ppc64.ppc64.mk \ No newline at end of file diff --git a/configs/8.0/arch/ppc64le.ppc64le.mk b/configs/8.0/arch/ppc64le.ppc64le.mk new file mode 120000 index 000000000..302d8906e --- /dev/null +++ b/configs/8.0/arch/ppc64le.ppc64le.mk @@ -0,0 +1 @@ +../../7.1/arch/ppc64le.ppc64le.mk \ No newline at end of file diff --git a/configs/8.0/arch/x86_64.ppc64.mk b/configs/8.0/arch/x86_64.ppc64.mk new file mode 120000 index 000000000..db1240a97 --- /dev/null +++ b/configs/8.0/arch/x86_64.ppc64.mk @@ -0,0 +1 @@ +../../7.1/arch/x86_64.ppc64.mk \ No newline at end of file diff --git a/configs/8.0/arch/x86_64.ppc64le.mk b/configs/8.0/arch/x86_64.ppc64le.mk new file mode 120000 index 000000000..d590f72ba --- /dev/null +++ b/configs/8.0/arch/x86_64.ppc64le.mk @@ -0,0 +1 @@ +../../7.1/arch/x86_64.ppc64le.mk \ No newline at end of file diff --git a/configs/8.0/base.mk b/configs/8.0/base.mk new file mode 100644 index 000000000..3de8bef3d --- /dev/null +++ b/configs/8.0/base.mk @@ -0,0 +1,52 @@ +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Basic build version definitions +# =============================== +# This Makefile include contains the config options included at the beginning +# of the build process that govern the subsequent generated package name, +# version and other dependent internal build variables. +# It also states which distros the build is compatible with, so that it can be +# validated at build time, as well as heuristicaly find the proper repo path +# to put the final rpms generated by the build system. + +# Versioning description +# ====================== +# +# - AT_NAME: Final build Advance Toolchain package name. +# +# - AT_MAJOR_VERSION: Changes whenever the compiler or the ABI changes. +# Should be in X.Y format, where X=compiler change, +# Y=ABI change within that compiler change cycle. All +# first major releases should be X.0. Then, if the ABI +# changes, increment the second digit (i.e. X.1). +# +# - AT_REVISION_NUMBER: The revision number. Starts at 0 and is incremented +# whenever a new official build that doesn't change the +# compiler version or the ABI is required. +# +# - AT_INTERNAL: Tag for internal releases (i.e. alpha, beta, rc). For +# GM or external releases, it should be "none". +# +# - AT_DIR_NAME: Optional name of the directory. If not defined, will +# use a combination of AT_NAME, AT_MAJOR_VERSION, +# AT_INTERNAL and AT_REVISION_NUMBER. +# +# - AT_PREVIOUS_VERSION Previous compatible AT version supported (It may be +# further restricted by distro specific settings) +AT_NAME := at +AT_MAJOR_VERSION := 8.0 +AT_REVISION_NUMBER := 7 +AT_INTERNAL := none +AT_PREVIOUS_VERSION := 7.0 diff --git a/configs/8.0/build.mk b/configs/8.0/build.mk new file mode 100644 index 000000000..1df89de10 --- /dev/null +++ b/configs/8.0/build.mk @@ -0,0 +1,63 @@ +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generic build support options +# ============================= +# Most of these options are self explanatory, Some highlights on obscure ones +# - BUILD_ARCH must contain the target toolchain arch (ppc64/ppc32) +# - BUILD_LOAD_ARCH tell us the CPU base to use for loader compatibility (GLIBC). +# - BUILD_BASE_ARCH tell us the CPU base to use for base code generation (GCC). +# - BUILD_OPTIMIZATION tells which is the default base optimization level (GCC). +# - BUILD_WITH_LONGDOUBLE tells us to build with support for longdoubles. +# - BUILD_WITH_DFP_STANDALONE tells us to build with libdfp as standalone library. +# - BUILD_RPM_PACKAGER tells us the name / email of packager for this release. +# - BUILD_RPMS must be set to "granular" or "monolithic" to indicate the kind of +# rpms to be generated by the build script. See the documentation notes. + +# When running on ppc64le, BUILD_ARCH defaults to ppc64le +# In the rest, it defaults to ppc64. +ifeq ($(HOST_ARCH),ppc64le) + BUILD_ARCH ?= ppc64le +endif +BUILD_ARCH ?= ppc64 + +BUILD_LOAD_ARCH := power7 +BUILD_BASE_ARCH := power7 +BUILD_OPTIMIZATION := power8 +BUILD_WITH_LONGDOUBLE := yes +BUILD_WITH_DFP_STANDALONE := yes +BUILD_RPM_PACKAGER := +BUILD_RPM_VENDOR := +BUILD_RPMS := monolithic +BUILD_GCC_LANGUAGES := c,c++,fortran,go + +# List supported CPUs to build for active, compat and embed +# ========================================================= +# - List of valid CPUs for active and compat: +# * power4, power5, power5+, power6, power6x and power7 +BUILD_ACTIVE_MULTILIBS := power8 + +# Download options +# ================ +# Should be either 'yes' or 'no'. Mostly self explanatory options. +# - BUILD_GET_SOURCES tell us to force grab sources +# - BUILD_GET_MPS tell us to grab patches from mailing lists +# - BUILD_GET_ADDONS tell us to grab related package addons +# - BUILD_EXCLUSIVE_CROSS tell us that the build is *exclusively* cross +# - BUILD_DEFAULT_RETRIES tell the default number of retries when fetching sources +BUILD_GET_SOURCES := yes +BUILD_GET_MPS := yes +BUILD_GET_ADDONS := yes +BUILD_EXCLUSIVE_CROSS := no +BUILD_DEFAULT_RETRIES := 5 diff --git a/configs/8.0/deb/monolithic/changelog b/configs/8.0/deb/monolithic/changelog new file mode 120000 index 000000000..c10e19f11 --- /dev/null +++ b/configs/8.0/deb/monolithic/changelog @@ -0,0 +1 @@ +../../../7.1/deb/monolithic/changelog \ No newline at end of file diff --git a/configs/8.0/deb/monolithic/compat b/configs/8.0/deb/monolithic/compat new file mode 120000 index 000000000..62aff92e0 --- /dev/null +++ b/configs/8.0/deb/monolithic/compat @@ -0,0 +1 @@ +../../../7.1/deb/monolithic/compat \ No newline at end of file diff --git a/configs/8.0/deb/monolithic/control b/configs/8.0/deb/monolithic/control new file mode 120000 index 000000000..512b9e2b9 --- /dev/null +++ b/configs/8.0/deb/monolithic/control @@ -0,0 +1 @@ +../../../7.1/deb/monolithic/control \ No newline at end of file diff --git a/configs/8.0/deb/monolithic/copyright b/configs/8.0/deb/monolithic/copyright new file mode 120000 index 000000000..5c775636a --- /dev/null +++ b/configs/8.0/deb/monolithic/copyright @@ -0,0 +1 @@ +../../../7.1/deb/monolithic/copyright \ No newline at end of file diff --git a/configs/8.0/deb/monolithic/devel.postinst b/configs/8.0/deb/monolithic/devel.postinst new file mode 120000 index 000000000..76cc4c770 --- /dev/null +++ b/configs/8.0/deb/monolithic/devel.postinst @@ -0,0 +1 @@ +../../../7.1/deb/monolithic/devel.postinst \ No newline at end of file diff --git a/configs/8.0/deb/monolithic/devel.postrm b/configs/8.0/deb/monolithic/devel.postrm new file mode 120000 index 000000000..9b2e6a1a9 --- /dev/null +++ b/configs/8.0/deb/monolithic/devel.postrm @@ -0,0 +1 @@ +../../../7.1/deb/monolithic/devel.postrm \ No newline at end of file diff --git a/configs/8.0/deb/monolithic/devel.prerm b/configs/8.0/deb/monolithic/devel.prerm new file mode 120000 index 000000000..9a6e6cc0f --- /dev/null +++ b/configs/8.0/deb/monolithic/devel.prerm @@ -0,0 +1 @@ +../../../7.1/deb/monolithic/devel.prerm \ No newline at end of file diff --git a/configs/8.0/deb/monolithic/mcore-libs.postinst b/configs/8.0/deb/monolithic/mcore-libs.postinst new file mode 120000 index 000000000..1375ba79e --- /dev/null +++ b/configs/8.0/deb/monolithic/mcore-libs.postinst @@ -0,0 +1 @@ +../../../7.1/deb/monolithic/mcore-libs.postinst \ No newline at end of file diff --git a/configs/8.0/deb/monolithic/mcore-libs.postrm b/configs/8.0/deb/monolithic/mcore-libs.postrm new file mode 120000 index 000000000..2aed5ee39 --- /dev/null +++ b/configs/8.0/deb/monolithic/mcore-libs.postrm @@ -0,0 +1 @@ +../../../7.1/deb/monolithic/mcore-libs.postrm \ No newline at end of file diff --git a/configs/8.0/deb/monolithic/perf.postinst b/configs/8.0/deb/monolithic/perf.postinst new file mode 120000 index 000000000..9885824ce --- /dev/null +++ b/configs/8.0/deb/monolithic/perf.postinst @@ -0,0 +1 @@ +../../../7.1/deb/monolithic/perf.postinst \ No newline at end of file diff --git a/configs/8.0/deb/monolithic/perf.postrm b/configs/8.0/deb/monolithic/perf.postrm new file mode 120000 index 000000000..5006fd14b --- /dev/null +++ b/configs/8.0/deb/monolithic/perf.postrm @@ -0,0 +1 @@ +../../../7.1/deb/monolithic/perf.postrm \ No newline at end of file diff --git a/configs/8.0/deb/monolithic/rules b/configs/8.0/deb/monolithic/rules new file mode 120000 index 000000000..af6a3c1cf --- /dev/null +++ b/configs/8.0/deb/monolithic/rules @@ -0,0 +1 @@ +../../../7.1/deb/monolithic/rules \ No newline at end of file diff --git a/configs/8.0/deb/monolithic/runtime.postinst b/configs/8.0/deb/monolithic/runtime.postinst new file mode 120000 index 000000000..2874b6f6e --- /dev/null +++ b/configs/8.0/deb/monolithic/runtime.postinst @@ -0,0 +1 @@ +../../../7.1/deb/monolithic/runtime.postinst \ No newline at end of file diff --git a/configs/8.0/deb/monolithic/runtime.postrm b/configs/8.0/deb/monolithic/runtime.postrm new file mode 120000 index 000000000..4e09db1d3 --- /dev/null +++ b/configs/8.0/deb/monolithic/runtime.postrm @@ -0,0 +1 @@ +../../../7.1/deb/monolithic/runtime.postrm \ No newline at end of file diff --git a/configs/8.0/deb/monolithic_cross/changelog b/configs/8.0/deb/monolithic_cross/changelog new file mode 120000 index 000000000..1e85334b1 --- /dev/null +++ b/configs/8.0/deb/monolithic_cross/changelog @@ -0,0 +1 @@ +../../../7.1/deb/monolithic_cross/changelog \ No newline at end of file diff --git a/configs/8.0/deb/monolithic_cross/compat b/configs/8.0/deb/monolithic_cross/compat new file mode 120000 index 000000000..504b1fe3a --- /dev/null +++ b/configs/8.0/deb/monolithic_cross/compat @@ -0,0 +1 @@ +../../../7.1/deb/monolithic_cross/compat \ No newline at end of file diff --git a/configs/8.0/deb/monolithic_cross/control b/configs/8.0/deb/monolithic_cross/control new file mode 100644 index 000000000..edb3ecb37 --- /dev/null +++ b/configs/8.0/deb/monolithic_cross/control @@ -0,0 +1,51 @@ +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +Source: advance-toolchain-__AT_MAJOR_INTERNAL__-cross__BUILD_ARCH__ +Section: devel +Priority: extra +Maintainer: Advance Toolchain + +Package: advance-toolchain-cross__BUILD_ARCH__ +Architecture: i386 +Pre-Depends: advance-toolchain-__AT_MAJOR_INTERNAL__-cross__BUILD_ARCH__ (= __AT_FULL_VER__) +Description: Advance Toolchain cross compiler + The Advance Toolchain is a self contained toolchain which provides preview + toolchain functionality in GCC, binutils, GLIBC, and GDB. + +Package: advance-toolchain-__AT_MAJOR_INTERNAL__-cross__BUILD_ARCH__ +Architecture: i386 +Depends: ${shlibs:Depends}, advance-toolchain-__AT_MAJOR_INTERNAL__-cross-common (= __AT_FULL_VER__) +Description: Advance Toolchain cross compiler + The Advance Toolchain is a self contained toolchain which provides preview + toolchain functionality in GCC, binutils, GLIBC, and GDB. +Multi-Arch: foreign + +Package: advance-toolchain-cross-common +Architecture: i386 +Pre-Depends: advance-toolchain-__AT_MAJOR_INTERNAL__-cross-common (= __AT_FULL_VER__) +Description: Advance Toolchain cross compiler common files + The Advance Toolchain is a self contained toolchain which provides preview + toolchain functionality in GCC, binutils, GLIBC, and GDB. + This package provides common files for the Advance Toolchain. + +Package: advance-toolchain-__AT_MAJOR_INTERNAL__-cross-common +Architecture: i386 +Pre-Depends: info +Depends: ${shlibs:Depends}, info +Description: Advance Toolchain cross compiler common files + The Advance Toolchain is a self contained toolchain which provides preview + toolchain functionality in GCC, binutils, GLIBC, and GDB. + This package provides common files for the Advance Toolchain. +Multi-Arch: foreign diff --git a/configs/8.0/deb/monolithic_cross/copyright b/configs/8.0/deb/monolithic_cross/copyright new file mode 120000 index 000000000..4bf8fb3da --- /dev/null +++ b/configs/8.0/deb/monolithic_cross/copyright @@ -0,0 +1 @@ +../../../7.1/deb/monolithic_cross/copyright \ No newline at end of file diff --git a/configs/8.0/deb/monolithic_cross/cross-common.postinst b/configs/8.0/deb/monolithic_cross/cross-common.postinst new file mode 100644 index 000000000..8f5c3e0ac --- /dev/null +++ b/configs/8.0/deb/monolithic_cross/cross-common.postinst @@ -0,0 +1,24 @@ +#!/bin/bash +# +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +if [[ "${1}" == configure ]]; then + # Update non-standard info directories. + for INFO in $(ls __AT_DEST__/share/info/*.info.gz); do + ginstall-info ${INFO} \ + __AT_DEST__/share/info/dir > /dev/null 2>&1 || : + done +fi diff --git a/configs/8.0/deb/monolithic_cross/cross-common.prerm b/configs/8.0/deb/monolithic_cross/cross-common.prerm new file mode 100644 index 000000000..f16436ef9 --- /dev/null +++ b/configs/8.0/deb/monolithic_cross/cross-common.prerm @@ -0,0 +1,25 @@ +#!/bin/bash +# +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +if [[ "${1}" == remove ]]; then + # Update our non standard info dirs + for INFO in $(ls __AT_DEST__/share/info/*.info.gz); do + ginstall-info --delete ${INFO} \ + __AT_DEST__/share/info/dir > /dev/null 2>&1 || : + done + rm -f __AT_DEST__/share/info/dir +fi diff --git a/configs/8.0/deb/monolithic_cross/postinst b/configs/8.0/deb/monolithic_cross/postinst new file mode 100644 index 000000000..e949a9642 --- /dev/null +++ b/configs/8.0/deb/monolithic_cross/postinst @@ -0,0 +1,24 @@ +#!/bin/bash +# +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +if [[ "${1}" == configure ]]; then + # Update non-standard info directories. + for INFO in $(ls __DEST_CROSS__/usr/share/info/*.info.gz); do + ginstall-info ${INFO} \ + __DEST_CROSS__/usr/share/info/dir > /dev/null 2>&1 || : + done +fi diff --git a/configs/8.0/deb/monolithic_cross/prerm b/configs/8.0/deb/monolithic_cross/prerm new file mode 100644 index 000000000..53a66d8c7 --- /dev/null +++ b/configs/8.0/deb/monolithic_cross/prerm @@ -0,0 +1,25 @@ +#!/bin/bash +# +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +if [[ "${1}" == remove ]]; then + # Update non-standard info directories. + for INFO in $(ls __DEST_CROSS__/usr/share/info/*.info.gz); do + ginstall-info --delete ${INFO} \ + __DEST_CROSS__/usr/share/info/dir > /dev/null 2>&1 || : + done + rm -f __DEST_CROSS__/usr/share/info/dir +fi diff --git a/configs/8.0/deb/monolithic_cross/rules b/configs/8.0/deb/monolithic_cross/rules new file mode 120000 index 000000000..d4b65d369 --- /dev/null +++ b/configs/8.0/deb/monolithic_cross/rules @@ -0,0 +1 @@ +../../../7.1/deb/monolithic_cross/rules \ No newline at end of file diff --git a/configs/8.0/distros/centos-6.mk b/configs/8.0/distros/centos-6.mk new file mode 120000 index 000000000..b8dd2bf9b --- /dev/null +++ b/configs/8.0/distros/centos-6.mk @@ -0,0 +1 @@ +redhat-6.mk \ No newline at end of file diff --git a/configs/8.0/distros/centos-7.mk b/configs/8.0/distros/centos-7.mk new file mode 120000 index 000000000..76426bdab --- /dev/null +++ b/configs/8.0/distros/centos-7.mk @@ -0,0 +1 @@ +redhat-7.mk \ No newline at end of file diff --git a/configs/8.0/distros/opensuse-12.mk b/configs/8.0/distros/opensuse-12.mk new file mode 120000 index 000000000..3c37d8702 --- /dev/null +++ b/configs/8.0/distros/opensuse-12.mk @@ -0,0 +1 @@ +suse-12.mk \ No newline at end of file diff --git a/configs/8.0/distros/redhat-6.mk b/configs/8.0/distros/redhat-6.mk new file mode 120000 index 000000000..c75b1296b --- /dev/null +++ b/configs/8.0/distros/redhat-6.mk @@ -0,0 +1 @@ +../../7.1/distros/redhat-6.mk \ No newline at end of file diff --git a/configs/8.0/distros/redhat-7.mk b/configs/8.0/distros/redhat-7.mk new file mode 120000 index 000000000..7a60724d1 --- /dev/null +++ b/configs/8.0/distros/redhat-7.mk @@ -0,0 +1 @@ +../../7.1/distros/redhat-7.mk \ No newline at end of file diff --git a/configs/8.0/distros/suse-12.mk b/configs/8.0/distros/suse-12.mk new file mode 100644 index 000000000..b58e2c1d2 --- /dev/null +++ b/configs/8.0/distros/suse-12.mk @@ -0,0 +1,88 @@ +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Distro dependent basic definitions for SuSE Enterprise Server 12 +# ================================================================ +# This Makefile include contains the definitions for the distro being used +# for the build process. It contains kernel version infos and distro specific +# sanity checks. + +# Informs the distro supported power archs +AT_SUPPORTED_ARCHS := ppc64le + +# You may force the BUILD_IGNORE_AT_COMPAT general condition by distro +#BUILD_IGNORE_AT_COMPAT := yes + +# Kernel version to build toolchain against +# - As this distro only supports one arch variation (ppc64le), there is no +# need to conditionally define these versions based on arch. +AT_KERNEL := 3.12.12 # Current distro kernel version for runtime. +AT_OLD_KERNEL := # Previous distro kernel version for runtime-compat. + +# Inform the mainly supported distros +AT_SUPPORTED_DISTROS := SLES_12 + +# Inform the compatibility supported distros +AT_COMPAT_DISTROS := + +# Sign the repository and packages +AT_SIGN_PKGS := yes +AT_SIGN_REPO := yes +AT_SIGN_PKGS_CROSS := no +AT_SIGN_REPO_CROSS := yes + +# ID of GNUPG key used to sign our packages (main/compat) +AT_GPG_KEYID := 6976A827 +AT_GPG_KEYIDC := 6976A827 +AT_GPG_KEYIDL := 6976A827 +# ID of GNUPG key used to sign our repositories (main/compat) +AT_GPG_REPO_KEYID := 6976A827 +AT_GPG_REPO_KEYIDC := 6976A827 +AT_GPG_REPO_KEYIDL := 6976A827 + +# Options required by the command to update the repository metadata +AT_REPOCMD_OPTS := -p + +# Moved here from build.mk since the value for this variable +# depends on the distro. +# For a cross build the executables in the toolchain (gcc, ld, etc.) +# should be built as 64 bit. +BUILD_CROSS_32 := no + +# As some distros have special requirements for configuration upon final +# AT installation, put in this macro, the final configurations required +# after the main build and prior to the rpm build +define distro_final_config + echo "nothing to do." +endef + +# Inform the list of packages to check +ifndef AT_DISTRO_REQ_PKGS + AT_CROSS_PKGS_REQ := + AT_NATIVE_PKGS_REQ := libxslt popt-devel docbook-xsl-stylesheets \ + xorg-x11-util-devel java-1_7_1-ibm-devel \ + libbz2-devel + AT_COMMON_PKGS_REQ := zlib-devel ncurses-devel flex bison texinfo \ + createrepo subversion cvs gawk autoconf rsync curl \ + bc automake rpm-build gcc-c++ + AT_CROSS_PGMS_REQ := + AT_NATIVE_PGMS_REQ := + AT_COMMON_PGMS_REQ := git_1.7 + AT_JAVA_VERSIONS := 7 +endif + +# If needed, define the necessary distro related sanity checks. +define distro_sanity + echo "nothing to test here" +endef diff --git a/configs/8.0/distros/ubuntu-14.mk b/configs/8.0/distros/ubuntu-14.mk new file mode 120000 index 000000000..441dbfcaf --- /dev/null +++ b/configs/8.0/distros/ubuntu-14.mk @@ -0,0 +1 @@ +../../7.1/distros/ubuntu-14.mk \ No newline at end of file diff --git a/configs/8.0/packages/binutils/binutils.mk b/configs/8.0/packages/binutils/binutils.mk new file mode 120000 index 000000000..009364545 --- /dev/null +++ b/configs/8.0/packages/binutils/binutils.mk @@ -0,0 +1 @@ +../../../7.1/packages/binutils/binutils.mk \ No newline at end of file diff --git a/configs/8.0/packages/binutils/sources b/configs/8.0/packages/binutils/sources new file mode 100644 index 000000000..db6758bf1 --- /dev/null +++ b/configs/8.0/packages/binutils/sources @@ -0,0 +1,61 @@ +#!/usr/bin/env bash +# +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# binutils source package and build info +# ====================================== +# + +ATSRC_PACKAGE_NAME="GNU Binutils" +ATSRC_PACKAGE_VER=2.25 +ATSRC_PACKAGE_REV=7586fe6 +ATSRC_PACKAGE_LICENSE="GPL 2.0" +ATSRC_PACKAGE_DOCLINK="http://sourceware.org/binutils/docs/" +ATSRC_PACKAGE_RELFIXES= +ATSRC_PACKAGE_STR_VER="${ATSRC_PACKAGE_NAME} ${ATSRC_PACKAGE_VER}-${ATSRC_PACKAGE_REV}" +ATSRC_PACKAGE_PRE="test -d binutils-${ATSRC_PACKAGE_VER}-${ATSRC_PACKAGE_REV}" +# git.linux.ibm.com is a mirror of sourceware.org. +ATSRC_PACKAGE_CO=([0]="git clone git://git.linux.ibm.com/binutils-gdb/binutils-gdb.git binutils" \ + [1]="git clone git://sourceware.org/git/binutils-gdb.git binutils") +ATSRC_PACKAGE_GIT="git checkout -b binutils-${ATSRC_PACKAGE_VER}${ATSRC_PACKAGE_REV:+-${ATSRC_PACKAGE_REV}} ${ATSRC_PACKAGE_REV}" +ATSRC_PACKAGE_POST="mv binutils binutils-${ATSRC_PACKAGE_VER}${ATSRC_PACKAGE_REV:+-${ATSRC_PACKAGE_REV}}" +ATSRC_PACKAGE_SRC=${AT_BASE}/sources/binutils-${ATSRC_PACKAGE_VER}-${ATSRC_PACKAGE_REV} +ATSRC_PACKAGE_WORK=${AT_WORK_PATH}/binutils +# Disabled until check-ld is resolved +ATSRC_PACKAGE_MAKE_CHECK=none +ATSRC_PACKAGE_MLS= +ATSRC_PACKAGE_ALOC= +ATSRC_PACKAGE_PATCHES= +ATSRC_PACKAGE_TARS= +ATSRC_PACKAGE_DISTRIB=yes +ATSRC_PACKAGE_BUNDLE=toolchain + +atsrc_get_patches () +{ + at_get_patch_and_trim \ + https://sourceware.org/ml/binutils/2015-06/msg00190.html \ + mfcr-fix.patch 234 \ + eda463e319d44e20ae1db9bb6131c457 || return ${?} +} + +atsrc_apply_patches () +{ + # Revert the patch that improves the detection of invalid usage of mfcr + # because it changes binutils' behaviour. + patch -p1 -R < mfcr-fix.patch + + return 0 +} diff --git a/configs/8.0/packages/binutils/specfile b/configs/8.0/packages/binutils/specfile new file mode 120000 index 000000000..328fa2799 --- /dev/null +++ b/configs/8.0/packages/binutils/specfile @@ -0,0 +1 @@ +../../../7.1/packages/binutils/specfile \ No newline at end of file diff --git a/configs/8.0/packages/binutils/stage_1 b/configs/8.0/packages/binutils/stage_1 new file mode 100644 index 000000000..e2529ab71 --- /dev/null +++ b/configs/8.0/packages/binutils/stage_1 @@ -0,0 +1,99 @@ +#!/usr/bin/env bash +# +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# binutils build parameters for stage 1 +# ===================================== +# + +ATCFG_HOLD_TEMP_INSTALL='no' +ATCFG_HOLD_TEMP_BUILD='no' +# Build in a new directory +ATCFG_BUILD_STAGE_T='dir' + +# Conditional configure command +atcfg_configure() { + if [[ "${cross_build}" == "no" ]]; then + sysroot=/ + else + sysroot=${dest_cross} + fi + + CC=${system_cc} \ + CFLAGS="-g -O" \ + CXXFLAGS="-g -O" \ + ${ATSRC_PACKAGE_WORK}/configure --build=${host} \ + --host=${host} \ + --target=${target} \ + ${alternate_target:+--enable-targets=${alternate_target}} \ + --with-sysroot=${sysroot} \ + --prefix=${at_dest} \ + --disable-gdb \ + --disable-readline \ + --disable-libdecnumber \ + --disable-sim \ + --disable-nls + +} + +# Make command for build +atcfg_make() { + ${SUB_MAKE} all +} + +# atcfg_make_check() done at stage_2 + +# Install command for build +atcfg_install() { + make install DESTDIR=${install_place} +} + +# Post install settings or commands to run +atcfg_post_install() { + # Create the required symlinks to install, which are a requirement for + # cross builds, but now, we are assuming that every build should have the + # triple shortcut installed. So, create binutils ${target(32|64)}-* symlinks + pushd ${install_place}/${at_dest}/bin + for CMD in addr2line ar as c++filt ld nm objcopy objdump ranlib size strings strip; do + if [[ -x ${CMD} ]] && [[ ! -e ${target32}-${CMD} ]]; then + ln -sfn ${CMD} ${target32}-${CMD} + fi + done + for CMD in addr2line ar c++filt nm objcopy objdump ranlib size strings strip; do + if [[ -x ${CMD} ]] && [[ ! -e ${target64}-${CMD} ]]; then + ln -sfn ${CMD} ${target64}-${CMD} + fi + done + if [[ "${target}" == "${target64}" ]]; then + if [[ ! -e ${target64}-as ]]; then + echo -e "#!/bin/bash\nexec ${at_dest}/bin/as \"${@}\"" > ${target64}-as + chmod a+x ${target64}-as + fi + if [[ ! -e ${target64}-ld ]]; then + echo -e "#!/bin/bash\nexec ${at_dest}/bin/ld \"${@}\"" > ${target64}-ld + chmod a+x ${target64}-ld + fi + fi + # This was needed to fix the cross build which defaults to ${target64} + # target. So, create binutils ${target32}-* symlinks + for CMD in addr2line ar as c++filt elfedit embedspu gprof ld nm objcopy objdump ranlib readelf size strings strip; do + if [[ -x ${target64}-${CMD} ]] && \ + [[ ! -f ${target32}-${CMD} ]]; then + ln -sfn ${target64}-${CMD} ${target32}-${CMD} + fi + done + popd +} diff --git a/configs/8.0/packages/binutils/stage_2 b/configs/8.0/packages/binutils/stage_2 new file mode 100644 index 000000000..0b75c454a --- /dev/null +++ b/configs/8.0/packages/binutils/stage_2 @@ -0,0 +1,85 @@ +#!/usr/bin/env bash +# +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# + +ATCFG_HOLD_TEMP_INSTALL='no' +ATCFG_HOLD_TEMP_BUILD='no' +# Build in a new directory +ATCFG_BUILD_STAGE_T='dir' + +# Conditional configure command +atcfg_configure() { + if [[ "${cross_build}" == "no" ]]; then + # Configure command for native builds + CC=${at_dest}/bin/gcc \ + CXX=${at_dest}/bin/g++ \ + CFLAGS="-g -O2" \ + CXXFLAGS="-g -O2" \ + ${ATSRC_PACKAGE_WORK}/configure --build=${host} \ + --host=${target} \ + --target=${target} \ + ${alternate_target:+--enable-targets=${alternate_target}} \ + --with-sysroot=/ \ + --prefix=${at_dest} \ + --libdir=${at_dest}/lib${compiler##32} \ + --disable-gdb \ + --disable-readline \ + --disable-libdecnumber \ + --disable-sim \ + --disable-nls \ + --enable-shared \ + --enable-plugins \ + --enable-install-libiberty=./ + else + # Configure command for cross builds + CC=${system_cc} \ + CXX=${system_cxx} \ + CFLAGS="-g -O" \ + CXXFLAGS="-g -O" \ + ${ATSRC_PACKAGE_WORK}/configure --build=${host} \ + --host=${host} \ + --target=${target} \ + ${target64:+--enable-targets=${target64}} \ + --with-sysroot=${dest_cross} \ + --prefix=${at_dest} \ + --disable-gdb \ + --disable-readline \ + --disable-libdecnumber \ + --disable-sim \ + --disable-nls \ + --enable-plugins + fi +} + + +# Make command for build +atcfg_make() { + ${SUB_MAKE} all +} + +# Make command for build +atcfg_make_check() { + PATH=${at_dest}/bin:${PATH} \ + ${SUB_MAKE} check +} + + +# Install command for build +atcfg_install() { + ${SUB_MAKE} install DESTDIR=${install_place} +} diff --git a/configs/8.0/packages/binutils/stage_3 b/configs/8.0/packages/binutils/stage_3 new file mode 100644 index 000000000..2ce01c5d2 --- /dev/null +++ b/configs/8.0/packages/binutils/stage_3 @@ -0,0 +1,68 @@ +#!/usr/bin/env bash +# +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# binutils build parameters for 32 bits +# ===================================== +# + +ATCFG_HOLD_TEMP_INSTALL='no' +ATCFG_HOLD_TEMP_BUILD='no' +# Build in a new directory +ATCFG_BUILD_STAGE_T='dir' + + +# Configure command for native builds +atcfg_configure() { + PATH=${at_dest}/bin:${PATH} \ + CC="${at_dest}/bin/gcc" \ + CXX="${at_dest}/bin/g++" \ + CFLAGS="-m32 -g -O2" \ + CXXFLAGS="-m32 -g -O2" \ + ${ATSRC_PACKAGE_WORK}/configure \ + --build=${target32} \ + --host=${target32} \ + --target=${target32} \ + --with-sysroot=/ \ + --prefix="${at_dest}" \ + --libdir="${at_dest}/lib" \ + --disable-nls \ + --disable-gdb \ + --disable-readline \ + --disable-libdecnumber \ + --disable-sim \ + --enable-shared \ + --enable-plugins \ + --enable-install-libiberty=./ +} + + +# Make command for build +atcfg_make() { + PATH=${at_dest}/bin:${PATH} \ + ${SUB_MAKE} all-libiberty all-bfd +} + +# atcfg_make_check() is done at stage_2 + +# Install command for build +atcfg_install() { + PATH=${at_dest}/bin:${PATH} \ + ${SUB_MAKE} install-libiberty install-bfd DESTDIR=${install_place} +} + +# SPECIAL SETTINGS +# ========================================================= diff --git a/configs/8.0/packages/boost/boost.mk b/configs/8.0/packages/boost/boost.mk new file mode 120000 index 000000000..a6ef2f26f --- /dev/null +++ b/configs/8.0/packages/boost/boost.mk @@ -0,0 +1 @@ +../../../7.1/packages/boost/boost.mk \ No newline at end of file diff --git a/configs/8.0/packages/boost/sources b/configs/8.0/packages/boost/sources new file mode 120000 index 000000000..69790ba2e --- /dev/null +++ b/configs/8.0/packages/boost/sources @@ -0,0 +1 @@ +../../../7.1/packages/boost/sources \ No newline at end of file diff --git a/configs/8.0/packages/boost/specfile b/configs/8.0/packages/boost/specfile new file mode 120000 index 000000000..42dac63f5 --- /dev/null +++ b/configs/8.0/packages/boost/specfile @@ -0,0 +1 @@ +../../../7.1/packages/boost/specfile \ No newline at end of file diff --git a/configs/8.0/packages/boost/stage_1 b/configs/8.0/packages/boost/stage_1 new file mode 120000 index 000000000..a807ad381 --- /dev/null +++ b/configs/8.0/packages/boost/stage_1 @@ -0,0 +1 @@ +../../../7.1/packages/boost/stage_1 \ No newline at end of file diff --git a/configs/8.0/packages/expat/expat.mk b/configs/8.0/packages/expat/expat.mk new file mode 120000 index 000000000..9435c87dc --- /dev/null +++ b/configs/8.0/packages/expat/expat.mk @@ -0,0 +1 @@ +../../../7.1/packages/expat/expat.mk \ No newline at end of file diff --git a/configs/8.0/packages/expat/sources b/configs/8.0/packages/expat/sources new file mode 120000 index 000000000..b2da5781a --- /dev/null +++ b/configs/8.0/packages/expat/sources @@ -0,0 +1 @@ +../../../7.1/packages/expat/sources \ No newline at end of file diff --git a/configs/8.0/packages/expat/specfile b/configs/8.0/packages/expat/specfile new file mode 120000 index 000000000..8bbb6ae55 --- /dev/null +++ b/configs/8.0/packages/expat/specfile @@ -0,0 +1 @@ +../../../7.1/packages/expat/specfile \ No newline at end of file diff --git a/configs/8.0/packages/expat/stage_1 b/configs/8.0/packages/expat/stage_1 new file mode 100644 index 000000000..4068ea792 --- /dev/null +++ b/configs/8.0/packages/expat/stage_1 @@ -0,0 +1,79 @@ +#!/usr/bin/env bash +# +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# Expat build parameters for stage 1 +# ========================================= +# + +ATCFG_HOLD_TEMP_INSTALL='no' +ATCFG_HOLD_TEMP_BUILD='no' +# Build in a new directory. +ATCFG_BUILD_STAGE_T='dir' +# Don't fail if stage final install place doesn't exist +if [[ "${cross_build}" == "yes" ]]; then + ATCFG_INSTALL_PEDANTIC="no" +fi + +atcfg_configure() { + # Expat is built for the same architecture GDB is built to. + # Which means that in a cross compiler build it's build for the host + # architecture (i.e. i686) instead of the target arch (i.e. ppc64). + + if [[ "${cross_build}" == "no" ]]; then + # Default values for native builds. + cc_path="${at_dest}/bin/gcc -m${compiler}" + libdir="${at_dest}/lib${compiler##32}" + prefix=${at_dest} + else + # Cross compiler settings. + cc_path=${system_cc} + libdir="${tmp_dir}/lib" + prefix=${tmp_dir} + fi + + PATH=${at_dest}/bin:${PATH} \ + CC="${cc_path}" \ + CFLAGS="-g -O3" CXXFLAGS="-g -O3" \ + ${ATSRC_PACKAGE_WORK}/configure \ + --build=${host} \ + --host=${host} \ + --prefix=${prefix} \ + --exec-prefix=${prefix} \ + --libdir="${libdir}" \ + --bindir="${prefix}/bin" \ + --mandir="${prefix}/share/man" \ + --disable-shared +} + + +atcfg_make() { + PATH=${at_dest}/bin:${PATH} ${SUB_MAKE} +} + + +atcfg_install() { + if [[ "${cross_build}" == "no" ]]; then + PATH=${at_dest}/bin:${PATH} \ + ${SUB_MAKE} install DESTDIR=${install_place} + else + # In order to install the package at $prefix, we need to force + # DESTDIR value. Because if AT was built using DESTDIR, the + # value will be stored in MFLAGS. + PATH=${at_dest}/bin:${PATH} \ + ${SUB_MAKE} install DESTDIR="" + fi +} diff --git a/configs/8.0/packages/gcc/gcc.mk b/configs/8.0/packages/gcc/gcc.mk new file mode 120000 index 000000000..8dd472724 --- /dev/null +++ b/configs/8.0/packages/gcc/gcc.mk @@ -0,0 +1 @@ +../../../7.1/packages/gcc/gcc.mk \ No newline at end of file diff --git a/configs/8.0/packages/gcc/sources b/configs/8.0/packages/gcc/sources new file mode 100644 index 000000000..7cc14f609 --- /dev/null +++ b/configs/8.0/packages/gcc/sources @@ -0,0 +1,60 @@ +#!/usr/bin/env bash +# +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# GCC source package and build info +# ================================= +# + +ATSRC_PACKAGE_NAME="GCC (GNU Compiler Collection)" +ATSRC_PACKAGE_SUBPACKAGE_NAME_0="GNU Standard C++ Library v3 (Libstdc++-v3)" +ATSRC_PACKAGE_SUBPACKAGE_NAME_1="GNU Libgomp" +ATSRC_PACKAGE_VER=4.9.4 +ATSRC_PACKAGE_REV=235655 +ATSRC_PACKAGE_LICENSE="GPL 3.0" +ATSRC_PACKAGE_DOCLINK="http://gcc.gnu.org/onlinedocs/gcc-4.9.2/gcc/" +ATSRC_PACKAGE_SUBPACKAGE_DOCLINK_0="https://gcc.gnu.org/libstdc++/" +ATSRC_PACKAGE_SUBPACKAGE_DOCLINK_1="https://gcc.gnu.org/onlinedocs/libgomp/" +ATSRC_PACKAGE_RELFIXES= +ATSRC_PACKAGE_NAMESUFFIX="[C, C++ (g++), fortran, Go]" +ATSRC_PACKAGE_STR_VER="${ATSRC_PACKAGE_NAME} ${ATSRC_PACKAGE_VER}-ibm-r${ATSRC_PACKAGE_REV}" +ATSRC_PACKAGE_PRE="test -d gcc-${ATSRC_PACKAGE_VER}-${ATSRC_PACKAGE_REV}" +ATSRC_PACKAGE_CO=([0]="svn co --revision ${ATSRC_PACKAGE_REV} svn://gcc.gnu.org/svn/gcc/branches/ibm/gcc-4_9-branch") +ATSRC_PACKAGE_POST="mv gcc-4_9-branch gcc-${ATSRC_PACKAGE_VER}-${ATSRC_PACKAGE_REV}" +ATSRC_PACKAGE_SRC=${AT_BASE}/sources/gcc-${ATSRC_PACKAGE_VER}-${ATSRC_PACKAGE_REV} +ATSRC_PACKAGE_WORK=${AT_WORK_PATH}/gcc +ATSRC_PACKAGE_MLS= +ATSRC_PACKAGE_ALOC= +ATSRC_PACKAGE_PATCHES= +ATSRC_PACKAGE_TARS= +ATSRC_PACKAGE_MAKE_CHECK= +ATSRC_PACKAGE_DISTRIB=yes +ATSRC_PACKAGE_BUNDLE=toolchain + +atsrc_get_patches () +{ + # Patch to add link-time optimization to some GCC libraries. + at_get_patch \ + https://github.com/powertechpreview/powertechpreview/raw/master/GCC%20PowerPC%20Backport/4.9/gcc-4.9-lto.1.tgz \ + be5af009fae49c80b2624eafa497c508 || return ${?} +} + +atsrc_apply_patches () +{ + tar xzf gcc-4.9-lto.1.tgz || return ${?} + + return 0 +} diff --git a/configs/8.0/packages/gcc/specfile b/configs/8.0/packages/gcc/specfile new file mode 120000 index 000000000..9e30695d8 --- /dev/null +++ b/configs/8.0/packages/gcc/specfile @@ -0,0 +1 @@ +../../../7.1/packages/gcc/specfile \ No newline at end of file diff --git a/configs/8.0/packages/gcc/stage_1 b/configs/8.0/packages/gcc/stage_1 new file mode 100644 index 000000000..d6f246d0d --- /dev/null +++ b/configs/8.0/packages/gcc/stage_1 @@ -0,0 +1,196 @@ +#!/usr/bin/env bash +# +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# GCC build parameters for stage 1 +# ================================ +# + +ATCFG_HOLD_TEMP_INSTALL='no' +ATCFG_HOLD_TEMP_BUILD='no' +# Build in a new directory +ATCFG_BUILD_STAGE_T='dir' + +# Required pre build hacks +atcfg_pre_hacks() { + # Overwrite the existing DEV-PHASE with Advance-Toolchain-XX + mv ${ATSRC_PACKAGE_WORK}/gcc/DEV-PHASE ${ATSRC_PACKAGE_WORK}/gcc/DEV-PHASE.back + echo "Advance-Toolchain-${at_major_internal}" > ${ATSRC_PACKAGE_WORK}/gcc/DEV-PHASE + # Overwrite the existing REVISION with the current SVN revision date + mv ${ATSRC_PACKAGE_WORK}/gcc/REVISION ${ATSRC_PACKAGE_WORK}/gcc/REVISION.back + sed "s/branch merged/branch, revision: ${ATSRC_PACKAGE_REV} merged/" ${ATSRC_PACKAGE_WORK}/gcc/REVISION.back \ + > ${ATSRC_PACKAGE_WORK}/gcc/REVISION + mv ${ATSRC_PACKAGE_WORK}/gcc/DATESTAMP ${ATSRC_PACKAGE_WORK}/gcc/DATESTAMP.back + echo "$(head -n 1 ${ATSRC_PACKAGE_WORK}/gcc/ChangeLog.ibm | cut -f 1 -d " " | sed "s/-//g")" \ + > ${ATSRC_PACKAGE_WORK}/gcc/DATESTAMP +} + +# Pre configure settings or commands to run +atcfg_pre_configure() { + cc_64=${system_cc} + cxx_64=${system_cxx} + libdir="${at_dest}/lib" + if [[ "${cross_build}" == "no" ]]; then + if [[ "${build_arch}" == ppc64* ]]; then + if [[ "${default_compiler}" == "32" ]]; then + cc_64="${gcc64}" + cxx_64="${gpp64}" + fi + libdir="${at_dest}/lib64" + fi + fi +} + +# Conditional configure command +atcfg_configure() { + if [[ "${cross_build}" == "no" ]]; then + if [[ "${distro_fm}" == "ubuntu" ]]; then + # Ubuntu requires a different path for include and libs + # due to its solution for multiarch support. + multiarch=yes + fi + + # Configure command for native builds + CC="${cc_64}" \ + CXX="${cxx_64}" \ + AS="${at_dest}/bin/as" \ + LD="${at_dest}/bin/ld" \ + ${ATSRC_PACKAGE_WORK}/configure \ + --build=${host} \ + --host=${host} \ + --target=${target} \ + --with-cpu=${default_cpu} \ + --prefix="${at_dest}" \ + ${secure_plt:+--enable-secureplt} \ + ${disable_multilib:+--disable-multilib} \ + --disable-threads \ + --disable-shared \ + --disable-libmudflap \ + --disable-libssp \ + --disable-bootstrap \ + --disable-libgomp \ + --disable-lto \ + --with-mpfr-include="${at_dest}/include" \ + --with-mpfr-lib="${libdir}" \ + --with-gmp-include="${at_dest}/include" \ + --with-gmp-lib="${libdir}" \ + --with-mpc-include="${at_dest}/include" \ + --with-mpc-lib="${libdir}" \ + --enable-languages=c,c++ \ + --with-as="${at_dest}/bin/as" \ + --with-ld="${at_dest}/bin/ld" \ + ${multiarch:+--enable-multiarch} + else + # Configure command for cross builds + CC="${cc_64}" \ + CXX="${cxx_64}" \ + LD_FOR_TARGET="${at_dest}/bin/${target}-ld" \ + AS_FOR_TARGET="${at_dest}/bin/${target}-as" \ + AR_FOR_TARGET="${at_dest}/bin/${target}-ar" \ + RANLIB_FOR_TARGET="${at_dest}/bin/${target}-ranlib" \ + ${ATSRC_PACKAGE_WORK}/configure \ + --build=${host} \ + --host=${host} \ + --target=${target64:-${target}} \ + --with-cpu=${default_cpu} \ + --prefix="${at_dest}" \ + ${secure_plt:+--enable-secureplt} \ + ${disable_multilib:+--disable-multilib} \ + --disable-threads \ + --disable-shared \ + --disable-libmudflap \ + --disable-libssp \ + --disable-bootstrap \ + --disable-libgomp \ + --disable-libatomic \ + --disable-decimal-float \ + --disable-libquadmath \ + --with-mpfr-include="${tmp_dir}/include" \ + --with-mpfr-lib="${tmp_dir}/lib" \ + --with-gmp-include="${tmp_dir}/include" \ + --with-gmp-lib="${tmp_dir}/lib" \ + --with-mpc-include="${tmp_dir}/include" \ + --with-mpc-lib="${tmp_dir}/lib" \ + --enable-languages=c \ + --with-as="${at_dest}/bin/${target}-as" \ + --with-ld="${at_dest}/bin/${target}-ld" \ + --with-newlib \ + --without-headers + fi +} + +# Make build command +atcfg_make() { + # gcc_cv_libc_provides_ssp=yes - GCC needs glibc headers in order to + # detect if the standard C library supports stack protection. + # However, the glibc headers aren't available at this stage. + ${SUB_MAKE} all \ + gcc_cv_libc_provides_ssp=yes +} + +# Pre install settings or commands to run +atcfg_pre_install() { + # The gcc install recipe must be able to find the following folders + # so that it can perform its tasks properly, as installing target + # host binaries on cross builds. The binutils package will create + # this folders on its install. As our installs are atomic, we need + # to provide them before hand, so GCC finds it and its install + # recipe can perform properly. + [[ -d "${install_place}/${at_dest}/${target}/bin" ]] || \ + mkdir -p "${install_place}/${at_dest}/${target}/bin" + [[ -d "${install_place}/${at_dest}/${target}/lib" ]] || \ + mkdir -p "${install_place}/${at_dest}/${target}/lib" +} + +# Install build command +atcfg_install() { + make install -j1 DESTDIR=${install_place} +} + +# Post install settings or commands to run +atcfg_post_install() { + # Create the required symlinks to install + if [[ "${cross_build}" == "no" ]]; then + pushd ${install_place}/${at_dest}/bin + if [[ ! -e ${target}-gcc ]]; then + echo -e "#!/bin/bash\nexec ${at_dest}/bin/gcc \"${@}\"" > ${target}-gcc + chmod a+x ${target}-gcc + fi + if [[ ! -e ${target}-g++ ]]; then + echo -e "#!/bin/bash\nexec ${at_dest}/bin/g++ \"${@}\"" > ${target}-g++ + chmod a+x ${target}-g++ + fi + if [[ ! -e ${target}-c++ ]]; then + ln -f ${target}-g++ ${target}-c++ + fi + popd + + # This hack isn't necessary on ppc64le. + if [[ "${build_arch}" == "ppc64" ]]; then + # The following files will be installed by GLIBC, so no + # need to have them properly mapped into the filelist + # (not installed into ${install_place} for mapping) + if [[ ! -e "${at_dest}/lib/ld.so.1" ]]; then + ln -s /lib/ld.so.1 "${at_dest}/lib/ld.so.1" + fi + if [[ ! -e "${at_dest}/lib/libc.so.6" ]]; then + ln -s /lib/libc.so.6 "${at_dest}/lib/libc.so.6" + fi + fi + # Remove unnecessary python scripts + find "${install_place}/${at_dest}" -name "libstdc++.so.*-gdb.py" -print -delete + fi +} diff --git a/configs/8.0/packages/gcc/stage_2 b/configs/8.0/packages/gcc/stage_2 new file mode 100644 index 000000000..24f6902d1 --- /dev/null +++ b/configs/8.0/packages/gcc/stage_2 @@ -0,0 +1,188 @@ +#!/usr/bin/env bash +# +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# GCC build parameters for stage 2 +# ================================ +# + +ATCFG_HOLD_TEMP_INSTALL='no' +ATCFG_HOLD_TEMP_BUILD='no' +# Build in a new directory +ATCFG_BUILD_STAGE_T='dir' + + +# Required post install hacks (this one is run after the final install move) +atcfg_posti_hacks() { + # Hack the static library to satisfy GLIBC build + for LIB in $(find "${at_dest}/lib" -name libgcc.a); do + [[ -e ${LIB%\.a}_eh.a ]] || ln -s libgcc.a ${LIB%\.a}_eh.a + [[ -e ${LIB%\.a}_s.a ]] || ln -s libgcc.a ${LIB%\.a}_s.a + done +} + +# Pre configure settings or commands to run +atcfg_pre_configure() { + cc_64="${system_cc}" + cxx_64="${system_cxx}" + libdir="${at_dest}/lib" + if [[ "${cross_build}" == "no" ]]; then + if [[ "${build_arch}" == ppc64* ]]; then + if [[ "${default_compiler}" == "32" ]]; then + cc_64="${gcc64}" + cxx_64="${gpp64}" + fi + libdir="${at_dest}/lib64" + fi + fi +} + +# Conditional configure command +atcfg_configure() { + if [[ "${cross_build}" == "no" ]]; then + # Configure command for native builds + CC="${cc_64}" \ + CXX="${cxx_64}" \ + CFLAGS="-O2" \ + CXXFLAGS="-O2" \ + AS="${at_dest}/bin/as" \ + LD="${at_dest}/bin/ld" \ + ${ATSRC_PACKAGE_WORK}/configure \ + --build=${target64:-${target}} \ + --host=${target64:-${target}} \ + --target=${target64:-${target}} \ + --with-cpu=${default_cpu} \ + --prefix=${at_dest} \ + ${with_longdouble:+--with-long-double-128} \ + ${with_dfp_standalone:+--enable-decimal-float} \ + ${secure_plt:+--enable-secureplt} \ + ${disable_multilib:+--disable-multilib} \ + --enable-threads=posix \ + --enable-languages=c,c++ \ + --enable-__cxa_atexit \ + --disable-shared \ + --disable-checking \ + --disable-libmudflap \ + --disable-libssp \ + --disable-lto \ + --disable-libgomp \ + --without-ppl \ + --without-cloog \ + --with-gmp-include="${at_dest}/include" \ + --with-gmp-lib=${libdir} \ + --with-mpfr-include="${at_dest}/include" \ + --with-mpfr-lib=${libdir} \ + --with-mpc-include="${at_dest}/include" \ + --with-mpc-lib=${libdir} \ + --with-as="${at_dest}/bin/as" \ + --with-ld="${at_dest}/bin/ld" + else + # Configure command for cross builds + CC="${cc_64}" \ + CXX="${cxx_64}" \ + LD_FOR_TARGET="${at_dest}/bin/${target}-ld" \ + AS_FOR_TARGET="${at_dest}/bin/${target}-as" \ + AR_FOR_TARGET="${at_dest}/bin/${target}-ar" \ + NM_FOR_TARGET="${at_dest}/bin/${target}-nm" \ + RANLIB_FOR_TARGET="${at_dest}/bin/${target}-ranlib" \ + ${ATSRC_PACKAGE_WORK}/configure \ + --build=${host} \ + --host=${host} \ + --target=${target64:-${target}} \ + --with-cpu=${default_cpu} \ + --prefix=${at_dest} \ + ${with_longdouble:+--with-long-double-128} \ + ${secure_plt:+--enable-secureplt} \ + ${disable_multilib:+--disable-multilib} \ + --enable-languages=c \ + --enable-__cxa_atexit \ + --enable-threads=posix \ + --disable-libmudflap \ + --disable-libssp \ + --disable-libgomp \ + --disable-libatomic \ + --disable-libquadmath \ + --disable-lto \ + --disable-decimal-float \ + --with-mpfr-include="${tmp_dir}/include" \ + --with-mpfr-lib="${tmp_dir}/lib" \ + --with-gmp-include="${tmp_dir}/include" \ + --with-gmp-lib="${tmp_dir}/lib" \ + --with-mpc-include="${tmp_dir}/include" \ + --with-mpc-lib="${tmp_dir}/lib" \ + --without-ppl \ + --without-cloog \ + --with-host-libstdcxx="-L${libdir} -L${tmp_dir}/lib -lstdc++ -lsupc++ -lm -lgmp -lgmpxx -lmpfr -lmpc" \ + --with-build-sysroot="${dest_cross}" \ + --with-sysroot="${dest_cross}" \ + --with-headers="${dest_cross}/usr/include" + fi +} + +# Make build command +atcfg_make() { + # With -isystem we make sure that system's gcc (stage1) will recognize AT + # headers as system headers and give them special treatment. + ${SUB_MAKE} STAGE1_CFLAGS="-isystem ${at_dest}/include" STAGE1_CXXFLAGS="-isystem ${at_dest}/include" all +} + +# Pre install settings or commands to run +atcfg_pre_install() { + # The gcc install recipe must be able to find the following folders + # so that it can perform its tasks properly, as installing target + # host binaries on cross builds. The binutils package will create + # this folders on its install. As our installs are atomic, we need + # to provide them before hand, so GCC finds it and its install + # recipe can perform properly. + [[ -d "${install_place}/${at_dest}/${target}/bin" ]] || \ + mkdir -p "${install_place}/${at_dest}/${target}/bin" + [[ -d "${install_place}/${at_dest}/${target}/lib" ]] || \ + mkdir -p "${install_place}/${at_dest}/${target}/lib" +} + +# Install build command +atcfg_install() { + make install -j1 DESTDIR=${install_place} +} + +# Post install settings or commands to run +atcfg_post_install() { + # Fixes to cross build install + if [[ "${cross_build}" == "yes" ]]; then + # This copy is required because gcc has a problem in the cross build, + # the sys-include folder is created directly into destination prefix, + # but this brokes the isolated install build that we use, and these files + # are missed in the final file list generated for the RPM build + cp -a ${at_dest}/${target}/sys-include \ + ${install_place}/${at_dest}/${target} + # Create the required symlinks to install + pushd ${install_place}/${at_dest}/bin + if [[ ! -e ${target}-gcc ]]; then + echo -e "#!/bin/bash\nexec ${at_dest}/bin/gcc \"${@}\"" > ${target}-gcc + chmod a+x ${target}-gcc + fi + if [[ ! -e ${target}-g++ ]]; then + echo -e "#!/bin/bash\nexec ${at_dest}/bin/g++ \"${@}\"" > ${target}-g++ + chmod a+x ${target}-g++ + fi + if [[ ! -e ${target}-c++ ]]; then + ln -f ${target}-g++ ${target}-c++ + fi + popd + fi + # Remove unnecessary python scripts + find "${install_place}/${at_dest}" -name "libstdc++.so.*-gdb.py" -print -delete +} diff --git a/configs/8.0/packages/gcc/stage_3 b/configs/8.0/packages/gcc/stage_3 new file mode 120000 index 000000000..0fed800c3 --- /dev/null +++ b/configs/8.0/packages/gcc/stage_3 @@ -0,0 +1 @@ +../../../7.1/packages/gcc/stage_3 \ No newline at end of file diff --git a/configs/8.0/packages/gcc/stage_4 b/configs/8.0/packages/gcc/stage_4 new file mode 100644 index 000000000..ccefb1fd0 --- /dev/null +++ b/configs/8.0/packages/gcc/stage_4 @@ -0,0 +1,232 @@ +#!/usr/bin/env bash +# +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# GCC build parameters for stage 4 +# ================================ +# + +ATCFG_HOLD_TEMP_INSTALL='no' +ATCFG_HOLD_TEMP_BUILD='no' +# Build in a new directory +ATCFG_BUILD_STAGE_T='dir' + + +# ATCFG_CONFIGURE SETTINGS +# ========================================================= +# Conditional configure command +atcfg_configure() { + if [[ "${cross_build}" == "no" ]]; then + # Configure command for native builds + PATH=${at_dest}/bin:${PATH} \ + CC="${at_dest}/bin/gcc" \ + CFLAGS="-O2" \ + CXXFLAGS="-O2" \ + CFLAGS_FOR_TARGET="-O3" \ + CXXFLAGS_FOR_TARGET="-O3" \ + AS="${at_dest}/bin/as" \ + LD="${at_dest}/bin/ld" \ + LDFLAGS="-L${at_dest}/lib64" \ + ${ATSRC_PACKAGE_WORK}/configure \ + --build=${target64:-$target} \ + --host=${target64:-$target} \ + --target=${target64:-$target} \ + --with-cpu=${default_cpu} \ + --prefix="${at_dest}" \ + ${with_longdouble:+--with-long-double-128} \ + ${with_dfp_standalone:+--enable-decimal-float} \ + ${secure_plt:+--enable-secureplt} \ + ${disable_multilib:+--disable-multilib} \ + --enable-threads=posix \ + --enable-languages=${build_gcc_languages} \ + --enable-__cxa_atexit \ + --enable-shared \ + --enable-checking=release \ + --enable-lto \ + --enable-gnu-indirect-function \ + --enable-initfini-array \ + --enable-linker-build-id \ + --with-gmp-include="${at_dest}/include" \ + --with-gmp-lib="${at_dest}/lib64" \ + --with-mpfr-include="${at_dest}/include" \ + --with-mpfr-lib="${at_dest}/lib64" \ + --with-mpc-include="${at_dest}/include" \ + --with-mpc-lib="${at_dest}/lib64" \ + --without-ppl \ + --without-cloog \ + --without-libelf \ + --with-host-libstdcxx="-L${at_dest}/lib64 -lstdc++ -lsupc++ -lgmp -lgmpxx -lm" \ + --with-cpu=${build_base_arch} \ + --with-tune=${build_optimization} + else + # Configure command for cross builds + CC="${system_cc}" \ + CXX="${system_cxx}" \ + LD_FOR_TARGET="${at_dest}/bin/${target}-ld" \ + AS_FOR_TARGET="${at_dest}/bin/${target}-as" \ + AR_FOR_TARGET="${at_dest}/bin/${target}-ar" \ + RANLIB_FOR_TARGET="${at_dest}/bin/${target}-ranlib" \ + NM_FOR_TARGET="${at_dest}/bin/${target}-nm" \ + ${ATSRC_PACKAGE_WORK}/configure \ + --build=${host} \ + --host=${host} \ + --target=${target64:-${target}} \ + --prefix="${at_dest}" \ + --enable-shared \ + ${with_longdouble:+--with-long-double-128} \ + ${with_dfp:+--enable-decimal-float} \ + ${secure_plt:+--enable-secureplt} \ + ${disable_multilib:+--disable-multilib} \ + --enable-threads=posix \ + --enable-languages=${build_gcc_languages} \ + --enable-__cxa_atexit \ + --enable-lto \ + --enable-gnu-indirect-function \ + --enable-cross \ + --enable-initfini-array \ + --enable-linker-build-id \ + --disable-bootstrap \ + --with-as="${at_dest}/bin/${target}-as" \ + --with-ld="${at_dest}/bin/${target}-ld" \ + --with-mpfr-include="${tmp_dir}/include" \ + --with-mpfr-lib="${tmp_dir}/lib" \ + --with-gmp-include="${tmp_dir}/include" \ + --with-gmp-lib="${tmp_dir}/lib" \ + --with-mpc-include="${tmp_dir}/include" \ + --with-mpc-lib="${tmp_dir}/lib" \ + --without-ppl \ + --without-cloog \ + --without-libelf \ + --with-sysroot="${dest_cross}" \ + --with-host-libstdcxx="-L${at_dest}/lib -L${tmp_dir}/lib -lstdc++ -lsupc++ -lgmp -lgmpxx -lm" \ + --with-cpu=${build_base_arch} \ + --with-tune=${build_optimization} + fi +} + + +atcfg_pre_make() { + if [[ "${cross_build}" == "no" ]]; then + local lto_patch=gcc-4.9-lto.1.patch + + pushd ${ATSRC_PACKAGE_WORK} + if [[ ! -r ${lto_patch} ]]; then + echo "No gcc libstdc++ patch found!" + exit 1 + fi + # Ignore when the patch is already applied + patch -sfR --dry-run -p1 -i ${lto_patch} > /dev/null \ + || patch -p1 < ${lto_patch} + if [[ ${?} -ne 0 ]]; then + echo "Error applying gcc libstdc++ patch!" + exit 1 + fi + popd + fi +} + +# Make build command +atcfg_make() { + if [[ "${cross_build}" == "no" ]]; then + # Make build command + # libgo_cv_lib_setcontext_clobbers=no must be set for + # 32 bit go builds to work correctly. Once + # RH BZ 1018072 is fixed then setting the variable is + # no longer needed and the build will work. + PATH=${at_dest}/bin:${PATH} libgo_cv_lib_setcontext_clobbers_tls=no \ + ${SUB_MAKE} STAGE1_CFLAGS="-g -O" profiledbootstrap + else + PATH=${at_dest}/bin:${PATH} libgo_cv_lib_setcontext_clobbers_tls=no \ + ${SUB_MAKE} STAGE1_CFLAGS="-g -O" + fi +} + + +# Pre install settings or commands to run +atcfg_pre_install() { + # The gcc install recipe must be able to find the following folders + # so that it can perform its tasks properly, as installing target + # host binaries on cross builds. The binutils package will create + # this folders on its install. As our installs are atomic, we need + # to provide them before hand, so GCC finds it and its install + # recipe can perform properly. + [[ -d "${install_place}/${at_dest}/${target}/bin" ]] || \ + mkdir -p "${install_place}/${at_dest}/${target}/bin" + [[ -d "${install_place}/${at_dest}/${target}/lib" ]] || \ + mkdir -p "${install_place}/${at_dest}/${target}/lib" +} + +# Install build command +atcfg_install() { + PATH=${at_dest}/bin:${PATH} \ + make install -j1 DESTDIR=${install_place} +} + +# Post install settings or commands to run +atcfg_post_install() { + if [[ "${cross_build}" == "yes" ]]; then + # Place some additional files for build process + mkdir -p ${install_place}/${dest_cross}/usr/lib + if [[ "${build_arch}" == ppc64* ]]; then + # We need to manually copy these + cp -d ${install_place}/${at_dest}/${target64}/lib/libgcc_s.so* ${install_place}/${dest_cross}/usr/lib/ + cp -d ${install_place}/${at_dest}/${target64}/lib/libstdc++.so* ${install_place}/${dest_cross}/usr/lib/ + else + cp -d ${install_place}/${at_dest}/${target}/lib/libgcc_s.so* ${install_place}/${dest_cross}/usr/lib/ + cp -d ${install_place}/${at_dest}/${target}/lib/libstdc++.so* ${install_place}/${dest_cross}/usr/lib/ + fi + # This was needed to fix the cross build which defaults to ${target64} + # targets but now, we are assuming that every build should have the + # triple shortcut installed, so we create gcc ${target32}-* symlinks + pushd ${install_place}/${at_dest}/bin + for CMD in c++ cpp g++ gcc gcov gfortran; do + if [[ -x ${target64}-${CMD} ]] && \ + [[ ! -f ${target32}-${CMD} ]]; then + ln -sfn ${target64}-${CMD} ${target32}-${CMD} + fi + done + popd + else + pushd ${install_place}/${at_dest}/bin + # This is necessary for some applications to work + if [[ ! -e "cc" ]]; then + ln -s "gcc" "cc" + fi + popd + # Remove unnecessary python scripts + find "${install_place}/${at_dest}" -name "libstdc++.so.*-gdb.py" -print -delete + set -e + # Hack around to avoid ld.so.cache getting the libs from the + # system as ldconfig puts platform based directories preceding + # other directories. + check_dirs= + if [[ -n "${target32}" ]]; then + check_dirs="${install_transfer}/lib" + fi + if [[ -n "${target64}" ]]; then + if [[ -n "${target32}" ]]; then + check_dirs="${install_transfer}/lib64 ${check_dirs}" + else + check_dirs="${install_transfer}/lib64" + fi + fi + for dir in ${check_dirs}; do + ${AT_BASE}/scripts/utilities/create_lib_symlinks.sh \ + "${dir}" "${dir}/${build_load_arch}" + done + set +e + fi +} diff --git a/configs/8.0/packages/gcc/stage_optimized b/configs/8.0/packages/gcc/stage_optimized new file mode 120000 index 000000000..a2c1cc64e --- /dev/null +++ b/configs/8.0/packages/gcc/stage_optimized @@ -0,0 +1 @@ +../../../7.1/packages/gcc/stage_optimized \ No newline at end of file diff --git a/configs/8.0/packages/gdb/gdb.mk b/configs/8.0/packages/gdb/gdb.mk new file mode 120000 index 000000000..540105d51 --- /dev/null +++ b/configs/8.0/packages/gdb/gdb.mk @@ -0,0 +1 @@ +../../../7.1/packages/gdb/gdb.mk \ No newline at end of file diff --git a/configs/8.0/packages/gdb/sources b/configs/8.0/packages/gdb/sources new file mode 100644 index 000000000..c4c465016 --- /dev/null +++ b/configs/8.0/packages/gdb/sources @@ -0,0 +1,68 @@ +#!/usr/bin/env bash +# +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# GDB source package and build info +# ================================= +# +ATSRC_PACKAGE_NAME="GDB (GNU Debugger)" +ATSRC_PACKAGE_VER=7.8.1 +ATSRC_PACKAGE_REV=77718493 +ATSRC_PACKAGE_LICENSE="GPL 2.0" +ATSRC_PACKAGE_DOCLINK="http://sourceware.org/gdb/current/onlinedocs/gdb/" +ATSRC_PACKAGE_RELFIXES= +ATSRC_PACKAGE_STR_VER="${ATSRC_PACKAGE_NAME} ${ATSRC_PACKAGE_VER}${ATSRC_PACKAGE_REV:+-${ATSRC_PACKAGE_REV}}" +ATSRC_PACKAGE_PRE="test -d gdb-${ATSRC_PACKAGE_VER}${ATSRC_PACKAGE_REV:+-${ATSRC_PACKAGE_REV}}" +# git.linux.ibm.com is a mirror of sourceware.org. +ATSRC_PACKAGE_CO=([0]="git clone git://git.linux.ibm.com/binutils-gdb/binutils-gdb.git gdb" \ + [1]="git clone git://sourceware.org/git/binutils-gdb.git gdb") +ATSRC_PACKAGE_GIT="git checkout -b gdb-${ATSRC_PACKAGE_VER}${ATSRC_PACKAGE_REV:+-${ATSRC_PACKAGE_REV}} ${ATSRC_PACKAGE_REV}" +ATSRC_PACKAGE_POST="mv gdb gdb-${ATSRC_PACKAGE_VER}${ATSRC_PACKAGE_REV:+-${ATSRC_PACKAGE_REV}}" +ATSRC_PACKAGE_SRC="${AT_BASE}/sources/gdb-${ATSRC_PACKAGE_VER}${ATSRC_PACKAGE_REV:+-${ATSRC_PACKAGE_REV}}" +ATSRC_PACKAGE_WORK=${AT_WORK_PATH}/gdb +ATSRC_PACKAGE_MLS= +ATSRC_PACKAGE_ALOC= +ATSRC_PACKAGE_TARS= +ATSRC_PACKAGE_PATCHES= +ATSRC_PACKAGE_MAKE_CHECK="" +ATSRC_PACKAGE_DISTRIB=yes +ATSRC_PACKAGE_BUNDLE=devel + +atsrc_get_patches () +{ + at_get_patch \ + https://github.com/powertechpreview/powertechpreview/raw/master/GDB%20Patches/gdb-ignore-linux-vdso.tgz \ + 10bdbcac7947ac59b7f55cb7b8562ac5 || return ${?} + + at_get_patch_and_trim \ + 'https://sourceware.org/cgi-bin/get-raw-msg?listname=gdb-patches&date=2014-09&msgid=1410525085-29172-1-git-send-email-emachado%40linux.vnet.ibm.com' \ + gdb-pr17379.patch 104 \ + 0c7d73f06933449acb651e3fc4e43c38 || return ${?} + + at_get_patch_and_trim \ + 'https://sourceware.org/cgi-bin/get-raw-msg?listname=gdb-patches&date=2014-09&msgid=1409947102-32166-1-git-send-email-emachado%40linux.vnet.ibm.com' \ + gdb-ptrace.patch 62 \ + 9cca648d83424f9551ed142a2cfb8632 || return ${?} +} + +atsrc_apply_patches () +{ + tar xzf gdb-ignore-linux-vdso.tgz || return ${?} + + patch -p1 < ignore-linux-vdso.patch || return ${?} + patch -p1 < gdb-pr17379.patch || return ${?} + patch -p1 < gdb-ptrace.patch || return ${?} +} diff --git a/configs/8.0/packages/gdb/specfile b/configs/8.0/packages/gdb/specfile new file mode 120000 index 000000000..f3ef61b12 --- /dev/null +++ b/configs/8.0/packages/gdb/specfile @@ -0,0 +1 @@ +../../../7.1/packages/gdb/specfile \ No newline at end of file diff --git a/configs/8.0/packages/gdb/stage_1 b/configs/8.0/packages/gdb/stage_1 new file mode 100644 index 000000000..3a6ba6069 --- /dev/null +++ b/configs/8.0/packages/gdb/stage_1 @@ -0,0 +1,82 @@ +#!/usr/bin/env bash +# +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# GDB build parameters for stage 1 +# ================================ +# + +source ${AT_BASE}/scripts/utilities/bitsize_selection.sh + +# Tell the build system to hold the temp install folder +ATCFG_HOLD_TEMP_INSTALL='no' +# Tell the build system to hold the temp build folder +ATCFG_HOLD_TEMP_BUILD='no' +# Build in a new directory +ATCFG_BUILD_STAGE_T='dir' + + +atcfg_configure() { + local base_libdir="lib64" + local enable_bfd="--enable-64-bit-bfd" + local bit_size=64 + + if [[ "${cross_build}" == "yes" ]]; then + CC="${system_cc}" \ + CFLAGS="-g -m${env_build_arch}" \ + ${ATSRC_PACKAGE_WORK}/configure --build=${host} \ + --host=${host} \ + --target=${target64:-$target} \ + --prefix="${at_dest}" \ + --libdir="${at_dest}/lib${compiler##32}" \ + ${disable_multilib: +--disable_multilb} \ + --with-separate-debug-dir="/usr/lib64/debug" \ + --enable-werror=no \ + --with-libexpat-prefix=${tmp_dir} + else + if [[ "${build_arch}" == "ppc" ]]; then + base_libdir="lib" + enable_bfd= + fi + PATH=${at_dest}/bin:${PATH} \ + CC="${at_dest}/bin/gcc" \ + CFLAGS="-g -m${bit_size}" \ + PYTHONHOME="${at_dest}" \ + ${ATSRC_PACKAGE_WORK}/configure \ + --host=${target} \ + --target=${target} \ + --build=${target} \ + --prefix="${at_dest}" \ + --libdir="${at_dest}/${base_libdir}" \ + ${enable_bfd} \ + --disable-sim \ + --with-python="${at_dest}/bin/python3" \ + --with-separate-debug-dir="/usr/${base_libdir}/debug" \ + --enable-werror=no + fi +} + + +atcfg_make() { + PATH=${at_dest}/bin:${PATH} \ + ${SUB_MAKE} all-gdb +} + + +atcfg_install() { + PATH=${at_dest}/bin:${PATH} \ + ${SUB_MAKE} install-gdb DESTDIR=${install_place} +} diff --git a/configs/8.0/packages/glibc/glibc.mk b/configs/8.0/packages/glibc/glibc.mk new file mode 120000 index 000000000..4d9643392 --- /dev/null +++ b/configs/8.0/packages/glibc/glibc.mk @@ -0,0 +1 @@ +../../../7.1/packages/glibc/glibc.mk \ No newline at end of file diff --git a/configs/8.0/packages/glibc/sources b/configs/8.0/packages/glibc/sources new file mode 100644 index 000000000..a36e073eb --- /dev/null +++ b/configs/8.0/packages/glibc/sources @@ -0,0 +1,54 @@ +#!/usr/bin/env bash +# +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# GLIBC source package and build info +# =================================== +# + +ATSRC_PACKAGE_NAME="GNU C Library" +ATSRC_PACKAGE_VER=2.20 +ATSRC_PACKAGE_REV=2feb372c +ATSRC_PACKAGE_LICENSE="LGPL 2.1" +ATSRC_PACKAGE_DOCLINK="http://www.gnu.org/software/libc/manual/html_node/index.html" +ATSRC_PACKAGE_RELFIXES= +ATSRC_PACKAGE_STR_VER="${ATSRC_PACKAGE_NAME} ${ATSRC_PACKAGE_VER}-ibm" +ATSRC_PACKAGE_PRE="test -d glibc-${ATSRC_PACKAGE_VER}-${ATSRC_PACKAGE_REV}" +# git://git.linux.ibm.com/toolchain-mirrors/glibc.git is a mirror of the git://sourceware.org/git/glibc.git +ATSRC_PACKAGE_CO=([0]="git clone git://git.linux.ibm.com/toolchain-mirrors/glibc.git" \ + [1]="git clone git://sourceware.org/git/glibc.git") +ATSRC_PACKAGE_GIT="git checkout -b glibc-${ATSRC_PACKAGE_VER}${ATSRC_PACKAGE_REV:+-${ATSRC_PACKAGE_REV}} ${ATSRC_PACKAGE_REV}" +ATSRC_PACKAGE_POST="mv glibc glibc-${ATSRC_PACKAGE_VER}${ATSRC_PACKAGE_REV:+-${ATSRC_PACKAGE_REV}}" +ATSRC_PACKAGE_SRC=${AT_BASE}/sources/glibc-${ATSRC_PACKAGE_VER}${ATSRC_PACKAGE_REV:+-${ATSRC_PACKAGE_REV}} +ATSRC_PACKAGE_WORK=${AT_WORK_PATH}/glibc +ATSRC_PACKAGE_MLS= +ATSRC_PACKAGE_PATCHES= +ATSRC_PACKAGE_ALOC= +ATSRC_PACKAGE_TARS= +ATSRC_PACKAGE_MAKE_CHECK= +ATSRC_PACKAGE_PORTS= +ATSRC_PACKAGE_DISTRIB=yes +ATSRC_PACKAGE_BUNDLE=toolchain + +atsrc_get_patches () +{ + return 0 +} + +atsrc_apply_patches () +{ + return 0 +} diff --git a/configs/8.0/packages/glibc/specfile b/configs/8.0/packages/glibc/specfile new file mode 120000 index 000000000..5ecdb880e --- /dev/null +++ b/configs/8.0/packages/glibc/specfile @@ -0,0 +1 @@ +../../../7.1/packages/glibc/specfile \ No newline at end of file diff --git a/configs/8.0/packages/glibc/stage_1 b/configs/8.0/packages/glibc/stage_1 new file mode 100644 index 000000000..cfaf814f1 --- /dev/null +++ b/configs/8.0/packages/glibc/stage_1 @@ -0,0 +1,255 @@ +#!/usr/bin/env bash +# +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# GLIBC build parameters for stage 1 32/64 bits +# ============================================= +# + +# We can't use the newly built gcc to compile glibc because it will set the +# dynamic linker to be ${dest}/lib/ld.so.1, which isn't installed until the +# glibc build finishes. So trying to run anything compiled with the new gcc +# will fail, in particular, glibc configure tests. I suppose you might be +# able to supply glibc configure with lots of libc_cv_* variables to +# avoid this, but then you'd forever be changing this script to keep up with +# new glibc configure tests. +# Note that dynamically linked programs built here with the old host gcc are +# subtly broken too; The glibc build sets their dynamic linker to +# ${dest}/lib/ld.so.1 but doesn't provide rpath. Which means you'll get the +# new ld.so trying to use the system libc.so, which doesn't work. ld.so and +# libc.so share data structures so are tightly coupled. To run the new +# programs, you need to set LD_LIBRARY_PATH for them, or better (so as to not +# affect forked commands that might need the system libs), run ld.so.x +# explicitly, passing --library-path as is done for localedef below. +# This is one of the reasons why you need to build glibc twice. + +# Include some standard functions +source ${utilities}/bitsize_selection.sh + +ATCFG_HOLD_TEMP_INSTALL='no' +ATCFG_HOLD_TEMP_BUILD='no' +# Build in a new directory +ATCFG_BUILD_STAGE_T='dir' + +# Required post install hacks (this one is run after the final install move) +atcfg_posti_hacks() +{ + # Set location of base directory to replace depending on ${cross_build} + if [[ "${cross_build}" == "no" ]]; then + local basedir="${at_dest}" + local libdir=${basedir}/$(find_build_libdir ${AT_BIT_SIZE}) + else + local basedir="${dest_cross}" + # On cross compilers, libraries are installed under usr/lib*/, + # instead of lib*/. But the most important C libraries are + # still available at lib*/, e.i. ld.so. + local libdir=${basedir}/usr/$(find_build_libdir ${AT_BIT_SIZE}) + fi + + local bindir=${basedir}/$(find_build_bindir ${AT_BIT_SIZE}) + local lddir=${basedir}/$(find_build_libdir ${AT_BIT_SIZE}) + + set -e + # Set the name of the loader to use based on bit size + local ld_so=$(basename $(ls ${lddir}/ld${AT_BIT_SIZE%32}.so.[0-9])) + # Replace ${libdir}/libc.so with a version compatible with binutils + # built with the --with_sysroot option set to ${at_dest} + [[ -e ${libdir}/libc.so ]] \ + && mv -f ${libdir}/libc.so ${libdir}/libc.so.orig + cat > ${libdir}/libc.so < /dev/null + ${SUB_MAKE} -C "${ATSRC_PACKAGE_WORK}/localedata" \ + objdir="${build_stage_work}" \ + install_root="/" \ + subdir=localedata \ + install-locales + popd > /dev/null + fi +} + +atcfg_pre_configure() +{ + local base_libdir=$(find_build_libdir ${AT_BIT_SIZE}) + local base_bindir=$(find_build_bindir ${AT_BIT_SIZE}) + local base_sbindir=$(find_build_sbindir ${AT_BIT_SIZE}) + local base_libexecdir=$(find_build_libexecdir ${AT_BIT_SIZE}) + if [[ "${cross_build}" == "no" ]]; then + echo cross-compiling=yes > ./configparms + echo slibdir="${at_dest}/${base_libdir}" >> ./configparms + echo libdir="${at_dest}/${base_libdir}" >> ./configparms + echo bindir="${at_dest}/${base_bindir}" >> ./configparms + echo sbindir="${at_dest}/${base_sbindir}" >> ./configparms + echo libexecdir="${at_dest}/${base_libexecdir}" >> ./configparms + echo rootsbindir="${at_dest}/${base_sbindir}" >> ./configparms + else + echo cross-compiling=yes > ./configparms + fi +} + +atcfg_configure() +{ + local base_target=$(find_build_target ${AT_BIT_SIZE}) + if [[ "${cross_build}" == "no" ]]; then + AUTOCONF="${autoconf}" \ + CC="${at_dest}/bin/gcc -m${AT_BIT_SIZE}" \ + CFLAGS="-g -O2 ${secure_plt:+-msecure-plt}" \ + libc_cv_forced_unwind="yes" \ + libc_cv_c_cleanup="yes" \ + ${ATSRC_PACKAGE_WORK}/configure \ + --build=${host} \ + --host=${base_target} \ + --prefix="${at_dest}" \ + --with-headers="${at_dest}/include" \ + --with-tls \ + --enable-add-ons \ + --without-cvs \ + --without-gd \ + --with-cpu=${build_load_arch/ppc/} \ + --without-selinux \ + --enable-kernel="${kernel}" + else + # glibc can't detect correctly if the stack protector works on + # ppc64le. + if [[ "${base_target}" == powerpc*le-* ]]; then + disable_ssp=yes + fi + + AUTOCONF="${autoconf}" \ + CC="${at_dest}/bin/${target64:-${target}}-gcc -m${AT_BIT_SIZE}" \ + CFLAGS="-g -O2" \ + AR="${at_dest}/bin/${target}-ar" \ + AS="${at_dest}/bin/${target}-as" \ + RANLIB="${at_dest}/bin/${target}-ranlib" \ + libc_cv_forced_unwind="yes" \ + libc_cv_c_cleanup="yes" \ + ${ATSRC_PACKAGE_WORK}/configure \ + --build=${host} \ + --host=${base_target} \ + --prefix="/usr" \ + --with-headers="${dest_cross}/usr/include" \ + --with-tls \ + --enable-add-ons \ + --disable-profile \ + --without-gd \ + --with-cpu=${build_load_arch} \ + --without-cvs \ + --with-tls \ + --with-__thread \ + --without-gd \ + --without-selinux \ + --enable-kernel="${kernel}" \ + ${disable_ssp:+libc_cv_ssp="no"} + fi +} + +atcfg_make() +{ + ${SUB_MAKE} +} + +atcfg_install() +{ + if [[ "${cross_build}" == "no" ]]; then + ${SUB_MAKE} install install_root="${install_place}" + else + ${SUB_MAKE} install \ + install_root="${install_place}/${dest_cross}" + fi +} + +atcfg_post_install() +{ + local base_libdir=$(find_build_libdir ${AT_BIT_SIZE}) + if [[ "${cross_build}" == "no" ]]; then + rm -rf "${install_transfer}/var/db/Makefile" + # Prepare the locale archive for inclusion in RPM. + # We can't generate it yet because the files aren't available + # on ${at_dest} yet, so we need a dummy file to guarantee it'll + # be included in the package later. + mkdir -p "${install_transfer}/${base_libdir}/locale" + touch "${install_transfer}/${base_libdir}/locale/locale-archive" + + # Re-use time zone information available in the system. + ln -s /usr/share/zoneinfo/ ${install_transfer}/share/zoneinfo + else + rm -rf "${install_place}/${dest_cross}/var/db/Makefile" + fi + + local basedirs="" + # Set location of base directory to replace depending on ${cross_build} + if [[ "${cross_build}" == "no" ]]; then + basedirs="${install_transfer}" + else + basedirs="${install_place}/${dest_cross} \ + ${install_place}/${dest_cross}/usr" + fi + + # The powerpc64le ABIv2 doesn't support 32 bits yet. However, we still + # plan to provide libraries under lib64 instead of lib in order to let + # AT work in the same way as for powerpc64 (this approach is also used + # by Fedora). However, GCC expects files under lib/ when built with + # --disable-multilib, so we need to symlink lib/ to lib64/. + if [[ "${cross_build}" == "yes" ]] \ + && [[ "${target}" == powerpc64le* ]] \ + && [[ -z "${target32}" && -n "${target64}" ]]; then + for dir in ${basedirs}; do + pushd ${dir} > /dev/null + ln -s lib64 lib + popd + done + fi + # Remove duplicated header files prior to final install when building + # for the alternate target because the main target already provides + # them. Leave only the non-common headers. + local base_target=$(find_build_target ${AT_BIT_SIZE}) + # Check the correct install place (native x cross) + if [[ "${cross_build}" == "yes" ]]; then + local check_install="${install_place}/${dest_cross}/usr/include" + else + local check_install="${install_place}/${at_dest}/include" + fi + # Perform the clean of these unneeded include files + if [[ "${base_target}" == "${alternate_target}" ]]; then + # Run the remove command to clean up include files + find ${check_install} -type f \ + -not -name "stubs-${AT_BIT_SIZE}.h" \ + -delete + # Clean any remaining empty directories + find ${check_install} \ + -depth -empty \ + -delete + fi +} diff --git a/configs/8.0/packages/glibc/stage_2 b/configs/8.0/packages/glibc/stage_2 new file mode 100644 index 000000000..91bb8cb67 --- /dev/null +++ b/configs/8.0/packages/glibc/stage_2 @@ -0,0 +1,137 @@ +#!/usr/bin/env bash +# +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# GLIBC build parameters for stage 2 32/64 bits +# ============================================= +# + +# The build of glibc was almost full featured. In this build the new GCC is +# used to compile a highly optimized glibc with all the required features. + +# Include some standard functions +source ${utilities}/bitsize_selection.sh + +ATCFG_HOLD_TEMP_INSTALL='no' +ATCFG_HOLD_TEMP_BUILD='no' +# Build in a new directory +ATCFG_BUILD_STAGE_T='dir' + + +# Required post install hacks (this one is run after the final install move) +atcfg_posti_hacks() { + local base_libdir=$(find_build_libdir ${AT_BIT_SIZE}) + # Set the base library path + libdir=${at_dest}/${base_libdir} + # Find the proper glibc final libc filename + libname=$(basename $(ls ${libdir}/libc{-[0-9]*,}.so)) + # Set the name of the loader to use based on bit size + local ld_so=$(basename $(ls ${libdir}/ld${AT_BIT_SIZE%32}.so.[0-9])) + # Replace ${at_dest}/lib/libc.so with a version compatible with binutils + # built with the --with_sysroot option set to ${at_dest} + [[ -e ${libdir}/libc.so ]] && \ + mv -f ${libdir}/libc.so ${libdir}/libc.so.orig + echo "/* GNU ld script" > ${libdir}/libc.so + echo " Use the shared library, but some functions are only in" >> ${libdir}/libc.so + echo " the static library, so try that secondarily." >> ${libdir}/libc.so + echo " You will notice that the paths do not contain ${at_dest}." >> ${libdir}/libc.so + echo " This is because the Advance Toolchain binutils uses" >> ${libdir}/libc.so + echo " --with-sysroot which causes the linker to append ${at_dest}" >> ${libdir}/libc.so + echo " onto the paths found in this ld script. */" >> ${libdir}/libc.so + echo "GROUP ( libc.so.6 libc_nonshared.a AS_NEEDED ( ${ld_so} ) )" >> ${libdir}/libc.so + [[ -e ${libdir}/libc.so.orig ]] && \ + rm ${libdir}/libc.so.orig +} + +# Pre configure settings or commands to run +atcfg_pre_configure() { + local base_libdir=$(find_build_libdir ${AT_BIT_SIZE}) + local base_bindir=$(find_build_bindir ${AT_BIT_SIZE}) + local base_sbindir=$(find_build_sbindir ${AT_BIT_SIZE}) + local base_libexecdir=$(find_build_libexecdir ${AT_BIT_SIZE}) + echo slibdir="${at_dest}/${base_libdir}" > ./configparms + echo libdir="${at_dest}/${base_libdir}" >> ./configparms + echo bindir="${at_dest}/${base_bindir}" >> ./configparms + echo sbindir="${at_dest}/${base_sbindir}" >> ./configparms + echo libexecdir="${at_dest}/${base_libexecdir}" >> ./configparms + echo rootsbindir="${at_dest}/${base_sbindir}" >> ./configparms + echo cross-compiling=no >> ./configparms +} + +# Configure command for builds +atcfg_configure() { + local base_target=$(find_build_target ${AT_BIT_SIZE}) + PATH=${at_dest}/bin:${PATH} \ + AUTOCONF="${autoconf}" \ + CC="${at_dest}/bin/gcc -m${AT_BIT_SIZE}" \ + CXX="${at_dest}/bin/g++ -m${AT_BIT_SIZE}" \ + CFLAGS="-g -O3 ${with_longdouble:+-mlong-double-128}" \ + CXXFLAGS="-g -O3" \ + ${ATSRC_PACKAGE_WORK}/configure --build=${host} \ + --host=${base_target} \ + --prefix="${at_dest}" \ + --with-headers="${at_dest}/include" \ + --enable-add-ons \ + --with-tls \ + --with-__thread \ + --enable-shared \ + --enable-multi-arch \ + --enable-experimental-malloc \ + --without-cvs \ + --with-cpu=${build_load_arch/ppc/} \ + --without-gd \ + --without-selinux \ + --enable-kernel="${kernel}" \ + --enable-obsolete-rpc +} + +# Make build command +atcfg_make() { + PATH=${at_dest}/bin:${PATH} ${SUB_MAKE} +} + +# Conditional install build command +atcfg_install() { + if [[ "${cross_build}" == "no" ]]; then + PATH=${at_dest}/bin:${PATH} ${SUB_MAKE} install install_root="${install_place}" + else + PATH=${at_dest}/bin:${PATH} ${SUB_MAKE} install install_root="${install_place}/${dest_cross}" + fi +} + +# Conditinal post install settings or commands to run +atcfg_post_install() { + local base_libdir=$(find_build_libdir ${AT_BIT_SIZE}) + if [[ "${cross_build}" == "no" ]]; then + # Remove unused Makefile from install + rm -rf "${install_transfer}/var/db/Makefile" + # Removing the created ld.so.cache to avoid further problems + rm -rf "${install_transfer}/etc/ld.so.cache" + set -e + # Hack around to avoid ld.so.cache getting the libs from the + # system as ldconfig puts platform based directories preceding + # other directories. + ${AT_BASE}/scripts/utilities/create_lib_symlinks.sh \ + "${install_transfer}/${base_libdir}/" \ + "${install_transfer}/${base_libdir}/${build_load_arch}" + set +e + else + # Remove unused Makefile from install + rm -rf "${install_place}/${dest_cross}/var/db/Makefile" + # Removing the created ld.so.cache to avoid further problems + rm -rf "${install_place}/${dest_cross}/etc/ld.so.cache" + fi +} diff --git a/configs/8.0/packages/glibc/stage_compat b/configs/8.0/packages/glibc/stage_compat new file mode 100644 index 000000000..e045c2d4f --- /dev/null +++ b/configs/8.0/packages/glibc/stage_compat @@ -0,0 +1,131 @@ +#!/usr/bin/env bash +# +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# GLIBC build parameters for compat 32/64 bits +# ============================================ +# + +# Include some standard functions +source ${utilities}/bitsize_selection.sh + +ATCFG_HOLD_TEMP_INSTALL='no' +ATCFG_HOLD_TEMP_BUILD='no' +# Build in a new directory +ATCFG_BUILD_STAGE_T='dir' + + +atcfg_posti_hacks() { + local base_libdir=$(find_build_libdir ${AT_BIT_SIZE}) + # Set the base library path + libdir=${at_dest}/${base_libdir} + # Find the proper glibc final libc filename + libname=$(basename $(ls ${libdir}/libc{-[0-9]*,}.so)) + # Set the name of the loader to use based on bit size + local ld_so=$(basename $(ls ${libdir}/ld${AT_BIT_SIZE%32}.so.[0-9])) + # Replace ${libdir}/libc.so with a version compatible with binutils + # built with the --with_sysroot option set to ${at_dest} + [[ -e ${libdir}/libc.so ]] && \ + mv -f ${libdir}/libc.so ${libdir}/libc.so.orig + echo "/* GNU ld script" > ${libdir}/libc.so + echo " Use the shared library, but some functions are only in" >> ${libdir}/libc.so + echo " the static library, so try that secondarily." >> ${libdir}/libc.so + echo " You will notice that the paths do not contain ${at_dest}." >> ${libdir}/libc.so + echo " This is because the Advance Toolchain binutils uses" >> ${libdir}/libc.so + echo " --with-sysroot which causes the linker to append ${at_dest}" >> ${libdir}/libc.so + echo " onto the paths found in this ld script. */" >> ${libdir}/libc.so + echo "GROUP ( libc.so.6 libc_nonshared.a AS_NEEDED ( ${ld_so} ) )" >> ${libdir}/libc.so + [[ -e ${libdir}/libc.so.orig ]] && \ + rm ${libdir}/libc.so.orig +} + + +atcfg_pre_configure() { + local base_libdir=$(find_build_libdir ${AT_BIT_SIZE}) + local base_bindir=$(find_build_bindir ${AT_BIT_SIZE}) + local base_sbindir=$(find_build_sbindir ${AT_BIT_SIZE}) + local base_libexecdir=$(find_build_libexecdir ${AT_BIT_SIZE}) + echo slibdir="${at_dest}/${base_libdir}" > ./configparms + echo libdir="${at_dest}/${base_libdir}" >> ./configparms + echo bindir="${at_dest}/${base_bindir}" >> ./configparms + echo sbindir="${at_dest}/${base_sbindir}" >> ./configparms + echo libexecdir="${at_dest}/${base_libexecdir}" >> ./configparms + echo rootsbindir="${at_dest}/${base_sbindir}" >> ./configparms + echo cross-compiling=no >> ./configparms +} + + +atcfg_configure() { + local base_target=$(find_build_target ${AT_BIT_SIZE}) + PATH=${at_dest}/bin:${PATH} \ + AUTOCONF="${autoconf}" \ + CC="${at_dest}/bin/gcc -m${AT_BIT_SIZE}" \ + CXX="${at_dest}/bin/g++ -m${AT_BIT_SIZE}" \ + CFLAGS="-g -O3 ${with_longdouble:+-mlong-double-128}" \ + CXXFLAGS="-g -O3" \ + ${ATSRC_PACKAGE_WORK}/configure --build=${target} \ + --host=${base_target} \ + --prefix="${at_dest}" \ + --with-headers="${at_dest}/include" \ + --enable-add-ons \ + --with-tls \ + --with-__thread \ + --enable-shared \ + --enable-multi-arch \ + --without-cvs \ + --without-gd \ + --without-selinux \ + --with-cpu=${build_load_arch} \ + --enable-kernel="${compat_kernel}" +} + + +atcfg_make() { + PATH=${at_dest}/bin:${PATH} ${SUB_MAKE} +} + + +atcfg_install() { + PATH=${at_dest}/bin:${PATH} \ + ${SUB_MAKE} install install_root="${install_place}" +} + + +atcfg_post_install() { + set -e + # Reuse time zone information available in the system. + ln -s /etc/localtime ${install_transfer}/etc/localtime + ln -s /usr/share/zoneinfo/ ${install_transfer}/share/zoneinfo + # Compat only needs runtime functionality. + rm -rf "${install_transfer}/include" \ + "${install_transfer}/share/info" \ + "${install_transfer}/var" + # Remove development files. + find "${install_transfer}/" \ + -name '*.a' \ + -o -name '*.o' \ + -o -name '*.la' \ + | xargs rm -vf + # Removing the created ld.so.cache to avoid further problems. + rm -rf "${install_transfer}/etc/ld.so.cache" + # Move final required files to compat folder. + mkdir -p "${install_transfer}/compat" + find "${install_transfer}" -maxdepth 1 \ + ! -path "${install_transfer}/compat" \ + ! -path "${install_transfer}" \ + -execdir mv -v -t "${install_transfer}/compat" {} + + set +e +} diff --git a/configs/8.0/packages/glibc/stage_optimized b/configs/8.0/packages/glibc/stage_optimized new file mode 100644 index 000000000..a680697b4 --- /dev/null +++ b/configs/8.0/packages/glibc/stage_optimized @@ -0,0 +1,144 @@ +#!/usr/bin/env bash +# +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# GLIBC build parameters for CPU optimized 32/64 bits +# =================================================== +# + +# Include some standard functions +source ${utilities}/bitsize_selection.sh + +ATCFG_HOLD_TEMP_INSTALL='no' +ATCFG_HOLD_TEMP_BUILD='no' +# Build in a new directory +ATCFG_BUILD_STAGE_T='dir' + +# GLIBC BUILD HACKS +# ========================================================= +# Required post install hacks (this one is run after the final install move) +atcfg_posti_hacks() { + local base_libdir=$(find_build_libdir ${AT_BIT_SIZE}) + # Set the base library path + libdir=${at_dest}/${base_libdir} + # Find the proper glibc final libc filename + libname=$(basename $(ls ${libdir}/${AT_OPTIMIZE_CPU}/libc{-[0-9]*,}.so)) + local ld_so=$(basename $(ls ${libdir}/ld${AT_BIT_SIZE%32}.so.[0-9])) + # Replace ${libdir}/${AT_OPTIMIZE_CPU}/libc.so with a version compatible with binutils + # built with the --with_sysroot option set to ${at_dest} + [[ -e ${libdir}/${AT_OPTIMIZE_CPU}/libc.so ]] && \ + mv -f ${libdir}/${AT_OPTIMIZE_CPU}/libc.so ${libdir}/${AT_OPTIMIZE_CPU}/libc.so.orig + echo "/* GNU ld script" > ${libdir}/${AT_OPTIMIZE_CPU}/libc.so + echo " Use the shared library, but some functions are only in" >> ${libdir}/${AT_OPTIMIZE_CPU}/libc.so + echo " the static library, so try that secondarily." >> ${libdir}/${AT_OPTIMIZE_CPU}/libc.so + echo " You will notice that the paths do not contain ${at_dest}." >> ${libdir}/${AT_OPTIMIZE_CPU}/libc.so + echo " This is because the Advance Toolchain binutils uses" >> ${libdir}/${AT_OPTIMIZE_CPU}/libc.so + echo " --with-sysroot which causes the linker to append ${at_dest}" >> ${libdir}/${AT_OPTIMIZE_CPU}/libc.so + echo " onto the paths found in this ld script. */" >> ${libdir}/${AT_OPTIMIZE_CPU}/libc.so + echo "GROUP ( libc.so.6 libc_nonshared.a AS_NEEDED ( ${ld_so} ) )" >> ${libdir}/${AT_OPTIMIZE_CPU}/libc.so + [[ -e ${libdir}/${AT_OPTIMIZE_CPU}/libc.so.orig ]] && \ + rm ${libdir}/${AT_OPTIMIZE_CPU}/libc.so.orig +} + + +# ATCFG_CONFIGURE SETTINGS +# ========================================================= +# Pre configure settings or commands to run +atcfg_pre_configure() { + local base_libdir=$(find_build_libdir ${AT_BIT_SIZE}) + local base_bindir=$(find_build_bindir ${AT_BIT_SIZE}) + local base_sbindir=$(find_build_sbindir ${AT_BIT_SIZE}) + local base_libexecdir=$(find_build_libexecdir ${AT_BIT_SIZE}) + echo slibdir="${at_dest}/${base_libdir}" > ./configparms + echo libdir="${at_dest}/${base_libdir}" >> ./configparms + echo bindir="${at_dest}/${base_bindir}" >> ./configparms + echo sbindir="${at_dest}/${base_sbindir}" >> ./configparms + echo libexecdir="${at_dest}/${base_libexecdir}" >> ./configparms + echo rootsbindir="${at_dest}/${base_sbindir}" >> ./configparms + if [[ "${at_build_cpu}" == "${AT_OPTIMIZE_CPU}" ]]; then + echo cross-compiling=no >> ./configparms + else + echo cross-compiling=yes >> ./configparms + fi +} +# Configure command for native builds +atcfg_configure() { + local base_target=$(find_build_target ${AT_BIT_SIZE}) + PATH=${at_dest}/bin:${PATH} \ + AUTOCONF="${autoconf}" \ + CC="${at_dest}/bin/gcc -m${AT_BIT_SIZE}" \ + CXX="${at_dest}/bin/g++ -m${AT_BIT_SIZE}" \ + CFLAGS="-g -O3 ${with_longdouble:+-mlong-double-128}" \ + CXXFLAGS="-g -O3" \ + ${ATSRC_PACKAGE_WORK}/configure --build=${target} \ + --host=${base_target} \ + --prefix="${at_dest}" \ + --with-headers="${at_dest}/include" \ + --enable-add-ons \ + --with-tls \ + --with-__thread \ + --enable-shared \ + --enable-multi-arch \ + --enable-experimental-malloc \ + --without-cvs \ + --enable-obsolete-rpc \ + --without-gd \ + --without-selinux \ + --with-cpu=${AT_OPTIMIZE_CPU/ppc/} \ + --enable-kernel="${kernel}" \ + --enable-obsolete-rpc +} + + +# ATCFG_MAKE SETTINGS +# ========================================================= +# Make build command +atcfg_make() { + PATH=${at_dest}/bin:${PATH} ${SUB_MAKE} +} + + +# ATCFG_INSTALL SETTINGS +# ========================================================= +# Install build command +atcfg_install() { + PATH=${at_dest}/bin:${PATH} ${SUB_MAKE} install install_root="${install_place}" +} +# Post install settings or commands to run +atcfg_post_install() { + local base_libdir=$(find_build_libdir ${AT_BIT_SIZE}) + # Remove unneeded install files + find "${install_place}/${at_dest}" -type d -name "gconv" -print -execdir rm -rf {} + + find "${install_place}/${at_dest}" -type d -name "audit" -print -execdir rm -rf {} + + find "${install_place}/${at_dest}" -name "ld*.so.*" -print -delete + find "${install_place}/${at_dest}" -name "ld*.so" -print -delete + find "${install_place}/${at_dest}" -name "libdl*.so*" -print -delete + find "${install_place}/${at_dest}" -name "libdl.a" -print -delete + find "${install_place}/${at_dest}" -name "libmemusage.so.*" -print -delete + # Save all libraries into a tar file + pushd "${install_place}/${at_dest}/${base_libdir}" + tar czf "${install_place}/${AT_OPTIMIZE_CPU}.tar.gz" \ + $(find . -name "*.so" -o -name "*.so.*" -o -name "*.a") + popd + # Remove all installed built files + rm -rf "${install_place}/${at_dest}" + # Create processor lib target + mkdir -p "${install_place}/${at_dest}/${base_libdir}/${AT_OPTIMIZE_CPU}" + # Place saved libs on created final target + pushd "${install_place}/${at_dest}/${base_libdir}/${AT_OPTIMIZE_CPU}" + tar xzf "${install_place}/${AT_OPTIMIZE_CPU}.tar.gz" + popd +} diff --git a/configs/8.0/packages/gmp/gmp.mk b/configs/8.0/packages/gmp/gmp.mk new file mode 120000 index 000000000..7bf68745d --- /dev/null +++ b/configs/8.0/packages/gmp/gmp.mk @@ -0,0 +1 @@ +../../../7.1/packages/gmp/gmp.mk \ No newline at end of file diff --git a/configs/8.0/packages/gmp/sources b/configs/8.0/packages/gmp/sources new file mode 100644 index 000000000..8e6911f6a --- /dev/null +++ b/configs/8.0/packages/gmp/sources @@ -0,0 +1,54 @@ +#!/usr/bin/env bash +# +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# GMP source package and build info +# ================================= +# + +ATSRC_PACKAGE_NAME="GNU Multiple Precision Library" +ATSRC_PACKAGE_VER=6.0.0 +ATSRC_PACKAGE_REV=a +ATSRC_PACKAGE_LICENSE="GPL 3.0" +ATSRC_PACKAGE_DOCLINK="http://gmplib.org/manual/" +ATSRC_PACKAGE_RELFIXES= +ATSRC_PACKAGE_STR_VER="${ATSRC_PACKAGE_NAME} ${ATSRC_PACKAGE_VER}" +ATSRC_PACKAGE_PRE="test -d gmp-${ATSRC_PACKAGE_VER}" +ATSRC_PACKAGE_CO=([0]="wget -N http://ftpmirror.gnu.org/gmp/gmp-${ATSRC_PACKAGE_VER}${ATSRC_PACKAGE_REV}.tar.bz2" \ + [1]="wget -N ftp://ftp.unicamp.br/pub/gnu/gmp/gmp-${ATSRC_PACKAGE_VER}${ATSRC_PACKAGE_REV}.tar.bz2") +ATSRC_PACKAGE_POST="tar -xjf gmp-${ATSRC_PACKAGE_VER}${ATSRC_PACKAGE_REV}.tar.bz2" +ATSRC_PACKAGE_SRC=${AT_BASE}/sources/gmp-${ATSRC_PACKAGE_VER} +ATSRC_PACKAGE_WORK=${AT_WORK_PATH}/gmp +ATSRC_PACKAGE_MLS= +ATSRC_PACKAGE_ALOC= +ATSRC_PACKAGE_PATCHES= +ATSRC_PACKAGE_TARS= +ATSRC_PACKAGE_MAKE_CHECK= +ATSRC_PACKAGE_DISTRIB=yes +ATSRC_PACKAGE_BUNDLE=toolchain + +atsrc_get_patches () +{ + at_get_patch_and_trim \ + https://gmplib.org/repo/gmp-6.0/raw-rev/4a6d258b467f \ + gmp_6_ppc.patch 21 \ + 8c22c6493605f1814d2c7c3e5890e5c0 || return ${?} +} + +atsrc_apply_patches () +{ + patch -p1 < gmp_6_ppc.patch || return ${?} +} diff --git a/configs/8.0/packages/gmp/specfile b/configs/8.0/packages/gmp/specfile new file mode 120000 index 000000000..1d313614b --- /dev/null +++ b/configs/8.0/packages/gmp/specfile @@ -0,0 +1 @@ +../../../7.1/packages/gmp/specfile \ No newline at end of file diff --git a/configs/8.0/packages/gmp/stage_1 b/configs/8.0/packages/gmp/stage_1 new file mode 100644 index 000000000..d6356989f --- /dev/null +++ b/configs/8.0/packages/gmp/stage_1 @@ -0,0 +1,85 @@ +#!/usr/bin/env bash +# +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +ATCFG_HOLD_TEMP_INSTALL='no' +ATCFG_HOLD_TEMP_BUILD='no' +# Build in a new directory +ATCFG_BUILD_STAGE_T='dir' +# Don't fail if stage final install place doesn't exist +if [[ "${cross_build}" == "yes" ]]; then + ATCFG_INSTALL_PEDANTIC="no" +fi + +# Pre configure settings or commands to run +atcfg_pre_configure () { + cc_64=${system_cc} + cxx_64=${system_cxx} + if [[ "${cross_build}" != "yes" ]]; then + libdir=${at_dest}/lib + prefix=${at_dest} + if [[ "${build_arch}" == ppc64* ]]; then + libdir=${at_dest}/lib64 + if [[ ! -d ${libdir} ]]; then + mkdir -p ${libdir} + fi + if [[ "${default_compiler}" == "32" ]]; then + cc_64="${gcc64}" + cxx_64="${gpp64}" + lib_stdcxx=$(find /usr/lib/gcc/ -name libstdc++.a | grep "\/64\/") + lib_supcxx=$(find /usr/lib/gcc/ -name libsupc++.a | grep "\/64\/") + cp ${lib_stdcxx} ${lib_supcxx} ${libdir} + fi + fi + else + libdir=${tmp_dir}/lib + prefix=${tmp_dir} + fi +} + +# Configure native build command +atcfg_configure () { + CC=${cc_64} \ + CXX=${cxx_64} \ + CFLAGS="-g -O" \ + CXXFLAGS="-g -O" \ + ${ATSRC_PACKAGE_WORK}/configure --build=${host} \ + --host=${host} \ + --target=${host} \ + --prefix=${prefix} \ + --exec-prefix=${prefix} \ + --libdir=${libdir} \ + --enable-cxx \ + --disable-shared + +} + +# Make build command +atcfg_make () { + ${SUB_MAKE} all +} + +# Install build command +atcfg_install () { + if [[ "${cross_build}" != "yes" ]]; then + make install DESTDIR=${install_place} + else + # In order to install the package at $prefix, we need to force + # DESTDIR value. Because if AT was built using DESTDIR, the + # value will be stored in MFLAGS. + make install DESTDIR="" + fi +} diff --git a/configs/8.0/packages/gmp/stage_2 b/configs/8.0/packages/gmp/stage_2 new file mode 120000 index 000000000..3c4123d1a --- /dev/null +++ b/configs/8.0/packages/gmp/stage_2 @@ -0,0 +1 @@ +../../../7.1/packages/gmp/stage_2 \ No newline at end of file diff --git a/configs/8.0/packages/gotools/gotools.mk b/configs/8.0/packages/gotools/gotools.mk new file mode 100644 index 000000000..c45a0994f --- /dev/null +++ b/configs/8.0/packages/gotools/gotools.mk @@ -0,0 +1,33 @@ +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Go tools are available only for native AT-8.0 builds. Cross AT-8.0 builds do +# not support go tools, yet. +# +# Native go tools could be built and provided on cross AT-8.0 builds, which +# could then invoke the cross powerpc64[le]-linux-gnu-gccgo compiler. +# +# However, as of March 2015 this kind of cross-compilation is not supported by +# the community, thus cross AT-8.0 builds do not include any go tools. +# +$(eval $(call set_provides,gotools_1,single,cross_no)) + +gotools: $(RCPTS)/gotools_1.rcpt + +$(RCPTS)/gotools_1.rcpt: $(gotools_1-archdeps) + @touch $@ + +$(RCPTS)/gotools_1.a.rcpt: $(patsubst %,$(RCPTS)/%.rcpt,gcc_4 rsync_gotools) + @touch $@ + diff --git a/configs/8.0/packages/gotools/sources b/configs/8.0/packages/gotools/sources new file mode 100644 index 000000000..387beeab4 --- /dev/null +++ b/configs/8.0/packages/gotools/sources @@ -0,0 +1,53 @@ +#!/usr/bin/env bash +# +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# Go Tools source package and build info +# ====================================== +# + +ATSRC_PACKAGE_NAME="Go Tools" +ATSRC_PACKAGE_VER=1.2.2 +ATSRC_PACKAGE_REV=43d00b09 +ATSRC_PACKAGE_LICENSE="BSD License" +ATSRC_PACKAGE_DOCLINK="http://golang.org/doc/cmd" +ATSRC_PACKAGE_RELFIXES= +ATSRC_PACKAGE_STR_VER="${ATSRC_PACKAGE_NAME} ${ATSRC_PACKAGE_VER}${ATSRC_PACKAGE_REV:+-${ATSRC_PACKAGE_REV}}" +ATSRC_PACKAGE_PRE="test -d gotools-${ATSRC_PACKAGE_VER}${ATSRC_PACKAGE_REV:+-${ATSRC_PACKAGE_REV}}" +ATSRC_PACKAGE_CO=([0]="git clone https://go.googlesource.com/go gotools" \ + [1]="git clone https://github.com/golang/go.git gotools") +ATSRC_PACKAGE_GIT="git checkout -b go-${ATSRC_PACKAGE_VER}${ATSRC_PACKAGE_REV:+-${ATSRC_PACKAGE_REV}} ${ATSRC_PACKAGE_REV}" +ATSRC_PACKAGE_POST="mv gotools gotools-${ATSRC_PACKAGE_VER}${ATSRC_PACKAGE_REV:+-${ATSRC_PACKAGE_REV}}" +ATSRC_PACKAGE_SRC="${AT_BASE}/sources/gotools-${ATSRC_PACKAGE_VER}${ATSRC_PACKAGE_REV:+-${ATSRC_PACKAGE_REV}}" +ATSRC_PACKAGE_WORK=${AT_WORK_PATH}/gotools +ATSRC_PACKAGE_MLS= +ATSRC_PACKAGE_ALOC= +ATSRC_PACKAGE_PATCHES= +ATSRC_PACKAGE_TARS= +ATSRC_PACKAGE_DISTRIB=no +ATSRC_PACKAGE_BUNDLE=devel + +atsrc_get_patches () +{ + at_get_patch \ + https://raw.githubusercontent.com/powertechpreview/powertechpreview/master/Golang%20Patches/golang-gocmds2.patch \ + 2c23a543892ff5ad738437d97ed7ea25 || return ${?} +} + +atsrc_apply_patches () +{ + patch -p1 -d src < golang-gocmds2.patch || return ${?} +} diff --git a/configs/8.0/packages/gotools/specfile b/configs/8.0/packages/gotools/specfile new file mode 100644 index 000000000..d46c60911 --- /dev/null +++ b/configs/8.0/packages/gotools/specfile @@ -0,0 +1,14 @@ +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# diff --git a/configs/8.0/packages/gotools/stage_1 b/configs/8.0/packages/gotools/stage_1 new file mode 100644 index 000000000..83fc8d6bc --- /dev/null +++ b/configs/8.0/packages/gotools/stage_1 @@ -0,0 +1,68 @@ +#!/usr/bin/env bash +# +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# Go Tools build parameters for stage 1 +# ===================================== +# + +source ${utilities}/bitsize_selection.sh + +atcfg_configure () +{ + # Select the gccgo compiler provided by AT. + # Retrieve its version for installation purposes. + GCCGO=${at_dest}/bin/gccgo + if [ ! -f ${GCCGO} ]; then + echo "${GCCGO} not found" + exit 1 + else + gcc_version=`${GCCGO} -dumpversion` + fi +} + +atcfg_make () +{ + ls ${ATSRC_PACKAGE_WORK}/src/cmd/go/*.go \ + | grep -v _test.go | grep -v bootstrap \ + | grep -v doc | grep -v notunix \ + | xargs ${GCCGO} -O3 -o go + + ls ${ATSRC_PACKAGE_WORK}/src/cmd/cgo/*.go \ + | grep -v _test.go | grep -v bootstrap \ + | grep -v doc | grep -v notunix \ + | xargs ${GCCGO} -O3 -o cgo + + ls ${ATSRC_PACKAGE_WORK}/src/cmd/gofmt/*.go \ + | grep -v _test.go | grep -v bootstrap \ + | grep -v doc | grep -v notunix \ + | xargs ${GCCGO} -O3 -o gofmt +} + +atcfg_pre_install () +{ + mkdir -p ${install_transfer}/bin + mkdir -p ${install_transfer}/libexec/gcc/${target}/${gcc_version} +} + +atcfg_install () +{ + install -m 755 go ${install_transfer}/bin/go + install -m 755 gofmt ${install_transfer}/bin/gofmt + install -m 755 cgo \ + ${install_transfer}/libexec/gcc/${target}/${gcc_version}/cgo +} + diff --git a/configs/8.0/packages/groups b/configs/8.0/packages/groups new file mode 100644 index 000000000..1b83829bb --- /dev/null +++ b/configs/8.0/packages/groups @@ -0,0 +1,56 @@ +#!/bin/bash +# +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# +# +# +# +# + +# The following lines containintg #* at the beginning should remain as is, and +# be replicated when this file is cloned, or new groups are added. + +#* main_toolchain: Base toolchain packages +#* toolchain_extra: Additional support libraries, including some additional floating point support libraries +#* devel: Development tools +#* profile: Additional performance and debugging tools +#* mcore-libs: Additional multi core support libraries +#* golang: Golang + +# This filters below are used to isolate toolchain devel and runtime files where +# propriate. They are arrays of *Extended* Regular Expressions (ERE). + +# Filters to use on runtime package file exclusion (sed ERE) +runtime_exclude=('/^.*\.a$/d' \ + '/^.*\/bin\/([^ep]|p[^iy]|e[^a]).*$/d' \ + '/^.*\/sbin\/([^l]|l[^d]).*$/d' \ + '/^.*\/include\/.*$/d' \ + '/^.*\/share\/info\/.*$/d' \ + '/^.*\/pkgconfig\/.*$/d') + +# Filters to use on runtime package file inclusion (grep ERE) +runtime_include= + +# Filters to use on devel package file exclusion (sed ERE) +devel_exclude=('/^.*\/sbin\/ldconfig$/d') + +# Filters to use on devel package file inclusion (grep ERE) +devel_include=('^.*\.a$' \ + '^.*\/bin\/([^ep]|p[^iy]|e[^a]).*$' \ + '^.*\/sbin\/.*$' \ + '^.*\/include\/.*$' \ + '^.*\/share\/info\/.*$' \ + '^.*\/pkgconfig\/.*$') diff --git a/configs/8.0/packages/kernel/kernel.mk b/configs/8.0/packages/kernel/kernel.mk new file mode 120000 index 000000000..935bea19e --- /dev/null +++ b/configs/8.0/packages/kernel/kernel.mk @@ -0,0 +1 @@ +../../../7.1/packages/kernel/kernel.mk \ No newline at end of file diff --git a/configs/8.0/packages/kernel/sources b/configs/8.0/packages/kernel/sources new file mode 120000 index 000000000..7b570febf --- /dev/null +++ b/configs/8.0/packages/kernel/sources @@ -0,0 +1 @@ +../../../7.1/packages/kernel/sources \ No newline at end of file diff --git a/configs/8.0/packages/kernel/specfile b/configs/8.0/packages/kernel/specfile new file mode 120000 index 000000000..1a5869a44 --- /dev/null +++ b/configs/8.0/packages/kernel/specfile @@ -0,0 +1 @@ +../../../7.1/packages/kernel/specfile \ No newline at end of file diff --git a/configs/8.0/packages/kernel/stage_h b/configs/8.0/packages/kernel/stage_h new file mode 120000 index 000000000..f828872a6 --- /dev/null +++ b/configs/8.0/packages/kernel/stage_h @@ -0,0 +1 @@ +../../../7.1/packages/kernel/stage_h \ No newline at end of file diff --git a/configs/8.0/packages/libauxv/libauxv.mk b/configs/8.0/packages/libauxv/libauxv.mk new file mode 120000 index 000000000..06a5d5207 --- /dev/null +++ b/configs/8.0/packages/libauxv/libauxv.mk @@ -0,0 +1 @@ +../../../7.1/packages/libauxv/libauxv.mk \ No newline at end of file diff --git a/configs/8.0/packages/libauxv/sources b/configs/8.0/packages/libauxv/sources new file mode 100644 index 000000000..2e75c39c1 --- /dev/null +++ b/configs/8.0/packages/libauxv/sources @@ -0,0 +1,43 @@ +#!/usr/bin/env bash +# +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# Libauxv source package and build info +# ================================== +# + +ATSRC_PACKAGE_NAME="Libauxv" +ATSRC_PACKAGE_VER=1.0.0 +ATSRC_PACKAGE_REV=04b3ddcb +ATSRC_PACKAGE_LICENSE="BSD License" +ATSRC_PACKAGE_DOCLINK="https://www.ibm.com/developerworks/wikis/display/LinuxP/Optimized+Libraries" +ATSRC_PACKAGE_RELFIXES= +ATSRC_PACKAGE_STR_VER="${ATSRC_PACKAGE_NAME} ${ATSRC_PACKAGE_VER}-${ATSRC_PACKAGE_REV}" +ATSRC_PACKAGE_VERID="${ATSRC_PACKAGE_VER}${ATSRC_PACKAGE_REV:+-${ATSRC_PACKAGE_REV}}" +ATSRC_PACKAGE_PRE="test -d libauxv-${ATSRC_PACKAGE_VERID}" +ATSRC_PACKAGE_CO=([0]="wget -O libauxv-${ATSRC_PACKAGE_VERID}.tar.gz https://github.com/Libauxv/libauxv/archive/${ATSRC_PACKAGE_REV}.tar.gz") +ATSRC_PACKAGE_GIT="" +# Use --transform to give a better name to Libauxv directory. +ATSRC_PACKAGE_POST="tar xzf libauxv-${ATSRC_PACKAGE_VERID}.tar.gz --transform=s/libauxv-${ATSRC_PACKAGE_REV}[^\\/]*/libauxv-${ATSRC_PACKAGE_VERID}/" +ATSRC_PACKAGE_SRC="${AT_BASE}/sources/libauxv-${ATSRC_PACKAGE_VERID}" +ATSRC_PACKAGE_WORK=${AT_WORK_PATH}/libauxv +ATSRC_PACKAGE_MLS="" +ATSRC_PACKAGE_ALOC="" +ATSRC_PACKAGE_PATCHES="" +ATSRC_PACKAGE_TARS="" +ATSRC_PACKAGE_MAKE_CHECK="" +ATSRC_PACKAGE_DISTRIB=no +ATSRC_PACKAGE_BUNDLE=toolchain diff --git a/configs/8.0/packages/libauxv/specfile b/configs/8.0/packages/libauxv/specfile new file mode 120000 index 000000000..504a983e5 --- /dev/null +++ b/configs/8.0/packages/libauxv/specfile @@ -0,0 +1 @@ +../../../7.1/packages/libauxv/specfile \ No newline at end of file diff --git a/configs/8.0/packages/libauxv/stage_1 b/configs/8.0/packages/libauxv/stage_1 new file mode 120000 index 000000000..39566b6fa --- /dev/null +++ b/configs/8.0/packages/libauxv/stage_1 @@ -0,0 +1 @@ +../../../7.1/packages/libauxv/stage_1 \ No newline at end of file diff --git a/configs/8.0/packages/libdfp/libdfp.mk b/configs/8.0/packages/libdfp/libdfp.mk new file mode 120000 index 000000000..9240a231b --- /dev/null +++ b/configs/8.0/packages/libdfp/libdfp.mk @@ -0,0 +1 @@ +../../../7.1/packages/libdfp/libdfp.mk \ No newline at end of file diff --git a/configs/8.0/packages/libdfp/sources b/configs/8.0/packages/libdfp/sources new file mode 120000 index 000000000..082b7ac4f --- /dev/null +++ b/configs/8.0/packages/libdfp/sources @@ -0,0 +1 @@ +../../../7.1/packages/libdfp/sources \ No newline at end of file diff --git a/configs/8.0/packages/libdfp/specfile b/configs/8.0/packages/libdfp/specfile new file mode 120000 index 000000000..7901d1d18 --- /dev/null +++ b/configs/8.0/packages/libdfp/specfile @@ -0,0 +1 @@ +../../../7.1/packages/libdfp/specfile \ No newline at end of file diff --git a/configs/8.0/packages/libdfp/stage_1 b/configs/8.0/packages/libdfp/stage_1 new file mode 120000 index 000000000..82674faf0 --- /dev/null +++ b/configs/8.0/packages/libdfp/stage_1 @@ -0,0 +1 @@ +../../../7.1/packages/libdfp/stage_1 \ No newline at end of file diff --git a/configs/8.0/packages/libdfp/stage_optimized b/configs/8.0/packages/libdfp/stage_optimized new file mode 120000 index 000000000..b07a8877e --- /dev/null +++ b/configs/8.0/packages/libdfp/stage_optimized @@ -0,0 +1 @@ +../../../7.1/packages/libdfp/stage_optimized \ No newline at end of file diff --git a/configs/8.0/packages/libhugetlbfs/libhugetlbfs.mk b/configs/8.0/packages/libhugetlbfs/libhugetlbfs.mk new file mode 120000 index 000000000..432ccf2f7 --- /dev/null +++ b/configs/8.0/packages/libhugetlbfs/libhugetlbfs.mk @@ -0,0 +1 @@ +../../../7.1/packages/libhugetlbfs/libhugetlbfs.mk \ No newline at end of file diff --git a/configs/8.0/packages/libhugetlbfs/sources b/configs/8.0/packages/libhugetlbfs/sources new file mode 100644 index 000000000..c1395d379 --- /dev/null +++ b/configs/8.0/packages/libhugetlbfs/sources @@ -0,0 +1,40 @@ +#!/usr/bin/env bash +# +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# Libhugetlbfs source package and build info +# ========================================== +# +ATSRC_PACKAGE_NAME="Libhugetlbfs" +ATSRC_PACKAGE_VER=2.18 +ATSRC_PACKAGE_REV=ea3f6b27 +ATSRC_PACKAGE_LICENSE="Lesser GPL 2.1" +ATSRC_PACKAGE_DOCLINK="https://github.com/libhugetlbfs/libhugetlbfs" +ATSRC_PACKAGE_RELFIXES= +ATSRC_PACKAGE_STR_VER="${ATSRC_PACKAGE_NAME} ${ATSRC_PACKAGE_VER}-${ATSRC_PACKAGE_REV}" +ATSRC_PACKAGE_PRE="test -d libhugetlbfs-${ATSRC_PACKAGE_VER}.${ATSRC_PACKAGE_REV}" +ATSRC_PACKAGE_CO=([0]="git clone https://github.com/libhugetlbfs/libhugetlbfs.git libhugetlbfs") +ATSRC_PACKAGE_GIT="git checkout -b libhugetlbfs-${ATSRC_PACKAGE_VER}-${ATSRC_PACKAGE_REV} ${ATSRC_PACKAGE_REV}" +ATSRC_PACKAGE_POST="mv libhugetlbfs libhugetlbfs-${ATSRC_PACKAGE_VER}.${ATSRC_PACKAGE_REV}" +ATSRC_PACKAGE_SRC="${AT_BASE}/sources/libhugetlbfs-${ATSRC_PACKAGE_VER}.${ATSRC_PACKAGE_REV}" +ATSRC_PACKAGE_WORK=${AT_WORK_PATH}/libhugetlbfs +ATSRC_PACKAGE_MLS="" +ATSRC_PACKAGE_ALOC="" +ATSRC_PACKAGE_PATCHES="" +ATSRC_PACKAGE_TARS="" +ATSRC_PACKAGE_MAKE_CHECK= +ATSRC_PACKAGE_DISTRIB=yes +ATSRC_PACKAGE_BUNDLE=toolchain diff --git a/configs/8.0/packages/libhugetlbfs/specfile b/configs/8.0/packages/libhugetlbfs/specfile new file mode 120000 index 000000000..32f409dc4 --- /dev/null +++ b/configs/8.0/packages/libhugetlbfs/specfile @@ -0,0 +1 @@ +../../../7.1/packages/libhugetlbfs/specfile \ No newline at end of file diff --git a/configs/8.0/packages/libhugetlbfs/stage_1 b/configs/8.0/packages/libhugetlbfs/stage_1 new file mode 120000 index 000000000..fb1dbe3b5 --- /dev/null +++ b/configs/8.0/packages/libhugetlbfs/stage_1 @@ -0,0 +1 @@ +../../../7.1/packages/libhugetlbfs/stage_1 \ No newline at end of file diff --git a/configs/8.0/packages/libpfm/libpfm.mk b/configs/8.0/packages/libpfm/libpfm.mk new file mode 120000 index 000000000..d223b20ee --- /dev/null +++ b/configs/8.0/packages/libpfm/libpfm.mk @@ -0,0 +1 @@ +../../../7.1/packages/libpfm/libpfm.mk \ No newline at end of file diff --git a/configs/8.0/packages/libpfm/sources b/configs/8.0/packages/libpfm/sources new file mode 120000 index 000000000..e92b89b86 --- /dev/null +++ b/configs/8.0/packages/libpfm/sources @@ -0,0 +1 @@ +../../../7.1/packages/libpfm/sources \ No newline at end of file diff --git a/configs/8.0/packages/libpfm/specfile b/configs/8.0/packages/libpfm/specfile new file mode 120000 index 000000000..0d9b03e53 --- /dev/null +++ b/configs/8.0/packages/libpfm/specfile @@ -0,0 +1 @@ +../../../7.1/packages/libpfm/specfile \ No newline at end of file diff --git a/configs/8.0/packages/libpfm/stage_1 b/configs/8.0/packages/libpfm/stage_1 new file mode 120000 index 000000000..0e6579f86 --- /dev/null +++ b/configs/8.0/packages/libpfm/stage_1 @@ -0,0 +1 @@ +../../../7.1/packages/libpfm/stage_1 \ No newline at end of file diff --git a/configs/8.0/packages/libsphde/libsphde.mk b/configs/8.0/packages/libsphde/libsphde.mk new file mode 120000 index 000000000..cf5cc4da8 --- /dev/null +++ b/configs/8.0/packages/libsphde/libsphde.mk @@ -0,0 +1 @@ +../../../7.1/packages/libsphde/libsphde.mk \ No newline at end of file diff --git a/configs/8.0/packages/libsphde/sources b/configs/8.0/packages/libsphde/sources new file mode 120000 index 000000000..4be132199 --- /dev/null +++ b/configs/8.0/packages/libsphde/sources @@ -0,0 +1 @@ +../../../7.1/packages/libsphde/sources \ No newline at end of file diff --git a/configs/8.0/packages/libsphde/specfile b/configs/8.0/packages/libsphde/specfile new file mode 120000 index 000000000..3d6545ef5 --- /dev/null +++ b/configs/8.0/packages/libsphde/specfile @@ -0,0 +1 @@ +../../../7.1/packages/libsphde/specfile \ No newline at end of file diff --git a/configs/8.0/packages/libsphde/stage_1 b/configs/8.0/packages/libsphde/stage_1 new file mode 120000 index 000000000..3ee728d54 --- /dev/null +++ b/configs/8.0/packages/libsphde/stage_1 @@ -0,0 +1 @@ +../../../7.1/packages/libsphde/stage_1 \ No newline at end of file diff --git a/configs/8.0/packages/libsphdecompat/libsphdecompat.mk b/configs/8.0/packages/libsphdecompat/libsphdecompat.mk new file mode 120000 index 000000000..1238c51c6 --- /dev/null +++ b/configs/8.0/packages/libsphdecompat/libsphdecompat.mk @@ -0,0 +1 @@ +../../../7.1/packages/libsphdecompat/libsphdecompat.mk \ No newline at end of file diff --git a/configs/8.0/packages/libsphdecompat/sources b/configs/8.0/packages/libsphdecompat/sources new file mode 120000 index 000000000..b790d6104 --- /dev/null +++ b/configs/8.0/packages/libsphdecompat/sources @@ -0,0 +1 @@ +../../../7.1/packages/libsphdecompat/sources \ No newline at end of file diff --git a/configs/8.0/packages/libsphdecompat/specfile b/configs/8.0/packages/libsphdecompat/specfile new file mode 120000 index 000000000..7aaf65144 --- /dev/null +++ b/configs/8.0/packages/libsphdecompat/specfile @@ -0,0 +1 @@ +../../../7.1/packages/libsphdecompat/specfile \ No newline at end of file diff --git a/configs/8.0/packages/libsphdecompat/stage_1 b/configs/8.0/packages/libsphdecompat/stage_1 new file mode 120000 index 000000000..b96a46189 --- /dev/null +++ b/configs/8.0/packages/libsphdecompat/stage_1 @@ -0,0 +1 @@ +../../../7.1/packages/libsphdecompat/stage_1 \ No newline at end of file diff --git a/configs/8.0/packages/liburcu/liburcu.mk b/configs/8.0/packages/liburcu/liburcu.mk new file mode 120000 index 000000000..708477be5 --- /dev/null +++ b/configs/8.0/packages/liburcu/liburcu.mk @@ -0,0 +1 @@ +../../../7.1/packages/liburcu/liburcu.mk \ No newline at end of file diff --git a/configs/8.0/packages/liburcu/sources b/configs/8.0/packages/liburcu/sources new file mode 100644 index 000000000..4ed844710 --- /dev/null +++ b/configs/8.0/packages/liburcu/sources @@ -0,0 +1,58 @@ +#!/usr/bin/env bash +# +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# URCU source package and build info +# ================================== +# + +ATSRC_PACKAGE_NAME="Userspace RCU" +ATSRC_PACKAGE_VER=0.8.8 +ATSRC_PACKAGE_LICENSE="Lesser GPL 2.1" +ATSRC_PACKAGE_DOCLINK="http://lttng.org/urcu" +ATSRC_PACKAGE_RELFIXES= +ATSRC_PACKAGE_STR_VER="${ATSRC_PACKAGE_NAME} ${ATSRC_PACKAGE_VER}" +ATSRC_PACKAGE_PRE="test -d userspace-rcu-${ATSRC_PACKAGE_VER}" +ATSRC_PACKAGE_CO=([0]="wget -N http://lttng.org/files/urcu/userspace-rcu-${ATSRC_PACKAGE_VER}.tar.bz2") +ATSRC_PACKAGE_POST="tar -xjf userspace-rcu-${ATSRC_PACKAGE_VER}.tar.bz2" +ATSRC_PACKAGE_SRC="${AT_BASE}/sources/userspace-rcu-${ATSRC_PACKAGE_VER}" +ATSRC_PACKAGE_WORK=${AT_WORK_PATH}/userspace-rcu +ATSRC_PACKAGE_MAKE_CHECK="" +ATSRC_PACKAGE_DISTRIB=yes +ATSRC_PACKAGE_BUNDLE=mcore-libs + +atsrc_get_patches () +{ + at_get_patch \ + https://github.com/powertechpreview/powertechpreview/raw/master/URCU%20Patches/urcu-config.tgz \ + 541abeecac6ea905ed1748df896bd961 || return ${?} + + at_get_patch_and_trim \ + https://www.mail-archive.com/opensuse-commit%40opensuse.org/msg50545.html \ + userspace-rcu-ppc64le.patch 81 \ + bb8744a6c5e4871f395985c5d182e827 || return ${?} +} + +atsrc_apply_patches () +{ + tar xzf urcu-config.tgz || return ${?} + + # Remove changes on openSUSE:Factory. + tail -n 38 userspace-rcu-ppc64le.patch | unexpand \ + > trimmed-userspace-rcu-ppc64le.patch + patch -p1 < trimmed-userspace-rcu-ppc64le.patch || return ${?} + patch -p1 < urcu-config.patch || return ${?} +} diff --git a/configs/8.0/packages/liburcu/specfile b/configs/8.0/packages/liburcu/specfile new file mode 120000 index 000000000..533278a34 --- /dev/null +++ b/configs/8.0/packages/liburcu/specfile @@ -0,0 +1 @@ +../../../7.1/packages/liburcu/specfile \ No newline at end of file diff --git a/configs/8.0/packages/liburcu/stage_1 b/configs/8.0/packages/liburcu/stage_1 new file mode 120000 index 000000000..c522f9795 --- /dev/null +++ b/configs/8.0/packages/liburcu/stage_1 @@ -0,0 +1 @@ +../../../7.1/packages/liburcu/stage_1 \ No newline at end of file diff --git a/configs/8.0/packages/libvecpf/libvecpf.mk b/configs/8.0/packages/libvecpf/libvecpf.mk new file mode 120000 index 000000000..6493ca4b4 --- /dev/null +++ b/configs/8.0/packages/libvecpf/libvecpf.mk @@ -0,0 +1 @@ +../../../7.1/packages/libvecpf/libvecpf.mk \ No newline at end of file diff --git a/configs/8.0/packages/libvecpf/sources b/configs/8.0/packages/libvecpf/sources new file mode 120000 index 000000000..f9314d0ab --- /dev/null +++ b/configs/8.0/packages/libvecpf/sources @@ -0,0 +1 @@ +../../../7.1/packages/libvecpf/sources \ No newline at end of file diff --git a/configs/8.0/packages/libvecpf/specfile b/configs/8.0/packages/libvecpf/specfile new file mode 120000 index 000000000..d736da5d6 --- /dev/null +++ b/configs/8.0/packages/libvecpf/specfile @@ -0,0 +1 @@ +../../../7.1/packages/libvecpf/specfile \ No newline at end of file diff --git a/configs/8.0/packages/libvecpf/stage_1 b/configs/8.0/packages/libvecpf/stage_1 new file mode 120000 index 000000000..91a8f402f --- /dev/null +++ b/configs/8.0/packages/libvecpf/stage_1 @@ -0,0 +1 @@ +../../../7.1/packages/libvecpf/stage_1 \ No newline at end of file diff --git a/configs/8.0/packages/mpc/mpc.mk b/configs/8.0/packages/mpc/mpc.mk new file mode 120000 index 000000000..925f5d68b --- /dev/null +++ b/configs/8.0/packages/mpc/mpc.mk @@ -0,0 +1 @@ +../../../7.1/packages/mpc/mpc.mk \ No newline at end of file diff --git a/configs/8.0/packages/mpc/sources b/configs/8.0/packages/mpc/sources new file mode 100644 index 000000000..1220d7b5d --- /dev/null +++ b/configs/8.0/packages/mpc/sources @@ -0,0 +1,40 @@ +#!/usr/bin/env bash +# +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# MPC source package and build info +# ================================= +# + +ATSRC_PACKAGE_NAME="GNU MPC Library" +ATSRC_PACKAGE_VER=1.0.2 +ATSRC_PACKAGE_LICENSE="GPL 3.0" +ATSRC_PACKAGE_DOCLINK="http://www.multiprecision.org/index.php?prog=mpc&page=documentation" +ATSRC_PACKAGE_RELFIXES= +ATSRC_PACKAGE_STR_VER="${ATSRC_PACKAGE_NAME} ${ATSRC_PACKAGE_VER}" +ATSRC_PACKAGE_PRE="test -d mpc-${ATSRC_PACKAGE_VER}" +ATSRC_PACKAGE_CO=([0]="wget -N http://www.multiprecision.org/mpc/download/mpc-${ATSRC_PACKAGE_VER}.tar.gz" \ + [1]="wget -N ftp://ftp.unicamp.br/pub/gnu/mpc/mpc-${ATSRC_PACKAGE_VER}.tar.gz") +ATSRC_PACKAGE_POST="tar -xzf mpc-${ATSRC_PACKAGE_VER}.tar.gz" +ATSRC_PACKAGE_SRC=${AT_BASE}/sources/mpc-${ATSRC_PACKAGE_VER} +ATSRC_PACKAGE_WORK=${AT_WORK_PATH}/mpc +ATSRC_PACKAGE_MLS= +ATSRC_PACKAGE_ALOC= +ATSRC_PACKAGE_PATCHES= +ATSRC_PACKAGE_TARS= +ATSRC_PACKAGE_MAKE_CHECK= +ATSRC_PACKAGE_DISTRIB=yes +ATSRC_PACKAGE_BUNDLE=toolchain diff --git a/configs/8.0/packages/mpc/specfile b/configs/8.0/packages/mpc/specfile new file mode 120000 index 000000000..8a0b66190 --- /dev/null +++ b/configs/8.0/packages/mpc/specfile @@ -0,0 +1 @@ +../../../7.1/packages/mpc/specfile \ No newline at end of file diff --git a/configs/8.0/packages/mpc/stage_1 b/configs/8.0/packages/mpc/stage_1 new file mode 100644 index 000000000..ba76a312b --- /dev/null +++ b/configs/8.0/packages/mpc/stage_1 @@ -0,0 +1,83 @@ +#!/usr/bin/env bash +# +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +ATCFG_HOLD_TEMP_INSTALL='no' +ATCFG_HOLD_TEMP_BUILD='no' +# Build in a new directory +ATCFG_BUILD_STAGE_T='dir' +# Don't fail if stage final install place doesn't exist +if [[ "${cross_build}" == "yes" ]]; then + ATCFG_INSTALL_PEDANTIC="no" +fi + +# Pre configure settings or commands to run +atcfg_pre_configure() { + cc_64=${system_cc} + cxx_64=${system_cxx} + if [[ "${cross_build}" != "yes" ]]; then + prefix=${at_dest} + libdir=${at_dest}/lib + if [[ "${build_arch}" == ppc64* ]]; then + if [[ "${default_compiler}" == "32" ]]; then + cc_64="${gcc64}" + cxx_64="${gpp64}" + fi + libdir=${at_dest}/lib64 + fi + else + prefix=${tmp_dir} + libdir=${tmp_dir}/lib + fi +} + +# Configure command for native builds +atcfg_configure() { + CC=${cc_64} \ + CXX=${cxx_64} \ + CFLAGS="-g -O" \ + CXXFLAGS="-g -O" \ + ${ATSRC_PACKAGE_WORK}/configure --build=${host} \ + --host=${host} \ + --target=${host} \ + --prefix=${prefix} \ + --exec-prefix=${prefix} \ + --with-gmp-include=${prefix}/include \ + --with-gmp-lib=${libdir} \ + --with-mpfr-include=${prefix}/include \ + --with-mpfr-lib=${libdir} \ + --libdir=${libdir} \ + --disable-shared +} + +# Make build command +atcfg_make() { + ${SUB_MAKE} all +} + +# atcfg_make_check(): Don't add here, used in stage_2 + +# Install build command +atcfg_install () { + if [[ "${cross_build}" != "yes" ]]; then + make install DESTDIR=${install_place} + else + # In order to install the package at $prefix, we need to force + # DESTDIR value. Because if AT was built using DESTDIR, the + # value will be stored in MFLAGS. + make install DESTDIR="" + fi +} diff --git a/configs/8.0/packages/mpc/stage_2 b/configs/8.0/packages/mpc/stage_2 new file mode 120000 index 000000000..1ecbe71e7 --- /dev/null +++ b/configs/8.0/packages/mpc/stage_2 @@ -0,0 +1 @@ +../../../7.1/packages/mpc/stage_2 \ No newline at end of file diff --git a/configs/8.0/packages/mpfr/mpfr.mk b/configs/8.0/packages/mpfr/mpfr.mk new file mode 120000 index 000000000..35ea970b6 --- /dev/null +++ b/configs/8.0/packages/mpfr/mpfr.mk @@ -0,0 +1 @@ +../../../7.1/packages/mpfr/mpfr.mk \ No newline at end of file diff --git a/configs/8.0/packages/mpfr/sources b/configs/8.0/packages/mpfr/sources new file mode 100644 index 000000000..447a6ab40 --- /dev/null +++ b/configs/8.0/packages/mpfr/sources @@ -0,0 +1,41 @@ +#!/usr/bin/env bash +# +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# MPFR source package and build info +# ================================== +# + +ATSRC_PACKAGE_NAME="GNU MPFR Library" +ATSRC_PACKAGE_VER=3.1.2 +ATSRC_PACKAGE_REV=9243 +ATSRC_PACKAGE_LICENSE="GPL 3.0" +ATSRC_PACKAGE_DOCLINK="http://www.mpfr.org/mpfr-current/mpfr.html" +ATSRC_PACKAGE_RELFIXES= +ATSRC_PACKAGE_VERREV=${ATSRC_PACKAGE_VER}${ATSRC_PACKAGE_REV:+-${ATSRC_PACKAGE_REV}} +ATSRC_PACKAGE_STR_VER="${ATSRC_PACKAGE_NAME} ${ATSRC_PACKAGE_VERREV}" +ATSRC_PACKAGE_PRE="test -d mpfr-${ATSRC_PACKAGE_VERREV}" +ATSRC_PACKAGE_CO=([0]="svn co --revision ${ATSRC_PACKAGE_REV} svn://scm.gforge.inria.fr/svn/mpfr/branches/${ATSRC_PACKAGE_VER%.*} mpfr-${ATSRC_PACKAGE_VERREV}") +ATSRC_PACKAGE_POST="" +ATSRC_PACKAGE_SRC=${AT_BASE}/sources/mpfr-${ATSRC_PACKAGE_VERREV} +ATSRC_PACKAGE_WORK=${AT_WORK_PATH}/mpfr +ATSRC_PACKAGE_MLS= +ATSRC_PACKAGE_ALOC= +ATSRC_PACKAGE_PATCHES= +ATSRC_PACKAGE_TARS= +ATSRC_PACKAGE_MAKE_CHECK= +ATSRC_PACKAGE_DISTRIB=yes +ATSRC_PACKAGE_BUNDLE=toolchain diff --git a/configs/8.0/packages/mpfr/specfile b/configs/8.0/packages/mpfr/specfile new file mode 120000 index 000000000..5c277fc53 --- /dev/null +++ b/configs/8.0/packages/mpfr/specfile @@ -0,0 +1 @@ +../../../7.1/packages/mpfr/specfile \ No newline at end of file diff --git a/configs/8.0/packages/mpfr/stage_1 b/configs/8.0/packages/mpfr/stage_1 new file mode 100644 index 000000000..9b1dc1361 --- /dev/null +++ b/configs/8.0/packages/mpfr/stage_1 @@ -0,0 +1,97 @@ +#!/usr/bin/env bash +# +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# MPFR build parameters for stage 1 +# ================================= +# + +ATCFG_HOLD_TEMP_INSTALL='no' +ATCFG_HOLD_TEMP_BUILD='no' +# Build in a new directory +ATCFG_BUILD_STAGE_T='dir' +# Don't fail if stage final install place doesn't exist +if [[ "${cross_build}" == "yes" ]]; then + ATCFG_INSTALL_PEDANTIC="no" +fi + +# Pre configure settings or commands to run +atcfg_pre_configure() +{ + cc_64=${system_cc} + cxx_64=${system_cxx} + if [[ "${cross_build}" != "yes" ]]; then + prefix=${at_dest} + libdir=${at_dest}/lib + if [[ "${build_arch}" == ppc64* ]]; then + if [[ "${default_compiler}" == "32" ]]; then + cc_64="${gcc64}" + cxx_64="${gpp64}" + fi + libdir=${at_dest}/lib64 + fi + else + prefix=${tmp_dir} + libdir=${tmp_dir}/lib + fi + + if [[ ! -e "${ATSRC_PACKAGE_WORK}/configure" ]]; then + pushd ${ATSRC_PACKAGE_WORK} > /dev/null + ./autogen.sh || return 1 + popd > /dev/null + fi +} + +# Configure build command +atcfg_configure() { + CC=${cc_64} \ + CXX=${cxx_64} \ + CFLAGS="-g -O" \ + CXXFLAGS="-g -O" \ + ${ATSRC_PACKAGE_WORK}/configure --build=${host} \ + --host=${host} \ + --target=${host} \ + --prefix=${prefix} \ + --exec-prefix=${prefix} \ + --with-gmp-include=${prefix}/include \ + --with-gmp-lib=${libdir} \ + --libdir=${libdir} \ + --disable-shared +} + +# Make build command +atcfg_make() { + ${SUB_MAKE} all +} + +atcfg_make_check() { + # Package testing not done for cross build. + if [[ "${cross_build}" == 'no' ]]; then + ${SUB_MAKE} check + fi +} + +# Install build command +atcfg_install () { + if [[ "${cross_build}" != "yes" ]]; then + make install DESTDIR=${install_place} + else + # In order to install the package at $prefix, we need to force + # DESTDIR value. Because if AT was built using DESTDIR, the + # value will be stored in MFLAGS. + make install DESTDIR="" + fi +} diff --git a/configs/8.0/packages/mpfr/stage_2 b/configs/8.0/packages/mpfr/stage_2 new file mode 120000 index 000000000..19f903cd5 --- /dev/null +++ b/configs/8.0/packages/mpfr/stage_2 @@ -0,0 +1 @@ +../../../7.1/packages/mpfr/stage_2 \ No newline at end of file diff --git a/configs/8.0/packages/openssl/openssl.mk b/configs/8.0/packages/openssl/openssl.mk new file mode 120000 index 000000000..01b1feeb0 --- /dev/null +++ b/configs/8.0/packages/openssl/openssl.mk @@ -0,0 +1 @@ +../../../7.1/packages/openssl/openssl.mk \ No newline at end of file diff --git a/configs/8.0/packages/openssl/sources b/configs/8.0/packages/openssl/sources new file mode 120000 index 000000000..e58264cb8 --- /dev/null +++ b/configs/8.0/packages/openssl/sources @@ -0,0 +1 @@ +../../../7.1/packages/openssl/sources \ No newline at end of file diff --git a/configs/8.0/packages/openssl/specfile b/configs/8.0/packages/openssl/specfile new file mode 120000 index 000000000..3a47e67ea --- /dev/null +++ b/configs/8.0/packages/openssl/specfile @@ -0,0 +1 @@ +../../../7.1/packages/openssl/specfile \ No newline at end of file diff --git a/configs/8.0/packages/openssl/stage_1 b/configs/8.0/packages/openssl/stage_1 new file mode 100644 index 000000000..081b91595 --- /dev/null +++ b/configs/8.0/packages/openssl/stage_1 @@ -0,0 +1,123 @@ +#!/usr/bin/env bash +# +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +source ${AT_BASE}/scripts/utilities/bitsize_selection.sh + +# OpenSSL build parameters for stage 1 32 or 64 bits +# ========================================= +# + +ATCFG_HOLD_TEMP_INSTALL='no' +# Tell the build system to hold the temp build folder +ATCFG_HOLD_TEMP_BUILD='no' +# Build in a new directory +ATCFG_BUILD_STAGE_T='link' + +atcfg_pre_configure() { + PATH=${at_dest}/bin:${PATH} ./config --test-sanity +} + +atcfg_configure() { + local base_libdir=$(find_build_libdir ${AT_BIT_SIZE}) + local base_target=$(find_build_target ${AT_BIT_SIZE}) + local openssl_tgt="" + + # OpenSSL uses different architecture names + case "${base_target}" in + powerpc64-*) + openssl_tgt="linux-ppc64" + ;; + powerpc-*) + # For linux-ppc builds, OpenSSL uses the default -m + # value of the compiler. + openssl_tgt="linux-ppc -m32" + ;; + powerpc64le-*) + openssl_tgt="linux-ppc64le" + ;; + *) + echo "Unknown word size ${AT_BIT_SIZE}" + return 1 + ;; + esac + + PATH=${at_dest}/bin:${PATH} \ + AR="${at_dest}/bin/ar" \ + AS="${at_dest}/bin/as" \ + CC="${at_dest}/bin/gcc" \ + CXX="${at_dest}/bin/g++" \ + LD="${at_dest}/bin/ld" \ + RANLIB="${at_dest}/bin/ranlib" \ + ./Configure ${openssl_tgt} \ + --prefix="${at_dest}" --libdir="${base_libdir}" \ + no-idea no-rc5 shared threads zlib-dynamic \ + -Wa,--noexecstack -g +} + + +atcfg_pre_make() { + PATH=${at_dest}/bin:${PATH} make -j1 depend +} +# Make build command +atcfg_make() { + PATH=${at_dest}/bin:${PATH} make -j1 +} + +atcfg_make_check() { + # Package testing not done for cross build. + if [[ "${cross_build}" == 'no' ]]; then + PATH=${at_dest}/bin:${PATH} make -j1 test + fi +} + + +atcfg_install() { + local install_arg="install_sw" + if [[ "${AT_BIT_SIZE}" == "64" ]]; then + install_arg="install" + fi + PATH=${at_dest}/bin:${PATH} \ + make MANDIR="${at_dest}/share/man" \ + INSTALL_PREFIX=${install_place} -j1 ${install_arg} +} + +atcfg_post_install() { + # Save all libraries into a tar file + local base_libdir=$(find_build_libdir ${AT_BIT_SIZE}) + if [[ "${build_arch}" == "ppc" ]]; then + pushd "${install_transfer}/lib" + tar czf "${install_place}/openssl_32.tar.gz" * + popd + # Remove all installed built files + rm -rf "${install_transfer}/*" + mkdir "${install_transfer}/lib" + # Place saved libs on created final target + pushd "${install_transfer}/lib" + tar xzf "${install_place}/openssl_32.tar.gz" + popd + fi + set -e + if [[ "${cross_build}" == 'no' ]]; then + # Hack around to avoid ld.so.cache getting the libs from the + # system as ldconfig puts platform based directories preceding + # other directories. + ${AT_BASE}/scripts/utilities/create_lib_symlinks.sh \ + "${install_transfer}/${base_libdir}/" \ + "${install_transfer}/${base_libdir}/${build_load_arch}" + fi + set +e +} diff --git a/configs/8.0/packages/openssl/stage_optimized b/configs/8.0/packages/openssl/stage_optimized new file mode 120000 index 000000000..41a6733b9 --- /dev/null +++ b/configs/8.0/packages/openssl/stage_optimized @@ -0,0 +1 @@ +../../../7.1/packages/openssl/stage_optimized \ No newline at end of file diff --git a/configs/8.0/packages/oprofile/oprofile.mk b/configs/8.0/packages/oprofile/oprofile.mk new file mode 120000 index 000000000..4a54cf5f1 --- /dev/null +++ b/configs/8.0/packages/oprofile/oprofile.mk @@ -0,0 +1 @@ +../../../7.1/packages/oprofile/oprofile.mk \ No newline at end of file diff --git a/configs/8.0/packages/oprofile/sources b/configs/8.0/packages/oprofile/sources new file mode 100644 index 000000000..e46e557a1 --- /dev/null +++ b/configs/8.0/packages/oprofile/sources @@ -0,0 +1,41 @@ +#!/usr/bin/env bash +# +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# oProfile source package and build info +# ====================================== +# +ATSRC_PACKAGE_NAME="OProfile" +ATSRC_PACKAGE_VER=1.1.0 +ATSRC_PACKAGE_REV=fb3b082 +ATSRC_PACKAGE_LICENSE="GPL 2.0" +ATSRC_PACKAGE_DOCLINK="http://oprofile.sourceforge.net/docs/" +ATSRC_PACKAGE_RELFIXES= +ATSRC_PACKAGE_NAMESUFFIX="with Java Support" +ATSRC_PACKAGE_STR_VER="${ATSRC_PACKAGE_NAME} ${ATSRC_PACKAGE_VER}${ATSRC_PACKAGE_REV:+-${ATSRC_PACKAGE_REV}}" +ATSRC_PACKAGE_PRE="test -d oprofile-${ATSRC_PACKAGE_VER}${ATSRC_PACKAGE_REV:+-${ATSRC_PACKAGE_REV}}" +ATSRC_PACKAGE_CO=([0]="git archive --prefix=oprofile-${ATSRC_PACKAGE_VER}${ATSRC_PACKAGE_REV:+-${ATSRC_PACKAGE_REV}}/ --remote=git://git.code.sf.net/p/oprofile/oprofile ${ATSRC_PACKAGE_REV} > oprofile-${ATSRC_PACKAGE_VER}${ATSRC_PACKAGE_REV:+-${ATSRC_PACKAGE_REV}}.tar") +ATSRC_PACKAGE_GIT= +ATSRC_PACKAGE_POST="tar -xf oprofile-${ATSRC_PACKAGE_VER}${ATSRC_PACKAGE_REV:+-${ATSRC_PACKAGE_REV}}.tar" +ATSRC_PACKAGE_SRC="${AT_BASE}/sources/oprofile-${ATSRC_PACKAGE_VER}${ATSRC_PACKAGE_REV:+-${ATSRC_PACKAGE_REV}}" +ATSRC_PACKAGE_WORK=${AT_WORK_PATH}/oprofile +ATSRC_PACKAGE_ALOC= +ATSRC_PACKAGE_MLS= +ATSRC_PACKAGE_PATCHES= +ATSRC_PACKAGE_TARS= +ATSRC_PACKAGE_MAKE_CHECK= +ATSRC_PACKAGE_DISTRIB=yes +ATSRC_PACKAGE_BUNDLE=profile diff --git a/configs/8.0/packages/oprofile/specfile b/configs/8.0/packages/oprofile/specfile new file mode 120000 index 000000000..424c80aae --- /dev/null +++ b/configs/8.0/packages/oprofile/specfile @@ -0,0 +1 @@ +../../../7.1/packages/oprofile/specfile \ No newline at end of file diff --git a/configs/8.0/packages/oprofile/stage_1 b/configs/8.0/packages/oprofile/stage_1 new file mode 120000 index 000000000..b0ffec109 --- /dev/null +++ b/configs/8.0/packages/oprofile/stage_1 @@ -0,0 +1 @@ +../../../7.1/packages/oprofile/stage_1 \ No newline at end of file diff --git a/configs/8.0/packages/paflib/paflib.mk b/configs/8.0/packages/paflib/paflib.mk new file mode 120000 index 000000000..baa982f85 --- /dev/null +++ b/configs/8.0/packages/paflib/paflib.mk @@ -0,0 +1 @@ +../../../7.1/packages/paflib/paflib.mk \ No newline at end of file diff --git a/configs/8.0/packages/paflib/sources b/configs/8.0/packages/paflib/sources new file mode 120000 index 000000000..d3ba8be9e --- /dev/null +++ b/configs/8.0/packages/paflib/sources @@ -0,0 +1 @@ +../../../7.1/packages/paflib/sources \ No newline at end of file diff --git a/configs/8.0/packages/paflib/specfile b/configs/8.0/packages/paflib/specfile new file mode 120000 index 000000000..a6cbceed6 --- /dev/null +++ b/configs/8.0/packages/paflib/specfile @@ -0,0 +1 @@ +../../../7.1/packages/paflib/specfile \ No newline at end of file diff --git a/configs/8.0/packages/paflib/stage_1 b/configs/8.0/packages/paflib/stage_1 new file mode 120000 index 000000000..cf9977cd8 --- /dev/null +++ b/configs/8.0/packages/paflib/stage_1 @@ -0,0 +1 @@ +../../../7.1/packages/paflib/stage_1 \ No newline at end of file diff --git a/configs/8.0/packages/python/python.mk b/configs/8.0/packages/python/python.mk new file mode 120000 index 000000000..139266fc5 --- /dev/null +++ b/configs/8.0/packages/python/python.mk @@ -0,0 +1 @@ +../../../7.1/packages/python/python.mk \ No newline at end of file diff --git a/configs/8.0/packages/python/sources b/configs/8.0/packages/python/sources new file mode 100644 index 000000000..f1459d6ba --- /dev/null +++ b/configs/8.0/packages/python/sources @@ -0,0 +1,84 @@ +#!/usr/bin/env bash +# +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# GLIBC source package and build info +# =================================== +# + +ATSRC_PACKAGE_NAME="Python" +ATSRC_PACKAGE_VER=3.4.3 +ATSRC_PACKAGE_LICENSE="Python Software Foundation License 2" +ATSRC_PACKAGE_DOCLINK="http://docs.python.org/release/3.4/" +ATSRC_PACKAGE_RELFIXES= +ATSRC_PACKAGE_STR_VER="${ATSRC_PACKAGE_NAME} ${ATSRC_PACKAGE_VER}" +ATSRC_PACKAGE_PRE="test -d Python-${ATSRC_PACKAGE_VER}" +ATSRC_PACKAGE_CO=([0]="wget -N --no-check-certificate http://www.python.org/ftp/python/${ATSRC_PACKAGE_VER}/Python-${ATSRC_PACKAGE_VER}.tgz") +ATSRC_PACKAGE_POST="tar -zxf Python-${ATSRC_PACKAGE_VER}.tgz" +ATSRC_PACKAGE_SRC=${AT_BASE}/sources/Python-${ATSRC_PACKAGE_VER} +ATSRC_PACKAGE_WORK=${AT_WORK_PATH}/python +ATSRC_PACKAGE_MLS= +ATSRC_PACKAGE_PATCHES= +ATSRC_PACKAGE_ALOC= +ATSRC_PACKAGE_TARS= +ATSRC_PACKAGE_MAKE_CHECK= +ATSRC_PACKAGE_DISTRIB=no +ATSRC_PACKAGE_BUNDLE=toolchain + +atsrc_get_patches () +{ + at_get_patch \ + https://github.com/powertechpreview/powertechpreview/raw/master/Python%20Fixes/python-3.4.3-getlib64s1.tgz \ + 7cf0e3e1546682c57d02a8c80ff3f292 || return ${?} + + at_get_patch \ + https://bugs.python.org/file38791/dh1024.patch \ + 8bc4f980dcd3f93b7b853f53c32bffec || return ${?} + + at_get_patch \ + http://bugs.python.org/file40170/fix_stack_overflow.patch \ + 51f3968a6417caa54f425ffd1b7d7784 || return ${?} + + at_get_patch \ + https://github.com/powertechpreview/powertechpreview/raw/master/Python%20Fixes/python3-imap_tz.tgz \ + 7a7c8e65ae9de6ac1e504dd76b37bc76 || return ${?} +} + +atsrc_apply_patches () +{ + tar zxf python-3.4.3-getlib64s1.tgz || return ${?} + tar zxf python3-imap_tz.tgz || return ${?} + + patch -p1 < python-3.4.3-getlib64s1.patch || return ${?} + patch -p1 < 0001-Specify-the-summer-time-value-on-test_imaplib.patch \ + || return ${?} + patch -p1 < fix_stack_overflow.patch || return ${?} + patch -p1 < dh1024.patch || return ${?} +} + +atsrc_package_verify_make_log () +{ + if [[ -n "${1}" ]]; then + modline=$(cat "${1}" | awk '/Logging the following command/ { line = ""; getline ts; } \ + /Failed to build these modules:/ { getline line; } \ + END { print line; }') + if [[ "${modline}" != "" ]]; then + echo "Python modules not built: ${modline}" + return 1 + fi + fi + return 0 +} diff --git a/configs/8.0/packages/python/specfile b/configs/8.0/packages/python/specfile new file mode 120000 index 000000000..ac771cdfb --- /dev/null +++ b/configs/8.0/packages/python/specfile @@ -0,0 +1 @@ +../../../7.1/packages/python/specfile \ No newline at end of file diff --git a/configs/8.0/packages/python/stage_1 b/configs/8.0/packages/python/stage_1 new file mode 100644 index 000000000..3fc631b9b --- /dev/null +++ b/configs/8.0/packages/python/stage_1 @@ -0,0 +1,77 @@ +#!/usr/bin/env bash +# +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# Python build parameters for stage 1 32 bits +# =========================================== +# + +# Tell the build system to hold the temp install folder +ATCFG_HOLD_TEMP_INSTALL='no' +# Tell the build system to hold the temp build folder +ATCFG_HOLD_TEMP_BUILD='no' +# Build in a new directory +ATCFG_BUILD_STAGE_T='dir' + +atcfg_post_hacks() { + rm -f ${install_transfer}/lib/libstdc++.so.6.0.*-gdb.py \ + ${install_transfer}/lib64/libstdc++.so.6.0.*-gdb.py +} + +atcfg_configure() { + PATH=${at_dest}/bin:${PATH} \ + CC="${at_dest}/bin/gcc -m${compiler}" \ + CXX="${at_dest}/bin/g++ -m${compiler}" \ + CFLAGS="-g -O2 -Wformat" \ + CXXFLAGS="-g -O2" \ + ${ATSRC_PACKAGE_WORK}/configure \ + --build=${target} \ + --host=${target} \ + --target=${target} \ + --prefix=${at_dest} \ + --exec-prefix=${at_dest} \ + --libdir="${at_dest}/lib${compiler##32}" \ + --enable-shared +} + +atcfg_make() { + PATH=${at_dest}/bin:${PATH} ${SUB_MAKE} +} + +atcfg_make_check() { + # Package testing not done on a cross build. + + if [[ "${cross_build}" == 'no' ]]; then + PATH=${at_dest}/bin:${PATH} ${SUB_MAKE} test + fi +} + +atcfg_install() { + PATH=${at_dest}/bin:${PATH} \ + ${SUB_MAKE} DESTDIR="${install_place}" install libainstall +} + +atcfg_post_install() { + # Some projects (Boost) can't identify the Python headers directory + # when it's named pythonX.Ym. So, it's necessary to create the + # symlink pythonX.Y -> pythonX.Ym. + if [ -d ${install_transfer}/include/python*m ]; then + pushd ${install_transfer}/include > /dev/null + local dir=$(ls -1d python*m | head -n 1) + ln -s ${dir} ${dir/%m/} + popd + fi +} diff --git a/configs/8.0/packages/tbb/sources b/configs/8.0/packages/tbb/sources new file mode 120000 index 000000000..646ce7484 --- /dev/null +++ b/configs/8.0/packages/tbb/sources @@ -0,0 +1 @@ +../../../7.1/packages/tbb/sources \ No newline at end of file diff --git a/configs/8.0/packages/tbb/specfile b/configs/8.0/packages/tbb/specfile new file mode 120000 index 000000000..13ea2055a --- /dev/null +++ b/configs/8.0/packages/tbb/specfile @@ -0,0 +1 @@ +../../../7.1/packages/tbb/specfile \ No newline at end of file diff --git a/configs/8.0/packages/tbb/stage_1 b/configs/8.0/packages/tbb/stage_1 new file mode 120000 index 000000000..62ef73956 --- /dev/null +++ b/configs/8.0/packages/tbb/stage_1 @@ -0,0 +1 @@ +../../../7.1/packages/tbb/stage_1 \ No newline at end of file diff --git a/configs/8.0/packages/tbb/tbb.mk b/configs/8.0/packages/tbb/tbb.mk new file mode 120000 index 000000000..84e6c00c0 --- /dev/null +++ b/configs/8.0/packages/tbb/tbb.mk @@ -0,0 +1 @@ +../../../7.1/packages/tbb/tbb.mk \ No newline at end of file diff --git a/configs/8.0/packages/tcmalloc/sources b/configs/8.0/packages/tcmalloc/sources new file mode 100644 index 000000000..85127f98b --- /dev/null +++ b/configs/8.0/packages/tcmalloc/sources @@ -0,0 +1,56 @@ +#!/usr/bin/env bash +# +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# Tcmalloc source package and build info +# ================================== +# + +ATSRC_PACKAGE_NAME="TCMalloc" +ATSRC_PACKAGE_VER=2.2.1 +ATSRC_PACKAGE_REV=1dedb98 +ATSRC_PACKAGE_LICENSE="BSD License" +ATSRC_PACKAGE_DOCLINK="http://htmlpreview.github.io/?https://github.com/gperftools/gperftools/blob/master/doc/tcmalloc.html" +ATSRC_PACKAGE_RELFIXES= +ATSRC_PACKAGE_STR_VER="${ATSRC_PACKAGE_NAME} ${ATSRC_PACKAGE_VER}${ATSRC_PACKAGE_REV:+-${ATSRC_PACKAGE_REV}}" +ATSRC_PACKAGE_VERID="${ATSRC_PACKAGE_VER}${ATSRC_PACKAGE_REV:+-${ATSRC_PACKAGE_REV}}" +ATSRC_PACKAGE_PRE="test -d gperftools-${ATSRC_PACKAGE_VERID}" +ATSRC_PACKAGE_CO=([0]="wget -O gperftools-${ATSRC_PACKAGE_VERID}.tar.gz https://github.com/p-gperftools/gperftools/archive/${ATSRC_PACKAGE_REV}.tar.gz") +ATSRC_PACKAGE_GIT="" +# Use --transform to give a better name to Gperftools directory. +ATSRC_PACKAGE_POST="tar xzf gperftools-${ATSRC_PACKAGE_VERID}.tar.gz --transform=s/gperftools-${ATSRC_PACKAGE_REV}[^\\/]*/gperftools-${ATSRC_PACKAGE_VERID}/" +ATSRC_PACKAGE_SRC="${AT_BASE}/sources/gperftools-${ATSRC_PACKAGE_VERID}" +ATSRC_PACKAGE_WORK=${AT_WORK_PATH}/gperftools +ATSRC_PACKAGE_MLS="" +ATSRC_PACKAGE_ALOC="" +ATSRC_PACKAGE_PATCHES="" +ATSRC_PACKAGE_TARS="" +ATSRC_PACKAGE_MAKE_CHECK="" +ATSRC_PACKAGE_DISTRIB=no +ATSRC_PACKAGE_BUNDLE=toolchain + +atsrc_get_patches () +{ + at_get_patch \ + https://github.com/gperftools/gperftools/commit/7852eeb75b9375cf52a7da01be044da6e915dd08.patch \ + f41cc9694a060099bef28a13043a1dc9 || return ${?} +} + +atsrc_apply_patches () +{ + patch -p1 < 7852eeb75b9375cf52a7da01be044da6e915dd08.patch \ + || return ${?} +} diff --git a/configs/8.0/packages/tcmalloc/specfile b/configs/8.0/packages/tcmalloc/specfile new file mode 120000 index 000000000..64603a4be --- /dev/null +++ b/configs/8.0/packages/tcmalloc/specfile @@ -0,0 +1 @@ +../../../7.1/packages/tcmalloc/specfile \ No newline at end of file diff --git a/configs/8.0/packages/tcmalloc/stage_1 b/configs/8.0/packages/tcmalloc/stage_1 new file mode 120000 index 000000000..ce5813222 --- /dev/null +++ b/configs/8.0/packages/tcmalloc/stage_1 @@ -0,0 +1 @@ +../../../7.1/packages/tcmalloc/stage_1 \ No newline at end of file diff --git a/configs/8.0/packages/tcmalloc/tcmalloc.mk b/configs/8.0/packages/tcmalloc/tcmalloc.mk new file mode 120000 index 000000000..444c76723 --- /dev/null +++ b/configs/8.0/packages/tcmalloc/tcmalloc.mk @@ -0,0 +1 @@ +../../../7.1/packages/tcmalloc/tcmalloc.mk \ No newline at end of file diff --git a/configs/8.0/packages/valgrind/sources b/configs/8.0/packages/valgrind/sources new file mode 100644 index 000000000..dc0efe1c3 --- /dev/null +++ b/configs/8.0/packages/valgrind/sources @@ -0,0 +1,79 @@ +#!/usr/bin/env bash +# +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# Valgrind source package and build info +# ====================================== +# + +ATSRC_PACKAGE_NAME="Valgrind" +ATSRC_PACKAGE_VER=3.10.1 +ATSRC_PACKAGE_REV= +ATSRC_PACKAGE_LICENSE="GPL 2.0" +ATSRC_PACKAGE_DOCLINK="http://valgrind.org/docs/" +ATSRC_PACKAGE_RELFIXES= +ATSRC_PACKAGE_STR_VER="${ATSRC_PACKAGE_NAME} ${ATSRC_PACKAGE_VER}" +ATSRC_PACKAGE_PRE="test -d valgrind-${ATSRC_PACKAGE_VER}" +ATSRC_PACKAGE_CO=([0]="wget http://valgrind.org/downloads/valgrind-${ATSRC_PACKAGE_VER}.tar.bz2") +ATSRC_PACKAGE_POST="tar -xjf valgrind-${ATSRC_PACKAGE_VER}.tar.bz2" +ATSRC_PACKAGE_SRC="${AT_BASE}/sources/valgrind-${ATSRC_PACKAGE_VER}" +ATSRC_PACKAGE_WORK=${AT_WORK_PATH}/valgrind +ATSRC_PACKAGE_MLS="" +ATSRC_PACKAGE_ALOC='' +ATSRC_PACKAGE_PATCHES='' +ATSRC_PACKAGE_TARS='' +ATSRC_PACKAGE_MAKE_CHECK= +ATSRC_PACKAGE_DISTRIB=yes +ATSRC_PACKAGE_BUNDLE=profile + +atsrc_get_patches () +{ + at_get_patch \ + https://github.com/powertechpreview/powertechpreview/raw/master/Valgrind%20iTrace%20Patches/3.10/vg-310-itrace.v1.tgz \ + a50c818e110dbf5408a17a3616d52466 || return ${?} + at_get_patch \ + https://github.com/powertechpreview/powertechpreview/raw/master/Valgrind%20iTrace%20Patches/3.10/vg-3101-itrace-patches.tgz \ + 77c7a75fc37002c21a58ca712caaa721 || return ${?} + at_get_patch \ + https://github.com/powertechpreview/powertechpreview/raw/master/Valgrind%20Core%20Patches/3.10.1/vg-3101-bz-fixes.tgz \ + 9be2b5dacd637d9fde83b6473cfd4a75 || return ${?} +} + +atsrc_apply_patches () +{ + tar xzf vg-310-itrace.v1.tgz || return ${?} + tar xzf vg-3101-itrace-patches.tgz || return ${?} + tar xzf vg-3101-bz-fixes.tgz || return ${?} + + patch -p1 < vg-310-itrace.patch || return ${?} + # We skip the first patch in this patch set, because it has already + # been applied by the previous patch set. + # patch -p1 < 0001-Itrace-patch-for-the-AT-8.0-release-on-top-of-the-Va.patch || return ${?} + # The remaining patches are indeed applied + patch -p1 < 0002-itrace-patch-1.patch || return ${?} + patch -p1 < 0003-itrace-patch-2.patch || return ${?} + patch -p1 < 0004-itrace-patch-3.patch || return ${?} + patch -p1 < 0005-itrace-patch-4.patch || return ${?} + patch -p1 < 0012-itrace-patch-Only-needed-to-run-itrace-regression-te.patch || return ${?} + + patch -p1 < 0006-valgrind-bugzilla-343597.patch || return ${?} + patch -p1 < 0007-valgrind-bugzilla-345695.patch || return ${?} + patch -p1 < 0008-Valgrind-Bugzilla-346474.patch || return ${?} + patch -p1 < 0009-valgrind-bugzilla-346270.patch || return ${?} + patch -p1 < 0010-valgrind-bugzilla-346267.patch || return ${?} + patch -p1 < 0011-valgrind-bugzilla-346324.patch || return ${?} + patch -p1 < 0013-valgrind-bugzilla-345695.patch || return ${?} +} diff --git a/configs/8.0/packages/valgrind/specfile b/configs/8.0/packages/valgrind/specfile new file mode 120000 index 000000000..e7bdf873f --- /dev/null +++ b/configs/8.0/packages/valgrind/specfile @@ -0,0 +1 @@ +../../../7.1/packages/valgrind/specfile \ No newline at end of file diff --git a/configs/8.0/packages/valgrind/stage_1 b/configs/8.0/packages/valgrind/stage_1 new file mode 120000 index 000000000..b2be8d89f --- /dev/null +++ b/configs/8.0/packages/valgrind/stage_1 @@ -0,0 +1 @@ +../../../7.1/packages/valgrind/stage_1 \ No newline at end of file diff --git a/configs/8.0/packages/valgrind/valgrind.mk b/configs/8.0/packages/valgrind/valgrind.mk new file mode 120000 index 000000000..07a24614d --- /dev/null +++ b/configs/8.0/packages/valgrind/valgrind.mk @@ -0,0 +1 @@ +../../../7.1/packages/valgrind/valgrind.mk \ No newline at end of file diff --git a/configs/8.0/packages/zlib/sources b/configs/8.0/packages/zlib/sources new file mode 100644 index 000000000..3ce2dc0e3 --- /dev/null +++ b/configs/8.0/packages/zlib/sources @@ -0,0 +1,40 @@ +#!/usr/bin/env bash +# +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# ZLIB source package and build info +# ================================== +# + +ATSRC_PACKAGE_NAME="ZLIB Compression Library" +ATSRC_PACKAGE_VER=1.2.8 +ATSRC_PACKAGE_LICENSE="Zlib License" +ATSRC_PACKAGE_DOCLINK="http://www.zlib.net/manual.html" +ATSRC_PACKAGE_RELFIXES= +ATSRC_PACKAGE_STR_VER="${ATSRC_PACKAGE_NAME} ${ATSRC_PACKAGE_VER}" +ATSRC_PACKAGE_PRE="test -d zlib-${ATSRC_PACKAGE_VER}" +ATSRC_PACKAGE_CO=([0]="wget -N http://zlib.net/zlib-${ATSRC_PACKAGE_VER}.tar.gz" \ + [1]="wget -N http://downloads.sourceforge.net/project/libpng/zlib/${ATSRC_PACKAGE_VER}/zlib-${ATSRC_PACKAGE_VER}.tar.gz") +ATSRC_PACKAGE_POST="tar -xzf zlib-${ATSRC_PACKAGE_VER}.tar.gz" +ATSRC_PACKAGE_SRC="${AT_BASE}/sources/zlib-${ATSRC_PACKAGE_VER}" +ATSRC_PACKAGE_WORK=${AT_WORK_PATH}/zlib +ATSRC_PACKAGE_MLS="" +ATSRC_PACKAGE_ALOC="" +ATSRC_PACKAGE_PATCHES="" +ATSRC_PACKAGE_TARS="" +ATSRC_PACKAGE_MAKE_CHECK="" +ATSRC_PACKAGE_DISTRIB=no +ATSRC_PACKAGE_BUNDLE=toolchain diff --git a/configs/8.0/packages/zlib/specfile b/configs/8.0/packages/zlib/specfile new file mode 120000 index 000000000..c10e93855 --- /dev/null +++ b/configs/8.0/packages/zlib/specfile @@ -0,0 +1 @@ +../../../7.1/packages/zlib/specfile \ No newline at end of file diff --git a/configs/8.0/packages/zlib/stage_1 b/configs/8.0/packages/zlib/stage_1 new file mode 120000 index 000000000..c24bb8fd8 --- /dev/null +++ b/configs/8.0/packages/zlib/stage_1 @@ -0,0 +1 @@ +../../../7.1/packages/zlib/stage_1 \ No newline at end of file diff --git a/configs/8.0/packages/zlib/stage_optimized b/configs/8.0/packages/zlib/stage_optimized new file mode 120000 index 000000000..dd6cc166b --- /dev/null +++ b/configs/8.0/packages/zlib/stage_optimized @@ -0,0 +1 @@ +../../../7.1/packages/zlib/stage_optimized \ No newline at end of file diff --git a/configs/8.0/packages/zlib/zlib.mk b/configs/8.0/packages/zlib/zlib.mk new file mode 120000 index 000000000..9d3b93643 --- /dev/null +++ b/configs/8.0/packages/zlib/zlib.mk @@ -0,0 +1 @@ +../../../7.1/packages/zlib/zlib.mk \ No newline at end of file diff --git a/configs/8.0/release_notes/release_notes-body.html b/configs/8.0/release_notes/release_notes-body.html new file mode 100644 index 000000000..57a671694 --- /dev/null +++ b/configs/8.0/release_notes/release_notes-body.html @@ -0,0 +1,340 @@ + + + + + + + + Release Notes for the Advance Toolchain __VERSION_RELEASE__ + + + +
    +
    + +

    Release Notes for the Advance Toolchain __VERSION_RELEASE__

    +
    +
    + | Features + | Previous Releases + | Support + | Installation + | Documentation + | Legal Notices | +
    +
    + __FEATURES__ + back to top +
    + +

    Support

    +

    Customer support for the Advance Toolchain (AT) is provided in one of three ways:

    +
      +
    1. If you are using AT as directed by an IBM product team (ex.: IBM XL Compiler or PowerVM Lx86) please report suspected AT problems to IBM Support using that product name and entitlement.
    2. +
    3. IBM's Support Line for Linux Offerings now provides support for the Advance Toolchain as well. If you have a contract with a Support Line for Linux, place a call to IBM Support, e.g. for United States: +
        +
      • Dial 1-800-426-IBM-SERV
      • +
      • Option #2 (Other business products or solutions)
      • +
      • Option #2 (Software)
      • +
      • Option #7 (Other OS/Linux)
      • +
      + For other countries click here. +
    4. +
    5. All other users can use an electronic forum that is monitored Monday through Friday. For questions regarding the use of or to report a suspected defect in AT, click here. +
        +
      • Log in.
      • +
      • Start a topic.
      • +
      • Enter and save your question or problem.
      • +
      • An initial response will be attempted within 2 business days.
      • +
    6. +
    + back to top +
    + +

    Installation

    + __INST__ +

    Manual installation for rpms

    +

    If you are installing the rpms manually you will need to install them in the following order (due to prerequisites):

    +
    +advance-toolchain-__VERSION__-runtime-__VERSION_RELEASE__
    +advance-toolchain-__VERSION__-devel-__VERSION_RELEASE__
    +advance-toolchain-__VERSION__-perf-__VERSION_RELEASE__
    +advance-toolchain-__VERSION__-mcore-libs-__VERSION_RELEASE__
    +advance-toolchain-__VERSION__-runtime-at__OLD_VERSION__-compat-__VERSION_RELEASE__
    +				
    +

    If you are updating a previous installation, you need to update as a batch, so rpm can solve the dependencies, i.e.:

    +
    +rpm -Uvh advance-toolchain-__VERSION__-runtime-__VERSION_RELEASE__.ppc64.rpm \
    +         advance-toolchain-__VERSION__-devel-__VERSION_RELEASE__.ppc64.rpm \
    +         advance-toolchain-__VERSION__-perf-__VERSION_RELEASE__.ppc64.rpm \
    +         advance-toolchain-__VERSION__-mcore-__VERSION_RELEASE__.ppc64.rpm \
    +         advance-toolchain-__VERSION__-runtime-at__OLD_VERSION__-compat-__VERSION_RELEASE__.ppc64.rpm
    +				
    +

    The rpm command should always be run as root. Failure to do so will result in an error similar to this:

    +

    + error: can't create transaction lock on /var/lib/rpm/__db.000 +

    +

    Important notes

    +
      +
    • Timezone files: If you need to use something different than Factory, then you should copy the timezone file you want from /opt/__VERSION__/share/zoneinfo to /opt/__VERSION__/etc/localtime
    • +
    • advance-toolchain-__VERSION__-runtime-compat-__VERSION_RELEASE__: DO NOT INSTALL it on RHEL7 and beyond. These are intended for runtime compatibility on RHEL6 only (see below).
    • +
    +

    Installation for runtime compatibility on previous distribution versions

    +

    Users running applications on previous distributions of SLES or RHEL may install the compatibility rpm advance-toolchain-__VERSION__-runtime-compat-__VERSION_RELEASE__ in order to get the Advance Toolchain runtime libraries.

    +

    Installation of the cross-compiler (x86)

    +

    You can download advance-toolchain-__VERSION__-cross-__VERSION_RELEASE__ and install in a x86 machine to build Power binaries on it. Binaries generated by the cross-compiler will run on a Power system with the same version of the Advance Toolchain installed.

    + back to top +
    + +

    Documentation

    +

    The official documentation for the Advance Toolchain is available at the IBM Power Linux Community website.

    + back to top +
    + + +

    Legal notices

    +

    Each component of Advance Toolchain has its own license, they are all covered by this list:

    + +

    The licenses for each GPL and LGPL code segment can be found in the advance-toolchain-__VERSION__-src-__VERSION_RELEASE__.tgz file in the repository, the others are listed below.

    +

    In order to comply with the GPL and LGPL licenses, the source code for the following packages is available:

    +
      +
    • binutils (GPL 2.0)
    • +
    • gcc (GPL 3.0)
    • +
    • gdb (GPL 2.0)
    • +
    • glibc (LGPL 2.1)
    • +
    • gmp (GPL 3.0)
    • +
    • Threading Building Blocks (GPL 2.0)
    • +
    • libdfp (LGPL 2.1)
    • +
    • libhugetlbfs (LGPL 2.1)
    • +
    • libvecpf (LGPL 2.1)
    • +
    • linux kernel (GPL 2.0)
    • +
    • mpc (GPL 3.0)
    • +
    • mpfr (GPL 3.0)
    • +
    • oprofile (GPL 2.0)
    • +
    • Userspace RCU (LGPL 2.1)
    • +
    • Valgrind (GPL 2.0)
    • +
    +

    Boost

    +

    + Boost Software License - Version 1.0 - August 17th, 2003
    +
    + Permission is hereby granted, free of charge, to any person or organization
    + obtaining a copy of the software and accompanying documentation covered by
    + this license (the "Software") to use, reproduce, display, distribute,
    + execute, and transmit the Software, and to prepare derivative works of the
    + Software, and to permit third-parties to whom the Software is furnished to
    + do so, all subject to the following:
    +
    + The copyright notices in the Software and this entire statement, including
    + the above license grant, this restriction and the following disclaimer,
    + must be included in all copies of the Software, in whole or in part, and
    + all derivative works of the Software, unless such copies or derivative
    + works are solely in the form of machine-executable object code generated by
    + a source language processor.
    +
    + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
    + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
    + FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
    + SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
    + FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
    + ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
    + DEALINGS IN THE SOFTWARE. +

    +

    Expat (MIT)
    + Copyright (c) 1998, 1999, 2000 Thai Open Source Software Center Ltd and Clark Cooper
    + Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006 Expat maintainers.

    +

    + Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
    +
    + The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
    +
    + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +

    + +

    + Go Tools (BSD)
    + Copyright (c) 2012 The Go Authors. All rights reserved. +

    +

    + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are + met:
    +
    + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer.
    + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following disclaimer + in the documentation and/or other materials provided with the + distribution.
    + * Neither the name of Google Inc. nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission.
    +
    + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +

    + +

    Gperftools (BSD)
    + Copyright (c) 2005, Google Inc. All rights reserved.

    +

    + Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
    +
    + * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
    + * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
    + * Neither the name of Google Inc. nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
    +
    + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +

    + +

    Libauxv (BSD)
    +

    +

    + Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
    +
    + * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
    + * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
    + * Neither the name of the IBM Corporation nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
    +
    + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL IBM CORPORATION BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +

    + +

    Libpfm (MIT)
    + Copyright (c) 2002-2006 Hewlett-Packard Development Company, L.P.

    +

    + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions:
    +
    + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software.
    +
    + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, + INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A + PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT + HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF + CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE + OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
    +

    + +

    OpenSSL (BSD)
    + Copyright (c) 1998-2011 The OpenSSL Project. All rights reserved.
    + Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com). All rights reserved.

    +

    * Note: this distribution of OpenSSL does not include the IDEA and RC5 algorithms

    +

    + Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
    +
    + 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
    +
    + 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
    +
    + 3. All advertising materials mentioning features or use of this software must display the following acknowledgment: "This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
    +
    + 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to endorse or promote products derived from this software without prior written permission. For written permission, please contact openssl-core@openssl.org.
    +
    + 5. Products derived from this software may not be called "OpenSSL" nor may "OpenSSL" appear in their names without prior written permission of the OpenSSL Project.
    +
    + 6. Redistributions of any form whatsoever must retain the following acknowledgment: "This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit (http://www.openssl.org/)"
    +
    + THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
    +
    + This product includes cryptographic software written by Eric Young (eay@cryptsoft.com). This product includes software written by Tim Hudson (tjh@cryptsoft.com). +

    + +

    + PAFLib (MIT)
    + Copyright IBM Corp. 2013 +

    +

    +Permission is hereby granted, free of charge, to any person obtaining a copy
    +of this software and associated documentation files (the "Software"), to deal
    +in the Software without restriction, including without limitation the rights
    +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
    +copies of the Software, and to permit persons to whom the Software is
    +furnished to do so, subject to the following conditions:
    +
    +The above copyright notice and this permission notice shall be included in
    +all copies or substantial portions of the Software.
    +
    +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
    +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
    +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
    +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
    +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM
    , +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
    +THE SOFTWARE. +

    + +

    Python
    + Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Python Software Foundation; All Rights Reserved

    +

    + PYTHON SOFTWARE FOUNDATION LICENSE VERSION 2
    + --------------------------------------------
    +
    + 1. This LICENSE AGREEMENT is between the Python Software Foundation ("PSF"), and the Individual or Organization ("Licensee") accessing and otherwise using this software ("Python") in source or binary form and its associated documentation.
    +
    + 2. Subject to the terms and conditions of this License Agreement, PSF hereby grants Licensee a nonexclusive, royalty-free, world-wide license to reproduce, analyze, test, perform and/or display publicly, prepare derivative works, distribute, and otherwise use Python alone or in any derivative version, provided, however, that PSF's License Agreement and PSF's notice of copyright, i.e., "Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Python Software Foundation; All Rights Reserved" are retained in Python alone or in any derivative version prepared by Licensee.
    +
    + 3. In the event Licensee prepares a derivative work that is based on or incorporates Python or any part thereof, and wants to make the derivative work available to others as provided herein, then Licensee hereby agrees to include in any such work a brief summary of the changes made to Python.
    +
    + 4. PSF is making Python available to Licensee on an "AS IS" basis. PSF MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED. BY WAY OF EXAMPLE, BUT NOT LIMITATION, PSF MAKES NO AND DISCLAIMS ANY REPRESENTATION OR WARRANTY OF MERCHANTABILITY OR FITNESS FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF PYTHON WILL NOT INFRINGE ANY THIRD PARTY RIGHTS.
    +
    + 5. PSF SHALL NOT BE LIABLE TO LICENSEE OR ANY OTHER USERS OF PYTHON FOR ANY INCIDENTAL, SPECIAL, OR CONSEQUENTIAL DAMAGES OR LOSS AS A RESULT OF MODIFYING, DISTRIBUTING, OR OTHERWISE USING PYTHON, OR ANY DERIVATIVE THEREOF, EVEN IF ADVISED OF THE POSSIBILITY THEREOF.
    +
    + 6. This License Agreement will automatically terminate upon a material breach of its terms and conditions.
    +
    + 7. Nothing in this License Agreement shall be deemed to create any relationship of agency, partnership, or joint venture between PSF and Licensee. This License Agreement does not grant permission to use PSF trademarks or trade name in a trademark sense to endorse or promote products or services of Licensee, or any third party.
    +
    + 8. By copying, installing or otherwise using Python, Licensee agrees to be bound by the terms and conditions of this License Agreement. +

    +

    SPHDE (EPL)
    + Copyright (c) 2012 IBM Corporation

    +

    Distributed through the Eclipse Public License 1.0. The source code for this project is available on GitHub.

    + +

    ZLIB Compression Library
    + (C) 1995-2013 Jean-loup Gailly and Mark Adler +

    +

    + This software is provided 'as-is', without any express or implied
    + warranty. In no event will the authors be held liable for any damages
    + arising from the use of this software.
    +
    + Permission is granted to anyone to use this software for any purpose,
    + including commercial applications, and to alter it and redistribute it
    + freely, subject to the following restrictions:
    +
    + 1. The origin of this software must not be misrepresented; you must not
    + claim that you wrote the original software. If you use this software
    + in a product, an acknowledgment in the product documentation would be
    + appreciated but is not required.
    + 2. Altered source versions must be plainly marked as such, and must not be
    + misrepresented as being the original software.
    + 3. This notice may not be removed or altered from any source distribution.
    +

    +
    +
    + + diff --git a/configs/8.0/release_notes/release_notes-features.html b/configs/8.0/release_notes/release_notes-features.html new file mode 120000 index 000000000..c6800b9f1 --- /dev/null +++ b/configs/8.0/release_notes/release_notes-features.html @@ -0,0 +1 @@ +../../7.1/release_notes/release_notes-features.html \ No newline at end of file diff --git a/configs/8.0/release_notes/release_notes-group_entry.html b/configs/8.0/release_notes/release_notes-group_entry.html new file mode 120000 index 000000000..0123d9d21 --- /dev/null +++ b/configs/8.0/release_notes/release_notes-group_entry.html @@ -0,0 +1 @@ +../../7.1/release_notes/release_notes-group_entry.html \ No newline at end of file diff --git a/configs/8.0/release_notes/release_notes-inst.html b/configs/8.0/release_notes/release_notes-inst.html new file mode 120000 index 000000000..852fdf66f --- /dev/null +++ b/configs/8.0/release_notes/release_notes-inst.html @@ -0,0 +1 @@ +../../7.1/release_notes/release_notes-inst.html \ No newline at end of file diff --git a/configs/8.0/release_notes/release_notes-online_doc.html b/configs/8.0/release_notes/release_notes-online_doc.html new file mode 120000 index 000000000..863d3feec --- /dev/null +++ b/configs/8.0/release_notes/release_notes-online_doc.html @@ -0,0 +1 @@ +../../7.1/release_notes/release_notes-online_doc.html \ No newline at end of file diff --git a/configs/8.0/release_notes/release_notes-package_line.html b/configs/8.0/release_notes/release_notes-package_line.html new file mode 120000 index 000000000..d76bf0489 --- /dev/null +++ b/configs/8.0/release_notes/release_notes-package_line.html @@ -0,0 +1 @@ +../../7.1/release_notes/release_notes-package_line.html \ No newline at end of file diff --git a/configs/8.0/release_notes/release_notes-style.html b/configs/8.0/release_notes/release_notes-style.html new file mode 120000 index 000000000..6e98091d3 --- /dev/null +++ b/configs/8.0/release_notes/release_notes-style.html @@ -0,0 +1 @@ +../../7.1/release_notes/release_notes-style.html \ No newline at end of file diff --git a/configs/8.0/release_notes/relfixes.html b/configs/8.0/release_notes/relfixes.html new file mode 100644 index 000000000..0a9fade13 --- /dev/null +++ b/configs/8.0/release_notes/relfixes.html @@ -0,0 +1,177 @@ +
  • POWER8 enablement.
  • +
  • POWER8 Optimized scheduler.
  • +
  • Requires at least POWER7.
  • +
  • POWER8 Transactional Memory enablement.
  • +
  • POWER8 Crypto Operations enablement.
  • +
  • POWER8 Fusion enablement.
  • +
  • POWER8 optimized system libraries.
  • +
  • GCC creates binaries using --mcpu=power7 --mtune=power8 by default.
  • +
  • Support for AES instructions on OpenSSL.
  • +
  • Support for Go Programming Language.
  • + +

    Apart from package versions listed above:

    + +

    New features in 8.0-7

    + + + +

    Previous releases

    + +

    New features in 8.0-6

    + + +

    New features in 8.0-5

    + + +

    New features in 8.0-4

    + + +

    New features in 8.0-3

    + + +

    New features in 8.0-2

    + + +

    New features in 8.0-1

    + + + +

    New features in 8.0-0

    + + +

    New features in 7.1-1

    +
      +
    • + OProfile provides: +
        +
      • Update events for IBM POWER8 processor.
      • +
      • Support support for JVMTI.
      • +
      +
    • +
    • GCC adds support for lvsl and lvsr on powerpc64le.
    • +
    diff --git a/configs/8.0/sanity.mk b/configs/8.0/sanity.mk new file mode 100644 index 000000000..9b6bc17b2 --- /dev/null +++ b/configs/8.0/sanity.mk @@ -0,0 +1,19 @@ +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# This file holds some sanity checks to run on the build machine, to verify +# its general required components for the building process. +define base_sanity + echo "Base sanity checks passed." +endef \ No newline at end of file diff --git a/configs/8.0/specs/main.spec b/configs/8.0/specs/main.spec new file mode 120000 index 000000000..790d54c24 --- /dev/null +++ b/configs/8.0/specs/main.spec @@ -0,0 +1 @@ +../../7.1/specs/main.spec \ No newline at end of file diff --git a/configs/8.0/specs/metapkgs.spec b/configs/8.0/specs/metapkgs.spec new file mode 120000 index 000000000..3932b7aa7 --- /dev/null +++ b/configs/8.0/specs/metapkgs.spec @@ -0,0 +1 @@ +../../7.1/specs/metapkgs.spec \ No newline at end of file diff --git a/configs/8.0/specs/monolithic.spec b/configs/8.0/specs/monolithic.spec new file mode 100644 index 000000000..e0e21005b --- /dev/null +++ b/configs/8.0/specs/monolithic.spec @@ -0,0 +1,305 @@ +%description +The advance toolchain is a self contained toolchain which provides preview +toolchain functionality in GCC, binutils and GLIBC, as well as the debug and +profile tools GDB, Valgrind and OProfile. +It also provides a group of optimized threading libraries as well. + +#################################################### +%package runtime +Summary: Advance Toolchain +Requires: __RUNTIME_REQ__ +Group: Development/Libraries +AutoReqProv: no +Provides: advance-toolchain-runtime = %{at_major_version}-%{at_revision_number} + +%description runtime +The advance toolchain is a self contained toolchain which provides preview +toolchain functionality in GCC, binutils, GLIBC, GDB, Valgrind, and OProfile. + + +#################################################### +%package devel +Summary: Advance Toolchain +Requires: advance-toolchain-%{at_major}-runtime = %{at_major_version}-%{at_revision_number}, __DEVEL_REQ__ +Group: Development/Libraries +AutoReqProv: no +Provides: advance-toolchain-devel = %{at_major_version}-%{at_revision_number} + +%description devel +The advance toolchain is a self contained toolchain which provides preview +toolchain functionality in GCC, binutils, GLIBC, GDB, Valgrind, and OProfile. +This package provides the packages necessary to build applications that use the +features provided by the Advance Toolchain. + + +#################################################### +%package mcore-libs +Summary: Advance Toolchain +Requires: advance-toolchain-%{at_major}-runtime = %{at_major_version}-%{at_revision_number}, __MCORE-LIBS_REQ__ +Group: Development/Libraries +AutoReqProv: no +Provides: advance-toolchain-mcore-libs = %{at_major_version}-%{at_revision_number} + +%description mcore-libs +The advance toolchain is a self contained toolchain which provides preview +toolchain functionality in GCC, binutils, GLIBC, GDB, Valgrind, and OProfile. +This package provides the necessary libraries to build multi-threaded applications +using the specialized multi-threaded libraries Amino-CBB, URCU and Threading +Building Blocks. + + +#################################################### +%package perf +Summary: Advance Toolchain +Requires: advance-toolchain-%{at_major}-devel = %{at_major_version}-%{at_revision_number}, __PROFILE_REQ__ +Group: Development/Libraries +AutoReqProv: no +Provides: advance-toolchain-perf = %{at_major_version}-%{at_revision_number} + +%description perf +The advance toolchain is a self contained toolchain which provides preview +toolchain functionality in GCC, binutils, GLIBC, GDB, Valgrind, and OProfile. +This package 'perf' package contains the performance library install targets +for Valgrind and OProfile. + + +#################################################### +%package selinux +Summary: Advance Toolchain +Requires: advance-toolchain-%{at_major}-runtime = %{at_major_version}-%{at_revision_number} +Requires(post): /usr/sbin/semanage, /sbin/restorecon +Requires(postun): /usr/sbin/semanage, /sbin/restorecon +Group: Development/Libraries + +%description selinux +The advance toolchain is a self contained toolchain which provides preview +toolchain functionality in GCC, binutils, GLIBC, GDB, Valgrind, and OProfile. +The 'selinux' package contains the required labels for a system +running SElinux. + + +#################################################### +# On newer rpm versions, it's common to strip debug info and to compile python +# files. We only want to compress man pages. +%define __os_install_post /usr/lib/rpm/brp-compress + +# These have been known to be different on different distributions +%define _datadir %{_prefix}/share +%define _libexecdir %{_prefix}/libexec +%define _mandir %{_prefix}/share/man +%define _infodir %{_prefix}/share/info +%define _scriptdir %{_prefix}/scripts +# Some distributions set this to 'lib64' by default +%define _libdir %{_prefix}/lib +%define _bindir %{_prefix}/bin + +%prep +# Do not include find_dependencies.sh on AT < 9.0. +rm -rf %{_scriptdir}/find_dependencies.sh + +# Do not include tle_on.sh on AT < 9.0. +rm -rf %{_scriptdir}/tle_on.sh + +%build + +%install +# Prepare a new build sandbox area +mkdir -p ${RPM_BUILD_ROOT}$(dirname %{_prefix}) +cp -af %{_prefix} ${RPM_BUILD_ROOT}$(dirname %{_prefix}) +# Remove ld.so.cache from rpm build install tree +rm -rf ${RPM_BUILD_ROOT}%{_prefix}/compat \ + ${RPM_BUILD_ROOT}%{_prefix}/etc/ld.so.cache \ + ${RPM_BUILD_ROOT}%{_prefix}/etc/ldconfig.log +# Copy the compatibility init script to the correct place +mkdir -p ${RPM_BUILD_ROOT}/etc/rc.d/init.d +# Remove info/dir from installation dir +rm ${RPM_BUILD_ROOT}%{_infodir}/dir +# Compress all of the info files. +gzip -9nvf ${RPM_BUILD_ROOT}%{_infodir}/*.info* +# Set a cronjob to run AT's ldconfig when the system's ldconfig is executed. +mkdir -p ${RPM_BUILD_ROOT}/etc/cron.d/ +echo "@reboot %{_bindir}/watch_ldconfig &" > ${RPM_BUILD_ROOT}/etc/cron.d/%{at_ver_rev_internal}_ldconfig + +#################################################### +%pre runtime +_host_power_arch=$(LD_SHOW_AUXV=1 /bin/true | grep AT_PLATFORM | grep -i power | sed 's/.*power//') +if [[ "${_host_power_arch}" != "" && "${_host_power_arch}" < "%{_min_power_arch}" ]]; then + echo "The system is power${_host_power_arch} but must be at least power%{_min_power_arch} to install this RPM." + exit 1 +fi +# Get distro glibc installed version +GLIBC_VER=$(rpm -q --queryformat='%{VERSION}\n' glibc | sort -u) +GLIBC_ABS=$(echo "${GLIBC_VER}" | awk 'BEGIN { FS="." }; { print $1$2 }' -) +if [[ ${GLIBC_ABS} -gt %{at_glibc_ver} ]]; then + echo "Your current glibc version ${GLIBC_VER} is higher than the one provided by the advance toolchain glibc." + echo "Please, consider the possibility of installing a newer version of advance toolchain." +fi + +#--------------------------------------------------- +%pre perf +# We need to create this special user for OProfile +getent group oprofile >/dev/null || groupadd -r oprofile +getent passwd oprofile >/dev/null || \ +useradd -r -g oprofile -d /home/oprofile -s /sbin/nologin \ +-c "Special user account to be used by OProfile" oprofile +exit 0 + + +#################################################### +%post runtime +# Automatically set the timezone +rm -f %{_prefix}/etc/localtime +ln -s /etc/localtime %{_prefix}/etc/localtime +# Do this in every .spec file because they may only install a subset. +# We never know the order rpm is going to update AT's packages. +# So we only need to update the ldconf cache when ldconfig is available +if [[ -f %{_sbindir}/ldconfig ]]; then + %{_sbindir}/ldconfig +fi + +#--------------------------------------------------- +%post devel +# Update the info directory entries +for INFO in $(ls %{_infodir}/*.info.gz); do + install-info ${INFO} %{_infodir}/dir > /dev/null 2>&1 || : +done +# Run this setup script right after install +%{_prefix}/scripts/at-create-ibmcmp-cfg.sh +# Do this in every .spec file because they may only install a subset. +# We never know the order rpm is going to update AT's packages. +# So we only need to update the ldconf cache when ldconfig is available +if [[ -f %{_sbindir}/ldconfig ]]; then + %{_sbindir}/ldconfig +fi + +#--------------------------------------------------- +%post perf +# Do this in every .spec file because they may only install a subset. +# We never know the order rpm is going to update AT's packages. +# So we only need to update the ldconf cache when ldconfig is available +if [[ -f %{_sbindir}/ldconfig ]]; then + %{_sbindir}/ldconfig +fi + +#--------------------------------------------------- +%post mcore-libs +# Do this in every .spec file because they may only install a subset. +# We never know the order rpm is going to update AT's packages. +# So we only need to update the ldconf cache when ldconfig is available +if [[ -f %{_sbindir}/ldconfig ]]; then + %{_sbindir}/ldconfig +fi + +#--------------------------------------------------- +%post selinux +semanage fcontext -a -t etc_t '%{_prefix}/etc(/.*)?' 2>/dev/null +semanage fcontext -a -t ld_so_cache_t '%{_prefix}/etc/ld.so.cache' 2>/dev/null +semanage fcontext -a -t locale_t '%{_prefix}/etc/localtime' 2>/dev/null +restorecon -R %{_prefix}/etc +semanage fcontext -a -t locale_t '%{_prefix}/share/locale/locale.alias' \ + 2>/dev/null +restorecon -R %{_prefix}/share/locale +semanage fcontext -a -t locale_t '%{_prefix}/share/zoneinfo/Factory' \ + 2>/dev/null +restorecon -R %{_prefix}/share/zoneinfo + + +#################################################### +%preun devel +# Update the info directory entries +if [ "$1" = 0 ]; then + for INFO in $(ls %{_infodir}/*.info.gz); do + install-info --delete ${INFO} %{_infodir}/dir > /dev/null 2>&1 || : + done +fi + + +#################################################### +%postun runtime +# Remove the directory only when uninstalling +if [[ ${1} -eq 0 ]]; then + if [[ -d %{_prefix} ]]; then + rm -rf %{_prefix} + fi +fi +# Only remove ldconfig if it's' a bash script file +if file /usr/sbin/ldconfig | grep "bash script" > /dev/null; then + at_installs=$(find /opt/ -maxdepth 1 -type d -name 'at[0-9].[0-9]*' \ + 2>/dev/null | wc -l) + if [[ "${at_installs}" -eq "0" ]]; then + rm -f /usr/sbin/ldconfig + fi +fi + +#--------------------------------------------------- +%postun devel +# Update the loader cache after uninstall +# We never know the order rpm is going to remove/update AT's packages. +# So we only need to update the ldconf cache when ldconfig is still available +if [[ -f %{_sbindir}/ldconfig ]]; then + %{_sbindir}/ldconfig +fi + +#--------------------------------------------------- +%postun perf +# Update the loader cache after uninstall +# We never know the order rpm is going to remove/update AT's packages. +# So we only need to update the ldconf cache when ldconfig is still available +if [[ -f %{_sbindir}/ldconfig ]]; then + %{_sbindir}/ldconfig +fi + +#--------------------------------------------------- +%postun mcore-libs +# Update the loader cache after uninstall +# We never know the order rpm is going to remove/update AT's packages. +# So we only need to update the ldconf cache when ldconfig is still available +if [[ -f %{_sbindir}/ldconfig ]]; then + %{_sbindir}/ldconfig +fi + +#--------------------------------------------------- +%postun selinux +if [ $1 -eq 0 ] ; then # final removal + semanage fcontext -d -t locale_t '%{_prefix}/share/zoneinfo/Factory' \ + 2>/dev/null + restorecon -R %{_prefix}/share/zoneinfo + semanage fcontext -d -t locale_t \ + '%{_prefix}/share/locale/locale.alias' 2>/dev/null + restorecon -R %{_prefix}/share/locale + semanage fcontext -d -t locale_t '%{_prefix}/etc/localtime' 2>/dev/null + semanage fcontext -d -t ld_so_cache_t '%{_prefix}/etc/ld.so.cache' \ + 2>/dev/null + semanage fcontext -d -t etc_t '%{_prefix}/etc(/.*)?' 2>/dev/null + restorecon -R %{_prefix}/etc +fi + + +#################################################### +%files runtime -f %{at_work}/runtime.list +%defattr(-,root,root) +# Script for creating a wrapper ld for using the system +# libhugetlbfs/ld.hugetlbfs linker +%{_scriptdir}/createldhuge-1.0.sh +#Script for restoring the original Advance Toolchain ld. +%{_scriptdir}/restoreld.sh +# Config script for XLC/XLF +%{_scriptdir}/at-create-ibmcmp-cfg.sh + +# License text for the scripts distributed in the package. +%license %{_scriptdir}/LICENSE + +#--------------------------------------------------- +%files devel -f %{at_work}/devel.list +%defattr(-,root,root) + +#--------------------------------------------------- +%files perf -f %{at_work}/profile.list +%defattr(-,root,root) + +#--------------------------------------------------- +%files mcore-libs -f %{at_work}/mcore-libs.list +%defattr(-,root,root) + +#--------------------------------------------------- +%files selinux diff --git a/configs/8.0/specs/monolithic_at-compat.spec b/configs/8.0/specs/monolithic_at-compat.spec new file mode 120000 index 000000000..a7c9e156a --- /dev/null +++ b/configs/8.0/specs/monolithic_at-compat.spec @@ -0,0 +1 @@ +../../7.1/specs/monolithic_at-compat.spec \ No newline at end of file diff --git a/configs/8.0/specs/monolithic_compat.spec b/configs/8.0/specs/monolithic_compat.spec new file mode 120000 index 000000000..78047bf58 --- /dev/null +++ b/configs/8.0/specs/monolithic_compat.spec @@ -0,0 +1 @@ +../../7.1/specs/monolithic_compat.spec \ No newline at end of file diff --git a/configs/8.0/specs/monolithic_cross.spec b/configs/8.0/specs/monolithic_cross.spec new file mode 100644 index 000000000..847e15071 --- /dev/null +++ b/configs/8.0/specs/monolithic_cross.spec @@ -0,0 +1,133 @@ +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Add support for relocation. +Prefix: %{_prefix} +Requires: advance-toolchain-%{at_major}__CROSS__-common = %{at_major_version}-%{at_revision_number} + +%description +The Advance Toolchain is a self contained toolchain which provides preview +toolchain functionality in GCC, Binutils, GLIBC, and GDB. + +#################################################### +%package -n advance-toolchain-%{at_major}__CROSS__-common +Summary: Advance Toolchain - cross compiler common files +Group: Development +AutoReqProv: no +# Required to install info manuals. +Requires(post): info +Requires(preun): info +# Add support for relocation. +Prefix: %{_prefix} + +%description -n advance-toolchain-%{at_major}__CROSS__-common +The Advance Toolchain is a self contained toolchain which provides preview +toolchain functionality in GCC, Binutils, GLIBC, and GDB. + +This package provides common files for the Advance Toolchain. + +#################################################### + +# On newer rpm versions, it's common to strip debug info and to compile python +# files. We only want to compress man pages. +%define __os_install_post /usr/lib/rpm/brp-compress + +# Relative paths of directories. +%define datadir_r share +%define infodir_r share/info +# Some distributions set this to 'lib64' by default. +%define libdir_r lib +%define libexecdir_r libexec +%define mandir_r share/man +%define tgtinfodir_r __DEST_CROSS_REL__/usr/share/info +%define tgtmandir_r __DEST_CROSS_REL__/usr/share/man + +# These have been known to be different on different distributions. +%define _datadir %{_prefix}/%{datadir_r} +%define _infodir %{_prefix}/%{infodir_r} +%define _libdir %{_prefix}/%{libdir_r} +%define _libexecdir %{_prefix}/%{libexecdir_r} +%define _mandir %{_prefix}/%{mandir_r} +%define _tgtinfodir %{_prefix}/%{tgtinfodir_r} +%define _tgtmandir %{_prefix}/%{tgtmandir_r} + +%prep +%build +%install +mkdir -p ${RPM_BUILD_ROOT}$(dirname %{_prefix}) +cp -af %{_prefix} ${RPM_BUILD_ROOT}$(dirname %{_prefix}) +# Remove info/dir from installation dir +rm -f ${RPM_BUILD_ROOT}%{_infodir}/dir \ + ${RPM_BUILD_ROOT}%{_tgtinfodir}/dir +# Compress all of the info files. +gzip -9nvf ${RPM_BUILD_ROOT}%{_infodir}/*.info* +gzip -9nvf ${RPM_BUILD_ROOT}%{_tgtinfodir}/*.info* + +################################################ +%post +# Update the info directory entries +for INFO in $(ls ${RPM_INSTALL_PREFIX}/%{tgtinfodir_r}/*.info.gz); do + install-info ${INFO} ${RPM_INSTALL_PREFIX}/%{tgtinfodir_r}/dir +done +################################################ + +#################### common #################### +%post -n advance-toolchain-%{at_major}__CROSS__-common +# Update the info directory entries +for INFO in $(ls ${RPM_INSTALL_PREFIX}/%{infodir_r}/*.info.gz); do + install-info ${INFO} ${RPM_INSTALL_PREFIX}/%{infodir_r}/dir +done +################################################ + +################################################ +%preun +# Update the info directory entries +if [ "$1" = 0 ]; then + for INFO in $(ls ${RPM_INSTALL_PREFIX}/%{tgtinfodir_r}/*.info.gz); do + install-info --delete ${INFO} \ + ${RPM_INSTALL_PREFIX}/%{tgtinfodir_r}/dir + done +fi +################################################ + +#################### common #################### +%preun -n advance-toolchain-%{at_major}__CROSS__-common +# Update the info directory entries +if [ "$1" = 0 ]; then + for INFO in $(ls ${RPM_INSTALL_PREFIX}/%{infodir_r}/*.info.gz); do + install-info --delete ${INFO} \ + ${RPM_INSTALL_PREFIX}/%{infodir_r}/dir + done +fi +################################################ + +################################################ +%postun +if [[ ${1} -eq 0 ]]; then + find ${RPM_INSTALL_PREFIX} -type d -empty -delete +fi +################################################ + +#################### common #################### +%postun -n advance-toolchain-%{at_major}__CROSS__-common +if [[ ${1} -eq 0 ]]; then + find ${RPM_INSTALL_PREFIX} -type d -empty -delete +fi +################################################ + + +%files -f %{at_work}/cross.list +%defattr(-,root,root) + +%files -n advance-toolchain-%{at_major}__CROSS__-common -f %{at_work}/cross-common.list diff --git a/configs/9.0/arch/default.mk b/configs/9.0/arch/default.mk new file mode 120000 index 000000000..331fb4415 --- /dev/null +++ b/configs/9.0/arch/default.mk @@ -0,0 +1 @@ +../../8.0/arch/default.mk \ No newline at end of file diff --git a/configs/9.0/arch/i686.ppc64.mk b/configs/9.0/arch/i686.ppc64.mk new file mode 120000 index 000000000..7a9402dc9 --- /dev/null +++ b/configs/9.0/arch/i686.ppc64.mk @@ -0,0 +1 @@ +../../8.0/arch/i686.ppc64.mk \ No newline at end of file diff --git a/configs/9.0/arch/i686.ppc64le.mk b/configs/9.0/arch/i686.ppc64le.mk new file mode 120000 index 000000000..402ad901f --- /dev/null +++ b/configs/9.0/arch/i686.ppc64le.mk @@ -0,0 +1 @@ +../../8.0/arch/i686.ppc64le.mk \ No newline at end of file diff --git a/configs/9.0/arch/ppc64.ppc64.mk b/configs/9.0/arch/ppc64.ppc64.mk new file mode 120000 index 000000000..b995ccc2e --- /dev/null +++ b/configs/9.0/arch/ppc64.ppc64.mk @@ -0,0 +1 @@ +../../8.0/arch/ppc64.ppc64.mk \ No newline at end of file diff --git a/configs/9.0/arch/ppc64le.ppc64le.mk b/configs/9.0/arch/ppc64le.ppc64le.mk new file mode 120000 index 000000000..5eae047bc --- /dev/null +++ b/configs/9.0/arch/ppc64le.ppc64le.mk @@ -0,0 +1 @@ +../../8.0/arch/ppc64le.ppc64le.mk \ No newline at end of file diff --git a/configs/9.0/arch/x86_64.ppc64.mk b/configs/9.0/arch/x86_64.ppc64.mk new file mode 120000 index 000000000..b1b153cf0 --- /dev/null +++ b/configs/9.0/arch/x86_64.ppc64.mk @@ -0,0 +1 @@ +../../8.0/arch/x86_64.ppc64.mk \ No newline at end of file diff --git a/configs/9.0/arch/x86_64.ppc64le.mk b/configs/9.0/arch/x86_64.ppc64le.mk new file mode 120000 index 000000000..e427dfc9d --- /dev/null +++ b/configs/9.0/arch/x86_64.ppc64le.mk @@ -0,0 +1 @@ +../../8.0/arch/x86_64.ppc64le.mk \ No newline at end of file diff --git a/configs/9.0/base.mk b/configs/9.0/base.mk new file mode 100644 index 000000000..7f0292d29 --- /dev/null +++ b/configs/9.0/base.mk @@ -0,0 +1,53 @@ +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Basic build version definitions +# =============================== +# This Makefile include contains the config options included at the beginning +# of the build process that govern the subsequent generated package name, +# version and other dependent internal build variables. +# It also states which distros the build is compatible with, so that it can be +# validated at build time, as well as heuristicaly find the proper repo path +# to put the final rpms generated by the build system. + +# Versioning description +# ====================== +# +# - AT_NAME: Final build Advance Toolchain package name. +# +# - AT_MAJOR_VERSION: Changes whenever the compiler or the ABI changes. +# Should be in X.Y format, where X=compiler change, +# Y=ABI change within that compiler change cycle. All +# first major releases should be X.0. Then, if the ABI +# changes, increment the second digit (i.e. X.1). +# +# - AT_REVISION_NUMBER: The revision number. Starts at 0 and is incremented +# whenever a new official build that doesn't change the +# compiler version or the ABI is required. +# +# - AT_INTERNAL: Tag for internal releases (i.e. alpha, beta, rc). For +# GM or external releases, it should be "none". +# +# - AT_DIR_NAME: Optional name of the directory. If not defined, will +# use a combination of AT_NAME, AT_MAJOR_VERSION, +# AT_INTERNAL and AT_REVISION_NUMBER. +# +# - AT_PREVIOUS_VERSION Previous compatible AT version supported (It may be +# further restricted by distro specific settings) +# +AT_NAME := at +AT_MAJOR_VERSION := 9.0 +AT_REVISION_NUMBER := 5 +AT_INTERNAL := none +AT_PREVIOUS_VERSION := 8.0 diff --git a/configs/9.0/build.mk b/configs/9.0/build.mk new file mode 100644 index 000000000..1df89de10 --- /dev/null +++ b/configs/9.0/build.mk @@ -0,0 +1,63 @@ +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generic build support options +# ============================= +# Most of these options are self explanatory, Some highlights on obscure ones +# - BUILD_ARCH must contain the target toolchain arch (ppc64/ppc32) +# - BUILD_LOAD_ARCH tell us the CPU base to use for loader compatibility (GLIBC). +# - BUILD_BASE_ARCH tell us the CPU base to use for base code generation (GCC). +# - BUILD_OPTIMIZATION tells which is the default base optimization level (GCC). +# - BUILD_WITH_LONGDOUBLE tells us to build with support for longdoubles. +# - BUILD_WITH_DFP_STANDALONE tells us to build with libdfp as standalone library. +# - BUILD_RPM_PACKAGER tells us the name / email of packager for this release. +# - BUILD_RPMS must be set to "granular" or "monolithic" to indicate the kind of +# rpms to be generated by the build script. See the documentation notes. + +# When running on ppc64le, BUILD_ARCH defaults to ppc64le +# In the rest, it defaults to ppc64. +ifeq ($(HOST_ARCH),ppc64le) + BUILD_ARCH ?= ppc64le +endif +BUILD_ARCH ?= ppc64 + +BUILD_LOAD_ARCH := power7 +BUILD_BASE_ARCH := power7 +BUILD_OPTIMIZATION := power8 +BUILD_WITH_LONGDOUBLE := yes +BUILD_WITH_DFP_STANDALONE := yes +BUILD_RPM_PACKAGER := +BUILD_RPM_VENDOR := +BUILD_RPMS := monolithic +BUILD_GCC_LANGUAGES := c,c++,fortran,go + +# List supported CPUs to build for active, compat and embed +# ========================================================= +# - List of valid CPUs for active and compat: +# * power4, power5, power5+, power6, power6x and power7 +BUILD_ACTIVE_MULTILIBS := power8 + +# Download options +# ================ +# Should be either 'yes' or 'no'. Mostly self explanatory options. +# - BUILD_GET_SOURCES tell us to force grab sources +# - BUILD_GET_MPS tell us to grab patches from mailing lists +# - BUILD_GET_ADDONS tell us to grab related package addons +# - BUILD_EXCLUSIVE_CROSS tell us that the build is *exclusively* cross +# - BUILD_DEFAULT_RETRIES tell the default number of retries when fetching sources +BUILD_GET_SOURCES := yes +BUILD_GET_MPS := yes +BUILD_GET_ADDONS := yes +BUILD_EXCLUSIVE_CROSS := no +BUILD_DEFAULT_RETRIES := 5 diff --git a/configs/9.0/deb/monolithic/changelog b/configs/9.0/deb/monolithic/changelog new file mode 120000 index 000000000..7f945c4fc --- /dev/null +++ b/configs/9.0/deb/monolithic/changelog @@ -0,0 +1 @@ +../../../8.0/deb/monolithic/changelog \ No newline at end of file diff --git a/configs/9.0/deb/monolithic/compat b/configs/9.0/deb/monolithic/compat new file mode 120000 index 000000000..dc8b73e4f --- /dev/null +++ b/configs/9.0/deb/monolithic/compat @@ -0,0 +1 @@ +../../../8.0/deb/monolithic/compat \ No newline at end of file diff --git a/configs/9.0/deb/monolithic/control b/configs/9.0/deb/monolithic/control new file mode 100644 index 000000000..c47fa9eed --- /dev/null +++ b/configs/9.0/deb/monolithic/control @@ -0,0 +1,158 @@ +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +Source: advance-toolchain-__AT_MAJOR_INTERNAL__ +Section: devel +Priority: extra +Maintainer: Advance Toolchain + +Package: advance-toolchain-runtime +Architecture: ppc64el +Pre-Depends: advance-toolchain-__AT_MAJOR_INTERNAL__-runtime (= __AT_FULL_VER__) +Description: Advance Toolchain + The advance toolchain is a self contained toolchain which provides preview + toolchain functionality in GCC, binutils, GLIBC, GDB, Valgrind, and OProfile. + +Package: advance-toolchain-__AT_MAJOR_INTERNAL__-runtime +Architecture: ppc64el +Depends: ${shlibs:Depends} ${misc:Depends} +Description: Advance Toolchain + The advance toolchain is a self contained toolchain which provides preview + toolchain functionality in GCC, binutils, GLIBC, GDB, Valgrind, and OProfile. + +Package: advance-toolchain-runtime-dbg +Architecture: ppc64el +Pre-Depends: advance-toolchain-__AT_MAJOR_INTERNAL__-runtime-dbg (= __AT_FULL_VER__) +Description: Advance Toolchain + The advance toolchain debugging information. + +Package: advance-toolchain-__AT_MAJOR_INTERNAL__-runtime-dbg +Architecture: ppc64el +Pre-Depends: advance-toolchain-__AT_MAJOR_INTERNAL__-runtime (= __AT_FULL_VER__) +Depends: ${shlibs:Depends} ${misc:Depends} +Description: Advance Toolchain + The advance toolchain debugging information. + +Package: advance-toolchain-__AT_MAJOR_INTERNAL__-runtime-compat +Architecture: ppc64el +Conflicts: advance-toolchain-__AT_MAJOR_INTERNAL__-runtime +Depends: ${shlibs:Depends} +Description: Advance Toolchain + The advance toolchain is a self contained toolchain which provides preview + toolchain functionality in GCC, binutils, GLIBC, GDB, Valgrind, and OProfile. + +Package: advance-toolchain-devel +Architecture: ppc64el +Pre-Depends: advance-toolchain-__AT_MAJOR_INTERNAL__-devel (= __AT_FULL_VER__) +Depends: ${shlibs:Depends} ${misc:Depends} +Description: Advance Toolchain + The advance toolchain is a self contained toolchain which provides preview + toolchain functionality in GCC, binutils, GLIBC, GDB, Valgrind, and OProfile. + This package provides the packages necessary to build applications that use the + features provided by the Advance Toolchain. + +Package: advance-toolchain-__AT_MAJOR_INTERNAL__-devel +Architecture: ppc64el +Pre-Depends: advance-toolchain-__AT_MAJOR_INTERNAL__-runtime (= __AT_FULL_VER__) +Depends: ${shlibs:Depends} ${misc:Depends} +Description: Advance Toolchain + The advance toolchain is a self contained toolchain which provides preview + toolchain functionality in GCC, binutils, GLIBC, GDB, Valgrind, and OProfile. + This package provides the packages necessary to build applications that use the + features provided by the Advance Toolchain. + +Package: advance-toolchain-devel-dbg +Architecture: ppc64el +Pre-Depends: advance-toolchain-__AT_MAJOR_INTERNAL__-devel-dbg (= __AT_FULL_VER__) +Description: Advance Toolchain + The advance toolchain debugging information. + +Package: advance-toolchain-__AT_MAJOR_INTERNAL__-devel-dbg +Architecture: ppc64el +Pre-Depends: advance-toolchain-__AT_MAJOR_INTERNAL__-devel (= __AT_FULL_VER__) +Depends: ${shlibs:Depends} ${misc:Depends} +Description: Advance Toolchain + The advance toolchain debugging information. + +Package: advance-toolchain-mcore-libs +Architecture: ppc64el +Pre-Depends: advance-toolchain-__AT_MAJOR_INTERNAL__-mcore-libs (= __AT_FULL_VER__) +Description: Advance Toolchain + The advance toolchain is a self contained toolchain which provides preview + toolchain functionality in GCC, binutils, GLIBC, GDB, Valgrind, and OProfile. + This package provides the necessary libraries to build multi-threaded + applications. + +Package: advance-toolchain-__AT_MAJOR_INTERNAL__-mcore-libs +Architecture: ppc64el +Pre-Depends: advance-toolchain-__AT_MAJOR_INTERNAL__-runtime (= __AT_FULL_VER__) +Depends: ${shlibs:Depends} ${misc:Depends} +Description: Advance Toolchain + The advance toolchain is a self contained toolchain which provides preview + toolchain functionality in GCC, binutils, GLIBC, GDB, Valgrind, and OProfile. + This package provides the necessary libraries to build multi-threaded + applications. + +Package: advance-toolchain-mcore-libs-dbg +Architecture: ppc64el +Pre-Depends: advance-toolchain-__AT_MAJOR_INTERNAL__-mcore-libs-dbg (= __AT_FULL_VER__) +Description: Advance Toolchain + The advance toolchain debugging information. + +Package: advance-toolchain-__AT_MAJOR_INTERNAL__-mcore-libs-dbg +Architecture: ppc64el +Pre-Depends: advance-toolchain-__AT_MAJOR_INTERNAL__-mcore-libs (= __AT_FULL_VER__) +Depends: ${shlibs:Depends} ${misc:Depends} +Description: Advance Toolchain + The advance toolchain debugging information. + +Package: advance-toolchain-perf +Architecture: ppc64el +Pre-Depends: advance-toolchain-__AT_MAJOR_INTERNAL__-perf (= __AT_FULL_VER__) +Description: Advance Toolchain + The advance toolchain is a self contained toolchain which provides preview + toolchain functionality in GCC, binutils, GLIBC, GDB, Valgrind, and OProfile. + This package contains the performance library install targets for Valgrind + and OProfile. + +Package: advance-toolchain-__AT_MAJOR_INTERNAL__-perf +Architecture: ppc64el +Pre-Depends: advance-toolchain-__AT_MAJOR_INTERNAL__-runtime (= __AT_FULL_VER__) +Depends: ${shlibs:Depends} ${misc:Depends} +Description: Advance Toolchain + The advance toolchain is a self contained toolchain which provides preview + toolchain functionality in GCC, binutils, GLIBC, GDB, Valgrind, and OProfile. + This package contains the performance library install targets for Valgrind + and OProfile. + +Package: advance-toolchain-perf-dbg +Architecture: ppc64el +Pre-Depends: advance-toolchain-__AT_MAJOR_INTERNAL__-perf-dbg (= __AT_FULL_VER__) +Description: Advance Toolchain + The advance toolchain debugging information. + +Package: advance-toolchain-__AT_MAJOR_INTERNAL__-perf-dbg +Architecture: ppc64el +Pre-Depends: advance-toolchain-__AT_MAJOR_INTERNAL__-perf (= __AT_FULL_VER__) +Depends: ${shlibs:Depends} ${misc:Depends} +Description: Advance Toolchain + The advance toolchain debugging information. + +Package: advance-toolchain-golang-at +Architecture: ppc64el +Depends: ${shlibs:Depends} ${misc:Depends} +Description: Advance Toolchain + The advance toolchain is a self contained toolchain which provides preview + toolchain functionality in GCC, binutils, GLIBC, GDB, Valgrind, and OProfile. + This package provides the Golang binaries for ppc64el. diff --git a/configs/9.0/deb/monolithic/copyright b/configs/9.0/deb/monolithic/copyright new file mode 120000 index 000000000..e0c7d7435 --- /dev/null +++ b/configs/9.0/deb/monolithic/copyright @@ -0,0 +1 @@ +../../../8.0/deb/monolithic/copyright \ No newline at end of file diff --git a/configs/9.0/deb/monolithic/devel-dbg.postinst b/configs/9.0/deb/monolithic/devel-dbg.postinst new file mode 100644 index 000000000..640bcd69b --- /dev/null +++ b/configs/9.0/deb/monolithic/devel-dbg.postinst @@ -0,0 +1,27 @@ +#!/bin/bash +# +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +if [[ "${1}" == configure ]]; then + # Create symlinks to the debuginfo files in .debug subdirectories so valgrind + # and oprofile can find the symbols. + for DIR in $(find __AT_DEST__/lib/debug/__AT_DEST__/lib*/ -type d \ + | grep -v build-id); do + dest=${DIR#__AT_DEST__/lib/debug} + mkdir -p ${dest}/.debug/ + ln -sf ${DIR}/* ${dest}/.debug/ + done +fi diff --git a/configs/9.0/deb/monolithic/devel.postinst b/configs/9.0/deb/monolithic/devel.postinst new file mode 120000 index 000000000..9cc89b552 --- /dev/null +++ b/configs/9.0/deb/monolithic/devel.postinst @@ -0,0 +1 @@ +../../../8.0/deb/monolithic/devel.postinst \ No newline at end of file diff --git a/configs/9.0/deb/monolithic/devel.postrm b/configs/9.0/deb/monolithic/devel.postrm new file mode 120000 index 000000000..82211decf --- /dev/null +++ b/configs/9.0/deb/monolithic/devel.postrm @@ -0,0 +1 @@ +../../../8.0/deb/monolithic/devel.postrm \ No newline at end of file diff --git a/configs/9.0/deb/monolithic/devel.prerm b/configs/9.0/deb/monolithic/devel.prerm new file mode 120000 index 000000000..19ba06c53 --- /dev/null +++ b/configs/9.0/deb/monolithic/devel.prerm @@ -0,0 +1 @@ +../../../8.0/deb/monolithic/devel.prerm \ No newline at end of file diff --git a/configs/9.0/deb/monolithic/mcore-libs-dbg.postinst b/configs/9.0/deb/monolithic/mcore-libs-dbg.postinst new file mode 100644 index 000000000..640bcd69b --- /dev/null +++ b/configs/9.0/deb/monolithic/mcore-libs-dbg.postinst @@ -0,0 +1,27 @@ +#!/bin/bash +# +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +if [[ "${1}" == configure ]]; then + # Create symlinks to the debuginfo files in .debug subdirectories so valgrind + # and oprofile can find the symbols. + for DIR in $(find __AT_DEST__/lib/debug/__AT_DEST__/lib*/ -type d \ + | grep -v build-id); do + dest=${DIR#__AT_DEST__/lib/debug} + mkdir -p ${dest}/.debug/ + ln -sf ${DIR}/* ${dest}/.debug/ + done +fi diff --git a/configs/9.0/deb/monolithic/mcore-libs.postinst b/configs/9.0/deb/monolithic/mcore-libs.postinst new file mode 120000 index 000000000..3cc5667f9 --- /dev/null +++ b/configs/9.0/deb/monolithic/mcore-libs.postinst @@ -0,0 +1 @@ +../../../8.0/deb/monolithic/mcore-libs.postinst \ No newline at end of file diff --git a/configs/9.0/deb/monolithic/mcore-libs.postrm b/configs/9.0/deb/monolithic/mcore-libs.postrm new file mode 120000 index 000000000..958a4c4b4 --- /dev/null +++ b/configs/9.0/deb/monolithic/mcore-libs.postrm @@ -0,0 +1 @@ +../../../8.0/deb/monolithic/mcore-libs.postrm \ No newline at end of file diff --git a/configs/9.0/deb/monolithic/perf-dbg.postinst b/configs/9.0/deb/monolithic/perf-dbg.postinst new file mode 100644 index 000000000..640bcd69b --- /dev/null +++ b/configs/9.0/deb/monolithic/perf-dbg.postinst @@ -0,0 +1,27 @@ +#!/bin/bash +# +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +if [[ "${1}" == configure ]]; then + # Create symlinks to the debuginfo files in .debug subdirectories so valgrind + # and oprofile can find the symbols. + for DIR in $(find __AT_DEST__/lib/debug/__AT_DEST__/lib*/ -type d \ + | grep -v build-id); do + dest=${DIR#__AT_DEST__/lib/debug} + mkdir -p ${dest}/.debug/ + ln -sf ${DIR}/* ${dest}/.debug/ + done +fi diff --git a/configs/9.0/deb/monolithic/perf.postinst b/configs/9.0/deb/monolithic/perf.postinst new file mode 120000 index 000000000..fde21469e --- /dev/null +++ b/configs/9.0/deb/monolithic/perf.postinst @@ -0,0 +1 @@ +../../../8.0/deb/monolithic/perf.postinst \ No newline at end of file diff --git a/configs/9.0/deb/monolithic/perf.postrm b/configs/9.0/deb/monolithic/perf.postrm new file mode 120000 index 000000000..0bfcf2236 --- /dev/null +++ b/configs/9.0/deb/monolithic/perf.postrm @@ -0,0 +1 @@ +../../../8.0/deb/monolithic/perf.postrm \ No newline at end of file diff --git a/configs/9.0/deb/monolithic/rules b/configs/9.0/deb/monolithic/rules new file mode 100755 index 000000000..4babb77ea --- /dev/null +++ b/configs/9.0/deb/monolithic/rules @@ -0,0 +1,72 @@ +#!/usr/bin/make -f +# +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +PACKAGES=$(shell dh_listpackages) + +build: + dh_testdir + dh_testroot + dh_prep + +clean: + dh_testdir + dh_testroot + dh_clean -d + +binary-indep: build + +binary-arch: build binary-cp + dh_installdirs + dh_installdocs + dh_installchangelogs + +# Copy the packages' files. + dh_install --fail-missing + +# Strip binaries + perl debian/dh_strip --dest=__AT_DEST__ --exclude=getconf --exclude=libgo. --exclude=ld- --dbg-package=advance-toolchain-__AT_MAJOR_INTERNAL__-runtime-dbg -p advance-toolchain-__AT_MAJOR_INTERNAL__-runtime + perl debian/dh_strip --dest=__AT_DEST__ --dbg-package=advance-toolchain-__AT_MAJOR_INTERNAL__-mcore-libs-dbg -p advance-toolchain-__AT_MAJOR_INTERNAL__-mcore-libs + perl debian/dh_strip --dest=__AT_DEST__ --exclude=getconf --dbg-package=advance-toolchain-__AT_MAJOR_INTERNAL__-devel-dbg -p advance-toolchain-__AT_MAJOR_INTERNAL__-devel + perl debian/dh_strip --dest=__AT_DEST__ --dbg-package=advance-toolchain-__AT_MAJOR_INTERNAL__-perf-dbg -p advance-toolchain-__AT_MAJOR_INTERNAL__-perf + + dh_compress + dh_makeshlibs --version-info + dh_installdeb + dh_shlibdeps --exclude=typedef + dh_gencontrol + dh_md5sums + dh_builddeb + +binary-cp: build + mkdir -p debian/tmp/__AT_DEST__ + rsync -a --delete --delete-excluded \ + --exclude=etc/ld.so.cache \ + --exclude=compat/include \ + --exclude=share/info/dir \ + __AT_DEST__ debian/tmp/__AT_DEST__/../ + # Set a cronjob to run AT's ldconfig when the system's ldconfig is + # executed. + mkdir -p debian/tmp/etc/cron.d/ + echo "@reboot __AT_DEST__/bin/watch_ldconfig &" \ + > debian/tmp/etc/cron.d/__AT_VER_REV_INTERNAL___ldconfig + gzip -9nvf debian/tmp/__AT_DEST__/share/info/*.info* + # Prepare the area for golang + mkdir -p debian/tmp/__GO_DEST__ + rsync -a --delete __TMP_DIR__/golang_1/__GO_DEST__ debian/tmp/__GO_DEST__/../ + +binary: binary-indep binary-arch +.PHONY: build clean binary-indep binary-arch binary diff --git a/configs/9.0/deb/monolithic/runtime-dbg.postinst b/configs/9.0/deb/monolithic/runtime-dbg.postinst new file mode 100644 index 000000000..640bcd69b --- /dev/null +++ b/configs/9.0/deb/monolithic/runtime-dbg.postinst @@ -0,0 +1,27 @@ +#!/bin/bash +# +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +if [[ "${1}" == configure ]]; then + # Create symlinks to the debuginfo files in .debug subdirectories so valgrind + # and oprofile can find the symbols. + for DIR in $(find __AT_DEST__/lib/debug/__AT_DEST__/lib*/ -type d \ + | grep -v build-id); do + dest=${DIR#__AT_DEST__/lib/debug} + mkdir -p ${dest}/.debug/ + ln -sf ${DIR}/* ${dest}/.debug/ + done +fi diff --git a/configs/9.0/deb/monolithic/runtime.postinst b/configs/9.0/deb/monolithic/runtime.postinst new file mode 120000 index 000000000..2f58c3537 --- /dev/null +++ b/configs/9.0/deb/monolithic/runtime.postinst @@ -0,0 +1 @@ +../../../8.0/deb/monolithic/runtime.postinst \ No newline at end of file diff --git a/configs/9.0/deb/monolithic/runtime.postrm b/configs/9.0/deb/monolithic/runtime.postrm new file mode 120000 index 000000000..a1779526c --- /dev/null +++ b/configs/9.0/deb/monolithic/runtime.postrm @@ -0,0 +1 @@ +../../../8.0/deb/monolithic/runtime.postrm \ No newline at end of file diff --git a/configs/9.0/deb/monolithic/trusty_dh_change_dest.patch b/configs/9.0/deb/monolithic/trusty_dh_change_dest.patch new file mode 100644 index 000000000..1c248203e --- /dev/null +++ b/configs/9.0/deb/monolithic/trusty_dh_change_dest.patch @@ -0,0 +1,116 @@ +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +--- a/dh_strip 2014-02-19 11:25:23.000000000 -0300 ++++ b/dh_strip 2016-06-14 12:18:53.196321177 -0300 +@@ -12,7 +12,7 @@ use Debian::Debhelper::Dh_Lib; + + =head1 SYNOPSIS + +-B [S>] [B<-X>I] [B<--dbg-package=>I] [B<--keep-debug>] ++B [S>] [B<-X>I] [B<--dbg-package=>I] [B<--keep-debug>] [B<--dest=>I] + + =head1 DESCRIPTION + +@@ -42,6 +42,18 @@ Exclude files that contain I anywh + stripped. You may use this option multiple times to build up a list of + things to exclude. + ++=item B<--dest=>I ++ ++Typically, debug information is always placed under /usr/lib/debug on debian ++packages. However, it is sometimes desirable to install to an alternative ++prefix, such as /opt. The value passed through B is prepended to ++/lib/debug (notice that the 'usr' part has been removed), and becomes the ++installation path for debug information. For instance, the following command ++will install all debug information into a package named foo-deb.deb and under ++I. ++ ++ dh_strip --dbg-package=foo-dbg --dest=/opt ++ + =item B<--dbg-package=>I + + Causes B to save debug symbols stripped from the packages it acts on +@@ -60,7 +72,7 @@ in packages with B<-dbg> added to their + =item B<-k>, B<--keep-debug> + + Debug symbols will be retained, but split into an independent +-file in F in the package build directory. B<--dbg-package> ++file in F in the package build directory. B<--dbg-package> + is easier to use than this option, but this option is more flexible. + + =back +@@ -77,8 +89,10 @@ Debian policy, version 3.0.1 + + =cut + ++my $dest; + init(options => { + "keep-debug" => \$dh{K_FLAG}, ++ "dest=s" => \$dest, + }); + + # This variable can be used to turn off stripping (see Policy). +@@ -161,23 +175,45 @@ sub make_debug { + return unless get_file_type($file) =~ /not stripped/; + + my ($base_file)=$file=~/^\Q$tmp\E(.*)/; ++ my $base_debug_path; + my $debug_path; ++ my $debug_symlink; ++ my $debug_dir; ++ ++ $debug_path=$desttmp."${dest}/lib/debug/".$base_file; ++ $base_debug_path="${dest}/lib/debug/".$base_file; ++ ++ # Make symlinks based on the build-ID + if (! compat(8) && + `LC_ALL=C readelf -n $file`=~ /^\s+Build ID: ([0-9a-f]{2})([0-9a-f]+)$/m) { +- $debug_path=$desttmp."/usr/lib/debug/.build-id/$1/$2.debug" +- } +- else { +- $debug_path=$desttmp."/usr/lib/debug/".$base_file; ++ $debug_symlink=$desttmp."${dest}/lib/debug/.build-id/$1/$2"; ++ ++ # Create the directory ++ $debug_dir=dirname($debug_symlink); ++ if(! -d $debug_dir) { ++ doit("install", "-d", $debug_dir); ++ } ++ ++ # Create the symlinks ++ if(! -l "$debug_symlink") { ++ doit("ln", "-s", "$base_file", "$debug_symlink"); ++ } ++ if(! -l "$debug_symlink.debug") { ++ doit("ln", "-s", "$base_debug_path", "$debug_symlink.debug"); ++ } + } +- my $debug_dir=dirname($debug_path); ++ ++ # Create the build-id directory ++ $debug_dir=dirname($debug_path); + if (! -d $debug_dir) { + doit("install", "-d", $debug_dir); + } ++ # Actually Strip debuginfo + if (compat(8)) { + doit($objcopy, "--only-keep-debug", $file, $debug_path); + } + else { +- doit($objcopy, "--only-keep-debug", "--compress-debug-sections", $file, $debug_path); ++ doit($objcopy, "--only-keep-debug", $file, $debug_path); + } + # No reason for this to be executable. + doit("chmod", 644, $debug_path); diff --git a/configs/9.0/deb/monolithic_cross/changelog b/configs/9.0/deb/monolithic_cross/changelog new file mode 120000 index 000000000..cd7a41298 --- /dev/null +++ b/configs/9.0/deb/monolithic_cross/changelog @@ -0,0 +1 @@ +../../../8.0/deb/monolithic_cross/changelog \ No newline at end of file diff --git a/configs/9.0/deb/monolithic_cross/compat b/configs/9.0/deb/monolithic_cross/compat new file mode 120000 index 000000000..7d3558811 --- /dev/null +++ b/configs/9.0/deb/monolithic_cross/compat @@ -0,0 +1 @@ +../../../8.0/deb/monolithic_cross/compat \ No newline at end of file diff --git a/configs/9.0/deb/monolithic_cross/control b/configs/9.0/deb/monolithic_cross/control new file mode 100644 index 000000000..a164dc98d --- /dev/null +++ b/configs/9.0/deb/monolithic_cross/control @@ -0,0 +1,90 @@ +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +Source: advance-toolchain-__AT_MAJOR_INTERNAL__-cross__BUILD_ARCH__ +Section: devel +Priority: extra +Maintainer: Advance Toolchain + +Package: advance-toolchain-cross__BUILD_ARCH__ +Architecture: any +Pre-Depends: advance-toolchain-__AT_MAJOR_INTERNAL__-cross__BUILD_ARCH__ (= __AT_FULL_VER__) +Description: Advance Toolchain cross compiler + The Advance Toolchain is a self contained toolchain which provides preview + toolchain functionality in GCC, binutils, GLIBC, and GDB. + +Package: advance-toolchain-__AT_MAJOR_INTERNAL__-cross__BUILD_ARCH__ +Architecture: any +Depends: ${shlibs:Depends}, advance-toolchain-__AT_MAJOR_INTERNAL__-cross-common (= __AT_FULL_VER__) +Description: Advance Toolchain cross compiler + The Advance Toolchain is a self contained toolchain which provides preview + toolchain functionality in GCC, binutils, GLIBC, and GDB. +Multi-Arch: foreign + +Package: advance-toolchain-cross-common +Architecture: any +Pre-Depends: advance-toolchain-__AT_MAJOR_INTERNAL__-cross-common (= __AT_FULL_VER__) +Description: Advance Toolchain cross compiler common files + The Advance Toolchain is a self contained toolchain which provides preview + toolchain functionality in GCC, binutils, GLIBC, and GDB. + This package provides common files for the Advance Toolchain. + +Package: advance-toolchain-__AT_MAJOR_INTERNAL__-cross-common +Architecture: any +Pre-Depends: info +Depends: ${shlibs:Depends}, info +Description: Advance Toolchain cross compiler common files + The Advance Toolchain is a self contained toolchain which provides preview + toolchain functionality in GCC, binutils, GLIBC, and GDB. + This package provides common files for the Advance Toolchain. +Multi-Arch: foreign + +Package: advance-toolchain-cross__BUILD_ARCH__-runtime-extras +Architecture: any +Pre-Depends: advance-toolchain-__AT_MAJOR_INTERNAL__-cross__BUILD_ARCH__-runtime-extras (= __AT_FULL_VER__) +Description: Advance Toolchain cross compiler runtime extras files + The Advance Toolchain is a self contained toolchain which provides preview + toolchain functionality in GCC, binutils, GLIBC, and GDB. + This package contains the runtime libraries to run programs built with the + advance toolchain that are not present in the main cross compiler package. + +Package: advance-toolchain-__AT_MAJOR_INTERNAL__-cross__BUILD_ARCH__-runtime-extras +Architecture: any +Pre-Depends: advance-toolchain-__AT_MAJOR_INTERNAL__-cross__BUILD_ARCH__ (= __AT_FULL_VER__) +Depends: ${shlibs:Depends} +Description: Advance Toolchain cross compiler runtime extras files + The Advance Toolchain is a self contained toolchain which provides preview + toolchain functionality in GCC, binutils, GLIBC, and GDB. + This package contains the runtime libraries to run programs built with the + advance toolchain that are not present in the main cross compiler package. +Multi-Arch: foreign + +Package: advance-toolchain-cross__BUILD_ARCH__-mcore-libs +Architecture: any +Pre-Depends: advance-toolchain-__AT_MAJOR_INTERNAL__-cross__BUILD_ARCH__-mcore-libs (= __AT_FULL_VER__) +Description: Advance Toolchain + The advance toolchain is a self contained toolchain which provides preview + toolchain functionality in GCC, binutils, GLIBC, GDB, Valgrind, and OProfile. + This package provides the necessary libraries to build multi-threaded + applications. + +Package: advance-toolchain-__AT_MAJOR_INTERNAL__-cross__BUILD_ARCH__-mcore-libs +Architecture: any +Pre-Depends: advance-toolchain-__AT_MAJOR_INTERNAL__-cross__BUILD_ARCH__ (= __AT_FULL_VER__) +Depends: ${shlibs:Depends} ${misc:Depends} +Description: Advance Toolchain + The advance toolchain is a self contained toolchain which provides preview + toolchain functionality in GCC, binutils, GLIBC, GDB, Valgrind, and OProfile. + This package provides the necessary libraries to build multi-threaded + applications. diff --git a/configs/9.0/deb/monolithic_cross/copyright b/configs/9.0/deb/monolithic_cross/copyright new file mode 120000 index 000000000..8983cb3cf --- /dev/null +++ b/configs/9.0/deb/monolithic_cross/copyright @@ -0,0 +1 @@ +../../../8.0/deb/monolithic_cross/copyright \ No newline at end of file diff --git a/configs/9.0/deb/monolithic_cross/cross-common.postinst b/configs/9.0/deb/monolithic_cross/cross-common.postinst new file mode 120000 index 000000000..4bc8475b5 --- /dev/null +++ b/configs/9.0/deb/monolithic_cross/cross-common.postinst @@ -0,0 +1 @@ +../../../8.0/deb/monolithic_cross/cross-common.postinst \ No newline at end of file diff --git a/configs/9.0/deb/monolithic_cross/cross-common.prerm b/configs/9.0/deb/monolithic_cross/cross-common.prerm new file mode 120000 index 000000000..5d2e40742 --- /dev/null +++ b/configs/9.0/deb/monolithic_cross/cross-common.prerm @@ -0,0 +1 @@ +../../../8.0/deb/monolithic_cross/cross-common.prerm \ No newline at end of file diff --git a/configs/9.0/deb/monolithic_cross/postinst b/configs/9.0/deb/monolithic_cross/postinst new file mode 120000 index 000000000..853f72644 --- /dev/null +++ b/configs/9.0/deb/monolithic_cross/postinst @@ -0,0 +1 @@ +../../../8.0/deb/monolithic_cross/postinst \ No newline at end of file diff --git a/configs/9.0/deb/monolithic_cross/prerm b/configs/9.0/deb/monolithic_cross/prerm new file mode 120000 index 000000000..88de495f8 --- /dev/null +++ b/configs/9.0/deb/monolithic_cross/prerm @@ -0,0 +1 @@ +../../../8.0/deb/monolithic_cross/prerm \ No newline at end of file diff --git a/configs/9.0/deb/monolithic_cross/rules b/configs/9.0/deb/monolithic_cross/rules new file mode 120000 index 000000000..61d12be0f --- /dev/null +++ b/configs/9.0/deb/monolithic_cross/rules @@ -0,0 +1 @@ +../../../8.0/deb/monolithic_cross/rules \ No newline at end of file diff --git a/configs/9.0/distros/centos-6.mk b/configs/9.0/distros/centos-6.mk new file mode 120000 index 000000000..b8dd2bf9b --- /dev/null +++ b/configs/9.0/distros/centos-6.mk @@ -0,0 +1 @@ +redhat-6.mk \ No newline at end of file diff --git a/configs/9.0/distros/centos-7.mk b/configs/9.0/distros/centos-7.mk new file mode 120000 index 000000000..76426bdab --- /dev/null +++ b/configs/9.0/distros/centos-7.mk @@ -0,0 +1 @@ +redhat-7.mk \ No newline at end of file diff --git a/configs/9.0/distros/fedora-22.mk b/configs/9.0/distros/fedora-22.mk new file mode 100644 index 000000000..331b828e7 --- /dev/null +++ b/configs/9.0/distros/fedora-22.mk @@ -0,0 +1,106 @@ +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Distro dependent basic definitions for RedHat Enterprise Server 7 +# ================================================================= +# This Makefile include contains the definitions for the distro being used +# for the build process. It contains kernel version infos and distro specific +# sanity checks. + +# Informs the distro supported power archs +AT_SUPPORTED_ARCHS := ppc64le + +# You may force the BUILD_IGNORE_AT_COMPAT general condition by distro +#BUILD_IGNORE_AT_COMPAT := yes + +# Kernel version to build toolchain against +# - As this distro may support any arch variation combination (ppc64le/ppc64), +# there is a need to conditionally define these versions based on arch. +AT_KERNEL := 4.0 # Current distro kernel version for runtime. +AT_OLD_KERNEL := # Previous distro kernel version for runtime-compat. + +# Inform the mainly supported distros +AT_SUPPORTED_DISTROS := Fedora22 + +# Inform the compatibility supported distros +AT_COMPAT_DISTROS := + +# Sign the repository and packages +AT_SIGN_PKGS := yes +AT_SIGN_REPO := yes +AT_SIGN_PKGS_CROSS := no +AT_SIGN_REPO_CROSS := yes + +# ID of GNUPG key used to sign our packages (main/compat) +AT_GPG_KEYID := 6976A827 +AT_GPG_KEYIDC := 6976A827 +AT_GPG_KEYIDL := 6976A827 +# ID of GNUPG key used to sign our repositories (main/compat) +AT_GPG_REPO_KEYID := 6976A827 +AT_GPG_REPO_KEYIDC := 6976A827 +AT_GPG_REPO_KEYIDL := 6976A827 + +# Options required by the command to update the repository metadata +AT_REPOCMD_OPTS := -p -s sha1 --simple-md-filenames --no-database + +# Moved here from build.mk since the value for this variable +# depends on the distro. +# For a cross build the executables in the toolchain (gcc, ld, etc.) +# should be built as 32 bit. +BUILD_CROSS_32 := no + +# As some distros have special requirements for configuration upon final +# AT installation, put in this macro, the final configurations required +# after the main build and prior to the rpm build +define distro_final_config + echo "nothing to do." +endef + +# Due to a problem found on RHEL 7.0 GA there is a package that doesn't fall +# into the default dependencies and should be added manually for checking here +# libstdc++-static (in this case, either i686 and x86_64) must be available for +# the build to proceed. If RedHat fixes its internal dependencies later on, +# this check could be safely removed. + +# Inform the list of packages to check +ifndef AT_DISTRO_REQ_PKGS + AT_CROSS_PKGS_REQ := + AT_NATIVE_PKGS_REQ := libxslt docbook-style-xsl qt-devel \ + autogen-libopts + AT_COMMON_PKGS_REQ := zlib-devel ncurses-devel flex bison texinfo \ + createrepo glibc-devel subversion cvs gawk \ + rsync curl bc automake libstdc\\+\\+-static \ + redhat-lsb-core autoconf bzip2-[0-9] libtool-[0-9] \ + gzip rpm-build-[0-9] rpm-sign gcc-c++ imake + AT_CROSS_PGMS_REQ := + AT_NATIVE_PGMS_REQ := + AT_COMMON_PGMS_REQ := git_1.7 + AT_JAVA_VERSIONS := 7 +endif + +# Complete the list of packages to check that are based on arch being build +ifeq ($(BUILD_ARCH),ppc64le) + AT_NATIVE_PKGS_REQ += \(ibm-java-ppc64le-sdk-7.1\|java-1.7.1-ibm-devel\) + AT_NATIVE_PKGS_REQ += glibc-devel bzip2-devel popt-devel +else + AT_NATIVE_PKGS_REQ += \(ibm-java-ppc64-sdk-7.0\|java-1.7.1-ibm-devel\) \ + glibc-devel-.*\.ppc$$ glibc-devel-.*\.ppc64$$ \ + bzip2-devel-.*\.ppc$$ bzip2-devel-.*\.ppc64$$ \ + popt-devel-.*\.ppc$$ popt-devel-.*\.ppc64$$ +endif + +# If needed, define the necessary distro related sanity checks. +define distro_sanity + echo "nothing to test here" +endef diff --git a/configs/9.0/distros/opensuse-12.mk b/configs/9.0/distros/opensuse-12.mk new file mode 120000 index 000000000..3c37d8702 --- /dev/null +++ b/configs/9.0/distros/opensuse-12.mk @@ -0,0 +1 @@ +suse-12.mk \ No newline at end of file diff --git a/configs/9.0/distros/redhat-6.mk b/configs/9.0/distros/redhat-6.mk new file mode 100644 index 000000000..59776eb14 --- /dev/null +++ b/configs/9.0/distros/redhat-6.mk @@ -0,0 +1,88 @@ +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Distro dependent basic definitions for RedHat Enterprise Server 6 +# ================================================================= +# This Makefile include contains the definitions for the distro being used +# for the build process. It contains kernel version infos and distro specific +# sanity checks. + +# Informs the distro supported power archs +AT_SUPPORTED_ARCHS := ppc64 + +# You may force the BUILD_IGNORE_AT_COMPAT general condition by distro +#BUILD_IGNORE_AT_COMPAT := yes + +# Kernel version to build toolchain against +# - As this distro only supports one arch variation (ppc64), there is no +# need to conditionally define these versions based on arch. +AT_KERNEL := 2.6.32 # Current distro kernel version for runtime. +AT_OLD_KERNEL := 2.6.18 # Previous distro kernel version for runtime-compat. + +# Inform the mainly supported distros +AT_SUPPORTED_DISTROS := "RHEL6 RHEL7" + +# Inform the compatibility supported distros +AT_COMPAT_DISTROS := RHEL5 + +# Sign the repository and packages +AT_SIGN_PKGS := yes +AT_SIGN_REPO := yes +AT_SIGN_PKGS_CROSS := no +AT_SIGN_REPO_CROSS := yes + +# ID of GNUPG key used to sign our packages (main/compat) +AT_GPG_KEYID := 6976A827 +AT_GPG_KEYIDC := 3052930D +AT_GPG_KEYIDL := 6976A827 +# ID of GNUPG key used to sign our repositories (main/compat) +AT_GPG_REPO_KEYID := 3052930D +AT_GPG_REPO_KEYIDC := 3052930D +AT_GPG_REPO_KEYIDL := 6976A827 + +# Options required by the command to update the repository metadata +AT_REPOCMD_OPTS := -p -s sha1 --simple-md-filenames --no-database + +# Moved here from build.mk since the value for this variable +# depends on the distro. +# For a cross build the executables in the toolchain (gcc, ld, etc.) +# should be built as 32 bit. +BUILD_CROSS_32 := yes + +# As some distros have special requirements for configuration upon final +# AT installation, put in this macro, the final configurations required +# after the main build and prior to the rpm build +define distro_final_config + echo "nothing to do." +endef + +# Inform the list of packages to check +ifndef AT_DISTRO_REQ_PKGS + AT_CROSS_PKGS_REQ := + AT_NATIVE_PKGS_REQ := \(ibm-java2-ppc64-sdk-5.0\|java-1.5.0-ibm-devel\) \ + libxslt popt-devel qt-devel readline \ + readline-devel + AT_COMMON_PKGS_REQ := zlib-devel ncurses-devel flex bison texinfo \ + createrepo glibc-devel subversion cvs gawk autoconf \ + rsync curl bc automake imake + AT_CROSS_PGMS_REQ := + AT_NATIVE_PGMS_REQ := + AT_COMMON_PGMS_REQ := git_1.7 + AT_JAVA_VERSIONS := 5 +endif + +# If needed, define the necessary distro related sanity checks. +define distro_sanity + echo "nothing to test here" +endef diff --git a/configs/9.0/distros/redhat-7.mk b/configs/9.0/distros/redhat-7.mk new file mode 100644 index 000000000..77cf7cfb5 --- /dev/null +++ b/configs/9.0/distros/redhat-7.mk @@ -0,0 +1,115 @@ +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Distro dependent basic definitions for RedHat Enterprise Server 7 +# ================================================================= +# This Makefile include contains the definitions for the distro being used +# for the build process. It contains kernel version infos and distro specific +# sanity checks. + +# Informs the distro supported power archs +AT_SUPPORTED_ARCHS := ppc64 ppc64le + +# You may force the BUILD_IGNORE_AT_COMPAT general condition by distro +#BUILD_IGNORE_AT_COMPAT := yes + +# Kernel version to build toolchain against +# - As this distro may support any arch variation combination (ppc64le/ppc64), +# there is a need to conditionally define these versions based on arch. +ifeq ($(BUILD_ARCH),ppc64le) + # Current distro kernel version for runtime. + AT_KERNEL := 3.10 + # Previous distro kernel version for runtime-compat. + AT_OLD_KERNEL := +else + # Current distro kernel version for runtime. + AT_KERNEL := 3.10 + # Previous distro kernel version for runtime-compat. + AT_OLD_KERNEL := 2.6.32 +endif + +# Inform the mainly supported distros +AT_SUPPORTED_DISTROS := RHEL7 + +# Inform the compatibility supported distros +AT_COMPAT_DISTROS := RHEL6 + +# Sign the repository and packages +AT_SIGN_PKGS := yes +AT_SIGN_REPO := yes +AT_SIGN_PKGS_CROSS := no +AT_SIGN_REPO_CROSS := yes + +# ID of GNUPG key used to sign our packages (main/compat) +AT_GPG_KEYID := 6976A827 +AT_GPG_KEYIDC := 6976A827 +AT_GPG_KEYIDL := 6976A827 +# ID of GNUPG key used to sign our repositories (main/compat) +AT_GPG_REPO_KEYID := 6976A827 +AT_GPG_REPO_KEYIDC := 3052930D +AT_GPG_REPO_KEYIDL := 6976A827 + +# Options required by the command to update the repository metadata +AT_REPOCMD_OPTS := -p -s sha1 --simple-md-filenames --no-database + +# Moved here from build.mk since the value for this variable +# depends on the distro. +# For a cross build the executables in the toolchain (gcc, ld, etc.) +# should be built as 32 bit. +BUILD_CROSS_32 := no + +# As some distros have special requirements for configuration upon final +# AT installation, put in this macro, the final configurations required +# after the main build and prior to the rpm build +define distro_final_config + echo "nothing to do." +endef + +# Due to a problem found on RHEL 7.0 GA there is a package that doesn't fall +# into the default dependencies and should be added manually for checking here +# libstdc++-static (in this case, either i686 and x86_64) must be available for +# the build to proceed. If RedHat fixes its internal dependencies later on, +# this check could be safely removed. + +# Inform the list of packages to check +ifndef AT_DISTRO_REQ_PKGS + AT_CROSS_PKGS_REQ := + AT_NATIVE_PKGS_REQ := libxslt docbook-style-xsl qt-devel \ + autogen-libopts + AT_COMMON_PKGS_REQ := zlib-devel ncurses-devel flex bison texinfo \ + createrepo glibc-devel subversion cvs gawk \ + rsync curl bc automake libstdc\\+\\+-static \ + redhat-lsb-core autoconf bzip2-[0-9] libtool-[0-9] \ + gzip rpm-build-[0-9] rpm-sign gcc-c++ imake + AT_CROSS_PGMS_REQ := + AT_NATIVE_PGMS_REQ := + AT_COMMON_PGMS_REQ := git_1.7 + AT_JAVA_VERSIONS := 7 +endif + +# Complete the list of packages to check that are based on arch being build +ifeq ($(BUILD_ARCH),ppc64le) + AT_NATIVE_PKGS_REQ += \(ibm-java2-ppc64le-sdk-7.1\|java-1.7.1-ibm-devel\) + AT_NATIVE_PKGS_REQ += glibc-devel bzip2-devel popt-devel +else + AT_NATIVE_PKGS_REQ += \(ibm-java2-ppc64-sdk-7.0\|java-1.7.1-ibm-devel\) \ + glibc-devel-.*\.ppc$$ glibc-devel-.*\.ppc64$$ \ + bzip2-devel-.*\.ppc$$ bzip2-devel-.*\.ppc64$$ \ + popt-devel-.*\.ppc$$ popt-devel-.*\.ppc64$$ +endif + +# If needed, define the necessary distro related sanity checks. +define distro_sanity + echo "nothing to test here" +endef diff --git a/configs/9.0/distros/suse-12.mk b/configs/9.0/distros/suse-12.mk new file mode 100644 index 000000000..2b0977cef --- /dev/null +++ b/configs/9.0/distros/suse-12.mk @@ -0,0 +1,87 @@ +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Distro dependent basic definitions for SuSE Enterprise Server 12 +# ================================================================ +# This Makefile include contains the definitions for the distro being used +# for the build process. It contains kernel version infos and distro specific +# sanity checks. + +# Informs the distro supported power archs +AT_SUPPORTED_ARCHS := ppc64le + +# You may force the BUILD_IGNORE_AT_COMPAT general condition by distro +#BUILD_IGNORE_AT_COMPAT := yes + +# Kernel version to build toolchain against +# - As this distro only supports one arch variation (ppc64le), there is no +# need to conditionally define these versions based on arch. +AT_KERNEL := 3.12.12 # Current distro kernel version for runtime. +AT_OLD_KERNEL := # Previous distro kernel version for runtime-compat. + +# Inform the mainly supported distros +AT_SUPPORTED_DISTROS := SLES_12 + +# Inform the compatibility supported distros +AT_COMPAT_DISTROS := + +# Sign the repository and packages +AT_SIGN_PKGS := yes +AT_SIGN_REPO := yes +AT_SIGN_PKGS_CROSS := no +AT_SIGN_REPO_CROSS := yes + +# ID of GNUPG key used to sign our packages (main/compat) +AT_GPG_KEYID := 6976A827 +AT_GPG_KEYIDC := 6976A827 +AT_GPG_KEYIDL := 6976A827 +# ID of GNUPG key used to sign our repositories (main/compat) +AT_GPG_REPO_KEYID := 6976A827 +AT_GPG_REPO_KEYIDC := 6976A827 +AT_GPG_REPO_KEYIDL := 6976A827 + +# Options required by the command to update the repository metadata +AT_REPOCMD_OPTS := -p + +# Moved here from build.mk since the value for this variable +# depends on the distro. +# For a cross build the executables in the toolchain (gcc, ld, etc.) +# should be built as 64 bit. +BUILD_CROSS_32 := no + +# As some distros have special requirements for configuration upon final +# AT installation, put in this macro, the final configurations required +# after the main build and prior to the rpm build +define distro_final_config + echo "nothing to do." +endef + +# Inform the list of packages to check +ifndef AT_DISTRO_REQ_PKGS + AT_CROSS_PKGS_REQ := + AT_NATIVE_PKGS_REQ := libxslt popt-devel docbook-xsl-stylesheets \ + java-1_7_1-ibm-devel libbz2-devel + AT_COMMON_PKGS_REQ := zlib-devel ncurses-devel flex bison texinfo \ + createrepo subversion cvs gawk autoconf rsync curl \ + bc automake rpm-build gcc-c++ xorg-x11-util-devel + AT_CROSS_PGMS_REQ := + AT_NATIVE_PGMS_REQ := + AT_COMMON_PGMS_REQ := git_1.7 + AT_JAVA_VERSIONS := 7 +endif + +# If needed, define the necessary distro related sanity checks. +define distro_sanity + echo "nothing to test here" +endef diff --git a/configs/9.0/distros/ubuntu-14.mk b/configs/9.0/distros/ubuntu-14.mk new file mode 100644 index 000000000..5f4f66670 --- /dev/null +++ b/configs/9.0/distros/ubuntu-14.mk @@ -0,0 +1,82 @@ +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Distro dependent basic definitions for Ubuntu 14.04 LTS +# ======================================================= +# This Makefile include contains the definitions for the distro being used +# for the build process. It contains kernel version infos and distro specific +# sanity checks. + +# Informs the distro supported power archs +AT_SUPPORTED_ARCHS := ppc64le + +# You may force the BUILD_IGNORE_AT_COMPAT general condition by distro +#BUILD_IGNORE_AT_COMPAT := yes + +# Kernel version to build toolchain against +# - As this distro only supports one arch variation (ppc64le), there is no +# need to conditionally define these versions based on arch. +AT_KERNEL := 3.13 # Current distro kernel version for runtime. +# Ubuntu 14 doesn't support compat mode because it's the first version +# running on ppc64le. +#AT_OLD_KERNEL := # Previous distro kernel version for runtime-compat. + +# Inform the mainly supported distros +AT_SUPPORTED_DISTROS := trusty + +# Inform the compatibility supported distros +#AT_COMPAT_DISTROS := + +# Sign the repository and packages +#AT_SIGN_PKGS := yes +#AT_SIGN_REPO := yes +#AT_SIGN_PKGS_CROSS := no +#AT_SIGN_REPO_CROSS := yes + +# ID of GNUPG key used to sign our packages (main/compat) +AT_GPG_KEYID := 6976A827 +AT_GPG_KEYIDC := 3052930D +# ID of GNUPG key used to sign our repositories (main/compat) +AT_GPG_REPO_KEYID := 3052930D +AT_GPG_REPO_KEYIDC := 3052930D + +# Options required by the command to update the repository metadata +AT_REPOCMD_OPTS := -p -s sha1 --simple-md-filenames --no-database + +# As some distros have special requirements for configuration upon final +# AT installation, put in this macro, the final configurations required +# after the main build and prior to the rpm build +define distro_final_config + echo "nothing to do." +endef + +# Inform the list of packages to check +ifndef AT_DISTRO_REQ_PKGS + AT_CROSS_PKGS_REQ := + AT_NATIVE_PKGS_REQ := libxslt libpopt-dev libqt4-dev \ + libc6-dev libtool libbz2-dev xsltproc docbook-xsl + AT_COMMON_PKGS_REQ := zlib1g-dev libncurses5-dev ncurses-term flex bison \ + texinfo subversion cvs gawk fakeroot debhelper \ + autoconf rsync curl bc libxml2-utils automake \ + dpkg-sig xutils-dev + AT_CROSS_PGMS_REQ := + AT_NATIVE_PGMS_REQ := pkg-config /opt/ibm/java-ppc64le-71/bin/java + AT_COMMON_PGMS_REQ := git_1.7 + AT_JAVA_VERSIONS := 7 +endif + +# If needed, define the necessary distro related sanity checks. +define distro_sanity + echo "nothing to test here" +endef diff --git a/configs/9.0/packages/binutils/binutils.mk b/configs/9.0/packages/binutils/binutils.mk new file mode 120000 index 000000000..31ab1cf53 --- /dev/null +++ b/configs/9.0/packages/binutils/binutils.mk @@ -0,0 +1 @@ +../../../8.0/packages/binutils/binutils.mk \ No newline at end of file diff --git a/configs/9.0/packages/binutils/sources b/configs/9.0/packages/binutils/sources new file mode 100644 index 000000000..eb509ab98 --- /dev/null +++ b/configs/9.0/packages/binutils/sources @@ -0,0 +1,44 @@ +#!/usr/bin/env bash +# +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# binutils source package and build info +# ====================================== +# + +ATSRC_PACKAGE_NAME="GNU Binutils" +ATSRC_PACKAGE_VER=2.25 +ATSRC_PACKAGE_REV=7586fe6 +ATSRC_PACKAGE_LICENSE="GPL 2.0" +ATSRC_PACKAGE_DOCLINK="http://sourceware.org/binutils/docs/" +ATSRC_PACKAGE_RELFIXES= +ATSRC_PACKAGE_STR_VER="${ATSRC_PACKAGE_NAME} ${ATSRC_PACKAGE_VER}-${ATSRC_PACKAGE_REV}" +ATSRC_PACKAGE_PRE="test -d binutils-${ATSRC_PACKAGE_VER}-${ATSRC_PACKAGE_REV}" +# git.linux.ibm.com is a mirror of sourceware.org. +ATSRC_PACKAGE_CO=([0]="git clone git://git.linux.ibm.com/binutils-gdb/binutils-gdb.git binutils" \ + [1]="git clone git://sourceware.org/git/binutils-gdb.git binutils") +ATSRC_PACKAGE_GIT="git checkout -b binutils-${ATSRC_PACKAGE_VER}${ATSRC_PACKAGE_REV:+-${ATSRC_PACKAGE_REV}} ${ATSRC_PACKAGE_REV}" +ATSRC_PACKAGE_POST="mv binutils binutils-${ATSRC_PACKAGE_VER}${ATSRC_PACKAGE_REV:+-${ATSRC_PACKAGE_REV}}" +ATSRC_PACKAGE_SRC=${AT_BASE}/sources/binutils-${ATSRC_PACKAGE_VER}-${ATSRC_PACKAGE_REV} +ATSRC_PACKAGE_WORK=${AT_WORK_PATH}/binutils +# Disabled until check-ld is resolved +ATSRC_PACKAGE_MAKE_CHECK=none +ATSRC_PACKAGE_MLS= +ATSRC_PACKAGE_ALOC= +ATSRC_PACKAGE_PATCHES= +ATSRC_PACKAGE_TARS= +ATSRC_PACKAGE_DISTRIB=yes +ATSRC_PACKAGE_BUNDLE=main_toolchain diff --git a/configs/9.0/packages/binutils/specfile b/configs/9.0/packages/binutils/specfile new file mode 120000 index 000000000..78431015d --- /dev/null +++ b/configs/9.0/packages/binutils/specfile @@ -0,0 +1 @@ +../../../8.0/packages/binutils/specfile \ No newline at end of file diff --git a/configs/9.0/packages/binutils/stage_1 b/configs/9.0/packages/binutils/stage_1 new file mode 120000 index 000000000..dd963db69 --- /dev/null +++ b/configs/9.0/packages/binutils/stage_1 @@ -0,0 +1 @@ +../../../8.0/packages/binutils/stage_1 \ No newline at end of file diff --git a/configs/9.0/packages/binutils/stage_2 b/configs/9.0/packages/binutils/stage_2 new file mode 100644 index 000000000..e53d28e80 --- /dev/null +++ b/configs/9.0/packages/binutils/stage_2 @@ -0,0 +1,87 @@ +#!/usr/bin/env bash +# +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# + +ATCFG_HOLD_TEMP_INSTALL='no' +ATCFG_HOLD_TEMP_BUILD='no' +# Build in a new directory +ATCFG_BUILD_STAGE_T='dir' + +# Conditional configure command +atcfg_configure() { + if [[ "${cross_build}" == "no" ]]; then + # Configure command for native builds + CC=${at_dest}/bin/gcc \ + CXX=${at_dest}/bin/g++ \ + CFLAGS="-g -O2" \ + CXXFLAGS="-g -O2" \ + ${ATSRC_PACKAGE_WORK}/configure --build=${host} \ + --host=${target} \ + --target=${target} \ + ${alternate_target:+--enable-targets=${alternate_target}} \ + --with-sysroot=/ \ + --prefix=${at_dest} \ + --libdir=${at_dest}/lib${compiler##32} \ + --disable-gdb \ + --disable-readline \ + --disable-libdecnumber \ + --disable-sim \ + --disable-nls \ + --enable-shared \ + --enable-plugins \ + --enable-install-libiberty=./ \ + --enable-gold + else + # Configure command for cross builds + CC=${system_cc} \ + CXX=${system_cxx} \ + CFLAGS="-g -O" \ + CXXFLAGS="-g -O" \ + ${ATSRC_PACKAGE_WORK}/configure --build=${host} \ + --host=${host} \ + --target=${target} \ + ${target64:+--enable-targets=${target64}} \ + --with-sysroot=${dest_cross} \ + --prefix=${at_dest} \ + --disable-gdb \ + --disable-readline \ + --disable-libdecnumber \ + --disable-sim \ + --disable-nls \ + --enable-plugins \ + --enable-gold + fi +} + + +# Make command for build +atcfg_make() { + ${SUB_MAKE} all +} + +# Make command for build +atcfg_make_check() { + PATH=${at_dest}/bin:${PATH} \ + ${SUB_MAKE} check +} + + +# Install command for build +atcfg_install() { + ${SUB_MAKE} install DESTDIR=${install_place} +} diff --git a/configs/9.0/packages/binutils/stage_3 b/configs/9.0/packages/binutils/stage_3 new file mode 120000 index 000000000..8d7043e7f --- /dev/null +++ b/configs/9.0/packages/binutils/stage_3 @@ -0,0 +1 @@ +../../../8.0/packages/binutils/stage_3 \ No newline at end of file diff --git a/configs/9.0/packages/boost/boost.mk b/configs/9.0/packages/boost/boost.mk new file mode 100644 index 000000000..97263405c --- /dev/null +++ b/configs/9.0/packages/boost/boost.mk @@ -0,0 +1,37 @@ +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# +# +#TODO: Enable Boost on cross. +$(eval $(call set_provides,boost_1,multi,cross_yes)) + +boost: $(RCPTS)/boost_1.rcpt + +# Add it to the target 3rdparty_libs +3rdparty_libs-reqs += $(RCPTS)/boost_1.rcpt + +ifeq ($(CROSS_BUILD),no) + boost-deps-64 := python_1.b +endif + +$(RCPTS)/boost_1.rcpt: $(boost_1-archdeps) + @touch $@ + +$(RCPTS)/boost_1-32.a.rcpt: $(patsubst %,$(RCPTS)/%.rcpt,gcc_4 rsync_boost) + @touch $@ + +$(RCPTS)/boost_1-64.a.rcpt: $(patsubst %,$(RCPTS)/%.rcpt,gcc_4 rsync_boost \ + $(boost-deps-64)) + @touch $@ diff --git a/configs/9.0/packages/boost/sources b/configs/9.0/packages/boost/sources new file mode 100644 index 000000000..12e28ea62 --- /dev/null +++ b/configs/9.0/packages/boost/sources @@ -0,0 +1,63 @@ +#!/usr/bin/env bash +# +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# Boost source package and build info +# ================================== +# +ATSRC_PACKAGE_NAME="Boost" +ATSRC_PACKAGE_VER=1.58.0 +ATSRC_PACKAGE_VERID="${ATSRC_PACKAGE_VER}${ATSRC_PACKAGE_REV:+-${ATSRC_PACKAGE_REV}}" +ATSRC_PACKAGE_DOCLINK="http://www.boost.org/doc/libs/${ATSRC_PACKAGE_VER//./_}/" +ATSRC_PACKAGE_RELFIXES= +ATSRC_PACKAGE_STR_VER="${ATSRC_PACKAGE_NAME} ${ATSRC_PACKAGE_VER}" +ATSRC_PACKAGE_LICENSE="Boost Software License 1.0" +ATSRC_PACKAGE_PRE="test -d boost_${ATSRC_PACKAGE_VER//./_}" +ATSRC_PACKAGE_CO=([0]="wget -N http://sourceforge.net/projects/boost/files/boost/${ATSRC_PACKAGE_VER}/boost_${ATSRC_PACKAGE_VER//./_}.tar.bz2") +ATSRC_PACKAGE_POST="tar jxf boost_${ATSRC_PACKAGE_VER//./_}.tar.bz2" +ATSRC_PACKAGE_SRC="${AT_BASE}/sources/boost_${ATSRC_PACKAGE_VER//./_}" +ATSRC_PACKAGE_WORK=${AT_WORK_PATH}/boost +ATSRC_PACKAGE_MLS="" +ATSRC_PACKAGE_ALOC="" +ATSRC_PACKAGE_PATCHES="" +ATSRC_PACKAGE_TARS="" +ATSRC_PACKAGE_MAKE_CHECK="" +ATSRC_PACKAGE_DISTRIB=no +ATSRC_PACKAGE_BUNDLE=mcore-libs + +atsrc_get_patches () +{ + at_get_patch \ + https://github.com/rzinsly/powertechpreview/raw/ea618ab5d0219fe9e4d3b3b5cb1e27e3e8e66678/Boost%20Patches/boost_1_58_regex_lockfree.patch \ + 8cc371a14e12bb03c816437bf3a5f565 || return ${?} + + # Patch to increase the cache line size to 128 bytes for lockfree data + # structures to get better performance on big systems. + at_get_patch_and_trim \ + https://github.com/boostorg/lockfree/commit/303b103e8a7b17e52a74988be0fabb97da6dca6e.patch \ + 0001-lockfree-increase-the-lockfree-cache-line-size.patch 32 \ + e10e3dd4cc3a04843372b47c22ca5b57 || return ${?} + + return 0 +} + +atsrc_apply_patches () +{ + patch -p1 < boost_1_58_regex_lockfree.patch || return ${?} + patch -p2 < 0001-lockfree-increase-the-lockfree-cache-line-size.patch \ + || return ${?} + return 0 +} diff --git a/configs/9.0/packages/boost/specfile b/configs/9.0/packages/boost/specfile new file mode 120000 index 000000000..3b58d0017 --- /dev/null +++ b/configs/9.0/packages/boost/specfile @@ -0,0 +1 @@ +../../../8.0/packages/boost/specfile \ No newline at end of file diff --git a/configs/9.0/packages/boost/stage_1 b/configs/9.0/packages/boost/stage_1 new file mode 100644 index 000000000..76b98f5c2 --- /dev/null +++ b/configs/9.0/packages/boost/stage_1 @@ -0,0 +1,125 @@ +#!/usr/bin/env bash +# +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# Boost build parameters for stage 1 32/64 bits +# ========================================= +# + +# Include some standard functions +source ${utilities}/bitsize_selection.sh + +# Tell the build system to hold the temp install folder +ATCFG_HOLD_TEMP_INSTALL='no' +# Tell the build system to hold the temp build folder +ATCFG_HOLD_TEMP_BUILD='no' +# Build in the source code directory +ATCFG_BUILD_STAGE_T='link' + +atcfg_pre_hacks () +{ + local libdir=$(find_build_libdir ${AT_BIT_SIZE}) + + if [[ "${cross_build}" == "yes" ]]; then + # Set the AT's GCC as compiler. + echo "using gcc : power : \ + ${at_dest}/bin/${target64:-${target}}-g++ ;" \ + > user-config.jam + # Cross compiler fails on bzip2. + B2_PARAM="-sNO_BZIP2=1" + install_dir="${install_transfer_cross}/usr" + # Boost uses a lot of memory, we need to limit the number of + # threads based on the memory available. + memory=$(cat /proc/meminfo | grep MemTotal | awk '{print $2}') + max_threads=$((${memory}/1000000)) + if [[ ${num_cores} -le ${max_threads} ]]; then + max_threads=${num_cores} + fi + else + install_dir=${install_transfer} + max_threads=${num_cores} + # The --user-config switch is used in cross builds to select + # AT's gcc as compiler. On native builds, we provide an empty + # user-config.jam file. + touch user-config.jam + fi + + if [[ "${AT_BIT_SIZE}" -eq "32" ]]; then + # Clear the build and than apply a hack for SLES 11 + # SLES 11 doesnt provide a symlink named libbz2.so that points + # to its 32-bit version, so the linker does not find it. + mkdir -p ${at_active_build}/tmp + local libbz2=$(find /lib /usr/lib -name "libbz2.so.1.*" 2> \ + /dev/null | head -n 1) + if [[ -n "${libbz2}" ]]; then + ln -s ${libbz2} ${at_active_build}/tmp/libbz2.so + fi + local linker_flags="linkflags=-L${at_active_build}/tmp" + fi + + # The build of Boost is memory hungry. The compilation of some files + # uses too much RAM and we have to limit the amount of threads in order + # to protect it against OOM. + # 490 MiB / thread is known to be a safe value. + local mem=$(free -m | awk '/Mem/ { print $2 }') + THREADS=$(expr ${mem} / 490) + # It doesn't make sense to run more threads than the amount of cores + # available. + [[ ${THREADS} -gt ${num_cores} ]] && THREADS=${num_cores} + # Workaround a bug on b2 + # It segfaults when building Boost with more than 32 threads. We + # prevent this limiting the number of threads to 32. + [[ ${THREADS} -gt 32 ]] && THREADS=32 + B2_PARAM="${B2_PARAM} \ + -j ${THREADS} \ + -q \ + --build-dir=${at_active_build}/build \ + --stagedir=${at_active_build}/stage \ + --libdir=${install_dir}/${libdir} \ + --user-config=user-config.jam \ + address-model=${AT_BIT_SIZE} \ + cflags=-O3 \ + cxxflags=-O3 \ + link=static,shared \ + ${linker_flags}" +} + +atcfg_configure () +{ + # Avoid using Python on 32-bit and cross compiler because AT only + # builds it for 64 bits native. + if [[ ${AT_BIT_SIZE} -eq 32 || "${cross_build}" == "yes" ]]; then + local extra_parms="--without-libraries=python" + else + local python_exe=$(ls -d ${at_dest}/bin/python[0-9].[0-9]) + local extra_parms="--with-python=${python_exe} \ + --with-python-root=${at_dest}" + fi + + PATH=${at_dest}/bin:${PATH} \ + ./bootstrap.sh --prefix="${install_dir}" \ + ${extra_parms} +} + +atcfg_make () +{ + PATH=${at_dest}/bin:${PATH} ./b2 -a ${B2_PARAM} +} + +atcfg_install () +{ + PATH=${at_dest}/bin:${PATH} ./b2 ${B2_PARAM} install +} diff --git a/configs/9.0/packages/expat/expat.mk b/configs/9.0/packages/expat/expat.mk new file mode 120000 index 000000000..b30969494 --- /dev/null +++ b/configs/9.0/packages/expat/expat.mk @@ -0,0 +1 @@ +../../../8.0/packages/expat/expat.mk \ No newline at end of file diff --git a/configs/9.0/packages/expat/sources b/configs/9.0/packages/expat/sources new file mode 100644 index 000000000..a36fadd0c --- /dev/null +++ b/configs/9.0/packages/expat/sources @@ -0,0 +1,51 @@ +#!/usr/bin/env bash +# +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# GLIBC source package and build info +# =================================== +# + +ATSRC_PACKAGE_NAME="Expat XML Parser" +ATSRC_PACKAGE_VER=2.1.0 +ATSRC_PACKAGE_DOCLINK="http://www.xml.com/pub/a/1999/09/expat/index.html" +ATSRC_PACKAGE_RELFIXES= +ATSRC_PACKAGE_STR_VER="${ATSRC_PACKAGE_NAME} ${ATSRC_PACKAGE_VER}" +ATSRC_PACKAGE_LICENSE="MIT License" +ATSRC_PACKAGE_PRE="test -d expat-${ATSRC_PACKAGE_VER}" +ATSRC_PACKAGE_CO=([0]="wget -N http://downloads.sourceforge.net/project/expat/expat/${ATSRC_PACKAGE_VER}/expat-${ATSRC_PACKAGE_VER}.tar.gz") +ATSRC_PACKAGE_POST="tar -xzf expat-${ATSRC_PACKAGE_VER}.tar.gz" +ATSRC_PACKAGE_SRC=${AT_BASE}/sources/expat-${ATSRC_PACKAGE_VER} +ATSRC_PACKAGE_WORK=${AT_WORK_PATH}/expat +ATSRC_PACKAGE_MLS= +ATSRC_PACKAGE_PATCHES= +ATSRC_PACKAGE_ALOC= +ATSRC_PACKAGE_TARS= +ATSRC_PACKAGE_MAKE_CHECK= +ATSRC_PACKAGE_DISTRIB=no +ATSRC_PACKAGE_BUNDLE=main_toolchain + +atsrc_get_patches () +{ + at_get_patch \ + https://hg.mozilla.org/releases/mozilla-esr31/raw-diff/2f3e78643f5c/parser/expat/lib/xmlparse.c \ + 978566c4144504d170869619661fbd7d || return ${?} +} + +atsrc_apply_patches () +{ + patch -p3 < xmlparse.c || return ${?} +} diff --git a/configs/9.0/packages/expat/specfile b/configs/9.0/packages/expat/specfile new file mode 120000 index 000000000..4e2116407 --- /dev/null +++ b/configs/9.0/packages/expat/specfile @@ -0,0 +1 @@ +../../../8.0/packages/expat/specfile \ No newline at end of file diff --git a/configs/9.0/packages/expat/stage_1 b/configs/9.0/packages/expat/stage_1 new file mode 120000 index 000000000..989da0cce --- /dev/null +++ b/configs/9.0/packages/expat/stage_1 @@ -0,0 +1 @@ +../../../8.0/packages/expat/stage_1 \ No newline at end of file diff --git a/configs/9.0/packages/gcc/gcc.mk b/configs/9.0/packages/gcc/gcc.mk new file mode 120000 index 000000000..0fb27fe58 --- /dev/null +++ b/configs/9.0/packages/gcc/gcc.mk @@ -0,0 +1 @@ +../../../8.0/packages/gcc/gcc.mk \ No newline at end of file diff --git a/configs/9.0/packages/gcc/sources b/configs/9.0/packages/gcc/sources new file mode 100644 index 000000000..c093820a6 --- /dev/null +++ b/configs/9.0/packages/gcc/sources @@ -0,0 +1,60 @@ +#!/usr/bin/env bash +# +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# GCC source package and build info +# ================================= +# + +ATSRC_PACKAGE_NAME="GCC (GNU Compiler Collection)" +ATSRC_PACKAGE_SUBPACKAGE_NAME_0="GNU Standard C++ Library v3 (Libstdc++-v3)" +ATSRC_PACKAGE_SUBPACKAGE_NAME_1="GNU Libgomp" +ATSRC_PACKAGE_VER=5.3.1 +ATSRC_PACKAGE_REV=244814 +ATSRC_PACKAGE_LICENSE="GPL 3.0" +ATSRC_PACKAGE_DOCLINK="https://gcc.gnu.org/onlinedocs/gcc-5.3.0/gcc/" +ATSRC_PACKAGE_SUBPACKAGE_DOCLINK_0="https://gcc.gnu.org/libstdc++/" +ATSRC_PACKAGE_SUBPACKAGE_DOCLINK_1="https://gcc.gnu.org/onlinedocs/libgomp/" +ATSRC_PACKAGE_RELFIXES= +ATSRC_PACKAGE_NAMESUFFIX="[C, C++ (g++), fortran, Go]" +ATSRC_PACKAGE_STR_VER="${ATSRC_PACKAGE_NAME} ${ATSRC_PACKAGE_VER}-ibm-r${ATSRC_PACKAGE_REV}" +ATSRC_PACKAGE_PRE="test -d gcc-${ATSRC_PACKAGE_VER}-${ATSRC_PACKAGE_REV}" +ATSRC_PACKAGE_CO=([0]="svn co --revision ${ATSRC_PACKAGE_REV} svn://gcc.gnu.org/svn/gcc/branches/ibm/gcc-5-branch") +ATSRC_PACKAGE_POST="mv gcc-5-branch gcc-${ATSRC_PACKAGE_VER}-${ATSRC_PACKAGE_REV}" +ATSRC_PACKAGE_SRC=${AT_BASE}/sources/gcc-${ATSRC_PACKAGE_VER}-${ATSRC_PACKAGE_REV} +ATSRC_PACKAGE_WORK=${AT_WORK_PATH}/gcc +ATSRC_PACKAGE_MLS= +ATSRC_PACKAGE_ALOC= +ATSRC_PACKAGE_PATCHES= +ATSRC_PACKAGE_TARS= +ATSRC_PACKAGE_MAKE_CHECK= +ATSRC_PACKAGE_DISTRIB=yes +ATSRC_PACKAGE_BUNDLE=main_toolchain + +atsrc_get_patches () +{ + # Patch to add link-time optimization to some GCC libraries. + at_get_patch \ + https://github.com/powertechpreview/powertechpreview/raw/master/GCC%20PowerPC%20Backport/5/gcc-5-lto.tgz \ + 36a0999eeda099a50e3d7faa9606396d || return ${?} +} + +atsrc_apply_patches () +{ + tar xzf gcc-5-lto.tgz || return ${?} + + return 0 +} diff --git a/configs/9.0/packages/gcc/specfile b/configs/9.0/packages/gcc/specfile new file mode 120000 index 000000000..2dae22ab3 --- /dev/null +++ b/configs/9.0/packages/gcc/specfile @@ -0,0 +1 @@ +../../../8.0/packages/gcc/specfile \ No newline at end of file diff --git a/configs/9.0/packages/gcc/stage_1 b/configs/9.0/packages/gcc/stage_1 new file mode 100644 index 000000000..483a4ebed --- /dev/null +++ b/configs/9.0/packages/gcc/stage_1 @@ -0,0 +1,197 @@ +#!/usr/bin/env bash +# +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# GCC build parameters for stage 1 +# ================================ +# + +ATCFG_HOLD_TEMP_INSTALL='no' +ATCFG_HOLD_TEMP_BUILD='no' +# Build in a new directory +ATCFG_BUILD_STAGE_T='dir' + +# Required pre build hacks +atcfg_pre_hacks() { + # Overwrite the existing DEV-PHASE with Advance-Toolchain-XX + mv ${ATSRC_PACKAGE_WORK}/gcc/DEV-PHASE ${ATSRC_PACKAGE_WORK}/gcc/DEV-PHASE.back + echo "Advance-Toolchain-${at_major_internal}" > ${ATSRC_PACKAGE_WORK}/gcc/DEV-PHASE + # Overwrite the existing REVISION with the current SVN revision date + mv ${ATSRC_PACKAGE_WORK}/gcc/REVISION ${ATSRC_PACKAGE_WORK}/gcc/REVISION.back + sed "s/branch merged/branch, revision: ${ATSRC_PACKAGE_REV} merged/" ${ATSRC_PACKAGE_WORK}/gcc/REVISION.back \ + > ${ATSRC_PACKAGE_WORK}/gcc/REVISION + mv ${ATSRC_PACKAGE_WORK}/gcc/DATESTAMP ${ATSRC_PACKAGE_WORK}/gcc/DATESTAMP.back + echo "$(head -n 1 ${ATSRC_PACKAGE_WORK}/gcc/ChangeLog.ibm | cut -f 1 -d " " | sed "s/-//g")" \ + > ${ATSRC_PACKAGE_WORK}/gcc/DATESTAMP +} + +# Pre configure settings or commands to run +atcfg_pre_configure() { + cc_64=${system_cc} + cxx_64=${system_cxx} + libdir="${at_dest}/lib" + if [[ "${cross_build}" == "no" ]]; then + if [[ "${build_arch}" == ppc64* ]]; then + if [[ "${default_compiler}" == "32" ]]; then + cc_64="${gcc64}" + cxx_64="${gpp64}" + fi + libdir="${at_dest}/lib64" + fi + fi +} + +# Conditional configure command +atcfg_configure() { + if [[ "${cross_build}" == "no" ]]; then + if [[ "${distro_fm}" == "ubuntu" ]]; then + # Ubuntu requires a different path for include and libs + # due to its solution for multiarch support. + multiarch=yes + fi + + # Configure command for native builds + CC="${cc_64}" \ + CXX="${cxx_64}" \ + AS="${at_dest}/bin/as" \ + LD="${at_dest}/bin/ld" \ + ${ATSRC_PACKAGE_WORK}/configure \ + --build=${host} \ + --host=${host} \ + --target=${target} \ + --with-cpu=${default_cpu} \ + --prefix="${at_dest}" \ + ${secure_plt:+--enable-secureplt} \ + ${disable_multilib:+--disable-multilib} \ + --disable-threads \ + --disable-shared \ + --disable-libmudflap \ + --disable-libssp \ + --disable-bootstrap \ + --disable-libgomp \ + --disable-lto \ + --with-mpfr-include="${at_dest}/include" \ + --with-mpfr-lib="${libdir}" \ + --with-gmp-include="${at_dest}/include" \ + --with-gmp-lib="${libdir}" \ + --with-mpc-include="${at_dest}/include" \ + --with-mpc-lib="${libdir}" \ + --enable-languages=c,c++ \ + --with-as="${at_dest}/bin/as" \ + --with-ld="${at_dest}/bin/ld" \ + ${multiarch:+--enable-multiarch} + else + # Configure command for cross builds + CC="${cc_64}" \ + CXX="${cxx_64}" \ + LD_FOR_TARGET="${at_dest}/bin/${target}-ld" \ + AS_FOR_TARGET="${at_dest}/bin/${target}-as" \ + AR_FOR_TARGET="${at_dest}/bin/${target}-ar" \ + RANLIB_FOR_TARGET="${at_dest}/bin/${target}-ranlib" \ + ${ATSRC_PACKAGE_WORK}/configure \ + --build=${host} \ + --host=${host} \ + --target=${target64:-${target}} \ + --with-cpu=${default_cpu} \ + --prefix="${at_dest}" \ + ${secure_plt:+--enable-secureplt} \ + ${disable_multilib:+--disable-multilib} \ + --disable-threads \ + --disable-shared \ + --disable-libmudflap \ + --disable-libssp \ + --disable-bootstrap \ + --disable-libgomp \ + --disable-libatomic \ + --disable-decimal-float \ + --disable-libquadmath \ + --disable-libcc1 \ + --with-mpfr-include="${tmp_dir}/include" \ + --with-mpfr-lib="${tmp_dir}/lib" \ + --with-gmp-include="${tmp_dir}/include" \ + --with-gmp-lib="${tmp_dir}/lib" \ + --with-mpc-include="${tmp_dir}/include" \ + --with-mpc-lib="${tmp_dir}/lib" \ + --enable-languages=c \ + --with-as="${at_dest}/bin/${target}-as" \ + --with-ld="${at_dest}/bin/${target}-ld" \ + --with-newlib \ + --without-headers + fi +} + +# Make build command +atcfg_make() { + # gcc_cv_libc_provides_ssp=yes - GCC needs glibc headers in order to + # detect if the standard C library supports stack protection. + # However, the glibc headers aren't available at this stage. + ${SUB_MAKE} all \ + gcc_cv_libc_provides_ssp=yes +} + +# Pre install settings or commands to run +atcfg_pre_install() { + # The gcc install recipe must be able to find the following folders + # so that it can perform its tasks properly, as installing target + # host binaries on cross builds. The binutils package will create + # this folders on its install. As our installs are atomic, we need + # to provide them before hand, so GCC finds it and its install + # recipe can perform properly. + [[ -d "${install_place}/${at_dest}/${target}/bin" ]] || \ + mkdir -p "${install_place}/${at_dest}/${target}/bin" + [[ -d "${install_place}/${at_dest}/${target}/lib" ]] || \ + mkdir -p "${install_place}/${at_dest}/${target}/lib" +} + +# Install build command +atcfg_install() { + make install -j1 DESTDIR=${install_place} +} + +# Post install settings or commands to run +atcfg_post_install() { + # Create the required symlinks to install + if [[ "${cross_build}" == "no" ]]; then + pushd ${install_place}/${at_dest}/bin + if [[ ! -e ${target}-gcc ]]; then + echo -e "#!/bin/bash\nexec ${at_dest}/bin/gcc \"${@}\"" > ${target}-gcc + chmod a+x ${target}-gcc + fi + if [[ ! -e ${target}-g++ ]]; then + echo -e "#!/bin/bash\nexec ${at_dest}/bin/g++ \"${@}\"" > ${target}-g++ + chmod a+x ${target}-g++ + fi + if [[ ! -e ${target}-c++ ]]; then + ln -f ${target}-g++ ${target}-c++ + fi + popd + + # This hack isn't necessary on ppc64le. + if [[ "${build_arch}" == "ppc64" ]]; then + # The following files will be installed by GLIBC, so no + # need to have them properly mapped into the filelist + # (not installed into ${install_place} for mapping) + if [[ ! -e "${at_dest}/lib/ld.so.1" ]]; then + ln -s /lib/ld.so.1 "${at_dest}/lib/ld.so.1" + fi + if [[ ! -e "${at_dest}/lib/libc.so.6" ]]; then + ln -s /lib/libc.so.6 "${at_dest}/lib/libc.so.6" + fi + fi + # Remove unnecessary python scripts + find "${install_place}/${at_dest}" -name "libstdc++.so.*-gdb.py" -print -delete + fi +} diff --git a/configs/9.0/packages/gcc/stage_2 b/configs/9.0/packages/gcc/stage_2 new file mode 100644 index 000000000..c6b2fbfbd --- /dev/null +++ b/configs/9.0/packages/gcc/stage_2 @@ -0,0 +1,213 @@ +#!/usr/bin/env bash +# +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# GCC build parameters for stage 2 +# ================================ +# + +ATCFG_HOLD_TEMP_INSTALL='no' +ATCFG_HOLD_TEMP_BUILD='no' +# Build in a new directory +ATCFG_BUILD_STAGE_T='dir' + + +# Required post install hacks (this one is run after the final install move) +atcfg_posti_hacks() { + # Hack the static library to satisfy GLIBC build + for LIB in $(find "${at_dest}/lib" -name libgcc.a); do + [[ -e ${LIB%\.a}_eh.a ]] || ln -s libgcc.a ${LIB%\.a}_eh.a + [[ -e ${LIB%\.a}_s.a ]] || ln -s libgcc.a ${LIB%\.a}_s.a + done +} + +atcfg_pre_hacks() { + # Patch GCC source to use correct GLIBC (if not patched yet). + check_gcc=$(grep rpath ${ATSRC_PACKAGE_WORK}/gcc/config/rs6000/linux64.h | sed "s/.*rpath.*/rpath/" | head -n 1) + if [[ -z ${check_gcc} ]]; then + s1="s@\(GLIBC_DYNAMIC_LINKER[^/]*\)\( \"\)\(.*\)@\1\2"${at_dest}"\3@" + s2="s@%{!shared: %{!static:@%{!static: %{!shared:@" + s3="s@\(GNU_USER_DYNAMIC_LINKER32 \"\}\}\)@\1 --enable-new-dtags -rpath "${at_dest}"\/lib@" + s4="s@\(GNU_USER_DYNAMIC_LINKER64 \"\}\}\)@\1 --enable-new-dtags -rpath "${at_dest}"\/lib64@" + s5="s@\(GNU_USER_DYNAMIC_LINKER \"\}\}\)@\1 --enable-new-dtags -rpath "${at_dest}"\/lib@" + for F in ${ATSRC_PACKAGE_WORK}/gcc/config/rs6000/{linux64.h,sysv4.h}; do + sed -e "${s1}" -e "${s2}" -e "${s3}" -e "${s4}" -e "${s5}" < "${F}" > tmp.$$ && \ + { cmp -s tmp.$$ "${F}" || mv -f tmp.$$ "${F}"; } || \ + exit 1 + rm -f tmp.$$ + done + # Check and validate the applied patch + check_gcc=$(grep rpath ${ATSRC_PACKAGE_WORK}/gcc/config/rs6000/linux64.h | sed "s/.*rpath.*/rpath/" | head -n 1) + if [[ -z ${check_gcc} ]]; then + # Restore original files for sanity. The sed lines above append + # text to the original line, not replace them. + cp ${ATSRC_PACKAGE_SRC}/gcc/config/rs6000/linux64.h ${ATSRC_PACKAGE_WORK}/gcc/config/rs6000/ + cp ${ATSRC_PACKAGE_SRC}/gcc/config/rs6000/sysv4.h ${ATSRC_PACKAGE_WORK}/gcc/config/rs6000/ + echo "Failed patching gcc for stage 2 build." + exit 1 + fi + fi +} + +# Pre configure settings or commands to run +atcfg_pre_configure() { + cc_64="${system_cc}" + cxx_64="${system_cxx}" + libdir="${at_dest}/lib" + if [[ "${cross_build}" == "no" ]]; then + if [[ "${build_arch}" == ppc64* ]]; then + if [[ "${default_compiler}" == "32" ]]; then + cc_64="${gcc64}" + cxx_64="${gpp64}" + fi + libdir="${at_dest}/lib64" + fi + fi +} + +# Conditional configure command +atcfg_configure() { + if [[ "${cross_build}" == "no" ]]; then + # Configure command for native builds + CC="${cc_64}" \ + CXX="${cxx_64}" \ + CFLAGS="-O2" \ + CXXFLAGS="-O2" \ + AS="${at_dest}/bin/as" \ + LD="${at_dest}/bin/ld" \ + ${ATSRC_PACKAGE_WORK}/configure \ + --build=${target64:-${target}} \ + --host=${target64:-${target}} \ + --target=${target64:-${target}} \ + --with-cpu=${default_cpu} \ + --prefix=${at_dest} \ + ${with_longdouble:+--with-long-double-128} \ + ${with_dfp_standalone:+--enable-decimal-float} \ + ${secure_plt:+--enable-secureplt} \ + ${disable_multilib:+--disable-multilib} \ + --with-local-prefix="${at_dest}" \ + --enable-threads=posix \ + --enable-languages=c,c++ \ + --enable-__cxa_atexit \ + --enable-shared \ + --disable-checking \ + --disable-libmudflap \ + --disable-libssp \ + --disable-lto \ + --disable-libgomp \ + --without-ppl \ + --without-cloog \ + --with-gmp-include="${at_dest}/include" \ + --with-gmp-lib=${libdir} \ + --with-mpfr-include="${at_dest}/include" \ + --with-mpfr-lib=${libdir} \ + --with-mpc-include="${at_dest}/include" \ + --with-mpc-lib=${libdir} \ + --with-as="${at_dest}/bin/as" \ + --with-ld="${at_dest}/bin/ld" + else + # Configure command for cross builds + CC="${cc_64}" \ + CXX="${cxx_64}" \ + LD_FOR_TARGET="${at_dest}/bin/${target}-ld" \ + AS_FOR_TARGET="${at_dest}/bin/${target}-as" \ + AR_FOR_TARGET="${at_dest}/bin/${target}-ar" \ + NM_FOR_TARGET="${at_dest}/bin/${target}-nm" \ + RANLIB_FOR_TARGET="${at_dest}/bin/${target}-ranlib" \ + ${ATSRC_PACKAGE_WORK}/configure \ + --build=${host} \ + --host=${host} \ + --target=${target64:-${target}} \ + --with-cpu=${default_cpu} \ + --prefix=${at_dest} \ + ${with_longdouble:+--with-long-double-128} \ + ${secure_plt:+--enable-secureplt} \ + ${disable_multilib:+--disable-multilib} \ + --enable-languages=c \ + --enable-__cxa_atexit \ + --enable-threads=posix \ + --disable-libmudflap \ + --disable-libssp \ + --disable-libgomp \ + --disable-libatomic \ + --disable-libquadmath \ + --disable-lto \ + --disable-decimal-float \ + --disable-libcc1 \ + --with-mpfr-include="${tmp_dir}/include" \ + --with-mpfr-lib="${tmp_dir}/lib" \ + --with-gmp-include="${tmp_dir}/include" \ + --with-gmp-lib="${tmp_dir}/lib" \ + --with-mpc-include="${tmp_dir}/include" \ + --with-mpc-lib="${tmp_dir}/lib" \ + --without-ppl \ + --without-cloog \ + --with-host-libstdcxx="-L${libdir} -L${tmp_dir}/lib -lstdc++ -lsupc++ -lm -lgmp -lgmpxx -lmpfr -lmpc" \ + --with-build-sysroot="${dest_cross}" \ + --with-sysroot="${dest_cross}" \ + --with-native-system-header-dir="/usr/include" \ + --with-local-prefix="${dest_cross}/usr" + fi +} + +# Make build command +atcfg_make() { + # With -isystem we make sure that system's gcc (stage1) will recognize AT + # headers as system headers and give them special treatment. + ${SUB_MAKE} STAGE1_CFLAGS="-isystem ${at_dest}/include" STAGE1_CXXFLAGS="-isystem ${at_dest}/include" all +} + +# Pre install settings or commands to run +atcfg_pre_install() { + # The gcc install recipe must be able to find the following folders + # so that it can perform its tasks properly, as installing target + # host binaries on cross builds. The binutils package will create + # this folders on its install. As our installs are atomic, we need + # to provide them before hand, so GCC finds it and its install + # recipe can perform properly. + [[ -d "${install_place}/${at_dest}/${target}/bin" ]] || \ + mkdir -p "${install_place}/${at_dest}/${target}/bin" + [[ -d "${install_place}/${at_dest}/${target}/lib" ]] || \ + mkdir -p "${install_place}/${at_dest}/${target}/lib" +} + +# Install build command +atcfg_install() { + make install -j1 DESTDIR=${install_place} +} + +# Post install settings or commands to run +atcfg_post_install() { + # Fixes to cross build install + if [[ "${cross_build}" == "yes" ]]; then + # Create the required symlinks to install + pushd ${install_place}/${at_dest}/bin + if [[ ! -e ${target}-gcc ]]; then + echo -e "#!/bin/bash\nexec ${at_dest}/bin/gcc \"${@}\"" > ${target}-gcc + chmod a+x ${target}-gcc + fi + if [[ ! -e ${target}-g++ ]]; then + echo -e "#!/bin/bash\nexec ${at_dest}/bin/g++ \"${@}\"" > ${target}-g++ + chmod a+x ${target}-g++ + fi + if [[ ! -e ${target}-c++ ]]; then + ln -f ${target}-g++ ${target}-c++ + fi + popd + fi + # Remove unnecessary python scripts + find "${install_place}/${at_dest}" -name "libstdc++.so.*-gdb.py" -print -delete +} diff --git a/configs/9.0/packages/gcc/stage_3 b/configs/9.0/packages/gcc/stage_3 new file mode 100644 index 000000000..3bec9221d --- /dev/null +++ b/configs/9.0/packages/gcc/stage_3 @@ -0,0 +1,158 @@ +#!/usr/bin/env bash +# +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# GCC build parameters for stage 3 +# ================================ +# + +ATCFG_HOLD_TEMP_INSTALL='no' +ATCFG_HOLD_TEMP_BUILD='no' +# Build in a new directory +ATCFG_BUILD_STAGE_T='dir' +# Don't fail if stage final install place doesn't exist +if [[ "${cross_build}" == "yes" ]]; then + ATCFG_INSTALL_PEDANTIC="no" +fi + +# Required pre build hacks +atcfg_pre_hacks() { + # Clean static lib hack done on gcc stage 2 for GLIBC build. + for Z in $(find "${at_dest}/lib" -name libgcc.a); do + [[ -h ${Z%\.a}_s.a ]] && rm -f ${Z%\.a}_s.a + [[ -h ${Z%\.a}_eh.a ]] && rm -f ${Z%\.a}_eh.a + done + # Should run only on a native build... Skip these on cross + if [[ "${cross_build}" == "no" ]]; then + # Hack required to avoid a bug where gcc picks up the wrong crti.o, + # causing ld to segfault in the stage3 build. We move the GCC required + # static libs to a separate place and use it in the build. + if [[ ! -d "${at_dest}/tmp/gcc_3" ]]; then + mkdir -p ${at_dest}/tmp/gcc_3 + fi + if [[ "${build_arch}" == ppc64* ]]; then + cp -t ${at_dest}/tmp/gcc_3 \ + ${at_dest}/lib64/*gmp* \ + ${at_dest}/lib64/*mpfr* \ + ${at_dest}/lib64/*mpc* \ + ${at_dest}/lib64/libsupc++.a \ + ${at_dest}/lib64/libstdc++.a + else + cp -t ${at_dest}/tmp/gcc_3 \ + ${at_dest}/lib/*gmp* \ + ${at_dest}/lib/*mpfr* \ + ${at_dest}/lib/*mpc* + fi + fi +} + +# Required post install hacks (this one is run after the final install move) +atcfg_posti_hacks() { + # Cleanup the temp files + rm -rf ${at_dest}/tmp +} + +# Conditional pre configure settings or commands to run +atcfg_pre_configure() { + if [[ "${cross_build}" == "no" ]]; then + cc_64=${system_cc} + cxx_64=${system_cxx} + libdir="${at_dest}/tmp/gcc_3" + if [[ "${cross_build}" == "no" ]]; then + if [[ "${build_arch}" == ppc64* ]]; then + if [[ "${default_compiler}" == "32" ]]; then + cc_64="${gcc64}" + cxx_64="${gpp64}" + fi + fi + fi + fi +} + +# Conditional configure command for builds +atcfg_configure() { + if [[ "${cross_build}" == "no" ]]; then + CC="${cc_64}" \ + CXX="${cxx_64}" \ + CFLAGS="-O2 -mminimal-toc" \ + CXXFLAGS="-O2 -mminimal-toc" \ + AS="${at_dest}/bin/as" \ + LD="${at_dest}/bin/ld" \ + LDFLAGS="-L${libdir}" \ + POSTSTAGE1_LDFLAGS="-L${libdir} -lstdc++ -lsupc++ -lm -lgmp -lgmpxx -lmpfr -lmpc" \ + ${ATSRC_PACKAGE_WORK}/configure \ + --build=${target64:-$target} \ + --host=${target64:-$target} \ + --target=${target64:-$target} \ + --prefix="${at_dest}" \ + ${with_longdouble:+--with-long-double-128} \ + ${with_dfp_standalone:+--enable-decimal-float} \ + ${secure_plt:+--enable-secureplt} \ + ${disable_multilib:+--disable-multilib} \ + --with-local-prefix="${at_dest}" \ + --enable-threads=posix \ + --enable-languages=c,c++ \ + --enable-__cxa_atexit \ + --enable-shared \ + --enable-checking=release \ + --enable-gnu-indirect-function \ + --enable-linker-build-id \ + --disable-libgomp \ + --with-gmp-include="${at_dest}/include" \ + --with-gmp-lib=${libdir} \ + --with-mpfr-include="${at_dest}/include" \ + --with-mpfr-lib=${libdir} \ + --with-mpc-include="${at_dest}/include" \ + --with-mpc-lib=${libdir} \ + --without-ppl \ + --without-cloog \ + --without-libelf \ + --with-as="${at_dest}/bin/as" \ + --with-ld="${at_dest}/bin/ld" \ + --with-cpu=${build_base_arch} \ + --with-tune=${build_optimization} + else + echo "No configure on gcc_3 cross stage" + fi +} + +# Make build command +atcfg_make() { + if [[ "${cross_build}" == "no" ]]; then + # With -isystem we make sure that system's gcc (stage1) will recognize + # AT headers as system headers and give them special treatment. + ${SUB_MAKE} STAGE1_CFLAGS="-isystem ${at_dest}/include" STAGE1_CXXFLAGS="-isystem ${at_dest}/include" all + else + echo "No make all on gcc_3 cross stage" + fi +} + +# Conditional install build command +atcfg_install() { + if [[ "${cross_build}" == "no" ]]; then + make install -j1 DESTDIR=${install_place} + else + echo "No make install on gcc_3 cross stage" + fi +} + +# Conditional post install settings or commands to run +atcfg_post_install() { + if [[ "${cross_build}" == "no" ]]; then + # Remove unnecessary python scripts + find "${install_place}/${at_dest}/lib" "${install_place}/${at_dest}/lib64" -name "libstdc++.so.*-gdb.py" -print -delete + fi +} diff --git a/configs/9.0/packages/gcc/stage_4 b/configs/9.0/packages/gcc/stage_4 new file mode 100644 index 000000000..7b7a5f8e0 --- /dev/null +++ b/configs/9.0/packages/gcc/stage_4 @@ -0,0 +1,254 @@ +#!/usr/bin/env bash +# +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# GCC build parameters for stage 4 +# ================================ +# + +ATCFG_HOLD_TEMP_INSTALL='no' +ATCFG_HOLD_TEMP_BUILD='no' +# Build in a new directory +ATCFG_BUILD_STAGE_T='dir' + + +# ATCFG_CONFIGURE SETTINGS +# ========================================================= +# Conditional configure command +atcfg_configure() { + if [[ "${cross_build}" == "no" ]]; then + # Configure command for native builds + #TODO: Enable gotools. + PATH=${at_dest}/bin:${PATH} \ + CC="${at_dest}/bin/gcc" \ + CFLAGS="-O2" \ + CXXFLAGS="-O2" \ + CFLAGS_FOR_TARGET="-O3" \ + CXXFLAGS_FOR_TARGET="-O3" \ + AS="${at_dest}/bin/as" \ + LD="${at_dest}/bin/ld" \ + LDFLAGS="-L${at_dest}/lib64" \ + ${ATSRC_PACKAGE_WORK}/configure \ + --build=${target64:-$target} \ + --host=${target64:-$target} \ + --target=${target64:-$target} \ + --with-cpu=${default_cpu} \ + --prefix="${at_dest}" \ + ${with_longdouble:+--with-long-double-128} \ + ${with_dfp_standalone:+--enable-decimal-float} \ + ${secure_plt:+--enable-secureplt} \ + ${disable_multilib:+--disable-multilib} \ + --with-local-prefix="${at_dest}" \ + --enable-threads=posix \ + --enable-languages=${build_gcc_languages} \ + --enable-__cxa_atexit \ + --enable-shared \ + --enable-checking=release \ + --enable-lto \ + --enable-gnu-indirect-function \ + --enable-initfini-array \ + --enable-linker-build-id \ + --with-system-zlib \ + --with-gmp-include="${at_dest}/include" \ + --with-gmp-lib="${at_dest}/lib64" \ + --with-mpfr-include="${at_dest}/include" \ + --with-mpfr-lib="${at_dest}/lib64" \ + --with-mpc-include="${at_dest}/include" \ + --with-mpc-lib="${at_dest}/lib64" \ + --without-ppl \ + --without-cloog \ + --without-libelf \ + --with-host-libstdcxx="-L${at_dest}/lib64 -lstdc++ -lsupc++ -lgmp -lgmpxx -lm" \ + --with-cpu=${build_base_arch} \ + --with-tune=${build_optimization} + else + # Configure command for cross builds + CC="${system_cc}" \ + CXX="${system_cxx}" \ + LD_FOR_TARGET="${at_dest}/bin/${target}-ld" \ + AS_FOR_TARGET="${at_dest}/bin/${target}-as" \ + AR_FOR_TARGET="${at_dest}/bin/${target}-ar" \ + RANLIB_FOR_TARGET="${at_dest}/bin/${target}-ranlib" \ + NM_FOR_TARGET="${at_dest}/bin/${target}-nm" \ + ${ATSRC_PACKAGE_WORK}/configure \ + --build=${host} \ + --host=${host} \ + --target=${target64:-${target}} \ + --prefix="${at_dest}" \ + --enable-shared \ + ${with_longdouble:+--with-long-double-128} \ + ${with_dfp:+--enable-decimal-float} \ + ${secure_plt:+--enable-secureplt} \ + ${disable_multilib:+--disable-multilib} \ + --enable-threads=posix \ + --enable-languages=${build_gcc_languages} \ + --enable-__cxa_atexit \ + --enable-lto \ + --enable-gnu-indirect-function \ + --enable-cross \ + --enable-initfini-array \ + --enable-linker-build-id \ + --disable-gotools \ + --disable-libcc1 \ + --disable-bootstrap \ + --with-as="${at_dest}/bin/${target}-as" \ + --with-ld="${at_dest}/bin/${target}-ld" \ + --with-mpfr-include="${tmp_dir}/include" \ + --with-mpfr-lib="${tmp_dir}/lib" \ + --with-gmp-include="${tmp_dir}/include" \ + --with-gmp-lib="${tmp_dir}/lib" \ + --with-mpc-include="${tmp_dir}/include" \ + --with-mpc-lib="${tmp_dir}/lib" \ + --without-ppl \ + --without-cloog \ + --without-libelf \ + --with-sysroot="${dest_cross}" \ + --with-host-libstdcxx="-L${at_dest}/lib -L${tmp_dir}/lib -lstdc++ -lsupc++ -lgmp -lgmpxx -lm" \ + --with-cpu=${build_base_arch} \ + --with-tune=${build_optimization} + fi +} + + +atcfg_pre_make() { + if [[ "${cross_build}" == "no" ]]; then + local lto_patch=gcc-5-lto.patch + + pushd ${ATSRC_PACKAGE_WORK} + if [[ ! -r ${lto_patch} ]]; then + echo "No gcc libstdc++ patch found!" + exit 1 + fi + # Ignore when the patch is already applied + patch -sfR --dry-run -p1 -i ${lto_patch} > /dev/null \ + || patch -p1 < ${lto_patch} + if [[ ${?} -ne 0 ]]; then + echo "Error applying gcc libstdc++ patch!" + exit 1 + fi + popd + fi +} + +# Make build command +atcfg_make() { + if [[ "${cross_build}" == "no" ]]; then + # Make build command + # libgo_cv_lib_setcontext_clobbers=no must be set for + # 32 bit go builds to work correctly. Once + # RH BZ 1018072 is fixed then setting the variable is + # no longer needed and the build will work. + # TODO: Remove LIBRARY_PATH. + # We need to set LIBRARY_PATH in order to build Go tools. + LIBRARY_PATH="${at_dest}/lib64" \ + PATH=${at_dest}/bin:${PATH} libgo_cv_lib_setcontext_clobbers_tls=no \ + ${SUB_MAKE} STAGE1_CFLAGS="-g -O" profiledbootstrap + else + PATH=${at_dest}/bin:${PATH} libgo_cv_lib_setcontext_clobbers_tls=no \ + ${SUB_MAKE} STAGE1_CFLAGS="-g -O" + fi +} + + +# Pre install settings or commands to run +atcfg_pre_install() { + # The gcc install recipe must be able to find the following folders + # so that it can perform its tasks properly, as installing target + # host binaries on cross builds. The binutils package will create + # this folders on its install. As our installs are atomic, we need + # to provide them before hand, so GCC finds it and its install + # recipe can perform properly. + [[ -d "${install_place}/${at_dest}/${target}/bin" ]] || \ + mkdir -p "${install_place}/${at_dest}/${target}/bin" + [[ -d "${install_place}/${at_dest}/${target}/lib" ]] || \ + mkdir -p "${install_place}/${at_dest}/${target}/lib" +} + +# Install build command +atcfg_install() { + PATH=${at_dest}/bin:${PATH} \ + make install -j1 DESTDIR=${install_place} +} + +# Post install settings or commands to run +atcfg_post_install() { + if [[ "${cross_build}" == "yes" ]]; then + # Place some additional files for build process + mkdir -p ${install_place}/${dest_cross}/usr/lib + if [[ "${build_arch}" == ppc64* ]]; then + # We need to manually copy these + cp -d ${install_place}/${at_dest}/${target64}/lib/libgcc_s.so* ${install_place}/${dest_cross}/usr/lib/ + cp -d ${install_place}/${at_dest}/${target64}/lib/libstdc++.so* ${install_place}/${dest_cross}/usr/lib/ + else + cp -d ${install_place}/${at_dest}/${target}/lib/libgcc_s.so* ${install_place}/${dest_cross}/usr/lib/ + cp -d ${install_place}/${at_dest}/${target}/lib/libstdc++.so* ${install_place}/${dest_cross}/usr/lib/ + fi + # Remove 32-bit go libraries as it is not supported on go >= 1.4.2. + if [[ -n "${target32}" ]]; then + find "${install_place}/${at_dest}/${target64}/lib/" \ + -depth -name "libgo.*" -o -name "libgo*begin.*" \ + | xargs rm + rm -rf ${install_place}/${at_dest}/${target64}/lib/go/ + fi + # This was needed to fix the cross build which defaults to ${target64} + # targets but now, we are assuming that every build should have the + # triple shortcut installed, so we create gcc ${target32}-* symlinks + pushd ${install_place}/${at_dest}/bin + for CMD in c++ cpp g++ gcc gcov gfortran; do + if [[ -x ${target64}-${CMD} ]] && \ + [[ ! -f ${target32}-${CMD} ]]; then + ln -sfn ${target64}-${CMD} ${target32}-${CMD} + fi + done + popd + else + pushd ${install_place}/${at_dest}/bin + # This is necessary for some applications to work + if [[ ! -e "cc" ]]; then + ln -s "gcc" "cc" + fi + popd + # Remove unnecessary python scripts + find "${install_place}/${at_dest}" -name "libstdc++.so.*-gdb.py" -print -delete + # Remove 32-bit go libraries as it is not supported on go >= 1.4.2. + if [[ -n "${target32}" ]]; then + find "${install_place}/${at_dest}/lib/" -depth \ + -name "libgo.*" -o -name "libgo*begin.*" \ + | xargs rm + rm -rf ${install_place}/${at_dest}/lib/go/ + fi + set -e + # Hack around to avoid ld.so.cache getting the libs from the + # system as ldconfig puts platform based directories preceding + # other directories. + check_dirs= + if [[ -n "${target32}" ]]; then + check_dirs="${install_transfer}/lib" + fi + if [[ -n "${target64}" ]]; then + if [[ -n "${target32}" ]]; then + check_dirs="${install_transfer}/lib64 ${check_dirs}" + else + check_dirs="${install_transfer}/lib64" + fi + fi + for dir in ${check_dirs}; do + ${AT_BASE}/scripts/utilities/create_lib_symlinks.sh \ + "${dir}" "${dir}/${build_load_arch}" + done + set +e + fi +} diff --git a/configs/9.0/packages/gcc/stage_optimized b/configs/9.0/packages/gcc/stage_optimized new file mode 100644 index 000000000..2793baa58 --- /dev/null +++ b/configs/9.0/packages/gcc/stage_optimized @@ -0,0 +1,136 @@ +#!/usr/bin/env bash +# +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# GCC build parameters for stage optimized +# ======================================== +# + +ATCFG_HOLD_TEMP_INSTALL='no' +ATCFG_HOLD_TEMP_BUILD='no' +# Build in a new directory +ATCFG_BUILD_STAGE_T='dir' + + +atcfg_pre_configure() { + # Check the need of a cross-compiler build + if [[ "${at_build_cpu}" == "${AT_OPTIMIZE_CPU}" ]]; then + echo cross-compiling=no >> ./configparms + else + echo cross-compiling=yes >> ./configparms + fi +} + + +atcfg_configure() { + PATH=${at_dest}/bin:${PATH} \ + CC="${at_dest}/bin/gcc" \ + CFLAGS="-O2" \ + CXXFLAGS="-O2" \ + CFLAGS_FOR_TARGET="-O3" \ + CXXFLAGS_FOR_TARGET="-O3" \ + AS="${at_dest}/bin/as" \ + LD="${at_dest}/bin/ld" \ + LDFLAGS="-L${at_dest}/lib64" \ + ${ATSRC_PACKAGE_WORK}/configure \ + --build=${target64:-$target} \ + --host=${target64:-$target} \ + --target=${target64:-$target} \ + --prefix="${at_dest}" \ + ${with_longdouble:+--with-long-double-128} \ + ${with_dfp_standalone:+--enable-decimal-float} \ + ${secure_plt:+--enable-secureplt} \ + ${disable_multilib:+--disable-multilib} \ + --with-local-prefix="${at_dest}" \ + --enable-threads=posix \ + --enable-languages=${build_gcc_languages} \ + --enable-__cxa_atexit \ + --enable-shared \ + --enable-checking=release \ + --enable-gnu-indirect-function \ + --enable-lto \ + --enable-linker-build-id \ + --disable-bootstrap \ + --with-gmp-include="${at_dest}/include" \ + --with-gmp-lib="${at_dest}/lib64" \ + --with-mpfr-include="${at_dest}/include" \ + --with-mpfr-lib="${at_dest}/lib64" \ + --with-mpc-include="${at_dest}/include" \ + --with-mpc-lib="${at_dest}/lib64" \ + --without-ppl \ + --without-cloog \ + --without-libelf \ + --with-system-zlib \ + --with-host-libstdcxx="-L${at_dest}/lib64 -lstdc++ -lsupc++ -lgmp -lgmpxx -lm" \ + --with-cpu=${AT_OPTIMIZE_CPU/ppc/} \ + --with-tune=${AT_OPTIMIZE_CPU/ppc/} +} + + +atcfg_make() { + # libgo_cv_lib_setcontext_clobbers=no must be set for + # 32 bit go builds to work correctly. Once + # RH BZ 1018072 is fixed then setting the variable is + # no longer needed and the build will work. + PATH=${at_dest}/bin:${PATH} \ + libgo_cv_lib_setcontext_clobbers_tls=no \ + ${SUB_MAKE} all +} + + +atcfg_install() { + PATH=${at_dest}/bin:${PATH} \ + make -j1 DESTDIR=${install_place} install-target +} + + +atcfg_post_install() { + # Remove unneeded install files + rm -rf ${install_place}/${at_dest}/lib/gcc + find "${install_place}" -type f -name "*.o" -print -delete + find "${install_place}" -type f -name "*.a" -print -delete + find "${install_place}" -type f -name "*.la" -print -delete + find "${install_place}" -type f -name "*.py" -print -delete + # Save all libraries into a tar file + pushd "${install_place}/${at_dest}/lib" + local flist=$(find . -name "*.so" -o -name "*.so.*") + [[ -n "${flist}" ]] && \ + tar czf "${install_place}/${AT_OPTIMIZE_CPU}.tar.gz" \ + ${flist} + popd + pushd "${install_place}/${at_dest}/lib64" + local flist=$(find . -name "*.so" -o -name "*.so.*") + [[ -n "${flist}" ]] && \ + tar czf "${install_place}/${AT_OPTIMIZE_CPU}_64.tar.gz" \ + ${flist} + popd + # Remove all installed built files + rm -rf "${install_place}/${at_dest}" + # Create processor lib/lib64 targets + mkdir -p "${install_place}/${at_dest}/lib/${AT_OPTIMIZE_CPU}" + mkdir -p "${install_place}/${at_dest}/lib64/${AT_OPTIMIZE_CPU}" + # Place saved libs on created final target + pushd "${install_place}/${at_dest}/lib/${AT_OPTIMIZE_CPU}" + [[ -e "${install_place}/${AT_OPTIMIZE_CPU}.tar.gz" ]] && \ + tar xzf "${install_place}/${AT_OPTIMIZE_CPU}.tar.gz" + popd + pushd "${install_place}/${at_dest}/lib64/${AT_OPTIMIZE_CPU}" + [[ -e "${install_place}/${AT_OPTIMIZE_CPU}_64.tar.gz" ]] && \ + tar xzf "${install_place}/${AT_OPTIMIZE_CPU}_64.tar.gz" + popd + rm -f "${install_place}/${AT_OPTIMIZE_CPU}.tar.gz" \ + "${install_place}/${AT_OPTIMIZE_CPU}_64.tar.gz" +} diff --git a/configs/9.0/packages/gdb/gdb.mk b/configs/9.0/packages/gdb/gdb.mk new file mode 120000 index 000000000..51346e9d0 --- /dev/null +++ b/configs/9.0/packages/gdb/gdb.mk @@ -0,0 +1 @@ +../../../8.0/packages/gdb/gdb.mk \ No newline at end of file diff --git a/configs/9.0/packages/gdb/sources b/configs/9.0/packages/gdb/sources new file mode 100644 index 000000000..e9c620f5d --- /dev/null +++ b/configs/9.0/packages/gdb/sources @@ -0,0 +1,42 @@ +#!/usr/bin/env bash +# +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# GDB source package and build info +# ================================= +# +ATSRC_PACKAGE_NAME="GDB (GNU Debugger)" +ATSRC_PACKAGE_VER=7.9.1 +ATSRC_PACKAGE_REV=f045cba +ATSRC_PACKAGE_LICENSE="GPL 2.0" +ATSRC_PACKAGE_DOCLINK="http://sourceware.org/gdb/current/onlinedocs/gdb/" +ATSRC_PACKAGE_RELFIXES= +ATSRC_PACKAGE_STR_VER="${ATSRC_PACKAGE_NAME} ${ATSRC_PACKAGE_VER}${ATSRC_PACKAGE_REV:+-${ATSRC_PACKAGE_REV}}" +ATSRC_PACKAGE_PRE="test -d gdb-${ATSRC_PACKAGE_VER}${ATSRC_PACKAGE_REV:+-${ATSRC_PACKAGE_REV}}" +# git.linux.ibm.com is a mirror of sourceware.org. +ATSRC_PACKAGE_CO=([0]="git clone git://git.linux.ibm.com/binutils-gdb/binutils-gdb.git gdb" \ + [1]="git clone git://sourceware.org/git/binutils-gdb.git gdb") +ATSRC_PACKAGE_GIT="git checkout -b gdb-${ATSRC_PACKAGE_VER}${ATSRC_PACKAGE_REV:+-${ATSRC_PACKAGE_REV}} ${ATSRC_PACKAGE_REV}" +ATSRC_PACKAGE_POST="mv gdb gdb-${ATSRC_PACKAGE_VER}${ATSRC_PACKAGE_REV:+-${ATSRC_PACKAGE_REV}}" +ATSRC_PACKAGE_SRC="${AT_BASE}/sources/gdb-${ATSRC_PACKAGE_VER}${ATSRC_PACKAGE_REV:+-${ATSRC_PACKAGE_REV}}" +ATSRC_PACKAGE_WORK=${AT_WORK_PATH}/gdb +ATSRC_PACKAGE_MLS= +ATSRC_PACKAGE_ALOC= +ATSRC_PACKAGE_TARS= +ATSRC_PACKAGE_PATCHES= +ATSRC_PACKAGE_MAKE_CHECK="" +ATSRC_PACKAGE_DISTRIB=yes +ATSRC_PACKAGE_BUNDLE=devel diff --git a/configs/9.0/packages/gdb/specfile b/configs/9.0/packages/gdb/specfile new file mode 120000 index 000000000..74da6643f --- /dev/null +++ b/configs/9.0/packages/gdb/specfile @@ -0,0 +1 @@ +../../../8.0/packages/gdb/specfile \ No newline at end of file diff --git a/configs/9.0/packages/gdb/stage_1 b/configs/9.0/packages/gdb/stage_1 new file mode 100644 index 000000000..162a888d5 --- /dev/null +++ b/configs/9.0/packages/gdb/stage_1 @@ -0,0 +1,82 @@ +#!/usr/bin/env bash +# +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# GDB build parameters for stage 1 +# ================================ +# + +source ${AT_BASE}/scripts/utilities/bitsize_selection.sh + +# Tell the build system to hold the temp install folder +ATCFG_HOLD_TEMP_INSTALL='no' +# Tell the build system to hold the temp build folder +ATCFG_HOLD_TEMP_BUILD='no' +# Build in a new directory +ATCFG_BUILD_STAGE_T='dir' + + +atcfg_configure() { + local base_libdir="lib64" + local enable_bfd="--enable-64-bit-bfd" + local bit_size=64 + + if [[ "${cross_build}" == "yes" ]]; then + CC="${system_cc}" \ + CFLAGS="-g -m${env_build_arch}" \ + ${ATSRC_PACKAGE_WORK}/configure --build=${host} \ + --host=${host} \ + --target=${target64:-$target} \ + --prefix="${at_dest}" \ + --libdir="${at_dest}/lib${compiler##32}" \ + ${disable_multilib: +--disable_multilb} \ + --with-separate-debug-dir="/usr/lib64/debug" \ + --enable-werror=no \ + --with-libexpat-prefix=${tmp_dir} + else + if [[ "${build_arch}" == "ppc" ]]; then + base_libdir="lib" + enable_bfd= + fi + PATH=${at_dest}/bin:${PATH} \ + CC="${at_dest}/bin/gcc" \ + CFLAGS="-g -m${bit_size}" \ + PYTHONHOME="${at_dest}" \ + ${ATSRC_PACKAGE_WORK}/configure \ + --host=${target} \ + --target=${target} \ + --build=${target} \ + --prefix="${at_dest}" \ + --libdir="${at_dest}/${base_libdir}" \ + ${enable_bfd} \ + --disable-sim \ + --with-python="${at_dest}/bin/python3" \ + --with-separate-debug-dir="${at_dest}/lib/debug:/usr/lib/debug" \ + --enable-werror=no + fi +} + + +atcfg_make() { + PATH=${at_dest}/bin:${PATH} \ + ${SUB_MAKE} all-gdb +} + + +atcfg_install() { + PATH=${at_dest}/bin:${PATH} \ + ${SUB_MAKE} install-gdb DESTDIR=${install_place} +} diff --git a/configs/9.0/packages/glibc/glibc.mk b/configs/9.0/packages/glibc/glibc.mk new file mode 120000 index 000000000..15d5aa875 --- /dev/null +++ b/configs/9.0/packages/glibc/glibc.mk @@ -0,0 +1 @@ +../../../8.0/packages/glibc/glibc.mk \ No newline at end of file diff --git a/configs/9.0/packages/glibc/sources b/configs/9.0/packages/glibc/sources new file mode 100644 index 000000000..50d8c7230 --- /dev/null +++ b/configs/9.0/packages/glibc/sources @@ -0,0 +1,54 @@ +#!/usr/bin/env bash +# +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# GLIBC source package and build info +# =================================== +# + +ATSRC_PACKAGE_NAME="GNU C Library" +ATSRC_PACKAGE_VER=2.22 +ATSRC_PACKAGE_REV=e28b4381b04c +ATSRC_PACKAGE_LICENSE="LGPL 2.1" +ATSRC_PACKAGE_DOCLINK="http://www.gnu.org/software/libc/manual/html_node/index.html" +ATSRC_PACKAGE_RELFIXES= +ATSRC_PACKAGE_STR_VER="${ATSRC_PACKAGE_NAME} ${ATSRC_PACKAGE_VER}-ibm" +ATSRC_PACKAGE_PRE="test -d glibc-${ATSRC_PACKAGE_VER}-${ATSRC_PACKAGE_REV}" +# git://git.linux.ibm.com/toolchain-mirrors/glibc.git is a mirror of the git://sourceware.org/git/glibc.git +ATSRC_PACKAGE_CO=([0]="git clone git://git.linux.ibm.com/toolchain-mirrors/glibc.git" \ + [1]="git clone git://sourceware.org/git/glibc.git") +ATSRC_PACKAGE_GIT="git checkout -b glibc-${ATSRC_PACKAGE_VER}${ATSRC_PACKAGE_REV:+-${ATSRC_PACKAGE_REV}} ${ATSRC_PACKAGE_REV}" +ATSRC_PACKAGE_POST="mv glibc glibc-${ATSRC_PACKAGE_VER}${ATSRC_PACKAGE_REV:+-${ATSRC_PACKAGE_REV}}" +ATSRC_PACKAGE_SRC=${AT_BASE}/sources/glibc-${ATSRC_PACKAGE_VER}${ATSRC_PACKAGE_REV:+-${ATSRC_PACKAGE_REV}} +ATSRC_PACKAGE_WORK=${AT_WORK_PATH}/glibc +ATSRC_PACKAGE_MAKE_CHECK= +ATSRC_PACKAGE_PORTS= +ATSRC_PACKAGE_DISTRIB=yes +ATSRC_PACKAGE_BUNDLE=main_toolchain + +atsrc_get_patches () +{ + at_get_patch \ + https://raw.githubusercontent.com/powertechpreview/powertechpreview/26747dc0bfb0f8f30de9ebad78847a96d3191ba5/GLIBC%20PowerPC%20Backport/2.22/0001-powerpc-Conditionally-enable-TLE.patch \ + 801c05ea780220e8b4cf931af8c86946 || return ${?} + return 0 +} + +atsrc_apply_patches () +{ + patch -p1 < 0001-powerpc-Conditionally-enable-TLE.patch || return ${?} + return 0 +} diff --git a/configs/9.0/packages/glibc/specfile b/configs/9.0/packages/glibc/specfile new file mode 120000 index 000000000..1ad314f23 --- /dev/null +++ b/configs/9.0/packages/glibc/specfile @@ -0,0 +1 @@ +../../../8.0/packages/glibc/specfile \ No newline at end of file diff --git a/configs/9.0/packages/glibc/stage_1 b/configs/9.0/packages/glibc/stage_1 new file mode 100644 index 000000000..2f467ff9b --- /dev/null +++ b/configs/9.0/packages/glibc/stage_1 @@ -0,0 +1,251 @@ +#!/usr/bin/env bash +# +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# GLIBC build parameters for stage 1 32/64 bits +# ============================================= +# + +# We can't use the newly built gcc to compile glibc because it will set the +# dynamic linker to be ${dest}/lib/ld.so.1, which isn't installed until the +# glibc build finishes. So trying to run anything compiled with the new gcc +# will fail, in particular, glibc configure tests. I suppose you might be +# able to supply glibc configure with lots of libc_cv_* variables to +# avoid this, but then you'd forever be changing this script to keep up with +# new glibc configure tests. +# Note that dynamically linked programs built here with the old host gcc are +# subtly broken too; The glibc build sets their dynamic linker to +# ${dest}/lib/ld.so.1 but doesn't provide rpath. Which means you'll get the +# new ld.so trying to use the system libc.so, which doesn't work. ld.so and +# libc.so share data structures so are tightly coupled. To run the new +# programs, you need to set LD_LIBRARY_PATH for them, or better (so as to not +# affect forked commands that might need the system libs), run ld.so.x +# explicitly, passing --library-path as is done for localedef below. +# This is one of the reasons why you need to build glibc twice. + +# Include some standard functions +source ${utilities}/bitsize_selection.sh + +ATCFG_HOLD_TEMP_INSTALL='no' +ATCFG_HOLD_TEMP_BUILD='no' +# Build in a new directory +ATCFG_BUILD_STAGE_T='dir' + +# Required post install hacks (this one is run after the final install move) +atcfg_posti_hacks() +{ + # Set location of base directory to replace depending on ${cross_build} + if [[ "${cross_build}" == "no" ]]; then + local basedir="${at_dest}" + local libdir=${basedir}/$(find_build_libdir ${AT_BIT_SIZE}) + else + local basedir="${dest_cross}" + # On cross compilers, libraries are installed under usr/lib*/, + # instead of lib*/. But the most important C libraries are + # still available at lib*/, e.i. ld.so. + local libdir=${basedir}/usr/$(find_build_libdir ${AT_BIT_SIZE}) + fi + + local bindir=${basedir}/$(find_build_bindir ${AT_BIT_SIZE}) + local lddir=${basedir}/$(find_build_libdir ${AT_BIT_SIZE}) + + set -e + # Set the name of the loader to use based on bit size + local ld_so=$(basename $(ls ${lddir}/ld${AT_BIT_SIZE%32}.so.[0-9])) + # Replace ${libdir}/libc.so with a version compatible with binutils + # built with the --with_sysroot option set to ${at_dest} + [[ -e ${libdir}/libc.so ]] \ + && mv -f ${libdir}/libc.so ${libdir}/libc.so.orig + cat > ${libdir}/libc.so < /dev/null + ${SUB_MAKE} -C "${ATSRC_PACKAGE_WORK}/localedata" \ + objdir="${build_stage_work}" \ + install_root="/" \ + subdir=localedata \ + install-locales + popd > /dev/null + fi +} + +atcfg_pre_configure() +{ + local base_libdir=$(find_build_libdir ${AT_BIT_SIZE}) + local base_bindir=$(find_build_bindir ${AT_BIT_SIZE}) + local base_sbindir=$(find_build_sbindir ${AT_BIT_SIZE}) + local base_libexecdir=$(find_build_libexecdir ${AT_BIT_SIZE}) + if [[ "${cross_build}" == "no" ]]; then + echo cross-compiling=yes > ./configparms + echo slibdir="${at_dest}/${base_libdir}" >> ./configparms + echo libdir="${at_dest}/${base_libdir}" >> ./configparms + echo bindir="${at_dest}/${base_bindir}" >> ./configparms + echo sbindir="${at_dest}/${base_sbindir}" >> ./configparms + echo libexecdir="${at_dest}/${base_libexecdir}" >> ./configparms + echo rootsbindir="${at_dest}/${base_sbindir}" >> ./configparms + else + echo cross-compiling=yes > ./configparms + fi +} + +atcfg_configure() +{ + local base_target=$(find_build_target ${AT_BIT_SIZE}) + if [[ "${cross_build}" == "no" ]]; then + AUTOCONF="${autoconf}" \ + CC="${at_dest}/bin/gcc -m${AT_BIT_SIZE}" \ + CFLAGS="-g -O2 ${secure_plt:+-msecure-plt}" \ + libc_cv_forced_unwind="yes" \ + libc_cv_c_cleanup="yes" \ + ${ATSRC_PACKAGE_WORK}/configure \ + --build=${host} \ + --host=${base_target} \ + --prefix="${at_dest}" \ + --with-headers="${at_dest}/include" \ + --enable-add-ons \ + --enable-obsolete-rpc \ + --without-gd \ + --without-selinux \ + --enable-kernel="${kernel}" + else + # glibc can't detect correctly if the stack protector works on + # ppc64le. + if [[ "${base_target}" == powerpc*le-* ]]; then + disable_ssp=yes + fi + + AUTOCONF="${autoconf}" \ + CC="${at_dest}/bin/${target64:-${target}}-gcc -m${AT_BIT_SIZE}" \ + CFLAGS="-g -O2" \ + AR="${at_dest}/bin/${target}-ar" \ + AS="${at_dest}/bin/${target}-as" \ + RANLIB="${at_dest}/bin/${target}-ranlib" \ + libc_cv_forced_unwind="yes" \ + libc_cv_c_cleanup="yes" \ + ${ATSRC_PACKAGE_WORK}/configure \ + --build=${host} \ + --host=${base_target} \ + --prefix="/usr" \ + --with-headers="${dest_cross}/usr/include" \ + --enable-add-ons \ + --enable-obsolete-rpc \ + --disable-profile \ + --without-gd \ + --with-cpu=${build_load_arch} \ + --with-__thread \ + --without-gd \ + --without-selinux \ + --enable-kernel="${kernel}" \ + ${disable_ssp:+libc_cv_ssp="no"} + fi +} + +atcfg_make() +{ + ${SUB_MAKE} +} + +atcfg_install() +{ + if [[ "${cross_build}" == "no" ]]; then + ${SUB_MAKE} install install_root="${install_place}" + else + ${SUB_MAKE} install \ + install_root="${install_place}/${dest_cross}" + fi +} + +atcfg_post_install() +{ + local base_libdir=$(find_build_libdir ${AT_BIT_SIZE}) + if [[ "${cross_build}" == "no" ]]; then + rm -rf "${install_transfer}/var/db/Makefile" + # Prepare the locale archive for inclusion in RPM. + # We can't generate it yet because the files aren't available + # on ${at_dest} yet, so we need a dummy file to guarantee it'll + # be included in the package later. + mkdir -p "${install_transfer}/${base_libdir}/locale" + touch "${install_transfer}/${base_libdir}/locale/locale-archive" + + # Re-use time zone information available in the system. + ln -s /usr/share/zoneinfo/ ${install_transfer}/share/zoneinfo + else + rm -rf "${install_place}/${dest_cross}/var/db/Makefile" + fi + + local basedirs="" + # Set location of base directory to replace depending on ${cross_build} + if [[ "${cross_build}" == "no" ]]; then + basedirs="${install_transfer}" + else + basedirs="${install_place}/${dest_cross} \ + ${install_place}/${dest_cross}/usr" + fi + + # The powerpc64le ABIv2 doesn't support 32 bits yet. However, we still + # plan to provide libraries under lib64 instead of lib in order to let + # AT work in the same way as for powerpc64 (this approach is also used + # by Fedora). However, GCC expects files under lib/ when built with + # --disable-multilib, so we need to symlink lib/ to lib64/. + if [[ "${cross_build}" == "yes" ]] \ + && [[ "${target}" == powerpc64le* ]] \ + && [[ -z "${target32}" && -n "${target64}" ]]; then + for dir in ${basedirs}; do + pushd ${dir} > /dev/null + ln -s lib64 lib + popd + done + fi + # Remove duplicated header files prior to final install when building + # for the alternate target because the main target already provides + # them. Leave only the non-common headers. + local base_target=$(find_build_target ${AT_BIT_SIZE}) + # Check the correct install place (native x cross) + if [[ "${cross_build}" == "yes" ]]; then + local check_install="${install_place}/${dest_cross}/usr/include" + else + local check_install="${install_place}/${at_dest}/include" + fi + # Perform the clean of these unneeded include files + if [[ "${base_target}" == "${alternate_target}" ]]; then + # Run the remove command to clean up include files + find ${check_install} -type f \ + -not -name "stubs-${AT_BIT_SIZE}.h" \ + -delete + # Clean any remaining empty directories + find ${check_install} \ + -depth -empty \ + -delete + fi +} diff --git a/configs/9.0/packages/glibc/stage_2 b/configs/9.0/packages/glibc/stage_2 new file mode 100644 index 000000000..ca34e528c --- /dev/null +++ b/configs/9.0/packages/glibc/stage_2 @@ -0,0 +1,142 @@ +#!/usr/bin/env bash +# +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# GLIBC build parameters for stage 2 32/64 bits +# ============================================= +# + +# The build of glibc was almost full featured. In this build the new GCC is +# used to compile a highly optimized glibc with all the required features. + +# Include some standard functions +source ${utilities}/bitsize_selection.sh + +ATCFG_HOLD_TEMP_INSTALL='no' +ATCFG_HOLD_TEMP_BUILD='no' +# Build in a new directory +ATCFG_BUILD_STAGE_T='dir' + + +# Required post install hacks (this one is run after the final install move) +atcfg_posti_hacks() { + local base_libdir=$(find_build_libdir ${AT_BIT_SIZE}) + # Set the base library path + libdir=${at_dest}/${base_libdir} + # Find the proper glibc final libc filename + libname=$(basename $(ls ${libdir}/libc{-[0-9]*,}.so)) + # Set the name of the loader to use based on bit size + local ld_so=$(basename $(ls ${libdir}/ld${AT_BIT_SIZE%32}.so.[0-9])) + # Replace ${at_dest}/lib/libc.so with a version compatible with binutils + # built with the --with_sysroot option set to ${at_dest} + [[ -e ${libdir}/libc.so ]] && \ + mv -f ${libdir}/libc.so ${libdir}/libc.so.orig + echo "/* GNU ld script" > ${libdir}/libc.so + echo " Use the shared library, but some functions are only in" >> ${libdir}/libc.so + echo " the static library, so try that secondarily." >> ${libdir}/libc.so + echo " You will notice that the paths do not contain ${at_dest}." >> ${libdir}/libc.so + echo " This is because the Advance Toolchain binutils uses" >> ${libdir}/libc.so + echo " --with-sysroot which causes the linker to append ${at_dest}" >> ${libdir}/libc.so + echo " onto the paths found in this ld script. */" >> ${libdir}/libc.so + echo "GROUP ( libc.so.6 libc_nonshared.a AS_NEEDED ( ${ld_so} ) )" >> ${libdir}/libc.so + [[ -e ${libdir}/libc.so.orig ]] && \ + rm ${libdir}/libc.so.orig +} + +# Pre configure settings or commands to run +atcfg_pre_configure() { + local base_libdir=$(find_build_libdir ${AT_BIT_SIZE}) + local base_bindir=$(find_build_bindir ${AT_BIT_SIZE}) + local base_sbindir=$(find_build_sbindir ${AT_BIT_SIZE}) + local base_libexecdir=$(find_build_libexecdir ${AT_BIT_SIZE}) + echo slibdir="${at_dest}/${base_libdir}" > ./configparms + echo libdir="${at_dest}/${base_libdir}" >> ./configparms + echo bindir="${at_dest}/${base_bindir}" >> ./configparms + echo sbindir="${at_dest}/${base_sbindir}" >> ./configparms + echo libexecdir="${at_dest}/${base_libexecdir}" >> ./configparms + echo rootsbindir="${at_dest}/${base_sbindir}" >> ./configparms + echo cross-compiling=no >> ./configparms +} + +# Configure command for builds +atcfg_configure() { + local base_target=$(find_build_target ${AT_BIT_SIZE}) + + # TODO: Remove -Wno-error=array-bounds. + # This has been added in order to workaround an issue created by + # GCC 5. + PATH=${at_dest}/bin:${PATH} \ + AUTOCONF="${autoconf}" \ + CC="${at_dest}/bin/gcc -m${AT_BIT_SIZE}" \ + CXX="${at_dest}/bin/g++ -m${AT_BIT_SIZE}" \ + CFLAGS="-g -O3 \ + ${with_longdouble:+-mlong-double-128} \ + -Wno-error=array-bounds" \ + CXXFLAGS="-g -O3" \ + ${ATSRC_PACKAGE_WORK}/configure --build=${host} \ + --host=${base_target} \ + --prefix="${at_dest}" \ + --with-headers="${at_dest}/include" \ + --enable-add-ons \ + --with-__thread \ + --enable-shared \ + --enable-multi-arch \ + --enable-experimental-malloc \ + --with-cpu=${build_load_arch/ppc/} \ + --without-gd \ + --without-selinux \ + --enable-kernel="${kernel}" \ + --enable-obsolete-rpc \ + --enable-lock-elision=yes +} + +# Make build command +atcfg_make() { + PATH=${at_dest}/bin:${PATH} ${SUB_MAKE} +} + +# Conditional install build command +atcfg_install() { + if [[ "${cross_build}" == "no" ]]; then + PATH=${at_dest}/bin:${PATH} ${SUB_MAKE} install install_root="${install_place}" + else + PATH=${at_dest}/bin:${PATH} ${SUB_MAKE} install install_root="${install_place}/${dest_cross}" + fi +} + +# Conditinal post install settings or commands to run +atcfg_post_install() { + local base_libdir=$(find_build_libdir ${AT_BIT_SIZE}) + if [[ "${cross_build}" == "no" ]]; then + # Remove unused Makefile from install + rm -rf "${install_transfer}/var/db/Makefile" + # Removing the created ld.so.cache to avoid further problems + rm -rf "${install_transfer}/etc/ld.so.cache" + set -e + # Hack around to avoid ld.so.cache getting the libs from the + # system as ldconfig puts platform based directories preceding + # other directories. + ${AT_BASE}/scripts/utilities/create_lib_symlinks.sh \ + "${install_transfer}/${base_libdir}/" \ + "${install_transfer}/${base_libdir}/${build_load_arch}" + set +e + else + # Remove unused Makefile from install + rm -rf "${install_place}/${dest_cross}/var/db/Makefile" + # Removing the created ld.so.cache to avoid further problems + rm -rf "${install_place}/${dest_cross}/etc/ld.so.cache" + fi +} diff --git a/configs/9.0/packages/glibc/stage_compat b/configs/9.0/packages/glibc/stage_compat new file mode 100644 index 000000000..120f48a42 --- /dev/null +++ b/configs/9.0/packages/glibc/stage_compat @@ -0,0 +1,136 @@ +#!/usr/bin/env bash +# +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# GLIBC build parameters for compat 32/64 bits +# ============================================ +# + +# Include some standard functions +source ${utilities}/bitsize_selection.sh + +ATCFG_HOLD_TEMP_INSTALL='no' +ATCFG_HOLD_TEMP_BUILD='no' +# Build in a new directory +ATCFG_BUILD_STAGE_T='dir' + + +atcfg_posti_hacks() { + local base_libdir=$(find_build_libdir ${AT_BIT_SIZE}) + # Set the base library path + libdir=${at_dest}/${base_libdir} + # Find the proper glibc final libc filename + libname=$(basename $(ls ${libdir}/libc{-[0-9]*,}.so)) + # Set the name of the loader to use based on bit size + local ld_so=$(basename $(ls ${libdir}/ld${AT_BIT_SIZE%32}.so.[0-9])) + # Replace ${libdir}/libc.so with a version compatible with binutils + # built with the --with_sysroot option set to ${at_dest} + [[ -e ${libdir}/libc.so ]] && \ + mv -f ${libdir}/libc.so ${libdir}/libc.so.orig + echo "/* GNU ld script" > ${libdir}/libc.so + echo " Use the shared library, but some functions are only in" >> ${libdir}/libc.so + echo " the static library, so try that secondarily." >> ${libdir}/libc.so + echo " You will notice that the paths do not contain ${at_dest}." >> ${libdir}/libc.so + echo " This is because the Advance Toolchain binutils uses" >> ${libdir}/libc.so + echo " --with-sysroot which causes the linker to append ${at_dest}" >> ${libdir}/libc.so + echo " onto the paths found in this ld script. */" >> ${libdir}/libc.so + echo "GROUP ( libc.so.6 libc_nonshared.a AS_NEEDED ( ${ld_so} ) )" >> ${libdir}/libc.so + [[ -e ${libdir}/libc.so.orig ]] && \ + rm ${libdir}/libc.so.orig +} + + +atcfg_pre_configure() { + local base_libdir=$(find_build_libdir ${AT_BIT_SIZE}) + local base_bindir=$(find_build_bindir ${AT_BIT_SIZE}) + local base_sbindir=$(find_build_sbindir ${AT_BIT_SIZE}) + local base_libexecdir=$(find_build_libexecdir ${AT_BIT_SIZE}) + echo slibdir="${at_dest}/${base_libdir}" > ./configparms + echo libdir="${at_dest}/${base_libdir}" >> ./configparms + echo bindir="${at_dest}/${base_bindir}" >> ./configparms + echo sbindir="${at_dest}/${base_sbindir}" >> ./configparms + echo libexecdir="${at_dest}/${base_libexecdir}" >> ./configparms + echo rootsbindir="${at_dest}/${base_sbindir}" >> ./configparms + echo cross-compiling=no >> ./configparms +} + + +atcfg_configure() { + local base_target=$(find_build_target ${AT_BIT_SIZE}) + + # TODO: Remove -Wno-error=array-bounds. + # This has been added in order to workaround an issue created by + # GCC 5. + PATH=${at_dest}/bin:${PATH} \ + AUTOCONF="${autoconf}" \ + CC="${at_dest}/bin/gcc -m${AT_BIT_SIZE}" \ + CXX="${at_dest}/bin/g++ -m${AT_BIT_SIZE}" \ + CFLAGS="-g -O3 \ + ${with_longdouble:+-mlong-double-128} \ + -Wno-error=array-bounds" \ + CXXFLAGS="-g -O3" \ + ${ATSRC_PACKAGE_WORK}/configure --build=${target} \ + --host=${base_target} \ + --prefix="${at_dest}" \ + --with-headers="${at_dest}/include" \ + --enable-add-ons \ + --with-__thread \ + --enable-shared \ + --enable-multi-arch \ + --without-gd \ + --without-selinux \ + --with-cpu=${build_load_arch} \ + --enable-kernel="${compat_kernel}" \ + --enable-lock-elision=yes +} + + +atcfg_make() { + PATH=${at_dest}/bin:${PATH} ${SUB_MAKE} +} + + +atcfg_install() { + PATH=${at_dest}/bin:${PATH} \ + ${SUB_MAKE} install install_root="${install_place}" +} + + +atcfg_post_install() { + set -e + # Reuse time zone information available in the system. + ln -s /etc/localtime ${install_transfer}/etc/localtime + ln -s /usr/share/zoneinfo/ ${install_transfer}/share/zoneinfo + # Compat only needs runtime functionality. + rm -rf "${install_transfer}/include" \ + "${install_transfer}/share/info" \ + "${install_transfer}/var" + # Remove development files. + find "${install_transfer}/" \ + -name '*.a' \ + -o -name '*.o' \ + -o -name '*.la' \ + | xargs rm -vf + # Removing the created ld.so.cache to avoid further problems. + rm -rf "${install_transfer}/etc/ld.so.cache" + # Move final required files to compat folder. + mkdir -p "${install_transfer}/compat" + find "${install_transfer}" -maxdepth 1 \ + ! -path "${install_transfer}/compat" \ + ! -path "${install_transfer}" \ + -execdir mv -v -t "${install_transfer}/compat" {} + + set +e +} diff --git a/configs/9.0/packages/glibc/stage_optimized b/configs/9.0/packages/glibc/stage_optimized new file mode 100644 index 000000000..fc4da5757 --- /dev/null +++ b/configs/9.0/packages/glibc/stage_optimized @@ -0,0 +1,149 @@ +#!/usr/bin/env bash +# +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# GLIBC build parameters for CPU optimized 32/64 bits +# =================================================== +# + +# Include some standard functions +source ${utilities}/bitsize_selection.sh + +ATCFG_HOLD_TEMP_INSTALL='no' +ATCFG_HOLD_TEMP_BUILD='no' +# Build in a new directory +ATCFG_BUILD_STAGE_T='dir' + +# GLIBC BUILD HACKS +# ========================================================= +# Required post install hacks (this one is run after the final install move) +atcfg_posti_hacks() { + local base_libdir=$(find_build_libdir ${AT_BIT_SIZE}) + # Set the base library path + libdir=${at_dest}/${base_libdir} + # Find the proper glibc final libc filename + libname=$(basename $(ls ${libdir}/${AT_OPTIMIZE_CPU}/libc{-[0-9]*,}.so)) + local ld_so=$(basename $(ls ${libdir}/ld${AT_BIT_SIZE%32}.so.[0-9])) + # Replace ${libdir}/${AT_OPTIMIZE_CPU}/libc.so with a version compatible with binutils + # built with the --with_sysroot option set to ${at_dest} + [[ -e ${libdir}/${AT_OPTIMIZE_CPU}/libc.so ]] && \ + mv -f ${libdir}/${AT_OPTIMIZE_CPU}/libc.so ${libdir}/${AT_OPTIMIZE_CPU}/libc.so.orig + echo "/* GNU ld script" > ${libdir}/${AT_OPTIMIZE_CPU}/libc.so + echo " Use the shared library, but some functions are only in" >> ${libdir}/${AT_OPTIMIZE_CPU}/libc.so + echo " the static library, so try that secondarily." >> ${libdir}/${AT_OPTIMIZE_CPU}/libc.so + echo " You will notice that the paths do not contain ${at_dest}." >> ${libdir}/${AT_OPTIMIZE_CPU}/libc.so + echo " This is because the Advance Toolchain binutils uses" >> ${libdir}/${AT_OPTIMIZE_CPU}/libc.so + echo " --with-sysroot which causes the linker to append ${at_dest}" >> ${libdir}/${AT_OPTIMIZE_CPU}/libc.so + echo " onto the paths found in this ld script. */" >> ${libdir}/${AT_OPTIMIZE_CPU}/libc.so + echo "GROUP ( libc.so.6 libc_nonshared.a AS_NEEDED ( ${ld_so} ) )" >> ${libdir}/${AT_OPTIMIZE_CPU}/libc.so + [[ -e ${libdir}/${AT_OPTIMIZE_CPU}/libc.so.orig ]] && \ + rm ${libdir}/${AT_OPTIMIZE_CPU}/libc.so.orig +} + + +# ATCFG_CONFIGURE SETTINGS +# ========================================================= +# Pre configure settings or commands to run +atcfg_pre_configure() { + local base_libdir=$(find_build_libdir ${AT_BIT_SIZE}) + local base_bindir=$(find_build_bindir ${AT_BIT_SIZE}) + local base_sbindir=$(find_build_sbindir ${AT_BIT_SIZE}) + local base_libexecdir=$(find_build_libexecdir ${AT_BIT_SIZE}) + echo slibdir="${at_dest}/${base_libdir}" > ./configparms + echo libdir="${at_dest}/${base_libdir}" >> ./configparms + echo bindir="${at_dest}/${base_bindir}" >> ./configparms + echo sbindir="${at_dest}/${base_sbindir}" >> ./configparms + echo libexecdir="${at_dest}/${base_libexecdir}" >> ./configparms + echo rootsbindir="${at_dest}/${base_sbindir}" >> ./configparms + if [[ "${at_build_cpu}" == "${AT_OPTIMIZE_CPU}" ]]; then + echo cross-compiling=no >> ./configparms + else + echo cross-compiling=yes >> ./configparms + fi +} +# Configure command for native builds +atcfg_configure() { + local base_target=$(find_build_target ${AT_BIT_SIZE}) + + # TODO: Remove -Wno-error=array-bounds. + # This has been added in order to workaround an issue created by + # GCC 5. + PATH=${at_dest}/bin:${PATH} \ + AUTOCONF="${autoconf}" \ + CC="${at_dest}/bin/gcc -m${AT_BIT_SIZE}" \ + CXX="${at_dest}/bin/g++ -m${AT_BIT_SIZE}" \ + CFLAGS="-g -O3 \ + ${with_longdouble:+-mlong-double-128} \ + -Wno-error=array-bounds" \ + CXXFLAGS="-g -O3" \ + ${ATSRC_PACKAGE_WORK}/configure --build=${target} \ + --host=${base_target} \ + --prefix="${at_dest}" \ + --with-headers="${at_dest}/include" \ + --enable-add-ons \ + --with-__thread \ + --enable-shared \ + --enable-multi-arch \ + --enable-experimental-malloc \ + --enable-obsolete-rpc \ + --without-gd \ + --without-selinux \ + --with-cpu=${AT_OPTIMIZE_CPU/ppc/} \ + --enable-kernel="${kernel}" \ + --enable-obsolete-rpc \ + --enable-lock-elision=yes +} + + +# ATCFG_MAKE SETTINGS +# ========================================================= +# Make build command +atcfg_make() { + PATH=${at_dest}/bin:${PATH} ${SUB_MAKE} +} + + +# ATCFG_INSTALL SETTINGS +# ========================================================= +# Install build command +atcfg_install() { + PATH=${at_dest}/bin:${PATH} ${SUB_MAKE} install install_root="${install_place}" +} +# Post install settings or commands to run +atcfg_post_install() { + local base_libdir=$(find_build_libdir ${AT_BIT_SIZE}) + # Remove unneeded install files + find "${install_place}/${at_dest}" -type d -name "gconv" -print -execdir rm -rf {} + + find "${install_place}/${at_dest}" -type d -name "audit" -print -execdir rm -rf {} + + find "${install_place}/${at_dest}" -name "ld*.so.*" -print -delete + find "${install_place}/${at_dest}" -name "ld*.so" -print -delete + find "${install_place}/${at_dest}" -name "libdl*.so*" -print -delete + find "${install_place}/${at_dest}" -name "libdl.a" -print -delete + find "${install_place}/${at_dest}" -name "libmemusage.so.*" -print -delete + # Save all libraries into a tar file + pushd "${install_place}/${at_dest}/${base_libdir}" + tar czf "${install_place}/${AT_OPTIMIZE_CPU}.tar.gz" \ + $(find . -name "*.so" -o -name "*.so.*" -o -name "*.a") + popd + # Remove all installed built files + rm -rf "${install_place}/${at_dest}" + # Create processor lib target + mkdir -p "${install_place}/${at_dest}/${base_libdir}/${AT_OPTIMIZE_CPU}" + # Place saved libs on created final target + pushd "${install_place}/${at_dest}/${base_libdir}/${AT_OPTIMIZE_CPU}" + tar xzf "${install_place}/${AT_OPTIMIZE_CPU}.tar.gz" + popd +} diff --git a/configs/9.0/packages/gmp/gmp.mk b/configs/9.0/packages/gmp/gmp.mk new file mode 120000 index 000000000..b8e186ef8 --- /dev/null +++ b/configs/9.0/packages/gmp/gmp.mk @@ -0,0 +1 @@ +../../../8.0/packages/gmp/gmp.mk \ No newline at end of file diff --git a/configs/9.0/packages/gmp/sources b/configs/9.0/packages/gmp/sources new file mode 100644 index 000000000..a80e83fcf --- /dev/null +++ b/configs/9.0/packages/gmp/sources @@ -0,0 +1,54 @@ +#!/usr/bin/env bash +# +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# GMP source package and build info +# ================================= +# + +ATSRC_PACKAGE_NAME="GNU Multiple Precision Library" +ATSRC_PACKAGE_VER=6.0.0 +ATSRC_PACKAGE_REV=a +ATSRC_PACKAGE_LICENSE="GPL 3.0" +ATSRC_PACKAGE_DOCLINK="http://gmplib.org/manual/" +ATSRC_PACKAGE_RELFIXES= +ATSRC_PACKAGE_STR_VER="${ATSRC_PACKAGE_NAME} ${ATSRC_PACKAGE_VER}" +ATSRC_PACKAGE_PRE="test -d gmp-${ATSRC_PACKAGE_VER}" +ATSRC_PACKAGE_CO=([0]="wget -N http://ftpmirror.gnu.org/gmp/gmp-${ATSRC_PACKAGE_VER}${ATSRC_PACKAGE_REV}.tar.bz2" \ + [1]="wget -N ftp://ftp.unicamp.br/pub/gnu/gmp/gmp-${ATSRC_PACKAGE_VER}${ATSRC_PACKAGE_REV}.tar.bz2") +ATSRC_PACKAGE_POST="tar -xjf gmp-${ATSRC_PACKAGE_VER}${ATSRC_PACKAGE_REV}.tar.bz2" +ATSRC_PACKAGE_SRC=${AT_BASE}/sources/gmp-${ATSRC_PACKAGE_VER} +ATSRC_PACKAGE_WORK=${AT_WORK_PATH}/gmp +ATSRC_PACKAGE_MLS= +ATSRC_PACKAGE_ALOC= +ATSRC_PACKAGE_PATCHES= +ATSRC_PACKAGE_TARS= +ATSRC_PACKAGE_MAKE_CHECK= +ATSRC_PACKAGE_DISTRIB=yes +ATSRC_PACKAGE_BUNDLE=main_toolchain + +atsrc_get_patches () +{ + at_get_patch_and_trim \ + https://gmplib.org/repo/gmp-6.0/raw-rev/4a6d258b467f \ + gmp_6_ppc.patch 21 \ + 8c22c6493605f1814d2c7c3e5890e5c0 || return ${?} +} + +atsrc_apply_patches () +{ + patch -p1 < gmp_6_ppc.patch || return ${?} +} diff --git a/configs/9.0/packages/gmp/specfile b/configs/9.0/packages/gmp/specfile new file mode 120000 index 000000000..803d97469 --- /dev/null +++ b/configs/9.0/packages/gmp/specfile @@ -0,0 +1 @@ +../../../8.0/packages/gmp/specfile \ No newline at end of file diff --git a/configs/9.0/packages/gmp/stage_1 b/configs/9.0/packages/gmp/stage_1 new file mode 120000 index 000000000..489d2bdca --- /dev/null +++ b/configs/9.0/packages/gmp/stage_1 @@ -0,0 +1 @@ +../../../8.0/packages/gmp/stage_1 \ No newline at end of file diff --git a/configs/9.0/packages/gmp/stage_2 b/configs/9.0/packages/gmp/stage_2 new file mode 120000 index 000000000..25a61d71a --- /dev/null +++ b/configs/9.0/packages/gmp/stage_2 @@ -0,0 +1 @@ +../../../8.0/packages/gmp/stage_2 \ No newline at end of file diff --git a/configs/9.0/packages/golang/golang.mk b/configs/9.0/packages/golang/golang.mk new file mode 100644 index 000000000..0ffbf8256 --- /dev/null +++ b/configs/9.0/packages/golang/golang.mk @@ -0,0 +1,25 @@ +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Golang is available only for native pcc64le builds. + +$(eval $(call set_provides,golang_1,single,cross_no,skip_ppc64)) + +golang_1: $(RCPTS)/golang_1.rcpt + +$(RCPTS)/golang_1.rcpt: $(golang_1-archdeps) + @touch $@ + +$(RCPTS)/golang_1.a.rcpt: $(patsubst %,$(RCPTS)/%.rcpt, rsync_golang) + @touch $@ diff --git a/configs/9.0/packages/golang/sources b/configs/9.0/packages/golang/sources new file mode 100644 index 000000000..d4c79e448 --- /dev/null +++ b/configs/9.0/packages/golang/sources @@ -0,0 +1,49 @@ +#!/usr/bin/env bash +# +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# Golang source package and build info +# ====================================== +# + +ATSRC_PACKAGE_NAME="Golang" +ATSRC_PACKAGE_VER=1.6 +ATSRC_PACKAGE_REV=03771c518473 +ATSRC_PACKAGE_LICENSE="BSD License" +ATSRC_PACKAGE_DOCLINK="http://golang.org/doc/" +ATSRC_PACKAGE_RELFIXES= +ATSRC_PACKAGE_STR_VER="${ATSRC_PACKAGE_NAME} ${ATSRC_PACKAGE_VER}${ATSRC_PACKAGE_REV:+-${ATSRC_PACKAGE_REV}}" +ATSRC_PACKAGE_PRE="test -d golang-${ATSRC_PACKAGE_VER}${ATSRC_PACKAGE_REV:+-${ATSRC_PACKAGE_REV}}" +ATSRC_PACKAGE_CO=([0]="git clone https://github.com/powertechpreview/go.git golang") +ATSRC_PACKAGE_GIT="git checkout -b golang-${ATSRC_PACKAGE_VER}${ATSRC_PACKAGE_REV:+-${ATSRC_PACKAGE_REV}} ${ATSRC_PACKAGE_REV}" +ATSRC_PACKAGE_POST="mv golang golang-${ATSRC_PACKAGE_VER}${ATSRC_PACKAGE_REV:+-${ATSRC_PACKAGE_REV}}" +ATSRC_PACKAGE_SRC="${AT_BASE}/sources/golang-${ATSRC_PACKAGE_VER}${ATSRC_PACKAGE_REV:+-${ATSRC_PACKAGE_REV}}" +ATSRC_PACKAGE_WORK=${AT_WORK_PATH}/golang +ATSRC_PACKAGE_MLS= +ATSRC_PACKAGE_ALOC= +ATSRC_PACKAGE_PATCHES= +ATSRC_PACKAGE_TARS= +ATSRC_PACKAGE_DISTRIB=no +ATSRC_PACKAGE_BUNDLE=golang +ATSRC_PACKAGE_SKIP=ppc64 + +atsrc_get_patches () +{ + # Built with Go 1.5.2 on amd64. + at_get_patch \ + http://ausgsa.ibm.com/projects/p/ppctoolchain/web/public/download/go-linux-ppc64le-bootstrap.tbz \ + 74fa545069655c854bdee70c0536dfa5 || return ${?} +} diff --git a/configs/9.0/packages/golang/specfile b/configs/9.0/packages/golang/specfile new file mode 100644 index 000000000..d46c60911 --- /dev/null +++ b/configs/9.0/packages/golang/specfile @@ -0,0 +1,14 @@ +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# diff --git a/configs/9.0/packages/golang/stage_1 b/configs/9.0/packages/golang/stage_1 new file mode 100644 index 000000000..c2c1a42a2 --- /dev/null +++ b/configs/9.0/packages/golang/stage_1 @@ -0,0 +1,90 @@ +#!/usr/bin/env bash +# +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# Golang build parameters for stage 1 +# ===================================== +# + +source ${utilities}/bitsize_selection.sh + +# Tell the build system to hold the temp install folder +ATCFG_HOLD_TEMP_INSTALL='no' +# Tell the build system to hold the temp build folder +ATCFG_HOLD_TEMP_BUILD='no' +# Build in the source code directory +ATCFG_BUILD_STAGE_T='link' +# Don't fail if stage final install place doesn't exist +ATCFG_INSTALL_PEDANTIC="no" + +atcfg_pre_configure () +{ + stepid="golang_1" + go_dest="/usr/local/go/" + go_build="${builds}/${stepid}" + bootstrap="${go_build}/boot/" + install_transfer_go="${tmp_dir}/golang_1/${go_dest}" +} + +atcfg_configure () +{ + + mkdir -p ${bootstrap} && pushd $_ + tar -jxf ${ATSRC_PACKAGE_WORK}/go-linux-ppc64le-bootstrap.tbz + popd +} + +atcfg_make () +{ + cd ${go_build}/src/ + GOROOT_BOOTSTRAP=${bootstrap}/go-linux-ppc64le-bootstrap/ \ + GOROOT_FINAL=${go_dest} \ + ./make.bash +} + +atcfg_make_check() { + cd ${go_build}/src/ + PATH=${go_build}/bin/:${PATH} \ + GOROOT=${go_build} \ + ./run.bash --no-rebuild +} + +atcfg_pre_install () +{ + # Remove bootstrap files. + rm -rf ${bootstrap} ${go_build}/go-linux-ppc64le-bootstrap.tbz + mkdir -p ${install_transfer_go} +} + +atcfg_install () +{ + cp -r ${go_build}/* ${install_transfer_go} +} + +# Collect the file list. +atcfg_posti_hacks () +{ + filelist="${dynamic_spec}/golang/${stepid}.filelist" + + dirname ${filelist} | xargs mkdir -p + find ${install_transfer_go} -type f -print > ${filelist} + find ${install_transfer_go} -type l -print >> ${filelist} + + # Fix the paths on the final file list. + cat ${filelist} | sort -u | sed "s|${install_transfer_go}|${go_dest}|g" \ + > ${filelist}.seg + mv ${filelist}.seg ${filelist} +} diff --git a/configs/9.0/packages/groups b/configs/9.0/packages/groups new file mode 120000 index 000000000..b6f9e3050 --- /dev/null +++ b/configs/9.0/packages/groups @@ -0,0 +1 @@ +../../8.0/packages/groups \ No newline at end of file diff --git a/configs/9.0/packages/kernel/kernel.mk b/configs/9.0/packages/kernel/kernel.mk new file mode 120000 index 000000000..d156cc514 --- /dev/null +++ b/configs/9.0/packages/kernel/kernel.mk @@ -0,0 +1 @@ +../../../8.0/packages/kernel/kernel.mk \ No newline at end of file diff --git a/configs/9.0/packages/kernel/sources b/configs/9.0/packages/kernel/sources new file mode 100644 index 000000000..fac94a638 --- /dev/null +++ b/configs/9.0/packages/kernel/sources @@ -0,0 +1,46 @@ +#!/usr/bin/env bash +# +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# + +# Internal variables to find download path +# ======================================== +ATSRC_PACKAGE_SRC_PATH=$( (( "$(expr ${AT_KERNEL} : '\([0-9]\)*')" >= "3" )) && \ + echo "v$(expr ${AT_KERNEL} : '\([0-9]\)*').x" || \ + echo "v$(expr ${AT_KERNEL} : '\([0-9][.][0-9]\)*')") + +# KERNEL source package and build info +# ==================================== +ATSRC_PACKAGE_NAME="Linux kernel" +ATSRC_PACKAGE_VER=${AT_KERNEL} +ATSRC_PACKAGE_LICENSE="GPL 2.0" +ATSRC_PACKAGE_DOCLINK="https://www.kernel.org/doc/" +ATSRC_PACKAGE_RELFIXES= +ATSRC_PACKAGE_STR_VER="${ATSRC_PACKAGE_NAME} ${ATSRC_PACKAGE_VER}" +ATSRC_PACKAGE_PRE="test -d linux-${ATSRC_PACKAGE_VER}" +ATSRC_PACKAGE_CO=([0]="wget -N http://www.kernel.org/pub/linux/kernel/${ATSRC_PACKAGE_SRC_PATH}/linux-${ATSRC_PACKAGE_VER}.tar.gz" \ + [1]="wget -N http://kernel.c3sl.ufpr.br/pub/linux/kernel/${ATSRC_PACKAGE_SRC_PATH}/linux-${ATSRC_PACKAGE_VER}.tar.gz") +ATSRC_PACKAGE_POST="tar -xzf linux-${ATSRC_PACKAGE_VER}.tar.gz" +ATSRC_PACKAGE_SRC=${AT_BASE}/sources/linux-${ATSRC_PACKAGE_VER} +ATSRC_PACKAGE_WORK=${AT_WORK_PATH}/kernel +ATSRC_PACKAGE_MLS= +ATSRC_PACKAGE_ALOC= +ATSRC_PACKAGE_PATCHES= +ATSRC_PACKAGE_TARS= +ATSRC_PACKAGE_DISTRIB=yes +ATSRC_PACKAGE_INCLUDED=yes +ATSRC_PACKAGE_BUNDLE=main_toolchain +ATSRC_PACKAGE_EXCLUDE_RN=yes diff --git a/configs/9.0/packages/kernel/specfile b/configs/9.0/packages/kernel/specfile new file mode 120000 index 000000000..1ed61e37e --- /dev/null +++ b/configs/9.0/packages/kernel/specfile @@ -0,0 +1 @@ +../../../8.0/packages/kernel/specfile \ No newline at end of file diff --git a/configs/9.0/packages/kernel/stage_h b/configs/9.0/packages/kernel/stage_h new file mode 120000 index 000000000..54bc37133 --- /dev/null +++ b/configs/9.0/packages/kernel/stage_h @@ -0,0 +1 @@ +../../../8.0/packages/kernel/stage_h \ No newline at end of file diff --git a/configs/9.0/packages/libauxv/libauxv.mk b/configs/9.0/packages/libauxv/libauxv.mk new file mode 100644 index 000000000..06a9405e6 --- /dev/null +++ b/configs/9.0/packages/libauxv/libauxv.mk @@ -0,0 +1,28 @@ +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# +# +$(eval $(call set_provides,libauxv_1,multi,cross_yes)) + +libauxv_1: $(RCPTS)/libauxv_1.rcpt + +$(RCPTS)/libauxv_1.rcpt: $(libauxv_1-archdeps) + @touch $@ + +$(RCPTS)/libauxv_1-32.a.rcpt: $(patsubst %,$(RCPTS)/%.rcpt,gcc_4 rsync_libauxv) + @touch $@ + +$(RCPTS)/libauxv_1-64.a.rcpt: $(patsubst %,$(RCPTS)/%.rcpt,gcc_4 rsync_libauxv) + @touch $@ diff --git a/configs/9.0/packages/libauxv/sources b/configs/9.0/packages/libauxv/sources new file mode 100644 index 000000000..b313b8ea7 --- /dev/null +++ b/configs/9.0/packages/libauxv/sources @@ -0,0 +1,43 @@ +#!/usr/bin/env bash +# +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# Libauxv source package and build info +# ================================== +# + +ATSRC_PACKAGE_NAME="Libauxv" +ATSRC_PACKAGE_VER=1.1.0 +ATSRC_PACKAGE_REV= +ATSRC_PACKAGE_LICENSE="BSD License" +ATSRC_PACKAGE_DOCLINK="https://github.com/Libauxv/libauxv/raw/master/README.md" +ATSRC_PACKAGE_RELFIXES= +ATSRC_PACKAGE_STR_VER="${ATSRC_PACKAGE_NAME} ${ATSRC_PACKAGE_VER}-${ATSRC_PACKAGE_REV}" +ATSRC_PACKAGE_VERID="${ATSRC_PACKAGE_VER}${ATSRC_PACKAGE_REV:+-${ATSRC_PACKAGE_REV}}" +ATSRC_PACKAGE_PRE="test -d libauxv-${ATSRC_PACKAGE_VERID}" +ATSRC_PACKAGE_CO=([0]="wget -O libauxv-${ATSRC_PACKAGE_VERID}.tar.gz https://github.com/Libauxv/libauxv/releases/download/release_${ATSRC_PACKAGE_VER}/libauxv-${ATSRC_PACKAGE_VER}.tar.gz") +ATSRC_PACKAGE_GIT="" +# Use --transform to give a better name to Libauxv directory. +ATSRC_PACKAGE_POST="tar xzf libauxv-${ATSRC_PACKAGE_VERID}.tar.gz" +ATSRC_PACKAGE_SRC="${AT_BASE}/sources/libauxv-${ATSRC_PACKAGE_VERID}" +ATSRC_PACKAGE_WORK=${AT_WORK_PATH}/libauxv +ATSRC_PACKAGE_MLS="" +ATSRC_PACKAGE_ALOC="" +ATSRC_PACKAGE_PATCHES="" +ATSRC_PACKAGE_TARS="" +ATSRC_PACKAGE_MAKE_CHECK="" +ATSRC_PACKAGE_DISTRIB=no +ATSRC_PACKAGE_BUNDLE=toolchain_extra diff --git a/configs/9.0/packages/libauxv/specfile b/configs/9.0/packages/libauxv/specfile new file mode 120000 index 000000000..65d7b3e50 --- /dev/null +++ b/configs/9.0/packages/libauxv/specfile @@ -0,0 +1 @@ +../../../8.0/packages/libauxv/specfile \ No newline at end of file diff --git a/configs/9.0/packages/libauxv/stage_1 b/configs/9.0/packages/libauxv/stage_1 new file mode 100644 index 000000000..4c156bbdb --- /dev/null +++ b/configs/9.0/packages/libauxv/stage_1 @@ -0,0 +1,144 @@ +#!/usr/bin/env bash +# +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# Libauxv build parameters for stage 1 32 or 64 bits +# ============================================ +# + +source ${AT_BASE}/scripts/utilities/bitsize_selection.sh + +# Tell the build system to hold the temp install folder +ATCFG_HOLD_TEMP_INSTALL='no' +# Tell the build system to hold the temp build folder +ATCFG_HOLD_TEMP_BUILD='no' +# Build in a new directory +ATCFG_BUILD_STAGE_T='dir' + +atcfg_pre_configure() { + # Prepare configure_build and configure_host variables, which are + # passed as parameters to configure as --build and --host, + # respectively. + # + # The variable configure_target and the parameter --target are not + # required because this is not a Canadian Cross Compiler. + # + # The variable host is passed down to this file and holds the system + # where advance toolchain is being built on. + # + # Native builds may have two targets, i.e.: 32 and 64 bits, regardless + # of the word size of the building system. This could trick the + # configure script into thinking that this is a cross build, when it is + # not, e.g.: + # configure --build=powerpc64-linux-gnu --host=powerpc-linux-gnu + # + # Therefore, on native builds, we force configure_build to have the + # same value as configure_host. + configure_host=$(find_build_target ${AT_BIT_SIZE}) + if [[ "${cross_build}" == 'no' ]]; then + configure_build=${configure_host} + else + configure_build=${host} + fi + + # Prepare the directory variables: configure_prefix, configure_bindir, + # configure_libdir, and configure_includedir, which are passed as + # arguments to configure as --prefix, --bindir, --libdir, and + # --includedir, respectively. + # + # On native builds, files are installed directly under the main prefix, + # whereas on cross builds, a '/usr' suffix is added to it. + if [[ "${cross_build}" == 'yes' ]]; then + configure_prefix="${dest_cross}/usr" + else + configure_prefix="${at_dest}" + fi + # The bin and lib directories depend on the word size, e.g. + # configure_bindir may be set to bin, bin32, or bin64. + configure_bindir=${configure_prefix}/$(find_build_bindir ${AT_BIT_SIZE}) + configure_libdir=${configure_prefix}/$(find_build_libdir ${AT_BIT_SIZE}) + # The variable configure_includedir is not actually required, because + # the default value provided by configure, i.e. ${prefix}/include, is + # exactly what we want. However, we prepare this variable for + # completeness purposes. + configure_includedir="${configure_prefix}/include" + # On the other hand, the variables configure_docdir, configure_infodir, + # and configure_mandir are indeed required, because the documentation + # files of all packages should be installed at the same place, i.e.: + # + # ${at_dest}/share/doc/pkgname + # ${at_dest}/share/info + # ${at_dest}/share/man + # + # Notice that we cannot use the variable configure_prefix here, because + # it may contain the suffixes ppc/usr/ or ppc64le/usr/. + configure_docdir="${at_dest}/share/doc/auxv" + configure_infodir="${at_dest}/share/info" + configure_mandir="${at_dest}/share/man" +} + +atcfg_configure() { + # Select the prefixed compilation tools: gcc, g++, as, ld, ar, and + # ranlib, so that they work on both native and cross build. + configure_cc="${at_dest}/bin/${target64:-${target}}-gcc" + + PATH=${at_dest}/bin:${PATH} \ + CC="${configure_cc} -m${AT_BIT_SIZE}" \ + CFLAGS="-g -O2 -fpic" \ + ${ATSRC_PACKAGE_WORK}/configure \ + --build=${configure_build} \ + --host=${configure_host} \ + --prefix=${configure_prefix} \ + --exec-prefix=${configure_prefix} \ + --libdir=${configure_libdir} \ + --bindir=${configure_bindir} \ + --includedir=${configure_includedir} \ + --docdir=${configure_docdir} \ + --infodir=${configure_infodir} \ + --mandir=${configure_mandir} \ + --enable-shared \ + --enable-static +} + + +atcfg_make() { + PATH=${at_dest}/bin:${PATH} ${SUB_MAKE} +} + +atcfg_make_check() { + # Package testing not done for cross build. + if [[ "${cross_build}" == 'no' ]]; then + PATH=${at_dest}/bin:${PATH} ${SUB_MAKE} check + fi +} + +atcfg_install() { + PATH=${at_dest}/bin:${PATH} \ + ${SUB_MAKE} install DESTDIR=${install_place} +} + + +atcfg_post_install() { + # Remove duplicated files prior to 64 bits final install when building + # for the alternate target because the main target already provides + # them. + # + # The main target value is stored in the variable configure_host. + if [[ "${configure_host}" == "${alternate_target}" ]]; then + rm -rf ${install_place}/${configure_prefix}/{include,share} + rm -rf ${install_place}/${at_dest}/share + fi +} diff --git a/configs/9.0/packages/libdfp/libdfp.mk b/configs/9.0/packages/libdfp/libdfp.mk new file mode 100644 index 000000000..f961c8d97 --- /dev/null +++ b/configs/9.0/packages/libdfp/libdfp.mk @@ -0,0 +1,61 @@ +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# +# +$(eval $(call set_provides,libdfp_1,multi,cross_yes)) + +# Dependencies for the un-tuned libraries +ifeq ($(CROSS_BUILD),no) + libdfp-32-deps := $(RCPTS)/gcc_3.rcpt \ + $(RCPTS)/glibc_2-32.b.rcpt \ + $(RCPTS)/rsync_libdfp.rcpt + libdfp-64-deps := $(RCPTS)/gcc_3.rcpt \ + $(RCPTS)/glibc_2-64.b.rcpt \ + $(RCPTS)/rsync_libdfp.rcpt +else + libdfp-32-deps := $(RCPTS)/gcc_4.rcpt \ + $(RCPTS)/rsync_libdfp.rcpt + libdfp-64-deps := $(RCPTS)/gcc_4.rcpt \ + $(RCPTS)/rsync_libdfp.rcpt +endif + +# List of dependencies in order to build the tuned libraries for 32 or +# 64 bits. +libdfp_tuned-32-deps := $(RCPTS)/rsync_libdfp.rcpt \ + $(RCPTS)/gcc_3.rcpt \ + $(RCPTS)/glibc_2-32.b.rcpt \ + $(glibc_tuned-32-archdeps) +libdfp_tuned-64-deps := $(RCPTS)/rsync_libdfp.rcpt \ + $(RCPTS)/gcc_3.rcpt \ + $(RCPTS)/glibc_2-64.b.rcpt \ + $(glibc_tuned-64-archdeps) +# Enable tuned targets +$(eval $(call provide_tuneds,libdfp)) + +libdfp_1: $(RCPTS)/libdfp_1.rcpt + +libdfp_tuned: $(RCPTS)/libdfp_tuned.rcpt + +$(RCPTS)/libdfp_1.rcpt: $(libdfp_1-archdeps) + @touch $@ + +$(RCPTS)/libdfp_1-32.a.rcpt: $(libdfp-32-deps) + @touch $@ + +$(RCPTS)/libdfp_1-64.a.rcpt: $(libdfp-64-deps) + @touch $@ + +$(RCPTS)/libdfp_tuned.rcpt: $(libdfp_tuned-archdeps) + @touch $@ diff --git a/configs/9.0/packages/libdfp/sources b/configs/9.0/packages/libdfp/sources new file mode 100644 index 000000000..ae065f9f9 --- /dev/null +++ b/configs/9.0/packages/libdfp/sources @@ -0,0 +1,43 @@ +#!/usr/bin/env bash +# +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# LIBDFP source package and build info +# ==================================== +# + +ATSRC_PACKAGE_NAME="Decimal Floating Point C Library" +ATSRC_PACKAGE_VER=1.0.12 +ATSRC_PACKAGE_REV=d86a8523 +ATSRC_PACKAGE_LICENSE="Lesser GPL 2.1" +ATSRC_PACKAGE_DOCLINK="https://raw.github.com/libdfp/libdfp/master/README.user" +ATSRC_PACKAGE_RELFIXES= +ATSRC_PACKAGE_STR_VER="${ATSRC_PACKAGE_NAME} ${ATSRC_PACKAGE_VER}-r${ATSRC_PACKAGE_REV}" +ATSRC_PACKAGE_VERID="${ATSRC_PACKAGE_VER}${ATSRC_PACKAGE_REV:+-${ATSRC_PACKAGE_REV}}" +ATSRC_PACKAGE_PRE="test -d libdfp-${ATSRC_PACKAGE_VERID}" +ATSRC_PACKAGE_CO=([0]="wget -O libdfp-${ATSRC_PACKAGE_VERID}.tar.gz https://github.com/libdfp/libdfp/archive/${ATSRC_PACKAGE_REV}.tar.gz") +ATSRC_PACKAGE_GIT="" +# Use --transform to give a better name to Libdfp directory. +ATSRC_PACKAGE_POST="tar xzf libdfp-${ATSRC_PACKAGE_VERID}.tar.gz --transform=s/libdfp-${ATSRC_PACKAGE_REV}[^\\/]*/libdfp-${ATSRC_PACKAGE_VERID}/" +ATSRC_PACKAGE_SRC=${AT_BASE}/sources/libdfp-${ATSRC_PACKAGE_VERID} +ATSRC_PACKAGE_WORK=${AT_WORK_PATH}/libdfp +ATSRC_PACKAGE_MLS="" +ATSRC_PACKAGE_PATCHES="" +ATSRC_PACKAGE_ALOC="" +ATSRC_PACKAGE_TARS="" +ATSRC_PACKAGE_MAKE_CHECK="" +ATSRC_PACKAGE_DISTRIB=yes +ATSRC_PACKAGE_BUNDLE=toolchain_extra diff --git a/configs/9.0/packages/libdfp/specfile b/configs/9.0/packages/libdfp/specfile new file mode 120000 index 000000000..1317baf88 --- /dev/null +++ b/configs/9.0/packages/libdfp/specfile @@ -0,0 +1 @@ +../../../8.0/packages/libdfp/specfile \ No newline at end of file diff --git a/configs/9.0/packages/libdfp/stage_1 b/configs/9.0/packages/libdfp/stage_1 new file mode 100644 index 000000000..a736d9b9e --- /dev/null +++ b/configs/9.0/packages/libdfp/stage_1 @@ -0,0 +1,152 @@ +#!/usr/bin/env bash +# +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +source ${AT_BASE}/scripts/utilities/bitsize_selection.sh + +# SPECIAL SETTINGS +# ========================================================= +# Tell the build system to hold the temp install folder +ATCFG_HOLD_TEMP_INSTALL='no' +# Tell the build system to hold the temp build folder +ATCFG_HOLD_TEMP_BUILD='no' +# Build in a new directory +ATCFG_BUILD_STAGE_T='dir' +# + +atcfg_pre_configure() { + # Prepare configure_build and configure_host variables, which are + # passed as parameters to configure as --build and --host, + # respectively. + # + # The variable configure_target and the parameter --target are not + # required because this is not a Canadian Cross Compiler. + # + # The variable host is passed down to this file and holds the system + # where advance toolchain is being built on. + # + # Native builds may have two targets, i.e.: 32 and 64 bits, regardless + # of the word size of the building system. This could trick the + # configure script into thinking that this is a cross build, when it is + # not, e.g.: + # configure --build=powerpc64-linux-gnu --host=powerpc-linux-gnu + # + # Therefore, on native builds, we force configure_build to have the + # same value as configure_host. + configure_host=$(find_build_target ${AT_BIT_SIZE}) + if [[ "${cross_build}" == 'no' ]]; then + configure_build=${configure_host} + else + configure_build=${host} + fi + + # Prepare the directory variables: configure_prefix, configure_bindir, + # configure_libdir, and configure_includedir, which are passed as + # arguments to configure as --prefix, --bindir, --libdir, and + # --includedir, respectively. + # + # On native builds, files are installed directly under the main prefix, + # whereas on cross builds, a '/usr' suffix is added to it. + if [[ "${cross_build}" == 'yes' ]]; then + configure_prefix="${dest_cross}/usr" + else + configure_prefix="${at_dest}" + fi + # The bin and lib directories depend on the word size, e.g. + # configure_bindir may be set to bin, bin32, or bin64. + configure_bindir=${configure_prefix}/$(find_build_bindir ${AT_BIT_SIZE}) + configure_libdir=${configure_prefix}/$(find_build_libdir ${AT_BIT_SIZE}) + # The variable configure_includedir is not actually required, because + # the default value provided by configure, i.e. ${prefix}/include, is + # exactly what we want. However, we prepare this variable for + # completeness purposes. + configure_includedir="${configure_prefix}/include" + # On the other hand, the variables configure_docdir, configure_infodir, + # and configure_mandir are indeed required, because the documentation + # files of all packages should be installed at the same place, i.e.: + # + # ${at_dest}/share/doc/pkgname + # ${at_dest}/share/info + # ${at_dest}/share/man + # + # Notice that we cannot use the variable configure_prefix here, because + # it may contain the suffixes ppc/usr/ or ppc64le/usr/. + configure_docdir="${at_dest}/share/doc/dfp" + configure_infodir="${at_dest}/share/info" + configure_mandir="${at_dest}/share/man" +} + +atcfg_configure() { + # Select the prefixed compilation tools: gcc, g++, as, ld, ar, and + # ranlib, so that they work on both native and cross build. + configure_cc="${at_dest}/bin/${target64:-${target}}-gcc" + configure_cxx="${at_dest}/bin/${target64:-${target}}-g++" + configure_ar="${at_dest}/bin/${target64:-${target}}-ar" + configure_ranlib="${at_dest}/bin/${target64:-${target}}-ranlib" + + # XXX: AR is not honored by the configure script in libdfp + PATH=${at_dest}/bin:${PATH} \ + CC="${configure_cc}" \ + CXX="${configure_cxx}" \ + AR="${configure_ar}" \ + RANLIB="${configure_ranlib}" \ + CFLAGS="-Wl,-zrelro -g -O3 -m${AT_BIT_SIZE}" \ + CXXFLAGS="-g -O3 -m${AT_BIT_SIZE}" \ + ${ATSRC_PACKAGE_WORK}/configure \ + --build=${configure_build} \ + --host=${configure_host} \ + --prefix=${configure_prefix} \ + --bindir=${configure_bindir} \ + --libdir=${configure_libdir} \ + --includedir=${configure_includedir} \ + --docdir=${configure_docdir} \ + --infodir=${configure_infodir} \ + --mandir=${configure_mandir} \ + --with-backend=libdecnumber \ + --enable-decimal-float=dpd \ + --with-cpu="${build_base_arch}" +} + +atcfg_make() { + PATH=${at_dest}/bin:${PATH} ${SUB_MAKE} +} + +atcfg_make_check() { + # Package testing not done on cross build + if [[ "${cross_build}" == 'no' ]]; then + PATH=${at_dest}/bin:${PATH} ${SUB_MAKE} check + fi +} + +atcfg_install() { + PATH=${at_dest}/bin:${PATH} \ + install_root=${install_place} \ + ${SUB_MAKE} install +} + +atcfg_post_install() { + set -e + if [[ "${cross_build}" == 'no' ]]; then + # Hack around to avoid ld.so.cache getting the libs from the + # system as ldconfig puts platform based directories preceding + # other directories. + ${AT_BASE}/scripts/utilities/create_lib_symlinks.sh \ + "${install_place}/${configure_libdir}/" \ + "${install_place}/${configure_libdir}/\ +${build_load_arch}" + fi + set +e +} diff --git a/configs/9.0/packages/libdfp/stage_optimized b/configs/9.0/packages/libdfp/stage_optimized new file mode 120000 index 000000000..6303cce32 --- /dev/null +++ b/configs/9.0/packages/libdfp/stage_optimized @@ -0,0 +1 @@ +../../../8.0/packages/libdfp/stage_optimized \ No newline at end of file diff --git a/configs/9.0/packages/libhugetlbfs/libhugetlbfs.mk b/configs/9.0/packages/libhugetlbfs/libhugetlbfs.mk new file mode 100644 index 000000000..dd8ec13a0 --- /dev/null +++ b/configs/9.0/packages/libhugetlbfs/libhugetlbfs.mk @@ -0,0 +1,25 @@ +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# +# +$(eval $(call set_provides,libhugetlbfs_1,single,cross_yes)) + +libhugetlbfs_1: $(RCPTS)/libhugetlbfs_1.rcpt + +$(RCPTS)/libhugetlbfs_1.rcpt: $(libhugetlbfs_1-archdeps) + @touch $@ + +$(RCPTS)/libhugetlbfs_1.a.rcpt: $(patsubst %,$(RCPTS)/%.rcpt,gcc_4 rsync_libhugetlbfs) + @touch $@ diff --git a/configs/9.0/packages/libhugetlbfs/sources b/configs/9.0/packages/libhugetlbfs/sources new file mode 100644 index 000000000..786df0b3e --- /dev/null +++ b/configs/9.0/packages/libhugetlbfs/sources @@ -0,0 +1,41 @@ +#!/usr/bin/env bash +# +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# Libhugetlbfs source package and build info +# ========================================== +# +ATSRC_PACKAGE_NAME="Libhugetlbfs" +ATSRC_PACKAGE_VER=2.19 +ATSRC_PACKAGE_REV=e80127e2 +ATSRC_PACKAGE_LICENSE="Lesser GPL 2.1" +ATSRC_PACKAGE_DOCLINK="https://github.com/libhugetlbfs/libhugetlbfs" +ATSRC_PACKAGE_RELFIXES= +ATSRC_PACKAGE_STR_VER="${ATSRC_PACKAGE_NAME} ${ATSRC_PACKAGE_VER}-${ATSRC_PACKAGE_REV}" +ATSRC_PACKAGE_VERID="${ATSRC_PACKAGE_VER}${ATSRC_PACKAGE_REV:+-${ATSRC_PACKAGE_REV}}" +ATSRC_PACKAGE_PRE="test -d libhugetlbfs-${ATSRC_PACKAGE_VER}" +ATSRC_PACKAGE_CO=([0]="wget -O libhugetlbfs-${ATSRC_PACKAGE_VERID}.tar.gz https://github.com/libhugetlbfs/libhugetlbfs/releases/download/${ATSRC_PACKAGE_VER}/libhugetlbfs-${ATSRC_PACKAGE_VER}.tar.gz") +ATSRC_PACKAGE_GIT="" +ATSRC_PACKAGE_POST="tar xzf libhugetlbfs-${ATSRC_PACKAGE_VERID}.tar.gz" +ATSRC_PACKAGE_SRC="${AT_BASE}/sources/libhugetlbfs-${ATSRC_PACKAGE_VER}" +ATSRC_PACKAGE_WORK=${AT_WORK_PATH}/libhugetlbfs +ATSRC_PACKAGE_MLS="" +ATSRC_PACKAGE_ALOC="" +ATSRC_PACKAGE_PATCHES="" +ATSRC_PACKAGE_TARS="" +ATSRC_PACKAGE_MAKE_CHECK= +ATSRC_PACKAGE_DISTRIB=yes +ATSRC_PACKAGE_BUNDLE=toolchain_extra diff --git a/configs/9.0/packages/libhugetlbfs/specfile b/configs/9.0/packages/libhugetlbfs/specfile new file mode 120000 index 000000000..47bb6222a --- /dev/null +++ b/configs/9.0/packages/libhugetlbfs/specfile @@ -0,0 +1 @@ +../../../8.0/packages/libhugetlbfs/specfile \ No newline at end of file diff --git a/configs/9.0/packages/libhugetlbfs/stage_1 b/configs/9.0/packages/libhugetlbfs/stage_1 new file mode 100644 index 000000000..b95d5a593 --- /dev/null +++ b/configs/9.0/packages/libhugetlbfs/stage_1 @@ -0,0 +1,101 @@ +#!/usr/bin/env bash +# +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# Libhugetlbfs build parameters for stage 1 +# ================================================= +# + +ATCFG_HOLD_TEMP_INSTALL='no' +# Tell the build system to hold the temp build folder +ATCFG_HOLD_TEMP_BUILD='no' +# Build in a new directory +ATCFG_BUILD_STAGE_T='link' + + +atcfg_configure() +{ + if [ ! -f "version" ]; then + echo "${ATSRC_PACKAGE_VER}" > version + fi + if [[ "${cross_build}" == 'no' ]]; then + cc_path="${at_dest}/bin/gcc" + prefix=${at_dest} + else + cc_path="${at_dest}/bin/${target64:-${target}}-gcc" + prefix="${dest_cross}/usr" + fi + cat Makefile | \ + sed "/PREFIX =/s/^PREFIX =/PREFIX \?=/" | \ + sed "/EXEDIR =/s/^EXEDIR =/EXEDIR \?=/" | \ + sed "/DOCDIR =/s/^DOCDIR =/DOCDIR \?=/" | \ + sed "/MANDIR[0-9]/s/PREFIX/MANDIR/" | \ + sed "/MANDIR[0-9]/s/share\/man\///" | \ + sed "/^MANDIR1/iMANDIR \?= \$(PREFIX)\/share\/man/" | \ + sed "/ARCH =/s/^ARCH =/ARCH ?=/" | \ + sed "/CC =/s/^CC =/CC ?=/" > Makefile.temp + [[ ${?} -eq 0 ]] && mv Makefile.temp Makefile || exit 1 + # Patch the use of the reserved word 'restrict' + sed -i -e "s/restrict/restrict_exe/g" hugeutils.c +} + + +# Libhugetlbfs doesn't support parallel builds +atcfg_make() +{ + if [[ "${cross_build}" == 'no' ]]; then + PATH="${at_dest}/bin:${PATH}" \ + CC="${cc_path}" \ + PREFIX="${prefix}" \ + EXEDIR="${prefix}/bin" \ + make -j1 + else + # Make all runs "libs test tools". + # test uses options in ld that need to be run by the wrapper + # script on libhugetlbfs top tree, this script cannot be run on + # cross, so we need to do a make libs tools. + PATH="${at_dest}/bin:${PATH}" \ + CC="${cc_path}" \ + ARCH="${build_arch}" \ + PREFIX="${prefix}" \ + EXEDIR="${prefix}/bin" \ + make libs tools -j1 + fi +} + + +atcfg_make_check() +{ + # Package testing not done for a cross build + if [[ "${cross_build}" == 'no' ]]; then + PATH="${at_dest}/bin:${PATH}" \ + PREFIX="${at_dest}" \ + EXEDIR="${at_dest}/bin" \ + make -j1 tests + fi +} + + +atcfg_install() +{ + PATH="${at_dest}/bin:${PATH}" \ + ARCH="${build_arch}" \ + PREFIX="${prefix}" \ + EXEDIR="${prefix}/bin" \ + DOCDIR="${at_dest}/share/doc/libhugetlbfs" \ + MANDIR="${at_dest}/share/man" \ + make -j1 install DESTDIR="${install_place}" +} diff --git a/configs/9.0/packages/libpfm/libpfm.mk b/configs/9.0/packages/libpfm/libpfm.mk new file mode 120000 index 000000000..41fbba906 --- /dev/null +++ b/configs/9.0/packages/libpfm/libpfm.mk @@ -0,0 +1 @@ +../../../8.0/packages/libpfm/libpfm.mk \ No newline at end of file diff --git a/configs/9.0/packages/libpfm/sources b/configs/9.0/packages/libpfm/sources new file mode 120000 index 000000000..b445f4ce6 --- /dev/null +++ b/configs/9.0/packages/libpfm/sources @@ -0,0 +1 @@ +../../../8.0/packages/libpfm/sources \ No newline at end of file diff --git a/configs/9.0/packages/libpfm/specfile b/configs/9.0/packages/libpfm/specfile new file mode 120000 index 000000000..60fe08329 --- /dev/null +++ b/configs/9.0/packages/libpfm/specfile @@ -0,0 +1 @@ +../../../8.0/packages/libpfm/specfile \ No newline at end of file diff --git a/configs/9.0/packages/libpfm/stage_1 b/configs/9.0/packages/libpfm/stage_1 new file mode 120000 index 000000000..873fe978f --- /dev/null +++ b/configs/9.0/packages/libpfm/stage_1 @@ -0,0 +1 @@ +../../../8.0/packages/libpfm/stage_1 \ No newline at end of file diff --git a/configs/9.0/packages/libsphde/libsphde.mk b/configs/9.0/packages/libsphde/libsphde.mk new file mode 100644 index 000000000..2dc7c424b --- /dev/null +++ b/configs/9.0/packages/libsphde/libsphde.mk @@ -0,0 +1,45 @@ +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# +# +$(eval $(call set_provides,libsphde_1,multi,cross_yes)) + +libsphde: $(RCPTS)/libsphde_1.rcpt + +# Add it to the target 3rdparty_libs +3rdparty_libs-reqs += $(RCPTS)/libsphde_1.rcpt + +ifeq ($(CROSS_BUILD),no) + libsphde-deps-32 := glibc_2-32.b + libsphde-deps-64 := glibc_2-64.b +else + # The cross compiler don't build glibc_2. So, libsphde has to depend + # on gcc_4. + libsphde-deps-32 := gcc_4 + libsphde-deps-64 := gcc_4 +endif + +$(RCPTS)/libsphde_1.rcpt: $(libsphde_1-archdeps) + @touch $@ + +$(RCPTS)/libsphde_1-32.a.rcpt: $(patsubst %,$(RCPTS)/%.rcpt,\ + $(libsphde-deps-32) \ + rsync_libsphde) + @touch $@ + +$(RCPTS)/libsphde_1-64.a.rcpt: $(patsubst %,$(RCPTS)/%.rcpt,\ + $(libsphde-deps-64) \ + rsync_libsphde) + @touch $@ diff --git a/configs/9.0/packages/libsphde/sources b/configs/9.0/packages/libsphde/sources new file mode 100644 index 000000000..54ba3c907 --- /dev/null +++ b/configs/9.0/packages/libsphde/sources @@ -0,0 +1,43 @@ +#!/usr/bin/env bash +# +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# SPHDE source package and build info +# ================================== +# + +ATSRC_PACKAGE_NAME="SPHDE" +ATSRC_PACKAGE_VER=1.1.0 +ATSRC_PACKAGE_REV= +ATSRC_PACKAGE_LICENSE="Eclipse Public License 1.0" +ATSRC_PACKAGE_DOCLINK="http://sphde.github.io/sphde/" +ATSRC_PACKAGE_RELFIXES= +ATSRC_PACKAGE_STR_VER="${ATSRC_PACKAGE_NAME} ${ATSRC_PACKAGE_VER}-${ATSRC_PACKAGE_REV}" +ATSRC_PACKAGE_VERID="${ATSRC_PACKAGE_VER}${ATSRC_PACKAGE_REV:+-${ATSRC_PACKAGE_REV}}" +ATSRC_PACKAGE_PRE="test -d libsphde-${ATSRC_PACKAGE_VERID}" +ATSRC_PACKAGE_CO=([0]="wget -O libsphde-${ATSRC_PACKAGE_VERID}.tar.gz https://github.com/sphde/sphde/releases/download/${ATSRC_PACKAGE_VER}/libsphde-${ATSRC_PACKAGE_VERID}.tar.gz") +ATSRC_PACKAGE_GIT="" +# Use --transform to give a better name to SPHDE directory. +ATSRC_PACKAGE_POST="tar xzf libsphde-${ATSRC_PACKAGE_VERID}.tar.gz" +ATSRC_PACKAGE_SRC="${AT_BASE}/sources/libsphde-${ATSRC_PACKAGE_VERID}" +ATSRC_PACKAGE_WORK=${AT_WORK_PATH}/sphde +ATSRC_PACKAGE_MLS= +ATSRC_PACKAGE_ALOC= +ATSRC_PACKAGE_PATCHES= +ATSRC_PACKAGE_TARS= +ATSRC_PACKAGE_MAKE_CHECK= +ATSRC_PACKAGE_DISTRIB=no +ATSRC_PACKAGE_BUNDLE=mcore-libs diff --git a/configs/9.0/packages/libsphde/specfile b/configs/9.0/packages/libsphde/specfile new file mode 120000 index 000000000..f733718cd --- /dev/null +++ b/configs/9.0/packages/libsphde/specfile @@ -0,0 +1 @@ +../../../8.0/packages/libsphde/specfile \ No newline at end of file diff --git a/configs/9.0/packages/libsphde/stage_1 b/configs/9.0/packages/libsphde/stage_1 new file mode 100644 index 000000000..a2255e198 --- /dev/null +++ b/configs/9.0/packages/libsphde/stage_1 @@ -0,0 +1,133 @@ +#!/usr/bin/env bash +# +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# SPHDE build parameters for stage 1 32/64 bits +# ========================================= +# + +# Include some standard functions +source ${utilities}/bitsize_selection.sh + +# Tell the build system to hold the temp install folder +ATCFG_HOLD_TEMP_INSTALL='no' +# Tell the build system to hold the temp build folder +ATCFG_HOLD_TEMP_BUILD='no' +# Build in a new directory +ATCFG_BUILD_STAGE_T='dir' + +atcfg_pre_configure () +{ + # Prepare configure_build and configure_host variables, which are + # passed as parameters to configure as --build and --host, + # respectively. + # + # The variable configure_target and the parameter --target are not + # required because this is not a Canadian Cross Compiler. + # + # The variable host is passed down to this file and holds the system + # where advance toolchain is being built on. + # + # Native builds may have two targets, i.e.: 32 and 64 bits, regardless + # of the word size of the building system. This could trick the + # configure script into thinking that this is a cross build, when it is + # not, e.g.: + # configure --build=powerpc64-linux-gnu --host=powerpc-linux-gnu + # + # Therefore, on native builds, we force configure_build to have the + # same value as configure_host. + configure_host=$(find_build_target ${AT_BIT_SIZE}) + if [[ "${cross_build}" == 'no' ]]; then + configure_build=${configure_host} + else + configure_build=${host} + fi + + # Prepare the directory variables: configure_prefix, configure_bindir, + # configure_libdir, and configure_includedir, which are passed as + # arguments to configure as --prefix, --bindir, --libdir, and + # --includedir, respectively. + # + # On native builds, files are installed directly under the main prefix, + # whereas on cross builds, a '/usr' suffix is added to it. + if [[ "${cross_build}" == 'yes' ]]; then + configure_prefix="${dest_cross}/usr" + else + configure_prefix="${at_dest}" + fi + # The bin and lib directories depend on the word size, e.g. + # configure_bindir may be set to bin, bin32, or bin64. + configure_bindir=${configure_prefix}/$(find_build_bindir ${AT_BIT_SIZE}) + configure_libdir=${configure_prefix}/$(find_build_libdir ${AT_BIT_SIZE}) + # The variable configure_includedir is not actually required, because + # the default value provided by configure, i.e. ${prefix}/include, is + # exactly what we want. However, we prepare this variable for + # completeness purposes. + configure_includedir="${configure_prefix}/include" +} + +atcfg_configure () +{ + # Select the prefixed compilation tools: gcc, g++, as, ld, ar, and + # ranlib, so that they work on both native and cross build. + configure_cc="${at_dest}/bin/${target64:-${target}}-gcc" + configure_cxx="${at_dest}/bin/${target64:-${target}}-g++" + + if [[ "${cross_build}" == 'yes' ]]; then + export ac_cv_func_malloc_0_nonnull=yes + fi + + PATH=${at_dest}/bin:${PATH} \ + CC="${configure_cc}" \ + CXX="${configure_cxx}" \ + CFLAGS="-Wl,-zrelro -m${AT_BIT_SIZE} -O3 -g" \ + CXXFLAGS="-m${AT_BIT_SIZE} -O3 -g" \ + ${ATSRC_PACKAGE_WORK}/configure \ + --build=${configure_build} \ + --host=${configure_host} \ + --libdir=${configure_libdir} \ + --bindir=${configure_bindir} \ + --includedir=${configure_includedir} +} + +atcfg_make () +{ + PATH=${at_dest}/bin:${PATH} ${SUB_MAKE} +} + +atcfg_make_check() { + # Package testing not done for cross build. + if [[ "${cross_build}" == 'no' ]]; then + PATH=${at_dest}/bin:${PATH} ${SUB_MAKE} check + fi +} + +atcfg_install () +{ + PATH=${at_dest}/bin:${PATH} \ + ${SUB_MAKE} install DESTDIR=${install_place} +} + +atcfg_post_install() { + # Remove duplicated files prior to 64 bits final install when building + # for the alternate target because the main target already provides + # them. + # + # The main target value is stored in the variable configure_host. + if [[ "${configure_host}" == "${alternate_target}" ]]; then + rm -rf ${install_place}/${configure_prefix}/{include,share} + fi +} diff --git a/configs/9.0/packages/liburcu/liburcu.mk b/configs/9.0/packages/liburcu/liburcu.mk new file mode 100644 index 000000000..4c245c4b4 --- /dev/null +++ b/configs/9.0/packages/liburcu/liburcu.mk @@ -0,0 +1,31 @@ +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# +# +$(eval $(call set_provides,liburcu_1,multi,cross_yes)) + +liburcu: $(RCPTS)/liburcu_1.rcpt + +# Add it to the target 3rdparty_libs +3rdparty_libs-reqs += $(RCPTS)/liburcu_1.rcpt + +$(RCPTS)/liburcu_1.rcpt: $(liburcu_1-archdeps) + @touch $@ + +$(RCPTS)/liburcu_1-32.a.rcpt: $(patsubst %,$(RCPTS)/%.rcpt,gcc_4 rsync_liburcu) + @touch $@ + +$(RCPTS)/liburcu_1-64.a.rcpt: $(patsubst %,$(RCPTS)/%.rcpt,gcc_4 rsync_liburcu) + @touch $@ diff --git a/configs/9.0/packages/liburcu/sources b/configs/9.0/packages/liburcu/sources new file mode 100644 index 000000000..4ed844710 --- /dev/null +++ b/configs/9.0/packages/liburcu/sources @@ -0,0 +1,58 @@ +#!/usr/bin/env bash +# +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# URCU source package and build info +# ================================== +# + +ATSRC_PACKAGE_NAME="Userspace RCU" +ATSRC_PACKAGE_VER=0.8.8 +ATSRC_PACKAGE_LICENSE="Lesser GPL 2.1" +ATSRC_PACKAGE_DOCLINK="http://lttng.org/urcu" +ATSRC_PACKAGE_RELFIXES= +ATSRC_PACKAGE_STR_VER="${ATSRC_PACKAGE_NAME} ${ATSRC_PACKAGE_VER}" +ATSRC_PACKAGE_PRE="test -d userspace-rcu-${ATSRC_PACKAGE_VER}" +ATSRC_PACKAGE_CO=([0]="wget -N http://lttng.org/files/urcu/userspace-rcu-${ATSRC_PACKAGE_VER}.tar.bz2") +ATSRC_PACKAGE_POST="tar -xjf userspace-rcu-${ATSRC_PACKAGE_VER}.tar.bz2" +ATSRC_PACKAGE_SRC="${AT_BASE}/sources/userspace-rcu-${ATSRC_PACKAGE_VER}" +ATSRC_PACKAGE_WORK=${AT_WORK_PATH}/userspace-rcu +ATSRC_PACKAGE_MAKE_CHECK="" +ATSRC_PACKAGE_DISTRIB=yes +ATSRC_PACKAGE_BUNDLE=mcore-libs + +atsrc_get_patches () +{ + at_get_patch \ + https://github.com/powertechpreview/powertechpreview/raw/master/URCU%20Patches/urcu-config.tgz \ + 541abeecac6ea905ed1748df896bd961 || return ${?} + + at_get_patch_and_trim \ + https://www.mail-archive.com/opensuse-commit%40opensuse.org/msg50545.html \ + userspace-rcu-ppc64le.patch 81 \ + bb8744a6c5e4871f395985c5d182e827 || return ${?} +} + +atsrc_apply_patches () +{ + tar xzf urcu-config.tgz || return ${?} + + # Remove changes on openSUSE:Factory. + tail -n 38 userspace-rcu-ppc64le.patch | unexpand \ + > trimmed-userspace-rcu-ppc64le.patch + patch -p1 < trimmed-userspace-rcu-ppc64le.patch || return ${?} + patch -p1 < urcu-config.patch || return ${?} +} diff --git a/configs/9.0/packages/liburcu/specfile b/configs/9.0/packages/liburcu/specfile new file mode 120000 index 000000000..086cf1b39 --- /dev/null +++ b/configs/9.0/packages/liburcu/specfile @@ -0,0 +1 @@ +../../../8.0/packages/liburcu/specfile \ No newline at end of file diff --git a/configs/9.0/packages/liburcu/stage_1 b/configs/9.0/packages/liburcu/stage_1 new file mode 100644 index 000000000..d6cffebf2 --- /dev/null +++ b/configs/9.0/packages/liburcu/stage_1 @@ -0,0 +1,139 @@ +#!/usr/bin/env bash +# +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# URCU build parameters for stage 1 32/64 bits +# ========================================= +# + +# Include some standard functions +source ${utilities}/bitsize_selection.sh + +# Tell the build system to hold the temp install folder +ATCFG_HOLD_TEMP_INSTALL='no' +# Tell the build system to hold the temp build folder +ATCFG_HOLD_TEMP_BUILD='no' +# Build in the source code directory +ATCFG_BUILD_STAGE_T='link' + +atcfg_pre_configure () +{ + # Prepare configure_build and configure_host variables, which are + # passed as parameters to configure as --build and --host, + # respectively. + # + # The variable configure_target and the parameter --target are not + # required because this is not a Canadian Cross Compiler. + # + # The variable host is passed down to this file and holds the system + # where advance toolchain is being built on. + # + # Native builds may have two targets, i.e.: 32 and 64 bits, regardless + # of the word size of the building system. This could trick the + # configure script into thinking that this is a cross build, when it is + # not, e.g.: + # configure --build=powerpc64-linux-gnu --host=powerpc-linux-gnu + # + # Therefore, on native builds, we force configure_build to have the + # same value as configure_host. + configure_host=$(find_build_target ${AT_BIT_SIZE}) + if [[ "${cross_build}" == 'no' ]]; then + configure_build=${configure_host} + else + configure_build=${host} + fi + + # Prepare the directory variables: configure_prefix, configure_bindir, + # configure_libdir, and configure_includedir, which are passed as + # arguments to configure as --prefix, --bindir, --libdir, and + # --includedir, respectively. + # + # On native builds, files are installed directly under the main prefix, + # whereas on cross builds, a '/usr' suffix is added to it. + if [[ "${cross_build}" == 'yes' ]]; then + configure_prefix="${dest_cross}/usr" + else + configure_prefix="${at_dest}" + fi + # The bin and lib directories depend on the word size, e.g. + # configure_bindir may be set to bin, bin32, or bin64. + configure_bindir=${configure_prefix}/$(find_build_bindir ${AT_BIT_SIZE}) + configure_libdir=${configure_prefix}/$(find_build_libdir ${AT_BIT_SIZE}) + # The variable configure_includedir is not actually required, because + # the default value provided by configure, i.e. ${prefix}/include, is + # exactly what we want. However, we prepare this variable for + # completeness purposes. + configure_includedir="${configure_prefix}/include" + # On the other hand, the variables configure_docdir, configure_infodir, + # and configure_mandir are indeed required, because the documentation + # files of all packages should be installed at the same place, i.e.: + # + # ${at_dest}/share/doc/pkgname + # ${at_dest}/share/info + # ${at_dest}/share/man + # + # Notice that we cannot use the variable configure_prefix here, because + # it may contain the suffixes ppc/usr/ or ppc64le/usr/. + configure_docdir="${at_dest}/share/doc/userspace-rcu" + configure_infodir="${at_dest}/share/info" + configure_mandir="${at_dest}/share/man" +} + +atcfg_configure () +{ + # Select the prefixed compilation tools: gcc, g++, as, ld, ar, and + # ranlib, so that they work on both native and cross build. + configure_cc="${at_dest}/bin/${target64:-${target}}-gcc" + + if [[ "${cross_build}" == 'yes' ]]; then + export ac_cv_func_malloc_0_nonnull=yes + fi + + PATH=${at_dest}/bin:${PATH} \ + CC="${configure_cc}" \ + CFLAGS="-g -O2 -fpic -m${AT_BIT_SIZE}" \ + ${ATSRC_PACKAGE_WORK}/configure \ + --build=${configure_build} \ + --host=${configure_host} \ + --prefix=${configure_prefix} \ + --exec-prefix=${configure_prefix} \ + --libdir=${configure_libdir} \ + --bindir=${configure_bindir} \ + --includedir=${configure_includedir} \ + --docdir=${configure_docdir} \ + --infodir=${configure_infodir} \ + --mandir=${configure_mandir} \ + --enable-shared \ + --enable-static +} + +atcfg_make () +{ + PATH=${at_dest}/bin:${PATH} ${SUB_MAKE} +} + +atcfg_make_check() { + # Package testing not done for cross build. + if [[ "${cross_build}" == 'no' ]]; then + PATH=${at_dest}/bin:${PATH} ${SUB_MAKE} check + fi +} + +atcfg_install () +{ + PATH=${at_dest}/bin:${PATH} \ + ${SUB_MAKE} install DESTDIR=${install_place} +} diff --git a/configs/9.0/packages/libvecpf/libvecpf.mk b/configs/9.0/packages/libvecpf/libvecpf.mk new file mode 100644 index 000000000..8660441d2 --- /dev/null +++ b/configs/9.0/packages/libvecpf/libvecpf.mk @@ -0,0 +1,28 @@ +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# +# +$(eval $(call set_provides,libvecpf_1,multi,cross_yes)) + +libvecpf_1: $(RCPTS)/libvecpf_1.rcpt + +$(RCPTS)/libvecpf_1.rcpt: $(libvecpf_1-archdeps) + @touch $@ + +$(RCPTS)/libvecpf_1-32.a.rcpt: $(patsubst %,$(RCPTS)/%.rcpt,gcc_4 rsync_libvecpf) + @touch $@ + +$(RCPTS)/libvecpf_1-64.a.rcpt: $(patsubst %,$(RCPTS)/%.rcpt,gcc_4 rsync_libvecpf) + @touch $@ diff --git a/configs/9.0/packages/libvecpf/sources b/configs/9.0/packages/libvecpf/sources new file mode 100644 index 000000000..4b95f3108 --- /dev/null +++ b/configs/9.0/packages/libvecpf/sources @@ -0,0 +1,43 @@ +#!/usr/bin/env bash +# +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# Libvecpf source package and build info +# ================================== +# + +ATSRC_PACKAGE_NAME="Libvecpf" +ATSRC_PACKAGE_VER=1.1.0 +ATSRC_PACKAGE_REV= +ATSRC_PACKAGE_LICENSE="LGPL 2.1" +ATSRC_PACKAGE_DOCLINK="https://github.com/Libvecpf/libvecpf" +ATSRC_PACKAGE_RELFIXES= +ATSRC_PACKAGE_STR_VER="${ATSRC_PACKAGE_NAME} ${ATSRC_PACKAGE_VER}-${ATSRC_PACKAGE_REV}" +ATSRC_PACKAGE_VERID="${ATSRC_PACKAGE_VER}${ATSRC_PACKAGE_REV:+-${ATSRC_PACKAGE_REV}}" +ATSRC_PACKAGE_PRE="test -d libvecpf-${ATSRC_PACKAGE_VERID}" +ATSRC_PACKAGE_CO=([0]="wget -O libvecpf-${ATSRC_PACKAGE_VERID}.tar.gz https://github.com/Libvecpf/libvecpf/releases/download/v${ATSRC_PACKAGE_VER}/libvecpf-${ATSRC_PACKAGE_VER}.tar.gz") +ATSRC_PACKAGE_GIT="" +# Use --transform to give a better name to Libvecpf directory. +ATSRC_PACKAGE_POST="tar xzf libvecpf-${ATSRC_PACKAGE_VERID}.tar.gz" +ATSRC_PACKAGE_SRC="${AT_BASE}/sources/libvecpf-${ATSRC_PACKAGE_VERID}" +ATSRC_PACKAGE_WORK=${AT_WORK_PATH}/libvecpf +ATSRC_PACKAGE_MLS="" +ATSRC_PACKAGE_ALOC="" +ATSRC_PACKAGE_PATCHES="" +ATSRC_PACKAGE_TARS="" +ATSRC_PACKAGE_MAKE_CHECK="" +ATSRC_PACKAGE_DISTRIB=yes +ATSRC_PACKAGE_BUNDLE=toolchain_extra diff --git a/configs/9.0/packages/libvecpf/specfile b/configs/9.0/packages/libvecpf/specfile new file mode 120000 index 000000000..3f6722434 --- /dev/null +++ b/configs/9.0/packages/libvecpf/specfile @@ -0,0 +1 @@ +../../../8.0/packages/libvecpf/specfile \ No newline at end of file diff --git a/configs/9.0/packages/libvecpf/stage_1 b/configs/9.0/packages/libvecpf/stage_1 new file mode 100644 index 000000000..10b60ad0e --- /dev/null +++ b/configs/9.0/packages/libvecpf/stage_1 @@ -0,0 +1,145 @@ +#!/usr/bin/env bash +# +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +source ${AT_BASE}/scripts/utilities/bitsize_selection.sh + +# Libvecpf build parameters for stage 1 32 or 64 bits +# ============================================ +# + +# Tell the build system to hold the temp install folder +ATCFG_HOLD_TEMP_INSTALL='no' +# Tell the build system to hold the temp build folder +ATCFG_HOLD_TEMP_BUILD='no' +# Build in a new directory +ATCFG_BUILD_STAGE_T='dir' + +atcfg_pre_configure() { + # Prepare configure_build and configure_host variables, which are + # passed as parameters to configure as --build and --host, + # respectively. + # + # The variable configure_target and the parameter --target are not + # required because this is not a Canadian Cross Compiler. + # + # The variable host is passed down to this file and holds the system + # where advance toolchain is being built on. + # + # Native builds may have two targets, i.e.: 32 and 64 bits, regardless + # of the word size of the building system. This could trick the + # configure script into thinking that this is a cross build, when it is + # not, e.g.: + # configure --build=powerpc64-linux-gnu --host=powerpc-linux-gnu + # + # Therefore, on native builds, we force configure_build to have the + # same value as configure_host. + configure_host=$(find_build_target ${AT_BIT_SIZE}) + if [[ "${cross_build}" == 'no' ]]; then + configure_build=${configure_host} + else + configure_build=${host} + fi + + # Prepare the directory variables: configure_prefix, configure_bindir, + # configure_libdir, and configure_includedir, which are passed as + # arguments to configure as --prefix, --bindir, --libdir, and + # --includedir, respectively. + # + # On native builds, files are installed directly under the main prefix, + # whereas on cross builds, a '/usr' suffix is added to it. + if [[ "${cross_build}" == 'yes' ]]; then + configure_prefix="${dest_cross}/usr" + else + configure_prefix="${at_dest}" + fi + # The bin and lib directories depend on the word size, e.g. + # configure_bindir may be set to bin, bin32, or bin64. + configure_bindir=${configure_prefix}/$(find_build_bindir ${AT_BIT_SIZE}) + configure_libdir=${configure_prefix}/$(find_build_libdir ${AT_BIT_SIZE}) + # The variable configure_includedir is not actually required, because + # the default value provided by configure, i.e. ${prefix}/include, is + # exactly what we want. However, we prepare this variable for + # completeness purposes. + configure_includedir="${configure_prefix}/include" + # On the other hand, the variables configure_docdir, configure_infodir, + # and configure_mandir are indeed required, because the documentation + # files of all packages should be installed at the same place, i.e.: + # + # ${at_dest}/share/doc/pkgname + # ${at_dest}/share/info + # ${at_dest}/share/man + # + # Notice that we cannot use the variable configure_prefix here, because + # it may contain the suffixes ppc/usr/ or ppc64le/usr/. + configure_docdir="${at_dest}/share/doc/vecpf" + configure_infodir="${at_dest}/share/info" + configure_mandir="${at_dest}/share/man" +} + +atcfg_configure() { + # Select the prefixed compilation tools: gcc, g++, as, ld, ar, and + # ranlib, so that they work on both native and cross build. + configure_cc="${at_dest}/bin/${target64:-${target}}-gcc" + + PATH=${at_dest}/bin:${PATH} \ + CC="${configure_cc} -m${AT_BIT_SIZE}" \ + CFLAGS="-g -O2 -fpic" \ + ${ATSRC_PACKAGE_WORK}/configure \ + --build=${configure_build} \ + --host=${configure_host} \ + --prefix=${configure_prefix} \ + --exec-prefix=${configure_prefix} \ + --libdir=${configure_libdir} \ + --bindir=${configure_bindir} \ + --includedir=${configure_includedir} \ + --docdir=${configure_docdir} \ + --infodir=${configure_infodir} \ + --mandir=${configure_mandir} \ + --enable-shared \ + --enable-static \ + --enable-vsx +} + + +atcfg_make() { + PATH=${at_dest}/bin:${PATH} ${SUB_MAKE} +} + +atcfg_make_check() { + # Package testing is not done on a cross build. + if [[ "${cross_build}" == 'no' ]]; then + PATH=${at_dest}/bin:${PATH} ${SUB_MAKE} check + fi +} + +atcfg_install() { + PATH=${at_dest}/bin:${PATH} \ + ${SUB_MAKE} install DESTDIR=${install_place} +} + + +atcfg_post_install() { + # Remove duplicated files prior to 64 bits final install when building + # for the alternate target because the main target already provides + # them. + # + # The main target value is stored in the variable configure_host. + if [[ "${configure_host}" == "${alternate_target}" ]]; then + rm -rf ${install_place}/${configure_prefix}/{include,share} + rm -rf ${install_place}/${at_dest}/share + fi +} diff --git a/configs/9.0/packages/mpc/mpc.mk b/configs/9.0/packages/mpc/mpc.mk new file mode 120000 index 000000000..eb84f5c40 --- /dev/null +++ b/configs/9.0/packages/mpc/mpc.mk @@ -0,0 +1 @@ +../../../8.0/packages/mpc/mpc.mk \ No newline at end of file diff --git a/configs/9.0/packages/mpc/sources b/configs/9.0/packages/mpc/sources new file mode 100644 index 000000000..169b77651 --- /dev/null +++ b/configs/9.0/packages/mpc/sources @@ -0,0 +1,40 @@ +#!/usr/bin/env bash +# +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# MPC source package and build info +# ================================= +# + +ATSRC_PACKAGE_NAME="GNU MPC Library" +ATSRC_PACKAGE_VER=1.0.3 +ATSRC_PACKAGE_LICENSE="GPL 3.0" +ATSRC_PACKAGE_DOCLINK="http://www.multiprecision.org/index.php?prog=mpc&page=documentation" +ATSRC_PACKAGE_RELFIXES= +ATSRC_PACKAGE_STR_VER="${ATSRC_PACKAGE_NAME} ${ATSRC_PACKAGE_VER}" +ATSRC_PACKAGE_PRE="test -d mpc-${ATSRC_PACKAGE_VER}" +ATSRC_PACKAGE_CO=([0]="wget -N http://www.multiprecision.org/mpc/download/mpc-${ATSRC_PACKAGE_VER}.tar.gz" \ + [1]="wget -N ftp://ftp.unicamp.br/pub/gnu/mpc/mpc-${ATSRC_PACKAGE_VER}.tar.gz") +ATSRC_PACKAGE_POST="tar -xzf mpc-${ATSRC_PACKAGE_VER}.tar.gz" +ATSRC_PACKAGE_SRC=${AT_BASE}/sources/mpc-${ATSRC_PACKAGE_VER} +ATSRC_PACKAGE_WORK=${AT_WORK_PATH}/mpc +ATSRC_PACKAGE_MLS= +ATSRC_PACKAGE_ALOC= +ATSRC_PACKAGE_PATCHES= +ATSRC_PACKAGE_TARS= +ATSRC_PACKAGE_MAKE_CHECK= +ATSRC_PACKAGE_DISTRIB=yes +ATSRC_PACKAGE_BUNDLE=main_toolchain diff --git a/configs/9.0/packages/mpc/specfile b/configs/9.0/packages/mpc/specfile new file mode 120000 index 000000000..c543e961d --- /dev/null +++ b/configs/9.0/packages/mpc/specfile @@ -0,0 +1 @@ +../../../8.0/packages/mpc/specfile \ No newline at end of file diff --git a/configs/9.0/packages/mpc/stage_1 b/configs/9.0/packages/mpc/stage_1 new file mode 120000 index 000000000..c973f8183 --- /dev/null +++ b/configs/9.0/packages/mpc/stage_1 @@ -0,0 +1 @@ +../../../8.0/packages/mpc/stage_1 \ No newline at end of file diff --git a/configs/9.0/packages/mpc/stage_2 b/configs/9.0/packages/mpc/stage_2 new file mode 120000 index 000000000..42bfa8972 --- /dev/null +++ b/configs/9.0/packages/mpc/stage_2 @@ -0,0 +1 @@ +../../../8.0/packages/mpc/stage_2 \ No newline at end of file diff --git a/configs/9.0/packages/mpfr/mpfr.mk b/configs/9.0/packages/mpfr/mpfr.mk new file mode 120000 index 000000000..31dcd28af --- /dev/null +++ b/configs/9.0/packages/mpfr/mpfr.mk @@ -0,0 +1 @@ +../../../8.0/packages/mpfr/mpfr.mk \ No newline at end of file diff --git a/configs/9.0/packages/mpfr/sources b/configs/9.0/packages/mpfr/sources new file mode 100644 index 000000000..cedf44385 --- /dev/null +++ b/configs/9.0/packages/mpfr/sources @@ -0,0 +1,41 @@ +#!/usr/bin/env bash +# +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# MPFR source package and build info +# ================================== +# + +ATSRC_PACKAGE_NAME="GNU MPFR Library" +ATSRC_PACKAGE_VER=3.1.2 +ATSRC_PACKAGE_REV=9243 +ATSRC_PACKAGE_LICENSE="GPL 3.0" +ATSRC_PACKAGE_DOCLINK="http://www.mpfr.org/mpfr-current/mpfr.html" +ATSRC_PACKAGE_RELFIXES= +ATSRC_PACKAGE_VERREV=${ATSRC_PACKAGE_VER}${ATSRC_PACKAGE_REV:+-${ATSRC_PACKAGE_REV}} +ATSRC_PACKAGE_STR_VER="${ATSRC_PACKAGE_NAME} ${ATSRC_PACKAGE_VERREV}" +ATSRC_PACKAGE_PRE="test -d mpfr-${ATSRC_PACKAGE_VERREV}" +ATSRC_PACKAGE_CO=([0]="svn co --revision ${ATSRC_PACKAGE_REV} svn://scm.gforge.inria.fr/svn/mpfr/branches/${ATSRC_PACKAGE_VER%.*} mpfr-${ATSRC_PACKAGE_VERREV}") +ATSRC_PACKAGE_POST="" +ATSRC_PACKAGE_SRC=${AT_BASE}/sources/mpfr-${ATSRC_PACKAGE_VERREV} +ATSRC_PACKAGE_WORK=${AT_WORK_PATH}/mpfr +ATSRC_PACKAGE_MLS= +ATSRC_PACKAGE_ALOC= +ATSRC_PACKAGE_PATCHES= +ATSRC_PACKAGE_TARS= +ATSRC_PACKAGE_MAKE_CHECK= +ATSRC_PACKAGE_DISTRIB=yes +ATSRC_PACKAGE_BUNDLE=main_toolchain diff --git a/configs/9.0/packages/mpfr/specfile b/configs/9.0/packages/mpfr/specfile new file mode 120000 index 000000000..048b004cb --- /dev/null +++ b/configs/9.0/packages/mpfr/specfile @@ -0,0 +1 @@ +../../../8.0/packages/mpfr/specfile \ No newline at end of file diff --git a/configs/9.0/packages/mpfr/stage_1 b/configs/9.0/packages/mpfr/stage_1 new file mode 120000 index 000000000..c9c2f3bfb --- /dev/null +++ b/configs/9.0/packages/mpfr/stage_1 @@ -0,0 +1 @@ +../../../8.0/packages/mpfr/stage_1 \ No newline at end of file diff --git a/configs/9.0/packages/mpfr/stage_2 b/configs/9.0/packages/mpfr/stage_2 new file mode 120000 index 000000000..78a23be33 --- /dev/null +++ b/configs/9.0/packages/mpfr/stage_2 @@ -0,0 +1 @@ +../../../8.0/packages/mpfr/stage_2 \ No newline at end of file diff --git a/configs/9.0/packages/openssl/openssl.mk b/configs/9.0/packages/openssl/openssl.mk new file mode 100644 index 000000000..e71e2552b --- /dev/null +++ b/configs/9.0/packages/openssl/openssl.mk @@ -0,0 +1,42 @@ +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# +# +$(eval $(call set_provides,openssl_1,multi,cross_yes)) + +# List of dependencies in order to build the tuned libraries for 32 or +# 64 bits. +openssl_tuned-32-deps := $(RCPTS)/gcc_4.rcpt \ + $(RCPTS)/rsync_openssl.rcpt +openssl_tuned-64-deps := $(RCPTS)/gcc_4.rcpt \ + $(RCPTS)/rsync_openssl.rcpt +# Enable tuned targets +$(eval $(call provide_tuneds,openssl)) + +openssl_1: $(RCPTS)/openssl_1.rcpt + +openssl_tuned: $(RCPTS)/openssl_tuned.rcpt + +$(RCPTS)/openssl_1.rcpt: $(openssl_1-archdeps) + @touch $@ + +$(RCPTS)/openssl_1-32.a.rcpt: $(patsubst %,$(RCPTS)/%.rcpt,gcc_4 zlib_1 rsync_openssl) + @touch $@ + +$(RCPTS)/openssl_1-64.a.rcpt: $(patsubst %,$(RCPTS)/%.rcpt,gcc_4 zlib_1 rsync_openssl) + @touch $@ + +$(RCPTS)/openssl_tuned.rcpt: $(openssl_tuned-archdeps) + @touch $@ diff --git a/configs/9.0/packages/openssl/sources b/configs/9.0/packages/openssl/sources new file mode 100644 index 000000000..9a151f169 --- /dev/null +++ b/configs/9.0/packages/openssl/sources @@ -0,0 +1,37 @@ +#!/usr/bin/env bash +# +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# OpenSSL source package and build info +# ===================================== +# + +ATSRC_PACKAGE_NAME="Open Secure Sockets Layer" +ATSRC_PACKAGE_VER="1.0.2j" +ATSRC_PACKAGE_LICENSE="BSD and GPL 2.0" +ATSRC_PACKAGE_DOCLINK="http://www.openssl.org/docs/" +ATSRC_PACKAGE_RELFIXES= +ATSRC_PACKAGE_STR_VER="${ATSRC_PACKAGE_NAME} ${ATSRC_PACKAGE_VER}" +ATSRC_PACKAGE_PRE="test -d openssl-${ATSRC_PACKAGE_VER}" +ATSRC_PACKAGE_CO=([0]="wget -N -O openssl-${ATSRC_PACKAGE_VER}.tar.gz https://github.com/openssl/openssl/archive/OpenSSL_${ATSRC_PACKAGE_VER//\./_}.tar.gz") +ATSRC_PACKAGE_POST="tar -xzf openssl-${ATSRC_PACKAGE_VER}.tar.gz --transform=s/openssl-OpenSSL_${ATSRC_PACKAGE_VER//\./_}[^\\/]*/openssl-${ATSRC_PACKAGE_VER}/" +ATSRC_PACKAGE_SRC="${AT_BASE}/sources/openssl-${ATSRC_PACKAGE_VER}" +ATSRC_PACKAGE_WORK=${AT_WORK_PATH}/openssl +ATSRC_PACKAGE_MLS= +ATSRC_PACKAGE_MAKE_CHECK= +ATSRC_PACKAGE_TARS= +ATSRC_PACKAGE_DISTRIB=no +ATSRC_PACKAGE_BUNDLE=toolchain_extra diff --git a/configs/9.0/packages/openssl/specfile b/configs/9.0/packages/openssl/specfile new file mode 120000 index 000000000..0ce6f0afe --- /dev/null +++ b/configs/9.0/packages/openssl/specfile @@ -0,0 +1 @@ +../../../8.0/packages/openssl/specfile \ No newline at end of file diff --git a/configs/9.0/packages/openssl/stage_1 b/configs/9.0/packages/openssl/stage_1 new file mode 100644 index 000000000..4bed55acc --- /dev/null +++ b/configs/9.0/packages/openssl/stage_1 @@ -0,0 +1,198 @@ +#!/usr/bin/env bash +# +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +source ${AT_BASE}/scripts/utilities/bitsize_selection.sh + +# OpenSSL build parameters for stage 1 32 or 64 bits +# ========================================= +# + +ATCFG_HOLD_TEMP_INSTALL='no' +# Tell the build system to hold the temp build folder +ATCFG_HOLD_TEMP_BUILD='no' +# Build in a new directory +ATCFG_BUILD_STAGE_T='link' + +atcfg_pre_configure() { + # Prepare configure_build and configure_host variables, which are + # passed as parameters to configure as --build and --host, + # respectively. + # + # The variable configure_target and the parameter --target are not + # required because this is not a Canadian Cross Compiler. + # + # The variable host is passed down to this file and holds the system + # where advance toolchain is being built on. + # + # Native builds may have two targets, i.e.: 32 and 64 bits, regardless + # of the word size of the building system. This could trick the + # configure script into thinking that this is a cross build, when it is + # not, e.g.: + # configure --build=powerpc64-linux-gnu --host=powerpc-linux-gnu + # + # Therefore, on native builds, we force configure_build to have the + # same value as configure_host. + configure_host=$(find_build_target ${AT_BIT_SIZE}) + if [[ "${cross_build}" == 'no' ]]; then + configure_build=${configure_host} + else + configure_build=${host} + fi + + # Prepare the directory variables: configure_prefix, configure_bindir, + # configure_libdir, and configure_includedir, which are passed as + # arguments to configure as --prefix, --bindir, --libdir, and + # --includedir, respectively. + # + # On native builds, files are installed directly under the main prefix, + # whereas on cross builds, a '/usr' suffix is added to it. + if [[ "${cross_build}" == 'yes' ]]; then + configure_prefix="${dest_cross}/usr" + else + configure_prefix="${at_dest}" + fi + # The bin and lib directories depend on the word size, e.g. + # configure_bindir may be set to bin, bin32, or bin64. + configure_bindir=${configure_prefix}/$(find_build_bindir ${AT_BIT_SIZE}) + configure_libdir=${configure_prefix}/$(find_build_libdir ${AT_BIT_SIZE}) + # The variable configure_includedir is not actually required, because + # the default value provided by configure, i.e. ${prefix}/include, is + # exactly what we want. However, we prepare this variable for + # completeness purposes. + configure_includedir="${configure_prefix}/include" + + # Important Note: + # + # The Configure script in the OpenSSL package is not generated by + # autoconf and prefixes do not work the same way. In OpenSSL, the + # parameter passed through the --libdir switch is appended to the value + # passed through the --prefix switch, thus we must pass only the last + # part of libdir. + alternative_libdir=$(find_build_libdir ${AT_BIT_SIZE}) + + + PATH=${at_dest}/bin:${PATH} ./config --test-sanity +} + +atcfg_configure() { + # Select the prefixed compilation tools: gcc, g++, as, ld, ar, and + # ranlib, so that they work on both native and cross build. + configure_cc="${at_dest}/bin/${target64:-${target}}-gcc" + configure_cxx="${at_dest}/bin/${target64:-${target}}-g++" + configure_as="${at_dest}/bin/${target64:-${target}}-as" + configure_ld="${at_dest}/bin/${target64:-${target}}-ld" + configure_ar="${at_dest}/bin/${target64:-${target}}-ar" + configure_ranlib="${at_dest}/bin/${target64:-${target}}-ranlib" + + # OpenSSL uses different architecture names + local openssl_tgt="" + case "${configure_host}" in + powerpc64-*) + openssl_tgt="linux-ppc64" + ;; + powerpc-*) + # For linux-ppc builds, OpenSSL uses the default -m + # value of the compiler. + openssl_tgt="linux-ppc -m32" + ;; + powerpc64le-*) + openssl_tgt="linux-ppc64le" + ;; + *) + echo "Unknown word size ${AT_BIT_SIZE}" + return 1 + ;; + esac + + PATH=${at_dest}/bin:${PATH} \ + CC="${configure_cc}" \ + CXX="${configure_cxx}" \ + AS="${configure_as}" \ + LD="${configure_ld}" \ + AR="${configure_ar}" \ + RANLIB="${configure_ranlib}" \ + ./Configure ${openssl_tgt} \ + --prefix=${configure_prefix} \ + --libdir=${alternative_libdir} \ + no-idea no-rc5 shared threads zlib-dynamic \ + -Wa,--noexecstack -g +} + + +atcfg_pre_make() { + PATH=${at_dest}/bin:${PATH} make -j1 depend +} +# Make build command +atcfg_make() { + PATH=${at_dest}/bin:${PATH} make -j1 +} + +atcfg_make_check() { + # Package testing not done for cross build. + if [[ "${cross_build}" == 'no' ]]; then + PATH=${at_dest}/bin:${PATH} make -j1 test + fi +} + + +atcfg_install() { + local install_arg="install_sw" + if [[ "${AT_BIT_SIZE}" == "64" ]]; then + install_arg="install" + fi + + PATH=${at_dest}/bin:${PATH} \ + make MANDIR=${at_dest}/share/man \ + INSTALL_PREFIX=${install_place} -j1 ${install_arg} +} + +atcfg_post_install() { + # In atcfg_pre_configure, we explained that the Configure script in + # OpenSSL is not generated by autoconf. We also explained that, because + # of that, we had to create an alternative variable, + # alternative_libdir, by removing the value of configure_prefix from + # the configure_libdir variable. + # + # Now, in order to ease the maintenance of this script, we switch back + # to the default behavior, i.e., we reinstate the use of the variable + # configure_libdir, which contains the value of configure_prefix + + # Save all libraries into a tar file + if [[ "${build_arch}" == "ppc" ]]; then + pushd "${install_place}/${configure_libdir}" + tar czf "${install_place}/openssl_32.tar.gz" * + popd + # Remove all installed built files + rm -rf "${install_place}/${configure_prefix}/*" + mkdir "${install_place}/${configure_libdir}" + # Place saved libs on created final target + pushd "${install_place}/${configure_libdir}" + tar xzf "${install_place}/openssl_32.tar.gz" + popd + fi + set -e + if [[ "${cross_build}" == 'no' ]]; then + # Hack around to avoid ld.so.cache getting the libs from the + # system as ldconfig puts platform based directories preceding + # other directories. + ${AT_BASE}/scripts/utilities/create_lib_symlinks.sh \ + "${install_place}/${configure_libdir}/" \ + "${install_place}/${configure_libdir}/\ +${build_load_arch}" + fi + set +e +} diff --git a/configs/9.0/packages/openssl/stage_optimized b/configs/9.0/packages/openssl/stage_optimized new file mode 120000 index 000000000..67d2e1f47 --- /dev/null +++ b/configs/9.0/packages/openssl/stage_optimized @@ -0,0 +1 @@ +../../../8.0/packages/openssl/stage_optimized \ No newline at end of file diff --git a/configs/9.0/packages/oprofile/oprofile.mk b/configs/9.0/packages/oprofile/oprofile.mk new file mode 120000 index 000000000..9979005d4 --- /dev/null +++ b/configs/9.0/packages/oprofile/oprofile.mk @@ -0,0 +1 @@ +../../../8.0/packages/oprofile/oprofile.mk \ No newline at end of file diff --git a/configs/9.0/packages/oprofile/sources b/configs/9.0/packages/oprofile/sources new file mode 100644 index 000000000..a1c26b259 --- /dev/null +++ b/configs/9.0/packages/oprofile/sources @@ -0,0 +1,41 @@ +#!/usr/bin/env bash +# +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# oProfile source package and build info +# ====================================== +# +ATSRC_PACKAGE_NAME="OProfile" +ATSRC_PACKAGE_VER=1.1.0 +ATSRC_PACKAGE_REV=6b4aaf9a6c8 +ATSRC_PACKAGE_LICENSE="GPL 2.0" +ATSRC_PACKAGE_DOCLINK="http://oprofile.sourceforge.net/docs/" +ATSRC_PACKAGE_RELFIXES= +ATSRC_PACKAGE_NAMESUFFIX="with Java Support" +ATSRC_PACKAGE_STR_VER="${ATSRC_PACKAGE_NAME} ${ATSRC_PACKAGE_VER}${ATSRC_PACKAGE_REV:+-${ATSRC_PACKAGE_REV}}" +ATSRC_PACKAGE_PRE="test -d oprofile-${ATSRC_PACKAGE_VER}${ATSRC_PACKAGE_REV:+-${ATSRC_PACKAGE_REV}}" +ATSRC_PACKAGE_CO=([0]="git archive --prefix=oprofile-${ATSRC_PACKAGE_VER}${ATSRC_PACKAGE_REV:+-${ATSRC_PACKAGE_REV}}/ --remote=git://git.code.sf.net/p/oprofile/oprofile ${ATSRC_PACKAGE_REV} > oprofile-${ATSRC_PACKAGE_VER}${ATSRC_PACKAGE_REV:+-${ATSRC_PACKAGE_REV}}.tar") +ATSRC_PACKAGE_GIT= +ATSRC_PACKAGE_POST="tar -xf oprofile-${ATSRC_PACKAGE_VER}${ATSRC_PACKAGE_REV:+-${ATSRC_PACKAGE_REV}}.tar" +ATSRC_PACKAGE_SRC="${AT_BASE}/sources/oprofile-${ATSRC_PACKAGE_VER}${ATSRC_PACKAGE_REV:+-${ATSRC_PACKAGE_REV}}" +ATSRC_PACKAGE_WORK=${AT_WORK_PATH}/oprofile +ATSRC_PACKAGE_ALOC= +ATSRC_PACKAGE_MLS= +ATSRC_PACKAGE_PATCHES= +ATSRC_PACKAGE_TARS= +ATSRC_PACKAGE_MAKE_CHECK= +ATSRC_PACKAGE_DISTRIB=yes +ATSRC_PACKAGE_BUNDLE=profile diff --git a/configs/9.0/packages/oprofile/specfile b/configs/9.0/packages/oprofile/specfile new file mode 120000 index 000000000..7f2681f8a --- /dev/null +++ b/configs/9.0/packages/oprofile/specfile @@ -0,0 +1 @@ +../../../8.0/packages/oprofile/specfile \ No newline at end of file diff --git a/configs/9.0/packages/oprofile/stage_1 b/configs/9.0/packages/oprofile/stage_1 new file mode 120000 index 000000000..0ee40fd0e --- /dev/null +++ b/configs/9.0/packages/oprofile/stage_1 @@ -0,0 +1 @@ +../../../8.0/packages/oprofile/stage_1 \ No newline at end of file diff --git a/configs/9.0/packages/paflib/paflib.mk b/configs/9.0/packages/paflib/paflib.mk new file mode 100644 index 000000000..ebd781378 --- /dev/null +++ b/configs/9.0/packages/paflib/paflib.mk @@ -0,0 +1,31 @@ +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# +# +$(eval $(call set_provides,paflib_1,multi,cross_yes)) + +paflib: $(RCPTS)/paflib_1.rcpt + +#Add it to the target 3rdparty_libs +3rdparty_libs-reqs += $(RCPTS)/paflib_1.rcpt + +$(RCPTS)/paflib_1.rcpt: $(paflib_1-archdeps) + @touch $@ + +$(RCPTS)/paflib_1-32.a.rcpt: $(RCPTS)/gcc_4.rcpt $(RCPTS)/rsync_paflib.rcpt + @touch $@ + +$(RCPTS)/paflib_1-64.a.rcpt: $(RCPTS)/gcc_4.rcpt $(RCPTS)/rsync_paflib.rcpt + @touch $@ diff --git a/configs/9.0/packages/paflib/sources b/configs/9.0/packages/paflib/sources new file mode 100644 index 000000000..00b38b39c --- /dev/null +++ b/configs/9.0/packages/paflib/sources @@ -0,0 +1,43 @@ +#!/usr/bin/env bash +# +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# PAFlib source package and build info +# ==================================== +# + +ATSRC_PACKAGE_NAME="IBM Power Architecture Facilities Library" +ATSRC_PACKAGE_VER=0.2.0 +ATSRC_PACKAGE_REV=ffe6c00 +ATSRC_PACKAGE_LICENSE="MIT License" +ATSRC_PACKAGE_DOCLINK="https://github.com/paflib/paflib/wiki/" +ATSRC_PACKAGE_RELFIXES= +ATSRC_PACKAGE_STR_VER="${ATSRC_PACKAGE_NAME} ${ATSRC_PACKAGE_VER}${ATSRC_PACKAGE_REV:+-${ATSRC_PACKAGE_REV}}" +ATSRC_PACKAGE_VERID="${ATSRC_PACKAGE_VER}${ATSRC_PACKAGE_REV:+-${ATSRC_PACKAGE_REV}}" +ATSRC_PACKAGE_PRE="test -d paflib-${ATSRC_PACKAGE_VERID}" +ATSRC_PACKAGE_CO=([0]="wget -O paflib-${ATSRC_PACKAGE_VERID}.tar.gz https://github.com/paflib/paflib/archive/${ATSRC_PACKAGE_REV}.tar.gz") +ATSRC_PACKAGE_GIT="" +# Use --transform to give a better name to PAFLib directory. +ATSRC_PACKAGE_POST="tar xzf paflib-${ATSRC_PACKAGE_VERID}.tar.gz --transform=s/paflib-${ATSRC_PACKAGE_REV}[^\\/]*/paflib-${ATSRC_PACKAGE_VERID}/" +ATSRC_PACKAGE_SRC=${AT_BASE}/sources/paflib-${ATSRC_PACKAGE_VERID} +ATSRC_PACKAGE_WORK=${AT_WORK_PATH}/paflib +ATSRC_PACKAGE_MLS= +ATSRC_PACKAGE_ALOC= +ATSRC_PACKAGE_PATCHES= +ATSRC_PACKAGE_TARS= +ATSRC_PACKAGE_MAKE_CHECK= +ATSRC_PACKAGE_DISTRIB=no +ATSRC_PACKAGE_BUNDLE=toolchain_extra diff --git a/configs/9.0/packages/paflib/specfile b/configs/9.0/packages/paflib/specfile new file mode 120000 index 000000000..fd415430c --- /dev/null +++ b/configs/9.0/packages/paflib/specfile @@ -0,0 +1 @@ +../../../8.0/packages/paflib/specfile \ No newline at end of file diff --git a/configs/9.0/packages/paflib/stage_1 b/configs/9.0/packages/paflib/stage_1 new file mode 100644 index 000000000..66a29ccbd --- /dev/null +++ b/configs/9.0/packages/paflib/stage_1 @@ -0,0 +1,197 @@ +#!/usr/bin/env bash +# +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# PAFlib build parameters for stage 1 32/64 bits +# =========================================== +# + +# Include some standard functions +source ${utilities}/bitsize_selection.sh + +source ${scripts}/utils.sh + +# Tell the build system to hold the temp install folder +ATCFG_HOLD_TEMP_INSTALL='no' +# Tell the build system to hold the temp build folder +ATCFG_HOLD_TEMP_BUILD='no' +# PAFLib requires to copy the source code directory because we run autogen.sh +# on every build. If this call happens at the same time, it may fail. +ATCFG_BUILD_STAGE_T='link' + +atcfg_pre_configure () { + # Completely clean the build prior to any build + if [[ -e "Makefile" ]]; then + make distclean + fi + + set -e + # Parse automake version + am_path=$(which automake) + am_ver=$(get_gnu_version ${am_path}) + am_major=$(echo ${am_ver} | awk -F . '{print $1}') + am_minor=$(echo ${am_ver} | awk -F . '{print $2}') + set +e + + # Prepare configure_build and configure_host variables, which are + # passed as parameters to configure as --build and --host, + # respectively. + # + # The variable host is passed down to this file and holds the system + # where advance toolchain is being built on. + # + # Native builds may have two targets, i.e.: 32 and 64 bits, regardless + # of the word size of the building system. This could trick the + # configure script into thinking that this is a cross build, when it is + # not, e.g.: + # configure --build=powerpc64-linux-gnu --host=powerpc-linux-gnu + # + # Therefore, on native builds, we force configure_build to have the + # same value as configure_host. + configure_host=$(find_build_target ${AT_BIT_SIZE}) + if [[ "${cross_build}" == 'no' ]]; then + configure_build=${configure_host} + else + configure_build=${host} + fi + + # The variable configure_target and the parameter --target should not + # be required because this is not a Canadian Cross Compiler. However, + # since it has been provided in the past, we continue to pass this + # parameter to configure for historical reasons. + configure_target=${configure_host} + + # Prepare the directory variables: configure_prefix, configure_bindir, + # configure_libdir, and configure_includedir, which are passed as + # arguments to configure as --prefix, --bindir, --libdir, and + # --includedir, respectively. + # + # On native builds, files are installed directly under the main prefix, + # whereas on cross builds, a '/usr' suffix is added to it. + if [[ "${cross_build}" == 'yes' ]]; then + configure_prefix="${dest_cross}/usr" + else + configure_prefix="${at_dest}" + fi + # The bin and lib directories depend on the word size, e.g. + # configure_bindir may be set to bin, bin32, or bin64. + configure_bindir=${configure_prefix}/$(find_build_bindir ${AT_BIT_SIZE}) + configure_libdir=${configure_prefix}/$(find_build_libdir ${AT_BIT_SIZE}) + # The variable configure_includedir is not actually required, because + # the default value provided by configure, i.e. ${prefix}/include, is + # exactly what we want. However, we prepare this variable for + # completeness purposes. + configure_includedir="${configure_prefix}/include" + # On the other hand, the variables configure_docdir, configure_infodir, + # and configure_mandir are indeed required, because the documentation + # files of all packages should be installed at the same place, i.e.: + # + # ${at_dest}/share/doc/pkgname + # ${at_dest}/share/info + # ${at_dest}/share/man + # + # Notice that we cannot use the variable configure_prefix here, because + # it may contain the suffixes ppc/usr/ or ppc64le/usr/. + configure_docdir="${at_dest}/share/doc/paflib" + configure_infodir="${at_dest}/share/info" + configure_mandir="${at_dest}/share/man" +} + +atcfg_configure () { + # Select the prefixed compilation tools: gcc, g++, as, ld, ar, and + # ranlib, so that they work on both native and cross build. + configure_cc="${at_dest}/bin/${target64:-${target}}-gcc" + configure_cxx="${at_dest}/bin/${target64:-${target}}-g++" + + # However, it also requires to run configure from a different + # directory. So we're forced to duplicate source code and build in + # another directory (build/ in this case). + rm -rf build/ + mkdir build/ + pushd build > /dev/null + + if [[ "${cross_build}" == 'yes' ]]; then + export ac_cv_func_malloc_0_nonnull=yes + fi + + PATH=${at_dest}/bin:${PATH} \ + CC="${configure_cc} -m${AT_BIT_SIZE}" \ + CXX="${configure_cxx} -m${AT_BIT_SIZE}" \ + CFLAGS="-g -O" \ + CXXFLAGS="-g -O" \ + ../configure --build=${configure_build} \ + --host=${configure_host} \ + --target=${configure_target} \ + --prefix=${configure_prefix} \ + --bindir=${configure_bindir} \ + --libdir=${configure_libdir} \ + --docdir=${configure_docdir} \ + --infodir=${configure_infodir} \ + --mandir=${configure_mandir} \ + --includedir=${configure_includedir} \ + --enable-ebb \ + || return ${?} + popd > /dev/null +} + +atcfg_make () { + pushd build > /dev/null + # We're forced to use -f in order to work around an issue with the + # mtime value of the files. As git doesn't preserve it, GNU make + # thinks that it must re-generate the Makefile upon every execution + # because some m4 files do have the same mtime of Makefile.im. + PATH=${at_dest}/bin:${PATH} \ + ${SUB_MAKE} all -f ./Makefile || return ${?} + popd > /dev/null +} + +atcfg_make_check () { + # Package testing is not done on a cross build + if [[ "${cross_build}" == 'no' ]]; then + pushd build > /dev/null + # We're forced to use -f in order to work around an issue with the + # mtime value of the files. As git doesn't preserve it, GNU make + # thinks that it must re-generate the Makefile upon every execution + # because some m4 files do have the same mtime of Makefile.im. + PATH=${at_dest}/bin:${PATH} \ + ${SUB_MAKE} check -f ./Makefile || return ${?} + popd > /dev/null + fi +} + +atcfg_install () { + pushd build > /dev/null + # We're forced to use -f in order to work around an issue with the + # mtime value of the files. As git doesn't preserve it, GNU make + # thinks that it must re-generate the Makefile upon every execution + # because some m4 files do have the same mtime of Makefile.im. + PATH=${at_dest}/bin:${PATH} \ + make install DESTDIR=${install_place} -f ./Makefile \ + || return ${?} + popd > /dev/null +} + +atcfg_post_install() { + # Remove duplicated files prior to 64 bits final install when building + # for the alternate target because the main target already provides + # them. + # + # The main target value is stored in the variable configure_host. + if [[ "${configure_host}" == "${alternate_target}" ]]; then + rm -rf ${install_place}/${configure_prefix}/{include,share} + rm -rf ${install_place}/${at_dest}/share + fi +} diff --git a/configs/9.0/packages/python/python.mk b/configs/9.0/packages/python/python.mk new file mode 120000 index 000000000..ef67197b0 --- /dev/null +++ b/configs/9.0/packages/python/python.mk @@ -0,0 +1 @@ +../../../8.0/packages/python/python.mk \ No newline at end of file diff --git a/configs/9.0/packages/python/sources b/configs/9.0/packages/python/sources new file mode 100644 index 000000000..6b5948fc3 --- /dev/null +++ b/configs/9.0/packages/python/sources @@ -0,0 +1,84 @@ +#!/usr/bin/env bash +# +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# GLIBC source package and build info +# =================================== +# + +ATSRC_PACKAGE_NAME="Python" +ATSRC_PACKAGE_VER=3.4.3 +ATSRC_PACKAGE_LICENSE="Python Software Foundation License 2" +ATSRC_PACKAGE_DOCLINK="http://docs.python.org/release/3.4/" +ATSRC_PACKAGE_RELFIXES= +ATSRC_PACKAGE_STR_VER="${ATSRC_PACKAGE_NAME} ${ATSRC_PACKAGE_VER}" +ATSRC_PACKAGE_PRE="test -d Python-${ATSRC_PACKAGE_VER}" +ATSRC_PACKAGE_CO=([0]="wget -N --no-check-certificate http://www.python.org/ftp/python/${ATSRC_PACKAGE_VER}/Python-${ATSRC_PACKAGE_VER}.tgz") +ATSRC_PACKAGE_POST="tar -zxf Python-${ATSRC_PACKAGE_VER}.tgz" +ATSRC_PACKAGE_SRC=${AT_BASE}/sources/Python-${ATSRC_PACKAGE_VER} +ATSRC_PACKAGE_WORK=${AT_WORK_PATH}/python +ATSRC_PACKAGE_MLS= +ATSRC_PACKAGE_PATCHES= +ATSRC_PACKAGE_ALOC= +ATSRC_PACKAGE_TARS= +ATSRC_PACKAGE_MAKE_CHECK= +ATSRC_PACKAGE_DISTRIB=no +ATSRC_PACKAGE_BUNDLE=toolchain_extra + +atsrc_get_patches () +{ + at_get_patch \ + https://github.com/powertechpreview/powertechpreview/raw/master/Python%20Fixes/python-3.4.3-getlib64s1.tgz \ + 7cf0e3e1546682c57d02a8c80ff3f292 || return ${?} + + at_get_patch \ + https://bugs.python.org/file38791/dh1024.patch \ + 8bc4f980dcd3f93b7b853f53c32bffec || return ${?} + + at_get_patch \ + http://bugs.python.org/file40170/fix_stack_overflow.patch \ + 51f3968a6417caa54f425ffd1b7d7784 || return ${?} + + at_get_patch \ + https://github.com/powertechpreview/powertechpreview/raw/master/Python%20Fixes/python3-imap_tz.tgz \ + 7a7c8e65ae9de6ac1e504dd76b37bc76 || return ${?} +} + +atsrc_apply_patches () +{ + tar zxf python-3.4.3-getlib64s1.tgz || return ${?} + tar zxf python3-imap_tz.tgz || return ${?} + + patch -p1 < python-3.4.3-getlib64s1.patch || return ${?} + patch -p1 < 0001-Specify-the-summer-time-value-on-test_imaplib.patch \ + || return ${?} + patch -p1 < fix_stack_overflow.patch || return ${?} + patch -p1 < dh1024.patch || return ${?} +} + +atsrc_package_verify_make_log () +{ + if [[ -n "${1}" ]]; then + modline=$(cat "${1}" | awk '/Logging the following command/ { line = ""; getline ts; } \ + /Failed to build these modules:/ { getline line; } \ + END { print line; }') + if [[ "${modline}" != "" ]]; then + echo "Python modules not built: ${modline}" + return 1 + fi + fi + return 0 +} diff --git a/configs/9.0/packages/python/specfile b/configs/9.0/packages/python/specfile new file mode 120000 index 000000000..7362f1bd0 --- /dev/null +++ b/configs/9.0/packages/python/specfile @@ -0,0 +1 @@ +../../../8.0/packages/python/specfile \ No newline at end of file diff --git a/configs/9.0/packages/python/stage_1 b/configs/9.0/packages/python/stage_1 new file mode 120000 index 000000000..7ab05a100 --- /dev/null +++ b/configs/9.0/packages/python/stage_1 @@ -0,0 +1 @@ +../../../8.0/packages/python/stage_1 \ No newline at end of file diff --git a/configs/9.0/packages/tbb/sources b/configs/9.0/packages/tbb/sources new file mode 100644 index 000000000..7bb9c51ab --- /dev/null +++ b/configs/9.0/packages/tbb/sources @@ -0,0 +1,71 @@ +#!/usr/bin/env bash +# +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# TBB source package and build info +# ======================================= +# + +ATSRC_PACKAGE_NAME="Thread Building Blocks" +ATSRC_PACKAGE_VER=4.3u6 +ATSRC_PACKAGE_REV=20150611 +ATSRC_PACKAGE_LICENSE="GPL 2.0" +ATSRC_PACKAGE_DOCLINK="https://www.threadingbuildingblocks.org/documentation" +ATSRC_PACKAGE_RELFIXES= +ATSRC_PACKAGE_STR_VER="${ATSRC_PACKAGE_NAME} ${ATSRC_PACKAGE_VER}-${ATSRC_PACKAGE_REV}" +ATSRC_PACKAGE_VERID="43_${ATSRC_PACKAGE_REV}oss" +ATSRC_PACKAGE_PRE="test -d tbb${ATSRC_PACKAGE_VERID}" +ATSRC_PACKAGE_CO=([0]="wget -N --no-check-certificate https://www.threadingbuildingblocks.org/sites/default/files/software_releases/source/tbb${ATSRC_PACKAGE_VERID}_src.tgz") +ATSRC_PACKAGE_GIT= +ATSRC_PACKAGE_POST="tar xzf tbb${ATSRC_PACKAGE_VERID}_src.tgz" +ATSRC_PACKAGE_SRC=${AT_BASE}/sources/tbb${ATSRC_PACKAGE_VERID} +ATSRC_PACKAGE_WORK=${AT_WORK_PATH}/tbb +ATSRC_PACKAGE_MLS="" +ATSRC_PACKAGE_ALOC="" +ATSRC_PACKAGE_PATCHES="" +ATSRC_PACKAGE_TARS="" +# Disable make check testing due to failures +ATSRC_PACKAGE_MAKE_CHECK=none +ATSRC_PACKAGE_DISTRIB=yes +ATSRC_PACKAGE_BUNDLE=mcore-libs + +# This is a package function to verify the make_check log. +# In some cases 'make check' will return 0 even though the log shows that +# there some failures did occur. Define this function for +# packages where that has happened. Due to differences in the implementations +# of 'make check' or 'make test' the strings that indicate failure could +# be different. + +atsrc_package_verify_make_check_log () +{ + if [[ -n "${1}" ]]; then + grep -i "error[: ]" "${1}" > /dev/null + return ${?} + fi +} + +atsrc_get_patches () +{ + at_get_patch \ + https://github.com/powertechpreview/powertechpreview/raw/42cfbcf3d4a2fb7f9216069397df0dff9fc0f651/TBB%20PowerPC%20Patches/4.3/ppc64-tbb-4.3-fix.tgz \ + 11708da1a42542608a345c8f0b71dfc6 || return ${?} +} + +atsrc_apply_patches () +{ + tar xzf ppc64-tbb-4.3-fix.tgz || return ${?} + patch -p1 < inteltbb_set_compiler.patch || return ${?} +} diff --git a/configs/9.0/packages/tbb/specfile b/configs/9.0/packages/tbb/specfile new file mode 120000 index 000000000..fcc4e85ce --- /dev/null +++ b/configs/9.0/packages/tbb/specfile @@ -0,0 +1 @@ +../../../8.0/packages/tbb/specfile \ No newline at end of file diff --git a/configs/9.0/packages/tbb/stage_1 b/configs/9.0/packages/tbb/stage_1 new file mode 100644 index 000000000..eb1999167 --- /dev/null +++ b/configs/9.0/packages/tbb/stage_1 @@ -0,0 +1,116 @@ +#!/usr/bin/env bash +# +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# TBB build parameters for stage 1 32/64 bits +# ============================================== +# + +# Include some standard functions +source ${utilities}/bitsize_selection.sh + +# Tell the build system to hold the temp install folder +ATCFG_HOLD_TEMP_INSTALL='no' +# Tell the build system to hold the temp build folder +ATCFG_HOLD_TEMP_BUILD='no' +# Build in the source code directory +ATCFG_BUILD_STAGE_T='link' + +atcfg_configure () +{ + # No configure required for Thread Building Blocks + echo "No configure to run." +} + +atcfg_pre_make () +{ + # Thread Building Blocks has some env var name clash with our + # scripts. Unset them now before build + unset compiler + unset target +} + +atcfg_make () +{ + local base_target=$(find_build_target ${AT_BIT_SIZE}) + + # Set the AT's GCC as compiler. + if [[ "${cross_build}" == 'yes' ]]; then + local cc_path="${at_dest}/bin/${target64:-${target}}-gcc" + local ccx_path="${at_dest}/bin/${target64:-${target}}-g++" + else + local cc_path="${at_dest}/bin/gcc" + local ccx_path="${at_dest}/bin/g++" + fi + + PATH=${at_dest}/bin:${PATH} \ + CONLY=${cc_path} \ + CPLUS=${ccx_path} \ + LDFLAGS="-m${AT_BIT_SIZE}" \ + CXXFLAGS="-m${AT_BIT_SIZE}" \ + ${SUB_MAKE} arch=${base_target} +} + +atcfg_make_check () +{ + # Package testing not done on cross build + if [[ "${cross_build}" == 'no' ]]; then + PATH=${at_dest}/bin:${PATH} \ + LDFLAGS="-m${AT_BIT_SIZE}" \ + CXXFLAGS="-m${AT_BIT_SIZE}" \ + ${SUB_MAKE} test + fi +} + +atcfg_pre_install () +{ + if [[ "${cross_build}" == "yes" ]]; then + install_dir="${install_transfer_cross}/usr" + else + install_dir="${install_transfer}" + fi + local libdir=$(find_build_libdir ${AT_BIT_SIZE}) + + # Prepare the install folders for manual installation + mkdir -p ${install_dir}/${libdir} \ + ${install_dir}/include/tbb \ + ${install_dir}/include/tbb/compat \ + ${install_dir}/include/tbb/internal \ + ${install_dir}/include/tbb/machine +} + +atcfg_install () +{ + local libdir=$(find_build_libdir ${AT_BIT_SIZE}) + + for LIB in $(ls build/linux_powerpc*/*.so.*); do + LIB_DEST=$(basename ${LIB} | sed "s/\.so\..*$/\.so/") + install -m 755 ${LIB} \ + ${install_dir}/${libdir}/$(basename ${LIB}) + pushd ${install_dir}/${libdir} && \ + ln -s $(basename ${LIB}) ${LIB_DEST} && popd + done + + # Include files + install -m 644 include/tbb/*.h \ + ${install_dir}/include/tbb + install -m 644 include/tbb/compat/* \ + ${install_dir}/include/tbb/compat + install -m 644 include/tbb/internal/* \ + ${install_dir}/include/tbb/internal + install -m 644 include/tbb/machine/* \ + ${install_dir}/include/tbb/machine +} diff --git a/configs/9.0/packages/tbb/tbb.mk b/configs/9.0/packages/tbb/tbb.mk new file mode 100644 index 000000000..849057b38 --- /dev/null +++ b/configs/9.0/packages/tbb/tbb.mk @@ -0,0 +1,33 @@ +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# +# +$(eval $(call set_provides,tbb_1,multi,cross_yes)) + +tbb: $(RCPTS)/tbb_1.rcpt + +# Add it to the target 3rdparty_libs +3rdparty_libs-reqs += $(RCPTS)/tbb_1.rcpt + +$(RCPTS)/tbb_1.rcpt: $(tbb_1-archdeps) + @touch $@ + +$(RCPTS)/tbb_1-32.a.rcpt: $(patsubst %,$(RCPTS)/%.rcpt,gcc_4 \ + rsync_tbb) + @touch $@ + +$(RCPTS)/tbb_1-64.a.rcpt: $(patsubst %,$(RCPTS)/%.rcpt,gcc_4 \ + rsync_tbb) + @touch $@ diff --git a/configs/9.0/packages/tcmalloc/sources b/configs/9.0/packages/tcmalloc/sources new file mode 100644 index 000000000..eec481c20 --- /dev/null +++ b/configs/9.0/packages/tcmalloc/sources @@ -0,0 +1,56 @@ +#!/usr/bin/env bash +# +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# Tcmalloc source package and build info +# ================================== +# + +ATSRC_PACKAGE_NAME="TCMalloc" +ATSRC_PACKAGE_VER=2.4 +ATSRC_PACKAGE_REV=689e4a5 +ATSRC_PACKAGE_LICENSE="BSD License" +ATSRC_PACKAGE_DOCLINK="http://htmlpreview.github.io/?https://github.com/gperftools/gperftools/blob/master/doc/tcmalloc.html" +ATSRC_PACKAGE_RELFIXES= +ATSRC_PACKAGE_STR_VER="${ATSRC_PACKAGE_NAME} ${ATSRC_PACKAGE_VER}${ATSRC_PACKAGE_REV:+-${ATSRC_PACKAGE_REV}}" +ATSRC_PACKAGE_VERID="${ATSRC_PACKAGE_VER}${ATSRC_PACKAGE_REV:+-${ATSRC_PACKAGE_REV}}" +ATSRC_PACKAGE_PRE="test -d gperftools-${ATSRC_PACKAGE_VERID}" +ATSRC_PACKAGE_CO=([0]="wget -O gperftools-${ATSRC_PACKAGE_VERID}.tar.gz https://github.com/gperftools/gperftools/archive/${ATSRC_PACKAGE_REV}.tar.gz") +ATSRC_PACKAGE_GIT="" +# Use --transform to give a better name to Gperftools directory. +ATSRC_PACKAGE_POST="tar xzf gperftools-${ATSRC_PACKAGE_VERID}.tar.gz --transform=s/gperftools-${ATSRC_PACKAGE_REV}[^\\/]*/gperftools-${ATSRC_PACKAGE_VERID}/" +ATSRC_PACKAGE_SRC="${AT_BASE}/sources/gperftools-${ATSRC_PACKAGE_VERID}" +ATSRC_PACKAGE_WORK=${AT_WORK_PATH}/gperftools +ATSRC_PACKAGE_MLS="" +ATSRC_PACKAGE_ALOC="" +ATSRC_PACKAGE_PATCHES="" +ATSRC_PACKAGE_TARS="" +ATSRC_PACKAGE_MAKE_CHECK="" +ATSRC_PACKAGE_DISTRIB=no +ATSRC_PACKAGE_BUNDLE=toolchain_extra + +atsrc_get_patches () +{ + at_get_patch \ + https://github.com/gperftools/gperftools/commit/7852eeb75b9375cf52a7da01be044da6e915dd08.patch \ + f41cc9694a060099bef28a13043a1dc9 || return ${?} +} + +atsrc_apply_patches () +{ + patch -p1 < 7852eeb75b9375cf52a7da01be044da6e915dd08.patch \ + || return ${?} +} diff --git a/configs/9.0/packages/tcmalloc/specfile b/configs/9.0/packages/tcmalloc/specfile new file mode 120000 index 000000000..ac824ae66 --- /dev/null +++ b/configs/9.0/packages/tcmalloc/specfile @@ -0,0 +1 @@ +../../../8.0/packages/tcmalloc/specfile \ No newline at end of file diff --git a/configs/9.0/packages/tcmalloc/stage_1 b/configs/9.0/packages/tcmalloc/stage_1 new file mode 100644 index 000000000..735160817 --- /dev/null +++ b/configs/9.0/packages/tcmalloc/stage_1 @@ -0,0 +1,149 @@ +#!/usr/bin/env bash +# +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# Tcmalloc build parameters for stage 1 32/64 bits +# ========================================= +# + +# Include some standard functions +source ${utilities}/bitsize_selection.sh + +# Tell the build system to hold the temp install folder +ATCFG_HOLD_TEMP_INSTALL='no' +# Tell the build system to hold the temp build folder +ATCFG_HOLD_TEMP_BUILD='no' +# In some cases, it's necessary to run autogen.sh, forcing it to use a +# different source directory for 32 and 64 bits. +ATCFG_BUILD_STAGE_T='link' + +atcfg_pre_configure () +{ + # Prepare configure_build and configure_host variables, which are + # passed as parameters to configure as --build and --host, + # respectively. + # + # The variable configure_target and the parameter --target should not + # be required because this is not a Canadian Cross Compiler. However, + # since it has been provided in the past, we continue to pass this + # parameter to configure for historical reasons. + # + # The variable host is passed down to this file and holds the system + # where advance toolchain is being built on. + # + # Native builds may have two targets, i.e.: 32 and 64 bits, regardless + # of the word size of the building system. This could trick the + # configure script into thinking that this is a cross build, when it is + # not, e.g.: + # configure --build=powerpc64-linux-gnu --host=powerpc-linux-gnu + # + # Therefore, on native builds, we force configure_build to have the + # same value as configure_host. + configure_host=$(find_build_target ${AT_BIT_SIZE}) + configure_target=${configure_host} + if [[ "${cross_build}" == 'no' ]]; then + configure_build=${configure_host} + else + configure_build=${host} + fi + + # Prepare the directory variables: configure_prefix, configure_bindir, + # configure_libdir, and configure_includedir, which are passed as + # arguments to configure as --prefix, --bindir, --libdir, and + # --includedir, respectively. + # + # On native builds, files are installed directly under the main prefix, + # whereas on cross builds, a '/usr' suffix is added to it. + if [[ "${cross_build}" == 'yes' ]]; then + configure_prefix="${dest_cross}/usr" + else + configure_prefix="${at_dest}" + fi + # The bin and lib directories depend on the word size, e.g. + # configure_bindir may be set to bin, bin32, or bin64. + configure_bindir=${configure_prefix}/$(find_build_bindir ${AT_BIT_SIZE}) + configure_libdir=${configure_prefix}/$(find_build_libdir ${AT_BIT_SIZE}) + # The variable configure_includedir is not actually required, because + # the default value provided by configure, i.e. ${prefix}/include, is + # exactly what we want. However, we prepare this variable for + # completeness purposes. + configure_includedir="${configure_prefix}/include" +} + +atcfg_configure () +{ + # Select the prefixed compilation tools: gcc, g++, as, ld, ar, and + # ranlib, so that they work on both native and cross build. + if [[ "${cross_build}" == 'yes' ]]; then + configure_cc="${at_dest}/bin/${target64:-${target}}-gcc" + configure_cxx="${at_dest}/bin/${target64:-${target}}-g++" + configure_as="${at_dest}/bin/${target64:-${target}}-as" + configure_ld="${at_dest}/bin/${target64:-${target}}-ld" + configure_ar="${at_dest}/bin/${target64:-${target}}-ar" + configure_ranlib="${at_dest}/bin/${target64:-${target}}-ranlib" + else + configure_cc="${at_dest}/bin/gcc" + configure_cxx="${at_dest}/bin/g++" + configure_as="${at_dest}/bin/as" + configure_ld="${at_dest}/bin/ld" + configure_ar="${at_dest}/bin/ar" + configure_ranlib="${at_dest}/bin/ranlib" + fi + + # When downloading the source code directly from the repository, it + # may be necessary to generate the configure script. + if [[ ! -e "./configure" ]]; then + ./autogen.sh || return 1 + fi + + PATH=${at_dest}/bin:${PATH} \ + CC="${configure_cc}" \ + CXX="${configure_cxx}" \ + AS="${configure_as}" \ + LD="${configure_ld}" \ + AR="${configure_ar}" \ + RANLIB="${configure_ranlib}" \ + CFLAGS="-g -m${AT_BIT_SIZE} -O3" \ + CXXFLAGS="-g -m${AT_BIT_SIZE} -O3" \ + LDFLAGS="-Wl,-Bsymbolic" \ + ./configure \ + --build=${configure_build} \ + --host=${configure_host} \ + --target=${configure_target} \ + --prefix=${configure_prefix} \ + --bindir=${configure_bindir} \ + --libdir=${configure_libdir} \ + --includedir=${configure_includedir} +} + +atcfg_make () +{ + PATH=${at_dest}/bin:${PATH} ${SUB_MAKE} +} + +atcfg_make_check () +{ + # Package testing not done for a cross build + if [[ "${cross_build}" == 'no' ]]; then + PATH=${at_dest}/bin:${PATH} ${SUB_MAKE} check + fi +} + +atcfg_install () +{ + PATH=${at_dest}/bin:${PATH} \ + ${SUB_MAKE} DESTDIR=${install_place} install +} diff --git a/configs/9.0/packages/tcmalloc/tcmalloc.mk b/configs/9.0/packages/tcmalloc/tcmalloc.mk new file mode 100644 index 000000000..a456a034d --- /dev/null +++ b/configs/9.0/packages/tcmalloc/tcmalloc.mk @@ -0,0 +1,33 @@ +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# +# +$(eval $(call set_provides,tcmalloc_1,multi,cross_yes)) + +tcmalloc: $(RCPTS)/tcmalloc_1.rcpt + +# Add it to the target 3rdparty_libs +3rdparty_libs-reqs += $(RCPTS)/tcmalloc_1.rcpt + +$(RCPTS)/tcmalloc_1.rcpt: $(tcmalloc_1-archdeps) + @touch $@ + +$(RCPTS)/tcmalloc_1-32.a.rcpt: $(patsubst %,$(RCPTS)/%.rcpt,gcc_4 \ + rsync_tcmalloc) + @touch $@ + +$(RCPTS)/tcmalloc_1-64.a.rcpt: $(patsubst %,$(RCPTS)/%.rcpt,gcc_4 \ + rsync_tcmalloc) + @touch $@ diff --git a/configs/9.0/packages/valgrind/sources b/configs/9.0/packages/valgrind/sources new file mode 100644 index 000000000..1fdfb9e1a --- /dev/null +++ b/configs/9.0/packages/valgrind/sources @@ -0,0 +1,74 @@ +#!/usr/bin/env bash +# +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# Valgrind source package and build info +# ====================================== +# + +ATSRC_PACKAGE_NAME="Valgrind" +ATSRC_PACKAGE_VER=3.11.0 +ATSRC_PACKAGE_REV= +ATSRC_PACKAGE_LICENSE="GPL 2.0" +ATSRC_PACKAGE_DOCLINK="http://valgrind.org/docs/" +ATSRC_PACKAGE_RELFIXES= +ATSRC_PACKAGE_STR_VER="${ATSRC_PACKAGE_NAME} ${ATSRC_PACKAGE_VER}" +ATSRC_PACKAGE_PRE="test -d valgrind-${ATSRC_PACKAGE_VER}" +ATSRC_PACKAGE_CO=([0]="wget http://valgrind.org/downloads/valgrind-${ATSRC_PACKAGE_VER}.tar.bz2") +ATSRC_PACKAGE_POST="tar -xjf valgrind-${ATSRC_PACKAGE_VER}.tar.bz2" +ATSRC_PACKAGE_SRC="${AT_BASE}/sources/valgrind-${ATSRC_PACKAGE_VER}" +ATSRC_PACKAGE_WORK=${AT_WORK_PATH}/valgrind +ATSRC_PACKAGE_MLS="" +ATSRC_PACKAGE_ALOC='' +ATSRC_PACKAGE_PATCHES='' +ATSRC_PACKAGE_TARS='' +ATSRC_PACKAGE_MAKE_CHECK= +ATSRC_PACKAGE_DISTRIB=yes +ATSRC_PACKAGE_BUNDLE=profile + +atsrc_get_patches () +{ + at_get_patch \ + https://github.com/powertechpreview/powertechpreview/raw/be030afbf8d78018ab77aeea58092e03d483e8ce/Valgrind%20iTrace%20Patches/3.11/vg-3110-itrace.v1.tgz \ + 337042b8ea29d476b69d439c154d62f0 || return ${?} + + at_get_patch \ + https://github.com/powertechpreview/powertechpreview/raw/ea618ab5d0219fe9e4d3b3b5cb1e27e3e8e66678/Valgrind%20Core%20Patches/3.11.0/0001-128bit-modulo-and-carry-instruction-fix.patch \ + 676ce74e40181c5aa828b9dd9b621986 || return ${?} + + at_get_patch_and_trim \ + https://bugsfiles.kde.org/attachment.cgi?id=98878 \ + Fix-mtfsfi-usage-of-W-bit34.patch 34 \ + 56c28933abee0a03995b48302621a1a0 || return ${?} + + return 0 +} + +atsrc_apply_patches () +{ + tar xzf vg-3110-itrace.v1.tgz || return ${?} + + # Apply these patches to hook the itrace subdirectories into the + # valgrind makefile and configure scripts. + patch -p0 < add-itrace-bits-to-Makefile.am.diff || return ${?} + patch -p0 < add-itrace-bits-to-configure.ac.diff || return ${?} + patch -p0 < add-itrace-bits-to-check_headers_and_includes.diff || return ${?} + + patch -p1 < 0001-128bit-modulo-and-carry-instruction-fix.patch || return ${?} + patch -p1 < Fix-mtfsfi-usage-of-W-bit34.patch || return ${?} + + return 0 +} diff --git a/configs/9.0/packages/valgrind/specfile b/configs/9.0/packages/valgrind/specfile new file mode 120000 index 000000000..9b884184f --- /dev/null +++ b/configs/9.0/packages/valgrind/specfile @@ -0,0 +1 @@ +../../../8.0/packages/valgrind/specfile \ No newline at end of file diff --git a/configs/9.0/packages/valgrind/stage_1 b/configs/9.0/packages/valgrind/stage_1 new file mode 120000 index 000000000..4a4050ae2 --- /dev/null +++ b/configs/9.0/packages/valgrind/stage_1 @@ -0,0 +1 @@ +../../../8.0/packages/valgrind/stage_1 \ No newline at end of file diff --git a/configs/9.0/packages/valgrind/valgrind.mk b/configs/9.0/packages/valgrind/valgrind.mk new file mode 120000 index 000000000..21f2823c6 --- /dev/null +++ b/configs/9.0/packages/valgrind/valgrind.mk @@ -0,0 +1 @@ +../../../8.0/packages/valgrind/valgrind.mk \ No newline at end of file diff --git a/configs/9.0/packages/zlib/sources b/configs/9.0/packages/zlib/sources new file mode 100644 index 000000000..7f25d5a7f --- /dev/null +++ b/configs/9.0/packages/zlib/sources @@ -0,0 +1,40 @@ +#!/usr/bin/env bash +# +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# ZLIB source package and build info +# ================================== +# + +ATSRC_PACKAGE_NAME="ZLIB Compression Library" +ATSRC_PACKAGE_VER=1.2.8 +ATSRC_PACKAGE_LICENSE="Zlib License" +ATSRC_PACKAGE_DOCLINK="http://www.zlib.net/manual.html" +ATSRC_PACKAGE_RELFIXES= +ATSRC_PACKAGE_STR_VER="${ATSRC_PACKAGE_NAME} ${ATSRC_PACKAGE_VER}" +ATSRC_PACKAGE_PRE="test -d zlib-${ATSRC_PACKAGE_VER}" +ATSRC_PACKAGE_CO=([0]="wget -N http://zlib.net/zlib-${ATSRC_PACKAGE_VER}.tar.gz" \ + [1]="wget -N http://downloads.sourceforge.net/project/libpng/zlib/${ATSRC_PACKAGE_VER}/zlib-${ATSRC_PACKAGE_VER}.tar.gz") +ATSRC_PACKAGE_POST="tar -xzf zlib-${ATSRC_PACKAGE_VER}.tar.gz" +ATSRC_PACKAGE_SRC="${AT_BASE}/sources/zlib-${ATSRC_PACKAGE_VER}" +ATSRC_PACKAGE_WORK=${AT_WORK_PATH}/zlib +ATSRC_PACKAGE_MLS="" +ATSRC_PACKAGE_ALOC="" +ATSRC_PACKAGE_PATCHES="" +ATSRC_PACKAGE_TARS="" +ATSRC_PACKAGE_MAKE_CHECK="" +ATSRC_PACKAGE_DISTRIB=no +ATSRC_PACKAGE_BUNDLE=toolchain_extra diff --git a/configs/9.0/packages/zlib/specfile b/configs/9.0/packages/zlib/specfile new file mode 120000 index 000000000..b738d518e --- /dev/null +++ b/configs/9.0/packages/zlib/specfile @@ -0,0 +1 @@ +../../../8.0/packages/zlib/specfile \ No newline at end of file diff --git a/configs/9.0/packages/zlib/stage_1 b/configs/9.0/packages/zlib/stage_1 new file mode 100644 index 000000000..6684af2bd --- /dev/null +++ b/configs/9.0/packages/zlib/stage_1 @@ -0,0 +1,149 @@ +#!/usr/bin/env bash +# +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +source ${AT_BASE}/scripts/utilities/bitsize_selection.sh + + +# ZLIB build parameters for stage 1 32 or 64 bits +# ========================================= +# + +# Tell the build system to hold the temp install folder +ATCFG_HOLD_TEMP_INSTALL='no' +# Tell the build system to hold the temp build folder +ATCFG_HOLD_TEMP_BUILD='no' +# Build in a new directory +ATCFG_BUILD_STAGE_T='link' + +atcfg_pre_configure() { + # Prepare configure_build and configure_host variables, which are + # passed as parameters to configure as --build and --host, + # respectively. + # + # The variable configure_target and the parameter --target are not + # required because this is not a Canadian Cross Compiler. + # + # The variable host is passed down to this file and holds the system + # where advance toolchain is being built on. + # + # Native builds may have two targets, i.e.: 32 and 64 bits, regardless + # of the word size of the building system. This could trick the + # configure script into thinking that this is a cross build, when it is + # not, e.g.: + # configure --build=powerpc64-linux-gnu --host=powerpc-linux-gnu + # + # Therefore, on native builds, we force configure_build to have the + # same value as configure_host. + configure_host=$(find_build_target ${AT_BIT_SIZE}) + if [[ "${cross_build}" == 'no' ]]; then + configure_build=${configure_host} + else + configure_build=${host} + fi + + # Prepare the directory variables: configure_prefix, configure_bindir, + # configure_libdir, and configure_includedir, which are passed as + # arguments to configure as --prefix, --bindir, --libdir, and + # --includedir, respectively. + # + # On native builds, files are installed directly under the main prefix, + # whereas on cross builds, a '/usr' suffix is added to it. + if [[ "${cross_build}" == 'yes' ]]; then + configure_prefix="${dest_cross}/usr" + else + configure_prefix="${at_dest}" + fi + # The bin and lib directories depend on the word size, e.g. + # configure_bindir may be set to bin, bin32, or bin64. + configure_bindir=${configure_prefix}/$(find_build_bindir ${AT_BIT_SIZE}) + configure_libdir=${configure_prefix}/$(find_build_libdir ${AT_BIT_SIZE}) + # The variable configure_includedir is not actually required, because + # the default value provided by configure, i.e. ${prefix}/include, is + # exactly what we want. However, we prepare this variable for + # completeness purposes. + configure_includedir="${configure_prefix}/include" + # On the other hand, the variables configure_docdir, configure_infodir, + # and configure_mandir are indeed required, because the documentation + # files of all packages should be installed at the same place, i.e.: + # + # ${at_dest}/share/doc/pkgname + # ${at_dest}/share/info + # ${at_dest}/share/man + # + # Notice that we cannot use the variable configure_prefix here, because + # it may contain the suffixes ppc/usr/ or ppc64le/usr/. + configure_docdir="${at_dest}/share/doc/zlib" + configure_infodir="${at_dest}/share/info" + configure_mandir="${at_dest}/share/man" +} + +atcfg_configure() { + # Select the prefixed compilation tools: gcc, g++, as, ld, ar, and + # ranlib, so that they work on both native and cross build. + configure_cc="${at_dest}/bin/${target64:-${target}}-gcc" + + PATH=${at_dest}/bin:${PATH} \ + CC="${configure_cc} -m${AT_BIT_SIZE}" \ + CFLAGS="-g -O3 -mcpu=${build_load_arch}" \ + CXXFLAGS="-g -O3 -mcpu=${build_load_arch}" \ + ${ATSRC_PACKAGE_WORK}/configure \ + --prefix=${configure_prefix} \ + --libdir=${configure_libdir} \ + --includedir=${configure_includedir} +} + +atcfg_make() { + PATH=${at_dest}/bin:${PATH} \ + ${SUB_MAKE} +} + +atcfg_make_check() { + # Package testing not done for a cross build. + if [[ "${cross_build}" == 'no' ]]; then + PATH=${at_dest}/bin:${PATH} \ + ${SUB_MAKE} check + fi +} + +atcfg_install() { + PATH=${at_dest}/bin:${PATH} \ + ${SUB_MAKE} install DESTDIR=${install_place} +} + +atcfg_post_install() { + set -e + # Workaround + # + # The configure script in zlib does not accept the usual --mandir + # switch. The following lines move the man pages into the correct + # documentation path + if [[ "${cross_build}" == 'yes' ]]; then + mkdir ${install_place}/${configure_mandir} -p + mv ${install_place}/${configure_prefix}/share/man/* \ + ${install_place}/${configure_mandir} + fi + if [[ "${cross_build}" == 'no' ]]; then + # Hack around to avoid ld.so.cache getting the libs from the + # system as ldconfig puts platform based directories preceding + # other directories. + ${AT_BASE}/scripts/utilities/create_lib_symlinks.sh \ + "${install_place}/${configure_libdir}" \ + "${install_place}/${configure_libdir}/\ +${build_load_arch}" + fi + set +e +} diff --git a/configs/9.0/packages/zlib/stage_optimized b/configs/9.0/packages/zlib/stage_optimized new file mode 120000 index 000000000..dc7407b77 --- /dev/null +++ b/configs/9.0/packages/zlib/stage_optimized @@ -0,0 +1 @@ +../../../8.0/packages/zlib/stage_optimized \ No newline at end of file diff --git a/configs/9.0/packages/zlib/zlib.mk b/configs/9.0/packages/zlib/zlib.mk new file mode 100644 index 000000000..a997fe97b --- /dev/null +++ b/configs/9.0/packages/zlib/zlib.mk @@ -0,0 +1,44 @@ +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# +# +$(eval $(call set_provides,zlib_1,multi,cross_yes)) + +# List of dependencies in order to build the tuned libraries for 32 or +# 64 bits. +zlib_tuned-32-deps := $(RCPTS)/gcc_3.rcpt \ + $(RCPTS)/rsync_zlib.rcpt \ + $(glibc_tuned-32-archdeps) +zlib_tuned-64-deps := $(RCPTS)/gcc_3.rcpt \ + $(RCPTS)/rsync_zlib.rcpt \ + $(glibc_tuned-64-archdeps) +# Enable tuned targets +$(eval $(call provide_tuneds,zlib)) + +zlib_1: $(RCPTS)/zlib_1.rcpt + +zlib_tuned: $(RCPTS)/zlib_tuned.rcpt + +$(RCPTS)/zlib_1.rcpt: $(zlib_1-archdeps) + @touch $@ + +$(RCPTS)/zlib_1-32.a.rcpt: $(patsubst %,$(RCPTS)/%.rcpt,gcc_3 rsync_zlib) + @touch $@ + +$(RCPTS)/zlib_1-64.a.rcpt: $(patsubst %,$(RCPTS)/%.rcpt,gcc_3 rsync_zlib) + @touch $@ + +$(RCPTS)/zlib_tuned.rcpt: $(zlib_tuned-archdeps) + @touch $@ diff --git a/configs/9.0/release_notes/release_notes-body.html b/configs/9.0/release_notes/release_notes-body.html new file mode 100644 index 000000000..0794c3a1a --- /dev/null +++ b/configs/9.0/release_notes/release_notes-body.html @@ -0,0 +1,340 @@ + + + + + + + + Release Notes for the Advance Toolchain __VERSION_RELEASE__ + + + +
    +
    + +

    Release Notes for the Advance Toolchain __VERSION_RELEASE__

    +
    +
    + | Features + | Previous Releases + | Support + | Installation + | Documentation + | Legal Notices | +
    +
    + __FEATURES__ + back to top +
    + +

    Support

    +

    Customer support for the Advance Toolchain (AT) is provided in one of three ways:

    +
      +
    1. If you are using AT as directed by an IBM product team (ex.: IBM XL Compiler or PowerVM Lx86) please report suspected AT problems to IBM Support using that product name and entitlement.
    2. +
    3. IBM's Support Line for Linux Offerings now provides support for the Advance Toolchain as well. If you have a contract with a Support Line for Linux, place a call to IBM Support, e.g. for United States: +
        +
      • Dial 1-800-426-IBM-SERV
      • +
      • Option #2 (Other business products or solutions)
      • +
      • Option #2 (Software)
      • +
      • Option #7 (Other OS/Linux)
      • +
      + For other countries click here. +
    4. +
    5. All other users can use an electronic forum that is monitored Monday through Friday. For questions regarding the use of or to report a suspected defect in AT, click here. +
        +
      • Log in.
      • +
      • Start a topic.
      • +
      • Enter and save your question or problem.
      • +
      • An initial response will be attempted within 2 business days.
      • +
    6. +
    + back to top +
    + +

    Installation

    + __INST__ +

    Manual installation for rpms

    +

    If you are installing the rpms manually you will need to install them in the following order (due to prerequisites):

    +
    +advance-toolchain-__VERSION__-runtime-__VERSION_RELEASE__
    +advance-toolchain-__VERSION__-devel-__VERSION_RELEASE__
    +advance-toolchain-__VERSION__-perf-__VERSION_RELEASE__
    +advance-toolchain-__VERSION__-mcore-libs-__VERSION_RELEASE__
    +advance-toolchain-__VERSION__-runtime-at__OLD_VERSION__-compat-__VERSION_RELEASE__
    +				
    +

    If you are updating a previous installation, you need to update as a batch, so rpm can solve the dependencies, i.e.:

    +
    +rpm -Uvh advance-toolchain-__VERSION__-runtime-__VERSION_RELEASE__.ppc64.rpm \
    +         advance-toolchain-__VERSION__-devel-__VERSION_RELEASE__.ppc64.rpm \
    +         advance-toolchain-__VERSION__-perf-__VERSION_RELEASE__.ppc64.rpm \
    +         advance-toolchain-__VERSION__-mcore-__VERSION_RELEASE__.ppc64.rpm \
    +         advance-toolchain-__VERSION__-runtime-at__OLD_VERSION__-compat-__VERSION_RELEASE__.ppc64.rpm
    +				
    +

    The rpm command should always be run as root. Failure to do so will result in an error similar to this:

    +

    + error: can't create transaction lock on /var/lib/rpm/__db.000 +

    +

    Important notes

    +
      +
    • Timezone files: If you need to use something different than Factory, then you should copy the timezone file you want from /opt/__VERSION__/share/zoneinfo to /opt/__VERSION__/etc/localtime
    • +
    • advance-toolchain-__VERSION__-runtime-compat-__VERSION_RELEASE__: DO NOT INSTALL it on RHEL7 and beyond. These are intended for runtime compatibility on RHEL6 only (see below).
    • +
    +

    Installation for runtime compatibility on previous distribution versions

    +

    Users running applications on previous distributions of SLES or RHEL may install the compatibility rpm advance-toolchain-__VERSION__-runtime-compat-__VERSION_RELEASE__ in order to get the Advance Toolchain runtime libraries.

    +

    Installation of the cross-compiler (x86)

    +

    You can download advance-toolchain-__VERSION__-cross-__VERSION_RELEASE__ and install in a x86 machine to build Power binaries on it. Binaries generated by the cross-compiler will run on a Power system with the same version of the Advance Toolchain installed.

    + back to top +
    + +

    Documentation

    +

    The official documentation for the Advance Toolchain is available at the IBM Power Linux Community website.

    + back to top +
    + + +

    Legal notices

    +

    Each component of Advance Toolchain has its own license, they are all covered by this list:

    + +

    The licenses for each GPL and LGPL code segment can be found in the advance-toolchain-__VERSION__-src-__VERSION_RELEASE__.tgz file in the repository, the others are listed below.

    +

    In order to comply with the GPL and LGPL licenses, the source code for the following packages is available:

    +
      +
    • binutils (GPL 2.0)
    • +
    • gcc (GPL 3.0)
    • +
    • gdb (GPL 2.0)
    • +
    • glibc (LGPL 2.1)
    • +
    • gmp (GPL 3.0)
    • +
    • Threading Building Blocks (GPL 2.0)
    • +
    • libdfp (LGPL 2.1)
    • +
    • libhugetlbfs (LGPL 2.1)
    • +
    • libvecpf (LGPL 2.1)
    • +
    • linux kernel (GPL 2.0)
    • +
    • mpc (GPL 3.0)
    • +
    • mpfr (GPL 3.0)
    • +
    • oprofile (GPL 2.0)
    • +
    • Userspace RCU (LGPL 2.1)
    • +
    • Valgrind (GPL 2.0)
    • +
    +

    Boost

    +

    + Boost Software License - Version 1.0 - August 17th, 2003
    +
    + Permission is hereby granted, free of charge, to any person or organization
    + obtaining a copy of the software and accompanying documentation covered by
    + this license (the "Software") to use, reproduce, display, distribute,
    + execute, and transmit the Software, and to prepare derivative works of the
    + Software, and to permit third-parties to whom the Software is furnished to
    + do so, all subject to the following:
    +
    + The copyright notices in the Software and this entire statement, including
    + the above license grant, this restriction and the following disclaimer,
    + must be included in all copies of the Software, in whole or in part, and
    + all derivative works of the Software, unless such copies or derivative
    + works are solely in the form of machine-executable object code generated by
    + a source language processor.
    +
    + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
    + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
    + FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
    + SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
    + FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
    + ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
    + DEALINGS IN THE SOFTWARE. +

    +

    Expat (MIT)
    + Copyright (c) 1998, 1999, 2000 Thai Open Source Software Center Ltd and Clark Cooper
    + Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006 Expat maintainers.

    +

    + Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
    +
    + The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
    +
    + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +

    + +

    + Golang (BSD)
    + Copyright (c) 2012 The Go Authors. All rights reserved. +

    +

    + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are + met:
    +
    + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer.
    + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following disclaimer + in the documentation and/or other materials provided with the + distribution.
    + * Neither the name of Google Inc. nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission.
    +
    + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +

    + +

    Gperftools (BSD)
    + Copyright (c) 2005, Google Inc. All rights reserved.

    +

    + Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
    +
    + * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
    + * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
    + * Neither the name of Google Inc. nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
    +
    + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +

    + +

    Libauxv (BSD)
    +

    +

    + Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
    +
    + * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
    + * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
    + * Neither the name of the IBM Corporation nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
    +
    + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL IBM CORPORATION BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +

    + +

    Libpfm (MIT)
    + Copyright (c) 2002-2006 Hewlett-Packard Development Company, L.P.

    +

    + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions:
    +
    + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software.
    +
    + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, + INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A + PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT + HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF + CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE + OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
    +

    + +

    OpenSSL (BSD)
    + Copyright (c) 1998-2011 The OpenSSL Project. All rights reserved.
    + Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com). All rights reserved.

    +

    * Note: this distribution of OpenSSL does not include the IDEA and RC5 algorithms

    +

    + Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
    +
    + 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
    +
    + 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
    +
    + 3. All advertising materials mentioning features or use of this software must display the following acknowledgment: "This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
    +
    + 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to endorse or promote products derived from this software without prior written permission. For written permission, please contact openssl-core@openssl.org.
    +
    + 5. Products derived from this software may not be called "OpenSSL" nor may "OpenSSL" appear in their names without prior written permission of the OpenSSL Project.
    +
    + 6. Redistributions of any form whatsoever must retain the following acknowledgment: "This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit (http://www.openssl.org/)"
    +
    + THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
    +
    + This product includes cryptographic software written by Eric Young (eay@cryptsoft.com). This product includes software written by Tim Hudson (tjh@cryptsoft.com). +

    + +

    + PAFLib (MIT)
    + Copyright IBM Corp. 2013 +

    +

    +Permission is hereby granted, free of charge, to any person obtaining a copy
    +of this software and associated documentation files (the "Software"), to deal
    +in the Software without restriction, including without limitation the rights
    +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
    +copies of the Software, and to permit persons to whom the Software is
    +furnished to do so, subject to the following conditions:
    +
    +The above copyright notice and this permission notice shall be included in
    +all copies or substantial portions of the Software.
    +
    +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
    +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
    +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
    +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
    +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM
    , +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
    +THE SOFTWARE. +

    + +

    Python
    + Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Python Software Foundation; All Rights Reserved

    +

    + PYTHON SOFTWARE FOUNDATION LICENSE VERSION 2
    + --------------------------------------------
    +
    + 1. This LICENSE AGREEMENT is between the Python Software Foundation ("PSF"), and the Individual or Organization ("Licensee") accessing and otherwise using this software ("Python") in source or binary form and its associated documentation.
    +
    + 2. Subject to the terms and conditions of this License Agreement, PSF hereby grants Licensee a nonexclusive, royalty-free, world-wide license to reproduce, analyze, test, perform and/or display publicly, prepare derivative works, distribute, and otherwise use Python alone or in any derivative version, provided, however, that PSF's License Agreement and PSF's notice of copyright, i.e., "Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Python Software Foundation; All Rights Reserved" are retained in Python alone or in any derivative version prepared by Licensee.
    +
    + 3. In the event Licensee prepares a derivative work that is based on or incorporates Python or any part thereof, and wants to make the derivative work available to others as provided herein, then Licensee hereby agrees to include in any such work a brief summary of the changes made to Python.
    +
    + 4. PSF is making Python available to Licensee on an "AS IS" basis. PSF MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED. BY WAY OF EXAMPLE, BUT NOT LIMITATION, PSF MAKES NO AND DISCLAIMS ANY REPRESENTATION OR WARRANTY OF MERCHANTABILITY OR FITNESS FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF PYTHON WILL NOT INFRINGE ANY THIRD PARTY RIGHTS.
    +
    + 5. PSF SHALL NOT BE LIABLE TO LICENSEE OR ANY OTHER USERS OF PYTHON FOR ANY INCIDENTAL, SPECIAL, OR CONSEQUENTIAL DAMAGES OR LOSS AS A RESULT OF MODIFYING, DISTRIBUTING, OR OTHERWISE USING PYTHON, OR ANY DERIVATIVE THEREOF, EVEN IF ADVISED OF THE POSSIBILITY THEREOF.
    +
    + 6. This License Agreement will automatically terminate upon a material breach of its terms and conditions.
    +
    + 7. Nothing in this License Agreement shall be deemed to create any relationship of agency, partnership, or joint venture between PSF and Licensee. This License Agreement does not grant permission to use PSF trademarks or trade name in a trademark sense to endorse or promote products or services of Licensee, or any third party.
    +
    + 8. By copying, installing or otherwise using Python, Licensee agrees to be bound by the terms and conditions of this License Agreement. +

    +

    SPHDE (EPL)
    + Copyright (c) 2012 IBM Corporation

    +

    Distributed through the Eclipse Public License 1.0. The source code for this project is available on GitHub.

    + +

    ZLIB Compression Library
    + (C) 1995-2013 Jean-loup Gailly and Mark Adler +

    +

    + This software is provided 'as-is', without any express or implied
    + warranty. In no event will the authors be held liable for any damages
    + arising from the use of this software.
    +
    + Permission is granted to anyone to use this software for any purpose,
    + including commercial applications, and to alter it and redistribute it
    + freely, subject to the following restrictions:
    +
    + 1. The origin of this software must not be misrepresented; you must not
    + claim that you wrote the original software. If you use this software
    + in a product, an acknowledgment in the product documentation would be
    + appreciated but is not required.
    + 2. Altered source versions must be plainly marked as such, and must not be
    + misrepresented as being the original software.
    + 3. This notice may not be removed or altered from any source distribution.
    +

    +
    +
    + + diff --git a/configs/9.0/release_notes/release_notes-features.html b/configs/9.0/release_notes/release_notes-features.html new file mode 120000 index 000000000..725a3ae02 --- /dev/null +++ b/configs/9.0/release_notes/release_notes-features.html @@ -0,0 +1 @@ +../../8.0/release_notes/release_notes-features.html \ No newline at end of file diff --git a/configs/9.0/release_notes/release_notes-group_entry.html b/configs/9.0/release_notes/release_notes-group_entry.html new file mode 120000 index 000000000..0781df00a --- /dev/null +++ b/configs/9.0/release_notes/release_notes-group_entry.html @@ -0,0 +1 @@ +../../8.0/release_notes/release_notes-group_entry.html \ No newline at end of file diff --git a/configs/9.0/release_notes/release_notes-inst.html b/configs/9.0/release_notes/release_notes-inst.html new file mode 100644 index 000000000..841b5577a --- /dev/null +++ b/configs/9.0/release_notes/release_notes-inst.html @@ -0,0 +1,166 @@ + + + + + + + + diff --git a/configs/9.0/release_notes/release_notes-online_doc.html b/configs/9.0/release_notes/release_notes-online_doc.html new file mode 120000 index 000000000..d19ddd01b --- /dev/null +++ b/configs/9.0/release_notes/release_notes-online_doc.html @@ -0,0 +1 @@ +../../8.0/release_notes/release_notes-online_doc.html \ No newline at end of file diff --git a/configs/9.0/release_notes/release_notes-package_line.html b/configs/9.0/release_notes/release_notes-package_line.html new file mode 120000 index 000000000..afb8e537e --- /dev/null +++ b/configs/9.0/release_notes/release_notes-package_line.html @@ -0,0 +1 @@ +../../8.0/release_notes/release_notes-package_line.html \ No newline at end of file diff --git a/configs/9.0/release_notes/release_notes-style.html b/configs/9.0/release_notes/release_notes-style.html new file mode 120000 index 000000000..ea2732bf3 --- /dev/null +++ b/configs/9.0/release_notes/release_notes-style.html @@ -0,0 +1 @@ +../../8.0/release_notes/release_notes-style.html \ No newline at end of file diff --git a/configs/9.0/release_notes/relfixes.html b/configs/9.0/release_notes/relfixes.html new file mode 100644 index 000000000..d7204e890 --- /dev/null +++ b/configs/9.0/release_notes/relfixes.html @@ -0,0 +1,136 @@ +
  • POWER8 enablement.
  • +
  • POWER8 Optimized scheduler.
  • +
  • Requires at least POWER7.
  • +
  • POWER8 Transactional Memory enablement.
  • +
  • POWER8 Crypto Operations enablement.
  • +
  • POWER8 Fusion enablement.
  • +
  • POWER8 optimized system libraries.
  • +
  • GCC creates binaries using --mcpu=power7 --mtune=power8 by default.
  • +
  • Support for Go Programming Language.
  • +
  • Support for split stack.
  • +
  • Support for lock elision on glibc.
  • + +

    New features in 9.0-5

    +
      +
    • GCC provides a fix for the vector swap optimization.
    • +
    • Oprofile provides support for the POWER 8 NV and NVL variants.
    • +
    • Fixed Power 8 tuned libraries.
    • +
    + + +

    Previous releases

    + +

    New features in 9.0-4

    + + +

    New features in 9.0-3

    + + +

    New features in 9.0-2

    + + +

    New features in 9.0-1

    + + +

    New features in 9.0-0

    +
      +
    • 32-bit Go libraries are no longer supported.
    • +
    • Lock elision support was removed due some performance issues.
    • +
    • New tools available on the cross-compiler: boost, tbb, libauxv, libdfp, libhugetlbfs, libsphde, liburcu, libvecpf, openssl, paflib, tcmalloc, zlib
    • +
    • MPC provides: +
        +
      • Fix for mpc_pow output at low precision (see discussion).
      • +
      +
    • +
    • Debuginfo packages provided separately.
    • +
    • Binutils provides: +
        +
      • Gold linker.
      • +
      +
    • +
    • Split stack support included.
    • +
    + +

    New features in 8.0-4

    + diff --git a/configs/9.0/sanity.mk b/configs/9.0/sanity.mk new file mode 100644 index 000000000..9b6bc17b2 --- /dev/null +++ b/configs/9.0/sanity.mk @@ -0,0 +1,19 @@ +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# This file holds some sanity checks to run on the build machine, to verify +# its general required components for the building process. +define base_sanity + echo "Base sanity checks passed." +endef \ No newline at end of file diff --git a/configs/9.0/specs/main.spec b/configs/9.0/specs/main.spec new file mode 120000 index 000000000..00bdafa68 --- /dev/null +++ b/configs/9.0/specs/main.spec @@ -0,0 +1 @@ +../../8.0/specs/main.spec \ No newline at end of file diff --git a/configs/9.0/specs/metapkgs.spec b/configs/9.0/specs/metapkgs.spec new file mode 120000 index 000000000..580e908e9 --- /dev/null +++ b/configs/9.0/specs/metapkgs.spec @@ -0,0 +1 @@ +../../8.0/specs/metapkgs.spec \ No newline at end of file diff --git a/configs/9.0/specs/monolithic.spec b/configs/9.0/specs/monolithic.spec new file mode 100644 index 000000000..10fa54ba6 --- /dev/null +++ b/configs/9.0/specs/monolithic.spec @@ -0,0 +1,427 @@ +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +%description +The advance toolchain is a self contained toolchain which provides preview +toolchain functionality in GCC, binutils and GLIBC, as well as the debug and +profile tools GDB, Valgrind and OProfile. +It also provides a group of optimized threading libraries as well. + +#################################################### +%package runtime +Summary: Advance Toolchain +Requires: __RUNTIME_REQ__ +Group: Development/Libraries +AutoReqProv: no +Provides: advance-toolchain-runtime = %{at_major_version}-%{at_revision_number} + +%description runtime +The advance toolchain is a self contained toolchain which provides preview +toolchain functionality in GCC, binutils, GLIBC, GDB, Valgrind, and OProfile. + + +#################################################### +%package devel +Summary: Advance Toolchain +Requires: advance-toolchain-%{at_major}-runtime = %{at_major_version}-%{at_revision_number}, __DEVEL_REQ__ +Group: Development/Libraries +AutoReqProv: no +Provides: advance-toolchain-devel = %{at_major_version}-%{at_revision_number} + +%description devel +The advance toolchain is a self contained toolchain which provides preview +toolchain functionality in GCC, binutils, GLIBC, GDB, Valgrind, and OProfile. +This package provides the packages necessary to build applications that use the +features provided by the Advance Toolchain. + + +#################################################### +%package mcore-libs +Summary: Advance Toolchain +Requires: advance-toolchain-%{at_major}-runtime = %{at_major_version}-%{at_revision_number}, __MCORE-LIBS_REQ__ +Group: Development/Libraries +AutoReqProv: no +Provides: advance-toolchain-mcore-libs = %{at_major_version}-%{at_revision_number} + +%description mcore-libs +The advance toolchain is a self contained toolchain which provides preview +toolchain functionality in GCC, binutils, GLIBC, GDB, Valgrind, and OProfile. +This package provides the necessary libraries to build multi-threaded applications +using the specialized multi-threaded libraries Amino-CBB, URCU and Threading +Building Blocks. + + +#################################################### +%package perf +Summary: Advance Toolchain +Requires: advance-toolchain-%{at_major}-devel = %{at_major_version}-%{at_revision_number}, __PROFILE_REQ__ +Group: Development/Libraries +AutoReqProv: no +Provides: advance-toolchain-perf = %{at_major_version}-%{at_revision_number} + +%description perf +The advance toolchain is a self contained toolchain which provides preview +toolchain functionality in GCC, binutils, GLIBC, GDB, Valgrind, and OProfile. +This package 'perf' package contains the performance library install targets +for Valgrind and OProfile. + + +#################################################### +%package selinux +Summary: Advance Toolchain +Requires: advance-toolchain-%{at_major}-runtime = %{at_major_version}-%{at_revision_number} +Requires(post): /usr/sbin/semanage, /sbin/restorecon +Requires(postun): /usr/sbin/semanage, /sbin/restorecon +Group: Development/Libraries + +%description selinux +The advance toolchain is a self contained toolchain which provides preview +toolchain functionality in GCC, binutils, GLIBC, GDB, Valgrind, and OProfile. +The 'selinux' package contains the required labels for a system +running SElinux. + + +#################################################### +%package runtime-debuginfo +Summary: Debug information for package %{name}-runtime +Group: Development/Debug +AutoReqProv: 0 + +%description runtime-debuginfo +This package provides debug information for package %{name}-runtime. +Debug information is useful when developing applications that use this +package or when debugging this package. + +%package mcore-libs-debuginfo +Summary: Debug information for package %{name}-mcore-libs +Group: Development/Debug +AutoReqProv: 0 + +%description mcore-libs-debuginfo +This package provides debug information for package %{name}-mcore-libs. +Debug information is useful when developing applications that use this +package or when debugging this package. + +%package devel-debuginfo +Summary: Debug information for package %{name}-devel +Group: Development/Debug +AutoReqProv: 0 + +%description devel-debuginfo +This package provides debug information for package %{name}-devel. +Debug information is useful when developing applications that use this +package or when debugging this package. + +%package perf-debuginfo +Summary: Debug information for package %{name}-perf +Group: Development/Debug +AutoReqProv: 0 + +%description perf-debuginfo +This package provides debug information for package %{name}-perf. +Debug information is useful when developing applications that use this +package or when debugging this package. + +%global __debug_package 1 + + +#################################################### +# Compress man pages and strip debug information into separate packages. +%define __os_install_post \ + /usr/lib/rpm/brp-compress \ +%{nil} +%define __debug_install_post \ + bash %{_rpmdir}/find-debuginfo.sh %{?_find_debuginfo_opts} "%{_builddir}/%{?buildsubdir}" \ + bash %{_rpmdir}/split-debuginfo.sh --rpmdir %{_rpmdir} --dynamic %{at_work} --subpackage runtime \ + bash %{_rpmdir}/split-debuginfo.sh --rpmdir %{_rpmdir} --dynamic %{at_work} --subpackage mcore-libs \ + bash %{_rpmdir}/split-debuginfo.sh --rpmdir %{_rpmdir} --dynamic %{at_work} --subpackage devel \ + bash %{_rpmdir}/split-debuginfo.sh --rpmdir %{_rpmdir} --dynamic %{at_work} --subpackage profile \ +%{nil} + +# These have been known to be different on different distributions +%define _datadir %{_prefix}/share +%define _libexecdir %{_prefix}/libexec +%define _mandir %{_prefix}/share/man +%define _infodir %{_prefix}/share/info +%define _scriptdir %{_prefix}/scripts +# Some distributions set this to 'lib64' by default +%define _libdir %{_prefix}/lib +%define _bindir %{_prefix}/bin + +%prep +# Do not include createldhuge-1.0.sh and restoreld.sh on AT > 8.0. +rm -rf %{_scriptdir}/createldhuge-1.0.sh %{_scriptdir}/restoreld.sh + +%build + +%install +# Prepare a new build sandbox area +mkdir -p ${RPM_BUILD_ROOT}$(dirname %{_prefix}) +cp -af %{_prefix} ${RPM_BUILD_ROOT}$(dirname %{_prefix}) +# Remove ld.so.cache from rpm build install tree +rm -rf ${RPM_BUILD_ROOT}%{_prefix}/compat \ + ${RPM_BUILD_ROOT}%{_prefix}/etc/ld.so.cache \ + ${RPM_BUILD_ROOT}%{_prefix}/etc/ldconfig.log +# Copy the compatibility init script to the correct place +mkdir -p ${RPM_BUILD_ROOT}/etc/rc.d/init.d +# Remove info/dir from installation dir +rm ${RPM_BUILD_ROOT}%{_infodir}/dir +# Compress all of the info files. +gzip -9nvf ${RPM_BUILD_ROOT}%{_infodir}/*.info* +# Set a cronjob to run AT's ldconfig when the system's ldconfig is executed. +mkdir -p ${RPM_BUILD_ROOT}/etc/cron.d/ +echo "@reboot %{_bindir}/watch_ldconfig &" > ${RPM_BUILD_ROOT}/etc/cron.d/%{at_ver_rev_internal}_ldconfig + +#################################################### +%pre runtime +_host_power_arch=$(LD_SHOW_AUXV=1 /bin/true | grep AT_PLATFORM | grep -i power | sed 's/.*power//') +if [[ "${_host_power_arch}" != "" && "${_host_power_arch}" < "%{_min_power_arch}" ]]; then + echo "The system is power${_host_power_arch} but must be at least power%{_min_power_arch} to install this RPM." + exit 1 +fi +# Get distro glibc installed version +GLIBC_VER=$(rpm -q --queryformat='%{VERSION}\n' glibc | sort -u) +GLIBC_ABS=$(echo "${GLIBC_VER}" | awk 'BEGIN { FS="." }; { print $1$2 }' -) +if [[ ${GLIBC_ABS} -gt %{at_glibc_ver} ]]; then + echo "Your current glibc version ${GLIBC_VER} is higher than the one provided by the advance toolchain glibc." + echo "Please, consider the possibility of installing a newer version of advance toolchain." +fi + +#--------------------------------------------------- +%pre perf +# We need to create this special user for OProfile +getent group oprofile >/dev/null || groupadd -r oprofile +getent passwd oprofile >/dev/null || \ +useradd -r -g oprofile -d /home/oprofile -s /sbin/nologin \ +-c "Special user account to be used by OProfile" oprofile +exit 0 + + +#################################################### +%post runtime +# Automatically set the timezone +rm -f %{_prefix}/etc/localtime +ln -s /etc/localtime %{_prefix}/etc/localtime +# Do this in every .spec file because they may only install a subset. +# We never know the order rpm is going to update AT's packages. +# So we only need to update the ldconf cache when ldconfig is available +if [[ -f %{_sbindir}/ldconfig ]]; then + %{_sbindir}/ldconfig +fi + +#--------------------------------------------------- +%post devel +# Update the info directory entries +for INFO in $(ls %{_infodir}/*.info.gz); do + install-info ${INFO} %{_infodir}/dir > /dev/null 2>&1 || : +done +# Run this setup script right after install +%{_prefix}/scripts/at-create-ibmcmp-cfg.sh +# Do this in every .spec file because they may only install a subset. +# We never know the order rpm is going to update AT's packages. +# So we only need to update the ldconf cache when ldconfig is available +if [[ -f %{_sbindir}/ldconfig ]]; then + %{_sbindir}/ldconfig +fi + +#--------------------------------------------------- +%post perf +# Do this in every .spec file because they may only install a subset. +# We never know the order rpm is going to update AT's packages. +# So we only need to update the ldconf cache when ldconfig is available +if [[ -f %{_sbindir}/ldconfig ]]; then + %{_sbindir}/ldconfig +fi + +#--------------------------------------------------- +%post mcore-libs +# Do this in every .spec file because they may only install a subset. +# We never know the order rpm is going to update AT's packages. +# So we only need to update the ldconf cache when ldconfig is available +if [[ -f %{_sbindir}/ldconfig ]]; then + %{_sbindir}/ldconfig +fi + +#--------------------------------------------------- +%post selinux +semanage fcontext -a -t etc_t '%{_prefix}/etc(/.*)?' 2>/dev/null +semanage fcontext -a -t ld_so_cache_t '%{_prefix}/etc/ld.so.cache' 2>/dev/null +semanage fcontext -a -t locale_t '%{_prefix}/etc/localtime' 2>/dev/null +restorecon -R %{_prefix}/etc +semanage fcontext -a -t locale_t '%{_prefix}/share/locale/locale.alias' \ + 2>/dev/null +restorecon -R %{_prefix}/share/locale +semanage fcontext -a -t locale_t '%{_prefix}/share/zoneinfo/Factory' \ + 2>/dev/null +restorecon -R %{_prefix}/share/zoneinfo + +#--------------------------------------------------- +%post runtime-debuginfo +# Create symlinks to the debuginfo files in .debug subdirectories so valgrind +# and oprofile can find the symbols. +for DIR in $(find %{_prefix}/lib/debug/%{_prefix}/lib*/ -type d \ + | grep -v build-id); do + dest=${DIR#%{_prefix}/lib/debug} + mkdir -p ${dest}/.debug/ + ln -sf ${DIR}/* ${dest}/.debug/ +done + +#--------------------------------------------------- +%post devel-debuginfo +# Create symlinks to the debuginfo files in .debug subdirectories so valgrind +# and oprofile can find the symbols. +for DIR in $(find %{_prefix}/lib/debug/%{_prefix}/lib*/ -type d \ + | grep -v build-id); do + dest=${DIR#%{_prefix}/lib/debug} + mkdir -p ${dest}/.debug/ + ln -sf ${DIR}/* ${dest}/.debug/ +done + +#--------------------------------------------------- +%post mcore-libs-debuginfo +# Create symlinks to the debuginfo files in .debug subdirectories so valgrind +# and oprofile can find the symbols. +for DIR in $(find %{_prefix}/lib/debug/%{_prefix}/lib*/ -type d \ + | grep -v build-id); do + dest=${DIR#%{_prefix}/lib/debug} + mkdir -p ${dest}/.debug/ + ln -sf ${DIR}/* ${dest}/.debug/ +done + +#--------------------------------------------------- +%post perf-debuginfo +# Create symlinks to the debuginfo files in .debug subdirectories so valgrind +# and oprofile can find the symbols. +for DIR in $(find %{_prefix}/lib/debug/%{_prefix}/lib*/ -type d \ + | grep -v build-id); do + dest=${DIR#%{_prefix}/lib/debug} + mkdir -p ${dest}/.debug/ + ln -sf ${DIR}/* ${dest}/.debug/ +done + +#################################################### +%preun devel +# Update the info directory entries +if [ "$1" = 0 ]; then + for INFO in $(ls %{_infodir}/*.info.gz); do + install-info --delete ${INFO} %{_infodir}/dir > /dev/null 2>&1 || : + done +fi + + +#################################################### +%postun runtime +# Remove the directory only when uninstalling +if [[ ${1} -eq 0 ]]; then + if [[ -d %{_prefix} ]]; then + rm -rf %{_prefix} + fi +fi +# Only remove ldconfig if it's' a bash script file +if file /usr/sbin/ldconfig | grep "bash script" > /dev/null; then + at_installs=$(find /opt/ -maxdepth 1 -type d -name 'at[0-9].[0-9]*' \ + 2>/dev/null | wc -l) + if [[ "${at_installs}" -eq "0" ]]; then + rm -f /usr/sbin/ldconfig + fi +fi + +#--------------------------------------------------- +%postun devel +# Update the loader cache after uninstall +# We never know the order rpm is going to remove/update AT's packages. +# So we only need to update the ldconf cache when ldconfig is still available +if [[ -f %{_sbindir}/ldconfig ]]; then + %{_sbindir}/ldconfig +fi + +#--------------------------------------------------- +%postun perf +# Update the loader cache after uninstall +# We never know the order rpm is going to remove/update AT's packages. +# So we only need to update the ldconf cache when ldconfig is still available +if [[ -f %{_sbindir}/ldconfig ]]; then + %{_sbindir}/ldconfig +fi + +#--------------------------------------------------- +%postun mcore-libs +# Update the loader cache after uninstall +# We never know the order rpm is going to remove/update AT's packages. +# So we only need to update the ldconf cache when ldconfig is still available +if [[ -f %{_sbindir}/ldconfig ]]; then + %{_sbindir}/ldconfig +fi + +#--------------------------------------------------- +%postun selinux +if [ $1 -eq 0 ] ; then # final removal + semanage fcontext -d -t locale_t '%{_prefix}/share/zoneinfo/Factory' \ + 2>/dev/null + restorecon -R %{_prefix}/share/zoneinfo + semanage fcontext -d -t locale_t \ + '%{_prefix}/share/locale/locale.alias' 2>/dev/null + restorecon -R %{_prefix}/share/locale + semanage fcontext -d -t locale_t '%{_prefix}/etc/localtime' 2>/dev/null + semanage fcontext -d -t ld_so_cache_t '%{_prefix}/etc/ld.so.cache' \ + 2>/dev/null + semanage fcontext -d -t etc_t '%{_prefix}/etc(/.*)?' 2>/dev/null + restorecon -R %{_prefix}/etc +fi + + +#################################################### +%files runtime -f %{at_work}/runtime.list +%defattr(-,root,root) +# Config script for XLC/XLF. +%{_scriptdir}/at-create-ibmcmp-cfg.sh +# Get the requirements for a RPM package. +%{_scriptdir}/find_dependencies.sh +# Dynamic TLE helper script. +%{_scriptdir}/tle_on.sh + +# License text for the scripts distributed in the package. +%license %{_scriptdir}/LICENSE + +#--------------------------------------------------- +%files devel -f %{at_work}/devel.list +%defattr(-,root,root) + +#--------------------------------------------------- +%files perf -f %{at_work}/profile.list +%defattr(-,root,root) + +#--------------------------------------------------- +%files mcore-libs -f %{at_work}/mcore-libs.list +%defattr(-,root,root) + +#--------------------------------------------------- +%files selinux + +#--------------------------------------------------- +%files runtime-debuginfo -f debugfiles-runtime.list +%defattr(-,root,root) + +#--------------------------------------------------- +%files mcore-libs-debuginfo -f debugfiles-mcore-libs.list +%defattr(-,root,root) + +#--------------------------------------------------- +%files devel-debuginfo -f debugfiles-devel.list +%defattr(-,root,root) + +#--------------------------------------------------- +%files perf-debuginfo -f debugfiles-profile.list +%defattr(-,root,root) + diff --git a/configs/9.0/specs/monolithic_at-compat.spec b/configs/9.0/specs/monolithic_at-compat.spec new file mode 120000 index 000000000..037eec878 --- /dev/null +++ b/configs/9.0/specs/monolithic_at-compat.spec @@ -0,0 +1 @@ +../../8.0/specs/monolithic_at-compat.spec \ No newline at end of file diff --git a/configs/9.0/specs/monolithic_compat.spec b/configs/9.0/specs/monolithic_compat.spec new file mode 120000 index 000000000..08cb6497d --- /dev/null +++ b/configs/9.0/specs/monolithic_compat.spec @@ -0,0 +1 @@ +../../8.0/specs/monolithic_compat.spec \ No newline at end of file diff --git a/configs/9.0/specs/monolithic_cross.spec b/configs/9.0/specs/monolithic_cross.spec new file mode 100644 index 000000000..e452afc10 --- /dev/null +++ b/configs/9.0/specs/monolithic_cross.spec @@ -0,0 +1,213 @@ +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Add support for relocation. +Prefix: %{_prefix} +Requires: advance-toolchain-%{at_major}__CROSS__-common = %{at_major_version}-%{at_revision_number} + +%description +The Advance Toolchain is a self contained toolchain which provides preview +toolchain functionality in GCC, Binutils, GLIBC, and GDB. + +#################################################### +%package -n advance-toolchain-%{at_major}__CROSS__-common +Summary: Advance Toolchain - cross compiler common files +Group: Development +AutoReqProv: no +# Required to install info manuals. +Requires(post): info +Requires(preun): info +# Add support for relocation. +Prefix: %{_prefix} + +%description -n advance-toolchain-%{at_major}__CROSS__-common +The Advance Toolchain is a self contained toolchain which provides preview +toolchain functionality in GCC, Binutils, GLIBC, and GDB. + +This package provides common files for the Advance Toolchain. + +#################################################### +%package runtime-extras +Summary: Advance Toolchain - extra runtime files +Group: Development/Libraries +AutoReqProv: no +Requires: %{name} = %{at_major_version}-%{at_revision_number} +# Add support for relocation. +Prefix: %{_prefix} + +%description runtime-extras +The Advance Toolchain is a self contained toolchain which provides preview +toolchain functionality in GCC, Binutils, GLIBC, and GDB. + +This package contains the runtime libraries to run programs built with the +advance toolchain that are not present in the main cross compiler package. + +#################################################### +%package mcore-libs +Summary: Advance Toolchain +Group: Development/Libraries +Requires: %{name} = %{at_major_version}-%{at_revision_number}, __MCORE-LIBS_REQ__ +AutoReqProv: no +Provides: advance-toolchain-mcore-libs = %{at_major_version}-%{at_revision_number} + +%description mcore-libs +The advance toolchain is a self contained toolchain which provides preview +toolchain functionality in GCC, binutils, GLIBC, GDB, Valgrind, and OProfile. +This package provides the necessary libraries to build multi-threaded applications +using the specialized multi-threaded libraries Boost, SPHDE, URCU and Threading +Building Blocks. + + +#################################################### + +# On newer rpm versions, it's common to strip debug info and to compile python +# files. We only want to compress man pages. +%define __os_install_post /usr/lib/rpm/brp-compress + +# Relative paths of directories. +%define datadir_r share +%define infodir_r share/info +# Some distributions set this to 'lib64' by default. +%define libdir_r lib +%define libexecdir_r libexec +%define mandir_r share/man +%define tgtinfodir_r __DEST_CROSS_REL__/usr/share/info +%define tgtmandir_r __DEST_CROSS_REL__/usr/share/man + +# These have been known to be different on different distributions. +%define _datadir %{_prefix}/%{datadir_r} +%define _infodir %{_prefix}/%{infodir_r} +%define _libdir %{_prefix}/%{libdir_r} +%define _libexecdir %{_prefix}/%{libexecdir_r} +%define _mandir %{_prefix}/%{mandir_r} +%define _tgtinfodir %{_prefix}/%{tgtinfodir_r} +%define _tgtmandir %{_prefix}/%{tgtmandir_r} + +%prep +%build +%install +mkdir -p ${RPM_BUILD_ROOT}$(dirname %{_prefix}) +cp -af %{_prefix} ${RPM_BUILD_ROOT}$(dirname %{_prefix}) +# Remove info/dir from installation dir +rm -f ${RPM_BUILD_ROOT}%{_infodir}/dir \ + ${RPM_BUILD_ROOT}%{_tgtinfodir}/dir +# Compress all of the info files. +gzip -9nvf ${RPM_BUILD_ROOT}%{_infodir}/*.info* +gzip -9nvf ${RPM_BUILD_ROOT}%{_tgtinfodir}/*.info* + +################################################ +%post +# Update the info directory entries +for INFO in $(ls ${RPM_INSTALL_PREFIX}/%{tgtinfodir_r}/*.info.gz); do + install-info ${INFO} ${RPM_INSTALL_PREFIX}/%{tgtinfodir_r}/dir +done +################################################ + +#################### common #################### +%post -n advance-toolchain-%{at_major}__CROSS__-common +# Update the info directory entries +for INFO in $(ls ${RPM_INSTALL_PREFIX}/%{infodir_r}/*.info.gz); do + install-info ${INFO} ${RPM_INSTALL_PREFIX}/%{infodir_r}/dir +done +################################################ + +#################### runtime-extras ############ +%post runtime-extras +# Update the info directory entries +for INFO in $(ls ${RPM_INSTALL_PREFIX}/%{infodir_r}/*.info.gz); do + install-info ${INFO} ${RPM_INSTALL_PREFIX}/%{infodir_r}/dir +done +################################################ + +#################### mcore-libs ################ +%post mcore-libs +# Do this in every .spec file because they may only install a subset. +# We never know the order rpm is going to update AT's packages. +# So we only need to update the ldconf cache when ldconfig is available +if [[ -f %{_sbindir}/ldconfig ]]; then + %{_sbindir}/ldconfig +fi +################################################ + +%preun +# Update the info directory entries +if [ "$1" = 0 ]; then + for INFO in $(ls ${RPM_INSTALL_PREFIX}/%{tgtinfodir_r}/*.info.gz); do + install-info --delete ${INFO} \ + ${RPM_INSTALL_PREFIX}/%{tgtinfodir_r}/dir + done +fi +################################################ + +#################### common #################### +%preun -n advance-toolchain-%{at_major}__CROSS__-common +# Update the info directory entries +if [ "$1" = 0 ]; then + for INFO in $(ls ${RPM_INSTALL_PREFIX}/%{infodir_r}/*.info.gz); do + install-info --delete ${INFO} \ + ${RPM_INSTALL_PREFIX}/%{infodir_r}/dir + done +fi +################################################ + +#################### runtime-extras ############ +%preun runtime-extras +# Update the info directory entries +if [ "$1" = 0 ]; then + for INFO in $(ls ${RPM_INSTALL_PREFIX}/%{tgtinfodir_r}/*.info.gz); do + install-info --delete ${INFO} \ + ${RPM_INSTALL_PREFIX}/%{tgtinfodir_r}/dir + done +fi +################################################ +%postun +if [[ ${1} -eq 0 ]]; then + find ${RPM_INSTALL_PREFIX} -type d -empty -delete +fi +################################################ + +#################### common #################### +%postun -n advance-toolchain-%{at_major}__CROSS__-common +if [[ ${1} -eq 0 ]]; then + find ${RPM_INSTALL_PREFIX} -type d -empty -delete +fi +################################################ + +#################### runtime-extras ############ +%postun runtime-extras +if [[ ${1} -eq 0 ]]; then + find ${RPM_INSTALL_PREFIX} -type d -empty -delete +fi +################################################ + +#################### mcore-libs ################ +%postun mcore-libs +# Update the loader cache after uninstall +# We never know the order rpm is going to remove/update AT's packages. +# So we only need to update the ldconf cache when ldconfig is still available +if [[ -f %{_sbindir}/ldconfig ]]; then + %{_sbindir}/ldconfig +fi +################################################ + +%files -f %{at_work}/cross.list +%defattr(-,root,root) + +%files -n advance-toolchain-%{at_major}__CROSS__-common -f %{at_work}/cross-common.list + +%files runtime-extras -f %{at_work}/cross-runtime-extras.list +%defattr(-,root,root) + +%files mcore-libs -f %{at_work}/mcore-libs.list +%defattr(-,root,root) diff --git a/configs/9.0/specs/monolithic_golang.spec b/configs/9.0/specs/monolithic_golang.spec new file mode 100644 index 000000000..1de06e800 --- /dev/null +++ b/configs/9.0/specs/monolithic_golang.spec @@ -0,0 +1,56 @@ +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +Name: advance-toolchain +Version: %{at_major_version} +Release: %{at_revision_number} +License: GPL, LGPL +Group: Development/Libraries +Summary: Advance Toolchain + +%description +The advance toolchain is a self contained toolchain which provides preview +toolchain functionality in GCC, binutils and GLIBC, as well as the debug and +profile tools GDB, Valgrind and OProfile. +It also provides a group of optimized threading libraries as well. + +#################################################### +%package golang-at +Summary: Golang for ppc64le +AutoReqProv: no +Provides: advance-toolchain-golang = %{at_major_version}-%{at_revision_number} + + +%description golang-at +The advance toolchain is a self contained toolchain which provides preview +toolchain functionality in GCC, binutils, GLIBC, GDB, Valgrind, and OProfile. +The 'golang' package contains the Golang binaries for ppc64le. + +#################################################### +# On newer rpm versions, it's common to strip debug info and to compile python +# files. We only want to compress man pages. +%define __os_install_post /usr/lib/rpm/brp-compress + +%prep + +%build + +%install +# Prepare a build sandbox area for golang +mkdir -p ${RPM_BUILD_ROOT}$(dirname %{_golang}) +cp -af %{_tmpdir}/golang_1/%{_golang} ${RPM_BUILD_ROOT}$(dirname %{_golang}) + +#################################################### +%files golang-at -f %{at_work}/golang.list +%defattr(-,root,root) diff --git a/configs/next/arch/default.mk b/configs/next/arch/default.mk new file mode 120000 index 000000000..413a458be --- /dev/null +++ b/configs/next/arch/default.mk @@ -0,0 +1 @@ +../../10.0/arch/default.mk \ No newline at end of file diff --git a/configs/next/arch/i686.ppc64.mk b/configs/next/arch/i686.ppc64.mk new file mode 120000 index 000000000..3aadf8f67 --- /dev/null +++ b/configs/next/arch/i686.ppc64.mk @@ -0,0 +1 @@ +../../10.0/arch/i686.ppc64.mk \ No newline at end of file diff --git a/configs/next/arch/i686.ppc64le.mk b/configs/next/arch/i686.ppc64le.mk new file mode 120000 index 000000000..483e892bc --- /dev/null +++ b/configs/next/arch/i686.ppc64le.mk @@ -0,0 +1 @@ +../../10.0/arch/i686.ppc64le.mk \ No newline at end of file diff --git a/configs/next/arch/ppc64.ppc64.mk b/configs/next/arch/ppc64.ppc64.mk new file mode 120000 index 000000000..b1743b6d6 --- /dev/null +++ b/configs/next/arch/ppc64.ppc64.mk @@ -0,0 +1 @@ +../../10.0/arch/ppc64.ppc64.mk \ No newline at end of file diff --git a/configs/next/arch/ppc64le.ppc64le.mk b/configs/next/arch/ppc64le.ppc64le.mk new file mode 120000 index 000000000..672be1c05 --- /dev/null +++ b/configs/next/arch/ppc64le.ppc64le.mk @@ -0,0 +1 @@ +../../10.0/arch/ppc64le.ppc64le.mk \ No newline at end of file diff --git a/configs/next/arch/x86_64.ppc64.mk b/configs/next/arch/x86_64.ppc64.mk new file mode 120000 index 000000000..b4b122a93 --- /dev/null +++ b/configs/next/arch/x86_64.ppc64.mk @@ -0,0 +1 @@ +../../10.0/arch/x86_64.ppc64.mk \ No newline at end of file diff --git a/configs/next/arch/x86_64.ppc64le.mk b/configs/next/arch/x86_64.ppc64le.mk new file mode 120000 index 000000000..71da1f844 --- /dev/null +++ b/configs/next/arch/x86_64.ppc64le.mk @@ -0,0 +1 @@ +../../10.0/arch/x86_64.ppc64le.mk \ No newline at end of file diff --git a/configs/next/base.mk b/configs/next/base.mk new file mode 100644 index 000000000..6e4182135 --- /dev/null +++ b/configs/next/base.mk @@ -0,0 +1,54 @@ +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Basic build version definitions +# =============================== +# This Makefile include contains the config options included at the beginning +# of the build process that govern the subsequent generated package name, +# version and other dependent internal build variables. +# It also states which distros the build is compatible with, so that it can be +# validated at build time, as well as heuristicaly find the proper repo path +# to put the final rpms generated by the build system. + +# Versioning description +# ====================== +# +# - AT_NAME: Final build Advance Toolchain package name. +# +# - AT_MAJOR_VERSION: Changes whenever the compiler or the ABI changes. +# Should be in X.Y format, where X=compiler change, +# Y=ABI change within that compiler change cycle. All +# first major releases should be X.0. Then, if the ABI +# changes, increment the second digit (i.e. X.1). +# +# - AT_REVISION_NUMBER: The revision number. Starts at 0 and is incremented +# whenever a new official build that doesn't change the +# compiler version or the ABI is required. +# +# - AT_INTERNAL: Tag for internal releases (i.e. alpha, beta, rc). For +# GM or external releases, it should be "none". +# +# - AT_DIR_NAME: Optional name of the directory. If not defined, will +# use a combination of AT_NAME, AT_MAJOR_VERSION, +# AT_INTERNAL and AT_REVISION_NUMBER. +# +# - AT_PREVIOUS_VERSION Previous compatible AT version supported (It may be +# further restricted by distro specific settings) +# +AT_NAME := at +AT_MAJOR_VERSION := 11.0 +AT_REVISION_NUMBER := 0 +AT_INTERNAL := alpha +AT_PREVIOUS_VERSION := 10.0 +AT_DIR_NAME := at-next-$(AT_MAJOR_VERSION)-$(AT_REVISION_NUMBER)-$(AT_INTERNAL) diff --git a/configs/next/build.mk b/configs/next/build.mk new file mode 120000 index 000000000..782a69c87 --- /dev/null +++ b/configs/next/build.mk @@ -0,0 +1 @@ +../10.0/build.mk \ No newline at end of file diff --git a/configs/next/deb/monolithic/changelog b/configs/next/deb/monolithic/changelog new file mode 120000 index 000000000..c8d4dc8da --- /dev/null +++ b/configs/next/deb/monolithic/changelog @@ -0,0 +1 @@ +../../../10.0/deb/monolithic/changelog \ No newline at end of file diff --git a/configs/next/deb/monolithic/compat b/configs/next/deb/monolithic/compat new file mode 120000 index 000000000..dc6bb243b --- /dev/null +++ b/configs/next/deb/monolithic/compat @@ -0,0 +1 @@ +../../../10.0/deb/monolithic/compat \ No newline at end of file diff --git a/configs/next/deb/monolithic/control b/configs/next/deb/monolithic/control new file mode 120000 index 000000000..c5f9d6264 --- /dev/null +++ b/configs/next/deb/monolithic/control @@ -0,0 +1 @@ +../../../10.0/deb/monolithic/control \ No newline at end of file diff --git a/configs/next/deb/monolithic/copyright b/configs/next/deb/monolithic/copyright new file mode 120000 index 000000000..326262cc8 --- /dev/null +++ b/configs/next/deb/monolithic/copyright @@ -0,0 +1 @@ +../../../10.0/deb/monolithic/copyright \ No newline at end of file diff --git a/configs/next/deb/monolithic/devel-dbg.postinst b/configs/next/deb/monolithic/devel-dbg.postinst new file mode 120000 index 000000000..72135fd68 --- /dev/null +++ b/configs/next/deb/monolithic/devel-dbg.postinst @@ -0,0 +1 @@ +../../../10.0/deb/monolithic/devel-dbg.postinst \ No newline at end of file diff --git a/configs/next/deb/monolithic/devel.postinst b/configs/next/deb/monolithic/devel.postinst new file mode 120000 index 000000000..50b181440 --- /dev/null +++ b/configs/next/deb/monolithic/devel.postinst @@ -0,0 +1 @@ +../../../10.0/deb/monolithic/devel.postinst \ No newline at end of file diff --git a/configs/next/deb/monolithic/devel.postrm b/configs/next/deb/monolithic/devel.postrm new file mode 120000 index 000000000..b433fb19c --- /dev/null +++ b/configs/next/deb/monolithic/devel.postrm @@ -0,0 +1 @@ +../../../10.0/deb/monolithic/devel.postrm \ No newline at end of file diff --git a/configs/next/deb/monolithic/devel.prerm b/configs/next/deb/monolithic/devel.prerm new file mode 120000 index 000000000..a9ea9a5c0 --- /dev/null +++ b/configs/next/deb/monolithic/devel.prerm @@ -0,0 +1 @@ +../../../10.0/deb/monolithic/devel.prerm \ No newline at end of file diff --git a/configs/next/deb/monolithic/mcore-libs-dbg.postinst b/configs/next/deb/monolithic/mcore-libs-dbg.postinst new file mode 120000 index 000000000..7c01d70c6 --- /dev/null +++ b/configs/next/deb/monolithic/mcore-libs-dbg.postinst @@ -0,0 +1 @@ +../../../10.0/deb/monolithic/mcore-libs-dbg.postinst \ No newline at end of file diff --git a/configs/next/deb/monolithic/mcore-libs.postinst b/configs/next/deb/monolithic/mcore-libs.postinst new file mode 120000 index 000000000..03e3519e3 --- /dev/null +++ b/configs/next/deb/monolithic/mcore-libs.postinst @@ -0,0 +1 @@ +../../../10.0/deb/monolithic/mcore-libs.postinst \ No newline at end of file diff --git a/configs/next/deb/monolithic/mcore-libs.postrm b/configs/next/deb/monolithic/mcore-libs.postrm new file mode 120000 index 000000000..1ff94c911 --- /dev/null +++ b/configs/next/deb/monolithic/mcore-libs.postrm @@ -0,0 +1 @@ +../../../10.0/deb/monolithic/mcore-libs.postrm \ No newline at end of file diff --git a/configs/next/deb/monolithic/perf-dbg.postinst b/configs/next/deb/monolithic/perf-dbg.postinst new file mode 120000 index 000000000..4122af0c7 --- /dev/null +++ b/configs/next/deb/monolithic/perf-dbg.postinst @@ -0,0 +1 @@ +../../../10.0/deb/monolithic/perf-dbg.postinst \ No newline at end of file diff --git a/configs/next/deb/monolithic/perf.postinst b/configs/next/deb/monolithic/perf.postinst new file mode 120000 index 000000000..cc8f9b10d --- /dev/null +++ b/configs/next/deb/monolithic/perf.postinst @@ -0,0 +1 @@ +../../../10.0/deb/monolithic/perf.postinst \ No newline at end of file diff --git a/configs/next/deb/monolithic/perf.postrm b/configs/next/deb/monolithic/perf.postrm new file mode 120000 index 000000000..4441f4391 --- /dev/null +++ b/configs/next/deb/monolithic/perf.postrm @@ -0,0 +1 @@ +../../../10.0/deb/monolithic/perf.postrm \ No newline at end of file diff --git a/configs/next/deb/monolithic/rules b/configs/next/deb/monolithic/rules new file mode 120000 index 000000000..bebdd83ba --- /dev/null +++ b/configs/next/deb/monolithic/rules @@ -0,0 +1 @@ +../../../10.0/deb/monolithic/rules \ No newline at end of file diff --git a/configs/next/deb/monolithic/runtime-dbg.postinst b/configs/next/deb/monolithic/runtime-dbg.postinst new file mode 120000 index 000000000..f3cb66f55 --- /dev/null +++ b/configs/next/deb/monolithic/runtime-dbg.postinst @@ -0,0 +1 @@ +../../../10.0/deb/monolithic/runtime-dbg.postinst \ No newline at end of file diff --git a/configs/next/deb/monolithic/runtime.postinst b/configs/next/deb/monolithic/runtime.postinst new file mode 120000 index 000000000..fbfe7826c --- /dev/null +++ b/configs/next/deb/monolithic/runtime.postinst @@ -0,0 +1 @@ +../../../10.0/deb/monolithic/runtime.postinst \ No newline at end of file diff --git a/configs/next/deb/monolithic/runtime.postrm b/configs/next/deb/monolithic/runtime.postrm new file mode 120000 index 000000000..a9f06e997 --- /dev/null +++ b/configs/next/deb/monolithic/runtime.postrm @@ -0,0 +1 @@ +../../../10.0/deb/monolithic/runtime.postrm \ No newline at end of file diff --git a/configs/next/deb/monolithic/trusty_dh_change_dest.patch b/configs/next/deb/monolithic/trusty_dh_change_dest.patch new file mode 120000 index 000000000..6055acd36 --- /dev/null +++ b/configs/next/deb/monolithic/trusty_dh_change_dest.patch @@ -0,0 +1 @@ +../../../10.0/deb/monolithic/trusty_dh_change_dest.patch \ No newline at end of file diff --git a/configs/next/deb/monolithic/xenial_dh_change_dest.patch b/configs/next/deb/monolithic/xenial_dh_change_dest.patch new file mode 120000 index 000000000..45fc30a09 --- /dev/null +++ b/configs/next/deb/monolithic/xenial_dh_change_dest.patch @@ -0,0 +1 @@ +../../../10.0/deb/monolithic/xenial_dh_change_dest.patch \ No newline at end of file diff --git a/configs/next/deb/monolithic_cross b/configs/next/deb/monolithic_cross new file mode 120000 index 000000000..f06d4b6b3 --- /dev/null +++ b/configs/next/deb/monolithic_cross @@ -0,0 +1 @@ +../../10.0/deb/monolithic_cross \ No newline at end of file diff --git a/configs/next/distros/centos-6.mk b/configs/next/distros/centos-6.mk new file mode 120000 index 000000000..802ee0d16 --- /dev/null +++ b/configs/next/distros/centos-6.mk @@ -0,0 +1 @@ +../../10.0/distros/centos-6.mk \ No newline at end of file diff --git a/configs/next/distros/centos-7.mk b/configs/next/distros/centos-7.mk new file mode 120000 index 000000000..79c06db54 --- /dev/null +++ b/configs/next/distros/centos-7.mk @@ -0,0 +1 @@ +../../10.0/distros/centos-7.mk \ No newline at end of file diff --git a/configs/next/distros/opensuse-12.mk b/configs/next/distros/opensuse-12.mk new file mode 120000 index 000000000..3c37d8702 --- /dev/null +++ b/configs/next/distros/opensuse-12.mk @@ -0,0 +1 @@ +suse-12.mk \ No newline at end of file diff --git a/configs/next/distros/redhat-7.mk b/configs/next/distros/redhat-7.mk new file mode 120000 index 000000000..a34c1ed3c --- /dev/null +++ b/configs/next/distros/redhat-7.mk @@ -0,0 +1 @@ +../../10.0/distros/redhat-7.mk \ No newline at end of file diff --git a/configs/next/distros/suse-12.mk b/configs/next/distros/suse-12.mk new file mode 120000 index 000000000..3408b0036 --- /dev/null +++ b/configs/next/distros/suse-12.mk @@ -0,0 +1 @@ +../../10.0/distros/suse-12.mk \ No newline at end of file diff --git a/configs/next/distros/ubuntu-14.mk b/configs/next/distros/ubuntu-14.mk new file mode 120000 index 000000000..00ea1b1cb --- /dev/null +++ b/configs/next/distros/ubuntu-14.mk @@ -0,0 +1 @@ +../../10.0/distros/ubuntu-14.mk \ No newline at end of file diff --git a/configs/next/distros/ubuntu-16.mk b/configs/next/distros/ubuntu-16.mk new file mode 120000 index 000000000..d944990c1 --- /dev/null +++ b/configs/next/distros/ubuntu-16.mk @@ -0,0 +1 @@ +../../10.0/distros/ubuntu-16.mk \ No newline at end of file diff --git a/configs/next/packages/binutils/binutils.mk b/configs/next/packages/binutils/binutils.mk new file mode 120000 index 000000000..c3353c350 --- /dev/null +++ b/configs/next/packages/binutils/binutils.mk @@ -0,0 +1 @@ +../../../10.0/packages/binutils/binutils.mk \ No newline at end of file diff --git a/configs/next/packages/binutils/sources b/configs/next/packages/binutils/sources new file mode 100644 index 000000000..df799d77f --- /dev/null +++ b/configs/next/packages/binutils/sources @@ -0,0 +1,44 @@ +#!/usr/bin/env bash +# +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# binutils source package and build info +# ====================================== +# + +ATSRC_PACKAGE_NAME="GNU Binutils" +ATSRC_PACKAGE_VER=2.28 +ATSRC_PACKAGE_REV=f73842f +ATSRC_PACKAGE_LICENSE="GPL 2.0" +ATSRC_PACKAGE_DOCLINK="http://sourceware.org/binutils/docs/" +ATSRC_PACKAGE_RELFIXES= +ATSRC_PACKAGE_STR_VER="${ATSRC_PACKAGE_NAME} ${ATSRC_PACKAGE_VER}-${ATSRC_PACKAGE_REV}" +ATSRC_PACKAGE_PRE="test -d binutils-${ATSRC_PACKAGE_VER}-${ATSRC_PACKAGE_REV}" +# git.linux.ibm.com is a mirror of sourceware.org. +ATSRC_PACKAGE_CO=([0]="git clone git://git.linux.ibm.com/binutils-gdb/binutils-gdb.git binutils" \ + [1]="git clone git://sourceware.org/git/binutils-gdb.git binutils") +ATSRC_PACKAGE_GIT="git checkout -b binutils-${ATSRC_PACKAGE_VER}${ATSRC_PACKAGE_REV:+-${ATSRC_PACKAGE_REV}} ${ATSRC_PACKAGE_REV}" +ATSRC_PACKAGE_POST="mv binutils binutils-${ATSRC_PACKAGE_VER}${ATSRC_PACKAGE_REV:+-${ATSRC_PACKAGE_REV}}" +ATSRC_PACKAGE_SRC=${AT_BASE}/sources/binutils-${ATSRC_PACKAGE_VER}-${ATSRC_PACKAGE_REV} +ATSRC_PACKAGE_WORK=${AT_WORK_PATH}/binutils +# Disabled until check-ld is resolved +ATSRC_PACKAGE_MAKE_CHECK=none +ATSRC_PACKAGE_MLS= +ATSRC_PACKAGE_ALOC= +ATSRC_PACKAGE_PATCHES= +ATSRC_PACKAGE_TARS= +ATSRC_PACKAGE_DISTRIB=yes +ATSRC_PACKAGE_BUNDLE=main_toolchain diff --git a/configs/next/packages/binutils/specfile b/configs/next/packages/binutils/specfile new file mode 120000 index 000000000..f4f82b070 --- /dev/null +++ b/configs/next/packages/binutils/specfile @@ -0,0 +1 @@ +../../../10.0/packages/binutils/specfile \ No newline at end of file diff --git a/configs/next/packages/binutils/stage_1 b/configs/next/packages/binutils/stage_1 new file mode 120000 index 000000000..682097d64 --- /dev/null +++ b/configs/next/packages/binutils/stage_1 @@ -0,0 +1 @@ +../../../10.0/packages/binutils/stage_1 \ No newline at end of file diff --git a/configs/next/packages/binutils/stage_2 b/configs/next/packages/binutils/stage_2 new file mode 120000 index 000000000..02cbf0960 --- /dev/null +++ b/configs/next/packages/binutils/stage_2 @@ -0,0 +1 @@ +../../../10.0/packages/binutils/stage_2 \ No newline at end of file diff --git a/configs/next/packages/binutils/stage_3 b/configs/next/packages/binutils/stage_3 new file mode 120000 index 000000000..93b5af82b --- /dev/null +++ b/configs/next/packages/binutils/stage_3 @@ -0,0 +1 @@ +../../../10.0/packages/binutils/stage_3 \ No newline at end of file diff --git a/configs/next/packages/boost/boost.mk b/configs/next/packages/boost/boost.mk new file mode 120000 index 000000000..c90490b1b --- /dev/null +++ b/configs/next/packages/boost/boost.mk @@ -0,0 +1 @@ +../../../10.0/packages/boost/boost.mk \ No newline at end of file diff --git a/configs/next/packages/boost/sources b/configs/next/packages/boost/sources new file mode 120000 index 000000000..8f2e351b8 --- /dev/null +++ b/configs/next/packages/boost/sources @@ -0,0 +1 @@ +../../../10.0/packages/boost/sources \ No newline at end of file diff --git a/configs/next/packages/boost/specfile b/configs/next/packages/boost/specfile new file mode 120000 index 000000000..268a9990b --- /dev/null +++ b/configs/next/packages/boost/specfile @@ -0,0 +1 @@ +../../../10.0/packages/boost/specfile \ No newline at end of file diff --git a/configs/next/packages/boost/stage_1 b/configs/next/packages/boost/stage_1 new file mode 120000 index 000000000..a051ed43e --- /dev/null +++ b/configs/next/packages/boost/stage_1 @@ -0,0 +1 @@ +../../../10.0/packages/boost/stage_1 \ No newline at end of file diff --git a/configs/next/packages/expat/expat.mk b/configs/next/packages/expat/expat.mk new file mode 120000 index 000000000..b2d44ff40 --- /dev/null +++ b/configs/next/packages/expat/expat.mk @@ -0,0 +1 @@ +../../../10.0/packages/expat/expat.mk \ No newline at end of file diff --git a/configs/next/packages/expat/sources b/configs/next/packages/expat/sources new file mode 120000 index 000000000..ae52c6c3d --- /dev/null +++ b/configs/next/packages/expat/sources @@ -0,0 +1 @@ +../../../10.0/packages/expat/sources \ No newline at end of file diff --git a/configs/next/packages/expat/specfile b/configs/next/packages/expat/specfile new file mode 120000 index 000000000..67f23d7e5 --- /dev/null +++ b/configs/next/packages/expat/specfile @@ -0,0 +1 @@ +../../../10.0/packages/expat/specfile \ No newline at end of file diff --git a/configs/next/packages/expat/stage_1 b/configs/next/packages/expat/stage_1 new file mode 120000 index 000000000..5374fe9ba --- /dev/null +++ b/configs/next/packages/expat/stage_1 @@ -0,0 +1 @@ +../../../10.0/packages/expat/stage_1 \ No newline at end of file diff --git a/configs/next/packages/gcc/gcc.mk b/configs/next/packages/gcc/gcc.mk new file mode 120000 index 000000000..82f9f6a00 --- /dev/null +++ b/configs/next/packages/gcc/gcc.mk @@ -0,0 +1 @@ +../../../10.0/packages/gcc/gcc.mk \ No newline at end of file diff --git a/configs/next/packages/gcc/sources b/configs/next/packages/gcc/sources new file mode 100644 index 000000000..158f0e763 --- /dev/null +++ b/configs/next/packages/gcc/sources @@ -0,0 +1,57 @@ +#!/usr/bin/env bash +# +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# GCC source package and build info +# ================================= +# + +ATSRC_PACKAGE_NAME="GCC (GNU Compiler Collection)" +ATSRC_PACKAGE_SUBPACKAGE_NAME_0="GNU Standard C++ Library v3 (Libstdc++-v3)" +ATSRC_PACKAGE_SUBPACKAGE_NAME_1="GNU Libgomp" +ATSRC_PACKAGE_VER=7.0.0 +ATSRC_PACKAGE_REV=b3446c2f +ATSRC_PACKAGE_LICENSE="GPL 3.0" +ATSRC_PACKAGE_DOCLINK="https://gcc.gnu.org/onlinedocs/gcc-6.2.0/gcc/" +ATSRC_PACKAGE_SUBPACKAGE_DOCLINK_0="https://gcc.gnu.org/libstdc++/" +ATSRC_PACKAGE_SUBPACKAGE_DOCLINK_1="https://gcc.gnu.org/onlinedocs/libgomp/" +ATSRC_PACKAGE_RELFIXES= +ATSRC_PACKAGE_NAMESUFFIX="[C, C++ (g++), fortran, Go]" +ATSRC_PACKAGE_STR_VER="${ATSRC_PACKAGE_NAME} ${ATSRC_PACKAGE_VER}-ibm-r${ATSRC_PACKAGE_REV}" +ATSRC_PACKAGE_PRE="test -d gcc-${ATSRC_PACKAGE_VER}-${ATSRC_PACKAGE_REV}" +ATSRC_PACKAGE_CO=([0]="git clone git://git.linux.ibm.com/gcc/gcc.git" \ + [1]="git clone git://gcc.gnu.org/git/gcc.git") +ATSRC_PACKAGE_GIT="git checkout -b gcc-${ATSRC_PACKAGE_VER}-${ATSRC_PACKAGE_REV} ${ATSRC_PACKAGE_REV}" +ATSRC_PACKAGE_POST="mv gcc gcc-${ATSRC_PACKAGE_VER}-${ATSRC_PACKAGE_REV}" +ATSRC_PACKAGE_SRC=${AT_BASE}/sources/gcc-${ATSRC_PACKAGE_VER}-${ATSRC_PACKAGE_REV} +ATSRC_PACKAGE_WORK=${AT_WORK_PATH}/gcc +ATSRC_PACKAGE_MLS= +ATSRC_PACKAGE_ALOC= +ATSRC_PACKAGE_PATCHES= +ATSRC_PACKAGE_TARS= +ATSRC_PACKAGE_MAKE_CHECK= +ATSRC_PACKAGE_DISTRIB=yes +ATSRC_PACKAGE_BUNDLE=main_toolchain + +atsrc_get_patches () +{ + # Patch to add link-time optimization to some GCC libraries. + at_get_patch \ + https://raw.githubusercontent.com/powertechpreview/powertechpreview/26747dc0bfb0f8f30de9ebad78847a96d3191ba5/GCC%20PowerPC%20Backport/6/gcc-6-lto.patch \ + b10bdbf545205f142715dc25e087b1e7 || return ${?} + + return 0 +} diff --git a/configs/next/packages/gcc/specfile b/configs/next/packages/gcc/specfile new file mode 120000 index 000000000..6b446d907 --- /dev/null +++ b/configs/next/packages/gcc/specfile @@ -0,0 +1 @@ +../../../10.0/packages/gcc/specfile \ No newline at end of file diff --git a/configs/next/packages/gcc/stage_1 b/configs/next/packages/gcc/stage_1 new file mode 120000 index 000000000..db1a5662a --- /dev/null +++ b/configs/next/packages/gcc/stage_1 @@ -0,0 +1 @@ +../../../10.0/packages/gcc/stage_1 \ No newline at end of file diff --git a/configs/next/packages/gcc/stage_2 b/configs/next/packages/gcc/stage_2 new file mode 120000 index 000000000..93d8fa18d --- /dev/null +++ b/configs/next/packages/gcc/stage_2 @@ -0,0 +1 @@ +../../../10.0/packages/gcc/stage_2 \ No newline at end of file diff --git a/configs/next/packages/gcc/stage_3 b/configs/next/packages/gcc/stage_3 new file mode 120000 index 000000000..04d952b55 --- /dev/null +++ b/configs/next/packages/gcc/stage_3 @@ -0,0 +1 @@ +../../../10.0/packages/gcc/stage_3 \ No newline at end of file diff --git a/configs/next/packages/gcc/stage_4 b/configs/next/packages/gcc/stage_4 new file mode 120000 index 000000000..945146b07 --- /dev/null +++ b/configs/next/packages/gcc/stage_4 @@ -0,0 +1 @@ +../../../10.0/packages/gcc/stage_4 \ No newline at end of file diff --git a/configs/next/packages/gcc/stage_optimized b/configs/next/packages/gcc/stage_optimized new file mode 120000 index 000000000..a03d39513 --- /dev/null +++ b/configs/next/packages/gcc/stage_optimized @@ -0,0 +1 @@ +../../../10.0/packages/gcc/stage_optimized \ No newline at end of file diff --git a/configs/next/packages/gdb/gdb.mk b/configs/next/packages/gdb/gdb.mk new file mode 120000 index 000000000..4a3b2783f --- /dev/null +++ b/configs/next/packages/gdb/gdb.mk @@ -0,0 +1 @@ +../../../10.0/packages/gdb/gdb.mk \ No newline at end of file diff --git a/configs/next/packages/gdb/sources b/configs/next/packages/gdb/sources new file mode 100644 index 000000000..a809a7827 --- /dev/null +++ b/configs/next/packages/gdb/sources @@ -0,0 +1,42 @@ +#!/usr/bin/env bash +# +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# GDB source package and build info +# ================================= +# +ATSRC_PACKAGE_NAME="GDB (GNU Debugger)" +ATSRC_PACKAGE_VER=7.11.1 +ATSRC_PACKAGE_REV=d03dfbf +ATSRC_PACKAGE_LICENSE="GPL 2.0" +ATSRC_PACKAGE_DOCLINK="http://sourceware.org/gdb/current/onlinedocs/gdb/" +ATSRC_PACKAGE_RELFIXES= +ATSRC_PACKAGE_STR_VER="${ATSRC_PACKAGE_NAME} ${ATSRC_PACKAGE_VER}${ATSRC_PACKAGE_REV:+-${ATSRC_PACKAGE_REV}}" +ATSRC_PACKAGE_PRE="test -d gdb-${ATSRC_PACKAGE_VER}${ATSRC_PACKAGE_REV:+-${ATSRC_PACKAGE_REV}}" +# git.linux.ibm.com is a mirror of sourceware.org. +ATSRC_PACKAGE_CO=([0]="git clone git://git.linux.ibm.com/binutils-gdb/binutils-gdb.git gdb" \ + [1]="git clone git://sourceware.org/git/binutils-gdb.git gdb") +ATSRC_PACKAGE_GIT="git checkout -b gdb-${ATSRC_PACKAGE_VER}${ATSRC_PACKAGE_REV:+-${ATSRC_PACKAGE_REV}} ${ATSRC_PACKAGE_REV}" +ATSRC_PACKAGE_POST="mv gdb gdb-${ATSRC_PACKAGE_VER}${ATSRC_PACKAGE_REV:+-${ATSRC_PACKAGE_REV}}" +ATSRC_PACKAGE_SRC="${AT_BASE}/sources/gdb-${ATSRC_PACKAGE_VER}${ATSRC_PACKAGE_REV:+-${ATSRC_PACKAGE_REV}}" +ATSRC_PACKAGE_WORK=${AT_WORK_PATH}/gdb +ATSRC_PACKAGE_MLS= +ATSRC_PACKAGE_ALOC= +ATSRC_PACKAGE_TARS= +ATSRC_PACKAGE_PATCHES= +ATSRC_PACKAGE_MAKE_CHECK="" +ATSRC_PACKAGE_DISTRIB=yes +ATSRC_PACKAGE_BUNDLE=devel diff --git a/configs/next/packages/gdb/specfile b/configs/next/packages/gdb/specfile new file mode 120000 index 000000000..17d71b864 --- /dev/null +++ b/configs/next/packages/gdb/specfile @@ -0,0 +1 @@ +../../../10.0/packages/gdb/specfile \ No newline at end of file diff --git a/configs/next/packages/gdb/stage_1 b/configs/next/packages/gdb/stage_1 new file mode 120000 index 000000000..e8037d475 --- /dev/null +++ b/configs/next/packages/gdb/stage_1 @@ -0,0 +1 @@ +../../../10.0/packages/gdb/stage_1 \ No newline at end of file diff --git a/configs/next/packages/glibc/glibc.mk b/configs/next/packages/glibc/glibc.mk new file mode 120000 index 000000000..194347224 --- /dev/null +++ b/configs/next/packages/glibc/glibc.mk @@ -0,0 +1 @@ +../../../10.0/packages/glibc/glibc.mk \ No newline at end of file diff --git a/configs/next/packages/glibc/sources b/configs/next/packages/glibc/sources new file mode 100644 index 000000000..18760dade --- /dev/null +++ b/configs/next/packages/glibc/sources @@ -0,0 +1,67 @@ +#!/usr/bin/env bash +# +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# GLIBC source package and build info +# =================================== +# + +ATSRC_PACKAGE_NAME="GNU C Library" +ATSRC_PACKAGE_VER=2.25 +ATSRC_PACKAGE_REV=e6502dfb8894 +ATSRC_PACKAGE_LICENSE="LGPL 2.1" +ATSRC_PACKAGE_DOCLINK="http://www.gnu.org/software/libc/manual/html_node/index.html" +ATSRC_PACKAGE_RELFIXES= +ATSRC_PACKAGE_STR_VER="${ATSRC_PACKAGE_NAME} ${ATSRC_PACKAGE_VER}-ibm" +ATSRC_PACKAGE_PRE="test -d glibc-${ATSRC_PACKAGE_VER}-${ATSRC_PACKAGE_REV}" +# git://git.linux.ibm.com/toolchain-mirrors/glibc.git is a mirror of the git://sourceware.org/git/glibc.git +ATSRC_PACKAGE_CO=([0]="git clone git://git.linux.ibm.com/toolchain-mirrors/glibc.git" \ + [1]="git clone git://sourceware.org/git/glibc.git") +ATSRC_PACKAGE_GIT="git checkout -b glibc-${ATSRC_PACKAGE_VER}${ATSRC_PACKAGE_REV:+-${ATSRC_PACKAGE_REV}} ${ATSRC_PACKAGE_REV}" +ATSRC_PACKAGE_POST="mv glibc glibc-${ATSRC_PACKAGE_VER}${ATSRC_PACKAGE_REV:+-${ATSRC_PACKAGE_REV}}" +ATSRC_PACKAGE_SRC=${AT_BASE}/sources/glibc-${ATSRC_PACKAGE_VER}${ATSRC_PACKAGE_REV:+-${ATSRC_PACKAGE_REV}} +ATSRC_PACKAGE_WORK=${AT_WORK_PATH}/glibc +ATSRC_PACKAGE_MAKE_CHECK= +ATSRC_PACKAGE_PORTS= +ATSRC_PACKAGE_DISTRIB=yes +ATSRC_PACKAGE_BUNDLE=main_toolchain + +atsrc_get_patches () +{ + # Patch that is applied to every ibm branch + # TODO: Apply this to the ibm branch after 2.23 is release and before + # AT 10.0 is released. + at_get_patch \ + http://pokgsa.ibm.com/home/g/f/gftg/web/public/patches/glibc/0001-Remove-assert-if-DT_RUNPATH-and-DT_RPATH-flags-are-f.patch \ + 7b746cf156702fb7a566743f3f1966e2 || return ${?} + + # Only enable TLE if: + # * Supported by hardware + # * Not a setuid program + # * Environment contains GLIBC_ELISION_ENABLE=yes + at_get_patch \ + https://raw.githubusercontent.com/powertechpreview/powertechpreview/26747dc0bfb0f8f30de9ebad78847a96d3191ba5/GLIBC%20PowerPC%20Backport/2.22/0001-powerpc-Conditionally-enable-TLE.patch \ + 801c05ea780220e8b4cf931af8c86946 || return ${?} +} + +atsrc_apply_patches () +{ + patch -p1 < 0001-Remove-assert-if-DT_RUNPATH-and-DT_RPATH-flags-are-f.patch || return ${?} + + patch -p1 < 0001-powerpc-Conditionally-enable-TLE.patch || return ${?} + + return 0 +} diff --git a/configs/next/packages/glibc/specfile b/configs/next/packages/glibc/specfile new file mode 120000 index 000000000..b407d3e1e --- /dev/null +++ b/configs/next/packages/glibc/specfile @@ -0,0 +1 @@ +../../../10.0/packages/glibc/specfile \ No newline at end of file diff --git a/configs/next/packages/glibc/stage_1 b/configs/next/packages/glibc/stage_1 new file mode 120000 index 000000000..e2985a976 --- /dev/null +++ b/configs/next/packages/glibc/stage_1 @@ -0,0 +1 @@ +../../../10.0/packages/glibc/stage_1 \ No newline at end of file diff --git a/configs/next/packages/glibc/stage_2 b/configs/next/packages/glibc/stage_2 new file mode 120000 index 000000000..95bf37c5d --- /dev/null +++ b/configs/next/packages/glibc/stage_2 @@ -0,0 +1 @@ +../../../10.0/packages/glibc/stage_2 \ No newline at end of file diff --git a/configs/next/packages/glibc/stage_compat b/configs/next/packages/glibc/stage_compat new file mode 120000 index 000000000..7744bf4b9 --- /dev/null +++ b/configs/next/packages/glibc/stage_compat @@ -0,0 +1 @@ +../../../10.0/packages/glibc/stage_compat \ No newline at end of file diff --git a/configs/next/packages/glibc/stage_optimized b/configs/next/packages/glibc/stage_optimized new file mode 120000 index 000000000..a9b19a256 --- /dev/null +++ b/configs/next/packages/glibc/stage_optimized @@ -0,0 +1 @@ +../../../10.0/packages/glibc/stage_optimized \ No newline at end of file diff --git a/configs/next/packages/gmp/gmp.mk b/configs/next/packages/gmp/gmp.mk new file mode 120000 index 000000000..2356cf3dd --- /dev/null +++ b/configs/next/packages/gmp/gmp.mk @@ -0,0 +1 @@ +../../../10.0/packages/gmp/gmp.mk \ No newline at end of file diff --git a/configs/next/packages/gmp/sources b/configs/next/packages/gmp/sources new file mode 120000 index 000000000..e84476f70 --- /dev/null +++ b/configs/next/packages/gmp/sources @@ -0,0 +1 @@ +../../../10.0/packages/gmp/sources \ No newline at end of file diff --git a/configs/next/packages/gmp/specfile b/configs/next/packages/gmp/specfile new file mode 120000 index 000000000..26213a92d --- /dev/null +++ b/configs/next/packages/gmp/specfile @@ -0,0 +1 @@ +../../../10.0/packages/gmp/specfile \ No newline at end of file diff --git a/configs/next/packages/gmp/stage_1 b/configs/next/packages/gmp/stage_1 new file mode 120000 index 000000000..dc10f10ee --- /dev/null +++ b/configs/next/packages/gmp/stage_1 @@ -0,0 +1 @@ +../../../10.0/packages/gmp/stage_1 \ No newline at end of file diff --git a/configs/next/packages/gmp/stage_2 b/configs/next/packages/gmp/stage_2 new file mode 120000 index 000000000..343b7d040 --- /dev/null +++ b/configs/next/packages/gmp/stage_2 @@ -0,0 +1 @@ +../../../10.0/packages/gmp/stage_2 \ No newline at end of file diff --git a/configs/next/packages/golang/golang.mk b/configs/next/packages/golang/golang.mk new file mode 120000 index 000000000..6ada9abc6 --- /dev/null +++ b/configs/next/packages/golang/golang.mk @@ -0,0 +1 @@ +../../../10.0/packages/golang/golang.mk \ No newline at end of file diff --git a/configs/next/packages/golang/sources b/configs/next/packages/golang/sources new file mode 120000 index 000000000..ce6718164 --- /dev/null +++ b/configs/next/packages/golang/sources @@ -0,0 +1 @@ +../../../10.0/packages/golang/sources \ No newline at end of file diff --git a/configs/next/packages/golang/specfile b/configs/next/packages/golang/specfile new file mode 120000 index 000000000..4aa7c6ae1 --- /dev/null +++ b/configs/next/packages/golang/specfile @@ -0,0 +1 @@ +../../../10.0/packages/golang/specfile \ No newline at end of file diff --git a/configs/next/packages/golang/stage_1 b/configs/next/packages/golang/stage_1 new file mode 120000 index 000000000..7d4ae1c59 --- /dev/null +++ b/configs/next/packages/golang/stage_1 @@ -0,0 +1 @@ +../../../10.0/packages/golang/stage_1 \ No newline at end of file diff --git a/configs/next/packages/groups b/configs/next/packages/groups new file mode 120000 index 000000000..f9bad22bf --- /dev/null +++ b/configs/next/packages/groups @@ -0,0 +1 @@ +../../10.0/packages/groups \ No newline at end of file diff --git a/configs/next/packages/kernel/kernel.mk b/configs/next/packages/kernel/kernel.mk new file mode 120000 index 000000000..1d77246fd --- /dev/null +++ b/configs/next/packages/kernel/kernel.mk @@ -0,0 +1 @@ +../../../10.0/packages/kernel/kernel.mk \ No newline at end of file diff --git a/configs/next/packages/kernel/sources b/configs/next/packages/kernel/sources new file mode 120000 index 000000000..f51bb7c86 --- /dev/null +++ b/configs/next/packages/kernel/sources @@ -0,0 +1 @@ +../../../10.0/packages/kernel/sources \ No newline at end of file diff --git a/configs/next/packages/kernel/specfile b/configs/next/packages/kernel/specfile new file mode 120000 index 000000000..969197b28 --- /dev/null +++ b/configs/next/packages/kernel/specfile @@ -0,0 +1 @@ +../../../10.0/packages/kernel/specfile \ No newline at end of file diff --git a/configs/next/packages/kernel/stage_h b/configs/next/packages/kernel/stage_h new file mode 120000 index 000000000..b7d6a0c5e --- /dev/null +++ b/configs/next/packages/kernel/stage_h @@ -0,0 +1 @@ +../../../10.0/packages/kernel/stage_h \ No newline at end of file diff --git a/configs/next/packages/libauxv/libauxv.mk b/configs/next/packages/libauxv/libauxv.mk new file mode 120000 index 000000000..f5a748cc9 --- /dev/null +++ b/configs/next/packages/libauxv/libauxv.mk @@ -0,0 +1 @@ +../../../10.0/packages/libauxv/libauxv.mk \ No newline at end of file diff --git a/configs/next/packages/libauxv/sources b/configs/next/packages/libauxv/sources new file mode 120000 index 000000000..c78f86af8 --- /dev/null +++ b/configs/next/packages/libauxv/sources @@ -0,0 +1 @@ +../../../10.0/packages/libauxv/sources \ No newline at end of file diff --git a/configs/next/packages/libauxv/specfile b/configs/next/packages/libauxv/specfile new file mode 120000 index 000000000..95e522f06 --- /dev/null +++ b/configs/next/packages/libauxv/specfile @@ -0,0 +1 @@ +../../../10.0/packages/libauxv/specfile \ No newline at end of file diff --git a/configs/next/packages/libauxv/stage_1 b/configs/next/packages/libauxv/stage_1 new file mode 120000 index 000000000..1b4beebd3 --- /dev/null +++ b/configs/next/packages/libauxv/stage_1 @@ -0,0 +1 @@ +../../../10.0/packages/libauxv/stage_1 \ No newline at end of file diff --git a/configs/next/packages/libdfp/libdfp.mk b/configs/next/packages/libdfp/libdfp.mk new file mode 120000 index 000000000..8a34053e4 --- /dev/null +++ b/configs/next/packages/libdfp/libdfp.mk @@ -0,0 +1 @@ +../../../10.0/packages/libdfp/libdfp.mk \ No newline at end of file diff --git a/configs/next/packages/libdfp/sources b/configs/next/packages/libdfp/sources new file mode 120000 index 000000000..0e8b70b89 --- /dev/null +++ b/configs/next/packages/libdfp/sources @@ -0,0 +1 @@ +../../../10.0/packages/libdfp/sources \ No newline at end of file diff --git a/configs/next/packages/libdfp/specfile b/configs/next/packages/libdfp/specfile new file mode 120000 index 000000000..23cf53793 --- /dev/null +++ b/configs/next/packages/libdfp/specfile @@ -0,0 +1 @@ +../../../10.0/packages/libdfp/specfile \ No newline at end of file diff --git a/configs/next/packages/libdfp/stage_1 b/configs/next/packages/libdfp/stage_1 new file mode 120000 index 000000000..012f9e703 --- /dev/null +++ b/configs/next/packages/libdfp/stage_1 @@ -0,0 +1 @@ +../../../10.0/packages/libdfp/stage_1 \ No newline at end of file diff --git a/configs/next/packages/libdfp/stage_optimized b/configs/next/packages/libdfp/stage_optimized new file mode 120000 index 000000000..338c07c66 --- /dev/null +++ b/configs/next/packages/libdfp/stage_optimized @@ -0,0 +1 @@ +../../../10.0/packages/libdfp/stage_optimized \ No newline at end of file diff --git a/configs/next/packages/libhugetlbfs/libhugetlbfs.mk b/configs/next/packages/libhugetlbfs/libhugetlbfs.mk new file mode 120000 index 000000000..a2bae7d04 --- /dev/null +++ b/configs/next/packages/libhugetlbfs/libhugetlbfs.mk @@ -0,0 +1 @@ +../../../10.0/packages/libhugetlbfs/libhugetlbfs.mk \ No newline at end of file diff --git a/configs/next/packages/libhugetlbfs/sources b/configs/next/packages/libhugetlbfs/sources new file mode 120000 index 000000000..9970c4b86 --- /dev/null +++ b/configs/next/packages/libhugetlbfs/sources @@ -0,0 +1 @@ +../../../10.0/packages/libhugetlbfs/sources \ No newline at end of file diff --git a/configs/next/packages/libhugetlbfs/specfile b/configs/next/packages/libhugetlbfs/specfile new file mode 120000 index 000000000..002bd6feb --- /dev/null +++ b/configs/next/packages/libhugetlbfs/specfile @@ -0,0 +1 @@ +../../../10.0/packages/libhugetlbfs/specfile \ No newline at end of file diff --git a/configs/next/packages/libhugetlbfs/stage_1 b/configs/next/packages/libhugetlbfs/stage_1 new file mode 120000 index 000000000..5eeabbdda --- /dev/null +++ b/configs/next/packages/libhugetlbfs/stage_1 @@ -0,0 +1 @@ +../../../10.0/packages/libhugetlbfs/stage_1 \ No newline at end of file diff --git a/configs/next/packages/libpfm/libpfm.mk b/configs/next/packages/libpfm/libpfm.mk new file mode 120000 index 000000000..36cc22d0d --- /dev/null +++ b/configs/next/packages/libpfm/libpfm.mk @@ -0,0 +1 @@ +../../../10.0/packages/libpfm/libpfm.mk \ No newline at end of file diff --git a/configs/next/packages/libpfm/sources b/configs/next/packages/libpfm/sources new file mode 100644 index 000000000..72684cf1c --- /dev/null +++ b/configs/next/packages/libpfm/sources @@ -0,0 +1,40 @@ +#!/usr/bin/env bash +# +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# Libpfm source package and build info +# ==================================== +# + +ATSRC_PACKAGE_NAME="Libpfm" +ATSRC_PACKAGE_VER=4.7.1 +ATSRC_PACKAGE_REV=ebb8be7 +ATSRC_PACKAGE_LICENSE="MIT" +ATSRC_PACKAGE_DOCLINK="http://perfmon2.sourceforge.net/docs_v4.html" +ATSRC_PACKAGE_RELFIXES= +ATSRC_PACKAGE_STR_VER="${ATSRC_PACKAGE_NAME} ${ATSRC_PACKAGE_VER}${ATSRC_PACKAGE_REV:+-${ATSRC_PACKAGE_REV}}" +ATSRC_PACKAGE_PRE="test -d libpfm-${ATSRC_PACKAGE_VER}${ATSRC_PACKAGE_REV:+-${ATSRC_PACKAGE_REV}}" +ATSRC_PACKAGE_CO=([0]="git archive --prefix=libpfm-${ATSRC_PACKAGE_VER}${ATSRC_PACKAGE_REV:+-${ATSRC_PACKAGE_REV}}/ --remote=git://git.code.sf.net/p/perfmon2/libpfm4 ${ATSRC_PACKAGE_REV} > libpfm-${ATSRC_PACKAGE_VER}${ATSRC_PACKAGE_REV:+-${ATSRC_PACKAGE_REV}}.tar") +ATSRC_PACKAGE_POST="tar -xf libpfm-${ATSRC_PACKAGE_VER}${ATSRC_PACKAGE_REV:+-${ATSRC_PACKAGE_REV}}.tar" +ATSRC_PACKAGE_SRC="${AT_BASE}/sources/libpfm-${ATSRC_PACKAGE_VER}${ATSRC_PACKAGE_REV:+-${ATSRC_PACKAGE_REV}}" +ATSRC_PACKAGE_WORK=${AT_WORK_PATH}/libpfm +ATSRC_PACKAGE_MLS= +ATSRC_PACKAGE_ALOC= +ATSRC_PACKAGE_PATCHES= +ATSRC_PACKAGE_TARS= +ATSRC_PACKAGE_MAKE_CHECK= +ATSRC_PACKAGE_DISTRIB=no +ATSRC_PACKAGE_BUNDLE=profile diff --git a/configs/next/packages/libpfm/specfile b/configs/next/packages/libpfm/specfile new file mode 120000 index 000000000..3571cdfdd --- /dev/null +++ b/configs/next/packages/libpfm/specfile @@ -0,0 +1 @@ +../../../10.0/packages/libpfm/specfile \ No newline at end of file diff --git a/configs/next/packages/libpfm/stage_1 b/configs/next/packages/libpfm/stage_1 new file mode 120000 index 000000000..0da63f9d9 --- /dev/null +++ b/configs/next/packages/libpfm/stage_1 @@ -0,0 +1 @@ +../../../10.0/packages/libpfm/stage_1 \ No newline at end of file diff --git a/configs/next/packages/libsphde/libsphde.mk b/configs/next/packages/libsphde/libsphde.mk new file mode 120000 index 000000000..a164521a5 --- /dev/null +++ b/configs/next/packages/libsphde/libsphde.mk @@ -0,0 +1 @@ +../../../10.0/packages/libsphde/libsphde.mk \ No newline at end of file diff --git a/configs/next/packages/libsphde/sources b/configs/next/packages/libsphde/sources new file mode 120000 index 000000000..eabff2e9d --- /dev/null +++ b/configs/next/packages/libsphde/sources @@ -0,0 +1 @@ +../../../10.0/packages/libsphde/sources \ No newline at end of file diff --git a/configs/next/packages/libsphde/specfile b/configs/next/packages/libsphde/specfile new file mode 120000 index 000000000..58da11468 --- /dev/null +++ b/configs/next/packages/libsphde/specfile @@ -0,0 +1 @@ +../../../10.0/packages/libsphde/specfile \ No newline at end of file diff --git a/configs/next/packages/libsphde/stage_1 b/configs/next/packages/libsphde/stage_1 new file mode 120000 index 000000000..83d9dbbfa --- /dev/null +++ b/configs/next/packages/libsphde/stage_1 @@ -0,0 +1 @@ +../../../10.0/packages/libsphde/stage_1 \ No newline at end of file diff --git a/configs/next/packages/liburcu/liburcu.mk b/configs/next/packages/liburcu/liburcu.mk new file mode 120000 index 000000000..98e47c336 --- /dev/null +++ b/configs/next/packages/liburcu/liburcu.mk @@ -0,0 +1 @@ +../../../10.0/packages/liburcu/liburcu.mk \ No newline at end of file diff --git a/configs/next/packages/liburcu/sources b/configs/next/packages/liburcu/sources new file mode 120000 index 000000000..140e550f0 --- /dev/null +++ b/configs/next/packages/liburcu/sources @@ -0,0 +1 @@ +../../../10.0/packages/liburcu/sources \ No newline at end of file diff --git a/configs/next/packages/liburcu/specfile b/configs/next/packages/liburcu/specfile new file mode 120000 index 000000000..82d51c1ae --- /dev/null +++ b/configs/next/packages/liburcu/specfile @@ -0,0 +1 @@ +../../../10.0/packages/liburcu/specfile \ No newline at end of file diff --git a/configs/next/packages/liburcu/stage_1 b/configs/next/packages/liburcu/stage_1 new file mode 120000 index 000000000..47fbe4601 --- /dev/null +++ b/configs/next/packages/liburcu/stage_1 @@ -0,0 +1 @@ +../../../10.0/packages/liburcu/stage_1 \ No newline at end of file diff --git a/configs/next/packages/libvecpf/libvecpf.mk b/configs/next/packages/libvecpf/libvecpf.mk new file mode 120000 index 000000000..02d79dfc2 --- /dev/null +++ b/configs/next/packages/libvecpf/libvecpf.mk @@ -0,0 +1 @@ +../../../10.0/packages/libvecpf/libvecpf.mk \ No newline at end of file diff --git a/configs/next/packages/libvecpf/sources b/configs/next/packages/libvecpf/sources new file mode 120000 index 000000000..96cbd7bc3 --- /dev/null +++ b/configs/next/packages/libvecpf/sources @@ -0,0 +1 @@ +../../../10.0/packages/libvecpf/sources \ No newline at end of file diff --git a/configs/next/packages/libvecpf/specfile b/configs/next/packages/libvecpf/specfile new file mode 120000 index 000000000..963146e61 --- /dev/null +++ b/configs/next/packages/libvecpf/specfile @@ -0,0 +1 @@ +../../../10.0/packages/libvecpf/specfile \ No newline at end of file diff --git a/configs/next/packages/libvecpf/stage_1 b/configs/next/packages/libvecpf/stage_1 new file mode 120000 index 000000000..e3013ba82 --- /dev/null +++ b/configs/next/packages/libvecpf/stage_1 @@ -0,0 +1 @@ +../../../10.0/packages/libvecpf/stage_1 \ No newline at end of file diff --git a/configs/next/packages/mpc/mpc.mk b/configs/next/packages/mpc/mpc.mk new file mode 120000 index 000000000..cd047d73e --- /dev/null +++ b/configs/next/packages/mpc/mpc.mk @@ -0,0 +1 @@ +../../../10.0/packages/mpc/mpc.mk \ No newline at end of file diff --git a/configs/next/packages/mpc/sources b/configs/next/packages/mpc/sources new file mode 120000 index 000000000..cf27bc20d --- /dev/null +++ b/configs/next/packages/mpc/sources @@ -0,0 +1 @@ +../../../10.0/packages/mpc/sources \ No newline at end of file diff --git a/configs/next/packages/mpc/specfile b/configs/next/packages/mpc/specfile new file mode 120000 index 000000000..6893731a6 --- /dev/null +++ b/configs/next/packages/mpc/specfile @@ -0,0 +1 @@ +../../../10.0/packages/mpc/specfile \ No newline at end of file diff --git a/configs/next/packages/mpc/stage_1 b/configs/next/packages/mpc/stage_1 new file mode 120000 index 000000000..f6bc08fdd --- /dev/null +++ b/configs/next/packages/mpc/stage_1 @@ -0,0 +1 @@ +../../../10.0/packages/mpc/stage_1 \ No newline at end of file diff --git a/configs/next/packages/mpc/stage_2 b/configs/next/packages/mpc/stage_2 new file mode 120000 index 000000000..eece1b431 --- /dev/null +++ b/configs/next/packages/mpc/stage_2 @@ -0,0 +1 @@ +../../../10.0/packages/mpc/stage_2 \ No newline at end of file diff --git a/configs/next/packages/mpfr/mpfr.mk b/configs/next/packages/mpfr/mpfr.mk new file mode 120000 index 000000000..322b15ee8 --- /dev/null +++ b/configs/next/packages/mpfr/mpfr.mk @@ -0,0 +1 @@ +../../../10.0/packages/mpfr/mpfr.mk \ No newline at end of file diff --git a/configs/next/packages/mpfr/sources b/configs/next/packages/mpfr/sources new file mode 100644 index 000000000..b429ac88d --- /dev/null +++ b/configs/next/packages/mpfr/sources @@ -0,0 +1,41 @@ +#!/usr/bin/env bash +# +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# MPFR source package and build info +# ================================== +# + +ATSRC_PACKAGE_NAME="GNU MPFR Library" +ATSRC_PACKAGE_VER=3.1.4 +ATSRC_PACKAGE_REV=10201 +ATSRC_PACKAGE_LICENSE="GPL 3.0" +ATSRC_PACKAGE_DOCLINK="http://www.mpfr.org/mpfr-current/mpfr.html" +ATSRC_PACKAGE_RELFIXES= +ATSRC_PACKAGE_VERREV=${ATSRC_PACKAGE_VER}${ATSRC_PACKAGE_REV:+-${ATSRC_PACKAGE_REV}} +ATSRC_PACKAGE_STR_VER="${ATSRC_PACKAGE_NAME} ${ATSRC_PACKAGE_VERREV}" +ATSRC_PACKAGE_PRE="test -d mpfr-${ATSRC_PACKAGE_VERREV}" +ATSRC_PACKAGE_CO=([0]="svn co --revision ${ATSRC_PACKAGE_REV} svn://scm.gforge.inria.fr/svn/mpfr/branches/${ATSRC_PACKAGE_VER%.*} mpfr-${ATSRC_PACKAGE_VERREV}") +ATSRC_PACKAGE_POST="" +ATSRC_PACKAGE_SRC=${AT_BASE}/sources/mpfr-${ATSRC_PACKAGE_VERREV} +ATSRC_PACKAGE_WORK=${AT_WORK_PATH}/mpfr +ATSRC_PACKAGE_MLS= +ATSRC_PACKAGE_ALOC= +ATSRC_PACKAGE_PATCHES= +ATSRC_PACKAGE_TARS= +ATSRC_PACKAGE_MAKE_CHECK= +ATSRC_PACKAGE_DISTRIB=yes +ATSRC_PACKAGE_BUNDLE=main_toolchain diff --git a/configs/next/packages/mpfr/specfile b/configs/next/packages/mpfr/specfile new file mode 120000 index 000000000..1d999cbb1 --- /dev/null +++ b/configs/next/packages/mpfr/specfile @@ -0,0 +1 @@ +../../../10.0/packages/mpfr/specfile \ No newline at end of file diff --git a/configs/next/packages/mpfr/stage_1 b/configs/next/packages/mpfr/stage_1 new file mode 120000 index 000000000..f98f2973a --- /dev/null +++ b/configs/next/packages/mpfr/stage_1 @@ -0,0 +1 @@ +../../../10.0/packages/mpfr/stage_1 \ No newline at end of file diff --git a/configs/next/packages/mpfr/stage_2 b/configs/next/packages/mpfr/stage_2 new file mode 120000 index 000000000..46b541bc2 --- /dev/null +++ b/configs/next/packages/mpfr/stage_2 @@ -0,0 +1 @@ +../../../10.0/packages/mpfr/stage_2 \ No newline at end of file diff --git a/configs/next/packages/openssl/openssl.mk b/configs/next/packages/openssl/openssl.mk new file mode 120000 index 000000000..8038ba2d8 --- /dev/null +++ b/configs/next/packages/openssl/openssl.mk @@ -0,0 +1 @@ +../../../10.0/packages/openssl/openssl.mk \ No newline at end of file diff --git a/configs/next/packages/openssl/sources b/configs/next/packages/openssl/sources new file mode 120000 index 000000000..2505ffaca --- /dev/null +++ b/configs/next/packages/openssl/sources @@ -0,0 +1 @@ +../../../10.0/packages/openssl/sources \ No newline at end of file diff --git a/configs/next/packages/openssl/specfile b/configs/next/packages/openssl/specfile new file mode 120000 index 000000000..ce0ab92b6 --- /dev/null +++ b/configs/next/packages/openssl/specfile @@ -0,0 +1 @@ +../../../10.0/packages/openssl/specfile \ No newline at end of file diff --git a/configs/next/packages/openssl/stage_1 b/configs/next/packages/openssl/stage_1 new file mode 120000 index 000000000..cc95d32d5 --- /dev/null +++ b/configs/next/packages/openssl/stage_1 @@ -0,0 +1 @@ +../../../10.0/packages/openssl/stage_1 \ No newline at end of file diff --git a/configs/next/packages/openssl/stage_optimized b/configs/next/packages/openssl/stage_optimized new file mode 120000 index 000000000..1d4652ae8 --- /dev/null +++ b/configs/next/packages/openssl/stage_optimized @@ -0,0 +1 @@ +../../../10.0/packages/openssl/stage_optimized \ No newline at end of file diff --git a/configs/next/packages/oprofile/oprofile.mk b/configs/next/packages/oprofile/oprofile.mk new file mode 120000 index 000000000..495779696 --- /dev/null +++ b/configs/next/packages/oprofile/oprofile.mk @@ -0,0 +1 @@ +../../../10.0/packages/oprofile/oprofile.mk \ No newline at end of file diff --git a/configs/next/packages/oprofile/sources b/configs/next/packages/oprofile/sources new file mode 100644 index 000000000..40d3b415a --- /dev/null +++ b/configs/next/packages/oprofile/sources @@ -0,0 +1,41 @@ +#!/usr/bin/env bash +# +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# oProfile source package and build info +# ====================================== +# +ATSRC_PACKAGE_NAME="OProfile" +ATSRC_PACKAGE_VER=1.1.0 +ATSRC_PACKAGE_REV=3a5515f +ATSRC_PACKAGE_LICENSE="GPL 2.0" +ATSRC_PACKAGE_DOCLINK="http://oprofile.sourceforge.net/docs/" +ATSRC_PACKAGE_RELFIXES= +ATSRC_PACKAGE_NAMESUFFIX="with Java Support" +ATSRC_PACKAGE_STR_VER="${ATSRC_PACKAGE_NAME} ${ATSRC_PACKAGE_VER}${ATSRC_PACKAGE_REV:+-${ATSRC_PACKAGE_REV}}" +ATSRC_PACKAGE_PRE="test -d oprofile-${ATSRC_PACKAGE_VER}${ATSRC_PACKAGE_REV:+-${ATSRC_PACKAGE_REV}}" +ATSRC_PACKAGE_CO=([0]="git archive --prefix=oprofile-${ATSRC_PACKAGE_VER}${ATSRC_PACKAGE_REV:+-${ATSRC_PACKAGE_REV}}/ --remote=git://git.code.sf.net/p/oprofile/oprofile ${ATSRC_PACKAGE_REV} > oprofile-${ATSRC_PACKAGE_VER}${ATSRC_PACKAGE_REV:+-${ATSRC_PACKAGE_REV}}.tar") +ATSRC_PACKAGE_GIT= +ATSRC_PACKAGE_POST="tar -xf oprofile-${ATSRC_PACKAGE_VER}${ATSRC_PACKAGE_REV:+-${ATSRC_PACKAGE_REV}}.tar" +ATSRC_PACKAGE_SRC="${AT_BASE}/sources/oprofile-${ATSRC_PACKAGE_VER}${ATSRC_PACKAGE_REV:+-${ATSRC_PACKAGE_REV}}" +ATSRC_PACKAGE_WORK=${AT_WORK_PATH}/oprofile +ATSRC_PACKAGE_ALOC= +ATSRC_PACKAGE_MLS= +ATSRC_PACKAGE_PATCHES= +ATSRC_PACKAGE_TARS= +ATSRC_PACKAGE_MAKE_CHECK= +ATSRC_PACKAGE_DISTRIB=yes +ATSRC_PACKAGE_BUNDLE=profile diff --git a/configs/next/packages/oprofile/specfile b/configs/next/packages/oprofile/specfile new file mode 120000 index 000000000..14e0ad3b0 --- /dev/null +++ b/configs/next/packages/oprofile/specfile @@ -0,0 +1 @@ +../../../10.0/packages/oprofile/specfile \ No newline at end of file diff --git a/configs/next/packages/oprofile/stage_1 b/configs/next/packages/oprofile/stage_1 new file mode 120000 index 000000000..e4d6057a9 --- /dev/null +++ b/configs/next/packages/oprofile/stage_1 @@ -0,0 +1 @@ +../../../10.0/packages/oprofile/stage_1 \ No newline at end of file diff --git a/configs/next/packages/paflib/paflib.mk b/configs/next/packages/paflib/paflib.mk new file mode 120000 index 000000000..8e301b566 --- /dev/null +++ b/configs/next/packages/paflib/paflib.mk @@ -0,0 +1 @@ +../../../10.0/packages/paflib/paflib.mk \ No newline at end of file diff --git a/configs/next/packages/paflib/sources b/configs/next/packages/paflib/sources new file mode 120000 index 000000000..76fd0ef12 --- /dev/null +++ b/configs/next/packages/paflib/sources @@ -0,0 +1 @@ +../../../10.0/packages/paflib/sources \ No newline at end of file diff --git a/configs/next/packages/paflib/specfile b/configs/next/packages/paflib/specfile new file mode 120000 index 000000000..eb26439dc --- /dev/null +++ b/configs/next/packages/paflib/specfile @@ -0,0 +1 @@ +../../../10.0/packages/paflib/specfile \ No newline at end of file diff --git a/configs/next/packages/paflib/stage_1 b/configs/next/packages/paflib/stage_1 new file mode 120000 index 000000000..855767a1b --- /dev/null +++ b/configs/next/packages/paflib/stage_1 @@ -0,0 +1 @@ +../../../10.0/packages/paflib/stage_1 \ No newline at end of file diff --git a/configs/next/packages/python/python.mk b/configs/next/packages/python/python.mk new file mode 120000 index 000000000..f90fdf471 --- /dev/null +++ b/configs/next/packages/python/python.mk @@ -0,0 +1 @@ +../../../10.0/packages/python/python.mk \ No newline at end of file diff --git a/configs/next/packages/python/sources b/configs/next/packages/python/sources new file mode 120000 index 000000000..ff02c4fe3 --- /dev/null +++ b/configs/next/packages/python/sources @@ -0,0 +1 @@ +../../../10.0/packages/python/sources \ No newline at end of file diff --git a/configs/next/packages/python/specfile b/configs/next/packages/python/specfile new file mode 120000 index 000000000..c4b36cdb0 --- /dev/null +++ b/configs/next/packages/python/specfile @@ -0,0 +1 @@ +../../../10.0/packages/python/specfile \ No newline at end of file diff --git a/configs/next/packages/python/stage_1 b/configs/next/packages/python/stage_1 new file mode 120000 index 000000000..75c96b299 --- /dev/null +++ b/configs/next/packages/python/stage_1 @@ -0,0 +1 @@ +../../../10.0/packages/python/stage_1 \ No newline at end of file diff --git a/configs/next/packages/tbb/sources b/configs/next/packages/tbb/sources new file mode 120000 index 000000000..aa93f7ea4 --- /dev/null +++ b/configs/next/packages/tbb/sources @@ -0,0 +1 @@ +../../../10.0/packages/tbb/sources \ No newline at end of file diff --git a/configs/next/packages/tbb/specfile b/configs/next/packages/tbb/specfile new file mode 120000 index 000000000..f904ced8c --- /dev/null +++ b/configs/next/packages/tbb/specfile @@ -0,0 +1 @@ +../../../10.0/packages/tbb/specfile \ No newline at end of file diff --git a/configs/next/packages/tbb/stage_1 b/configs/next/packages/tbb/stage_1 new file mode 120000 index 000000000..bc40d539c --- /dev/null +++ b/configs/next/packages/tbb/stage_1 @@ -0,0 +1 @@ +../../../10.0/packages/tbb/stage_1 \ No newline at end of file diff --git a/configs/next/packages/tbb/tbb.mk b/configs/next/packages/tbb/tbb.mk new file mode 120000 index 000000000..161fc9355 --- /dev/null +++ b/configs/next/packages/tbb/tbb.mk @@ -0,0 +1 @@ +../../../10.0/packages/tbb/tbb.mk \ No newline at end of file diff --git a/configs/next/packages/tcmalloc/sources b/configs/next/packages/tcmalloc/sources new file mode 120000 index 000000000..cc1d52577 --- /dev/null +++ b/configs/next/packages/tcmalloc/sources @@ -0,0 +1 @@ +../../../10.0/packages/tcmalloc/sources \ No newline at end of file diff --git a/configs/next/packages/tcmalloc/specfile b/configs/next/packages/tcmalloc/specfile new file mode 120000 index 000000000..8d80c0dee --- /dev/null +++ b/configs/next/packages/tcmalloc/specfile @@ -0,0 +1 @@ +../../../10.0/packages/tcmalloc/specfile \ No newline at end of file diff --git a/configs/next/packages/tcmalloc/stage_1 b/configs/next/packages/tcmalloc/stage_1 new file mode 120000 index 000000000..737303eaa --- /dev/null +++ b/configs/next/packages/tcmalloc/stage_1 @@ -0,0 +1 @@ +../../../10.0/packages/tcmalloc/stage_1 \ No newline at end of file diff --git a/configs/next/packages/tcmalloc/tcmalloc.mk b/configs/next/packages/tcmalloc/tcmalloc.mk new file mode 120000 index 000000000..4239d48fd --- /dev/null +++ b/configs/next/packages/tcmalloc/tcmalloc.mk @@ -0,0 +1 @@ +../../../10.0/packages/tcmalloc/tcmalloc.mk \ No newline at end of file diff --git a/configs/next/packages/valgrind/sources b/configs/next/packages/valgrind/sources new file mode 100644 index 000000000..a8a9575de --- /dev/null +++ b/configs/next/packages/valgrind/sources @@ -0,0 +1,74 @@ +#!/usr/bin/env bash +# +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# Valgrind source package and build info +# ====================================== +# + +ATSRC_PACKAGE_NAME="Valgrind" +ATSRC_PACKAGE_VER=3.11.0 +# Don't update the Valgrind revision without updating the VEX revision too. +# They have to be in sync. +ATSRC_PACKAGE_REV=15905 +ATSRC_PACKAGE_VEX_REV=3223 +ATSRC_PACKAGE_LICENSE="GPL 2.0" +ATSRC_PACKAGE_DOCLINK="http://valgrind.org/docs/" +ATSRC_PACKAGE_RELFIXES= +ATSRC_PACKAGE_VER_REV="${ATSRC_PACKAGE_VER}-${ATSRC_PACKAGE_REV}" +ATSRC_PACKAGE_STR_VER="${ATSRC_PACKAGE_NAME} ${ATSRC_PACKAGE_VER}" +ATSRC_PACKAGE_PRE="test -d valgrind-${ATSRC_PACKAGE_VER_REV}" +ATSRC_PACKAGE_CO=([0]="svn co --revision ${ATSRC_PACKAGE_REV} --ignore-externals svn://svn.valgrind.org/valgrind/trunk valgrind-${ATSRC_PACKAGE_VER_REV}") +# TODO: Downloading Valgrind and VEX in different steps is sub-optimal for +# caching mechanisms. +# VEX is part of the Valgrind code, but it's kept in a different repository. +# When checking out Valgrind, the VEX repository is downloaded automatically +# via a SVN external propery. However, the Valgrind repository doesn't +# synchronize its own revision with the VEX repository and whenever we +# checkout a specific revision from trunk, it will always get the latest +# revision from VEX, causing failures on Valgrind. +ATSRC_PACKAGE_POST="svn co svn://svn.valgrind.org/vex/trunk valgrind-${ATSRC_PACKAGE_VER_REV}/VEX -r ${ATSRC_PACKAGE_VEX_REV}" +ATSRC_PACKAGE_SRC="${AT_BASE}/sources/valgrind-${ATSRC_PACKAGE_VER_REV}" +ATSRC_PACKAGE_WORK=${AT_WORK_PATH}/valgrind +ATSRC_PACKAGE_MLS="" +ATSRC_PACKAGE_ALOC='' +ATSRC_PACKAGE_PATCHES='' +ATSRC_PACKAGE_TARS='' +ATSRC_PACKAGE_MAKE_CHECK= +ATSRC_PACKAGE_DISTRIB=yes +ATSRC_PACKAGE_BUNDLE=profile + +atsrc_get_patches () +{ + at_get_patch \ + https://github.com/powertechpreview/powertechpreview/raw/be030afbf8d78018ab77aeea58092e03d483e8ce/Valgrind%20iTrace%20Patches/3.11/vg-3110-itrace.v1.tgz \ + 337042b8ea29d476b69d439c154d62f0 || return ${?} + + return 0 +} + +atsrc_apply_patches () +{ + tar xzf vg-3110-itrace.v1.tgz || return ${?} + + # Apply these patches to hook the itrace subdirectories into the + # valgrind makefile and configure scripts. + patch -p0 < add-itrace-bits-to-Makefile.am.diff || return ${?} + patch -p0 < add-itrace-bits-to-configure.ac.diff || return ${?} + patch -p0 < add-itrace-bits-to-check_headers_and_includes.diff || return ${?} + + return 0 +} diff --git a/configs/next/packages/valgrind/specfile b/configs/next/packages/valgrind/specfile new file mode 120000 index 000000000..28bbaa8bc --- /dev/null +++ b/configs/next/packages/valgrind/specfile @@ -0,0 +1 @@ +../../../10.0/packages/valgrind/specfile \ No newline at end of file diff --git a/configs/next/packages/valgrind/stage_1 b/configs/next/packages/valgrind/stage_1 new file mode 120000 index 000000000..48f0b9e93 --- /dev/null +++ b/configs/next/packages/valgrind/stage_1 @@ -0,0 +1 @@ +../../../10.0/packages/valgrind/stage_1 \ No newline at end of file diff --git a/configs/next/packages/valgrind/valgrind.mk b/configs/next/packages/valgrind/valgrind.mk new file mode 120000 index 000000000..41bf7e95c --- /dev/null +++ b/configs/next/packages/valgrind/valgrind.mk @@ -0,0 +1 @@ +../../../10.0/packages/valgrind/valgrind.mk \ No newline at end of file diff --git a/configs/next/packages/zlib/sources b/configs/next/packages/zlib/sources new file mode 120000 index 000000000..942ee05c5 --- /dev/null +++ b/configs/next/packages/zlib/sources @@ -0,0 +1 @@ +../../../10.0/packages/zlib/sources \ No newline at end of file diff --git a/configs/next/packages/zlib/specfile b/configs/next/packages/zlib/specfile new file mode 120000 index 000000000..7215c0d97 --- /dev/null +++ b/configs/next/packages/zlib/specfile @@ -0,0 +1 @@ +../../../10.0/packages/zlib/specfile \ No newline at end of file diff --git a/configs/next/packages/zlib/stage_1 b/configs/next/packages/zlib/stage_1 new file mode 120000 index 000000000..bddb35cd6 --- /dev/null +++ b/configs/next/packages/zlib/stage_1 @@ -0,0 +1 @@ +../../../10.0/packages/zlib/stage_1 \ No newline at end of file diff --git a/configs/next/packages/zlib/stage_optimized b/configs/next/packages/zlib/stage_optimized new file mode 120000 index 000000000..27f1fd1e7 --- /dev/null +++ b/configs/next/packages/zlib/stage_optimized @@ -0,0 +1 @@ +../../../10.0/packages/zlib/stage_optimized \ No newline at end of file diff --git a/configs/next/packages/zlib/zlib.mk b/configs/next/packages/zlib/zlib.mk new file mode 120000 index 000000000..51a91b612 --- /dev/null +++ b/configs/next/packages/zlib/zlib.mk @@ -0,0 +1 @@ +../../../10.0/packages/zlib/zlib.mk \ No newline at end of file diff --git a/configs/next/release_notes/release_notes-body.html b/configs/next/release_notes/release_notes-body.html new file mode 120000 index 000000000..992f63900 --- /dev/null +++ b/configs/next/release_notes/release_notes-body.html @@ -0,0 +1 @@ +../../10.0/release_notes/release_notes-body.html \ No newline at end of file diff --git a/configs/next/release_notes/release_notes-features.html b/configs/next/release_notes/release_notes-features.html new file mode 120000 index 000000000..d73d26671 --- /dev/null +++ b/configs/next/release_notes/release_notes-features.html @@ -0,0 +1 @@ +../../10.0/release_notes/release_notes-features.html \ No newline at end of file diff --git a/configs/next/release_notes/release_notes-group_entry.html b/configs/next/release_notes/release_notes-group_entry.html new file mode 120000 index 000000000..16057d70b --- /dev/null +++ b/configs/next/release_notes/release_notes-group_entry.html @@ -0,0 +1 @@ +../../10.0/release_notes/release_notes-group_entry.html \ No newline at end of file diff --git a/configs/next/release_notes/release_notes-inst.html b/configs/next/release_notes/release_notes-inst.html new file mode 120000 index 000000000..232d0124e --- /dev/null +++ b/configs/next/release_notes/release_notes-inst.html @@ -0,0 +1 @@ +../../10.0/release_notes/release_notes-inst.html \ No newline at end of file diff --git a/configs/next/release_notes/release_notes-online_doc.html b/configs/next/release_notes/release_notes-online_doc.html new file mode 120000 index 000000000..33898b067 --- /dev/null +++ b/configs/next/release_notes/release_notes-online_doc.html @@ -0,0 +1 @@ +../../10.0/release_notes/release_notes-online_doc.html \ No newline at end of file diff --git a/configs/next/release_notes/release_notes-package_line.html b/configs/next/release_notes/release_notes-package_line.html new file mode 120000 index 000000000..d43da5102 --- /dev/null +++ b/configs/next/release_notes/release_notes-package_line.html @@ -0,0 +1 @@ +../../10.0/release_notes/release_notes-package_line.html \ No newline at end of file diff --git a/configs/next/release_notes/release_notes-style.html b/configs/next/release_notes/release_notes-style.html new file mode 120000 index 000000000..21406d593 --- /dev/null +++ b/configs/next/release_notes/release_notes-style.html @@ -0,0 +1 @@ +../../10.0/release_notes/release_notes-style.html \ No newline at end of file diff --git a/configs/next/release_notes/relfixes.html b/configs/next/release_notes/relfixes.html new file mode 120000 index 000000000..ae3eceb74 --- /dev/null +++ b/configs/next/release_notes/relfixes.html @@ -0,0 +1 @@ +../../10.0/release_notes/relfixes.html \ No newline at end of file diff --git a/configs/next/sanity.mk b/configs/next/sanity.mk new file mode 120000 index 000000000..cdea1e1d5 --- /dev/null +++ b/configs/next/sanity.mk @@ -0,0 +1 @@ +../10.0/sanity.mk \ No newline at end of file diff --git a/configs/next/specs/main.spec b/configs/next/specs/main.spec new file mode 120000 index 000000000..f6d5cf7bd --- /dev/null +++ b/configs/next/specs/main.spec @@ -0,0 +1 @@ +../../10.0/specs/main.spec \ No newline at end of file diff --git a/configs/next/specs/metapkgs.spec b/configs/next/specs/metapkgs.spec new file mode 120000 index 000000000..f3b61e082 --- /dev/null +++ b/configs/next/specs/metapkgs.spec @@ -0,0 +1 @@ +../../10.0/specs/metapkgs.spec \ No newline at end of file diff --git a/configs/next/specs/monolithic.spec b/configs/next/specs/monolithic.spec new file mode 120000 index 000000000..5a3983426 --- /dev/null +++ b/configs/next/specs/monolithic.spec @@ -0,0 +1 @@ +../../10.0/specs/monolithic.spec \ No newline at end of file diff --git a/configs/next/specs/monolithic_at-compat.spec b/configs/next/specs/monolithic_at-compat.spec new file mode 120000 index 000000000..0f781ba2b --- /dev/null +++ b/configs/next/specs/monolithic_at-compat.spec @@ -0,0 +1 @@ +../../10.0/specs/monolithic_at-compat.spec \ No newline at end of file diff --git a/configs/next/specs/monolithic_compat.spec b/configs/next/specs/monolithic_compat.spec new file mode 120000 index 000000000..0907410f4 --- /dev/null +++ b/configs/next/specs/monolithic_compat.spec @@ -0,0 +1 @@ +../../10.0/specs/monolithic_compat.spec \ No newline at end of file diff --git a/configs/next/specs/monolithic_cross.spec b/configs/next/specs/monolithic_cross.spec new file mode 120000 index 000000000..9025f8993 --- /dev/null +++ b/configs/next/specs/monolithic_cross.spec @@ -0,0 +1 @@ +../../10.0/specs/monolithic_cross.spec \ No newline at end of file diff --git a/configs/ppc476-tools/arch/default.mk b/configs/ppc476-tools/arch/default.mk new file mode 100644 index 000000000..a9652a851 --- /dev/null +++ b/configs/ppc476-tools/arch/default.mk @@ -0,0 +1,47 @@ +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Default settings for all scenarios. +# Define at least BUILD_TARGET_ARCH* before including this file. + +# Generate code with non-executable .plt and .got sections for powerpc-linux. +SECURE_PLT ?= secure-plt + +# DEFAULT_CPU is used by gcc in order to set the default value of -m[32|64] +DEFAULT_CPU ?= default32 + +# Generate 32-bit binaries by default when not set. +# This is a legacy value. +COMPILER ?= 32 + +# We only build for Linux + glibc. +BUILD_TARGET_OSLIB ?= linux-gnu +CANONICALIZED_MACHINE := $(BUILD_TARGET_OSLIB) +CANONICALIZED_NAME_ID := $(CANONICALIZED_MACHINE)$(BUILD_TARGET_POSTFIX) + +ifdef BUILD_TARGET_ARCH32 + # Name of the target used when installing headers. It may be the name of the + # directory or a prefix of the name. + HEADER_TARGET ?= ppc + CTARGET_32 := $(BUILD_TARGET_ARCH32)-$(CANONICALIZED_NAME_ID) + TARGET32 := $(CTARGET_32) +endif + +ifdef BUILD_TARGET_ARCH64 + # Name of the target used when installing headers. It may be the name of the + # directory or a prefix of the name. + HEADER_TARGET64 ?= ppc64 + CTARGET_64 := $(BUILD_TARGET_ARCH64)-$(CANONICALIZED_NAME_ID) + TARGET64 := $(CTARGET_64) +endif diff --git a/configs/ppc476-tools/arch/i686.mk b/configs/ppc476-tools/arch/i686.mk new file mode 100644 index 000000000..66a8e3f05 --- /dev/null +++ b/configs/ppc476-tools/arch/i686.mk @@ -0,0 +1,20 @@ +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Set default variables when host=i686. +# This file must be included by another. + +include $(CONFIG)/arch/default.mk + +HOST := $(HOST_ARCH)-pc-linux-gnu diff --git a/configs/ppc476-tools/arch/i686.ppc.mk b/configs/ppc476-tools/arch/i686.ppc.mk new file mode 100644 index 000000000..f6af6322b --- /dev/null +++ b/configs/ppc476-tools/arch/i686.ppc.mk @@ -0,0 +1,24 @@ +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Set default variables when host=i686 targeting ppc64. + +BUILD_TARGET_ARCH32 ?= powerpc + +include $(CONFIG)/arch/i686.mk + +TARGET := $(CTARGET_32) + +CROSS_BUILD := yes +ENV_BUILD_ARCH := 32 diff --git a/configs/ppc476-tools/base.mk b/configs/ppc476-tools/base.mk new file mode 100644 index 000000000..eba7ca505 --- /dev/null +++ b/configs/ppc476-tools/base.mk @@ -0,0 +1,60 @@ +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Basic build version definitions +# =============================== +# This Makefile include contains the config options included at the beginning +# of the build process that govern the subsequent generated package name, +# version and other dependent internal build variables. +# It also states which distros the build is compatible with, so that it can be +# validated at build time, as well as heuristicaly find the proper repo path +# to put the final rpms generated by the build system. + +# Versioning description +# ====================== +# +# - AT_NAME: Final build Advance Toolchain package name. +# +# - AT_MAJOR_VERSION: Changes whenever the compiler or the ABI changes. +# Should be in X.Y format, where X=compiler change, +# Y=ABI change within that compiler change cycle. All +# first major releases should be X.0. Then, if the ABI +# changes, increment the second digit (i.e. X.1). +# +# - AT_REVISION_NUMBER: The revision number. Starts at 0 and is incremented +# whenever a new official build that doesn't change the +# compiler version or the ABI is required. +# +# - AT_INTERNAL: Tag for internal releases (i.e. alpha, beta, rc). For +# GM or external releases, it should be "none". +# +# - AT_DIR_NAME: Optional name of the directory. If not defined, will +# use a combination of ATNAME, AT_MAJOR_VERSION, +# AT_INTERNAL and AT_REVISION_NUMBER. +# +# - AT_USE_FEDORA_RELNAM: Enable support for Fedora naming guidelines. Fedora +# guidelines requires that build tags (beta, RC) are +# used only on the RPM Release tag and packages are +# always upgradable, which means that their string +# $Version-$Release is always greater than the previous +# one. http://bit.ly/1fjIQCd +# This option also affects the name of the release notes +# file and the source code tarball. + +AT_NAME := ppc476-tools +AT_MAJOR_VERSION := 1.0 +AT_REVISION_NUMBER := 1 +AT_INTERNAL := none +AT_DIR_NAME := ppc476-tools +AT_USE_FEDORA_RELNAM := yes diff --git a/configs/ppc476-tools/build.mk b/configs/ppc476-tools/build.mk new file mode 100644 index 000000000..5f4b56976 --- /dev/null +++ b/configs/ppc476-tools/build.mk @@ -0,0 +1,61 @@ +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generic build support options +# ============================= +# Most of these options are self explanatory, Some highlights on obscure ones +# - BUILD_ARCH must contain the target toolchain arch (ppc64/ppc) +# - BUILD_CROSS_32 tell us to build (yes) or not (no) a cross on 32 bit system. +# - BUILD_LOAD_ARCH tell us the CPU base to use for loader compatibility (GLIBC). +# - BUILD_BASE_ARCH tell us the CPU base to use for base code generation (GCC). +# - BUILD_OPTIMIZATION tells which is the default base optimization level (GCC). +# - BUILD_WITH_LONGDOUBLE tells us to build with support for longdoubles. +# - BUILD_WITH_DFP_STANDALONE tells us to build with libdfp as standalone library. +# - BUILD_RPM_PACKAGER tells us the name / email of packager for this release. +# - BUILD_RPMS must be set to "granular" or "monolithic" to indicate the kind of +# rpms to be generated by the build script. See the documentation notes. +BUILD_ARCH := ppc +BUILD_CROSS_32 := yes +BUILD_LOAD_ARCH := power4 +BUILD_BASE_ARCH := 476fp +BUILD_OPTIMIZATION := 476fp +BUILD_WITH_LONGDOUBLE := yes +BUILD_WITH_DFP_STANDALONE := yes +BUILD_RPM_PACKAGER := +BUILD_RPM_VENDOR := +BUILD_RPMS := monolithic +BUILD_TARGET_POSTFIX := ppc476 +BUILD_GCC_LANGUAGES := c,c++,fortran + +# List supported CPUs to build for active, compat and embed +# ========================================================= +# - List of valid CPUs for active and compat: +# * power4, power5, power5+, power6, power6x and power7 +# - List of valid CPUs for embed: +# * ppc440, ppc476 and ppc476fp +BUILD_ACTIVE_MULTILIBS := ppc476fp + +# Download options +# ================ +# Should be either 'yes' or 'no'. Mostly self explanatory options. +# - BUILD_GET_SOURCES tell us to force grab sources +# - BUILD_GET_MPS tell us to grab patches from mailing lists +# - BUILD_GET_ADDONS tell us to grab related package addons +# - BUILD_EXCLUSIVE_CROSS tell us that the build is *exclusively* cross +# - BUILD_DEFAULT_RETRIES tell the default number of retries when fetching sources +BUILD_GET_SOURCES := yes +BUILD_GET_MPS := yes +BUILD_GET_ADDONS := yes +BUILD_EXCLUSIVE_CROSS := yes +BUILD_DEFAULT_RETRIES := 5 diff --git a/configs/ppc476-tools/distros/centos-6.mk b/configs/ppc476-tools/distros/centos-6.mk new file mode 120000 index 000000000..b8dd2bf9b --- /dev/null +++ b/configs/ppc476-tools/distros/centos-6.mk @@ -0,0 +1 @@ +redhat-6.mk \ No newline at end of file diff --git a/configs/ppc476-tools/distros/redhat-6.mk b/configs/ppc476-tools/distros/redhat-6.mk new file mode 100644 index 000000000..e10b3e65c --- /dev/null +++ b/configs/ppc476-tools/distros/redhat-6.mk @@ -0,0 +1,78 @@ +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Distro dependent basic definitions for RedHat Enterprise Server 6 +# ================================================================= +# This Makefile include contains the definitions for the distro being used +# for the build process. It contains kernel version infos and distro specific +# sanity checks. + +# Informs the distro supported power archs +AT_SUPPORTED_ARCHS := ppc64 + +# You may force the BUILD_IGNORE_AT_COMPAT general condition by distro +#BUILD_IGNORE_AT_COMPAT := yes + +# Kernel version to build toolchain against +AT_KERNEL := 3.2.14 # Current distro kernel version for runtime. +AT_OLD_KERNEL := 3.2.14 # Previous distro kernel version for runtime-compat. + +# Inform the mainly supported distros +AT_SUPPORTED_DISTROS := RHEL6 + +# Inform the compatibility suported distros +AT_COMPAT_DISTROS := + +# Sign the repository and packages +AT_SIGN_PKGS := yes +AT_SIGN_REPO := yes +AT_SIGN_PKGS_CROSS := yes +AT_SIGN_REPO_CROSS := yes + +# ID of GNUPG key used to sign our packages (main/compat) +AT_GPG_KEYID := 6976A827 +AT_GPG_KEYIDC := 6976A827 +AT_GPG_KEYIDL := 6976A827 +# ID of GNUPG key used to sign our repositories (main/compat) +AT_GPG_REPO_KEYID := 6976A827 +AT_GPG_REPO_KEYIDC := 6976A827 +AT_GPG_REPO_KEYIDL := 6976A827 + +# Options required by the command to update the repository metadata +AT_REPOCMD_OPTS := -p -s sha1 --simple-md-filenames --no-database + +# As some distros have special requirements for configuration upon final +# AT installation, put in this macro, the final configurations required +# after the main build and prior to the rpm build +define distro_final_config + echo "nothing to do." +endef + +# Inform the list of packages to check +ifndef AT_DISTRO_REQ_PKGS + AT_CROSS_PKGS_REQ := + AT_NATIVE_PKGS_REQ := \(ibm-java2-ppc64-sdk-5.0\|java-1.5.0-ibm-devel\) \ + libxslt popt-devel qt-devel + AT_COMMON_PKGS_REQ := zlib-devel ncurses-devel flex bison texinfo \ + createrepo + AT_CROSS_PGMS_REQ := + AT_NATIVE_PGMS_REQ := + AT_COMMON_PGMS_REQ := git_1.7 + AT_JAVA_VERSIONS := 5 +endif + +# If needed, define the necessary distro related sanity checks. +define distro_sanity + echo "nothing to test here" +endef diff --git a/configs/ppc476-tools/packages/binutils/binutils.mk b/configs/ppc476-tools/packages/binutils/binutils.mk new file mode 120000 index 000000000..32b96ff1b --- /dev/null +++ b/configs/ppc476-tools/packages/binutils/binutils.mk @@ -0,0 +1 @@ +../../../6.0/packages/binutils/binutils.mk \ No newline at end of file diff --git a/configs/ppc476-tools/packages/binutils/sources b/configs/ppc476-tools/packages/binutils/sources new file mode 100644 index 000000000..90367ad72 --- /dev/null +++ b/configs/ppc476-tools/packages/binutils/sources @@ -0,0 +1,43 @@ +#!/usr/bin/env bash +# +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# binutils source package and build info +# ====================================== +# + +ATSRC_PACKAGE_NAME="GNU Binutils" +ATSRC_PACKAGE_VER=2.23 +ATSRC_PACKAGE_REV=21c2b544 +ATSRC_PACKAGE_LICENSE="GPL 2.0" +ATSRC_PACKAGE_DOCLINK="http://sourceware.org/binutils/docs/" +ATSRC_PACKAGE_RELFIXES= +ATSRC_PACKAGE_STR_VER="${ATSRC_PACKAGE_NAME} ${ATSRC_PACKAGE_VER}-${ATSRC_PACKAGE_REV}" +ATSRC_PACKAGE_VERID="${ATSRC_PACKAGE_VER}${ATSRC_PACKAGE_REV:+-${ATSRC_PACKAGE_REV}}" +ATSRC_PACKAGE_PRE="test -d binutils-${ATSRC_PACKAGE_VERID}" +ATSRC_PACKAGE_CO=([0]="wget -O binutils-${ATSRC_PACKAGE_VERID}.tar.gz https://github.com/tuliom/at-binutils/archive/${ATSRC_PACKAGE_REV}.tar.gz") +ATSRC_PACKAGE_GIT="" +# Use --transform to give a better name to Binutils directory. +ATSRC_PACKAGE_POST="tar xzf binutils-${ATSRC_PACKAGE_VERID}.tar.gz --transform=s/at-binutils-${ATSRC_PACKAGE_REV}[^\\/]*/binutils-${ATSRC_PACKAGE_VERID}/" +ATSRC_PACKAGE_SRC=${AT_BASE}/sources/binutils-${ATSRC_PACKAGE_VERID} +ATSRC_PACKAGE_WORK=${AT_WORK_PATH}/binutils +ATSRC_PACKAGE_MLS= +ATSRC_PACKAGE_ALOC= +ATSRC_PACKAGE_PATCHES= +ATSRC_PACKAGE_TARS= +ATSRC_PACKAGE_DISTRIB=yes +ATSRC_PACKAGE_BUILDCROSS=yes +ATSRC_PACKAGE_BUNDLE=toolchain diff --git a/configs/ppc476-tools/packages/binutils/specfile b/configs/ppc476-tools/packages/binutils/specfile new file mode 120000 index 000000000..881210128 --- /dev/null +++ b/configs/ppc476-tools/packages/binutils/specfile @@ -0,0 +1 @@ +../../../6.0/packages/binutils/specfile \ No newline at end of file diff --git a/configs/ppc476-tools/packages/binutils/stage_1 b/configs/ppc476-tools/packages/binutils/stage_1 new file mode 120000 index 000000000..8187b016a --- /dev/null +++ b/configs/ppc476-tools/packages/binutils/stage_1 @@ -0,0 +1 @@ +../../../6.0/packages/binutils/stage_1 \ No newline at end of file diff --git a/configs/ppc476-tools/packages/binutils/stage_2 b/configs/ppc476-tools/packages/binutils/stage_2 new file mode 120000 index 000000000..3c451cd51 --- /dev/null +++ b/configs/ppc476-tools/packages/binutils/stage_2 @@ -0,0 +1 @@ +../../../6.0/packages/binutils/stage_2 \ No newline at end of file diff --git a/configs/ppc476-tools/packages/binutils/stage_3 b/configs/ppc476-tools/packages/binutils/stage_3 new file mode 120000 index 000000000..97dd316d8 --- /dev/null +++ b/configs/ppc476-tools/packages/binutils/stage_3 @@ -0,0 +1 @@ +../../../6.0/packages/binutils/stage_3 \ No newline at end of file diff --git a/configs/ppc476-tools/packages/expat/expat.mk b/configs/ppc476-tools/packages/expat/expat.mk new file mode 120000 index 000000000..be0d52613 --- /dev/null +++ b/configs/ppc476-tools/packages/expat/expat.mk @@ -0,0 +1 @@ +../../../6.0/packages/expat/expat.mk \ No newline at end of file diff --git a/configs/ppc476-tools/packages/expat/sources b/configs/ppc476-tools/packages/expat/sources new file mode 120000 index 000000000..cafea7195 --- /dev/null +++ b/configs/ppc476-tools/packages/expat/sources @@ -0,0 +1 @@ +../../../6.0/packages/expat/sources \ No newline at end of file diff --git a/configs/ppc476-tools/packages/expat/specfile b/configs/ppc476-tools/packages/expat/specfile new file mode 120000 index 000000000..a654fe2e5 --- /dev/null +++ b/configs/ppc476-tools/packages/expat/specfile @@ -0,0 +1 @@ +../../../6.0/packages/expat/specfile \ No newline at end of file diff --git a/configs/ppc476-tools/packages/expat/stage_1 b/configs/ppc476-tools/packages/expat/stage_1 new file mode 120000 index 000000000..1d671ad24 --- /dev/null +++ b/configs/ppc476-tools/packages/expat/stage_1 @@ -0,0 +1 @@ +../../../6.0/packages/expat/stage_1 \ No newline at end of file diff --git a/configs/ppc476-tools/packages/gcc/gcc.mk b/configs/ppc476-tools/packages/gcc/gcc.mk new file mode 120000 index 000000000..d4ea6aa7c --- /dev/null +++ b/configs/ppc476-tools/packages/gcc/gcc.mk @@ -0,0 +1 @@ +../../../6.0/packages/gcc/gcc.mk \ No newline at end of file diff --git a/configs/ppc476-tools/packages/gcc/sources b/configs/ppc476-tools/packages/gcc/sources new file mode 120000 index 000000000..b2a1d0054 --- /dev/null +++ b/configs/ppc476-tools/packages/gcc/sources @@ -0,0 +1 @@ +../../../6.0/packages/gcc/sources \ No newline at end of file diff --git a/configs/ppc476-tools/packages/gcc/specfile b/configs/ppc476-tools/packages/gcc/specfile new file mode 120000 index 000000000..deb7491b6 --- /dev/null +++ b/configs/ppc476-tools/packages/gcc/specfile @@ -0,0 +1 @@ +../../../6.0/packages/gcc/specfile \ No newline at end of file diff --git a/configs/ppc476-tools/packages/gcc/stage_1 b/configs/ppc476-tools/packages/gcc/stage_1 new file mode 100644 index 000000000..b759b3856 --- /dev/null +++ b/configs/ppc476-tools/packages/gcc/stage_1 @@ -0,0 +1,177 @@ +#!/usr/bin/env bash +# +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# GCC build parameters for stage 1 +# ================================ +# + +ATCFG_HOLD_TEMP_INSTALL='no' +ATCFG_HOLD_TEMP_BUILD='no' +# Build in a new directory +ATCFG_BUILD_STAGE_T='dir' + +# Required pre build hacks +atcfg_pre_hacks() { + # Overwrite the existing DEV-PHASE with AT_MAJOR_INTERNAL + mv ${ATSRC_PACKAGE_WORK}/gcc/DEV-PHASE ${ATSRC_PACKAGE_WORK}/gcc/DEV-PHASE.back + echo "${at_major_internal}" > ${ATSRC_PACKAGE_WORK}/gcc/DEV-PHASE + # Overwrite the existing REVISION with the current SVN revision date + mv ${ATSRC_PACKAGE_WORK}/gcc/REVISION ${ATSRC_PACKAGE_WORK}/gcc/REVISION.back + sed "s/[0-9]*]$/"${ATSRC_PACKAGE_REV}"]/" ${ATSRC_PACKAGE_WORK}/gcc/REVISION.back > ${ATSRC_PACKAGE_WORK}/gcc/REVISION +} + +# Pre configure settings or commands to run +atcfg_pre_configure() { + cc_64=${system_cc} + cxx_64=${system_cxx} + libdir="${at_dest}/lib" + if [[ "${cross_build}" == "no" ]]; then + if [[ "${build_arch}" == "ppc64" ]]; then + if [[ "${default_compiler}" == "32" ]]; then + cc_64="${gcc64}" + cxx_64="${gpp64}" + fi + libdir="${at_dest}/lib64" + fi + fi +} + +# Configure command +atcfg_configure() { + if [[ "${cross_build}" == "no" ]]; then + # Configure command for native builds + CC="${cc_64}" \ + CXX="${cxx_64}" \ + AS="${at_dest}/bin/as" \ + LD="${at_dest}/bin/ld" \ + ${ATSRC_PACKAGE_WORK}/configure \ + --build=${host} \ + --host=${host} \ + --target=${target} \ + --with-cpu=${default_cpu} \ + --prefix="${at_dest}" \ + ${secure_plt:+--enable-secureplt} \ + --disable-threads \ + --disable-shared \ + --disable-libmudflap \ + --disable-libssp \ + --disable-bootstrap \ + --disable-libgomp \ + --disable-lto \ + --with-mpfr-include="${at_dest}/include" \ + --with-mpfr-lib="${libdir}" \ + --with-gmp-include="${at_dest}/include" \ + --with-gmp-lib="${libdir}" \ + --with-mpc-include="${at_dest}/include" \ + --with-mpc-lib="${libdir}" \ + --enable-languages=c,c++ \ + --with-as="${at_dest}/bin/as" \ + --with-ld="${at_dest}/bin/ld" + else + # Configure command for cross builds + CC="${cc_64}" \ + CXX="${cxx_64}" \ + AS="${at_dest}/bin/${target}-as" \ + LD="${at_dest}/bin/${target}-ld" \ + AR="${at_dest}/bin/${target}-ar" \ + RANLIB="${at_dest}/bin/${target}-ranlib" \ + AS_FOR_TARGET="${at_dest}/bin/${target}-as" \ + AR_FOR_TARGET="${at_dest}/bin/${target}-ar" \ + RANLIB_FOR_TARGET="${at_dest}/bin/${target}-ranlib" \ + ${ATSRC_PACKAGE_WORK}/configure \ + --build=${host} \ + --host=${host} \ + --target=${target64:-${target}} \ + --with-cpu=${default_cpu} \ + --prefix="${at_dest}" \ + ${secure_plt:+--enable-secureplt} \ + --disable-threads \ + --disable-shared \ + --disable-libmudflap \ + --disable-libssp \ + --disable-bootstrap \ + --disable-libgomp \ + --disable-decimal-float \ + --disable-libquadmath \ + --with-mpfr-include="${at_dest}/include" \ + --with-mpfr-lib="${libdir}" \ + --with-gmp-include="${at_dest}/include" \ + --with-gmp-lib="${libdir}" \ + --with-mpc-include="${at_dest}/include" \ + --with-mpc-lib="${libdir}" \ + --enable-languages=c \ + --with-as="${at_dest}/bin/${target}-as" \ + --with-ld="${at_dest}/bin/${target}-ld" \ + --with-newlib \ + --without-headers + fi +} + +# Make build command +atcfg_make() { + ${SUB_MAKE} all +} + +# Pre install settings or commands to run +atcfg_pre_install() { + # The cross compiler must be able to install the target host binaries + # properly, but to do so it needs these folders created, as the + # binutils package will do so on its install. As our installs are + # atomic, we need to provide them before hand, so GCC finds it and + # places its files there properly. + if [[ "${cross_build}" == "yes" ]]; then + [[ -d "${install_place}/${at_dest}/${target}/bin" ]] || \ + mkdir -p "${install_place}/${at_dest}/${target}/bin" + [[ -d "${install_place}/${at_dest}/${target}/lib" ]] || \ + mkdir -p "${install_place}/${at_dest}/${target}/lib" + fi +} + +# Install build command +atcfg_install() { + make install -j1 DESTDIR=${install_place} +} + +# Post install settings or commands to run +atcfg_post_install() { + # Create the required symlinks to install + if [[ "${cross_build}" == "no" ]]; then + pushd ${install_place}/${at_dest}/bin + if [[ ! -e ${target}-gcc ]]; then + echo -e "#!/bin/bash\nexec ${at_dest}/bin/gcc \"${@}\"" > ${target}-gcc + chmod a+x ${target}-gcc + fi + if [[ ! -e ${target}-g++ ]]; then + echo -e "#!/bin/bash\nexec ${at_dest}/bin/g++ \"${@}\"" > ${target}-g++ + chmod a+x ${target}-g++ + fi + if [[ ! -e ${target}-c++ ]]; then + ln -f ${target}-g++ ${target}-c++ + fi + popd + # The following files will be installed by GLIBC, so no need to have them properly + # mapped into the filelist (not installed into ${install_place} for mapping) + if [[ ! -e "${at_dest}/lib/ld.so.1" ]]; then + ln -s /lib/ld.so.1 "${at_dest}/lib/ld.so.1" + fi + if [[ ! -e "${at_dest}/lib/libc.so.6" ]]; then + ln -s /lib/libc.so.6 "${at_dest}/lib/libc.so.6" + fi + # Remove unnecessary python scripts + find "${install_place}/${at_dest}" -name "libstdc++.so.*-gdb.py" -print -delete + fi +} diff --git a/configs/ppc476-tools/packages/gcc/stage_2 b/configs/ppc476-tools/packages/gcc/stage_2 new file mode 120000 index 000000000..57831852e --- /dev/null +++ b/configs/ppc476-tools/packages/gcc/stage_2 @@ -0,0 +1 @@ +../../../6.0/packages/gcc/stage_2 \ No newline at end of file diff --git a/configs/ppc476-tools/packages/gcc/stage_3 b/configs/ppc476-tools/packages/gcc/stage_3 new file mode 100644 index 000000000..79f58bdfb --- /dev/null +++ b/configs/ppc476-tools/packages/gcc/stage_3 @@ -0,0 +1,152 @@ +#!/usr/bin/env bash +# +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# GCC build parameters for stage 3 +# ================================ +# + +ATCFG_HOLD_TEMP_INSTALL='no' +ATCFG_HOLD_TEMP_BUILD='no' +# Build in a new directory +ATCFG_BUILD_STAGE_T='dir' +# Don't fail if stage final install place doesn't exist +if [[ "${cross_build}" == "yes" ]]; then + ATCFG_INSTALL_PEDANTIC="no" +fi + +# GCC BUILD HACKS +# ========================================================= +# Required pre build hacks +atcfg_pre_hacks() { + # Clean static lib hack done on gcc stage 2 for GLIBC build. + for Z in $(find "${at_dest}/lib" -name libgcc.a); do + if [[ -h ${Z%\.a}_s.a ]]; then + rm -f ${Z%\.a}_s.a + fi + done + # Should run only on a native build... Skip these on cross + if [[ "${cross_build}" == "no" ]]; then + # Hack required to avoid a bug where gcc picks up the wrong crti.o, + # causing ld to segfault in the stage3 build. We move the GCC required + # static libs to a separate place and use it in the build. + if [[ ! -d "${at_dest}/tmp/gcc_3" ]]; then + mkdir -p ${at_dest}/tmp/gcc_3 + fi + if [[ "${build_arch}" == "ppc64" ]]; then + cp -t ${at_dest}/tmp/gcc_3 \ + ${at_dest}/lib64/*gmp* \ + ${at_dest}/lib64/*mpfr* \ + ${at_dest}/lib64/*mpc* + else + cp -t ${at_dest}/tmp/gcc_3 \ + ${at_dest}/lib/*gmp* \ + ${at_dest}/lib/*mpfr* \ + ${at_dest}/lib/*mpc* + fi + fi +} +# Required post install hacks (this one is run after the final install move) +atcfg_posti_hacks() { + # Cleanup the temp files + rm -rf ${at_dest}/tmp +} + + +# ATCFG_CONFIGURE SETTINGS +# ========================================================= +# Conditional pre configure directives +atcfg_pre_configure() { + if [[ "${cross_build}" == "no" ]]; then + # native pre configure settings or commands to run + cc_64=${system_cc} + cxx_64=${system_cxx} + libdir="${at_dest}/tmp/gcc_3" + if [[ "${cross_build}" == "no" ]]; then + if [[ "${build_arch}" == "ppc64" ]]; then + if [[ "${default_compiler}" == "32" ]]; then + cc_64="${gcc64}" + cxx_64="${gpp64}" + fi + fi + fi + fi +} +# Conditional configure directives +atcfg_configure() { + if [[ "${cross_build}" == "no" ]]; then + # Native configure command for native builds + CC="${cc_64}" \ + CXX="${cxx_64}" \ + CFLAGS="-O2 -mminimal-toc" \ + CXXFLAGS="-O2 -mminimal-toc" \ + AS="${at_dest}/bin/as" \ + LD="${at_dest}/bin/ld" \ + LDFLAGS="-L${libdir}" \ + ${ATSRC_PACKAGE_WORK}/configure \ + --build=${target64:-$target} \ + --host=${target64:-$target} \ + --target=${target64:-$target} \ + --prefix="${at_dest}" \ + ${with_longdouble:+--with-long-double-128} \ + ${with_dfp_standalone:+--enable-decimal-float} \ + ${secure_plt:+--enable-secureplt} \ + --enable-threads=posix \ + --enable-languages=c,c++ \ + --enable-__cxa_atexit \ + --disable-shared \ + --enable-checking=release \ + --enable-gnu-indirect-function \ + --disable-libgomp \ + --with-gmp-include="${at_dest}/include" \ + --with-gmp-lib=${libdir} \ + --with-mpfr-include="${at_dest}/include" \ + --with-mpfr-lib=${libdir} \ + --with-mpc-include="${at_dest}/include" \ + --with-mpc-lib=${libdir} \ + --without-ppl \ + --without-cloog \ + --without-libelf \ + --with-host-libstdcxx="-L${libdir} -lstdc++ -lsupc++ -lm -lgmp -lgmpxx -lmpfr -lmpc" \ + --with-as="${at_dest}/bin/as" \ + --with-ld="${at_dest}/bin/ld" \ + --with-cpu=${build_base_arch} \ + --with-tune=${build_optimization} + fi +} + + +# ATCFG_MAKE SETTINGS +# ========================================================= +# Conditional build directives +atcfg_make() { + if [[ "${cross_build}" == "no" ]]; then + # Native make build command + ${SUB_MAKE} all + fi +} + + +# ATCFG_INSTALL SETTINGS +# ========================================================= +# Conditional install directives +atcfg_install() { + if [[ "${cross_build}" == "no" ]]; then + # Install build command + # GCC intermittently fails to install in parallel + make -j1 install DESTDIR=${install_place} + fi +} diff --git a/configs/ppc476-tools/packages/gcc/stage_4 b/configs/ppc476-tools/packages/gcc/stage_4 new file mode 100644 index 000000000..1c2964895 --- /dev/null +++ b/configs/ppc476-tools/packages/gcc/stage_4 @@ -0,0 +1,192 @@ +#!/usr/bin/env bash +# +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# GCC build parameters for stage 4 +# ================================ +# + +ATCFG_HOLD_TEMP_INSTALL='no' +ATCFG_HOLD_TEMP_BUILD='no' +# Build in a new directory +ATCFG_BUILD_STAGE_T='dir' + +# Conditional configure command +atcfg_configure() { + if [[ "${cross_build}" == "no" ]]; then + # Configure command for native builds + PATH=${at_dest}/bin:${PATH} \ + CC="${at_dest}/bin/gcc" \ + CFLAGS="-O2" \ + CXXFLAGS="-O2" \ + CFLAGS_FOR_TARGET="-O3" \ + CXXFLAGS_FOR_TARGET="-O3" \ + AS="${at_dest}/bin/as" \ + LD="${at_dest}/bin/ld" \ + LDFLAGS="-L${at_dest}/lib64" \ + ${ATSRC_PACKAGE_WORK}/configure \ + --build=${target64:-$target} \ + --host=${target64:-$target} \ + --target=${target64:-$target} \ + --with-cpu=${default_cpu} \ + --prefix="${at_dest}" \ + ${with_longdouble:+--with-long-double-128} \ + ${with_dfp_standalone:+--enable-decimal-float} \ + ${secure_plt:+--enable-secureplt} \ + --enable-threads=posix \ + --enable-languages=${build_gcc_languages} \ + --enable-__cxa_atexit \ + --disable-shared \ + --enable-checking=release \ + --enable-lto \ + --enable-gnu-indirect-function \ + --with-gmp-include="${at_dest}/include" \ + --with-gmp-lib="${at_dest}/lib64" \ + --with-mpfr-include="${at_dest}/include" \ + --with-mpfr-lib="${at_dest}/lib64" \ + --with-mpc-include="${at_dest}/include" \ + --with-mpc-lib="${at_dest}/lib64" \ + --without-ppl \ + --without-cloog \ + --without-libelf \ + --with-host-libstdcxx="-L${at_dest}/lib64 -lstdc++ -lsupc++ -lgmp -lgmpxx -lm" \ + --with-cpu=${build_base_arch} \ + --with-tune=${build_optimization} + else + # Configure command for cross builds + CC="${system_cc}" \ + CXX="${system_cxx}" \ + AS="${at_dest}/bin/${target}-as" \ + LD="${at_dest}/bin/${target}-ld" \ + NM="${at_dest}/bin/${target}-nm" \ + AR="${at_dest}/bin/${target}-ar" \ + RANLIB="${at_dest}/bin/${target}-ranlib" \ + AS_FOR_TARGET="${at_dest}/bin/${target}-as" \ + AR_FOR_TARGET="${at_dest}/bin/${target}-ar" \ + RANLIB_FOR_TARGET="${at_dest}/bin/${target}-ranlib" \ + NM_FOR_TARGET="${at_dest}/bin/${target}-nm" \ + ${ATSRC_PACKAGE_WORK}/configure \ + --build=${host} \ + --host=${host} \ + --target=${target64:-${target}} \ + --prefix="${at_dest}" \ + ${with_longdouble:+--with-long-double-128} \ + ${with_dfp:+--enable-decimal-float} \ + ${secure_plt:+--enable-secureplt} \ + --enable-threads=posix \ + --enable-languages=${build_gcc_languages} \ + --enable-__cxa_atexit \ + --disable-shared \ + --enable-lto \ + --enable-gnu-indirect-function \ + --enable-cross \ + --disable-bootstrap \ + --with-as="${at_dest}/bin/${target}-as" \ + --with-ld="${at_dest}/bin/${target}-ld" \ + --with-gmp-include="${at_dest}/include" \ + --with-gmp-lib="${at_dest}/lib" \ + --with-mpfr-include="${at_dest}/include" \ + --with-mpfr-lib="${at_dest}/lib" \ + --with-mpc-include="${at_dest}/include" \ + --with-mpc-lib="${at_dest}/lib" \ + --without-ppl \ + --without-cloog \ + --without-libelf \ + --with-sysroot="${dest_cross}" \ + --with-host-libstdcxx="-L${at_dest}/lib -lstdc++ -lsupc++ -lgmp -lgmpxx -lm" \ + --with-cpu=${build_base_arch} \ + --with-tune=${build_optimization} + fi +} + +# Conditional commands for native/cross builds +atcfg_pre_make() { + if [[ "${cross_build}" == "no" ]]; then + # Native pre make settings or commands + pushd ${ATSRC_PACKAGE_WORK} + if [[ -r ppc64-gcc-${ATSRC_PACKAGE_VER}-libstdc++.patch ]]; then + patch -p1 < ppc64-gcc-${ATSRC_PACKAGE_VER}-libstdc++.patch + if [[ ${?} -ne 0 ]]; then + echo "Error applying gcc libstdc++ patch!" + exit 1 + fi + else + echo "No gcc libstdc++ patch found!" + fi + popd + fi +} + +# Make build command +atcfg_make() { + if [[ "${cross_build}" == "no" ]]; then + # Native make build command + PATH=${at_dest}/bin:${PATH} ${SUB_MAKE} STAGE1_CFLAGS="-g -O" profiledbootstrap + else + # Cross make build command + PATH=${at_dest}/bin:${PATH} ${SUB_MAKE} STAGE1_CFLAGS="-g -O" + fi +} + +# Pre install settings or commands to run +atcfg_pre_install() { + # The cross compiler must be able to install the target host binaries + # properly, but to do so it needs these folders created, as the + # binutils package will do so on its install. As our installs are + # atomic, we need to provide them before hand, so GCC finds it and + # places its files there properly. + if [[ "${cross_build}" == "yes" ]]; then + [[ -d "${install_place}/${at_dest}/${target}/bin" ]] || \ + mkdir -p "${install_place}/${at_dest}/${target}/bin" + [[ -d "${install_place}/${at_dest}/${target}/lib" ]] || \ + mkdir -p "${install_place}/${at_dest}/${target}/lib" + fi +} + +# Install build command +# - GCC intermittently fails to install in parallel +atcfg_install() { + PATH=${at_dest}/bin:${PATH} \ + make -j1 install DESTDIR=${install_place} +} + +# Conditional post install settings or commands to run +atcfg_post_install() { + if [[ "${cross_build}" == "yes" ]]; then + # Cross post install commands to run + # Place some additional files for build process + mkdir -p ${install_place}/${dest_cross}/usr/lib + if [[ "${build_arch}" == "ppc64" ]]; then + # We need to manually copy these + cp -d ${install_place}/${at_dest}/${target64}/lib/libgcc_s.so* ${install_place}/${dest_cross}/usr/lib/ + cp -d ${install_place}/${at_dest}/${target64}/lib/libstdc++.so* ${install_place}/${dest_cross}/usr/lib/ + else + cp -d ${install_place}/${at_dest}/${target}/lib/libgcc_s.so* ${install_place}/${dest_cross}/usr/lib/ + cp -d ${install_place}/${at_dest}/${target}/lib/libstdc++.so* ${install_place}/${dest_cross}/usr/lib/ + fi + # This was needed to fix the cross build which defaults to ${target64} + # targets but now, we are assuming that every build should have the + # triple shortcut installed. So we create gcc ${target32}-* symlinks + pushd ${install_place}/${at_dest}/bin + for CMD in c++ cpp g++ gcc gcov gfortran; do + if [[ -x ${target64}-${CMD} ]] && \ + [[ ! -f ${target32}-${CMD} ]]; then + ln -sfn ${target64}-${CMD} ${target32}-${CMD} + fi + done + popd + fi +} diff --git a/configs/ppc476-tools/packages/gcc/stage_optimized b/configs/ppc476-tools/packages/gcc/stage_optimized new file mode 120000 index 000000000..2b281427d --- /dev/null +++ b/configs/ppc476-tools/packages/gcc/stage_optimized @@ -0,0 +1 @@ +../../../6.0/packages/gcc/stage_optimized \ No newline at end of file diff --git a/configs/ppc476-tools/packages/gdb/gdb.mk b/configs/ppc476-tools/packages/gdb/gdb.mk new file mode 120000 index 000000000..59359efaa --- /dev/null +++ b/configs/ppc476-tools/packages/gdb/gdb.mk @@ -0,0 +1 @@ +../../../6.0/packages/gdb/gdb.mk \ No newline at end of file diff --git a/configs/ppc476-tools/packages/gdb/sources b/configs/ppc476-tools/packages/gdb/sources new file mode 120000 index 000000000..d6128f941 --- /dev/null +++ b/configs/ppc476-tools/packages/gdb/sources @@ -0,0 +1 @@ +../../../6.0/packages/gdb/sources \ No newline at end of file diff --git a/configs/ppc476-tools/packages/gdb/specfile b/configs/ppc476-tools/packages/gdb/specfile new file mode 120000 index 000000000..734992f87 --- /dev/null +++ b/configs/ppc476-tools/packages/gdb/specfile @@ -0,0 +1 @@ +../../../6.0/packages/gdb/specfile \ No newline at end of file diff --git a/configs/ppc476-tools/packages/gdb/stage_1 b/configs/ppc476-tools/packages/gdb/stage_1 new file mode 120000 index 000000000..ea8b0b63d --- /dev/null +++ b/configs/ppc476-tools/packages/gdb/stage_1 @@ -0,0 +1 @@ +../../../6.0/packages/gdb/stage_1 \ No newline at end of file diff --git a/configs/ppc476-tools/packages/glibc/glibc.mk b/configs/ppc476-tools/packages/glibc/glibc.mk new file mode 120000 index 000000000..336f83a11 --- /dev/null +++ b/configs/ppc476-tools/packages/glibc/glibc.mk @@ -0,0 +1 @@ +../../../6.0/packages/glibc/glibc.mk \ No newline at end of file diff --git a/configs/ppc476-tools/packages/glibc/sources b/configs/ppc476-tools/packages/glibc/sources new file mode 100644 index 000000000..05a8dc091 --- /dev/null +++ b/configs/ppc476-tools/packages/glibc/sources @@ -0,0 +1,45 @@ +#!/usr/bin/env bash +# +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# GLIBC source package and build info +# =================================== +# + +ATSRC_PACKAGE_NAME="Embedded GLIBC" +ATSRC_PACKAGE_VER=2.15 +ATSRC_PACKAGE_REV=16510 +ATSRC_PACKAGE_STR_VER="${ATSRC_PACKAGE_NAME} ${ATSRC_PACKAGE_VER}-r${ATSRC_PACKAGE_REV}" +ATSRC_PACKAGE_LICENSE="LGPL 2.1" +ATSRC_PACKAGE_DOCLINK="http://www.gnu.org/software/libc/manual/html_node/index.html" +ATSRC_PACKAGE_PRE="test -d eglibc-${ATSRC_PACKAGE_VER}-${ATSRC_PACKAGE_REV}" +ATSRC_PACKAGE_CO=([0]="svn co --revision ${ATSRC_PACKAGE_REV} svn://svn.eglibc.org/branches/eglibc-2_15/libc") +ATSRC_PACKAGE_GIT="" +ATSRC_PACKAGE_POST="mv libc eglibc-${ATSRC_PACKAGE_VER}-${ATSRC_PACKAGE_REV}" +ATSRC_PACKAGE_SRC=${AT_BASE}/sources/eglibc-${ATSRC_PACKAGE_VER}-${ATSRC_PACKAGE_REV} +ATSRC_PACKAGE_WORK=${AT_WORK_PATH}/eglibc +ATSRC_PACKAGE_MLS= +ATSRC_PACKAGE_PATCHES='-p1 dynlink.patch + -p1 glibc-2.15-graphite.patch' +ATSRC_PACKAGE_ALOC='http://downloads.sourceforge.net/sourceforge/powertechprev/glibc-dynlink.tgz + http://downloads.sourceforge.net/sourceforge/powertechprev/glibc-2.15-graphite.tgz' +ATSRC_PACKAGE_TARS='glibc-dynlink.tgz + glibc-2.15-graphite.tgz' +ATSRC_PACKAGE_MAKE_CHECK= +ATSRC_PACKAGE_PORTS="" +ATSRC_PACKAGE_DISTRIB=yes +ATSRC_PACKAGE_BUILDCROSS=yes +ATSRC_PACKAGE_BUNDLE=toolchain diff --git a/configs/ppc476-tools/packages/glibc/specfile b/configs/ppc476-tools/packages/glibc/specfile new file mode 120000 index 000000000..c8fa9561e --- /dev/null +++ b/configs/ppc476-tools/packages/glibc/specfile @@ -0,0 +1 @@ +../../../6.0/packages/glibc/specfile \ No newline at end of file diff --git a/configs/ppc476-tools/packages/glibc/stage_1 b/configs/ppc476-tools/packages/glibc/stage_1 new file mode 100644 index 000000000..9ffabfdc4 --- /dev/null +++ b/configs/ppc476-tools/packages/glibc/stage_1 @@ -0,0 +1,167 @@ +#!/usr/bin/env bash +# +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# GLIBC build parameters for stage 1 32/64 bits +# ============================================= +# + +# We can't use the newly built gcc to compile glibc because it will set the +# dynamic linker to be ${dest}/lib/ld.so.1, which isn't installed until the +# glibc build finishes. So trying to run anything compiled with the new gcc +# will fail, in particular, glibc configure tests. I suppose you might be +# able to supply glibc configure with lots of libc_cv_* variables to +# avoid this, but then you'd forever be changing this script to keep up with +# new glibc configure tests. +# Note that dynamically linked programs built here with the old host gcc are +# subtly broken too; The glibc build sets their dynamic linker to +# ${dest}/lib/ld.so.1 but doesn't provide rpath. Which means you'll get the +# new ld.so trying to use the system libc.so, which doesn't work. ld.so and +# libc.so share data structures so are tightly coupled. To run the new +# programs, you need to set LD_LIBRARY_PATH for them, or better (so as to not +# affect forked commands that might need the system libs), run ld.so.1 +# explicitly, passing --library-path as is done for localedef below. +# This is one of the reasons why you need to build glibc twice. + +# Include some standard functions +source ${utilities}/bitsize_selection.sh + +ATCFG_HOLD_TEMP_INSTALL='no' +ATCFG_HOLD_TEMP_BUILD='no' +# Build in a new directory +ATCFG_BUILD_STAGE_T='dir' + +# GLIBC BUILD HACKS +# ========================================================= +# Required post build hacks (this one is run after the temp install step) +atcfg_post_hacks() { + local base_libdir=$(find_build_libdir ${AT_BIT_SIZE}) + local base_bindir=$(find_build_bindir ${AT_BIT_SIZE}) + if [[ "${cross_build}" == "no" ]]; then + # Generate the required locales for 32 bits GLIBC + mkdir -p "${install_transfer}/${base_libdir}/locale" + sed -n -e "/SUPPORTED-LOCALES/,$ s@\([^/]*\)/\([^ \\]*\).*@\1 \2@p" < \ + "${ATSRC_PACKAGE_WORK}/localedata/SUPPORTED" | sort | \ + while read l c x; do \ + echo localedef -i ${l%\.*} -f ${c} ${l} + "${install_transfer}/${base_libdir}/ld.so.1" --library-path "${install_transfer}/${base_libdir}" \ + "${install_transfer}/${base_bindir}/localedef" -i ${l%\.*} -f ${c} ${l} + done + unset locale l c x + fi +} + + +# ATCFG_CONFIGURE SETTINGS +# ========================================================= +# Conditional configure commands +atcfg_pre_configure() { + local base_libdir=$(find_build_libdir ${AT_BIT_SIZE}) + local base_bindir=$(find_build_bindir ${AT_BIT_SIZE}) + local base_sbindir=$(find_build_sbindir ${AT_BIT_SIZE}) + local base_libexecdir=$(find_build_libexecdir ${AT_BIT_SIZE}) + if [[ "${cross_build}" == "no" ]]; then + # Pre configure settings or commands to run + echo cross-compiling=yes > ./configparms + echo slibdir="${at_dest}/${base_libdir}" >> ./configparms + echo libdir="${at_dest}/${base_libdir}" >> ./configparms + echo bindir="${at_dest}/${base_bindir}" >> ./configparms + echo sbindir="${at_dest}/${base_sbindir}" >> ./configparms + echo libexecdir="${at_dest}/${base_libexecdir}" >> ./configparms + echo rootsbindir="${at_dest}/${base_sbindir}" >> ./configparms + else + # Pre configure settings or commands to run + echo cross-compiling=yes > ./configparms + fi +} +# Conditional configure commands +atcfg_configure() { + local base_target=$(find_build_target ${AT_BIT_SIZE}) + if [[ "${cross_build}" == "no" ]]; then + # Configure command for native builds + AUTOCONF="${autoconf}" \ + CC="${at_dest}/bin/gcc -m${AT_BIT_SIZE}" \ + CFLAGS="-g -O2 ${secure_plt:+-msecure-plt}" \ + libc_cv_forced_unwind="yes" \ + libc_cv_c_cleanup="yes" \ + ${ATSRC_PACKAGE_WORK}/configure --build=${host} \ + --host=${base_target} \ + --prefix="${at_dest}" \ + --with-headers="${at_dest}/include" \ + --enable-add-ons=nptl \ + --without-cvs \ + --enable-kernel="${kernel}" + else + # Configure command for cross builds + AUTOCONF="${autoconf}" \ + CC="${at_dest}/bin/${target64:-${target}}-gcc -m${AT_BIT_SIZE}" \ + CFLAGS="-g -O2" \ + AR="${at_dest}/bin/${target}-ar" \ + AS="${at_dest}/bin/${target}-as" \ + RANLIB="${at_dest}/bin/${target}-ranlib" \ + libc_cv_forced_unwind="yes" \ + libc_cv_c_cleanup="yes" libc_cv_ctors_header=yes \ + ${ATSRC_PACKAGE_WORK}/configure --build=${host} \ + --host=${base_target} \ + --prefix="/usr" \ + --without-cvs \ + --enable-add-ons=libidn,nptl \ + --disable-profile \ + --without-selinux \ + --enable-stackguard-randomization \ + --with-headers="${dest_cross}/usr/include" \ + --enable-multi-arch \ + --enable-kernel="${kernel}" \ + --without-gd \ + --with-cpu=${build_load_arch} + fi +} + + +# ATCFG_MAKE SETTINGS +# ========================================================= +# Make build command +atcfg_make() { + ${SUB_MAKE} +} + + +# ATCFG_INSTALL SETTINGS +# ========================================================= +# Conditional install command +atcfg_install() { + if [[ "${cross_build}" == "no" ]]; then + # Install build command + ${SUB_MAKE} install install_root="${install_place}" + else + # Install build command + ${SUB_MAKE} install install_root="${install_place}/${dest_cross}" + fi +} +# Conditional post install command +atcfg_post_install() { + if [[ "${cross_build}" == "no" ]]; then + # Post install settings or commands to run + rm -rf "${install_transfer}/var/db/Makefile" + # Remove static libraries (undesired on ppc476-tools) + find "${install_transfer}" -name "lib*.a" ! -name "lib*_nonshared.a" -delete + else + # Post install settings or commands to run + rm -rf "${install_place}/${dest_cross}/var/db/Makefile" + # Remove static libraries (undesired on ppc476-tools) + find "${install_transfer}" -name "lib*.a" ! -name "lib*_nonshared.a" -delete + fi +} diff --git a/configs/ppc476-tools/packages/glibc/stage_2 b/configs/ppc476-tools/packages/glibc/stage_2 new file mode 100644 index 000000000..d86053fd1 --- /dev/null +++ b/configs/ppc476-tools/packages/glibc/stage_2 @@ -0,0 +1,128 @@ +#!/usr/bin/env bash +# +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# GLIBC build parameters for stage 2 32 bits +# ========================================== +# + +# The build of glibc was almost full featured. In this build the new GCC is +# used to compile a highly optimized glibc with all the required features. + +# Include some standard functions +source ${utilities}/bitsize_selection.sh + +ATCFG_HOLD_TEMP_INSTALL='no' +ATCFG_HOLD_TEMP_BUILD='no' +# Build in a new directory +ATCFG_BUILD_STAGE_T='dir' + +# GLIBC BUILD HACKS +# ========================================================= +# Required pre build hacks +atcfg_pre_hacks() { + # Hack the glibc source so that the -rpath option we add on all shared libs + # and executable wont bomb ld.so, which checks that -rpath is not given. + s1="s@assert (\(info\[DT_R.*PATH\]\) == NULL)@\1 = NULL@" + for F in "${ATSRC_PACKAGE_WORK}/elf/dynamic-link.h"; do + sed -e "${s1}" < "${F}" > tmp.$$ \ + && { cmp -s tmp.$$ "${F}" || mv -f tmp.$$ "${F}"; } || exit 1 + rm -f tmp.$$ + done +} + + +# ATCFG_CONFIGURE SETTINGS +# ========================================================= +# Pre configure settings or commands to run +atcfg_pre_configure() { + local base_libdir=$(find_build_libdir ${AT_BIT_SIZE}) + local base_bindir=$(find_build_bindir ${AT_BIT_SIZE}) + local base_sbindir=$(find_build_sbindir ${AT_BIT_SIZE}) + local base_libexecdir=$(find_build_libexecdir ${AT_BIT_SIZE}) + echo slibdir="${at_dest}/${base_libdir}" > ./configparms + echo libdir="${at_dest}/${base_libdir}" >> ./configparms + echo bindir="${at_dest}/${base_bindir}" >> ./configparms + echo sbindir="${at_dest}/${base_sbindir}" >> ./configparms + echo libexecdir="${at_dest}/${base_libexecdir}" >> ./configparms + echo rootsbindir="${at_dest}/${base_sbindir}" >> ./configparms + echo cross-compiling=no >> ./configparms +} +# Configure command for native builds +atcfg_configure() { + local base_target=$(find_build_target ${AT_BIT_SIZE}) + PATH=${at_dest}/bin:${PATH} \ + AUTOCONF="${autoconf}" \ + CC="${at_dest}/bin/gcc -m${AT_BIT_SIZE}" \ + CXX="${at_dest}/bin/g++ -m${AT_BIT_SIZE}" \ + CFLAGS="-g -O3 ${with_longdouble:+-mlong-double-128}" \ + CXXFLAGS="-g -O3" \ + ${ATSRC_PACKAGE_WORK}/configure --build=${host} \ + --host=${base_target} \ + --prefix="${at_dest}" \ + --without-cvs \ + --enable-add-ons=libidn,nptl \ + --without-selinux \ + --enable-stackguard-randomization \ + --with-headers="${at_dest}/include" \ + --enable-shared \ + --enable-multi-arch \ + --with-cpu=${build_load_arch/ppc/} \ + --enable-kernel="${kernel}" +} + + +# ATCFG_MAKE SETTINGS +# ========================================================= +# Make build command +atcfg_make() { + PATH=${at_dest}/bin:${PATH} ${SUB_MAKE} +} + + +# ATCFG_INSTALL SETTINGS +# ========================================================= +# Conditional install command +atcfg_install() { + if [[ "${cross_build}" == "no" ]]; then + # Install build command + PATH=${at_dest}/bin:${PATH} ${SUB_MAKE} install install_root="${install_place}" + else + # Install build command + PATH=${at_dest}/bin:${PATH} ${SUB_MAKE} install install_root="${install_place}/${dest_cross}" + fi +} +# Conditional post install command +atcfg_post_install() { + if [[ "${cross_build}" == "no" ]]; then + # Post install settings or commands to run + # Remove unused Makefile from install + rm -rf "${install_transfer}/var/db/Makefile" + # Removing the created ld.so.cache to avoid further problems + rm -rf "${install_transfer}/etc/ld.so.cache" + # Remove static libraries (undesired on ppc476-tools) + find "${install_transfer}" -name "lib*.a" ! -name "lib*_nonshared.a" -delete + else + # Post install settings or commands to run + # Remove unused Makefile from install + rm -rf "${install_place}/${dest_cross}/var/db/Makefile" + # Removing the created ld.so.cache to avoid further problems + rm -rf "${install_place}/${dest_cross}/etc/ld.so.cache" + # Remove static libraries (undesired on ppc476-tools) + find "${install_transfer}" -name "lib*.a" \ + ! -name "lib*_nonshared.a" -delete + fi +} diff --git a/configs/ppc476-tools/packages/glibc/stage_compat b/configs/ppc476-tools/packages/glibc/stage_compat new file mode 120000 index 000000000..5650a35af --- /dev/null +++ b/configs/ppc476-tools/packages/glibc/stage_compat @@ -0,0 +1 @@ +../../../6.0/packages/glibc/stage_compat \ No newline at end of file diff --git a/configs/ppc476-tools/packages/glibc/stage_h b/configs/ppc476-tools/packages/glibc/stage_h new file mode 100644 index 000000000..eb75f30ef --- /dev/null +++ b/configs/ppc476-tools/packages/glibc/stage_h @@ -0,0 +1,140 @@ +#!/usr/bin/env bash +# +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# GLIBC build parameters for the header stage 32/64 bits +# ============================================= +# + +# Preparation for the second gcc build. The first stage gcc isn't able to +# build the next components properly. We need to setup glibc headers and some +# glibc objects in order to build a self-contained compiler. + +# Include some standard functions +source ${utilities}/bitsize_selection.sh + +ATCFG_HOLD_TEMP_INSTALL='no' +ATCFG_HOLD_TEMP_BUILD='no' +# Build in a new directory +ATCFG_BUILD_STAGE_T='dir' + +# ATCFG_CONFIGURE SETTINGS +# ========================================================= +# Pre configure settings or commands to run +atcfg_pre_configure() { + echo cross-compiling=yes > ./configparms +} +# Conditional configure command +atcfg_configure() { + local base_target=$(find_build_target ${AT_BIT_SIZE}) + if [[ "${cross_build}" == "no" ]]; then + # Configure command for native builds + AUTOCONF=${autoconf} \ + CC="${at_dest}/bin/gcc -m${AT_BIT_SIZE}" \ + CFLAGS="-g -O2" \ + libc_cv_forced_unwind="yes" \ + libc_cv_c_cleanup="yes" \ + ${ATSRC_PACKAGE_WORK}/configure --build=${host} \ + --host=${base_target} \ + --prefix=${at_dest} \ + --with-headers="${at_dest}/include" \ + --with-tls \ + --without-fp \ + --disable-profile \ + --disable-sanity-checks \ + --enable-add-ons=nptl \ + --without-cvs + else + # Configure command for cross builds + AUTOCONF=${autoconf} \ + CC="${at_dest}/bin/${target64:-${target}}-gcc -m${AT_BIT_SIZE}" \ + CFLAGS="-g -O2" \ + AR="${at_dest}/bin/${target}-ar" \ + AS="${at_dest}/bin/${target}-as" \ + RANLIB="${at_dest}/bin/${target}-ranlib" \ + libc_cv_forced_unwind="yes" \ + libc_cv_c_cleanup="yes" libc_cv_ctors_header=yes \ + ${ATSRC_PACKAGE_WORK}/configure --build=${host} \ + --host=${base_target} \ + --prefix="/usr" \ + --with-headers="${dest_cross}/usr/include" \ + --with-tls \ + --disable-profile \ + --disable-sanity-checks \ + --enable-add-ons=nptl \ + --without-cvs + fi +} + + +# ATCFG_MAKE SETTINGS +# ========================================================= +# Conditional make command +atcfg_make() { + if [[ "${cross_build}" == "yes" ]]; then + # Cross make build command + # We need to build the following in order to link shared libraries: + make csu/subdir_lib + fi +} + + +# ATCFG_INSTALL SETTINGS +# ========================================================= +# Conditional install command +atcfg_install() { + if [[ "${cross_build}" == "no" ]]; then + # Install build command + ${SUB_MAKE} install-headers install_root="${install_place}" install-bootstrap-headers="yes" + else + # Install build command + ${SUB_MAKE} install-headers install_root="${install_place}/${dest_cross}" install-bootstrap-headers="yes" + fi +} +# Conditional post install command +atcfg_post_install() { + local base_libdir=$(find_build_libdir ${AT_BIT_SIZE}) + if [[ "${cross_build}" == "no" ]]; then + # Post install settings or commands to run + # The following is required because these two files arent copied + # by make install-headers: + [[ ! -d "${install_place}/${at_dest}/include/bits" ]] && \ + mkdir -p ${install_place}/${at_dest}/include/bits + cp bits/stdio_lim.h ${install_place}/${at_dest}/include/bits/ + [[ ! -d "${install_place}/${at_dest}/include/gnu" ]] && \ + mkdir -p ${install_place}/${at_dest}/include/gnu + cp ${ATSRC_PACKAGE_WORK}/include/gnu/stubs.h ${install_place}/${at_dest}/include/gnu/ + else + # Post install settings or commands to run + # The following is required because these two files arent copied + # by make install-headers: + [[ ! -d "${install_place}/${dest_cross}/usr/include/bits" ]] && \ + mkdir -p ${install_place}/${dest_cross}/usr/include/bits + cp bits/stdio_lim.h ${install_place}/${dest_cross}/usr/include/bits/ + [[ ! -d "${install_place}/${dest_cross}/usr/include/gnu" ]] && \ + mkdir -p ${install_place}/${dest_cross}/usr/include/gnu + cp ${ATSRC_PACKAGE_WORK}/include/gnu/stubs.h ${install_place}/${dest_cross}/usr/include/gnu/ + [[ ! -d "${install_place}/${dest_cross}/usr/${base_libdir}" ]] && \ + mkdir -p ${install_place}/${dest_cross}/usr/${base_libdir} + cp csu/crt1.o csu/crti.o csu/crtn.o ${install_place}/${dest_cross}/usr/${base_libdir}/ + # "libgcc_s.so" requires a "libc.so" to link against. However, + # since we will never actually execute its code, it doesnt matter what + # it contains. So, treating "/dev/null" as a C source file, we produce + # a dummy "libc.so": + ${at_dest}/bin/${target64:-${target}}-gcc -nostdlib -m${AT_BIT_SIZE} -nostartfiles \ + -shared -x c /dev/null -o ${install_place}/${dest_cross}/usr/${base_libdir}/libc.so + fi +} diff --git a/configs/ppc476-tools/packages/glibc/stage_optimized b/configs/ppc476-tools/packages/glibc/stage_optimized new file mode 120000 index 000000000..2b898f702 --- /dev/null +++ b/configs/ppc476-tools/packages/glibc/stage_optimized @@ -0,0 +1 @@ +../../../6.0/packages/glibc/stage_optimized \ No newline at end of file diff --git a/configs/ppc476-tools/packages/gmp/gmp.mk b/configs/ppc476-tools/packages/gmp/gmp.mk new file mode 120000 index 000000000..0f2a4ea23 --- /dev/null +++ b/configs/ppc476-tools/packages/gmp/gmp.mk @@ -0,0 +1 @@ +../../../6.0/packages/gmp/gmp.mk \ No newline at end of file diff --git a/configs/ppc476-tools/packages/gmp/sources b/configs/ppc476-tools/packages/gmp/sources new file mode 120000 index 000000000..94581d07a --- /dev/null +++ b/configs/ppc476-tools/packages/gmp/sources @@ -0,0 +1 @@ +../../../6.0/packages/gmp/sources \ No newline at end of file diff --git a/configs/ppc476-tools/packages/gmp/specfile b/configs/ppc476-tools/packages/gmp/specfile new file mode 120000 index 000000000..cea92b6dc --- /dev/null +++ b/configs/ppc476-tools/packages/gmp/specfile @@ -0,0 +1 @@ +../../../6.0/packages/gmp/specfile \ No newline at end of file diff --git a/configs/ppc476-tools/packages/gmp/stage_1 b/configs/ppc476-tools/packages/gmp/stage_1 new file mode 120000 index 000000000..86bbf6902 --- /dev/null +++ b/configs/ppc476-tools/packages/gmp/stage_1 @@ -0,0 +1 @@ +../../../6.0/packages/gmp/stage_1 \ No newline at end of file diff --git a/configs/ppc476-tools/packages/gmp/stage_2 b/configs/ppc476-tools/packages/gmp/stage_2 new file mode 120000 index 000000000..4d1183b52 --- /dev/null +++ b/configs/ppc476-tools/packages/gmp/stage_2 @@ -0,0 +1 @@ +../../../6.0/packages/gmp/stage_2 \ No newline at end of file diff --git a/configs/ppc476-tools/packages/groups b/configs/ppc476-tools/packages/groups new file mode 100644 index 000000000..b08ca56ce --- /dev/null +++ b/configs/ppc476-tools/packages/groups @@ -0,0 +1,17 @@ +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +toolchain:Base toolchain packages with additional support libraries, including some additional floating point support libraries +profile:Additional performance and debugging tools +mcore-libs:Additional multi core support libraries diff --git a/configs/ppc476-tools/packages/kernel/kernel.mk b/configs/ppc476-tools/packages/kernel/kernel.mk new file mode 120000 index 000000000..47d120bc8 --- /dev/null +++ b/configs/ppc476-tools/packages/kernel/kernel.mk @@ -0,0 +1 @@ +../../../6.0/packages/kernel/kernel.mk \ No newline at end of file diff --git a/configs/ppc476-tools/packages/kernel/sources b/configs/ppc476-tools/packages/kernel/sources new file mode 100644 index 000000000..133ad6979 --- /dev/null +++ b/configs/ppc476-tools/packages/kernel/sources @@ -0,0 +1,40 @@ +#!/usr/bin/env bash +# +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# KERNEL source package and build info +# ==================================== +# + +ATSRC_PACKAGE_NAME="Linux kernel" +ATSRC_PACKAGE_VER=3.2.14 +ATSRC_PACKAGE_STR_VER="${ATSRC_PACKAGE_NAME} ${ATSRC_PACKAGE_VER}" +ATSRC_PACKAGE_LICENSE="GPL 2.0" +ATSRC_PACKAGE_DOCLINK="https://www.kernel.org/doc/" +ATSRC_PACKAGE_PRE="test -d linux-${ATSRC_PACKAGE_VER}" +ATSRC_PACKAGE_CO=([0]="wget -N http://www.kernel.org/pub/linux/kernel/v3.0/linux-${ATSRC_PACKAGE_VER}.tar.bz2") +ATSRC_PACKAGE_POST="tar -xjf linux-${ATSRC_PACKAGE_VER}.tar.bz2" +ATSRC_PACKAGE_SRC=${AT_BASE}/sources/linux-${ATSRC_PACKAGE_VER} +ATSRC_PACKAGE_WORK=${AT_WORK_PATH}/kernel +ATSRC_PACKAGE_MLS= +ATSRC_PACKAGE_ALOC= +ATSRC_PACKAGE_PATCHES= +ATSRC_PACKAGE_TARS= +ATSRC_PACKAGE_DISTRIB=yes +ATSRC_PACKAGE_INCLUDED=yes +ATSRC_PACKAGE_BUILDCROSS=yes +ATSRC_PACKAGE_BUNDLE=toolchain +ATSRC_PACKAGE_EXCLUDE_RN=yes diff --git a/configs/ppc476-tools/packages/kernel/specfile b/configs/ppc476-tools/packages/kernel/specfile new file mode 120000 index 000000000..3469adcf3 --- /dev/null +++ b/configs/ppc476-tools/packages/kernel/specfile @@ -0,0 +1 @@ +../../../6.0/packages/kernel/specfile \ No newline at end of file diff --git a/configs/ppc476-tools/packages/kernel/stage_h b/configs/ppc476-tools/packages/kernel/stage_h new file mode 120000 index 000000000..0ae1afc58 --- /dev/null +++ b/configs/ppc476-tools/packages/kernel/stage_h @@ -0,0 +1 @@ +../../../6.0/packages/kernel/stage_h \ No newline at end of file diff --git a/configs/ppc476-tools/packages/mpc/mpc.mk b/configs/ppc476-tools/packages/mpc/mpc.mk new file mode 120000 index 000000000..dcd42d33f --- /dev/null +++ b/configs/ppc476-tools/packages/mpc/mpc.mk @@ -0,0 +1 @@ +../../../6.0/packages/mpc/mpc.mk \ No newline at end of file diff --git a/configs/ppc476-tools/packages/mpc/sources b/configs/ppc476-tools/packages/mpc/sources new file mode 120000 index 000000000..6c8cce521 --- /dev/null +++ b/configs/ppc476-tools/packages/mpc/sources @@ -0,0 +1 @@ +../../../6.0/packages/mpc/sources \ No newline at end of file diff --git a/configs/ppc476-tools/packages/mpc/specfile b/configs/ppc476-tools/packages/mpc/specfile new file mode 120000 index 000000000..020c08f6b --- /dev/null +++ b/configs/ppc476-tools/packages/mpc/specfile @@ -0,0 +1 @@ +../../../6.0/packages/mpc/specfile \ No newline at end of file diff --git a/configs/ppc476-tools/packages/mpc/stage_1 b/configs/ppc476-tools/packages/mpc/stage_1 new file mode 120000 index 000000000..b9cad3bc6 --- /dev/null +++ b/configs/ppc476-tools/packages/mpc/stage_1 @@ -0,0 +1 @@ +../../../6.0/packages/mpc/stage_1 \ No newline at end of file diff --git a/configs/ppc476-tools/packages/mpc/stage_2 b/configs/ppc476-tools/packages/mpc/stage_2 new file mode 120000 index 000000000..524137bc8 --- /dev/null +++ b/configs/ppc476-tools/packages/mpc/stage_2 @@ -0,0 +1 @@ +../../../6.0/packages/mpc/stage_2 \ No newline at end of file diff --git a/configs/ppc476-tools/packages/mpfr/mpfr.mk b/configs/ppc476-tools/packages/mpfr/mpfr.mk new file mode 120000 index 000000000..269e6f5e2 --- /dev/null +++ b/configs/ppc476-tools/packages/mpfr/mpfr.mk @@ -0,0 +1 @@ +../../../6.0/packages/mpfr/mpfr.mk \ No newline at end of file diff --git a/configs/ppc476-tools/packages/mpfr/sources b/configs/ppc476-tools/packages/mpfr/sources new file mode 120000 index 000000000..43000d88d --- /dev/null +++ b/configs/ppc476-tools/packages/mpfr/sources @@ -0,0 +1 @@ +../../../6.0/packages/mpfr/sources \ No newline at end of file diff --git a/configs/ppc476-tools/packages/mpfr/specfile b/configs/ppc476-tools/packages/mpfr/specfile new file mode 120000 index 000000000..79b5daf33 --- /dev/null +++ b/configs/ppc476-tools/packages/mpfr/specfile @@ -0,0 +1 @@ +../../../6.0/packages/mpfr/specfile \ No newline at end of file diff --git a/configs/ppc476-tools/packages/mpfr/stage_1 b/configs/ppc476-tools/packages/mpfr/stage_1 new file mode 120000 index 000000000..440dc9ce4 --- /dev/null +++ b/configs/ppc476-tools/packages/mpfr/stage_1 @@ -0,0 +1 @@ +../../../6.0/packages/mpfr/stage_1 \ No newline at end of file diff --git a/configs/ppc476-tools/packages/mpfr/stage_2 b/configs/ppc476-tools/packages/mpfr/stage_2 new file mode 120000 index 000000000..05266ff9e --- /dev/null +++ b/configs/ppc476-tools/packages/mpfr/stage_2 @@ -0,0 +1 @@ +../../../6.0/packages/mpfr/stage_2 \ No newline at end of file diff --git a/configs/ppc476-tools/packages/python/python.mk b/configs/ppc476-tools/packages/python/python.mk new file mode 120000 index 000000000..fcfeba629 --- /dev/null +++ b/configs/ppc476-tools/packages/python/python.mk @@ -0,0 +1 @@ +../../../6.0/packages/python/python.mk \ No newline at end of file diff --git a/configs/ppc476-tools/packages/python/sources b/configs/ppc476-tools/packages/python/sources new file mode 120000 index 000000000..e4c7421dc --- /dev/null +++ b/configs/ppc476-tools/packages/python/sources @@ -0,0 +1 @@ +../../../6.0/packages/python/sources \ No newline at end of file diff --git a/configs/ppc476-tools/packages/python/specfile b/configs/ppc476-tools/packages/python/specfile new file mode 120000 index 000000000..9b0cdbc36 --- /dev/null +++ b/configs/ppc476-tools/packages/python/specfile @@ -0,0 +1 @@ +../../../6.0/packages/python/specfile \ No newline at end of file diff --git a/configs/ppc476-tools/packages/python/stage_1 b/configs/ppc476-tools/packages/python/stage_1 new file mode 120000 index 000000000..57f5d695f --- /dev/null +++ b/configs/ppc476-tools/packages/python/stage_1 @@ -0,0 +1 @@ +../../../6.0/packages/python/stage_1 \ No newline at end of file diff --git a/configs/ppc476-tools/release_notes/release_notes-body.html b/configs/ppc476-tools/release_notes/release_notes-body.html new file mode 100644 index 000000000..8b5290200 --- /dev/null +++ b/configs/ppc476-tools/release_notes/release_notes-body.html @@ -0,0 +1,92 @@ + + + + + + + + Release Notes for ppc476-tools Version __VERSION_RELEASE__ + + + +
    +
    + +

    Release Notes for
    ppc476-tools Version __VERSION_RELEASE__

    +
    +
    + | Features + | Installation + | Documentation + | Legal Notices | +
    +
    + __FEATURES__ + back to top +
    + +

    Installation

    +

    The gpg public key gpg-pubkey-xxxxxxxx-xxxxxxxx will be provided in the repository where these release notes were found. This pubkey can be used to verify the authenticity of both the ppc476-tools rpms and the repository contents.

    +

    Download this gpg-pubkey and import it into your rpm database using the following:

    +

    + wget ftp://ftp.unicamp.br/pub/linuxpatch/toolchain/ppc476-tools/redhat/RHEL6/gpg-pubkey-xxxxxxxx-xxxxxxxx
    + rpm --import gpg-pubkey-xxxxxxxx-xxxxxxxx +

    + __INST__ +

    Manual installation

    +

    If you are installing the rpms manually, make sure to install the dependencies before installing it. You can get a list of dependencies by running:

    +

    + rpm -qR -p ppc476-tools-cross-__VERSION_RELEASE__.1.i686.rpm
    +

    +

    After installing all the required dependencies, execute the following command as root to install it:

    +

    + rpm -ivh ppc476-tools-cross-__VERSION_RELEASE__.1.i686.rpm
    +

    +

    The rpm command should always be run as root. Failure to do so will result in an error similar to this:

    +

    + error: can't create transaction lock on /var/lib/rpm/__db.000 +

    + back to top +
    + + +

    Documentation

    +

    Workaround for the 476 icache bug

    +

    The linker of ppc476-tools provides a workaround to a 476 instruction cache bug by adding the parameters --ppc476-workaround[=pagesize] and --no-ppc476-workaround.

    +

    When using --ppc476-workaround, the last instruction of a page is replaced by a branch to a patch area which has the expected instruction and a branch back to the next page. --ppc476-workaround is enabled by default and the default page size is 4096 bytes.

    +

    Customers can either override the default page size (4096 bytes) by specifying --ppc476-workaround=<pagesize>, or disable the workaround completely by using --no-ppc476-workaround.

    + back to top +
    + + +

    Legal notices

    + +

    In order to comply with the GPL and LGPL licenses, the source code for the following packages is available:

    +
      +
    • binutils
    • +
    • gcc
    • +
    • gdb
    • +
    • EGLIBC
    • +
    • gmp
    • +
    • linux kernel
    • +
    • mpc
    • +
    • mpfr
    • +
    +

    Please look for the ppc476-tools-src-__VERSION_RELEASE__.tgz file in the repository.

    + +

    Expat
    + Copyright (c) 1998, 1999, 2000 Thai Open Source Software Center Ltd and Clark Cooper
    + Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006 Expat maintainers.

    +

    + Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
    +
    + The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
    +
    + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +

    +
    +
    + + diff --git a/configs/ppc476-tools/release_notes/release_notes-features.html b/configs/ppc476-tools/release_notes/release_notes-features.html new file mode 100644 index 000000000..dd4de7c22 --- /dev/null +++ b/configs/ppc476-tools/release_notes/release_notes-features.html @@ -0,0 +1,7 @@ + +

    Features in __VERSION_RELEASE__

    +
      +
    • The ppc476-tools is a self contained cross-compiler toolchain for PowerPC 476 processors.
    • + __GROUPS_ENTRIES__ + __AT_FEATURES__ +
    diff --git a/configs/ppc476-tools/release_notes/release_notes-group_entry.html b/configs/ppc476-tools/release_notes/release_notes-group_entry.html new file mode 100644 index 000000000..da081cf9d --- /dev/null +++ b/configs/ppc476-tools/release_notes/release_notes-group_entry.html @@ -0,0 +1,4 @@ +
  • __GROUP_DEFINITION__: +
      + __PACKAGE_LINES__ +
  • diff --git a/configs/ppc476-tools/release_notes/release_notes-inst.html b/configs/ppc476-tools/release_notes/release_notes-inst.html new file mode 100644 index 000000000..52b66422b --- /dev/null +++ b/configs/ppc476-tools/release_notes/release_notes-inst.html @@ -0,0 +1,24 @@ + diff --git a/configs/ppc476-tools/release_notes/release_notes-online_doc.html b/configs/ppc476-tools/release_notes/release_notes-online_doc.html new file mode 100644 index 000000000..1a534cd29 --- /dev/null +++ b/configs/ppc476-tools/release_notes/release_notes-online_doc.html @@ -0,0 +1 @@ +online docs \ No newline at end of file diff --git a/configs/ppc476-tools/release_notes/release_notes-package_line.html b/configs/ppc476-tools/release_notes/release_notes-package_line.html new file mode 100644 index 000000000..527702dfc --- /dev/null +++ b/configs/ppc476-tools/release_notes/release_notes-package_line.html @@ -0,0 +1 @@ +
  • __PACKAGE_NAME__ - __PACKAGE_VERSION____PACKAGE_NAME_SUFFIX____ONLINE_DOCS__
  • diff --git a/configs/ppc476-tools/release_notes/release_notes-style.html b/configs/ppc476-tools/release_notes/release_notes-style.html new file mode 100644 index 000000000..bce293ca6 --- /dev/null +++ b/configs/ppc476-tools/release_notes/release_notes-style.html @@ -0,0 +1,71 @@ + a.link { + font-family:"Lucida Sans Unicode", "Lucida Grande", sans-serif; + color:#0099FF; + font-size:12px; + text-align:justify; + } + body { + background-color:#404040; + } + h1 { + font-family:Georgia, serif; + color:black; + text-align:center; + } + h2 { + font-family:Georgia, serif; + color:#404040; + text-align:left; + } + h3 { + font-family:Georgia, serif; + color:#606060; + text-align:left; + } + li { + color:black; + font-family:"Lucida Sans Unicode", "Lucida Grande", sans-serif; + font-size:12px; + text-align:justify; + } + p { + color:black; + font-family:"Lucida Sans Unicode", "Lucida Grande", sans-serif; + font-size:12px; + text-align:justify; + } + p.code { + color:#333333; + font-family:"Courier New", Courier, monospace; + font-size:12px; + text-align:left; + } + p.codebox { + color:#303030; + background-color:#F8F8F8; + font-family:"Courier New", Courier, monospace; + font-size:12px; + text-align:left; + margin:10px white; + border:2px outset #A0A0A0; + width:75%; + padding:12px; + } + p.menu { + color:black; + font-family:"Lucida Sans Unicode", "Lucida Grande", sans-serif; + font-size:12px; + text-align:center; + } + span.code { + color:#333333; + font-family:"Courier New", Courier, monospace; + font-size:12px; + text-align:left; + } + div.content { + width:50%; + border:2px outset #989898; + background-color:white; + padding:12px; + } diff --git a/configs/ppc476-tools/release_notes/relfixes.html b/configs/ppc476-tools/release_notes/relfixes.html new file mode 100644 index 000000000..9d9885c7a --- /dev/null +++ b/configs/ppc476-tools/release_notes/relfixes.html @@ -0,0 +1,6 @@ +

    Apart from package versions listed above:

    + + diff --git a/configs/ppc476-tools/sanity.mk b/configs/ppc476-tools/sanity.mk new file mode 100644 index 000000000..9b6bc17b2 --- /dev/null +++ b/configs/ppc476-tools/sanity.mk @@ -0,0 +1,19 @@ +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# This file holds some sanity checks to run on the build machine, to verify +# its general required components for the building process. +define base_sanity + echo "Base sanity checks passed." +endef \ No newline at end of file diff --git a/configs/ppc476-tools/specs/main.spec b/configs/ppc476-tools/specs/main.spec new file mode 100644 index 000000000..7c6c3baa9 --- /dev/null +++ b/configs/ppc476-tools/specs/main.spec @@ -0,0 +1,23 @@ +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +Name: ppc476-tools__CROSS__ +Version: %{at_major_version} +Release: %{at_revision_number} +AutoReqProv: no +Requires: __CROSS_DEPS_PLACE_HOLDER__ +License: GPL, LGPL +Packager: __RPM_PACKAGER__ +Group: Development/Libraries +Summary: ppc476-tools diff --git a/configs/ppc476-tools/specs/metapkgs.spec b/configs/ppc476-tools/specs/metapkgs.spec new file mode 120000 index 000000000..1827a6aed --- /dev/null +++ b/configs/ppc476-tools/specs/metapkgs.spec @@ -0,0 +1 @@ +../../6.0/specs/metapkgs.spec \ No newline at end of file diff --git a/configs/ppc476-tools/specs/monolithic.spec b/configs/ppc476-tools/specs/monolithic.spec new file mode 120000 index 000000000..cdc14155c --- /dev/null +++ b/configs/ppc476-tools/specs/monolithic.spec @@ -0,0 +1 @@ +../../6.0/specs/monolithic.spec \ No newline at end of file diff --git a/configs/ppc476-tools/specs/monolithic_cross.spec b/configs/ppc476-tools/specs/monolithic_cross.spec new file mode 100644 index 000000000..28ee7b8e1 --- /dev/null +++ b/configs/ppc476-tools/specs/monolithic_cross.spec @@ -0,0 +1,76 @@ +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +%description +The ppc476-tools cross compiler toolchain which provides preview toolchain +functionality in GCC, binutils, EGLIBC, and GDB. + +# On newer rpm versions, it's common to strip debug info and to compile python +# files. We only want to compress man pages. +%define __os_install_post /usr/lib/rpm/brp-compress + +# These have been known to be different on different distributions +%define _mandir %{_prefix}/share/man +%define _infodir %{_prefix}/share/info +%define _tgtmandir __DEST_CROSS__/usr/share/man +%define _tgtinfodir __DEST_CROSS__/usr/share/info +%define _libexecdir %{_prefix}/libexec +%define _datadir %{_prefix}/share +%define _libexecdir %{_prefix}/libexec +%define _scriptdir %{_prefix}/scripts +# Some distributions set this to 'lib64' by default +%define _libdir %{_prefix}/lib + +%prep +%build +%install +mkdir -p ${RPM_BUILD_ROOT}$(dirname %{_prefix}) +cp -af %{_prefix} ${RPM_BUILD_ROOT}$(dirname %{_prefix}) +# Remove info/dir from installation dir +rm -f ${RPM_BUILD_ROOT}%{_infodir}/dir \ + ${RPM_BUILD_ROOT}%{_tgtinfodir}/dir +# Compress all of the info files. +gzip -9nvf ${RPM_BUILD_ROOT}%{_infodir}/*.info* +gzip -9nvf ${RPM_BUILD_ROOT}%{_tgtinfodir}/*.info* + + +%postun +if [[ ${1} -eq 0 ]]; then + if [[ -d "%{_prefix}" ]]; then + rm -rf %{_prefix} + fi +fi + +%post +# Update the info directory entries +for INFO in $(ls %{_infodir}/*.info.gz); do + install-info ${INFO} %{_infodir}/dir > /dev/null 2>&1 || : +done +for INFO in $(ls %{_tgtinfodir}/*.info.gz); do + install-info ${INFO} %{_tgtinfodir}/dir > /dev/null 2>&1 || : +done + +%preun +# Update the info directory entries +if [ "$1" = 0 ]; then + for INFO in $(ls %{_infodir}/*.info.gz); do + install-info --delete ${INFO} %{_infodir}/dir > /dev/null 2>&1 || : + done + for INFO in $(ls %{_tgtinfodir}/*.info.gz); do + install-info --delete ${INFO} %{_tgtinfodir}/dir > /dev/null 2>&1 || : + done +fi + +%files -f %{at_work}/cross_files.list +%defattr(-,root,root) diff --git a/docs/advance-toolchain-documentation.html b/docs/advance-toolchain-documentation.html new file mode 100644 index 000000000..84c0fe7b9 --- /dev/null +++ b/docs/advance-toolchain-documentation.html @@ -0,0 +1,1259 @@ +

    Table of Contents

    +
      +
    1. + Introduction + +
    2. +
    3. + Installation + +
    4. +
    5. + Usage + +
    6. +
    7. Advance Toolchain Limitations and known issues
    8. +
    9. Frequently Asked Questions
    10. +
    11. Support
    12. +
    +
    +

    Introduction

    +

    The IBM Advance Toolchain for Linux on Power is a set of open source development tools and runtime libraries which allows users to take leading edge advantage of IBM's latest POWER hardware features on Linux:

    +
      +
    • POWER8 enablement
    • +
    • POWER8 optimized scheduler
    • +
    • POWER8 Transactional Memory enablement
    • +
    • POWER8 Crypto Operations enablement
    • +
    • POWER8 Fusion enablement
    • +
    +

    Advance Toolchain 10.0 features:

    +
      +
    • Support for big endian (ppc64) and little endian (ppc64le)
    • +
    • POWER8 optimized runtime libraries
    • +
    +

    Advance Toolchain 9.0 features:

    +
      +
    • Support for big endian (ppc64) and little endian (ppc64le)
    • +
    • POWER7 and POWER8 optimized runtime libraries
    • +
    +

    Advance Toolchain 8.0 features:

    +
      +
    • Support for big endian (ppc64) and little endian (ppc64le)
    • +
    • POWER7 and POWER8 optimized runtime libraries
    • +
    +

    Advance Toolchain 7.1 features:

    +
      +
    • Support for little endian (ppc64le)
    • +
    • POWER7 and POWER8 optimized runtime libraries
    • +
    +

    Advance Toolchain 7.0 features:

    +
      +
    • POWER7 and POWER8 optimized runtime libraries
    • +
    +

    Advance Toolchain 6.0 features:

    +
      +
    • POWER7 optimized runtime libraries
    • +
    +

    Advance Toolchain releases up to version 5.0 feature:

    +
      +
    • PPC970, POWER4, POWER5, POWER5+, POWER6, POWER6x and POWER7 optimized runtime libraries
    • +
    +

    This self-contained toolchain does not rely on the system toolchain and requires minimum dependencies. Nor does it override the default Linux distribution toolchain (it is installed in /opt). The latest release includes current stable versions of the following packages:

    +
      +
    • GNU Compiler Collection (gcc, g++ and gfortran), plus individually optimized gcc runtime libraries for supported POWER processors
    • +
    • GNU C library (glibc), individually optimized for supported POWER processors
    • +
    • GNU Binary Utilities (binutils)
    • +
    • Decimal Floating Point Library (libdfp), optimized with hardware DFP support for POWER6, POWER6x and POWER7 but also available in emulation for PPC970, POWER4, POWER5, and POWER5+
    • +
    • AUXV Library (libauxv)
    • +
    • GNU Debugger (gdb)
    • +
    • Performance analysis tools (oprofile, valgrind, itrace)
    • +
    • Muti-core exploitation libraries (TBB, Userspace RCU, SPHDE), starting in version 5.0-3
    • +
    • Plus several support libraries (libhugetlbfs, Boost, zlib, etc)
    • +
    + +

    For more information about AUXV and Optimized Libraries, see this technical report. +

    +
    +

    Supported Linux Distributions

    + +

    Supported Linux distributions according to the Advance Toolchain version and their respective links for manual download.

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
     Advance Toolchain 10.0 ¹Advance Toolchain 9.0 ¹Advance Toolchain 8.0 ¹
    Fedora 19 Native & Cross-compilerNative & Cross-compiler
    Fedora 22²Native & Cross-compilerNative & Cross-compiler 
    RHEL 6 Cross-compilerCross-compiler
    RHEL 7Native & Cross-compilerNative & Cross-compilerNative & Cross-compiler
    SLES 12Native & Cross-compilerNative & Cross-compilerNative & Cross-compiler
    Ubuntu 14.04Native & Cross-compilerNative & Cross-compilerNative & Cross-compiler
    Ubuntu 14.10 Native & Cross-compilerNative & Cross-compiler
    Ubuntu 16.04Native & Cross-compiler  
    Debian 8Native & Cross-compilerNative & Cross-compiler 
    + +

    + + ¹ All versions of Advance Toolchain since 8.0 supports both big and little endian.
    + ² Advance Toolchain for Fedora 22 supports little endian only.
    +
    +

    + +

    This includes all the service packs and update releases for the mentioned Linux distributions.

    + +

    In addition, we provide a runtime compatibility package for older Linux distributions, so binaries built by the Advance Toolchain can be run on those.

    + +

    For more information about each individual release, please refer to the release notes file available at the Advance Toolchain file repositories below.

    +
    +

    Installation

    + +

    The gpg public keys gpg-pubkey-6976a827-5164221b (for RHEL6/7, SLES 12 and Ubuntu) and gpg-pubkey-3052930d-5175955a (for RHEL6) are provided in the repositories. These public keys can be used to verify the authenticity of both the Advance Toolchain packages and the repository contents. Download the gpg public key for your Linux distribution and import it using the following commands:

    + +
    + RPM based distributions: +
    +wget ftp://ftp.unicamp.br/pub/linuxpatch/toolchain/at/redhat/RHEL7/gpg-pubkey-6976a827-5164221b
    +rpm --import gpg-pubkey-6976a827-5164221b
    +
    + + DEB based distributions: +
    +wget ftp://ftp.unicamp.br/pub/linuxpatch/toolchain/at/ubuntu/dists/trusty/6976a827.gpg.key
    +sudo apt-key add 6976a827.gpg.key
    +
    +
    + +

    Warnings:

    + +
      +
    • RHEL6 requires both gpg public keys. +
    • On SLES10 and RHEL5, please install the ncurses package (64-bit) before installing the Advance Toolchain.
    • +
    • atX.X in the instructions below should be replaced by the version you are using (for example, at6.0, at7.0, etc)
    • +
    +
    +

    Using YaST or Zypper (SLES 12)

    + +

    YaST

    + +

    To install using YaST, execute yast2 as root. Then follow these steps:

    + +
      +
    1. Select Add-on Product.
    2. +
    3. Select the FTP Protocol: +
      + (x) FTP... +
    4. +
    5. Under Server Name: +
      + ftp.unicamp.br +
    6. +
    7. Under Directory on Server: +
      + /pub/linuxpatch/toolchain/at/suse/SLES_12 +
      +
    8. +
    9. You will get a warning about there being no product information available at the given location. This is because the repomd based repository does not contain the YaST product information. This is not a bug. Select [Continue].
    10. +
    11. Under the Software Management interface, search for "advance toolchain" and mark the advance-toolchain-atX.X-runtime, advance-toolchain-atX.X-devel, advance-toolchain-atX.X-perf and advance-toolchain-atX.X-mcore-libs packages for installation as necessary and click [Accept]. + If you are installing a cross compiler, select advance-toolchain-atX.X-cross-ppc64 or advance-toolchain-atX.X-cross-ppc64le. +
    12. +
    + +

    Zypper

    + +

    To install using Zypper, you first need (as root) to add the Unicamp FTP to the repository list:

    + +
    + zypper addrepo ftp://ftp.unicamp.br/pub/linuxpatch/toolchain/at/suse/SLES_12 "Advance Toolchain" +
    + +

    This will create a new repository entry called "Advance Toolchain" pointing to the Unicamp FTP site. Then, execute the following to install:

    + +
    +
    +zypper install advance-toolchain-atX.X-runtime \
    +               advance-toolchain-atX.X-devel \
    +               advance-toolchain-atX.X-perf \
    +               advance-toolchain-atX.X-mcore-libs
    +
    +
    + +

    Or to install the cross compiler, run:

    +
    +
    +zypper install advance-toolchain-atX.X-cross-ppc64
    +
    +
    + +

    You will be prompted to trust the repository key (AdvanceToolchain05). Hit "a" for always trusting this key, then "y" to confirm packages installation. Optionally, you may also install the advance-toolchain-atX.X-mcore-libs package, which contains the multi-core exploitation libraries (versions 5.0-3 and above), and the advance-toolchain-atX.X-selinux package (versions 5.0-7 and above), which enables compatibility with SELinux.

    + +

    Warning: Do not try to install the advance-toolchain-atX.X-selinux package if you do not have SELinux installed and enabled.

    + +

    YaST and Zypper support package upgrades for new revision releases (i.e. 6.0-0 to 6.0-1). For new major releases (i.e. 5.0-8 to 6.0-1), please proceed as in a normal installation.

    + +

    Warning: When upgrading using Zypper on SLES 10, use the following command:

    + +
    + zypper update -t package advance-toolchain-at5.0-runtime +
    + +

    The -t package option is required on SLES 10.

    +
    +

    Using YUM and DNF (RHEL6/7 and Fedora 19/22)

    + +

    First, if you have never created an Advance Toolchain repository configuration file, you need to do so. Create the following file using the text editor of your choice as root:

    + +
    + /etc/yum.repos.d/atX.X.repo +
    + +

    and add the following content:

    + +
    +
    +# Beginning of configuration file
    +[atX.X]
    +name=Advance Toolchain Unicamp FTP
    +baseurl=ftp://ftp.unicamp.br/pub/linuxpatch/toolchain/at/redhat/RHEL7
    +failovermethod=priority
    +enabled=1
    +gpgcheck=1
    +gpgkey=ftp://ftp.unicamp.br/pub/linuxpatch/toolchain/at/redhat/RHEL7/gpg-pubkey-6976a827-5164221b
    +# End of configuration file
    +
    +
    + +

    Notes

    + +
      +
    • When installing on RHEL6 point to the RHEL6 baseurl, and append the additional gpgkey: +
      +
      +baseurl=ftp://ftp.unicamp.br/pub/linuxpatch/toolchain/at/redhat/RHEL6
      +gpgkey=ftp://ftp.unicamp.br/pub/linuxpatch/toolchain/at/redhat/RHEL6/gpg-pubkey-6976a827-5164221b
      +       ftp://ftp.unicamp.br/pub/linuxpatch/toolchain/at/redhat/RHEL6/gpg-pubkey-3052930d-5175955a
      +
    • +
    • Fedora 19 uses the same repository of RHEL7.

    • +
    • When installing on Fedora 22, update baseurl to the Fedora 22 repository: +
      +
      +baseurl=ftp://ftp.unicamp.br/pub/linuxpatch/toolchain/at/redhat/Fedora22
      +
    • +
    • When installing the advanced toolchain cross-compiler on an x86 or amd64 target, the entry gpgcheck=1 should be changed to gpgcheck=0 as these packages are not currently signed.
    • +
    + +

    You may check if the repository was added correctly by running yum repolist. You will see your new atX.X repository listed if the configuration file is correct.

    + +

    To install, execute yum install as root:

    + +
    +
    +yum install advance-toolchain-atX.X-runtime \
    +            advance-toolchain-atX.X-devel \
    +            advance-toolchain-atX.X-perf \
    +            advance-toolchain-atX.X-mcore-libs
    +
    +
    + +

    Or to install a cross compiler:

    +
    +
    +yum install advance-toolchain-atX.X-cross-ppc64
    +
    +
    + +

    Answer "y" when YUM prompts for confirmation. Optionally, you may also install the advance-toolchain-atX.X-mcore-libs package, which contains the multi-core exploitation libraries (versions 5.0-3 and above), and the advance-toolchain-atX.X-selinux package (versions 5.0-7 and above), which enables compatibility with SELinux.

    + +

    Warning: Do not try to install the advance-toolchain-atX.X-selinux package if you do not have SELinux installed and enabled.

    + +

    YUM supports package upgrades for new revision releases (i.e. 5.0-0 to 5.0-1). For new major releases (i.e. 5.0-8 to 6.0-1), please proceed as in a normal installation.

    +
    +

    AT Downloader

    + +

    There is a tool available to download AT called AT Downloader.

    +

    The AT Downloader is a script to download the latest version of the AT packages for a supported distribution.

    +

    You can then manually install the AT packages on your systems.

    + +
    +

    Manual RPM installation

    + +

    If you are installing the rpms manually, you will need to download them from our repositories and install in the following order (due to prerequisites):

    + +
    + +advance-toolchain-atX.X-runtime-X.X-X
    +advance-toolchain-atX.X-devel-X.X-X
    +advance-toolchain-atX.X-perf-X.X-X
    +advance-toolchain-atX.X-mcore-libs-X.X-X +
    +
    + +

    where X.X-X is the actual version of the package (i.e. 6.0-1). Optionally, you may also install the advance-toolchain-atX.X-mcore-libs package, which contains the multi-core exploitation libraries (versions 5.0-3 and above), and the advance-toolchain-atX.X-selinux package (versions 5.0-7 and above), which enables compatibility with SELinux. These packages depend on advance-toolchain-atX.X-runtime.

    + +

    Warning: Do not try to install the advance-toolchain-atX.X-selinux package if you do not have SELinux installed and enabled.

    + +

    If you are updating your current installation to a new revision release (i.e. 7.0-0 to 7.0-1), you need to update as a batch, so rpm can solve the dependencies:

    + +
    +
    +rpm -Uvh advance-toolchain-atX.X-runtime-X.X-X.ppc64.rpm \
    +         advance-toolchain-atX.X-devel-X.X-X.ppc64.rpm \
    +         advance-toolchain-atX.X-perf-X.X-X.ppc64.rpm \
    +         advance-toolchain-atX.X-mcore-libs-X.X-X.ppc64.rpm
    +
    +
    + +

    The rpm command should always be run as root. Failure to do so will result in an error similar to this:

    + +
    + +error: can't create transaction lock on /var/lib/rpm/__db.000 + +
    + +

    In case you installed or updated the Advance Toolchain incorrectly, you might end up with an inconsistent rpm database (i.e. showing that the rpms are installed, but no files present in /opt/atX.X). In that case, you will have to force-remove the rpms and install again. To force-remove all the Advance Toolchain rpms:

    + +
    + +rpm -e --force advance-toolchain-* + +
    + +

    Then reinstall using any of the procedures described above.

    +
    + +

    Using Aptitude or apt (Ubuntu 14.04/14.10/16.04 and Debian 8)

    +

    Configure the repositories

    +

    If you have never configured Advance Toolchain repositories in this system, you need to do so. Add the following line to /etc/apt/sources.list using your editor of choice as root.

    + +

    On i386 or amd64:

    +
    + +deb [arch=i386] ftp://ftp.unicamp.br/pub/linuxpatch/toolchain/at/ubuntu trusty atX.X + +
    +

    AT 10.0 and above don't support i386, use:

    +
    + +deb ftp://ftp.unicamp.br/pub/linuxpatch/toolchain/at/ubuntu trusty atX.X + +
    + +

    On ppc64el:

    +
    + +deb ftp://ftp.unicamp.br/pub/linuxpatch/toolchain/at/ubuntu trusty atX.X + +
    + +

    Notes

    + +
      +
    • When installing on Ubuntu 16.04 (xenial) or Ubuntu 14.10 (utopic), point to its respective repository: +
      +
      +      deb ftp://ftp.unicamp.br/pub/linuxpatch/toolchain/at/ubuntu xenial atX.X
      +      deb ftp://ftp.unicamp.br/pub/linuxpatch/toolchain/at/ubuntu utopic atX.X
      +
    • +
    • When installing on Debian 8 (jessie), point to its respective repository: +
      +
      +      deb ftp://ftp.unicamp.br/pub/linuxpatch/toolchain/at/debian jessie atX.X
      +
    • +
    + +

    Aptitude

    + +

    After configuring the repository, refresh the aptitude cache by running:

    +
    + +sudo aptitude update + +
    + +

    Finally, install the Advance Toolchain package running the following command:

    +
    +
    +sudo aptitude install advance-toolchain-atX.X-runtime \
    +                      advance-toolchain-atX.X-devel \
    +                      advance-toolchain-atX.X-perf \
    +                      advance-toolchain-atX.X-mcore-libs
    +
    +
    + +

    Or to install a cross compiler:

    +
    +
    +sudo aptitude install advance-toolchain-atX.X-cross-ppc64
    +
    +
    + +

    Aptitude supports package upgrades for new revision releases (i.e. 7.1-0 to 7.1-1). For new major releases (i.e. 7.1-1 to 8.0-0), please proceed as in a normal installation.

    + +

    apt

    + +

    After configuring the repository, refresh the apt cache by running:

    +
    + +sudo apt-get update + +
    + +

    Finally, install the Advance Toolchain package running the following command:

    +
    +
    +sudo apt-get install advance-toolchain-atX.X-runtime \
    +                     advance-toolchain-atX.X-devel \
    +                     advance-toolchain-atX.X-perf \
    +                     advance-toolchain-atX.X-mcore-libs
    +
    +
    + +

    Or to install a cross compiler:

    +
    +
    +sudo apt-get install advance-toolchain-atX.X-cross-ppc64
    +
    +
    + +

    APT supports package upgrades for new revision releases (i.e. 7.1-0 to 7.1-1). For new major releases (i.e. 7.1-1 to 8.0-0), please proceed as in a normal installation.

    + +
    +

    Packages Descriptions

    + +

    In most cases, you do not need to install all of the packages that are provided with the Advance Toolchain. The following list describes when they are needed:

    +
      +
    • advance-toolchain-atX.X-runtime +

      Provides base functionality to run Advance Toolchain applications. This package is always required.

    • + +
    • advance-toolchain-atX.X-runtime-compat +

      Substitutes the above package on previous distributions versions. More information about SLES9 and RHEL4 or SLES10 and RHEL5

    • + +
    • advance-toolchain-atX.X-devel +

      Provides development tools. This package is only needed when developing applications.

    • + +
    • advance-toolchain-atX.X-perf +

      Provides tools for measuring performance. It's only useful on some development environments.

    • + +
    • advance-toolchain-atX.X-mcore-libs +

      Provides libraries for multi-thread development, like Boost, SPHDE and Threading Building Blocks. This package is also required on servers running the applications developed with those libraries.

    • + +
    • advance-toolchain-atX.X-runtime-atZZ-compat +

      Install this package only if you need to run an application built with the previous version of the Advance Toolchain on top of the current version. More information on Runtime Compatibility Between Advance Toolchain Versions

    • + +
    • advance-toolchain-atX.X-selinux +

      Provides SELinux settings. Only required when developing or running Advance Toolchain applications on a SELinux enabled environment.

    • + +
    • advance-toolchain-atX.X-golang +

      Provides Golang for ppc64le, it doesn't have any dependencies with the other packages. The files will be installed into /usr/local/go/.

    • + +
    • advance-toolchain-atX.X-cross-ppc64 or advance-toolchain-atX.X-cross-ppc64le +

      Provide a cross compiler for big endian (ppc64) or little endian (ppc64le). These packages are available for x86 (i386) or x86-64 (amd64) in order to generate binaries for POWER.

    • + +
    • advance-toolchain-atX.X-cross-common +

      Provides files common to both cross compiler packages (ppc64 and ppc64le). This package is mandatory for cross compiler installation starting from version 8.0.

    • + +
    • advance-toolchain-atX.X-cross-ppc64(le)-runtime-extras +

      Provides additional libraries to the cross compiler packages (ppc64 or ppc64le).

    • + +
    • advance-toolchain-atX.X-cross-ppc64(le)-mcore-libs +

      Provides the libraries for multi-thread development to the cross compiler (ppc64 or ppc64le).

    • +
    + +

    Important Notes

    + +
      +
    • advance-toolchain-atX.X-runtime-compat-X.X-X +
        +
      • Advance Toolchain 5.x: DO NOT INSTALL on SLES10 and beyond or RHEL5 and beyond. These are intended for runtime compatibility on SLES9 and RHEL4 only (see below). By doing so, you will corrupt your entire Advance Toolcahin installation and you will have to force-remove all the rpms and perform a new installation (see above for instructions on how to do it). If you are getting some strange "Illegal instruction" or "Segmentation fault" errors in runtime when you are absolutely sure those shouldn't be happening, you may want to verify if the compatibility rpm is installed: +
        + rpm -qa | grep advance-toolchain +
        +

        And check if it returns advance-toolchain-atX.X-runtime-compat-X.X-X.

        +
      • +
      • Advance Toolchain 6.x and 7.x: DO NOT INSTALL on SLES11 and beyond or RHEL6 and beyond, for the same reasons cited above.
      • +
      • Advance Toolchain 8.x, 9.x and 10.x: DO NOT INSTALL on RHEL7 and beyond, for the same reasons cited above.
      • +
      +
    • +
    • The Advance Toolchain rpms were designed so that you can install multiple versions of it in your machine if necessary. Different versions will install in different paths. (for example, /opt/at7.0 and /opt/at8.0 for Advance Toolchain 7.0-x and Advance Toolchain 8.0-y).
    • +
    + +
    +

    Installation on SLES9 and RHEL4 — Runtime Compatibility (version 5.x)

    +

    Users running applications on SLES9 or RHEL4 may install the compatibility rpm advance-toolchain-atX.X-runtime-compat-X.X-X in order to get the Advance Toolchain optimized runtime libraries. For SLES9 and RHEL4, optimized libraries are available for: + +

      +
    • PPC970
    • +
    • POWER4
    • +
    • POWER5
    • +
    • POWER5+
    • +
    + +
    +

    Installation on SLES10, RHEL5/6 — Runtime Compatibility (version 6.x and beyond)

    + +

    Users running applications on SLES10, RHEL5 or RHEL6 may install the compatibility rpm advance-toolchain-atX.X-runtime-compat-X.X-X in order to get the Advance Toolchain runtime libraries. There are no optimized libraries for the runtime compatibility rpm starting on version 6.0-0.

    +
    +

    Runtime compatibility between Advance Toolchain versions

    + +

    Users running applications built with an older version of the Advance Toolchain may install the compatibility rpm advance-toolchain-atX.X-runtime-atZ.Z-compat-X.X-X in order to run these applications on top of a newer version of the Advance Toolchain runtime, for example, using AT 7.0 to run applications built with AT 6.0.

    + +

    After installing this package, please run:

    + +
    + /etc/rc.d/init.d/atX.X-runtime-atZ.Z-compat start +
    +
    +

    Using the Cross Compiler (x86)

    + +

    The cross compiler provides a way to compile programs for POWER using a x86 (i386) or x86-64 (amd64) machine, helping teams to start developing for POWER without having access to a server in the early development phase. However it does not completely remove the requirement of a POWER server to run a complete test in a proper environment.

    + +

    For more information about using the cross compiler, visit Building with Advance Toolchain cross compiler documentation.

    + +
    +

    Usage

    + +

    After completing the installation steps, the Advance Toolchain is ready for usage. Just call the program directly, for example /opt/atX.X/bin/gcc.

    + +

    However, some applications have complex build systems (for example: autotool, make, cmake) in which is necessary to correctly set the environment PATH, for example:

    + +
    +
    +PATH=/opt/atX.X/bin:/opt/atX.X/sbin:$PATH make
    +
    +
    +
    +

    Manual Pages

    + +

    In order for the system man application to pick up Advance Toolchain installed manual pages, you must export the location of the AT manual pages in the MANPATH variable prior to invoking man. This is best accomplished with the following commands:

    + +
    +
    +unset MANPATH
    +export MANPATH="/opt/atX.X/share/man:`manpath`"
    +man <topic>
    +  
    +
    + +

    Or you may override the current environment MANPATH as demonstrated in the following example:

    + +
    +
    +MANPATH="/opt/atX.X/share/man:`manpath`" man lsauxv
    +  
    +
    +
    +

    Optimization Selection

    + +

    Directing gcc to build an application for a particular CPU can take advantage of processor-specific instruction selection. In some cases, it can significantly improve performance. Building without selecting a particular CPU simply causes gcc to select the default (lowest common denominator) instruction set.

    + +
    +-mcpu=power4
    +-mcpu=970
    +-mcpu=power5
    +-mcpu=power5+
    +-mcpu=power6
    +-mcpu=power6x
    +-mcpu=power7
    +-mcpu=power8 +
    + +

    Warnings

    + +
      +
    • On Advance Toolchain 10.0 the compiler defaults to -mcpu=power8 -mtune=power8
    • +
    • On Advance Toolchain 7.x, 8.0, and 9.0, the compiler defaults to -mcpu=power7 -mtune=power8
    • +
    • On Advance Toolchain 6.0, the compiler defaults to -mcpu=power6 -mtune=power7
    • +
    • When using -mcpu=power7, DO NOT disable Altivec (for example, -mno-altivec) without also disabling VSX (for example, -mno-vsx). The following combination is illegal: +
      + +-mcpu=power7 -mno-altivec + +
      +
    • +
    +
    +

    Common GCC options

    + +
      + +
    • -fpeel-loops +

      Peels the loops so that there is enough information that they do not roll much (from profile feedback). This value also turns on complete loop peeling; complete removal of loops with small constant number of iterations.

    • + +
    • -funroll-loops +

      Unroll loops whose number of iterations can be determined at compile time or upon entry to the loop. The -funroll-loops value implies the use of the -frerun-cse-after-loop value. This option makes the code larger, and may or may not make it run faster.

    • + +
    • -ftree-vectorize +

      Perform loop vectorization on trees. This flag is enabled by default at -O3, starting at the GCC 4.3 time frame.

    • + +
    • -ffast-math +

      Sets the -fno-math-errno, -funsafe-math-optimizations, -ffinite-math-only, -fno-rounding-math, -fno-signaling-nans and -fcx-limited-range values. This option causes the preprocessor macro _ FAST_MATH _ to be defined. This option is not turned on by any -O option because it can result in incorrect output for programs which depend on an exact implementation of IEEE or ISO rules or specifications for math functions. It may, however, yield faster code for programs that do not require the guarantees of these specifications.

    • + +
    • -mcmodel=medium +

      Generate PowerPC64 code for the medium model: The TOC and other static data may be up to a total of 4G in size.

    • +
    +
    +

    GCC options for older Linux distributions

    +

    The Advance Toolchain shows significant gains over the older (SLES10 SP3) Enterprise Linux Distributions, because these releases use an older GCC-4.1 compiler that is not enabled for POWER7. In addition, these releases are restricted to POWER6 compatibility mode and cannot leverage the new instructions enabled for POWER7 for applications or runtime libraries. There are, however, some best practices that you can use to maximize your performance.

    + +

    Best practice for the -mcpu and -mtune values

    +
      +
    • If your program will be running on the same POWER systems for the foreseeable future, built with the matching -mcpu value.
    • +
    • If your program needs to run on multiple systems, the best strategy is to build with the -mcpu set for the oldest supported system. If your program mostly runs on a newer system with the older system for accommodation or backup, then use the -mcpu set for the oldest system combined with the -mtune value for system that you want to optimize for performance.
    • +
    • If your program in running in POWER6 compatibility mode on a POWER7 System, use the -mcpu=power6 and -mtune=power7 values.
    • +
    • If your code is organized in dynamic libraries, you can compile and build your libraries multiple times using the -mcpu value for the specific Power platform and then install those libraries into the matching /lib64/power directory. This allows the dynamic linker to automatically select the dynamic library optimized for the specific system.
    • +
    + +

    Best practice for large programs

    + +
      +
    • Avoid compiling with the -mminimal-toc value as this adds extra levels of indirection for static data accesses
    • +
    • Compile with the -mcmodel=medium value to optimize static data access and allow the linker to perform additional optimizations on the final program or library image.
    • +
    • For programs with static data exceeding 2 GB, you may need to use the -mcmodel=large value.
    • +
    +
    +

    Platform and Hardware Capabilities Determination

    + +

    Since around AT 9.0, glibc includes the function getauxval which can be used at runtime to query the capabilities of the hardware. Users of Advanced Toolchain 9.0 or newer are encouraged to use this instead of libauxv. A manual page exists which documents this function. libauxv may be removed in a future major release of the Advanced Toolchain. + +

    The following example tests whether the runtime CPU has POWER7 Vector extensions:

    + +
    +
    +#include <sys/auxv.h>
    +#include <stdbool.h>
    +#include <stdio.h>
    +
    +bool
    +has_vector(void)
    +{
    +	unsigned long int hwcap_mask = (unsigned long int) getauxval (AT_HWCAP);
    +        bool has_vec = (hwcap_mask & PPC_FEATURE_HAS_VSX) != 0;
    +        if (has_vec)
    +		printf("CPU has POWER7 vector extensions\n");
    +	return has_vec;
    +}
    +
    +  
    +
    + +

    Advance Toolchain versions 10.0 and below include libauxv and lsauxv, a system library and application, respectively, which provide a mechanism for querying the system platform information from the kernel's auxiliary vector. The system hardware capabilities (hwcap) may be queried through the auxiliary vector as well. For example, the platform can be queried dynamically with the following function:

    + +
    + +char * platform = (char *) query_auxv (AT_PLATFORM); + +
    + +

    Information from the hwcap can be queried in the following manner:

    + +
    +
    +unsigned long int hwcap_mask = (unsigned long int) query_auxv (AT_HWCAP);
    +if (hwcap_mask & PPC_FEATURE_HAS_FPU)
    +    printf(" HAS_FPU\n");
    +  
    +
    + +

    For more information about using libauxv and lsauxv can be found in the auxv and lsauxv manual pages provided by the Advance Toolchain (see Manual Pages above).

    + +
    +

    Relinking a Pre-built Application with the Advance Toolchain

    + +

    Locate all of the application's .o files. You can also link .a files to pick them all up at once. These will be needed for the relink.

    + +

    Locate the paths to all of the necessary linked shared-object files, for example:

    + +
    + /usr/X11R6/lib for libXrender
    + /opt/gnome/lib for libgtk-x11-2.0 +
    + +

    Edit /opt/atX.X/etc/ld.so.conf and add the directories to all of the shared object files to the end of this file. Don't forget lib64 for the 64-bit equivalent libraries if applicable, for example:

    + +
    + +/opt/gnome/lib/
    +/opt/gnome/lib64/
    +/usr/X11R6/lib
    +/usr/X11R6/lib64/ +
    +
    + +

    Run the Advance Toolchain's ldconfig application to regenerate /opt/atX.X/etc/ld.so.cache, for example:

    + +
    + +sudo /opt/atX.X/sbin/ldconfig + +
    + +

    The loader uses /opt/atX.X/etc/ld.so.cache to find the libraries the application was linked against.

    + +

    Relink using the Advance Toolchain's compiler:

    + +
    +
    +/opt/atX.X/bin/gcc -g -O2 -o <application_name> <list_of_dot_o_files> \
    +                   <list_of_dot_a_files> -L<path_to_libraries> \
    +                   -l<one_for_each_library_needed_for_the_link>
    +  
    +
    + +

    For example:

    + +
    +
    +/opt/at5.0/bin/gcc -g -O2 -o mandelbrot callbacks.o interface.o \
    +    main.o quadmand.o support.o mandel_internals.a \
    +    -L/usr/X11R6/lib -L/usr/X11R6/lib64 -L/opt/gnome/lib -lgtk-x11-2.0
    +    -lgdk-x11-2.0 -latk-1.0 -lgdk_pixbuf-2.0 \
    +    -lpangocairo-1.0 -lpango-1.0 -lcairo -lgobject-2.0 -lgmodule-2.0 -ldl \
    +    -lglib-2.0 -lfreetype -lfontconfig \
    +    -lXrender -lX11 -lXext -lpng12 -lz -lglitz -lm -lstdc++ -lpthread \
    +    -lgthread-2.0
    +  
    +
    + +

    If ld gives an error like the following then you're missing the path to that library in the link stage. Add it with -L<path to library>, e.g.

    + +
    + +/opt/at5.0/bin/ld: cannot find -lgtk-x11-2.0 + +
    + +

    Add -L/opt/gnome/lib/ to the gnome compilation line. You need to tell the linker where to find all of the libraries.

    + +

    When running the relinked application, if you get an error like the following:

    + +
    + +./mandelbrot: error while loading shared libraries: libglib-2.0.so.0: cannot open shared object file: No such file or directory. + +
    + +

    You need to add the path to the library in question to /opt/atX.X/etc/ld.so.conf and re-run /opt/atX.X/sbin/ldconfig. The Advance Toolchain's loader needs to know where to find the libraries and uses the generated /opt/atX.X/etc/ld.so.cache to find them.

    + +

    You can verify that the Advance Toolchain libraries were picked up by running the application prefaced with LD_DEBUG=libs, e.g.

    + +
    + +LD_DEBUG=all ./mandelbrot + +
    + +

    Warning: do NOT use LD_LIBRARY_PATH to point to the Advance Toolchain libraries if your applications are not relinked with the Advance Toolchain. Doing so can result in ld.so and libc.so version mismatch and cause runtime failures.

    +
    +

    Library Search Paths

    + +

    /opt/atX.X/etc/ld.so.conf already includes /etc/ld.so.conf in the search order, but you may need to re-run /opt/atX.X/sbin/ldconfig in order populate /opt/atX.X/etc/ld.so.cache with the specialized search paths you have added to /etc/ld.so.conf after an Advance Toolchain installation.

    + +

    If you are running ldd against your binary and it is showing that some libraries are not found, you may need to re-run /opt/atX.X/sbin/ldconfig to fix that.

    +
    +

    Lock Elision support in glibc

    +

    Transactional Lock Elision (TLE) is a technique, implemented on top of the Hardware Transactional Memory, which allows critical sections of code to be speculatively executed by multiple threads, potentially without serializing. In the ideal case, this allows multiple threads to execute such a section of code in parallel. When a data race does occur, each thread will make several attempts to elide the lock +before falling back to traditional locking for a period of time. No source modifications are needed to enable this feature, however with profiling, source code can be altered +to change things such as structure padding and member placement to minimize false sharing conflicts. Such changes are likely beneficial even without TLE.

    + +

    It should be noted that TLE may not benefit all applications, and the benefits depend largely on how supported mutexes are used. In essence, TLE lets the hardware track any data races which occur while executing a critical section. POWER8 transactional resources are shared among hardware threads per core, thus enabling more threads per core may result in lower performance depending on how much memory is touched within a critical section. TLE is not recommended for applications which make system calls inside the critical section as the kernel does not support system calls from inside a memory transaction.

    + +

    Advance Toolchain 9.0 and 10.0 has support for Transactional Lock Elision (TLE) on glibc (since Advance Toolchain 9.0-3). TLE is disabled by default, a script to enable it is provided as /opt/atX.X/scripts/tle_on.sh. Note, that the internals of how the script work are subject to change at any time.

    + +

    Below is a sample program which demonstrates how to use the tle_on.sh script, and how to use it:

    +
    +
    +#include <stdio.h>
    +#include <pthread.h>
    +#include <htmintrin.h>
    +
    +int main()
    +{
    +  pthread_mutex_t t = PTHREAD_MUTEX_INITIALIZER;
    +  int elided = 0;
    +
    +  pthread_mutex_lock (&t);
    +  if (_HTM_STATE (__builtin_tcheck ()) == _HTM_TRANSACTIONAL)
    +    elided = 1;
    +  pthread_mutex_unlock (&t);
    +
    +  if (elided)
    +    puts ("Hurray! We are elided!");
    +  else
    +    puts ("Shucks! We are not elided!");
    +
    +  return 0;
    +}
    +  
    +
    +

    Compiling this with the following command:

    +
    + + /opt/at9.0/bin/gcc tle.c -mhtm -o tle -O2 -pthread + +
    +

    It can be run as follows:

    +
    + + /opt/at9.0/scripts/tle_on.sh -e yes ./tle + +
    +

    or

    +
    + + /opt/at9.0/scripts/tle_on.sh ./tle + +
    +

    Likewise

    +
    + + /opt/at9.0/scripts/tle_on.sh -h + +
    +

    Will print the help information for the script.

    +
    +

    Using the Advance Toolchain with libhugetlbfs-2.0 (and later)

    + +

    The Advance Toolchain provides its own 32-bit and 64-bit versions of libhugetlbfs 2.x. Please refer to the Advance Toolchain's libhugetlbfs man page for more information on using libhugetlbfs-2.0:

    + +
    +
    +unset MANPATH
    +export MANPATH="/opt/atX.X/share/man:`manpath`"
    +man libhugetlbfs
    +  
    +
    + +
    +

    Using the Advance Toolchain with libhugetlbfs-1.0

    + +

    Warning: Libhugetlbfs 1.0 is deprecated for new users. Please use libhugetlbfs 2.0 (or later) that's provided directly by the Advance Toolchain. If you must use libhugetlbfs 1.0 follow these instructions.

    + +

    The /opt/atX.X/scripts/createldhuge.sh script is provided (until Advance Toolchain 8.0), which copies /opt/atX.X/bin/ld to /opt/atX.X/bin/ld.orig and creates a wrapper script in /opt/atX.X/bin/ld. You only need to run this if you want the Advance Toolchain to work with libhugetlbfs.

    + +

    The new /opt/atX.X/bin/ld is a wrapper script which detects whether the --hugetlbfs-link or --hugetlbsf-align switches have been passed to the linker. If so then it sets a script-local LD environment variable to /opt/atX.X/bin/ld.orig and invokes the system's ld.hugetlbfs, e.g.

    + +
    + +LD="/opt/atX.X/bin/ld.orig" /usr/share/libhugetlbfs/ld.hugetlbfs *switches* + +
    + +

    If it doesn't detect the hugetlbfs-link/hugetlbfs-align switch, then it simply forwards the linker invocation to /opt/atX.X/bin/ld.orig directly.

    + +

    If libhugetlbfs support is desired, the first thing to do is backup the original Advance Toolchain linker just in case there are problems and you need to restore it manually.

    + +
    + +cp -p /opt/atX.X/bin/ld /opt/atX.X/bin/ld.backup + +
    + +

    The scripts in /opt/atX.X/scripts/ will do the rest of the work for you:

    + +
    + +createldhuge.sh +restoreld.sh + +
    + +

    Invoke createldhuge.sh to create the wrapper ld:

    + +
    + +sudo sh createldhuge.sh /<prefix-to-libhugetlbfs>/share/libhugetlbfs/ld.hugetlbfs /opt/atX.X + +
    + +

    This MUST be executed as sudo (or root) for the ld wrapper script to be created properly.

    + +

    When/If you want to restore the original Advance Toolchain linker, simply run:

    + +
    + +sudo sh restoreld.sh. + +
    + +

    The Advance Toolchain gcc always ignores the -B/<prefix-to-libhugetlbfs>/share/libhugetlbfs directive because it has been built to always invoke /opt/atX.X/bin/ld directly. You can use the gcc invocation you have always used, e.g.

    + +
    + +/opt/atX.X/bin/gcc temp.c -v -o temp -B/<prefix-to-libhugetlbfs>/share/libhugetlbfs/ -Wl,--hugetlbfs-link=BDT + +
    + +

    Note: If you invoke /opt/atX.X/bin/ld --hugetlbfs-link=BDT directly, you'll need to supply a -m* flag which is normally provided by gcc directly (see man ld for supported emulations).

    + +
    +

    Packaging an application built with the Advance Toolchain using RPM

    + +

    Due to a limitation in the way that RPM generates dependency lists, the symbols from the Advance Toolchain may collide with the ones provided by the Linux distribution. There are two ways to prevent this:

    +
      +
    • Manually set your dependencies, using the steps below: +
        +
      • Change your spec file, adding the entry Autoreq: 0 to disable the auto requirements check;
      • +
      • Perform the build of your application as usual and then check every component manually for its dependencies (usually using ldd to find out shared library dependencies);
      • +
      • Use the shared library list obtained in the previous step and replace the Advance Toolchain entries found by a single advance-toolchain-atX.X-runtime, where X.X is the Advance Toolchain version being used for the build;
        +Note: If any libraries from the Advance Toolchain mcore-libs package have being used, their entries must be replaced by a single advance-toolchain-atX.X-mcore-libs entry instead;
      • +
      • Add an entry of Requires: <list-found> on your spec file, replacing the "<list-found>" with the list assembled in the previous step;
      • +
      + Note: These steps are only required for the first build to adjust your spec file for packaging, unless changes in the build system, or other packaging spec defined changes occur (in which case, it must be revised to guarantee its functionality).
    • +
    • Use a script to get personalized require dependency filters, using the steps below: +
        +
      • + The /opt/atX.X/scripts/find_dependencies.sh script is provided (since Advance Toolchain 9.0-2) to help set the dependencies. Since RPM version 4.8, you can replace the macro that checks for dependencies. This script accept a list of files as input and provide a list of found dependencies as output, it looks for standard dependencies found inside the Advance Toolchain install path and replace them by a single output of advance-toolchain-atX.X-runtime, or advance-toolchain-atX.X-mcore-libs if the dependency found was a multi core library provided by Advance Toolchain. +
      • +
      • + RPM by default points the %__find_requires macro to its standard script located on /usr/lib/rpm/find_requires, to use the find_dependencies.sh script you need to change your spec file, redefining the macro required using the following entries:
        + %define __find_requires /opt/atx.x/scripts/find_dependencies.sh </full/path/to/files>
        + %define _use_internal_dependency_generator 0
        + Take a look at this link for more information about RPM dependencies.
      • +
      +
    • +
    +

    Note: The second method is best used with RPM version 4.8 or later. With earlier RPM versions, the first method is recommended.

    +
    +

    Using the Advance Toolchain with IBM XLC and XLF

    + +

    When compiling binaries using XLC or XLF, the user must add the -F <path_to_cfg_file> option to the compiler command line. The Advance Toolchain provides a script that creates those files in /opt/atX.X/scripts. This script is automatically run during installation. If you need to re-run it later (i.e. you installed XLC/XLF after the Advance Toolchain installation), execute the following command:

    + +
    + +/opt/atX.X/scripts/at-create-ibmcmp-cfg.sh + +
    + +

    Please notice the absolute path when calling the script. DO NOT call it using a relative path. The script creates the config files in /opt/atX.X/scripts.

    + +

    This procedure does not affect the default XLC/XLF configuration.

    +
    + +

    Using the Advance Toolchain with MASS libraries

    + +

    The IBM's Mathematical Acceleration Subsystem (MASS) libraries consist of a set of mathematical functions for C, C++, and Fortran-language applications that are tuned for specific POWER architectures. The libraries are available for ppc64 and ppc64le.

    +

    To use it with AT you need to pass the option -mveclibabi=mass to GCC.

    +
    + +

    Debugging

    + +

    gdb can be asked to output _Decimal[32|64|128] formatted floating point registers by default, using its printf command.

    + +

    When using objdump to inspect POWER6 code, make sure to use the -Mpower6 flag:

    + +
    + +/opt/atX.X/bin/objdump -d -Mpower6 <your_file> + +
    + +

    The same applies to POWER7 code.

    +
    +

    Time zones

    + +

    Since AT 5.0-7 and AT 6.0-1, the Advance Toolchain automatically sets its time zone to the same time zone used by the system. This is done with the symbolic link /opt/atX.X/etc/localtime to /etc/localtime. To replicate this behavior in the Advance Toolchain 5.0-6, 6.0-0 and earlier versions, it is necessary to replace the old symbolic link:

    + +
    + +rm -f /opt/atX.X/etc/localtime && ln -s /etc/localtime /opt/atX.X/etc/localtime + +
    + +

    By doing so, further changes of system's time zone will automatically reflects in Advance Toolchain's time zone.

    + +

    If necessary, the AT can work with a different time zone. All the available time zones are listed in the directory /opt/atX.X/share/zoneinfo.

    + +

    Firstly, remove the symbolic link /opt/atX.X/etc/localtime:

    + +
    + +rm -f /opt/atX.X/etc/localtime + +
    + +

    Then, create a symbolic link to the new time zone, i.e.:

    + +
    + +ln -s /opt/atX.X/share/zoneinfo/Europe/Athens /opt/atX.X/etc/localtime + +
    + +
    +

    SELinux issue

    + +

    There is a bug on RHEL6 that prevents restorecon to restore the context of symbolic links. This bug affects AT's time zone settings. While Red Hat works to solve this bug, a workaround is available.

    + +

    Replace the symbolic link by a hard link:

    + +
    +
    +rm -f /opt/atX.X/etc/localtime
    +ln /etc/localtime /opt/atX.X/etc/localtime
    +  
    +
    + +

    However, if /etc and /opt are stored in different file systems the only solution available is to copy the system's time zone:

    + +
    + +rm -f /opt/atX.X/etc/localtime +cp /etc/localtime /opt/atX.X/etc/localtime + +
    + +
    +

    Using Go compilers provided by the Advance Toolchain

    + +

    There are two compilers provided by the Advance Toolchain that can be used to compile Go source code on ppc64le starting in AT 9.0: the Golang compiler and gccgo.

    + +

    The Advance Toolchain provides an IBM-optimized version of the Go compiler from the Golang community for ppc64le starting on AT 9.0.

    + +

    It is installed by the package advance-toolchain-golang-at-X.Y-Z.ppc64le.rpm. This package is standalone and does not depend on any of the other packages offered by the Advance Toolchain.

    + +

    This compiler and runtime is based on the final release versions provided by the Go community, plus the newest bug fixes and performance optimizations relevant to Power. The major version of the compiler (i.e. 1.6, 1.7, etc) is upgraded with every Advance Toolchain major release. Please refer to the Release Notes file for the compiler version and included bug/performance fixes included.

    + +

    The Go compiler for Golang is installed here:

    + +
    + +/usr/local/go + +
    + +

    When /usr/local/go/bin is added to $PATH, then this go tool is the default. Otherwise, the go tool can be invoked directly by doing:

    + +
    + +/usr/local/go/bin/go + +
    + +

    The Advance Toolchain also includes gccgo. When the full install of GCC is done from Advance Toolchain, gccgo is included and the go tool which uses gccgo is in the default path. If both GCC (including gccgo) and the Golang compiler from Advance Toolchain are installed, and the Go compiler from Golang is to be used instead of gccgo, then the PATH must be set as described above.

    +
    + +

    Advance Toolchain Limitations and Known Issues

    + +
      +
    • The upgrade from 9.0-0 to a newer release need to be forced. The problem was fixed in 9.0-1 and does not affect that, nor newer releases.
    • +
    • oprofile's operf tool running on SLES 11: if running operf as the root user, only --system-wide or --pid modes are supported. This is a permanent restriction.
    • +
    • gcc no longer has support for Graphite loop optimizations starting on Advance Toolchain 6.0-0.
    • +
    • libdfp has some known limitations as indicated in the libdfp README.user documentation.
    • +
    • oprofile currently doesn't support profiling using JVMPI.
    • +
    • oprofile Java profiling restriction: To use oprofile for profiling Java VMs 1.5 or greater, users generally have two options available when invoking the JVM: -agentlib or -agentpath. However, when using the Advance Toolchain's oprofile, you must use +
      + +-agentpath:/opt/at5.0/lib64/oprofile/libjvmti_oprofile.so + +
      + for 64-bit JVMs, or +
      + +agentpath:/opt/at5.0/lib/oprofile/libjvmti_oprofile.so + +
      + for 32-bit JVMs. +
    • +
    • Upgrading from 5.0-0, 5.0-1 or 5.0-2 to a newer release is not working. The problem was fixed in 5.0-3 and does not affect that, nor newer releases. If you need to upgrade from 5.0-0, 5.0-1 or 5.0-2, please uninstall the Advance Toolchain and then install the new version.
    • +
    +
    + +

    Frequently Asked Questions

    + +
      +
    1. How do I find which package provides a specific feature?
    2. +
    3. What does ";undefined reference to sem_*" mean?
    4. +
    5. Why doesn't the Advance Toolchain find my library?
    6. +
    7. Why does my program fail with "No such file or directory"?
    8. +
    9. Can I set RPATH/RUNPATH with the Advance Toolchain?
    10. +
    11. Can I mix parts of different glibc versions?
    12. +
    13. How to verify if the Advance Toolchain is corrupted?
    14. +
    15. When should I use Advance Toolchain?
    16. +
    +
    +

    How do I find which package provides a specific feature?

    + +

    On RHEL based systems you can run:

    + +
    + +yum provides <feature> + +
    + +

    On SLES you need to run the following command:

    + +
    +
    +zypper what-provides <feature>
    +
    +
    +
    +

    What does "undefined reference to sem_*" mean?

    + +

    These kind of errors usually appear when trying to link a multithreaded program without enabling multithreading support (i.e. specify -pthread when calling the linker), e.g.:

    + +
    +
    +/opt/at7.0/bin/gcc main.c -pthread
    +
    +
    +
    +

    Why doesn't the Advance Toolchain find my library?

    + +

    The loader keeps a cache of all libraries available in the library path (/opt/atX.X/etc/ld.so.conf). Every time a new library is installed in one of the directories of the library path or when the library path is changed, it is necessary to update this cache by running /opt/atX.X/sbin/ldconfig as root.

    +
    +

    Why does my program fail with "No such file or directory"

    + +

    The symptom of this issue is: a program built with the Advance Toolchain fails to execute with the error message bash: ./program: No such file or directory.

    + +

    This message is indicating the system was not able to run this program. Usually this happens because the system wasn't able to find the correct major version of the Advance Toolchain. In other words, Bash didn't find the loader specified in the .interp section of the executable.

    + +

    You can identify which Advance Toolchain version built this program by running ldd <program>. Then, look for /opt/atX.X/lib64/ld64.so.2. Ensure to install the latest update of the major version you identified.

    +
    +

    Can I set RPATH/RUNPATH with the Advance Toolchain?

    + +

    Yes. The Advance Toolchain uses the RPATH and RUNPATH tags to identify where its libraries are located, but it is possible to add new directories using the linker paramenter -rpath=dir.

    + +

    By default, the Advance Toolchain will prepend its own lib directory to the RPATH/RUNPATH. However, in case the user changes this behavior, he or she must ensure the Advance Toolchain lib directory will always appear before a directory with another libc, i.e. /usr/lib, /usr/lib64, /lib or /lib64. This will guarantee you won't mix parts of different glibc versions.

    +
    +

    Can I mix parts of different glibc versions?

    + +

    No. The GNU C Library has not been designed to support mixing parts of different glibc versions, e.g.: use the loader provided by the Linux distribution and glibc libraries provided by the Advance Toolchain.

    + +

    When these libraries are mixed up, the program usually aborts complaining about missing symbols in one of the libraries provided by glibc.

    + +

    To avoid these issues, the user has to:

    + +
      +
    • Ensure the Advance Toolchain lib directories appear before a directory with another libc in the library search path, i.e. /usr/lib, /usr/lib64, /lib or /lib64. Which includes LD_LIBRARY_PATH, RPATH/RUNPATH and /opt/atX.X/etc/ld.so.conf.
    • +
    • Force to use the Advance Toolchain loader when forcing the preload of an Advance Toolchain library with a program compiled using the system's toolchain, e.g.: LD_PRELOAD=/opt/atX.X/lib64/libtcmalloc.so /opt/atX.X/lib64/ld-X.XX.so /usr/bin/printenv PATH
    • +
    +
    +

    How to verify if the Advance Toolchain is corrupted?

    + +

    The package manager provides .

    +
    +
    On RPM-based systems (RHEL, SLES, Fedora):
    +
    Run rpm --verify <list of packages>.

    Replace <list of packages> by the list of Advance Toolchain packages installed in the system, for example: rpm --verify advance-toolchain-atX.X-runtime advance-toolchain-atX.X-devel advance-toolchain-atX.X-perf advance-toolchain-atX.X-mcore-libs

    +

    If this command creates any output, some of the packages are corrupted. If it returns 0, the installation is fine.

    +
    On DEB-based systems (Ubuntu):
    +
    Run debsums <list of packages>. +

    Replace <list of packages> by the list of Advance Toolchain packages installed in the system, for example: debsums advance-toolchain-atX.X-runtime advance-toolchain-atX.X-devel advance-toolchain-atX.X-perf advance-toolchain-atX.X-mcore-libs

    +

    This command is going to print the status for each file. If it returns 2, there is at least one corrupted file. If it returns 0, the installation is fine.

    +
    + +

    In case the previous commands report any issue, uninstall and install the corrupted package again.

    +
    +

    When should I use Advance Toolchain?

    + +

    The Advance Toolchain provides earlier toolchain functionality and a group of optimized libraries. AT is highly recommended when you want to build an optimized CPU-bound application on POWER or want some of the new toolchain functionalities on POWER before they made into a distribution. Also, you must use AT when you link with a library built with AT.

    +

    In some scenarios you will not get many advantages using the Advance Toolchain, and it will be easier to use the distro's toolchain that usually performs quite well. Such cases include when you are building applications that are not CPU-bound and on I/O constrained environments.

    +
    +

    Support

    + +

    Customer support for the Advance Toolchain is provided in one of three ways:

    + +
      +
    • If you are using the Advance Toolchain as directed by an IBM product team (i.e. IBM XL Compiler or PowerVM Lx86), please report the suspected issues to the IBM Support using that product name and entitlement.
    • +
    • + IBM's Support Line for Linux Offerings now provides support for the Advance Toolchain as well. If you have a contract with a Support Line for Linux, place a call to IBM Support, e.g. for United States: +
        +
      1. Dial 1-800-426-IBM-SERV.
      2. +
      3. Option #2 (Other business products or solutions).
      4. +
      5. Option #2 (Software).
      6. +
      7. Option #7 (Other OS/Linux).
      8. +
      + For other countries click here. +
    • +
    • All other users can use an electronic forum that is monitored Monday through Friday. For questions regarding the use of the Advance Toolchain or to report a suspected defect, click here. +
        +
      1. Open the Advance Toolchain topic.
      2. +
      3. Select "Post a New Reply".
      4. +
      5. Enter and submit your question or problem.
      6. +
      7. An initial response will be attempted within 2 business days.
      8. +
      +
    • +
    + +

    The Advance Toolchain is supported on many Linux distributions.

    diff --git a/docs/cross-compiler_tutorial.html b/docs/cross-compiler_tutorial.html new file mode 100644 index 000000000..c3bdac9a5 --- /dev/null +++ b/docs/cross-compiler_tutorial.html @@ -0,0 +1,245 @@ +

    Building with Advance Toolchain cross compiler

    + +

    Table of Contents

    +
      +
    1. Introduction
    2. +
    3. + Building a sample program + +
    4. +
    5. Frequently Asked Questions
    6. +
    + + +

    Introduction

    +

    +A cross compiler is a compiler that runs in a certain processor +architecture (host architecture) but is able to generate executable +code to a different processor architecture (target +architecture) 1. +

    + +

    +The Advance Toolchain provides cross compilers that run on x86 +and generate code for Power which help teams to start developing for +Power without having immediate access to a POWER server. +A cross compiler doesn't completely remove the dependency on the +target processor because users still have to test and run the +executable code on a different processor. +

    + + +

    Building a sample program

    +

    +GNU wget 2 is a small +program that highlights the important problems when cross compiling a certain +software: it depends on libraries provided by the Advance Toolchain cross +compiler and external libraries. +

    + +

    +In this example, we'll build GNU wget for POWER little-endian, using a +x86 computer with the Advance Toolchain cross compiler. +

    + + +

    Copy headers and libraries

    +

    +Firstly, it is necessary to copy all necessary libraries and headers +to a certain directory. In this example I'll use: +

    +
      +
    • Headers: ${HOME}/wget/include
    • +
    • Libraries: ${HOME}/wget/lib
    • +
    + +

    +In this case, ${HOME} is a shell variable holding the path of my home +directory. +

    + +

    +For GNU wget, we need to provide some OpenSSL libraries and Zlib. +Both of them are available in the Advance Toolchain native compiler. +However, the list of necessary libraries may vary according to the +project. If you don't know well the project you can use the following +tools in order to identify the list of libraries they use: +

    + +
    +ldd <executable>
    +rpm -q --requires -p <package.rpm>
    +dpkg-deb -f <package.deb> | grep "Depends:"
    +
    + +

    +Usually the list of libraries necessary to build a project is the same +across all processor architectures. So, you may use the above +commands against an executable or package compiled for another processor. +

    + +

    +This is the list of files required in order to build wget: +

    + +
    +$ ls -1 ${HOME}/wget/include/
    +openssl/
    +zconf.h
    +zlib.h
    +$ ls -1 ${HOME}/wget/lib/
    +libcrypto.so
    +libcrypto.so.1.0.0
    +libssl.so
    +libssl.so.1.0.0
    +libz.so
    +libz.so.1
    +libz.so.1.2.6
    +
    + +

    +Make sure the libraries are really compiled for the target processor. +If they don't match, you won't be able to use them. +You may use 'readelf -h' to verify this information: +

    + +
    +$ /opt/at7.1/bin/powerpc64le-linux-gnu-readelf -h ${HOME}/wget/lib/libz.so.1.2.6
    +...
    +  Data:                              2's complement, little endian
    +...
    +  Machine:                           PowerPC64
    +...
    +
    +

    Build

    +

    +With the header files and libraries in place, the system is ready to +start the build. So, create a separate build directory: +

    + +
    mkdir ${HOME}/wget/build && cd ${HOME}/wget/build
    +
    + +

    +After entering the separate build directory, it's possible to +configure the build by running: +

    + +
    CC=/opt/at7.1/bin/powerpc64le-linux-gnu-gcc \
    +CFLAGS="-I${HOME}/wget/include" \
    +LDFLAGS="-L${HOME}/wget/lib" \
    +        ../wget-1.15/configure \
    +                --host=powerpc64le-linux \
    +                --with-ssl=openssl
    +
    + +

    +Where: +

    +
      +
    • + CC specifies which compiler to use. In this case, Advance +Toolchain 7.1 cross compiler for POWER little endian. +Cross compilers usually have a prefix in their program name +to clearly indicate they won't generate executable code for +the current processor. In this case, the prefix is +"powerpc64le-linux-gnu-". This rule applies to all programs, +e.g. g++, gdb, ld, as, etc. +
    • +
    • + CFLAGS="-I" indicates where the compiler will find the header files. +
    • +
    • + LDFLAGS="-L" indicates where the linker will find the libraries. +
    • +
    • + ../wget-1.15 this is the directory where wget source code is +available. In this case it is the same of +${HOME}/wget/wget-1.15. +
    • +
    • + --host=powerpc64le-linux indicates this code will run on POWER +little endian. +
    • +
    • + --with-ssl=openssl forces wget to use OpenSSL. +
    • +
    + +

    +Finally, build wget: +

    + +
    make
    +
    + +

    +After running this you'll find the program available at +${HOME}/wget/build/src/wget. +

    + +

    +You can now copy it to a POWER little endian system with the Advance Toolchain +runtime package installed and run it. +

    + + +

    Frequently Asked Questions

    + +
      +
    1. Are cross compiler builds slower?
    2. +
    3. If I build a program using a cross compiler will it be slower than using a native toolchain?
    4. +
    5. My project doesn't allow to pass flags to the linker or to the compiler. How can I use extra libraries?
    6. +
    + +

    Are cross compiler builds slower?

    +

    +Not necessarily. It depends on the code being built and the +level of optimization in use. +

    + +

    If I build a program using a cross compiler will it be slower than using a native toolchain?

    +

    +No. There are some differences in the metadata of the binaries, but +it will run at the same speed. +

    + +

    My project doesn't allow to pass flags to the linker or to the compiler. How can I use extra libraries?

    +

    + In this case, it isn't possible to pass -I to the compiler or -L to linker and + the only possible solution is to save the headers and libraries in one of the + Advance Toolchain directories: +

      +
    • + For POWER big endian (ppc or ppc64):
      + /opt/atX.X/ppc/usr/include
      + /opt/atX.X/ppc/usr/lib (32-bit libraries)
      + /opt/atX.X/ppc/usr/lib64 (64-bit libraries) +
    • +
    • + For POWER little endian (ppc64le):
      + /opt/atX.X/ppc64le/usr/include
      + /opt/atX.X/ppc64le/usr/lib64 +
    • +
    + Be careful to not override any Advance Toolchain files while copying the + files. +

    + + +

    Footnotes:

    + +

    +1 +Wikipedia - Definition of cross compilers: +http://en.wikipedia.org/wiki/Cross_compiler +

    + +

    +2 +GNU wget project page: +https://www.gnu.org/software/wget/ +

    diff --git a/fvtr/amino/amino.exp b/fvtr/amino/amino.exp new file mode 100755 index 000000000..119e26ffd --- /dev/null +++ b/fvtr/amino/amino.exp @@ -0,0 +1,48 @@ +#! /usr/bin/expect +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# +# Check if AT provides the 3 libraries of Amino for ppc32 and pp64 for both +#static and shared linking. +# + +source ./shared.exp + +set CXX [compiler_path g++] +set CFLAGS "-O2 -Wall" + +set LIBS "-lalg -lstm -lclfalloc" + +if { [array names env -exact "AT_AMINO_VER"] == "" } { + printit "WARNING: Amino not configured in config file. Ignoring..." + exit ${ENOSYS} +} else { + set tmp_file [exec mktemp] + + if { $TARGET32 } { + printitnonewline "Testing 32 bit static and dynamic linking..." + compile "${CXX} -m32 -static ${CFLAGS} $FULLPATH/test.cpp ${LIBS} -o ${tmp_file}" + compile "${CXX} -m32 ${CFLAGS} $FULLPATH/test.cpp ${LIBS} -o ${tmp_file}" + printitcont "\t\t\t\t\t\[SUCCESS\]" + } + if { $TARGET64 } { + printitnonewline "Testing 64 bit static and dynamic linking..." + compile "${CXX} -m64 -static ${CFLAGS} $FULLPATH/test.cpp ${LIBS} -o ${tmp_file}" + compile "${CXX} -m64 ${CFLAGS} $FULLPATH/test.cpp ${LIBS} -o ${tmp_file}" + printitcont "\t\t\t\t\t\[SUCCESS\]" + } + + file delete -force ${tmp_file} +} diff --git a/fvtr/amino/test.cpp b/fvtr/amino/test.cpp new file mode 100644 index 000000000..2eee7df02 --- /dev/null +++ b/fvtr/amino/test.cpp @@ -0,0 +1,32 @@ +/* Copyright 2017 IBM Corporation +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +#include + +#define SIZE 16 + +int main() +{ + int array[SIZE] __attribute__((aligned(16)));; + int i; + + for (i = 0; i < SIZE; i++) { + array[i] = SIZE - i; + } + + amino::aa_sort(array, array + SIZE); + + return 0; +} diff --git a/fvtr/boost/boost.exp b/fvtr/boost/boost.exp new file mode 100755 index 000000000..88f0dd415 --- /dev/null +++ b/fvtr/boost/boost.exp @@ -0,0 +1,61 @@ +#! /usr/bin/expect +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Tests for Boost +# + +source ./shared.exp + +set rc 0 + +set CXX [compiler_path g++] +set CFLAGS "-O2 -Wall" + +if { [array names env -exact "AT_BOOST_VER"] == "" } { + printit "WARNING: Boost is not configured in the config file." + printit "Skipping..." + exit $ENOSYS +} + +if { $env(AT_CROSS_BUILD) == "yes" } { + if { $env(AT_BUILD_ARCH) == "ppc64le" } { + set install_prefix "$env(AT_DEST)/$env(AT_BUILD_ARCH)/usr" + } else { + set install_prefix "$env(AT_DEST)/ppc/usr" + } +} else { + set install_prefix $env(AT_DEST) +} + +# +# Check if AT is able to build and link against basic Boost libraries +# This test checks for important headers and both static and dynamic libs +# +set tmp_file [exec mktemp] + +if { $TARGET32 } { + printit "Testing target 32 linking..." + compile "${CXX} -m32 -static ${CFLAGS} -lboost_random $FULLPATH/test.cpp $install_prefix/lib/libboost_random.a -o ${tmp_file}" + compile "${CXX} -m32 ${CFLAGS} $FULLPATH/test.cpp -lboost_random -lboost_system -o ${tmp_file}" + printit "Successfully built 32 bit static and dynamic executables" +} +if { $TARGET64 } { + printit "Testing target 64 linking..." + compile "${CXX} -m64 -static ${CFLAGS} -lboost_random $FULLPATH/test.cpp $install_prefix/lib64/libboost_random.a -o ${tmp_file}" + compile "${CXX} -m64 ${CFLAGS} $FULLPATH/test.cpp -lboost_random -lboost_system -o ${tmp_file}" + printit "Successfully built 64 bit static and dynamic executables" +} + +exec rm -f ${tmp_file} diff --git a/fvtr/boost/test.cpp b/fvtr/boost/test.cpp new file mode 100644 index 000000000..93f391e4f --- /dev/null +++ b/fvtr/boost/test.cpp @@ -0,0 +1,26 @@ +/* Copyright 2017 IBM Corporation +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +#include +#include + +int main() +{ + boost::random::mt19937 random; + + std::cout << random << std::endl; + + return 0; +} diff --git a/fvtr/ck_binaries/ck_binaries.exp b/fvtr/ck_binaries/ck_binaries.exp new file mode 100755 index 000000000..b92a4b455 --- /dev/null +++ b/fvtr/ck_binaries/ck_binaries.exp @@ -0,0 +1,141 @@ +#! /usr/bin/expect +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Check if some important executables are available, like all wrapper scripts +# and some links +# + +source shared.exp +source config_parser.exp +set rc 0 + +# Check if the variables are already defined on environment before parsing +# the config file +set at_dir $env(AT_DEST) + +# Get gcc version in the format: X.Y.Z +set CC [compiler_path] +set gcc_ver $env(AT_GCC_VER) +regexp "($gcc_ver\[^\[:blank:\]\]+)" \ + [exec $CC --version | head -n 1] gcc_ver + +# n_exec - List of filenames without prefix +# alt_exec - List of filenames starting with alternative prefix (powerpc-linux-) +# tgt_exec - List of filenames starting with target prefix (powerpc64-linux-) +# +# as_exec = assembler related files +# alt_exec = set of files +# n_exec = alt_exec + another set +# tgt_exec = n_exec + a different thing +# plt_exec = as_exec + n_exec +set as_exec {ar as ld nm objcopy objdump ranlib strip} + +set alt_exec $as_exec +lappend addr2line c++filt size strings + +set n_exec $alt_exec +lappend n_exec c++ g++ gcc gfortran + +set tgt_exec $n_exec +lappend tgt_exec gcc-$gcc_ver + +set plt_exec $as_exec +if { $env(AT_CROSS_BUILD) == "yes" && $env(AT_MAJOR_VERSION) < 8.0 } { + lappend plt_exec ld.bfd c++ g++ gcc gfortran +} else { + lappend plt_exec ld.bfd +} + +if { $env(AT_MAJOR_VERSION) >= 9.0 } { + lappend plt_exec ld.gold +} + +# Binaries distributed with a different name on cross and non-cross +set dif_exec {cpp elfedit embedspu gprof readelf} +if { $env(AT_CROSS_BUILD) == "yes" } { + set alt_exec [concat ${alt_exec} ${dif_exec}] + set tgt_exec [concat ${tgt_exec} ${dif_exec}] +} else { + set n_exec [concat ${n_exec} ${dif_exec}] +} + +printit "Checking if some binaries are available..." +# The cross compiler only have prefixed executables +if { [string match no $env(AT_CROSS_BUILD)] } { + foreach exe ${n_exec} { + if { [file exists $at_dir/bin/$exe] == 0 } { + printitcont "Error: File $at_dir/bin/$exe is missing." + set rc 1 + } + } +} + +foreach exe $tgt_exec { + if { ![file exists $at_dir/bin/$env(AT_TARGET)-$exe] } { + printitcont "Error: File \ +$at_dir/bin/$env(AT_TARGET)-$exe is missing." + set rc 1 + } + +} + +# Check architecture based executables +foreach exe ${plt_exec} { + if { [file exists $at_dir/$env(AT_TARGET)/bin/$exe] == 0 } { + printitcont "Error: File $at_dir/$env(AT_TARGET)/bin/$exe is missing." + set rc 1 + } +} + +# We only have files with alternative prefix when building for 32 & 64 bit +if { $TARGET32 && $TARGET64 } { + switch -regexp $env(AT_MAJOR_VERSION) { + "\[4567\]\.0" { + # AT version < 7.1 + set exeprefix "powerpc-linux-" + } + default { + # Since AT 7.1 + set exeprefix "powerpc-linux-gnu-" + } + } + + foreach exe $alt_exec { + printitcont "Checking alt file: $at_dir/bin/${exeprefix}${exe}" + if { ![file exists $at_dir/bin/${exeprefix}${exe}] } { + printitcont "Error: File \ +$at_dir/bin/${exeprefix}${exe} is missing." + set rc 1 + } + } +} + +if { $rc == 0 } { + printit "All binaries are available." +} + +if { $BLD_ARCH_PPC64LE } { + set test_exec "${FULLPATH}/le_test" + printit "Verifying executables are marked as LE..." + compile "${CC} -m64 ${FULLPATH}/test.c -o ${test_exec}" + set lerc [built_for_le "${test_exec}"] + if { $lerc > 0 } { + set rc 1 + printitcont "Program ${test_exec} not marked as ppc64le" + } + exec rm -f ${test_exec} +} + +exit $rc diff --git a/fvtr/ck_binaries/test.c b/fvtr/ck_binaries/test.c new file mode 100644 index 000000000..c3f8ece74 --- /dev/null +++ b/fvtr/ck_binaries/test.c @@ -0,0 +1,22 @@ +/* Copyright 2017 IBM Corporation +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +#include +int +main(void) +{ + printf("Hello!\n"); + return 0; +} diff --git a/fvtr/ck_gold/ck_gold.exp b/fvtr/ck_gold/ck_gold.exp new file mode 100755 index 000000000..cbf6aacc9 --- /dev/null +++ b/fvtr/ck_gold/ck_gold.exp @@ -0,0 +1,52 @@ +#! /usr/bin/expect +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Check if binutils has been configured to build the gold linker +# and can link a trivial binary with it. + +source ./shared.exp + +set CC [compiler_path] +set CFLAGS "-O2 -Wall" + +printit "Checking if binutils has been built with the gold linker..." + +if { [regexp "5\..*|6\..*|7\..|8\..*" $env(AT_MAJOR_VERSION)] } { + printit "gold linker is not built prior to AT 9.0." + exit $ENOSYS +} + +# +# Gold is enabled by passing the --enable-gold when building +# binutils. +# +# We test whether the -fuse-ld=gold option works on all toolchains + +set tmp_file [exec mktemp] + +if { $TARGET32 } { + printit "Testing 32 bit gold linking..." + compile "${CC} -m32 ${CFLAGS} -mbss-plt -fuse-ld=gold $FULLPATH/test.c -lm -o ${tmp_file}" + printit "Successfully built and linked against 32 bit gold" +} +if { $TARGET64 } { + printit "Testing 64 bit gold linking..." + compile "${CC} -m64 ${CFLAGS} -fuse-ld=gold $FULLPATH/test.c -lm -o ${tmp_file}" + printit "Successfully built and linked against 64 bit libraries" +} + +exec rm -f ${tmp_file} + +exit 0 diff --git a/fvtr/ck_gold/test.c b/fvtr/ck_gold/test.c new file mode 100644 index 000000000..916bbb0c3 --- /dev/null +++ b/fvtr/ck_gold/test.c @@ -0,0 +1,32 @@ +/* Copyright 2017 IBM Corporation +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +#include +#include +#include + +int +main (int argc, char **argv) +{ + double a, b; + + if (argc < 2) + return EXIT_FAILURE; + + a = atof (argv[1]); + b = pow (a, a); + printf ("%f^%f = %f\n", a, a, b); + return EXIT_SUCCESS; +} diff --git a/fvtr/ck_ldconfig/ck_ldconfig.exp b/fvtr/ck_ldconfig/ck_ldconfig.exp new file mode 100755 index 000000000..d447cd416 --- /dev/null +++ b/fvtr/ck_ldconfig/ck_ldconfig.exp @@ -0,0 +1,85 @@ +#! /usr/bin/expect +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# +# Check if ldconfig is executed after an rpm installation, searching if +# ld.so.conf has all lib directories installed by the Advance Toolchain. +# +# To correctly work, this script requires all environment variables that +# enables a builds for specific Power processors. +# + +set at_dir $env(AT_DEST) +set rc 0 + +source ./shared.exp + +# The loader isn't available in the cross compiler +if { $env(AT_CROSS_BUILD) == "yes" } { + printit "Skipping: this is a cross compiler\t\[SUCCESS\]" + exit $ENOSYS +} + +printit "Checking if libraries' directories are available in ld.so.conf..." + +set dirs {} +# Basic AT directories +if { ${TARGET32} } { + lappend dirs $env(AT_TARGET)/lib lib +} +if { ${TARGET64} } { + lappend dirs $env(AT_TARGET)/lib64 lib64 +} + +# Processor-optimized directories +set proc_list [eval concat $env(AT_OPTMD_LIBS)] +foreach processor ${proc_list} { + if { ${TARGET32} } { + lappend dirs lib/${processor} + } + if { ${TARGET64} } { + lappend dirs lib64/${processor} + } +} + +# Check AT directories +set ldfile [open $at_dir/etc/ld.so.conf r] +set ldconfig [split [read $ldfile] \n] + +foreach dir $dirs { + set dir ${at_dir}/${dir} + if { [string first $dir $ldconfig] == -1 } { + printit "$dir:\tMissing" $ERROR + set rc 1 + } else { + printit "$dir:\tOK" + } +} + +# Check includes +set includes "${at_dir}/etc/ld.so.conf.d/*.conf /etc/ld.so.conf" +foreach include ${includes} { + set inc_phr "include ${include}" + if { [string first ${inc_phr} $ldconfig] == -1 } { + printit "Include $include is missing in ld.so.conf." + set rc 1 + } +} + +if { $rc == 0 } { + printit "Success" +} else { + fvtr_error "Test failed" +} diff --git a/fvtr/ck_ldds/ck_ldds.exp b/fvtr/ck_ldds/ck_ldds.exp new file mode 100755 index 000000000..f1140a0f7 --- /dev/null +++ b/fvtr/ck_ldds/ck_ldds.exp @@ -0,0 +1,86 @@ +#! /usr/bin/expect +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# +# List all dynamically linked binaries in AT's directory and call +# check_lib_dependencies + +source shared.exp +source config_parser.exp +set rc 0 + +# Check if the variables are already defined on environment before parsing +# the config file +set x [catch {set at_dir $env(AT_DEST)}] +if { $x != 0 } { + array set config [ config_parser $argv ] + set at_dir $config(AT_DEST) +} + +# As all binaries aren't PowerPC, they're always linked to system libraries +if { $env(AT_CROSS_BUILD) == "yes" } { + printit "Skipping dynamic linking: this is a cross compiler\t\[SUCCESS\]" + exit $ENOSYS +} + +proc has_broken_dynlink {file} { + set file_info [ exec file $file ] + set ret 0 + + if { [regexp "dynamically linked" $file_info] } { + if {[check_lib_dependencies $file]} { + set ret 1 + } + } + return ${ret} +} + + +set files [ exec find $at_dir -type f -perm /111 | \ + grep -Ev "$at_dir/(old/|compat/)?lib(64)?/ld\-" | \ + grep -Ev "\.debug$" ] + +foreach file $files { + if { [has_broken_dynlink $file] } { + set rc 1 + } +} + +# +# Important tests +# + +# If Python is being distributed check if GDB is linked to libpython as there +# already have been reports of GDB not linking with the distributed Python. +if { [array names env -exact "AT_PYTHON_VER"] != "" } { + if { ![regexp "^(\[0-9\]+\.\[0-9\]+)" $env(AT_PYTHON_VER) match \ + py_ver] } { + fvtr_error "Couldn't determine Python version from \ +$env(AT_PYTHON_VER)." + } + if { ${py_ver} >= 3.4 } { + set libname "libpython${py_ver}m" + } else { + set libname "libpython${py_ver}" + } + if {[check_lib_dependencies ${at_dir}/bin/gdb ${libname}]} { + set rc 1 + } +} + +if { $rc == 0 } { + printit "Verifying dynamic linking:\t\t\t\t\[SUCCESS\]" +} +exit $rc diff --git a/fvtr/ck_libbits/ck_libbits.exp b/fvtr/ck_libbits/ck_libbits.exp new file mode 100755 index 000000000..d79bc6d54 --- /dev/null +++ b/fvtr/ck_libbits/ck_libbits.exp @@ -0,0 +1,66 @@ +#! /usr/bin/expect +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# +# Check if all shared libraries are in the correct directory by testing if all +# shared libraries in $at_dest/lib are 32-bit and $at_dest/lib64 are 64-bit + +source shared.exp +source config_parser.exp + +set rc 0 + +# Check if the variables are already defined on environment before parsing +# the config file +set x [catch {set at_dir $env(AT_DEST)}] +if { $x != 0 } { + array set config [ config_parser $argv ] + set at_dir $config(AT_DEST) +} + +if { $TARGET32 } { + if {[file exists $at_dir/lib/]} { + set at_libs32 [ exec find $at_dir/lib/ -name lib*.so* -not -regex "$at_dir/lib\/gcc\/.*" ! -regex ".*\.debug$" ] + foreach lib $at_libs32 { + set lib_info [ exec file -b -L $lib ] + + if { [regexp "ELF" $lib_info] \ + && ! [regexp "32-bit" $lib_info] } { + set rc 1 + printit "\t\t\t ${lib} seems misplaced: \"${lib_info}\"." + } + } + } +} + +if { $TARGET64 } { + if {[file exists $at_dir/lib64/]} { + set at_libs64 [ exec find $at_dir/lib64/ -name lib*.so* -not -regex ".*\.debug$" ] + foreach lib $at_libs64 { + set lib_info [ exec file -b -L $lib ] + + if { [regexp "ELF" $lib_info] \ + && ! [regexp "64-bit" $lib_info] } { + set rc 1 + printit "\t\t\t ${lib} seems misplaced: \"${lib_info}\"." + } + } + } +} + +if { $rc == 0 } { + printit "Verifying libraries directory:\t\t\t\[SUCCESS\]" +} +exit $rc diff --git a/fvtr/ck_lock_elision/ck_lock_elision.exp b/fvtr/ck_lock_elision/ck_lock_elision.exp new file mode 100755 index 000000000..b90f08d63 --- /dev/null +++ b/fvtr/ck_lock_elision/ck_lock_elision.exp @@ -0,0 +1,98 @@ +#! /usr/bin/expect +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# +# Check if glibc has been configured, built and installed with lock elision +# support enabled on libpthread. + +source ./shared.exp + +set CC [compiler_path] +set CFLAGS "-O2 -Wall -pthread" + +printit "Checking if lock elision is enabled on libpthread..." + +if { [regexp "5\..*|6\..*|7\..*|8\..*" $env(AT_MAJOR_VERSION)] } { + printit "Lock elision is not supported prior to AT 9.0." + exit $ENOSYS +} + +if { $env(AT_CROSS_BUILD) == "yes" } { + printit "Lock elision testing can only be performed on a supported host." + exit $ENOSYS +} + +# +# Lock elision +# +# The configuration switch --enable-lock-elision on glibc enables lock elision +# support on libpthread. In order to check if the build actually enabled lock +# elision, we check whether a standard lock is promoted an elided lock. This +# requires a runtime check on a supported hardware. +# + +# Build and run a small example +set tmp_file [exec mktemp] +set rc 0 + +# Helper script to enable TLE +set tle_exec $env(AT_DEST)/scripts/tle_on.sh + +if { $TARGET32 } { + printit "Testing 32 bit pthread libraries for TLE." + compile "${CC} -m32 ${CFLAGS} $FULLPATH/tle_supported.c -o ${tmp_file}" + set status [catch {exec ${tle_exec} ${tmp_file}} msg] + if { $status != 0 && [lindex $::errorCode 2] != $ENOSYS } { + printit "Error: Expected 32b TLE support, did not find it: " \ + $msg + set rc 1 + } elseif { $status != 0 && [lindex $::errorCode 2] == $ENOSYS } { + printit "Warning: TLE not supported on this host" + set rc $ENOSYS + } else { + # Also verify TLE is disabled by default. + set status [catch {exec ${tmp_file}} msg] + if { $status == 0 } { + printit "Error: 32b TLE should not be enabled by default: " \ + $msg + set rc 1 + } + } +} +if { $TARGET64 } { + printit "Testing 64 bit pthread libraries for TLE." + compile "${CC} -m64 ${CFLAGS} $FULLPATH/tle_supported.c -o ${tmp_file}" + set status [catch {exec ${tle_exec} ${tmp_file}} msg] + if { $status != 0 && [lindex $::errorCode 2] != $ENOSYS } { + printit "Error: Expected 64b TLE support, did not find it: " \ + $msg + set rc 1 + } elseif { $status != 0 && [lindex $::errorCode 2] == $ENOSYS } { + printit "Warning: TLE not supported on this host" + set rc $ENOSYS + } else { + # Also verify TLE is disabled by default. + set status [catch {exec ${tmp_file}} msg] + if { $status == 0 } { + printit "Error: 64b TLE should not be enabled by default: " \ + $msg + set rc 1 + } + } +} + +exec rm -f ${tmp_file} +exit $rc + diff --git a/fvtr/ck_lock_elision/tle_supported.c b/fvtr/ck_lock_elision/tle_supported.c new file mode 100644 index 000000000..ae129c8cb --- /dev/null +++ b/fvtr/ck_lock_elision/tle_supported.c @@ -0,0 +1,56 @@ +/* Copyright 2017 IBM Corporation +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +#include +#include +#include +#include + +#include + + +/* glibc doesn't export this constant, but if set, it indicates the + elided locks are used. It probably won't change, but it is the + only way to verify if elision is actually being used. */ +#define LE_ENABLED_BIT (256) + +int +main () +{ + /* Verify we've got HTM support */ + unsigned long int hwcap2 = getauxval (AT_HWCAP2); + + if (!hwcap2) { + perror ("getauxval"); + return EXIT_FAILURE; + } + + if (!(hwcap2 & PPC_FEATURE2_HAS_HTM)) + return ENOSYS; + + pthread_mutex_t lock = PTHREAD_MUTEX_INITIALIZER; + /* By default, a lock is never an elidable lock, but if + configured with elided locks, it will be "promoted" after + the first lock */ + if (pthread_mutex_lock (&lock)) { + perror ("pthread_mutex_lock"); + return EXIT_FAILURE; + } + if( lock.__data.__kind & LE_ENABLED_BIT ) { + return EXIT_SUCCESS; + } + fprintf (stderr, "kind is %d\n", lock.__data.__kind); + return EXIT_FAILURE; +} diff --git a/fvtr/ck_provides/ck_provides.exp b/fvtr/ck_provides/ck_provides.exp new file mode 100755 index 000000000..a8561788b --- /dev/null +++ b/fvtr/ck_provides/ck_provides.exp @@ -0,0 +1,203 @@ +#! /usr/bin/expect +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# +# Check if the packages have the strings advance-toolchain-runtime, +# advance-toolchain-devel, advance-toolchain-perf and +# advance-toolchain-mcore-libs in the Provides information. + +source shared.exp +source config_parser.exp + +if { $env(AT_CROSS_BUILD) == "yes" } { + printit "Skipping: this is a cross compiler\t\[SUCCESS\]" + exit $ENOSYS +} + +# Get the strings in Provides information and filter only the string +# independent of the version. e.g. "advance-toolchain-runtime". +# The return code is passed as argument, because if not it would be +# subscribed with an empty string. +# package - package name. +# expected - string expected in Provides. +# rc - return code. +proc process_rpm {package expected rc} { + if { [catch {eval exec rpm -q --provides ${package} \ + | grep -E "advance-toolchain" \ + | grep -v "$::env(AT_NAME)"} \ + res] } { + # When ${res} is "", it means the package doesn't provide + # anything extra. + if { "${res}" == "" } { + printit "Provides for ${package} not found." + return 1 + } else { + fvtr_error "Failed to collect provides data: ${res}" + } + } + # Trim is needed here because the string is returned with two white + # spaces in the end. + set provides [string trim ${res}] + # Compare if the string has the exact value expected. + if { ![string equal ${expected} ${provides}] } { + printit "Provides for ${package} not found." + return 1 + } + + return ${rc} +} + +# Do the same as process_rpm for DEB packages. +proc process_deb {package expected} { + global at_ver_rev + global ERROR + global ENOSYS + + set at_full_ver [append_at_internal ${at_ver_rev}] + set version "(= ${at_full_ver})" + + if { ![info exists ::env(AT_WD)] } { + if { ![exec dpkg-query --status ${expected}]} { + printit "User didn't install package ${expected}.\ +Can't run this test." + return ${ENOSYS} + } + + return ${ENOSYS} + + # TODO: Adapt this code to the new dummy package. + # Keep in mind that, the package installed may not be of the + # same version you're trying to test. + # The biggest problem is that dpkg-query doesn't provide a way + # to query for a specific version of a package. + set depends [string trimleft [exec dpkg-query --status \ + ${expected} | grep -E "Provides"] "Provides: "] + # We need trim here because the query returns the string with + # "Provides:" in the begining. + set provides [string trimleft [exec dpkg-query --status \ + ${package} | grep -E "Provides"] "Provides: "] + if { ![string equal ${expected} ${provides}] } { + printit "Provides for ${package} not found." + return ${ERROR} + } + } else { + set deb_path $::env(AT_WD)/debs + + # Get the file name of the dummy package. + set dpkg [string replace ${package} 0 \ + [string first "_" ${package}]-1 ${expected}] + # Remove version and file type from the real package. + set rpkg [string replace ${package} \ + [string first "_" ${package}] \ + [string length ${package}]] + + set depends [string trimleft \ + [exec dpkg --info \ + ${deb_path}/${dpkg} \ + | grep -E "Pre-Depends"] \ + "Pre-Depends: "] + + if { [string first "${rpkg} ${version}" ${depends}] < 0 } { + printit "Package ${dpkg} doesn't depend on\ +\"${rpkg} ${version}\"" ${ERROR} + return ${ERROR} + } + } + + return 0 +} + +# Get each package that needs be checked and compare the string in Provides +# one by one. +# packages - list of packages names. +proc check_rpms {packages} { + global at_ver_rev + set rc 0 + + if { ![info exists ::env(AT_WD)] } { + set rpm_path "" + } else { + set rpm_path "-p $::env(AT_WD)/rpms/$::env(AT_HOST_ARCH)/" + } + + # AT 5.0 and 6.0 used to support devel and perf only. + set supported_pkgs {devel perf} + # AT 7.0 added the provides for runtime and mcore-libs. + if { ![regexp "5\..*|6\..*" $::env(AT_MAJOR_VERSION)] } { + lappend supported_pkgs runtime mcore-libs + } + foreach pkg ${supported_pkgs} { + set pkg_path [lindex ${packages} \ + [lsearch ${packages} \ + "*${pkg}-$::env(AT_MAJOR_VERSION)*"]] + set pkg_path "${rpm_path}${pkg_path}" + # Process the package and compare with the expected string. + set rc [process_rpm \ + ${pkg_path} \ + "advance-toolchain-${pkg} = ${at_ver_rev}" \ + ${rc}] + } + + return ${rc} +} + +# Do the same as check_rpm for DEB packages. +proc check_debs {packages} { + global at_ver_rev + set rc 0 + + # This is needed to make sure not to get runtime-compat package. + # The files .deb has runtime_at_version in the name but the installed + # packages has only runtime. + if { ![info exists ::env(AT_WD)] } { + set package [lindex ${packages} [lsearch ${packages} \ + "*runtime"]] + } else { + set package [lindex ${packages} [lsearch ${packages} \ + "*runtime_$::env(AT_MAJOR_VERSION)*"]] + } + set newrc [process_deb ${package} \ + "advance-toolchain-runtime"] + set rc [set_new_rc ${rc} ${newrc}] + + set package [lindex ${packages} [lsearch ${packages} "*devel_*"]] + set newrc [process_deb ${package} \ + "advance-toolchain-devel"] + set rc [set_new_rc ${rc} ${newrc}] + + set package [lindex ${packages} [lsearch ${packages} "*perf_*"]] + set newrc [process_deb ${package} \ + "advance-toolchain-perf"] + set rc [set_new_rc ${rc} ${newrc}] + + set package [lindex ${packages} [lsearch ${packages} "*mcore-libs_*"]] + set newrc [process_deb ${package} \ + "advance-toolchain-mcore-libs"] + set rc [set_new_rc ${rc} ${newrc}] + + return ${rc} +} + +set system [get_packaging_system] +set packages [get_packages_list ${system}] +set at_ver_rev $::env(AT_MAJOR_VERSION)-$::env(AT_REVISION_NUMBER) + +if { ${system} == "rpm" } { + set rc [check_rpms "${packages}"] +} else { + set rc [check_debs "${packages}"] +} + +exit ${rc} diff --git a/fvtr/ck_requires/ck_requires.exp b/fvtr/ck_requires/ck_requires.exp new file mode 100755 index 000000000..953462c6b --- /dev/null +++ b/fvtr/ck_requires/ck_requires.exp @@ -0,0 +1,325 @@ +#! /usr/bin/expect +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# +# Check if the AT RPMs require all libraries that the system should provide. + +source shared.exp +source config_parser.exp + +proc process_rpm_packages { packages cross_bld at_dest ldd_path } { + + global FULLPATH + global env + set rc 0 + set TMP_FILE $FULLPATH/requirements.tmp + + foreach package $packages { + # Ignore debuginfo packages. + if {[regexp "debuginfo" $package]} { + continue + } + + # Ignore golang package. + if {[regexp "golang" $package]} { + continue + } + + if { ![info exists env(AT_WD)] } { + printit "Processing package: ${package}" + set files [exec rpm -ql $package] + } else { + printit "Processing package: ${package}" + set rpm_path $env(AT_WD)/rpms/$env(AT_HOST_ARCH)/ + set files [exec rpm -qlp $rpm_path/$package] + } + + set requi $FULLPATH/$package.req + set diff $FULLPATH/$package.diff + + file delete $TMP_FILE $requi + + exec touch $requi + exec touch $TMP_FILE + + foreach file $files { + set suffix "" + + # Ignore ld.so, because when you run ldd on ld.so it + # outputs errors. + if {[regexp "ld\[^\ \]*\.so" $file]} { + continue + } + + if {![file executable $file] || ![file readable $file]} { + continue + } + set file_info [exec file -b -L $file] + if { [string first "dynamically linked" $file_info] < 0 } { + continue + } + + if { $cross_bld == "yes" } { + set readelf_path [exec which readelf] + set readelf_info [exec $readelf_path -h $file \ + | grep Machine] + if {[string first "PowerPC" $readelf_info] > 0} { + continue + } + } + + regexp "ELF (\[\[:digit:\]\]+)\-bit" $file_info match wordsize + if { $wordsize == 32 } { + set suffix "" + } elseif { $wordsize == 64 } { + set suffix ()(64bit) + } else { + fvtr_error "Can't recognize ${file} word size: \ +\"${wordsize}\"." + } + + # Grab the libraries provided by the system + if {[catch {exec $ldd_path $file | \ + grep -v $at_dest | \ + awk "/=>/ { print \$1 \"$suffix\" }" >> \ + $TMP_FILE} error_msg]} { + printit "Failed to ldd file $file: +$error_msg" + set rc 1 + } + + # TODO: Need to add versioned libs to the list + # objdump -p operf | awk '/required from/ {sub(/:/, "", $3); lib=$3} (lib!="") && ($4!="") { print lib "(" $4 ")";}' | sort -u + } + # Ignore some libraries: + # linux-vdso as no package provides it + # libselinux + # linux-gate is sometimes used instead of linux-vdso + set ignored "linux-vdso|libselinux|libaudit|linux-gate" + catch {exec cat $TMP_FILE | xargs -r -n 1 basename | sort -u | \ + grep -vE "${ignored}" > $requi} + + # Compare with the installed rpm packages + if { ![info exists ::env(AT_WD)] } { + catch {exec rpm -qR $package | grep -E "^lib" | \ + sort -u > $TMP_FILE} + } else { + catch {exec rpm -qRp $rpm_path/$package | \ + grep -E "^lib" | sort -u > $TMP_FILE} + } + if {[catch {exec diff -wB $TMP_FILE $requi > $diff}]} { + printit "Inconsistencies found on package $package\ +requirements." + set rc 1 + catch {exec awk "/^>/ \{print \$2\}" $diff} missing + if {$missing != ""} { + printit "$package is missing the following \ +requirements: $missing" + } + catch {exec awk "/^ \ + 0} { + continue + } + } + + # Get the list of libs from ldd of all the files in + # the pkg. + set req_list [exec $ldd_path $file | grep -v $at_dest \ + | xargs -r -n 1 basename ] + + set ignored "linux-vdso|libselinux|libaudit|linux-gate" + + # Find the lib*.so.* in the list of required libs from + # ldd save them in a hash by lib name, omitting those + # from the ignore list + foreach req $req_list { + if {[regexp "lib.*\.so" $req]} { + if {[string first "$req" $ignored] >= \ + 0} { + continue + } + set ldd_lib_hash($req) $req + } + } + + } + # Looking through the ldd_lib_hash, make sure that the lib is + # provided as part of one of the package's dependent packages + set found 1 + foreach ldd_lib [array names ldd_lib_hash] { + set keys [array names pkg_lib_hash] + if {[lsearch $keys $ldd_lib] < 0} { + if {$found == 1} { + printit "Missing dependencies for \ +package: $package" + set found 0 + } + printit " $ldd_lib" + } + } + + # If a package had a missing dependency, the test fails + if {$found == 0} { + set rc 1 + } + + } + return $rc +} + +set ldd_path "" + +# The cross compiler requires a different ldd +if { $env(AT_CROSS_BUILD) == "yes" } { + set ldd_path [exec which ldd] +} else { + set ldd_path $env(AT_DEST)/bin/ldd +} + +set system [get_packaging_system] + +# For AT 7.0-x cross compiler this test will fail on DEB systems if there is +# more than one release installed. e.g. 7.0-4 and 7.0-4-rc2. +# This occurs because these DEB packages are generated by converting RPM +# packages and the package version doesn't contain the internal release name. +if { $env(AT_MAJOR_VERSION) == "7.0" && $system == "deb" && \ + $env(AT_CROSS_BUILD) == "yes"} { + printit "Skipping: Packages converted from RPM to DEB.\t\[SUCCESS\]" + exit $ENOSYS +} + +set packages [get_packages_list ${system}] + +if { ${system} == "rpm" } { + printit "Processing rpm packages... " + set rc [ process_rpm_packages "$packages" "$env(AT_CROSS_BUILD)" \ + "$env(AT_DEST)" "$ldd_path"] +} else { + printit "Processing deb packages... " + set rc [ process_deb_packages "$packages" "$env(AT_CROSS_BUILD)" \ + "$env(AT_DEST)" "$ldd_path"] +} + +exit $rc diff --git a/fvtr/ck_tuned/ck_tuned.exp b/fvtr/ck_tuned/ck_tuned.exp new file mode 100755 index 000000000..831bdd795 --- /dev/null +++ b/fvtr/ck_tuned/ck_tuned.exp @@ -0,0 +1,68 @@ +#!/usr/bin/expect +# +# Check if all tuned shared libraries are available. + +source shared.exp + +set rc 0 + +# List of libraries to check for availability. +set libs {libc.so libcrypto.so libdfp.so libgcc_s.so libz.so} + +set rc 0 +set libs2 {} + +if { $env(AT_CROSS_BUILD) == "yes" } { + printit "AT doesn't distribute tuned libraries in the cross compiler." + exit ${ENOSYS} +} + +# Firstly, list the files affecting BZ #96899. +# In this scenario, we have to provide a directory for the processor required +# by the loader with symlinks inside it, i.e. BUILD_LOAD_ARCH. +if { $TARGET32 } { + set dir $env(AT_DEST)/lib/$env(AT_BUILD_LOAD_ARCH) + lappend libs2 ${dir} + foreach lib ${libs} { + lappend libs2 ${dir}/${lib} + } +} +if { $TARGET64 } { + set dir $env(AT_DEST)/lib64/$env(AT_BUILD_LOAD_ARCH) + lappend libs2 ${dir} + foreach lib ${libs} { + lappend libs2 ${dir}/${lib} + } +} + +# Now, list the real tuned libraries. +foreach processor [split $env(AT_OPTMD_LIBS) " \t\{\}\n"] { + if { $TARGET32 } { + set dir $env(AT_DEST)/lib/${processor} + lappend libs2 ${dir} + foreach lib ${libs} { + lappend libs2 ${dir}/${lib} + } + } + if { $TARGET64 } { + set dir $env(AT_DEST)/lib64/${processor} + lappend libs2 ${dir} + foreach lib ${libs} { + lappend libs2 ${dir}/${lib} + } + } +} + +foreach lib ${libs2} { + if {![file exists ${lib}]} { + set rc 1 + printit "Error: Couldn't find ${lib}" + } else { + printit "Found ${lib}" + } +} + +if { ${rc} == 0 } { + printit "Tuned libraries are available:\t\t\t\[SUCCESS\]" +} +exit ${rc} diff --git a/fvtr/config_parser.exp b/fvtr/config_parser.exp new file mode 100755 index 000000000..51e862d86 --- /dev/null +++ b/fvtr/config_parser.exp @@ -0,0 +1,48 @@ +#! /usr/bin/expect +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# +# Parse the AT's config file and return a list of the configured variables +# Parameters: +# config_file - the path to the config file +# return - return a list of configured variables using the array get +# format. So it's possible to convert it to array using +# array set. +# +proc config_parser {config_file} { + set blk_re "\[\[:blank:\]\]" + set varname_re "(\[\[:alpha:\]\]\[^\=\[:blank:\]\]*)" + set varval_re "(\[^\#\\n\'\"\]*)" + set variable_re "${varname_re}${blk_re}*\=${blk_re}*\[\"\'\]?${varval_re}\[\"\'\]?" + + set raw_config [ exec sh ./config_reader.sh $config_file ] + set lines [ split $raw_config \n ] + + unset -nocomplain config + + foreach line $lines { + set varname {} + set varval {} + + set x [ regexp $variable_re $line match varname varval ] + + if { $x == 1 } { + set config($varname) $varval + } + } + + return [array get config] +} diff --git a/fvtr/config_reader.sh b/fvtr/config_reader.sh new file mode 100755 index 000000000..6c1dc88ed --- /dev/null +++ b/fvtr/config_reader.sh @@ -0,0 +1,31 @@ +#!/bin/bash +# +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Processes and prints all variables in the config file specified at $1 +# + +file1=`mktemp` +file2=`mktemp` + +set > $file1 + +source $1 + +set > $file2 + +diff $file1 $file2 | grep ">" | grep "AT_" | awk '{ print $2 }' + +rm $file1 $file2 diff --git a/fvtr/dhrystone/dhrystone.exp b/fvtr/dhrystone/dhrystone.exp new file mode 100755 index 000000000..371e128ba --- /dev/null +++ b/fvtr/dhrystone/dhrystone.exp @@ -0,0 +1,92 @@ +#! /usr/bin/expect +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# +# Check if AT can compile and run dhrystone benchmark +# The testcase dry.c must be found in a directory +# named by env var DHRY_TEST_DIR + + +# The dhrystone.c testcase must exist in a directory +# named by env var DHRY_TEST_DIR + +source ./shared.exp + +# Run dhrystone and handle the behavior. +# +# Parameters: +# bin The path to the executable. +# +proc spawn_dry { bin } { + # The argument is the same used by "sh dry.c" (50000 runs). + spawn ${bin} 50000 + expect { + # Wait for 1 minute at most. + -timeout 60 + # This string indicates the end of the runs. + "Dhrystones per Second:" { + printit "\t\t\t Dhrystone test was successful.\n" + } + timeout { + printit "\t\t\t Running of dhrystone test timed out.\n" + exit 1 + } + default { + printit "\t\t\t Running of dhrystone test failed.\n" + exit 1 + } + } +} + +if { [array names env -exact DHRY_TEST_DIR] == "" } { + printit "Skipping: Didn't find dhrystone source directory." + exit $ENOSYS +} + +if { [file exists $env(DHRY_TEST_DIR)] == 0 } { + printit "Directory $env(DHRY_TEST_DIR) not found. Dhrystone won't be run." + exit $ENOSYS +} + +set CC [compiler_path] +set dry $env(DHRY_TEST_DIR)/dry.c + +cd $FULLPATH + +printit "Building dhrystone..." +compile "${CC} -c ${dry} -o dry1.o 2> run.out" +compile "${CC} -DPASS2 ${dry} dry1.o -o dry2 2> run.out" +compile "${CC} -c -DREG ${dry} -o dry1.o 2> run.out" +compile "${CC} -DPASS2 -DREG ${dry} dry1.o -o dry2nr 2> run.out" +compile "${CC} -c -O ${dry} -o dry1.o 2> run.out" +compile "${CC} -DPASS2 -O ${dry} dry1.o -o dry2o 2> run.out" +printit "\t\t\t Build done.\n" + +# Dhrystone can be executed only on native builds. +if { $env(AT_CROSS_BUILD) == "no" } { + printit "Runing dhrystone..." + spawn_dry "${FULLPATH}/dry2" + spawn_dry "${FULLPATH}/dry2nr" + spawn_dry "${FULLPATH}/dry2o" +} + +printit "\n\t\t\t\t\t\[SUCCESS\]" +file delete -force $FULLPATH/dry2 +file delete -force $FULLPATH/dry2nr +file delete -force $FULLPATH/dry2o +file delete -force $FULLPATH/run.out +file delete -force $FULLPATH/dry1.o + +exit 0 diff --git a/fvtr/errno.exp b/fvtr/errno.exp new file mode 100644 index 000000000..bf37c3efd --- /dev/null +++ b/fvtr/errno.exp @@ -0,0 +1,39 @@ +#! /usr/bin/expect +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +set SUCCESS 0 +set ENOSYS 38 + +# | old | new | return | +# | 1 | X | 1 | +# | X | 1 | 1 | +# | 0 | 38 | 38 | +# | 38 | 0 | 38 | +# | 38 | 38 | 38 | +# | 0 | 0 | 0 | +proc set_new_rc {oldrc newrc} { + if { ${newrc} == 1 } { + return ${newrc} + } + if { ${oldrc} == 1 } { + return ${oldrc} + } + if { ${oldrc} == 0 } { + return ${newrc} + } else { + return ${oldrc} + } +} diff --git a/fvtr/fvtr.sh b/fvtr/fvtr.sh new file mode 100755 index 000000000..f52ea1982 --- /dev/null +++ b/fvtr/fvtr.sh @@ -0,0 +1,232 @@ +#!/bin/bash +# +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# This script is the main driver script for the Function Verification Test +# An optional argument is a list of tests to be run. Each test will be in +# its own subdirectory and the name of the primary test script is the +# subdirectory’s name with a .exp extension. If the list of tests is not +# supplied, this script will run all tests. It does this +# by creating a list of subdirectories and loops thru the list calling each +# ‘primary’ test script in that directory. + +# The test scripts are passed three arguments, the name of the script being +# run, where to direct the output, and the AT_PLATFORM on which the test is +# being run. + +LOUD=OFF +FORCE=OFF +SCRIPTS2RUN=ALL +TESTS2RUN="" +CONFIGFILE="" + +function usage () { + echo "Usage: fvtr [-fl] [test1 test2 ...]" + echo " -f Force the test(s) to be run" + echo " -l Output is sent to the console" + + echo " '' path to the config file used to build AT" + echo " tests - a list of tests to run (optional). It is going" + echo " to run all tests by default." + echo " Example: fvtr -f ~/advance-toolchain/config.at5.0.sles10 " + exit 0 +} + +runall() +{ + TEMPS2RUN=$(find -type d | sort) + rdot='.' + rslash='/' + # rebuld this list with out the ./ + # strip off the . and ./ and concat the results in to a new list + for i in $TEMPS2RUN + do + temp=${i/#$rdot/''} + temp=${temp/#$rslash/''} + TESTS2RUN=$TESTS2RUN" "$temp + done +} + +# We need at least the config file. +if [[ ${#} -lt 1 ]]; then + usage + exit 1 +fi + +while getopts ":lf" Option; +do + case $Option in + f ) + FORCE=ON + ;; + l ) + LOUD=ON + ;; + \? ) + usage + exit 1 + ;; + esac +done +shift $(($OPTIND - 1)) + +CONFIGFILE="$1" +shift + +if [ -z "${CONFIGFILE}" ] +then + echo "Error: You must specify a config file." + usage + exit 1 +elif [ ! -e "${CONFIGFILE}" ] +then + echo "Error: Can't access \"${CONFIGFILE}\"." + exit 1 +fi + +# creating a file that will hold the AT_* vars +# scripts that need to use any of the AT_* vars can +# access them by calling: +# array set AT_ENV [ exec cat envvararray.txt ] +# i.e. $AT_ENV(AT_DEST) +# +source $CONFIGFILE +set > envtempfile.txt +grep "AT_" envtempfile.txt | sed 's/^> //' | sed "s/'/{/" | \ + sed "s/'/}/"| sed 's/=/!!!/' > envvars.txt +while read line +do + varname="" + varval="" + varname=$(echo $line | awk -F'!!!' '{ print $1 }') + varval=$(echo $line | awk -F'!!!' '{ print $2 }') + if [ ${#varval} -eq 0 ] + then + varval="NOT_SET" + fi + export $varname="$varval" +done < envvars.txt + +if [ -e "${AT_WD}" ] +then + export AT_WD=$AT_WD +fi + +export PATH=${AT_DEST}/bin:${PATH} + +if [ $LOUD = "OFF" ] +then + DIRECTOUTPUT=$(date +%Y%m%d)"fvtr.log" + if [ -e "$DIRECTOUTPUT" ] + then + rm "$DIRECTOUTPUT" + fi +else + DIRECTOUTPUT="stdout" +fi + +# Create a file to hold the auxv info. +# Scripts can read if they need any system info. +LD_SHOW_AUXV=1 /bin/true > auxv_info.txt + +PLATFORM="$(grep AT_PLATFORM auxv_info.txt | awk -F':' '{print $2}' \ + | sed 's/^ *//')" + +rdot='.' +rslash='/' +if [ $# -eq 0 ] +then + runall +else + isall="$(tr [A-Z] [a-z] <<< "$1")" + if [ $isall = 'all' ] + then + runall + else + TESTS2RUN=$@ + fi +fi + +total_passed=0 +total_ignored=0 +total_failed=0 + +for i in $TESTS2RUN +do + if [ -e "./"$i"/"$i".exp" ] + then + # Do not run a testcase if it has already been run (a log file + # is available). + if ! ls ./${i}/*fvtr.log &> /dev/null || [ $FORCE = "ON" ] + then + # Always print $PLATFORM at char position 25. + # As it's necessary to add a space between the name of + # the testcase and $PLATFORM, that leaves 23 characters + # for the name of the testcase, aka $i. The tab size + # is 8. + ind_level=$(expr \( 23 - ${#i} \) / 8 + 1) + indent="" + while [[ ${ind_level} -gt 0 ]] + do + indent="${indent}\t" + ind_level=$(expr ${ind_level} - 1) + done + # Limit the name of the testcase in 23 characters. + echo -ne "${i:0:23}${indent}$PLATFORM: " + + "./"$i"/"$i".exp" $i $DIRECTOUTPUT $PLATFORM + rc=$? + case "$rc" in + "0") + echo -e "\tpassed" + total_passed=$(expr ${total_passed} + 1) ;; + "38") + echo -e "\tignored" + total_ignored=$(expr ${total_ignored} + 1) ;; + *) + echo -e "\tfailed" + total_failed=$(expr ${total_failed} + 1) + ret=1 ;; + esac + else + echo "$i test already run. Use the -f option to" \ + "force it to run." + fi + fi +done + +echo "" +echo "**************** TEST SUMMARY *****************" +echo "Passed tests: ${total_passed}" +echo "Skipped tests: ${total_ignored}" +echo "Failed tests: ${total_failed}" +echo "***********************************************" + +# clean up +if [ -e auxv_info.txt ] +then + rm auxv_info.txt +fi +if [ -e envvars.txt ] +then + rm envvars.txt +fi +if [ -e envtempfile.txt ] +then + rm envtempfile.txt +fi + +exit $ret diff --git a/fvtr/gather_info.sh b/fvtr/gather_info.sh new file mode 100755 index 000000000..afa2c9412 --- /dev/null +++ b/fvtr/gather_info.sh @@ -0,0 +1,37 @@ +#!/bin/bash +# +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# Gather information from system + +LOG="sysinfo.log" + +{ + echo "---= Distribution info =---" + find /etc/ -maxdepth 1 -type f -name '*release' | xargs cat + + echo + echo -e "---= Kernel info: =---" + uname -a + + echo + echo -e "---= CPU info: =---" + cat /proc/cpuinfo + + echo + echo -e "---= Memory info: =---" + cat /proc/meminfo +} > ${LOG} diff --git a/fvtr/gcc-builtins/cpu-supports-cross.c b/fvtr/gcc-builtins/cpu-supports-cross.c new file mode 100644 index 000000000..4ab6b212c --- /dev/null +++ b/fvtr/gcc-builtins/cpu-supports-cross.c @@ -0,0 +1,11 @@ +// A GCC supporting __builtin_cpu_is() has a mechanism to detect when an +// invalid parameter is passed and should fail at compile time. +// However, if GCC doesn't support this builtin or if GCC does support, but +// glibc doesn't, this code will compile cleanly. +// So, this test pass when the build fails. + +int +foo (void) +{ + return __builtin_cpu_is ("foobar") != 0; +} diff --git a/fvtr/gcc-builtins/cpu-supports.c b/fvtr/gcc-builtins/cpu-supports.c new file mode 100644 index 000000000..aa6511e4a --- /dev/null +++ b/fvtr/gcc-builtins/cpu-supports.c @@ -0,0 +1,11 @@ +#include + +int +main (void) +{ + if (__builtin_cpu_supports ("ppc32") == 0 + && __builtin_cpu_supports ("ppc64") == 0) + abort (); + + return 0; +} diff --git a/fvtr/gcc-builtins/gcc-builtins.exp b/fvtr/gcc-builtins/gcc-builtins.exp new file mode 100755 index 000000000..e9b4b2530 --- /dev/null +++ b/fvtr/gcc-builtins/gcc-builtins.exp @@ -0,0 +1,42 @@ +#! /usr/bin/expect +# +# Test if GCC is providing mandatory built-ins. +# + +source ./shared.exp + +set rc 0 + +set CC [compiler_path] +set tmp_file [exec mktemp] + +# Test for __builtin_cpu_supports() and __builtin_cpu_is() (implicitly). +if { $env(AT_MAJOR_VERSION) >= 10.0 } { + printit "Testing for __builtin_cpu_supports..." + if { $env(AT_CROSS_BUILD) == "yes" } { + # Run a minimal test. The test pass if compilation fails. + set ret [catch {exec ${CC} -S ${FULLPATH}/cpu-supports-cross.c + -o ${tmp_file}}] + if { ${ret} == 0 } { + set rc 1 + printit "__builtin_cpu_supports is not available." \ + ${ERROR} + } + } else { + if { [compile "${CC} ${FULLPATH}/cpu-supports.c -o \ +${tmp_file}"] } { + set rc 1 + printit "Failed to build __builtin_cpu_supports" \ + ${ERROR} + } else { + exec "${tmp_file}" + } + } +} + +if { ${rc} == 0 } { + printit "All mandatory built-ins are available" +} + +exec rm -f ${tmp_file} +exit ${rc} diff --git a/fvtr/gccgo/gccgo.exp b/fvtr/gccgo/gccgo.exp new file mode 100755 index 000000000..3af6bc53e --- /dev/null +++ b/fvtr/gccgo/gccgo.exp @@ -0,0 +1,68 @@ +#! /usr/bin/expect +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# +# Check if gccgo can compile a simple program. +# + +set at_dir $env(AT_DEST) +set rc 0 + +source ./shared.exp + +set GCCGO [compiler_path gccgo] +set CFLAGS "-O2 -Wall" + +if { [regexp "5\..*|6\..*|7.0" $env(AT_MAJOR_VERSION)] } { + printit "gccgo is not supported prior to AT 7.1\t\[SUCCESS\]" + exit $ENOSYS +} + +printit "Running gccgo tests..." + +if { ![file exists $at_dir/bin/$env(AT_TARGET)-gccgo] } { + printitcont "Error: File \ +$at_dir/bin/$env(AT_TARGET)-gccgo is missing." + set rc 1 +} + +printit "Compiling with: ${GCCGO}..." +compile "${GCCGO} ${CFLAGS} $FULLPATH/test.go -o $FULLPATH/gotest" + +compile "${GCCGO} ${CFLAGS} $FULLPATH/testpkg.go -o $FULLPATH/gopkgtest" + +# Can't run the go binary if this is a cross +if { $env(AT_CROSS_BUILD) != "yes" } { + printit "Running gccgo package test..." + + spawn $FULLPATH/gopkgtest + + # Check the output for suspicious strings + expect { + -re ".*FAIL.*" { fvtr_error "gccgo test failed" } + -re ".*fail.*" { fvtr_error "gccgo test failed" } + -re ".*error.*" { fvtr_error "gccgo test failed" } + eof { } + } +} else { + printit "Program not run on cross" +} + +printit "\n\t\t\t\t\t\[SUCCESS\]" +file delete -force $FULLPATH/gotest +file delete -force $FULLPATH/gotest.o +file delete -force $FULLPATH/gopkgtest +file delete -force $FULLPATH/gopkgtest.o +exit $rc diff --git a/fvtr/gccgo/test.go b/fvtr/gccgo/test.go new file mode 100644 index 000000000..fefb41f6f --- /dev/null +++ b/fvtr/gccgo/test.go @@ -0,0 +1,23 @@ +/* Copyright 2017 IBM Corporation +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +package main + +import "fmt" + +func main() { + fmt.Println("Hello, World") +} + diff --git a/fvtr/gccgo/testpkg.go b/fvtr/gccgo/testpkg.go new file mode 100644 index 000000000..4ac7bd69b --- /dev/null +++ b/fvtr/gccgo/testpkg.go @@ -0,0 +1,75 @@ +/* Copyright 2017 IBM Corporation +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +package main + +import ( + "fmt" + "os" + "math" + "time" + "sort" + "regexp" +) + +func main() { + fmt.Println("Hello!") + + var time = time.Now() + var timepat = ".*20..-..-.. ..:..:.. .*" + var testresult = "PASS" + match, err := regexp.MatchString(timepat, time.String()) + if match { + fmt.Println("Error in time string", err.Error(), " fail") + testresult = "FAIL" + } else { + fmt.Println("time looks good") + } + fmt.Println("time: ", time) + + var mysqrt = math.Sqrt(1369) + + host, err := os.Hostname() + pid := os.Getpid() + + vals := []int{12, 21, 2, 73, 37,} + exp := []int{73, 37, 21, 12, 2,} + + sort.Sort(sort.Reverse(sort.IntSlice(vals))) + for i := 0; i < len(vals); i++ { + if vals[i] != exp[i] { + fmt.Println("Error in sorted list", i, vals[i], exp[i], " fail") + testresult = "FAIL" + } + } + + if mysqrt != 37 { + fmt.Println("Error in sqrt: fail") + testresult = "FAIL" + } else { + fmt.Println("sqrt is correct") + } + if err == nil { + fmt.Println("host is: ", host) + } else { + fmt.Println("Error with hostname: ", host, err.Error(), " fail") + testresult = "FAIL" + } + if pid == 0 { + fmt.Println("Error with pid: fail") + testresult = "FAIL" + } + fmt.Println("Test result: ", testresult) +} diff --git a/fvtr/gdb/gdb.exp b/fvtr/gdb/gdb.exp new file mode 100755 index 000000000..eb546b8b2 --- /dev/null +++ b/fvtr/gdb/gdb.exp @@ -0,0 +1,96 @@ +#! /usr/bin/expect +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Check if the AT GDB provides the correct version and works as expected + +source ./shared.exp +source gdb/gdbtest.exp + +if { [array names env -exact "AT_GDB_VER"] == "" } { + printit "GDB is not configured in the config file." $WARNING + printit "Skipping..." + exit $ENOSYS +} + +# AT 5.0 and 6.0 used to use development versions of GDB, instead of stable +# versions like AT >= 7.0. Which causes issues when trying to run this +# testcase, like when testing for GDB version. +if { [regexp "5\..*|6\..*" $env(AT_MAJOR_VERSION)] } { + printit "This test doesn't work on AT 5.0 or 6.0." $WARNING + printit "Skipping..." + exit $ENOSYS +} + + +# Get GDB version in the format: X.Y.Z +set GDB [compiler_path gdb] +set gdb_ver [exec $GDB --version | head -n 1] +set rc [string first $env(AT_GDB_VER) ${gdb_ver}] + +if { $rc < 0 } { + fvtr_error "Expecting \"$env(AT_GDB_VER)\" but saw \"$gdb_ver\"\n" + exit 1 +} +printit "gdb version: $gdb_ver" +if { $env(AT_CROSS_BUILD) == "yes" } { + exit 0 +} +printit "GDB: $GDB" +printit "Running AT GDB tests..." + +set CC [compiler_path] +# This must be unoptimized so the vars can be displayed +set CFLAGS "-O0 -Wall -g" + +set fail 0 + +if { [string index $env(AT_PYTHON_VER) 0] == "3" } { + set pytest "hello3-gdb.py" +} else { + set pytest "hello-gdb.py" +} + +if { $TARGET32} { + printit "Starting 32-bit compile..." + compile "${CC} -m32 ${CFLAGS} ${FULLPATH}/gdbtest.c -o \ +${FULLPATH}/at-gdbtest-32" + + printit "Running 32 bit gdb testcase" + set rc [ gdb_basic_test "$GDB" "${FULLPATH}/at-gdbtest-32" \ + "$env(AT_DEST)/lib" ] + if { $rc > 0 } { incr fail } + printit "Running 32 bit gdb python testcase" + set rc [ gdb_python_test "$GDB" "${FULLPATH}/at-gdbtest-32" \ + "$env(AT_DEST)/lib" "$pytest"] + if { $rc > 0 } { incr fail } + file delete -force ${FULLPATH}/at-gdbtest-32 +} +if { $TARGET64 } { + printit "Starting 64-bit compile..." + compile "${CC} -m64 ${CFLAGS} ${FULLPATH}/gdbtest.c -o \ +${FULLPATH}/at-gdbtest-64" + + printit "Running 64 bit gdb testcase" + set rc [ gdb_basic_test "$GDB" "${FULLPATH}/at-gdbtest-64" \ + "$env(AT_DEST)/lib64" ] + if { $rc > 0 } { incr fail } + + printit "Running 64 bit gdb python testcase" + set rc [ gdb_python_test "$GDB" "${FULLPATH}/at-gdbtest-64" \ + "$env(AT_DEST)/lib64" "$pytest" ] + if { $rc > 0 } { incr fail } + file delete -force ${FULLPATH}/at-gdbtest-64 +} +exit $fail diff --git a/fvtr/gdb/gdbtest.c b/fvtr/gdb/gdbtest.c new file mode 100644 index 000000000..6ab4222cb --- /dev/null +++ b/fvtr/gdb/gdbtest.c @@ -0,0 +1,42 @@ +/* Copyright 2017 IBM Corporation +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +#include +#define N 10 + +int x; +static double a[N]; +void init_x() { + x = 12; +} + +int main(void) +{ + int i=0; + double *p; + + x = 0; + p = &a[4]; + init_x(); + + for (i=0; i + +int main () { + mpz_t n; + + mpz_init(n); + + return 0; +} diff --git a/fvtr/golang/golang.exp b/fvtr/golang/golang.exp new file mode 100755 index 000000000..ba2244e03 --- /dev/null +++ b/fvtr/golang/golang.exp @@ -0,0 +1,69 @@ +#! /usr/bin/expect +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# +# Check if golang can run a simple program. +# + +set at_dir $env(AT_DEST) +set go_root /usr/local/go/ +set rc 0 + +source ./shared.exp + +if {[info exists env(AT_WD)]} { + printit "Skipping : running test suite on a compatible mode with the \ +build system.\t\[SUCCESS\]" + exit $ENOSYS +} + +if { $env(AT_MAJOR_VERSION) < 9.0 } { + printit "Golang is not supported prior to AT 9.0.\t\[SUCCESS\]" + exit $ENOSYS +} +if { $env(AT_CROSS_BUILD) == "yes" } { + printit "Golang tests not supported in the cross compiler.\t\[SUCCESS\]" + exit $ENOSYS +} +if { $env(AT_BUILD_ARCH) != "ppc64le" } { + printit "Golang is only supported on ppc64le.\t\[SUCCESS\]" + exit $ENOSYS +} + +set go $go_root/bin/go + +printit "Running golang tests..." + +if { ![file exists $go_root/bin/gofmt] } { + printitcont "Error: File \ +$go_root/bin/gofmt is missing." + set rc 1 +} + +printit "Running test with $go..." + +spawn $go run $FULLPATH/test.go + +# Check the output for suspicious strings +expect { + -re ".*FAIL.*" { fvtr_error "golang test failed" } + -re ".*fail.*" { fvtr_error "golang test failed" } + -re ".*error.*" { fvtr_error "golang test failed" } + eof { } + + printit "\n\t\t\t\t\t\[SUCCESS\]" +} + +exit $rc diff --git a/fvtr/golang/test.go b/fvtr/golang/test.go new file mode 100644 index 000000000..4ac7bd69b --- /dev/null +++ b/fvtr/golang/test.go @@ -0,0 +1,75 @@ +/* Copyright 2017 IBM Corporation +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +package main + +import ( + "fmt" + "os" + "math" + "time" + "sort" + "regexp" +) + +func main() { + fmt.Println("Hello!") + + var time = time.Now() + var timepat = ".*20..-..-.. ..:..:.. .*" + var testresult = "PASS" + match, err := regexp.MatchString(timepat, time.String()) + if match { + fmt.Println("Error in time string", err.Error(), " fail") + testresult = "FAIL" + } else { + fmt.Println("time looks good") + } + fmt.Println("time: ", time) + + var mysqrt = math.Sqrt(1369) + + host, err := os.Hostname() + pid := os.Getpid() + + vals := []int{12, 21, 2, 73, 37,} + exp := []int{73, 37, 21, 12, 2,} + + sort.Sort(sort.Reverse(sort.IntSlice(vals))) + for i := 0; i < len(vals); i++ { + if vals[i] != exp[i] { + fmt.Println("Error in sorted list", i, vals[i], exp[i], " fail") + testresult = "FAIL" + } + } + + if mysqrt != 37 { + fmt.Println("Error in sqrt: fail") + testresult = "FAIL" + } else { + fmt.Println("sqrt is correct") + } + if err == nil { + fmt.Println("host is: ", host) + } else { + fmt.Println("Error with hostname: ", host, err.Error(), " fail") + testresult = "FAIL" + } + if pid == 0 { + fmt.Println("Error with pid: fail") + testresult = "FAIL" + } + fmt.Println("Test result: ", testresult) +} diff --git a/fvtr/gotools/gotools.exp b/fvtr/gotools/gotools.exp new file mode 100755 index 000000000..4651deb43 --- /dev/null +++ b/fvtr/gotools/gotools.exp @@ -0,0 +1,58 @@ +#! /usr/bin/expect +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# +# Check if go tools can run simple programs. +# + +set at_dir $env(AT_DEST) +set rc 0 + +source ./shared.exp + +if { $env(AT_MAJOR_VERSION) < 8.0 } { + printit "Go Tools is not supported prior AT 8.0. Ignoring..." + exit $ENOSYS +} + +# gotools is not available in cross compilers +if { $env(AT_CROSS_BUILD) == "yes" } { + printit "Skipping gotools tests: this is a cross compiler\t\[SUCCESS\]" + exit $ENOSYS +} + +printit "Running go tools tests..." + +if { ![file exists $at_dir/bin/go] } { + printitcont "Error: File $at_dir/bin/go is missing." + set rc 1 +} else { + set GOTOOL [compiler_path go] +} + +set test_files {hello.go hello_cgo.go} + +foreach test $test_files { + spawn $GOTOOL run $FULLPATH/$test + expect { + -re ".*FAIL.*" { fvtr_error "go tools test failed" } + -re ".*fail.*" { fvtr_error "go tools test failed" } + -re ".*error.*" { fvtr_error "go tools test failed" } + eof { } + } +} + +printit "\n\t\t\t\t\t\[SUCCESS\]" +exit $rc diff --git a/fvtr/gotools/hello.go b/fvtr/gotools/hello.go new file mode 100644 index 000000000..54c6eb93c --- /dev/null +++ b/fvtr/gotools/hello.go @@ -0,0 +1,24 @@ +/* Copyright 2017 IBM Corporation +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +package main + +import ( + "fmt" +) + +func main() { + fmt.Printf("Hello, World\n") +} diff --git a/fvtr/gotools/hello_cgo.go b/fvtr/gotools/hello_cgo.go new file mode 100644 index 000000000..f12b12702 --- /dev/null +++ b/fvtr/gotools/hello_cgo.go @@ -0,0 +1,28 @@ +/* Copyright 2017 IBM Corporation +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +package main + + +// #include +// #include +import "C" +import "unsafe" + +func main() { + cs := C.CString("Hello, world from C\n") + C.fputs(cs, (*C.FILE)(C.stdout)) + C.free(unsafe.Pointer(cs)) +} diff --git a/fvtr/libauxv/libauxv.exp b/fvtr/libauxv/libauxv.exp new file mode 100755 index 000000000..bd1b1cffa --- /dev/null +++ b/fvtr/libauxv/libauxv.exp @@ -0,0 +1,71 @@ +#! /usr/bin/expect +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# +# Check if AT provides headers and static shared libraries for libauxv. +# + +source ./shared.exp + +# Check if the package is available on this build of the toolchain. +if { [array names env -exact "AT_LIBAUXV_VER"] == "" } { + printit "Skipping: libauxv is not available on this build\t\[SUCCESS\]" + exit $ENOSYS +} + +set at_dir $env(AT_DEST) +set CC [compiler_path] +set CFLAGS "-O2 -Wall" + + +set rc 0 +set LIBS "-lauxv -lpthread" + +set tmp_file [exec mktemp] + +if { $TARGET32 } { + printit "Testing 32 bit..." + if [ compile "${CC} -m32 -static ${CFLAGS} $FULLPATH/test.c $LIBS -o ${tmp_file}" ] { + set rc 1 + } else { + printitcont "\t\t\t Statically linking 32bit libauxv successful" + } + + if [ compile "${CC} -m32 ${CFLAGS} $FULLPATH/test.c $LIBS -o ${tmp_file}" ] { + set rc 1 + } else { + printitcont "\t\t\t Dynamic linking 32bit libauxv successful" + } + +} +if { $TARGET64 } { + printit "Testing 64 bit..." + if [ compile "${CC} -m64 -static ${CFLAGS} $FULLPATH/test.c $LIBS -o ${tmp_file}" ] { + set rc 1 + } else { + printitcont "\t\t\t Statically linking 64bit libauxv successful" + } + + if [ compile "${CC} -m64 ${CFLAGS} $FULLPATH/test.c $LIBS -o ${tmp_file}" ] { + set rc 1 + } else { + printitcont "\t\t\t Dynamic linking 64bit libauxv successful" + } +} +if { $rc == 0 } { + printit "Linking libauxv:\t\t\t\t\t\[SUCCESS\]" +} +exec rm -f ${tmp_file} +exit $rc diff --git a/fvtr/libauxv/test.c b/fvtr/libauxv/test.c new file mode 100644 index 000000000..1b85a155c --- /dev/null +++ b/fvtr/libauxv/test.c @@ -0,0 +1,61 @@ +/* Copyright 2017 IBM Corporation +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +#include +#include +#include +#include +#include +#include +#include + +int main() +{ + ElfW(auxv_t) *at_ptr = NULL; + unsigned long int hwcap_mask; + char * platform = NULL; + + if (prefetch_auxv ()) + { + printf("prefetch_auxv () failed with errno %d.\\n", errno); + return -1; + } + + hwcap_mask = (unsigned long int) query_auxv (AT_HWCAP); + + printf("HWCAP=0x%0*lx\\n",2 * (int) sizeof(unsigned long int), hwcap_mask); + +#ifdef __powerpc__ + if (hwcap_mask & PPC_FEATURE_64) + printf(" 64-bit\\n"); + + if (hwcap_mask & PPC_FEATURE_32) + printf(" 32-bit\\n"); +#endif + + platform = (char*) query_auxv (AT_PLATFORM); + + if (platform) + printf("PLATFORM=%s\\n", platform); + else + printf("AT_PLATFORM not supported\\n"); + + assert (query_auxv (AT_PAGESZ) == getpagesize ()); + + at_ptr = get_auxv (); + printf("get_auxv() = %p\\n", at_ptr); + + return 0; +} diff --git a/fvtr/libdfp/libdfp.exp b/fvtr/libdfp/libdfp.exp new file mode 100755 index 000000000..b8a5e08e8 --- /dev/null +++ b/fvtr/libdfp/libdfp.exp @@ -0,0 +1,85 @@ +#! /usr/bin/expect +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# +# Check if AT provides libdfp for ppc32 and ppc64 for both static and shared +# linking. +# + +source ./shared.exp + +# libdfp isn't available in cross compilers +if { [array names env -exact "AT_LIBDFP_VER"] == "" } { + printit "Skipping: libdfp is not available on this build\t\[SUCCESS\]" + exit $ENOSYS +} + +if { $env(AT_CROSS_BUILD) == "yes" } { + if { $env(AT_BUILD_ARCH) == "ppc64le" } { + set includedir "$env(AT_DEST)/$env(AT_BUILD_ARCH)/usr/include" + } else { + set includedir "$env(AT_DEST)/ppc/usr/include" + } +} else { + set includedir "$env(AT_DEST)/include" +} + +set at_dir $env(AT_DEST) +set CC [compiler_path] + +# Passing -I to gcc is usually undesired in FVTR tests. However, the user +# manual provided by libdfp explicitly states that this is required. +# +# Reference: https://github.com/libdfp/libdfp/blob/master/README.user +set CFLAGS "-O2 -Wall -D__STDC_WANT_DEC_FP__=1 -I${includedir}/dfp" + +set STATIC_LIBS "-ldfp -lm" + +set rc 0 +set tmp_file [exec mktemp] + +if { $TARGET32 } { + printit "Testing 32 bit linking..." + if [ compile "${CC} -m32 -static ${CFLAGS} $FULLPATH/test.c $STATIC_LIBS -o ${tmp_file}" ] { + set rc 1 + } else { + printitcont "\t\t\t Statically linking 32bit libdfp successful" + } + if [ compile "${CC} -m32 ${CFLAGS} $FULLPATH/test.c -ldfp -o ${tmp_file}" ] { + set rc 1 + } else { + printitcont "\t\t\t Dynamic linking 32bit libdfp successful" + } +} +if { $TARGET64 } { + printit "Testing 64 bit linking..." + if [ compile "${CC} -m64 -static ${CFLAGS} $FULLPATH/test.c $STATIC_LIBS -o ${tmp_file}" ] { + set rc 1 + } else { + printitcont "\t\t\t Statically linking 64bit libdfp successful" + } + if [ compile "${CC} -m64 ${CFLAGS} $FULLPATH/test.c $STATIC_LIBS -o ${tmp_file}" ] { + set rc 1 + } else { + printitcont "\t\t\t Dynamic linking 64bit soft libdfp successful" + } +} + +if { $rc == 0 } { + printit "Linking libdfp:\t\t\t\t\t\t\[SUCCESS\]" +} + +file delete -force ${tmp_file} +exit $rc diff --git a/fvtr/libdfp/test.c b/fvtr/libdfp/test.c new file mode 100644 index 000000000..e9033e065 --- /dev/null +++ b/fvtr/libdfp/test.c @@ -0,0 +1,47 @@ +/* Copyright 2017 IBM Corporation +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +#ifndef __STDC_WANT_DEC_FP__ +#error "Compilation parameter missing: -D__STDC_WANT_DEC_FP__=1" +#endif + +/* Try to include dfp headers without specifying the complete path */ +#include +#include +#include +#include + +/* Test if the headers from libdfp have indeed been included */ +#ifndef _DFP_FENV_H +#error "Header file dfp/fenv.h should have set _DFP_FENV_H" +#endif +#ifndef _DFP_MATH_H +#error "Header file dfp/math.h should have set _DFP_MATH_H" +#endif +#ifndef _DFP_STDLIB_H +#error "Header file dfp/stdlib.h should have set _DFP_STDLIB_H" +#endif +#ifndef _DFP_WCHAR_H +#error "Header file dfp/wchar.h should have set _DFP_WCHAR_H" +#endif + +int main () +{ + _Decimal64 d64 = 2.22222222222DD; + + sqrtd64(d64); + + return 0; +} diff --git a/fvtr/libexpat/libexpat.exp b/fvtr/libexpat/libexpat.exp new file mode 100755 index 000000000..1de261c47 --- /dev/null +++ b/fvtr/libexpat/libexpat.exp @@ -0,0 +1,59 @@ +#! /usr/bin/expect +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# +# Check if AT provides headers and static and shared libraries for libexpat. +# Test only for 64-bit versions as AT doesn't provide 32-bit. +# + +source ./shared.exp + +set rc 0 +set tmp_file [exec mktemp] + +if { $env(AT_CROSS_BUILD) == "yes" } { + if { $env(AT_MAJOR_VERSION) >= 8.0 } { + printit "Skipping libexpat tests: this is a cross \ +compiler\t\[SUCCESS\]" + exit $ENOSYS + } + + set CC [exec which gcc] + if { $HOST32 } { + set CFLAGS "-m32 -O2 -Wall" + } + if { $HOST64 } { + set CFLAGS "-m64 -O2 -Wall" + } + set LIB_PATH "-L $env(AT_DEST)/lib/" + set INCLUDE_PATH "-I $env(AT_DEST)/include/" +} else { + set CC [compiler_path] + set CFLAGS "-m64 -O2 -Wall" + set LIB_PATH " " + set INCLUDE_PATH " " +} + + +printit "Testing static linking..." +if [ compile "${CC} ${CFLAGS} -static $LIB_PATH $INCLUDE_PATH $FULLPATH/test.c \ + -lexpat -o ${tmp_file}" ] { + set rc 1 +} else { + printitcont "\t\t\t Statically linking libexpat successful" +} + +exec rm -f ${tmp_file} +exit $rc diff --git a/fvtr/libexpat/test.c b/fvtr/libexpat/test.c new file mode 100644 index 000000000..1b28e716c --- /dev/null +++ b/fvtr/libexpat/test.c @@ -0,0 +1,23 @@ +/* Copyright 2017 IBM Corporation +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +#include + +int main() +{ + XML_GetFeatureList(); + + return 0; +} diff --git a/fvtr/libhugetlbfs/libhugetlbfs.exp b/fvtr/libhugetlbfs/libhugetlbfs.exp new file mode 100755 index 000000000..5461d4750 --- /dev/null +++ b/fvtr/libhugetlbfs/libhugetlbfs.exp @@ -0,0 +1,76 @@ +#! /usr/bin/expect +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# +# Check if AT provides headers and static shared libraries for libhugetlbfs. +# + +source ./shared.exp + +set CC [compiler_path] +set CFLAGS "-O2 -Wall" +set rc 0 + +if { [array names env -exact "AT_LIBHUGETLBFS_VER"] == "" } { + printit "libhugetlbfs not configured in config file. Ignoring..." \ + ${WARNING} + exit ${ENOSYS} +} else { + set tmp_file [ exec mktemp ] + + if { $TARGET32 } { + printit "Testing 32 bit linking..." + + if [ compile "${CC} -m32 -static $FULLPATH/test.c -lhugetlbfs \ +-o $tmp_file" ] { + set rc 1 + } else { + printitcont "\t\t\t Statically linking 32bit \ +libhugetlbfs successful." + } + if [ compile "${CC} -m32 $FULLPATH/test.c -lhugetlbfs \ +-o $tmp_file" ] { + set rc 1 + } else { + printitcont "\t\t\t Linking 32bit libhugetlbfs \ +successful." + } + } + if { $TARGET64 } { + printit "Testing 64 bit linking..." + if [ compile "${CC} -m64 -static $FULLPATH/test.c -lhugetlbfs \ +-o $tmp_file" ] { + set rc 1 + } else { + printitcont "\t\t\t Statically linking 64bit \ +libhugetlbfs successful." + } + + if [ compile "${CC} -m64 $FULLPATH/test.c -lhugetlbfs \ +-o $tmp_file" ] { + set rc 1 + } else { + printitcont "\t\t\t Linking 64bit libhugetlbfs \ +successful." + } + + } + exec rm -f $tmp_file +} + +if { $rc == 0 } { + printit "Linking libhugetlbfs:\t\t\t\t\[SUCCESS\]" +} +exit $rc diff --git a/fvtr/libhugetlbfs/test.c b/fvtr/libhugetlbfs/test.c new file mode 100644 index 000000000..8f8d0e4d5 --- /dev/null +++ b/fvtr/libhugetlbfs/test.c @@ -0,0 +1,40 @@ +/* + * libhugetlbfs - Easy use of Linux hugepages + * Copyright (C) 2005-2006 David Gibson & Adam Litke, IBM Corporation. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 2.1 of + * the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#include +#include + +#include + +int main(int argc, char *argv[]) +{ + long hpage_size; + + hpage_size = gethugepagesize(); + + if (hpage_size > 0) { + printf("Huge page size is %ld bytes\n", hpage_size); + exit(0); + } + + if (hpage_size < 0) + printf("No hugepage kernel support\n"); + + exit(1); +} diff --git a/fvtr/libvecpf/libvecpf.exp b/fvtr/libvecpf/libvecpf.exp new file mode 100755 index 000000000..39307a157 --- /dev/null +++ b/fvtr/libvecpf/libvecpf.exp @@ -0,0 +1,72 @@ +#! /usr/bin/expect +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# +# Check if AT provides libvecpf for ppc32 and pp64 for both static and shared +# linking. +# + +source ./shared.exp + +if { [array names env -exact "AT_LIBVECPF_VER"] == "" } { + printit "Skipping: libvecpf is not available on this build\t\[SUCCESS\]" + exit $ENOSYS +} + +set at_dir $env(AT_DEST) +set CC [compiler_path] +set CFLAGS "-O2 -Wall -Wno-format" +set rc 0 + +set STATIC_LIBS "-lvecpf -lm" + +set tmp_file [exec mktemp] + +# To get the program to work with static linking, -Wl,-u,__libvecpf_init is needed +if { $TARGET32 } { + printit "Testing 32 bit linking with vecpf..." + if [ compile "${CC} -m32 -maltivec -static ${CFLAGS} $FULLPATH/test.c -Wl,-u,__libvecpf_init $STATIC_LIBS -o ${tmp_file}" ] { + set rc 1 + } else { + printitcont "\t\t\t Statically linking 32bit libvecpf successful" + } + if [ compile "${CC} -m32 -maltivec ${CFLAGS} $FULLPATH/test.c -lvecpf -o ${tmp_file}" ] { + set rc 1 + } else { + printitcont "\t\t\t Dynamic linking 32bit libvecpf successful" + } +} +if { $TARGET64 } { + printit "Testing 64 bit linking with vecpf..." + if [ compile "${CC} -m64 -maltivec -static ${CFLAGS} $FULLPATH/test.c -Wl,-u,__libvecpf_init $STATIC_LIBS -o ${tmp_file}" ] { + set rc 1 + } else { + printitcont "\t\t\t Statically linking 64bit libvecpf successful" + } + if [ compile "${CC} -m64 -maltivec ${CFLAGS} $FULLPATH/test.c -lvecpf -o ${tmp_file}" ] { + set rc 1 + } else { + printitcont "\t\t\t Dynamic linking 64bit libvecpf successful" + } +} + +printit "Testing shared linking with vecpf..." + +if { $rc == 0 } { + printit "Linking libvecpf:\t\t\t\t\t\t\[SUCCESS\]" +} + +file delete -force ${tmp_file} +exit $rc diff --git a/fvtr/libvecpf/test.c b/fvtr/libvecpf/test.c new file mode 100644 index 000000000..7db921f3a --- /dev/null +++ b/fvtr/libvecpf/test.c @@ -0,0 +1,25 @@ +/* Copyright 2017 IBM Corporation +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +#include +#include + +int main () +{ + vector float val = { -(11.0f/9.0f), 0.123456789f, 42.0f, 9876543210.123456789f }; + printf("vector float: %vf\n", val); + + return 0; +} diff --git a/fvtr/matrixreport.exp b/fvtr/matrixreport.exp new file mode 100755 index 000000000..471c8c3c8 --- /dev/null +++ b/fvtr/matrixreport.exp @@ -0,0 +1,134 @@ +#! /usr/bin/expect +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# This script takes a log file generated by the fvtr.sh script and builds +# a report. The report lists the tests run down the left-hand column and +# list the tested platforms along the top row. The purpose of the report +# is to give a quick summary of what tests have been run for each platform. + +# This procedure just draws a line of '-' +proc drawline {} { +global FIELDSIZE +global NUMofFIELDS +for {set i 1} { $i <= [expr ($FIELDSIZE * $NUMofFIELDS) + $NUMofFIELDS] } { incr i 1} { + puts -nonewline "-" +} +puts "" +} + +set REPORTFILE [lindex $argv 0] +set OUTPUT "matrix.txt" +set TESTSRUN "" +# List the ATs that will be tested +set TESTED_ATs "power5 power6 power7 Xpower5 Xpower6 Xpower7" +set aBLANK " " +set aBREAK ":" +set FIELDSIZE 12 +set NUMofFIELDS [expr [llength $TESTED_ATs] + 1 ] +set ALIST [exec find -type d] + +# build a list of tests (each subdirectory will contain a test +foreach TEST $ALIST { + set TEMP [exec echo $TEST | sed s#./##] + #puts $TEMP + #set TEMP [exec echo $TEST | sed 's/\.//'] + lappend TESTSRUN $TEMP +} +#puts $TESTSRUN + +# Go thru each dir and concat the logfile into one file to +# build the report from +foreach ATEST $TESTSRUN { + if {[ file exists "./$ATEST/$REPORTFILE"] == 1 } { + exec cat "./$ATEST/$REPORTFILE" >> $REPORTFILE + } +} + +foreach ATEST $TESTSRUN { + if {[ file exists "./$ATEST/$ATEST.exp"] == 1 } { + foreach AT $TESTED_ATs { + set CELL($ATEST,$AT) "----" + } + } +} + +#set fd [open $OUTPUT w] + +foreach ATEST $TESTSRUN { + if {[ file exists "./$ATEST/$ATEST.exp"] == 1 } { + foreach AT $TESTED_ATs { + if [catch {set aline [exec grep "$ATEST: $AT:.\*SUCCESS" $REPORTFILE]} input] { + set CELL($ATEST,$AT) "xxxx" + } else { + set CELL($ATEST,$AT) "good" + set goodrun "yes" + } + } + } +} + + +#lets try and build a report +drawline +for {set i 1} { $i <= $FIELDSIZE } { incr i 1} { + puts -nonewline $aBLANK +} +puts -nonewline "$aBREAK" +foreach aAT $TESTED_ATs { + set numBLANKS [expr ($FIELDSIZE - [string length $aAT] +1)/2] + for {set i 1} { $i <= $numBLANKS } { incr i 1} { + puts -nonewline $aBLANK + } + puts -nonewline $aAT + set numBLANKS [expr ($FIELDSIZE - [string length $aAT] )/2] + for {set i 1} { $i <= $numBLANKS } { incr i 1} { + puts -nonewline $aBLANK + } + puts -nonewline "$aBREAK" +} +puts "" +drawline + +foreach ATEST $TESTSRUN { + if {[ file exists "./$ATEST/$ATEST.exp"] == 1 } { + puts -nonewline $ATEST + set numBLANKS [expr $FIELDSIZE - [string length $ATEST] ] + for {set i 1} { $i <= $numBLANKS } { incr i 1} { + puts -nonewline $aBLANK + } + puts -nonewline "$aBREAK" + foreach AT $TESTED_ATs { + set numBLANKS [expr ($FIELDSIZE - [string length $CELL($ATEST,$AT)] +1)/2] + for {set i 1} { $i <= $numBLANKS } { incr i 1} { + puts -nonewline $aBLANK + } + puts -nonewline "$CELL($ATEST,$AT)" + set numBLANKS [expr ($FIELDSIZE - [string length $CELL($ATEST,$AT)] )/2] + for {set i 1} { $i <= $numBLANKS } { incr i 1} { + puts -nonewline $aBLANK + } + puts -nonewline "$aBREAK" + } + puts "" + drawline + } +} + +if {[ file exists "$REPORTFILE"] == 1 } { + exec mv $REPORTFILE $REPORTFILE.bak +} +#close $fd + diff --git a/fvtr/mpfr/mpfr.exp b/fvtr/mpfr/mpfr.exp new file mode 100755 index 000000000..e04537037 --- /dev/null +++ b/fvtr/mpfr/mpfr.exp @@ -0,0 +1,37 @@ +#! /usr/bin/expect +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# +# Check if AT provides the C headers and static libraries (64-bit) for mpfr. +# + +source ./shared.exp + +# mpfr isn't available in cross compilers +if { $env(AT_CROSS_BUILD) == "yes" } { + printit "Skipping mpfr tests: this is a cross compiler" + exit $ENOSYS +} + +set CC [compiler_path] +set CFLAGS "-O2 -Wall" + +set tmp_file [exec mktemp] + +printitnonewline "Testing static linking..." +compile "${CC} -m64 -static ${CFLAGS} $FULLPATH/test.c -lmpfr -o ${tmp_file}" +printitcont "\t\t\t\t\t\[SUCCESS\]" + +exec rm -f ${tmp_file} diff --git a/fvtr/mpfr/test.c b/fvtr/mpfr/test.c new file mode 100644 index 000000000..0e7ecf6d0 --- /dev/null +++ b/fvtr/mpfr/test.c @@ -0,0 +1,23 @@ +/* Copyright 2017 IBM Corporation +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +#include + +int main() +{ + mpfr_get_version(); + + return 0; +} diff --git a/fvtr/openssl/openssl.exp b/fvtr/openssl/openssl.exp new file mode 100755 index 000000000..5317dbfaf --- /dev/null +++ b/fvtr/openssl/openssl.exp @@ -0,0 +1,81 @@ +#! /usr/bin/expect +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# +# Tests for OpenSSL +# + +source ./shared.exp + +set rc 0 + +set CC [compiler_path] +set CFLAGS "-O2 -Wall" + + +if { [array names env -exact "AT_OPENSSL_VER"] == "" } { + printit "WARNING: OpenSSL is not configured in the config file." + printit "Skipping..." + exit $ENOSYS +} + +if { $env(AT_CROSS_BUILD) == "yes" } { + if { $env(AT_BUILD_ARCH) == "ppc64le" } { + set install_prefix "$env(AT_DEST)/$env(AT_BUILD_ARCH)/usr" + } else { + set install_prefix "$env(AT_DEST)/ppc/usr" + } +} else { + set install_prefix $env(AT_DEST) +} + +# +# Check if openssl executable is available +# +if { ![file exists $install_prefix/bin/openssl] } { + printit "ERROR: $install_prefix/bin/openssl is missing." + set rc 1 +} + +# +# We can't provide some libraries due to patent infringements +# Make sure they aren't there +# +foreach header {idea rc5} { + if { [file exists $install_prefix/include/openssl/${header}.h] } { + printit "ERROR: $install_prefix/include/openssl/${header}.h shouldn't be in the package" + } +} + +# +# Check if AT is able to build and link against basic OpenSSL libraries +# This test checks for important headers and both static and dynamic libs +# + +set tmp_file [exec mktemp] +if { $TARGET32 } { + printit "Testing 32 bit linking..." + compile "${CC} -m32 -static ${CFLAGS} -lcrypto $FULLPATH/test.c $install_prefix/lib/libcrypto.a -o ${tmp_file}" + compile "${CC} -m32 ${CFLAGS} $FULLPATH/test.c -lcrypto -o ${tmp_file}" + printit "Successfully built and linked against 32 bit libraries" +} +if { $TARGET64} { + printit "Testing 64 bit linking..." + compile "${CC} -m64 -static ${CFLAGS} -lcrypto $FULLPATH/test.c $install_prefix/lib64/libcrypto.a -o ${tmp_file}" + compile "${CC} -m64 ${CFLAGS} $FULLPATH/test.c -lcrypto -o ${tmp_file}" + printit "Successfully built and linked against 64 bit libraries" +} + +exec rm -f ${tmp_file} diff --git a/fvtr/openssl/test.c b/fvtr/openssl/test.c new file mode 100644 index 000000000..687e669e1 --- /dev/null +++ b/fvtr/openssl/test.c @@ -0,0 +1,26 @@ +/* Copyright 2017 IBM Corporation +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +#include +#include + +int main() +{ + if (SSLeay() < 0x1000000L) { + err(1, "OpenSSL seems to be old: %s", OPENSSL_VERSION_TEXT); + } + + return 0; +} diff --git a/fvtr/oprofile/oprofile.exp b/fvtr/oprofile/oprofile.exp new file mode 100755 index 000000000..21f446a07 --- /dev/null +++ b/fvtr/oprofile/oprofile.exp @@ -0,0 +1,156 @@ +#! /usr/bin/expect +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +set rc 0 +source ./shared.exp + +proc find_libs {libs} { + global env + global TARGET32 + global TARGET64 + global ERROR + set rc 0 + + foreach lib $libs { + set lib_list [ exec find $env(AT_DEST) -name ${lib}.so ] + set lib_found 1 + + if { $TARGET32 } { + printit "Checking if ${lib}.so is available for 32-bit..." + if { [string first "/lib/" $lib_list] < 0 } { + printit \ + "Library ${lib}.so is not available for 32-bit." \ + $ERROR + set lib_found 0 + } + } + + if { $TARGET64 } { + printit "Checking if ${lib}.so is available for 64-bit..." + if { [string first "/lib64/" $lib_list] < 0 } { + printit \ + "Library ${lib}.so is not available for 64-bit." \ + $ERROR + set lib_found 0 + } + } + + if { $lib_found } { + printit "${lib}.so check:\t\t\t\t\[SUCCESS\]" + } else { + set rc 1 + } + } + + return $rc +} + +if { [array names env -exact "AT_OPROFILE_VER"] == "" } { + printit "Oprofile is not configured in the config file." $WARNING + printit "Skipping..." + exit $ENOSYS +} + +# Check if libjvmti_oprofile.so and libjvmpi_oprofile.so are available for 32 +# and 64 bits. +switch -regexp $env(AT_MAJOR_VERSION) { + "5\..*" { + # AT 5.0 supports jvmpi only (kernel limits?). + set java_libs {"libjvmpi_oprofile"} + } + "6\..*|7\.0" { + # AT 6.0 and 7.0 support both jvmti and jvmpi. + set java_libs {"libjvmti_oprofile" "libjvmpi_oprofile"} + } + default { + # AT 7.1 had to migrate to Java 7.1, which was the only one to + # support ppc64le and supports jvmti.h only. + set java_libs {"libjvmti_oprofile"} + } +} +set rc [find_libs ${java_libs}] + +set binaries {opannotate oparchive opgprof ophelp opimport \ + opjitconv opreport} +switch -regexp $env(AT_OPROFILE_VER) { + "^0\..*" { + # OProfile 1.0.0 dropped support for opcontrol and oprofiled. + lappend binaries opcontrol oprofiled + } + default { + # As OProfile 1.0.0 dropped support for the legacy programs, + # it should provide the new one. + lappend binaries operf + } +} +# Check if some executables are installed. +foreach exe ${binaries} { + if { ![file exists $env(AT_DEST)/bin/${exe}] } { + printit "file ${exe} isn't installed." $ERROR + set rc 1 + } +} + +# test that specified commands run successfully + +proc test_this {command log} { + global ERROR + set rc 0 + set this_test [catch { eval exec ${command} >& ${log} } test_info] + if { ${this_test} != 0 } { + printit "problem with \"${command}\"." ${ERROR} + set rc 1 + } else { + printit "Test \"${command}\" passed test." + exec rm ${log} + } + return $rc +} + +# Define which word sizes are supported by this release. +set wordsize_l {} +if { ${TARGET32} } { + lappend wordsize_l 32 +} +if { ${TARGET64} } { + lappend wordsize_l 64 +} + +set rc [expr {$rc || [test_this "ophelp" ${FULLPATH}/ophelp.log]}] + +set test_source "${FULLPATH}/test.c" +set test_exec_base "${FULLPATH}/oprofile_test" +set CC [compiler_path] +set CFLAGS "-O2 -Wall" + +foreach archsize ${wordsize_l} { + set test_exec "${test_exec_base}-${archsize}" + + compile "${CC} -m${archsize} ${CFLAGS} ${test_source} -o ${test_exec}" + + set tool_test "ocount ${test_exec}" + set rc [expr {$rc || [test_this ${tool_test} ${FULLPATH}/ocount-${archsize}.log]}] + set tool_test "operf ${test_exec}" + set rc [expr {$rc || [test_this ${tool_test} ${FULLPATH}/operf-${archsize}.log]}] + set tool_test "opreport" + set rc [expr {$rc || [test_this ${tool_test} ${FULLPATH}/opreport-${archsize}.log]}] + set tool_test "opannotate --assembly" + set rc [expr {$rc || [test_this ${tool_test} ${FULLPATH}/opannotate-${archsize}.log]}] + + exec rm -rf ${test_exec} ${FULLPATH}/oprofile_data +} + +exit $rc diff --git a/fvtr/oprofile/test.c b/fvtr/oprofile/test.c new file mode 100644 index 000000000..15002d002 --- /dev/null +++ b/fvtr/oprofile/test.c @@ -0,0 +1,7 @@ +#include +#include + +int main(int argc, char *argv[]) { + printf("Hello!\n"); + return EXIT_SUCCESS; +} diff --git a/fvtr/package-check/package-check.exp b/fvtr/package-check/package-check.exp new file mode 100755 index 000000000..44786ebbc --- /dev/null +++ b/fvtr/package-check/package-check.exp @@ -0,0 +1,373 @@ +#! /usr/bin/expect +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# +# This script tests if the content of all RPM/DEB packages were generated as +# expected. Thus, the code does only a string match verification, searching for +# specific·directories and files inside all packages. +# +# For a complete package validation, try rpmlint and lintian: +# - https://github.com/rpm-software-management/rpmlint +# - https://lintian.debian.org/ + +source ./shared.exp + +set at_dir $env(AT_DEST) +set rc 0 + + +# This function calculates the total of debug files inside a list. All debug +# files should be located in lib/debug directory (for AT packages only). +# +# Parameters: +# file_list List of files +# +# Return: +# number of files inside /lib/debug directory. +proc get_number_of_debug_files { file_list } { + # filter isolates the debug symbol files + return [regexp -all -line ".*/$::env(AT_DIR_NAME)/.*lib/debug/.*\[^/\]\$"\ + $file_list] +} + +# This function counts the number of AT files in a list. +# +# Parameters: +# file_list List of files +# +# Return: +# number of files found +proc get_number_of_files { file_list } { + # filter isolates the AT files + return [regexp -all -line ".*/$::env(AT_DIR_NAME)/.*\[^/\]\$" $file_list] +} + +# This procedure opens an RPM package and returns a list with all file paths. +# +# Parameters: +# package_name name of the package +# +# Return: +# a list with all files +proc get_rpm_files { package_name } { + # Using the global scope ERROR variable + global ERROR + + # Collect the RPM package file content + set rpm_path $::env(AT_WD)/rpms/$::env(AT_HOST_ARCH) + set error [catch {exec rpm -qpl ${rpm_path}/${package_name}} file_list] + + if { ${error} != 0 } { + printit "Problem found when looking for ${package_name} content..." + exit $ERROR + } + + return ${file_list} +} + +# This procedure opens an DEB package and returns a list with all file paths. +# +# Parameters: +# package_name name of the package +# +# Return: +# a list with all files +proc get_deb_files { package_name } { + # Using the global scope ERROR variable + global ERROR + + # Collect the DEB package file content + set deb_path $::env(AT_WD)/debs/ + set error [catch {exec dpkg -c ${deb_path}/${package_name} \ + | awk {{print $6;}}} file_list] + + if { ${error} != 0 } { + printit "Problem found when looking for ${package_name} content..." + exit $ERROR + } + + return ${file_list} +} + +# This procedure gets the package flavor (runtime, devel, and etc). +# +# Parameters: +# package_name name of the package. +# +# Return: +# the package flavor. +proc get_pkg_flavor { package_name } { + # Using the global scope ERROR variable + global ERROR + + set prefix "at$::env(AT_MAJOR_VERSION)-" + if { ! [string equal "$::env(AT_INTERNAL)" "none" ] } { + append prefix "$::env(AT_INTERNAL)-" + } + + set ver_rev "$::env(AT_MAJOR_VERSION)-$::env(AT_REVISION_NUMBER)" + + # Cross compiled packages have different name patterns so that flavor + # should be parsed a bit different than native packages. + if { [regexp ".*cross.*" ${package_name}] } { + if { [regexp ".*-cross-common-.*" ${package_name}] } { + return "cross_common" + } + + if { [regexp ".*-cross-ppc.*-(\\w\+(-\\w\+)?)\[-_\]${ver_rev}" \ + ${package_name} pkg_flavor] } { + return "cross_${pkg_flavor}" + } else { + printit "Unabled to get the package flavor of: \ + ${package_name}" + exit $ERROR + } + } + + if { [regexp \ + "${prefix}?(\\w\+(-\\w\+)?)\[-_\]${ver_rev}" \ + ${package_name} -> pkg_flavor] } { + return ${pkg_flavor} + } else { + printit "Unabled to get the package flavor of: ${package_name}" + exit $ERROR + } +} + +# This function tests following conditions for the package: +# - It was generated without debug files. +# - Its path has an AT folder inside. +# - It distributes only allowed files. +# +# Parameters: +# file_list List of files +# package_name Package name +# +# Return: +# 0 if success or 1 if the content is invalid. +proc test_at_pkgs { file_list package_name } { + set all_files [get_number_of_files ${file_list}] + set debug_files [get_number_of_debug_files ${file_list}] + + # All debug files have to be generated in a separate debuginfo package. + if { ${all_files} == 0 || ${debug_files} > 0 } { + printit "FAILED (Invalid package content)." + return 1 + } + + # Following exclusion patterns are concated with logical OR. + # + + # File patterns that shoud not be in the runtime package. + set runtime_exclude [join {"(?:^.*/bin/([^ep]|p[^iy]|e[^a]).*$)" \ + "(?:^.*/sbin/([^l]|l[^d]).*$)" \ + "(?:^.*/include/(.*)$)" \ + "(?:^.*/share/info/(.*)$)" \ + "(?:^.*/pkgconfig/(.*)$)" \ + "(?:^.*(\\.a)$)"} "\|"] + + # File patterns that should not be in devel package. + set devel_exclude [join {"(?:^.*/sbin/ldconfig$)"} "\|"] + + # File patterns that should be in devel package. + set devel_include {"^.*\\.a$" \ + "^.*/bin/([^ep]|p[^iy]|e[^a]).*$" \ + "^.*/sbin/.*$" \ + "^.*/include/.*$" \ + "^.*/share/info/.*$" \ + "^.*/pkgconfig/.*$"} + + set pkg_flavor [get_pkg_flavor ${package_name}] + # If there are exclusion patterns for the given package + # then apply checks. + if { [info exists ${pkg_flavor}_exclude] } { + set regex [set ${pkg_flavor}_exclude] + if { [regexp -line -- "${regex}" ${file_list} matched_str] } { + printit "FAILED (File should not be in ${pkg_flavor}: \ + ${matched_str})" + return 1 + } + } + + # It is time to check inclusion patterns for the given package, + # then apply checks. + if { [info exists ${pkg_flavor}_include] } { + set regex_list [set ${pkg_flavor}_include] + foreach regex ${regex_list} { + if { ! [regexp -line -- "${regex}" ${file_list}] } { + printit "FAILED (Missing following file \ + pattern in ${pkg_flavor}: ${regex}" + return 1 + } + } + } + printit "SUCCESS." + return 0 +} + +# This function performs a simple check of the runtime-atX.X-compat package +# to validate its contents were generated as expected. +# +# This test validates the presence of the two lib paths to be correct at the +# proper previous Advance Toolchain path, as well as the presence of the init +# script to mount them in. This is a very simple script, but should avoid the +# pass of a bogus package. +# +# Parameters: +# file_list List of files +# +# Return: +# returns 0 if SUCCESS or 1 if the content is invalid. +# +# TODO: This test must be reviewed when we began to generate +# runtime-atX.X-compat packages for DEB distros. Probably the file positions +# inside the package list will be different, so it'll surely need +# some adjustments +proc test_at_compat_pkg { file_list } { + # Set global scope variables + global ERROR + + # Find the previous version and prepare the filter + set at_previous $::env(AT_PREVIOUS_VERSION) + set at_dir_name [exec basename "$::env(AT_DEST)"] + set prev_prefix [exec echo "$::env(AT_DEST)" | \ + sed "s|${at_dir_name}|at${at_previous}|"] + set grep_filter "'|${prev_prefix}|'" + # Look for presence of lib links entry + set err [catch {exec echo ${file_list} | tail -n 2 | \ + grep -Eoc ${grep_filter} } found_links] + if { ${err} != 0 } { + printit "Problem found when looking for links..." + exit $ERROR + } + # Look for presence of init script entry + set err [catch {exec echo ${file_list} | head -n 1 | \ + grep -Eoc '|/etc/rc\.d/|'} found_confs] + if { ${err} != 0 } { + printit "Problem found when looking for config..." + exit $ERROR + } + + # checking if the list has debug files + set total_debug [get_number_of_debug_files ${file_list}] + + # Validate their presence + if { ${found_links} == 2 && ${found_confs} == 1 && ${total_debug} == 0 } { + printit "SUCCESS." + return 0 + } + + printit "FAILED (Bad contents)." + return 1 +} + +# This function performs a simple check of the *-dbg_* / debuginfo packages +# to validate its contents were generated as expected. +# +# Parameters: +# file_list List of files +# +# Return: +# 0 if success or 1 if the content is invalid. +proc test_debuginfo_pkgs { file_list } { + # This test validates the presence of the debug files into the correct + # paths (same path as the related binary file). + set debug_files [get_number_of_debug_files ${file_list}] + set all_files [get_number_of_files ${file_list}] + + # Validate its content + # - The package should have all its files as symbol files to + # be correct. + if { ${debug_files} == ${all_files} && ${debug_files} > 0 } { + printit "SUCCESS." + return 0 + } + + printit "FAILED (Bad contents)." + return 1 +} + +# This function validates the content of all packages. +# +# Return: +# 0 if success or 1 if the content is invalid. +proc test_all_packages {} { + set rc 0 + set ext [get_packaging_system] + + if { ${ext} == "rpm" } { + printit "Testing the generated RPM packages..." + set package_list [get_packages_list "rpm"] + set get_pkg_files get_rpm_files + } elseif { ${ext} == "deb" } { + printit "Testing the generated DEB packages..." + set package_list [get_packages_list "deb"] + set get_pkg_files get_deb_files + } else { + printit "Unsupported package system..." + exit $ENOSYS + } + + # Iterate through the packages found + foreach package ${package_list} { + if { [string match *selinux* "${package}"] || \ + [string match *golang* "${package}"] } { + # TODO Implement a content validation for golang and selinux packages + printitcont "Skipping ${package}..." + continue + } + + printitcont "Testing ${package} contents..." + set file_list [${get_pkg_files} ${package}] + + # Isolate the runtime-atX.X-compat package to check + if { [string match *-runtime-at*-compat-* "${package}"] } { + if { [test_at_compat_pkg ${file_list}] } { + set rc 1 + } + } elseif { [string match *-dbg_* "${package}"] \ + || [string match *-debuginfo-* "${package}"] } { + if { [test_debuginfo_pkgs ${file_list}] } { + set rc 1 + } + } else { + if { [test_at_pkgs ${file_list} ${package}] } { + set rc 1 + } + } + } + + return ${rc} +} + +# Check if it's time to check the packages generated. +# +# By now, we are only testing the packages generated (and not installed), this +# test may be extended to check the installed packages, but it should use a +# different set of checks yet to be defined +if {[info exists env(AT_WD)]} { + if { [test_all_packages] == 0 } { + printit "Package testing was:\t\t\t\t\[SUCCESS\]" + exit 0 + } +} else { + # By now, if the test is being run on an installed package system, + # just bypass it. + printit "Skipping: this test should be run on a compatible mode at the\ + build system.\t\[SUCCESS\]" + exit $ENOSYS +} + +exit 1 diff --git a/fvtr/paflib/paflib.exp b/fvtr/paflib/paflib.exp new file mode 100755 index 000000000..07138f30c --- /dev/null +++ b/fvtr/paflib/paflib.exp @@ -0,0 +1,53 @@ +#! /usr/bin/expect +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# +# Tests for PAFlib +# + +source ./shared.exp + +set rc 0 + +set GCC [compiler_path] +set CFLAGS "-O2 -Wall" + +if { [array names env -exact "AT_PAFLIB_VER"] == "" } { + printit "WARNING: PAFlib is not configured in the config file." + printit "Skipping..." + exit $ENOSYS +} + +# +# Check if AT is able to build and link against basic PAFlib libraries +# This test checks for important headers and dynamic libs as we don't provide +# static libs. +# +set tmp_file [exec mktemp] + +if { $TARGET32 } { + printit "Testing 32 bit linking..." + compile "${GCC} -m32 ${CFLAGS} $FULLPATH/test.c -lpaf-dsc -lpaf-ebb -o ${tmp_file}" + compile "${GCC} -m32 -static ${CFLAGS} $FULLPATH/test.c -lpaf-dsc -lpaf-ebb -o ${tmp_file}" + printit "Successfully built and linked against 32 bit library" +} +if { $TARGET64 } { + printit "Testing 64 bit linking..." + compile "${GCC} -m64 ${CFLAGS} $FULLPATH/test.c -lpaf-dsc -lpaf-ebb -o ${tmp_file}" + compile "${GCC} -m64 -static ${CFLAGS} $FULLPATH/test.c -lpaf-dsc -lpaf-ebb -o ${tmp_file}" + printit "Successfully built and linked against 64 bit library" +} + +exec rm -f ${tmp_file} diff --git a/fvtr/paflib/test.c b/fvtr/paflib/test.c new file mode 100644 index 000000000..5e2e436dd --- /dev/null +++ b/fvtr/paflib/test.c @@ -0,0 +1,25 @@ +/* Copyright 2017 IBM Corporation +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +#include +#include + +#include +#include + +int main(int argc, char *argv[]) { + printf("PAFlib build test passed!\n"); + return 0; +} diff --git a/fvtr/ppc476-workaround/hello-476.s b/fvtr/ppc476-workaround/hello-476.s new file mode 100644 index 000000000..78d185db2 --- /dev/null +++ b/fvtr/ppc476-workaround/hello-476.s @@ -0,0 +1,1044 @@ +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + .section ".text" + .globl main + .type main, @function +main: + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + li 3,3 + li 4,4 # <- Last instruction in 4K page + li 5,5 # <- First instruction in next page + blr diff --git a/fvtr/ppc476-workaround/ppc476-workaround.exp b/fvtr/ppc476-workaround/ppc476-workaround.exp new file mode 100755 index 000000000..a494cd043 --- /dev/null +++ b/fvtr/ppc476-workaround/ppc476-workaround.exp @@ -0,0 +1,83 @@ +#! /usr/bin/expect +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# +# Check if binutils is carrying the patch that works around a hardware issue +# with ppc476 icache. +# Reference: https://github.com/tuliom/at-binutils/commit/21c2b544d5f1ff0b71024138931d0a65d853c8d5 +# + +source ./shared.exp + +set CC [compiler_path] +set OBJDUMP [compiler_path objdump] + +# This workaround is only necessary on ppc476-tools. +if { $env(AT_NAME) != "ppc476-tools" } { + printit "Skipping ppc476-workaround tests: this is not \ +ppc476-tools\t\[SUCCESS\]" + exit $ENOSYS +} + +# Verify if the the hack for the cross boundary pages is available. +# In this case, if --ppc476-workaround is enabled by default, at the limit +# of the boundary of the page, the linker will add an unconditional branch +# to a safe place, instead of the default "nop". +compile "${CC} $FULLPATH/hello-476.s -o hello-476" + +set err [catch {exec ${OBJDUMP} -d hello-476} objdump_out] +if { ${err} != 0 } { + fvtr_error "Couldn't extract information from hello-476." +} + +# As requested by IMD, the default page alignment is 0x1000. +# Last nop of the page. +if { [regexp -line "^10000ff8:.*nop" ${objdump_out} line] } { + printit "Last nop of the page found." +} else { + fvtr_error "Didn't find the last nop of the page: ${line}" +} +# Last instruction of the page. Replaced by a branch. +# safeaddr is the address in which the nop is now. +if { [regexp -line "^10000ffc:.*b\[ \]+(\[0-9\]+)" ${objdump_out} line \ + safeaddr] } { + printit "Branch in the last instruction of the page found." +} else { + fvtr_error "Didn't find the branch in the last instruction of the page:\ + ${line}" +} +# Fist instruction of the next page. +if { [regexp -line "^10001000:.*nop" ${objdump_out} line] } { + printit "First nop in the first instruction of the next page found." +} else { + fvtr_error "Didn't find the nop in the first instruction of the page: \ +${line}" +} + +# Verify if the jump is fine. +if { [regexp -line "^${safeaddr}:.*nop" ${objdump_out} line] } { + printit "The nop after the branch found." +} else { + fvtr_error "Didn't find the nop after the branch: ${line}" +} +# Verify if it's returning to the correct place (0x10001000). +set nextinstr [format %x [expr 0x${safeaddr} + 4]] +if { [regexp -line "^${nextinstr}:.*b\[ \]+10001000 " ${objdump_out}] } { + printit "The code is returning to the correct place." +} else { + fvtr_error "The code isn't returning to the correct place: ${line}" +} + +file delete hello-476 diff --git a/fvtr/pthreads/pthread_test.c b/fvtr/pthreads/pthread_test.c new file mode 100644 index 000000000..ca94e0c8b --- /dev/null +++ b/fvtr/pthreads/pthread_test.c @@ -0,0 +1,227 @@ +/* Copyright 2017 IBM Corporation +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +/* + Built with: + export PATH=/opt/at6.0/bin:$PATH + gcc -mcpu=power7 -mtune=power7 -m64 -g -lpthread -o pthread_test pthread_test.c +*/ + +#include +#include +#include +#include + + +static pthread_mutex_t m; +static pthread_barrier_t b; + + +static void * +tf (void *arg) +{ + int e = pthread_mutex_unlock (&m); + if (e == 0) + { + puts ("child: 1st mutex_unlock succeeded"); + exit (1); + } + else if (e != EPERM) + { + puts ("child: 1st mutex_unlock error != EPERM"); + exit (1); + } + + e = pthread_mutex_trylock (&m); + if (e == 0) + { + puts ("child: 1st trylock suceeded"); + exit (1); + } + if (e != EBUSY) + { + puts ("child: 1st trylock didn't return EBUSY"); + exit (1); + } + + e = pthread_barrier_wait (&b); + if (e != 0 && e != PTHREAD_BARRIER_SERIAL_THREAD) + { + puts ("child: 1st barrier_wait failed"); + exit (1); + } + + e = pthread_barrier_wait (&b); + if (e != 0 && e != PTHREAD_BARRIER_SERIAL_THREAD) + { + puts ("child: 2nd barrier_wait failed"); + exit (1); + } + + e = pthread_mutex_unlock (&m); + if (e == 0) + { + puts ("child: 2nd mutex_unlock succeeded"); + exit (1); + } + else if (e != EPERM) + { + puts ("child: 2nd mutex_unlock error != EPERM"); + exit (1); + } + + if (pthread_mutex_trylock (&m) != 0) + { + puts ("child: 2nd trylock failed"); + exit (1); + } + + if (pthread_mutex_unlock (&m) != 0) + { + puts ("child: 3rd mutex_unlock failed"); + exit (1); + } + + return NULL; +} + + +int +main (void) +{ + pthread_mutexattr_t a; + int e; + + if (pthread_mutexattr_init (&a) != 0) + { + puts ("mutexattr_init failed"); + return 1; + } + + if (pthread_mutexattr_settype (&a, PTHREAD_MUTEX_ERRORCHECK) != 0) + { + puts ("mutexattr_settype failed"); + return 1; + } + + + e = pthread_mutex_init (&m, &a); + if (e != 0) + { + puts ("mutex_init failed"); + return 1; + } + + if (pthread_barrier_init (&b, NULL, 2) != 0) + { + puts ("barrier_init failed"); + return 1; + } + + e = pthread_mutex_unlock (&m); + if (e == 0) + { + puts ("1st mutex_unlock succeeded"); + return 1; + } + else if (e != EPERM) + { + puts ("1st mutex_unlock error != EPERM"); + return 1; + } + + if (pthread_mutex_lock (&m) != 0) + { + puts ("mutex_lock failed"); + return 1; + } + + e = pthread_mutex_lock (&m); + if (e == 0) + { + puts ("2nd mutex_lock succeeded"); + return 1; + } + else if (e != EDEADLK) + { + puts ("2nd mutex_lock error != EDEADLK"); + return 1; + } + + pthread_t th; + if (pthread_create (&th, NULL, tf, NULL) != 0) + { + puts ("create failed"); + return 1; + } + + e = pthread_barrier_wait (&b); + if (e != 0 && e != PTHREAD_BARRIER_SERIAL_THREAD) + { + puts ("1st barrier_wait failed"); + return 1; + } + + if (pthread_mutex_unlock (&m) != 0) + { + puts ("2nd mutex_unlock failed"); + return 1; + } + + e = pthread_mutex_unlock (&m); + if (e == 0) + { + puts ("3rd mutex_unlock succeeded"); + return 1; + } + else if (e != EPERM) + { + puts ("3rd mutex_unlock error != EPERM"); + return 1; + } + + e = pthread_barrier_wait (&b); + if (e != 0 && e != PTHREAD_BARRIER_SERIAL_THREAD) + { + puts ("2nd barrier_wait failed"); + return 1; + } + + if (pthread_join (th, NULL) != 0) + { + puts ("join failed"); + return 1; + } + + if (pthread_mutex_destroy (&m) != 0) + { + puts ("mutex_destroy failed"); + return 1; + } + + if (pthread_barrier_destroy (&b) != 0) + { + puts ("barrier_destroy failed"); + return 1; + } + + if (pthread_mutexattr_destroy (&a) != 0) + { + puts ("mutexattr_destroy failed"); + return 1; + } + + return 0; +} diff --git a/fvtr/pthreads/pthreads.exp b/fvtr/pthreads/pthreads.exp new file mode 100755 index 000000000..5e1e6c774 --- /dev/null +++ b/fvtr/pthreads/pthreads.exp @@ -0,0 +1,77 @@ +#! /usr/bin/expect +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# +# Check if AT can build and run multi-thread software. +# + +source ./shared.exp + +set CC [compiler_path] +set CFLAGS "-mcpu=power7 -mtune=power7" + +set LIBS "-lpthread" + +set tmp_file "$FULLPATH/pthread_test" + +switch $env(AT_NAME) { + "ppc476-tools" { + # Disable static linking on ppc476-tools, because it doesn't + # provide static libraries. + set static_link 0 + } + default { + set static_link 1 + } +} + +if { $TARGET32 } { + if { ${static_link} } { + printit "Testing 32-bit static linking..." + compile "${CC} -m32 -static ${CFLAGS} $FULLPATH/pthread_test.c \ +${LIBS} -o ${tmp_file}" + if { $env(AT_CROSS_BUILD) != yes } { + exec ${tmp_file} + } + } + + printit "Testing 32-bit dynamic linking..." + compile "${CC} -m32 ${CFLAGS} $FULLPATH/pthread_test.c ${LIBS} \ +-o ${tmp_file}" + if { $env(AT_CROSS_BUILD) != yes } { + exec ${tmp_file} + } + +} + +if { $TARGET64 } { + if { ${static_link} } { + printit "Testing 64-bit static linking..." + compile "${CC} -m64 -static ${CFLAGS} $FULLPATH/pthread_test.c \ +${LIBS} -o ${tmp_file}" + if { $env(AT_CROSS_BUILD) != yes } { + exec ${tmp_file} + } + } + + printit "Testing 64-bit dynamic linking..." + compile "${CC} -m64 ${CFLAGS} $FULLPATH/pthread_test.c ${LIBS} \ +-o ${tmp_file}" + if { $env(AT_CROSS_BUILD) != yes } { + exec ${tmp_file} + } +} + +file delete -force ${tmp_file} diff --git a/fvtr/python/python.exp b/fvtr/python/python.exp new file mode 100755 index 000000000..52ae87d56 --- /dev/null +++ b/fvtr/python/python.exp @@ -0,0 +1,131 @@ +#! /usr/bin/expect +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Check if the provided Python is functional by running its own tests + +source ./shared.exp + +# Variable to identify if we're printing environment information. +# 0 - means we haven't printed yet. +# 1 - means we need to print. +set print_env 0 + +# Print an environment variable, if defined. +proc print_env_var {var_name} { + global print_env + + if { [array names ::env -exact "${var_name}"] != "" } { + # Print the environment header one time once. + if { ${print_env} == 0} { + set print_env 1 + printit "Environment information:" + } + printit "\t${var_name}=$::env(${var_name})" + } +} + + +if { [array names env -exact "AT_PYTHON_VER"] == "" } { + printit "Python is not configured in the config file." $WARNING + printit "Skipping..." + exit $ENOSYS +} + +# AT 5.0 and 6.0 doesn't have all the Python fixes implemented on AT >= 7.0, +# which may cause Python expected failures on Python testcases. +if { [regexp "5\..*|6\..*" $env(AT_MAJOR_VERSION)] } { + printit "This test doesn't work on AT 5.0 or 6.0." $WARNING + printit "Skipping..." + exit $ENOSYS +} + +printit "Running Python tests..." + +# Print environment information, if necessary. +print_env_var PYTHONEXECUTABLE +print_env_var PYTHONHOME +print_env_var PYTHONPATH +print_env_var PYTHONUSERBASE + +set pyver [string range $env(AT_PYTHON_VER) 0 2] + +set test_script "$env(AT_DEST)/lib64/python$pyver/test/regrtest.py" +if { ![file isfile "$test_script"] } { + fvtr_error "Can't find $test_script in the installed AT." +} + +# These tests were commonly removed from all python versions due to the fact +# that other tests make use of the facilities that they check, so we can catch +# the failure later in any case. In special, test_doctest, test_doctest2, +# test_tarball and test_venv provides ambiguous results that not always +# represent a real success or failure. +set common_exclude_tests "test_doctest test_doctest2 test_asyncio \ + test_asyncore test_concurrent_futures \ + test_buffer test_tarball test_venv" +# The following sets up the python test command so that it excludes tests +# which should not be run using FVTR. The exclude test list is different +# depending on the version of python being used, although some common tests +# are defined above separately. +if { "$pyver" == "2.6" } { + # Fails if run from the install dir: test_lib2to3, test_distutils. + # Unexpected skip: test_tcl. + set spawn_cmd "spawn $env(AT_DEST)/bin/python $test_script \ + -x $common_exclude_tests test_lib2to3 test_tcl test_distutils" +} elseif { "$pyver" == "2.7" } { + # Might fail if run from the install dir: test_idle test_tools. + set spawn_cmd "spawn $env(AT_DEST)/bin/python $test_script \ + -x $common_exclude_tests test_idle test_tools" +} elseif { "$pyver" == "3.4" | "$pyver" == "3.5" } { + # Python unit tests are "embarrassingly parallel", at least up to 6 cores + # it seems + set CORES [expr min(6, [exec grep -c "processor" /proc/cpuinfo ])] + + # The following tests fail for python when run using FVTR so exclude + # them. + set spawn_cmd "spawn $env(AT_DEST)/bin/python3 $test_script \ + -j$CORES -x $common_exclude_tests test_gdb test_site \ + test_httpservers test_os test_posix test_compileall" +} else { + set spawn_cmd "spawn $env(AT_DEST)/bin/python $test_script" +} + +set env(TMPDIR) "$FULLPATH/tmp[pid]" +exec mkdir $env(TMPDIR) +printit "TMPDIR=\"$env(TMPDIR)\"" + +printit "Spawn cmd for $pyver: $spawn_cmd" +eval $spawn_cmd +expect { + # Wait for 1 hour at most + -timeout 3600 + -re "(test\[s\]* failed|Test Failed)" { + fvtr_error "Failed to run Python tests." + } + "Fatal Python error" { + fvtr_error "Python crashed during the tests." + } + -re "skip\[s\]* unexpected" { + fvtr_error "Skipped some tests. Please check if all modules \ +are available" + } + eof { + printit "Python passed all tests!" + } +} + +# clean up any droppings +exec rm -rf $env(TMPDIR) + +exit 0 diff --git a/fvtr/shared.exp b/fvtr/shared.exp new file mode 100755 index 000000000..c343eeb47 --- /dev/null +++ b/fvtr/shared.exp @@ -0,0 +1,563 @@ +#! /usr/bin/expect +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +source errno.exp + +# Message levels for logging +set WARNING 0 +set ERROR 1 + +# +# Run a gnu compiler and check for known error patterns +# +# Arguments: +# cmd - a string with the complete command line (compiler and parameters) +# +proc compile {cmd} { + set gcc_err [catch {eval exec ${cmd}} gcc_info] + + set matched_regexp [regexp " (\[^:\]+): No such file or directory" \ + $gcc_info match \ + missing] + if { $matched_regexp != 0 } { + fvtr_error "File $missing is missing" + } + + set matched_regexp [regexp " skipping incompatible (\[^:\]+) when" \ + $gcc_info match \ + entire_path] + if { $matched_regexp != 0 } { + set path_file [file normalize $entire_path] + fvtr_error "The library in $path_file is incompatible, \ +consider revising if the build for 32-bit or 64-bit are using the correct \ +libraries." + } + + + if { $gcc_err != 0 } { + fvtr_error "Unrecognized error: $gcc_info" + } + return 0 +} + +# Check if a binary is dynamically linked to AT libs, when available. +# +# Parameters: +# bin - The binary to check +# important - Optional. A list of important libraries that the binary must +# be linked against. +# +proc check_lib_dependencies {bin {important {}}} { + global env + global ERROR + + set at_dir $env(AT_DEST) + + printit "Verifying $bin dynamic linking..." + + # Recover the platform from auxv + set env(LD_SHOW_AUXV) 1 + set auxv [ exec /bin/true ] + array unset env LD_SHOW_AUXV + regexp "AT_PLATFORM:\[\[:blank:\]\]+(\[^\\n\]+)" $auxv match platform + switch "${platform}" { + "power7+" { + # POWER7+ has the same instruction set of POWER7, so + # it doesn't make sense to build libraries specifically + # to POWER7+. So, force them to use POWER7 libraries. + set platform "power7" + } + } + + regexp "ELF (\[\[:digit:\]\]+)\-bit" [exec file -b -L $bin] match \ + wordsize + if { $wordsize == 32 } { + set lib_dir $at_dir/lib + } elseif { $wordsize == 64 } { + set lib_dir $at_dir/lib64 + } else { + fvtr_error "Can't recognize ${bin} word size: \"${wordsize}\"." + } + + set at_libs [ exec find $lib_dir -type f -name '*.so*' ] + if {[catch "exec ${at_dir}/bin/ldd $bin" link_info]} { + printit "Failed to ldd $bin: $link_info" $ERROR + return 1 + } + + set lib_info [ split $link_info "\n" ] + + # Ignore statically linked files + if {[string first "statically linked" $link_info] >= 0} { + printit "$bin is statically linked." + return 0 + } + + # Parses each line from ldd separately + foreach line $lib_info { + set match {} + set lib {} + + # ldd normally returns 4 types of lines: + # libx.so => (0x000000000000) + # libx.so => /path/to/libx.so (0x000000000000) + # /path/to/libx.so (0x000000000000) + # libx.so => not found + + # Regular expression for lib name + set lib_re "(\[^/\]+).so" + + # Regular expression for ?????(0x???????) + set hex_re "\[^\\(\]*\\(0x\[^\\)\]+\\)" + set blank "\[\[:blank:\]\]" + set assign_re "${blank}+=>${blank}+" + + # Regular expression for system's linked lib + # Could be of type 1 or type 2 + set system_re "${blank}*${lib_re}.*${assign_re}${hex_re}" + + # Matches the fourth type of line + set x [regexp "${blank}+${lib_re}.*not found" $line \ + match lib] + if { $x != 0 } { + # Ignore libselinux + if { ${lib} != "libselinux" } { + printit "Library ${lib} is missing." $ERROR + return 1 + } else { + continue; + } + } + + # Look for libraries not linked to AT + set x [regexp "${blank}+${at_dir}.*/${lib_re}" $line \ + match lib] + if { $x == 0 } { + # Jump if this is the vdso + if {[regexp "${blank}+${lib_re}" $line match \ + lib2]} { + if {[string first "linux-vdso" $lib2] >= 0} { + continue + } + } + # Matches system's linked libs + set x [regexp $system_re $line match lib] + if { $x == 0 } { + fvtr_error "Unrecognized pattern from ldd:\ +$line" + } + + # Verify if AT provides this lib + if { [regexp "${lib}\.so" $at_libs] == 1 } { + printit "$bin should use $lib from the AT." \ + $ERROR + return 1 + } + } else { + # Lib already linked to AT + + # Look if it's an important lib + set lib_index [lsearch $important $lib] + if { $lib_index >= 0 } { + set important [lreplace $important $lib_index \ + $lib_index] + } + + # Check if it is not an optimized lib + set x [ regexp "$platform" $match ] + if { $x == 0 } { + # Check if there is an optimized version + set plib [regsub -all "\\\+" ${lib} "\\\+"] + set x [regexp \ + "${platform}/\[^\\n\]*${plib}\.so" \ + $at_libs] + if { $x == 1 } { + printit "$bin isn't using the\ +$platform optimized version of $lib" $ERROR + return 1 + } + } + } + } + + if { [llength $important] > 0 } { + printit \ + "Could not find the following AT libraries: $important" \ + $ERROR + return 1 + } + + printit "$bin is correctly linked." + return 0 +} + + +# +# Return a list of paths of all XL that were installed in the default directory +# and that the version is supported by AT. +# +proc get_xlc_paths {} { + # Mininum xlc version that supports AT is 10.1. + set min_major 10 + set min_minor 1 + + # Starting from xlC 13.1, the binaries are stored in /opt/ibm instead + # of /opt/ibmcmp. + set np_major 13 + set np_minor 1 + + set dirs {} + foreach base_xl_d {"/opt/ibm" "/opt/ibmcmp"} { + foreach compiler {vac xlc xlC} { + set dir ${base_xl_d}/${compiler} + if { ! [catch "glob -type d -directory ${dir} *" \ + ver_list] } { + lappend dirs ${ver_list} + } + } + } + + set ret {} + + foreach dir ${dirs} { + set major "" + set minor "" + + regexp -line ".*/(\[0-9\]+)\.(\[0-9\])" ${dir} match \ + major minor + + # Ignore this entry if it has runtime and binaries installed + # in different prefixes. + if { [string first "/opt/ibmcmp/" $dir] >= 0 \ + && (${major} > ${np_major} \ + || (${major} == ${np_major} \ + && ${minor} >= ${np_minor})) } { + continue + } + + # Ignore this entry if it doesn't support AT. + if { ${major} > ${min_major} \ + || (${major} == ${min_major} \ + && ${minor} >= ${min_minor}) } { + lappend ret ${dir} + } + } + + return ${ret} +} + + +# +# Return a list of paths of all XL that were installed in the default directory +# and that the version is supported by AT. +# +proc get_xlf_paths {} { + # Mininum xlf version that supports AT is 10.1. + set min_major 10 + set min_minor 1 + + # Starting from xlf 15.1, the binaries are stored in /opt/ibm instead + # of /opt/ibmcmp. + set np_major 15 + set np_minor 1 + + set dirs {} + foreach base_xl_d {"/opt/ibm" "/opt/ibmcmp"} { + foreach compiler {xlf xlf90} { + set dir ${base_xl_d}/${compiler} + if { ! [catch "glob -type d -directory ${dir} *" \ + ver_list] } { + lappend dirs ${ver_list} + } + } + } + + set ret {} + + foreach dir ${dirs} { + set major "" + set minor "" + + regexp -line ".*/(\[0-9\]+)\.(\[0-9\])" ${dir} match \ + major minor + + # Ignore this entry if it has runtime and binaries installed + # in different prefixes. + if { [string first "/opt/ibmcmp/" $dir] >= 0 \ + && (${major} > ${np_major} \ + || (${major} == ${np_major} \ + && ${minor} >= ${np_minor})) } { + continue + } + + # Ignore this entry if it doesn't support AT. + if { ${major} > ${min_major} \ + || (${major} == ${min_major} \ + && ${minor} >= ${min_minor}) } { + lappend ret ${dir} + } + } + + return ${ret} +} + + +# +# Update channel position. This is necessary when a file is updated by +# multiple programs. Tcl isn't able to update the current end of the file +# and needs some help. +# +proc update_output_pos {} { + if { $::DIRECTOUTPUT != "stdout" } { + seek $::OUTPUT 0 end + } +} + +# +# Outputs a line to a file or console and prepends the current platform +# and the current test case to the output +# +proc printit [list msg [list level $WARNING]] { + global OUTPUT + global PLATFORM + global CURTEST + + global WARNING + global ERROR + + switch ${level} { + $ERROR { + set hdr "Error:" + } \ + default { + set hdr "" + } + } + + update_output_pos + puts $OUTPUT "$CURTEST: $PLATFORM: ${hdr} $msg" +} + +proc printitnonewline { msg } { + global OUTPUT + global PLATFORM + global CURTEST + + update_output_pos + puts -nonewline $OUTPUT "$CURTEST: $PLATFORM: $msg" +} + +proc printitcont { msg } { + global OUTPUT + + update_output_pos + puts $OUTPUT "$msg" +} + +proc fvtr_error { msg } { + global ERROR + printit "$msg" $ERROR + exit 1 +} + +# Return compiler path +proc compiler_path { {compiler gcc} } { + global env env + if { $env(AT_CROSS_BUILD) == "yes" } { + set path $env(AT_DEST)/bin/$env(AT_TARGET)-${compiler} + } else { + set path $env(AT_DEST)/bin/${compiler} + } + + return ${path} +} + +# +# Taking as input an ELF obj, determine if it was built for LE. +# Returns 0 if it has the LE flags set when using readelf -h +# +proc built_for_le {obj} { + global env env + set at_dir $env(AT_DEST) + if { $env(AT_CROSS_BUILD) == "yes" } { + set readelf_exe $env(AT_DEST)/bin/$env(AT_TARGET)-readelf + } else { + set readelf_exe $env(AT_DEST)/bin/readelf + } + + set obj_err \ + [catch {eval \ + exec \ + "$readelf_exe -h ${obj} | grep Flags | grep 0x2"} \ + elf_flags] + + if { $obj_err != 0 } { + printit "readelf failed: ${obj_err} flags: ${elf_flags}" + return 1 + } else { + if { $elf_flags == "" } { + printit "${obj} is NOT LE" + return 1 + } else { + return 0 + } + } +} + +proc append_at_internal {name} { + if { $::env(AT_INTERNAL) != "none" } { + append name "-$::env(AT_INTERNAL)" + } + + return ${name} +} + +# Collect the distro version in which it's being run. +proc get_distro {} { + set distro "" + if {[catch {exec lsb_release -i | cut -d: -f 2 | sed "s/^\[ \t\]*//" \ + | tr \[:upper:\] \[:lower:\]} distro]} { + printit "lsb_release command failed." + fvtr_error "Unable to find the distribution." + } + + return ${distro} +} + +proc get_packaging_system {} { + set system "" + + set distro [get_distro] + # Ubuntu and Debian use DEB packages the others use RPM. + switch -regexp ${distro} { + "ubuntu|debian" { + set system deb + # Verify if the dpkg command is working. + if {[catch {exec dpkg --version | grep -E "Debian"} \ + exists]} { + printit "DEB command failed." + fvtr_error "Unable to find packages." + } + } + default { + set system rpm + if {[catch {exec rpm --version | grep -E "RPM"} \ + exists]} { + printit "RPM command failed." + fvtr_error "Unable to find packages." + } + } + } + + return ${system} +} + +proc get_packages_list { system } { + set at_ver_rev $::env(AT_MAJOR_VERSION)-$::env(AT_REVISION_NUMBER) + printit "Using AT version: ${at_ver_rev}" + # Example of $pkg_name: at7.0-rc2 + set pkg_name [append_at_internal \ + "$::env(AT_NAME)$::env(AT_MAJOR_VERSION)"] + + # Get the list of packages. + set packages "" + # Verifying if is running the test suite on a compatible mode with the + # build system. + if {[info exists ::env(AT_WD)]} { + if { ${system} == "deb" } { + set deb_path $::env(AT_WD)/debs/ + catch {exec ls $deb_path | grep -E "${pkg_name}"} \ + packages + } else { + set rpm_path $::env(AT_WD)/rpms/$::env(AT_HOST_ARCH)/ + catch {exec ls $rpm_path | grep -E "${pkg_name}"} \ + packages + } + } else { + if { ${system} == "deb" } { + set at_ver_rev [append_at_internal ${at_ver_rev}] + + if { [catch {exec dpkg --list | grep -E "${pkg_name}" \ + | grep -E " ${at_ver_rev} " | \ + awk "{print \$2}"} \ + packages] } { + fvtr_error "Unable to find packages for \ +${pkg_name}." + } + } else { + # Force RPM output format, because it may vary between + # versions. + if { $::env(AT_INTERNAL) != "none" } { + # When there is an internal version then the package + # name string is sufficient to uniquely identify it + if { [catch {exec rpm -qa \ + --qf "%{NAME}-%{VERSION}-%{RELEASE}.%{ARCH}\n" | \ + grep "${pkg_name}" | \ + grep -- "-${at_ver_rev}\."} \ + packages] } { + fvtr_error "Unable to find packages for \ +${pkg_name}." + } + } else { + # If there is no internal version then be sure to exclude + # package names that contain internal version strings like + # rc, alpha, beta when grepping. + if { [catch {exec rpm -qa \ + --qf "%{NAME}-%{VERSION}-%{RELEASE}.%{ARCH}\n" | \ + grep "${pkg_name}" | \ + grep -- "-${at_ver_rev}\." | \ + grep -vE "(-rc|-alpha|-beta)"} \ + packages] } { + fvtr_error "Unable to find packages for \ +${pkg_name}." + } + } + } + } + + return ${packages} +} + +# Variables used in most testcases +set FULLPATH [pwd] +set CURTEST [lindex $argv 0] +append FULLPATH "/" $CURTEST +set PLATFORM [lindex $argv 2] +set DIRECTOUTPUT [lindex $argv 1] +set BLD_ARCH_PPC [string match "ppc" $env(AT_BUILD_ARCH)] +set BLD_ARCH_PPC64 [string match "ppc64" $env(AT_BUILD_ARCH)] +set BLD_ARCH_PPC64LE [string match "ppc64le" $env(AT_BUILD_ARCH)] +set TARGET32 [ expr $BLD_ARCH_PPC || $BLD_ARCH_PPC64 ] +set TARGET64 [ expr $BLD_ARCH_PPC64 || $BLD_ARCH_PPC64LE ] +set BLD_HOST_PPC [string match "ppc" $env(AT_HOST_ARCH)] +set BLD_HOST_PPC64 [string match "ppc64" $env(AT_HOST_ARCH)] +set BLD_HOST_PPC64LE [string match "ppc64le" $env(AT_HOST_ARCH)] +set BLD_HOST_X86_64 [string match "x86_64" $env(AT_HOST_ARCH)] +set BLD_HOST_I686 [string match "i686" $env(AT_HOST_ARCH)] +set HOST32 [ expr $BLD_HOST_PPC || $BLD_HOST_I686 ] +set HOST64 [ expr $BLD_HOST_PPC64 || $BLD_HOST_PPC64LE || $BLD_HOST_X86_64 ] + +if { $DIRECTOUTPUT != "stdout" } { + set OUTPUT [open $FULLPATH/$DIRECTOUTPUT "a+"] + # Don't send spawned processes' output to the user + log_user 0 + # Save them to $OUTPUT + log_file -a $FULLPATH/$DIRECTOUTPUT +} else { + set OUTPUT $DIRECTOUTPUT +} + +printit "Start logging..." diff --git a/fvtr/speccpu2006/at-sniff32.cfg b/fvtr/speccpu2006/at-sniff32.cfg new file mode 100644 index 000000000..60181eaee --- /dev/null +++ b/fvtr/speccpu2006/at-sniff32.cfg @@ -0,0 +1,523 @@ +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# +# Build with toolchain groups toolchain +# + +tune = base +ext = at-sniff_32 +output_format = asc,cfg +teeout = 1 +log_line_width = 156 +iterations = 1 +reportable = 0 +check_md5 = 0 +runlist = all +action = validate +backup_config = 0 + +makeflags = %{MAKEFLAGS} + +default=default=default=default: +CC = %{CC} +CXX = %{CXX} +FC = %{FC} + +OPTIMIZE = -m32 -O3 -fpeel-loops -funroll-loops -ffast-math -fvect-cost-model -mrecip=rsqrt +LDOPT = -m32 -Wl,-q -Wl,-rpath=%{BASE_DIR}/lib + + +########################################## +# Integer options +########################################## +400.perlbench=default=default=default: +CPORTABILITY = -DSPEC_CPU_LINUX_PPC +EXTRA_CFLAGS = -fno-strict-aliasing + +462.libquantum=default=default=default: +CPORTABILITY = -DSPEC_CPU_LINUX + +464.h264ref=default=default=default: +CPORTABILITY = -fsigned-char + +483.xalancbmk=default=default=default: +CXXPORTABILITY = -DSPEC_CPU_LINUX + +########################################## +# Floating point options +########################################## +433.milc=default=default=default: +EXTRA_CFLAGS = -fno-strict-aliasing + +447.dealII=default=default=default: +CXXPORTABILITY = -include cstddef + +450.soplex=default=default=default: + +454.calculix=default=default=default: +EXTRA_LDFLAGS = -Wl,--wrap,atan2 %{LIB32_ATAN2} + +481.wrf=default=default=default: +CPORTABILITY = -DSPEC_CPU_CASE_FLAG + +482.sphinx3=default=default=default: +CPORTABILITY = -fsigned-char + +__MD5__ +456.hmmer=base=at40_32=default: +# Last updated Mon Feb 28 09:23:34 2011 +optmd5=96acd1100ce9aba0a37239194cf61ca0 +baggage= +compile_options=\ +@eNrNUlFPwjAQft+vaPpsmYqJycJIYCBOB1sCxMSXZZROq11b2g7jv/fGJKLy4Js0Tfrd9e56X7+b\ +KUmq4pWVXDCktONK2sCzznDqclPLNTf5lhlevof4AntROs0C5EOgX7irzrm/4tJ/ohQR2GpfoKMQ\ +Gc2zcZRH2RLgbDQeLicIIVJ1LxFJuwCorkOt3pi5RqTUjAkilNIWjFoaJb5MZxjbGURwyQoDrrKw\ +Drp2z4C3jDpCVeNQayagslaaSrcGZBjlOjR2Yxz6uXpW1YayvhcFKIpC/JsT3l2lw7s0W4T4G0Hs\ +wS8At5tkMJnD3W+y2EsDBInxNH4cQ8S/EcdeEs/uj2p2GnL01OoFkmy/mQ9RfXrb1h7EGdmg9jQa\ +XggPaAi+OpCkESsZHdfxZKSAHqeDxW2exMNmbESF27bbCfsT5X3Gssk4GMgPAw00kg== +exemd5=b1e177e23750ad40303d0dfdb62094fd + +401.bzip2=base=at-sniff_32=default: +# Last updated Tue Nov 29 15:08:49 2011 +optmd5=17e70c3b698503c4fe8420b884739f41 +baggage= +compile_options=\ +@eNrFUt9PwjAQft9fcemzZSoxJgsjkYEEBbYEiYkvhHWdVsuutB3G/94DQkDhwSdpmvS7H9/lvruO\ +seKL+YcslZaAxiusXBQ4b5XwM1tXhbKzlbSq/IrZFQuSdJRFEFJiOPc3jcswV1X4KgRwurgr0EDg\ +3UnWS2ZJNiU47vY60z4A8EXzGnjaJCBMHRv8lPYWeGmk1FwjGkdGXVnUe7OcO08t+jfCKyk8F7h2\ +YCE1lTFoROULQlYKZWLrltbD79NyWFsh20ESQZLE7FgA24TSzkOaPcXshxoWkGQScj+8608odqyM\ +BWkERByMBi89yvgflSwYDsaPJ7dxhkG3MH8nkmvvXdsmnvUFX8L2tYbKxwcNa5UfTHq9g2H39HrO\ +M+FNQ9sv8ScxO8Z0zTj4Qd+ofxLp +exemd5=1d7701c331465961df3513e1ca854f61 + +403.gcc=base=at-sniff_32=default: +# Last updated Tue Nov 29 15:09:32 2011 +optmd5=cdf8d36c05fecc06efc674b640302b7a +baggage= +compile_options=\ +@eNrFUtFOwjAUfd9XNH22m0qMycJI2JgwHdsSICa+LFA6rXZr6TqMf+8dk4jCg0/SNOnp7b235/Q0\ +kRUpl2+s4IIhqQyXVe1atdGcmlw31ZrrfMs0Lz48fIWtIJ1mLnIg0VmaG/vSWfHKeaYUEZhy38CW\ +iIxmWRjkQbYAmIxCfzFGJLIRImXvGpG0B4CqxlPynelbRArFmCBCSlXDpqm0FN/bYlkbYGleAG8Z\ +NYTKNiDXTEAbJRWtzBqQZpQrT9cbbdDv0a9loykbWIGLgsDDxxrw7ij179Ns7uEfgrAFqkHLXTwc\ +z+DsWNwuww+TYJLvkyIbW6mLoFs0jZ5CiPyPdGzFUfJw0qUzvH5frl6hqB4AJqL8inY8HsUF2aBu\ +1Qpu8A44C746cKD1Jh6dtu08jwyEpsP5JI8jv3VblLjj2P2eP+nbVyzaioPP9gmaoB55 +exemd5=31078118461d985d85c2d8ac8b21b5ef + +429.mcf=base=at-sniff_32=default: +# Last updated Tue Nov 29 15:09:34 2011 +optmd5=df32e0d595e1e08ff4458998ad1f72b4 +baggage= +compile_options=\ +@eNrFUl1PwjAUfd+vaPpsQSXGZGEkUBCmY1tkhMSXBUrRareWrsP4771jogg8+CTNkp72fuycexqq\ +nGTzN74SkiOlrVB54TqFNYLZ1JT5Uph0w41YfXj4Cjs0GscuakJic25vGpfNhcibz4whAp/aNWgo\ +RPqTeEBTGk8Bhv1BbzpEgGbdMEknSZ+m8WOURIhkrWtEohYApktPq3dubhFZac4lkUrpAg5lbpT8\ +Oa7mhQXO9gXwhjNLmKou1JJLaKOVZrldAjKcCe2ZYm0sOlztQpWG8Y5DXUSph48V4W0o6t1HceLh\ +X/KwAzMAZXdBdziB2LHUbUZvENJRSr+zDrRjJ3IRNPfH/tMA4v8zCewEfvhw0sIzmNFWi1coKjqA\ +icy+bmseM3lB1qjejYY/eHucpVjsGVJZFfRPu3ieIQOhcTcZpYHfq7yXGa451o/pT/p2FdOqYu/t\ +fQI/VyfK +exemd5=28948c2872009c98ae64f089f70c6cfb + +445.gobmk=base=at-sniff_32=default: +# Last updated Tue Nov 29 15:09:46 2011 +optmd5=88aa60266694c243d97b828e365ee162 +baggage= +compile_options=\ +@eNrFUlFPwjAQft+vaPpsmUqMCXEkMAabwrYE0MSXBbpOq91aug7jv/fGBFF40BdZuva79q6977sL\ +ZUHyxSvLuGBIKsNlUXas0mhOTaKrIuU6WTPNs3cHX2DLjSZxB9ngaC/MVevcXvLCfqIUERhye0FL\ +IjKYxp6buPEcYDjw+vMRAL937yVuFA6DUeIjErTqv5lsXlBRpaw2dhiRvH2JSNQGQFXlKPnG9DUi\ +mWJMECGlKsGoCi3Fl5ktSgOczDPgNaOGUFlvyJQJuEZJRQuTAtKMcuXocqUN+vndlLLSlHUtt4Nc\ +18GHjPHmKOrfRvHMwd/oYws0AubDcW80hbNDKTYefS90/WTn9EdtsBV1ELwdTIJHD+L/RyhsjYPw\ +7mgHnKBWN3L5AkFlFzAR+eduk8eDOCMr1KxawQvOXs6CL/fqVVdyPDhe5NOIDAlNejM/GQf9ujdE\ +jpscm177Fb9txLyO2GvNDwNuOPc= +exemd5=f100ae46acc999676112fd33f190235e + +456.hmmer=base=at-sniff_32=default: +# Last updated Tue Nov 29 15:09:51 2011 +optmd5=1692facce914895c9562dcba365de0a3 +baggage= +compile_options=\ +@eNrFUtFOwjAUfd9XNH22TCXGZGEkMBCngy0BYuLLAqXTardbug7j33vnJE7hwSdpmvS2vac95547\ +g4Llq1eRSSUIaCuhKD2ntEZym5qq2EiT7oSR2btPL6gTxNPEIy4muit71Tl317JwnzgnDCfsH+gA\ +YaN5Mg7SIFliOBuNh8sJIYTl3UvC4i4GXFe+hjdhrgnLtBCKKQBd4qYqDKjvbbYqLVK0zxjvBLeM\ +Q30AG6HwGQ2aF3aDkRFcat+UW2PJ79EroTJc9J3AI0Hg00MB9PMqHt7FycKnP9RQByWjkJtoMJnj\ +3aEy6sQeQWA4DR/HmPE/KqkThbP7o26coNA9WL8gqOzXNqv867Th8aDO2JY0q9H4g9/irOS6Veza\ +hmh03KHTFBkJTQeL2zQKh7X7KqcNx6ZR/qRvj1jWiFZffQCIDRjQ +exemd5=dfb6d3642f65c3c273d666241f8850af + +458.sjeng=base=at-sniff_32=default: +# Last updated Tue Nov 29 15:09:55 2011 +optmd5=17e70c3b698503c4fe8420b884739f41 +baggage= +compile_options=\ +@eNrFUt9PwjAQft9fcemzZSoxJgsjkYEEBbYEiYkvhHWdVsuutB3G/94DQkDhwSdpmvS7H9/lvruO\ +seKL+YcslZaAxiusXBQ4b5XwM1tXhbKzlbSq/IrZFQuSdJRFEFJiOPc3jcswV1X4KgRwurgr0EDg\ +3UnWS2ZJNiU47vY60z4A8EXzGnjaJCBMHRv8lPYWeGmk1FwjGkdGXVnUe7OcO08t+jfCKyk8F7h2\ +YCE1lTFoROULQlYKZWLrltbD79NyWFsh20ESQZLE7FgA24TSzkOaPcXshxoWkGQScj+8608odqyM\ +BWkERByMBi89yvgflSwYDsaPJ7dxhkG3MH8nkmvvXdsmnvUFX8L2tYbKxwcNa5UfTHq9g2H39HrO\ +M+FNQ9sv8ScxO8Z0zTj4Qd+ofxLp +exemd5=ef048df3e654886a6066caa4284ba181 + +462.libquantum=base=at-sniff_32=default: +# Last updated Tue Nov 29 15:09:58 2011 +optmd5=fa687ee888edf69dd90c08a40b34335e +baggage= +compile_options=\ +@eNrNUt9PgzAQfuevaPpsh7oYEzKWDDYnygZxEH+8kK0rihbalTLjf+8xJMNME58Wmya9u95dv6/f\ +zUVB8uUbSzPOkJA6E0VpGaVWGdWJqop1ppItU1n6YeMzbLjBLLSQCYnmUl/0Ts1VVpjPlCICW7QN\ +egKR8SKcuIkbxmDOxxMnniKESN4/RyTog0FlZUvxztQlIqlkjBMuhCzBqQol+N5Nl6UGiPoF7C2j\ +mlBRB8SacWgjhaSFXoOlGM2krcqN0qhdexSJ783jhzY+KEWlKBsaroVc18aHhPDuKnBugjCy8Td2\ +2IAvgJZX/mi6gLtDptgILASF3sx7mkDGcVh/4QruopHj+V702MXW8McGHLc/CnhMbX6RZSBWr9Ck\ +HNYpPG813OG65ydkg5pTSXjR7nDg2aqjT62cP/5Z1H+rC2CejaJrcJ16pniOGxrN+P3pC9qKuK7o\ +TOsnrh41rg== +exemd5=7153a9bf2542990a83195976cb14cab3 + +464.h264ref=base=at-sniff_32=default: +# Last updated Tue Nov 29 15:10:38 2011 +optmd5=b17e07ca44bc8b5d9a0f1b3955b6a306 +baggage= +compile_options=\ +@eNrNkl1PwjAUhu/3K5peW6YSY7IwEjYQp4MtAjF6s4yug2q3lq7D+O89AxcxcOEVsWnS056Pnifv\ +mcqSFOk7y7lgSCrDZVk5VmU0pybRdZlxnWyZ5vmni6+w5UeT2EE2BNqpuelc2kte2itKEYEt2wId\ +ichwFo/8xI8XYE6HI28xRgiRonuNSNQFg6raVfKD6VtEcsWYIEJKVcGlLrUUP9c8rQy0aNZgbxk1\ +hMrmQWZMQBklFS1NBpZmlCtXVxttULtIXvFVyTJC16luH3uVrDVlfct3kO+7+JgG71yR9xDFcxf/\ +QsMW8APVXTgYz8B3jImtyEGQGEyC1xFEnAf5u6/oaT7wgjCYv8DPh/DYCoPp40npzqnKKUF6cvkG\ +Fap+4xdFK92uqWdxQTZof2oF37kHAIIvD5RpNAuHp+X8n4pAw5PB/D4JA68ZJVHgPcN+6v7E32Ys\ +moyDIf0CfXA1xg== +exemd5=4c280491762b9837b02753d1e1c77a25 + +471.omnetpp=base=at-sniff_32=default: +# Last updated Tue Nov 29 15:11:07 2011 +optmd5=48dc5f78c4639ad9e817780b8d2a671f +baggage= +compile_options=\ +@eNrFUlFPwjAQft+vaPqKZSoxJosjkTFxCtsSJBJfFug6rZa2tB3Ef+8BEjCQ6JM0aXrX3l3v+75L\ +lSSzyQeruGBIaceVtIFnneHUFaaWJTfFghlefYb4AntRNsgD5EOgP3FXzXN/yqX/2mggQhFR2wJN\ +hUh3mMdREeUjMNNu3Bn1EEmasNVMMldwSUVdMvAFn1qfyQU3CJFZ6xKRrAUG1XWo1ZKZa0QqzZgg\ +QiltwamlUWLnVhPrAIJ7A3vBqCNUrS5UyQSU0UpT6UqwDKNch8bOjUO7dWNVbShre1GAovE4xIfY\ +8Pdb1nnI8qcQ/4CKPeADUN71b3tDeDuEvY7oxGl0X2yDfuEBe1mA4KtkkLzEEP4/pGCvn6SPR8U9\ +hS5q+g5Jtr272jTxLM7IHG1Oo6F8uNcwcLinzUq3fve4pKdheN3QZoj+BGabMVpl7M3cF/g6LE0= +exemd5=3980e39af7e182194b2593ea77848222 + +473.astar=base=at-sniff_32=default: +# Last updated Tue Nov 29 15:11:09 2011 +optmd5=9afa05b11ed1e05b4c98108764a8f31b +baggage= +compile_options=\ +@eNrFUl1PwjAUfd+vaPqKZSoxJosjYR/iFLYlSCS+LFA6rZa1tB3Ef+8FJMzAg0/Sl96Pc2/uueem\ +siKL6ScruWBIKstlZTzHWM2pLXRdzbkuVkzz8svHV9gJs2HuIReA7tTetC/dGa/ct1YLEYqI3Ddo\ +S0SiUR6HRZiPwUyjOBj3G7EiSPpFnEZJL0WILDrXiGQdMKiqfSXXTN8iUirGBBFSKgNOXWkpDm45\ +NRbmtu9grxi1hMpNQM6ZgDZKKlrZOViaUa58bZbaosO7M7LWlHWd0EPhZOLjY0L4J5cFj1n+7ONf\ +/LADSwAa94NefwS5Y65bRBCn4UNxBGqQx07mIeifDJPXGDD/swnsDJL06aSM5xBDzj6gyHQPod0Q\ +L+KCLNHu1wra+42BBZ81BNmINYhO63ieDW8H2l3On8jsK8abisahfQMHtSIr +exemd5=e264f4a52b6271b0675bb09dcbfcbc31 + +483.xalancbmk=base=at-sniff_32=default: +# Last updated Tue Nov 29 15:12:07 2011 +optmd5=1c6f9b88d8feb83af7a6561e02148980 +baggage= +compile_options=\ +@eNrtVN1vmzAQf+evsHjtCNu6aVJUKjnAUjrAiI+O7cUijtOxEUxtyNr/fkcoCV3zsJdVe5gl5N99\ ++Djf/c6hqI1t8YNvyooj0bSlqNVcU60sWUtlV69LSXdclpsHS3+jazYJojkywdEs2vez1+aqrM3b\ +szNkMGSIMcBMIMNJItemdpQBDB13kS0RIBxFNCQ0vYpd7CSgyLGPQ+qFgRvQIFlSn2DHjZHhzeC7\ +55JxxY7IXIvtU8kst001UanifiJ1bVmZgbr1RbHmUpleHfCtkA+/u6SyqBUTgw8T9a53KKqiZmZZ\ +s6pbc0g1isk1zQM/wnHSp3hQZKnnj+JgTEYxwfk7eyK8HbFDghHeYN9zcEr2pyAczRKXhjj1blya\ +xjhMbLIvycH2WC03SfDSHQu2PYfY5BwAazqrET+5/ICMTcN5ZVRCNAqErpaiOoqbQrXQ/PYb4B1n\ +rcFEr4AyQEW3jWhY3a4BSc7KxpLqTraoX8feUt8Ls3yvRBdKdFDSS82eIzvPLf05S/RHG1lckyi1\ +9Cek0TVgFsT86ONlArbnBNp7LNzQvqIQ5OD3n1N/h1O6RuYI+uQF3lcXCv0yDBtokOcRiVO88Hwv\ +/TIlw8A4XYPt08mH6CUn4fQgoAux+g5B1CU6rCGpz9Ur4w4Nu2zgd9bkAlW5mkxDPym+c3qI/uG2\ +7LMeZvuPbjyeyPoTk6fgF++XERM= +exemd5=60ba0d87f2afa294c3132c0a494bca0e + +999.specrand=base=at-sniff_32=default: +# Last updated Tue Nov 29 15:12:09 2011 +optmd5=17e70c3b698503c4fe8420b884739f41 +baggage= +compile_options=\ +@eNrFUt9PwjAQft9fcemzZSoxJgsjkYEEBbYEiYkvhHWdVsuutB3G/94DQkDhwSdpmvS7H9/lvruO\ +seKL+YcslZaAxiusXBQ4b5XwM1tXhbKzlbSq/IrZFQuSdJRFEFJiOPc3jcswV1X4KgRwurgr0EDg\ +3UnWS2ZJNiU47vY60z4A8EXzGnjaJCBMHRv8lPYWeGmk1FwjGkdGXVnUe7OcO08t+jfCKyk8F7h2\ +YCE1lTFoROULQlYKZWLrltbD79NyWFsh20ESQZLE7FgA24TSzkOaPcXshxoWkGQScj+8608odqyM\ +BWkERByMBi89yvgflSwYDsaPJ7dxhkG3MH8nkmvvXdsmnvUFX8L2tYbKxwcNa5UfTHq9g2H39HrO\ +M+FNQ9sv8ScxO8Z0zTj4Qd+ofxLp +exemd5=df04a7d44c97ec6124df54bf59dc30d2 + +410.bwaves=base=at-sniff_32=default: +# Last updated Tue Nov 29 15:12:12 2011 +optmd5=d5f5d1cc23a18bffa646274929bb9f41 +baggage= +compile_options=\ +@eNrFUt9PwjAQft9f0fTZMpUYk4WRyAYEBbYEiIkvZOs6rZZeaTuM/70HhIAPGJ+wL71f3+W7724K\ +mq2KD1FLJQgYL0G7KHDeSu6XttGVtMuNsLL+iukNDZJskkckxMKw8Het67CUOnytwXpbaMI4YXDo\ +0gLCVu1bwrI2Gtw0sYFPYe8Jq40QiikA49BptAV1dOvCeWTk39DeCO4Zh20AKqGwjQHDta/QsoJL\ +E1u3tp50HDSWi26QRGSQxPQMP7rLZ73HLJ/H9AdZGuBYSb4YjB+GM8yls7yfLDFAWDpN+73FkAZZ\ +RBA4moxe+lhxmdFoMB5Nn84rfjGJj68D5TuCXPcY2pN4VldsTfa/Ndg+PmGtZHki93YR4/SXRf2P\ +1jtW++P400QHxGKLOLmlb0gbFD4= +exemd5=5c7c709552bc539a29956ea1454b87ee + +416.gamess=base=at-sniff_32=default: +# Last updated Tue Nov 29 15:16:37 2011 +optmd5=50d04ebb7e8b86d28eb91f9891b8999d +baggage= +compile_options=\ +@eNrFUl1PwjAUfd+vaPpsh0qMkTASGAOmY1sEYuLLMkqn1W4tXcGPX++dICwxGJ6wLz29vbf3nNMb\ +yoLk6SvLuGBIKsNlUbas0mhOTaJXxYLrZM00zz4cfIGtQRy3UKkYVQoh0p/Enpu48SwJo2QUBYF3\ +709HtTjAsO/1ZkOEULuUK01ZBxG5w3amFP9kCzu7ebfg5Z4XuqMEmgyC7nDi4AMdcJULwV9Zu37Y\ +cqMxJDVAUiM1V/Z5Y86LxlMmtdFpgQitaGz12hKRvHmJSNQEQNXKUfKN6WtEMsWYIEJKVcJhVWgp\ +9scsLQ14Z54Brxk1hMoqIBdMwDNKKlqYBSDNKFeOLpfa7IRbbgsNXAcf4Ie/76PebRRPQV+d7DHa\ +oxaCQn/sP3qQcRpp2Ar88O6w4yezeL/acv4CRWUHMBH5Nrrh8SDOyBJtdq2gg1MjLvi85nj1F0H/\ +j7/6H7uB1bg7HSWB36vmQOR4Q3QzMkeJ/KmYVRW1CfsCp4VLBg== +exemd5=a41b682eed1391d4efac1214159cfd0f + +433.milc=base=at-sniff_32=default: +# Last updated Tue Nov 29 15:16:41 2011 +optmd5=54c7b94e030ca0c0722b93fdfb297ffb +baggage= +compile_options=\ +@eNrFUltPgzAUfudXNH22m7oYk0VMWGEX3YAMpsYXwrqi1Y7W0mn89x6Y6Ix7MD4oaei595zvfKEq\ +yTp/5IWQHClthSqrvlNZI5jNzKZcCZM9cyOKVxcfYYdGs7iPuhDYze1J57C7FGX3jjFE4Ki2QEch\ +4idxQDMaL0AM/WCwGCEy6YAyDOufl6Rw0SgczT0/S2dxdhXQNJonYPWTqZeMG+N0El4mCJF17xiR\ +qAcC0xtXqxduThEpNOeSSKV0BcqmNEp+qkVeWRjN3oP8zJklTNUGteISymilWWlXIBnOhHZN9WQs\ ++vhIUSqyRYHkUuSVKO/eXWeV2hjGzx3aR5S6+DsYuHFFg4soTl38BRnsAHwAynDqjRLwfUepiRgE\ +IR1nbdAvYcNO1EfQwmQ2uQ2gzN9g2Lwa3KRzL6PtAHvAxE7d414q/f220ZlaPkBSdV6vXq5bEjR9\ +XMsD8oS2t9HwgrvTsxTLne3We5/6+ynxP7uAhmZeOgZCDOpFyDXe9rhl5o/mazMWdcYOkd8AzxJQ\ +Jg== +exemd5=92da2d77ac4de8abb5708bb877630c03 + +434.zeusmp=base=at-sniff_32=default: +# Last updated Tue Nov 29 15:17:03 2011 +optmd5=607f0258511d06dd6d38f4a28228c8d2 +baggage= +compile_options=\ +@eNrFUl1PwjAUfd+vaPpsN5UY48JIZHwEBbYEiYkvZHSdVsduaTsUf713oLAHMTxhX3rubc/JObcd\ +Q8EWyZvIZC4IKCuhML5jrJbcznRZpFLPVkLLbB3QC+r04tgnRgmuFCGEdSZxN5yF8RThuNNtT/vY\ +bRooNRctwmCH3Uwp+SlSN7v5cFACKb3hbX8S0F80qBNGI7zkoR8vsVfuuTeXhfecgbY6KQjjlfS3\ +WRcIWzQuCYsaCLgqAwXvQl8TlikhcpYDKINFWWjI92WWGIvB7QvileCWcagakIocZRQoXtgUkRZc\ +qkCbpba7ME7ok14Y0AP+6OY8at9F8QPmq5ulR2SPfILEwWjw1MUbp4lGneFgfH944icb8X41Yf6K\ +JNPat7YmHvMztiTbXSuUD2quczmvjbt6iGHnj4f6n1lvXG0/x1GJfhjTilH7S18yLjIG +exemd5=fb3098f57d4a493c7efedf20c27e4cae + +435.gromacs=base=at-sniff_32=default: +# Last updated Tue Nov 29 15:17:20 2011 +optmd5=1aeeb3f36f82ab01d63daa894a563191 +baggage= +compile_options=\ +@eNrFVN9PwjAQft9f0ezZDpUY48JIoAyYwrYE0cSXBUqn1bKWrvjrr/fGEBcFY3yAvezudnf7vn53\ +DWWG55MnlnLBkFSGyyx3rdxoTk2il9mM6+SZaZ6+efaJbXXj2EW5YlQphBDujGKfJCQegxl2/Pa4\ +B9FGLpeasibCcmM7qVL8nc2c9OLVghZQ0h20eiPP3tLDtkg0hKQa4KlNzJlzXJvyrHafSm30JEOY\ +Fq3XYB2J8Lx+inBUB4OqpafkC9PnCKeKMYGFlCoHZ5lpKb7cdJIbIG4ewH5m1GAqi4CcMQFtlFQ0\ +MzOwNKNceTpfaLMhYxEXdYln78Bnr75H7csovgZ+VbD2H7hHLoLCYBjc+ZCxH2q7TpzSn4e9TXMc\ +OOD1Wzd+QqKwG/SS/t5U+f5UVSJbVKJ0JRD5t0CQ0fZD0k/IZ9ZP9oeScRCEV7sX5wCaNOT0EYry\ +ZnFdiPk6WuK4FUd4gcq3VvAHrwJc8GlFl0KxQeeXlTvQ1rho2LruJ4OgXcyBmNsl0HKw/kTys2Jc\ +VFTm8AO/uMLU +exemd5=3abcb1ca0fb2ea24a2f6c25e3c5d5066 + +437.leslie3d=base=at-sniff_32=default: +# Last updated Tue Nov 29 15:18:18 2011 +optmd5=d5f5d1cc23a18bffa646274929bb9f41 +baggage= +compile_options=\ +@eNrFUt9PwjAQft9f0fTZMpUYk4WRyAYEBbYEiIkvZOs6rZZeaTuM/70HhIAPGJ+wL71f3+W7724K\ +mq2KD1FLJQgYL0G7KHDeSu6XttGVtMuNsLL+iukNDZJskkckxMKw8Het67CUOnytwXpbaMI4YXDo\ +0gLCVu1bwrI2Gtw0sYFPYe8Jq40QiikA49BptAV1dOvCeWTk39DeCO4Zh20AKqGwjQHDta/QsoJL\ +E1u3tp50HDSWi26QRGSQxPQMP7rLZ73HLJ/H9AdZGuBYSb4YjB+GM8yls7yfLDFAWDpN+73FkAZZ\ +RBA4moxe+lhxmdFoMB5Nn84rfjGJj68D5TuCXPcY2pN4VldsTfa/Ndg+PmGtZHki93YR4/SXRf2P\ +1jtW++P400QHxGKLOLmlb0gbFD4= +exemd5=15881c7b15d6910b2a5732b414ee2ae7 + +444.namd=base=at-sniff_32=default: +# Last updated Tue Nov 29 15:18:49 2011 +optmd5=3067c4ecea961ee6d362b26e36b0c865 +baggage= +compile_options=\ +@eNrFUk1PAjEQve+vmPSKZVViTDYuiSxIUGA3QSLxQqB0tVp2StvF+O+dFQkYOHiSXjpfb/LezAyx\ +4MvZu8yVloDGKyxcFDhvlfBTWxYLZadraVX+GbMLFiTpIIsgpMJw5q/q5+FcFeFLrQZcAMdtgzoC\ +b4+yTjJNsjGZw3anNe4CAF82LoGnDTKEKWODH9JeA8+NlJprROPIKQuLeufmM+eJon8ley2F5wKr\ +AC6kpjYGjSj8giwrhTKxdSvrYfduHJZWyGaQRJBMJjE75M5+cmnrPs0eY/ZLCgtIL6m46992R5Q7\ +lMWCNAIC9ga95w5V/I9EFvR7w4ejqzjFlHH+RiDX3IU2JJ70GV/B5reG2sd7hLWa70262kK/fXxB\ +p5nwN6HNSfxJzBYxrhB7F/QFQM4Rhg== +exemd5=b27589f484b9461fc867a00c7f33bb51 + +447.dealII=base=at-sniff_32=default: +# Last updated Tue Nov 29 15:20:06 2011 +optmd5=fc1b053d661554951da1e4ebe6ae1b6c +baggage= +compile_options=\ +@eNrNUk1v2zAMvftXEL62StoGw4CgLhB/LNXmxkbtYGkvRiLLmzbFUiS5xf796GRZ0zWHoYeivIii\ +qEfy8c1US9bLn7wRkoPSTqjWjj3rjGCuMl1bC1M9cCOaX4F/7ntRdpOPYYiJw6X7MDgbrkQ7/HZy\ +AoQBUXuAgQISF3kSVVE+R3cWJ+F8CkCoaJnsao6xMMuKsoppMQnTpCqvb5NJXGC85ktZUVrVYs1b\ +i2jBCMh6dAEk6x2mu0CrR24+Amk055JIpbTFS9caJZ+uzdI6nMx9R/+BM0eY6gOq5hJhtNKsdTV6\ +hjOhA2M3xkFvZN8is66uebMNwqVVnWH8yovGEC0Wgf+SAv/PWxZ+zvIy8J8x4ntIG5LxKZ1MC3x7\ +yc42I0xm0XWFIPu81xHme9kYsAl6Q+8TRHkb+nYzLhZ5dltOQprS8g5r/0On76V09uWohN5yzce3\ +DJdq9QNB7BX8tV1TX+Up2cDuNBrLBQcDSLE6WHUvgzQ+rpB3vJZt1zvh/tfE+x/z/seBzn8DFBRd\ +wA== +exemd5=b3db4dcedc025cf92b96c81041d92b54 + +450.soplex=base=at-sniff_32=default: +# Last updated Tue Nov 29 15:20:15 2011 +optmd5=3067c4ecea961ee6d362b26e36b0c865 +baggage= +compile_options=\ +@eNrFUk1PAjEQve+vmPSKZVViTDYuiSxIUGA3QSLxQqB0tVp2StvF+O+dFQkYOHiSXjpfb/LezAyx\ +4MvZu8yVloDGKyxcFDhvlfBTWxYLZadraVX+GbMLFiTpIIsgpMJw5q/q5+FcFeFLrQZcAMdtgzoC\ +b4+yTjJNsjGZw3anNe4CAF82LoGnDTKEKWODH9JeA8+NlJprROPIKQuLeufmM+eJon8ley2F5wKr\ +AC6kpjYGjSj8giwrhTKxdSvrYfduHJZWyGaQRJBMJjE75M5+cmnrPs0eY/ZLCgtIL6m46992R5Q7\ +lMWCNAIC9ga95w5V/I9EFvR7w4ejqzjFlHH+RiDX3IU2JJ70GV/B5reG2sd7hLWa70262kK/fXxB\ +p5nwN6HNSfxJzBYxrhB7F/QFQM4Rhg== +exemd5=41d57b8cf9d59915a1dbda20e757c535 + +453.povray=base=at-sniff_32=default: +# Last updated Tue Nov 29 15:20:30 2011 +optmd5=3067c4ecea961ee6d362b26e36b0c865 +baggage= +compile_options=\ +@eNrFUk1PAjEQve+vmPSKZVViTDYuiSxIUGA3QSLxQqB0tVp2StvF+O+dFQkYOHiSXjpfb/LezAyx\ +4MvZu8yVloDGKyxcFDhvlfBTWxYLZadraVX+GbMLFiTpIIsgpMJw5q/q5+FcFeFLrQZcAMdtgzoC\ +b4+yTjJNsjGZw3anNe4CAF82LoGnDTKEKWODH9JeA8+NlJprROPIKQuLeufmM+eJon8ley2F5wKr\ +AC6kpjYGjSj8giwrhTKxdSvrYfduHJZWyGaQRJBMJjE75M5+cmnrPs0eY/ZLCgtIL6m46992R5Q7\ +lMWCNAIC9ga95w5V/I9EFvR7w4ejqzjFlHH+RiDX3IU2JJ70GV/B5reG2sd7hLWa70262kK/fXxB\ +p5nwN6HNSfxJzBYxrhB7F/QFQM4Rhg== +exemd5=46cbdd4e9d3f834ada9830d79d08a101 + +454.calculix=base=at-sniff_32=default: +# Last updated Tue Nov 29 15:20:59 2011 +optmd5=f839d9c3e428854761b1c4117c750d37 +baggage= +compile_options=\ +@eNrdk99P2zAQx9/zV1h+xg20mtCqBalNUwhLm4i2YtpLlLoO9ebYxnH4sb+eSyAQsXZCe+ik+el8\ +Pn99d5/zXElSZD9ZzgVDSluuZDl0Sms4tamp5Iab9I4Znj96+AQ70yQZolIzqjVCiEwWSeCnfrIC\ +cz4Jxqtz8H4pVWUoO0NEvdq9XGv+i216+ecHByTgyjQanS88vEMDO348gyAX8nEz+6l37K65dG9y\ +ZazJJCK0ln5JtqcQCRdJHEfBApFi0EckHoBBdeVpdc/MKSK5ZkwQoZQuYVNJo8TbNs9KCy2wW7Dv\ +GLWEqtqhNkyAjFaaSrsByzDKtWfKW2Nfy3L8IZr6Ht6TKW7O4/FlnCyh0m7a+ANdgIhxMPcv0jao\ +rRM78RCBZjgLvwfgP0zV+7BQ+juRHYPxRulgmN6vLjZ/BzZKG2L+/0MsCudf93+kQ4Mg1+KIkHuT\ +6aPMZrKP3K0qmKvtNqtumHQFX7vNQVrHaGbSQR+mCcCp9Q94qjyrRUTRyjXZ15q3L9pGQ15ep1xQ\ +7CCs4UaTP3zXfwMJXg2+La9GaTRp5+avGtUM72y0vEijcFyriAI/l/w8zR9qV3tjVd/oDP8Ts5jy\ +Kg== +exemd5=f0cfcd1527c1d8d637899881673e5f3a + +459.GemsFDTD=base=at-sniff_32=default: +# Last updated Tue Nov 29 15:23:27 2011 +optmd5=607f0258511d06dd6d38f4a28228c8d2 +baggage= +compile_options=\ +@eNrFUl1PwjAUfd+vaPpsN5UY48JIZHwEBbYEiYkvZHSdVsduaTsUf713oLAHMTxhX3rubc/JObcd\ +Q8EWyZvIZC4IKCuhML5jrJbcznRZpFLPVkLLbB3QC+r04tgnRgmuFCGEdSZxN5yF8RThuNNtT/vY\ +bRooNRctwmCH3Uwp+SlSN7v5cFACKb3hbX8S0F80qBNGI7zkoR8vsVfuuTeXhfecgbY6KQjjlfS3\ +WRcIWzQuCYsaCLgqAwXvQl8TlikhcpYDKINFWWjI92WWGIvB7QvileCWcagakIocZRQoXtgUkRZc\ +qkCbpba7ME7ok14Y0AP+6OY8at9F8QPmq5ulR2SPfILEwWjw1MUbp4lGneFgfH944icb8X41Yf6K\ +JNPat7YmHvMztiTbXSuUD2quczmvjbt6iGHnj4f6n1lvXG0/x1GJfhjTilH7S18yLjIG +exemd5=f136da5004f38eb36cc6459464eda6ba + +465.tonto=base=at-sniff_32=default: +# Last updated Tue Nov 29 15:28:24 2011 +optmd5=953b5ad4ded5b33935b3bbbdfa4cccfd +baggage= +compile_options=\ +@eNrFklFv0zAQx9/zKU55xikwIUS1TGoTtwRaO2paIe3FSl1nM7ix57gb8Om5tNtaCQ3tYRp5yf9s\ +3/l3/zOzLdnWP1SjjQLrgrZtN4y64LUMwu/ajfbiVnnd/Erjd3E0KcshdE5J5wDIHZB8VVFRLqgY\ +sVyUvFqKjLO8WBacVfe7dLHgCzEfsdGUzilbAtmC0UH52iRu20fBtsHudV6VNBNZuULJcjpeTQHg\ +vLM7L9UFEPuok8Y5/VttkubTzwiZxpRlnwXiTWajaZXGL84W97cg2EP9v0njKONzPDRAGwd1+JC8\ +Hax1O7hqrA++boHIvoF7jxOLxc/eA+FnKKTbpc7eKf8RSOOUMsRY6zoMdq235hg2dRdwXuEa9a2S\ +gUjbL9iNMljGWSfbsEHlldQu9d2ND4+WRdkQJlkaP8EX7/f5+Asvl9jfKexzeudDwMRiXlxSPPE6\ +rcXRrGBfn3b81Sw+fud2/R2Tuovj0gHim3lDbuDw9w7LpyfURq9P7O4HMcv/Maj/4/We6vA4ntXR\ +Q8aqzzh5S38A7D9pmQ== +exemd5=d92f13c6ccaac1be070830fd40c441d5 + +470.lbm=base=at-sniff_32=default: +# Last updated Tue Nov 29 15:28:26 2011 +optmd5=1692facce914895c9562dcba365de0a3 +baggage= +compile_options=\ +@eNrFUtFOwjAUfd9XNH22TCXGZGEkMBCngy0BYuLLAqXTardbug7j33vnJE7hwSdpmvS2vac95547\ +g4Llq1eRSSUIaCuhKD2ntEZym5qq2EiT7oSR2btPL6gTxNPEIy4muit71Tl317JwnzgnDCfsH+gA\ +YaN5Mg7SIFliOBuNh8sJIYTl3UvC4i4GXFe+hjdhrgnLtBCKKQBd4qYqDKjvbbYqLVK0zxjvBLeM\ +Q30AG6HwGQ2aF3aDkRFcat+UW2PJ79EroTJc9J3AI0Hg00MB9PMqHt7FycKnP9RQByWjkJtoMJnj\ +3aEy6sQeQWA4DR/HmPE/KqkThbP7o26coNA9WL8gqOzXNqv867Th8aDO2JY0q9H4g9/irOS6Veza\ +hmh03KHTFBkJTQeL2zQKh7X7KqcNx6ZR/qRvj1jWiFZffQCIDRjQ +exemd5=7cf5988e3dc5d8416529a008dd7e44bd + +482.sphinx3=base=at-sniff_32=default: +# Last updated Tue Nov 29 15:35:20 2011 +optmd5=1d54f3e22e3f7ad68e0b8eea019c4f1a +baggage= +compile_options=\ +@eNrNUl1PwjAUfd+vaPpsQSXGhDgSNgZUx0YENPqyQOmgWtbSdRj/vXfgIgQe9IW4NNnt/ew550Yq\ +I6vpO0+F5EhpK1SWN53cGsFsYopsLkyy4Uakny6+wo4fD4ZNVIfE+tTe1C7rM5HVF4whAkdVDWoK\ +kc5oGPiJP5yAGXUCb9JDhNYO/f32U5D4cdSlvaS/C1MpZoUVEiFEVo1rROIGGEwXrlYf3NwikmrO\ +JZFK6RwuRWaU/Lmm09wCHrsEe8OZJUyVDjXnEtpopVlm52AZzoR2Tb42FlUfSXOxyPicsOXUVM67\ +XBWG8ZbjN5Hvu/gYOt6GYu8+Ho5dfMADdoAsgNoN270RxI452WZ4QeT3kyrpLyRhJ24imEsH9DWA\ +2vMw9g0rfhy3PRrS8QtM3ucOOyGNHk6uyTlFPaXnnZq9QYe8VcblqlJ++6hneUHWaPc3Gsa5ewCA\ +8T1hS8nDzult+J+KwIMH7XE/CalXLplc4R2G3dL+Cn9VMSkr9nb8C03pUzU= +exemd5=cc2192504717ea45141a72cab1507f1a + +998.specrand=base=at-sniff_32=default: +# Last updated Tue Nov 29 15:35:21 2011 +optmd5=17e70c3b698503c4fe8420b884739f41 +baggage= +compile_options=\ +@eNrFUt9PwjAQft9fcemzZSoxJgsjkYEEBbYEiYkvhHWdVsuutB3G/94DQkDhwSdpmvS7H9/lvruO\ +seKL+YcslZaAxiusXBQ4b5XwM1tXhbKzlbSq/IrZFQuSdJRFEFJiOPc3jcswV1X4KgRwurgr0EDg\ +3UnWS2ZJNiU47vY60z4A8EXzGnjaJCBMHRv8lPYWeGmk1FwjGkdGXVnUe7OcO08t+jfCKyk8F7h2\ +YCE1lTFoROULQlYKZWLrltbD79NyWFsh20ESQZLE7FgA24TSzkOaPcXshxoWkGQScj+8608odqyM\ +BWkERByMBi89yvgflSwYDsaPJ7dxhkG3MH8nkmvvXdsmnvUFX8L2tYbKxwcNa5UfTHq9g2H39HrO\ +M+FNQ9sv8ScxO8Z0zTj4Qd+ofxLp +exemd5=df04a7d44c97ec6124df54bf59dc30d2 + +400.perlbench=base=at-sniff_32=default: +# Last updated Mon Jan 30 11:13:45 2012 +optmd5=725f0f62d5b90842b733f05d5b859394 +baggage= +compile_options=\ +@eNrNUtFOwjAUfd9XNH22ohJjQpzJVqZOB1twRPRlGaVotaylKxj/3jtgMAMPPhGXJrtt770995zT\ +VwWZ5Z98KiRHSluhirLjlNYIZjOzKCbCZEtuxPTbxefYoXEv6aAWJLZye3l61hqLovXGGCKwVN3g\ +VCHSfUoCmtFkCGG/G/jDOwiSYBBlNB4ECJFZ+wKRuA0B0wtXqy9urhCZas4lkUrpEjaLwii5207z\ +0gJa+w7xkjNLmKoO1IRLaKOVZoWdQGQ4E9o15dxYVH87QFkU9oejLEkotCkUWQ9LcinyUhRvm/zr\ +Ui0M4zcO7SBKXbw/M15dxf5DnKQu/kUAdoAleOo28u6e4G6fjFWGH/TpfbZN2rKDnbiDoGvYC18D\ +uDkOVRvQ8SD1/DAK05cm8B1pK3DBKB14Ga2hH6ARO1DxeNArx9T+oOwbhdX4AxqVN1WanNU+WWF7\ +lidkjtZ/o+FVtzGHFOOG1pULou5hg/xrGQF3z0vv4civNJQzvB5lbec/0VBXDKuKhvt/APrLWYw= +exemd5=4a03ceb76d7e448fc6c436f3db90e34f + +436.cactusADM=base=at-sniff_32=default: +# Last updated Mon Jan 30 11:21:58 2012 +optmd5=647b43ecdc4cde6d22ddc89e8daf42c4 +baggage= +compile_options=\ +@eNrFVNtOg0AQfecrNjy74CXGSIqJXahF20JSGxNfSLssurpl12Xx9vUOvUm0NY0PLS/MDDPDOXN2\ +diALPB0/s5wLhqQyXBalZ5VGc2pSXRUZ1+kr0zz/8O0j2+okiYdKxahSCCEcDJOQpCQZgTkIwvbo\ +CqKtUlaasguE5cp2cqX4J8uc/PzdghZQ0uldXg19e00P2yJxH5JcwOOOzalz6E544T7kUhs9LhCm\ +desFWEciPD05Rjg+AYOqylfyjekzhHPFmMBCSlWCUxVaim83H5cGiJtHsF8ZNZjKOiAzJqCNkooW\ +JgNLM8qVr8sXbVZkLOKhDvHtDfjs2fe4fR0nt8CvCdbegnvsISiM+tF9CBm7obZp4pT+HvY6zXHE\ +CyqqjIHlOO7KCQiJg3BnAv18moKRNYJROtOK/FsryGiHA9JNyTLrz0HsS9xeNLjZvE57kKclJ09Q\ +VF7Ul4iYLqJzHHfiAL+g+Vsr+IPfAC74pCFRLV4v+GMR97RLHupf3nbTXtSuj4SY2nOg8zO2Fcll\ +xaiuaBzJLzy2y0Y= +exemd5=3176ac18ebe0b93f2fc115be73baf8dd + +481.wrf=base=at-sniff_32=default: +# Last updated Mon Jan 30 11:37:20 2012 +optmd5=6f06d433319ee38018073ac60b15f733 +baggage= +compile_options=\ +@eNrdU99vmzAQfuevsHgekLSbtkSjEjEm8wYYBaJ2e7ESYzY2il1D2m5//Ux+NFRNpjxlUv3i+85n\ +++777mJRW7eLX7woKw6EbEtRN2OjaVXJWqpWdV4qes9VWfx2zaFpBEkyBo3kTEoArAdg3YKqbLla\ +VLa8BRa2geXjOMOk26/JzE/xN+S+1Wj2DIXPUIwy6AfaQBGFZIbcYeeMtmCgASRelKR7jG6SPQhG\ +A5pmXux7IYnROjoO8JRO5gENUex+GI4utDfybqhPIg/HKQ3ci/UfhMZehEKcZjSZ6cS1L00QpDCZ\ +d8c+msynPR+FXopoEHpTAMDHRqwU41fAEk+2XUhZ/uG5XYweDU3VBMXwE9WsdXdS13yFlJldnZqb\ +XYUvCdxGkFnmTXCIs6/9qD2lpgFJpCMd3YbOon1nD5xlWTvfC6FataiBxTqmtz1qiw112HZq3rK8\ +cMqaVauca34vderkUhtMrlwpHrh6D6xCcl5ZlRCy0WBVK1HtYbFoWj0G7Q9t33PWWkx0DpHzSj8j\ +hWR1m2tLcVZKVzV3qn2S3IBjEEDXPJK2uT4nk88kyXTd/RpOZG7bQ9ugg0WbBhkD/QGOuv4wz0TB\ +McEYe6nVobE6rN/ZBNytI+O9Xn2R4QGRGVvrC1+pvifObYjjL8fn9uyCatnE8qe+1FztXZskrqs3\ +1h3Y7Erq591e1lW57KnX6Rr6/5jr/zRyXVabXjupot2NeXej15p/AfH1bN0= +exemd5=acf49daa7435f4755ee4283dabd2a74c + diff --git a/fvtr/speccpu2006/at-sniff64.cfg b/fvtr/speccpu2006/at-sniff64.cfg new file mode 100644 index 000000000..72faa163f --- /dev/null +++ b/fvtr/speccpu2006/at-sniff64.cfg @@ -0,0 +1,541 @@ +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +tune = base +ext = at-sniff_64 +output_format = asc,cfg +teeout = 1 +log_line_width = 156 +iterations = 1 +reportable = 0 +check_md5 = 0 +runlist = all +action = validate +backup_config = 0 + +makeflags = %{MAKEFLAGS} + +default=default=default=default: +CC = %{CC} +CXX = %{CXX} +FC = %{FC} + +OPTIMIZE = -m64 -O3 -fpeel-loops -funroll-loops -ffast-math -fvect-cost-model -mrecip=rsqrt +LDOPT = -m64 -Wl,-q -Wl,-rpath=%{BASE_DIR}/lib64 + + +########################################## +# Integer options +########################################## +400.perlbench=default=default=default: +PORTABILITY = -DSPEC_CPU_LP64 +CPORTABILITY = -DSPEC_CPU_LINUX_PPC +EXTRA_CFLAGS = -fno-strict-aliasing + +403.gcc=default=default=default: +PORTABILITY = -DSPEC_CPU_LP64 + +462.libquantum=default=default=default: +CPORTABILITY = -DSPEC_CPU_LINUX + +464.h264ref=default=default=default: +CPORTABILITY = -DSPEC_CPU_LP64 -fsigned-char + +471.omnetpp=default=default=default: +CPORTABILITY = -DSPEC_CPU_LINUX + +473.astar=default=default=default: +CPORTABILITY = -DSPEC_CPU_LINUX + +483.xalancbmk=default=default=default: +PORTABILITY = -DSPEC_CPU_LP64 +CXXPORTABILITY = -DSPEC_CPU_LINUX + + +########################################## +# Floating point options +########################################## +433.milc=default=default=default: +EXTRA_CFLAGS = -fno-strict-aliasing + +436.cactusADM=default=default=default: +PORTABILITY = -DSPEC_CPU_LP64 + +447.dealII=default=default=default: +PORTABILITY = -DSPEC_CPU_LP64 +CXXPORTABILITY = -DSPEC_CPU_LINUX -include cstddef + +450.soplex=default=default=default: + +454.calculix=default=default=default: +EXTRA_LDFLAGS = -Wl,--wrap,atan2 %{LIB64_ATAN2} + +465.tonto=default=default=default: +CPORTABILITY = -DSPEC_CPU_LINUX + +481.wrf=default=default=default: +CPORTABILITY = -DSPEC_CPU_CASE_FLAG + +482.sphinx3=default=default=default: +CPORTABILITY = -DSPEC_CPU_LINUX -fsigned-char + +__MD5__ +464.h264ref=base=at40_64=default: +# Last updated Tue Mar 1 09:59:16 2011 +optmd5=7b52a077c60a2f224be5dfa365b9dddc +baggage= +compile_options=\ +@eNrNUk1PwzAMvfdXRLlnBTGBVK2T1g9GoVsq1h3gUnVZugXapkrSIfj1uMA+0HbgABJRDrb8bL9n\ +eyprUuXPvBAlR7IxQtbasbRRgplMtfVSqGzDlSheXXyOLZ9OEgfZALRz0++d2QtR2yvGEIEvtwV6\ +EpFgloR+5idzMKdB6M3HCCFSXfYRoRdgsKZ1G/nC1RUiRcN5SUopGw1OWytZ7t0i1wYomjXYRnFO\ +NpwZqcQbR9u3b5bFSdeh0GJV8yVh61xtQQMtW8X40PId5PsuPhaBP0LUu6VJ6uJvirAFsqH+dTwa\ +zyB2rA5b1EGQGE2ixxAQv6r0qz29T0deFEfpwyGFE5qxFUfTu5OL+oMd/GT8A7l4ghw97PBltdvc\ +bsLd7OPg9Fr+1WSB52SU3mRx5HWXUFb4kzqdd0dzcDHvUDUJ+Q== +exemd5=90e85f8764f6c821a3d9a982dfa045f3 + +401.bzip2=base=at-sniff_64=default: +# Last updated Tue Nov 29 15:35:55 2011 +optmd5=bc2c19ffc5b70d7231469c542ae37eeb +baggage= +compile_options=\ +@eNrFUk1PAjEQve+vmPRsWY1fyYYlkQUJCuwmSEy8EChdrZad0nYx/ntmIQgKB0/SNOmbjzeZN9MB\ +Fnw++ZC50hLQeIWFiwLnrRJ+bMtipux4Ka3Kv2J2wYIk7WcRhJQYTvx17TycqiJ8FQI4XdwWqCHw\ +1jBrJ+MkGxEctNrNUQcA+PzmCnh6SUCYMjb4Ke0t8NxIqblGNI6MsrCod2Y+cZ5a9G+El1J4LrBy\ +4ExqKmPQiMLPCFkplImtW1gPv0/dYWmFbARJBEkSs0MBbB1Kmw9p9hSzH2pYQJJJyH3vrjOk2KEy\ +FqQRELHb7760KeN/VLKg1x08Ht3GCQZdx+k7kVxj59o08azP+AI2rzVUPt5rWKtplfM962oLvdbx\ +BZ1mxuuGNp/ij3K2nFHF2ftFK+yXE9s= +exemd5=0e29458854e5b2375ff42b30709a9ab3 + +403.gcc=base=at-sniff_64=default: +# Last updated Tue Nov 29 15:36:33 2011 +optmd5=bacfe000897612bd4bbd42baa23a8b7a +baggage= +compile_options=\ +@eNrNUl1PwjAUfd+vaPpsh8avZGEkbEyYjm2REaMvC5ROp2UtXYfx33s3nGDAxCdi06S37enpuffc\ +UBRkOXtjWc4ZElLnoigto9QqpzpVVbHIVbpmKs8+bHyGDTcaxxbqALAz05fmaWeeF51nShGBKVoC\ +UyAymMSem7rxFMJw4DnTISK+iRBZXl0gEp1DQGVlS/HO1DUimWSMEy6ELGFTFUrw7TablRpU6heI\ +14xqQkV9IBaMA40UkhZ6AZFiNJe2KldKo6+x1ZEGMfzcjm4pKkVZz3At5Lo23k8JN1eRcxvFiY1/\ +5IcNKAJQ3gT94QTu9nNtEI4XuqO0BfkmNiILAZs/9p88ODlOJRopcXSf9B0/8JPHXb1NTbAR+OHd\ +QVeP6NYvRnXF/BU4yl4N4cvW1UbWAz8hK7RZlYQP7Z0UeD6vMd+e1W4Gg8NG/1NbQPG4n4zSwHfq\ +BuJLvEli05B/LEH7Zlq/2engTxzdOZs= +exemd5=ebebdf6b7d52cf74e63e5a984c610fb6 + +429.mcf=base=at-sniff_64=default: +# Last updated Tue Nov 29 15:36:35 2011 +optmd5=8ba680ea929ddb1acdc4e572b1377b4c +baggage= +compile_options=\ +@eNrFUl1PwjAUfd+vaPpsmcavhDASViagY1tkhMSXBUqn1bKWrsP4770DQUQefJJmSU97P3bOPY1U\ +QRbTN54LyZHSVqiibDqlNYLZzFTFXJhsxY3IPzx8gR0aD5MmciHRndrrxrk7E4X7zBgi8Kltg4ZC\ +pDtKAprRZAww6gb+uIcATTpRmo3SLs2SxziNEVncXCESXwJguvK0eufmFpFccy6JVEqXcKgKo+T3\ +MZ+WFjjbF8Arzixhqr5Qcy6hjVaaFXYOyHAmtGfKpbHocLVKVRnG2w5tIko9/FsRXodi/z5OUg//\ +kIcdmAEouws7vRHEfktdZ/hBRPsZ3WUdaMdO3ETQfDAcPAUQ/59JYCccRA9HLTyBGS01e4Wisg2Y\ +yMXX7YbHRJ6RJdrsRsMfvD3OUszqnJ0ltVlh97iPpxkzEBp20n4WDvzafbnAG46b5/RHhduacV2z\ +9/4+AdfLKLw= +exemd5=7a442766b711b653ca2e0e8167e72958 + +445.gobmk=base=at-sniff_64=default: +# Last updated Tue Nov 29 15:36:48 2011 +optmd5=acaf9c9e7aba68817a53846c334347c5 +baggage= +compile_options=\ +@eNrFUt9PwjAQft9f0fTZMo2/EsJIoAw2hY0E0MSXBbqi1W4tXafxv/fGBFF40BdZuva79q6977uL\ +VE6y+QtfCsmR0laovGg6hTWC2cSUeSpM8sqNWL57+Aw7NB6Nm8gFR3duLxun7kLk7iNjiMBQmwsa\ +CpHeZOzThI5nAKOe350NAASdOz+hcdQPB0mASNio/npyRc5kmfLK2GJEsqsLROJzAEyXnlZv3Fwj\ +stScSyKV0gUYZW6U/DKX88ICJ/sE+JUzS5iqNlTKJVyjlWa5TQEZzoT2TLEyFv38WoUqDeNthzYR\ +pR7eZ4zXR3H3Jh5PPfyNPnZAI2DeH3YGEzjbl2Lt0fUjGiRbpz9qg524ieDtcBQ++BD/P0JhZxhG\ +twc74Ai1aqnFMwQVbcBEZp+7dR738oSsUL0aDS94OzlLsah8thWrajnsHS7zcWSGhEadaZAMw27V\ +HTLDdY51t/2S4SZmVsXstOcH4TE56Q== +exemd5=d1527e67b783d9f35f5e59b27587b7cd + +456.hmmer=base=at-sniff_64=default: +# Last updated Tue Nov 29 15:36:53 2011 +optmd5=9c6dc08b547e10de00f8a341297840b6 +baggage= +compile_options=\ +@eNrFUt9PwjAQft9f0fTZMo2/koWRwECcDrYEiIkvC5ROq92udB2G/96bE0XhwSdpmvSuvbt+3303\ +hoLl81eRSSUIaCuhKD2ntEZym5qqWEqTroWR2canZ9QJ4lHiERcD3bm9bJ26C1m4T5wThhu2BVpA\ +WH+SDII0SGZojvuD3mxICGH51QVh8TkaXFe+hjdhrgnLtBCKKQBdolMVBtS3m81LixDtM9prwS3j\ +UF/AUigso0Hzwi7RMoJL7ZtyZSz5vdolVIaLjhN4JAh8uk+AfjzFvbs4mfr0BxvqIGUkchN1hxN8\ +22dGndgjmBiOwscBRvwPS+pE4fj+oBpHaHQbFi+YVHZqmVX+edvgeFAnbEWa02j8wd/BrOSijvlq\ +dy1E1D+s0XHajIBG3eltGoW9Wn+V0wZjMyp/ZLjNmdU5O7P1DuPlGcI= +exemd5=5780ad1962bbd1d3ed21e609b4077663 + +458.sjeng=base=at-sniff_64=default: +# Last updated Tue Nov 29 15:36:58 2011 +optmd5=bc2c19ffc5b70d7231469c542ae37eeb +baggage= +compile_options=\ +@eNrFUk1PAjEQve+vmPRsWY1fyYYlkQUJCuwmSEy8EChdrZad0nYx/ntmIQgKB0/SNOmbjzeZN9MB\ +Fnw++ZC50hLQeIWFiwLnrRJ+bMtipux4Ka3Kv2J2wYIk7WcRhJQYTvx17TycqiJ8FQI4XdwWqCHw\ +1jBrJ+MkGxEctNrNUQcA+PzmCnh6SUCYMjb4Ke0t8NxIqblGNI6MsrCod2Y+cZ5a9G+El1J4LrBy\ +4ExqKmPQiMLPCFkplImtW1gPv0/dYWmFbARJBEkSs0MBbB1Kmw9p9hSzH2pYQJJJyH3vrjOk2KEy\ +FqQRELHb7760KeN/VLKg1x08Ht3GCQZdx+k7kVxj59o08azP+AI2rzVUPt5rWKtplfM962oLvdbx\ +BZ1mxuuGNp/ij3K2nFHF2ftFK+yXE9s= +exemd5=e5716bba009e00d012dab52b0347dbd3 + +462.libquantum=base=at-sniff_64=default: +# Last updated Tue Nov 29 15:37:00 2011 +optmd5=b56bf6abb3fca6c3609a3fac0f9d130a +baggage= +compile_options=\ +@eNrNUm1PgzAQ/s6vaPrZDo1vCRlLBpsTZYM4iC9fyNYVRQvtSpnx33sMcTObiZ8Wmya9u95dn6fP\ +TURB8tkbSzPOkJA6E0VpGaVWGdWJqopFppIVU1n6YeMTbLjBOLSQCYnmTJ93js15VpjPlCICW7QN\ +OgKRwTQcuokbxmBOBkMnHiGESH5xhkhwCgaVlS3FO1OXiKSSMU64ELIEpyqU4Bs3nZUaIOoXsFeM\ +akJFHRALxqGNFJIWegGWYjSTtiqXSqN2bVAkvjeJH9p4txSVoqxnuBZyXRvvEsLrq8C5CcLIxj/Y\ +YQO+AFpe+f3RFO52mWIjsBAUemPvaQgZh2H9hSu4i/qO53vR4za2hj824LjdK+AhtflFlq6Yv0KT\ +slen8LzVcI3rnh+RJWpOJeFFe4sDz+Z1zrdCtXb+YL+s/1YZwDzuR9fgOvVU8Rw3NJoB/OMntDVx\ +XbM1sZ9+yjag +exemd5=072a69779bd9f3fea83ecba9c082fa8e + +464.h264ref=base=at-sniff_64=default: +# Last updated Tue Nov 29 15:37:40 2011 +optmd5=adcfa1a3e022edb18a206f0122626ab5 +baggage= +compile_options=\ +@eNrVUl1PwjAUfd+vaPpsmcavhDASNhCngy0yYvRlGV0H1W6tXcH4770DJxh44InEZklv13Nvz7nn\ +jmVJivSd5VwwJJXhsqzaVmU0pybRyzLjOlkxzfMvB19gywtHURvZALRTc906t2e8tOeUIgKfbAq0\ +JCL9STTwEi+aQjjuD9zpECFEipsrRMJLCKhaOkp+Mn2LSK4YE0RIqSo4LEstxfaYp5UBimYB8YpR\ +Q6isf8iMCSijpKKlySDSjHLl6OpDG9SsLYskiOqn84rPS5YRukh1A+pUcqkp61peG3meg/fV4fVV\ +6D6EUezgP1KxBf2A+ndBbziBu33Z2ArbCBL9kf86AMRpWvDDK3yKe64f+PHLLrcDzcBW4I8fD1p7\ +SteOMawjZ29QserWeFE0Vq9JPosz8oE2u1bwvLMjSPBZjfn1rnY16B82/H94BgJGvfg+CXy3Hj5R\ +4I2mzZwe2ZEmZ1rn7Az2N7X1SFg= +exemd5=5274a5cb2886c28c9ae848b8aa5fb5e8 + +471.omnetpp=base=at-sniff_64=default: +# Last updated Tue Nov 29 15:38:07 2011 +optmd5=fd7d9d2db5111ea11fabaa5c194a358b +baggage= +compile_options=\ +@eNrFUl1PwjAUfd+vaPqKZRq/EuJIZEycwrYEicSXBbpOq6UtbYfx33sHIhhI9EmaLL23PffunnOa\ +KElmkzdWcsGQ0o4raVuedYZTl5tKFtzkC2Z4+RHgE+yF6SBrIR+A/sSdN4/9KZf+c6OBCEVErRs0\ +FSLdYRaFeZiNIEy6UWfUQyRuwqdmkrmcSyqqgkEu+NT6TC64QYjMLs4QSU8hoLoKtHpn5hKRUjMm\ +iFBKW0gqaZTYpOXEOqDgXiBeMOoIVfWBKpiANlppKl0BkWGU68DYuXFos66sqgxlbS9soXA8DvAu\ +N/x1l3bu0uwhwD+oYg/0AJY3/eveEO52aS8RnSgJb/M16BcdsJe2EPwqHsRPEcD/RxTs9ePkfq+5\ +h/BFTV+hyLY3R6shHsURmaPVbjS0D7YGBg1rzLc7tXP97n5TD6PxcqDVM/ojnXXNqK7Zenefo7wt\ +Pw== +exemd5=7e9cf50dc7378057eec0501b3b5ee4ce + +473.astar=base=at-sniff_64=default: +# Last updated Tue Nov 29 15:38:10 2011 +optmd5=a457661feb168351c64b7dde5dbadfe3 +baggage= +compile_options=\ +@eNrFUktPwkAQvvdXbPaKSzW+ksaS0IdYhbYJEomXBpatri7dZbvF+O+dUpEaOHiSvew8vpnMN9/E\ +siDL2TvLuWBIKsNlUTpWaTSnJtNVseA6WzPN808Xn2HLT0apg2wA2jNz2T2157ywXzodRCgictug\ +KxEJxmnoZ346ATMOQm8yaMUyLxpkYRxE/Rghsry6QCQ5B4OqylXyg+lrRHLFmCBCSlWCUxVaip2b\ +z0oDc5tXsNeMGkJlHZALJqCNkooWZgGWZpQrV5crbdDu3ZSy0pT1LN9B/nTq4n1C+DuXePdJ+uji\ +X/ywBUsAGrfD/mAMuX2uG4QXxv5dtgdqkcdW4iDoH42i5xAw/7MJbA2j+OGgjMcQQ87foKjs7ULN\ +EE/ihKxQ82sF7d3WwILPa8yPJLVcw+CwksfZ8Wag5nb+SGdbM6lrWsf2BYppIx0= +exemd5=14cc939342534d36a5566010ad9ca795 + +483.xalancbmk=base=at-sniff_64=default: +# Last updated Tue Nov 29 15:39:10 2011 +optmd5=adb3409136b8059da83967fe4f9e0c75 +baggage= +compile_options=\ +@eNrtVNtunDAQfecrLF5Tll7SRlqFSF6gG1LAiEtK+2KxXm9KC5gY2CZ/3wHChjSplJdGqlRLiDnj\ +8dg+c8a+qLQy+8F3ecGRqNtcVM1SaVqZs5bKrtrmku65zHe3hvpGVUziBUukQ6Cete8Xr/VNXulX\ +R0dIY0gTU4KFQJoVBbZJzSAB07fsVbJGYOEgoD6h8XloYysCR4pd7FPH92yPetGaugRbdog0ZwHf\ +DZeMN+ze0reifIj0vKyLmavJbmaoa/NC95orV2RbLhvdqTxeCnn7e0gss6phYoxhotr3AVmRVUzP\ +K1Z0Ww5HDUJyQVPPDXAY9Uc8OJLYcSc4TkYTjHB6bM7A28m2iDeZl9h1LByTYRWko0lkUx/HzqVN\ +4xD7kUkGSg5zd2zZUYTX9kRY+eEYaeQdGKzujFr85PIEabua80IrhKgbAF0lRXEPd1nTQvHbb2Dv\ +OWs1JnoH0ACMlrWoWdVuwZKc5bUhm2vZIoRmpaVu0O86w46fpGgYp43ogOEzxVwiM00N9bFo1Ls5\ +srogQWyoDzSkKiA0yPnRxesI5h7raYhY2b55TiHJIe6/xP6OxFSFLBHUyfGcrzYQ/TKCG4ockDDG\ +K8d14i9zJQzyG3WSpn+M6SWpKvD79OTD9YKd87zGQadi8x1yNmfoMMYzfi5eaddo/Msadjdm9yny\ +TR9z6J++t1zr6bb7lws5XGt8Lp5JyrQm6dfM3pdfc5gsNQ== +exemd5=92809c6d5c1652bfac24078faddbb06a + +999.specrand=base=at-sniff_64=default: +# Last updated Tue Nov 29 15:39:12 2011 +optmd5=bc2c19ffc5b70d7231469c542ae37eeb +baggage= +compile_options=\ +@eNrFUk1PAjEQve+vmPRsWY1fyYYlkQUJCuwmSEy8EChdrZad0nYx/ntmIQgKB0/SNOmbjzeZN9MB\ +Fnw++ZC50hLQeIWFiwLnrRJ+bMtipux4Ka3Kv2J2wYIk7WcRhJQYTvx17TycqiJ8FQI4XdwWqCHw\ +1jBrJ+MkGxEctNrNUQcA+PzmCnh6SUCYMjb4Ke0t8NxIqblGNI6MsrCod2Y+cZ5a9G+El1J4LrBy\ +4ExqKmPQiMLPCFkplImtW1gPv0/dYWmFbARJBEkSs0MBbB1Kmw9p9hSzH2pYQJJJyH3vrjOk2KEy\ +FqQRELHb7760KeN/VLKg1x08Ht3GCQZdx+k7kVxj59o08azP+AI2rzVUPt5rWKtplfM962oLvdbx\ +BZ1mxuuGNp/ij3K2nFHF2ftFK+yXE9s= +exemd5=4f1b5a2578a54b9062e544b0e53bd2bc + +410.bwaves=base=at-sniff_64=default: +# Last updated Tue Nov 29 15:39:15 2011 +optmd5=e4a7fb0132bc7e4c8c2aa75027c45fc3 +baggage= +compile_options=\ +@eNrFUk1PAjEQve+vaHq2rMavZMOSyC4QFNhNkJh4IUvparV0StvF+O+dZYPgAeMJe+l8vcmbNzMB\ +zVbFuyilEgSMl6BdFDhvJfdzW+mltPONsLL8jOkFDZJsnEckxMKw8Net83AhdfhSgvW20IRxwmDX\ +pQWErW6uCMsu0eCmig18CHtLWGmEUEwBGIdOpS2ovVsWziMj/4r2RnDPONQBWAqFbQwYrv0SLSu4\ +NLF1a+tJ20FluegESUT6SUyP8KPbfNa9z/LHmP4gSwMcK8ln/dHdYIq5dJr3kjkGCEsnaa87G9Ag\ +iwgCh+Phcw8rTjMaDUbDycNxxU8m8f61YfGGINfZhxoST+qMrUnzW4Pt4wPWSi7qmm/B61WM0l9W\ +9T9qb1k15/HHmXaYWY05uKcvj4wVMA== +exemd5=d897ecc8bd4133298631631f854981fc + +416.gamess=base=at-sniff_64=default: +# Last updated Tue Nov 29 15:43:44 2011 +optmd5=1b89a300097b6147005af3b072f45575 +baggage= +compile_options=\ +@eNrFUl1PwjAUfd+vaPpsQeNXJIwExmDTsS0CMfFlGV2n1W4tXcGPX++dIJAYDE/Yl57e3tt7zukN\ +ZUmK9JXlXDAkleGyrFpWZTSnJtGLMuM6WTLN8w8bn2FrEMctVClGlUKI9Mex6yROPE3CKPGiIHDv\ +/Ym3EwcY9t3edIgQaldyoSnrICI3uJErxT9Z1shv3i14ueeGjpdAk0HQHY5tvKcDrnMh+Ctr0w9b\ +TjSCpCZIaqbmsnHanPGy+ZRLbXRaIkJrGmu9DYlIcXWBSHQOgKqFreQb09eI5IoxQYSUqoLDotRS\ +bI95WhnwzjwDXjJqCJV1QGZMwDNKKlqaDJBmlCtbV3NtNsItp4UGjo338MPf91HvNoonoG+X7CHa\ +oxaCQn/kP7qQcRxp2Ar88G6/40ezeLvacvYCRVUHMBHFOrri8SBOyBytdq2gg71DXPBZnbPxvP6N\ +oP/Hb/2P4cBq1J14SeD36kkQBV4RXQ3NgTJ/aqZ1zc6UfQHKSUv4 +exemd5=854fd878bda6d442721540b2be4e6341 + +433.milc=base=at-sniff_64=default: +# Last updated Tue Nov 29 15:43:50 2011 +optmd5=ddf55b1a2655acca563269de5d95a74e +baggage= +compile_options=\ +@eNrFUltPgzAUfudXNH22m8ZbsogJK7hNNyCDqfGFsK5otaO1dBr/vQcmOrM9GB+UNPTce853vlCV\ +ZJk/8UJIjpS2QpVVz6msEcxmZlUuhMleuBHFm4sPsEOjSdxDXQjs5va4s9+di7J7zxgicFRboKMQ\ +8ZM4oBmNZyCGftCfDRAZdUC5COufl6Rw0SgcTD0/Sydxdh3QNJomYPWTsZcMG+N4FF4lCJHlyREi\ +0SEITK9crV65OUWk0JxLIpXSFSir0ij5pRZ5ZWE0+wDyC2eWMFUb1IJLKKOVZqVdgGQ4E9o11bOx\ +6PMjRanIGgWSS5FXorz/cJ1VamUYP3doD1Hq4m0wcOOK+pdRnLr4GzLYAfgAlIuxN0jAt41SE9EP\ +QjrM2qBfwoadqIeghdFkdBdAmb/BsHk1uE2nXkbbAXaAiZ26x51U+vttozM1f4Sk6rxevVy2JGj6\ +uJF75Bmtb6PhBXejZynmdcznfuvNj/3dpPifbUBDEy8dAiX69SrkEq97XHPzhxO2ObM6Z4PM7wu8\ +URg= +exemd5=034e5bd6e33db671210f299d0b25fba5 + +434.zeusmp=base=at-sniff_64=default: +# Last updated Tue Nov 29 15:44:13 2011 +optmd5=98b9dcb28ba7925eac08108656d0cd7f +baggage= +compile_options=\ +@eNrFUl1PwjAUfd+vaPpsN41fcWEkMj6CAluCxMQXMrpOq6O3tB1+/HrvQIEHNTxhX3p6e8/JObcd\ +gWLz7EUUshQEtJOgbOhZZyR3U1OpXJrpUhhZvEf0hHrdNA2J1YJrTQhh7XHaiadxOkE4andakx5W\ +GxYqw0WTMNhgv9BafojcL67ePJRASndw3RtH9AcN6sXJEJsC9BNk7tw/DmZSBY8FGGcyRRivpb/M\ ++kDY/OKMsOQUAddVpOFVmEvCCi1EyUoAbfFQKQPl9lhk1mFw94R4KbhjHOoC5KJEGQ2aK5cjMoJL\ +HRm7MG4TxotD0o0j+os/urpPWjdJeof5ds3SPbInIUFif9h/6GDHYaJRb9Af3f4+8YONeLsaMHtG\ +km1uS2sT9+URW5D1bjTKRzuuSzmrezYDr59i0P7jqf5n2itX6++xZ6ZvzqTm7PynT/C/Mvg= +exemd5=a93dc364d53fc0e3f94d168643ab3c26 + +435.gromacs=base=at-sniff_64=default: +# Last updated Tue Nov 29 15:44:31 2011 +optmd5=56a59316ed0bdee07f67b711b467fa18 +baggage= +compile_options=\ +@eNrFVNtuwjAMfe9XRH1eyqbdtIoiQSjQDdpKwCbtpYKQbtlCk6WBXb5+LrehARPaA/Sltmu75+TY\ +CWWGx4NXlnLBkFSGyyx3rdxoTk2iJ9mI62TKNE8/PfvMthpx7KJcMaoUQgjXu7FPEhL3wQzrfq3f\ +hGg5lxNNWQVhubKdVCn+xUZOevNhQQsoabSrza5nb+lhWyTqQFIJ8JQG5tI5LQ15VnpKpTZ6kCFM\ +i9YLsI5EeHx1gXB0DgZVE0/Jd6avEU4VYwILKVUOziTTUvy46SA3QNw8gz1l1GAqi4AcMQFtlFQ0\ +MyOwNKNceTp/02ZFxiIuahDP3oHPnn2PardR3AN+62DtPbhHLoLCoBM8+pBxGGq7TpzSzcPepjkO\ +HPBa1Xs/IVHYCJpJ62Cq/H7WVSJbVKJ0JhD5t0CQUfND0krIMmuT/bFkbAfh3e7FOYImZTl8gaK8\ +UlwXYryIznE8iBP8huZvreAP3hpwwYdFzkqZQrN2/Y+lO9LeuKhT7bWSdlArJkGM7TnQ+WjtSXNZ\ +0y9q1mbxG+7iw9A= +exemd5=75791b129744f7db845018a537b9c432 + +437.leslie3d=base=at-sniff_64=default: +# Last updated Tue Nov 29 15:45:48 2011 +optmd5=e4a7fb0132bc7e4c8c2aa75027c45fc3 +baggage= +compile_options=\ +@eNrFUk1PAjEQve+vaHq2rMavZMOSyC4QFNhNkJh4IUvparV0StvF+O+dZYPgAeMJe+l8vcmbNzMB\ +zVbFuyilEgSMl6BdFDhvJfdzW+mltPONsLL8jOkFDZJsnEckxMKw8Net83AhdfhSgvW20IRxwmDX\ +pQWErW6uCMsu0eCmig18CHtLWGmEUEwBGIdOpS2ovVsWziMj/4r2RnDPONQBWAqFbQwYrv0SLSu4\ +NLF1a+tJ20FluegESUT6SUyP8KPbfNa9z/LHmP4gSwMcK8ln/dHdYIq5dJr3kjkGCEsnaa87G9Ag\ +iwgCh+Phcw8rTjMaDUbDycNxxU8m8f61YfGGINfZhxoST+qMrUnzW4Pt4wPWSi7qmm/B61WM0l9W\ +9T9qb1k15/HHmXaYWY05uKcvj4wVMA== +exemd5=83e0cc01fda1accc5b3969a31dc146cd + +444.namd=base=at-sniff_64=default: +# Last updated Tue Nov 29 15:46:19 2011 +optmd5=8585eb4e03cd63bf315367d5393b9139 +baggage= +compile_options=\ +@eNrFUk1PAjEQve+vmPSqZTV+JRuXRBYkKLCbIJF4IVC6Wi07pe1i/PfOiggGDp6kl87Xm7w3M30s\ ++HzyJnOlJaDxCgsXBc5bJfzYlsVM2fFSWpV/xOyUBUnayyIIqTCc+IvaSThVRfh8dARcAMd1gxoC\ +bw6yVjJOsiGZ/WarMWwDAJ9fngNPz8gQpowNvkt7BTw3UmquEY0jpyws6o2bT5wniv6F7KUUngus\ +AjiTmtoYNKLwM7KsFMrE1i2sh827dlhaIetBEkEyGsVslzv7zqWNuzR7iNkvKSwgvaTitnvTHlBu\ +VxYL0ggI2Ol1nlpU8T8SWdDt9O/3ruIQU8bpK4FcfRNakXjUx3wBq98aah9vEdZqWtX8zLraQ7e5\ +f0WHmfEXodVR/FHOGjOsMFtX9AmAKxJ4 +exemd5=8e283b97be728935040fc8b2a8d632c3 + +447.dealII=base=at-sniff_64=default: +# Last updated Tue Nov 29 15:47:34 2011 +optmd5=501482e974c20aaedf151d0d9a847090 +baggage= +compile_options=\ +@eNrdU01v1DAQvedXjHIt7oL4klZNpc0HrSHdRE1WBC7WruOAwRu7tlPEv2eSZdtFXSTUQw/MxePx\ +eGbe8/NS92S7/i46qQRo46Xu3Txw3krumR36Vlp2K6zsfkbhizBIiqtyDjNMnK3969Pns43sZ19O\ +ToBwIHpf4FQDSasyS1hSrtBdplm8ugAgVPZcDa3AWFwUVc1SWi3iPGP15XW2SCuMt2KtGKWslVvR\ +O6wWvQSyffMKSDE63AyR0T+EfQukM0IoorQ2DjdDb7W633Zr5xGZ/4r+reCecD0GdCsUljHa8N63\ +6FnBpYmsu7Ee0O7nZnk5dj3Y0+WqAbKHwJ1vW9HBZGdOD5aL8yCZQ9I0UfiQovD3WRG/L8o6Cv9g\ +LAyQVmzyLl9cVHj2kL0pI86WySXDIvu8xxEaBsUccAh6RT9nWOVp6J0QlMV1vYhpTutPhzAnsnck\ +NM1fc44+QBhg/MNRUT6hcB6pGzjTm2/YxJ3Dne2G/qiekRvYrdbgONEBQCU3Y86dfEZp5elx1f1X\ +Tz3h3H2ff2Rpf2c13jn4b78As9OMqg== +exemd5=87827d708bc3746ea5bbd6f8a5c88796 + +450.soplex=base=at-sniff_64=default: +# Last updated Tue Nov 29 15:47:43 2011 +optmd5=8585eb4e03cd63bf315367d5393b9139 +baggage= +compile_options=\ +@eNrFUk1PAjEQve+vmPSqZTV+JRuXRBYkKLCbIJF4IVC6Wi07pe1i/PfOiggGDp6kl87Xm7w3M30s\ ++HzyJnOlJaDxCgsXBc5bJfzYlsVM2fFSWpV/xOyUBUnayyIIqTCc+IvaSThVRfh8dARcAMd1gxoC\ +bw6yVjJOsiGZ/WarMWwDAJ9fngNPz8gQpowNvkt7BTw3UmquEY0jpyws6o2bT5wniv6F7KUUngus\ +AjiTmtoYNKLwM7KsFMrE1i2sh827dlhaIetBEkEyGsVslzv7zqWNuzR7iNkvKSwgvaTitnvTHlBu\ +VxYL0ggI2Ol1nlpU8T8SWdDt9O/3ruIQU8bpK4FcfRNakXjUx3wBq98aah9vEdZqWtX8zLraQ7e5\ +f0WHmfEXodVR/FHOGjOsMFtX9AmAKxJ4 +exemd5=a91aaf5b2c2cabc6ac993401948a6e5b + +453.povray=base=at-sniff_64=default: +# Last updated Tue Nov 29 15:47:57 2011 +optmd5=8585eb4e03cd63bf315367d5393b9139 +baggage= +compile_options=\ +@eNrFUk1PAjEQve+vmPSqZTV+JRuXRBYkKLCbIJF4IVC6Wi07pe1i/PfOiggGDp6kl87Xm7w3M30s\ ++HzyJnOlJaDxCgsXBc5bJfzYlsVM2fFSWpV/xOyUBUnayyIIqTCc+IvaSThVRfh8dARcAMd1gxoC\ +bw6yVjJOsiGZ/WarMWwDAJ9fngNPz8gQpowNvkt7BTw3UmquEY0jpyws6o2bT5wniv6F7KUUngus\ +AjiTmtoYNKLwM7KsFMrE1i2sh827dlhaIetBEkEyGsVslzv7zqWNuzR7iNkvKSwgvaTitnvTHlBu\ +VxYL0ggI2Ol1nlpU8T8SWdDt9O/3ruIQU8bpK4FcfRNakXjUx3wBq98aah9vEdZqWtX8zLraQ7e5\ +f0WHmfEXodVR/FHOGjOsMFtX9AmAKxJ4 +exemd5=a39fc1b7533100c7438b7a51e078676f + +454.calculix=base=at-sniff_64=default: +# Last updated Tue Nov 29 15:48:27 2011 +optmd5=8248bc0592f130154dc6d1d383d1bfeb +baggage= +compile_options=\ +@eNrdk1Fv0zAQx9/zKSw/z83YxhAVmdSm6RZIm4i2AvESpa6zGhzbc5wN+PQ7Z0tXQYsmHjppfjqf\ +z3/f3e88VZJUxQ9WcsGQ0pYrWfe92hpObW4aueImv2WGl78C/AZ74yzro1ozqjVCiIxmWRTmYbYA\ +czqKhotL8H6oVWMou0BEbexeqTX/zVa98v1PDyTgyjgZXM4CvEMDe2E6gSAf8vEL+7Z37C+59K9L\ +ZawpJCLUST8m21OIxLMsTZNohkh1foZIegoG1U2g1R0z7xApNWOCCKV0DZtGGiWetmVRW2iBXYN9\ +y6glVDmHWjEBMlppKu0KLMMo14Gpb4zdlOWFfTQOA7wnU9yep8OPaTaHSrfTxs/oAkQMo2l4lXdB\ +XZ3YS/sINONJ/C0C/2Gq3oeF0r+J7BiMJ0oHw/Tn2sYW7sBGaUssfD3Eknj6af9HOjQI8kUcEXJn\ +Cn1U2EKeIH+tKuZruy6aayZ9wZd+e5C7GM1Mfn4G0wTg1PI7PFVfOBFRdXJt9k7z5lHbaMgr2CoX\ +FF3MBqLDm4z+8WFfBhO8Gn2dfx7kyaibnP9qVTu+k8H8Kk/ioVMRFX4o+WGen9mw7s7C3dn6APen\ +dvMw +exemd5=fd6c1bdafb1b6210244920e4be972fd7 + +459.GemsFDTD=base=at-sniff_64=default: +# Last updated Tue Nov 29 15:52:45 2011 +optmd5=98b9dcb28ba7925eac08108656d0cd7f +baggage= +compile_options=\ +@eNrFUl1PwjAUfd+vaPpsN41fcWEkMj6CAluCxMQXMrpOq6O3tB1+/HrvQIEHNTxhX3p6e8/JObcd\ +gWLz7EUUshQEtJOgbOhZZyR3U1OpXJrpUhhZvEf0hHrdNA2J1YJrTQhh7XHaiadxOkE4andakx5W\ +GxYqw0WTMNhgv9BafojcL67ePJRASndw3RtH9AcN6sXJEJsC9BNk7tw/DmZSBY8FGGcyRRivpb/M\ ++kDY/OKMsOQUAddVpOFVmEvCCi1EyUoAbfFQKQPl9lhk1mFw94R4KbhjHOoC5KJEGQ2aK5cjMoJL\ +HRm7MG4TxotD0o0j+os/urpPWjdJeof5ds3SPbInIUFif9h/6GDHYaJRb9Af3f4+8YONeLsaMHtG\ +km1uS2sT9+URW5D1bjTKRzuuSzmrezYDr59i0P7jqf5n2itX6++xZ6ZvzqTm7PynT/C/Mvg= +exemd5=2e543438efb6600bc72ba3521cea1579 + +465.tonto=base=at-sniff_64=default: +# Last updated Tue Nov 29 15:57:10 2011 +optmd5=19ce47d7fa9752fa101624e35aa12a38 +baggage= +compile_options=\ +@eNrFUk2P0zAQvedXWDnjdBFfotqs1CZuCbR21LRC4mKlrgMGN+N13F3g1zNpd9tKq0V7QIsvfmPP\ +jN97Yw4t3dY/dGOsJuCCgbYbRl3wRgXpd+3GeHmjvWl+pfHLOJqU5ZB0TivnCKG3hOarislyweSI\ +57IU1VJmgufFshC8urtli4VYyPmIj6ZszviS0C2xJmhf28Rt+yhAG2CP86pkmczKFUKes/FqSgi5\ +7GDnlb4iFI44aZwzv/Umad7/jJDTmPHsg0R6k9loWqXxP+cW968gsfv+D5nGUSbmmDRAGwd1eJNc\ +DNamHXxtwAdft4SqXsCdxwlg87evCRWvECi3Sx3cav+O0MZpbakFcB0Gu9aDPYVN3QWcV/iG+Ear\ +QBX0B7DRFts4cKoNG0ReK+NS3137cLQsyoZkkqXxI/zi/b0YfxTlEvWdk32KdjEkWFjMiy8MM55H\ +WhzNCv7pccefzeLTuoT1dyzqrk5HBxKf7Qt6TQ67d9g+PWNtzbrPORrej2KW/2VU/8ftPavD93ii\ +pvuaVV9z9p/+AIk6aos= +exemd5=f3b82b5f65a204b8b814e7ae56eed7d3 + +470.lbm=base=at-sniff_64=default: +# Last updated Tue Nov 29 15:57:12 2011 +optmd5=9c6dc08b547e10de00f8a341297840b6 +baggage= +compile_options=\ +@eNrFUt9PwjAQft9f0fTZMo2/koWRwECcDrYEiIkvC5ROq92udB2G/96bE0XhwSdpmvSuvbt+3303\ +hoLl81eRSSUIaCuhKD2ntEZym5qqWEqTroWR2canZ9QJ4lHiERcD3bm9bJ26C1m4T5wThhu2BVpA\ +WH+SDII0SGZojvuD3mxICGH51QVh8TkaXFe+hjdhrgnLtBCKKQBdolMVBtS3m81LixDtM9prwS3j\ +UF/AUigso0Hzwi7RMoJL7ZtyZSz5vdolVIaLjhN4JAh8uk+AfjzFvbs4mfr0BxvqIGUkchN1hxN8\ +22dGndgjmBiOwscBRvwPS+pE4fj+oBpHaHQbFi+YVHZqmVX+edvgeFAnbEWa02j8wd/BrOSijvlq\ +dy1E1D+s0XHajIBG3eltGoW9Wn+V0wZjMyp/ZLjNmdU5O7P1DuPlGcI= +exemd5=6b3cb07e3f8757843bfc65edb6fc3b6d + +482.sphinx3=base=at-sniff_64=default: +# Last updated Tue Nov 29 16:05:12 2011 +optmd5=3f0b6cbb3595b9967a4e825fd32f87bd +baggage= +compile_options=\ +@eNrVU1tvgjAUfudXNH1edctuiRETQRQ2BTN1txeitWi3SrtSXPbvd9AxNfrgXkxGSDg9137f+Qhl\ +Shbjd5ZwwZBUhss0q1mZ0ZyaWOfplOt4yTRPvmx8gS036vVrqAqJ1bG5rpxXJzytzihFBF5ZNqhI\ +RFqDvufGbn8EZtjynFEHkaCy6/ebj17sRmE76MT+OhwIPskNFwghsri5QiS6BIOq3Fbyk+lbRBLF\ +mCBCSpXBIU+1FJtjMs4M4DFzsJeMGkJl4ZBTJqCNkoqmZgqWZpQrW2cf2qDy2Vwt7gbh6BlaZHyW\ +simh87Eus+qZzDVlDcutIde18T4XeBWKnLuoP7TxDjHYAvZgQLvb7Awgtk/SKsPxQtePy6S/sIat\ +qIZgbtALXj2oPQ2FP7Cih2HTCbrB8GUb2iEysQXO+4NCOuXaj9p4XU7eoGXWKArEohTL6pZP4ox8\ +oPVXK5hvbyGCnRQ5v8svZNFtHVbMP9kaIOg1hz4EnUKZYoHXoNZKP5KSsmZU1Gz9Gt+/G2fv +exemd5=b27b54408bebf3afe7ef62650bbec5f8 + +998.specrand=base=at-sniff_64=default: +# Last updated Tue Nov 29 16:05:14 2011 +optmd5=bc2c19ffc5b70d7231469c542ae37eeb +baggage= +compile_options=\ +@eNrFUk1PAjEQve+vmPRsWY1fyYYlkQUJCuwmSEy8EChdrZad0nYx/ntmIQgKB0/SNOmbjzeZN9MB\ +Fnw++ZC50hLQeIWFiwLnrRJ+bMtipux4Ka3Kv2J2wYIk7WcRhJQYTvx17TycqiJ8FQI4XdwWqCHw\ +1jBrJ+MkGxEctNrNUQcA+PzmCnh6SUCYMjb4Ke0t8NxIqblGNI6MsrCod2Y+cZ5a9G+El1J4LrBy\ +4ExqKmPQiMLPCFkplImtW1gPv0/dYWmFbARJBEkSs0MBbB1Kmw9p9hSzH2pYQJJJyH3vrjOk2KEy\ +FqQRELHb7760KeN/VLKg1x08Ht3GCQZdx+k7kVxj59o08azP+AI2rzVUPt5rWKtplfM962oLvdbx\ +BZ1mxuuGNp/ij3K2nFHF2ftFK+yXE9s= +exemd5=4f1b5a2578a54b9062e544b0e53bd2bc + +400.perlbench=base=at-sniff_64=default: +# Last updated Mon Jan 30 11:37:47 2012 +optmd5=42afc777690ead0248b7fe372d2b33f4 +baggage= +compile_options=\ +@eNrVU1tPwjAUft+vaPpsReMtIc6ElanTwRoc8fKyjFK0WtbaFYz/3rPBEAMmPJm4NNk5PZd+5+vX\ +vi7INH8TE6kE0sZJXZRtr3RWcpfZWTGWNpsLKyefPj7EHk16rI1akNjK3cn+QWski9Yz54jA0k2D\ +fY1I946FNKNsCGa/GwbDKzBYOIgzmgxChMj09BiR5AgMbma+0R/CniEyMUIoorQ2JTizwmr17U7y\ +0gFa9wL2XHBHuK429FgoaGO04YUbg2UFl8a35bt1aPl948liVp285kf94UPGGIWuhSaL2UmuZF7K\ +4nlZf17qmeXiwqNtRKmPNynAdSgJbhKW+vgHH9gD0uCoy7hzdQexTW7qjCDs0+tslbQiC3tJG0HX\ +qBc9hRD5G+ZqSCwZpJ0giqP0cR13zeFyqt8yGlZr9OFDOuhktJltC8/Yg4rbrdr6Q63sJJOlIvTo\ +FfqWF1WZmjY6q6Heqz3yjhZ/awCEvzaWkqMqZ6WOSjdxd7uk/vfFw2C9TnoNW0F162qKF7MuXsiO\ +TDU1w6pm7Ul9AdLYdK4= +exemd5=6d9d680c334f157beb7b1849d738617b + +436.cactusADM=base=at-sniff_64=default: +# Last updated Mon Jan 30 11:45:24 2012 +optmd5=253cea25658ec7baaffdb75c2716c3cd +baggage= +compile_options=\ +@eNrNU11P2zAUfc+vsPyMk00bICKC1DgpBNImGq0QvESt42wGNzaOA9t+/W5a2kWiRYiHCr/kXufc\ +j3PP9VjVZDF74JWQHClthaob32msEcwWpq1LYYonbkT1J8BfsTPMcx81mjOtEUIkus5jWtB8CuY4\ +isPpee+uSPOj74A6bVRrGD9DRG1st9Ja/OWlW538diAlwIfp4Pw6wFty4g6RZz8mgzBJk8ltH7Qs\ +gh2ajQDjAQFvZg/dL95c1N7PShlrZjUirKv9ws5ViCygMZJ9A4PpNtDqmZtjRCrNuSRSKd2A09ZG\ +yf9uNWssTMr+AvuJM0uY6i5UySWk0Uqz2pZgGc6EDkzzaOyGrUN9NKQB3tEfXv7PwsssnwC3frP4\ +HcPJfASBySi5iwGxH2ofloSx12ps2SJEElEz2ZYcLNf1Nk5EaRbFe1Pw5bxe6tXpC0y3CMzYUlv6\ +YW0BEcZjelHQNerNuXzaZUiT8dXu97lHOXcoearm95CjOesgcrGWfdnWjTwgj2j1NRoKBj0eUsw7\ +zEbUTu40euOpf9bX6qPRYHJRpEnYbZlc4BWT1dq+cw7rmGkX09vzf3Sj/Ho= +exemd5=9f8f820434ccbda10a1c3a6b8bd4fac5 + +481.wrf=base=at-sniff_64=default: +# Last updated Mon Jan 30 12:01:56 2012 +optmd5=28d3d67fad35a96f4eb1de64e4485492 +baggage= +compile_options=\ +@eNrdU9uOmzAQfecrLJ4LSbbXRGUlwiV1FzAKRLvti5UY09IS7DXObtuvr50rq02qPKXS+sVzxmN7\ +5pyZhDXWcv6TllVNAeOyYk07MlopKiKxWDVFJfADFVX52zEHphGm6Qi0nBLOAbAegbUEdSWpmNc2\ +XwIL2sDyYZJDpPdbNPUz+DVw3ig0fYKiJygJcs8PlRHE2EPTwBloZ7wFfQU85MZpdsDBXXoA4bCP\ +s9xNfDdCSbCOTkI4weNZiKMgcT4MhlfKG7t32EexC5MMh87V+g+EEzcOIpjlOJ2qxJUvSwMPe+lM\ +H/vBeDbp+LDnZgEOI3cCAPjYspUg9BpYbG/bJefVH1rY5fCXoagaB4n3CSvW9J3MMV8gZaauU3Gz\ +q/A5gdsINM3dMYxg/qUbdaDUNDwUq8ieasPeXL61+71F1fS+lUxIMW+ARTTT2x612YY6aPcaKklR\ +9qqG1KuCKn7fKYLQa2UQvnI4e6TiPbBKTmlt1YzxVoFVI1h9gOW8lWoM5HdlP1AiLcK0gxW0Vs9w\ +xkkjC2UJSiruiPZeyL3khjcCoeeYJ9I21+do/Bmluaq7W8OZzG17aBt0tGjTQCOgPoCx7g/zQhSc\ +EoyQ51odG6vj+l1MwN06Md7r1RXZOyIyIWt9vReq75lzG8Hk5vTcXlxQJRtb/FCX2uuDa5PEbf3K\ +ugebXXD1vNPJuq4WOmavn1Y28v8x2f9p6HRWm247s6bdnZm+02nPv81wbdk= +exemd5=dc58d86aa2b9119b96114552c4260aac + diff --git a/fvtr/speccpu2006/at10.0-sniff32.cfg b/fvtr/speccpu2006/at10.0-sniff32.cfg new file mode 100644 index 000000000..a5f3c9dd0 --- /dev/null +++ b/fvtr/speccpu2006/at10.0-sniff32.cfg @@ -0,0 +1,531 @@ +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# +# Build with toolchain groups toolchain +# + +tune = base +ext = at-sniff_32 +output_format = asc,cfg +teeout = 1 +log_line_width = 156 +iterations = 1 +reportable = 0 +check_md5 = 0 +runlist = all +action = validate +backup_config = 0 + +makeflags = %{MAKEFLAGS} + +default=default=default=default: +CC = %{CC} +CXX = %{CXX} +FC = %{FC} + +OPTIMIZE = -m32 -O3 -fpeel-loops -funroll-loops -ffast-math -fvect-cost-model -mrecip=rsqrt +LDOPT = -m32 -Wl,-q -Wl,-rpath=%{BASE_DIR}/lib + +# This is needed to avoid doing checksum verification of the source files against +# the SPEC MANIFEST file. The source files contain some changes needed to run with LE +# but until those changes are accepted by SPEC the MANIFEST file will not match. +strict_rundir_verify=0 + +########################################## +# Integer options +########################################## +400.perlbench=default=default=default: +CPORTABILITY = -DSPEC_CPU_LINUX_PPC -std=gnu89 +EXTRA_CFLAGS = -fno-strict-aliasing + +462.libquantum=default=default=default: +CPORTABILITY = -DSPEC_CPU_LINUX + +464.h264ref=default=default=default: +CPORTABILITY = -fsigned-char +EXTRA_CFLAGS = -fno-aggressive-loop-optimizations + +483.xalancbmk=default=default=default: +CXXPORTABILITY = -DSPEC_CPU_LINUX + +########################################## +# Floating point options +########################################## +416.gamess=default=default=default: +EXTRA_FFLAGS = -fno-aggressive-loop-optimizations -funconstrained-commons + +433.milc=default=default=default: +EXTRA_CFLAGS = -fno-strict-aliasing + +447.dealII=default=default=default: +CXXPORTABILITY = -include cstddef + +450.soplex=default=default=default: +CXXPORTABILITY = -std=gnu++98 + +454.calculix=default=default=default: +EXTRA_LDFLAGS = -Wl,--wrap,atan2 %{LIB32_ATAN2} + +481.wrf=default=default=default: +CPORTABILITY = -DSPEC_CPU_CASE_FLAG + +482.sphinx3=default=default=default: +CPORTABILITY = -fsigned-char + +__MD5__ +456.hmmer=base=at40_32=default: +# Last updated Mon Feb 28 09:23:34 2011 +optmd5=96acd1100ce9aba0a37239194cf61ca0 +baggage= +compile_options=\ +@eNrNUlFPwjAQft+vaPpsmYqJycJIYCBOB1sCxMSXZZROq11b2g7jv/fGJKLy4Js0Tfrd9e56X7+b\ +KUmq4pWVXDCktONK2sCzznDqclPLNTf5lhlevof4AntROs0C5EOgX7irzrm/4tJ/ohQR2GpfoKMQ\ +Gc2zcZRH2RLgbDQeLicIIVJ1LxFJuwCorkOt3pi5RqTUjAkilNIWjFoaJb5MZxjbGURwyQoDrrKw\ +Drp2z4C3jDpCVeNQayagslaaSrcGZBjlOjR2Yxz6uXpW1YayvhcFKIpC/JsT3l2lw7s0W4T4G0Hs\ +wS8At5tkMJnD3W+y2EsDBInxNH4cQ8S/EcdeEs/uj2p2GnL01OoFkmy/mQ9RfXrb1h7EGdmg9jQa\ +XggPaAi+OpCkESsZHdfxZKSAHqeDxW2exMNmbESF27bbCfsT5X3Gssk4GMgPAw00kg== +exemd5=b1e177e23750ad40303d0dfdb62094fd + +401.bzip2=base=at-sniff_32=default: +# Last updated Tue Nov 29 15:08:49 2011 +optmd5=17e70c3b698503c4fe8420b884739f41 +baggage= +compile_options=\ +@eNrFUt9PwjAQft9fcemzZSoxJgsjkYEEBbYEiYkvhHWdVsuutB3G/94DQkDhwSdpmvS7H9/lvruO\ +seKL+YcslZaAxiusXBQ4b5XwM1tXhbKzlbSq/IrZFQuSdJRFEFJiOPc3jcswV1X4KgRwurgr0EDg\ +3UnWS2ZJNiU47vY60z4A8EXzGnjaJCBMHRv8lPYWeGmk1FwjGkdGXVnUe7OcO08t+jfCKyk8F7h2\ +YCE1lTFoROULQlYKZWLrltbD79NyWFsh20ESQZLE7FgA24TSzkOaPcXshxoWkGQScj+8608odqyM\ +BWkERByMBi89yvgflSwYDsaPJ7dxhkG3MH8nkmvvXdsmnvUFX8L2tYbKxwcNa5UfTHq9g2H39HrO\ +M+FNQ9sv8ScxO8Z0zTj4Qd+ofxLp +exemd5=1d7701c331465961df3513e1ca854f61 + +403.gcc=base=at-sniff_32=default: +# Last updated Tue Nov 29 15:09:32 2011 +optmd5=cdf8d36c05fecc06efc674b640302b7a +baggage= +compile_options=\ +@eNrFUtFOwjAUfd9XNH22m0qMycJI2JgwHdsSICa+LFA6rXZr6TqMf+8dk4jCg0/SNOnp7b235/Q0\ +kRUpl2+s4IIhqQyXVe1atdGcmlw31ZrrfMs0Lz48fIWtIJ1mLnIg0VmaG/vSWfHKeaYUEZhy38CW\ +iIxmWRjkQbYAmIxCfzFGJLIRImXvGpG0B4CqxlPynelbRArFmCBCSlXDpqm0FN/bYlkbYGleAG8Z\ +NYTKNiDXTEAbJRWtzBqQZpQrT9cbbdDv0a9loykbWIGLgsDDxxrw7ij179Ns7uEfgrAFqkHLXTwc\ +z+DsWNwuww+TYJLvkyIbW6mLoFs0jZ5CiPyPdGzFUfJw0qUzvH5frl6hqB4AJqL8inY8HsUF2aBu\ +1Qpu8A44C746cKD1Jh6dtu08jwyEpsP5JI8jv3VblLjj2P2eP+nbVyzaioPP9gmaoB55 +exemd5=31078118461d985d85c2d8ac8b21b5ef + +429.mcf=base=at-sniff_32=default: +# Last updated Tue Nov 29 15:09:34 2011 +optmd5=df32e0d595e1e08ff4458998ad1f72b4 +baggage= +compile_options=\ +@eNrFUl1PwjAUfd+vaPpsQSXGZGEkUBCmY1tkhMSXBUrRareWrsP4771jogg8+CTNkp72fuycexqq\ +nGTzN74SkiOlrVB54TqFNYLZ1JT5Uph0w41YfXj4Cjs0GscuakJic25vGpfNhcibz4whAp/aNWgo\ +RPqTeEBTGk8Bhv1BbzpEgGbdMEknSZ+m8WOURIhkrWtEohYApktPq3dubhFZac4lkUrpAg5lbpT8\ +Oa7mhQXO9gXwhjNLmKou1JJLaKOVZrldAjKcCe2ZYm0sOlztQpWG8Y5DXUSph48V4W0o6t1HceLh\ +X/KwAzMAZXdBdziB2LHUbUZvENJRSr+zDrRjJ3IRNPfH/tMA4v8zCewEfvhw0sIzmNFWi1coKjqA\ +icy+bmseM3lB1qjejYY/eHucpVjsGVJZFfRPu3ieIQOhcTcZpYHfq7yXGa451o/pT/p2FdOqYu/t\ +fQI/VyfK +exemd5=28948c2872009c98ae64f089f70c6cfb + +445.gobmk=base=at-sniff_32=default: +# Last updated Tue Nov 29 15:09:46 2011 +optmd5=88aa60266694c243d97b828e365ee162 +baggage= +compile_options=\ +@eNrFUlFPwjAQft+vaPpsmUqMCXEkMAabwrYE0MSXBbpOq91aug7jv/fGBFF40BdZuva79q6977sL\ +ZUHyxSvLuGBIKsNlUXas0mhOTaKrIuU6WTPNs3cHX2DLjSZxB9ngaC/MVevcXvLCfqIUERhye0FL\ +IjKYxp6buPEcYDjw+vMRAL937yVuFA6DUeIjErTqv5lsXlBRpaw2dhiRvH2JSNQGQFXlKPnG9DUi\ +mWJMECGlKsGoCi3Fl5ktSgOczDPgNaOGUFlvyJQJuEZJRQuTAtKMcuXocqUN+vndlLLSlHUtt4Nc\ +18GHjPHmKOrfRvHMwd/oYws0AubDcW80hbNDKTYefS90/WTn9EdtsBV1ELwdTIJHD+L/RyhsjYPw\ +7mgHnKBWN3L5AkFlFzAR+eduk8eDOCMr1KxawQvOXs6CL/fqVVdyPDhe5NOIDAlNejM/GQf9ujdE\ +jpscm177Fb9txLyO2GvNDwNuOPc= +exemd5=f100ae46acc999676112fd33f190235e + +456.hmmer=base=at-sniff_32=default: +# Last updated Tue Nov 29 15:09:51 2011 +optmd5=1692facce914895c9562dcba365de0a3 +baggage= +compile_options=\ +@eNrFUtFOwjAUfd9XNH22TCXGZGEkMBCngy0BYuLLAqXTardbug7j33vnJE7hwSdpmvS2vac95547\ +g4Llq1eRSSUIaCuhKD2ntEZym5qq2EiT7oSR2btPL6gTxNPEIy4muit71Tl317JwnzgnDCfsH+gA\ +YaN5Mg7SIFliOBuNh8sJIYTl3UvC4i4GXFe+hjdhrgnLtBCKKQBd4qYqDKjvbbYqLVK0zxjvBLeM\ +Q30AG6HwGQ2aF3aDkRFcat+UW2PJ79EroTJc9J3AI0Hg00MB9PMqHt7FycKnP9RQByWjkJtoMJnj\ +3aEy6sQeQWA4DR/HmPE/KqkThbP7o26coNA9WL8gqOzXNqv867Th8aDO2JY0q9H4g9/irOS6Veza\ +hmh03KHTFBkJTQeL2zQKh7X7KqcNx6ZR/qRvj1jWiFZffQCIDRjQ +exemd5=dfb6d3642f65c3c273d666241f8850af + +458.sjeng=base=at-sniff_32=default: +# Last updated Tue Nov 29 15:09:55 2011 +optmd5=17e70c3b698503c4fe8420b884739f41 +baggage= +compile_options=\ +@eNrFUt9PwjAQft9fcemzZSoxJgsjkYEEBbYEiYkvhHWdVsuutB3G/94DQkDhwSdpmvS7H9/lvruO\ +seKL+YcslZaAxiusXBQ4b5XwM1tXhbKzlbSq/IrZFQuSdJRFEFJiOPc3jcswV1X4KgRwurgr0EDg\ +3UnWS2ZJNiU47vY60z4A8EXzGnjaJCBMHRv8lPYWeGmk1FwjGkdGXVnUe7OcO08t+jfCKyk8F7h2\ +YCE1lTFoROULQlYKZWLrltbD79NyWFsh20ESQZLE7FgA24TSzkOaPcXshxoWkGQScj+8608odqyM\ +BWkERByMBi89yvgflSwYDsaPJ7dxhkG3MH8nkmvvXdsmnvUFX8L2tYbKxwcNa5UfTHq9g2H39HrO\ +M+FNQ9sv8ScxO8Z0zTj4Qd+ofxLp +exemd5=ef048df3e654886a6066caa4284ba181 + +462.libquantum=base=at-sniff_32=default: +# Last updated Tue Nov 29 15:09:58 2011 +optmd5=fa687ee888edf69dd90c08a40b34335e +baggage= +compile_options=\ +@eNrNUt9PgzAQfuevaPpsh7oYEzKWDDYnygZxEH+8kK0rihbalTLjf+8xJMNME58Wmya9u95dv6/f\ +zUVB8uUbSzPOkJA6E0VpGaVWGdWJqop1ppItU1n6YeMzbLjBLLSQCYnmUl/0Ts1VVpjPlCICW7QN\ +egKR8SKcuIkbxmDOxxMnniKESN4/RyTog0FlZUvxztQlIqlkjBMuhCzBqQol+N5Nl6UGiPoF7C2j\ +mlBRB8SacWgjhaSFXoOlGM2krcqN0qhdexSJ783jhzY+KEWlKBsaroVc18aHhPDuKnBugjCy8Td2\ +2IAvgJZX/mi6gLtDptgILASF3sx7mkDGcVh/4QruopHj+V702MXW8McGHLc/CnhMbX6RZSBWr9Ck\ +HNYpPG813OG65ydkg5pTSXjR7nDg2aqjT62cP/5Z1H+rC2CejaJrcJ16pniOGxrN+P3pC9qKuK7o\ +TOsnrh41rg== +exemd5=7153a9bf2542990a83195976cb14cab3 + +464.h264ref=base=at-sniff_32=default: +# Last updated Tue Nov 29 15:10:38 2011 +optmd5=b17e07ca44bc8b5d9a0f1b3955b6a306 +baggage= +compile_options=\ +@eNrNkl1PwjAUhu/3K5peW6YSY7IwEjYQp4MtAjF6s4yug2q3lq7D+O89AxcxcOEVsWnS056Pnifv\ +mcqSFOk7y7lgSCrDZVk5VmU0pybRdZlxnWyZ5vmni6+w5UeT2EE2BNqpuelc2kte2itKEYEt2wId\ +ichwFo/8xI8XYE6HI28xRgiRonuNSNQFg6raVfKD6VtEcsWYIEJKVcGlLrUUP9c8rQy0aNZgbxk1\ +hMrmQWZMQBklFS1NBpZmlCtXVxttULtIXvFVyTJC16luH3uVrDVlfct3kO+7+JgG71yR9xDFcxf/\ +QsMW8APVXTgYz8B3jImtyEGQGEyC1xFEnAf5u6/oaT7wgjCYv8DPh/DYCoPp40npzqnKKUF6cvkG\ +Fap+4xdFK92uqWdxQTZof2oF37kHAIIvD5RpNAuHp+X8n4pAw5PB/D4JA68ZJVHgPcN+6v7E32Ys\ +moyDIf0CfXA1xg== +exemd5=4c280491762b9837b02753d1e1c77a25 + +471.omnetpp=base=at-sniff_32=default: +# Last updated Tue Nov 29 15:11:07 2011 +optmd5=48dc5f78c4639ad9e817780b8d2a671f +baggage= +compile_options=\ +@eNrFUlFPwjAQft+vaPqKZSoxJosjkTFxCtsSJBJfFug6rZa2tB3Ef+8BEjCQ6JM0aXrX3l3v+75L\ +lSSzyQeruGBIaceVtIFnneHUFaaWJTfFghlefYb4AntRNsgD5EOgP3FXzXN/yqX/2mggQhFR2wJN\ +hUh3mMdREeUjMNNu3Bn1EEmasNVMMldwSUVdMvAFn1qfyQU3CJFZ6xKRrAUG1XWo1ZKZa0QqzZgg\ +QiltwamlUWLnVhPrAIJ7A3vBqCNUrS5UyQSU0UpT6UqwDKNch8bOjUO7dWNVbShre1GAovE4xIfY\ +8Pdb1nnI8qcQ/4CKPeADUN71b3tDeDuEvY7oxGl0X2yDfuEBe1mA4KtkkLzEEP4/pGCvn6SPR8U9\ +hS5q+g5Jtr272jTxLM7IHG1Oo6F8uNcwcLinzUq3fve4pKdheN3QZoj+BGabMVpl7M3cF/g6LE0= +exemd5=3980e39af7e182194b2593ea77848222 + +473.astar=base=at-sniff_32=default: +# Last updated Tue Nov 29 15:11:09 2011 +optmd5=9afa05b11ed1e05b4c98108764a8f31b +baggage= +compile_options=\ +@eNrFUl1PwjAUfd+vaPqKZSoxJosjYR/iFLYlSCS+LFA6rZa1tB3Ef+8FJMzAg0/Sl96Pc2/uueem\ +siKL6ScruWBIKstlZTzHWM2pLXRdzbkuVkzz8svHV9gJs2HuIReA7tTetC/dGa/ct1YLEYqI3Ddo\ +S0SiUR6HRZiPwUyjOBj3G7EiSPpFnEZJL0WILDrXiGQdMKiqfSXXTN8iUirGBBFSKgNOXWkpDm45\ +NRbmtu9grxi1hMpNQM6ZgDZKKlrZOViaUa58bZbaosO7M7LWlHWd0EPhZOLjY0L4J5cFj1n+7ONf\ +/LADSwAa94NefwS5Y65bRBCn4UNxBGqQx07mIeifDJPXGDD/swnsDJL06aSM5xBDzj6gyHQPod0Q\ +L+KCLNHu1wra+42BBZ81BNmINYhO63ieDW8H2l3On8jsK8abisahfQMHtSIr +exemd5=e264f4a52b6271b0675bb09dcbfcbc31 + +483.xalancbmk=base=at-sniff_32=default: +# Last updated Tue Nov 29 15:12:07 2011 +optmd5=1c6f9b88d8feb83af7a6561e02148980 +baggage= +compile_options=\ +@eNrtVN1vmzAQf+evsHjtCNu6aVJUKjnAUjrAiI+O7cUijtOxEUxtyNr/fkcoCV3zsJdVe5gl5N99\ ++Djf/c6hqI1t8YNvyooj0bSlqNVcU60sWUtlV69LSXdclpsHS3+jazYJojkywdEs2vez1+aqrM3b\ +szNkMGSIMcBMIMNJItemdpQBDB13kS0RIBxFNCQ0vYpd7CSgyLGPQ+qFgRvQIFlSn2DHjZHhzeC7\ +55JxxY7IXIvtU8kst001UanifiJ1bVmZgbr1RbHmUpleHfCtkA+/u6SyqBUTgw8T9a53KKqiZmZZ\ +s6pbc0g1isk1zQM/wnHSp3hQZKnnj+JgTEYxwfk7eyK8HbFDghHeYN9zcEr2pyAczRKXhjj1blya\ +xjhMbLIvycH2WC03SfDSHQu2PYfY5BwAazqrET+5/ICMTcN5ZVRCNAqErpaiOoqbQrXQ/PYb4B1n\ +rcFEr4AyQEW3jWhY3a4BSc7KxpLqTraoX8feUt8Ls3yvRBdKdFDSS82eIzvPLf05S/RHG1lckyi1\ +9Cek0TVgFsT86ONlArbnBNp7LNzQvqIQ5OD3n1N/h1O6RuYI+uQF3lcXCv0yDBtokOcRiVO88Hwv\ +/TIlw8A4XYPt08mH6CUn4fQgoAux+g5B1CU6rCGpz9Ur4w4Nu2zgd9bkAlW5mkxDPym+c3qI/uG2\ +7LMeZvuPbjyeyPoTk6fgF++XERM= +exemd5=60ba0d87f2afa294c3132c0a494bca0e + +999.specrand=base=at-sniff_32=default: +# Last updated Tue Nov 29 15:12:09 2011 +optmd5=17e70c3b698503c4fe8420b884739f41 +baggage= +compile_options=\ +@eNrFUt9PwjAQft9fcemzZSoxJgsjkYEEBbYEiYkvhHWdVsuutB3G/94DQkDhwSdpmvS7H9/lvruO\ +seKL+YcslZaAxiusXBQ4b5XwM1tXhbKzlbSq/IrZFQuSdJRFEFJiOPc3jcswV1X4KgRwurgr0EDg\ +3UnWS2ZJNiU47vY60z4A8EXzGnjaJCBMHRv8lPYWeGmk1FwjGkdGXVnUe7OcO08t+jfCKyk8F7h2\ +YCE1lTFoROULQlYKZWLrltbD79NyWFsh20ESQZLE7FgA24TSzkOaPcXshxoWkGQScj+8608odqyM\ +BWkERByMBi89yvgflSwYDsaPJ7dxhkG3MH8nkmvvXdsmnvUFX8L2tYbKxwcNa5UfTHq9g2H39HrO\ +M+FNQ9sv8ScxO8Z0zTj4Qd+ofxLp +exemd5=df04a7d44c97ec6124df54bf59dc30d2 + +410.bwaves=base=at-sniff_32=default: +# Last updated Tue Nov 29 15:12:12 2011 +optmd5=d5f5d1cc23a18bffa646274929bb9f41 +baggage= +compile_options=\ +@eNrFUt9PwjAQft9f0fTZMpUYk4WRyAYEBbYEiIkvZOs6rZZeaTuM/70HhIAPGJ+wL71f3+W7724K\ +mq2KD1FLJQgYL0G7KHDeSu6XttGVtMuNsLL+iukNDZJskkckxMKw8Het67CUOnytwXpbaMI4YXDo\ +0gLCVu1bwrI2Gtw0sYFPYe8Jq40QiikA49BptAV1dOvCeWTk39DeCO4Zh20AKqGwjQHDta/QsoJL\ +E1u3tp50HDSWi26QRGSQxPQMP7rLZ73HLJ/H9AdZGuBYSb4YjB+GM8yls7yfLDFAWDpN+73FkAZZ\ +RBA4moxe+lhxmdFoMB5Nn84rfjGJj68D5TuCXPcY2pN4VldsTfa/Ndg+PmGtZHki93YR4/SXRf2P\ +1jtW++P400QHxGKLOLmlb0gbFD4= +exemd5=5c7c709552bc539a29956ea1454b87ee + +416.gamess=base=at-sniff_32=default: +# Last updated Tue Nov 29 15:16:37 2011 +optmd5=50d04ebb7e8b86d28eb91f9891b8999d +baggage= +compile_options=\ +@eNrFUl1PwjAUfd+vaPpsh0qMkTASGAOmY1sEYuLLMkqn1W4tXcGPX++dICwxGJ6wLz29vbf3nNMb\ +yoLk6SvLuGBIKsNlUbas0mhOTaJXxYLrZM00zz4cfIGtQRy3UKkYVQoh0p/Enpu48SwJo2QUBYF3\ +709HtTjAsO/1ZkOEULuUK01ZBxG5w3amFP9kCzu7ebfg5Z4XuqMEmgyC7nDi4AMdcJULwV9Zu37Y\ +cqMxJDVAUiM1V/Z5Y86LxlMmtdFpgQitaGz12hKRvHmJSNQEQNXKUfKN6WtEMsWYIEJKVcJhVWgp\ +9scsLQ14Z54Brxk1hMoqIBdMwDNKKlqYBSDNKFeOLpfa7IRbbgsNXAcf4Ie/76PebRRPQV+d7DHa\ +oxaCQn/sP3qQcRpp2Ar88O6w4yezeL/acv4CRWUHMBH5Nrrh8SDOyBJtdq2gg1MjLvi85nj1F0H/\ +j7/6H7uB1bg7HSWB36vmQOR4Q3QzMkeJ/KmYVRW1CfsCp4VLBg== +exemd5=a41b682eed1391d4efac1214159cfd0f + +433.milc=base=at-sniff_32=default: +# Last updated Tue Nov 29 15:16:41 2011 +optmd5=54c7b94e030ca0c0722b93fdfb297ffb +baggage= +compile_options=\ +@eNrFUltPgzAUfudXNH22m7oYk0VMWGEX3YAMpsYXwrqi1Y7W0mn89x6Y6Ix7MD4oaei595zvfKEq\ +yTp/5IWQHClthSqrvlNZI5jNzKZcCZM9cyOKVxcfYYdGs7iPuhDYze1J57C7FGX3jjFE4Ki2QEch\ +4idxQDMaL0AM/WCwGCEy6YAyDOufl6Rw0SgczT0/S2dxdhXQNJonYPWTqZeMG+N0El4mCJF17xiR\ +qAcC0xtXqxduThEpNOeSSKV0BcqmNEp+qkVeWRjN3oP8zJklTNUGteISymilWWlXIBnOhHZN9WQs\ ++vhIUSqyRYHkUuSVKO/eXWeV2hjGzx3aR5S6+DsYuHFFg4soTl38BRnsAHwAynDqjRLwfUepiRgE\ +IR1nbdAvYcNO1EfQwmQ2uQ2gzN9g2Lwa3KRzL6PtAHvAxE7d414q/f220ZlaPkBSdV6vXq5bEjR9\ +XMsD8oS2t9HwgrvTsxTLne3We5/6+ynxP7uAhmZeOgZCDOpFyDXe9rhl5o/mazMWdcYOkd8AzxJQ\ +Jg== +exemd5=92da2d77ac4de8abb5708bb877630c03 + +434.zeusmp=base=at-sniff_32=default: +# Last updated Tue Nov 29 15:17:03 2011 +optmd5=607f0258511d06dd6d38f4a28228c8d2 +baggage= +compile_options=\ +@eNrFUl1PwjAUfd+vaPpsN5UY48JIZHwEBbYEiYkvZHSdVsduaTsUf713oLAHMTxhX3rubc/JObcd\ +Q8EWyZvIZC4IKCuhML5jrJbcznRZpFLPVkLLbB3QC+r04tgnRgmuFCGEdSZxN5yF8RThuNNtT/vY\ +bRooNRctwmCH3Uwp+SlSN7v5cFACKb3hbX8S0F80qBNGI7zkoR8vsVfuuTeXhfecgbY6KQjjlfS3\ +WRcIWzQuCYsaCLgqAwXvQl8TlikhcpYDKINFWWjI92WWGIvB7QvileCWcagakIocZRQoXtgUkRZc\ +qkCbpba7ME7ok14Y0AP+6OY8at9F8QPmq5ulR2SPfILEwWjw1MUbp4lGneFgfH944icb8X41Yf6K\ +JNPat7YmHvMztiTbXSuUD2quczmvjbt6iGHnj4f6n1lvXG0/x1GJfhjTilH7S18yLjIG +exemd5=fb3098f57d4a493c7efedf20c27e4cae + +435.gromacs=base=at-sniff_32=default: +# Last updated Tue Nov 29 15:17:20 2011 +optmd5=1aeeb3f36f82ab01d63daa894a563191 +baggage= +compile_options=\ +@eNrFVN9PwjAQft9f0ezZDpUY48JIoAyYwrYE0cSXBUqn1bKWrvjrr/fGEBcFY3yAvezudnf7vn53\ +DWWG55MnlnLBkFSGyyx3rdxoTk2il9mM6+SZaZ6+efaJbXXj2EW5YlQphBDujGKfJCQegxl2/Pa4\ +B9FGLpeasibCcmM7qVL8nc2c9OLVghZQ0h20eiPP3tLDtkg0hKQa4KlNzJlzXJvyrHafSm30JEOY\ +Fq3XYB2J8Lx+inBUB4OqpafkC9PnCKeKMYGFlCoHZ5lpKb7cdJIbIG4ewH5m1GAqi4CcMQFtlFQ0\ +MzOwNKNceTpfaLMhYxEXdYln78Bnr75H7csovgZ+VbD2H7hHLoLCYBjc+ZCxH2q7TpzSn4e9TXMc\ +OOD1Wzd+QqKwG/SS/t5U+f5UVSJbVKJ0JRD5t0CQ0fZD0k/IZ9ZP9oeScRCEV7sX5wCaNOT0EYry\ +ZnFdiPk6WuK4FUd4gcq3VvAHrwJc8GlFl0KxQeeXlTvQ1rho2LruJ4OgXcyBmNsl0HKw/kTys2Jc\ +VFTm8AO/uMLU +exemd5=3abcb1ca0fb2ea24a2f6c25e3c5d5066 + +437.leslie3d=base=at-sniff_32=default: +# Last updated Tue Nov 29 15:18:18 2011 +optmd5=d5f5d1cc23a18bffa646274929bb9f41 +baggage= +compile_options=\ +@eNrFUt9PwjAQft9f0fTZMpUYk4WRyAYEBbYEiIkvZOs6rZZeaTuM/70HhIAPGJ+wL71f3+W7724K\ +mq2KD1FLJQgYL0G7KHDeSu6XttGVtMuNsLL+iukNDZJskkckxMKw8Het67CUOnytwXpbaMI4YXDo\ +0gLCVu1bwrI2Gtw0sYFPYe8Jq40QiikA49BptAV1dOvCeWTk39DeCO4Zh20AKqGwjQHDta/QsoJL\ +E1u3tp50HDSWi26QRGSQxPQMP7rLZ73HLJ/H9AdZGuBYSb4YjB+GM8yls7yfLDFAWDpN+73FkAZZ\ +RBA4moxe+lhxmdFoMB5Nn84rfjGJj68D5TuCXPcY2pN4VldsTfa/Ndg+PmGtZHki93YR4/SXRf2P\ +1jtW++P400QHxGKLOLmlb0gbFD4= +exemd5=15881c7b15d6910b2a5732b414ee2ae7 + +444.namd=base=at-sniff_32=default: +# Last updated Tue Nov 29 15:18:49 2011 +optmd5=3067c4ecea961ee6d362b26e36b0c865 +baggage= +compile_options=\ +@eNrFUk1PAjEQve+vmPSKZVViTDYuiSxIUGA3QSLxQqB0tVp2StvF+O+dFQkYOHiSXjpfb/LezAyx\ +4MvZu8yVloDGKyxcFDhvlfBTWxYLZadraVX+GbMLFiTpIIsgpMJw5q/q5+FcFeFLrQZcAMdtgzoC\ +b4+yTjJNsjGZw3anNe4CAF82LoGnDTKEKWODH9JeA8+NlJprROPIKQuLeufmM+eJon8ley2F5wKr\ +AC6kpjYGjSj8giwrhTKxdSvrYfduHJZWyGaQRJBMJjE75M5+cmnrPs0eY/ZLCgtIL6m46992R5Q7\ +lMWCNAIC9ga95w5V/I9EFvR7w4ejqzjFlHH+RiDX3IU2JJ70GV/B5reG2sd7hLWa70262kK/fXxB\ +p5nwN6HNSfxJzBYxrhB7F/QFQM4Rhg== +exemd5=b27589f484b9461fc867a00c7f33bb51 + +447.dealII=base=at-sniff_32=default: +# Last updated Tue Nov 29 15:20:06 2011 +optmd5=fc1b053d661554951da1e4ebe6ae1b6c +baggage= +compile_options=\ +@eNrNUk1v2zAMvftXEL62StoGw4CgLhB/LNXmxkbtYGkvRiLLmzbFUiS5xf796GRZ0zWHoYeivIii\ +qEfy8c1US9bLn7wRkoPSTqjWjj3rjGCuMl1bC1M9cCOaX4F/7ntRdpOPYYiJw6X7MDgbrkQ7/HZy\ +AoQBUXuAgQISF3kSVVE+R3cWJ+F8CkCoaJnsao6xMMuKsoppMQnTpCqvb5NJXGC85ktZUVrVYs1b\ +i2jBCMh6dAEk6x2mu0CrR24+Amk055JIpbTFS9caJZ+uzdI6nMx9R/+BM0eY6gOq5hJhtNKsdTV6\ +hjOhA2M3xkFvZN8is66uebMNwqVVnWH8yovGEC0Wgf+SAv/PWxZ+zvIy8J8x4ntIG5LxKZ1MC3x7\ +yc42I0xm0XWFIPu81xHme9kYsAl6Q+8TRHkb+nYzLhZ5dltOQprS8g5r/0On76V09uWohN5yzce3\ +DJdq9QNB7BX8tV1TX+Up2cDuNBrLBQcDSLE6WHUvgzQ+rpB3vJZt1zvh/tfE+x/z/seBzn8DFBRd\ +wA== +exemd5=b3db4dcedc025cf92b96c81041d92b54 + +450.soplex=base=at-sniff_32=default: +# Last updated Tue Nov 29 15:20:15 2011 +optmd5=3067c4ecea961ee6d362b26e36b0c865 +baggage= +compile_options=\ +@eNrFUk1PAjEQve+vmPSKZVViTDYuiSxIUGA3QSLxQqB0tVp2StvF+O+dFQkYOHiSXjpfb/LezAyx\ +4MvZu8yVloDGKyxcFDhvlfBTWxYLZadraVX+GbMLFiTpIIsgpMJw5q/q5+FcFeFLrQZcAMdtgzoC\ +b4+yTjJNsjGZw3anNe4CAF82LoGnDTKEKWODH9JeA8+NlJprROPIKQuLeufmM+eJon8ley2F5wKr\ +AC6kpjYGjSj8giwrhTKxdSvrYfduHJZWyGaQRJBMJjE75M5+cmnrPs0eY/ZLCgtIL6m46992R5Q7\ +lMWCNAIC9ga95w5V/I9EFvR7w4ejqzjFlHH+RiDX3IU2JJ70GV/B5reG2sd7hLWa70262kK/fXxB\ +p5nwN6HNSfxJzBYxrhB7F/QFQM4Rhg== +exemd5=41d57b8cf9d59915a1dbda20e757c535 + +453.povray=base=at-sniff_32=default: +# Last updated Tue Nov 29 15:20:30 2011 +optmd5=3067c4ecea961ee6d362b26e36b0c865 +baggage= +compile_options=\ +@eNrFUk1PAjEQve+vmPSKZVViTDYuiSxIUGA3QSLxQqB0tVp2StvF+O+dFQkYOHiSXjpfb/LezAyx\ +4MvZu8yVloDGKyxcFDhvlfBTWxYLZadraVX+GbMLFiTpIIsgpMJw5q/q5+FcFeFLrQZcAMdtgzoC\ +b4+yTjJNsjGZw3anNe4CAF82LoGnDTKEKWODH9JeA8+NlJprROPIKQuLeufmM+eJon8ley2F5wKr\ +AC6kpjYGjSj8giwrhTKxdSvrYfduHJZWyGaQRJBMJjE75M5+cmnrPs0eY/ZLCgtIL6m46992R5Q7\ +lMWCNAIC9ga95w5V/I9EFvR7w4ejqzjFlHH+RiDX3IU2JJ70GV/B5reG2sd7hLWa70262kK/fXxB\ +p5nwN6HNSfxJzBYxrhB7F/QFQM4Rhg== +exemd5=46cbdd4e9d3f834ada9830d79d08a101 + +454.calculix=base=at-sniff_32=default: +# Last updated Tue Nov 29 15:20:59 2011 +optmd5=f839d9c3e428854761b1c4117c750d37 +baggage= +compile_options=\ +@eNrdk99P2zAQx9/zV1h+xg20mtCqBalNUwhLm4i2YtpLlLoO9ebYxnH4sb+eSyAQsXZCe+ik+el8\ +Pn99d5/zXElSZD9ZzgVDSluuZDl0Sms4tamp5Iab9I4Znj96+AQ70yQZolIzqjVCiEwWSeCnfrIC\ +cz4Jxqtz8H4pVWUoO0NEvdq9XGv+i216+ecHByTgyjQanS88vEMDO348gyAX8nEz+6l37K65dG9y\ +ZazJJCK0ln5JtqcQCRdJHEfBApFi0EckHoBBdeVpdc/MKSK5ZkwQoZQuYVNJo8TbNs9KCy2wW7Dv\ +GLWEqtqhNkyAjFaaSrsByzDKtWfKW2Nfy3L8IZr6Ht6TKW7O4/FlnCyh0m7a+ANdgIhxMPcv0jao\ +rRM78RCBZjgLvwfgP0zV+7BQ+juRHYPxRulgmN6vLjZ/BzZKG2L+/0MsCudf93+kQ4Mg1+KIkHuT\ +6aPMZrKP3K0qmKvtNqtumHQFX7vNQVrHaGbSQR+mCcCp9Q94qjyrRUTRyjXZ15q3L9pGQ15ep1xQ\ +7CCs4UaTP3zXfwMJXg2+La9GaTRp5+avGtUM72y0vEijcFyriAI/l/w8zR9qV3tjVd/oDP8Ts5jy\ +Kg== +exemd5=f0cfcd1527c1d8d637899881673e5f3a + +459.GemsFDTD=base=at-sniff_32=default: +# Last updated Tue Nov 29 15:23:27 2011 +optmd5=607f0258511d06dd6d38f4a28228c8d2 +baggage= +compile_options=\ +@eNrFUl1PwjAUfd+vaPpsN5UY48JIZHwEBbYEiYkvZHSdVsduaTsUf713oLAHMTxhX3rubc/JObcd\ +Q8EWyZvIZC4IKCuhML5jrJbcznRZpFLPVkLLbB3QC+r04tgnRgmuFCGEdSZxN5yF8RThuNNtT/vY\ +bRooNRctwmCH3Uwp+SlSN7v5cFACKb3hbX8S0F80qBNGI7zkoR8vsVfuuTeXhfecgbY6KQjjlfS3\ +WRcIWzQuCYsaCLgqAwXvQl8TlikhcpYDKINFWWjI92WWGIvB7QvileCWcagakIocZRQoXtgUkRZc\ +qkCbpba7ME7ok14Y0AP+6OY8at9F8QPmq5ulR2SPfILEwWjw1MUbp4lGneFgfH944icb8X41Yf6K\ +JNPat7YmHvMztiTbXSuUD2quczmvjbt6iGHnj4f6n1lvXG0/x1GJfhjTilH7S18yLjIG +exemd5=f136da5004f38eb36cc6459464eda6ba + +465.tonto=base=at-sniff_32=default: +# Last updated Tue Nov 29 15:28:24 2011 +optmd5=953b5ad4ded5b33935b3bbbdfa4cccfd +baggage= +compile_options=\ +@eNrFklFv0zAQx9/zKU55xikwIUS1TGoTtwRaO2paIe3FSl1nM7ix57gb8Om5tNtaCQ3tYRp5yf9s\ +3/l3/zOzLdnWP1SjjQLrgrZtN4y64LUMwu/ajfbiVnnd/Erjd3E0KcshdE5J5wDIHZB8VVFRLqgY\ +sVyUvFqKjLO8WBacVfe7dLHgCzEfsdGUzilbAtmC0UH52iRu20fBtsHudV6VNBNZuULJcjpeTQHg\ +vLM7L9UFEPuok8Y5/VttkubTzwiZxpRlnwXiTWajaZXGL84W97cg2EP9v0njKONzPDRAGwd1+JC8\ +Hax1O7hqrA++boHIvoF7jxOLxc/eA+FnKKTbpc7eKf8RSOOUMsRY6zoMdq235hg2dRdwXuEa9a2S\ +gUjbL9iNMljGWSfbsEHlldQu9d2ND4+WRdkQJlkaP8EX7/f5+Asvl9jfKexzeudDwMRiXlxSPPE6\ +rcXRrGBfn3b81Sw+fud2/R2Tuovj0gHim3lDbuDw9w7LpyfURq9P7O4HMcv/Maj/4/We6vA4ntXR\ +Q8aqzzh5S38A7D9pmQ== +exemd5=d92f13c6ccaac1be070830fd40c441d5 + +470.lbm=base=at-sniff_32=default: +# Last updated Tue Nov 29 15:28:26 2011 +optmd5=1692facce914895c9562dcba365de0a3 +baggage= +compile_options=\ +@eNrFUtFOwjAUfd9XNH22TCXGZGEkMBCngy0BYuLLAqXTardbug7j33vnJE7hwSdpmvS2vac95547\ +g4Llq1eRSSUIaCuhKD2ntEZym5qq2EiT7oSR2btPL6gTxNPEIy4muit71Tl317JwnzgnDCfsH+gA\ +YaN5Mg7SIFliOBuNh8sJIYTl3UvC4i4GXFe+hjdhrgnLtBCKKQBd4qYqDKjvbbYqLVK0zxjvBLeM\ +Q30AG6HwGQ2aF3aDkRFcat+UW2PJ79EroTJc9J3AI0Hg00MB9PMqHt7FycKnP9RQByWjkJtoMJnj\ +3aEy6sQeQWA4DR/HmPE/KqkThbP7o26coNA9WL8gqOzXNqv867Th8aDO2JY0q9H4g9/irOS6Veza\ +hmh03KHTFBkJTQeL2zQKh7X7KqcNx6ZR/qRvj1jWiFZffQCIDRjQ +exemd5=7cf5988e3dc5d8416529a008dd7e44bd + +482.sphinx3=base=at-sniff_32=default: +# Last updated Tue Nov 29 15:35:20 2011 +optmd5=1d54f3e22e3f7ad68e0b8eea019c4f1a +baggage= +compile_options=\ +@eNrNUl1PwjAUfd+vaPpsQSXGhDgSNgZUx0YENPqyQOmgWtbSdRj/vXfgIgQe9IW4NNnt/ew550Yq\ +I6vpO0+F5EhpK1SWN53cGsFsYopsLkyy4Uakny6+wo4fD4ZNVIfE+tTe1C7rM5HVF4whAkdVDWoK\ +kc5oGPiJP5yAGXUCb9JDhNYO/f32U5D4cdSlvaS/C1MpZoUVEiFEVo1rROIGGEwXrlYf3NwikmrO\ +JZFK6RwuRWaU/Lmm09wCHrsEe8OZJUyVDjXnEtpopVlm52AZzoR2Tb42FlUfSXOxyPicsOXUVM67\ +XBWG8ZbjN5Hvu/gYOt6GYu8+Ho5dfMADdoAsgNoN270RxI452WZ4QeT3kyrpLyRhJ24imEsH9DWA\ +2vMw9g0rfhy3PRrS8QtM3ucOOyGNHk6uyTlFPaXnnZq9QYe8VcblqlJ++6hneUHWaPc3Gsa5ewCA\ +8T1hS8nDzult+J+KwIMH7XE/CalXLplc4R2G3dL+Cn9VMSkr9nb8C03pUzU= +exemd5=cc2192504717ea45141a72cab1507f1a + +998.specrand=base=at-sniff_32=default: +# Last updated Tue Nov 29 15:35:21 2011 +optmd5=17e70c3b698503c4fe8420b884739f41 +baggage= +compile_options=\ +@eNrFUt9PwjAQft9fcemzZSoxJgsjkYEEBbYEiYkvhHWdVsuutB3G/94DQkDhwSdpmvS7H9/lvruO\ +seKL+YcslZaAxiusXBQ4b5XwM1tXhbKzlbSq/IrZFQuSdJRFEFJiOPc3jcswV1X4KgRwurgr0EDg\ +3UnWS2ZJNiU47vY60z4A8EXzGnjaJCBMHRv8lPYWeGmk1FwjGkdGXVnUe7OcO08t+jfCKyk8F7h2\ +YCE1lTFoROULQlYKZWLrltbD79NyWFsh20ESQZLE7FgA24TSzkOaPcXshxoWkGQScj+8608odqyM\ +BWkERByMBi89yvgflSwYDsaPJ7dxhkG3MH8nkmvvXdsmnvUFX8L2tYbKxwcNa5UfTHq9g2H39HrO\ +M+FNQ9sv8ScxO8Z0zTj4Qd+ofxLp +exemd5=df04a7d44c97ec6124df54bf59dc30d2 + +400.perlbench=base=at-sniff_32=default: +# Last updated Mon Jan 30 11:13:45 2012 +optmd5=725f0f62d5b90842b733f05d5b859394 +baggage= +compile_options=\ +@eNrNUtFOwjAUfd9XNH22ohJjQpzJVqZOB1twRPRlGaVotaylKxj/3jtgMAMPPhGXJrtt770995zT\ +VwWZ5Z98KiRHSluhirLjlNYIZjOzKCbCZEtuxPTbxefYoXEv6aAWJLZye3l61hqLovXGGCKwVN3g\ +VCHSfUoCmtFkCGG/G/jDOwiSYBBlNB4ECJFZ+wKRuA0B0wtXqy9urhCZas4lkUrpEjaLwii5207z\ +0gJa+w7xkjNLmKoO1IRLaKOVZoWdQGQ4E9o15dxYVH87QFkU9oejLEkotCkUWQ9LcinyUhRvm/zr\ +Ui0M4zcO7SBKXbw/M15dxf5DnKQu/kUAdoAleOo28u6e4G6fjFWGH/TpfbZN2rKDnbiDoGvYC18D\ +uDkOVRvQ8SD1/DAK05cm8B1pK3DBKB14Ga2hH6ARO1DxeNArx9T+oOwbhdX4AxqVN1WanNU+WWF7\ +lidkjtZ/o+FVtzGHFOOG1pULou5hg/xrGQF3z0vv4civNJQzvB5lbec/0VBXDKuKhvt/APrLWYw= +exemd5=4a03ceb76d7e448fc6c436f3db90e34f + +436.cactusADM=base=at-sniff_32=default: +# Last updated Mon Jan 30 11:21:58 2012 +optmd5=647b43ecdc4cde6d22ddc89e8daf42c4 +baggage= +compile_options=\ +@eNrFVNtOg0AQfecrNjy74CXGSIqJXahF20JSGxNfSLssurpl12Xx9vUOvUm0NY0PLS/MDDPDOXN2\ +diALPB0/s5wLhqQyXBalZ5VGc2pSXRUZ1+kr0zz/8O0j2+okiYdKxahSCCEcDJOQpCQZgTkIwvbo\ +CqKtUlaasguE5cp2cqX4J8uc/PzdghZQ0uldXg19e00P2yJxH5JcwOOOzalz6E544T7kUhs9LhCm\ +desFWEciPD05Rjg+AYOqylfyjekzhHPFmMBCSlWCUxVaim83H5cGiJtHsF8ZNZjKOiAzJqCNkooW\ +JgNLM8qVr8sXbVZkLOKhDvHtDfjs2fe4fR0nt8CvCdbegnvsISiM+tF9CBm7obZp4pT+HvY6zXHE\ +CyqqjIHlOO7KCQiJg3BnAv18moKRNYJROtOK/FsryGiHA9JNyTLrz0HsS9xeNLjZvE57kKclJ09Q\ +VF7Ul4iYLqJzHHfiAL+g+Vsr+IPfAC74pCFRLV4v+GMR97RLHupf3nbTXtSuj4SY2nOg8zO2Fcll\ +xaiuaBzJLzy2y0Y= +exemd5=3176ac18ebe0b93f2fc115be73baf8dd + +481.wrf=base=at-sniff_32=default: +# Last updated Mon Jan 30 11:37:20 2012 +optmd5=6f06d433319ee38018073ac60b15f733 +baggage= +compile_options=\ +@eNrdU99vmzAQfuevsHgekLSbtkSjEjEm8wYYBaJ2e7ESYzY2il1D2m5//Ux+NFRNpjxlUv3i+85n\ +++777mJRW7eLX7woKw6EbEtRN2OjaVXJWqpWdV4qes9VWfx2zaFpBEkyBo3kTEoArAdg3YKqbLla\ +VLa8BRa2geXjOMOk26/JzE/xN+S+1Wj2DIXPUIwy6AfaQBGFZIbcYeeMtmCgASRelKR7jG6SPQhG\ +A5pmXux7IYnROjoO8JRO5gENUex+GI4utDfybqhPIg/HKQ3ci/UfhMZehEKcZjSZ6cS1L00QpDCZ\ +d8c+msynPR+FXopoEHpTAMDHRqwU41fAEk+2XUhZ/uG5XYweDU3VBMXwE9WsdXdS13yFlJldnZqb\ +XYUvCdxGkFnmTXCIs6/9qD2lpgFJpCMd3YbOon1nD5xlWTvfC6FataiBxTqmtz1qiw112HZq3rK8\ +cMqaVauca34vderkUhtMrlwpHrh6D6xCcl5ZlRCy0WBVK1HtYbFoWj0G7Q9t33PWWkx0DpHzSj8j\ +hWR1m2tLcVZKVzV3qn2S3IBjEEDXPJK2uT4nk88kyXTd/RpOZG7bQ9ugg0WbBhkD/QGOuv4wz0TB\ +McEYe6nVobE6rN/ZBNytI+O9Xn2R4QGRGVvrC1+pvifObYjjL8fn9uyCatnE8qe+1FztXZskrqs3\ +1h3Y7Erq591e1lW57KnX6Rr6/5jr/zRyXVabXjupot2NeXej15p/AfH1bN0= +exemd5=acf49daa7435f4755ee4283dabd2a74c diff --git a/fvtr/speccpu2006/at10.0-sniff64.cfg b/fvtr/speccpu2006/at10.0-sniff64.cfg new file mode 100644 index 000000000..d0e541c94 --- /dev/null +++ b/fvtr/speccpu2006/at10.0-sniff64.cfg @@ -0,0 +1,555 @@ +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +tune = base +ext = at-sniff_64 +output_format = asc,cfg +teeout = 1 +log_line_width = 156 +iterations = 1 +reportable = 0 +check_md5 = 0 +runlist = all +action = validate +backup_config = 0 + +makeflags = %{MAKEFLAGS} + +default=default=default=default: +CC = %{CC} +CXX = %{CXX} +FC = %{FC} + +%if '%{ENDIANNESS}' eq 'little' +SPEC_CPU_FLAG = -DSPEC_CPU_LINUX_PPC64LE +%else +SPEC_PPC64LE_FLAG = +%endif + +OPTIMIZE = -m64 -O3 -fpeel-loops -funroll-loops -ffast-math -fvect-cost-model -mrecip=rsqrt +LDOPT = -m64 -Wl,-q -Wl,-rpath=%{BASE_DIR}/lib64 + +# This is needed to avoid doing checksum verification of the source files against +# the SPEC MANIFEST file. The source files contain some changes needed to run with LE +# but until those changes are accepted by SPEC the MANIFEST file will not match. +strict_rundir_verify=0 + +########################################## +# Integer options +########################################## +400.perlbench=default=default=default: +PORTABILITY = -DSPEC_CPU_LP64 +CPORTABILITY = -DSPEC_CPU_LINUX_PPC ${SPEC_CPU_FLAG} -std=gnu89 +EXTRA_CFLAGS = -fno-strict-aliasing + +403.gcc=default=default=default: +PORTABILITY = -DSPEC_CPU_LP64 + +462.libquantum=default=default=default: +CPORTABILITY = -DSPEC_CPU_LINUX + +464.h264ref=default=default=default: +CPORTABILITY = -DSPEC_CPU_LP64 -fsigned-char +EXTRA_CFLAGS = -fno-aggressive-loop-optimizations + +471.omnetpp=default=default=default: +CPORTABILITY = -DSPEC_CPU_LINUX + +473.astar=default=default=default: +CPORTABILITY = -DSPEC_CPU_LINUX + +483.xalancbmk=default=default=default: +PORTABILITY = -DSPEC_CPU_LP64 +CXXPORTABILITY = -DSPEC_CPU_LINUX + + +########################################## +# Floating point options +########################################## +416.gamess=default=default=default: +EXTRA_FFLAGS = -fno-aggressive-loop-optimizations -funconstrained-commons + +433.milc=default=default=default: +EXTRA_CFLAGS = -fno-strict-aliasing + +436.cactusADM=default=default=default: +PORTABILITY = -DSPEC_CPU_LP64 + +447.dealII=default=default=default: +PORTABILITY = -DSPEC_CPU_LP64 +CXXPORTABILITY = -DSPEC_CPU_LINUX -include cstddef + +450.soplex=default=default=default: +CXXPORTABILITY = -std=gnu++98 + +454.calculix=default=default=default: +EXTRA_LDFLAGS = -Wl,--wrap,atan2 %{LIB64_ATAN2} + +465.tonto=default=default=default: +CPORTABILITY = -DSPEC_CPU_LINUX + +481.wrf=default=default=default: +CPORTABILITY = -DSPEC_CPU_CASE_FLAG ${SPEC_CPU_FLAG} + +482.sphinx3=default=default=default: +CPORTABILITY = -DSPEC_CPU_LINUX -fsigned-char + +__MD5__ +464.h264ref=base=at40_64=default: +# Last updated Tue Mar 1 09:59:16 2011 +optmd5=7b52a077c60a2f224be5dfa365b9dddc +baggage= +compile_options=\ +@eNrNUk1PwzAMvfdXRLlnBTGBVK2T1g9GoVsq1h3gUnVZugXapkrSIfj1uMA+0HbgABJRDrb8bL9n\ +eyprUuXPvBAlR7IxQtbasbRRgplMtfVSqGzDlSheXXyOLZ9OEgfZALRz0++d2QtR2yvGEIEvtwV6\ +EpFgloR+5idzMKdB6M3HCCFSXfYRoRdgsKZ1G/nC1RUiRcN5SUopGw1OWytZ7t0i1wYomjXYRnFO\ +NpwZqcQbR9u3b5bFSdeh0GJV8yVh61xtQQMtW8X40PId5PsuPhaBP0LUu6VJ6uJvirAFsqH+dTwa\ +zyB2rA5b1EGQGE2ixxAQv6r0qz29T0deFEfpwyGFE5qxFUfTu5OL+oMd/GT8A7l4ghw97PBltdvc\ +bsLd7OPg9Fr+1WSB52SU3mRx5HWXUFb4kzqdd0dzcDHvUDUJ+Q== +exemd5=90e85f8764f6c821a3d9a982dfa045f3 + +401.bzip2=base=at-sniff_64=default: +# Last updated Tue Nov 29 15:35:55 2011 +optmd5=bc2c19ffc5b70d7231469c542ae37eeb +baggage= +compile_options=\ +@eNrFUk1PAjEQve+vmPRsWY1fyYYlkQUJCuwmSEy8EChdrZad0nYx/ntmIQgKB0/SNOmbjzeZN9MB\ +Fnw++ZC50hLQeIWFiwLnrRJ+bMtipux4Ka3Kv2J2wYIk7WcRhJQYTvx17TycqiJ8FQI4XdwWqCHw\ +1jBrJ+MkGxEctNrNUQcA+PzmCnh6SUCYMjb4Ke0t8NxIqblGNI6MsrCod2Y+cZ5a9G+El1J4LrBy\ +4ExqKmPQiMLPCFkplImtW1gPv0/dYWmFbARJBEkSs0MBbB1Kmw9p9hSzH2pYQJJJyH3vrjOk2KEy\ +FqQRELHb7760KeN/VLKg1x08Ht3GCQZdx+k7kVxj59o08azP+AI2rzVUPt5rWKtplfM962oLvdbx\ +BZ1mxuuGNp/ij3K2nFHF2ftFK+yXE9s= +exemd5=0e29458854e5b2375ff42b30709a9ab3 + +403.gcc=base=at-sniff_64=default: +# Last updated Tue Nov 29 15:36:33 2011 +optmd5=bacfe000897612bd4bbd42baa23a8b7a +baggage= +compile_options=\ +@eNrNUl1PwjAUfd+vaPpsh8avZGEkbEyYjm2REaMvC5ROp2UtXYfx33s3nGDAxCdi06S37enpuffc\ +UBRkOXtjWc4ZElLnoigto9QqpzpVVbHIVbpmKs8+bHyGDTcaxxbqALAz05fmaWeeF51nShGBKVoC\ +UyAymMSem7rxFMJw4DnTISK+iRBZXl0gEp1DQGVlS/HO1DUimWSMEy6ELGFTFUrw7TablRpU6heI\ +14xqQkV9IBaMA40UkhZ6AZFiNJe2KldKo6+x1ZEGMfzcjm4pKkVZz3At5Lo23k8JN1eRcxvFiY1/\ +5IcNKAJQ3gT94QTu9nNtEI4XuqO0BfkmNiILAZs/9p88ODlOJRopcXSf9B0/8JPHXb1NTbAR+OHd\ +QVeP6NYvRnXF/BU4yl4N4cvW1UbWAz8hK7RZlYQP7Z0UeD6vMd+e1W4Gg8NG/1NbQPG4n4zSwHfq\ +BuJLvEli05B/LEH7Zlq/2engTxzdOZs= +exemd5=ebebdf6b7d52cf74e63e5a984c610fb6 + +429.mcf=base=at-sniff_64=default: +# Last updated Tue Nov 29 15:36:35 2011 +optmd5=8ba680ea929ddb1acdc4e572b1377b4c +baggage= +compile_options=\ +@eNrFUl1PwjAUfd+vaPpsmcavhDASViagY1tkhMSXBUqn1bKWrsP4770DQUQefJJmSU97P3bOPY1U\ +QRbTN54LyZHSVqiibDqlNYLZzFTFXJhsxY3IPzx8gR0aD5MmciHRndrrxrk7E4X7zBgi8Kltg4ZC\ +pDtKAprRZAww6gb+uIcATTpRmo3SLs2SxziNEVncXCESXwJguvK0eufmFpFccy6JVEqXcKgKo+T3\ +MZ+WFjjbF8Arzixhqr5Qcy6hjVaaFXYOyHAmtGfKpbHocLVKVRnG2w5tIko9/FsRXodi/z5OUg//\ +kIcdmAEouws7vRHEfktdZ/hBRPsZ3WUdaMdO3ETQfDAcPAUQ/59JYCccRA9HLTyBGS01e4Wisg2Y\ +yMXX7YbHRJ6RJdrsRsMfvD3OUszqnJ0ltVlh97iPpxkzEBp20n4WDvzafbnAG46b5/RHhduacV2z\ +9/4+AdfLKLw= +exemd5=7a442766b711b653ca2e0e8167e72958 + +445.gobmk=base=at-sniff_64=default: +# Last updated Tue Nov 29 15:36:48 2011 +optmd5=acaf9c9e7aba68817a53846c334347c5 +baggage= +compile_options=\ +@eNrFUt9PwjAQft9f0fTZMo2/EsJIoAw2hY0E0MSXBbqi1W4tXafxv/fGBFF40BdZuva79q6977uL\ +VE6y+QtfCsmR0laovGg6hTWC2cSUeSpM8sqNWL57+Aw7NB6Nm8gFR3duLxun7kLk7iNjiMBQmwsa\ +CpHeZOzThI5nAKOe350NAASdOz+hcdQPB0mASNio/npyRc5kmfLK2GJEsqsLROJzAEyXnlZv3Fwj\ +stScSyKV0gUYZW6U/DKX88ICJ/sE+JUzS5iqNlTKJVyjlWa5TQEZzoT2TLEyFv38WoUqDeNthzYR\ +pR7eZ4zXR3H3Jh5PPfyNPnZAI2DeH3YGEzjbl2Lt0fUjGiRbpz9qg524ieDtcBQ++BD/P0JhZxhG\ +twc74Ai1aqnFMwQVbcBEZp+7dR738oSsUL0aDS94OzlLsah8thWrajnsHS7zcWSGhEadaZAMw27V\ +HTLDdY51t/2S4SZmVsXstOcH4TE56Q== +exemd5=d1527e67b783d9f35f5e59b27587b7cd + +456.hmmer=base=at-sniff_64=default: +# Last updated Tue Nov 29 15:36:53 2011 +optmd5=9c6dc08b547e10de00f8a341297840b6 +baggage= +compile_options=\ +@eNrFUt9PwjAQft9f0fTZMo2/koWRwECcDrYEiIkvC5ROq92udB2G/96bE0XhwSdpmvSuvbt+3303\ +hoLl81eRSSUIaCuhKD2ntEZym5qqWEqTroWR2canZ9QJ4lHiERcD3bm9bJ26C1m4T5wThhu2BVpA\ +WH+SDII0SGZojvuD3mxICGH51QVh8TkaXFe+hjdhrgnLtBCKKQBdolMVBtS3m81LixDtM9prwS3j\ +UF/AUigso0Hzwi7RMoJL7ZtyZSz5vdolVIaLjhN4JAh8uk+AfjzFvbs4mfr0BxvqIGUkchN1hxN8\ +22dGndgjmBiOwscBRvwPS+pE4fj+oBpHaHQbFi+YVHZqmVX+edvgeFAnbEWa02j8wd/BrOSijvlq\ +dy1E1D+s0XHajIBG3eltGoW9Wn+V0wZjMyp/ZLjNmdU5O7P1DuPlGcI= +exemd5=5780ad1962bbd1d3ed21e609b4077663 + +458.sjeng=base=at-sniff_64=default: +# Last updated Tue Nov 29 15:36:58 2011 +optmd5=bc2c19ffc5b70d7231469c542ae37eeb +baggage= +compile_options=\ +@eNrFUk1PAjEQve+vmPRsWY1fyYYlkQUJCuwmSEy8EChdrZad0nYx/ntmIQgKB0/SNOmbjzeZN9MB\ +Fnw++ZC50hLQeIWFiwLnrRJ+bMtipux4Ka3Kv2J2wYIk7WcRhJQYTvx17TycqiJ8FQI4XdwWqCHw\ +1jBrJ+MkGxEctNrNUQcA+PzmCnh6SUCYMjb4Ke0t8NxIqblGNI6MsrCod2Y+cZ5a9G+El1J4LrBy\ +4ExqKmPQiMLPCFkplImtW1gPv0/dYWmFbARJBEkSs0MBbB1Kmw9p9hSzH2pYQJJJyH3vrjOk2KEy\ +FqQRELHb7760KeN/VLKg1x08Ht3GCQZdx+k7kVxj59o08azP+AI2rzVUPt5rWKtplfM962oLvdbx\ +BZ1mxuuGNp/ij3K2nFHF2ftFK+yXE9s= +exemd5=e5716bba009e00d012dab52b0347dbd3 + +462.libquantum=base=at-sniff_64=default: +# Last updated Tue Nov 29 15:37:00 2011 +optmd5=b56bf6abb3fca6c3609a3fac0f9d130a +baggage= +compile_options=\ +@eNrNUm1PgzAQ/s6vaPrZDo1vCRlLBpsTZYM4iC9fyNYVRQvtSpnx33sMcTObiZ8Wmya9u95dn6fP\ +TURB8tkbSzPOkJA6E0VpGaVWGdWJqopFppIVU1n6YeMTbLjBOLSQCYnmTJ93js15VpjPlCICW7QN\ +OgKRwTQcuokbxmBOBkMnHiGESH5xhkhwCgaVlS3FO1OXiKSSMU64ELIEpyqU4Bs3nZUaIOoXsFeM\ +akJFHRALxqGNFJIWegGWYjSTtiqXSqN2bVAkvjeJH9p4txSVoqxnuBZyXRvvEsLrq8C5CcLIxj/Y\ +YQO+AFpe+f3RFO52mWIjsBAUemPvaQgZh2H9hSu4i/qO53vR4za2hj824LjdK+AhtflFlq6Yv0KT\ +slen8LzVcI3rnh+RJWpOJeFFe4sDz+Z1zrdCtXb+YL+s/1YZwDzuR9fgOvVU8Rw3NJoB/OMntDVx\ +XbM1sZ9+yjag +exemd5=072a69779bd9f3fea83ecba9c082fa8e + +464.h264ref=base=at-sniff_64=default: +# Last updated Tue Nov 29 15:37:40 2011 +optmd5=adcfa1a3e022edb18a206f0122626ab5 +baggage= +compile_options=\ +@eNrVUl1PwjAUfd+vaPpsmcavhDASNhCngy0yYvRlGV0H1W6tXcH4770DJxh44InEZklv13Nvz7nn\ +jmVJivSd5VwwJJXhsqzaVmU0pybRyzLjOlkxzfMvB19gywtHURvZALRTc906t2e8tOeUIgKfbAq0\ +JCL9STTwEi+aQjjuD9zpECFEipsrRMJLCKhaOkp+Mn2LSK4YE0RIqSo4LEstxfaYp5UBimYB8YpR\ +Q6isf8iMCSijpKKlySDSjHLl6OpDG9SsLYskiOqn84rPS5YRukh1A+pUcqkp61peG3meg/fV4fVV\ +6D6EUezgP1KxBf2A+ndBbziBu33Z2ArbCBL9kf86AMRpWvDDK3yKe64f+PHLLrcDzcBW4I8fD1p7\ +SteOMawjZ29QserWeFE0Vq9JPosz8oE2u1bwvLMjSPBZjfn1rnY16B82/H94BgJGvfg+CXy3Hj5R\ +4I2mzZwe2ZEmZ1rn7Az2N7X1SFg= +exemd5=5274a5cb2886c28c9ae848b8aa5fb5e8 + +471.omnetpp=base=at-sniff_64=default: +# Last updated Tue Nov 29 15:38:07 2011 +optmd5=fd7d9d2db5111ea11fabaa5c194a358b +baggage= +compile_options=\ +@eNrFUl1PwjAUfd+vaPqKZRq/EuJIZEycwrYEicSXBbpOq6UtbYfx33sHIhhI9EmaLL23PffunnOa\ +KElmkzdWcsGQ0o4raVuedYZTl5tKFtzkC2Z4+RHgE+yF6SBrIR+A/sSdN4/9KZf+c6OBCEVErRs0\ +FSLdYRaFeZiNIEy6UWfUQyRuwqdmkrmcSyqqgkEu+NT6TC64QYjMLs4QSU8hoLoKtHpn5hKRUjMm\ +iFBKW0gqaZTYpOXEOqDgXiBeMOoIVfWBKpiANlppKl0BkWGU68DYuXFos66sqgxlbS9soXA8DvAu\ +N/x1l3bu0uwhwD+oYg/0AJY3/eveEO52aS8RnSgJb/M16BcdsJe2EPwqHsRPEcD/RxTs9ePkfq+5\ +h/BFTV+hyLY3R6shHsURmaPVbjS0D7YGBg1rzLc7tXP97n5TD6PxcqDVM/ojnXXNqK7Zenefo7wt\ +Pw== +exemd5=7e9cf50dc7378057eec0501b3b5ee4ce + +473.astar=base=at-sniff_64=default: +# Last updated Tue Nov 29 15:38:10 2011 +optmd5=a457661feb168351c64b7dde5dbadfe3 +baggage= +compile_options=\ +@eNrFUktPwkAQvvdXbPaKSzW+ksaS0IdYhbYJEomXBpatri7dZbvF+O+dUpEaOHiSvew8vpnMN9/E\ +siDL2TvLuWBIKsNlUTpWaTSnJtNVseA6WzPN808Xn2HLT0apg2wA2jNz2T2157ywXzodRCgictug\ +KxEJxmnoZ346ATMOQm8yaMUyLxpkYRxE/Rghsry6QCQ5B4OqylXyg+lrRHLFmCBCSlWCUxVaip2b\ +z0oDc5tXsNeMGkJlHZALJqCNkooWZgGWZpQrV5crbdDu3ZSy0pT1LN9B/nTq4n1C+DuXePdJ+uji\ +X/ywBUsAGrfD/mAMuX2uG4QXxv5dtgdqkcdW4iDoH42i5xAw/7MJbA2j+OGgjMcQQ87foKjs7ULN\ +EE/ihKxQ82sF7d3WwILPa8yPJLVcw+CwksfZ8Wag5nb+SGdbM6lrWsf2BYppIx0= +exemd5=14cc939342534d36a5566010ad9ca795 + +483.xalancbmk=base=at-sniff_64=default: +# Last updated Tue Nov 29 15:39:10 2011 +optmd5=adb3409136b8059da83967fe4f9e0c75 +baggage= +compile_options=\ +@eNrtVNtunDAQfecrLF5Tll7SRlqFSF6gG1LAiEtK+2KxXm9KC5gY2CZ/3wHChjSplJdGqlRLiDnj\ +8dg+c8a+qLQy+8F3ecGRqNtcVM1SaVqZs5bKrtrmku65zHe3hvpGVUziBUukQ6Cete8Xr/VNXulX\ +R0dIY0gTU4KFQJoVBbZJzSAB07fsVbJGYOEgoD6h8XloYysCR4pd7FPH92yPetGaugRbdog0ZwHf\ +DZeMN+ze0reifIj0vKyLmavJbmaoa/NC95orV2RbLhvdqTxeCnn7e0gss6phYoxhotr3AVmRVUzP\ +K1Z0Ww5HDUJyQVPPDXAY9Uc8OJLYcSc4TkYTjHB6bM7A28m2iDeZl9h1LByTYRWko0lkUx/HzqVN\ +4xD7kUkGSg5zd2zZUYTX9kRY+eEYaeQdGKzujFr85PIEabua80IrhKgbAF0lRXEPd1nTQvHbb2Dv\ +OWs1JnoH0ACMlrWoWdVuwZKc5bUhm2vZIoRmpaVu0O86w46fpGgYp43ogOEzxVwiM00N9bFo1Ls5\ +srogQWyoDzSkKiA0yPnRxesI5h7raYhY2b55TiHJIe6/xP6OxFSFLBHUyfGcrzYQ/TKCG4ockDDG\ +K8d14i9zJQzyG3WSpn+M6SWpKvD79OTD9YKd87zGQadi8x1yNmfoMMYzfi5eaddo/Msadjdm9yny\ +TR9z6J++t1zr6bb7lws5XGt8Lp5JyrQm6dfM3pdfc5gsNQ== +exemd5=92809c6d5c1652bfac24078faddbb06a + +999.specrand=base=at-sniff_64=default: +# Last updated Tue Nov 29 15:39:12 2011 +optmd5=bc2c19ffc5b70d7231469c542ae37eeb +baggage= +compile_options=\ +@eNrFUk1PAjEQve+vmPRsWY1fyYYlkQUJCuwmSEy8EChdrZad0nYx/ntmIQgKB0/SNOmbjzeZN9MB\ +Fnw++ZC50hLQeIWFiwLnrRJ+bMtipux4Ka3Kv2J2wYIk7WcRhJQYTvx17TycqiJ8FQI4XdwWqCHw\ +1jBrJ+MkGxEctNrNUQcA+PzmCnh6SUCYMjb4Ke0t8NxIqblGNI6MsrCod2Y+cZ5a9G+El1J4LrBy\ +4ExqKmPQiMLPCFkplImtW1gPv0/dYWmFbARJBEkSs0MBbB1Kmw9p9hSzH2pYQJJJyH3vrjOk2KEy\ +FqQRELHb7760KeN/VLKg1x08Ht3GCQZdx+k7kVxj59o08azP+AI2rzVUPt5rWKtplfM962oLvdbx\ +BZ1mxuuGNp/ij3K2nFHF2ftFK+yXE9s= +exemd5=4f1b5a2578a54b9062e544b0e53bd2bc + +410.bwaves=base=at-sniff_64=default: +# Last updated Tue Nov 29 15:39:15 2011 +optmd5=e4a7fb0132bc7e4c8c2aa75027c45fc3 +baggage= +compile_options=\ +@eNrFUk1PAjEQve+vaHq2rMavZMOSyC4QFNhNkJh4IUvparV0StvF+O+dZYPgAeMJe+l8vcmbNzMB\ +zVbFuyilEgSMl6BdFDhvJfdzW+mltPONsLL8jOkFDZJsnEckxMKw8Net83AhdfhSgvW20IRxwmDX\ +pQWErW6uCMsu0eCmig18CHtLWGmEUEwBGIdOpS2ovVsWziMj/4r2RnDPONQBWAqFbQwYrv0SLSu4\ +NLF1a+tJ20FluegESUT6SUyP8KPbfNa9z/LHmP4gSwMcK8ln/dHdYIq5dJr3kjkGCEsnaa87G9Ag\ +iwgCh+Phcw8rTjMaDUbDycNxxU8m8f61YfGGINfZhxoST+qMrUnzW4Pt4wPWSi7qmm/B61WM0l9W\ +9T9qb1k15/HHmXaYWY05uKcvj4wVMA== +exemd5=d897ecc8bd4133298631631f854981fc + +416.gamess=base=at-sniff_64=default: +# Last updated Tue Nov 29 15:43:44 2011 +optmd5=1b89a300097b6147005af3b072f45575 +baggage= +compile_options=\ +@eNrFUl1PwjAUfd+vaPpsQeNXJIwExmDTsS0CMfFlGV2n1W4tXcGPX++dIJAYDE/Yl57e3tt7zukN\ +ZUmK9JXlXDAkleGyrFpWZTSnJtGLMuM6WTLN8w8bn2FrEMctVClGlUKI9Mex6yROPE3CKPGiIHDv\ +/Ym3EwcY9t3edIgQaldyoSnrICI3uJErxT9Z1shv3i14ueeGjpdAk0HQHY5tvKcDrnMh+Ctr0w9b\ +TjSCpCZIaqbmsnHanPGy+ZRLbXRaIkJrGmu9DYlIcXWBSHQOgKqFreQb09eI5IoxQYSUqoLDotRS\ +bI95WhnwzjwDXjJqCJV1QGZMwDNKKlqaDJBmlCtbV3NtNsItp4UGjo338MPf91HvNoonoG+X7CHa\ +oxaCQn/kP7qQcRxp2Ar88G6/40ezeLvacvYCRVUHMBHFOrri8SBOyBytdq2gg71DXPBZnbPxvP6N\ +oP/Hb/2P4cBq1J14SeD36kkQBV4RXQ3NgTJ/aqZ1zc6UfQHKSUv4 +exemd5=854fd878bda6d442721540b2be4e6341 + +433.milc=base=at-sniff_64=default: +# Last updated Tue Nov 29 15:43:50 2011 +optmd5=ddf55b1a2655acca563269de5d95a74e +baggage= +compile_options=\ +@eNrFUltPgzAUfudXNH22m8ZbsogJK7hNNyCDqfGFsK5otaO1dBr/vQcmOrM9GB+UNPTce853vlCV\ +ZJk/8UJIjpS2QpVVz6msEcxmZlUuhMleuBHFm4sPsEOjSdxDXQjs5va4s9+di7J7zxgicFRboKMQ\ +8ZM4oBmNZyCGftCfDRAZdUC5COufl6Rw0SgcTD0/Sydxdh3QNJomYPWTsZcMG+N4FF4lCJHlyREi\ +0SEITK9crV65OUWk0JxLIpXSFSir0ij5pRZ5ZWE0+wDyC2eWMFUb1IJLKKOVZqVdgGQ4E9o11bOx\ +6PMjRanIGgWSS5FXorz/cJ1VamUYP3doD1Hq4m0wcOOK+pdRnLr4GzLYAfgAlIuxN0jAt41SE9EP\ +QjrM2qBfwoadqIeghdFkdBdAmb/BsHk1uE2nXkbbAXaAiZ26x51U+vttozM1f4Sk6rxevVy2JGj6\ +uJF75Bmtb6PhBXejZynmdcznfuvNj/3dpPifbUBDEy8dAiX69SrkEq97XHPzhxO2ObM6Z4PM7wu8\ +URg= +exemd5=034e5bd6e33db671210f299d0b25fba5 + +434.zeusmp=base=at-sniff_64=default: +# Last updated Tue Nov 29 15:44:13 2011 +optmd5=98b9dcb28ba7925eac08108656d0cd7f +baggage= +compile_options=\ +@eNrFUl1PwjAUfd+vaPpsN41fcWEkMj6CAluCxMQXMrpOq6O3tB1+/HrvQIEHNTxhX3p6e8/JObcd\ +gWLz7EUUshQEtJOgbOhZZyR3U1OpXJrpUhhZvEf0hHrdNA2J1YJrTQhh7XHaiadxOkE4andakx5W\ +GxYqw0WTMNhgv9BafojcL67ePJRASndw3RtH9AcN6sXJEJsC9BNk7tw/DmZSBY8FGGcyRRivpb/M\ ++kDY/OKMsOQUAddVpOFVmEvCCi1EyUoAbfFQKQPl9lhk1mFw94R4KbhjHOoC5KJEGQ2aK5cjMoJL\ +HRm7MG4TxotD0o0j+os/urpPWjdJeof5ds3SPbInIUFif9h/6GDHYaJRb9Af3f4+8YONeLsaMHtG\ +km1uS2sT9+URW5D1bjTKRzuuSzmrezYDr59i0P7jqf5n2itX6++xZ6ZvzqTm7PynT/C/Mvg= +exemd5=a93dc364d53fc0e3f94d168643ab3c26 + +435.gromacs=base=at-sniff_64=default: +# Last updated Tue Nov 29 15:44:31 2011 +optmd5=56a59316ed0bdee07f67b711b467fa18 +baggage= +compile_options=\ +@eNrFVNtuwjAMfe9XRH1eyqbdtIoiQSjQDdpKwCbtpYKQbtlCk6WBXb5+LrehARPaA/Sltmu75+TY\ +CWWGx4NXlnLBkFSGyyx3rdxoTk2iJ9mI62TKNE8/PfvMthpx7KJcMaoUQgjXu7FPEhL3wQzrfq3f\ +hGg5lxNNWQVhubKdVCn+xUZOevNhQQsoabSrza5nb+lhWyTqQFIJ8JQG5tI5LQ15VnpKpTZ6kCFM\ +i9YLsI5EeHx1gXB0DgZVE0/Jd6avEU4VYwILKVUOziTTUvy46SA3QNw8gz1l1GAqi4AcMQFtlFQ0\ +MyOwNKNceTp/02ZFxiIuahDP3oHPnn2PardR3AN+62DtPbhHLoLCoBM8+pBxGGq7TpzSzcPepjkO\ +HPBa1Xs/IVHYCJpJ62Cq/H7WVSJbVKJ0JhD5t0CQUfND0krIMmuT/bFkbAfh3e7FOYImZTl8gaK8\ +UlwXYryIznE8iBP8huZvreAP3hpwwYdFzkqZQrN2/Y+lO9LeuKhT7bWSdlArJkGM7TnQ+WjtSXNZ\ +0y9q1mbxG+7iw9A= +exemd5=75791b129744f7db845018a537b9c432 + +437.leslie3d=base=at-sniff_64=default: +# Last updated Tue Nov 29 15:45:48 2011 +optmd5=e4a7fb0132bc7e4c8c2aa75027c45fc3 +baggage= +compile_options=\ +@eNrFUk1PAjEQve+vaHq2rMavZMOSyC4QFNhNkJh4IUvparV0StvF+O+dZYPgAeMJe+l8vcmbNzMB\ +zVbFuyilEgSMl6BdFDhvJfdzW+mltPONsLL8jOkFDZJsnEckxMKw8Net83AhdfhSgvW20IRxwmDX\ +pQWErW6uCMsu0eCmig18CHtLWGmEUEwBGIdOpS2ovVsWziMj/4r2RnDPONQBWAqFbQwYrv0SLSu4\ +NLF1a+tJ20FluegESUT6SUyP8KPbfNa9z/LHmP4gSwMcK8ln/dHdYIq5dJr3kjkGCEsnaa87G9Ag\ +iwgCh+Phcw8rTjMaDUbDycNxxU8m8f61YfGGINfZhxoST+qMrUnzW4Pt4wPWSi7qmm/B61WM0l9W\ +9T9qb1k15/HHmXaYWY05uKcvj4wVMA== +exemd5=83e0cc01fda1accc5b3969a31dc146cd + +444.namd=base=at-sniff_64=default: +# Last updated Tue Nov 29 15:46:19 2011 +optmd5=8585eb4e03cd63bf315367d5393b9139 +baggage= +compile_options=\ +@eNrFUk1PAjEQve+vmPSqZTV+JRuXRBYkKLCbIJF4IVC6Wi07pe1i/PfOiggGDp6kl87Xm7w3M30s\ ++HzyJnOlJaDxCgsXBc5bJfzYlsVM2fFSWpV/xOyUBUnayyIIqTCc+IvaSThVRfh8dARcAMd1gxoC\ +bw6yVjJOsiGZ/WarMWwDAJ9fngNPz8gQpowNvkt7BTw3UmquEY0jpyws6o2bT5wniv6F7KUUngus\ +AjiTmtoYNKLwM7KsFMrE1i2sh827dlhaIetBEkEyGsVslzv7zqWNuzR7iNkvKSwgvaTitnvTHlBu\ +VxYL0ggI2Ol1nlpU8T8SWdDt9O/3ruIQU8bpK4FcfRNakXjUx3wBq98aah9vEdZqWtX8zLraQ7e5\ +f0WHmfEXodVR/FHOGjOsMFtX9AmAKxJ4 +exemd5=8e283b97be728935040fc8b2a8d632c3 + +447.dealII=base=at-sniff_64=default: +# Last updated Tue Nov 29 15:47:34 2011 +optmd5=501482e974c20aaedf151d0d9a847090 +baggage= +compile_options=\ +@eNrdU01v1DAQvedXjHIt7oL4klZNpc0HrSHdRE1WBC7WruOAwRu7tlPEv2eSZdtFXSTUQw/MxePx\ +eGbe8/NS92S7/i46qQRo46Xu3Txw3krumR36Vlp2K6zsfkbhizBIiqtyDjNMnK3969Pns43sZ19O\ +ToBwIHpf4FQDSasyS1hSrtBdplm8ugAgVPZcDa3AWFwUVc1SWi3iPGP15XW2SCuMt2KtGKWslVvR\ +O6wWvQSyffMKSDE63AyR0T+EfQukM0IoorQ2DjdDb7W633Zr5xGZ/4r+reCecD0GdCsUljHa8N63\ +6FnBpYmsu7Ee0O7nZnk5dj3Y0+WqAbKHwJ1vW9HBZGdOD5aL8yCZQ9I0UfiQovD3WRG/L8o6Cv9g\ +LAyQVmzyLl9cVHj2kL0pI86WySXDIvu8xxEaBsUccAh6RT9nWOVp6J0QlMV1vYhpTutPhzAnsnck\ +NM1fc44+QBhg/MNRUT6hcB6pGzjTm2/YxJ3Dne2G/qiekRvYrdbgONEBQCU3Y86dfEZp5elx1f1X\ +Tz3h3H2ff2Rpf2c13jn4b78As9OMqg== +exemd5=87827d708bc3746ea5bbd6f8a5c88796 + +450.soplex=base=at-sniff_64=default: +# Last updated Tue Nov 29 15:47:43 2011 +optmd5=8585eb4e03cd63bf315367d5393b9139 +baggage= +compile_options=\ +@eNrFUk1PAjEQve+vmPSqZTV+JRuXRBYkKLCbIJF4IVC6Wi07pe1i/PfOiggGDp6kl87Xm7w3M30s\ ++HzyJnOlJaDxCgsXBc5bJfzYlsVM2fFSWpV/xOyUBUnayyIIqTCc+IvaSThVRfh8dARcAMd1gxoC\ +bw6yVjJOsiGZ/WarMWwDAJ9fngNPz8gQpowNvkt7BTw3UmquEY0jpyws6o2bT5wniv6F7KUUngus\ +AjiTmtoYNKLwM7KsFMrE1i2sh827dlhaIetBEkEyGsVslzv7zqWNuzR7iNkvKSwgvaTitnvTHlBu\ +VxYL0ggI2Ol1nlpU8T8SWdDt9O/3ruIQU8bpK4FcfRNakXjUx3wBq98aah9vEdZqWtX8zLraQ7e5\ +f0WHmfEXodVR/FHOGjOsMFtX9AmAKxJ4 +exemd5=a91aaf5b2c2cabc6ac993401948a6e5b + +453.povray=base=at-sniff_64=default: +# Last updated Tue Nov 29 15:47:57 2011 +optmd5=8585eb4e03cd63bf315367d5393b9139 +baggage= +compile_options=\ +@eNrFUk1PAjEQve+vmPSqZTV+JRuXRBYkKLCbIJF4IVC6Wi07pe1i/PfOiggGDp6kl87Xm7w3M30s\ ++HzyJnOlJaDxCgsXBc5bJfzYlsVM2fFSWpV/xOyUBUnayyIIqTCc+IvaSThVRfh8dARcAMd1gxoC\ +bw6yVjJOsiGZ/WarMWwDAJ9fngNPz8gQpowNvkt7BTw3UmquEY0jpyws6o2bT5wniv6F7KUUngus\ +AjiTmtoYNKLwM7KsFMrE1i2sh827dlhaIetBEkEyGsVslzv7zqWNuzR7iNkvKSwgvaTitnvTHlBu\ +VxYL0ggI2Ol1nlpU8T8SWdDt9O/3ruIQU8bpK4FcfRNakXjUx3wBq98aah9vEdZqWtX8zLraQ7e5\ +f0WHmfEXodVR/FHOGjOsMFtX9AmAKxJ4 +exemd5=a39fc1b7533100c7438b7a51e078676f + +454.calculix=base=at-sniff_64=default: +# Last updated Tue Nov 29 15:48:27 2011 +optmd5=8248bc0592f130154dc6d1d383d1bfeb +baggage= +compile_options=\ +@eNrdk1Fv0zAQx9/zKSw/z83YxhAVmdSm6RZIm4i2AvESpa6zGhzbc5wN+PQ7Z0tXQYsmHjppfjqf\ +z3/f3e88VZJUxQ9WcsGQ0pYrWfe92hpObW4aueImv2WGl78C/AZ74yzro1ozqjVCiIxmWRTmYbYA\ +czqKhotL8H6oVWMou0BEbexeqTX/zVa98v1PDyTgyjgZXM4CvEMDe2E6gSAf8vEL+7Z37C+59K9L\ +ZawpJCLUST8m21OIxLMsTZNohkh1foZIegoG1U2g1R0z7xApNWOCCKV0DZtGGiWetmVRW2iBXYN9\ +y6glVDmHWjEBMlppKu0KLMMo14Gpb4zdlOWFfTQOA7wnU9yep8OPaTaHSrfTxs/oAkQMo2l4lXdB\ +XZ3YS/sINONJ/C0C/2Gq3oeF0r+J7BiMJ0oHw/Tn2sYW7sBGaUssfD3Eknj6af9HOjQI8kUcEXJn\ +Cn1U2EKeIH+tKuZruy6aayZ9wZd+e5C7GM1Mfn4G0wTg1PI7PFVfOBFRdXJt9k7z5lHbaMgr2CoX\ +FF3MBqLDm4z+8WFfBhO8Gn2dfx7kyaibnP9qVTu+k8H8Kk/ioVMRFX4o+WGen9mw7s7C3dn6APen\ +dvMw +exemd5=fd6c1bdafb1b6210244920e4be972fd7 + +459.GemsFDTD=base=at-sniff_64=default: +# Last updated Tue Nov 29 15:52:45 2011 +optmd5=98b9dcb28ba7925eac08108656d0cd7f +baggage= +compile_options=\ +@eNrFUl1PwjAUfd+vaPpsN41fcWEkMj6CAluCxMQXMrpOq6O3tB1+/HrvQIEHNTxhX3p6e8/JObcd\ +gWLz7EUUshQEtJOgbOhZZyR3U1OpXJrpUhhZvEf0hHrdNA2J1YJrTQhh7XHaiadxOkE4andakx5W\ +GxYqw0WTMNhgv9BafojcL67ePJRASndw3RtH9AcN6sXJEJsC9BNk7tw/DmZSBY8FGGcyRRivpb/M\ ++kDY/OKMsOQUAddVpOFVmEvCCi1EyUoAbfFQKQPl9lhk1mFw94R4KbhjHOoC5KJEGQ2aK5cjMoJL\ +HRm7MG4TxotD0o0j+os/urpPWjdJeof5ds3SPbInIUFif9h/6GDHYaJRb9Af3f4+8YONeLsaMHtG\ +km1uS2sT9+URW5D1bjTKRzuuSzmrezYDr59i0P7jqf5n2itX6++xZ6ZvzqTm7PynT/C/Mvg= +exemd5=2e543438efb6600bc72ba3521cea1579 + +465.tonto=base=at-sniff_64=default: +# Last updated Tue Nov 29 15:57:10 2011 +optmd5=19ce47d7fa9752fa101624e35aa12a38 +baggage= +compile_options=\ +@eNrFUk2P0zAQvedXWDnjdBFfotqs1CZuCbR21LRC4mKlrgMGN+N13F3g1zNpd9tKq0V7QIsvfmPP\ +jN97Yw4t3dY/dGOsJuCCgbYbRl3wRgXpd+3GeHmjvWl+pfHLOJqU5ZB0TivnCKG3hOarislyweSI\ +57IU1VJmgufFshC8urtli4VYyPmIj6ZszviS0C2xJmhf28Rt+yhAG2CP86pkmczKFUKes/FqSgi5\ +7GDnlb4iFI44aZwzv/Umad7/jJDTmPHsg0R6k9loWqXxP+cW968gsfv+D5nGUSbmmDRAGwd1eJNc\ +DNamHXxtwAdft4SqXsCdxwlg87evCRWvECi3Sx3cav+O0MZpbakFcB0Gu9aDPYVN3QWcV/iG+Ear\ +QBX0B7DRFts4cKoNG0ReK+NS3137cLQsyoZkkqXxI/zi/b0YfxTlEvWdk32KdjEkWFjMiy8MM55H\ +WhzNCv7pccefzeLTuoT1dyzqrk5HBxKf7Qt6TQ67d9g+PWNtzbrPORrej2KW/2VU/8ftPavD93ii\ +pvuaVV9z9p/+AIk6aos= +exemd5=f3b82b5f65a204b8b814e7ae56eed7d3 + +470.lbm=base=at-sniff_64=default: +# Last updated Tue Nov 29 15:57:12 2011 +optmd5=9c6dc08b547e10de00f8a341297840b6 +baggage= +compile_options=\ +@eNrFUt9PwjAQft9f0fTZMo2/koWRwECcDrYEiIkvC5ROq92udB2G/96bE0XhwSdpmvSuvbt+3303\ +hoLl81eRSSUIaCuhKD2ntEZym5qqWEqTroWR2canZ9QJ4lHiERcD3bm9bJ26C1m4T5wThhu2BVpA\ +WH+SDII0SGZojvuD3mxICGH51QVh8TkaXFe+hjdhrgnLtBCKKQBdolMVBtS3m81LixDtM9prwS3j\ +UF/AUigso0Hzwi7RMoJL7ZtyZSz5vdolVIaLjhN4JAh8uk+AfjzFvbs4mfr0BxvqIGUkchN1hxN8\ +22dGndgjmBiOwscBRvwPS+pE4fj+oBpHaHQbFi+YVHZqmVX+edvgeFAnbEWa02j8wd/BrOSijvlq\ +dy1E1D+s0XHajIBG3eltGoW9Wn+V0wZjMyp/ZLjNmdU5O7P1DuPlGcI= +exemd5=6b3cb07e3f8757843bfc65edb6fc3b6d + +482.sphinx3=base=at-sniff_64=default: +# Last updated Tue Nov 29 16:05:12 2011 +optmd5=3f0b6cbb3595b9967a4e825fd32f87bd +baggage= +compile_options=\ +@eNrVU1tvgjAUfudXNH1edctuiRETQRQ2BTN1txeitWi3SrtSXPbvd9AxNfrgXkxGSDg9137f+Qhl\ +Shbjd5ZwwZBUhss0q1mZ0ZyaWOfplOt4yTRPvmx8gS036vVrqAqJ1bG5rpxXJzytzihFBF5ZNqhI\ +RFqDvufGbn8EZtjynFEHkaCy6/ebj17sRmE76MT+OhwIPskNFwghsri5QiS6BIOq3Fbyk+lbRBLF\ +mCBCSpXBIU+1FJtjMs4M4DFzsJeMGkJl4ZBTJqCNkoqmZgqWZpQrW2cf2qDy2Vwt7gbh6BlaZHyW\ +simh87Eus+qZzDVlDcutIde18T4XeBWKnLuoP7TxDjHYAvZgQLvb7Awgtk/SKsPxQtePy6S/sIat\ +qIZgbtALXj2oPQ2FP7Cih2HTCbrB8GUb2iEysQXO+4NCOuXaj9p4XU7eoGXWKArEohTL6pZP4ox8\ +oPVXK5hvbyGCnRQ5v8svZNFtHVbMP9kaIOg1hz4EnUKZYoHXoNZKP5KSsmZU1Gz9Gt+/G2fv +exemd5=b27b54408bebf3afe7ef62650bbec5f8 + +998.specrand=base=at-sniff_64=default: +# Last updated Tue Nov 29 16:05:14 2011 +optmd5=bc2c19ffc5b70d7231469c542ae37eeb +baggage= +compile_options=\ +@eNrFUk1PAjEQve+vmPRsWY1fyYYlkQUJCuwmSEy8EChdrZad0nYx/ntmIQgKB0/SNOmbjzeZN9MB\ +Fnw++ZC50hLQeIWFiwLnrRJ+bMtipux4Ka3Kv2J2wYIk7WcRhJQYTvx17TycqiJ8FQI4XdwWqCHw\ +1jBrJ+MkGxEctNrNUQcA+PzmCnh6SUCYMjb4Ke0t8NxIqblGNI6MsrCod2Y+cZ5a9G+El1J4LrBy\ +4ExqKmPQiMLPCFkplImtW1gPv0/dYWmFbARJBEkSs0MBbB1Kmw9p9hSzH2pYQJJJyH3vrjOk2KEy\ +FqQRELHb7760KeN/VLKg1x08Ht3GCQZdx+k7kVxj59o08azP+AI2rzVUPt5rWKtplfM962oLvdbx\ +BZ1mxuuGNp/ij3K2nFHF2ftFK+yXE9s= +exemd5=4f1b5a2578a54b9062e544b0e53bd2bc + +400.perlbench=base=at-sniff_64=default: +# Last updated Mon Jan 30 11:37:47 2012 +optmd5=42afc777690ead0248b7fe372d2b33f4 +baggage= +compile_options=\ +@eNrVU1tPwjAUft+vaPpsReMtIc6ElanTwRoc8fKyjFK0WtbaFYz/3rPBEAMmPJm4NNk5PZd+5+vX\ +vi7INH8TE6kE0sZJXZRtr3RWcpfZWTGWNpsLKyefPj7EHk16rI1akNjK3cn+QWski9Yz54jA0k2D\ +fY1I946FNKNsCGa/GwbDKzBYOIgzmgxChMj09BiR5AgMbma+0R/CniEyMUIoorQ2JTizwmr17U7y\ +0gFa9wL2XHBHuK429FgoaGO04YUbg2UFl8a35bt1aPl948liVp285kf94UPGGIWuhSaL2UmuZF7K\ +4nlZf17qmeXiwqNtRKmPNynAdSgJbhKW+vgHH9gD0uCoy7hzdQexTW7qjCDs0+tslbQiC3tJG0HX\ +qBc9hRD5G+ZqSCwZpJ0giqP0cR13zeFyqt8yGlZr9OFDOuhktJltC8/Yg4rbrdr6Q63sJJOlIvTo\ +FfqWF1WZmjY6q6Heqz3yjhZ/awCEvzaWkqMqZ6WOSjdxd7uk/vfFw2C9TnoNW0F162qKF7MuXsiO\ +TDU1w6pm7Ul9AdLYdK4= +exemd5=6d9d680c334f157beb7b1849d738617b + +436.cactusADM=base=at-sniff_64=default: +# Last updated Mon Jan 30 11:45:24 2012 +optmd5=253cea25658ec7baaffdb75c2716c3cd +baggage= +compile_options=\ +@eNrNU11P2zAUfc+vsPyMk00bICKC1DgpBNImGq0QvESt42wGNzaOA9t+/W5a2kWiRYiHCr/kXufc\ +j3PP9VjVZDF74JWQHClthaob32msEcwWpq1LYYonbkT1J8BfsTPMcx81mjOtEUIkus5jWtB8CuY4\ +isPpee+uSPOj74A6bVRrGD9DRG1st9Ja/OWlW538diAlwIfp4Pw6wFty4g6RZz8mgzBJk8ltH7Qs\ +gh2ajQDjAQFvZg/dL95c1N7PShlrZjUirKv9ws5ViCygMZJ9A4PpNtDqmZtjRCrNuSRSKd2A09ZG\ +yf9uNWssTMr+AvuJM0uY6i5UySWk0Uqz2pZgGc6EDkzzaOyGrUN9NKQB3tEfXv7PwsssnwC3frP4\ +HcPJfASBySi5iwGxH2ofloSx12ps2SJEElEz2ZYcLNf1Nk5EaRbFe1Pw5bxe6tXpC0y3CMzYUlv6\ +YW0BEcZjelHQNerNuXzaZUiT8dXu97lHOXcoearm95CjOesgcrGWfdnWjTwgj2j1NRoKBj0eUsw7\ +zEbUTu40euOpf9bX6qPRYHJRpEnYbZlc4BWT1dq+cw7rmGkX09vzf3Sj/Ho= +exemd5=9f8f820434ccbda10a1c3a6b8bd4fac5 + +481.wrf=base=at-sniff_64=default: +# Last updated Mon Jan 30 12:01:56 2012 +optmd5=28d3d67fad35a96f4eb1de64e4485492 +baggage= +compile_options=\ +@eNrdU9uOmzAQfecrLJ4LSbbXRGUlwiV1FzAKRLvti5UY09IS7DXObtuvr50rq02qPKXS+sVzxmN7\ +5pyZhDXWcv6TllVNAeOyYk07MlopKiKxWDVFJfADFVX52zEHphGm6Qi0nBLOAbAegbUEdSWpmNc2\ +XwIL2sDyYZJDpPdbNPUz+DVw3ig0fYKiJygJcs8PlRHE2EPTwBloZ7wFfQU85MZpdsDBXXoA4bCP\ +s9xNfDdCSbCOTkI4weNZiKMgcT4MhlfKG7t32EexC5MMh87V+g+EEzcOIpjlOJ2qxJUvSwMPe+lM\ +H/vBeDbp+LDnZgEOI3cCAPjYspUg9BpYbG/bJefVH1rY5fCXoagaB4n3CSvW9J3MMV8gZaauU3Gz\ +q/A5gdsINM3dMYxg/qUbdaDUNDwUq8ieasPeXL61+71F1fS+lUxIMW+ARTTT2x612YY6aPcaKklR\ +9qqG1KuCKn7fKYLQa2UQvnI4e6TiPbBKTmlt1YzxVoFVI1h9gOW8lWoM5HdlP1AiLcK0gxW0Vs9w\ +xkkjC2UJSiruiPZeyL3khjcCoeeYJ9I21+do/Bmluaq7W8OZzG17aBt0tGjTQCOgPoCx7g/zQhSc\ +EoyQ51odG6vj+l1MwN06Md7r1RXZOyIyIWt9vReq75lzG8Hk5vTcXlxQJRtb/FCX2uuDa5PEbf3K\ +ugebXXD1vNPJuq4WOmavn1Y28v8x2f9p6HRWm247s6bdnZm+02nPv81wbdk= +exemd5=dc58d86aa2b9119b96114552c4260aac diff --git a/fvtr/speccpu2006/at7.0-sniff32.cfg b/fvtr/speccpu2006/at7.0-sniff32.cfg new file mode 100644 index 000000000..73a185242 --- /dev/null +++ b/fvtr/speccpu2006/at7.0-sniff32.cfg @@ -0,0 +1,531 @@ +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# +# Build with toolchain groups toolchain +# + +tune = base +ext = at-sniff_32 +output_format = asc,cfg +teeout = 1 +log_line_width = 156 +iterations = 1 +reportable = 0 +check_md5 = 0 +runlist = all +action = validate +backup_config = 0 + +makeflags = %{MAKEFLAGS} + +default=default=default=default: +CC = %{CC} +CXX = %{CXX} +FC = %{FC} + +OPTIMIZE = -m32 -O3 -fpeel-loops -funroll-loops -ffast-math -fvect-cost-model -mrecip=rsqrt +LDOPT = -m32 -Wl,-q -Wl,-rpath=%{BASE_DIR}/lib + +# This is needed to avoid doing checksum verification of the source files against +# the SPEC MANIFEST file. The source files contain some changes needed to run with LE +# but until those changes are accepted by SPEC the MANIFEST file will not match. +strict_rundir_verify=0 + +########################################## +# Integer options +########################################## +400.perlbench=default=default=default: +CPORTABILITY = -DSPEC_CPU_LINUX_PPC -std=gnu89 +EXTRA_CFLAGS = -fno-strict-aliasing + +462.libquantum=default=default=default: +CPORTABILITY = -DSPEC_CPU_LINUX + +464.h264ref=default=default=default: +CPORTABILITY = -fsigned-char +EXTRA_CFLAGS = -fno-aggressive-loop-optimizations + +483.xalancbmk=default=default=default: +CXXPORTABILITY = -DSPEC_CPU_LINUX + +########################################## +# Floating point options +########################################## +416.gamess=default=default=default: +EXTRA_FFLAGS = -fno-aggressive-loop-optimizations + +433.milc=default=default=default: +EXTRA_CFLAGS = -fno-strict-aliasing + +447.dealII=default=default=default: +CXXPORTABILITY = -include cstddef + +450.soplex=default=default=default: + +454.calculix=default=default=default: +EXTRA_LDFLAGS = -Wl,--wrap,atan2 %{LIB32_ATAN2} + +481.wrf=default=default=default: +CPORTABILITY = -DSPEC_CPU_CASE_FLAG + +482.sphinx3=default=default=default: +CPORTABILITY = -fsigned-char + +__MD5__ +456.hmmer=base=at40_32=default: +# Last updated Mon Feb 28 09:23:34 2011 +optmd5=96acd1100ce9aba0a37239194cf61ca0 +baggage= +compile_options=\ +@eNrNUlFPwjAQft+vaPpsmYqJycJIYCBOB1sCxMSXZZROq11b2g7jv/fGJKLy4Js0Tfrd9e56X7+b\ +KUmq4pWVXDCktONK2sCzznDqclPLNTf5lhlevof4AntROs0C5EOgX7irzrm/4tJ/ohQR2GpfoKMQ\ +Gc2zcZRH2RLgbDQeLicIIVJ1LxFJuwCorkOt3pi5RqTUjAkilNIWjFoaJb5MZxjbGURwyQoDrrKw\ +Drp2z4C3jDpCVeNQayagslaaSrcGZBjlOjR2Yxz6uXpW1YayvhcFKIpC/JsT3l2lw7s0W4T4G0Hs\ +wS8At5tkMJnD3W+y2EsDBInxNH4cQ8S/EcdeEs/uj2p2GnL01OoFkmy/mQ9RfXrb1h7EGdmg9jQa\ +XggPaAi+OpCkESsZHdfxZKSAHqeDxW2exMNmbESF27bbCfsT5X3Gssk4GMgPAw00kg== +exemd5=b1e177e23750ad40303d0dfdb62094fd + +401.bzip2=base=at-sniff_32=default: +# Last updated Tue Nov 29 15:08:49 2011 +optmd5=17e70c3b698503c4fe8420b884739f41 +baggage= +compile_options=\ +@eNrFUt9PwjAQft9fcemzZSoxJgsjkYEEBbYEiYkvhHWdVsuutB3G/94DQkDhwSdpmvS7H9/lvruO\ +seKL+YcslZaAxiusXBQ4b5XwM1tXhbKzlbSq/IrZFQuSdJRFEFJiOPc3jcswV1X4KgRwurgr0EDg\ +3UnWS2ZJNiU47vY60z4A8EXzGnjaJCBMHRv8lPYWeGmk1FwjGkdGXVnUe7OcO08t+jfCKyk8F7h2\ +YCE1lTFoROULQlYKZWLrltbD79NyWFsh20ESQZLE7FgA24TSzkOaPcXshxoWkGQScj+8608odqyM\ +BWkERByMBi89yvgflSwYDsaPJ7dxhkG3MH8nkmvvXdsmnvUFX8L2tYbKxwcNa5UfTHq9g2H39HrO\ +M+FNQ9sv8ScxO8Z0zTj4Qd+ofxLp +exemd5=1d7701c331465961df3513e1ca854f61 + +403.gcc=base=at-sniff_32=default: +# Last updated Tue Nov 29 15:09:32 2011 +optmd5=cdf8d36c05fecc06efc674b640302b7a +baggage= +compile_options=\ +@eNrFUtFOwjAUfd9XNH22m0qMycJI2JgwHdsSICa+LFA6rXZr6TqMf+8dk4jCg0/SNOnp7b235/Q0\ +kRUpl2+s4IIhqQyXVe1atdGcmlw31ZrrfMs0Lz48fIWtIJ1mLnIg0VmaG/vSWfHKeaYUEZhy38CW\ +iIxmWRjkQbYAmIxCfzFGJLIRImXvGpG0B4CqxlPynelbRArFmCBCSlXDpqm0FN/bYlkbYGleAG8Z\ +NYTKNiDXTEAbJRWtzBqQZpQrT9cbbdDv0a9loykbWIGLgsDDxxrw7ij179Ns7uEfgrAFqkHLXTwc\ +z+DsWNwuww+TYJLvkyIbW6mLoFs0jZ5CiPyPdGzFUfJw0qUzvH5frl6hqB4AJqL8inY8HsUF2aBu\ +1Qpu8A44C746cKD1Jh6dtu08jwyEpsP5JI8jv3VblLjj2P2eP+nbVyzaioPP9gmaoB55 +exemd5=31078118461d985d85c2d8ac8b21b5ef + +429.mcf=base=at-sniff_32=default: +# Last updated Tue Nov 29 15:09:34 2011 +optmd5=df32e0d595e1e08ff4458998ad1f72b4 +baggage= +compile_options=\ +@eNrFUl1PwjAUfd+vaPpsQSXGZGEkUBCmY1tkhMSXBUrRareWrsP4771jogg8+CTNkp72fuycexqq\ +nGTzN74SkiOlrVB54TqFNYLZ1JT5Uph0w41YfXj4Cjs0GscuakJic25vGpfNhcibz4whAp/aNWgo\ +RPqTeEBTGk8Bhv1BbzpEgGbdMEknSZ+m8WOURIhkrWtEohYApktPq3dubhFZac4lkUrpAg5lbpT8\ +Oa7mhQXO9gXwhjNLmKou1JJLaKOVZrldAjKcCe2ZYm0sOlztQpWG8Y5DXUSph48V4W0o6t1HceLh\ +X/KwAzMAZXdBdziB2LHUbUZvENJRSr+zDrRjJ3IRNPfH/tMA4v8zCewEfvhw0sIzmNFWi1coKjqA\ +icy+bmseM3lB1qjejYY/eHucpVjsGVJZFfRPu3ieIQOhcTcZpYHfq7yXGa451o/pT/p2FdOqYu/t\ +fQI/VyfK +exemd5=28948c2872009c98ae64f089f70c6cfb + +445.gobmk=base=at-sniff_32=default: +# Last updated Tue Nov 29 15:09:46 2011 +optmd5=88aa60266694c243d97b828e365ee162 +baggage= +compile_options=\ +@eNrFUlFPwjAQft+vaPpsmUqMCXEkMAabwrYE0MSXBbpOq91aug7jv/fGBFF40BdZuva79q6977sL\ +ZUHyxSvLuGBIKsNlUXas0mhOTaKrIuU6WTPNs3cHX2DLjSZxB9ngaC/MVevcXvLCfqIUERhye0FL\ +IjKYxp6buPEcYDjw+vMRAL937yVuFA6DUeIjErTqv5lsXlBRpaw2dhiRvH2JSNQGQFXlKPnG9DUi\ +mWJMECGlKsGoCi3Fl5ktSgOczDPgNaOGUFlvyJQJuEZJRQuTAtKMcuXocqUN+vndlLLSlHUtt4Nc\ +18GHjPHmKOrfRvHMwd/oYws0AubDcW80hbNDKTYefS90/WTn9EdtsBV1ELwdTIJHD+L/RyhsjYPw\ +7mgHnKBWN3L5AkFlFzAR+eduk8eDOCMr1KxawQvOXs6CL/fqVVdyPDhe5NOIDAlNejM/GQf9ujdE\ +jpscm177Fb9txLyO2GvNDwNuOPc= +exemd5=f100ae46acc999676112fd33f190235e + +456.hmmer=base=at-sniff_32=default: +# Last updated Tue Nov 29 15:09:51 2011 +optmd5=1692facce914895c9562dcba365de0a3 +baggage= +compile_options=\ +@eNrFUtFOwjAUfd9XNH22TCXGZGEkMBCngy0BYuLLAqXTardbug7j33vnJE7hwSdpmvS2vac95547\ +g4Llq1eRSSUIaCuhKD2ntEZym5qq2EiT7oSR2btPL6gTxNPEIy4muit71Tl317JwnzgnDCfsH+gA\ +YaN5Mg7SIFliOBuNh8sJIYTl3UvC4i4GXFe+hjdhrgnLtBCKKQBd4qYqDKjvbbYqLVK0zxjvBLeM\ +Q30AG6HwGQ2aF3aDkRFcat+UW2PJ79EroTJc9J3AI0Hg00MB9PMqHt7FycKnP9RQByWjkJtoMJnj\ +3aEy6sQeQWA4DR/HmPE/KqkThbP7o26coNA9WL8gqOzXNqv867Th8aDO2JY0q9H4g9/irOS6Veza\ +hmh03KHTFBkJTQeL2zQKh7X7KqcNx6ZR/qRvj1jWiFZffQCIDRjQ +exemd5=dfb6d3642f65c3c273d666241f8850af + +458.sjeng=base=at-sniff_32=default: +# Last updated Tue Nov 29 15:09:55 2011 +optmd5=17e70c3b698503c4fe8420b884739f41 +baggage= +compile_options=\ +@eNrFUt9PwjAQft9fcemzZSoxJgsjkYEEBbYEiYkvhHWdVsuutB3G/94DQkDhwSdpmvS7H9/lvruO\ +seKL+YcslZaAxiusXBQ4b5XwM1tXhbKzlbSq/IrZFQuSdJRFEFJiOPc3jcswV1X4KgRwurgr0EDg\ +3UnWS2ZJNiU47vY60z4A8EXzGnjaJCBMHRv8lPYWeGmk1FwjGkdGXVnUe7OcO08t+jfCKyk8F7h2\ +YCE1lTFoROULQlYKZWLrltbD79NyWFsh20ESQZLE7FgA24TSzkOaPcXshxoWkGQScj+8608odqyM\ +BWkERByMBi89yvgflSwYDsaPJ7dxhkG3MH8nkmvvXdsmnvUFX8L2tYbKxwcNa5UfTHq9g2H39HrO\ +M+FNQ9sv8ScxO8Z0zTj4Qd+ofxLp +exemd5=ef048df3e654886a6066caa4284ba181 + +462.libquantum=base=at-sniff_32=default: +# Last updated Tue Nov 29 15:09:58 2011 +optmd5=fa687ee888edf69dd90c08a40b34335e +baggage= +compile_options=\ +@eNrNUt9PgzAQfuevaPpsh7oYEzKWDDYnygZxEH+8kK0rihbalTLjf+8xJMNME58Wmya9u95dv6/f\ +zUVB8uUbSzPOkJA6E0VpGaVWGdWJqop1ppItU1n6YeMzbLjBLLSQCYnmUl/0Ts1VVpjPlCICW7QN\ +egKR8SKcuIkbxmDOxxMnniKESN4/RyTog0FlZUvxztQlIqlkjBMuhCzBqQol+N5Nl6UGiPoF7C2j\ +mlBRB8SacWgjhaSFXoOlGM2krcqN0qhdexSJ783jhzY+KEWlKBsaroVc18aHhPDuKnBugjCy8Td2\ +2IAvgJZX/mi6gLtDptgILASF3sx7mkDGcVh/4QruopHj+V702MXW8McGHLc/CnhMbX6RZSBWr9Ck\ +HNYpPG813OG65ydkg5pTSXjR7nDg2aqjT62cP/5Z1H+rC2CejaJrcJ16pniOGxrN+P3pC9qKuK7o\ +TOsnrh41rg== +exemd5=7153a9bf2542990a83195976cb14cab3 + +464.h264ref=base=at-sniff_32=default: +# Last updated Tue Nov 29 15:10:38 2011 +optmd5=b17e07ca44bc8b5d9a0f1b3955b6a306 +baggage= +compile_options=\ +@eNrNkl1PwjAUhu/3K5peW6YSY7IwEjYQp4MtAjF6s4yug2q3lq7D+O89AxcxcOEVsWnS056Pnifv\ +mcqSFOk7y7lgSCrDZVk5VmU0pybRdZlxnWyZ5vmni6+w5UeT2EE2BNqpuelc2kte2itKEYEt2wId\ +ichwFo/8xI8XYE6HI28xRgiRonuNSNQFg6raVfKD6VtEcsWYIEJKVcGlLrUUP9c8rQy0aNZgbxk1\ +hMrmQWZMQBklFS1NBpZmlCtXVxttULtIXvFVyTJC16luH3uVrDVlfct3kO+7+JgG71yR9xDFcxf/\ +QsMW8APVXTgYz8B3jImtyEGQGEyC1xFEnAf5u6/oaT7wgjCYv8DPh/DYCoPp40npzqnKKUF6cvkG\ +Fap+4xdFK92uqWdxQTZof2oF37kHAIIvD5RpNAuHp+X8n4pAw5PB/D4JA68ZJVHgPcN+6v7E32Ys\ +moyDIf0CfXA1xg== +exemd5=4c280491762b9837b02753d1e1c77a25 + +471.omnetpp=base=at-sniff_32=default: +# Last updated Tue Nov 29 15:11:07 2011 +optmd5=48dc5f78c4639ad9e817780b8d2a671f +baggage= +compile_options=\ +@eNrFUlFPwjAQft+vaPqKZSoxJosjkTFxCtsSJBJfFug6rZa2tB3Ef+8BEjCQ6JM0aXrX3l3v+75L\ +lSSzyQeruGBIaceVtIFnneHUFaaWJTfFghlefYb4AntRNsgD5EOgP3FXzXN/yqX/2mggQhFR2wJN\ +hUh3mMdREeUjMNNu3Bn1EEmasNVMMldwSUVdMvAFn1qfyQU3CJFZ6xKRrAUG1XWo1ZKZa0QqzZgg\ +QiltwamlUWLnVhPrAIJ7A3vBqCNUrS5UyQSU0UpT6UqwDKNch8bOjUO7dWNVbShre1GAovE4xIfY\ +8Pdb1nnI8qcQ/4CKPeADUN71b3tDeDuEvY7oxGl0X2yDfuEBe1mA4KtkkLzEEP4/pGCvn6SPR8U9\ +hS5q+g5Jtr272jTxLM7IHG1Oo6F8uNcwcLinzUq3fve4pKdheN3QZoj+BGabMVpl7M3cF/g6LE0= +exemd5=3980e39af7e182194b2593ea77848222 + +473.astar=base=at-sniff_32=default: +# Last updated Tue Nov 29 15:11:09 2011 +optmd5=9afa05b11ed1e05b4c98108764a8f31b +baggage= +compile_options=\ +@eNrFUl1PwjAUfd+vaPqKZSoxJosjYR/iFLYlSCS+LFA6rZa1tB3Ef+8FJMzAg0/Sl96Pc2/uueem\ +siKL6ScruWBIKstlZTzHWM2pLXRdzbkuVkzz8svHV9gJs2HuIReA7tTetC/dGa/ct1YLEYqI3Ddo\ +S0SiUR6HRZiPwUyjOBj3G7EiSPpFnEZJL0WILDrXiGQdMKiqfSXXTN8iUirGBBFSKgNOXWkpDm45\ +NRbmtu9grxi1hMpNQM6ZgDZKKlrZOViaUa58bZbaosO7M7LWlHWd0EPhZOLjY0L4J5cFj1n+7ONf\ +/LADSwAa94NefwS5Y65bRBCn4UNxBGqQx07mIeifDJPXGDD/swnsDJL06aSM5xBDzj6gyHQPod0Q\ +L+KCLNHu1wra+42BBZ81BNmINYhO63ieDW8H2l3On8jsK8abisahfQMHtSIr +exemd5=e264f4a52b6271b0675bb09dcbfcbc31 + +483.xalancbmk=base=at-sniff_32=default: +# Last updated Tue Nov 29 15:12:07 2011 +optmd5=1c6f9b88d8feb83af7a6561e02148980 +baggage= +compile_options=\ +@eNrtVN1vmzAQf+evsHjtCNu6aVJUKjnAUjrAiI+O7cUijtOxEUxtyNr/fkcoCV3zsJdVe5gl5N99\ ++Djf/c6hqI1t8YNvyooj0bSlqNVcU60sWUtlV69LSXdclpsHS3+jazYJojkywdEs2vez1+aqrM3b\ +szNkMGSIMcBMIMNJItemdpQBDB13kS0RIBxFNCQ0vYpd7CSgyLGPQ+qFgRvQIFlSn2DHjZHhzeC7\ +55JxxY7IXIvtU8kst001UanifiJ1bVmZgbr1RbHmUpleHfCtkA+/u6SyqBUTgw8T9a53KKqiZmZZ\ +s6pbc0g1isk1zQM/wnHSp3hQZKnnj+JgTEYxwfk7eyK8HbFDghHeYN9zcEr2pyAczRKXhjj1blya\ +xjhMbLIvycH2WC03SfDSHQu2PYfY5BwAazqrET+5/ICMTcN5ZVRCNAqErpaiOoqbQrXQ/PYb4B1n\ +rcFEr4AyQEW3jWhY3a4BSc7KxpLqTraoX8feUt8Ls3yvRBdKdFDSS82eIzvPLf05S/RHG1lckyi1\ +9Cek0TVgFsT86ONlArbnBNp7LNzQvqIQ5OD3n1N/h1O6RuYI+uQF3lcXCv0yDBtokOcRiVO88Hwv\ +/TIlw8A4XYPt08mH6CUn4fQgoAux+g5B1CU6rCGpz9Ur4w4Nu2zgd9bkAlW5mkxDPym+c3qI/uG2\ +7LMeZvuPbjyeyPoTk6fgF++XERM= +exemd5=60ba0d87f2afa294c3132c0a494bca0e + +999.specrand=base=at-sniff_32=default: +# Last updated Tue Nov 29 15:12:09 2011 +optmd5=17e70c3b698503c4fe8420b884739f41 +baggage= +compile_options=\ +@eNrFUt9PwjAQft9fcemzZSoxJgsjkYEEBbYEiYkvhHWdVsuutB3G/94DQkDhwSdpmvS7H9/lvruO\ +seKL+YcslZaAxiusXBQ4b5XwM1tXhbKzlbSq/IrZFQuSdJRFEFJiOPc3jcswV1X4KgRwurgr0EDg\ +3UnWS2ZJNiU47vY60z4A8EXzGnjaJCBMHRv8lPYWeGmk1FwjGkdGXVnUe7OcO08t+jfCKyk8F7h2\ +YCE1lTFoROULQlYKZWLrltbD79NyWFsh20ESQZLE7FgA24TSzkOaPcXshxoWkGQScj+8608odqyM\ +BWkERByMBi89yvgflSwYDsaPJ7dxhkG3MH8nkmvvXdsmnvUFX8L2tYbKxwcNa5UfTHq9g2H39HrO\ +M+FNQ9sv8ScxO8Z0zTj4Qd+ofxLp +exemd5=df04a7d44c97ec6124df54bf59dc30d2 + +410.bwaves=base=at-sniff_32=default: +# Last updated Tue Nov 29 15:12:12 2011 +optmd5=d5f5d1cc23a18bffa646274929bb9f41 +baggage= +compile_options=\ +@eNrFUt9PwjAQft9f0fTZMpUYk4WRyAYEBbYEiIkvZOs6rZZeaTuM/70HhIAPGJ+wL71f3+W7724K\ +mq2KD1FLJQgYL0G7KHDeSu6XttGVtMuNsLL+iukNDZJskkckxMKw8Het67CUOnytwXpbaMI4YXDo\ +0gLCVu1bwrI2Gtw0sYFPYe8Jq40QiikA49BptAV1dOvCeWTk39DeCO4Zh20AKqGwjQHDta/QsoJL\ +E1u3tp50HDSWi26QRGSQxPQMP7rLZ73HLJ/H9AdZGuBYSb4YjB+GM8yls7yfLDFAWDpN+73FkAZZ\ +RBA4moxe+lhxmdFoMB5Nn84rfjGJj68D5TuCXPcY2pN4VldsTfa/Ndg+PmGtZHki93YR4/SXRf2P\ +1jtW++P400QHxGKLOLmlb0gbFD4= +exemd5=5c7c709552bc539a29956ea1454b87ee + +416.gamess=base=at-sniff_32=default: +# Last updated Tue Nov 29 15:16:37 2011 +optmd5=50d04ebb7e8b86d28eb91f9891b8999d +baggage= +compile_options=\ +@eNrFUl1PwjAUfd+vaPpsh0qMkTASGAOmY1sEYuLLMkqn1W4tXcGPX++dICwxGJ6wLz29vbf3nNMb\ +yoLk6SvLuGBIKsNlUbas0mhOTaJXxYLrZM00zz4cfIGtQRy3UKkYVQoh0p/Enpu48SwJo2QUBYF3\ +709HtTjAsO/1ZkOEULuUK01ZBxG5w3amFP9kCzu7ebfg5Z4XuqMEmgyC7nDi4AMdcJULwV9Zu37Y\ +cqMxJDVAUiM1V/Z5Y86LxlMmtdFpgQitaGz12hKRvHmJSNQEQNXKUfKN6WtEMsWYIEJKVcJhVWgp\ +9scsLQ14Z54Brxk1hMoqIBdMwDNKKlqYBSDNKFeOLpfa7IRbbgsNXAcf4Ie/76PebRRPQV+d7DHa\ +oxaCQn/sP3qQcRpp2Ar88O6w4yezeL/acv4CRWUHMBH5Nrrh8SDOyBJtdq2gg1MjLvi85nj1F0H/\ +j7/6H7uB1bg7HSWB36vmQOR4Q3QzMkeJ/KmYVRW1CfsCp4VLBg== +exemd5=a41b682eed1391d4efac1214159cfd0f + +433.milc=base=at-sniff_32=default: +# Last updated Tue Nov 29 15:16:41 2011 +optmd5=54c7b94e030ca0c0722b93fdfb297ffb +baggage= +compile_options=\ +@eNrFUltPgzAUfudXNH22m7oYk0VMWGEX3YAMpsYXwrqi1Y7W0mn89x6Y6Ix7MD4oaei595zvfKEq\ +yTp/5IWQHClthSqrvlNZI5jNzKZcCZM9cyOKVxcfYYdGs7iPuhDYze1J57C7FGX3jjFE4Ki2QEch\ +4idxQDMaL0AM/WCwGCEy6YAyDOufl6Rw0SgczT0/S2dxdhXQNJonYPWTqZeMG+N0El4mCJF17xiR\ +qAcC0xtXqxduThEpNOeSSKV0BcqmNEp+qkVeWRjN3oP8zJklTNUGteISymilWWlXIBnOhHZN9WQs\ ++vhIUSqyRYHkUuSVKO/eXWeV2hjGzx3aR5S6+DsYuHFFg4soTl38BRnsAHwAynDqjRLwfUepiRgE\ +IR1nbdAvYcNO1EfQwmQ2uQ2gzN9g2Lwa3KRzL6PtAHvAxE7d414q/f220ZlaPkBSdV6vXq5bEjR9\ +XMsD8oS2t9HwgrvTsxTLne3We5/6+ynxP7uAhmZeOgZCDOpFyDXe9rhl5o/mazMWdcYOkd8AzxJQ\ +Jg== +exemd5=92da2d77ac4de8abb5708bb877630c03 + +434.zeusmp=base=at-sniff_32=default: +# Last updated Tue Nov 29 15:17:03 2011 +optmd5=607f0258511d06dd6d38f4a28228c8d2 +baggage= +compile_options=\ +@eNrFUl1PwjAUfd+vaPpsN5UY48JIZHwEBbYEiYkvZHSdVsduaTsUf713oLAHMTxhX3rubc/JObcd\ +Q8EWyZvIZC4IKCuhML5jrJbcznRZpFLPVkLLbB3QC+r04tgnRgmuFCGEdSZxN5yF8RThuNNtT/vY\ +bRooNRctwmCH3Uwp+SlSN7v5cFACKb3hbX8S0F80qBNGI7zkoR8vsVfuuTeXhfecgbY6KQjjlfS3\ +WRcIWzQuCYsaCLgqAwXvQl8TlikhcpYDKINFWWjI92WWGIvB7QvileCWcagakIocZRQoXtgUkRZc\ +qkCbpba7ME7ok14Y0AP+6OY8at9F8QPmq5ulR2SPfILEwWjw1MUbp4lGneFgfH944icb8X41Yf6K\ +JNPat7YmHvMztiTbXSuUD2quczmvjbt6iGHnj4f6n1lvXG0/x1GJfhjTilH7S18yLjIG +exemd5=fb3098f57d4a493c7efedf20c27e4cae + +435.gromacs=base=at-sniff_32=default: +# Last updated Tue Nov 29 15:17:20 2011 +optmd5=1aeeb3f36f82ab01d63daa894a563191 +baggage= +compile_options=\ +@eNrFVN9PwjAQft9f0ezZDpUY48JIoAyYwrYE0cSXBUqn1bKWrvjrr/fGEBcFY3yAvezudnf7vn53\ +DWWG55MnlnLBkFSGyyx3rdxoTk2il9mM6+SZaZ6+efaJbXXj2EW5YlQphBDujGKfJCQegxl2/Pa4\ +B9FGLpeasibCcmM7qVL8nc2c9OLVghZQ0h20eiPP3tLDtkg0hKQa4KlNzJlzXJvyrHafSm30JEOY\ +Fq3XYB2J8Lx+inBUB4OqpafkC9PnCKeKMYGFlCoHZ5lpKb7cdJIbIG4ewH5m1GAqi4CcMQFtlFQ0\ +MzOwNKNceTpfaLMhYxEXdYln78Bnr75H7csovgZ+VbD2H7hHLoLCYBjc+ZCxH2q7TpzSn4e9TXMc\ +OOD1Wzd+QqKwG/SS/t5U+f5UVSJbVKJ0JRD5t0CQ0fZD0k/IZ9ZP9oeScRCEV7sX5wCaNOT0EYry\ +ZnFdiPk6WuK4FUd4gcq3VvAHrwJc8GlFl0KxQeeXlTvQ1rho2LruJ4OgXcyBmNsl0HKw/kTys2Jc\ +VFTm8AO/uMLU +exemd5=3abcb1ca0fb2ea24a2f6c25e3c5d5066 + +437.leslie3d=base=at-sniff_32=default: +# Last updated Tue Nov 29 15:18:18 2011 +optmd5=d5f5d1cc23a18bffa646274929bb9f41 +baggage= +compile_options=\ +@eNrFUt9PwjAQft9f0fTZMpUYk4WRyAYEBbYEiIkvZOs6rZZeaTuM/70HhIAPGJ+wL71f3+W7724K\ +mq2KD1FLJQgYL0G7KHDeSu6XttGVtMuNsLL+iukNDZJskkckxMKw8Het67CUOnytwXpbaMI4YXDo\ +0gLCVu1bwrI2Gtw0sYFPYe8Jq40QiikA49BptAV1dOvCeWTk39DeCO4Zh20AKqGwjQHDta/QsoJL\ +E1u3tp50HDSWi26QRGSQxPQMP7rLZ73HLJ/H9AdZGuBYSb4YjB+GM8yls7yfLDFAWDpN+73FkAZZ\ +RBA4moxe+lhxmdFoMB5Nn84rfjGJj68D5TuCXPcY2pN4VldsTfa/Ndg+PmGtZHki93YR4/SXRf2P\ +1jtW++P400QHxGKLOLmlb0gbFD4= +exemd5=15881c7b15d6910b2a5732b414ee2ae7 + +444.namd=base=at-sniff_32=default: +# Last updated Tue Nov 29 15:18:49 2011 +optmd5=3067c4ecea961ee6d362b26e36b0c865 +baggage= +compile_options=\ +@eNrFUk1PAjEQve+vmPSKZVViTDYuiSxIUGA3QSLxQqB0tVp2StvF+O+dFQkYOHiSXjpfb/LezAyx\ +4MvZu8yVloDGKyxcFDhvlfBTWxYLZadraVX+GbMLFiTpIIsgpMJw5q/q5+FcFeFLrQZcAMdtgzoC\ +b4+yTjJNsjGZw3anNe4CAF82LoGnDTKEKWODH9JeA8+NlJprROPIKQuLeufmM+eJon8ley2F5wKr\ +AC6kpjYGjSj8giwrhTKxdSvrYfduHJZWyGaQRJBMJjE75M5+cmnrPs0eY/ZLCgtIL6m46992R5Q7\ +lMWCNAIC9ga95w5V/I9EFvR7w4ejqzjFlHH+RiDX3IU2JJ70GV/B5reG2sd7hLWa70262kK/fXxB\ +p5nwN6HNSfxJzBYxrhB7F/QFQM4Rhg== +exemd5=b27589f484b9461fc867a00c7f33bb51 + +447.dealII=base=at-sniff_32=default: +# Last updated Tue Nov 29 15:20:06 2011 +optmd5=fc1b053d661554951da1e4ebe6ae1b6c +baggage= +compile_options=\ +@eNrNUk1v2zAMvftXEL62StoGw4CgLhB/LNXmxkbtYGkvRiLLmzbFUiS5xf796GRZ0zWHoYeivIii\ +qEfy8c1US9bLn7wRkoPSTqjWjj3rjGCuMl1bC1M9cCOaX4F/7ntRdpOPYYiJw6X7MDgbrkQ7/HZy\ +AoQBUXuAgQISF3kSVVE+R3cWJ+F8CkCoaJnsao6xMMuKsoppMQnTpCqvb5NJXGC85ktZUVrVYs1b\ +i2jBCMh6dAEk6x2mu0CrR24+Amk055JIpbTFS9caJZ+uzdI6nMx9R/+BM0eY6gOq5hJhtNKsdTV6\ +hjOhA2M3xkFvZN8is66uebMNwqVVnWH8yovGEC0Wgf+SAv/PWxZ+zvIy8J8x4ntIG5LxKZ1MC3x7\ +yc42I0xm0XWFIPu81xHme9kYsAl6Q+8TRHkb+nYzLhZ5dltOQprS8g5r/0On76V09uWohN5yzce3\ +DJdq9QNB7BX8tV1TX+Up2cDuNBrLBQcDSLE6WHUvgzQ+rpB3vJZt1zvh/tfE+x/z/seBzn8DFBRd\ +wA== +exemd5=b3db4dcedc025cf92b96c81041d92b54 + +450.soplex=base=at-sniff_32=default: +# Last updated Tue Nov 29 15:20:15 2011 +optmd5=3067c4ecea961ee6d362b26e36b0c865 +baggage= +compile_options=\ +@eNrFUk1PAjEQve+vmPSKZVViTDYuiSxIUGA3QSLxQqB0tVp2StvF+O+dFQkYOHiSXjpfb/LezAyx\ +4MvZu8yVloDGKyxcFDhvlfBTWxYLZadraVX+GbMLFiTpIIsgpMJw5q/q5+FcFeFLrQZcAMdtgzoC\ +b4+yTjJNsjGZw3anNe4CAF82LoGnDTKEKWODH9JeA8+NlJprROPIKQuLeufmM+eJon8ley2F5wKr\ +AC6kpjYGjSj8giwrhTKxdSvrYfduHJZWyGaQRJBMJjE75M5+cmnrPs0eY/ZLCgtIL6m46992R5Q7\ +lMWCNAIC9ga95w5V/I9EFvR7w4ejqzjFlHH+RiDX3IU2JJ70GV/B5reG2sd7hLWa70262kK/fXxB\ +p5nwN6HNSfxJzBYxrhB7F/QFQM4Rhg== +exemd5=41d57b8cf9d59915a1dbda20e757c535 + +453.povray=base=at-sniff_32=default: +# Last updated Tue Nov 29 15:20:30 2011 +optmd5=3067c4ecea961ee6d362b26e36b0c865 +baggage= +compile_options=\ +@eNrFUk1PAjEQve+vmPSKZVViTDYuiSxIUGA3QSLxQqB0tVp2StvF+O+dFQkYOHiSXjpfb/LezAyx\ +4MvZu8yVloDGKyxcFDhvlfBTWxYLZadraVX+GbMLFiTpIIsgpMJw5q/q5+FcFeFLrQZcAMdtgzoC\ +b4+yTjJNsjGZw3anNe4CAF82LoGnDTKEKWODH9JeA8+NlJprROPIKQuLeufmM+eJon8ley2F5wKr\ +AC6kpjYGjSj8giwrhTKxdSvrYfduHJZWyGaQRJBMJjE75M5+cmnrPs0eY/ZLCgtIL6m46992R5Q7\ +lMWCNAIC9ga95w5V/I9EFvR7w4ejqzjFlHH+RiDX3IU2JJ70GV/B5reG2sd7hLWa70262kK/fXxB\ +p5nwN6HNSfxJzBYxrhB7F/QFQM4Rhg== +exemd5=46cbdd4e9d3f834ada9830d79d08a101 + +454.calculix=base=at-sniff_32=default: +# Last updated Tue Nov 29 15:20:59 2011 +optmd5=f839d9c3e428854761b1c4117c750d37 +baggage= +compile_options=\ +@eNrdk99P2zAQx9/zV1h+xg20mtCqBalNUwhLm4i2YtpLlLoO9ebYxnH4sb+eSyAQsXZCe+ik+el8\ +Pn99d5/zXElSZD9ZzgVDSluuZDl0Sms4tamp5Iab9I4Znj96+AQ70yQZolIzqjVCiEwWSeCnfrIC\ +cz4Jxqtz8H4pVWUoO0NEvdq9XGv+i216+ecHByTgyjQanS88vEMDO348gyAX8nEz+6l37K65dG9y\ +ZazJJCK0ln5JtqcQCRdJHEfBApFi0EckHoBBdeVpdc/MKSK5ZkwQoZQuYVNJo8TbNs9KCy2wW7Dv\ +GLWEqtqhNkyAjFaaSrsByzDKtWfKW2Nfy3L8IZr6Ht6TKW7O4/FlnCyh0m7a+ANdgIhxMPcv0jao\ +rRM78RCBZjgLvwfgP0zV+7BQ+juRHYPxRulgmN6vLjZ/BzZKG2L+/0MsCudf93+kQ4Mg1+KIkHuT\ +6aPMZrKP3K0qmKvtNqtumHQFX7vNQVrHaGbSQR+mCcCp9Q94qjyrRUTRyjXZ15q3L9pGQ15ep1xQ\ +7CCs4UaTP3zXfwMJXg2+La9GaTRp5+avGtUM72y0vEijcFyriAI/l/w8zR9qV3tjVd/oDP8Ts5jy\ +Kg== +exemd5=f0cfcd1527c1d8d637899881673e5f3a + +459.GemsFDTD=base=at-sniff_32=default: +# Last updated Tue Nov 29 15:23:27 2011 +optmd5=607f0258511d06dd6d38f4a28228c8d2 +baggage= +compile_options=\ +@eNrFUl1PwjAUfd+vaPpsN5UY48JIZHwEBbYEiYkvZHSdVsduaTsUf713oLAHMTxhX3rubc/JObcd\ +Q8EWyZvIZC4IKCuhML5jrJbcznRZpFLPVkLLbB3QC+r04tgnRgmuFCGEdSZxN5yF8RThuNNtT/vY\ +bRooNRctwmCH3Uwp+SlSN7v5cFACKb3hbX8S0F80qBNGI7zkoR8vsVfuuTeXhfecgbY6KQjjlfS3\ +WRcIWzQuCYsaCLgqAwXvQl8TlikhcpYDKINFWWjI92WWGIvB7QvileCWcagakIocZRQoXtgUkRZc\ +qkCbpba7ME7ok14Y0AP+6OY8at9F8QPmq5ulR2SPfILEwWjw1MUbp4lGneFgfH944icb8X41Yf6K\ +JNPat7YmHvMztiTbXSuUD2quczmvjbt6iGHnj4f6n1lvXG0/x1GJfhjTilH7S18yLjIG +exemd5=f136da5004f38eb36cc6459464eda6ba + +465.tonto=base=at-sniff_32=default: +# Last updated Tue Nov 29 15:28:24 2011 +optmd5=953b5ad4ded5b33935b3bbbdfa4cccfd +baggage= +compile_options=\ +@eNrFklFv0zAQx9/zKU55xikwIUS1TGoTtwRaO2paIe3FSl1nM7ix57gb8Om5tNtaCQ3tYRp5yf9s\ +3/l3/zOzLdnWP1SjjQLrgrZtN4y64LUMwu/ajfbiVnnd/Erjd3E0KcshdE5J5wDIHZB8VVFRLqgY\ +sVyUvFqKjLO8WBacVfe7dLHgCzEfsdGUzilbAtmC0UH52iRu20fBtsHudV6VNBNZuULJcjpeTQHg\ +vLM7L9UFEPuok8Y5/VttkubTzwiZxpRlnwXiTWajaZXGL84W97cg2EP9v0njKONzPDRAGwd1+JC8\ +Hax1O7hqrA++boHIvoF7jxOLxc/eA+FnKKTbpc7eKf8RSOOUMsRY6zoMdq235hg2dRdwXuEa9a2S\ +gUjbL9iNMljGWSfbsEHlldQu9d2ND4+WRdkQJlkaP8EX7/f5+Asvl9jfKexzeudDwMRiXlxSPPE6\ +rcXRrGBfn3b81Sw+fud2/R2Tuovj0gHim3lDbuDw9w7LpyfURq9P7O4HMcv/Maj/4/We6vA4ntXR\ +Q8aqzzh5S38A7D9pmQ== +exemd5=d92f13c6ccaac1be070830fd40c441d5 + +470.lbm=base=at-sniff_32=default: +# Last updated Tue Nov 29 15:28:26 2011 +optmd5=1692facce914895c9562dcba365de0a3 +baggage= +compile_options=\ +@eNrFUtFOwjAUfd9XNH22TCXGZGEkMBCngy0BYuLLAqXTardbug7j33vnJE7hwSdpmvS2vac95547\ +g4Llq1eRSSUIaCuhKD2ntEZym5qq2EiT7oSR2btPL6gTxNPEIy4muit71Tl317JwnzgnDCfsH+gA\ +YaN5Mg7SIFliOBuNh8sJIYTl3UvC4i4GXFe+hjdhrgnLtBCKKQBd4qYqDKjvbbYqLVK0zxjvBLeM\ +Q30AG6HwGQ2aF3aDkRFcat+UW2PJ79EroTJc9J3AI0Hg00MB9PMqHt7FycKnP9RQByWjkJtoMJnj\ +3aEy6sQeQWA4DR/HmPE/KqkThbP7o26coNA9WL8gqOzXNqv867Th8aDO2JY0q9H4g9/irOS6Veza\ +hmh03KHTFBkJTQeL2zQKh7X7KqcNx6ZR/qRvj1jWiFZffQCIDRjQ +exemd5=7cf5988e3dc5d8416529a008dd7e44bd + +482.sphinx3=base=at-sniff_32=default: +# Last updated Tue Nov 29 15:35:20 2011 +optmd5=1d54f3e22e3f7ad68e0b8eea019c4f1a +baggage= +compile_options=\ +@eNrNUl1PwjAUfd+vaPpsQSXGhDgSNgZUx0YENPqyQOmgWtbSdRj/vXfgIgQe9IW4NNnt/ew550Yq\ +I6vpO0+F5EhpK1SWN53cGsFsYopsLkyy4Uakny6+wo4fD4ZNVIfE+tTe1C7rM5HVF4whAkdVDWoK\ +kc5oGPiJP5yAGXUCb9JDhNYO/f32U5D4cdSlvaS/C1MpZoUVEiFEVo1rROIGGEwXrlYf3NwikmrO\ +JZFK6RwuRWaU/Lmm09wCHrsEe8OZJUyVDjXnEtpopVlm52AZzoR2Tb42FlUfSXOxyPicsOXUVM67\ +XBWG8ZbjN5Hvu/gYOt6GYu8+Ho5dfMADdoAsgNoN270RxI452WZ4QeT3kyrpLyRhJ24imEsH9DWA\ +2vMw9g0rfhy3PRrS8QtM3ucOOyGNHk6uyTlFPaXnnZq9QYe8VcblqlJ++6hneUHWaPc3Gsa5ewCA\ +8T1hS8nDzult+J+KwIMH7XE/CalXLplc4R2G3dL+Cn9VMSkr9nb8C03pUzU= +exemd5=cc2192504717ea45141a72cab1507f1a + +998.specrand=base=at-sniff_32=default: +# Last updated Tue Nov 29 15:35:21 2011 +optmd5=17e70c3b698503c4fe8420b884739f41 +baggage= +compile_options=\ +@eNrFUt9PwjAQft9fcemzZSoxJgsjkYEEBbYEiYkvhHWdVsuutB3G/94DQkDhwSdpmvS7H9/lvruO\ +seKL+YcslZaAxiusXBQ4b5XwM1tXhbKzlbSq/IrZFQuSdJRFEFJiOPc3jcswV1X4KgRwurgr0EDg\ +3UnWS2ZJNiU47vY60z4A8EXzGnjaJCBMHRv8lPYWeGmk1FwjGkdGXVnUe7OcO08t+jfCKyk8F7h2\ +YCE1lTFoROULQlYKZWLrltbD79NyWFsh20ESQZLE7FgA24TSzkOaPcXshxoWkGQScj+8608odqyM\ +BWkERByMBi89yvgflSwYDsaPJ7dxhkG3MH8nkmvvXdsmnvUFX8L2tYbKxwcNa5UfTHq9g2H39HrO\ +M+FNQ9sv8ScxO8Z0zTj4Qd+ofxLp +exemd5=df04a7d44c97ec6124df54bf59dc30d2 + +400.perlbench=base=at-sniff_32=default: +# Last updated Mon Jan 30 11:13:45 2012 +optmd5=725f0f62d5b90842b733f05d5b859394 +baggage= +compile_options=\ +@eNrNUtFOwjAUfd9XNH22ohJjQpzJVqZOB1twRPRlGaVotaylKxj/3jtgMAMPPhGXJrtt770995zT\ +VwWZ5Z98KiRHSluhirLjlNYIZjOzKCbCZEtuxPTbxefYoXEv6aAWJLZye3l61hqLovXGGCKwVN3g\ +VCHSfUoCmtFkCGG/G/jDOwiSYBBlNB4ECJFZ+wKRuA0B0wtXqy9urhCZas4lkUrpEjaLwii5207z\ +0gJa+w7xkjNLmKoO1IRLaKOVZoWdQGQ4E9o15dxYVH87QFkU9oejLEkotCkUWQ9LcinyUhRvm/zr\ +Ui0M4zcO7SBKXbw/M15dxf5DnKQu/kUAdoAleOo28u6e4G6fjFWGH/TpfbZN2rKDnbiDoGvYC18D\ +uDkOVRvQ8SD1/DAK05cm8B1pK3DBKB14Ga2hH6ARO1DxeNArx9T+oOwbhdX4AxqVN1WanNU+WWF7\ +lidkjtZ/o+FVtzGHFOOG1pULou5hg/xrGQF3z0vv4civNJQzvB5lbec/0VBXDKuKhvt/APrLWYw= +exemd5=4a03ceb76d7e448fc6c436f3db90e34f + +436.cactusADM=base=at-sniff_32=default: +# Last updated Mon Jan 30 11:21:58 2012 +optmd5=647b43ecdc4cde6d22ddc89e8daf42c4 +baggage= +compile_options=\ +@eNrFVNtOg0AQfecrNjy74CXGSIqJXahF20JSGxNfSLssurpl12Xx9vUOvUm0NY0PLS/MDDPDOXN2\ +diALPB0/s5wLhqQyXBalZ5VGc2pSXRUZ1+kr0zz/8O0j2+okiYdKxahSCCEcDJOQpCQZgTkIwvbo\ +CqKtUlaasguE5cp2cqX4J8uc/PzdghZQ0uldXg19e00P2yJxH5JcwOOOzalz6E544T7kUhs9LhCm\ +desFWEciPD05Rjg+AYOqylfyjekzhHPFmMBCSlWCUxVaim83H5cGiJtHsF8ZNZjKOiAzJqCNkooW\ +JgNLM8qVr8sXbVZkLOKhDvHtDfjs2fe4fR0nt8CvCdbegnvsISiM+tF9CBm7obZp4pT+HvY6zXHE\ +CyqqjIHlOO7KCQiJg3BnAv18moKRNYJROtOK/FsryGiHA9JNyTLrz0HsS9xeNLjZvE57kKclJ09Q\ +VF7Ul4iYLqJzHHfiAL+g+Vsr+IPfAC74pCFRLV4v+GMR97RLHupf3nbTXtSuj4SY2nOg8zO2Fcll\ +xaiuaBzJLzy2y0Y= +exemd5=3176ac18ebe0b93f2fc115be73baf8dd + +481.wrf=base=at-sniff_32=default: +# Last updated Mon Jan 30 11:37:20 2012 +optmd5=6f06d433319ee38018073ac60b15f733 +baggage= +compile_options=\ +@eNrdU99vmzAQfuevsHgekLSbtkSjEjEm8wYYBaJ2e7ESYzY2il1D2m5//Ux+NFRNpjxlUv3i+85n\ +++777mJRW7eLX7woKw6EbEtRN2OjaVXJWqpWdV4qes9VWfx2zaFpBEkyBo3kTEoArAdg3YKqbLla\ +VLa8BRa2geXjOMOk26/JzE/xN+S+1Wj2DIXPUIwy6AfaQBGFZIbcYeeMtmCgASRelKR7jG6SPQhG\ +A5pmXux7IYnROjoO8JRO5gENUex+GI4utDfybqhPIg/HKQ3ci/UfhMZehEKcZjSZ6cS1L00QpDCZ\ +d8c+msynPR+FXopoEHpTAMDHRqwU41fAEk+2XUhZ/uG5XYweDU3VBMXwE9WsdXdS13yFlJldnZqb\ +XYUvCdxGkFnmTXCIs6/9qD2lpgFJpCMd3YbOon1nD5xlWTvfC6FataiBxTqmtz1qiw112HZq3rK8\ +cMqaVauca34vderkUhtMrlwpHrh6D6xCcl5ZlRCy0WBVK1HtYbFoWj0G7Q9t33PWWkx0DpHzSj8j\ +hWR1m2tLcVZKVzV3qn2S3IBjEEDXPJK2uT4nk88kyXTd/RpOZG7bQ9ugg0WbBhkD/QGOuv4wz0TB\ +McEYe6nVobE6rN/ZBNytI+O9Xn2R4QGRGVvrC1+pvifObYjjL8fn9uyCatnE8qe+1FztXZskrqs3\ +1h3Y7Erq591e1lW57KnX6Rr6/5jr/zRyXVabXjupot2NeXej15p/AfH1bN0= +exemd5=acf49daa7435f4755ee4283dabd2a74c + diff --git a/fvtr/speccpu2006/at7.0-sniff64.cfg b/fvtr/speccpu2006/at7.0-sniff64.cfg new file mode 100644 index 000000000..bee664a38 --- /dev/null +++ b/fvtr/speccpu2006/at7.0-sniff64.cfg @@ -0,0 +1,555 @@ +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +tune = base +ext = at-sniff_64 +output_format = asc,cfg +teeout = 1 +log_line_width = 156 +iterations = 1 +reportable = 0 +check_md5 = 0 +runlist = all +action = validate +backup_config = 0 + +makeflags = %{MAKEFLAGS} + +default=default=default=default: +CC = %{CC} +CXX = %{CXX} +FC = %{FC} + +%if '%{ENDIANNESS}' eq 'little' +SPEC_CPU_FLAG = -DSPEC_CPU_LINUX_PPC64LE +%else +SPEC_PPC64LE_FLAG = +%endif + +OPTIMIZE = -m64 -O3 -fpeel-loops -funroll-loops -ffast-math -fvect-cost-model -mrecip=rsqrt +LDOPT = -m64 -Wl,-q -Wl,-rpath=%{BASE_DIR}/lib64 + +# This is needed to avoid doing checksum verification of the source files against +# the SPEC MANIFEST file. The source files contain some changes needed to run with LE +# but until those changes are accepted by SPEC the MANIFEST file will not match. +strict_rundir_verify=0 + +########################################## +# Integer options +########################################## +400.perlbench=default=default=default: +PORTABILITY = -DSPEC_CPU_LP64 +CPORTABILITY = -DSPEC_CPU_LINUX_PPC ${SPEC_CPU_FLAG} -std=gnu89 +EXTRA_CFLAGS = -fno-strict-aliasing + +403.gcc=default=default=default: +PORTABILITY = -DSPEC_CPU_LP64 + +462.libquantum=default=default=default: +CPORTABILITY = -DSPEC_CPU_LINUX + +464.h264ref=default=default=default: +CPORTABILITY = -DSPEC_CPU_LP64 -fsigned-char +EXTRA_CFLAGS = -fno-aggressive-loop-optimizations + +471.omnetpp=default=default=default: +CPORTABILITY = -DSPEC_CPU_LINUX + +473.astar=default=default=default: +CPORTABILITY = -DSPEC_CPU_LINUX + +483.xalancbmk=default=default=default: +PORTABILITY = -DSPEC_CPU_LP64 +CXXPORTABILITY = -DSPEC_CPU_LINUX + + +########################################## +# Floating point options +########################################## +416.gamess=default=default=default: +EXTRA_FFLAGS = -fno-aggressive-loop-optimizations + +433.milc=default=default=default: +EXTRA_CFLAGS = -fno-strict-aliasing + +436.cactusADM=default=default=default: +PORTABILITY = -DSPEC_CPU_LP64 + +447.dealII=default=default=default: +PORTABILITY = -DSPEC_CPU_LP64 +CXXPORTABILITY = -DSPEC_CPU_LINUX -include cstddef + +450.soplex=default=default=default: + +454.calculix=default=default=default: +EXTRA_LDFLAGS = -Wl,--wrap,atan2 %{LIB64_ATAN2} + +465.tonto=default=default=default: +CPORTABILITY = -DSPEC_CPU_LINUX + +481.wrf=default=default=default: +CPORTABILITY = -DSPEC_CPU_CASE_FLAG ${SPEC_CPU_FLAG} + +482.sphinx3=default=default=default: +CPORTABILITY = -DSPEC_CPU_LINUX -fsigned-char + +__MD5__ +464.h264ref=base=at40_64=default: +# Last updated Tue Mar 1 09:59:16 2011 +optmd5=7b52a077c60a2f224be5dfa365b9dddc +baggage= +compile_options=\ +@eNrNUk1PwzAMvfdXRLlnBTGBVK2T1g9GoVsq1h3gUnVZugXapkrSIfj1uMA+0HbgABJRDrb8bL9n\ +eyprUuXPvBAlR7IxQtbasbRRgplMtfVSqGzDlSheXXyOLZ9OEgfZALRz0++d2QtR2yvGEIEvtwV6\ +EpFgloR+5idzMKdB6M3HCCFSXfYRoRdgsKZ1G/nC1RUiRcN5SUopGw1OWytZ7t0i1wYomjXYRnFO\ +NpwZqcQbR9u3b5bFSdeh0GJV8yVh61xtQQMtW8X40PId5PsuPhaBP0LUu6VJ6uJvirAFsqH+dTwa\ +zyB2rA5b1EGQGE2ixxAQv6r0qz29T0deFEfpwyGFE5qxFUfTu5OL+oMd/GT8A7l4ghw97PBltdvc\ +bsLd7OPg9Fr+1WSB52SU3mRx5HWXUFb4kzqdd0dzcDHvUDUJ+Q== +exemd5=90e85f8764f6c821a3d9a982dfa045f3 + +401.bzip2=base=at-sniff_64=default: +# Last updated Tue Nov 29 15:35:55 2011 +optmd5=bc2c19ffc5b70d7231469c542ae37eeb +baggage= +compile_options=\ +@eNrFUk1PAjEQve+vmPRsWY1fyYYlkQUJCuwmSEy8EChdrZad0nYx/ntmIQgKB0/SNOmbjzeZN9MB\ +Fnw++ZC50hLQeIWFiwLnrRJ+bMtipux4Ka3Kv2J2wYIk7WcRhJQYTvx17TycqiJ8FQI4XdwWqCHw\ +1jBrJ+MkGxEctNrNUQcA+PzmCnh6SUCYMjb4Ke0t8NxIqblGNI6MsrCod2Y+cZ5a9G+El1J4LrBy\ +4ExqKmPQiMLPCFkplImtW1gPv0/dYWmFbARJBEkSs0MBbB1Kmw9p9hSzH2pYQJJJyH3vrjOk2KEy\ +FqQRELHb7760KeN/VLKg1x08Ht3GCQZdx+k7kVxj59o08azP+AI2rzVUPt5rWKtplfM962oLvdbx\ +BZ1mxuuGNp/ij3K2nFHF2ftFK+yXE9s= +exemd5=0e29458854e5b2375ff42b30709a9ab3 + +403.gcc=base=at-sniff_64=default: +# Last updated Tue Nov 29 15:36:33 2011 +optmd5=bacfe000897612bd4bbd42baa23a8b7a +baggage= +compile_options=\ +@eNrNUl1PwjAUfd+vaPpsh8avZGEkbEyYjm2REaMvC5ROp2UtXYfx33s3nGDAxCdi06S37enpuffc\ +UBRkOXtjWc4ZElLnoigto9QqpzpVVbHIVbpmKs8+bHyGDTcaxxbqALAz05fmaWeeF51nShGBKVoC\ +UyAymMSem7rxFMJw4DnTISK+iRBZXl0gEp1DQGVlS/HO1DUimWSMEy6ELGFTFUrw7TablRpU6heI\ +14xqQkV9IBaMA40UkhZ6AZFiNJe2KldKo6+x1ZEGMfzcjm4pKkVZz3At5Lo23k8JN1eRcxvFiY1/\ +5IcNKAJQ3gT94QTu9nNtEI4XuqO0BfkmNiILAZs/9p88ODlOJRopcXSf9B0/8JPHXb1NTbAR+OHd\ +QVeP6NYvRnXF/BU4yl4N4cvW1UbWAz8hK7RZlYQP7Z0UeD6vMd+e1W4Gg8NG/1NbQPG4n4zSwHfq\ +BuJLvEli05B/LEH7Zlq/2engTxzdOZs= +exemd5=ebebdf6b7d52cf74e63e5a984c610fb6 + +429.mcf=base=at-sniff_64=default: +# Last updated Tue Nov 29 15:36:35 2011 +optmd5=8ba680ea929ddb1acdc4e572b1377b4c +baggage= +compile_options=\ +@eNrFUl1PwjAUfd+vaPpsmcavhDASViagY1tkhMSXBUqn1bKWrsP4770DQUQefJJmSU97P3bOPY1U\ +QRbTN54LyZHSVqiibDqlNYLZzFTFXJhsxY3IPzx8gR0aD5MmciHRndrrxrk7E4X7zBgi8Kltg4ZC\ +pDtKAprRZAww6gb+uIcATTpRmo3SLs2SxziNEVncXCESXwJguvK0eufmFpFccy6JVEqXcKgKo+T3\ +MZ+WFjjbF8Arzixhqr5Qcy6hjVaaFXYOyHAmtGfKpbHocLVKVRnG2w5tIko9/FsRXodi/z5OUg//\ +kIcdmAEouws7vRHEfktdZ/hBRPsZ3WUdaMdO3ETQfDAcPAUQ/59JYCccRA9HLTyBGS01e4Wisg2Y\ +yMXX7YbHRJ6RJdrsRsMfvD3OUszqnJ0ltVlh97iPpxkzEBp20n4WDvzafbnAG46b5/RHhduacV2z\ +9/4+AdfLKLw= +exemd5=7a442766b711b653ca2e0e8167e72958 + +445.gobmk=base=at-sniff_64=default: +# Last updated Tue Nov 29 15:36:48 2011 +optmd5=acaf9c9e7aba68817a53846c334347c5 +baggage= +compile_options=\ +@eNrFUt9PwjAQft9f0fTZMo2/EsJIoAw2hY0E0MSXBbqi1W4tXafxv/fGBFF40BdZuva79q6977uL\ +VE6y+QtfCsmR0laovGg6hTWC2cSUeSpM8sqNWL57+Aw7NB6Nm8gFR3duLxun7kLk7iNjiMBQmwsa\ +CpHeZOzThI5nAKOe350NAASdOz+hcdQPB0mASNio/npyRc5kmfLK2GJEsqsLROJzAEyXnlZv3Fwj\ +stScSyKV0gUYZW6U/DKX88ICJ/sE+JUzS5iqNlTKJVyjlWa5TQEZzoT2TLEyFv38WoUqDeNthzYR\ +pR7eZ4zXR3H3Jh5PPfyNPnZAI2DeH3YGEzjbl2Lt0fUjGiRbpz9qg524ieDtcBQ++BD/P0JhZxhG\ +twc74Ai1aqnFMwQVbcBEZp+7dR738oSsUL0aDS94OzlLsah8thWrajnsHS7zcWSGhEadaZAMw27V\ +HTLDdY51t/2S4SZmVsXstOcH4TE56Q== +exemd5=d1527e67b783d9f35f5e59b27587b7cd + +456.hmmer=base=at-sniff_64=default: +# Last updated Tue Nov 29 15:36:53 2011 +optmd5=9c6dc08b547e10de00f8a341297840b6 +baggage= +compile_options=\ +@eNrFUt9PwjAQft9f0fTZMo2/koWRwECcDrYEiIkvC5ROq92udB2G/96bE0XhwSdpmvSuvbt+3303\ +hoLl81eRSSUIaCuhKD2ntEZym5qqWEqTroWR2canZ9QJ4lHiERcD3bm9bJ26C1m4T5wThhu2BVpA\ +WH+SDII0SGZojvuD3mxICGH51QVh8TkaXFe+hjdhrgnLtBCKKQBdolMVBtS3m81LixDtM9prwS3j\ +UF/AUigso0Hzwi7RMoJL7ZtyZSz5vdolVIaLjhN4JAh8uk+AfjzFvbs4mfr0BxvqIGUkchN1hxN8\ +22dGndgjmBiOwscBRvwPS+pE4fj+oBpHaHQbFi+YVHZqmVX+edvgeFAnbEWa02j8wd/BrOSijvlq\ +dy1E1D+s0XHajIBG3eltGoW9Wn+V0wZjMyp/ZLjNmdU5O7P1DuPlGcI= +exemd5=5780ad1962bbd1d3ed21e609b4077663 + +458.sjeng=base=at-sniff_64=default: +# Last updated Tue Nov 29 15:36:58 2011 +optmd5=bc2c19ffc5b70d7231469c542ae37eeb +baggage= +compile_options=\ +@eNrFUk1PAjEQve+vmPRsWY1fyYYlkQUJCuwmSEy8EChdrZad0nYx/ntmIQgKB0/SNOmbjzeZN9MB\ +Fnw++ZC50hLQeIWFiwLnrRJ+bMtipux4Ka3Kv2J2wYIk7WcRhJQYTvx17TycqiJ8FQI4XdwWqCHw\ +1jBrJ+MkGxEctNrNUQcA+PzmCnh6SUCYMjb4Ke0t8NxIqblGNI6MsrCod2Y+cZ5a9G+El1J4LrBy\ +4ExqKmPQiMLPCFkplImtW1gPv0/dYWmFbARJBEkSs0MBbB1Kmw9p9hSzH2pYQJJJyH3vrjOk2KEy\ +FqQRELHb7760KeN/VLKg1x08Ht3GCQZdx+k7kVxj59o08azP+AI2rzVUPt5rWKtplfM962oLvdbx\ +BZ1mxuuGNp/ij3K2nFHF2ftFK+yXE9s= +exemd5=e5716bba009e00d012dab52b0347dbd3 + +462.libquantum=base=at-sniff_64=default: +# Last updated Tue Nov 29 15:37:00 2011 +optmd5=b56bf6abb3fca6c3609a3fac0f9d130a +baggage= +compile_options=\ +@eNrNUm1PgzAQ/s6vaPrZDo1vCRlLBpsTZYM4iC9fyNYVRQvtSpnx33sMcTObiZ8Wmya9u95dn6fP\ +TURB8tkbSzPOkJA6E0VpGaVWGdWJqopFppIVU1n6YeMTbLjBOLSQCYnmTJ93js15VpjPlCICW7QN\ +OgKRwTQcuokbxmBOBkMnHiGESH5xhkhwCgaVlS3FO1OXiKSSMU64ELIEpyqU4Bs3nZUaIOoXsFeM\ +akJFHRALxqGNFJIWegGWYjSTtiqXSqN2bVAkvjeJH9p4txSVoqxnuBZyXRvvEsLrq8C5CcLIxj/Y\ +YQO+AFpe+f3RFO52mWIjsBAUemPvaQgZh2H9hSu4i/qO53vR4za2hj824LjdK+AhtflFlq6Yv0KT\ +slen8LzVcI3rnh+RJWpOJeFFe4sDz+Z1zrdCtXb+YL+s/1YZwDzuR9fgOvVU8Rw3NJoB/OMntDVx\ +XbM1sZ9+yjag +exemd5=072a69779bd9f3fea83ecba9c082fa8e + +464.h264ref=base=at-sniff_64=default: +# Last updated Tue Nov 29 15:37:40 2011 +optmd5=adcfa1a3e022edb18a206f0122626ab5 +baggage= +compile_options=\ +@eNrVUl1PwjAUfd+vaPpsmcavhDASNhCngy0yYvRlGV0H1W6tXcH4770DJxh44InEZklv13Nvz7nn\ +jmVJivSd5VwwJJXhsqzaVmU0pybRyzLjOlkxzfMvB19gywtHURvZALRTc906t2e8tOeUIgKfbAq0\ +JCL9STTwEi+aQjjuD9zpECFEipsrRMJLCKhaOkp+Mn2LSK4YE0RIqSo4LEstxfaYp5UBimYB8YpR\ +Q6isf8iMCSijpKKlySDSjHLl6OpDG9SsLYskiOqn84rPS5YRukh1A+pUcqkp61peG3meg/fV4fVV\ +6D6EUezgP1KxBf2A+ndBbziBu33Z2ArbCBL9kf86AMRpWvDDK3yKe64f+PHLLrcDzcBW4I8fD1p7\ +SteOMawjZ29QserWeFE0Vq9JPosz8oE2u1bwvLMjSPBZjfn1rnY16B82/H94BgJGvfg+CXy3Hj5R\ +4I2mzZwe2ZEmZ1rn7Az2N7X1SFg= +exemd5=5274a5cb2886c28c9ae848b8aa5fb5e8 + +471.omnetpp=base=at-sniff_64=default: +# Last updated Tue Nov 29 15:38:07 2011 +optmd5=fd7d9d2db5111ea11fabaa5c194a358b +baggage= +compile_options=\ +@eNrFUl1PwjAUfd+vaPqKZRq/EuJIZEycwrYEicSXBbpOq6UtbYfx33sHIhhI9EmaLL23PffunnOa\ +KElmkzdWcsGQ0o4raVuedYZTl5tKFtzkC2Z4+RHgE+yF6SBrIR+A/sSdN4/9KZf+c6OBCEVErRs0\ +FSLdYRaFeZiNIEy6UWfUQyRuwqdmkrmcSyqqgkEu+NT6TC64QYjMLs4QSU8hoLoKtHpn5hKRUjMm\ +iFBKW0gqaZTYpOXEOqDgXiBeMOoIVfWBKpiANlppKl0BkWGU68DYuXFos66sqgxlbS9soXA8DvAu\ +N/x1l3bu0uwhwD+oYg/0AJY3/eveEO52aS8RnSgJb/M16BcdsJe2EPwqHsRPEcD/RxTs9ePkfq+5\ +h/BFTV+hyLY3R6shHsURmaPVbjS0D7YGBg1rzLc7tXP97n5TD6PxcqDVM/ojnXXNqK7Zenefo7wt\ +Pw== +exemd5=7e9cf50dc7378057eec0501b3b5ee4ce + +473.astar=base=at-sniff_64=default: +# Last updated Tue Nov 29 15:38:10 2011 +optmd5=a457661feb168351c64b7dde5dbadfe3 +baggage= +compile_options=\ +@eNrFUktPwkAQvvdXbPaKSzW+ksaS0IdYhbYJEomXBpatri7dZbvF+O+dUpEaOHiSvew8vpnMN9/E\ +siDL2TvLuWBIKsNlUTpWaTSnJtNVseA6WzPN808Xn2HLT0apg2wA2jNz2T2157ywXzodRCgictug\ +KxEJxmnoZ346ATMOQm8yaMUyLxpkYRxE/Rghsry6QCQ5B4OqylXyg+lrRHLFmCBCSlWCUxVaip2b\ +z0oDc5tXsNeMGkJlHZALJqCNkooWZgGWZpQrV5crbdDu3ZSy0pT1LN9B/nTq4n1C+DuXePdJ+uji\ +X/ywBUsAGrfD/mAMuX2uG4QXxv5dtgdqkcdW4iDoH42i5xAw/7MJbA2j+OGgjMcQQ87foKjs7ULN\ +EE/ihKxQ82sF7d3WwILPa8yPJLVcw+CwksfZ8Wag5nb+SGdbM6lrWsf2BYppIx0= +exemd5=14cc939342534d36a5566010ad9ca795 + +483.xalancbmk=base=at-sniff_64=default: +# Last updated Tue Nov 29 15:39:10 2011 +optmd5=adb3409136b8059da83967fe4f9e0c75 +baggage= +compile_options=\ +@eNrtVNtunDAQfecrLF5Tll7SRlqFSF6gG1LAiEtK+2KxXm9KC5gY2CZ/3wHChjSplJdGqlRLiDnj\ +8dg+c8a+qLQy+8F3ecGRqNtcVM1SaVqZs5bKrtrmku65zHe3hvpGVUziBUukQ6Cete8Xr/VNXulX\ +R0dIY0gTU4KFQJoVBbZJzSAB07fsVbJGYOEgoD6h8XloYysCR4pd7FPH92yPetGaugRbdog0ZwHf\ +DZeMN+ze0reifIj0vKyLmavJbmaoa/NC95orV2RbLhvdqTxeCnn7e0gss6phYoxhotr3AVmRVUzP\ +K1Z0Ww5HDUJyQVPPDXAY9Uc8OJLYcSc4TkYTjHB6bM7A28m2iDeZl9h1LByTYRWko0lkUx/HzqVN\ +4xD7kUkGSg5zd2zZUYTX9kRY+eEYaeQdGKzujFr85PIEabua80IrhKgbAF0lRXEPd1nTQvHbb2Dv\ +OWs1JnoH0ACMlrWoWdVuwZKc5bUhm2vZIoRmpaVu0O86w46fpGgYp43ogOEzxVwiM00N9bFo1Ls5\ +srogQWyoDzSkKiA0yPnRxesI5h7raYhY2b55TiHJIe6/xP6OxFSFLBHUyfGcrzYQ/TKCG4ockDDG\ +K8d14i9zJQzyG3WSpn+M6SWpKvD79OTD9YKd87zGQadi8x1yNmfoMMYzfi5eaddo/Msadjdm9yny\ +TR9z6J++t1zr6bb7lws5XGt8Lp5JyrQm6dfM3pdfc5gsNQ== +exemd5=92809c6d5c1652bfac24078faddbb06a + +999.specrand=base=at-sniff_64=default: +# Last updated Tue Nov 29 15:39:12 2011 +optmd5=bc2c19ffc5b70d7231469c542ae37eeb +baggage= +compile_options=\ +@eNrFUk1PAjEQve+vmPRsWY1fyYYlkQUJCuwmSEy8EChdrZad0nYx/ntmIQgKB0/SNOmbjzeZN9MB\ +Fnw++ZC50hLQeIWFiwLnrRJ+bMtipux4Ka3Kv2J2wYIk7WcRhJQYTvx17TycqiJ8FQI4XdwWqCHw\ +1jBrJ+MkGxEctNrNUQcA+PzmCnh6SUCYMjb4Ke0t8NxIqblGNI6MsrCod2Y+cZ5a9G+El1J4LrBy\ +4ExqKmPQiMLPCFkplImtW1gPv0/dYWmFbARJBEkSs0MBbB1Kmw9p9hSzH2pYQJJJyH3vrjOk2KEy\ +FqQRELHb7760KeN/VLKg1x08Ht3GCQZdx+k7kVxj59o08azP+AI2rzVUPt5rWKtplfM962oLvdbx\ +BZ1mxuuGNp/ij3K2nFHF2ftFK+yXE9s= +exemd5=4f1b5a2578a54b9062e544b0e53bd2bc + +410.bwaves=base=at-sniff_64=default: +# Last updated Tue Nov 29 15:39:15 2011 +optmd5=e4a7fb0132bc7e4c8c2aa75027c45fc3 +baggage= +compile_options=\ +@eNrFUk1PAjEQve+vaHq2rMavZMOSyC4QFNhNkJh4IUvparV0StvF+O+dZYPgAeMJe+l8vcmbNzMB\ +zVbFuyilEgSMl6BdFDhvJfdzW+mltPONsLL8jOkFDZJsnEckxMKw8Net83AhdfhSgvW20IRxwmDX\ +pQWErW6uCMsu0eCmig18CHtLWGmEUEwBGIdOpS2ovVsWziMj/4r2RnDPONQBWAqFbQwYrv0SLSu4\ +NLF1a+tJ20FluegESUT6SUyP8KPbfNa9z/LHmP4gSwMcK8ln/dHdYIq5dJr3kjkGCEsnaa87G9Ag\ +iwgCh+Phcw8rTjMaDUbDycNxxU8m8f61YfGGINfZhxoST+qMrUnzW4Pt4wPWSi7qmm/B61WM0l9W\ +9T9qb1k15/HHmXaYWY05uKcvj4wVMA== +exemd5=d897ecc8bd4133298631631f854981fc + +416.gamess=base=at-sniff_64=default: +# Last updated Tue Nov 29 15:43:44 2011 +optmd5=1b89a300097b6147005af3b072f45575 +baggage= +compile_options=\ +@eNrFUl1PwjAUfd+vaPpsQeNXJIwExmDTsS0CMfFlGV2n1W4tXcGPX++dIJAYDE/Yl57e3tt7zukN\ +ZUmK9JXlXDAkleGyrFpWZTSnJtGLMuM6WTLN8w8bn2FrEMctVClGlUKI9Mex6yROPE3CKPGiIHDv\ +/Ym3EwcY9t3edIgQaldyoSnrICI3uJErxT9Z1shv3i14ueeGjpdAk0HQHY5tvKcDrnMh+Ctr0w9b\ +TjSCpCZIaqbmsnHanPGy+ZRLbXRaIkJrGmu9DYlIcXWBSHQOgKqFreQb09eI5IoxQYSUqoLDotRS\ +bI95WhnwzjwDXjJqCJV1QGZMwDNKKlqaDJBmlCtbV3NtNsItp4UGjo338MPf91HvNoonoG+X7CHa\ +oxaCQn/kP7qQcRxp2Ar88G6/40ezeLvacvYCRVUHMBHFOrri8SBOyBytdq2gg71DXPBZnbPxvP6N\ +oP/Hb/2P4cBq1J14SeD36kkQBV4RXQ3NgTJ/aqZ1zc6UfQHKSUv4 +exemd5=854fd878bda6d442721540b2be4e6341 + +433.milc=base=at-sniff_64=default: +# Last updated Tue Nov 29 15:43:50 2011 +optmd5=ddf55b1a2655acca563269de5d95a74e +baggage= +compile_options=\ +@eNrFUltPgzAUfudXNH22m8ZbsogJK7hNNyCDqfGFsK5otaO1dBr/vQcmOrM9GB+UNPTce853vlCV\ +ZJk/8UJIjpS2QpVVz6msEcxmZlUuhMleuBHFm4sPsEOjSdxDXQjs5va4s9+di7J7zxgicFRboKMQ\ +8ZM4oBmNZyCGftCfDRAZdUC5COufl6Rw0SgcTD0/Sydxdh3QNJomYPWTsZcMG+N4FF4lCJHlyREi\ +0SEITK9crV65OUWk0JxLIpXSFSir0ij5pRZ5ZWE0+wDyC2eWMFUb1IJLKKOVZqVdgGQ4E9o11bOx\ +6PMjRanIGgWSS5FXorz/cJ1VamUYP3doD1Hq4m0wcOOK+pdRnLr4GzLYAfgAlIuxN0jAt41SE9EP\ +QjrM2qBfwoadqIeghdFkdBdAmb/BsHk1uE2nXkbbAXaAiZ26x51U+vttozM1f4Sk6rxevVy2JGj6\ +uJF75Bmtb6PhBXejZynmdcznfuvNj/3dpPifbUBDEy8dAiX69SrkEq97XHPzhxO2ObM6Z4PM7wu8\ +URg= +exemd5=034e5bd6e33db671210f299d0b25fba5 + +434.zeusmp=base=at-sniff_64=default: +# Last updated Tue Nov 29 15:44:13 2011 +optmd5=98b9dcb28ba7925eac08108656d0cd7f +baggage= +compile_options=\ +@eNrFUl1PwjAUfd+vaPpsN41fcWEkMj6CAluCxMQXMrpOq6O3tB1+/HrvQIEHNTxhX3p6e8/JObcd\ +gWLz7EUUshQEtJOgbOhZZyR3U1OpXJrpUhhZvEf0hHrdNA2J1YJrTQhh7XHaiadxOkE4andakx5W\ +GxYqw0WTMNhgv9BafojcL67ePJRASndw3RtH9AcN6sXJEJsC9BNk7tw/DmZSBY8FGGcyRRivpb/M\ ++kDY/OKMsOQUAddVpOFVmEvCCi1EyUoAbfFQKQPl9lhk1mFw94R4KbhjHOoC5KJEGQ2aK5cjMoJL\ +HRm7MG4TxotD0o0j+os/urpPWjdJeof5ds3SPbInIUFif9h/6GDHYaJRb9Af3f4+8YONeLsaMHtG\ +km1uS2sT9+URW5D1bjTKRzuuSzmrezYDr59i0P7jqf5n2itX6++xZ6ZvzqTm7PynT/C/Mvg= +exemd5=a93dc364d53fc0e3f94d168643ab3c26 + +435.gromacs=base=at-sniff_64=default: +# Last updated Tue Nov 29 15:44:31 2011 +optmd5=56a59316ed0bdee07f67b711b467fa18 +baggage= +compile_options=\ +@eNrFVNtuwjAMfe9XRH1eyqbdtIoiQSjQDdpKwCbtpYKQbtlCk6WBXb5+LrehARPaA/Sltmu75+TY\ +CWWGx4NXlnLBkFSGyyx3rdxoTk2iJ9mI62TKNE8/PfvMthpx7KJcMaoUQgjXu7FPEhL3wQzrfq3f\ +hGg5lxNNWQVhubKdVCn+xUZOevNhQQsoabSrza5nb+lhWyTqQFIJ8JQG5tI5LQ15VnpKpTZ6kCFM\ +i9YLsI5EeHx1gXB0DgZVE0/Jd6avEU4VYwILKVUOziTTUvy46SA3QNw8gz1l1GAqi4AcMQFtlFQ0\ +MyOwNKNceTp/02ZFxiIuahDP3oHPnn2PardR3AN+62DtPbhHLoLCoBM8+pBxGGq7TpzSzcPepjkO\ +HPBa1Xs/IVHYCJpJ62Cq/H7WVSJbVKJ0JhD5t0CQUfND0krIMmuT/bFkbAfh3e7FOYImZTl8gaK8\ +UlwXYryIznE8iBP8huZvreAP3hpwwYdFzkqZQrN2/Y+lO9LeuKhT7bWSdlArJkGM7TnQ+WjtSXNZ\ +0y9q1mbxG+7iw9A= +exemd5=75791b129744f7db845018a537b9c432 + +437.leslie3d=base=at-sniff_64=default: +# Last updated Tue Nov 29 15:45:48 2011 +optmd5=e4a7fb0132bc7e4c8c2aa75027c45fc3 +baggage= +compile_options=\ +@eNrFUk1PAjEQve+vaHq2rMavZMOSyC4QFNhNkJh4IUvparV0StvF+O+dZYPgAeMJe+l8vcmbNzMB\ +zVbFuyilEgSMl6BdFDhvJfdzW+mltPONsLL8jOkFDZJsnEckxMKw8Net83AhdfhSgvW20IRxwmDX\ +pQWErW6uCMsu0eCmig18CHtLWGmEUEwBGIdOpS2ovVsWziMj/4r2RnDPONQBWAqFbQwYrv0SLSu4\ +NLF1a+tJ20FluegESUT6SUyP8KPbfNa9z/LHmP4gSwMcK8ln/dHdYIq5dJr3kjkGCEsnaa87G9Ag\ +iwgCh+Phcw8rTjMaDUbDycNxxU8m8f61YfGGINfZhxoST+qMrUnzW4Pt4wPWSi7qmm/B61WM0l9W\ +9T9qb1k15/HHmXaYWY05uKcvj4wVMA== +exemd5=83e0cc01fda1accc5b3969a31dc146cd + +444.namd=base=at-sniff_64=default: +# Last updated Tue Nov 29 15:46:19 2011 +optmd5=8585eb4e03cd63bf315367d5393b9139 +baggage= +compile_options=\ +@eNrFUk1PAjEQve+vmPSqZTV+JRuXRBYkKLCbIJF4IVC6Wi07pe1i/PfOiggGDp6kl87Xm7w3M30s\ ++HzyJnOlJaDxCgsXBc5bJfzYlsVM2fFSWpV/xOyUBUnayyIIqTCc+IvaSThVRfh8dARcAMd1gxoC\ +bw6yVjJOsiGZ/WarMWwDAJ9fngNPz8gQpowNvkt7BTw3UmquEY0jpyws6o2bT5wniv6F7KUUngus\ +AjiTmtoYNKLwM7KsFMrE1i2sh827dlhaIetBEkEyGsVslzv7zqWNuzR7iNkvKSwgvaTitnvTHlBu\ +VxYL0ggI2Ol1nlpU8T8SWdDt9O/3ruIQU8bpK4FcfRNakXjUx3wBq98aah9vEdZqWtX8zLraQ7e5\ +f0WHmfEXodVR/FHOGjOsMFtX9AmAKxJ4 +exemd5=8e283b97be728935040fc8b2a8d632c3 + +447.dealII=base=at-sniff_64=default: +# Last updated Tue Nov 29 15:47:34 2011 +optmd5=501482e974c20aaedf151d0d9a847090 +baggage= +compile_options=\ +@eNrdU01v1DAQvedXjHIt7oL4klZNpc0HrSHdRE1WBC7WruOAwRu7tlPEv2eSZdtFXSTUQw/MxePx\ +eGbe8/NS92S7/i46qQRo46Xu3Txw3krumR36Vlp2K6zsfkbhizBIiqtyDjNMnK3969Pns43sZ19O\ +ToBwIHpf4FQDSasyS1hSrtBdplm8ugAgVPZcDa3AWFwUVc1SWi3iPGP15XW2SCuMt2KtGKWslVvR\ +O6wWvQSyffMKSDE63AyR0T+EfQukM0IoorQ2DjdDb7W633Zr5xGZ/4r+reCecD0GdCsUljHa8N63\ +6FnBpYmsu7Ee0O7nZnk5dj3Y0+WqAbKHwJ1vW9HBZGdOD5aL8yCZQ9I0UfiQovD3WRG/L8o6Cv9g\ +LAyQVmzyLl9cVHj2kL0pI86WySXDIvu8xxEaBsUccAh6RT9nWOVp6J0QlMV1vYhpTutPhzAnsnck\ +NM1fc44+QBhg/MNRUT6hcB6pGzjTm2/YxJ3Dne2G/qiekRvYrdbgONEBQCU3Y86dfEZp5elx1f1X\ +Tz3h3H2ff2Rpf2c13jn4b78As9OMqg== +exemd5=87827d708bc3746ea5bbd6f8a5c88796 + +450.soplex=base=at-sniff_64=default: +# Last updated Tue Nov 29 15:47:43 2011 +optmd5=8585eb4e03cd63bf315367d5393b9139 +baggage= +compile_options=\ +@eNrFUk1PAjEQve+vmPSqZTV+JRuXRBYkKLCbIJF4IVC6Wi07pe1i/PfOiggGDp6kl87Xm7w3M30s\ ++HzyJnOlJaDxCgsXBc5bJfzYlsVM2fFSWpV/xOyUBUnayyIIqTCc+IvaSThVRfh8dARcAMd1gxoC\ +bw6yVjJOsiGZ/WarMWwDAJ9fngNPz8gQpowNvkt7BTw3UmquEY0jpyws6o2bT5wniv6F7KUUngus\ +AjiTmtoYNKLwM7KsFMrE1i2sh827dlhaIetBEkEyGsVslzv7zqWNuzR7iNkvKSwgvaTitnvTHlBu\ +VxYL0ggI2Ol1nlpU8T8SWdDt9O/3ruIQU8bpK4FcfRNakXjUx3wBq98aah9vEdZqWtX8zLraQ7e5\ +f0WHmfEXodVR/FHOGjOsMFtX9AmAKxJ4 +exemd5=a91aaf5b2c2cabc6ac993401948a6e5b + +453.povray=base=at-sniff_64=default: +# Last updated Tue Nov 29 15:47:57 2011 +optmd5=8585eb4e03cd63bf315367d5393b9139 +baggage= +compile_options=\ +@eNrFUk1PAjEQve+vmPSqZTV+JRuXRBYkKLCbIJF4IVC6Wi07pe1i/PfOiggGDp6kl87Xm7w3M30s\ ++HzyJnOlJaDxCgsXBc5bJfzYlsVM2fFSWpV/xOyUBUnayyIIqTCc+IvaSThVRfh8dARcAMd1gxoC\ +bw6yVjJOsiGZ/WarMWwDAJ9fngNPz8gQpowNvkt7BTw3UmquEY0jpyws6o2bT5wniv6F7KUUngus\ +AjiTmtoYNKLwM7KsFMrE1i2sh827dlhaIetBEkEyGsVslzv7zqWNuzR7iNkvKSwgvaTitnvTHlBu\ +VxYL0ggI2Ol1nlpU8T8SWdDt9O/3ruIQU8bpK4FcfRNakXjUx3wBq98aah9vEdZqWtX8zLraQ7e5\ +f0WHmfEXodVR/FHOGjOsMFtX9AmAKxJ4 +exemd5=a39fc1b7533100c7438b7a51e078676f + +454.calculix=base=at-sniff_64=default: +# Last updated Tue Nov 29 15:48:27 2011 +optmd5=8248bc0592f130154dc6d1d383d1bfeb +baggage= +compile_options=\ +@eNrdk1Fv0zAQx9/zKSw/z83YxhAVmdSm6RZIm4i2AvESpa6zGhzbc5wN+PQ7Z0tXQYsmHjppfjqf\ +z3/f3e88VZJUxQ9WcsGQ0pYrWfe92hpObW4aueImv2WGl78C/AZ74yzro1ozqjVCiIxmWRTmYbYA\ +czqKhotL8H6oVWMou0BEbexeqTX/zVa98v1PDyTgyjgZXM4CvEMDe2E6gSAf8vEL+7Z37C+59K9L\ +ZawpJCLUST8m21OIxLMsTZNohkh1foZIegoG1U2g1R0z7xApNWOCCKV0DZtGGiWetmVRW2iBXYN9\ +y6glVDmHWjEBMlppKu0KLMMo14Gpb4zdlOWFfTQOA7wnU9yep8OPaTaHSrfTxs/oAkQMo2l4lXdB\ +XZ3YS/sINONJ/C0C/2Gq3oeF0r+J7BiMJ0oHw/Tn2sYW7sBGaUssfD3Eknj6af9HOjQI8kUcEXJn\ +Cn1U2EKeIH+tKuZruy6aayZ9wZd+e5C7GM1Mfn4G0wTg1PI7PFVfOBFRdXJt9k7z5lHbaMgr2CoX\ +FF3MBqLDm4z+8WFfBhO8Gn2dfx7kyaibnP9qVTu+k8H8Kk/ioVMRFX4o+WGen9mw7s7C3dn6APen\ +dvMw +exemd5=fd6c1bdafb1b6210244920e4be972fd7 + +459.GemsFDTD=base=at-sniff_64=default: +# Last updated Tue Nov 29 15:52:45 2011 +optmd5=98b9dcb28ba7925eac08108656d0cd7f +baggage= +compile_options=\ +@eNrFUl1PwjAUfd+vaPpsN41fcWEkMj6CAluCxMQXMrpOq6O3tB1+/HrvQIEHNTxhX3p6e8/JObcd\ +gWLz7EUUshQEtJOgbOhZZyR3U1OpXJrpUhhZvEf0hHrdNA2J1YJrTQhh7XHaiadxOkE4andakx5W\ +GxYqw0WTMNhgv9BafojcL67ePJRASndw3RtH9AcN6sXJEJsC9BNk7tw/DmZSBY8FGGcyRRivpb/M\ ++kDY/OKMsOQUAddVpOFVmEvCCi1EyUoAbfFQKQPl9lhk1mFw94R4KbhjHOoC5KJEGQ2aK5cjMoJL\ +HRm7MG4TxotD0o0j+os/urpPWjdJeof5ds3SPbInIUFif9h/6GDHYaJRb9Af3f4+8YONeLsaMHtG\ +km1uS2sT9+URW5D1bjTKRzuuSzmrezYDr59i0P7jqf5n2itX6++xZ6ZvzqTm7PynT/C/Mvg= +exemd5=2e543438efb6600bc72ba3521cea1579 + +465.tonto=base=at-sniff_64=default: +# Last updated Tue Nov 29 15:57:10 2011 +optmd5=19ce47d7fa9752fa101624e35aa12a38 +baggage= +compile_options=\ +@eNrFUk2P0zAQvedXWDnjdBFfotqs1CZuCbR21LRC4mKlrgMGN+N13F3g1zNpd9tKq0V7QIsvfmPP\ +jN97Yw4t3dY/dGOsJuCCgbYbRl3wRgXpd+3GeHmjvWl+pfHLOJqU5ZB0TivnCKG3hOarislyweSI\ +57IU1VJmgufFshC8urtli4VYyPmIj6ZszviS0C2xJmhf28Rt+yhAG2CP86pkmczKFUKes/FqSgi5\ +7GDnlb4iFI44aZwzv/Umad7/jJDTmPHsg0R6k9loWqXxP+cW968gsfv+D5nGUSbmmDRAGwd1eJNc\ +DNamHXxtwAdft4SqXsCdxwlg87evCRWvECi3Sx3cav+O0MZpbakFcB0Gu9aDPYVN3QWcV/iG+Ear\ +QBX0B7DRFts4cKoNG0ReK+NS3137cLQsyoZkkqXxI/zi/b0YfxTlEvWdk32KdjEkWFjMiy8MM55H\ +WhzNCv7pccefzeLTuoT1dyzqrk5HBxKf7Qt6TQ67d9g+PWNtzbrPORrej2KW/2VU/8ftPavD93ii\ +pvuaVV9z9p/+AIk6aos= +exemd5=f3b82b5f65a204b8b814e7ae56eed7d3 + +470.lbm=base=at-sniff_64=default: +# Last updated Tue Nov 29 15:57:12 2011 +optmd5=9c6dc08b547e10de00f8a341297840b6 +baggage= +compile_options=\ +@eNrFUt9PwjAQft9f0fTZMo2/koWRwECcDrYEiIkvC5ROq92udB2G/96bE0XhwSdpmvSuvbt+3303\ +hoLl81eRSSUIaCuhKD2ntEZym5qqWEqTroWR2canZ9QJ4lHiERcD3bm9bJ26C1m4T5wThhu2BVpA\ +WH+SDII0SGZojvuD3mxICGH51QVh8TkaXFe+hjdhrgnLtBCKKQBdolMVBtS3m81LixDtM9prwS3j\ +UF/AUigso0Hzwi7RMoJL7ZtyZSz5vdolVIaLjhN4JAh8uk+AfjzFvbs4mfr0BxvqIGUkchN1hxN8\ +22dGndgjmBiOwscBRvwPS+pE4fj+oBpHaHQbFi+YVHZqmVX+edvgeFAnbEWa02j8wd/BrOSijvlq\ +dy1E1D+s0XHajIBG3eltGoW9Wn+V0wZjMyp/ZLjNmdU5O7P1DuPlGcI= +exemd5=6b3cb07e3f8757843bfc65edb6fc3b6d + +482.sphinx3=base=at-sniff_64=default: +# Last updated Tue Nov 29 16:05:12 2011 +optmd5=3f0b6cbb3595b9967a4e825fd32f87bd +baggage= +compile_options=\ +@eNrVU1tvgjAUfudXNH1edctuiRETQRQ2BTN1txeitWi3SrtSXPbvd9AxNfrgXkxGSDg9137f+Qhl\ +Shbjd5ZwwZBUhss0q1mZ0ZyaWOfplOt4yTRPvmx8gS036vVrqAqJ1bG5rpxXJzytzihFBF5ZNqhI\ +RFqDvufGbn8EZtjynFEHkaCy6/ebj17sRmE76MT+OhwIPskNFwghsri5QiS6BIOq3Fbyk+lbRBLF\ +mCBCSpXBIU+1FJtjMs4M4DFzsJeMGkJl4ZBTJqCNkoqmZgqWZpQrW2cf2qDy2Vwt7gbh6BlaZHyW\ +simh87Eus+qZzDVlDcutIde18T4XeBWKnLuoP7TxDjHYAvZgQLvb7Awgtk/SKsPxQtePy6S/sIat\ +qIZgbtALXj2oPQ2FP7Cih2HTCbrB8GUb2iEysQXO+4NCOuXaj9p4XU7eoGXWKArEohTL6pZP4ox8\ +oPVXK5hvbyGCnRQ5v8svZNFtHVbMP9kaIOg1hz4EnUKZYoHXoNZKP5KSsmZU1Gz9Gt+/G2fv +exemd5=b27b54408bebf3afe7ef62650bbec5f8 + +998.specrand=base=at-sniff_64=default: +# Last updated Tue Nov 29 16:05:14 2011 +optmd5=bc2c19ffc5b70d7231469c542ae37eeb +baggage= +compile_options=\ +@eNrFUk1PAjEQve+vmPRsWY1fyYYlkQUJCuwmSEy8EChdrZad0nYx/ntmIQgKB0/SNOmbjzeZN9MB\ +Fnw++ZC50hLQeIWFiwLnrRJ+bMtipux4Ka3Kv2J2wYIk7WcRhJQYTvx17TycqiJ8FQI4XdwWqCHw\ +1jBrJ+MkGxEctNrNUQcA+PzmCnh6SUCYMjb4Ke0t8NxIqblGNI6MsrCod2Y+cZ5a9G+El1J4LrBy\ +4ExqKmPQiMLPCFkplImtW1gPv0/dYWmFbARJBEkSs0MBbB1Kmw9p9hSzH2pYQJJJyH3vrjOk2KEy\ +FqQRELHb7760KeN/VLKg1x08Ht3GCQZdx+k7kVxj59o08azP+AI2rzVUPt5rWKtplfM962oLvdbx\ +BZ1mxuuGNp/ij3K2nFHF2ftFK+yXE9s= +exemd5=4f1b5a2578a54b9062e544b0e53bd2bc + +400.perlbench=base=at-sniff_64=default: +# Last updated Mon Jan 30 11:37:47 2012 +optmd5=42afc777690ead0248b7fe372d2b33f4 +baggage= +compile_options=\ +@eNrVU1tPwjAUft+vaPpsReMtIc6ElanTwRoc8fKyjFK0WtbaFYz/3rPBEAMmPJm4NNk5PZd+5+vX\ +vi7INH8TE6kE0sZJXZRtr3RWcpfZWTGWNpsLKyefPj7EHk16rI1akNjK3cn+QWski9Yz54jA0k2D\ +fY1I946FNKNsCGa/GwbDKzBYOIgzmgxChMj09BiR5AgMbma+0R/CniEyMUIoorQ2JTizwmr17U7y\ +0gFa9wL2XHBHuK429FgoaGO04YUbg2UFl8a35bt1aPl948liVp285kf94UPGGIWuhSaL2UmuZF7K\ +4nlZf17qmeXiwqNtRKmPNynAdSgJbhKW+vgHH9gD0uCoy7hzdQexTW7qjCDs0+tslbQiC3tJG0HX\ +qBc9hRD5G+ZqSCwZpJ0giqP0cR13zeFyqt8yGlZr9OFDOuhktJltC8/Yg4rbrdr6Q63sJJOlIvTo\ +FfqWF1WZmjY6q6Heqz3yjhZ/awCEvzaWkqMqZ6WOSjdxd7uk/vfFw2C9TnoNW0F162qKF7MuXsiO\ +TDU1w6pm7Ul9AdLYdK4= +exemd5=6d9d680c334f157beb7b1849d738617b + +436.cactusADM=base=at-sniff_64=default: +# Last updated Mon Jan 30 11:45:24 2012 +optmd5=253cea25658ec7baaffdb75c2716c3cd +baggage= +compile_options=\ +@eNrNU11P2zAUfc+vsPyMk00bICKC1DgpBNImGq0QvESt42wGNzaOA9t+/W5a2kWiRYiHCr/kXufc\ +j3PP9VjVZDF74JWQHClthaob32msEcwWpq1LYYonbkT1J8BfsTPMcx81mjOtEUIkus5jWtB8CuY4\ +isPpee+uSPOj74A6bVRrGD9DRG1st9Ja/OWlW538diAlwIfp4Pw6wFty4g6RZz8mgzBJk8ltH7Qs\ +gh2ajQDjAQFvZg/dL95c1N7PShlrZjUirKv9ws5ViCygMZJ9A4PpNtDqmZtjRCrNuSRSKd2A09ZG\ +yf9uNWssTMr+AvuJM0uY6i5UySWk0Uqz2pZgGc6EDkzzaOyGrUN9NKQB3tEfXv7PwsssnwC3frP4\ +HcPJfASBySi5iwGxH2ofloSx12ps2SJEElEz2ZYcLNf1Nk5EaRbFe1Pw5bxe6tXpC0y3CMzYUlv6\ +YW0BEcZjelHQNerNuXzaZUiT8dXu97lHOXcoearm95CjOesgcrGWfdnWjTwgj2j1NRoKBj0eUsw7\ +zEbUTu40euOpf9bX6qPRYHJRpEnYbZlc4BWT1dq+cw7rmGkX09vzf3Sj/Ho= +exemd5=9f8f820434ccbda10a1c3a6b8bd4fac5 + +481.wrf=base=at-sniff_64=default: +# Last updated Mon Jan 30 12:01:56 2012 +optmd5=28d3d67fad35a96f4eb1de64e4485492 +baggage= +compile_options=\ +@eNrdU9uOmzAQfecrLJ4LSbbXRGUlwiV1FzAKRLvti5UY09IS7DXObtuvr50rq02qPKXS+sVzxmN7\ +5pyZhDXWcv6TllVNAeOyYk07MlopKiKxWDVFJfADFVX52zEHphGm6Qi0nBLOAbAegbUEdSWpmNc2\ +XwIL2sDyYZJDpPdbNPUz+DVw3ig0fYKiJygJcs8PlRHE2EPTwBloZ7wFfQU85MZpdsDBXXoA4bCP\ +s9xNfDdCSbCOTkI4weNZiKMgcT4MhlfKG7t32EexC5MMh87V+g+EEzcOIpjlOJ2qxJUvSwMPe+lM\ +H/vBeDbp+LDnZgEOI3cCAPjYspUg9BpYbG/bJefVH1rY5fCXoagaB4n3CSvW9J3MMV8gZaauU3Gz\ +q/A5gdsINM3dMYxg/qUbdaDUNDwUq8ieasPeXL61+71F1fS+lUxIMW+ARTTT2x612YY6aPcaKklR\ +9qqG1KuCKn7fKYLQa2UQvnI4e6TiPbBKTmlt1YzxVoFVI1h9gOW8lWoM5HdlP1AiLcK0gxW0Vs9w\ +xkkjC2UJSiruiPZeyL3khjcCoeeYJ9I21+do/Bmluaq7W8OZzG17aBt0tGjTQCOgPoCx7g/zQhSc\ +EoyQ51odG6vj+l1MwN06Md7r1RXZOyIyIWt9vReq75lzG8Hk5vTcXlxQJRtb/FCX2uuDa5PEbf3K\ +ugebXXD1vNPJuq4WOmavn1Y28v8x2f9p6HRWm247s6bdnZm+02nPv81wbdk= +exemd5=dc58d86aa2b9119b96114552c4260aac + diff --git a/fvtr/speccpu2006/atan2_wrapper.c b/fvtr/speccpu2006/atan2_wrapper.c new file mode 100644 index 000000000..6321bce88 --- /dev/null +++ b/fvtr/speccpu2006/atan2_wrapper.c @@ -0,0 +1,26 @@ +/* Copyright 2017 IBM Corporation +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +static double zero = 0.0; + +extern double __real_atan2 (double, double); + +double +__wrap_atan2 (double x, double y) +{ + return __real_atan2 (x + zero, y + zero); +} + + diff --git a/fvtr/speccpu2006/speccpu2006.exp b/fvtr/speccpu2006/speccpu2006.exp new file mode 100755 index 000000000..faaa64bb3 --- /dev/null +++ b/fvtr/speccpu2006/speccpu2006.exp @@ -0,0 +1,175 @@ +#!/usr/bin/expect +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Check if AT can compile and run some SPEC CPU 2006 benchmarks +# The SPEC CPU 2006 must be installed and it's environment set, as explained at +# http://www.spec.org/cpu2006/Docs/install-guide-unix.html#s6 + +source ./shared.exp + +if { [array names env -exact SPEC] == "" } { + printit "Skipping: Didn't find an installed SPEC CPU 2006." + printit "Check if it's environment is loaded." + exit $ENOSYS +} + +if { [file exists $env(SPEC)] == 0 } { + printit "Directory $env(SPEC) not found." ${ERROR} + exit 1 +} + +set gcc_path [compiler_path] + +# Build the 32-bit wrapper for atan2 +# https://ltc3.linux.ibm.com/wiki/Lop_Toolchain/GCC/Power7_spec2006/atan2_wrapper +if { [catch {exec mktemp} tmp] != 0 } { + printit "can't create temporary file" ${ERROR} + exit 1 +} + +set LIB32_ATAN2 "" +if { $TARGET32 } { + printit "\t\t\t Building 32-bit wrapper for atan2" + exec ${gcc_path} -m32 -c -o ${tmp} ${FULLPATH}/atan2_wrapper.c >&@ \ + ${OUTPUT} + set LIB32_ATAN2 ${tmp} +} + +set LIB64_ATAN2 "" +if { $TARGET64 } { + # Build the 64-bit wrapper for atan2 + if { [catch {exec mktemp} tmp] != 0 } { + printit "Can't create temporary file" ${ERROR} + exit 1 + } + printit "\t\t\t Building 64-bit wrapper for atan2" + exec ${gcc_path} -m64 -c -o ${tmp} ${FULLPATH}/atan2_wrapper.c \ +>&@ ${OUTPUT} + set LIB64_ATAN2 ${tmp} +} + +# Select config set +# Different versions of the compiler, requires different flags for specific +# benchmarks. A good example is what happened with 416.gamess on GCC 4.8. +switch -regexp $env(AT_MAJOR_VERSION) { + 5.0|6.0 { + set cfg_set "" + } + 10.0 { + set cfg_set "10.0" + } + default { + set cfg_set "7.0" + } +} + +# Define the config files to use for building +set build_configs "" +if { $TARGET32 } { + lappend build_configs "at${cfg_set}-sniff32" +} +if { $TARGET64 } { + lappend build_configs "at${cfg_set}-sniff64" +} + +# Define the config files to use for running +if { $env(AT_CROSS_BUILD) == yes } { + # We can't run on x86 machines + set run_configs {} +} else { + set run_configs $build_configs +} + +if { $BLD_ARCH_PPC64LE } { + set endianness "little" +} else { + set endianness "big" +} + +# Set MAKEOPTS +if { [catch {exec grep -c processor /proc/cpuinfo} cpus] != 0 } { + printit "\t\t\t Can't identify the amount of processors." + set MAKEOPTS "" +} else { + if { ${cpus} == 0} { + set MAKEOPTS "" + } else { + set mem [exec free -m | awk "/Mem:/ {print \$2}"] + # Assume that each thread consumes 512 MiB of RAM. + # Some f951 processes consume more than that, though. + set threads [expr $mem / 512] + if {${threads} <= ${cpus}} { + set MAKEOPTS "-j${threads}" + } else { + set MAKEOPTS "-j${cpus}" + } + } +} + +# Copy config files +foreach config ${build_configs} { + if {! [file exists speccpu2006/${config}.cfg]} { + printit "Couldn't access file speccpu2006/${config}.cfg" $ERROR + exit 1 + } + printit "\t\t\t Copying ${config}.cfg to $env(SPEC)/config/" + file copy -force speccpu2006/${config}.cfg $env(SPEC)/config/ +} + +# Build +foreach config ${build_configs} { + printit "\t\t\t Building SPEC CPU 2006 with configuration ${config}." + spawn runspec -c $config --define BASE_DIR=$env(AT_DEST) \ + --define MAKEFLAGS=${MAKEOPTS} \ + --define CC=[compiler_path] \ + --define CXX=[compiler_path g++] \ + --define FC=[compiler_path gfortran] \ + --define LIB32_ATAN2=${LIB32_ATAN2} \ + --define LIB64_ATAN2=${LIB64_ATAN2} \ + --define ENDIANNESS=${endianness} \ + -I --rebuild --action build int fp + expect { + -timeout -1 + "debug log" { + printit "Failed to build SPEC SCPU 2006 with configuration ${config}" ${ERROR} + exit 1 + } + eof { + printit "\t\t\t SPEC CPU 2006 with configuration ${config} built." + } + } +} + +# Run +foreach config ${run_configs} { + printit "\t\t\t Running SPEC CPU 2006 with configuration ${config}." + spawn runspec -c ${config} --define BASE_DIR=$env(AT_DEST) \ + --define MAKEFLAGS=${MAKEOPTS} \ + --define LIB32_ATAN2=${LIB32_ATAN2} \ + --define LIB64_ATAN2=${LIB64_ATAN2} \ + -I --size test int fp >&@ $OUTPUT + expect { + -timeout -1 + "debug log" { + printit "Failed to run SPEC SCPU 2006 with configuration ${config}" ${ERROR} + exit 1 + } + eof { + printit "\t\t\t Execution of SPEC CPU 2006 with configuration ${config} succeeded" + } + } +} + +exit 0 diff --git a/fvtr/sphde/sphde.exp b/fvtr/sphde/sphde.exp new file mode 100755 index 000000000..55d954010 --- /dev/null +++ b/fvtr/sphde/sphde.exp @@ -0,0 +1,97 @@ +#! /usr/bin/expect +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# +# Tests for SPHDE +# + +source ./shared.exp + +set rc 0 + +set CXX [compiler_path g++] +set CFLAGS "-O2 -Wall" +set LIBS "-lsphde -pthread" + +if { [array names env -exact "AT_LIBSPHDE_VER"] == "" } { + printit "WARNING: SPHDE is not configured in the config file." + printit "Skipping..." + exit $ENOSYS +} + +# +# Provide install prefix based on build type +# +if { $env(AT_CROSS_BUILD) == "yes" } { + if { $env(AT_BUILD_ARCH) == "ppc64le" } { + set install_prefix "$env(AT_DEST)/$env(AT_BUILD_ARCH)/usr" + } else { + set install_prefix "$env(AT_DEST)/ppc/usr" + } +} else { + set install_prefix $env(AT_DEST) +} + +# +# Check if SPHDE executables are available +# +if { $TARGET32 } { + if { ![file exists $install_prefix/bin/sasutil] } { + printit "ERROR: $env(AT_DEST)/bin/sasutil is missing." + set rc 1 + } +} +if { $TARGET64 && $env(AT_BUILD_ARCH) == "ppc64le" } { + if { ![file exists $install_prefix/bin/sasutil] } { + printit "ERROR: $env(AT_DEST)/bin/sasutil is missing." + set rc 1 + } +} +if { $TARGET64 && $env(AT_BUILD_ARCH) != "ppc64le" } { + if { ![file exists $install_prefix/bin64/sasutil] } { + printit "ERROR: $env(AT_DEST)/bin64/sasutil is missing." + set rc 1 + } +} + +# +# Check if AT is able to build and link against SPHDE library +# This test checks for important headers and both static and dynamic libs +# +set tmp_file [exec mktemp] + +if { $TARGET32 } { + # To verify that the libraries exist, they are explicitly linked in + # even though that is not necessary in practice. + printit "Testing 32 bit static linking..." + compile "${CXX} -m32 -static ${CFLAGS} ${LIBS} $FULLPATH/test.cpp \ + $install_prefix/lib/libsphde.a -o ${tmp_file}" + printit "Testing 32 bit dynamic linking..." + compile "${CXX} -m32 ${CFLAGS} $FULLPATH/test.cpp \ + $install_prefix/lib/libsphde.so -o ${tmp_file}" + printit "Successfully built and linked against 32 bit libraries" +} + +if { $TARGET64 } { + printit "Testing 64 bit static linking..." + compile "${CXX} -m64 -static ${CFLAGS} ${LIBS} $FULLPATH/test.cpp \ + $install_prefix/lib64/libsphde.a -o ${tmp_file}" + printit "Testing 64 bit dynamic linking..." + compile "${CXX} -m64 ${CFLAGS} $FULLPATH/test.cpp \ + $install_prefix/lib64/libsphde.so -o ${tmp_file}" + printit "Successfully built and linked against 64 bit libraries" +} + +exec rm -f ${tmp_file} diff --git a/fvtr/sphde/test.cpp b/fvtr/sphde/test.cpp new file mode 100644 index 000000000..d3e37586a --- /dev/null +++ b/fvtr/sphde/test.cpp @@ -0,0 +1,35 @@ +/* Copyright 2017 IBM Corporation +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +#include + +int main () +{ + int rc; + + rc = SASJoinRegion(); + if (!rc) + { + char *block; + + // allocation a block of SPHDE data ... + block = (char*) SASBlockAlloc (4096); + block[0] = 'a'; + + SASCleanUp(); + return 0; + } + return 1; +} diff --git a/fvtr/sysroot/sysroot.exp b/fvtr/sysroot/sysroot.exp new file mode 100755 index 000000000..5c3e739d9 --- /dev/null +++ b/fvtr/sysroot/sysroot.exp @@ -0,0 +1,52 @@ +#! /usr/bin/expect +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# +# Check if the loader has support to --sysroot option. + +source shared.exp +set rc 0 +set tmp_file [exec mktemp] + +if { $env(AT_MAJOR_VERSION) < 8.0 } { + if { $env(AT_CROSS_BUILD) != "yes" } { + printit "Skipping sysroot test: this only started to be \ +supported for native builds on AT 8.0.\t\[SUCCESS\]" + exit $ENOSYS + } +} + +set CC [compiler_path] +# Cross builds only support --sysroot=dest_cross. +if { $env(AT_CROSS_BUILD) == "yes" } { + if { $env(AT_BUILD_ARCH) == "ppc64le" } { + set CFLAGS "--sysroot=$env(AT_DEST)/$env(AT_BUILD_ARCH)" + } else { + set CFLAGS "--sysroot=$env(AT_DEST)/ppc" + } +} else { + set CFLAGS "--sysroot=/" +} + +printit "Testing --sysroot option..." +if [ compile "${CC} ${CFLAGS} $FULLPATH/test.c -o ${tmp_file}" ] { + set rc 1 +} else { + printitcont "\t\t\t Use of sysroot successful." +} + + +exec rm -f ${tmp_file} +exit $rc diff --git a/fvtr/sysroot/test.c b/fvtr/sysroot/test.c new file mode 100644 index 000000000..c3f8ece74 --- /dev/null +++ b/fvtr/sysroot/test.c @@ -0,0 +1,22 @@ +/* Copyright 2017 IBM Corporation +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +#include +int +main(void) +{ + printf("Hello!\n"); + return 0; +} diff --git a/fvtr/tbb/mem-test.cpp b/fvtr/tbb/mem-test.cpp new file mode 100644 index 000000000..e3110b094 --- /dev/null +++ b/fvtr/tbb/mem-test.cpp @@ -0,0 +1,33 @@ +/* Copyright 2017 IBM Corporation +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +/* Basic test to override the default malloc and free implementations by the + ones provided by TBB. */ + +#include +#include + +int main() +{ + /* During the link phase we override malloc and free. */ + char *block = (char *) malloc(4096); + if (!block) { + err(1, "Can't allocate memory."); + } + + free(block); + + return 0; +}; diff --git a/fvtr/tbb/par-test.cpp b/fvtr/tbb/par-test.cpp new file mode 100644 index 000000000..a5a062807 --- /dev/null +++ b/fvtr/tbb/par-test.cpp @@ -0,0 +1,84 @@ +/* Copyright 2017 IBM Corporation +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +/* The goal of this test is to ensure that none of the headers in + tbb/internal are missing, and the test uses the parallel_for function + to test if the main libraries are available. */ + +#include +#include +/* These are public headers which uses the internal ones. */ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +/* These are not included in the public ones. */ +#define __TBB_tbb_windef_H +#define _MT +#include +#include + +/* Struct that does the computation. */ +struct +execute +{ + execute():size(1000){} + void operator()() const + { + for(int i = 0; i <= 10000000; i++) + i = i * i; + } + int size; +}; + +/* Struct that is passed to the parallel_for. */ +struct +trigger +{ + trigger(execute ex): job(ex) {} + void operator()(const tbb::blocked_range& r) const + { + for(int i = 0; i <= 1000; i++) + job(); + } + + execute job; +}; + +int main() +{ + /* During the link phase we override malloc and free. */ + char *block = (char *) malloc(4096); + if (!block) { + err(1, "Can't allocate memory."); + } + + free(block); + + /* Tests the function using 18 threads. */ + tbb::task_scheduler_init init(18); + execute job; + struct trigger trig(job); + tbb::parallel_for(tbb::blocked_range(0,1000),trig); + + return 0; +}; diff --git a/fvtr/tbb/tbb.exp b/fvtr/tbb/tbb.exp new file mode 100755 index 000000000..6de827db0 --- /dev/null +++ b/fvtr/tbb/tbb.exp @@ -0,0 +1,113 @@ +#! /usr/bin/expect +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# +# Tests for TBB +# + +source ./shared.exp + +set rc 0 + +set CXX [compiler_path g++] +set CFLAGS "-O2 -Wall" +set TBBLIBS "-ltbb -ltbbmalloc_proxy -ltbbmalloc" + +if { [array names env -exact "AT_TBB_VER"] == "" } { + # The variable has a different name on old config files. + if { [array names env -exact "AT_INTEL_TBB_VER"] == "" } { + printit "WARNING: TBB is not configured in the config file." + printit "Skipping..." + exit $ENOSYS + } else { + # This allows the test to run with old config files. + set env(AT_TBB_VER) $env(AT_INTEL_TBB_VER) + } +} + +# Look for TBB's major and minor version. +if { [catch {regexp "(\[0-9\]+)\.(\[0-9\]+).*" $env(AT_TBB_VER) match \ + major_ver minor_ver} err] } { + fvtr_error "Failed to identify TBB major and minor versions from \ +$env(AT_TBB_VER): ${err}" +} + + +proc memtest {} { + global TARGET32 + global TARGET64 + global CXX + global CFLAGS + global TBBLIBS + global tmp_file + global FULLPATH + + printit "Testing malloc/free usage..." + if { $TARGET32 } { + printit "Testing dynamic 32 link..." + compile "${CXX} -m32 ${CFLAGS} $FULLPATH/mem-test.cpp \ +${TBBLIBS} -o ${tmp_file}" + printit "Successfully built and linked 32 bit library" + } + if { $TARGET64 } { + printit "Testing dynamic 64 link..." + compile "${CXX} -m64 ${CFLAGS} $FULLPATH/mem-test.cpp \ +${TBBLIBS} -o ${tmp_file}" + printit "Successfully built and linked 64 bit library" + } +} + + +# +# Check if AT is able to build and link against basic TBB libraries +# This test checks for important headers and dynamic libs as we don't provide +# static libs. +# +proc parallel_test {} { + global TARGET32 + global TARGET64 + global CXX + global CFLAGS + global TBBLIBS + global tmp_file + global FULLPATH + + printit "Testing parallel execution..." + if { $TARGET32 } { + printit "Testing dynamic 32 link..." + compile "${CXX} -m32 ${CFLAGS} $FULLPATH/mem-test.cpp \ +${TBBLIBS} -o ${tmp_file}" + printit "Successfully built and linked 32 bit library" + } + if { $TARGET64 } { + printit "Testing dynamic 64 link..." + compile "${CXX} -m64 ${CFLAGS} $FULLPATH/mem-test.cpp \ +${TBBLIBS} -o ${tmp_file}" + printit "Successfully built and linked 64 bit library" + } +} + +printit "Testing TBB..." +set tmp_file [exec mktemp] + +# Run memtest for all TBB versions. +memtest + +# parallel_test is supported by TBB >= 4.2 only. +if { ${major_ver} >= 4 && ${minor_ver} >= 2 } { + parallel_test +} + +exec rm -f ${tmp_file} diff --git a/fvtr/tcmalloc/tcmalloc.exp b/fvtr/tcmalloc/tcmalloc.exp new file mode 100755 index 000000000..0b3f3b307 --- /dev/null +++ b/fvtr/tcmalloc/tcmalloc.exp @@ -0,0 +1,54 @@ +#! /usr/bin/expect +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# +# Tests for TCMalloc +# + +source ./shared.exp + +set rc 0 + +set CXX [compiler_path g++] +set CFLAGS "-O2 -Wall" + +if { [array names env -exact "AT_TCMALLOC_VER"] == "" } { + printit "WARNING: TCMalloc is not configured in the config file." + printit "Skipping..." + exit $ENOSYS +} +# +# Check if AT is able to build and link against basic TCMalloc libraries +# This test checks for important headers and both static and dynamic libs +# +set tmp_file [exec mktemp] + +set libs "-ltcmalloc -lpthread" +set src "${FULLPATH}/test.cpp" + +if { $TARGET32 } { + printit "Testing static and dynamic linking for 32 bit..." + compile "${CXX} -m32 -static ${CFLAGS} ${src} ${libs} -o ${tmp_file}" + compile "${CXX} -m32 ${CFLAGS} ${src} ${libs} -o ${tmp_file}" + printit "Successfully built and linked for 32 bit libraries" +} +if { $TARGET64 } { + printit "Testing static and dynamic linking for 64 bit..." + compile "${CXX} -m64 -static ${CFLAGS} ${src} ${libs} -o ${tmp_file}" + compile "${CXX} -m64 ${CFLAGS} ${src} ${libs} -o ${tmp_file}" + printit "Successfully built and linked for 64 bit libraries" +} + +exec rm -f ${tmp_file} diff --git a/fvtr/tcmalloc/test.cpp b/fvtr/tcmalloc/test.cpp new file mode 100644 index 000000000..3e437c5e4 --- /dev/null +++ b/fvtr/tcmalloc/test.cpp @@ -0,0 +1,29 @@ +/* Copyright 2017 IBM Corporation +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +#include +#include + +int main() +{ + char *block = (char *) tc_malloc(4096); + if (!block) { + err(1, "Can't allocate memory."); + } + + tc_free(block); + + return 0; +} diff --git a/fvtr/timezone/timezone.c b/fvtr/timezone/timezone.c new file mode 100644 index 000000000..44751fa91 --- /dev/null +++ b/fvtr/timezone/timezone.c @@ -0,0 +1,51 @@ +/* Copyright 2017 IBM Corporation +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +/* Print the timezone in the same format of `date '+%z'. */ + +#include +#include +#include +#include + +extern char * tzname[2]; + +int +main () { + time_t now; + struct tm * lt; + char tz[10]; + + now = time(NULL); + if (now == -1) { + perror ("Failed to read time"); + exit (1); + } + + lt = localtime(&now); + if (lt == 0) { + perror ("Failed to get localtime"); + exit (1); + } + + if (strftime(tz, sizeof(tz), "%z", lt) == 0) { + perror ("Failed to get timezone"); + exit (1); + } + + printf("%s\n", tz); + + return 0; +} diff --git a/fvtr/timezone/timezone.exp b/fvtr/timezone/timezone.exp new file mode 100755 index 000000000..1e937fd02 --- /dev/null +++ b/fvtr/timezone/timezone.exp @@ -0,0 +1,65 @@ +#! /usr/bin/expect +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# +# Check if the AT timezone is the same of the system. +# AT configures the timezone when installing runtime and runtime-compat +# packages. + + +source shared.exp +source config_parser.exp + +if { $env(AT_CROSS_BUILD) == "yes" } { + printit "Skipping dynamic linking: this is a cross compiler\t\[SUCCESS\]" + exit $ENOSYS +} + +if {[info exists env(AT_WD)]} { + printit "Skipping dynamic linking: running test suite on a compatible\ +mode with the build system.\t\[SUCCESS\]" + exit $ENOSYS +} + +if { $BLD_ARCH_PPC64LE } { + set LD64 /lib64/ld64.so.2 +} else { + set LD64 /lib64/ld64.so.1 +} +set err [catch {exec $LD64 /bin/date "+%z"} sys_tz] +if { ${err} != 0 } { + fvtr_error "Failed to get the system timezone: ${sys_tz}" +} + +set CC [compiler_path] +set tmp_file [exec mktemp] + +compile "${CC} $FULLPATH/timezone.c -o ${tmp_file}" +set err [catch {exec ${tmp_file}} at_tz] +if { ${err} != 0 } { + fvtr_error "Failed to get AT timezone: ${at_tz}" +} + +file delete -force ${tmp_file} + +printit "System timezone\t$sys_tz" +printit "AT timezone\t\t$at_tz" + +if { ${sys_tz} == ${at_tz} } { + printit "Both timezones are identical\t\[SUCCESS\]" + return $SUCCESS +} + +fvtr_error "AT timezone is different from system's timezone.\t\[FAIL\]" diff --git a/fvtr/urcu/test.c b/fvtr/urcu/test.c new file mode 100644 index 000000000..c99ad91fe --- /dev/null +++ b/fvtr/urcu/test.c @@ -0,0 +1,23 @@ +/* Copyright 2017 IBM Corporation +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +#include + +int main() +{ + rcu_init(); + + return 0; +} diff --git a/fvtr/urcu/urcu.exp b/fvtr/urcu/urcu.exp new file mode 100755 index 000000000..8677ceb19 --- /dev/null +++ b/fvtr/urcu/urcu.exp @@ -0,0 +1,67 @@ +#! /usr/bin/expect +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# +# Check if AT provides urcu for ppc32 and pp64 for both static and shared +# linking. +# + +source ./shared.exp + +if { $env(AT_CROSS_BUILD) == "yes" } { + if { $env(AT_BUILD_ARCH) == "ppc64le" } { + set install_prefix "$env(AT_DEST)/$env(AT_BUILD_ARCH)/usr" + } else { + set install_prefix "$env(AT_DEST)/ppc/usr" + } +} else { + set install_prefix $env(AT_DEST) +} + +set CC [compiler_path] +set CFLAGS "-O2 -Wall" +set LIBS "-lurcu -lurcu-cds -pthread" + +set STATIC_PARMS32 "-DRCU_MB \ + -Wl,--whole-archive,$install_prefix/lib/liburcu-mb.a,--no-whole-archive" +set STATIC_PARMS64 "-DRCU_MB \ + -Wl,--whole-archive,$install_prefix/lib64/liburcu-mb.a,--no-whole-archive" + +if { [array names env -exact "AT_LIBURCU_VER"] == "" } { + printit "WARNING: URCU is not configured in the config file." + printit "Skipping..." + exit $ENOSYS +} + +set tmp_file [exec mktemp] + +if { $TARGET32 } { + printit "Testing 32 bit static linking..." + compile "${CC} -m32 -static ${CFLAGS} ${STATIC_PARMS32} ${LIBS} \ + $FULLPATH/test.c -o ${tmp_file}" + printit "Testing 32 bit dynamic linking..." + compile "${CC} -m32 ${CFLAGS} $FULLPATH/test.c ${LIBS} -o ${tmp_file}" + printit "Successfully built and linked against 32 bit libraries" +} +if { $TARGET64 } { + printit "Testing 64 bit static linking..." + compile "${CC} -m64 -static ${CFLAGS} ${STATIC_PARMS64} ${LIBS} \ + $FULLPATH/test.c -o ${tmp_file}" + printit "Testing 64 bit dynamic linking..." + compile "${CC} -m64 ${CFLAGS} $FULLPATH/test.c ${LIBS} -o ${tmp_file}" + printit "Successfully built and linked against 64 bit libraries" +} + +exec rm -f ${tmp_file} diff --git a/fvtr/valgrind/valgrind.c b/fvtr/valgrind/valgrind.c new file mode 100644 index 000000000..4ac09f8f4 --- /dev/null +++ b/fvtr/valgrind/valgrind.c @@ -0,0 +1,22 @@ +/* Copyright 2017 IBM Corporation +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +#include +#include + +int main(int argc, char *argv[]) { + printf("Hello!\n"); + return EXIT_SUCCESS; +} diff --git a/fvtr/valgrind/valgrind.exp b/fvtr/valgrind/valgrind.exp new file mode 100755 index 000000000..f5b87b0b6 --- /dev/null +++ b/fvtr/valgrind/valgrind.exp @@ -0,0 +1,181 @@ +#! /usr/bin/expect +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# +# Check if some Valgrind files are provided +# + +source ./shared.exp + +set rc 0 + +set CC [compiler_path] +set CFLAGS "-O2 -Wall" + +if { [array names env -exact "AT_VALGRIND_VER"] == "" } { + printit "WARNING: Valgrind is not configured in the config file." + printit "Skipping..." + exit ${ENOSYS} +} + +if {![regexp "(\[^\.\]*)\.(\[^\.\]*)\..*" $env(AT_VALGRIND_VER) \ + match major minor]} then { + fvtr_error "Unrecognized version $env(AT_VALGRIND_VER)" +} + +# Build the sample valgrind test binary +set test_exec "${FULLPATH}/valgrind_test" +printit "Building test valgrind executables..." +if { ${TARGET32} } { + compile "${CC} -m32 ${CFLAGS} ${FULLPATH}/valgrind.c -o ${test_exec}-32" +} +if { ${TARGET64} } { + compile "${CC} -m64 ${CFLAGS} ${FULLPATH}/valgrind.c -o ${test_exec}-64" +} +printit "Successfully built test valgrind executables" + +# List of executables that should be present +set exe_list {valgrind valgrind-listener vgi2qt} + +# Set arch* strings for later usage. +switch -regexp $env(AT_BUILD_ARCH) { + ppc.*le { + # Although ppc32le actually doesn't exist, this code is + # already prepared. + set arch32 ppc32le + set arch64 ppc64le + } + # Defaults to ppc and ppc64. + default { + set arch32 ppc32 + # Starting from version 3.10 Valgrind refer to ppc64 as ppc64be. + if { ${major} > 3 || [expr ${major} == 3 && ${minor} >= 10] } { + set arch64 ppc64be + } else { + set arch64 ppc64 + } + } +} + +# List of libraries that should be present. +set lib_list {} +if { ${TARGET32} } { + lappend lib_list vgpreload_core-${arch32}-linux \ + vgpreload_drd-${arch32}-linux \ + vgpreload_exp-dhat-${arch32}-linux \ + vgpreload_helgrind-${arch32}-linux \ + vgpreload_massif-${arch32}-linux \ + vgpreload_memcheck-${arch32}-linux +} +if { ${TARGET64} } { + lappend lib_list vgpreload_core-${arch64}-linux \ + vgpreload_drd-${arch64}-linux \ + vgpreload_exp-dhat-${arch64}-linux \ + vgpreload_helgrind-${arch64}-linux \ + vgpreload_massif-${arch64}-linux \ + vgpreload_memcheck-${arch64}-linux \ +} + +# Some files were included in Valgrind 3.7. +if {${major} > 3 || [expr ${major} == 3 && ${minor} >= 7]} { + lappend exe_list vgdb + if { ${TARGET32} } { + lappend lib_list vgpreload_exp-sgcheck-${arch32}-linux + } + if { ${TARGET64} } { + lappend lib_list vgpreload_exp-sgcheck-${arch64}-linux + } +} + +# Check if expected executables are available. +foreach exe ${exe_list} { + if {![file exists $env(AT_DEST)/bin/${exe}]} { + printit "file $env(AT_DEST)/bin/$exe is missing" ${ERROR} + set rc 1 + } +} +if { ${rc} == 0} { + printit "All executables are available and functional" +} + + +# Check if all expected libraries are available. +foreach lib ${lib_list} { + if {![file exists $env(AT_DEST)/lib/valgrind/${lib}.so]} { + printit "library $env(AT_DEST)/lib/valgrind/${lib}.so \ +is missing" ${ERROR} + set rc 1 + } +} + +# Get normalized plugins list, e.g. helgrind instead of +# vgpreload_helgrind-ppc32-linux. +foreach lib ${lib_list} { + set tool [string map [list vgpreload_ {} \ + -${arch32}-linux {} \ + -${arch64}-linux {}] \ + ${lib}] + # Temporarily ignore exp-sgcheck in order to work around BZ #98458. + if {![string equal ${tool} core] + && ![string equal ${tool} exp-sgcheck]} { + lappend plugin_list ${tool} + } +} +set plugins [lsort -unique ${plugin_list}] + +# Define which word sizes are supported by this release. +set wordsize_l {} +if { ${TARGET32} } { + lappend wordsize_l 32 +} +if { ${TARGET64} } { + lappend wordsize_l 64 +} + +# Simple validation the plugin tools. +# Run each plugin and verify if they work with a simple program. +foreach plugin ${plugins} { + foreach archsize ${wordsize_l} { + set tool_test "valgrind --tool=${plugin} \ +${test_exec}-${archsize}" + set valgrind_test \ + [catch { + eval exec \ + ${tool_test} >& \ + ${test_exec}-${plugin}_${archsize}.log } \ + test_info] + if { ${valgrind_test} != 0 } { + printit "problem with library tool ${plugin} \ +on ${archsize} bits." ${ERROR} + set rc 1 + } else { + printit "Plugin module ${plugin} ${archsize} bits \ +passed test." + } + } +} + +# Move possible massif.out output files to valgrind folder +exec mv {*}[glob ./massif.out*] ${FULLPATH}/ + +# Confirm the plugins' availability +if { ${rc} == 0} { + printit "All libraries are available" + # Remove sample valgrind test binary and logs + exec rm -f {*}[glob ${test_exec}*] +} + +# Return final test result +exit ${rc} diff --git a/fvtr/xlc/test.c b/fvtr/xlc/test.c new file mode 100644 index 000000000..c3f8ece74 --- /dev/null +++ b/fvtr/xlc/test.c @@ -0,0 +1,22 @@ +/* Copyright 2017 IBM Corporation +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +#include +int +main(void) +{ + printf("Hello!\n"); + return 0; +} diff --git a/fvtr/xlc/xlc.exp b/fvtr/xlc/xlc.exp new file mode 100755 index 000000000..ef8778889 --- /dev/null +++ b/fvtr/xlc/xlc.exp @@ -0,0 +1,178 @@ +#! /usr/bin/expect +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# +# Test if AT can link with xlc compiled code, i.e. compile with xlc and link +# with AT. + +source ./shared.exp + +set at_dir $env(AT_DEST) +set rc 0 + +if {[info exists env(AT_WD)]} { + printit "Skipping: running test suite on a compatible mode with the\ +build system.\t\[SUCCESS\]" + exit $ENOSYS +} + +# Run the commands to compile with xlc and link with AT +# +# Parameters: +# xlc The path to xlc binary. +# cfg The path to the xlc configuration file to be used. +# wordsize The size of the word in use. Could be either 32 or 64. +# +proc test_xlc { xlc cfg wordsize } { + global ERROR + global FULLPATH + global ENOSYS + + # Use AT as linker + set LD [compiler_path] + set LIBS "-lm" + set LDFLAGS "-O2 -Wall" + + set obj_file [exec mktemp] + set rc 0 + + # Compile the code using xlc (without linking). + printitcont "Test ${wordsize}-bit static linking with ${xlc}..." + if { ${cfg} != "none" } { + set err [catch {exec ${xlc} -q${wordsize} -F ${cfg} \ + -c ${FULLPATH}/test.c \ + -o ${obj_file}} msg] + } else { + set err [catch {exec ${xlc} -q${wordsize} \ + -c ${FULLPATH}/test.c \ + -o ${obj_file}} msg] + } + if { ${err} > 0 } { + # The execution of xlc always returns errors due to messages + # printed on stderr. + # We can safely print them and continue to the linking phase + # as the next steps going to capture the error if something + # unexpected happens. + printit "${msg}" + } + + set exe_file [exec mktemp] + + # Static linking with AT. + set err [catch {compile "${LD} -m${wordsize} -static ${LDFLAGS} \ + ${obj_file} ${LIBS} -o ${exe_file}"} msg] + if { ${err} > 0 } { + set rc 1 + printit "${msg}" $ERROR + } else { + printit "${wordsize}-bit static linking between \ +xlc and AT successful" + } + + # Dynamic linking with AT. + set {err} [catch {compile "${LD} -m${wordsize} ${LDFLAGS} \ + ${obj_file} ${LIBS} -o ${exe_file}"} msg] + if { $err > 0 } { + set rc 1 + printit "${msg}" $ERROR + } else { + printit "${wordsize}-bit dynamic linking between \ +xlc and AT successful" + } + + file delete -force ${obj_file} ${exe_file} + + return ${rc} +} + + +# Begin the XLC test +printit "Testing the xlc compiler linking with AT..." + +set xlc_dirs [ get_xlc_paths ] +if { [llength ${xlc_dirs}] == 0 } { + printit "Skipping: xlc isn't installed." + exit ${ENOSYS} +} + +set at_ver [string toupper [regsub -all \\. [file tail $env(AT_DEST)] \_]] + +# Test with all installed versions of XLC +foreach dir ${xlc_dirs} { + # Print initial message + printit "Testing ${dir}..." + # Set full path of XLC compiler to test + set xlc "${dir}/bin/xlc" + # Set the new_install (or xlc_configure -at) generated config file. + set xlc_at "${dir}/bin/xlc_at" + # Find the default config file build by AT install + set compiler [file tail [file dirname ${dir}]] + regsub -all "\\." [file tail ${dir}] "_" xl_ver + set xlc_cfg "${at_dir}/scripts/${compiler}-${xl_ver}-${at_ver}.dfp.cfg" + # Clean up revious lists if they were defined + if { [info exists compilers] } {unset compilers} + if { [info exists configures] } {unset configures} + # Set the default value (0) for new_install status usage + set new_install 0 + + # Perform a search of available config files (first the one provided by + # new_install, and if it isn't found, try the usual one). Prepare a list + # of configs found for testing, and generate an error if none of them + # were found. + if { ! [file exists ${xlc_at}] } { + printit "No ${xlc_at} configuration script found. \ + Skipping it." ${ERROR} + } else { + # Flag the existence of new_install configuration + set new_install 1 + # Add the information to proceed the tests below + lappend compilers ${xlc_at} + lappend configures "none" + } + if { ! [file exists ${xlc_cfg}] } { + # Inform the error + printit "${xlc_cfg} configuration file does not exist." ${ERROR} + if { ${new_install} == 0 } { + printit "Can't find *any* XLC configuration file for ${dir} \ + install." ${ERROR} + # Set error and continue + set rc 1 + continue + } + } else { + # Add the standard XLC compiler with AT configuration + lappend compilers ${xlc} + lappend configures ${xlc_cfg} + } + + foreach compiler ${compilers} configure ${configures} { + if { ${TARGET32} } { + if { [test_xlc ${compiler} ${configure} 32] } { + set rc 1 + } + } + if { ${TARGET64} } { + if { [test_xlc ${compiler} ${configure} 64] } { + set rc 1 + } + } + } +} + +if { ${rc} == 0 } { + printit "Testing the xlc compiler linked with AT:\t\t\t\[SUCCESS\]" +} + +exit ${rc} diff --git a/fvtr/xlcdfp/test.c b/fvtr/xlcdfp/test.c new file mode 100644 index 000000000..e1f158bce --- /dev/null +++ b/fvtr/xlcdfp/test.c @@ -0,0 +1,29 @@ +/* Copyright 2017 IBM Corporation +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +#ifndef __STDC_WANT_DEC_FP__ +#define __STDC_WANT_DEC_FP__ +#endif + +#include + +int main () +{ + _Decimal64 d64 = 2.22222222222DD; + + sqrtd64(d64); + + return 0; +} diff --git a/fvtr/xlcdfp/xlcdfp.exp b/fvtr/xlcdfp/xlcdfp.exp new file mode 100755 index 000000000..ce6fb7613 --- /dev/null +++ b/fvtr/xlcdfp/xlcdfp.exp @@ -0,0 +1,180 @@ +#! /usr/bin/expect +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# +# Test if AT can link with xlc compiled code, i.e. compile with xlc and link +# with AT. The most important thing here is to guarantee that AT can link +# with XL compiled code that uses libdfp. +# + +source ./shared.exp + +set at_dir $env(AT_DEST) +set rc 0 + +if {[info exists env(AT_WD)]} { + printit "Skipping: running test suite on a compatible mode with the\ +build system.\t\[SUCCESS\]" + exit $ENOSYS +} + +# Run the commands to compile with xlc and link with AT +# +# Parameters: +# xlc The path to xlc binary. +# cfg The patch to the xlc configuration file to be used. +# wordsize The size of the word in use. Could be either 32 or 64. +# +proc test_xlc_dfp { xlc cfg wordsize } { + global ERROR + global FULLPATH + global ENOSYS + + # Use AT as linker + set LD [compiler_path] + set LIBS "-ldfp -lm" + set LDFLAGS "-O2 -Wall" + + set obj_file [exec mktemp] + set rc 0 + + # Compile the code using xlc (without linking). + printitcont "Test ${wordsize}-bit static linking with ${xlc}..." + if { ${cfg} != "none" } { + set err [catch {exec ${xlc} -q${wordsize} -F ${cfg} -qdfp \ + -c ${FULLPATH}/test.c \ + -o ${obj_file}} msg] + } else { + set err [catch {exec ${xlc} -q${wordsize} -qdfp \ + -c ${FULLPATH}/test.c \ + -o ${obj_file}} msg] + } + if { ${err} > 0 } { + # The execution of xlc always returns errors due to messages + # printed on stderr. + # We can safely print them and continue to the linking phase + # as the next steps going to capture the error if something + # unexpected happens. + printit "${msg}" + # Check if dfp is supported by XL. + if { [string match *dfp* "${msg}"] } { + printit "Skipping: DFP is not supported for this\ +version.\t\[SUCCESS\]" + exit ${ENOSYS} + } + } + + set exe_file [exec mktemp] + + # Static linking with AT. + set err [catch {compile "${LD} -m${wordsize} -static ${LDFLAGS} \ +${obj_file} ${LIBS} -o ${exe_file}"} msg] + if { ${err} > 0 } { + set rc 1 + printit "${msg}" $ERROR + } else { + printit "${wordsize}-bit static linking between \ +xlc and dfp successful" + } + + # Dynamic linking with AT. + set {err} [catch {compile "${LD} -m${wordsize} ${LDFLAGS} \ +${obj_file} ${LIBS} -o ${exe_file}"} msg] + if { $err > 0 } { + set rc 1 + printit "${msg}" $ERROR + } else { + printit "${wordsize}-bit dynamic linking between \ +xlc and dfp successful" + } + + file delete -force ${obj_file} ${exe_file} + + return ${rc} +} + +printit "Testing the xlc compiler and dfp..." + +set xlc_dirs [ get_xlc_paths ] +if { [llength ${xlc_dirs}] == 0 } { + printit "Skipping: xlc isn't installed." + exit ${ENOSYS} +} + +set at_ver [string toupper [regsub -all \\. [file tail $env(AT_DEST)] \_]] + +# Test with all installed versions of XLC +foreach dir ${xlc_dirs} { + # Print initial message + printit "Testing ${dir}..." + # Set full path of XLC compiler to test + set xlc "${dir}/bin/xlc" + # Set the new_install (or xlc_configure -at) generated config file. + set xlc_at "${dir}/bin/xlc_at" + # Find the default config file build by AT install + set compiler [file tail [file dirname ${dir}]] + regsub -all "\\." [file tail ${dir}] "_" xl_ver + set xlc_cfg "${at_dir}/scripts/${compiler}-${xl_ver}-${at_ver}.dfp.cfg" + # Clean up revious lists if they were defined + if { [info exists compilers] } {unset compilers} + if { [info exists configures] } {unset configures} + # Set the default value (0) for new_install status usage + set new_install 0 + + if { ! [file exists ${xlc_at}] } { + printit "No ${xlc_at} configuration script found. \ + Skipping it." ${ERROR} + } else { + # Flag the existence of new_install configuration + set new_install 1 + # Add the information to proceed the tests below + lappend compilers ${xlc_at} + lappend configures "none" + } + if { ! [file exists ${xlc_cfg}] } { + # Inform the error + printit "${xlc_cfg} configuration file does not exist." ${ERROR} + if { ${new_install} == 0 } { + printit "Can't find *any* XLC configuration file for ${dir} \ + install." ${ERROR} + # Set error and continue + set rc 1 + continue + } + } else { + # Add the standard XLC compiler with AT configuration + lappend compilers ${xlc} + lappend configures ${xlc_cfg} + } + + foreach compiler ${compilers} configure ${configures} { + if { ${TARGET32} } { + if { [test_xlc_dfp ${compiler} ${configure} 32] } { + set rc 1 + } + } + if { ${TARGET64} } { + if { [test_xlc_dfp ${compiler} ${configure} 64] } { + set rc 1 + } + } + } +} + +if { ${rc} == 0 } { + printit "Testing the xlc compiler and dfp:\t\t\t\[SUCCESS\]" +} + +exit ${rc} diff --git a/fvtr/xlf/test.f b/fvtr/xlf/test.f new file mode 100644 index 000000000..d07c7b949 --- /dev/null +++ b/fvtr/xlf/test.f @@ -0,0 +1,28 @@ +! Copyright 2017 IBM Corporation +! +! Licensed under the Apache License, Version 2.0 (the "License"); +! you may not use this file except in compliance with the License. +! You may obtain a copy of the License at +! +! http://www.apache.org/licenses/LICENSE-2.0 +! +! Unless required by applicable law or agreed to in writing, software +! distributed under the License is distributed on an "AS IS" BASIS, +! WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +! See the License for the specific language governing permissions and +! limitations under the License. + + PROGRAM CMPLXD + IMPLICIT COMPLEX(X) + PARAMETER (PI = 3.141592653589793, XJ = (0, 1)) + DO 1, I = 0, 7 + X = EXP(XJ * I * PI / 4) + IF (AIMAG(X).LT.0) THEN + PRINT 2, 'e**(j*', I, '*pi/4) = ', REAL(X), ' - j',-AIMAG(X) + ELSE + PRINT 2, 'e**(j*', I, '*pi/4) = ', REAL(X), ' + j', AIMAG(X) + END IF + 2 FORMAT (A, I1, A, F10.7, A, F9.7) + 1 CONTINUE + STOP + END diff --git a/fvtr/xlf/xlf.exp b/fvtr/xlf/xlf.exp new file mode 100755 index 000000000..ffc79fef2 --- /dev/null +++ b/fvtr/xlf/xlf.exp @@ -0,0 +1,157 @@ +#! /usr/bin/expect +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# +# Test if AT can link with xlc compiled code, i.e. compile with xlc and link +# with AT. + +source ./shared.exp + +set at_dir $env(AT_DEST) +set rc 0 + +if {[info exists env(AT_WD)]} { + printit "Skipping: running test suite on a compatible mode with the\ +build system.\t\[SUCCESS\]" + exit $ENOSYS +} + +# Run the commands to compile with xlf and link with AT +# +# Parameters: +# xlf The path to xlf binary. +# cfg The patch to the xlf configuration file to be used. +# wordsize The size of the word in use. Could be either 32 or 64. +# +proc test_xlf { xlf cfg wordsize } { + # Define global variables + global ERROR + global FULLPATH + global ENOSYS + global at_dir + # Set local variables + set exe_file [exec mktemp] + set rc 0 + + # Compile the code using xlf + printitcont "Test ${wordsize}-bit compilation with ${xlf}..." + if { ${cfg} != "none" } { + set err [catch {exec ${xlf} -q${wordsize} -F ${cfg} \ + -O2 -o ${exe_file} \ + ${FULLPATH}/test.f} msg] + } else { + set err [catch {exec ${xlf} -q${wordsize} -O2 \ + -o ${exe_file} \ + ${FULLPATH}/test.f} msg] + } + if { ${err} > 0 } { + # The execution of xlf always returns errors due to messages + # printed on stderr. + # We can safely print them and continue to the loader test + # phase as the next step's going to capture the error if + # something unexpected happens. + printit "${msg}" + # Check the required elf interpreter. + set interp [string trim [exec ${at_dir}/bin/readelf -a ${exe_file} | \ + grep interpreter | \ + cut -f2 -d:]] + if { [string match ${at_dir}* "${interp}"] } { + printit "${wordsize}-bit linking between xlf and AT successful" + } else { + printit "${wordsize}-bit linking between xlf and AT failed" $ERROR + set rc 1 + } + } + + file delete -force ${exe_file} + + return ${rc} +} + + +# Begin the XLF test +printit "Testing the xlf compiler..." + +set xlf_dirs [ get_xlf_paths ] +if { [llength ${xlf_dirs}] == 0 } { + printit "Skipping: xlf isn't installed." + exit ${ENOSYS} +} + +set at_ver [string toupper [regsub -all \\. [file tail $env(AT_DEST)] \_]] + +# Test with all installed versions of XLF +foreach dir ${xlf_dirs} { + # Print initial message + printit "Testing ${dir}..." + # Set full path of XLF compiler to test + set xlf "${dir}/bin/xlf90" + # Set the new_install (or xlf_configure -at) generated config file. + set xlf_at "${dir}/bin/xlf90_at" + # Find the default config file build by AT install + set compiler [file tail [file dirname ${dir}]] + regsub -all "\\." [file tail ${dir}] "_" xl_ver + set xlf_cfg "${at_dir}/scripts/${compiler}-${xl_ver}-${at_ver}.dfp.cfg" + # Clean up revious lists if they were defined + if { [info exists compilers] } {unset compilers} + if { [info exists configures] } {unset configures} + # Set the default value (0) for new_install status usage + set new_install 0 + + if { ! [file exists ${xlf_at}] } { + printit "No ${xlf_at} configuration script found. \ + Skipping it." ${ERROR} + } else { + # Flag the existence of new_install configuration + set new_install 1 + # Add the information to proceed the tests below + lappend compilers ${xlf_at} + lappend configures "none" + } + if { ! [file exists ${xlf_cfg}] } { + # Inform the error + printit "${xlf_cfg} configuration file does not exist." ${ERROR} + if { ${new_install} == 0 } { + printit "Can't find *any* XLF configuration file for ${dir} \ + install." ${ERROR} + # Set error and continue + set rc 1 + continue + } + } else { + # Add the standard XLF compiler with AT configuration + lappend compilers ${xlf} + lappend configures ${xlf_cfg} + } + + foreach compiler ${compilers} configure ${configures} { + if { ${TARGET32} } { + if { [test_xlf ${compiler} ${configure} 32] } { + set rc 1 + } + } + if { ${TARGET64} } { + if { [test_xlf ${compiler} ${configure} 64] } { + set rc 1 + } + } + } +} + +if { ${rc} == 0 } { + printit "Testing the xlf compiler:\t\t\t\t\[SUCCESS\]" +} + +exit ${rc} diff --git a/fvtr/zlib/test.c b/fvtr/zlib/test.c new file mode 100644 index 000000000..6058190e2 --- /dev/null +++ b/fvtr/zlib/test.c @@ -0,0 +1,23 @@ +/* Copyright 2017 IBM Corporation +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +#include + +int main () +{ + zlibVersion(); + + return 0; +} diff --git a/fvtr/zlib/zlib.exp b/fvtr/zlib/zlib.exp new file mode 100755 index 000000000..0aeab4055 --- /dev/null +++ b/fvtr/zlib/zlib.exp @@ -0,0 +1,66 @@ +#! /usr/bin/expect +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# +# Check if AT provides zlib for ppc32 and pp64 for both static and shared +# linking. +# + +source ./shared.exp + +if { [array names env -exact "AT_ZLIB_VER"] == "" } { + printit "Skipping: zlib is not available on this build\t\[SUCCESS\]" + exit $ENOSYS +} + +set CC [compiler_path] +set CFLAGS "-O2 -Wall" +set rc 0 + +set tmp_file [exec mktemp] + +if { $TARGET32 } { + printit "Testing 32 bit linking..." + if [ compile "${CC} -m32 -static ${CFLAGS} $FULLPATH/test.c -lz -o ${tmp_file}" ] { + set rc 1 + } else { + printitcont "\t\t\t Statically linking 32bit libz successful" + } + if [ compile "${CC} -m32 ${CFLAGS} $FULLPATH/test.c -lz -o ${tmp_file}" ] { + set rc 1 + } else { + printitcont "\t\t\t Linking 32bit libz successful" + } +} +if { $TARGET64 } { + printit "Testing 64 bit linking..." + if [ compile "${CC} -m64 -static ${CFLAGS} $FULLPATH/test.c -lz -o ${tmp_file}" ] { + set rc 1 + } else { + printitcont "\t\t\t Statically linking 64bit libz successful" + } + if [ compile "${CC} -m64 ${CFLAGS} $FULLPATH/test.c -lz -o ${tmp_file}" ] { + set rc 1 + } else { + printitcont "\t\t\t Linking 64bit libz successful" + } +} + +if { $rc == 0 } { + printit "Linking libz:\t\t\t\t\t\t\[SUCCESS\]" +} + +exec rm -f ${tmp_file} +exit $rc diff --git a/remote-build.exp b/remote-build.exp new file mode 100755 index 000000000..14e3bc6a7 --- /dev/null +++ b/remote-build.exp @@ -0,0 +1,355 @@ +#!/usr/bin/expect -- + +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# +# Remotely build AT +# +# It executes all the necessary steps to remotely build AT in a list of +# servers, including: +# - call make pack +# - send the tarball to the server +# - remove files from the last build +# - unpack the tarball created by make pack +# - start the build +# + +# Set $var to $def_val if not set. +proc set_def {var def_val} { + upvar ${var} x + + if {![info exists x]} { + set x ${def_val} + } +} + +# Load config file. +set conf ~/.remote-build.conf +if {[file exists ${conf}]} { + source ${conf} +} + +# Define default value of variables if not previously defined +# Directory used by the script to save its files. +set_def tray_dir ~/tmp/at-build-tray +# Directory where AT will be installed (aka DESTDIR). +set_def destdir "\${HOME}/opt" +set_def default_timeout 30; # 30 seconds + +# Directory where AT is installed +# Before start the building, all AT installs with the same version of that +# specified in the parameters are removed +set at_dest ~/opt +set prompt "(%|>|\#|\\\$)\[\[:space:\]\]*$" + +# Request passwords once per server +set ssh_params {-o "ControlMaster=auto" -o "ControlPath=/tmp/ssh-%r@%h:%p"} + +# Flush expect buffer. +proc flush_expect { } { + expect * { } +} + +proc print_usage { } { + global argv0 + puts "Usage: $argv0 version servers" + puts "" + puts "Options:" + puts " --buildarch= Specify the value of BUILD_ARCH." + puts " --help Print this message." + puts "" + puts "Example:" + puts " $argv0 4.0 server1 user@server2" + puts " $argv0 --buildarch=ppc64le 7.1 server1.domain" + puts "" +} + +# Detach from current screen session. +proc dettach_screen { } { + # Detach from screen session. + send "" +} + +# Default values +set buildarch "" + +# Parse optional arguments +set argi 0 +while { ${argi} < ${argc} } { + set arg [lindex ${argv} ${argi}] + + switch -regexp ${arg} { + "--help" { + print_usage + exit + } + "--buildarch=[^ ]*" { + if { [catch {regexp -- "--buildarch=(\[^ \]*)" ${arg} \ + a buildarch}] } { + error "Could not parse ${arg}" + } + } + default break + } + + incr argi +} + +# Parse mandatory arguments +if { ${argc} - ${argi} < 2 } { + print_usage + exit +} +set at_version [lindex $argv ${argi}] +incr argi +set servers [lrange $argv ${argi} end] + +if { ! [file exists configs/${at_version}] } { + error "Could not find config set ${at_version}" +} + +puts "AT version: $at_version" +puts "Servers: $servers" + +set timeout $default_timeout + +spawn make pack +expect { + "at-*.tgz" { + set at_file $expect_out(0,string) + } + default { + send_user "Failed to create the tarball." + exit 1 + } +} + +flush_expect +send_user "\n" + +foreach server $servers { + eval spawn ssh ${ssh_params} ${server} + # Save this spawn_id for future usage + set ssh_spid $spawn_id + + # Deal with credentials + expect { + -re $prompt { } + -re "((assword:\ )|(assphrase))" { + stty -echo + expect_user -re "(.*)\n" + send_user "\n" + send "$expect_out(1,string)\r" + stty echo + exp_continue + expect { + -re $prompt { } + } + } + "(yes/no)? " { + send "yes\n" + expect { + -re $prompt { } + } + } + default { + send_user "Login failed\n" + exit + } + } + + send "mkdir -p ${tray_dir}\n" + expect { + -re $prompt { } + default { + send_user "Failed to create directory ${tray_dir}\n" + exit 1 + } + } + + send "cd ${tray_dir}\n" + expect { + -re $prompt { } + default { + send_user "Failed to change to directory ${tray_dir}\n" + exit 1 + } + } + + # Remove files from old builds + send "test -x remake.sh; echo $?\n" + expect { + "1" { } + "0" { + flush_expect + + send "./remake.sh clean\n" + expect { + -re $prompt { } + # Some servers are very slow and require a lot + # of time to clean a previous build. + -timeout 600 default { + send_user "Failed to clean a previous build.\n" + exit 1 + } + } + } + -re ${prompt} { } + } + + flush_expect + + send "rm -rf at-* configs Makefile scripts configs README* screenlog*\n" + expect { + -re $prompt { } + -timeout 300 default { + send_user "Failed to remove files from ${tray_dir}\n" + exit 1 + } + } + + send_user "\n" + flush_expect + + # Indicates when a copy achieved 100%. + set scp_complete 0 + eval spawn scp ${ssh_params} ${at_file} ${server}:${tray_dir}/ + expect { + -re "((assword:\ )|(assphrase))" { + stty -echo + expect_user -re "(.*)\n" + send_user "\n" + send "$expect_out(1,string)\r" + exp_continue + } + "denied" { + send_user "Login failed\n" + exit 1 + } + -timeout 120 timeout { + send_user "Timeout!\n" + exit 1 + } + "100%" { + # An scp isn't complete until it prints 100% in the + # output and the command returns (eof). + set scp_complete 1 + exp_continue + } + eof { + # eof before achieving 100% is an error. + if { ! ${scp_complete} } { + send_user "Failed to copy ${at_file} to \ +${server}.\n" + exit 1 + } + } + } + + # Recover ssh spawn id + set spawn_id $ssh_spid + flush_expect + + # Extract AT tarball. + send "tar -xzf ${at_file}\n" + expect { + -re $prompt { } + "Error"{ + send_user "Failed to untar ${at_file}\n" + exit 1 + } + default { + send_user "Failed to untar ${at_file}\n" + exit 1 + } + } + + flush_expect + + # Get cpu information + send "grep -c processor /proc/cpuinfo\n" + expect { + -re "\[0-9\]+\r" { + set cores $expect_out(0,string) + } + default { + send_user "Failed to read processor's information.\n" + exit 1 + } + } + + flush_expect + + send "uname -m\n" + expect { + -re "ppc.*" { + # Avoid starting too many jobs on our POWER servers in + # order to not overload a multi-user server. + set cores [expr ${cores} / 2 + 1] + } + # Use full power on x86 + "i686" { + incr cores + } + "x86_64" { + incr cores + } + default { + send_user "Failed to identify the type of the processor.\n" + exit 1 + } + } + + flush_expect + + send_user "\nUsing -j${cores}\n" + + set screen_parms "-L -S at-build" + set parent_cmd "time -p nice -n 19" + set make_parms "-j${cores} AT_CONFIGSET=${at_version} \ +DESTDIR=${destdir}" + if { ${buildarch} != "" } { + append make_parms " BUILD_ARCH=${buildarch}" + } + # Force the targets for building and FVTR runs. + append make_parms " release test" + send_user "screen ${screen_parms} ${parent_cmd} make ${make_parms}\n" + send "screen ${screen_parms} ${parent_cmd} make ${make_parms}\n" + expect { + "command not found" { + send_user "Something is missing on ${server}.\n" + exit 1 + } + "screen is terminating" { + send_user "Caught an early build failure on $server.\n" + exit 1 + } + -re "failed|Error" { + dettach_screen + send_user "\n" + send_user "Failed to build on $server.\n" + send_user "Some processes may still continue to run.\n" + exit 1 + } + default { } + } + + dettach_screen + send_user "\n" + send_user "Build is running on ${server}.\n" +} + +send_user "Started builds on: ${servers}\n" +exit diff --git a/scripts/distributed/LICENSE b/scripts/distributed/LICENSE new file mode 100644 index 000000000..031745392 --- /dev/null +++ b/scripts/distributed/LICENSE @@ -0,0 +1,27 @@ +Copyright (c) 2016, IBM Corporation +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +3. Neither the name of the copyright holder nor the names of its contributors +may be used to endorse or promote products derived from this software without +specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/scripts/distributed/at-create-ibmcmp-cfg.sh b/scripts/distributed/at-create-ibmcmp-cfg.sh new file mode 100755 index 000000000..634d9cf79 --- /dev/null +++ b/scripts/distributed/at-create-ibmcmp-cfg.sh @@ -0,0 +1,288 @@ +#!/bin/bash +# +# Copyright 2017 IBM Corporation + +# This script is used to generate XL cfg files so that a program built with +# the XL compiler will use the runtime libraries from the Advance Toolchain, +# instead of the native installed libraries. + +# The script can be invoked manually by: +# >cd /usr +# >/opt/at7.0/scripts/at-create-ibmcmp-cfg.sh +# ---- OR to explicitly indicate the compiler path ---- +# >xl_base=/opt/ibm /opt/at7.0/scripts/at-create-ibmcmp-cfg.sh +# +# For vac 11.1/xlf 13.1 and earlier releases, the compilers and +# runtime libraries are found under /opt/ibmcmp. Starting in xlC 13.1/xlf 15.1, +# the compiler invocations are under /opt/ibm, and the runtime libraries are +# still under /opt/ibmcmp. +# +# If /opt/ibm/xlf or /opt/ibm/xlC exist, then the default value for xl_base is +# /opt/ibm. In all other cases the default value for xl_base is /opt/ibmcmp. +# +# If the system has multiple versions of the XL compilers installed, then +# invoking this script with the explicit value for xl_base will cause the +# complete set of cfg files to be generated. + +# +# This function checks the presence of a string pattern inside a string stream. +# We use this function to find out if some parameter is supported by a +# particular script. +# +# ${1} - The haystack (file / string stream) to look for a pattern +# ${2} - The needle pattern to look for... ;-) +# ${3} - Kind of search to perform "in_file" or "in_string" +# +# Returns: +# 0 - needle was found in the haystack +# 1 - needle wasn't found in the haystack +# +function check_parameter () +{ + # Set the kind of search to perform ("in_file" / "in_string") + local kindOfSearch=${3} + # If search is "in_file", transform haystack into a stream string with + # the content of the file that it points to. Otherwise let it as is. + if [[ "${kindOfSearch}" == "in_file" ]]; then + local haystack=$(cat ${1}) + else + local haystack=${1} + fi + # Prepare the Extended RegExp (ERE) with the two possible variations + # of the pattern to look for + local needle="(${2}|'${2}')" + + + # Perform the search of the pattern + if [[ -n "$(grep -Eo "${needle}" <<< ${haystack})" ]]; then + return 0 + else + return 1 + fi +} + + +# +# Check if XL license has been accepted. +# +# ${1} - Path the to license file. +xl_license_accepted () +{ + if grep -i 'status=9' "${1}" > /dev/null 2>&1; then + return 0 + else + return 1 + fi +} + + +# +# Create a config file for the XL compiler. If it already exists, recreate it. +# +# $1 - Version of the compiler. +# $2 - Name of the compiler. +# $3 - Prefix of the compiler (usually /opt/ibm or /opt/ibmcmp). +create_config () +{ + local version="${1}" + local compiler="${2}" + # Prefix of the XL compiler. + local xlb="${3}" + + local ver_str=$(echo ${version} | tr [.] [_]) + local config="${at_scripts}/${compiler}-${ver_str}-${at_str}.dfp.cfg" + + if ls ${config} &> /dev/null; then + echo "File ${config} already exists. Recreating it!" + rm -rf ${config} + fi + + if [ "${compiler}" == "xlC" ]; then + local cmp="xlc" + else + local cmp="${compiler}" + fi + + # Define the standard (old) configure script + local config_script="${xlb}/${compiler}/${version}/bin/${cmp}_configure" + # Define the updated (new) new_install configure script + local new_install="${xlb}/${compiler}/${version}/bin/new_install" + # Define the license file to check for a valid license + local status_license="${xlb}/${compiler}/${version}/lap/license/status.dat" + # Define the temp logfile to use + local logfile=$(mktemp /tmp/at-${compiler}.XXXXXX) + # Define the XL config file to produce + local xl_base_file="${xlb}/${compiler}/${version}/etc/${cmp}.base.cfg" + + # First new check the availability of '-at' option on xl*_configure script + if [[ -f "${config_script}" ]] && check_parameter "$(${config_script} -h)" "-at" "in_string"; then + # Confirm that the license was accepted previously + if xl_license_accepted "${status_license}"; then + # Set the required default parameters + local config_parameters="-gcc ${at} -o ${config}" + # Check optional parameter -gcc64 + check_parameter "$(${config_script} -h)" "-gcc64" "in_string" && \ + config_parameters="${config_parameters} -gcc64 ${at}" + # Check optional parameter -ibmcmp + check_parameter "$(${config_script} -h)" "-ibmcmp" "in_string" && \ + config_parameters="${config_parameters} -ibmcmp ${xlb}" + # Check optional parameter -ibmrt + check_parameter "$(${config_script} -h)" "-ibmrt" "in_string" && \ + config_parameters="${config_parameters} -ibmrt ${xl_basert}" + # Check optional parameter -dfp + check_parameter "$(${config_script} -h)" "-dfp" "in_string" && \ + config_parameters="${config_parameters} -dfp ${xl_base_file}" + # Run the script with the correct parameters and log + echo " ${config_script} ${config_parameters}" + { + ${config_script} ${config_parameters} + } &> ${logfile} + if [ $? != 0 ]; then + echo "Error creating the config file. Aborting XLC/XLF config" \ + "file generation." + echo "A log is available at ${logfile}" + echo "If you need config files for XLC/XLF, please refer to" \ + "your XLC/XLF config documentation on how to create" \ + "them manually." + exit 1 + fi + # Run the script with the -at parameter alone. + # This run of the configuration script only changes the + # internal config files of the referred XL compiler, so + # it doesn't touch those configs inside Advance + # Toolchain folder tree, generated above. + echo " ${config_script} -at" + { + ${config_script} -at + } &> ${logfile} + # Without a valid license, instruct user and abort configuration + else + echo "Your XLC/XLF license wasn't accepted yet." \ + "Aborting XLC/XLF config file generation." + echo "A log is available at ${logfile}" + echo "Please accept the XLC/XLF license prior to" \ + "this, and only then run '${config_script} -at'" \ + "manually." + exit 1 + fi + # Check and configure which one to use (old or new) + elif [[ -f "${new_install}" ]] \ + && check_parameter "${new_install}" "-at" "in_file"; then + if ! xl_license_accepted "${status_license}"; then + echo "Your XLC/XLF license wasn't accepted yet." \ + "Aborting XLC/XLF config file generation." + echo "A log is available at ${logfile}" + echo "Run '${new_install} -at' manually." + exit 1 + fi + + local config_parameters="-at" + # Check support for non-standard AT directories. + check_parameter "${new_install}" "AT_PREFIX" "in_file" \ + && config_parameters="${config_parameters} \"${at}\"" + + # Run the script with the correct parameters and log + echo " ${new_install} ${config_parameters}" + { + ${new_install} ${config_parameters} + } &> ${logfile} + + # Usual process became the secure fall back + else + # Check required script's existence + if [ ! -f "${config_script}" ]; then + echo "Cannot find $config_script" + return 1 + fi + # Run the script with the correct parameters and log + echo " ${config_script} -gcc ${at} -gcc64 ${at} " \ + "-ibmcmp ${xlb} -o ${config}" \ + "-ibmrt ${xl_basert}" \ + "-dfp ${xl_base_file}" + { + ${config_script} -gcc "${at}" -gcc64 "${at}" \ + -ibmcmp ${xlb} -o "${config}" \ + -ibmrt ${xl_basert} \ + -dfp "${xl_base_file}" + } &> ${logfile} + fi + if [ $? != 0 ]; then + echo "Error creating the config file. Aborting XLC/XLF config" \ + "file generation." + echo "A log is available at ${logfile}" + echo "If you need config files for XLC/XLF, please refer to" \ + "your XLC/XLF config documentation on how to create" \ + "them manually." + exit 1 + fi + return 0 +} + + +# Identify AT parameters +at_scripts=${0%/*} +at=${at_scripts%/*} +at_str=`echo ${at##*/} | tr [a-z.] [A-Z_]` + +# Test permissions +touch ${at_scripts}/testfile > /dev/null 2>&1 +if [ $? != 0 ]; then + echo "You do not have permission to write at ${at_scripts}" + echo "Please re-run this script as root." + exit 1 +fi +rm ${at_scripts}/testfile + +# This is the default installation path for XL +if [[ -z ${xl_base} ]]; then + if [[ -e '/opt/ibm/xlf' || -e '/opt/ibm/xlC' ]]; then + # New path, since xlC 13.1 and xlf 15.1. + xl_base='/opt/ibm' + else + xl_base='/opt/ibmcmp' + fi +fi + +# Note that the path for the compiler invocations is different in +# xlC 13.1 and xlf 15.1, even though the runtime libraries remain +# in the same location. +# It turned out that on xlC 13.1.1 and xlf 15.1.1, they updated the +# runtime library path to the same new place, removing /opt/ibmcmp +# completely. +if [[ -z ${xl_basert} ]]; then + if [[ -d '/opt/ibmcmp' ]]; then + xl_basert='/opt/ibmcmp' + else + xl_basert=${xl_base} + fi +fi + +# Test XL installation +echo "Testing for optional IBM XL compilers installation..." +echo "This will check for XLC/XLF availability and create config files for" \ + "them in $at_scripts" +ls ${xl_base} > /dev/null 2>&1 +if [ $? != 0 ]; then + echo "IBM XL compilers not found in its default location at $xl_base" + echo "If it is installed somewhere else, please re-run:" + echo "xl_base= $0" + exit 0 +else + echo "IBM XL compilers found in $xl_base" +fi + +# Create the config files +for xlb in ${xl_base}; do + for compiler in vac xlf xlC; do + if [ -d "${xlb}/${compiler}" ]; then + for version in `\ls ${xlb}/${compiler}`; do + create_config ${version} ${compiler} ${xlb} + done + fi + done +done + +echo "All config files created in $at_scripts and are ready for use." +echo "If you need to use XLC/XLF with the Advance Toolchain, invoke the XL" \ + "compiler suite using -F$at_scripts/." +exit 0 diff --git a/scripts/distributed/createldhuge-1.0.sh b/scripts/distributed/createldhuge-1.0.sh new file mode 100755 index 000000000..ddef0d86e --- /dev/null +++ b/scripts/distributed/createldhuge-1.0.sh @@ -0,0 +1,130 @@ +#!/bin/bash +# +# Copyright 2017 IBM Corporation + +abort() { + MSG="$@" + echo "* $MSG" + cp _`basename $0` $logdir/_`basename $0` + exit 1; +} + +if test -z "$1"; then + cat <&1 | tee _`basename $0` + exit ${PIPESTATUS[0]} +fi +shift # Strip off -already_logging and commence as usual. + +echo "+ executing `basename $0` $*" + +if test -z "$1"; then + abort "The file path to the ld.hugetlbfs parameter (\$1) must be set." +else + if test ! -e "$1"; then + abort "The given location of ld.hugetlbfs ($1) does not exist." + fi + # Get the absolute path + pushd `dirname $1` > /dev/null + LD_HUGE="`pwd`/`basename $1`" + popd > /dev/null +fi + +if test -z "$2"; then + abort "The directory path to the Advance Toolchain (\$3) must be set." +else + if test ! -d "$2"; then + abort "The directory path to the Advance Toolchain ($3) does not exist." + fi + # Get the absolute path + pushd $2 > /dev/null + AT_PATH="`pwd`" + popd > /dev/null +fi + +LD_ORIG="$AT_PATH/bin/ld.orig" + +if test -x "${LD_ORIG}"; then + echo "There's already a version of the hugetlbfs ld wrapper at $LD_ORIG." + exit +fi + +echo "mv $AT_PATH/bin/ld $LD_ORIG" +cp -p $AT_PATH/bin/ld $LD_ORIG + +# This'll overwrite with permissions intact. +cat > $AT_PATH/bin/ld < + +Print the list of requirements of . This list is useful to fill the +field "Requires" in a RPM spec file. + +Options: + -h|--help display this help and exit +EOF +} + +# This script requires at least one argument. +if [[ ${#} -le 0 ]]; then + help + # Invalid argument. + exit 22 +fi + +case "${1}" in + -h|--help) + help + exit 0 + ;; +esac + +if [[ $(uname -m) != ppc* ]]; then + is_cross=yes +fi; + +readelf_path=$(which readelf) +for file in "${@}"; do + # Ignore files we can't read or execute. + if [[ ! -x ${file} ]] || [[ ! -r ${file} ]]; then + continue + fi + + # Ignore the loader. Are you using the Advance Toolchain to build + # glibc? + if [[ "${file}" == ld-*.so ]]; then + continue + fi + + file_info=$(file ${file}) + # If it isn't dynamically linked, we aren't interested. + echo "${file_info}" | grep "dynamically linked" &> /dev/null + if [[ ${?} -ne 0 ]]; then + continue + fi + + if [[ ${is_cross} == "yes" ]]; then + # In a cross environment, we don't provide requirements on + # PowerPC executables for RPM packages. + ${readelf_path} -h ${file} | grep "PowerPC" &> /dev/null + if [[ ${?} -eq 0 ]]; then + continue + fi + fi + + wordsize=$(echo "${file_info}" \ + | sed -e 's/^.*ELF //g' -e 's/-bit.*$//') + if [[ ${wordsize} -eq 32 ]]; then + suffix= + elif [[ ${wordsize} -eq 64 ]]; then + # This is a RPM requirement. + suffix="()(64bit)" + else + echo "Can't recognize ${file} word size" 1>&2 + exit 1 + fi; + + # Get the RUNPATH. The RUNPATH will tell us if this file was built + # using AT or not. + runpath=$(${readelf_path} -d ${file} \ + | grep 'RUNPATH' \ + | sed 's/^.*\: \[\(.*\)\]$/\1/') + at_path=${runpath%%/lib*} + if [[ ${is_cross} != "yes" && ${runpath} == /opt/at* ]]; then + ldd_path=${at_path}/bin/ldd + else + ldd_path=$(which ldd) + fi; + # Treat non-AT files first. + ${ldd_path} -v ${file} | grep -v "${at_path:=^$}" | sed -n \ + "s/^[ \t]*\([^ ]\+\) \?(\?\([^ ]*\))\? =>.*$/\1${suffix}/p" \ + >> ${tmp_file} + if [[ ${PIPESTATUS[0]} -ne 0 ]]; then + echo "Failed to ldd file ${file}" 1>&2 + exit 1 + fi + + # Treat AT-provided files. + if [[ -n "${at_path}" ]]; then + for requirement in $(${ldd_path} ${file} \ + | grep ${at_path} \ + | awk '/=>/ {print $3}'); do + # Output the name of the package, instead of the name + # of the library. + rpm -q --qf "%{NAME} >= %{VERSION}-%{RELEASE}\n" \ + -f ${requirement} >> ${tmp_file} + done + fi +done + +# Print the result. +sort -u ${tmp_file} | grep -vE "${ignored}" + +# Remove the temporary file. +rm -f ${tmp_file} &> /dev/null diff --git a/scripts/distributed/restoreld.sh b/scripts/distributed/restoreld.sh new file mode 100755 index 000000000..18c21f034 --- /dev/null +++ b/scripts/distributed/restoreld.sh @@ -0,0 +1,58 @@ +#!/bin/bash +# +# Copyright 2017 IBM Corporation + +abort() { + MSG="$@" + echo "* $MSG" + cp _`basename $0` $logdir/_`basename $0` + exit 1; +} + +if test -z "$1"; then + cat <&1 | tee _`basename $0` + exit ${PIPESTATUS[0]} +fi +shift # Strip off -already_logging and commence as usual. + +echo "+ executing `basename $0` $*" + +if test -z "$1"; then + abort "The directory path to the Advance Toolchain (\$3) must be set." +else + if test ! -d "$1"; then + abort "The directory path to the Advance Toolchain ($3) does not exist." + fi + # Get the absolute path + pushd $1 > /dev/null + AT_PATH="`pwd`" + popd > /dev/null +fi + +if test -e "${AT_PATH}/bin/ld.orig"; then + cp -p ${AT_PATH}/bin/ld.orig ${AT_PATH}/bin/ld + rm ${AT_PATH}/bin/ld.orig + echo "The Advance Toolchain 'ld' has been restored." +else + echo "The Advance Toolchain 'ld' is already in place." +fi diff --git a/scripts/distributed/tle_on.sh b/scripts/distributed/tle_on.sh new file mode 100755 index 000000000..8f649c7a7 --- /dev/null +++ b/scripts/distributed/tle_on.sh @@ -0,0 +1,76 @@ +#!/bin/bash +# +# Copyright 2017 IBM Corporation +# +# Enable transactional lock elision within an AT +# enabled binary. +# +# WARNING: unless otherwise stated, the actions +# done here are unique to IBM's advance toolchain, +# and can change at any time for any reason. The +# only guarantee made is the usage of this +# script. +# +# Eventually, this script can be retired, and +# updated with the official glibc tunables +# framework, but until then, what is done here +# is not guaranteed to work between releases +# and may change at any time for any reason. + +NAME=${BASH_SOURCE##*/} + +function help +{ + cat << EOF +usage: ${NAME} [-e val] [-h] program [args...] + +Glibc TLE enables some locks to "skip" locking +and speculatively execute a critical section +guarded by a condition variable, or basic +mutex (i.e. one initialized via +PTHREAD_MUTEX_INITIALIZER). + +The runtime characteristics of TLE are largely +a function of the application and the processor +running it. + +TLE resources on POWER8 are shared among hardware +threads on a core, so it is best to enable TLE +only on applications which may benefit from this. + +This script will start program with the given +args. TLE will be enabled depending on the options +passed to this wrapper script. + +Any processes forked or created as result of +running this script will inherit these settings. + +-e yes|no + Enable TLE if value is yes + Default is yes (on). + +-h + Show this message. + +EOF +} + +enable_tle=yes + +# Coerce string inputs into numbers using let. +while getopts "he:" opt ; do +case $opt in + h) help; exit 0 ;; + e) enable_tle="$OPTARG" &> /dev/null;; + *) help; exit 1 ;; +esac +done + +shift "$((OPTIND - 1))" + +if [[ "$enable_tle" == "yes" ]]; then + export GLIBC_ELISION_ENABLE=yes +else + unset GLIBC_ELISION_ENABLE +fi +exec "$@" diff --git a/scripts/g++64 b/scripts/g++64 new file mode 100755 index 000000000..5dba038c9 --- /dev/null +++ b/scripts/g++64 @@ -0,0 +1,37 @@ +#!/bin/bash +# +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Set up a wrapper script that generates by default the kind of code we +# need. It calls the gcc found from PATH. This is only needed if the +# kind of binary we're building is different from that build by default +# by gcc in the path, e.g. if we're building 64-bit gcc binaries from +# a gcc that defaults to 32-bit binaries. + +# Usage: BUILD_CC=/gcc64 when configuring GCC with --with-cpu=default64 + +#_CC=`echo $0 | sed -e 's#.*/##'` +_CC=${0##*/} +_cmd="${_CC%%[0-9]*}" +_arch="-m${_CC##$_cmd}" # Default -m[32|64] value unless overridden by the user." +for opt in "$@"; do + case "$opt" in + -m32) _arch="" + break;; + -m64) _arch="" + break;; + esac +done +exec $_cmd $_arch "$@" diff --git a/scripts/gcc64 b/scripts/gcc64 new file mode 100755 index 000000000..07f20bae2 --- /dev/null +++ b/scripts/gcc64 @@ -0,0 +1,40 @@ +#!/bin/bash +# +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Set up a wrapper script that generates by default the kind of code we +# need. It calls the gcc found from PATH. This is only needed if the +# kind of binary we're building is different from that build by default +# by gcc in the path, e.g. if we're building 64-bit gcc binaries from +# a gcc that defaults to 32-bit binaries. + +# Usage: BUILD_CC=/gcc64 when configuring GCC with --with-cpu=default64 + +#_CC=`echo $0 | sed -e 's#.*/##'` +_CC=${0##*/} +_cmd="${_CC%%[0-9]*}" +_arch="-m${_CC##$_cmd}" # Default -m[32|64] value unless overridden by the user." +for opt in "${@}"; do + case "${opt}" in + -m32) + _arch="" + break;; + -m64) + _arch="" + break;; + esac +done +exec ${_cmd} ${_arch} "${@}" + diff --git a/scripts/helpers/build_stage.mk b/scripts/helpers/build_stage.mk new file mode 100644 index 000000000..b64c1f9c2 --- /dev/null +++ b/scripts/helpers/build_stage.mk @@ -0,0 +1,90 @@ +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# FUNCTION: build_stage +# +# This function basically builds the code on source $1 following directives +# for stage $2 informed. It first clear the stage $2 build (if present) and +# then recreate the build. +# +# Used globals: +# $(BUILD) Place where the build should happen (usually $(AT_WD)/builds) +# +# Parameters: +# +# $1 Location of the source to use on the build +# e.g "/home/$USER/at-build/at5.0/sources/gcc +# +# $2 Kind of build stage to create (folder or symlink) +# e.g. "dir" or "link" +# +# $3 Numeric value for stage to build +# e.g. 1, 2, 3,..., n +# + +# Prepare the building area based on the rsync source folder and enter on it + +define build_stage + at_active_build=$(BUILD)/$$(basename $1)$${AT_BIT_SIZE}_$3; \ + echo "Recreating the build folder."; \ + if [[ -e $${at_active_build} ]]; then \ + rm -rf $${at_active_build}; \ + fi; \ + if [[ "$2" == "link" ]]; then \ + cp -r --preserve=mode,timestamps $1 $${at_active_build}; \ + else \ + mkdir $${at_active_build}; \ + fi; \ + pushd $${at_active_build}; \ + echo "Build stage $3, on $${at_active_build}..." +endef + + +# FUNCTION: build_stage2 +# +# This function basically builds the code on source $1 following +# directives $2. It first clear the build (if present) and then recreate +# the build. +# +# Used globals: +# $(BUILD) Place where the build should happen (usually $(AT_WD)/builds) +# +# Parameters: +# +# $1 Location of the source to use on the build +# e.g "/home/$USER/at-build/at5.0/sources/gcc +# +# $2 Kind of build stage to create (folder or symlink) +# e.g. "dir" or "link" +# +# $3 Stage id +# e.g. glibc32_2, kernel_h +# + +# Prepare the building area based on the rsync source folder and enter on it +define build_stage2 + at_active_build=$(BUILD)/$3; \ + echo "Recreating the build folder."; \ + if [[ -e $${at_active_build} ]]; then \ + rm -rf $${at_active_build}; \ + fi; \ + if [[ "$2" == "link" ]]; then \ + cp -r --preserve=mode,timestamps,links --no-dereference \ + $1 $${at_active_build}; \ + else \ + mkdir $${at_active_build}; \ + fi; \ + pushd $${at_active_build}; \ + echo "Build stage $3, on $${at_active_build}..." +endef diff --git a/scripts/helpers/pack-exclude.lst b/scripts/helpers/pack-exclude.lst new file mode 100644 index 000000000..8a3e493f1 --- /dev/null +++ b/scripts/helpers/pack-exclude.lst @@ -0,0 +1,43 @@ +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +./*.bz2 +./*.included +./*.tgz +./.svn +./DFP.txt +./POWERPC_CPU.txt +./README.ppc64-tc-utils +./TEST.txt +./at* +./atpack.sh +./configs/.svn +./docs +./gpg +./logs-collect +./old_patches +./pack.txt +./patches +./remote-build.exp +./scripts/.svn +./scripts/helpers/.svn +./scripts/skeletons/.svn +./scripts/specs/.svn +./sources +./tmp-* +./utils +.DS_Store +._* +.git* +.svn diff --git a/scripts/helpers/rsync_and_patch.mk b/scripts/helpers/rsync_and_patch.mk new file mode 100644 index 000000000..55aefef77 --- /dev/null +++ b/scripts/helpers/rsync_and_patch.mk @@ -0,0 +1,119 @@ +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# FUNCTION: rsync_and_patch +# +# This function does several things. It rsyncs @1 into @2. It then applies +# every patch in @3 to @2. Finally it untars all tars in @4 into @2. The +# parameters @3 and @4 can be empty strings i.e. "" if there are no patches +# or tars to apply. +# +# Parameters: +# +# @1 Location of the source to be copied +# e.g "/home/$USER/at-build/sources/gcc-4.1-20060628" +# +# @2 Destination where the source is to be copied +# e.g. "/home/$USER/at-build/at6.0/src/gcc" +# +# @3 Location of the patch files to be copied or "" (null) +# e.g "/home/$USER/at-build/patches" +# +# @4 Patch level tokens followed by fully qualified paths, space delimited or +# "" (null) +# e.g. "-p1 /home/$USER/at-build/patches/gcc-4.1-power5.patch -p0 /home/$USER/at-build/patches/gcc-4.1-power4.patch" +# +# @5 Fully qualified path to tar files, space delimited or "" +# e.g. "/home/$USER/at-build/patches/glibc-powerpc-cpu-addon-v0.02.tgz" +# +# @6 Parameter to flag a complete delete of the source +# + +define rsync_and_patch + [[ -n $${DEBUG} ]] && set -ex; \ + src_path=$1; \ + dest_path=$2; \ + patch_path=$3; \ + patch_list=$4; \ + tar_list=$5; \ + delete=$6; \ + if [[ -z $${src_path} ]] || [[ -z $${dest_path} ]]; then \ + echo "rsync_and_patch invoked without required parameters... Aborting!"; \ + exit 1; \ + fi; \ + if [[ ! -n "$${src_path}" ]]; then \ + echo "Couldn't find source at $${src_path}"; \ + exit 1; \ + fi; \ + mkdir -p $${dest_path}; \ + echo "rsync -rptlgo $${delete:+--delete} --exclude=CVS --exclude=.svn --exclude=.git\* --exclude=\*~ --exclude=.\* \"$${src_path}/\" \"$${dest_path}\""; \ + rsync -rptlgo $${delete:+--delete} --exclude=CVS --exclude=.svn --exclude=.git\* --exclude=\*~ --exclude=.\* "$${src_path}/" "$${dest_path}"; \ + if [[ $${?} -ne 0 ]]; then \ + echo "rsync of $${src_path} to $${dest_path} failed!"; \ + exit 1; \ + fi; \ + echo "rsync of $${src_path} to $${dest_path} successfull"; \ + patch_level=""; \ + patch=""; \ + for tar in $${tar_list}; do \ + cp -v $${patch_path}/$${tar} $${dest_path}/; \ + filetype=$$(echo $${tar} | grep "bz2" | sed "s/^.*\.bz2/bz2/"); \ + if [[ "$${filetype}" == "bz2" ]]; then \ + cd $${dest_path}; \ + tar -xvjf $${tar}; \ + if [[ $${?} -ne 0 ]]; then \ + echo " tar -xvjf $${tar} failed!"; \ + exit 1; \ + fi; \ + echo " tar -xvzf $${tar} was successfull"; \ + else \ + cd $${dest_path}; \ + tar -xvzf $${tar}; \ + if [[ $${?} -ne 0 ]]; then \ + echo " tar -xvjf $${tar} failed!"; \ + exit 1; \ + fi; \ + echo " tar -xvzf $${tar} was successfull"; \ + fi; \ + done; \ + if [[ -n $${delete} ]]; then \ + for token in $${patch_list}; do \ + if [[ -z $${patch_level} ]]; then \ + patch_level=$$(echo $${token} | tr _ " "); \ + patch=""; \ + continue; \ + fi; \ + patch="$${token}"; \ + if [[ ! -e "$${dest_path}/$${patch}" ]]; then \ + echo " preparing patch $${patch_path}/$${patch}..."; \ + cp -v $${patch_path}/$${patch} $${dest_path}/; \ + fi; \ + cd $${dest_path}; \ + patch $${patch_level} < $${patch}; \ + if [[ $${?} -ne 0 ]]; then \ + echo " patch $${patch_level} < $${patch} failed!"; \ + exit 1; \ + fi; \ + echo " patch $${patch_level} < $${patch} successfull"; \ + patch_level=""; \ + done; \ + fi; \ + unset -v src_path \ + dest_path \ + patch_path \ + patch_list \ + tar_list \ + delete; \ + [[ -n $${DEBUG} ]] && set +ex || echo +endef diff --git a/scripts/helpers/standard_buildf.mk b/scripts/helpers/standard_buildf.mk new file mode 100644 index 000000000..b7a0cbba3 --- /dev/null +++ b/scripts/helpers/standard_buildf.mk @@ -0,0 +1,212 @@ +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# FUNCTION: standard_buildf +# +# This function basically builds the code on source $1 following directives +# for stage $2 informed. It first clear the stage $2 build (if present) and +# then recreate the build. +# +# Parameters: +# +# $1 Location of the source to use on the build +# e.g "/home/$USER/at-build/at5.0/sources/gcc +# +# $2 Stage step to base your build on +# e.g. 1 +# +# $3 Location of the root build place +# e.g "/home/$USER/at-build/at5.0/builds" +# + +define standard_buildf + [[ -n $${DEBUG} ]] && set -ex; \ + set -x; \ + install_place=$$(echo $(TEMP_INSTALL)/$${AT_STEPID} | sed 's|//*|/|g'); \ + install_transfer=$$(echo $(TEMP_INSTALL)/$${AT_STEPID}/$(AT_DEST) | sed 's|//*|/|g'); \ + if [[ -e $${install_place} ]]; then \ + rm -rf $${install_place}; \ + mkdir $${install_place}; \ + fi; \ + echo "Checking for pre build hacks."; \ + if [[ "x$$(type -t atcfg_pre_hacks)" == "xfunction" ]]; then \ + echo "Running pre build hacks."; \ + $(call runandlog,$(LOGS)/_$${AT_STEPID}-3_standard_buildf-01_pre_build_hacks.log, eval atcfg_pre_hacks); \ + if [[ $${ret} -ne 0 ]]; then \ + echo "Problem running pre build hacks."; \ + exit 1; \ + fi; \ + fi; \ + echo "Begin the building process."; \ + echo "Checking for pre-configure settings and/or commands."; \ + if [[ "x$$(type -t atcfg_pre_configure)" == "xfunction" ]]; then \ + echo "Running pre-configure settings and/or commands."; \ + $(call runandlog,$(LOGS)/_$${AT_STEPID}-3_standard_buildf-02_pre_configure.log,eval atcfg_pre_configure); \ + if [[ $${ret} -ne 0 ]]; then \ + echo "Problem running pre-configure commands."; \ + exit 1; \ + fi; \ + fi; \ + echo "Running the selected configure"; \ + $(call runandlog,$(LOGS)/_$${AT_STEPID}-3_standard_buildf-03_configure.log,eval atcfg_configure); \ + if [[ $${ret} -ne 0 ]]; then \ + echo "Problem running configure command."; \ + exit 1; \ + fi; \ + echo "Checking for post-configure settings and/or commands."; \ + if [[ "x$$(type -t atcfg_post_configure)" == "xfunction" ]]; then \ + echo "Running post-configure settings and/or commands."; \ + $(call runandlog,$(LOGS)/_$${AT_STEPID}-3_standard_buildf-04_post_configure.log,eval atcfg_post_configure); \ + if [[ $${ret} -ne 0 ]]; then \ + echo "Problem running post-configure commands."; \ + exit 1; \ + fi; \ + fi; \ + echo "Checking for pre-make settings and/or commands."; \ + if [[ "x$$(type -t atcfg_pre_make)" == "xfunction" ]]; then \ + echo "Running pre-make settings and/or commands."; \ + $(call runandlog,$(LOGS)/_$${AT_STEPID}-3_standard_buildf-05_pre_make.log,eval atcfg_pre_make); \ + if [[ $${ret} -ne 0 ]]; then \ + echo "Problem running pre-make commands."; \ + exit 1; \ + fi; \ + fi; \ + echo "Running the selected make"; \ + $(call runandlog,$(LOGS)/_$${AT_STEPID}-3_standard_buildf-06_make.log,eval atcfg_make); \ + if [[ $${ret} -ne 0 ]]; then \ + echo "Problem running make command."; \ + exit 1; \ + fi; \ + if [[ "x$$(type -t atsrc_package_verify_make_log)" == "xfunction" ]]; then \ + echo "Checking make log for $${AT_STEPID}"; \ + atsrc_package_verify_make_log "$(LOGS)/_$${AT_STEPID}-3_standard_buildf-06_make.log"; \ + if [[ $${?} -ne 0 ]]; then \ + echo "Verify of make log failed"; \ + exit 1; \ + fi; \ + fi; \ + echo "Checking for post-make settings and/or commands."; \ + if [[ "x$$(type -t atcfg_post_make)" == "xfunction" ]]; then \ + echo "Running post-make settings and/or commands."; \ + $(call runandlog,$(LOGS)/_$${AT_STEPID}-3_standard_buildf-07_post_make.log,eval atcfg_post_make); \ + if [[ $${ret} -ne 0 ]]; then \ + echo "Problem running post-make commands."; \ + exit 1; \ + fi; \ + fi; \ + echo "Checking for make-check settings and/or commands."; \ + if [[ "x$$(type -t atcfg_make_check)" == "xfunction" ]]; then \ + make_check_value="none"; \ + if [[ "$${ATSRC_PACKAGE_MAKE_CHECK}" != "none" ]]; then \ + if [[ ("$${ATSRC_PACKAGE_MAKE_CHECK}" == "strict_fail") || \ + ("$${ATSRC_PACKAGE_MAKE_CHECK}" == "silent_fail") ]]; then \ + make_check_value="$${ATSRC_PACKAGE_MAKE_CHECK}"; \ + elif [[ "$${AT_MAKE_CHECK}" == "strict_fail" || "$${AT_MAKE_CHECK}" == "silent_fail" ]]; then \ + make_check_value="$${AT_MAKE_CHECK}"; \ + fi; \ + if [[ "$${make_check_value}" != "none" ]]; then \ + echo "Running make-check settings and/or commands."; \ + if [[ -e "$(LOGS)/_$${AT_STEPID}-3_standard_buildf-07_make_check.log" ]]; then \ + cat "$(LOGS)/_$${AT_STEPID}-3_standard_buildf-07_make_check.log" >> "$(LOGS)/_$${AT_STEPID}-3_standard_buildf-07_make_check_history.log"; \ + rm "$(LOGS)/_$${AT_STEPID}-3_standard_buildf-07_make_check.log"; \ + fi; \ + $(call runandlog,$(LOGS)/_$${AT_STEPID}-3_standard_buildf-07_make_check.log,eval atcfg_make_check); \ + if [[ $${ret} -eq 0 ]]; then \ + if [[ "x$$(type -t atsrc_package_verify_make_check_log)" == "xfunction" ]]; then \ + atsrc_package_verify_make_check_log "$(LOGS)/_$${AT_STEPID}-3_standard_buildf-07_make_check.log"; \ + if [[ $${?} -eq 0 ]]; then \ + ret=1; \ + fi; \ + fi; \ + fi; \ + if [[ $${ret} -ne 0 ]]; then \ + echo "Problem running make-check commands."; \ + echo "$(AT_TODAY) AT$(AT_FULL_VER) FAIL $${AT_STEPID}" >> "$(LOGS)/at_package_testing.log"; \ + if [[ "$${make_check_value}" == "strict_fail" ]]; then \ + exit 1; \ + else \ + export ATCFG_HOLD_TEMP_BUILD=yes; \ + fi; \ + else \ + echo "$(AT_TODAY) AT$(AT_FULL_VER) PASS $${AT_STEPID}" >> "$(LOGS)/at_package_testing.log"; \ + fi; \ + fi; \ + fi; \ + fi; \ + echo "Checking for pre-install settings and/or commands."; \ + if [[ "x$$(type -t atcfg_pre_install)" == "xfunction" ]]; then \ + echo "Running pre-install settings and/or commands."; \ + $(call runandlog,$(LOGS)/_$${AT_STEPID}-3_standard_buildf-08_pre_install.log,eval atcfg_pre_install); \ + if [[ $${ret} -ne 0 ]]; then \ + echo "Problem running pre-install commands."; \ + exit 1; \ + fi; \ + fi; \ + echo "Running the selected install"; \ + $(call runandlog,$(LOGS)/_$${AT_STEPID}-3_standard_buildf-09_install.log,eval atcfg_install); \ + if [[ $${ret} -ne 0 ]]; then \ + echo "Problem running install command."; \ + exit 1; \ + fi; \ + echo "Checking for post-install settings and/or commands."; \ + if [[ "x$$(type -t atcfg_post_install)" == "xfunction" ]]; then \ + echo "Running post-install settings and/or commands."; \ + $(call runandlog,$(LOGS)/_$${AT_STEPID}-3_standard_buildf-10_post_install.log,eval atcfg_post_install); \ + if [[ $${ret} -ne 0 ]]; then \ + echo "Problem running post-install commands."; \ + exit 1; \ + fi; \ + fi; \ + echo "Checking for post build hacks."; \ + if [[ "x$$(type -t atcfg_post_hacks)" == "xfunction" ]]; then \ + echo "Running post build hacks."; \ + $(call runandlog,$(LOGS)/_$${AT_STEPID}-3_standard_buildf-11_post_build_hacks.log, eval atcfg_post_hacks); \ + if [[ $${ret} -ne 0 ]]; then \ + echo "Problem running post build hacks."; \ + exit 1; \ + fi; \ + fi; \ + if [[ "$${ATCFG_INSTALL_PEDANTIC}" == "no" && (( ! -d "$${install_transfer}" )) ]]; then \ + echo "No pedantic install on inexistent $${install_transfer}, please check the previous logs for potential errors."; \ + elif [[ (( -z $${ATCFG_INSTALL_PEDANTIC} || "$${ATCFG_INSTALL_PEDANTIC}" == "yes" )) && (( ! -d "$${install_transfer}" )) ]]; then \ + echo "Pedantic install required, but inexistent $${install_transfer}. Aborting stage!"; \ + exit 1; \ + else \ + echo "Collect file paths installed."; \ + $(call collect_filelist,$(DYNAMIC_SPEC)/$${ATSRC_PACKAGE_BUNDLE}/$${AT_STEPID}.filelist,$${install_transfer},$(AT_DEST)); \ + if [[ "$(BUILD_DEBUG_ON)" != "yes" ]]; then \ + if [[ "$${ATCFG_HOLD_TEMP_INSTALL}" != "yes" ]]; then \ + echo "Removing files from $${install_place}."; \ + rm -rf $${install_place}; \ + fi; \ + fi; \ + echo "Looking for broken symlinks."; \ + broken_links=$(find . -type l -! -exec test -e {} \; -print); \ + if [[ -n "${broken_links}" ]]; then \ + echo -e "The following symlinks are broken:\n${broken_links}"; \ + exit 1; \ + fi; \ + fi; \ + echo "Checking for post install hacks."; \ + if [[ "x$$(type -t atcfg_posti_hacks)" == "xfunction" ]]; then \ + echo "Running post install hacks."; \ + $(call runandlog,$(LOGS)/_$${AT_STEPID}-3_standard_buildf-12_post_install_hacks.log, eval atcfg_posti_hacks); \ + if [[ $${ret} -ne 0 ]]; then \ + echo "Problem running post install hacks."; \ + exit 1; \ + fi; \ + fi; \ + echo -ne "Getting back to: "; popd; \ + [[ -n $${DEBUG} ]] && set +ex || echo +endef diff --git a/scripts/helpers/utilities.mk b/scripts/helpers/utilities.mk new file mode 100644 index 000000000..56bd10b8e --- /dev/null +++ b/scripts/helpers/utilities.mk @@ -0,0 +1,880 @@ +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Helper macro functions +# +# +# +# +# +# +# +# +# +# +# +# +# + +# +# +# +# Ex: $(call get_distro_info) +define get_distro_info + distro_rawname=$$($(LSBTOOL) -i | cut -d":" -f 2 | sed "s/^[ \t]*//" | tr [:upper:] [:lower:]); \ + distro_rawid=$$($(LSBTOOL) -r | cut -d":" -f 2 | sed "s/^[ \t]*//" | cut -d"." -f 1); \ + case $${distro_rawname} in \ + redhat*) \ + distro_name=redhat; \ + distro_abbrev="RHEL$${distro_rawid}"; \ + ;; \ + centos*) \ + distro_name=centos; \ + distro_abbrev=""; \ + ;; \ + suse*) \ + distro_name=suse; \ + distro_abbrev="SLES$${distro_rawid}"; \ + ;; \ + opensuse*) \ + distro_name=opensuse; \ + distro_abbrev=""; \ + ;; \ + fedora*) \ + distro_name=fedora; \ + distro_abbrev=""; \ + ;; \ + ubuntu*) \ + distro_name=ubuntu; \ + distro_abbrev=""; \ + ;; \ + debian*) \ + distro_name=debian; \ + distro_abbrev=""; \ + ;; \ + *) \ + distro_name=unknown; \ + distro_abbrev=""; \ + ;; \ + esac; \ + echo "$${distro_name}-$${distro_rawid} $${distro_abbrev}" +endef + + +# +# +# +# +# Ex: $(call start_debug) +define start_debug + [[ -n $${DEBUG} ]] && set -x +endef + + +# +# +# +# +# Ex: $(call end_debug) +define end_debug + set +x +endef + + +# +# +# +# +# Ex: $(call remove_tmpbuild) +define remove_tmpbuild + pushd $(TEMP_INSTALL); \ + folders=$$(find . -type d -print | sed '/^.$$/d'); \ + if [[ -z "$${folders}" ]]; then \ + echo "Cleaning all build stage..."; \ + rm -rf $(TEMP_INSTALL); \ + else \ + echo "Remaining install folders present..."; \ + fi; \ + popd +endef + + +# Build the environment variables needed by our basic build functions +# +# +# Ex: $(call std_setenv) +define std_setenv + echo "* Preparing standard build env variables."; \ + echo " - Setting host to $(HOST)"; \ + export host=$(HOST); \ + echo " - Setting at_dest to $(AT_DEST)"; \ + export at_dest=$(AT_DEST); \ + echo " - Setting at_base to $(AT_BASE)"; \ + export at_base=$(AT_BASE); \ + echo " - Setting at_name to $(AT_NAME)"; \ + export at_name=$(AT_NAME); \ + echo " - Setting destdir to $(DESTDIR)"; \ + export destdir=$(DESTDIR); \ + echo " - Setting at_major_version to $(AT_MAJOR_VERSION)"; \ + export at_major_version=$(AT_MAJOR_VERSION); \ + echo " - Setting at_major_internal to $(AT_MAJOR_INTERNAL)"; \ + export at_major_internal=$(AT_MAJOR_INTERNAL); \ + echo " - Setting at_full_ver to $(AT_FULL_VER)"; \ + export at_full_ver=$(AT_FULL_VER); \ + echo " - Setting at_revision_number to $(AT_REVISION_NUMBER)"; \ + export at_revision_number=$(AT_REVISION_NUMBER); \ + echo " - Setting at_internal to $(AT_INTERNAL)"; \ + export at_internal=$(AT_INTERNAL); \ + echo " - Setting at_ver_rev_internal to $(AT_VER_REV_INTERNAL)"; \ + export at_ver_rev_internal=$(AT_VER_REV_INTERNAL); \ + echo " - Setting at_use_fedora_relnam to $(AT_USE_FEDORA_RELNAM)"; \ + export at_use_fedora_relnam=$(AT_USE_FEDORA_RELNAM); \ + echo " - Setting kernel to $(AT_KERNEL)"; \ + export kernel=$(AT_KERNEL); \ + echo " - Setting compat_kernel to $(AT_OLD_KERNEL)"; \ + export compat_kernel=$(AT_OLD_KERNEL); \ + echo " - Setting number of cores num_cores to $(NUM_CORES)"; \ + export num_cores=$(NUM_CORES); \ + echo " - Setting logs to $(LOGS)"; \ + export logs=$(LOGS); \ + echo " - Setting config to $(CONFIG)"; \ + export config=$(CONFIG); \ + echo " - Setting sources to $(SOURCE)"; \ + export sources=$(SOURCE); \ + echo " - Setting builds to $(BUILD)"; \ + export builds=$(BUILD); \ + echo " - Setting dest_cross to $(DEST_CROSS)"; \ + export dest_cross=$(DEST_CROSS); \ + echo " - Setting scripts to $(SCRIPTS_ROOT)"; \ + export scripts=$(SCRIPTS_ROOT); \ + echo " - Setting skeletons to $(SKELETONS_ROOT)"; \ + export skeletons=$(SKELETONS_ROOT); \ + echo " - Setting script helpers to $(SCRIPTS_ROOT)/utilities"; \ + export utilities=$(SCRIPTS_ROOT)/utilities; \ + echo " - Setting dynamic_spec to $(DYNAMIC_SPEC)"; \ + export dynamic_spec=$(DYNAMIC_SPEC); \ + echo " - Setting config_spec to $(CONFIG_SPEC)"; \ + export config_spec=$(CONFIG_SPEC); \ + echo " - Setting the temporary instalation directory to '$(TEMP_INSTALL)'"; \ + export tmp_dir=$(TEMP_INSTALL); \ + echo " - Setting the installation directory for cross to '$(TEMP_INSTALL)/$${AT_STEPID}/$(DEST_CROSS)'"; \ + export install_transfer_cross=$(TEMP_INSTALL)/$${AT_STEPID}/$(DEST_CROSS); \ + echo " - Setting at_supported_distros to $(AT_SUPPORTED_DISTROS)"; \ + export at_supported_distros="$(AT_SUPPORTED_DISTROS)"; \ + echo "* Finished standard env variables." +endef + + +# Build the environment variables needed by the build stage script functions +# +# +# +# Ex: $(call build_setenv) +define build_setenv + $(call std_setenv); \ + echo "* Preparing build env variables."; \ + echo " - Setting secure_plt to $(SECURE_PLT)"; \ + export secure_plt=$(SECURE_PLT); \ + echo " - Setting default_cpu to $(DEFAULT_CPU)"; \ + export default_cpu=$(DEFAULT_CPU); \ + echo " - Setting header_target to $(HEADER_TARGET)"; \ + export header_target=$(HEADER_TARGET); \ + echo " - Setting header_target64 to $(HEADER_TARGET64)"; \ + export header_target64=$(HEADER_TARGET64); \ + echo " - Setting target to $(TARGET)"; \ + export target=$(TARGET); \ + echo " - Setting alternate_target to $(ALTERNATE_TARGET)"; \ + export alternate_target=$(ALTERNATE_TARGET); \ + echo " - Setting target32 to $(TARGET32)"; \ + export target32=$(TARGET32); \ + echo " - Setting target64 to $(TARGET64)"; \ + export target64=$(TARGET64); \ + echo " - Setting compiler to $(COMPILER)"; \ + export compiler=$(COMPILER); \ + echo " - Setting env_build_arch to $(ENV_BUILD_ARCH)"; \ + export env_build_arch=$(ENV_BUILD_ARCH); \ + echo " - Setting system_cc to $(SYSTEM_CC)"; \ + export system_cc="$(SYSTEM_CC)"; \ + echo " - Setting system_cxx to $(SYSTEM_CXX)"; \ + export system_cxx="$(SYSTEM_CXX)"; \ + echo " - Setting autoconf to $(AUTOCONF)"; \ + export autoconf="$(AUTOCONF)"; \ + echo " - Setting default_compiler to $(DEFAULT_COMPILER)"; \ + export default_compiler=$(DEFAULT_COMPILER); \ + echo " - Setting at_build_cpu to $(AT_BUILD_CPU)"; \ + export at_build_cpu=$(AT_BUILD_CPU); \ + echo " - Setting build_arch to $(BUILD_ARCH)"; \ + export build_arch=$(BUILD_ARCH); \ + echo " - Setting host_arch to $(HOST_ARCH)"; \ + export host_arch=$(HOST_ARCH); \ + echo " - Setting cross_build to $(CROSS_BUILD)"; \ + export cross_build=$(CROSS_BUILD); \ + echo " - Setting build_load_arch to $(BUILD_LOAD_ARCH)"; \ + export build_load_arch=$(BUILD_LOAD_ARCH); \ + echo " - Setting build_base_arch to $(BUILD_BASE_ARCH)"; \ + export build_base_arch=$(BUILD_BASE_ARCH); \ + echo " - Setting auxiliary gcc gcc64 to $(SCRIPTS_ROOT)/gcc64"; \ + export gcc64=$(SCRIPTS_ROOT)/gcc64; \ + echo " - Setting auxiliary g++ gpp64 to $(SCRIPTS_ROOT)/g++64"; \ + export gpp64=$(SCRIPTS_ROOT)/g++64; \ + echo " - Setting distribution distro_fm to $(DISTRO_FM)"; \ + export distro_fm=$(DISTRO_FM); \ + echo " - Setting packaging system pack_sys to $(pack-sys)"; \ + export pack_sys=$(pack-sys); \ + echo " - Setting with_longdouble to $(BUILD_WITH_LONGDOUBLE)"; \ + export with_longdouble=$(BUILD_WITH_LONGDOUBLE); \ + echo " - Setting build_with_dfp_standalone to $(BUILD_WITH_DFP_STANDALONE)"; \ + export build_with_dfp_standalone=$(BUILD_WITH_DFP_STANDALONE); \ + if [[ -n "$(DISABLE_MULTILIB)" ]]; then \ + echo " - Setting disable_multilib to yes"; \ + export disable_multilib=yes; \ + fi; \ + echo " - Setting build_optimization to $(BUILD_OPTIMIZATION)"; \ + export build_optimization="$(BUILD_OPTIMIZATION)"; \ + echo " - Setting build_gcc_languages to $(BUILD_GCC_LANGUAGES)"; \ + export build_gcc_languages=$(BUILD_GCC_LANGUAGES); \ + echo " - Setting build_ignore_compat to $(BUILD_IGNORE_COMPAT)"; \ + export build_ignore_compat=$(BUILD_IGNORE_COMPAT); \ + echo " - Setting build_ignore_at_compat to $(BUILD_IGNORE_AT_COMPAT)"; \ + export build_ignore_at_compat=$(BUILD_IGNORE_AT_COMPAT); \ + echo " - Setting build_old_at_version to $(BUILD_OLD_AT_VERSION)"; \ + export build_old_at_version=$(BUILD_OLD_AT_VERSION); \ + echo " - Setting build_old_at_install to $(BUILD_OLD_AT_INSTALL)"; \ + export build_old_at_install=$(BUILD_OLD_AT_INSTALL); \ + echo " - Setting distro suppoted java versions to '$(AT_JAVA_VERSIONS)'"; \ + export java_versions="$(AT_JAVA_VERSIONS)"; \ + echo "* Finished build env variables." +endef + + +# Build the environment variables needed by the RPM pkg build functions +# +# +# Ex: $(call rpm_setenv) +define rpm_setenv + $(call build_setenv); \ + echo "* Preparing rpm env variables."; \ + echo " - Setting rpms to $(RPMS)"; \ + export rpms="$(RPMS)"; \ + echo " - Setting rpm_build_type to $(BUILD_RPMS)"; \ + export rpm_build_type="$(BUILD_RPMS)"; \ + echo " - Setting build_rpm_packager to $(BUILD_RPM_PACKAGER)"; \ + export build_rpm_packager="$(BUILD_RPM_PACKAGER)"; \ + echo " - Setting build_rpm_vendor to $(BUILD_RPM_VENDOR)"; \ + export build_rpm_vendor="$(BUILD_RPM_VENDOR)"; \ + echo " - Setting at_sign_repo to $(AT_SIGN_REPO)"; \ + export at_sign_repo="$(AT_SIGN_REPO)"; \ + echo " - Setting at_sign_repo_cross to $(AT_SIGN_REPO_CROSS)"; \ + export at_sign_repo_cross="$(AT_SIGN_REPO_CROSS)"; \ + echo " - Setting at_sign_pkgs to $(AT_SIGN_PKGS)"; \ + export at_sign_pkgs="$(AT_SIGN_PKGS)"; \ + echo " - Setting at_sign_pkgs_cross to $(AT_SIGN_PKGS_CROSS)"; \ + export at_sign_pkgs_cross="$(AT_SIGN_PKGS_CROSS)"; \ + echo " - Setting at_gpg_keyid to $(AT_GPG_KEYID)"; \ + export at_gpg_keyid="$(AT_GPG_KEYID)"; \ + echo " - Setting at_gpg_keyidc to $(AT_GPG_KEYIDC)"; \ + export at_gpg_keyidc="$(AT_GPG_KEYIDC)"; \ + echo " - Setting at_gpg_keyidl to $(AT_GPG_KEYIDL)"; \ + export at_gpg_keyidl="$(AT_GPG_KEYIDL)"; \ + echo " - Setting at_gpg_repo_keyid to $(AT_GPG_REPO_KEYID)"; \ + export at_gpg_repo_keyid="$(AT_GPG_REPO_KEYID)"; \ + echo " - Setting at_gpg_repo_keyidc to $(AT_GPG_REPO_KEYIDC)"; \ + export at_gpg_repo_keyidc="$(AT_GPG_REPO_KEYIDC)"; \ + echo " - Setting at_gpg_repo_keyidl to $(AT_GPG_REPO_KEYIDL)"; \ + export at_gpg_repo_keyidl="$(AT_GPG_REPO_KEYIDL)"; \ + echo " - Setting at_compat_distros to $(AT_COMPAT_DISTROS)"; \ + export at_compat_distros="$(AT_COMPAT_DISTROS)"; \ + echo " - Setting distro_id to $(DISTRO_ID)"; \ + export distro_id="$(DISTRO_ID)"; \ + echo " - Setting src_tar_file to $(SRC_TAR_FILE)"; \ + export src_tar_file="$(SRC_TAR_FILE)"; \ + echo " - Setting relnot_file to $(RELNOT_FILE)"; \ + export relnot_file="$(RELNOT_FILE)"; \ + echo " - Setting at_repocmd_opts to $(AT_REPOCMD_OPTS)"; \ + export at_repocmd_opts="$(AT_REPOCMD_OPTS)"; \ + echo " - Setting build_exclusive_cross to $(BUILD_EXCLUSIVE_CROSS)"; \ + export build_exclusive_cross="$(BUILD_EXCLUSIVE_CROSS)"; \ + echo "* Finished rpm env variables." +endef + + +# Build the environment variables needed by the DEB pkg build functions +# +# +# Ex: $(call deb_setenv) +define deb_setenv + $(call build_setenv); \ + echo "* Preparing deb env variables."; \ + echo " - Setting debh_root to $(DEBH_ROOT)"; \ + export debh_root=$(DEBH_ROOT); \ + echo " - Setting debs to $(DEBS)"; \ + export debs="$(DEBS)"; \ + echo "* Finished deb env variables." +endef + + +# +# +# +# Ex: $(call collect_filelist,,,) +define collect_filelist + echo "Validate the existence of the final filelist folder."; \ + if [[ ! -d "$$(dirname $1)" ]]; then \ + mkdir -p $$(dirname $1); \ + fi; \ + echo "Collecting installed files and links."; \ + find $2 -type f -print > $1; \ + find $2 -type l -print >> $1; \ + echo "Fixing the paths on the final file list"; \ + cat $1 | sort -u | \ + sed "s|$2|$3|g" > $1.seg; \ + mv $1.seg $1; \ + echo "Moving them to final position."; \ + rsync -aH $2/ $3; \ + if [[ $${?} -ne 0 ]]; then \ + echo "Found a problem copying to final destination... aborting!"; \ + exit 1; \ + fi; \ + echo "Completed installed files and links collection." +endef + + +# +# +# +# Created the AT ld.so.conf file +# Ex: $(call prepare_loader_cache) +# +# Although Ubuntu and Debian support multiarch libraries, many packages are +# still distributed in /lib or /usr/lib instead of the correct multiarch +# directory. So, it's necessary to carry a hack until they complete to port +# all packages to multiarch. +define prepare_loader_cache + set -e; \ + if [[ ! -d "$(AT_DEST)/etc/ld.so.conf.d" ]]; then \ + mkdir $(AT_DEST)/etc/ld.so.conf.d; \ + fi; \ + if [[ -n "$(TARGET32)" ]]; then \ + echo "$(AT_DEST)/$(TARGET)/lib" > "$(DYNAMIC_LOAD)/at32.ld.conf"; \ + echo "$(AT_DEST)/lib" >> "$(DYNAMIC_LOAD)/at32.ld.conf"; \ + echo "/lib" > "$(DYNAMIC_LOAD)/sys32.ld.conf"; \ + echo "/usr/lib" >> "$(DYNAMIC_LOAD)/sys32.ld.conf"; \ + echo "/usr/local/lib" >> "$(DYNAMIC_LOAD)/sys32.ld.conf"; \ + fi; \ + if [[ -n "$(TARGET64)" ]]; then \ + echo "$(AT_DEST)/$(TARGET)/lib64" > "$(DYNAMIC_LOAD)/at64.ld.conf"; \ + echo "$(AT_DEST)/lib64" >> "$(DYNAMIC_LOAD)/at64.ld.conf"; \ + echo "/lib64" > "$(DYNAMIC_LOAD)/sys64.ld.conf"; \ + if [[ "$(DISTRO_FM)" == "ubuntu" ]]; then \ + echo "/lib/$(TARGET)" >> "$(DYNAMIC_LOAD)/sys64.ld.conf"; \ + echo "/usr/lib/$(TARGET)" >> "$(DYNAMIC_LOAD)/sys64.ld.conf"; \ + echo "/lib" >> "$(DYNAMIC_LOAD)/sys64.ld.conf"; \ + echo "/usr/lib" >> "$(DYNAMIC_LOAD)/sys64.ld.conf"; \ + else \ + echo "/usr/lib64" >> "$(DYNAMIC_LOAD)/sys64.ld.conf"; \ + echo "/usr/local/lib64" >> "$(DYNAMIC_LOAD)/sys64.ld.conf"; \ + fi; \ + fi; \ + if [[ $1 -eq 2 ]]; then \ + for CPU in $(TUNED_PROCESSORS); do \ + if [[ -n "$(TARGET32)" ]]; then \ + echo "$(AT_DEST)/lib/$${CPU}" >> "$(DYNAMIC_LOAD)/at32.ld.conf"; \ + fi; \ + if [[ -n "$(TARGET64)" ]]; then \ + echo "$(AT_DEST)/lib64/$${CPU}" >> "$(DYNAMIC_LOAD)/at64.ld.conf"; \ + fi; \ + done; \ + echo "include /etc/ld.so.conf.d/*.conf" > "$(DYNAMIC_LOAD)/sysinc.ld.conf"; \ + echo "include $(AT_DEST)/etc/ld.so.conf.d/*.conf" > "$(DYNAMIC_LOAD)/atinc.ld.conf"; \ + fi; \ + if [[ -n "$(TARGET32)" && -n "$(TARGET64)" ]]; then \ + paste -d '\n' "$(DYNAMIC_LOAD)/at32.ld.conf" \ + "$(DYNAMIC_LOAD)/at64.ld.conf" > "$(DYNAMIC_LOAD)/ld.so.conf"; \ + elif [[ -n "$(TARGET64)" ]]; then \ + cat "$(DYNAMIC_LOAD)/at64.ld.conf" > "$(DYNAMIC_LOAD)/ld.so.conf"; \ + else \ + cat "$(DYNAMIC_LOAD)/at32.ld.conf" > "$(DYNAMIC_LOAD)/ld.so.conf"; \ + fi; \ + [[ -f "$(DYNAMIC_LOAD)/atinc.ld.conf" ]] && \ + cat "$(DYNAMIC_LOAD)/atinc.ld.conf" >> "$(DYNAMIC_LOAD)/ld.so.conf"; \ + if [[ -n "$(TARGET32)" && -n "$(TARGET64)" ]]; then \ + paste -d '\n' "$(DYNAMIC_LOAD)/sys32.ld.conf" \ + "$(DYNAMIC_LOAD)/sys64.ld.conf" >> "$(DYNAMIC_LOAD)/ld.so.conf"; \ + elif [[ -n "$(TARGET64)" ]]; then \ + cat "$(DYNAMIC_LOAD)/sys64.ld.conf" >> "$(DYNAMIC_LOAD)/ld.so.conf"; \ + else \ + cat "$(DYNAMIC_LOAD)/sys32.ld.conf" >> "$(DYNAMIC_LOAD)/ld.so.conf"; \ + fi; \ + grep -E -v "^$$" "$(DYNAMIC_LOAD)/ld.so.conf" > "$(AT_DEST)/etc/ld.so.conf"; \ + "$(AT_DEST)/sbin/ldconfig"; \ + group=$$( ls $(DYNAMIC_SPEC)/ | grep "toolchain\$$" ); \ + echo "$(AT_DEST)/etc/ld.so.conf" \ + > $(DYNAMIC_SPEC)/$${group}/ldconfig.filelist; \ + echo "$(AT_DEST)/etc/ld.so.conf.d" \ + >> $(DYNAMIC_SPEC)/$${group}/ldconfig.filelist; \ + if [[ $1 -eq 2 ]]; then \ + if [[ "$(BUILD_IGNORE_COMPAT)" == "no" ]]; then \ + cp -rt $(AT_DEST)/compat/etc/ \ + $(AT_DEST)/etc/ld.so.conf.d $(AT_DEST)/etc/ld.so.conf; \ + echo "$(AT_DEST)/compat/etc/ld.so.conf" \ + > $(DYNAMIC_SPEC)/$${group}/ldconfig_compat.filelist; \ + echo "$(AT_DEST)/compat/etc/ld.so.conf.d" \ + >> $(DYNAMIC_SPEC)/$${group}/ldconfig_compat.filelist; \ + fi; \ + fi; \ + set +e +endef + + +# +# +# +# +# Ex: $(call clean_stage) +define clean_stage + if [[ -d $${at_active_build} ]]; then \ + at_base_scan=$$(echo $${at_active_build} | sed "s@$(AT_WD)/@./@g"); \ + cd $(AT_WD); \ + tar cf - $$({ { find $${at_base_scan} -type f -name 'config.[hlms]*' -print; \ + find $${at_base_scan} -type f -name '*.log' -print; } \ + | sort -u; }) | \ + tar xf - -C $(LOGS); \ + if [[ "$(BUILD_DEBUG_ON)" != "yes" ]]; then \ + [[ "$${ATCFG_HOLD_TEMP_BUILD}" == "yes" ]] || rm -rf $${at_active_build}; \ + fi; \ + fi +endef + + +# +# +# +# +# Ex: $(call fetch_patches_from_ml,,) +define fetch_patches_from_ml + echo "Going to $(FETCH_PATCHES) folder"; \ + pushd $(FETCH_PATCHES); \ + if [[ ! -z $2 ]]; then \ + echo "* Collecting patches for $1:"; \ + for token in $2; do \ + if [[ -z $${patch_url} ]]; then \ + patch_url=$${token}; \ + patch_name=; \ + patch_count=; \ + continue; \ + fi; \ + if [[ -z $${patch_name} ]]; then \ + patch_name=$${token}; \ + patch_count=; \ + continue; \ + fi; \ + patch_count=$${token}; \ + wget "$${patch_url}" -O $${patch_name} \ + > $(LOGS)/_$${AT_STEPID}-mailinglist_wget.log.tmp 2>&1; \ + if [[ $${?} -ne 0 ]]; then \ + if grep 'Self-signed certificate encountered.' \ + $(LOGS)/_$${AT_STEPID}-mailinglist_wget.log.tmp; then \ + echo "Retrying without certificate check..." \ + >> $(LOGS)/_$${AT_STEPID}-mailinglist_wget.log.tmp 2>&1; \ + wget --no-check-certificate "$${patch_url}" \ + -O $${patch_name} \ + >> $(LOGS)/_$${AT_STEPID}-mailinglist_wget.log.tmp 2>&1; \ + if [[ $${?} -ne 0 ]]; then \ + cat $(LOGS)/_$${AT_STEPID}-mailinglist_wget.log.tmp \ + >> $(LOGS)/_$${AT_STEPID}-mailinglist_wget.log; \ + rm -rf $(LOGS)/_$${AT_STEPID}-mailinglist_wget.log.tmp; \ + echo -e "\tPatch $${patch_name} - [FAILED]"; \ + rm -rf $${fetch_lock}; \ + popd; \ + exit 1; \ + fi; \ + else \ + cat $(LOGS)/_$${AT_STEPID}-mailinglist_wget.log.tmp \ + >> $(LOGS)/_$${AT_STEPID}-mailinglist_wget.log; \ + rm -rf $(LOGS)/_$${AT_STEPID}-mailinglist_wget.log.tmp; \ + echo -e "\tPatch $${patch_name} - [FAILED]"; \ + rm -rf $${fetch_lock}; \ + popd; \ + exit 1; \ + fi; \ + fi; \ + cat $(LOGS)/_$${AT_STEPID}-mailinglist_wget.log.tmp \ + >> $(LOGS)/_$${AT_STEPID}-mailinglist_wget.log; \ + rm -rf $(LOGS)/_$${AT_STEPID}-mailinglist_wget.log.tmp; \ + echo -e "\tPatch $${patch_name} - [SUCCESS]"; \ + START=""; \ + count=0; \ + IFS_SAVE=$${IFS}; \ + IFS=; \ + while read -r line; do \ + if [[ -z $${START} ]]; then \ + START=$$(echo "$${line}" | sed -n '/^diff/p;/^Index/p;/^--- /p'); \ + if [[ ! -z $${START} ]]; then \ + count=$$(( count + 1 )); \ + echo "$${line}" >> $${patch_name}.temp; \ + continue; \ + else \ + continue; \ + fi; \ + else \ + count=$$(( count + 1 )); \ + echo "$${line}" >> $${patch_name}.temp; \ + fi; \ + if [[ $${count} -eq $${patch_count} ]]; then \ + break; \ + fi; \ + done < $${patch_name}; \ + IFS=$${IFS_SAVE}; \ + mv $${patch_name}.temp $${patch_name}; \ + patch_url=; \ + patch_name=; \ + patch_count=; \ + done; \ + fi; \ + popd +endef + + +# +# +# +# +# Ex: $(call fetch_sources) +define fetch_sources + echo "Going to $(FETCH_SOURCES) folder"; \ + pushd $(FETCH_SOURCES); \ + echo "Looking for internal repos on final builds"; \ + num_mirrors=$$(eval echo \$${\#ATSRC_PACKAGE_CO[@]}); \ + internal=$$(eval echo \$${ATSRC_PACKAGE_CO[@]} | grep -o ".ibm.com/" | wc -l); \ + if [[ (( "$(AT_INTERNAL)" == "none" && $${internal} == $${num_mirrors})) ]]; then \ + echo "Internal repositories can only be used by internal builds! Ignoring $1..."; \ + else \ + if [[ -n "$${ATSRC_PACKAGE_PRE}" ]]; then \ + if eval \$${ATSRC_PACKAGE_PRE}; then \ + echo "Component $1 already fetched, skipping it."; \ + else \ + fetch_success='false'; \ + retries=$${ATSRC_PACKAGE_RETRIES:-$(BUILD_DEFAULT_RETRIES)}; \ + num_mirrors=$$(( $$(eval echo \$${#ATSRC_PACKAGE_CO[@]}) - 1 )); \ + echo "Fetching $1 sources:"; \ + while [[ $${retries} -ge 0 ]]; do \ + echo -en "- Retry cycle: $${retries}.\n"; \ + for index in $$(seq 0 $${num_mirrors}); do \ + fetch=$$(eval echo \$${ATSRC_PACKAGE_CO[$${index}]}); \ + echo -en "\t* Trying mirror: $${fetch}."; \ + eval $${fetch} > $(LOGS)/_$${AT_STEPID}_fetch_try-$${index}.log 2>&1; \ + if [[ $${?} -ne 0 ]]; then \ + echo " - [FAILED]"; \ + else \ + echo " - [SUCCESS]"; \ + fetch_success='true'; \ + retries=0 && break; \ + fi; \ + done; \ + retries=$$(( retries - 1 )); \ + done; \ + if [[ "$${fetch_success}" == "false" ]]; then \ + echo "Couldn't get $1 from any of its mirrors!"; \ + rm -rf $${fetch_lock}; \ + exit 1; \ + fi; \ + if [[ "$${fetch:0:9}" == "git clone" ]]; then \ + pushd $1; \ + echo -en "\t\t- Final git revision checkout $${ATSRC_PACKAGE_REV}"; \ + eval \$${ATSRC_PACKAGE_GIT} > $(LOGS)/_$${AT_STEPID}_git-checkout_$${index}.log 2>&1; \ + if [[ $${?} -ne 0 ]]; then \ + rm -rf $${fetch_lock}; \ + popd; \ + echo " - [FAIL]"; \ + exit 1; \ + fi; \ + echo " - [SUCCESS]"; \ + popd; \ + fi; \ + echo -en "\t* Preparing final source place of $1"; \ + eval \$${ATSRC_PACKAGE_POST} > $(LOGS)/_$${AT_STEPID}_post.log 2>&1; \ + if [[ $${?} -ne 0 ]]; then \ + rm -rf $${fetch_lock}; \ + echo " - [FAIL]"; \ + exit 1; \ + fi; \ + echo " - [SUCCESS]"; \ + echo -e "\t* Checking for required PORTS option execution"; \ + if [[ "x$${ATSRC_PACKAGE_PORTS}" != "x" ]]; then \ + pushd $1; \ + echo -en "\t\t- Existing ports operation execution"; \ + eval $${ATSRC_PACKAGE_PORTS} > $(LOGS)/_$${AT_STEPID}_ports.log 2>&1; \ + if [[ $${?} -ne 0 ]]; then \ + rm -rf $${fetch_lock}; \ + popd; \ + echo " - [FAIL]"; \ + exit 1; \ + fi; \ + echo " - [SUCCESS]"; \ + popd; \ + fi; \ + fi; \ + fi; \ + fi; \ + popd +endef + + +# +# +# +# +# Ex: $(call fetch_addons,,) +define fetch_addons + echo "Going to $(FETCH_PATCHES) folder"; \ + pushd $(FETCH_PATCHES); \ + if [[ ! -z $2 ]]; then \ + echo "* Downloading add-ons for $1:"; \ + for addon in $2; do \ + wget -nc "$${addon}" >> \ + $(LOGS)/_$${AT_STEPID}-addon_wget.log 2>&1; \ + if [[ $${?} -ne 0 ]]; then \ + echo -e "\tAdd-on $${addon} - [FAILED]"; \ + rm -rf $${fetch_lock}; \ + popd; \ + exit 1; \ + fi; \ + echo -e "\tAdd-on $${addon} - [SUCCESS]"; \ + done; \ + fi; \ + popd +endef + + +# +# +# +# +# Ex: $(call check_packages,) +define check_packages + if [[ -n "$1" ]]; then \ + missing_pkg="no"; \ + tmp_file=$$(mktemp); \ + if [[ ("$(DISTRO_FM)" == "ubuntu") || ("$(DISTRO_FM)" == "debian") ]]; then \ + dpkg -l | tail -n +6 | awk '{ printf("%s\n",$$2); };' > $${tmp_file}; \ + else \ + rpm -qa > $${tmp_file}; \ + fi; \ + echo "*** Begin packages sanity check" > ./sanity.log 2>&1; \ + for chk_pkg in $1; do \ + grep -E "$${chk_pkg}" $${tmp_file} > /dev/null; \ + if [[ $${?} -ne 0 ]]; then \ + echo "Couldn't find $${chk_pkg} required to proceed the build." >> ./sanity.log 2>&1; \ + missing_pkg="yes"; \ + fi; \ + done; \ + echo "*** End packages sanity check" >> ./sanity.log 2>&1; \ + rm -f $${tmp_file}; \ + if [[ "$${missing_pkg}" == "yes" ]]; then \ + echo "abort"; \ + else \ + echo "success"; \ + fi; \ + fi +endef + + +# Compare two string versions +# Return: +# 0 - version $1 and $2 are equal +# 1 - version $1 is greater than $2 +# 2 - version $1 is lesser than $2 +# Ex: $(call compare_versions,,) +define compare_versions + v1=($$(echo "$1" | tr '.' ' ')); \ + v2=($$(echo "$2" | tr '.' ' ')); \ + if [[ $${#v1[@]} > $${#v2[@]} ]]; then \ + size=$${#v1[@]}; \ + else \ + size=$${#v2[@]}; \ + fi; \ + result=0; \ + for i in $$(seq 0 $$(($${size} - 1))); do \ + if [[ $${v1[$${i}]} -lt $${v2[$${i}]} ]]; then \ + result=2; \ + break; \ + fi; \ + if [[ $${v1[$${i}]} -gt $${v2[$${i}]} ]]; then \ + result=1; \ + break; \ + fi; \ + done; \ + echo $${result}; \ + unset result size v1 v2 i +endef + + +# Check if executable $1 is installed with version greater or equal to $2 +# WARNING: It only works with executables that follow the GNU output format +# for --version +# Ex: +# Return: +# 0 - executable $1 is installed with version greater or equal to $2 +# 1 - executable $1 isn't installed +# 2 - executable $1 is installed, but with a version that is less than $2 +define check_programs + if [[ -n "$1" ]]; then \ + missing_pgm="no"; \ + echo "*** Begin programs sanity check" >> ./sanity.log 2>&1; \ + for chk_pgm in $1; do \ + chk_pgm_name=$$(echo $${chk_pgm} | cut -d '_' -f 1 -); \ + chk_pgm_version=$$(echo $${chk_pgm} | \ + sed "s|$${chk_pgm_name}_\?||"); \ + which $${chk_pgm_name} &> /dev/null; \ + if [[ $${?} -ne 0 ]]; then \ + echo "Couldn't find $${chk_pgm_name} required to proceed the build." >> ./sanity.log 2>&1; \ + missing_pgm="yes"; \ + else \ + if [[ -z "$${chk_pgm_version}" ]]; then \ + continue; \ + fi; \ + version=$$($${chk_pgm_name} --version | grep $${chk_pgm_name} | awk '{print $$4}'); \ + if [[ -z "$${version}" ]]; then \ + version=$$($${chk_pgm_name} --version | grep -i $${chk_pgm_name} | awk '{print $$3}'); \ + fi; \ + status=$$($(call compare_versions,$${chk_pgm_version},$${version})); \ + if [[ $${status} -eq 1 ]]; then \ + echo "The $${chk_pgm_name} program version $${version} isn't up to date... We need at least version $${chk_pgm_version}." >> ./sanity.log 2>&1; \ + missing_pgm="yes"; \ + fi; \ + fi; \ + done; \ + echo "*** End programs sanity check" >> ./sanity.log 2>&1; \ + if [[ "$${missing_pgm}" == "yes" ]]; then \ + echo "abort"; \ + else \ + echo "success"; \ + fi; \ + fi; \ + unset missing_pgm chk_pgm chk_pgm_name chk_pgm_version version status +endef + + +# +# +# +# +# Ex: $(call build_release_notes,) +define build_release_notes + set -e; \ + RELNOTES_DIR=$(CONFIG)/release_notes; \ + rm -rf $(TEMP_INSTALL)/release_notes-group_*.html; \ + rm -rf $(TEMP_INSTALL)/release_notes-groups.html; \ + rm -rf $(TEMP_INSTALL)/release_notes-inst.html; \ + rm -rf $(TEMP_INSTALL)/release_notes-final.html; \ + for PKG in $1; do \ + AT_KERNEL=$(AT_KERNEL); \ + source $(CONFIG)/packages/$${PKG}/sources; \ + if [[ "$${ATSRC_PACKAGE_EXCLUDE_RN}" == "yes" ]]; then \ + unset $${!ATSRC_PACKAGE_*}; \ + continue; \ + fi; \ + if [[ "$${ATSRC_PACKAGE_BUNDLE}" != "$${GROUP}" ]]; then \ + GROUP=$${ATSRC_PACKAGE_BUNDLE}; \ + [[ -z "$${GROUPLIST}" ]] && GROUPLIST=$${GROUP} || GROUPLIST="$${GROUPLIST} $${GROUP}"; \ + fi; \ + [[ -n "$${ATSRC_PACKAGE_NAMESUFFIX}" ]] && ATSRC_PACKAGE_NAMESUFFIX=" $${ATSRC_PACKAGE_NAMESUFFIX}"; \ + if [[ -n "$${ATSRC_PACKAGE_DOCLINK}" ]]; then \ + DOCLINK=" $$(cat $${RELNOTES_DIR}/release_notes-online_doc.html | \ + sed "s@__PACKAGE_DOCLINK__@$${ATSRC_PACKAGE_DOCLINK//&/\&}@g" | tr '\n' ' ')"; \ + else \ + unset DOCLINK; \ + fi; \ + cat $${RELNOTES_DIR}/release_notes-package_line.html | \ + sed "s@__PACKAGE_NAME__@$${ATSRC_PACKAGE_NAME}@g" | \ + sed "s@__PACKAGE_VERSION__@$${ATSRC_PACKAGE_VER}@g" | \ + sed "s@__PACKAGE_REVISION__@$${ATSRC_PACKAGE_REV:+-$${ATSRC_PACKAGE_REV}}@g" | \ + sed "s@__PACKAGE_NAME_SUFFIX__@$${ATSRC_PACKAGE_NAMESUFFIX}@g" | \ + sed "s@__ONLINE_DOCS__@$${DOCLINK}@g" >> $(TEMP_INSTALL)/release_notes-group_$${GROUP}.html; \ + echo "
      " >> $(TEMP_INSTALL)/release_notes-group_$${GROUP}.html; \ + subpackage=0; \ + subpackage_name="ATSRC_PACKAGE_SUBPACKAGE_NAME"_$${subpackage}; \ + subpackage_name=`echo $${!subpackage_name}`; \ + while [[ -n $${subpackage_name} ]] ; do \ + subpackage_link="ATSRC_PACKAGE_SUBPACKAGE_DOCLINK"_$${subpackage}; \ + subpackage_link=`echo $${!subpackage_link}`; \ + if [[ -n "$${subpackage_link}" ]]; then \ + DOCLINK=" $$(cat $${RELNOTES_DIR}/release_notes-online_doc.html | \ + sed "s@__PACKAGE_DOCLINK__@$${subpackage_link//&/\&}@g" | tr '\n' ' ')"; \ + else \ + unset DOCLINK; \ + fi; \ + cat $${RELNOTES_DIR}/release_notes-package_line.html | \ + sed "s@__PACKAGE_NAME__@$${subpackage_name}@g" | \ + sed "s@__PACKAGE_VERSION__@$${ATSRC_PACKAGE_VER}@g" | \ + sed "s@__PACKAGE_REVISION__@$${ATSRC_PACKAGE_REV:+-$${ATSRC_PACKAGE_REV}}@g" | \ + sed "s@__PACKAGE_NAME_SUFFIX__@@g" | \ + sed "s@__ONLINE_DOCS__@$${DOCLINK}@g" >> $(TEMP_INSTALL)/release_notes-group_$${GROUP}.html; \ + subpackage=$$(($$subpackage + 1)); \ + subpackage_name="ATSRC_PACKAGE_SUBPACKAGE_NAME"_$${subpackage}; \ + subpackage_name=`echo $${!subpackage_name}`; \ + done; \ + echo "
    " >> $(TEMP_INSTALL)/release_notes-group_$${GROUP}.html; \ + unset $${!ATSRC_PACKAGE_*}; \ + done; \ + while read GROUP_LINE; do \ + if grep -e '^#\* ' <(echo $${GROUP_LINE}) > /dev/null 2>&1; then \ + GROUP="$$(echo $${GROUP_LINE/\#\* /} | cut -d ':' -f 1)"; \ + GROUP="$${GROUP#"$${GROUP%%[![:space:]]*}"}"; \ + GROUP="$${GROUP%"$${GROUP##*[![:space:]]}"}"; \ + GROUP_DESC="$$(echo $${GROUP_LINE/\#\* /} | cut -d ':' -f 2)"; \ + GROUP_DESC="$${GROUP_DESC#"$${GROUP_DESC%%[![:space:]]*}"}"; \ + GROUP_DESC="$${GROUP_DESC%"$${GROUP_DESC##*[![:space:]]}"}"; \ + if [[ -r $(TEMP_INSTALL)/release_notes-group_$${GROUP}.html ]]; then \ + cat $${RELNOTES_DIR}/release_notes-group_entry.html | \ + sed "s/__GROUP_DEFINITION__/$${GROUP_DESC}/g" | \ + sed "/__PACKAGE_LINES__/r $(TEMP_INSTALL)/release_notes-group_$${GROUP}.html" | \ + sed "/__PACKAGE_LINES__/d" >> $(TEMP_INSTALL)/release_notes-groups.html; \ + fi; \ + fi; \ + done < "$(CONFIG)/packages/groups"; \ + if [[ -r $(TEMP_INSTALL)/release_notes-groups.html ]]; then \ + cat $${RELNOTES_DIR}/release_notes-features.html | \ + sed "/__GROUPS_ENTRIES__/r $(TEMP_INSTALL)/release_notes-groups.html" | \ + sed "/__GROUPS_ENTRIES__/d" | \ + sed "/__AT_FEATURES__/r $${RELNOTES_DIR}/relfixes.html" | \ + sed "/__AT_FEATURES__/d" > $(TEMP_INSTALL)/release_notes-features.html; \ + else \ + echo "No package groups found to build release notes... Giving up on this!"; \ + exit 1; \ + fi; \ + sed "/if_$(DISTRO_AB)/d" "$${RELNOTES_DIR}/release_notes-inst.html" > \ + $(TEMP_INSTALL)/release_notes-inst.html; \ + cat $${RELNOTES_DIR}/release_notes-body.html | \ + sed "/__INCLUDED_STYLE__/r $${RELNOTES_DIR}/release_notes-style.html" | \ + sed "/__INCLUDED_STYLE__/d" | \ + sed "/__FEATURES__/r $(TEMP_INSTALL)/release_notes-features.html" | \ + sed "/__FEATURES__/d" | \ + sed "/__INST__/r $(TEMP_INSTALL)/release_notes-inst.html" | \ + sed "/__INST__/d" > $(TEMP_INSTALL)/release_notes-final.html; \ + if [[ "$(AT_INTERNAL)" == "none" ]]; then \ + VERSION=$(AT_MAJOR); \ + else \ + VERSION=$(AT_MAJOR)-$(AT_INTERNAL); \ + fi; \ + OLD_VERSION=$$(echo "$(AT_MAJOR_VERSION) - 1" | bc); \ + cat $(TEMP_INSTALL)/release_notes-final.html | \ + sed "s@__SUPPORTED_CPUS__@$$(echo "$(sort $(TUNED_PROCESSORS) $(BUILD_OPTIMIZATION))" | tr " " ",")@g" | \ + sed "s@__VERSION__@$${VERSION}@g" | \ + sed "s@__OLD_VERSION__@$${OLD_VERSION}@g" | \ + sed "s@__VERSION_RELEASE__@$(AT_VER_REV)@g" | \ + xmllint --html --format - > $(RELNOT_FILE); \ + set +e; \ + unset VERSION OLD_VERSION GROUP GROUPLIST DOCLINK RELNOTES_DIR +endef diff --git a/scripts/skeletons/at_compat_runtime_skel.sh b/scripts/skeletons/at_compat_runtime_skel.sh new file mode 100644 index 000000000..de5b8b7bf --- /dev/null +++ b/scripts/skeletons/at_compat_runtime_skel.sh @@ -0,0 +1,109 @@ +#!/bin/sh +# +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# +# at-compat Compatibility mode to run AT __AT_OVER__ apps on AT __AT_VER__ +# +# chkconfig: 2345 70 30 +# description: The Advance Toolchain is a self contained toolchain which \ +# provides preview toolchain functionality in GCC, binutils, \ +# GLIBC, GDB, Valgrind, and OProfile. \ +# This service enables a compatibility mode to run programs +# compiled with old versions of the Advance Toolchain on top of \ +# the current version. + +### BEGIN INIT INFO +# Provides: at-compat +# Required-Start: $local_fs $syslog +# Required-Stop: $local_fs $syslog +# Should-Start: $syslog +# Should-Stop: $syslog +# Default-Start: 2 3 4 5 +# Default-Stop: 0 1 6 +# Short-Description: Compatibility mode to run AT __AT_OVER__ apps on AT __AT_VER__ +# Description: The Advance Toolchain is a self contained toolchain +# which provides preview toolchain functionality in GCC, +# binutils, GLIBC, GDB, Valgrind, and OProfile. +# This service enables a compatibility mode to run programs +# compiled with old versions of the Advance Toolchain +# on top of the current version. + +### END INIT INFO + +dest=__AT_DEST__ +odest=__AT_ODEST__ + +if [[ "x${dest}" == "x" ]]; then + echo "Error: Advance Toolchain directory has not been set." >&2 + exit 1 +fi + +if [[ "x${odest}" == "x" ]]; then + echo "Error: Advance Toolchain previous directory has not been set" >&2 + exit 1 +fi + +start() { + [[ ! -d "${dest}/lib" ]] && echo "${dest}/lib doesn't exist." \ + && exit 1 + [[ ! -d "${dest}/lib64" ]] && echo "${dest}/lib64 doesn't exist." \ + && exit 1 + [[ ! -d "${odest}/lib" ]] && echo "${odest}/lib doesn't exist." \ + && exit 1 + [[ ! -d "${odest}/lib64" ]] && echo "${odest}/lib64 doesn't exist." \ + && exit 1 + + mount --bind "${dest}/lib" "${odest}/lib" \ + && mount --bind "${dest}/lib64" "${odest}/lib64" + return ${?} +} + +stop() { + umount "${odest}/lib" \ + && umount "${odest}/lib64" + return ${?} +} + +status() { + mount -l | grep "${odest}/lib" &> /dev/null + return ${?} +} + +restart() { + stop + start +} + +case "${1}" in + start) + status && exit 0 + start + ;; + stop) + status && stop + ;; + status) + status + ;; + restart) + restart + ;; + *) + echo "Usage: $0 {start|stop|status|restart}" + exit 2 +esac + +exit ${?} diff --git a/scripts/skeletons/prefetch_target.mk b/scripts/skeletons/prefetch_target.mk new file mode 100644 index 000000000..ed03dc768 --- /dev/null +++ b/scripts/skeletons/prefetch_target.mk @@ -0,0 +1,82 @@ +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +$(RCPTS)/fetch.rcpt: $(addsuffix .rcpt, $(addprefix fetch_, $(PKG))) + @touch $@ + +$(RCPTS)/fetch_%.rcpt: $(RCPTS)/fetch_%_patches.rcpt $(RCPTS)/fetch_%_source.rcpt + @touch $@ + +$(RCPTS)/fetch_%_source.rcpt: $(RCPTS)/bso_clearance.rcpt + @echo "Starting $* pristine source fetch for AT$(AT_CONFIGSET)..."; + @{ echo "Setting required variables"; \ + export AT_STEPID=$(notdir $(basename $@)); \ + export AT_BASE=$(AT_BASE); \ + export AT_WORK_PATH=$(FETCH_SOURCES); \ + export AT_KERNEL=$(AT_KERNEL); \ + source $(CONFIG)/packages/$*/sources; \ + fetch_lock=$(FETCH_SOURCES)/$${AT_STEPID}.lock; \ + if [[ ! -r $${fetch_lock} ]]; then \ + touch $${fetch_lock}; \ + echo "Fetching the $* pristine sources"; \ + { $(call fetch_sources,$*); } > \ + $(LOGS)/_$${AT_STEPID}-fetch_sources.log 2>&1; \ + rm $${fetch_lock}; \ + unset fetch_lock; \ + else \ + while [[ -r $${fetch_lock} ]]; do \ + sleep 1; \ + done; \ + fi; \ + } > $(LOGS)/$(notdir $(basename $@)).log 2>&1 + @echo "Completed $* pristine source fetch!"; + @touch $@ + +$(RCPTS)/fetch_%_patches.rcpt: $(RCPTS)/bso_clearance.rcpt + @echo "Starting $* patches fetch for AT$(AT_CONFIGSET)..."; + @{ echo "Setting required variables"; \ + export AT_STEPID=$(notdir $(basename $@)); \ + export AT_BASE=$(AT_BASE); \ + export AT_KERNEL=$(AT_KERNEL); \ + export AT_WORK_PATH=$(FETCH_PATCHES); \ + export AT_TEMP_INSTALL=$(TEMP_INSTALL); \ + source $(SCRIPTS_ROOT)/utilities/patches.sh; \ + source $(CONFIG)/packages/$*/sources; \ + fetch_lock=$(FETCH_PATCHES)/$${AT_STEPID}.lock; \ + if [[ ! -r $${fetch_lock} ]]; then \ + touch $${fetch_lock}; \ + echo "Fetching the mailing list patches for $*."; \ + { $(call fetch_patches_from_ml,$${ATSRC_PACKAGE_NAME},$${ATSRC_PACKAGE_MLS}); } > \ + $(LOGS)/_$${AT_STEPID}-fetch_patches_from_ml.log 2>&1; \ + echo "Fetching the $* add-ons"; \ + { $(call fetch_addons,$${ATSRC_PACKAGE_NAME},$${ATSRC_PACKAGE_ALOC}); } > \ + $(LOGS)/_$${AT_STEPID}-fetch_addons.log 2>&1; \ + if [[ "$$(type -t atsrc_get_patches)" == "function" ]]; then \ + echo "Fetching patches for $*."; \ + mkdir -p $(FETCH_PATCHES)/$*; \ + rm -f $(TEMP_INSTALL)/$*-copy-queue; \ + pushd $(FETCH_PATCHES)/$*; \ + atsrc_get_patches || exit 1; \ + popd; \ + fi; \ + rm $${fetch_lock}; \ + unset fetch_lock; \ + else \ + while [[ -r $${fetch_lock} ]]; do \ + sleep 1; \ + done; \ + fi; \ + } > $(LOGS)/$(notdir $(basename $@)).log 2>&1 + @echo "Completed $* patches fetch!"; + @touch $@ diff --git a/scripts/skeletons/sources_skel.sh b/scripts/skeletons/sources_skel.sh new file mode 100644 index 000000000..c5bbb4cbd --- /dev/null +++ b/scripts/skeletons/sources_skel.sh @@ -0,0 +1,37 @@ +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Define some needed constants +AT_BASE=__AT_BASE__ +AT_LOG=__AT_LOGDIR__ +AT_NAME=__AT_NAME__ +AT_MAJOR_VERSION=__AT_MAJOR_VERSION__ +AT_REVISION_NUMBER=__AT_REVISION_NUMBER__ +AT_DIST_ALL=__DIST_ALL__ +AT_SIGN_REPO=__SIGN_REPO__ +AT_SIGN_PKGS=__SIGN_PKGS__ +AT_GPG_KEYID=__GPG_KEYID__ +AT_GPG_KEYIDC=__GPG_KEYIDC__ +AT_GPG_KEYIDL=__GPG_KEYIDL__ +AT_GPG_KEYID_REPO=__GPG_KEYID_REPO__ +AT_GPG_KEYID_REPOC=__GPG_KEYID_REPOC__ +AT_GPG_KEYID_REPOL=__GPG_KEYID_REPOL__ +AT_COMPAT_DISTROS=__AT_COMPAT_DISTROS__ +AT_SUPPORTED_DISTROS=__AT_SUPPORTED_DISTROS__ +AT_DISTRO_PROVIDER=__DISTRO_PROVIDER__ +AT_DISTRO_VERSION=__DISTRO_VERSION__ +AT_REPOCMD_OPTS="__AT_REPOCMD_OPTS__" +AT_RPM_BUILD_DIR="__RPM_BUILD_DIR__" +AT_SRC_TAR_FILE="__AT_SRC_TAR_FILE__" +AT_RELNOT_FILE="__AT_RELNOT_FILE__" diff --git a/scripts/utilities/bitsize_selection.sh b/scripts/utilities/bitsize_selection.sh new file mode 100755 index 000000000..7ee32efbe --- /dev/null +++ b/scripts/utilities/bitsize_selection.sh @@ -0,0 +1,73 @@ +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# +# +# +# + +# Identify the name of the target based on the word size. +# The word size is usually provided by the target name and stored at +# AT_BIT_SIZE. +find_build_target() { + if [[ -n "${1}" ]]; then + if [[ "${1}" == "32" ]]; then + echo "${target32}" + elif [[ "${1}" == "64" ]]; then + echo "${target64}" + fi + fi +} + +find_build_libdir() { + if [[ -n "${1}" ]]; then + echo "lib${1%32}" + fi +} + + +find_build_bindir() { + if [[ -n "${1}" ]]; then + + # When 32 or 64 targets are possible, select the + # dir name based on the size for the current build + if [[ -n "${target32}" && -n "${target64}" ]]; then + echo "bin${1%32}" + + # If only a 32 or 64 bit target is possible then use bin + else + echo "bin" + fi + fi +} + +find_build_sbindir() { + if [[ -n "${1}" ]]; then + # When 32 or 64 targets are possible select the dir name + # based on the size + if [[ -n "${target32}" && -n "${target64}" ]]; then + echo "sbin${1%32}" + + # If only one target is possible, use sbin + else + echo "sbin" + fi + fi +} + +find_build_libexecdir() { + if [[ -n "${1}" ]]; then + echo "libexec${1%32}" + fi +} diff --git a/scripts/utilities/check_tarball.sh b/scripts/utilities/check_tarball.sh new file mode 100755 index 000000000..4373119b3 --- /dev/null +++ b/scripts/utilities/check_tarball.sh @@ -0,0 +1,72 @@ +#!/bin/bash +# +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +at_major_version=$1 +src_file=$2 + +# Check if the source code contains blocked programs and if the source tarball +# is valid. +echo "Checking the source code tarball..." +# Only packages that require a public source code are provided. +src_list="binutils gcc gdb glibc gmp tbb libdfp libhugetlbfs kernel mpc \ + mpfr oprofile userspace-rcu valgrind" +# Block all the others. +blocked_list="amino boost expat gotools libauxv libsphde openssl paflib \ + python tcmalloc zlib" + +# Started distributing libvecpf on AT 7.0-4. +if [[ ${at_major_version} != 6.0 ]]; then + src_list=${src_list}" libvecpf" +fi + +file_list=$( tar -tzf ${src_file} | awk -F'[/]' '{print $1}' | uniq ) +if [[ $? != 0 || ${file_list} == "" ]]; then + echo "Source code extraction failed." + echo "Is the tarball corrupted?" + exit 1 +fi + +src_error=0 +for file in ${file_list}; do + # If the package is in the blocked list, then that is + # an error. + if [[ "${blocked_list/$file}" != "${blocked_list}" ]]; then + echo "Package: ${file} should not be included." + src_error=$((src_error+1)) + else + # If the package is in the src rpm but not in the + # expected list then the test needs updating. + if [[ "${src_list/$file}" == "${src_list}" ]]; then + echo "Package: ${file} not found in expected list." + src_error=$((src_error+1)) + fi + fi +done + +for expected in ${src_list}; do + if [[ "${file_list/$expected}" == "${file_list}" ]]; then + echo "Missing from src tarball: ${expected}" + src_error=$((src_error+1)) + fi +done + +if [[ ${src_error} == 0 ]]; then + echo "Source check passed!" +else + echo "Source check failed!" + exit ${src_error} +fi diff --git a/scripts/utilities/create_lib_symlinks.sh b/scripts/utilities/create_lib_symlinks.sh new file mode 100755 index 000000000..5afab377c --- /dev/null +++ b/scripts/utilities/create_lib_symlinks.sh @@ -0,0 +1,33 @@ +#!/bin/bash +# +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# Create symlinks in directory ${2} for every shared library in directory +# ${1}. + +src="${1}" +dest="${2}" + +pushd "${src}" > /dev/null +llibs=$(ls -1 lib*.so lib*.so.[0-9]*) +popd > /dev/null + +mkdir -p "${2}" +pushd "${2}/" > /dev/null +for lib in ${llibs}; do + ln -vs ../${lib} ./ +done +popd > /dev/null diff --git a/scripts/utilities/get_glibc_version.sh b/scripts/utilities/get_glibc_version.sh new file mode 100755 index 000000000..f21caee4d --- /dev/null +++ b/scripts/utilities/get_glibc_version.sh @@ -0,0 +1,33 @@ +#!/bin/bash +# +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# Identify glibc version by parsing the output of the C preprocessor after +# reading glibc header features.h. + +CC=${CC:-$(which gcc)} + +echo '#include ' | ${CC} -dM -E - \ + | awk '/#define __GLIBC__/ { gmajor = $3 } \ + /#define __GLIBC_MINOR__/ { gminor = $3 } \ + END { print gmajor"."gminor }' + + +if [[ ${PIPESTATUS[1]} -ne 0 || ${PIPESTATUS[2]} -ne 0 ]]; then + exit 1 +fi + +exit 0 diff --git a/scripts/utilities/java.sh b/scripts/utilities/java.sh new file mode 100755 index 000000000..8e5f37d95 --- /dev/null +++ b/scripts/utilities/java.sh @@ -0,0 +1,86 @@ +#!/bin/bash +# +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Find the path of Java with JIT support + +# Look for a java package installed as rpm package. +find_rpm_java () +{ + # Format of the output of RPM. + local query_fmt="%{N}-%{V}-%{R}.%{arch}\n" + local ibm1_java_rpm="$(rpm -qa | grep '^ibm-' | grep '\-java')" + local ibm2_java_rpm="$(rpm -qa | grep '^java-' | grep '\-ibm-' \ + | grep '\-devel')" + local dist_java_rpm="$(rpm -qa | grep '^java-' | grep -v '\-ibm-' \ + | grep '\-devel')" + local java_rpm_pkgs="${ibm1_java_rpm} ${ibm2_java_rpm} ${dist_java_rpm}" + + # Find Java path. Give priority to the JRE downloaded from IBM website. + for java_pkg in ${java_rpm_pkgs}; do + # There is a bug in SLES 10 which causes rpm to + # return 0 when a package isn't installed, but another + # package with the same name but different architecture + # is. In this case, rpm returns 0, but doesn't print + # the package name. + # As we are querying all installed devel packages, with its + # architecture added, there is no need to perform queries + # for both architectures independently anymore. + result=$(rpm -q --queryformat="%{V}" ${java_pkg} | \ + awk 'BEGIN { FS="." } \ + { if ($1 > 1) print $1; else print $2; }') + if [[ ${?} -eq 0 ]] && [[ -n "$(echo ${java_versions} | grep -o "${result}")" ]]; then + java_path=$(rpm -ql \ + --queryformat=${query_fmt} \ + ${java_pkg} \ + | grep "\/jvmti\.h" \ + | sed "s|/include/jvmti\.h||") + if [[ -n "${java_path}" ]]; then + echo "${java_path}" + return 0 + fi + fi + done + + return 1 +} + +# Look for a java installed using the bin package (aka InstallAnywhere). +find_bin_java () +{ + # List of supported Java versions. + local supported_ver="java-ppc64le-80 java-ppc64le-71" + + for version in ${supported_ver}; do + if [[ -e "/opt/ibm/${version}/include/jvmti.h" ]]; then + echo "/opt/ibm/${version}" + return 0 + fi + done + + return 1 +} + +case "${pack_sys}" in + "rpm") + find_rpm_java || find_bin_java + ;; + "deb") + find_bin_java + ;; + *) + echo "Which packaging system is \'${pack_sys}\'?" + exit 1 +esac diff --git a/scripts/utilities/patches.sh b/scripts/utilities/patches.sh new file mode 100755 index 000000000..01b6d36a7 --- /dev/null +++ b/scripts/utilities/patches.sh @@ -0,0 +1,236 @@ +#!/bin/bash +# +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Define functions to download patches. + +# Compare the checksum of the patches. Returns 0 in case they match or 1 +# otherwise. +checksum_match () +{ + if [[ ${#} -ne 2 ]]; then + echo "Function checksum_match expects 2 parameters." + return 1 + fi + + local chksum=$(md5sum ${1} | awk '{print $1}') + if [[ "${chksum}" == "${2}" ]]; then + return 0 + else + return 1 + fi +} + + +# Wrapper around wget. +# Automatically retry the download in case of failure. +# If the failure was caused by SSL errors, retry with --no-check-certificate. +# It accepts the same parameters of wget. +at_wget () +{ + local ret=1 + # Number of tries + local tries=10 + # Temporary log file to identify SSL certificate issues. + local tmp_log=$(mktemp --tmpdir=${TEMP_INSTALL}) + + local i=0 + while [[ ${ret} -ne 0 && ${i} -lt ${tries} ]]; do + # Wait 30 seconds before trying again. + [[ ${i} -gt 0 ]] && sleep 30 + + wget ${wget_parms} ${@} 2>&1 | tee ${tmp_log} + ret=${?} + + # This is workaround as some versions of wget doesn't correctly + # return exit code 5 upon SSL errors. + if grep -e '--no-check-certificate' ${tmp_log}; then + wget ${wget_parms} --no-check-certificate ${@} + ret=${?} + fi + i=$(expr ${i} + 1) + done + + rm -f ${tmp_log} + return ${ret} +} + + +# Download a patch if necessary and verify its checksum. +# Parameters: +# $1 - URL of the patch. +# $2 - Checksum of the file (using md5sum for now). +# Optional parameters: +# $3 - File name of the patch. +at_get_patch () +{ + if [ ${#} -ne 2 -a ${#} -ne 3 ]; then + echo "Function at_get_patch expects 2 or 3 parameters." + return 1 + fi + + local url=${1} + local chksum=${2} + local fname=$(basename ${url}) + + # Set alternative filename if optional argument given + if [ ${#} -ge 3 ]; then + fname=${3} + fi + + local fpath=$(pwd)/${chksum}/${fname} + + # If the patch doesn't exist or is corrupted, download it again. + if [ ! -e ${fpath} ] || ! checksum_match ${fpath} ${chksum}; then + mkdir -p ${chksum} + echo "Downloading ${url}" + if ! at_wget -O ${fpath} ${url}; then + echo "Failed to download from ${url}" + return 1 + fi + + # Verify. + if ! checksum_match ${fpath} ${chksum}; then + echo "md5sum of ${url} didn't match." + return 1 + fi + else + echo "Patch is already available: ${fname}" + fi + + + # Add to the copy queue (to be copied after the rsync). + echo ${fpath} >> ${AT_TEMP_INSTALL}/$(basename $(pwd))-copy-queue +} + + +# Download a patch, if necessary, trim it and verify its checksum. +# Parameters: +# $1 - URL of the patch. +# $2 - File name of the patch. +# $3 - Number of lines of the patch. +# $4 - Checksum of the file (using md5sum for now). +at_get_patch_and_trim () +{ + if [[ ${#} -ne 4 ]]; then + echo "Function at_get_patch_and_trim expects 3 parameters." + return 1 + fi + + local url=${1} + local fname=${2} + local lines=${3} + local chksum=${4} + + local fpath=$(pwd)/${chksum}/${fname} + + # If the patch doesn't exist or is corrupted, download it again. + if [ ! -e ${fpath} ] || ! checksum_match ${fpath} ${chksum}; then + mkdir -p ${chksum} + echo "Downloading ${url}" + if ! at_wget -O ${fpath}.tmp ${url}; then + echo "Failed to download from ${url}" + return 1 + fi + + # Ensure file is clear before starting to trim. + rm -f ${fpath} + + # Beginning of the patch. + local start="" + local count=0 + # Treat the entire lines, including whitespace. + IFS_SAVE=${IFS} + IFS= + while read -r line; do + if [[ -z ${start} ]]; then + start=$(echo "${line}" | \ + sed -n '/^diff/p;/^Index/p;/^--- /p') + if [[ ! -z ${start} ]]; then + count=$(( count + 1 )) + echo "${line}" >> ${fpath} + continue + else + continue + fi + else + count=$(( count + 1 )) + echo "${line}" >> ${fpath} + fi + if [[ ${count} -eq ${lines} ]]; then + break + fi + done < ${fpath}.tmp + # Return 'read' to the previous behavior. + IFS=${IFS_SAVE} + rm ${fpath}.tmp + + # Fix the characters messed by HTML. + sed -i -e 's/>/>/g' -e 's/&/\&/g' -e 's/<//g' -e 's/"/"/g' ${fpath} + + # Verify. + if ! checksum_match ${fpath} ${chksum}; then + echo "md5sum of ${url} didn't match." + return 1 + fi + else + echo "Patch is already available: ${fname}" + fi + + # Add to the copy queue (to be copied after the rsync). + echo ${fpath} >> ${AT_TEMP_INSTALL}/$(basename $(pwd))-copy-queue +} + +# Clone or update a git repo if necessary and verify its checksum. +# Parameters: +# $1 - URL of the repository. +# $2 - Name of the repository. +# $3 - Commit ID. +at_git_pull () +{ + if [[ ${#} -ne 3 ]]; then + echo "Function at_git_pull expects 3 parameters." + return 1 + fi + + local url=${1} + local fname=${2} + local commit=${3} + + local fpath=$(pwd)/${fname} + + # Check if the repository already exist. + if [ ! -e ${fpath} ] ; then + git clone ${url} ${fname} + pushd ${fpath} + git checkout ${commit} + popd + else + # If the repository exist, check if it has the correct commit. + pushd ${fpath} + local chksum=$(git log -1 --pretty="%h") + if [[ ${chksum} != ${commit} ]] ; then + git pull origin master + git checkout ${commit} + else + echo "${fname} is already available." + fi + popd + fi + + # Add to the copy queue (to be copied after the rsync). + echo "-r ${fpath}/*" >> ${AT_TEMP_INSTALL}/$(basename $(pwd))-copy-queue +} diff --git a/scripts/utilities/pkg_build_deb.sh b/scripts/utilities/pkg_build_deb.sh new file mode 100755 index 000000000..cd5de074b --- /dev/null +++ b/scripts/utilities/pkg_build_deb.sh @@ -0,0 +1,259 @@ +#!/bin/bash +# +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# Create a debhelper compatible directory in order to build deb packages and +# build them. + +set -e +# Debhelper parent dir +base=${debs}/debhelper +# Configuration files +deb_d=${base}/debian + +# Remove all information about runtime-compat in order to not create it. +remove_compat () +{ + echo "Disabling runtime-compat package." + # Package information in a control file starts with "Package:" and + # stop at the end of the paragraph (in the next blank line). + sed -e "/Package: advance-toolchain[^\n]\+runtime-compat/,/^$/d" \ + ${deb_d}/control > ${deb_d}/control.tmp + mv ${deb_d}/control.tmp ${deb_d}/control +} + +mkdir -p ${deb_d} + +# Set the directory with the raw configuration files +if [[ "${cross_build}" == "yes" ]]; then + spec=${debh_root}/monolithic_cross +else + spec=${debh_root}/monolithic +fi + +# Remove previously created deb files +rm -f ${debs}/*.deb +# Clear a previous build +if [[ -e debian/rules ]]; then + pushd ${base} > /dev/null + fakeroot make -f debian/rules clean + popd > /dev/null +fi + +# Copy configuration files +pushd ${spec} > /dev/null +go_dest="/usr/local/go" +for f in *; do + echo "Setting up ${deb_d}/${f}" + sed -e "s/__AT_DEST__/${at_dest//\//\\/}/g" \ + -e "s/__AT_FULL_VER__/${at_full_ver}/g" \ + -e "s/__AT_MAJOR_INTERNAL__/${at_major_internal}/g" \ + -e "s/__DATE__/$(date -R)/g" \ + -e "s/__DEST_CROSS__/${dest_cross//\//\\/}/g" \ + -e "s/__TARGET__/${target}/g" \ + -e "s/__BUILD_ARCH__/-${build_arch}/g" \ + -e "s/__AT_VER_REV_INTERNAL__/${at_ver_rev_internal}/g" \ + -e "s/__TMP_DIR__/${tmp_dir//\//\\/}/g" \ + -e "s/__GO_DEST__/${go_dest//\//\\/}/g" \ + ${f} > ${deb_d}/${f} +done +popd > /dev/null + +# Copy dh_strip from the system and patch it to support debuginfo under /opt +# +# Typically, debug information is always placed under /usr/lib/debug on +# debian-based distributions. However, it is sometimes desirable to install to +# an alternative prefix, such as /opt. +# +# Unfortunately, the debhelper project does not provide an easy way to change +# the installation path of the debug information. Thus, we patch dh_strip in +# order to be able to do so. +# +# We don't strip debug information for AT < 9.0 or cross. +at_version=$(echo ${at_full_ver} | cut -d"." -f 1) +if [[ "${cross_build}" != "yes" ]]; then + if (( ${at_version} >= 9 )) || [[ "${at_version}" == next ]]; then + pushd ${deb_d} > /dev/null + cp /usr/bin/dh_strip . + patch -p1 < ${at_supported_distros}_dh_change_dest.patch + popd > /dev/null + fi +fi + +if [[ "${cross_build}" != "yes" \ + && "${build_ignore_compat}" == "yes" ]]; then + remove_compat +fi + +# Test if this is a cross compiler with support for cross-common package. +if egrep "^Package:.*cross-common" ${deb_d}/control; then + has_cross_common=yes +else + has_cross_common=no +fi + +# Make adjustments for each package +for pkg in $(awk '/^Package:/ { print $2 }' ${deb_d}/control | grep -v dbg); do + # Get if this is a runtime, devel, compat, etc. + apkg=$(echo ${pkg} \ + | sed -e 's/^.*'${at_major_internal}'-//g' \ + -e 's/^.*golang.*$/golang/g') + + echo "Preparing files to package ${pkg}" + + # Rename script files (postrm, postinst, etc.) + for file in ${deb_d}/${apkg}.*; do + # Ignore this package when it doesn't have script files. + if [[ ! -e ${file} ]]; then + continue + fi + suffix=$(basename ${file} | sed "s/${apkg}\.//") + mv ${file} ${deb_d}/${pkg}.${suffix} + done + + # Copy the list of files + case "${apkg}" in + "perf") + # For an unknown reason, the list of files of the perf + # package is called profile.listfile. + apkg="profile" + ;; + "runtime-compat") + apkg="compat" + ;; + cross-ppc*) + # In AT versions that support the cross-common package, + # the list of files for the main cross package is + # called cross.listfile. + # In AT versions that support other packages, we need + # to remove the arch in the name to match the list of + # files. + if [[ "${has_cross_common}" == "yes" ]]; then + apkg=$(echo ${apkg} \ + | sed 's/-'${build_arch}'//g') + else + apkg="cross_files" + fi + ;; + golang) + # Golang package already has the right apkg value. + ;; + *) + # The version-agnostic packages are dummy and don't + # provide any contents, just dependency entries. + if [[ -n "${pkg##*${at_major_internal}*}" ]]; then + continue 2 + fi + ;; + esac + + rm -f ${deb_d}/${pkg}.install + + if [[ ! -e ${dynamic_spec}/${apkg}.listfile ]]; then + # Something is really wrong because the list of files is + # missing. + echo "Could not find ${dynamic_spec}/${apkg}.listfile" + exit 1 + fi + + # Don't list directories because dh_install understands that all their + # files should be copied to the package unless it's an empty directory. + prevIFS="${IFS}" + IFS=$'\n' + for item in $(sort -u ${dynamic_spec}/${apkg}.listfile); do + if [[ -L "${item}" \ + || ! -d "${item}" \ + || -z "$(ls ${item})" ]]; then + # DEB packages don't support white spaces in file paths + # so, it's necessary to change them by a wildcard (i.e. + # ?) in order to use them. + echo "${item}" \ + | sed -e 's/^\///g' \ + -e 's| |\?|g' \ + >> ${deb_d}/${pkg}.install + fi + done + IFS="${prevIFS}" + + # Hack for files under scripts/. + # TODO: We should really think way to deal with these files on RPM and + # DEB. + if [[ "${cross_build}" != "yes" ]]; then + # find_dependencies.sh is for RPM systems. + rm -f ${at_dest}/scripts/find_dependencies.sh + # We don't need this file because the copyright file already + # includes the same text. + rm -f ${at_dest}/scripts/LICENSE + if (( ${at_version} >= 9 )) || [[ "${at_version}" == next ]]; then + # We do not distribute createldhuge-1.0.sh and restoreld.sh on + # AT > 8.0. + createldhuge="no" + rm -f ${at_dest}/scripts/createldhuge-1.0.sh + rm -f ${at_dest}/scripts/restoreld.sh + + # TLE helper is enabled for AT9 and beyond. + addtlehelper="yes" + else + createldhuge="yes" + + # TLE is not enabled prior to AT9. + rm -f ${at_dest}/scripts/tle_on.sh + addtleherlp="no" + fi + { + case "${apkg}" in + "devel") + echo "${at_dest}/scripts/at-create-ibmcmp-cfg.sh" + if [[ "${createldhuge}" == "yes" ]]; then + echo "${at_dest}/scripts/createldhuge-1.0.sh" + echo "${at_dest}/scripts/restoreld.sh" + fi + ;; + "runtime") + echo "/etc/cron.d/${at_ver_rev_internal}_ldconfig" + [[ ${addtlehelper} == "yes" ]] && \ + echo "${at_dest}/scripts/tle_on.sh" + ;; + esac + } | sed -e 's/^\///g' >> ${deb_d}/${pkg}.install + fi +done + +# Make adjustments for debuginfo packages +for pkg in $(awk '/^Package:/ { print $2 }' ${deb_d}/control | grep dbg); do + apkg=$(echo ${pkg} \ + | sed 's/^.*'${at_major_internal}'-//g') + + echo "Preparing files to package ${apkg}" + + # Rename script files (postrm, postinst, etc.) + for file in ${deb_d}/${apkg}.*; do + # Ignore this package when it doesn't have script files. + if [[ ! -e ${file} ]]; then + continue + fi + suffix=$(basename ${file} | sed "s/${apkg}\.//") + mv ${file} ${deb_d}/${pkg}.${suffix} + done +done + +# Create the deb file +pushd ${base} > /dev/null +DEB_BUILD_OPTIONS="parallel=4" \ + fakeroot make -f debian/rules binary +popd > /dev/null + +set +e diff --git a/scripts/utilities/pkg_build_filefilters.sh b/scripts/utilities/pkg_build_filefilters.sh new file mode 100755 index 000000000..ee92717ce --- /dev/null +++ b/scripts/utilities/pkg_build_filefilters.sh @@ -0,0 +1,263 @@ +#!/bin/bash +# +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# +# +# +# +# +# +# +# +# + +# Function: isolate_files_by_pack_type() +# +# Description: +# This function filters out files by name to be placed on the required filelist, +# it's used to isolate runtime and development packages from a given build +# filelist. +# +# Parameters +# - package_type: (in) a string that indicates the kind of filter to apply. It +# could be "all", "devel" or "runtime", filtering respectively +# none of the files in the list (all), only files related to +# development packages (devel) or only files related to runtime +# packages (runtime). +# +# - original_filelist: (in) a file pathname with the list of file pathnames to +# be filtered out +# +# - processed_filelist: (out) a file pathname with the resulting list of +# filtered file pathnames +# +# Ex. isolate_files_by_pack_type package_type original_filelist processed_filelist +# +# TODO: Remember that may be a potential problem with filenames with spaces in +# the first parameter (original filelist) which will broke the process. +# +function isolate_files_by_pack_type() +{ + # Assign the parameters to local variables + local pkg_type="${1}" + local filelist="${2}" + local pkg_list="${3}" + + # Check for file and include it... + if [[ -r "${config}"/packages/groups ]]; then + source "${config}"/packages/groups + else + echo "Missing essential file for build: ${config}/packages/groups" + echo "Aborting build!" + exit 1 + fi + + # Expand imported filters + # NOTE: The expansion must use octal representation \040 = ' ' to avoid + # expansion and interpretation errors. Don't change it! + local expanded_devel_exclude=$(printf $'\040'"-e %s" ${devel_exclude[@]}) + local expanded_devel_include=$(printf $'\040'"-e %s" ${devel_include[@]}) + local expanded_runtime_exclude=$(printf $'\040'"-e %s" ${runtime_exclude[@]}) + local expanded_runtime_include=$(printf $'\040'"-e %s" ${runtime_include[@]}) + + # Perform main processing + echo "Processing ${filelist} for ${pkg_type}..." + + # Conditionally process the file list provided + case "${pkg_type}" in + "all") + sed -re '/^.*\/share\/info\/dir$/d' \ + -e '/^.*\/share\/info\/.*$/d' ${filelist} \ + > "${pkg_list}.tmp" && \ + mv "${pkg_list}.tmp" "${pkg_list}" || \ + exit 1 + ;; + "devel") + sed -re '/^.*\/share\/info\/dir$/d' \ + -e '/^.*\/compat\/include\/.*$/d' \ + ${expanded_devel_exclude} ${filelist} | \ + grep -E ${expanded_devel_include} | \ + sed "s|\(\/share\/info\/.*\.info.*\)|\1\.gz|" > "${pkg_list}.tmp" && \ + mv "${pkg_list}.tmp" "${pkg_list}" || \ + exit 1 + ;; + "develall") + sed -r '/^.*\/share\/info\/dir$/d' ${filelist} | \ + sed "s|\(\/share\/info\/.*\.info.*\)|\1\.gz|" > "${pkg_list}.tmp" && \ + mv "${pkg_list}.tmp" "${pkg_list}" || \ + exit 1 + ;; + "runtime") + # Notice that there is no 'runtime_include', as the + # runtime should include all remaining files left after + # devel removal. If this behavior change in the future, + # just add a grep with it here (it's contents is already + # expanded above), and make sure it's filled up on + # CONFIG_ROOT//packages/groups + sed -re '/^.*\/share\/info\/dir$/d' \ + ${expanded_runtime_exclude} ${filelist} > "${pkg_list}.tmp" && \ + mv "${pkg_list}.tmp" "${pkg_list}" || \ + exit 1 + ;; + "runtimeall") + sed -r '/^.*\/share\/info\/dir$/d' ${filelist} > "${pkg_list}.tmp" && \ + mv "${pkg_list}.tmp" "${pkg_list}" || \ + exit 1 + ;; + *) + echo "Unrecognized pack type ${pkg_type}... Bailing out." + exit 1 + ;; + esac + # Signal end of processing + echo "Completely process into ${pkg_list}." +} + + + +# Function: process_filelist() +# +# Description: +# Perform the substitution of well known path components to keep the file +# list compatible with the rpm spec file that uses it +# +# Parameters: +# - original_filelist: (in) a file pathname containing a list of file pathnames +# for a given rpm package +# +# - processed_filelist: (out) a file pathname to hold the replaced file +# pathnames with the well known path components +# substituted by the RPM macros that defines them. +# It also generates a "${processed_list}file" with +# unique entries for the original_filelist. +# +# Ex. process_filelist original_filelist processed_filelist +# +function process_filelist() +{ + # Associate given parameters + local original_list="${1}" + local processed_list="${2}" + + # Recreate file list, abort the process if it fails + sort -u "${original_list}" | \ + sed -e "s|^${at_dest}/||" \ + -e "s|^${at_dest}||" \ + -e "s|^bin/|\%\{_bindir\}/|" \ + -e "s|^bin64/|\%\{_bindir\}64/|" \ + -e "s|^etc/|\%\{_prefix\}/etc/|" \ + -e "s|^include/|\%\{_includedir\}/|" \ + -e "s|^info/|\%\{_infodir\}/|" \ + -e "s|^lib/|\%\{_libdir\}/|" \ + -e "s|^lib64/|\%\{_libdir\}64/|" \ + -e "s|^libexec/|\%\{_libexecdir\}/|" \ + -e "s|^libexec64/|\%\{_libexecdir\}64/|" \ + -e "s|^man/|\%\{_mandir\}/|" \ + -e "s|^ppc/|\%\{_prefix\}/ppc/|" \ + -e "s|^ppc64le/|\%\{_prefix\}/ppc64le/|" \ + -e "s|^powerpc|\%\{_prefix\}/powerpc|" \ + -e "s|^sbin/|\%\{_sbindir\}/|" \ + -e "s|^sbin64/|\%\{_sbindir\}64/|" \ + -e "s|^share/man/|\%\{_mandir\}/|" \ + -e "s|^share/info/|\%\{_infodir\}/|" \ + -e "s|^share/|\%\{_datadir\}/|" \ + -e "s|^ssl/|\%\{_prefix\}/ssl/|" \ + -e "s|^compat/bin/|\%\{_compatbindir\}/|" \ + -e "s|^compat/bin64/|\%\{_compatbindir\}64/|" \ + -e "s|^compat/etc/|\%\{_compatprefix\}/etc/|" \ + -e "s|^compat/lib/|\%\{_compatlibdir\}/|" \ + -e "s|^compat/lib64/|\%\{_compatlibdir\}64/|" \ + -e "s|^compat/libexec/|\%\{_compatlibexecdir\}/|" \ + -e "s|^compat/libexec64/|\%\{_compatlibexecdir\}64/|" \ + -e "s|^compat/sbin/|\%\{_compatsbindir\}/|" \ + -e "s|^compat/sbin64/|\%\{_compatsbindir\}64/|" \ + -e "s|^compat/share/|\%\{_compatdatadir\}/|" \ + -e 's|^\(.*\)$|\"\1\"|' >> "${processed_list}" && \ + sort -u "${original_list}" >> "${processed_list}file" || \ + exit 1 +} + + + +# Function: group_filelists_cross() +# +# Description +# Group filelists to be used on the cross compiler package process. +# - cross_files.* will end with the list of all files to be packaged. They +# are used by AT < 8.0. +# - cross.* has the list of all files except those listed in cross-common.*, +# which are common files. They started to be used in AT 8.0. +# - cross-runtime-extras files has a list with runtime packages used +# by AT > 8.0. +# +# Parameters +# - none +# +# Ex. group_filelists_cross +# +function group_filelists_cross() +{ + # Inform function execution + echo "Begin group_filelists_cross..." + + rm -f "${dynamic_spec}"/cross_files.list* \ + "${dynamic_spec}"/cross.list* \ + "${dynamic_spec}"/cross-common.list* \ + "${dynamic_spec}"/cross-runtime-extras.list* \ + "${dynamic_spec}"/cross-mcore-libs.list* + sort -u "${dynamic_spec}"/devel.list >> "${dynamic_spec}"/cross_files.list + sort -u "${dynamic_spec}"/devel.listfile >> "${dynamic_spec}"/cross_files.listfile + sort -u "${dynamic_spec}"/runtime.list >> "${dynamic_spec}"/cross_files.list + sort -u "${dynamic_spec}"/runtime.listfile >> "${dynamic_spec}"/cross_files.listfile + local common_regex1='^"%{_(data|include|info|man)dir}' + local common_regex2="^${at_dest}/+(share|include)" + egrep "${common_regex1}" "${dynamic_spec}"/cross_files.list > \ + "${dynamic_spec}"/cross-common.list || \ + exit 1 + egrep -v "${common_regex1}" "${dynamic_spec}"/cross_files.list > \ + "${dynamic_spec}"/cross.list.tmp && \ + mv "${dynamic_spec}"/cross.list.tmp \ + "${dynamic_spec}"/cross.list || \ + exit 1 + egrep "${common_regex2}" "${dynamic_spec}"/cross_files.listfile > \ + "${dynamic_spec}"/cross-common.listfile || \ + exit 1 + egrep -v "${common_regex2}" "${dynamic_spec}"/cross_files.listfile > \ + "${dynamic_spec}"/cross.listfile.tmp && \ + mv "${dynamic_spec}"/cross.listfile.tmp \ + "${dynamic_spec}"/cross.listfile || \ + exit 1 + if [[ -e "${dynamic_spec}"/toolchain_extra.list ]]; then + sort -u "${dynamic_spec}"/toolchain_extra.list | tee \ + >(egrep "${common_regex1}" >> "${dynamic_spec}"/cross-common.list) | \ + egrep -v "${common_regex1}" > "${dynamic_spec}"/cross-runtime-extras.list + [[ ${?} -ne 0 ]] && exit 1 + sort -u "${dynamic_spec}"/toolchain_extra.listfile | tee \ + >(egrep "${common_regex2}" >> "${dynamic_spec}"/cross-common.listfile) | \ + egrep -v "${common_regex2}" > "${dynamic_spec}"/cross-runtime-extras.listfile + [[ ${?} -ne 0 ]] && exit 1 + sort -u "${dynamic_spec}"/mcore-libs.list | tee \ + >(egrep "${common_regex1}" >> "${dynamic_spec}"/cross-common.list) | \ + egrep -v "${common_regex1}" > "${dynamic_spec}"/cross-mcore-libs.list + [[ ${?} -ne 0 ]] && exit 1 + sort -u "${dynamic_spec}"/mcore-libs.listfile | tee \ + >(egrep "${common_regex2}" >> "${dynamic_spec}"/cross-common.listfile) | \ + egrep -v "${common_regex2}" > "${dynamic_spec}"/cross-mcore-libs.listfile + [[ ${?} -ne 0 ]] && exit 1 + fi + + echo "Completed group_filelists_cross..." +} diff --git a/scripts/utilities/pkg_build_filelists.sh b/scripts/utilities/pkg_build_filelists.sh new file mode 100755 index 000000000..41ef20a00 --- /dev/null +++ b/scripts/utilities/pkg_build_filelists.sh @@ -0,0 +1,46 @@ +#!/bin/bash +# +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# +# File: pkg_build_filelists.sh +# +# Description +# Check which kind of rpm should be generated: monolithic or granular +# - Monolithic: only four main packages + compatibility runtime +# - Granular: each package has its own original package and they are grouped +# by meta-packages, or package groups into the four main packages + +# compatibility runtime. +# +# Parameters +# - none +# + +# Load required external functions +source "${utilities}/pkg_build_granular.sh" +source "${utilities}/pkg_build_monolithic.sh" + +# Decide which kind of build to perform by the definition present on +# rpm_build_type (granular|monolithic). +# We have used since the beginning the monolithic build type, but +# there may be chances to implement the former one sometime in the +# future... +if [[ "${rpm_build_type}" == "granular" ]]; then + echo "Doing granular packaging..." + granular_filelists +else + echo "Doing monolithic packaging..." + monolithic_filelists +fi diff --git a/scripts/utilities/pkg_build_functions.sh b/scripts/utilities/pkg_build_functions.sh new file mode 100755 index 000000000..41e04b618 --- /dev/null +++ b/scripts/utilities/pkg_build_functions.sh @@ -0,0 +1,273 @@ +#!/bin/bash +# +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# +# Description: +# This file has a set of common functions used by the RPM package build +# system. +# +# +# +# +# +# + + +# Name: shopt_push() +# +# Description: +# This function saves on a stack the given shell option for later restore +# +# Parameters: +# - option to be saved +# +# Return: +# Nothing +# +function shopt_push() +{ + # Guarantee the existence of the shopt stack + if [[ -z ${SHOPT_OPTIONS_STACK} ]]; then + declare -agx SHOPT_OPTIONS_STACK + fi + + # Set the option to be saved + local option=${1} + # Find the current option setting + local setting=$(shopt -p | grep "${option}" | cut -d ' ' -f 2) + + # Save the current setting on shopt stack + SHOPT_OPTIONS_STACK=("${SHOPT_OPTIONS_STACK[@]}" "${setting} ${option}") +} + + +# Name: shopt_restore() +# +# Description: +# This function restores the saved shell option status +# +# Parameters: +# None +# +# Return: +# Nothing +# +function shopt_restore() +{ + # Check for existence of shopt stack + if [[ -n "${SHOPT_OPTIONS_STACK[@]}" ]]; then + # Set it back + shopt ${SHOPT_OPTIONS_STACK[@]:(-1)} + # Remove the topmost entry of the stack + unset SHOPT_OPTIONS_STACK[${#SHOPT_OPTIONS_STACK[@]}-1] + else + echo "No shopt stack to restore from!" + fi +} + + +# Name: shopt_set() +# +# Description: +# This function changes a shell option, but first, saves the current option +# state +# +# Parameters: +# - option to be changed +# - status of the option to be changed (on/off) +# +# Return: +# Nothing +# +# TODO: implement better error handling situation +function shopt_set() +{ + # Set the option given + local option=${1} + # Set required status + if [[ "${2}" == "on" ]]; then + local status="-s" + else + local status="-u" + fi + # Request a push of the current active value + shopt_push "${option}" + # Set the value of the given bash option + shopt "${status}" "${option}" +} + + +# Function: mk_path() +# +# Description: +# This function creates (if needed) a given path, or if required, clean it if +# already exists. If the path is out of bounds (the process can't write in +# it), it fails miserably. +# +# Parameters: +# - pathname to create/clean +# - flag to clean it or now (if it already exists) +# +# Return: +# A string with the name of the created/existing path +# +function mk_path() +{ + # Clean up the path provided + local mkpath="$(echo "${1}" | sed 's|//*|/|g')" + local recreate="${2}" + + if [[ -n ${mkpath} ]]; then + # Did it not exist or is writable ? + if [[ (-w ${mkpath}) || (! -e ${mkpath}) ]]; then + # Check if recreation is required + if [[ "${recreate}" == "yes" ]]; then + # If so, remove it... + rm -rf "${mkpath}" + fi + # (Re)create it + mkdir -p "${mkpath}" + # If not, did it exist (and isn't writable) + elif [[ -e ${mkpath} ]]; then + # It exist but you haven't permission to create it + echo "You can't access this path: ${mkpath}. Aborting." + exit 1 + else + # Create it otherwise + mkdir -p "${mkpath}" + fi + # Return the path created + echo "${mkpath}" + fi +} + + +# Function: get_package_info() +# +# Description +# This function collects the required information from the specified package +# sources definition to be used by another (usually dependent) package. +# +# Parameters +# - pkg_name: (in) the package name to look for the information +# - pkg_var: (in) the package variable to collect its content +# +# Ex. get_package_info glibc ATSRC_VERSION +# +function get_package_info() +{ + # Capture the input parameters + local pkg_name="${1}" + local pkg_variable="${2}" + + if [[ -d "${config}/packages/${pkg_name}" ]]; then + source "${config}/packages/${pkg_name}/sources" + if [[ -n ${!pkg_variable} ]]; then + echo "${!pkg_variable}" + else + echo "Undefined" + fi + unset ${!ATSRC_PACKAGE_*} + else + echo "Error" + exit 1 + fi +} + + +# Function: find_dependencies() +# +# Description +# Find the executable files (including libraries) and check their dependencies +# adding them to the standard shell variable ${spec_deps} used on the final +# spec file build. +# +# Parameters +# - original_filelist: (in) a file pathname with the list of file pathnames to +# check (if its an ELF binary) its dependencies +# +# Ex. find_dependencies original_filelist +# +function find_dependencies() +{ + # Begin to look for dependencies + local tmp_file \ + ignored \ + ldd_path \ + scan_files \ + file_info \ + readelf_path \ + wordsize \ + suffix + + # Create a temporary file + tmp_file=$(mktemp) + # Set list of ignored files + ignored="linux-vdso|libselinux|libaudit|linux-gate" + # Set tool for linked libraries verification + if [[ "${cross_build}" == "yes" ]]; then + ldd_path=$(which ldd) + else + ldd_path=${at_dest}/bin/ldd + fi + # Get list of files other than libraries provided + scan_files=$(grep -vE 'ld-.*\.so' "${1}") + for file in ${scan_files}; do + # For each file, check if it's usable + if [[ ! -x ${file} ]] || [[ ! -r ${file} ]]; then + continue + fi + # Collect selected file info + file_info=$(file "${file}") + # Continue only if its a dynamically linked executable + echo "${file_info}" | grep "dynamically linked" &> /dev/null + if [[ ${?} -ne 0 ]]; then + continue + fi + # On cross builds, check if dynamically linked executable is PPC + if [[ "${cross_build}" == "yes" ]]; then + readelf_path=$(which readelf) + ${readelf_path} -h "${file}" | grep "PowerPC" &> /dev/null + if [[ ${?} -eq 0 ]]; then + continue + fi + fi + # Check the bit size of the dynamically linked executable + wordsize=$(echo "${file_info}" | sed -e 's/^.*ELF //g' -e 's/-bit.*$//') + if [[ ${wordsize} -eq 32 ]]; then + suffix= + elif [[ ${wordsize} -eq 64 ]]; then + suffix="()(64bit)" + else + # TODO: I'm not sure about the effect of this echo, work + # on it later. + echo "Can't recognize ${file} word size" 1>&2 + exit 1 + fi + # Check the dynamically linked executable for AT prefix + ${ldd_path} "${file}" | grep -v "${at_dest}" | \ + awk "/=>/ { print \$1 \"${suffix}\" }" | \ + xargs -r -n 1 basename >> "${tmp_file}" + if [[ ${PIPESTATUS[0]} -ne 0 ]]; then + echo "Failed to ldd file ${file}" 1>&2 + exit 1 + fi + done + sort -u "${tmp_file}" | grep -vE "${ignored}" + # Remove the temporary file + rm -f "${tmp_file}" &> /dev/null + # Completed the look for dependencies +} diff --git a/scripts/utilities/pkg_build_granular.sh b/scripts/utilities/pkg_build_granular.sh new file mode 100755 index 000000000..8d0a7c404 --- /dev/null +++ b/scripts/utilities/pkg_build_granular.sh @@ -0,0 +1,76 @@ +#!/bin/bash +# +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# +# +# +# +# +# +# + +# Load required external common functions +source "${utilities}/pkg_build_functions.sh" +source "${utilities}/pkg_build_filefilters.sh" + +## TODO: Complete rewrite of granular RPM packaging process (granular_filelists) +# +# Function: granular_filelists() +# +# Description +# Combine the filelists from a given root package defining a standard +# shell variable ${spec_filelist} +# +# Ex. granular_filelists +# +function granular_filelists() +{ + local stage_list + unset stages + for FILE in ${CONFIG}/packages/${PACKAGE}/stage*; do + stages="${stages} $(basename "${FILE}" | sed 's/^stage//' | cut -f 1 -d '_')" + done + stage_list="{$(echo "${stages#${stages%%[![:space:]]*}}" | \ + tr ' ' '\n' | nl | sort -u -k2 | sort -n | cut -f2 | \ + tr '\n' ' ' | sed 's/ *$//g' | sed 's/^ *//g' | \ + tr ' ' ',')}" + eval "ls ${RPMSPEC_ROOT}/${PACKAGE}${archs}_${stages}.filelist" > \ + "${LOGS}/_build_rpm-${PACKAGE}-01_combine_filelists.log" + sort -u "$(eval "ls ${RPMSPEC_ROOT}/${PACKAGE}${archs}_${stages}.filelist")" | > \ + "${RPMSPEC_ROOT}/${PACKAGE}_rpm.filelist" + unset "${!ATSRC_PACKAGE_*}" + echo "Nothing here yet, unless the ${stage_list}..." +} + + + +## TODO: Complete rewrite of granular RPM spec creation process (build_granular_specs) +# +# Function: build_granular_specs() +# +# Description +# ... +# +# Parameters +# - +# +# Ex: build_granular_specs +# +function build_granular_specs() { + echo "Nothing yet..." +} + + diff --git a/scripts/utilities/pkg_build_monolithic.sh b/scripts/utilities/pkg_build_monolithic.sh new file mode 100755 index 000000000..cecb17b6e --- /dev/null +++ b/scripts/utilities/pkg_build_monolithic.sh @@ -0,0 +1,264 @@ +#!/bin/bash +# +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# +# +# +# +# +# +# + +# Load required external common functions +source "${utilities}/pkg_build_functions.sh" +source "${utilities}/pkg_build_filefilters.sh" + +# Function: monolithic_filelists() +# +# Description +# This function groups the isolated build filelists from package builds into +# individual single group filelists to be used on the rpm build process. +# Please note that they do so for monolithic package builds only. +# +# Parameters +# - none +# +# Ex. monolithic_filelists +# +function monolithic_filelists() +{ + local GROUP PACK + local groups=$(find "${dynamic_spec}"/. -type d ! -path "${dynamic_spec}"/. -printf '%f ') + + # Clean up final lists (from previous build) + for GROUP in ${groups}; do + rm -fv "${dynamic_spec}/${GROUP}/${GROUP}"*.list + done + # Remove processed files (from previous build) + rm -fv "${dynamic_spec}"/*.list{,file}{,.orig} + + # Process group files list + for GROUP in ${groups}; do + echo "Preparing file list for ${GROUP}..." + pushd "${dynamic_spec}/${GROUP}" + if [[ "${GROUP}" == *toolchain || \ + ("${GROUP}" == "toolchain_extra" && \ + "${cross_build}" == "no") ]]; then + echo "Isolate normal file lists..." + local normallist=$(find . -name '*.filelist' -print | \ + sed -r '/^.+_compat.*$/d') + echo "Isolate compat file lists..." + local compatlist=$(find . -name '*.filelist' -print | \ + sed -r '/^.+_compat.*$/!d') + echo "Segregate devel and runtime files for normal lists..." + isolate_files_by_pack_type devel "${normallist}" "${GROUP}_devel.list" + isolate_files_by_pack_type runtime "${normallist}" "${GROUP}_runtime.list" + echo "Process normal devel and runtime generated file lists..." + process_filelist "${GROUP}_devel.list" "${dynamic_spec}/devel.list" + process_filelist "${GROUP}_runtime.list" "${dynamic_spec}/runtime.list" + if [[ -n "${compatlist}" ]]; then + echo "Segregate all files for compat lists..." + isolate_files_by_pack_type all "${compatlist}" "${GROUP}_compat.list" + echo "Process compat all generated file lists..." + process_filelist "${GROUP}_compat.list" "${dynamic_spec}/compat.list" + fi + else + case "${GROUP}" in + "devel" | "runtime") + local filter="${GROUP}all" + ;; + *) + local filter="all" + ;; + esac; + local filelist="$(find . -name '*.filelist' -print)" + isolate_files_by_pack_type "${filter}" "${filelist}" "${GROUP}_${filter}.list" + process_filelist "${GROUP}_${filter}.list" "${dynamic_spec}/${GROUP}.list" + fi + rm -rf "${temp-list}" + popd + done + + # Order all the processed files lists + packages=$(find "${dynamic_spec}/." -maxdepth 1 -type f -name '*.list' -printf '%f ') + for PACK in ${packages}; do + sort -u "${dynamic_spec}/${PACK}" > "${dynamic_spec}/${PACK}.tmp" && \ + mv "${dynamic_spec}/${PACK}" "${dynamic_spec}/${PACK}.orig" && \ + mv "${dynamic_spec}/${PACK}.tmp" "${dynamic_spec}/${PACK}" || \ + exit 1 + sort -u "${dynamic_spec}/${PACK}file" > "${dynamic_spec}/${PACK}file.tmp" && \ + mv "${dynamic_spec}/${PACK}file" "${dynamic_spec}/${PACK}file.orig" && \ + mv "${dynamic_spec}/${PACK}file.tmp" "${dynamic_spec}/${PACK}file" || \ + exit 1 + done + + # Group files lists on cross builds + if [[ "${cross_build}" == "yes" ]]; then + group_filelists_cross + fi +} + + + +# Function: build_monolithic_spec() +# +# Description +# - This function assembles the final spec file for the monolithic rpm package +# build. It assemble the spec file for native and cross builds. It also +# fills the dependency requirements +# +# Parameters +# - none +# +# Ex: build_monolithic_spec +# +function build_monolithic_spec() +{ + echo "Signaling for cross on cross packages." + cross=$([[ "${cross_build}" == "yes" ]] && echo "-cross" || echo "") + echo "Signaling the build arch for the package spec." + bld_arch=$([[ "${cross_build}" == "yes" ]] && echo "-${build_arch}" || echo "") + echo "Set the packager/vendor as well as build arch and cross flag on spec file..." + sed -e "$([[ -n ${build_rpm_packager} ]] && \ + echo "s|__RPM_PACKAGER__|${build_rpm_packager}|g" || \ + echo "/__RPM_PACKAGER__/d")" \ + -e "$([[ -n ${build_rpm_vendor} ]] && \ + echo "s|__RPM_VENDOR__|${build_rpm_vendor}|g" || \ + echo "/__RPM_VENDOR__/d")" \ + -e "s|__TARGET_ARCH__|${bld_arch}|g" \ + -e "s|__CROSS__|${cross}|g" \ + "${config_spec}/main.spec" > \ + "${rpmspecs}/advance-toolchain.spec" + + if [[ -z ${cross} ]]; then + echo "For native package builds only:" + if [[ "${build_ignore_compat}" != "yes" ]]; then + echo "Prepare the base compat spec whenever needed." + cat "${rpmspecs}/advance-toolchain.spec" \ + "${config_spec}/monolithic_compat.spec" > \ + "${rpmspecs}/advance-toolchain_compat.spec" + fi + if [[ "${build_ignore_at_compat}" != "yes" ]]; then + echo "Prepare the base at-compat spec whenever needed." + cat "${rpmspecs}/advance-toolchain.spec" \ + "${config_spec}/monolithic_at-compat.spec" | \ + sed -e "s|__AT_OLD_VER__|${build_old_at_version}|g" \ + -e "s|__AT_OLD_DEST__|${build_old_at_install}|g" > \ + "${rpmspecs}/advance-toolchain_at-compat.spec" + echo "Fill actual/old AT versions/destination for at-compat." + sed -e "s|__AT_VER__|${at_major_version}|g" \ + -e "s|__AT_OVER__|${build_old_at_version}|g" \ + -e "s|__AT_DEST__|${at_dest}|g" \ + -e "s|__AT_ODEST__|${build_old_at_install}|g" \ + "${skeletons}/at_compat_runtime_skel.sh" > \ + "${rpmdir}/${at_major_internal}-runtime-at${build_old_at_version}-compat" + echo "Remove from spec requires entry if empty, for at-compat." + grep -vE '^Requires:[ \t]*$' \ + "${rpmspecs}/advance-toolchain_at-compat.spec" > \ + "${rpmspecs}/advance-toolchain_at-compat.spec.tmp" && \ + mv "${rpmspecs}/advance-toolchain_at-compat.spec.tmp" \ + "${rpmspecs}/advance-toolchain_at-compat.spec" || exit 1 + fi + + if [[ "${build_arch}" == "ppc64le" \ + && -e "${config_spec}/monolithic_golang.spec" ]]; then + echo "Prepare the golang spec." + cat "${config_spec}/monolithic_golang.spec" > \ + "${rpmspecs}/advance-toolchain_golang.spec" + fi + + echo "Continue to prepare the base spec file." + cat "${config_spec}/monolithic.spec" >> \ + "${rpmspecs}/advance-toolchain.spec" + + for group in "${dynamic_spec}"/*.listfile; do + echo "For each list of files, find their dependencies." + dep_list=$(find_dependencies "${group}" | tr '\n' ' ') + if [[ ${?} -ne 0 ]]; then + exit 1 + fi + echo "Set package name and its dependency list." + pkg_name=$(basename "${group}" | sed -r 's/\.listfile$//g') + pkg_deps="${dep_list// /, }" + if [[ "${pkg_name}" == "compat" ]]; then + echo "Fill the above info on compat spec file." + sed "s|__COMPAT_REQ__|${pkg_deps}|g" \ + "${rpmspecs}/advance-toolchain_compat.spec" > \ + "${rpmspecs}/advance-toolchain_compat.spec.tmp" && \ + mv "${rpmspecs}/advance-toolchain_compat.spec.tmp" \ + "${rpmspecs}/advance-toolchain_compat.spec" || exit 1 + else + echo "Fill the same info on normal spec file." + sed "s|__$(echo "${pkg_name}" | tr '[:lower:]' '[:upper:]')_REQ__|${pkg_deps}|g" \ + "${rpmspecs}/advance-toolchain.spec" > \ + "${rpmspecs}/advance-toolchain.spec.tmp" && \ + mv "${rpmspecs}/advance-toolchain.spec.tmp" \ + "${rpmspecs}/advance-toolchain.spec" || exit 1 + fi + done + + if [[ -f ${rpmspecs}/advance-toolchain_compat.spec ]]; then + echo "Remove from spec requires entry if empty, for compat." + grep -vE '^Requires:[ \t]*$' \ + "${rpmspecs}/advance-toolchain_compat.spec" > \ + "${rpmspecs}/advance-toolchain_compat.spec.tmp" && \ + mv "${rpmspecs}/advance-toolchain_compat.spec.tmp" \ + "${rpmspecs}/advance-toolchain_compat.spec" || exit 1 + fi + else + echo "For cross package builds:" + sed -e "s|__CROSS__|${cross}|g" "${config_spec}/monolithic_cross.spec" \ + >> "${rpmspecs}/advance-toolchain.spec" + echo "Find base cross dependencies." + dep_list=$(find_dependencies "${dynamic_spec}/cross_files.listfile" | tr '\n' ' ') + if [[ ${?} -ne 0 ]]; then + exit 1 + fi + echo "Set the base cross dependency list." + pkg_deps="${dep_list// /, }" + echo "Set more cross package info on spec file." + dest_cross_rel=$(echo ${dest_cross} | \ + sed -r -e "s|${at_dest}/*||g" \ + -e 's|//*|/|g' \ + -e 's|(.*)/$|\1|g') + sed -e "s|__CROSS_DEPS_PLACE_HOLDER__|${pkg_deps}|g" \ + -e "s|__DEST_CROSS__|${dest_cross}|g" \ + -e "s|__DEST_CROSS_REL__|${dest_cross_rel}|g" \ + "${rpmspecs}/advance-toolchain.spec" > \ + "${rpmspecs}/advance-toolchain.spec.tmp" && \ + mv "${rpmspecs}/advance-toolchain.spec.tmp" \ + "${rpmspecs}/advance-toolchain.spec" || exit 1 + + for group in "${dynamic_spec}"/*.listfile; do + echo "For each package, look for its dependencies." + dep_list=$(find_dependencies "${group}" | tr '\n' ' ') + pkg_deps=${dep_list// /, } + pkg_name=$(basename "${group}" | sed -r 's/\.listfile$//g') + if [[ "${pkg_name}" == "mcore-libs" ]]; then + sed "s|__$(echo "${pkg_name}" | tr '[:lower:]' '[:upper:]')_REQ__|${pkg_deps}|g" \ + "${rpmspecs}/advance-toolchain.spec" > \ + "${rpmspecs}/advance-toolchain.spec.tmp" && \ + mv "${rpmspecs}/advance-toolchain.spec.tmp" \ + "${rpmspecs}/advance-toolchain.spec" || exit 1 + fi + done + fi + + grep -vE '^Requires:[ \t]*$' "${rpmspecs}/advance-toolchain.spec" > \ + "${rpmspecs}/advance-toolchain.spec.tmp" && \ + mv "${rpmspecs}/advance-toolchain.spec.tmp" \ + "${rpmspecs}/advance-toolchain.spec" || exit 1 +} diff --git a/scripts/utilities/pkg_build_rpm.sh b/scripts/utilities/pkg_build_rpm.sh new file mode 100755 index 000000000..2716fda79 --- /dev/null +++ b/scripts/utilities/pkg_build_rpm.sh @@ -0,0 +1,248 @@ +#!/bin/bash +# +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# +# File: pkg_build_rpm.sh +# +# Description: +# This script holds a series of functions used to build the RPM packages. +# The process involves the isolation of package files, its classification, +# grouping and (inter) dependency of them, as well as the generation of the +# proper spec files for each package in the package set, and final generation +# of the packages, ready to upload to our repository servers. +# + +# Load required external functions +source "${utilities}/pkg_build_granular.sh" +source "${utilities}/pkg_build_monolithic.sh" + +# Prepare the RPM build environment if if doesn't exist +declare -x rpmdir=$(mk_path "${tmp_dir}/rpmbuild" no) +declare -x rpmspecs=$(mk_path "${rpmdir}/SPECS" no) +declare -x rpmbuild=$(mk_path "${rpmdir}/BUILD" no) +declare -x rpmbuildroot=$(mk_path "${rpmdir}/BUILDROOT" no) +declare -x rpmfinal=$(mk_path "${rpmdir}/RPMS" no) + +# Function: pkg_prepare_spec() +# +# Description +# Perform the placeholders substitution, replacing the variables +# where necessary for the final spec file generation +# +# Parameters +# - none +# +# Ex: pkg_prepare_spec +# +function pkg_prepare_spec() +{ + # Perform the appropriate requested build + if [[ "${rpm_build_type}" == "granular" ]]; then + # + echo "Doing granular spec files" + build_granular_specs + else + # + echo "Doing monolithic spec files" + build_monolithic_spec + fi +} + + +# Function: pkg_build_rpms() +# +# Description +# This function sets the required parameters to generate all the RPM packages, +# which have a .spec file defined on ${rpmspecs}. It uses xargs to run the +# 6 rpmbuilds in parallel. +# +# Parameters +# - none +# +# Ex: pkg_build_rpms +# +function pkg_build_rpms() +{ + local at_glibc_version=$(get_package_info glibc ATSRC_PACKAGE_VER | \ + awk 'BEGIN { FS="." }; { print $1$2 }' -) + local at_min_power_arch="${build_load_arch/power/}" + if [[ "${at_use_fedora_relnam}" == "yes" ]]; then + if [[ "${at_internal}" == "none" ]]; then + local rev_number=${at_revision_number}.1 + else + local rev_number=${at_revision_number}.0.${at_internal} + fi + else + rev_number=${at_revision_number} + fi + + # Copy find-debuginfo.sh from the system and patch it to support + # debuginfo under /opt. + # + # Typically, debug information is always placed under /usr/lib/debug on + # rpm-based distributions. However, it is sometimes desirable to + # install to an alternative prefix, such as /opt. + # + # Unfortunately, the rpm project does not provide an easy way to change + # the installation path of the debug information. Thus, we patch + # find-debuginfo.sh in order to be able to do so. + cp /usr/lib/rpm/find-debuginfo.sh ${rpmdir}/find-debuginfo.sh + sed ${rpmdir}/find-debuginfo.sh -i -e "/usr\/lib/s/\$RPM_BUILD_ROOT/\${RPM_BUILD_ROOT}/g" + sed ${rpmdir}/find-debuginfo.sh -i -e "/RPM_BUILD_ROOT/s@/usr/lib/debug@__AT_DEST__&@" + sed ${rpmdir}/find-debuginfo.sh -i -e "/d \".{RPM_BUILD_ROOT}\/usr\/lib\"/s@/usr/lib@__AT_DEST__&@" + sed ${rpmdir}/find-debuginfo.sh -i -e "/\.debug/s@/usr/lib@__AT_DEST__&@g" + sed ${rpmdir}/find-debuginfo.sh -i -e "/LISTFILE/s@/usr@__AT_DEST__&@" + sed ${rpmdir}/find-debuginfo.sh -i -e "/find/s@usr/lib/debug@__AT_DEST__/&@" + sed ${rpmdir}/find-debuginfo.sh -i -e "/local l/s@/usr/lib@__AT_DEST__&@" + sed ${rpmdir}/find-debuginfo.sh -i -e "s/\/usr\/lib\/debug\/\*)/__AT_DEST__&/" + sed ${rpmdir}/find-debuginfo.sh -i -e "/cd \".{RPM_BUILD_ROOT}\/usr\"/s@/usr@__AT_DEST__&@" + sed ${rpmdir}/find-debuginfo.sh -i -e "/^ local id.*idfile/ireturn;" + sed ${rpmdir}/find-debuginfo.sh -i -e "s/__AT_DEST____AT_DEST__//" + + # Fix installation path of debuginfo files: + # From: /opt/atx.x/usr/lib/debug + # To: /opt/atx.x/lib/debug + sed ${rpmdir}/find-debuginfo.sh -i -e "s/__AT_DEST__\/usr/__AT_DEST__/g" + sed ${rpmdir}/find-debuginfo.sh -i -e "/sepdebugcrcfix/s/ usr\/lib/ lib/" + + # Do not create .debug symlinks on RHEL. This copies the behaviour from SLES. + sed ${rpmdir}/find-debuginfo.sh -i -e "/make a .debug symlink to that file/i#Do nothing (copied from SLES)" + sed ${rpmdir}/find-debuginfo.sh -i -e "/make a .debug symlink to that file/,+11d" + + # Do not strip getconf + sed ${rpmdir}/find-debuginfo.sh -i -e "/perm/s/)/& ! -path \"*getconf*\"/" + + # Do not strip libgo + sed ${rpmdir}/find-debuginfo.sh -i -e "/perm/s/)/& ! -name \"libgo.so*\"/" + + # Do not strip ld + sed ${rpmdir}/find-debuginfo.sh -i -e "/perm/s/)/& ! -name \"ld*.so*\"/" + + # Final step to support debuginfo under /opt. + sed ${rpmdir}/find-debuginfo.sh -i -e "s@__AT_DEST__@${at_dest}@" + + cp "${scripts}/utilities/split-debuginfo.sh" "${rpmdir}" + local count=0 + while IFS= read -d $'\0' -r specfile; do + count=$(( count + 1 )) + local activerpmbuild=$(mk_path "${rpmdir}/BUILDROOT_${count}" no) + echo --buildroot "${activerpmbuild}" \ + --clean \ + "${specfile}" + done < <(find "${rpmspecs}" -name '*.spec' -print0) | \ + xargs -t -n 4 \ + rpmbuild -bb \ + --define="at_work ${dynamic_spec}" \ + --define="_topdir ${rpmdir}" \ + --define="_rpmdir ${rpmdir}" \ + --define="_arch ${build_arch}" \ + --define="_build_arch ${build_arch}" \ + --define="_prefix ${at_dest}" \ + --define="at_major ${at_major_internal}" \ + --define="at_major_version ${at_major_version}" \ + --define="at_revision_number ${rev_number}" \ + --define="at_glibc_ver ${at_glibc_version}" \ + --define="_min_power_arch ${at_min_power_arch}" \ + --define="at_ver_rev_internal ${at_ver_rev_internal}" \ + --define="_tmpdir ${tmp_dir}" \ + --define="_golang /usr/local/go/" \ + --target="${host_arch}-linux" + if [[ ${?} -ne 0 ]]; then + echo "Error generating rpm packages." + exit 1 + fi +} + + +# Function: pkg_move_rpms() +# +# Description +# This function moves the generated RPM packages to its final place, and also +# generates the sources.sh with information for .... +# +# Parameters: +# - none +# +# Ex: pkg_move_rpms +# +function pkg_move_rpms() +{ + # Clean up the destination and update it + [[ -d "${rpms}/${host_arch}" ]] && \ + rm -rf "${rpms}/${host_arch}" + mv "${rpmdir}/${host_arch}" "${rpms}" + + # Set the values required for the sources.sh script generation + if [[ "${cross_build}" == "yes" ]]; then + if [[ "${build_exclusive_cross}" ]]; then + local dist_all="yes" + else + local dist_all="no" + fi + local sign_repo="${at_sign_repo_cross}" + local sign_pkgs="${at_sign_pkgs_cross}" + else + local dist_all="yes" + local sign_repo="${at_sign_repo}" + local sign_pkgs="${at_sign_pkgs}" + fi + + # Generate the sources.sh script + sed -e "s@__AT_BASE__@${at_base}@g" \ + -e "s@__AT_LOGDIR__@${logs}@g" \ + -e "s@__AT_NAME__@${at_name}@g" \ + -e "s@__AT_MAJOR_VERSION__@${at_major_version}@g" \ + -e "s@__AT_REVISION_NUMBER__@${at_revision_number}@g" \ + -e "s@__DIST_ALL__@${dist_all}@g" \ + -e "s@__SIGN_REPO__@${sign_repo}@g" \ + -e "s@__SIGN_PKGS__@${sign_pkgs}@g" \ + -e "s@__GPG_KEYID__@${at_gpg_keyid}@g" \ + -e "s@__GPG_KEYIDC__@${at_gpg_keyidc}@g" \ + -e "s@__GPG_KEYIDL__@${at_gpg_keyidl}@g" \ + -e "s@__GPG_KEYID_REPO__@${at_gpg_repo_keyid}@g" \ + -e "s@__GPG_KEYID_REPOC__@${at_gpg_repo_keyidc}@g" \ + -e "s@__GPG_KEYID_REPOL__@${at_gpg_repo_keyidl}@g" \ + -e "s@__AT_COMPAT_DISTROS__@${at_compat_distros}@g" \ + -e "s@__AT_SUPPORTED_DISTROS__@${at_supported_distros}@g" \ + -e "s@__DISTRO_PROVIDER__@$(echo "${distro_id}" | cut -d '-' -f 1)@g" \ + -e "s@__DISTRO_VERSION__@$(echo "${distro_id}" | cut -d '-' -f 2)@g" \ + -e "s@__AT_SRC_TAR_FILE__@${src_tar_file}@g" \ + -e "s@__AT_RELNOT_FILE__@${relnot_file}@g" \ + -e "s@__AT_REPOCMD_OPTS__@${at_repocmd_opts}@g" \ + -e "s@__RPM_BUILD_DIR__@${rpms}/${host_arch}@g" \ + "${skeletons}/sources_skel.sh" > \ + "${rpms}/sources.sh" && \ + chmod +x "${rpms}/sources.sh" || \ + exit 1 +} + + +# +# +# +# +# + +# First step to build... Prepare the RPMs specfiles +# This must be done after preparing all the filelist contents used by the +# specs. +pkg_prepare_spec + +# With the RPMs specfiles ready, perform the build in a parallel way +pkg_build_rpms + +# And finally, move them to the final place +pkg_move_rpms diff --git a/scripts/utilities/sources_expandable.sh b/scripts/utilities/sources_expandable.sh new file mode 100755 index 000000000..c9338cb7f --- /dev/null +++ b/scripts/utilities/sources_expandable.sh @@ -0,0 +1,51 @@ +#! /bin/bash +# +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# +# This file contains functions that are required for expanding functions +# referenced on package's sources files. It should be included whenever the +# expansion of these referenced functions is required. + + +# supported_languages() +# Summary: +# Function to expand the supported languages list passed as a parameter +# +# Description: +# This function receives two comma delimited list of language names as +# parameters. This list is the supported languages to output on a readable +# format for display on our documentation (namely the release notes file). +# +# Parameters: +# ${1} - Comma separated list of GCC supported languages. +# +# Return +# None. +# +function supported_languages() { + # Define local variables + local name + local list + # Iterate through the GCC supported languages + for name in $(echo "${1}" | sed 's/,/ /g'); do + local item=$(echo ${name} | tr '[:upper:]' '[:lower:]' | sed 's/.*/\u&/') + [[ -n "${list}" ]] && \ + list="${list}, ${item}" || \ + list=${item} + done + # Provide the final output + echo "[${list}]" +} diff --git a/scripts/utilities/split-debuginfo.sh b/scripts/utilities/split-debuginfo.sh new file mode 100755 index 000000000..4d25a95c4 --- /dev/null +++ b/scripts/utilities/split-debuginfo.sh @@ -0,0 +1,108 @@ +#!/bin/bash +# +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# Parse input parameters +while [[ $# > 0 ]] +do + key="$1" + case $key in + --rpmdir) + rpmdir="$2" + shift + ;; + --dynamic) + dynamic="$2" + shift + ;; + --subpackage) + subpackage="$2" + shift + ;; + *) + ;; + esac + shift +done + +# Print usage instructions +usage() { + cat << EOF +usage: $0 [options] + +Options (all options must be set): + --rpmdir Points to the directory where the RPMs are being built. + --dynamic Points to the directory that contains the spec files. + --subpackage Selects subpackage (runtime, devel, etc.) to split. +EOF +exit 1 +} + +# Check if the required debugfiles.list exists. +debugfiles=${rpmdir}/BUILD/debugfiles.list +if [ ! -f ${debugfiles} ]; then + echo "List of debug files (${debugfiles}) not found." + usage +fi + +# Check if the list of files in a subpackage exists. +regularfiles=${dynamic}/${subpackage}.list +if [ ! -f ${regularfiles} ]; then + echo "List of files in ${subpackage} (${regularfiles}) not found." + usage +fi + +# For each file listed as a debug files (i.e.: files listed in debugfiles.list) +# check if it belongs to the subpackage being parsed (i.e.: to --subpackage). +rm -f ${rpmdir}/BUILD/debugfiles-${subpackage}.list +for item in `cat ${debugfiles} | grep -E '\.debug$'`; do + # Get the non-debuginfo filename + if echo $item | grep -E "\.build-id" > /dev/null ; then + # Files inside the /opt/atx.x/lib/debug/.build-id directory are symbolic + # links to the binary files which generated them. + linkname=`echo ${item} | sed -e 's/\.debug//'` + linktarget=`readlink ${rpmdir}/BUILDROOT_*/$linkname | sed -e 's/+/\\\+/g'` + targetname=`basename ${linktarget}` + filename=${targetname} + else + # Files outside the /opt/atx.x/lib/debug/.build-id dir are regular files + # and their names are the same from the binary files which originated them. + filename=`basename ${item} | sed -e 's/\.debug//' | sed -e 's/+/\\\+/g'` + fi + echo $filename + # If the debug file belongs to a subpckage, add it to the list of debug files + # in such subpackage. + if grep -E "\/${filename}\"$" ${regularfiles} > /dev/null ; then + + # Devel package have python and ld files but don't have the binaries. + if [[ ${subpackage} = "devel" ]]; then + # The devel debug package should not include python and ld. + if [[ ${filename} =~ "python" || ${filename} = "ld" ]]; then + continue + fi + fi + + echo ${item} >> ${rpmdir}/BUILD/debugfiles-${subpackage}.list + # For files under /opt/atx.x/lib/debug/.build-id, also add the symbolic + # link without the '.debug' extension, because the files under + # /opt/atx.x/lib/debug/.build-id always come in pairs. + if echo $item | grep -E "\.build-id" > /dev/null ; then + echo ${item} | sed -e 's/\.debug//' \ + >> ${rpmdir}/BUILD/debugfiles-${subpackage}.list + fi + fi +done + diff --git a/scripts/utilities/update_revision.sh b/scripts/utilities/update_revision.sh new file mode 100755 index 000000000..eda8b7757 --- /dev/null +++ b/scripts/utilities/update_revision.sh @@ -0,0 +1,242 @@ +#!/bin/bash +# +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# This script opens a config/source file, reads all available repositories +# and change the ATSRC_PACKAGE_REV to the latest revision. +# Afterwards it attempts to send the change for review, according to the +# following rules: +# - If there isn't any pending change, then it submits a new commit. +# - If there's a pending change and its Code-Review or Verified label is set +# "-1", then it aborts. +# - If there's a pending change without "-1" label, then it submit a new +# commit but reuses the Change-Id. i.e. it updates the pending change with a +# new patch set. +# +# Remarks: This operation creates another file, so links are discarded to avoid +# affecting previous releases. +# +# Usage: +# update_revision + +# This script requires 1 parameter. +if [[ ${#} -ne 3 ]]; then + echo "update_revision.sh expects 3 parameters."; + return 1; +fi + +# TODO: adjust following variables. +# Assume user access gerrit password-lessly +GERRIT_USER=$(whoami) +GERRIT_SERVER=${2} +GERRIT_PORT=${3} + +source ${1}; + +# If ATSRC_PACKAGE_CO is not defined, we skip the revision check. +if ! [ -n "${ATSRC_PACKAGE_CO}" ] || ! [ -n "${ATSRC_PACKAGE_REV}" ]; then + return 0; +fi + +# This function print a message with identation +# +# Parameters: +# $1 - identation level. Any interger number greater or equal to zero. +# $2 - the message. +print_msg () +{ + for ((i=0;i<${1};i++)); do + echo -n '-' + done + echo ${2} +} + +# This function returns the latest revision from a git/svn repository +# +# Parameters: +# $1 - sources config path +get_latest_revision () +{ + if [[ ${#} -ne 1 ]]; then + echo "Function get_latest_revision expects 1 parameter."; + return 1; + fi + + local isGit=$(echo ${1} | grep -c git:); + local hash=""; + + if [[ "${isGit}" == 1 ]]; then + hash=$(git ls-remote ${1} HEAD | cut -f1) + hash=$(git rev-parse --short=12 ${hash}); + else + hash=$(svn info ${1} | grep Revision: | cut -d\ -f2); + fi + + echo ${hash}; +} + +# This function checks Gerrit for an open change in the topic. +# If so, it returns the change Id and review label. +# +# Parameters: +# $1 - the topic name +# Returns: +# " ", where +# Or empty string if no open change was found. +get_topic_status () +{ + local result=$(ssh -p ${GERRIT_PORT} ${GERRIT_USER}@${GERRIT_SERVER} \ +gerrit query status:open project:advance-toolchain topic:${1}) + + # If found a change the result starts with"change change_id" + if [[ ${result:0:6} = "change" ]]; then + change_id=$(echo $result | cut -d" " -f2) + result=$(gerrit_cmd query change:${change_id} label:-1) + if [[ ${result:0:6} = "change" ]]; then + # Review label is -1 + echo "${change_id} -1" + else + # TODO: need to return the exact value? + echo "${change_id} 0" + fi + fi +} + +# This function prepares a commit then send for review. +# +# Parameters: +# $1 - sources config path +# $2 - revision ID +send_to_review () +{ + print_msg 1 "Preparing commit to send for review." + + # Check connection to gerrit + # + print_msg 2 "Checking connection to Gerrit." + ssh -p ${GERRIT_PORT} ${GERRIT_USER}@${GERRIT_SERVER} gerrit version \ +> /dev/null 2>&1 + if [[ $? -ne 0 ]]; then + print_msg 0 "Cannot connect to gerrit server (${GERRIT_SERVER}) on \ +port ${GERRIT_PORT} with user \"${GERRIT_USER}\"." + return 1 + fi + print_msg 0 "Connection can be established." + + # Get AT config and package being updated. + # Expected a string like "/next/valgrind/source" + pkg=$(echo ${1} | awk -F "/" '{ print $(NF-1) }') + cfg=$(echo ${1} | awk -F "/" '{ print $(NF-3) }') + topic=auto-update_${cfg}_${pkg} + + print_msg 2 "Checking for pending auto-update change in Gerrit" + # Check if there's a pending auto-update review + # for the same AT configuration and package + local topic_status=($(get_topic_status ${topic})) + local change_id=${topic_status[0]} + if [[ ! -z "${change_id}" ]]; then + print_msg 0 "Found pending change with Id: ${change_id}" + if [[ "${topic_status[1]}" -eq -1 ]]; then + print_msg 0 "Change with review label -1. \ +Aborting the update."; + return 0 + fi + else + print_msg 0 "Not found any pending change in topic: ${topic}." + fi + + # Save current branch and switch to a work branch + # + current_branch=$(git rev-parse --abbrev-ref HEAD) + work_branch=${topic} + # -B option resets the branch if it already exist. + git checkout -B ${work_branch} + + # Check gerrit's hook exists so that a change-id is generated + # Otherwise download the hook script + gitdir=$(git rev-parse --git-dir) + if [[ ! -f ${gitdir}/hooks/commit-msg ]]; then + scp -p -P ${GERRIT_PORT} ${GERRIT_USER}@${GERRIT_SERVER}:\ +hooks/commit-msg ${gitdir}/hooks/ + fi + + print_msg 2 "Generating a patch"; + file=$(basename $(dirname ${1}))/$(basename ${1}) + + git add ${1} + local msg="Update ${pkg} on AT ${cfg}\n\ +Bump to revision ${2}\n\n" + if [[ ! -z "${change_id}" ]]; then + msg+="Change-Id: ${change_id}" + print_msg 0 "Reuse Change-Id of pending change on Gerrit" + else + print_msg 0 "Generate commit with a new Change-Id" + fi + echo -e ${msg} | git commit -F - + + # Finally send to gerrit + # Use topic branch to keep track of changes + print_msg 2 "Sending commit to Gerrit" + git push ssh://${GERRIT_USER}@${GERRIT_SERVER}:${GERRIT_PORT}\ +/advance-toolchain HEAD:refs/for/master%topic=${topic} + + # Switch back to original branch + git checkout ${current_branch} +} + +# This function updates a revision. +# +# Parameters: +# $1 - sources config path +# $2 - revision ID +update_revision () +{ + if [[ ${#} -ne 2 ]]; then + echo "Function update_revision expects 2 parameter."; + return 1; + fi + + # TODO: weak check - some revisions have less than 12 chars. + if [[ ${2} -eq ${ATSRC_PACKAGE_REV} ]]; then + print_msg 0 "Sources at latest revision already. Nothing to be done." + return 0; + fi + + print_msg 1 "Updating ${1} to the latest revision."; + sed -e "s/ATSRC_PACKAGE_REV=.*/ATSRC_PACKAGE_REV=${2}/g" \ + ${1} > ${1}.temp + mv ${1}.temp ${1} + + print_msg 0 "Update complete."; +} + +for co in ${ATSRC_PACKAGE_CO}; do + # So far, we only update git/svn revision + repo=$(echo $co | grep -oE \(git\|svn\):[^\ ]+); + + if [[ -n "${repo}" ]]; then + hash=$(get_latest_revision ${repo}); + + if [[ -n "${hash}" ]]; then + echo "" + print_msg 0 "The latest revision of ${repo} is ${hash}" + update_revision ${1} ${hash} + send_to_review ${1} ${hash} + break; + else + print_msg 0 "Unable to connect to ${repo}" + fi + fi +done; diff --git a/scripts/utilities/watch_ldconfig.c b/scripts/utilities/watch_ldconfig.c new file mode 100644 index 000000000..03bf1a509 --- /dev/null +++ b/scripts/utilities/watch_ldconfig.c @@ -0,0 +1,82 @@ +/* Copyright 2017 IBM Corporation +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +/* + * This program monitors the /etc/ld.so.cache to identify when the system's + * ldconfig is executed. + * When /etc/ld.so.cache changes AT's ldconfig is called to also update the + * ld.so.cache from AT. + */ +#include +#include +#include +#include +#include +#include + +#define BUF_LEN ( 1024 * (sizeof (struct inotify_event)) ) + +#define RUN_AT_LDCONFIG(PATH) AT_LDCONFIG( PATH ) +#define AT_LDCONFIG(PATH) system( #PATH ) + +// inotify file descriptor and watch. +volatile int fd, watch; + +void clean(int signum) +{ + (void) inotify_rm_watch(fd, watch); + (void) close(fd); +} + +int +main(int argc, char **argv) +{ + int length; + char buffer[BUF_LEN]; + char command[50]; + + // Handle SIGTERM + struct sigaction action; + memset(&action, 0, sizeof(struct sigaction)); + action.sa_handler = clean; + sigaction(SIGTERM, &action, NULL); + + fd = inotify_init(); + if (fd < 0) + perror("Error: Not able to start inotify!"); + + while (1) + { + // Add a watch to monitor /etc/ld.so.cache. + watch = inotify_add_watch(fd, "/etc/ld.so.cache", IN_MODIFY); + + // Wait for an event. + length = read(fd, buffer, BUF_LEN); + if (length < 0) + perror("Error: Read error."); + + // Run AT's ldconfig. +#ifndef AT_LDCONFIG_PATH +# error "AT_LDCONFIG_PATH is not defined!" +#endif + RUN_AT_LDCONFIG(AT_LDCONFIG_PATH); + } + + + (void) inotify_rm_watch(fd, watch); + (void) close(fd); + + return 0; +} diff --git a/scripts/utils.sh b/scripts/utils.sh new file mode 100644 index 000000000..95e94dca8 --- /dev/null +++ b/scripts/utils.sh @@ -0,0 +1,89 @@ +#!/bin/bash +# +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +get_nprocs () { + + # Simple method for determining number of worker threads to use. + # Read the /proc/cpuinfo file and find the number of lines with "processor" + + local CORES_FOUND=1 + if [[ -r /proc/cpuinfo ]]; then + CORES_FOUND=$(cat /proc/cpuinfo | grep "processor" | wc -l); + fi + if [[ "${CORES_FOUND}" > 0 ]]; then + echo "${CORES_FOUND}" + else + # There must be at least 1 cpu, use that in case the above command failed + echo "1" + fi +} + +## Function gen_gpg_pubkey +# Brief +# description +# @fn gen_gpg_pubkey +# @param base repository path where the key will be saved. If it's empty, it +# won't export the key. +# @param path where the gnupg keychain is located. Leave it empty to use the +# default directory. +# @param inform the keyid to extract the public component +# @return the file name of the extracted public key file +# +gen_gpg_pubkey () { + local pubName PARSEME DECSINCEEPOCH HEXSINCEEPOCH FULLPUBKEY gpghome + + if [[ ${#} -ne 3 ]]; then + return 1 + fi + + gpghome=${2:+--homedir "${2}"} + + set -e + pubName=$(gpg ${gpghome} --list-keys --fast-list-mode ${3} | \ + grep -e '^pub ' | sed 's/.*\/\(.*\) .*/\1/' | \ + tr "[:upper:]" "[:lower:]") + if [[ -z ${pubName} ]]; then + return 1; + fi + PARSEME=$(gpg --fixed-list-mode --with-colons --list-keys --with-fingerprint ${pubName} | grep pub) + DECSINCEEPOCH=$(echo "${PARSEME}" | awk -F : '{print $6 }') + HEXSINCEEPOCH=$(printf "%x" ${DECSINCEEPOCH}) + if [[ -z "${HEXSINCEEPOCH}" ]]; then + return 1; + fi + FULLPUBKEY="gpg-pubkey-${pubName}-${HEXSINCEEPOCH}" + + # Only export the key when the path is set. + if [[ -n "${1}" ]]; then + gpg ${gpghome} --yes --output ${1}/${FULLPUBKEY} --armor \ + --export ${pubName} + fi + + set +e + echo "${FULLPUBKEY}" +} + +# Return the version of the GNU program specified in $1 +# +# @fn get_gnu_version +# @param program Complete path to the GNU program the version is going to get +# extracted +get_gnu_version () +{ + # Print the version string of a standard GNU program, e.g. 1.13.4 + ${1} --version | head -n 1 | sed 's/.* \([^ ]*\)$/\1/g' +} diff --git a/utils/at/check_repo/.config/config b/utils/at/check_repo/.config/config new file mode 100644 index 000000000..846491eb7 --- /dev/null +++ b/utils/at/check_repo/.config/config @@ -0,0 +1,15 @@ +# The place which stores all AT config files +set at_config_repo "http://pokgsa.ibm.com/home/t/u/tulioqm/web/public/at-config" + +# Email settings +# Recipients of email alerts +set RECIPIENTS { + tuliom@linux.vnet.ibm.com +} + +# Specify how to send an email +# Valid values are: +# tcl - requires smtp from TCLlib +# mail - uses POSIX mail command (default) +set MAIL_SYS tcl +set SMTP_SERVER la.relay.ibm.com diff --git a/utils/at/check_repo/.config/gsaRHEL.repo/config b/utils/at/check_repo/.config/gsaRHEL.repo/config new file mode 100644 index 000000000..8d7542504 --- /dev/null +++ b/utils/at/check_repo/.config/gsaRHEL.repo/config @@ -0,0 +1,7 @@ +#!/usr/bin/expect + +set server ausgsa.ibm.com +set dir /projects/p/ppctoolchain/web/public/at/redhat/RHEL5 +set gpg_key "" +set manual 1 +set distro RHEL diff --git a/utils/at/check_repo/.config/gsaSLES.repo/config b/utils/at/check_repo/.config/gsaSLES.repo/config new file mode 100644 index 000000000..4bdd91333 --- /dev/null +++ b/utils/at/check_repo/.config/gsaSLES.repo/config @@ -0,0 +1,7 @@ +#!/usr/bin/expect + +set server ausgsa.ibm.com +set dir /projects/p/ppctoolchain/web/public/at/suse/SLES_11 +set gpg_key "" +set manual 1 +set distro SLES \ No newline at end of file diff --git a/utils/at/check_repo/.config/uiucRHEL.repo/config b/utils/at/check_repo/.config/uiucRHEL.repo/config new file mode 100644 index 000000000..9da464594 --- /dev/null +++ b/utils/at/check_repo/.config/uiucRHEL.repo/config @@ -0,0 +1,7 @@ +#!/usr/bin/expect + +set server linuxpatch.ncsa.uiuc.edu +set dir /toolchain/at/redhat/RHEL5/ +set gpg_key "gpg-pubkey-00f50ac5-45e497dc" +set manual 0 +set distro RHEL diff --git a/utils/at/check_repo/.config/uiucRHEL.repo/ignore b/utils/at/check_repo/.config/uiucRHEL.repo/ignore new file mode 100644 index 000000000..4e2c30ed9 --- /dev/null +++ b/utils/at/check_repo/.config/uiucRHEL.repo/ignore @@ -0,0 +1,11 @@ +4.0-0 +4.0-1 +4.0-2 +4.0-3 +4.0-4 +4.0-5 +5.0-0 +5.0-1 +5.0-2 +5.0-3 +5.0-4 diff --git a/utils/at/check_repo/.config/uiucSLES.repo/config b/utils/at/check_repo/.config/uiucSLES.repo/config new file mode 100644 index 000000000..38d76e360 --- /dev/null +++ b/utils/at/check_repo/.config/uiucSLES.repo/config @@ -0,0 +1,7 @@ +#!/usr/bin/expect + +set server linuxpatch.ncsa.uiuc.edu +set dir /toolchain/at/suse/SLES_10/ +set gpg_key "gpg-pubkey-00f50ac5-45e497dc" +set manual 0 +set distro SLES diff --git a/utils/at/check_repo/.config/uiucSLES.repo/ignore b/utils/at/check_repo/.config/uiucSLES.repo/ignore new file mode 100644 index 000000000..4e2c30ed9 --- /dev/null +++ b/utils/at/check_repo/.config/uiucSLES.repo/ignore @@ -0,0 +1,11 @@ +4.0-0 +4.0-1 +4.0-2 +4.0-3 +4.0-4 +4.0-5 +5.0-0 +5.0-1 +5.0-2 +5.0-3 +5.0-4 diff --git a/utils/at/check_repo/README b/utils/at/check_repo/README new file mode 100644 index 000000000..91b3985c7 --- /dev/null +++ b/utils/at/check_repo/README @@ -0,0 +1,43 @@ +This directory contains some scripts that automates the runs of the AT's FVTR. + +These scripts check if there are newer packages of the Advance Toolchain in +preconfigured repositories. For each newly available version, it mounts a +previously created chroot and installs the new version of the Advance +Toolchain and automatically runs the FVTR. + +As they were created to be executed by crond, they only print messages +on stdout when an unexpected error occurs. + +These scripts require the following applications: +- expect +- ftp +- Tcl +- tcllib or mail +- wget + +The basic setup requires: + +- Chroot files - It requires at least 2 chroot tarballs: one for RHEL + and another for SLES. They should be named chroot_RHEL6.2.tar.gz and + chroot_SLES11.2.tar.gz. + These files must create only the directory chroot when exploded, + which is the root of the chroot. + +- FVTR files - It is necessary to provide a tarball named + fvtr.tar.bz2. When extracted, it should create only the directory fvtr. + +- Global settings - This file specifies global settings, like the place where + all config files are stored, the SMTP server and the recipients which will + receive an email in the end of the execution. It must be named + $config_dir/$config_file (default name is .config/config) + +- Repository settings - all the settings are available in the $config_dir + directory. Each repository is represented by a directory with the suffix + '.repo', i.e.: '.config/gsa-SLES11.repo/'. + Inside this directory there are 2 files: config and ignore. The + first one describes the repository settings and the last one is a + list of ignored (already tested) versions of the Advance Toolchain. + For more information about these files, read shared.exp. + +The main script is check_repo.exp and doesn't accept parameters. +For more information about each script, please read their headers. diff --git a/utils/at/check_repo/check_repo.exp b/utils/at/check_repo/check_repo.exp new file mode 100755 index 000000000..acfcdf372 --- /dev/null +++ b/utils/at/check_repo/check_repo.exp @@ -0,0 +1,336 @@ +#!/usr/bin/expect +# +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# +# Automatically check for new versions, creates the chroot and runs the FVTR + +source ./shared.exp + +set chroot_dir chroot +set chroot_script test_version.exp +set fvtr_dir fvtr +set fvtr_file fvtr.tar.bz2 +set fvtr_logs fvtr-logs.tar.gz + +set log_file [exec date +%F_%T].log + +# Message levels +set WARNING 0 +set IMPORTANT 1 +set ERROR 2 + + +log_user 0 +log_file -noappend -a $log_file + +set email_msg "" + +# Before creating the chroot, it's required to mount some file systems +# Without this, the script executed inside the chroot may fail +proc mount_fs {} { + global chroot_dir + exec mount -v --bind /dev ${chroot_dir}/dev + exec mount -vt devpts devpts ${chroot_dir}/dev/pts + exec mount -vt tmpfs shm ${chroot_dir}/dev/shm + exec mount -vt "proc" "proc" ${chroot_dir}/proc + exec mount -vt sysfs sysfs ${chroot_dir}/sys +} + +proc umount_fs {} { + global chroot_dir + exec umount ${chroot_dir}/sys + exec umount ${chroot_dir}/proc + exec umount ${chroot_dir}/dev/shm + exec umount ${chroot_dir}/dev/pts + exec umount ${chroot_dir}/dev +} + +proc remove_chroot {} { + global chroot_dir + + # Deleting the chroot before unmounting all filesystems binds might + # cause you a lot of trouble + set mount_list [exec mount] + foreach line [split $mount_list "\n"] { + if {[regexp "([pwd]/${chroot_dir}\[^\ \]*)" $line match \ + mount]} { + log "Can't remove chroot because $mount is still mounted" $ERROR + exit 1 + } + } + file delete -force ./${chroot_dir}/ +} + +# Log messages +proc log [list msg [list level $WARNING]] { + global email_msg + global WARNING + global IMPORTANT + global ERROR + + switch $level \ + $IMPORTANT { + set hdr "Important" + } \ + $ERROR { + set hdr "Error" + } \ + default { + set hdr "Warning" + } + + # Ignore warning messages when sending emails + if {$level > $WARNING} { + append email_msg "${hdr}: ${msg}\n" + } + + send_log "[exec date {+%F %T}] ${hdr}: $msg\n" +} + +proc send_email_posix {email_msg} { + global RECIPIENTS + global log_file + + set EOF "\004" + + set to "" + foreach addr $RECIPIENTS { + append to "${addr} " + } + + # Only attach log files smaller than 1MB + if {[file size $log_file] < 1048576} { + spawn mail -a $log_file $to + } else { + spawn mail $to + } + + expect { + "Subject:" { + send "Results of AT tests\n" + send "$email_msg\n" + send $EOF + } + default { + send_user "Email submission failed.\n" + exit + } + } + + expect { + "EOT" { + # Wait until mail finishes sending the email + sleep 5 + } + } +} + +proc send_email_tcl {email_msg} { + global RECIPIENTS + global SMTP_SERVER + global log_file + + set to "" + foreach addr $RECIPIENTS { + append to "${addr}, " + } + + set bodyT [mime::initialize -canonical text/plain -string $email_msg] + set message [list $bodyT] + + # Only attach log files smaller than 1MB + if {[file size $log_file] < 1048576} { + set logT [mime::initialize -canonical text/plain \ + -header [list Content-Disposition \ + "attachment; filename=log"] \ + -file $log_file] + lappend message $logT + } + + set msgT [mime::initialize -canonical multipart/mixed -parts \ + $message] + mime::setheader $msgT Subject "Results of AT tests" + smtp::sendmessage $msgT \ + -header [list To $to] -servers $SMTP_SERVER + mime::finalize $logT + mime::finalize $bodyT + mime::finalize $msgT +} + +proc send_email {email_msg} { + global MAIL_SYS + + switch $MAIL_SYS { + "tcl" { + send_email_tcl $email_msg + } + default { + send_email_posix $email_msg + } + } +} + +proc finalize {{ret 0}} { + global email_msg + if {$email_msg != ""} { + send_email $email_msg + } + exit $ret +} + +# Create a tarball with the logs of the FVTR +proc save_fvtr_logs {} { + global chroot_dir + global fvtr_dir + global fvtr_logs + + set old_dir [pwd] + file delete -force ${old_dir}/${fvtr_logs} + + cd ${chroot_dir}/root/ + set files [exec find ./${fvtr_dir} -name *.log -printf "%p "] + if {[llength $files] > 0} { + eval exec tar -czf ${old_dir}/${fvtr_logs} $files + } + cd ${old_dir} +} + + +if { ![file exists ${config_dir}/${config_file}] } { + log "Can't find the global settings in ${config_dir}/${config_file}." \ + ${ERROR} + finalize 1 +} +source ${config_dir}/${config_file} + +# Look for requirements to send email +switch $MAIL_SYS { + "tcl" { + package require smtp 1.0 + package require mime 1.0 + } + default { + # Use POSIX mail command as default + set MAIL_SYS mail + } +} + +# Delete FVTR logs to make sure we aren't going to make a confusion +if {[file exists ${fvtr_logs}]} { + file delete ${fvtr_logs} +} + +foreach repo_dir [glob -directory $config_dir -type d *.repo] { + log "Checking repository ${repo_dir}..." + if {[file exists ${chroot_dir}]} { + log "There is a broken chroot available." ${ERROR} + log "Remove it manually and try again." ${ERROR} + finalize 1 + } + + # Read settings + source $repo_dir/$config_file + + # Check if there are updates + if {[catch {exec ./get_versions.exp $repo_dir} new_versions]} { + if {[string first "BSO" $new_versions] >= 0} { + log "Authenticate through BSO to check repository ${repo_dir}" ${IMPORTANT} + continue + } + log "Failed to get new versions for ${repo_dir}" ${ERROR} + finalize 1 + } + + foreach version $new_versions { + log "Testing version ${version} from ${repo_dir}" ${IMPORTANT} + switch $distro { + "SLES" { + set tarball chroot_SLES11.2.tar.gz + set at_config "at${version}-SLES10" + } + "RHEL" { + set tarball chroot_RHEL6.2.tar.gz + set at_config "at${version}-RHEL5" + } + default { + log "Unrecognized distribution: $distro" ${ERROR} + finalize 1 + } + } + exec tar -xzf $tarball >@stdout 2>@stderr + + # Untar the FVTR + exec tar -C ${chroot_dir}/root -xjf ${fvtr_file} >@stdout \ + 2>@stderr + + # Copy the script that runs inside the chroot + file copy ./${chroot_script} ./${chroot_dir}/root/ + + # Grab the config file + if {[catch {exec wget -q ${at_config_repo}/${at_config} \ + -O ./${chroot_dir}/root/fvtr/at-config}]} { + log "Failed to download the config file ${at_config_repo}/${at_config}" $ERROR + remove_chroot + continue + } + + if {$manual} { + set chroot_args "--manual $gpg_key" + } else { + set chroot_args "$gpg_key" + } + set chroot_args "$chroot_args ftp://${server}${dir} ${version}" + + set failed_tests {} + mount_fs + + eval spawn chroot ./${chroot_dir}/ /root/${chroot_script} \ + $chroot_args + # Wait for EOF + expect { + -timeout -1 + "(file \"/root/${chroot_script}\"" { + # Something wrong happened inside the chroot + # Exit, but maintain the chroot for analysis + log "Unrecognized error caught inside the chroot" ${ERROR} + log "Review the logs for more information and clear your chroot" ${ERROR} + umount_fs + finalize 1 + } + -re "(\[^${BLANK}\\r\\n\]*)\[^\\r\\n\]+failed" { + lappend failed_tests "$expect_out(1,string)" + exp_continue + } + eof {} + } + + if {[llength ${failed_tests}] > 0} { + log "Failed tests: ${failed_tests}" $ERROR + } else { + log "Version ${version} in ${repo_dir} passed all tests!" ${IMPORTANT} + } + umount_fs + save_fvtr_logs + remove_chroot + + # Add to ignored list + set ignore_pipe [open ${repo_dir}/$ignore_file a] + puts $ignore_pipe "${version}" + close $ignore_pipe + } +} + +finalize diff --git a/utils/at/check_repo/get_versions.exp b/utils/at/check_repo/get_versions.exp new file mode 100755 index 000000000..41be7ddb4 --- /dev/null +++ b/utils/at/check_repo/get_versions.exp @@ -0,0 +1,181 @@ +#!/usr/bin/expect +# +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# +# Check if there are new packages in a repo +# +# Parameters: +# - $0: Directory with the config and ignore files +# +# In this config file you must set the following variables: +# server - the hostname of the server +# dir - the directory where the files are stored +# + +source ./shared.exp + +set log_file ./get_versions.log + +# Default regex for ftp prompt +set ftp_prompt "ftp>" + +proc print_usage {} { + global argv0 + puts "Usage: $argv0 config_dir" + puts "" + puts "Example:" + puts "$argv0 foo/at5.repo/" +} + +# Expect ftp prompt and fail with a message if it isn't replied +proc expect_prompt {message} { + global ftp_prompt + expect { + $ftp_prompt {} + default { + send_user "$message" + exit 1 + } + } +} + +# Print the available versions in the current directory of the ftp +proc print_versions {} { + global cross + global ftp_prompt + global ignore + global NBLANK + + set prefix "advance-toolchain-" + if { $cross } { + set suffix ".i686.rpm" + set pkg "cross" + } else { + set suffix ".ppc64.rpm" + set pkg "devel" + } + + # List packages + set pkg_re "${prefix}at(${NBLANK}*)-${pkg}-(${NBLANK}*)${suffix}" + + # Regexp for internal tags, i.e.: alpha1, beta3, etc. + set internal_re "\[^-\]*-(.*)" + + send "ls *${pkg}*${suffix}\n" + expect -re $ftp_prompt { + set file_list $expect_out(buffer) + } + + # If the file isn't ignored, print it's version + foreach line [split $file_list "\n"] { + if {[regexp $pkg_re $line match at_major at_version]} { + + # Check if it's an internal release + if {[regexp $internal_re $at_major match \ + internal_tag]} { + set at_version ${at_version}-${internal_tag} + } + + if { ![regexp "${at_version}\\n" $ignore] } { + puts $at_version + } + } + } +} + +if { $argc != 1 } { + print_usage + exit 1 +} + +# Check if directory is valid +if { ![file exists [lindex $argv 0]] } { + puts stderr "Error: can't access [lindex $argv 0]" +} + +set config_file [lindex $argv 0]/$config_file +set ignore_file [lindex $argv 0]/$ignore_file + +if { [file exists $config_file] } { + source $config_file +} else { + puts stderr "Error: Config file not found" + exit 1 +} + +log_user 0 +log_file -noappend -a $log_file + +# Create the file if it doesn't exist +if { [file exists $ignore_file] } { + set ignore_pipe [open $ignore_file] +} else { + set ignore_pipe [open $ignore_file w+] +} +set ignore [read $ignore_pipe] +close $ignore_pipe + +set machine [exec uname -m] +set cross [regexp "x86" $machine] + +proc login_fail {} { + send_user "Failed to login\n" + exit 1 +} + +eval spawn ftp $server +set ftp_id $spawn_id + +expect { + "BSO" { + puts stderr "Authenticate through the BSO first." + exit 1 + } + $ftp_prompt {} + "Name " { + send "anonymous\n" + expect "Password:" { + send "anonymous\n" + } + exp_continue + } + "Login failed" login_fail + default login_fail +} + +# Change to the repo dir +send "cd $dir\n" +expect_prompt "Failed to change directory to '$dir'" + +# The following command is going to list the directories for each AT version +set at_dir_re "^d.*(at\[0-9\]+\\.\[0-9\]+)" +send "ls\n" +expect -re $ftp_prompt { + set file_list $expect_out(buffer) +} +foreach line [split $file_list "\n"] { + if {[regexp $at_dir_re $line match at_major]} { + send "cd $at_major\n" + expect_prompt "Failed to change directory to '$at_major'" + print_versions + send "cd ..\n" + expect_prompt "Failed to change directory to '..'" + } +} + +send "bye\n" + +exit 0 diff --git a/utils/at/check_repo/shared.exp b/utils/at/check_repo/shared.exp new file mode 100644 index 000000000..2e17e6ccf --- /dev/null +++ b/utils/at/check_repo/shared.exp @@ -0,0 +1,48 @@ +#!/usr/bin/expect +# +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# + +# Settings of the repository +# + +# Directory where the settings are stored +# Inside this directory you must create a file named $config_file that stores +# global settings and one directory for each repository you want to check. +set config_dir ".config" + +# This is the file name used to store global settings and repository settings. +# In both cases, they are Tcl files sourced in multiple scripts. +# The repository settings file must set the following variables: +# server - The repository host (must be an FTP server). +# Ex.: ausgsa.ibm.com +# dir - Directory where the root of the repository is available. This +# This directory stores the directories of each AT version. +# gpg_key - The name of the gpg file stored in $dir. Can be set to "". +# manual - Specifies if it's necessary to manually download the files. +# When set to 0, yum/zypper will download and install the +# Advance Toolchain. When set to 1, it's going to be downloaded +# with wget and installed by rpm. +# distro - Specifies the distribution repository, i.e.: SLES or RHEL. +set config_file config + +# File with a list of AT versions to ignore. +# It must have 1 AT version per line. +set ignore_file ignore + +# Shared regular expression patterns +set BLANK "\[:blank:\]" +set NBLANK "\[^${BLANK}\]" diff --git a/utils/at/check_repo/test_version.exp b/utils/at/check_repo/test_version.exp new file mode 100755 index 000000000..383c73797 --- /dev/null +++ b/utils/at/check_repo/test_version.exp @@ -0,0 +1,273 @@ +#!/usr/bin/expect +# +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# +# This script is executed from inside a chroot jail +# You can run it on a normal system, but it may change your yum/zypper +# environment. In this case, run it with --manual +# +# It expects a chroot with SPEC CPU environment already loaded and +# XLC installed. +# As we want a clean install of the OS, it should never install more than 1 +# AT version. +# + +set AT_VER_re "(\[^\\-\]*)-(\[^\\-\]*)-?(.*)" +set AT_MAJOR_re "(\[^\\.\]*)\.(\[^\\.\]*)" +set SPEC_DIR "/root/cpu2006" + +proc print_usage {} { + global argv0 + puts "Usage: $argv0 \[--manual\] \[gpg_key\] repository at_version" + puts "\t--manual\tDownload files manually using wget instead of" + puts "\t\t\tzypper/yum. Use this when the repository isn't a proper" + puts "\t\t\tyum/zypper repository." + puts "\tgpg_key\t\tThe gpg key of the yum/zypper repository." + puts "" + puts "Example:" + puts "$argv0 gpg-pubkey-00f50ac5-45e497dc ftp://example.com/at/RHEL5/ 4.0-5" +} + +if { $argc < 2 || $argc > 4 } { + print_usage + exit 1 +} + +set repo [lindex $argv end-1] +set at_version [lindex $argv end] +set manual 0; # Default disable +set gpg_key "" + +# Set the environment for the SPEC CPU +set env(SPECPERLLIB) "${SPEC_DIR}/bin:${SPEC_DIR}/bin/lib" +set env(SPEC) "${SPEC_DIR}" +set env(PATH) "${SPEC_DIR}/bin:$env(PATH)" + +cd /root/ + +foreach param [lrange $argv 0 end-2] { + switch -exact $param { + "--manual" { + set manual 1 + } + default { + set gpg_key $param + } + } +} + +# Check if AT is already installed and abort +if { ![catch {exec rpm -qa | grep advance-toolchain} at_list] } { + puts stderr "The following advance-toolchain packages are already installed:" + puts stderr $at_list + puts stderr "Check if you have a clean chroot install." + exit 1 +} + +# Check processor type +set machine [exec uname -m] +set cross [regexp "x86" $machine] + +# Extract AT major version +if { ![regexp "$AT_VER_re" $at_version match at_major at_rev at_int] } { + puts stderr "Failed to recognize version $at_version." + exit 1 +} + +# Extract AT major numbers a.b, i.e: 5.0 -> a=5, b=0 +if { ![regexp $AT_MAJOR_re $at_major match at_major_a at_major_b] } { + puts stderr "Failed to recognize AT major version $at_major." + exit 1 +} + +if {$cross} { + set s_pkg_list cross + set suffix ".i686.rpm" +} else { + set s_pkg_list {devel runtime perf} + # mcore-libs was included in versions 5.0-4 and 6.0-0 + if { $at_major_a >= 6 || + [expr $at_major_a == 5 && $at_major_b >= 0 && $at_rev >= 4]} { + set s_pkg_list [lappend s_pkg_list mcore-libs] + } + set suffix ".ppc64.rpm" +} + +# Check if we're in a yum or zypper system +set has_yum [expr ![catch {exec which yum}]] + +# List of package names +set pkg_list {} + +# List of files +set file_list {} + + +# Check if the source code contains blocked programs and if the source tarball +# is valid +puts "Checking the source code..." +set blocked_list [list openssl] +set src_list [list binutils gcc gdb glibc gmp tbb libdfp libhugetlbfs \ + kernel mpc mpfr oprofile paflib userspace-rcu valgrind] +# From AT >= 6.0-0 only packages that require a public source code are provided +# Block all the others. +if {$at_major_a >= 6} { + lappend blocked_list amino boost expat libauxv libsphde \ + python tcmalloc zlib +} +# Started distributing libvecpf on AT 7.0-4 +if {${at_major_a} > 7 || + [expr ${at_major_a} == 7 && ${at_major_b} > 0] || + [expr ${at_major_a} == 7 && ${at_major_b} == 0 && ${at_rev} >= 4]} { + lappend src_list libvecpf +} + +set src_name "advance-toolchain-at${at_major}" +if { $at_int != "" } { + append src_name "-${at_int}" +} +append src_name "-src-${at_major}-${at_rev}.tgz" + +exec -ignorestderr wget -q ${repo}/at${at_major}/${src_name} \ + -O $src_name >@stdout 2>@stderr +set file_list "" +if {[catch {exec tar -tzf $src_name} file_list] || $file_list == ""} { + puts "src-explosion\t\tfailed" + puts stderr "Is the source file corrupted?" + exit 1 +} +set cmp_list {} +set src_error 0 +foreach f $file_list { + set cmp_name [split "$f" "/"] + set cmp [lindex $cmp_name 0] + + # Create the list of package components found + if {[lsearch $cmp_list "${cmp}"] < 0} { + puts " found ${cmp}" + lappend cmp_list $cmp + + # If the package is in the blocked list, then that is + # an error + if {[lsearch $blocked_list "${cmp}"] >= 0} { + puts "Package: ${cmp} should not be included" + set src_error 1 + } else { + + # If the package is in the src rpm but not in the + # expected list then the test needs updating + if {[lsearch $src_list "${cmp}"] < 0} { + puts "Package: ${cmp} not found in expected list" + set src_error 1 + } + } + } +} +set src_found 0 +# check that all the expected source is present in the tarball +foreach expected_src $src_list { + if {[lsearch $cmp_list "${expected_src}"] < 0} { + puts "Missing from src rpm: ${expected_src}" + set src_error 1 + } +} +if {$src_error > 0} { + puts "src-tarball\t\t failed" +} else { + puts "src-tarball\t\tpassed" +} + +# Remove the source tarball +file delete $src_name + +set file_list "" + +# Create a list of new versions +foreach pkg $s_pkg_list { + set pkg_name "advance-toolchain-at${at_major}" + if {$at_int != ""} { + append pkg_name "-${at_int}" + } + + append pkg_name "-${pkg}-${at_major}-${at_rev}" + set pkg_list [lappend pkg_list $pkg_name] + set pkg_file "${pkg_name}${suffix}" + set file_list [lappend file_list $pkg_file] + + # Download files manually + if {$manual} { + puts "Downloading ${pkg_file}..." + exec -ignorestderr wget -q ${repo}/at${at_major}/$pkg_file \ + -O $pkg_file >@stdout 2>@stderr + } +} + +# Install +if {$manual} { + puts "Installing packages: $file_list..." + eval exec -ignorestderr rpm --quiet -i $file_list >@stdout 2>@stderr +} else { + if {$has_yum} { + set config [open /etc/yum.repos.d/advance-toolchain.repo w] + puts $config "# Begin of configuration file" + puts $config "\[Advance-Toolchain\]" + puts $config "name=Advance Toolchain UIUC/NSCA FTP" + puts $config "baseurl=${repo}" + puts $config "failovermethod=priority" + puts $config "enabled=1" + if { $gpg_key != "" } { + puts $config "gpgcheck=1"; + puts $config "gpgkey=${repo}/${gpg_key}" + } + puts $config "# End of configuration file" + close $config + + puts "Installing packages: $pkg_list" + eval exec yum -q -y install $pkg_list >@stdout 2>@stderr + } else { + exec zypper -n addrepo $repo "Advance Toolchain" >@stdout \ + 2>@stderr + puts "Installing packages: $pkg_list" + eval exec zypper -n -q --gpg-auto-import-keys install \ + $pkg_list >@stdout 2>@stderr + } +} + +# Run the tests. +puts "Testing Advance Toolchain ${at_version}..." +set saved_dir [pwd] +if {[catch {cd ./fvtr} errmsg]} { + # This shouldn't happen. Something is really wrong here. + # Get information + puts "Current directory: [pwd]" + puts "Available directories: [glob -type d *]" + # Force Tcl failure + error ${errmsg} +} +if { [catch {exec ./fvtr.sh -f ./at-config >@stdout 2>@stderr}] } { + puts "Failed to run the FVTR" +} +cd $saved_dir + +# Uninstall +puts "Uninstalling packages: $pkg_list" +eval exec -ignorestderr rpm --quiet -e $pkg_list >@stdout 2>@stderr + +# Remove files +if {$manual} { + puts "Removing $file_list" + file delete $file_list +} diff --git a/utils/at/gen_notes.sh b/utils/at/gen_notes.sh new file mode 100755 index 000000000..5a96501df --- /dev/null +++ b/utils/at/gen_notes.sh @@ -0,0 +1,57 @@ +#!/bin/sh +# +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# Usage: sh gen_notes.sh +# : suse OR rhel + +AT_MAJOR_VERSION="05" +AT_MAJOR="at${AT_MAJOR_VERSION}" +AT_DEST="/opt/${AT_MAJOR}" +AT_VER_REV="1.0-0" +AT_VERSION="${AT_MAJOR}-$AT_VER_REV" + +CHECK_DISTRO="$1" + +if [ ${CHECK_DISTRO} = "suse" ]; then + AT_REPO="${AT_MAJOR}/suse/SLES_10" +else + AT_REPO="${AT_MAJOR}/redhat/RHEL5" +fi + +# Update the installation location based on the major number. +sed '/\/opt\/at00/s@/opt/at00@'$AT_DEST'@' ../../at/scripts/release_notes.at.html > rel_notes.temp + +# Update the toolchain directory location as it will be on the UIUC server. +sed '/AT_DIRECTORY_PLACE_HOLDER/s@AT_DIRECTORY_PLACE_HOLDER@/toolchain/at/'$AT_REPO'@' rel_notes.temp > rel_notes2.temp + +# Check the distro and place the instructions for either YaST or YUM +if [ ${CHECK_DISTRO} = "suse" ]; then + sed '/if_SLES10/s@@ @' rel_notes3.temp > rel_notes4.temp +else + sed '/if_RHEL5/s@@ @' rel_notes3.temp > rel_notes4.temp +fi + +# Update the release notes' toolchain 'major number' and version. +sed '/Release Notes for the Advance Toolchain/s/Toolchain 00 Version 0\.0-0/Toolchain '$AT_MAJOR_VERSION' Version '$AT_VER_REV'/' rel_notes4.temp > release_notes.${AT_VERSION}.html + +rm rel_notes.temp +rm rel_notes2.temp +rm rel_notes3.temp +rm rel_notes4.temp + diff --git a/utils/at/pack_dfp.sh b/utils/at/pack_dfp.sh new file mode 100755 index 000000000..0c05ae02a --- /dev/null +++ b/utils/at/pack_dfp.sh @@ -0,0 +1,26 @@ +#!/bin/sh +# +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +GLIBC_SRC_PATH=$1 +VERSION=$2 + +pushd ./ > /dev/null +cd $GLIBC_SRC_PATH + +echo "tar -czf dfp-v0.0${VERSION}.tgz --exclude=dfp/test/gcc-tests --exclude=legal --exclude=.svn --exclude=dfp/sysdeps/dfp/configure ${GLIBC_SRC_PATH}/dfp/" +tar -czf dfp-v0.0${VERSION}.tgz --exclude=dfp/test/gcc-tests --exclude=dfp/sysdeps/dfp/configure --exclude=legal --exclude=\.svn dfp/ +popd > /dev/null diff --git a/utils/at_downloader/at_downloader.sh b/utils/at_downloader/at_downloader.sh new file mode 100755 index 000000000..9150d8b6f --- /dev/null +++ b/utils/at_downloader/at_downloader.sh @@ -0,0 +1,402 @@ +#!/bin/bash +# +############################################################################### +# Copyright (c) 2015 IBM Corporation. +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Eclipse Public License v1.0 +# which accompanies this distribution, and is available at +# http://www.eclipse.org/legal/epl-v10.html +# Contributors: +# IBM Corporation, Raphael Zinsly - initial implementation and documentation. +############################################################################### +# +# The Advance Toolchain (AT) downloader is a tool to download the latest AT +# for a supported distribution. +# This script looks at the official FTP to find the availables distributions +# and AT's versions. +# The latest AT from a chosen version will be downloaded. +# +echo "Advance Toolchain downloader" + +at_url="ftp://ftp.unicamp.br/pub/linuxpatch/toolchain/at/" +# Initialize the variables. +pwd=$(pwd) +tmp_file="${pwd}/temp.out" +tmpdir="tmp.$((RANDOM))" +checksums_file="${pwd}/checksums_list.out" +debian="no" + +usage() +{ +cat << EOF +The Advance Toolchain (AT) downloader is a tool to download the latest +AT for a supported distribution. +To run this script just run it without arguments. +e.g: ./at_downloader.sh +The tool will guide you to select one of the supported distributions and the +version of the Advance Toolchain. + +The Advance Toolchain is a self contained toolchain which provides preview +toolchain functionality in GCC, binutils and GLIBC, as well as the debug and +profile tools GDB, Valgrind and OProfile. +It also provides a group of optimized threading libraries as well. + +Options: + -h, --help display this help and exit. + -i, --iso isoname.iso create ISO image and save it to isoname.iso +EOF +} + +# Check if the system has mkisofs, which is required to build the ISO. +have_mkisofs() +{ + mkisofs --version > /dev/null 2>&1 || \ + { + echo -n >&2 "Could not find mkisofs. Is it installed? " + echo >&2 "Aborting..." + exit 1 + } + return +} + +# Check whether the filename given for the iso is valid +check_isofile() +{ + if [[ "$1" =~ [^a-zA-Z0-9.] ]]; then + echo "Invalid filename ($1). " \ + "Use only alphanumeric characters and dots. Aborting." + exit 1 + fi +} + +# Parse input options +MAKEISO=false +while [[ $# > 0 ]] +do + key="$1" + + case $key in + -h|--help) + usage + exit 0 + ;; + -i|--iso) + have_mkisofs + MAKEISO=true + ISOFILE=$2 + check_isofile $ISOFILE + shift + ;; + *) + usage + exit 1 + ;; + esac + shift +done + +# Verify if lsb_release and wget are available. +for program in lsb_release wget; do + if ! type "${program}" > /dev/null; then + echo "${program} is not found in the system." + echo "Please install ${program} and try again." + exit 1 + fi +done + +# Delete the intermediate files and exit with signal $1. +clean_exit () +{ + # Move files from the temporary directory to the requested destination + rm -f ${output}/${tmpdir}/*SUMS + shopt -s dotglob + mv ${output}/${tmpdir}/* ${output}/ + rmdir ${output}/${tmpdir} + + # Delete intermediate files + rm ${tmp_file} ${checksums_file} .listing 2> /dev/null + + exit $1 +} + +# Get the list of directories in a given array and print it. +# Parameters: +# $1 - Name of the array with the options. +print_directories () +{ + i=1 + array_name=$1[@] + array=( "${!array_name}" ) + for element in ${array[@]}; do + echo "${i}. ${element}" + i=$((i+1)) + done +} + +# Handle the option chosen by the user. +# Parameters: +# $1 - Name of the array with the options. +# $2 - Option chosen. +# $3 - Default option. +handle_option () +{ + array_name=$1[@] + array=( "${!array_name}" ) + option=${2} + if [[ "$( echo ${option} | grep "^-*[ [:digit:] ]*$" )" ]]; then + # Guarantee that the option is in range. + if [[ ${option} -le ${#array[@]} && ${option} -gt 0 ]]; then + option=${array[$((option-1))]} + else + exit + fi + else + option=${option:-${3}} + fi + echo "${option}" +} + +# Get the list of files from an URL. +# Parameters: +# $1 - URL. +# $2 - Term to be filtered by grep. +list_files () +{ + wget -q --no-remove-listing -O - ${1}/ > /dev/null + cat .listing | awk '{print $9}' | grep ${2} | tr '\r' ' ' +} + +# Get the system's distribution name, vendor and ID. +distro_rawname=$( lsb_release -i | cut -d":" -f 2 | sed "s/^[ \t]*//" \ + | tr [:upper:] [:lower:] ) +distro_id=$( lsb_release -r | cut -d":" -f 2 | sed "s/^[ \t]*//" \ + | cut -d"." -f 1 ) +case ${distro_rawname} in + redhat*) + vendor_name="redhat" + distro_name="RHEL${distro_id}" + ;; + fedora) + vendor_name="redhat" + distro_name="Fedora${distro_id}" + ;; + *suse*) + vendor_name="suse" + distro_name="SLES_${distro_id}" + ;; + ubuntu*) + vendor_name="ubuntu" + distro_name=$( lsb_release -c | cut -d":" -f 2 ) + ;; + debian) + vendor_name="debian" + distro_name=$( lsb_release -c | cut -d":" -f 2 ) + ;; + *) + vendor_name="" + distro_name="" + ;; +esac; + +# Get the vendor from user. +vendors=($( list_files "${at_url}" "-ve ^at -e ^\." )) +echo "Vendors:" +print_directories vendors +echo -n "Please, choose the vendor" +if [[ -n ${vendor_name} ]]; then + echo -n " (${vendor_name})?" +fi +read -e -p ": " vendor +vendor=$( handle_option vendors ${vendor} ${vendor_name} ) +if [[ -z ${vendor} ]]; then + echo "Error: Vendor not chosen!" + clean_exit 1 +fi +echo "Collecting information..." + +# Print indicates which word to print in the awk scripts. +if [[ ${vendor} == "ubuntu" || ${vendor} == "debian" ]]; then + debian="yes" + vendor="${vendor}/dists" +fi + +# Get the distro from user. +all_distros=$( list_files "${at_url}/${vendor}/" "[a-zA-Z]" | sort -rV ) +if [[ ${#all_distros[@]} == 0 ]]; then + echo "Error: Vendor not supported!" + clean_exit 1 +fi + +# Find all supported distros and its AT's versions. +j=0 +for dist in ${all_distros[@]}; do + # Get the AT versions listed in that distribution. + all_versions=$( list_files "${at_url}/${vendor}/${dist}/" "^at" \ + | sort -rV ) + i=0 + # Get the AT's versions supported for this distro. + for ver in ${all_versions[@]}; do + if [[ ${debian} == yes ]]; then + directory="${ver}/binary-ppc64el" + else + directory="${ver}" + fi + # Verify if the AT directory has devel packages. + wget -q -O - ${at_url}/${vendor}/${dist}/${directory}/ \ + | grep devel > ${tmp_file} + if [[ -s ${tmp_file} ]]; then + at_versions[${i}]=${ver} + i=$((i+1)) + fi + done + if [[ ${#at_versions[@]} != 0 ]]; then + sup_distros[${j}]=${dist} + if [[ ${debian} == "yes" ]]; then + # Get a number for the first char on debian distros. + number=$( echo ${dist} | cut -c1 | od -A n -i ) + else + # Get the version number. + number=$( echo ${dist} | sed -E 's/[0-9]+/_&/' \ + | awk -F'[_]+' '{print $2}' ) + fi + distro_versions[${number}]=${at_versions[@]} + j=$((j+1)) + fi + unset at_versions +done + +# If the system's vendor was choosen, use the system's distro as default. +if [[ ${vendor} != ${vendor_name} ]]; then + distro_name=${sup_distros[0]} +fi +echo "Distributions:" +print_directories sup_distros +read -e -p "Choose the distribution (${distro_name})?: " distro +distro=$( handle_option sup_distros ${distro} ${distro_name} ) +if [[ ${debian} == "yes" ]]; then + number=$( echo ${distro} | cut -c1 | od -A n -i ) +else + number=$( echo ${distro} | sed -E 's/[0-9]+/_&/' \ + | awk -F'[_]+' '{print $2}' ) +fi +at_versions=( ${distro_versions[${number}]} ) +if [[ ${#at_versions[@]} == 0 ]]; then + echo "Error: Distribution ${distro} not supported!" + clean_exit 1 +fi + +# Get the latest AT's version. +at_latest=${at_versions[0]} + +# Get the AT's version from user. +echo "AT versions:" +print_directories at_versions +read -e -p "Enter the version of AT (${at_latest})?: " at_major +at_major=$( handle_option at_versions ${at_major} ${at_latest} ) +# Strip "at" from the version string. +at_major=$( echo ${at_major} | tr -d "at" ) + +# Get the output path from user. +read -e -p "Enter the output directory (${pwd})?: " output +output=${output:-${pwd}} + +# Set the url for at_major directory in the FTP. +url="${at_url}/${vendor}/${distro}/at${at_major}/" + +# Get the list of files in the distro/at_major directory. +# Filter the AT's minor versions from release notes file names. +wget -q -O - ${url} | awk -F'[.-]' '{print $9}' > ${tmp_file} +# Get the latest minor version from AT. +at_minor=$( cat ${tmp_file} | grep -e ^[0-9] | tail -1 ) +# Verify if there is native packages for that distro. +if [[ -z ${at_minor} ]]; then + # Check if ${tmp_file} has data. + if [[ ! $( cat ${tmp_file} ) ]]; then + echo "Error: This AT version doesn't have support to this \ +distro." + clean_exit 1 + else + echo "AT ${at_major} has only compat and/or cross packages for \ +${distro}." + clean_exit 1 + fi +fi + +# Debian systems have a different directory structure. +if [[ ${debian} == "yes" ]]; then + download_url="${url}/binary-ppc64el/*${at_major}-${at_minor}* \ + ${url}/binary-i386/*${at_major}-${at_minor}*" + # Set to download DEB packages. + extensions="deb" +else + download_url="${url}/*${at_major}-${at_minor}*" + # Set to download RPM packages. + extensions="rpm" +fi + +# Enter in the output directory. +mkdir -p ${output}/${tmpdir} +pushd ${output}/${tmpdir} +if [[ $? -ne 0 ]]; then + echo "Error: Not able to access ${output}!" + clean_exit 1 +fi +# Download the packages. +echo "Downloading AT ${at_major}-${at_minor} on $(pwd) ..." +wget -A ${extensions} --progress=dot:mega ${download_url} 2>&1 \ + | grep -E ' =>|[KM] \.| saved ' +if [[ $? -ne 0 ]]; then + echo "Error: The packages were not downloaded correctly." + clean_exit 1 +fi + +# Verify the md5sum of the files downloaded. +echo "Checking the integrity of the files..." +# Get the list of packages and the checksums from the server. +if [[ ${debian} == "yes" ]]; then + wget -q -O - "${url}/binary-ppc64el/ ${url}/binary-i386/" \ + | grep deb | awk -F'[/"]' '{print $16}' > ${tmp_file} + wget -q -O ${checksums_file} "${url}/binary-ppc64el/Packages \ + ${url}/binary-i386/Packages" +else + wget -q -O - ${url} | grep rpm | awk -F'[/"]' '{print $13}' \ + > ${tmp_file} + wget -q -O ${checksums_file} ${url}/MD5SUMS +fi + +files=$( cat ${tmp_file} | grep ${at_major}-${at_minor} ) +for file in ${files}; do + checksum=$( md5sum ${file} | awk '{print $1}' ) + cat ${checksums_file} | grep ${checksum} > /dev/null 2>&1 + if [[ $? -ne 0 ]]; then + echo "File ${file} corrupted!" + clean_exit 1 + fi +done +echo "All files are good." +popd + +echo "Advance Toolchain successfully downloaded!" + +# Create ISO image if requested +if [ $MAKEISO == true ]; then + # Create the checksums + pushd ${output}/${tmpdir} + md5sum *.{rpm,deb} > MD5SUMS 2> /dev/null + sha1sum *.{rpm,deb} > SHA1SUMS 2> /dev/null + sha256sum *.{rpm,deb} > SHA256SUMS 2> /dev/null + popd + # Create the ISO image + pushd ${output} + mkisofs -iso-level 4 -o $ISOFILE ${tmpdir}/ + retcode=$? + if [ ${retcode} == 0 ]; then + echo "ISO file ($ISOFILE) successfully created." + else + echo "ISO file ($ISOFILE) could not be created. Aborting." + clean_exit 1 + fi + popd +fi + +clean_exit 0 diff --git a/utils/at_downloader/epl-1.0.txt b/utils/at_downloader/epl-1.0.txt new file mode 100644 index 000000000..2aa9b989e --- /dev/null +++ b/utils/at_downloader/epl-1.0.txt @@ -0,0 +1,86 @@ +Eclipse Public License - v 1.0 + +THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. + +1. DEFINITIONS + +"Contribution" means: + +a) in the case of the initial Contributor, the initial code and documentation distributed under this Agreement, and +b) in the case of each subsequent Contributor: + +i) changes to the Program, and + +ii) additions to the Program; + +where such changes and/or additions to the Program originate from and are distributed by that particular Contributor. A Contribution 'originates' from a Contributor if it was added to the Program by such Contributor itself or anyone acting on such Contributor's behalf. Contributions do not include additions to the Program which: (i) are separate modules of software distributed in conjunction with the Program under their own license agreement, and (ii) are not derivative works of the Program. + +"Contributor" means any person or entity that distributes the Program. + +"Licensed Patents " mean patent claims licensable by a Contributor which are necessarily infringed by the use or sale of its Contribution alone or when combined with the Program. + +"Program" means the Contributions distributed in accordance with this Agreement. + +"Recipient" means anyone who receives the Program under this Agreement, including all Contributors. + +2. GRANT OF RIGHTS + +a) Subject to the terms of this Agreement, each Contributor hereby grants Recipient a non-exclusive, worldwide, royalty-free copyright license to reproduce, prepare derivative works of, publicly display, publicly perform, distribute and sublicense the Contribution of such Contributor, if any, and such derivative works, in source code and object code form. + +b) Subject to the terms of this Agreement, each Contributor hereby grants Recipient a non-exclusive, worldwide, royalty-free patent license under Licensed Patents to make, use, sell, offer to sell, import and otherwise transfer the Contribution of such Contributor, if any, in source code and object code form. This patent license shall apply to the combination of the Contribution and the Program if, at the time the Contribution is added by the Contributor, such addition of the Contribution causes such combination to be covered by the Licensed Patents. The patent license shall not apply to any other combinations which include the Contribution. No hardware per se is licensed hereunder. + +c) Recipient understands that although each Contributor grants the licenses to its Contributions set forth herein, no assurances are provided by any Contributor that the Program does not infringe the patent or other intellectual property rights of any other entity. Each Contributor disclaims any liability to Recipient for claims brought by any other entity based on infringement of intellectual property rights or otherwise. As a condition to exercising the rights and licenses granted hereunder, each Recipient hereby assumes sole responsibility to secure any other intellectual property rights needed, if any. For example, if a third party patent license is required to allow Recipient to distribute the Program, it is Recipient's responsibility to acquire that license before distributing the Program. + +d) Each Contributor represents that to its knowledge it has sufficient copyright rights in its Contribution, if any, to grant the copyright license set forth in this Agreement. + +3. REQUIREMENTS + +A Contributor may choose to distribute the Program in object code form under its own license agreement, provided that: + +a) it complies with the terms and conditions of this Agreement; and + +b) its license agreement: + +i) effectively disclaims on behalf of all Contributors all warranties and conditions, express and implied, including warranties or conditions of title and non-infringement, and implied warranties or conditions of merchantability and fitness for a particular purpose; + +ii) effectively excludes on behalf of all Contributors all liability for damages, including direct, indirect, special, incidental and consequential damages, such as lost profits; + +iii) states that any provisions which differ from this Agreement are offered by that Contributor alone and not by any other party; and + +iv) states that source code for the Program is available from such Contributor, and informs licensees how to obtain it in a reasonable manner on or through a medium customarily used for software exchange. + +When the Program is made available in source code form: + +a) it must be made available under this Agreement; and + +b) a copy of this Agreement must be included with each copy of the Program. + +Contributors may not remove or alter any copyright notices contained within the Program. + +Each Contributor must identify itself as the originator of its Contribution, if any, in a manner that reasonably allows subsequent Recipients to identify the originator of the Contribution. + +4. COMMERCIAL DISTRIBUTION + +Commercial distributors of software may accept certain responsibilities with respect to end users, business partners and the like. While this license is intended to facilitate the commercial use of the Program, the Contributor who includes the Program in a commercial product offering should do so in a manner which does not create potential liability for other Contributors. Therefore, if a Contributor includes the Program in a commercial product offering, such Contributor ("Commercial Contributor") hereby agrees to defend and indemnify every other Contributor ("Indemnified Contributor") against any losses, damages and costs (collectively "Losses") arising from claims, lawsuits and other legal actions brought by a third party against the Indemnified Contributor to the extent caused by the acts or omissions of such Commercial Contributor in connection with its distribution of the Program in a commercial product offering. The obligations in this section do not apply to any claims or Losses relating to any actual or alleged intellectual property infringement. In order to qualify, an Indemnified Contributor must: a) promptly notify the Commercial Contributor in writing of such claim, and b) allow the Commercial Contributor to control, and cooperate with the Commercial Contributor in, the defense and any related settlement negotiations. The Indemnified Contributor may participate in any such claim at its own expense. + +For example, a Contributor might include the Program in a commercial product offering, Product X. That Contributor is then a Commercial Contributor. If that Commercial Contributor then makes performance claims, or offers warranties related to Product X, those performance claims and warranties are such Commercial Contributor's responsibility alone. Under this section, the Commercial Contributor would have to defend claims against the other Contributors related to those performance claims and warranties, and if a court requires any other Contributor to pay any damages as a result, the Commercial Contributor must pay those damages. + +5. NO WARRANTY + +EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely responsible for determining the appropriateness of using and distributing the Program and assumes all risks associated with its exercise of rights under this Agreement , including but not limited to the risks and costs of program errors, compliance with applicable laws, damage to or loss of data, programs or equipment, and unavailability or interruption of operations. + +6. DISCLAIMER OF LIABILITY + +EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + +7. GENERAL + +If any provision of this Agreement is invalid or unenforceable under applicable law, it shall not affect the validity or enforceability of the remainder of the terms of this Agreement, and without further action by the parties hereto, such provision shall be reformed to the minimum extent necessary to make such provision valid and enforceable. + +If Recipient institutes patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Program itself (excluding combinations of the Program with other software or hardware) infringes such Recipient's patent(s), then such Recipient's rights granted under Section 2(b) shall terminate as of the date such litigation is filed. + +All Recipient's rights under this Agreement shall terminate if it fails to comply with any of the material terms or conditions of this Agreement and does not cure such failure in a reasonable period of time after becoming aware of such noncompliance. If all Recipient's rights under this Agreement terminate, Recipient agrees to cease use and distribution of the Program as soon as reasonably practicable. However, Recipient's obligations under this Agreement and any licenses granted by Recipient relating to the Program shall continue and survive. + +Everyone is permitted to copy and distribute copies of this Agreement, but in order to avoid inconsistency the Agreement is copyrighted and may only be modified in the following manner. The Agreement Steward reserves the right to publish new versions (including revisions) of this Agreement from time to time. No one other than the Agreement Steward has the right to modify this Agreement. The Eclipse Foundation is the initial Agreement Steward. The Eclipse Foundation may assign the responsibility to serve as the Agreement Steward to a suitable separate entity. Each new version of the Agreement will be given a distinguishing version number. The Program (including Contributions) may always be distributed subject to the version of the Agreement under which it was received. In addition, after a new version of the Agreement is published, Contributor may elect to distribute the Program (including its Contributions) under the new version. Except as expressly stated in Sections 2(a) and 2(b) above, Recipient receives no rights or licenses to the intellectual property of any Contributor under this Agreement, whether expressly, by implication, estoppel or otherwise. All rights in the Program not expressly granted under this Agreement are reserved. + +This Agreement is governed by the laws of the State of New York and the intellectual property laws of the United States of America. No party to this Agreement will bring a legal action under this Agreement more than one year after the cause of action arose. Each party waives its rights to a jury trial in any resulting litigation. diff --git a/utils/lsb_release b/utils/lsb_release new file mode 100755 index 000000000..0c5293a90 --- /dev/null +++ b/utils/lsb_release @@ -0,0 +1,44 @@ +#!/bin/bash +# +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# Minimal lsb_release that is able to provide the functionality required by +# the AT build framework. +# It was developed as workaround in a distro that didn't have lsb_release +# working by the time we started using it. + +REL_F="/etc/*release" + +dist_id () +{ + echo -ne "Distributor ID:\t" + grep "^NAME=" ${REL_F} | sed 's/^.*=\(.*\)$/\1/' +} + +release () +{ + echo -ne "Release:\t" + grep "^VERSION_ID=" ${REL_F} | sed 's/^.*=\(.*\)$/\1/' +} + +case ${1} in + "-i") + dist_id + ;; + "-r") + release + ;; +esac diff --git a/utils/mk-ubuntu-pkg.sh b/utils/mk-ubuntu-pkg.sh new file mode 100755 index 000000000..3ff217a84 --- /dev/null +++ b/utils/mk-ubuntu-pkg.sh @@ -0,0 +1,91 @@ +#!/bin/bash +# +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# Convert AT cross-compiler RPMs to DEB. + +usage () +{ +cat < + $1 - RPM package being converted to deb +EOF +} + +if [[ ! -f "${1}" ]]; then + echo "Can't find ${1}" + usage + exit 1 +fi + +# Some commands executed here only work as root +if [[ "$(whoami)" != "root" ]]; then + echo "You must execute this script as root." + exit 1 +fi + +arch=$(rpm -qi -p ${1} | awk '/Architecture:/ { print $2 }') +dirname=$(basename "${1}" | sed "s/\(.*\)-[0-9].*\.${arch}\.rpm/\1/") + +set -ex + +{ + alien -c -k -g "${1}" + + pushd ${dirname} > /dev/null + + name=$(sed '/^Description:/!d;s/^Description: //' debian/control) + version=$(head -n 1 debian/changelog | sed 's/^.* (\([^)]*\)) .*$/\1/') + + # Prepare control file + cp debian/control debian/control.orig + grep -v "Converted from" debian/control \ + | grep -Ev -Ev "^ \.$" \ + > debian/control.2 + # Make this package able to install both on i386 and x86_64 + echo "Multi-Arch: foreign" >> debian/control.2 + sed -e "s/\(Maintainer: \).*/\1${name}/" \ + -e "s/\(Section: \).*/\1devel/" \ + -e "s/\(Depends: \).*/\1libc6 (>= 2.15), zlib1g (>= 1.2.3), libstdc++6 (>= 4.6.3), libncurses5 (>= 5.9), libtinfo5 (>= 5.9)/" \ + debian/control.2 > debian/control + rm debian/control.2 + + # Prepare copyright file + cp debian/copyright debian/copyright.orig + cat < debian/copyright +Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +License: GPL, LGPL +EOF + + # Remove erroneous content from the changelog file + # TODO: Add a proper content based on what we add to the release notes. + cp debian/changelog debian/changelog.orig + sed -e "s/^ \* .*$/ * Release of ${name} ${version}/" \ + -e "s/^ -- .* / -- ${name} /" \ + debian/changelog > debian/changelog.2 + mv debian/changelog.2 debian/changelog + + # Avoid the forced removal of /opt/at7.0. Doing so may cause a bug + # while updating the package. + rm -f debian/postrm + + # Build deb package + debian/rules binary + + popd > /dev/null +} 2>&1 | tee _$(basename ${0}).log + +set +ex diff --git a/utils/repo.sh b/utils/repo.sh new file mode 100755 index 000000000..9e7620e22 --- /dev/null +++ b/utils/repo.sh @@ -0,0 +1,314 @@ +#!/bin/bash +# +# Copyright 2017 IBM Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# Script used to manipulate AT repository mirroring + +# List of files/directories/links deleted in the last build +RM_FILES=${RM_FILES:-./delete-files} +# List of files/directories/links added or modified in the last build +NEW_FILES=${NEW_FILES:-./new-files} + +# Don't run this script as root +# Run it as a user of the toolchain group' +if [[ "$(whoami)" == "root" ]]; then + echo "Never run this script as root!" >&2 + exit 1 +fi + +usage () +{ + cat < + +Hint: repo1 is the place where the AT team work. + repo2 is the place where the OSS team work. + +List of commands: + clone Clone (or update) repo2 into repo1. + + diff List the differences to make repo2 a clone of + repo1. Creates the lists of files required by + push. + + pack Create the tarball ticket.tar.gz which is ready + for ticket submission + + push Push the differences from repo1 to repo2. + Requires the output of diff in order to work. + + set_perms Set the correct permission and ownership of + files and directories of repo1. + This command is restricted to /export/repo/ for + safety reasons. + + verify Verify the integrity of an external repository. + This is normally used in order to verify the + contents of the staging area (ftp). + is the base path of the repository. +EOF +} + +# Verify if NEW_FILES and RM_FILES are available. Fail if they aren't'. +check_files () +{ + if [[ ! -e ${NEW_FILES} || ! -e ${RM_FILES} ]]; then + cat >&2 <&2 + exit 1 + fi + + set -e + echo "Setting ownership recursively for \"${1}\"" + sudo chown -R ${OWNER} "${1}" + + for DIR in $(find "${1}" -type d -print); do + sudo chmod ${DPERMS} "${DIR}" + done + + for FILE in $(find "${1}" -type f -print); do + sudo chmod ${FPERMS} "${FILE}" + done + set +e +} + +clone () +{ + rsync -crlz --delete-after -v "${2}" "${1}" + # Make sure everything has the correct permissions + set_perms "${1}" +} + +diff () +{ + # Fix permissions when running as a toolchain user + # This is done automatically in order to make sure everything is fine + # prior to open the ticket + groups | grep "toolchain" > /dev/null + if [[ ${?} -eq 0 ]]; then + set_perms "${1}" + fi + + # As the AT team has read only access to the rsync server, it's + # necessary' to invert the order of the parameters (using --dry-run + # doesn't help'), which inverts the logic of the comparison. + # So, if rsync returns a new file it means this file was removed by + # the last build. All the other files are considered new or modified + # files. + RM_REGEX='^[<>c][fdL]\+\+\+\+\+\+\+\+\+' + rsync -crl --delete -ni ${2} ${1} | tee files + egrep -v ${RM_REGEX} files | awk '{ print $2 }' | sort \ + > ${NEW_FILES} + awk "/${RM_REGEX}/ {print \"/\" \$2}" files | sort > ${RM_FILES} + rm files + + if [[ -n "${1}" ]]; then + create_checksum_file "${1}" + else + touch MD5SUMS + fi +} + +push () +{ + check_files + rsync -crlzv --files-from=${NEW_FILES} ${1} ${2} + + # Manually remove the files + prevdir=$(pwd) + set -x + pushd ${2} > /dev/null + echo "Removing the following files..." + cat ${prevdir}/${RM_FILES} + cat ${prevdir}/${RM_FILES} | sed 's/^/\./g' | xargs rm -rfv + popd > /dev/null + set +x +} + +# Create a tarball with NEW_FILES and RM_FILES. This tarball is used by the +# OSS team as an input. +pack () +{ + if [[ ! -e ${NEW_FILES} || ! -e ${RM_FILES} ]]; then + cat >&2 < /dev/null + + newf_l="" + # Create the MD5SUMS for files only. + for newf in $(cat ${dir}/${NEW_FILES}); do + if [[ -f ${newf} ]]; then + newf_l="${newf_l} ${newf}" + fi + done + if [[ -n "${newf_l}" ]]; then + md5sum ${newf_l} > ${dir}/MD5SUMS + fi + + popd > /dev/null + set +e +} + +# Verify the integrity of the new files in a remote repository and confirm if +# files have been properly removed +verify () +{ + check_files + + if [[ ! -e MD5SUMS ]]; then + cat >&2 <&1) + if [[ ${?} -eq 0 ]]; then + echo "File ${st_area}/${file} is still available" + err=1 + elif ! echo ${msg} | grep "No such" > /dev/null; then + echo "Failed to verify ${st_area}/${file}: ${msg}" + echo " Aborting..." + exit 1 + fi + done + + mkdir -p base/ + echo "Downloading new files..." + for file in $(cat ${NEW_FILES}); do + # Need to create the directory structure for each file in order + # to guarantee MD5SUMS will work. + if ! mkdir -p base/$(dirname ${file}); then + echo "Error: failed to create directory base/$(dirname ${file})" + return 1 + fi + # Avoid downloading directories. + if [[ "${file:${#file}-1}" != "/" ]] && \ + ! wget -q -O base/${file} ${st_area}/${file}; then + echo "Error: failed to download ${st_area}/${file}" + err=1 + fi + # Create a progress bar + echo -n "." + done + # End the progress bar + echo + + if [[ "${err}" -ne "0" ]]; then + return ${err} + fi + + echo "Verifying integrity..." + set -e + pushd base/ > /dev/null + md5sum --quiet -c ../MD5SUMS + popd > /dev/null + set +e + + if [[ "${err}" -eq "0" ]]; then + echo "The repository passed the integrity test!" + fi + + return ${err} +} + +case "${1}" in + clone|diff|push) + if [[ ${#} -ne 3 ]]; then + usage >&2 + exit 1 + fi + ${1} "${2}" "${3}" + ;; + set_perms|verify) + if [[ ${#} -ne 2 ]]; then + usage >&2 + exit 1 + fi + ${1} "${2}" || exit ${?} + ;; + pack) + if [[ ${#} -ne 1 ]]; then + usage >&2 + exit 1 + fi + ${1} + ;; + *) + usage >&2 + exit 1 + ;; +esac