aboutsummaryrefslogtreecommitdiff
path: root/sysutils/slurm-wlm
diff options
context:
space:
mode:
authorNiclas Zeising <zeising@FreeBSD.org>2020-08-25 10:27:55 +0000
committerNiclas Zeising <zeising@FreeBSD.org>2020-08-25 10:27:55 +0000
commitcb85e046fdb79e78b543c194ae807de0ee846d22 (patch)
tree35c058063898f238e49d81e1a2febcc75b98dccb /sysutils/slurm-wlm
parent1f0c87e8fef46abe9ba5c0819e323d6f475c7ae1 (diff)
downloadports-cb85e046fdb79e78b543c194ae807de0ee846d22.tar.gz
ports-cb85e046fdb79e78b543c194ae807de0ee846d22.zip
sysutils/slurm-wlm: Fix build with -fno-common
Add two patches based on upstream changes to fix the build of sysutils/slurm-wlm with -fno-common, which is the default with llvm 11. MFH: 2020Q3 (implicit, -fno-common fixes, ok by joenum)
Notes
Notes: svn path=/head/; revision=546150
Diffstat (limited to 'sysutils/slurm-wlm')
-rw-r--r--sysutils/slurm-wlm/files/patch-c8be6ceb.c25
-rw-r--r--sysutils/slurm-wlm/files/patch-src_plugins_select_cons__tres_job__test.c26
2 files changed, 51 insertions, 0 deletions
diff --git a/sysutils/slurm-wlm/files/patch-c8be6ceb.c b/sysutils/slurm-wlm/files/patch-c8be6ceb.c
new file mode 100644
index 000000000000..645ab28d0c54
--- /dev/null
+++ b/sysutils/slurm-wlm/files/patch-c8be6ceb.c
@@ -0,0 +1,25 @@
+diff --git a/src/scancel/scancel.c b/src/scancel/scancel.c
+index 4448b75599..23594fe0bf 100644
+--- src/scancel/scancel.c
++++ src/scancel/scancel.c
+@@ -99,6 +99,7 @@ static pthread_cond_t num_active_threads_cond;
+ static pthread_mutex_t max_delay_lock;
+ static uint32_t max_resp_time = 0;
+ static int request_count = 0;
++opt_t opt;
+
+ int
+ main (int argc, char **argv)
+diff --git a/src/scancel/scancel.h b/src/scancel/scancel.h
+index a0c9d8a829..678bcd7616 100644
+--- src/scancel/scancel.h
++++ src/scancel/scancel.h
+@@ -75,7 +75,7 @@ typedef struct scancel_options {
+ bool *job_pend; /* Set fi job is pending */
+ } opt_t;
+
+-opt_t opt;
++extern opt_t opt;
+
+ /* process options:
+ * 1. set defaults
diff --git a/sysutils/slurm-wlm/files/patch-src_plugins_select_cons__tres_job__test.c b/sysutils/slurm-wlm/files/patch-src_plugins_select_cons__tres_job__test.c
new file mode 100644
index 000000000000..95640af1ae59
--- /dev/null
+++ b/sysutils/slurm-wlm/files/patch-src_plugins_select_cons__tres_job__test.c
@@ -0,0 +1,26 @@
+--- src/plugins/select/cons_tres/job_test.c.orig 2020-03-26 21:44:05 UTC
++++ src/plugins/select/cons_tres/job_test.c
+@@ -41,23 +41,6 @@
+
+ #define _DEBUG 0 /* Enables module specific debugging */
+
+-/*
+- * These symbols are defined here so when we link with something other
+- * than the slurmctld we will have these symbols defined. They will get
+- * overwritten when linking with the slurmctld.
+- */
+-#if defined (__APPLE__)
+-extern slurmctld_config_t slurmctld_config __attribute__((weak_import));
+-extern bitstr_t *idle_node_bitmap __attribute__((weak_import));
+-extern node_record_t *node_record_table_ptr __attribute__((weak_import));
+-extern List job_list __attribute__((weak_import));
+-#else
+-slurmctld_config_t slurmctld_config;
+-bitstr_t *idle_node_bitmap;
+-node_record_t *node_record_table_ptr;
+-List job_list;
+-#endif
+-
+ typedef struct node_weight_struct {
+ bitstr_t *node_bitmap; /* bitmap of nodes with this weight */
+ uint32_t weight; /* priority of node for scheduling work on */