Skip to content
Snippets Groups Projects
Commit f6f37c7a authored by Eleni Mathioulaki's avatar Eleni Mathioulaki
Browse files

Merge branch 'spack-v0.20.0' into 'master'

update to Spack v0.20.0

See merge request technical-coordination/project-internal/devops/platform/ebrains-spack-builds!437
parents 0aed9f73 53d0164a
No related branches found
No related tags found
3 merge requests!442update rc,!438create new experimental release (first with Spack v0.20.0),!437update to Spack v0.20.0
Pipeline #25463 passed with stage
in 12 minutes and 3 seconds
Showing
with 470 additions and 256 deletions
......@@ -4,8 +4,8 @@ stages:
variables:
BUILD_ENV_DOCKER_IMAGE: docker-registry.ebrains.eu/tc/ebrains-spack-build-env/okd:okd_23.06
GITLAB_BUILD_ENV_DOCKER_IMAGE: docker-registry.ebrains.eu/tc/ebrains-spack-build-env/gitlab_runners_nfs:gitlab_runners_nfs_23.06
SPACK_VERSION: v0.19.2
SPACK_PATH_GITLAB: /mnt/spack_v0.19.2
SPACK_VERSION: v0.20.0
SPACK_PATH_GITLAB: /mnt/spack_v0.20.0
SYSTEMNAME: ebrainslab
# start an OpenShift Job that will build the Spack environment
......@@ -54,10 +54,10 @@ deploy-int-release-dev-cscs:
OPENSHIFT_TOKEN: $CSCS_OPENSHIFT_DEV_TOKEN
OC_PROJECT: jupyterhub-int
LAB_KERNEL_ROOT: /srv/jupyterlab_kernels/int
INSTALLATION_ROOT: /srv/test-build-2305
INSTALLATION_ROOT: /srv/test-build-2309
SPACK_ENV: test
RELEASE_NAME: EBRAINS-test
resource_group: shared-NFS-mount-dev-cscs
resource_group: shared-NFS-mount-dev-cscs-spack20
rules:
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH && $CI_PROJECT_NAMESPACE =~ /technical-coordination/
......@@ -71,7 +71,7 @@ deploy-prod-release-prod-cscs:
OPENSHIFT_TOKEN: $CSCS_OPENSHIFT_PROD_TOKEN
OC_PROJECT: jupyterhub
LAB_KERNEL_ROOT: /srv/jupyterlab_kernels/prod
INSTALLATION_ROOT: /srv/main-spack-instance-2305
INSTALLATION_ROOT: /srv/main-spack-instance-2309
SPACK_ENV: ebrains-23-09
RELEASE_NAME: EBRAINS-23.09
resource_group: shared-NFS-mount-prod-cscs
......@@ -89,7 +89,7 @@ deploy-prod-release-prod-jsc:
OPENSHIFT_TOKEN: $JSC_OPENSHIFT_PROD_TOKEN
OC_PROJECT: jupyterhub
LAB_KERNEL_ROOT: /srv/jupyterlab_kernels/prod
INSTALLATION_ROOT: /srv/main-spack-instance-2305
INSTALLATION_ROOT: /srv/main-spack-instance-2309
SPACK_ENV: ebrains-23-09
RELEASE_NAME: EBRAINS-23.09
resource_group: shared-NFS-mount-prod-jsc
......@@ -109,10 +109,10 @@ deploy-exp-release-dev-cscs:
OPENSHIFT_TOKEN: $CSCS_OPENSHIFT_DEV_TOKEN
OC_PROJECT: jupyterhub-int
LAB_KERNEL_ROOT: /srv/jupyterlab_kernels/int
INSTALLATION_ROOT: /srv/test-build-2305
INSTALLATION_ROOT: /srv/test-build-2309
SPACK_ENV: experimental
RELEASE_NAME: EBRAINS-experimental
resource_group: shared-NFS-mount-dev-cscs
resource_group: shared-NFS-mount-dev-cscs-spack20
only:
refs:
- schedules
......@@ -131,7 +131,7 @@ deploy-exp-release-prod-cscs:
OPENSHIFT_TOKEN: $CSCS_OPENSHIFT_PROD_TOKEN
OC_PROJECT: jupyterhub
LAB_KERNEL_ROOT: /srv/jupyterlab_kernels/prod
INSTALLATION_ROOT: /srv/main-spack-instance-2305
INSTALLATION_ROOT: /srv/main-spack-instance-2309
SPACK_ENV: experimental
RELEASE_NAME: EBRAINS-experimental
resource_group: shared-NFS-mount-prod-cscs
......@@ -156,7 +156,7 @@ deploy-exp-release-prod-jsc:
OPENSHIFT_TOKEN: $JSC_OPENSHIFT_PROD_TOKEN
OC_PROJECT: jupyterhub
LAB_KERNEL_ROOT: /srv/jupyterlab_kernels/prod
INSTALLATION_ROOT: /srv/main-spack-instance-2305
INSTALLATION_ROOT: /srv/main-spack-instance-2309
SPACK_ENV: experimental
RELEASE_NAME: EBRAINS-experimental
resource_group: shared-NFS-mount-prod-jsc
......
......@@ -38,9 +38,9 @@ Clone this repository. You can use the `ebrains-yy-mm` branches to install the E
git clone --branch {branch-name} https://gitlab.ebrains.eu/technical-coordination/project-internal/devops/platform/ebrains-spack-builds.git
```
Clone Spack. We currently use version v0.19.2:
Clone Spack. We currently use version v0.20.0:
```
git clone --depth 1 -c advice.detachedHead=false -c feature.manyFiles=true --branch v0.19.2 https://github.com/spack/spack
git clone --depth 1 -c advice.detachedHead=false -c feature.manyFiles=true --branch v0.20.0 https://github.com/spack/spack
```
Activate Spack:
......
diff -pur third_party/ijar/mapped_file_unix.cc third_party/ijar/mapped_file_unix.cc
--- third_party/ijar/mapped_file_unix.cc 2021-10-05 15:24:37.243946507 +0200
+++ third_party/ijar/mapped_file_unix.cc 2021-10-05 15:24:28.707823401 +0200
@@ -19,6 +19,7 @@
#include <sys/mman.h>
#include <algorithm>
+#include <limits>
#include "third_party/ijar/mapped_file.h"
diff -pur third_party/ijar/zlib_client.h third_party/ijar/zlib_client.h
--- third_party/ijar/zlib_client.h 2021-10-07 09:32:57.087301302 +0200
+++ third_party/ijar/zlib_client.h 1980-01-01 00:00:00.000000000 +0100
@@ -16,6 +16,7 @@
#define THIRD_PARTY_IJAR_ZLIB_CLIENT_H_
#include <limits.h>
+#include <limits>
#include "third_party/ijar/common.h"
diff --git a/compile.sh b/compile.sh
index ed506d2..a5474ac 100755
--- a/compile.sh
+++ b/compile.sh
@@ -92,7 +92,7 @@ display "."
log "Building output/bazel"
# We set host and target platform directly since the defaults in @bazel_tools
# have not yet been generated.
-bazel_build "src:bazel_nojdk${EXE_EXT}" \
+CC=$SPACK_CC CXX=$SPACK_CXX bazel_build "src:bazel_nojdk${EXE_EXT}" \
--host_platform=@bazel_tools//platforms:host_platform \
--platforms=@bazel_tools//platforms:target_platform \
|| fail "Could not build Bazel"
--- a/src/main/java/com/google/devtools/build/lib/rules/cpp/HeaderDiscovery.java.orig 2020-03-25 08:54:37.914186251 -0400
+++ b/src/main/java/com/google/devtools/build/lib/rules/cpp/HeaderDiscovery.java 2020-03-25 08:55:01.356250657 -0400
@@ -148,7 +148,7 @@
if (execPath.startsWith(execRoot)) {
execPathFragment = execPath.relativeTo(execRoot); // funky but tolerable path
} else {
- problems.add(execPathFragment.getPathString());
+ // problems.add(execPathFragment.getPathString());
continue;
}
}
--- a/src/main/java/com/google/devtools/build/lib/rules/cpp/CppCompileAction.java.orig 2020-06-08 13:42:14.035342560 -0400
+++ b/src/main/java/com/google/devtools/build/lib/rules/cpp/CppCompileAction.java 2020-06-08 13:42:25.149375458 -0400
@@ -963,7 +963,7 @@
// are, it's probably due to a non-hermetic #include, & we should stop
// the build with an error.
if (execPath.startsWith(execRoot)) {
- execPathFragment = execPath.relativeTo(execRoot); // funky but tolerable path
+ // execPathFragment = execPath.relativeTo(execRoot); // funky but tolerable path
} else {
problems.add(execPathFragment.getPathString());
continue;
From 9c9d27561780bc56d9f0867e325c7421a94ee1cb Mon Sep 17 00:00:00 2001
From: Harsh Bhatia <bhatia4@llnl.gov>
Date: Tue, 15 Dec 2020 15:56:10 -0800
Subject: [PATCH] https://github.com/bazelbuild/bazel/commit/ab62a6e097590dac5ec946ad7a796ea0e8593ae0
---
src/conditions/BUILD | 6 ++++++
third_party/BUILD | 8 ++++++--
2 files changed, 12 insertions(+), 2 deletions(-)
diff --git a/src/conditions/BUILD b/src/conditions/BUILD
index 2b28e28057..faa41a439d 100644
--- a/src/conditions/BUILD
+++ b/src/conditions/BUILD
@@ -10,6 +10,12 @@ filegroup(
visibility = ["//src:__pkg__"],
)
+config_setting(
+ name = "linux_ppc",
+ values = {"cpu": "ppc"},
+ visibility = ["//visibility:public"],
+)
+
config_setting(
name = "linux_x86_64",
values = {"cpu": "k8"},
diff --git a/third_party/BUILD b/third_party/BUILD
index 159006d741..4fcae54c00 100644
--- a/third_party/BUILD
+++ b/third_party/BUILD
@@ -523,12 +523,13 @@ UNNECESSARY_DYNAMIC_LIBRARIES = select({
"//src/conditions:darwin": "*.so *.dll",
"//src/conditions:darwin_x86_64": "*.so *.dll",
"//src/conditions:linux_x86_64": "*.jnilib *.dll",
+ "//src/conditions:linux_ppc": "*.so *.jnilib *.dll",
# The .so file is an x86 one, so we can just remove it if the CPU is not x86
"//src/conditions:arm": "*.so *.jnilib *.dll",
"//src/conditions:linux_aarch64": "*.so *.jnilib *.dll",
# Play it safe -- better have a big binary than a slow binary
# zip -d does require an argument. Supply something bogus.
- "//conditions:default": "*.bogusextension",
+ "//conditions:default": "",
})
# Remove native libraries that are for a platform different from the one we are
@@ -537,7 +538,10 @@ genrule(
name = "filter_netty_dynamic_libs",
srcs = ["netty_tcnative/netty-tcnative-boringssl-static-2.0.24.Final.jar"],
outs = ["netty_tcnative/netty-tcnative-filtered.jar"],
- cmd = "cp $< $@ && zip -qd $@ " + UNNECESSARY_DYNAMIC_LIBRARIES,
+ cmd = "cp $< $@ && " +
+ # End successfully if there is nothing to be deleted from the archive
+ "if [ -n '" + UNNECESSARY_DYNAMIC_LIBRARIES + "' ]; then " +
+ "zip -qd $@ " + UNNECESSARY_DYNAMIC_LIBRARIES + "; fi",
)
java_import(
--
2.21.0 (Apple Git-122.2)
diff --git a/src/main/cpp/blaze_util_posix.cc b/src/main/cpp/blaze_util_posix.cc
index 87ba899180..1c967ee818 100644
--- a/src/main/cpp/blaze_util_posix.cc
+++ b/src/main/cpp/blaze_util_posix.cc
@@ -565,7 +565,8 @@ static int setlk(int fd, struct flock *lock) {
// Prefer OFD locks if available. POSIX locks can be lost "accidentally"
// due to any close() on the lock file, and are not reliably preserved
// across execve() on Linux, which we need for --batch mode.
- if (fcntl(fd, F_OFD_SETLK, lock) == 0) return 0;
+ //if (fcntl(fd, F_OFD_SETLK, lock) == 0) return 0;
+ if (fcntl(fd, F_SETLK, lock) == 0) return 0;
if (errno != EINVAL) {
if (errno != EACCES && errno != EAGAIN) {
BAZEL_DIE(blaze_exit_code::LOCAL_ENVIRONMENTAL_ERROR)
diff --git a/tools/cpp/unix_cc_configure.bzl b/tools/cpp/unix_cc_configure.bzl
index ccb18a431a..0c5c8fd6f0 100644
--- a/tools/cpp/unix_cc_configure.bzl
+++ b/tools/cpp/unix_cc_configure.bzl
@@ -379,7 +379,8 @@ def configure_unix_toolchain(repository_ctx, cpu_value, overriden_tools):
"",
False,
), ":")
- gold_linker_path = _find_gold_linker_path(repository_ctx, cc)
+ #gold_linker_path = _find_gold_linker_path(repository_ctx, cc)
+ gold_linker_path = None
cc_path = repository_ctx.path(cc)
if not str(cc_path).startswith(str(repository_ctx.path(".")) + "/"):
# cc is outside the repository, set -B
@@ -468,7 +469,7 @@ def configure_unix_toolchain(repository_ctx, cpu_value, overriden_tools):
# Security hardening requires optimization.
# We need to undef it as some distributions now have it enabled by default.
"-U_FORTIFY_SOURCE",
- "-fstack-protector",
+ #"-fstack-protector",
# All warnings are enabled. Maybe enable -Werror as well?
"-Wall",
# Enable a few more warnings that aren't part of -Wall.
--- a/src/main/java/com/google/devtools/build/lib/bazel/rules/BazelRuleClassProvider.java
+++ b/src/main/java/com/google/devtools/build/lib/bazel/rules/BazelRuleClassProvider.java
@@ -185,7 +185,7 @@ public class BazelRuleClassProvider {
Map<String, String> spackEnv = System.getenv();
for (String envName : spackEnv.keySet()) {
- if (envName.startsWith("SPACK_")) {
+ if ((envName.startsWith("SPACK_")) || (envName.equals("fcc_ENV")) || (envName.equals("FCC_ENV"))) {
env.put(envName, spackEnv.get(envName));
}
}
From d1d017390b799c59d6fdf7b8afa6136d218bdd61 Mon Sep 17 00:00:00 2001
From: Benjamin Peterson <benjamin@dropbox.com>
Date: Fri, 3 May 2019 08:11:00 -0700
Subject: [PATCH] Rename gettid() functions.
glibc 2.30 will declare its own gettid; see https://sourceware.org/git/?p=glibc.git;a=commit;h=1d0fc213824eaa2a8f8c4385daaa698ee8fb7c92. Rename the grpc versions to avoid naming conflicts.
---
src/core/lib/gpr/log_linux.cc | 4 ++--
src/core/lib/gpr/log_posix.cc | 4 ++--
src/core/lib/iomgr/ev_epollex_linux.cc | 4 ++--
3 files changed, 6 insertions(+), 6 deletions(-)
diff --git third_party/grpc/src/core/lib/gpr/log_linux.cc.orig src/core/lib/gpr/log_linux.cc
index 561276f0c20..8b597b4cf2f 100644
--- third_party/grpc/src/core/lib/gpr/log_linux.cc.orig 2019-06-21 10:42:13.235611417 -0400
+++ third_party/grpc/src/core/lib/gpr/log_linux.cc 2019-06-21 10:42:16.686608855 -0400
@@ -40,7 +40,7 @@
#include <time.h>
#include <unistd.h>
-static long gettid(void) { return syscall(__NR_gettid); }
+static long sys_gettid(void) { return syscall(__NR_gettid); }
void gpr_log(const char* file, int line, gpr_log_severity severity,
const char* format, ...) {
@@ -70,7 +70,7 @@ void gpr_default_log(gpr_log_func_args*
gpr_timespec now = gpr_now(GPR_CLOCK_REALTIME);
struct tm tm;
static __thread long tid = 0;
- if (tid == 0) tid = gettid();
+ if (tid == 0) tid = sys_gettid();
timer = static_cast<time_t>(now.tv_sec);
final_slash = strrchr(args->file, '/');
diff --git third_party/grpc/src/core/lib/gpr/log_posix.cc.orig src/core/lib/gpr/log_posix.cc
index b6edc14ab6b..2f7c6ce3760 100644
--- third_party/grpc/src/core/lib/gpr/log_posix.cc.orig 2019-06-21 10:42:13.242611412 -0400
+++ third_party/grpc/src/core/lib/gpr/log_posix.cc 2019-06-21 10:42:22.794604319 -0400
@@ -30,7 +30,7 @@
#include <string.h>
#include <time.h>
-static intptr_t gettid(void) { return (intptr_t)pthread_self(); }
+static intptr_t sys_gettid(void) { return (intptr_t)pthread_self(); }
void gpr_log(const char* file, int line, gpr_log_severity severity,
const char* format, ...) {
@@ -85,7 +85,7 @@ void gpr_default_log(gpr_log_func_args*
char* prefix;
gpr_asprintf(&prefix, "%s%s.%09d %7tu %s:%d]",
gpr_log_severity_string(args->severity), time_buffer,
- (int)(now.tv_nsec), gettid(), display_file, args->line);
+ (int)(now.tv_nsec), sys_gettid(), display_file, args->line);
fprintf(stderr, "%-70s %s\n", prefix, args->message);
gpr_free(prefix);
diff --git third_party/grpc/src/core/lib/iomgr/ev_epollex_linux.cc.orig src/core/lib/iomgr/ev_epollex_linux.cc
index 08116b3ab53..76f59844312 100644
--- third_party/grpc/src/core/lib/iomgr/ev_epollex_linux.cc.orig 2019-06-21 10:42:13.247611408 -0400
+++ third_party/grpc/src/core/lib/iomgr/ev_epollex_linux.cc 2019-06-21 10:42:29.767599141 -0400
@@ -1150,7 +1150,7 @@ static void end_worker(grpc_pollset* pol
}
#ifndef NDEBUG
-static long gettid(void) { return syscall(__NR_gettid); }
+static long sys_gettid(void) { return syscall(__NR_gettid); }
#endif
/* pollset->mu lock must be held by the caller before calling this.
@@ -1170,7 +1170,7 @@ static grpc_error* pollset_work(grpc_pol
#define WORKER_PTR (&worker)
#endif
#ifndef NDEBUG
- WORKER_PTR->originator = gettid();
+ WORKER_PTR->originator = sys_gettid();
#endif
if (grpc_polling_trace.enabled()) {
gpr_log(GPR_INFO,
diff -uNr gcc-7.2.0.orig/libstdc++-v3/include/Makefile.in gcc-7.2.0/libstdc++-v3/include/Makefile.in
--- gcc-7.2.0.orig/libstdc++-v3/include/Makefile.in 2017-07-25 14:05:07.000000000 -0400
+++ gcc-7.2.0/libstdc++-v3/include/Makefile.in 2017-09-02 12:22:08.000000000 -0400
@@ -1764,6 +1764,8 @@
@GLIBCXX_HOSTED_TRUE@install-data-local: install-headers
@GLIBCXX_HOSTED_FALSE@install-data-local: install-freestanding-headers
+.NOTPARALLEL: install-headers
+
# This is a subset of the full install-headers rule. We only need <ciso646>,
# <cstddef>, <cfloat>, <limits>, <climits>, <cstdint>, <cstdlib>, <new>,
# <typeinfo>, <exception>, <initializer_list>, <cstdalign>, <cstdarg>,
--- a/gcc/genconditions.c 2019-01-01 12:37:19.064943662 +0100
+++ b/gcc/genconditions.c 2019-10-11 10:57:11.464595789 +0200
@@ -57,8 +57,9 @@ write_header (void)
\n\
/* It is necessary, but not entirely safe, to include the headers below\n\
in a generator program. As a defensive measure, don't do so when the\n\
- table isn't going to have anything in it. */\n\
-#if GCC_VERSION >= 3001\n\
+ table isn't going to have anything in it.\n\
+ Clang 9 is buggy and doesn't handle __builtin_constant_p correctly. */\n\
+#if GCC_VERSION >= 3001 && __clang_major__ < 9\n\
\n\
/* Do not allow checking to confuse the issue. */\n\
#undef CHECKING_P\n\
@@ -170,7 +171,7 @@ struct c_test\n\
vary at run time. It works in 3.0.1 and later; 3.0 only when not\n\
optimizing. */\n\
\n\
-#if GCC_VERSION >= 3001\n\
+#if GCC_VERSION >= 3001 && __clang_major__ < 9\n\
static const struct c_test insn_conditions[] = {\n");
traverse_c_tests (write_one_condition, 0);
@@ -191,7 +192,7 @@ write_writer (void)
" unsigned int i;\n"
" const char *p;\n"
" puts (\"(define_conditions [\");\n"
- "#if GCC_VERSION >= 3001\n"
+ "#if GCC_VERSION >= 3001 && __clang_major__ < 9\n"
" for (i = 0; i < ARRAY_SIZE (insn_conditions); i++)\n"
" {\n"
" printf (\" (%d \\\"\", insn_conditions[i].value);\n"
diff --git a/gcc/configure b/gcc/configure
index 9523773..52b0bf7 100755
--- a/gcc/configure
+++ b/gcc/configure
@@ -24884,7 +24884,7 @@ if test "${gcc_cv_as_ix86_filds+set}" = set; then :
else
gcc_cv_as_ix86_filds=no
if test x$gcc_cv_as != x; then
- $as_echo 'filds mem; fists mem' > conftest.s
+ $as_echo 'filds (%ebp); fists (%ebp)' > conftest.s
if { ac_try='$gcc_cv_as $gcc_cv_as_flags -o conftest.o conftest.s >&5'
{ { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
(eval $ac_try) 2>&5
@@ -24915,7 +24915,7 @@ if test "${gcc_cv_as_ix86_fildq+set}" = set; then :
else
gcc_cv_as_ix86_fildq=no
if test x$gcc_cv_as != x; then
- $as_echo 'fildq mem; fistpq mem' > conftest.s
+ $as_echo 'fildq (%ebp); fistpq (%ebp)' > conftest.s
if { ac_try='$gcc_cv_as $gcc_cv_as_flags -o conftest.o conftest.s >&5'
{ { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
(eval $ac_try) 2>&5
diff --git a/gcc/configure.ac b/gcc/configure.ac
index 68b0ee8..bd53978 100644
--- a/gcc/configure.ac
+++ b/gcc/configure.ac
@@ -3869,13 +3869,13 @@ foo: nop
gcc_GAS_CHECK_FEATURE([filds and fists mnemonics],
gcc_cv_as_ix86_filds,,,
- [filds mem; fists mem],,
+ [filds (%ebp); fists (%ebp)],,
[AC_DEFINE(HAVE_AS_IX86_FILDS, 1,
[Define if your assembler uses filds and fists mnemonics.])])
gcc_GAS_CHECK_FEATURE([fildq and fistpq mnemonics],
gcc_cv_as_ix86_fildq,,,
- [fildq mem; fistpq mem],,
+ [fildq (%ebp); fistpq (%ebp)],,
[AC_DEFINE(HAVE_AS_IX86_FILDQ, 1,
[Define if your assembler uses fildq and fistq mnemonics.])])
From 82f81877458ea372176eabb5de36329431dce99b Mon Sep 17 00:00:00 2001
From: Iain Sandoe <iain@codesourcery.com>
Date: Sat, 21 Dec 2013 00:30:18 +0000
Subject: [PATCH] don't try to mark local symbols as no-dead-strip
---
gcc/config/darwin.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/gcc/config/darwin.c b/gcc/config/darwin.c
index 40804b8..0080299 100644
--- a/gcc/config/darwin.c
+++ b/gcc/config/darwin.c
@@ -1259,6 +1259,11 @@ darwin_encode_section_info (tree decl, rtx rtl, int first ATTRIBUTE_UNUSED)
void
darwin_mark_decl_preserved (const char *name)
{
+ /* Actually we shouldn't mark any local symbol this way, but for now
+ this only happens with ObjC meta-data. */
+ if (darwin_label_is_anonymous_local_objc_name (name))
+ return;
+
fprintf (asm_out_file, "\t.no_dead_strip ");
assemble_name (asm_out_file, name);
fputc ('\n', asm_out_file);
--
2.2.1
# Fix for libgccjit.so linkage on Darwin
# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64089
# https://github.com/Homebrew/homebrew-core/issues/1872#issuecomment-225625332
# https://github.com/Homebrew/homebrew-core/issues/1872#issuecomment-225626490
# Stolen from Homebrew:
# https://raw.githubusercontent.com/Homebrew/formula-patches/e9e0ee09389a54cc4c8fe1c24ebca3cd765ed0ba/gcc/6.1.0-jit.patch
diff --git a/gcc/jit/Make-lang.in b/gcc/jit/Make-lang.in
index 44d0750..4df2a9c 100644
--- a/gcc/jit/Make-lang.in
+++ b/gcc/jit/Make-lang.in
@@ -85,8 +85,7 @@ $(LIBGCCJIT_FILENAME): $(jit_OBJS) \
$(jit_OBJS) libbackend.a libcommon-target.a libcommon.a \
$(CPPLIB) $(LIBDECNUMBER) $(LIBS) $(BACKENDLIBS) \
$(EXTRA_GCC_OBJS) \
- -Wl,--version-script=$(srcdir)/jit/libgccjit.map \
- -Wl,-soname,$(LIBGCCJIT_SONAME)
+ -Wl,-install_name,$(LIBGCCJIT_SONAME)
$(LIBGCCJIT_SONAME_SYMLINK): $(LIBGCCJIT_FILENAME)
ln -sf $(LIBGCCJIT_FILENAME) $(LIBGCCJIT_SONAME_SYMLINK)
# Use -headerpad_max_install_names in the build,
# otherwise lto1 load commands cannot be edited on El Capitan
# Stolen from Homebrew:
# https://raw.githubusercontent.com/Homebrew/formula-patches/32cf103/gcc/7.1.0-headerpad.patch
diff --git a/config/mh-darwin b/config/mh-darwin
index 148b730..c2318b5 100644
--- a/config/mh-darwin
+++ b/config/mh-darwin
@@ -16,7 +16,7 @@ DARWIN_GCC_MDYNAMIC_NO_PIC := \
DARWIN_NO_PIE := `case ${host} in *-*-darwin[1][1-9]*) echo -Wl,-no_pie ;; esac;`
BOOT_CFLAGS += $(DARWIN_MDYNAMIC_NO_PIC)
-BOOT_LDFLAGS += $(DARWIN_NO_PIE)
+BOOT_LDFLAGS += $(DARWIN_NO_PIE) -Wl,-headerpad_max_install_names
# Similarly, for cross-compilation.
STAGE1_CFLAGS += $(DARWIN_MDYNAMIC_NO_PIC)
diff -pur fixincludes/fixincl.x gcc-5.5.0/fixincludes/fixincl.x
--- a/fixincludes/fixincl.x 2017-01-30 17:08:42.000000000 +0100
+++ b/fixincludes/fixincl.x 2017-12-21 14:34:35.000000000 +0100
@@ -1,12 +1,12 @@
/* -*- buffer-read-only: t -*- vi: set ro:
- *
+ *
* DO NOT EDIT THIS FILE (fixincl.x)
- *
- * It has been AutoGen-ed January 5, 2017 at 06:05:06 PM by AutoGen 5.16.2
+ *
+ * It has been AutoGen-ed December 21, 2017 at 02:34:35 PM by AutoGen 5.18.7
* From the definitions inclhack.def
* and the template file fixincl
*/
-/* DO NOT SVN-MERGE THIS FILE, EITHER Thu Jan 5 18:05:06 CET 2017
+/* DO NOT SVN-MERGE THIS FILE, EITHER Thu Dec 21 14:34:35 CET 2017
*
* You must regenerate it. Use the ./genfixes script.
*
@@ -15,7 +15,7 @@
* certain ANSI-incompatible system header files which are fixed to work
* correctly with ANSI C and placed in a directory that GNU C will search.
*
- * This file contains 240 fixup descriptions.
+ * This file contains 241 fixup descriptions.
*
* See README for more information.
*
@@ -2579,6 +2579,43 @@ extern \"C\" {\n\
/* * * * * * * * * * * * * * * * * * * * * * * * * *
*
+ * Description of Darwin_Osavailability fix
+ */
+tSCC zDarwin_OsavailabilityName[] =
+ "darwin_osavailability";
+
+/*
+ * File name selection pattern
+ */
+tSCC zDarwin_OsavailabilityList[] =
+ "os/availability.h\0";
+/*
+ * Machine/OS name selection pattern
+ */
+tSCC* apzDarwin_OsavailabilityMachs[] = {
+ "*-*-darwin*",
+ (const char*)NULL };
+
+/*
+ * content selection pattern - do fix if pattern found
+ */
+tSCC zDarwin_OsavailabilitySelect0[] =
+ "#define[ \t]+__(API_[A-Z_]*)\\(\\.\\.\\.\\)";
+
+#define DARWIN_OSAVAILABILITY_TEST_CT 1
+static tTestDesc aDarwin_OsavailabilityTests[] = {
+ { TT_EGREP, zDarwin_OsavailabilitySelect0, (regex_t*)NULL }, };
+
+/*
+ * Fix Command Arguments for Darwin_Osavailability
+ */
+static const char* apzDarwin_OsavailabilityPatch[] = {
+ "format",
+ "#define %1(...)",
+ (char*)NULL };
+
+/* * * * * * * * * * * * * * * * * * * * * * * * * *
+ *
* Description of Darwin_9_Long_Double_Funcs_2 fix
*/
tSCC zDarwin_9_Long_Double_Funcs_2Name[] =
@@ -9818,9 +9855,9 @@ static const char* apzX11_SprintfPatch[]
*
* List of all fixes
*/
-#define REGEX_COUNT 276
+#define REGEX_COUNT 277
#define MACH_LIST_SIZE_LIMIT 187
-#define FIX_COUNT 240
+#define FIX_COUNT 241
/*
* Enumerate the fixes
@@ -9885,6 +9922,7 @@ typedef enum {
CTRL_QUOTES_DEF_FIXIDX,
CTRL_QUOTES_USE_FIXIDX,
CXX_UNREADY_FIXIDX,
+ DARWIN_OSAVAILABILITY_FIXIDX,
DARWIN_9_LONG_DOUBLE_FUNCS_2_FIXIDX,
DARWIN_EXTERNC_FIXIDX,
DARWIN_GCC4_BREAKAGE_FIXIDX,
@@ -10364,6 +10402,11 @@ tFixDesc fixDescList[ FIX_COUNT ] = {
CXX_UNREADY_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
aCxx_UnreadyTests, apzCxx_UnreadyPatch, 0 },
+ { zDarwin_OsavailabilityName, zDarwin_OsavailabilityList,
+ apzDarwin_OsavailabilityMachs,
+ DARWIN_OSAVAILABILITY_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
+ aDarwin_OsavailabilityTests, apzDarwin_OsavailabilityPatch, 0 },
+
{ zDarwin_9_Long_Double_Funcs_2Name, zDarwin_9_Long_Double_Funcs_2List,
apzDarwin_9_Long_Double_Funcs_2Machs,
DARWIN_9_LONG_DOUBLE_FUNCS_2_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
diff -pur fixincludes/inclhack.def gcc-5.5.0/fixincludes/inclhack.def
--- a/fixincludes/inclhack.def 2017-01-30 17:08:42.000000000 +0100
+++ b/fixincludes/inclhack.def 2017-12-21 14:34:28.000000000 +0100
@@ -1337,6 +1337,18 @@ fix = {
test_text = "extern void* malloc( size_t );";
};
+fix = {
+ hackname = darwin_osavailability;
+ mach = "*-*-darwin*";
+ files = os/availability.h;
+ select = "#define[ \t]+__(API_[A-Z_]*)\\(\\.\\.\\.\\)";
+ c_fix = format;
+ c_fix_arg = "#define %1(...)";
+
+ test_text = "#define __API_AVAILABLE(...)\n"
+ "#define API_AVAILABLE(...)\n";
+};
+
/*
* For the AAB_darwin7_9_long_double_funcs fix to be useful,
* you have to not use "" includes.
2016-02-20 Bernd Edlinger <bernd.edlinger@hotmail.de>
Backported from mainline
2016-02-19 Jakub Jelinek <jakub@redhat.com>
Bernd Edlinger <bernd.edlinger@hotmail.de>
* Make-lang.in: Invoke gperf with -L C++.
* cfns.gperf: Remove prototypes for hash and libc_name_p
inlines.
* cfns.h: Regenerated.
* except.c (nothrow_libfn_p): Adjust.
Index: gcc/cp/Make-lang.in
===================================================================
--- a/gcc/cp/Make-lang.in (revision 233574)
+++ b/gcc/cp/Make-lang.in (working copy)
@@ -111,7 +111,7 @@ else
# deleting the $(srcdir)/cp/cfns.h file.
$(srcdir)/cp/cfns.h:
endif
- gperf -o -C -E -k '1-6,$$' -j1 -D -N 'libc_name_p' -L ANSI-C \
+ gperf -o -C -E -k '1-6,$$' -j1 -D -N 'libc_name_p' -L C++ \
$(srcdir)/cp/cfns.gperf --output-file $(srcdir)/cp/cfns.h
#
Index: gcc/cp/cfns.gperf
===================================================================
--- a/gcc/cp/cfns.gperf (revision 233574)
+++ b/gcc/cp/cfns.gperf (working copy)
@@ -1,3 +1,5 @@
+%language=C++
+%define class-name libc_name
%{
/* Copyright (C) 2000-2015 Free Software Foundation, Inc.
@@ -16,14 +18,6 @@ for more details.
You should have received a copy of the GNU General Public License
along with GCC; see the file COPYING3. If not see
<http://www.gnu.org/licenses/>. */
-#ifdef __GNUC__
-__inline
-#endif
-static unsigned int hash (const char *, unsigned int);
-#ifdef __GNUC__
-__inline
-#endif
-const char * libc_name_p (const char *, unsigned int);
%}
%%
# The standard C library functions, for feeding to gperf; the result is used
Index: gcc/cp/cfns.h
===================================================================
--- a/gcc/cp/cfns.h (revision 233574)
+++ b/gcc/cp/cfns.h (working copy)
@@ -1,5 +1,5 @@
-/* ANSI-C code produced by gperf version 3.0.3 */
-/* Command-line: gperf -o -C -E -k '1-6,$' -j1 -D -N libc_name_p -L ANSI-C cfns.gperf */
+/* C++ code produced by gperf version 3.0.4 */
+/* Command-line: gperf -o -C -E -k '1-6,$' -j1 -D -N libc_name_p -L C++ --output-file cfns.h cfns.gperf */
#if !((' ' == 32) && ('!' == 33) && ('"' == 34) && ('#' == 35) \
&& ('%' == 37) && ('&' == 38) && ('\'' == 39) && ('(' == 40) \
@@ -28,7 +28,7 @@
#error "gperf generated tables don't work with this execution character set. Please report a bug to <bug-gnu-gperf@gnu.org>."
#endif
-#line 1 "cfns.gperf"
+#line 3 "cfns.gperf"
/* Copyright (C) 2000-2015 Free Software Foundation, Inc.
@@ -47,26 +47,19 @@ for more details.
You should have received a copy of the GNU General Public License
along with GCC; see the file COPYING3. If not see
<http://www.gnu.org/licenses/>. */
-#ifdef __GNUC__
-__inline
-#endif
-static unsigned int hash (const char *, unsigned int);
-#ifdef __GNUC__
-__inline
-#endif
-const char * libc_name_p (const char *, unsigned int);
/* maximum key range = 391, duplicates = 0 */
-#ifdef __GNUC__
-__inline
-#else
-#ifdef __cplusplus
-inline
-#endif
-#endif
-static unsigned int
-hash (register const char *str, register unsigned int len)
+class libc_name
{
+private:
+ static inline unsigned int hash (const char *str, unsigned int len);
+public:
+ static const char *libc_name_p (const char *str, unsigned int len);
+};
+
+inline unsigned int
+libc_name::hash (register const char *str, register unsigned int len)
+{
static const unsigned short asso_values[] =
{
400, 400, 400, 400, 400, 400, 400, 400, 400, 400,
@@ -122,14 +115,8 @@ along with GCC; see the file COPYING3. If not see
return hval + asso_values[(unsigned char)str[len - 1]];
}
-#ifdef __GNUC__
-__inline
-#ifdef __GNUC_STDC_INLINE__
-__attribute__ ((__gnu_inline__))
-#endif
-#endif
const char *
-libc_name_p (register const char *str, register unsigned int len)
+libc_name::libc_name_p (register const char *str, register unsigned int len)
{
enum
{
Index: gcc/cp/except.c
===================================================================
--- a/gcc/cp/except.c (revision 233574)
+++ b/gcc/cp/except.c (working copy)
@@ -1040,7 +1040,8 @@ nothrow_libfn_p (const_tree fn)
unless the system headers are playing rename tricks, and if
they are, we don't want to be confused by them. */
id = DECL_NAME (fn);
- return !!libc_name_p (IDENTIFIER_POINTER (id), IDENTIFIER_LENGTH (id));
+ return !!libc_name::libc_name_p (IDENTIFIER_POINTER (id),
+ IDENTIFIER_LENGTH (id));
}
/* Returns nonzero if an exception of type FROM will be caught by a
From ce9568e9e9cf6094be30e748821421e703754ffc Mon Sep 17 00:00:00 2001
From: Jakub Jelinek <jakub@redhat.com>
Date: Fri, 8 Nov 2019 19:53:18 +0100
Subject: [PATCH] backport: re PR sanitizer/92154 (new glibc breaks arm
bootstrap due to libsanitizer)
Backported from mainline
2019-10-22 Tamar Christina <tamar.christina@arm.com>
Backported for version 5.3.0 <= gcc <= 6.5.0
2020-06-05 John L. Jolly <john.jolly@gmail.com>
PR sanitizer/92154
* sanitizer_common/sanitizer_platform_limits_posix.cc:
Cherry-pick compiler-rt revision r375220.
From-SVN: r277981
---
libsanitizer/ChangeLog | 9 +++++++++
.../sanitizer_common/sanitizer_platform_limits_posix.cc | 6 +++++-
2 files changed, 14 insertions(+), 1 deletion(-)
diff --git a/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc b/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc
index 6cd4a5bac8b0..06a605ff4670 100644
--- a/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc
+++ b/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc
@@ -1130,8 +1130,12 @@ CHECK_SIZE_AND_OFFSET(ipc_perm, uid);
#ifndef __GLIBC_PREREQ
#define __GLIBC_PREREQ(x, y) 0
#endif
-#if !defined(__aarch64__) || !SANITIZER_LINUX || __GLIBC_PREREQ (2, 21)
+#if (!defined(__aarch64__) || !SANITIZER_LINUX || __GLIBC_PREREQ (2, 21)) && \
+ !defined(__arm__)
/* On aarch64 glibc 2.20 and earlier provided incorrect mode field. */
+/* On Arm glibc 2.31 and later provide a different mode field, this field is
+ never used by libsanitizer so we can simply ignore this assert for all glibc
+ versions. */
CHECK_SIZE_AND_OFFSET(ipc_perm, mode);
#endif
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment