Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enabling a new DevKit build job and support use within pipeline configuration #955

Merged
merged 134 commits into from
Mar 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
134 commits
Select commit Hold shift + click to select a range
95365ba
Build a linux devkit
andrew-m-leonard Feb 29, 2024
2da1789
Build a linux devkit
andrew-m-leonard Feb 29, 2024
b96573d
Build a linux devkit
andrew-m-leonard Feb 29, 2024
68c6755
Build a linux devkit
andrew-m-leonard Feb 29, 2024
ae010b7
Build a linux devkit
andrew-m-leonard Feb 29, 2024
34dc838
Build a linux devkit
andrew-m-leonard Feb 29, 2024
44dcb82
Build a linux devkit
andrew-m-leonard Feb 29, 2024
cdad0a1
Build a linux devkit
andrew-m-leonard Feb 29, 2024
505787e
Build a linux devkit
andrew-m-leonard Feb 29, 2024
e7a8736
Build a linux devkit
andrew-m-leonard Mar 1, 2024
d6eeee5
Build a linux devkit
andrew-m-leonard Mar 1, 2024
c7b210d
Build a linux devkit
andrew-m-leonard Mar 1, 2024
f20f38c
Build a linux devkit
andrew-m-leonard Mar 1, 2024
5de6620
Build a linux devkit
andrew-m-leonard Mar 1, 2024
614a624
Build a linux devkit
andrew-m-leonard Mar 1, 2024
6a88711
Build a linux devkit
andrew-m-leonard Mar 1, 2024
6cfc211
Build a linux devkit
andrew-m-leonard Mar 1, 2024
ddb5e6b
Build a linux devkit
andrew-m-leonard Mar 1, 2024
e25021e
Build a linux devkit
andrew-m-leonard Mar 1, 2024
29140b3
Build a linux devkit
andrew-m-leonard Mar 1, 2024
6b495b0
Build a linux devkit
andrew-m-leonard Mar 1, 2024
69a102c
Build a linux devkit
andrew-m-leonard Mar 1, 2024
b7fa936
Build a linux devkit
andrew-m-leonard Mar 4, 2024
2786d81
Merge remote-tracking branch 'origin/master' into devkit_job
andrew-m-leonard Mar 4, 2024
68c3d59
Build a linux devkit
andrew-m-leonard Mar 4, 2024
f34b852
Build a linux devkit
andrew-m-leonard Mar 4, 2024
fb882c9
Build a linux devkit
andrew-m-leonard Mar 4, 2024
8b03d03
Build a linux devkit
andrew-m-leonard Mar 4, 2024
49ca061
Build a linux devkit
andrew-m-leonard Mar 4, 2024
f1212f4
Build a linux devkit
andrew-m-leonard Mar 4, 2024
e6c3b61
Build a linux devkit
andrew-m-leonard Mar 4, 2024
02d1ff5
Build a linux devkit
andrew-m-leonard Mar 4, 2024
7ed9e8b
Build a linux devkit
andrew-m-leonard Mar 4, 2024
e65fddb
Build a linux devkit
andrew-m-leonard Mar 4, 2024
8d0d90b
Build a linux devkit
andrew-m-leonard Mar 4, 2024
b0da660
Build a linux devkit
andrew-m-leonard Mar 4, 2024
ee335fd
Build a linux devkit
andrew-m-leonard Mar 4, 2024
55b335c
Build a linux devkit
andrew-m-leonard Mar 4, 2024
6c9b2d3
Build a linux devkit
andrew-m-leonard Mar 4, 2024
69f5c04
Build a linux devkit
andrew-m-leonard Mar 4, 2024
ff31bbc
Build a linux devkit
andrew-m-leonard Mar 4, 2024
e74f17b
Build a linux devkit
andrew-m-leonard Mar 4, 2024
e5c7c13
Build a linux devkit
andrew-m-leonard Mar 4, 2024
46bc8f1
Build a linux devkit
andrew-m-leonard Mar 4, 2024
908b042
Build a linux devkit
andrew-m-leonard Mar 4, 2024
92f4528
Build a linux devkit
andrew-m-leonard Mar 4, 2024
0097b6a
Build a linux devkit
andrew-m-leonard Mar 4, 2024
1f945fe
Build a linux devkit
andrew-m-leonard Mar 4, 2024
44e2e26
Build a linux devkit
andrew-m-leonard Mar 4, 2024
44926d6
Build a linux devkit
andrew-m-leonard Mar 4, 2024
8e6ea4a
Build a linux devkit
andrew-m-leonard Mar 4, 2024
8ab679b
Build a linux devkit
andrew-m-leonard Mar 4, 2024
fd88923
Build a linux devkit
andrew-m-leonard Mar 4, 2024
3a5c1f3
Build a linux devkit
andrew-m-leonard Mar 4, 2024
a1f75c7
Build a linux devkit
andrew-m-leonard Mar 4, 2024
7db8010
Build a linux devkit
andrew-m-leonard Mar 4, 2024
a671e52
Build a linux devkit
andrew-m-leonard Mar 4, 2024
acf8291
Build a linux devkit
andrew-m-leonard Mar 4, 2024
a297292
Build a linux devkit
andrew-m-leonard Mar 4, 2024
36e75f4
Build a linux devkit
andrew-m-leonard Mar 4, 2024
9612619
Build a linux devkit
andrew-m-leonard Mar 4, 2024
6aaffad
Build a linux devkit
andrew-m-leonard Mar 4, 2024
a9c1648
Build a linux devkit
andrew-m-leonard Mar 4, 2024
d2b22ef
Build a linux devkit
andrew-m-leonard Mar 4, 2024
0446788
Build a linux devkit
andrew-m-leonard Mar 4, 2024
8208414
Build a linux devkit
andrew-m-leonard Mar 4, 2024
24260a0
Build a linux devkit
andrew-m-leonard Mar 4, 2024
e2426eb
Build a linux devkit
andrew-m-leonard Mar 4, 2024
141277a
Build a linux devkit
andrew-m-leonard Mar 4, 2024
f43b7fa
Build using a linux devkit
andrew-m-leonard Mar 4, 2024
4710770
Build using a linux devkit
andrew-m-leonard Mar 4, 2024
6cf6aef
Build using a linux devkit
andrew-m-leonard Mar 5, 2024
1ac72e7
Build using a linux devkit
andrew-m-leonard Mar 5, 2024
0c01084
Build using a linux devkit
andrew-m-leonard Mar 7, 2024
3e01477
Build using a linux devkit
andrew-m-leonard Mar 7, 2024
826e969
Merge remote-tracking branch 'origin/master' into devkit_job
andrew-m-leonard Mar 8, 2024
0461008
Build using a linux devkit
andrew-m-leonard Mar 8, 2024
7ecdc19
Build using a linux devkit
andrew-m-leonard Mar 8, 2024
eb54726
Build using a linux devkit
andrew-m-leonard Mar 8, 2024
7d6afe4
Build using a linux devkit
andrew-m-leonard Mar 8, 2024
75e26fa
Build using a linux devkit
andrew-m-leonard Mar 8, 2024
7121207
Build using a linux devkit
andrew-m-leonard Mar 8, 2024
b18b4fe
Build using a linux devkit
andrew-m-leonard Mar 8, 2024
2b4d02a
Build using a linux devkit
andrew-m-leonard Mar 8, 2024
c85e94e
Build using a linux devkit
andrew-m-leonard Mar 8, 2024
8859163
Merge remote-tracking branch 'origin/master' into devkit_job
andrew-m-leonard Mar 13, 2024
308bd50
Build using a linux devkit
andrew-m-leonard Mar 13, 2024
eac5510
Build using a linux devkit
andrew-m-leonard Mar 13, 2024
a99bcbb
Build using a linux devkit
andrew-m-leonard Mar 13, 2024
daceb43
Merge remote-tracking branch 'origin/master' into devkit_job
andrew-m-leonard Mar 13, 2024
635ca9b
Build using a linux devkit
andrew-m-leonard Mar 13, 2024
c8871d5
Build using a linux devkit
andrew-m-leonard Mar 13, 2024
3b99046
Build using a linux devkit
andrew-m-leonard Mar 14, 2024
36e52d1
Build using a linux devkit
andrew-m-leonard Mar 14, 2024
ad26cee
Build using a linux devkit
andrew-m-leonard Mar 14, 2024
48bdf76
Build using a linux devkit
andrew-m-leonard Mar 14, 2024
fe1f01a
Build a linux devkit
andrew-m-leonard Mar 14, 2024
5728a97
Build a linux devkit
andrew-m-leonard Mar 14, 2024
614a853
Build a linux devkit
andrew-m-leonard Mar 14, 2024
8893e07
Build a linux devkit
andrew-m-leonard Mar 15, 2024
5d5631d
Merge remote-tracking branch 'origin/master' into devkit_job
andrew-m-leonard Mar 18, 2024
815b752
Build a linux devkiti using gpg verifying downloads
andrew-m-leonard Mar 18, 2024
ca472dd
Build a linux devkiti using gpg verifying downloads
andrew-m-leonard Mar 18, 2024
53415c0
Build a linux devkit
andrew-m-leonard Mar 18, 2024
047e096
Build a linux devkit
andrew-m-leonard Mar 18, 2024
fda7ddc
Build a linux devkit
andrew-m-leonard Mar 18, 2024
5bb1015
Build a linux devkit
andrew-m-leonard Mar 18, 2024
79d0a91
Build a linux devkit
andrew-m-leonard Mar 19, 2024
5d232b2
Merge remote-tracking branch 'origin/master' into devkit_job
andrew-m-leonard Mar 19, 2024
cc5b065
Build a linux devkit Tools.gmk patch
andrew-m-leonard Mar 21, 2024
f01caec
Merge branch 'master' into devkit_job
karianna Mar 22, 2024
11db121
Build a linux devkit Tools.gmk patch
andrew-m-leonard Mar 22, 2024
1c87649
Merge remote-tracking branch 'refs/remotes/origin/master' into devkit…
andrew-m-leonard Mar 22, 2024
37c03ab
Merge remote-tracking branch 'andrewleonard/devkit_job' into devkit_job
andrew-m-leonard Mar 22, 2024
e0f7953
Build a linux devkit Tools.gmk patch
andrew-m-leonard Mar 22, 2024
9fea076
Build a linux devkit Tools.gmk patch
andrew-m-leonard Mar 22, 2024
235d08e
Build a linux devkit Tools.gmk patch
andrew-m-leonard Mar 25, 2024
464ef3f
Build a linux devkit Tools.gmk patch
andrew-m-leonard Mar 25, 2024
ad57fd7
Build a linux devkit Tools.gmk patch
andrew-m-leonard Mar 25, 2024
549235a
Build a linux devkit
andrew-m-leonard Mar 25, 2024
ad78c0a
Build a linux devkit
andrew-m-leonard Mar 25, 2024
9f88db3
Build a linux devkit
andrew-m-leonard Mar 25, 2024
9847486
Build a linux devkit
andrew-m-leonard Mar 25, 2024
0295d8c
Build a linux devkit
andrew-m-leonard Mar 25, 2024
18bcf35
Build a linux devkit
andrew-m-leonard Mar 25, 2024
3ffb21d
Build a linux devkit
andrew-m-leonard Mar 25, 2024
9e067a0
Build a linux devkit
andrew-m-leonard Mar 25, 2024
64acac9
Build a linux devkit
andrew-m-leonard Mar 26, 2024
bd6fd9d
Build a linux devkit
andrew-m-leonard Mar 26, 2024
1f2a7c0
Add s390x Fedora19 GPG key
andrew-m-leonard Mar 26, 2024
b326ba4
Add s390x Fedora19 GPG key
andrew-m-leonard Mar 26, 2024
38a15b3
Build a linux devkit
andrew-m-leonard Mar 26, 2024
76cfa20
Build a linux devkit
andrew-m-leonard Mar 27, 2024
ff5baa6
Build a linux devkit
andrew-m-leonard Mar 27, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 37 additions & 8 deletions pipelines/build/common/openjdk_build_pipeline.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ See the License for the specific language governing permissions and
limitations under the License.
*/

