203 lines
7.1 KiB
Diff
203 lines
7.1 KiB
Diff
diff -Naurp pcp-6.3.7.orig/configure pcp-6.3.7/configure
|
|
--- pcp-6.3.7.orig/configure 2025-03-31 12:41:26.000000000 +1100
|
|
+++ pcp-6.3.7/configure 2025-06-26 19:38:57.864414825 +1000
|
|
@@ -932,6 +932,7 @@ sed
|
|
SED
|
|
awk
|
|
AWK
|
|
+enable_multilib
|
|
enable_shared
|
|
cxx
|
|
ac_ct_CXX
|
|
@@ -1055,6 +1056,7 @@ enable_ssp
|
|
enable_pie
|
|
enable_visibility
|
|
enable_shared
|
|
+enable_multilib
|
|
with_perl_installdirs
|
|
with_perl_install_base
|
|
with_python_prefix
|
|
@@ -1748,7 +1750,8 @@ Optional Features:
|
|
--disable-ssp disable gcc stack-protector
|
|
--disable-pie disable position-independent-executable
|
|
--disable-visibility disable gcc symbol visibility
|
|
- --disable-shared disable core shared libary generation
|
|
+ --disable-shared disable core shared library generation
|
|
+ --enable-multilib enable multilib installations
|
|
|
|
Optional Packages:
|
|
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
|
|
@@ -5696,6 +5699,21 @@ else case e in #(
|
|
esac
|
|
fi
|
|
|
|
+
|
|
+
|
|
+# Check whether --enable-multilib was given.
|
|
+if test ${enable_multilib+y}
|
|
+then :
|
|
+ enableval=$enable_multilib; PACKAGE_CONFIGURE="$PACKAGE_CONFIGURE --enable-multilib=$withval"
|
|
+
|
|
+printf "%s\n" "#define HAVE_MULTILIB 1" >>confdefs.h
|
|
+
|
|
+ enable_multilib=true
|
|
+else case e in #(
|
|
+ e) enable_multilib=false ;;
|
|
+esac
|
|
+fi
|
|
+
|
|
|
|
|
|
|
|
diff -Naurp pcp-6.3.7.orig/configure.ac pcp-6.3.7/configure.ac
|
|
--- pcp-6.3.7.orig/configure.ac 2025-03-31 12:41:26.000000000 +1100
|
|
+++ pcp-6.3.7/configure.ac 2025-06-26 19:38:57.867577540 +1000
|
|
@@ -655,11 +655,20 @@ AC_LANG_POP([C++])
|
|
|
|
dnl Prevent shared libraries from being built for libpcp and other core libraries
|
|
AC_ARG_ENABLE([shared],
|
|
- [AS_HELP_STRING([--disable-shared], [disable core shared libary generation])],
|
|
+ [AS_HELP_STRING([--disable-shared], [disable core shared library generation])],
|
|
[PACKAGE_CONFIGURE="$PACKAGE_CONFIGURE --disable-shared=$withval"],
|
|
[enable_shared=false])
|
|
AC_SUBST(enable_shared)
|
|
|
|
+dnl Support installing both devel package variants on either 32/64 bit platform
|
|
+AC_ARG_ENABLE([multilib],
|
|
+ [AS_HELP_STRING([--enable-multilib], [enable multilib installations])],
|
|
+ [PACKAGE_CONFIGURE="$PACKAGE_CONFIGURE --enable-multilib=$withval"
|
|
+ AC_DEFINE(HAVE_MULTILIB, [1], [multilib defined])
|
|
+ enable_multilib=true],
|
|
+ [enable_multilib=false])
|
|
+AC_SUBST(enable_multilib)
|
|
+
|
|
dnl check if user wants to use any of their own commands;
|
|
dnl ordering is important: some tests use earlier results
|
|
|
|
diff -Naurp pcp-6.3.7.orig/src/include/builddefs.in pcp-6.3.7/src/include/builddefs.in
|
|
--- pcp-6.3.7.orig/src/include/builddefs.in 2025-03-27 17:01:59.000000000 +1100
|
|
+++ pcp-6.3.7/src/include/builddefs.in 2025-06-26 19:38:57.869743878 +1000
|
|
@@ -259,6 +259,7 @@ QT_VERSION = @qt_version@
|
|
CLANG_MAJOR_VERSION = @CLANG_MAJOR_VERSION@
|
|
|
|
# configuration state affecting the entire build
|
|
+ENABLE_MULTILIB = @enable_multilib@
|
|
ENABLE_SHARED = @enable_shared@
|
|
ENABLE_SECURE = @enable_secure@
|
|
ENABLE_PROBES = @enable_probes@
|
|
diff -Naurp pcp-6.3.7.orig/src/include/pcp/config32.h pcp-6.3.7/src/include/pcp/config32.h
|
|
--- pcp-6.3.7.orig/src/include/pcp/config32.h 2024-07-30 16:43:55.000000000 +1000
|
|
+++ pcp-6.3.7/src/include/pcp/config32.h 2025-06-26 19:38:57.871096964 +1000
|
|
@@ -1,5 +1,5 @@
|
|
/*
|
|
- * Copyright (c) 2014,2016 Red Hat.
|
|
+ * Copyright (c) 2014,2016,2025 Red Hat.
|
|
* Headers for "multilib" support (32-bit and 64-bit packages co-existing)
|
|
*
|
|
* This library is free software; you can redistribute it and/or modify it
|
|
@@ -19,5 +19,7 @@
|
|
#define HAVE_32BIT_LONG 1
|
|
#define HAVE_32BIT_PTR 1
|
|
/* #undef HAVE_64BIT_PTR */
|
|
+#define PM_PAD_RESULT 4
|
|
+#define PM_PAD_TIMESPEC 4
|
|
|
|
#endif /* PCP_CONFIG32_H */
|
|
diff -Naurp pcp-6.3.7.orig/src/include/pcp/config64.h pcp-6.3.7/src/include/pcp/config64.h
|
|
--- pcp-6.3.7.orig/src/include/pcp/config64.h 2024-07-30 16:43:55.000000000 +1000
|
|
+++ pcp-6.3.7/src/include/pcp/config64.h 2025-06-26 19:38:57.871276548 +1000
|
|
@@ -1,5 +1,5 @@
|
|
/*
|
|
- * Copyright (c) 2014,2016 Red Hat.
|
|
+ * Copyright (c) 2014,2016,2025 Red Hat.
|
|
* Headers for "multilib" support (32-bit and 64-bit packages co-existing)
|
|
*
|
|
* This library is free software; you can redistribute it and/or modify it
|
|
@@ -19,5 +19,7 @@
|
|
/* #undef HAVE_32BIT_LONG */
|
|
/* #undef HAVE_32BIT_PTR */
|
|
#define HAVE_64BIT_PTR 1
|
|
+/* #undef PM_PAD_RESULT */
|
|
+/* #undef PM_PAD_TIMESPEC */
|
|
|
|
#endif /* PCP_CONFIG64_H */
|
|
diff -Naurp pcp-6.3.7.orig/src/include/pcp/config.h.in pcp-6.3.7/src/include/pcp/config.h.in
|
|
--- pcp-6.3.7.orig/src/include/pcp/config.h.in 2025-03-14 14:41:06.000000000 +1100
|
|
+++ pcp-6.3.7/src/include/pcp/config.h.in 2025-06-26 19:38:57.871702924 +1000
|
|
@@ -792,6 +792,9 @@
|
|
#undef HAVE__ETEXT
|
|
#undef HAVE_ETEXT
|
|
|
|
+/* multilib headers */
|
|
+#undef HAVE_MULTILIB
|
|
+
|
|
/* sizeof suseconds_t ... only ever going to exist on linux-like systems */
|
|
#undef PM_SIZEOF_SUSECONDS_T
|
|
|
|
@@ -801,9 +804,3 @@
|
|
#ifndef PM_SIZEOF_TIME_T
|
|
#error Unknown time_t size
|
|
#endif
|
|
-
|
|
-/* __pmResult padding */
|
|
-#undef PM_PAD_RESULT
|
|
-
|
|
-/* timespec padding */
|
|
-#undef PM_PAD_TIMESPEC
|
|
diff -Naurp pcp-6.3.7.orig/src/include/pcp/configsz.h.in pcp-6.3.7/src/include/pcp/configsz.h.in
|
|
--- pcp-6.3.7.orig/src/include/pcp/configsz.h.in 2024-07-30 16:43:55.000000000 +1000
|
|
+++ pcp-6.3.7/src/include/pcp/configsz.h.in 2025-06-26 19:38:57.872742426 +1000
|
|
@@ -1,5 +1,5 @@
|
|
/*
|
|
- * Copyright (c) 2014-2017 Red Hat.
|
|
+ * Copyright (c) 2014-2017,2025 Red Hat.
|
|
*
|
|
* 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
|
|
@@ -26,4 +26,10 @@
|
|
/* pointer size */
|
|
#undef HAVE_64BIT_PTR
|
|
|
|
+/* __pmResult padding */
|
|
+#undef PM_PAD_RESULT
|
|
+
|
|
+/* timespec padding */
|
|
+#undef PM_PAD_TIMESPEC
|
|
+
|
|
#endif /* PCP_CONFIGSZ_H */
|
|
diff -Naurp pcp-6.3.7.orig/src/include/pcp/GNUmakefile pcp-6.3.7/src/include/pcp/GNUmakefile
|
|
--- pcp-6.3.7.orig/src/include/pcp/GNUmakefile 2024-07-30 16:43:55.000000000 +1000
|
|
+++ pcp-6.3.7/src/include/pcp/GNUmakefile 2025-06-26 19:38:57.873157593 +1000
|
|
@@ -22,11 +22,16 @@ SDSH_HFILES = sds.h sdsalloc.h
|
|
EXTERNAL_HFILES = dict.h
|
|
HFILES = pmapi.h impl.h pmda.h pmtime.h pmdaroot.h pmafm.h \
|
|
trace.h trace_dev.h mmv_stats.h mmv_dev.h import.h \
|
|
- config32.h config64.h platform32.h platform64.h \
|
|
pmjson.h pmhttp.h pmdbg.h pmwebapi.h deprecated.h \
|
|
ini.h sds.h dict.h archive.h
|
|
-INFILES = config.h.in configsz.h.in platform_defs.h.in platformsz.h.in
|
|
-CONFFILES = config.h configsz.h platform_defs.h platformsz.h
|
|
+INFILES = config.h.in platform_defs.h.in
|
|
+CONFFILES = config.h platform_defs.h
|
|
+ifeq "$(ENABLE_MULTILIB)" "true"
|
|
+HFILES += config32.h config64.h platform32.h platform64.h
|
|
+else
|
|
+INFILES += configsz.h.in platformsz.h.in
|
|
+CONFFILES += configsz.h platformsz.h
|
|
+endif
|
|
GENERATED_HFILES = $(CONFFILES)
|
|
NOSHIP_HFILES = libpcp.h sdsalloc.h
|
|
|
|
diff -Naurp pcp-6.3.7.orig/src/include/pcp/platform_defs.h.in pcp-6.3.7/src/include/pcp/platform_defs.h.in
|
|
--- pcp-6.3.7.orig/src/include/pcp/platform_defs.h.in 2025-03-31 12:41:26.000000000 +1100
|
|
+++ pcp-6.3.7/src/include/pcp/platform_defs.h.in 2025-06-26 19:38:57.873423552 +1000
|
|
@@ -36,7 +36,7 @@ extern "C" {
|
|
#define FMT_PID "@fmt_pid@"
|
|
#define FMT_PTHREAD "@fmt_pthread@"
|
|
|
|
-#ifdef HAVE_BITS_WORDSIZE_H
|
|
+#if defined(HAVE_MULTILIB) && defined(HAVE_BITS_WORDSIZE_H)
|
|
#include <bits/wordsize.h>
|
|
#if __WORDSIZE == 32
|
|
#include "config32.h"
|