]> git.pld-linux.org Git - packages/elfutils.git/commitdiff
- fix building on x32
authorJan Rękorajski <baggins@pld-linux.org>
Fri, 27 Mar 2020 21:56:22 +0000 (22:56 +0100)
committerJan Rękorajski <baggins@pld-linux.org>
Fri, 27 Mar 2020 21:56:22 +0000 (22:56 +0100)
elfutils.spec
x32.patch [new file with mode: 0644]

index 3395f118269de2e70b1e87fe661df63c88891586..f8b05c458c147cb83e9c2c4c1869462f7067f8ea 100644 (file)
@@ -19,6 +19,7 @@ Patch3:               %{name}-align.patch
 Patch4:                %{name}-paxflags.patch
 Patch5:                %{name}-sparc.patch
 Patch6:                %{name}-cxx.patch
+Patch7:                x32.patch
 URL:           https://sourceware.org/elfutils/
 BuildRequires: autoconf >= 2.63
 BuildRequires: automake >= 1:1.11
@@ -182,14 +183,10 @@ Plik nagłówkowy biblioteki debuginfod.
 %patch4 -p1
 %patch5 -p1
 %patch6 -p1
+%patch7 -p1
 
 %{__rm} po/stamp-po
 
-# temporarily disable failing tests (depending on arch)
-%ifarch x32
-%{__sed} -i -e 's/run-backtrace-native-biarch.sh//' tests/Makefile.am
-%endif
-
 # make sure this is not even tried on arch it has no chance to run
 %ifarch %{ix86}
 %{__sed} -i -e 's/run-disasm-x86-64.sh//' tests/Makefile.am
diff --git a/x32.patch b/x32.patch
new file mode 100644 (file)
index 0000000..44baa61
--- /dev/null
+++ b/x32.patch
@@ -0,0 +1,63 @@
+diff -ur elfutils-0.178/debuginfod/debuginfod-client.c elfutils-0.178-x32/debuginfod/debuginfod-client.c
+--- elfutils-0.178/debuginfod/debuginfod-client.c      2019-11-26 23:48:42.000000000 +0100
++++ elfutils-0.178-x32/debuginfod/debuginfod-client.c  2020-03-27 22:47:53.398098750 +0100
+@@ -170,7 +170,11 @@
+   if (fd < 0)
+     return -errno;
++#if defined(__x86_64__) && defined(__ILP32__)
++  if (dprintf(fd, "%lld", cache_clean_default_interval_s) < 0)
++#else
+   if (dprintf(fd, "%ld", cache_clean_default_interval_s) < 0)
++#endif
+     return -errno;
+   /* init max age config file.  */
+@@ -178,7 +178,11 @@
+       && (fd = open(maxage_path, O_CREAT | O_RDWR, 0666)) < 0)
+     return -errno;
++#if defined(__x86_64__) && defined(__ILP32__)
++  if (dprintf(fd, "%lld", cache_default_max_unused_age_s) < 0)
++#else
+   if (dprintf(fd, "%ld", cache_default_max_unused_age_s) < 0)
++#endif
+     return -errno;
+   return 0;
+@@ -204,7 +204,11 @@
+       if (interval_file == NULL)
+         return -errno;
++#if defined(__x86_64__) && defined(__ILP32__)
++      int rc = fprintf(interval_file, "%lld", cache_clean_default_interval_s);
++#else
+       int rc = fprintf(interval_file, "%ld", cache_clean_default_interval_s);
++#endif
+       fclose(interval_file);
+       if (rc < 0)
+@@ -214,7 +214,11 @@
+   /* Check timestamp of interval file to see whether cleaning is necessary.  */
+   time_t clean_interval;
+   interval_file = fopen(interval_path, "r");
++#if defined(__x86_64__) && defined(__ILP32__)
++  if (fscanf(interval_file, "%lld", &clean_interval) != 1)
++#else
+   if (fscanf(interval_file, "%ld", &clean_interval) != 1)
++#endif
+     clean_interval = cache_clean_default_interval_s;
+   fclose(interval_file);
+@@ -227,7 +227,11 @@
+   max_unused_file = fopen(max_unused_path, "r");
+   if (max_unused_file)
+     {
++#if defined(__x86_64__) && defined(__ILP32__)
++      if (fscanf(max_unused_file, "%lld", &max_unused_age) != 1)
++#else
+       if (fscanf(max_unused_file, "%ld", &max_unused_age) != 1)
++#endif
+         max_unused_age = cache_default_max_unused_age_s;
+       fclose(max_unused_file);
+     }
This page took 0.031726 seconds and 4 git commands to generate.