/* groovylint-disable MethodCount */

import common.IndividualBuildConfig
import common.MetaData
import common.VersionInfo
Expand Down Expand Up @@ -1482,6 +1484,15 @@ class Build {
context.println ' buildConfig.BUILD_REF: ' + buildConfig.BUILD_REF
context.println ' buildConfig.HELPER_REF: ' + buildConfig.HELPER_REF

def openjdk_build_dir = context.WORKSPACE + '/workspace/build/src/build'
def openjdk_build_dir_arg = ""
if (getJavaVersionNumber() >= 21) {
// For reproducible jdk-21+ builds ensure not to build within the openjdk source folder
// so that debug symbols can be reproducibly mapped (https://bugs.openjdk.org/browse/JDK-8326685)
openjdk_build_dir = context.WORKSPACE + '/workspace/build/openjdkbuild'
openjdk_build_dir_arg = " --user-openjdk-build-root-directory ${openjdk_build_dir}"
}

if (cleanWorkspace) {
try {
try {
Expand Down Expand Up @@ -1562,9 +1573,9 @@ class Build {
context.println "Processing exploded build, sign JMODS, and assemble build, for platform ${buildConfig.TARGET_OS} version ${buildConfig.JAVA_TO_BUILD}"
def signBuildArgs
if (env.BUILD_ARGS != null && !env.BUILD_ARGS.isEmpty()) {
signBuildArgs = env.BUILD_ARGS + ' --make-exploded-image'
signBuildArgs = env.BUILD_ARGS + ' --make-exploded-image' + openjdk_build_dir_arg
} else {
signBuildArgs = '--make-exploded-image'
signBuildArgs = '--make-exploded-image' + openjdk_build_dir_arg
}
context.withEnv(['BUILD_ARGS=' + signBuildArgs]) {
context.println 'Building an exploded image for signing'
Expand Down Expand Up @@ -1675,16 +1686,24 @@ class Build {

def assembleBuildArgs
if (env.BUILD_ARGS != null && !env.BUILD_ARGS.isEmpty()) {
assembleBuildArgs = env.BUILD_ARGS + ' --assemble-exploded-image'
assembleBuildArgs = env.BUILD_ARGS + ' --assemble-exploded-image' + openjdk_build_dir_arg
} else {
assembleBuildArgs = '--assemble-exploded-image'
assembleBuildArgs = '--assemble-exploded-image' + openjdk_build_dir_arg
}
context.withEnv(['BUILD_ARGS=' + assembleBuildArgs]) {
context.println 'Assembling the exploded image'
context.sh(script: "./${ADOPT_DEFAULTS_JSON['scriptDirectories']['buildfarm']}")
}
} else {
context.sh(script: "./${ADOPT_DEFAULTS_JSON['scriptDirectories']['buildfarm']}")
def buildArgs
if (env.BUILD_ARGS != null && !env.BUILD_ARGS.isEmpty()) {
buildArgs = env.BUILD_ARGS + openjdk_build_dir_arg
} else {
buildArgs = openjdk_build_dir_arg
}
context.withEnv(['BUILD_ARGS=' + buildArgs]) {
context.sh(script: "./${ADOPT_DEFAULTS_JSON['scriptDirectories']['buildfarm']}")
}
}
context.println '[CHECKOUT] Reverting pre-build adoptium/temurin-build checkout...'
// Special case for the pr tester as checking out to the user's pipelines doesn't play nicely
Expand All @@ -1700,7 +1719,15 @@ class Build {
repoHandler.setUserDefaultsJson(context, DEFAULTS_JSON)
repoHandler.checkoutUserBuild(context)
printGitRepoInfo()
context.sh(script: "./${DEFAULTS_JSON['scriptDirectories']['buildfarm']}")
def buildArgs
if (env.BUILD_ARGS != null && !env.BUILD_ARGS.isEmpty()) {
buildArgs = env.BUILD_ARGS + openjdk_build_dir_arg
} else {
buildArgs = openjdk_build_dir_arg
}
context.withEnv(['BUILD_ARGS=' + buildArgs]) {
context.sh(script: "./${DEFAULTS_JSON['scriptDirectories']['buildfarm']}")
}
context.println '[CHECKOUT] Reverting pre-build user temurin-build checkout...'
repoHandler.checkoutUserPipelines(context)
printGitRepoInfo()
Expand Down Expand Up @@ -1766,10 +1793,12 @@ class Build {
context.println "Failed to clean ${e}"
}
} else if (cleanWorkspaceBuildOutputAfter) {
context.println 'Cleaning workspace build output files: ' + context.WORKSPACE + '/workspace/build/src/build'
context.sh(script: 'rm -rf ' + context.WORKSPACE + '/workspace/build/src/build')
context.println 'Cleaning workspace build output files: ' + openjdk_build_dir
context.sh(script: 'rm -rf ' + openjdk_build_dir)
context.println 'Cleaning workspace build output files: ' + context.WORKSPACE + '/workspace/target'
context.sh(script: 'rm -rf ' + context.WORKSPACE + '/workspace/target')
context.println 'Cleaning workspace build output files: ' + context.WORKSPACE + '/workspace/build/devkit'
context.sh(script: 'rm -rf ' + context.WORKSPACE + '/workspace/build/devkit')
}
} else {
context.println 'Warning: Unable to clean workspace as context.WORKSPACE is null/empty'
Expand Down
141 changes: 141 additions & 0 deletions pipelines/build/devkit/Tools.gmk.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,141 @@
diff --git a/make/devkit/Tools.gmk b/make/devkit/Tools.gmk
index 187320ca2..9f1454d5e 100644
--- a/make/devkit/Tools.gmk
+++ b/make/devkit/Tools.gmk
@@ -62,6 +62,23 @@ ifeq ($(BASE_OS), OL)
BASE_URL := http://yum.oracle.com/repo/OracleLinux/OL6/4/base/$(ARCH)/
LINUX_VERSION := OL6.4
endif
+else ifeq ($(BASE_OS), Centos)
+ DEFAULT_OS_VERSION := 7
+ ifeq ($(BASE_OS_VERSION), )
+ BASE_OS_VERSION := $(DEFAULT_OS_VERSION)
+ endif
+ BASE_OS_MAJOR_VERSION := $(shell echo $(BASE_OS_VERSION) | cut -d'.' -f1)
+ ifeq ($(BASE_OS_VERSION),7.9.2009)
+ CENTOS_MIRROR := mirror.centos.org
+ else
+ CENTOS_MIRROR := vault.centos.org
+ endif
+ ifeq ($(ARCH), x86_64)
+ BASE_URL := http://$(CENTOS_MIRROR)/centos/$(BASE_OS_VERSION)/os/$(ARCH)/Packages/
+ else
+ BASE_URL := http://$(CENTOS_MIRROR)/altarch/$(BASE_OS_VERSION)/os/$(ARCH)/Packages/
+ endif
+ LINUX_VERSION := Centos$(BASE_OS_VERSION)
else ifeq ($(BASE_OS), Fedora)
ifeq ($(ARCH), riscv64)
DEFAULT_OS_VERSION := rawhide/68692
@@ -87,6 +104,7 @@ else ifeq ($(BASE_OS), Fedora)
BASE_URL := https://archives.fedoraproject.org/pub/archive/$(FEDORA_TYPE)/releases/$(BASE_OS_VERSION)/Everything/$(ARCH)/os/Packages/
endif
endif
+ BASE_OS_MAJOR_VERSION := $(shell echo $(BASE_OS_VERSION) | cut -d'.' -f1)
LINUX_VERSION := Fedora_$(BASE_OS_VERSION)
else
$(error Unknown base OS $(BASE_OS))
@@ -95,16 +113,38 @@ endif
##########################################################################################
# Define external dependencies

+# Centos GPG KEYS
+Centos_7_GPG_KEY_aarch64 := EF8F3CA66EFDF32B36CDADF76C7CB6EF305D49D6 #gitleaks:allow
+Centos_7_GPG_KEY_x86_64 := 6341AB2753D78A78A7C27BB124C6A8A7F4A80EB5 #gitleaks:allow
+Centos_7_GPG_KEY_ppc64le := BAFA3436FC50768E3C3C2E4EA963BBDBF533F4FA #gitleaks:allow
+# Fedora GPG KEYS
+Fedora_19_GPG_KEY_s390x := CA81B2C85E4F4D4A1A3F723407477E65FB4B18E6 #gitleaks:allow
+
+# PGP Signature file extensions
+GCC_SIG := sig
+BINUTILS_SIG := sig
+CCACHE_SIG := asc
+GMP_SIG := sig
+MPC_SIG := sig
+GDB_SIG := sig
+
# Latest that could be made to work.
GCC_VER := 11.3.0
ifeq ($(GCC_VER), 11.3.0)
gcc_ver := gcc-11.3.0
+ GCC_GPG_KEY := 7F74F97C103468EE5D750B583AB00996FC26A641 #gitleaks:allow
binutils_ver := binutils-2.39
+ BINUTILS_GPG_KEY := 3A24BC1E8FB409FA9F14371813FCEF89DD9E3C4F #gitleaks:allow
ccache_ver := ccache-3.7.12
+ CCACHE_GPG_KEY := 5A939A71A46792CF57866A51996DDA075594ADB8 #gitleaks:allow
mpfr_ver := mpfr-4.1.1
+ MPFR_SHA256 := 85fdf11614cc08e3545386d6b9c8c9035e3db1e506211a45f4e108117fe3c951 #gitleaks:allow
gmp_ver := gmp-6.2.1
+ GMP_GPG_KEY := 343C2FF0FBEE5EC2EDBEF399F3599FF828C67298 #gitleaks:allow
mpc_ver := mpc-1.2.1
+ MPC_GPG_KEY := AD17A21EF8AED8F1CC02DBD9F7D5C9BF765C61E3 #gitleaks:allow
gdb_ver := gdb-11.2
+ GDB_GPG_KEY := F40ADB902B24264AA42E50BF92EDB04BFF325CF3 #gitleaks:allow
REQUIRED_MIN_MAKE_MAJOR_VERSION := 4
else ifeq ($(GCC_VER), 11.2.0)
gcc_ver := gcc-11.2.0
@@ -246,7 +286,13 @@ download-rpms:
# Only run this if rpm dir is empty.
ifeq ($(wildcard $(DOWNLOAD_RPMS)/*.rpm), )
cd $(DOWNLOAD_RPMS) && \
- wget -r -np -nd $(patsubst %, -A "*%*.rpm", $(RPM_LIST)) $(BASE_URL)
+ wget -e robots=off -r -np -nd $(patsubst %, -A "*%*.rpm", $(RPM_LIST)) $(BASE_URL)
+ gpg --keyserver keyserver.ubuntu.com --recv-keys \
+ $($(BASE_OS)_$(BASE_OS_MAJOR_VERSION)_GPG_KEY_$(ARCH))
+ rm -f $(DOWNLOAD_RPMS)/rpm.sig && gpg --armor --export \
+ $($(BASE_OS)_$(BASE_OS_MAJOR_VERSION)_GPG_KEY_$(ARCH)) > $(DOWNLOAD_RPMS)/rpm.sig
+ rpm --import $(DOWNLOAD_RPMS)/rpm.sig || true
+ rpm -K $(DOWNLOAD_RPMS)/*.rpm
endif

##########################################################################################
@@ -271,6 +317,14 @@ define Download

$$($(1)_FILE) :
wget -P $(DOWNLOAD) $$($(1))
+ ifeq ($(1),MPFR)
+ echo $($(1)_SHA256) $$@ | sha256sum -c
+ else
+ wget -P $(DOWNLOAD) $$($(1)).$($(1)_SIG)
+ gpg --keyserver keyserver.ubuntu.com --recv-keys $($(1)_GPG_KEY)
+ echo -e "5\ny\n" | gpg --batch --command-fd 0 --expert --edit-key $($(1)_GPG_KEY) trust;
+ gpg --verify $$@.$($(1)_SIG) $$@
+ endif
endef

# Download and unpack all source packages
@@ -323,6 +377,9 @@ $(foreach p,$(RPM_FILE_LIST),$(eval $(call unrpm,$(p))))
# have it anyway, but just to make sure...
# Patch libc.so and libpthread.so to force linking against libraries in sysroot
# and not the ones installed on the build machine.
+# Remove comment sections from static libraries and C runtime objects
+# to prevent leaking RHEL-specific package versions into
+# devkit-produced binaries.
$(libs) : $(rpms)
@echo Patching libc and pthreads
@(for f in `find $(SYSROOT) -name libc.so -o -name libpthread.so`; do \
@@ -332,6 +389,7 @@ $(libs) : $(rpms)
-e 's|/lib/||g' ) > $$f.tmp ; \
mv $$f.tmp $$f ; \
done)
+ @find $(SYSROOT) -name '*.[ao]' -exec objcopy --remove-section .comment '{}' ';'
@mkdir -p $(SYSROOT)/usr/lib
@touch $@

@@ -440,6 +498,9 @@ endif

# Makefile creation. Simply run configure in build dir.
# Setting CFLAGS to -O2 generates a much faster ld.
+# Use --enable-deterministic-archives so that make targets that
+# generate "ar" archives, such as "static-libs-image", produce
+# deterministic .a files.
$(bfdmakes) \
$(BUILDDIR)/$(binutils_ver)/Makefile \
: $(BINUTILS_CFG)
@@ -454,6 +515,7 @@ $(BUILDDIR)/$(binutils_ver)/Makefile \
--with-sysroot=$(SYSROOT) \
--disable-nls \
--program-prefix=$(TARGET)- \
+ --enable-deterministic-archives \
--enable-multilib \
--enable-threads \
--enable-plugins \
38 changes: 38 additions & 0 deletions pipelines/build/devkit/binutils-2.39.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
diff --git a/gprofng/Makefile.am b/gprofng/Makefile.am
index 2fcd695140ca6e3f06f3cc6844d498847a21a63d..96f8015700885e00b9e121cd61adede63c2b832e 100644 (file)
--- a/gprofng/Makefile.am
+++ b/gprofng/Makefile.am
@@ -23,11 +23,14 @@ AUTOMAKE_OPTIONS = dejagnu foreign
if BUILD_COLLECTOR
COLLECTOR_SUBDIRS = libcollector
endif
+if BUILD_MAN
+ DOC_SUBDIR = doc
+endif
if BUILD_SRC
- SRC_SUBDIRS = src gp-display-html doc
+ SRC_SUBDIRS = src gp-display-html $(DOC_SUBDIR)
endif
SUBDIRS = $(COLLECTOR_SUBDIRS) $(SRC_SUBDIRS)
-DIST_SUBDIRS = libcollector src gp-display-html doc
+DIST_SUBDIRS = libcollector src gp-display-html $(DOC_SUBDIR)

# Setup the testing framework, if you have one
EXPECT = expect
diff --git a/gprofng/Makefile.in b/gprofng/Makefile.in
index fd5279b4df13ca21061bfc833797a0bb6ada62bc..d660f99233fedef9df9cae31629cd3ba57a51150 100644 (file)
--- a/gprofng/Makefile.in
+++ b/gprofng/Makefile.in
@@ -381,9 +381,10 @@ zlibinc = @zlibinc@
ACLOCAL_AMFLAGS = -I . -I ..
AUTOMAKE_OPTIONS = dejagnu foreign
@BUILD_COLLECTOR_TRUE@COLLECTOR_SUBDIRS = libcollector
-@BUILD_SRC_TRUE@SRC_SUBDIRS = src gp-display-html doc
+@BUILD_MAN_TRUE@DOC_SUBDIR = doc
+@BUILD_SRC_TRUE@SRC_SUBDIRS = src gp-display-html $(DOC_SUBDIR)
SUBDIRS = $(COLLECTOR_SUBDIRS) $(SRC_SUBDIRS)
-DIST_SUBDIRS = libcollector src gp-display-html doc
+DIST_SUBDIRS = libcollector src gp-display-html $(DOC_SUBDIR)
RUNTEST = runtest
RUNTESTFLAGS =
BASEDIR = $(srcdir)/..
Loading