From 8a209c638d58aac2aab751a49f77b64c112b3f97 Mon Sep 17 00:00:00 2001 From: Carlos O'Donell Date: Thu, 28 Feb 2019 02:09:46 -0500 Subject: [PATCH] Work around compiler warning in microbenchmarks. Raised upstream: https://www.sourceware.org/ml/libc-alpha/2019-02/msg00656.html --- glibc-warning-fix.patch | 25 +++++++++++++++++++++++++ glibc.spec | 6 +++++- 2 files changed, 30 insertions(+), 1 deletion(-) create mode 100644 glibc-warning-fix.patch diff --git a/glibc-warning-fix.patch b/glibc-warning-fix.patch new file mode 100644 index 0000000..0e4afa1 --- /dev/null +++ b/glibc-warning-fix.patch @@ -0,0 +1,25 @@ +Temporary work around to fix compiler warning for set but not used +'res' variable. + +e.g. +BUILDSTDERR: bench-malloc-simple.c: In function 'bench': +BUILDSTDERR: bench-malloc-simple.c:89:17: error: variable 'res' set but not used [-Werror=unused-but-set-variable] +BUILDSTDERR: 89 | unsigned long res; +BUILDSTDERR: | ^~~ +BUILDSTDERR: cc1: all warnings being treated as errors + +Affects aarch64, armv7hl, and s390x. + +diff --git a/benchtests/bench-malloc-simple.c b/benchtests/bench-malloc-simple.c +index 83203ff3187654a1..e449dd5a2e351278 100644 +--- a/benchtests/bench-malloc-simple.c ++++ b/benchtests/bench-malloc-simple.c +@@ -90,6 +90,8 @@ bench (unsigned long size) + + TIMING_INIT (res); + ++ (void) res; ++ + for (int t = 0; t <= 3; t++) + for (int i = 0; i < NUM_ALLOCS; i++) + { diff --git a/glibc.spec b/glibc.spec index f95d41d..c1f1c27 100644 --- a/glibc.spec +++ b/glibc.spec @@ -87,7 +87,7 @@ Summary: The GNU libc libraries Name: glibc Version: %{glibcversion} -Release: 1%{?dist} +Release: 2%{?dist} # In general, GPLv2+ is used by programs, LGPLv2+ is used for # libraries. @@ -158,6 +158,7 @@ Patch18: glibc-c-utf8-locale.patch Patch23: glibc-python3.patch Patch28: glibc-rh1615608.patch Patch29: glibc-rh1670028.patch +Patch30: glibc-warning-fix.patch ############################################################################## # Continued list of core "glibc" package information: @@ -1889,6 +1890,9 @@ fi %files -f compat-libpthread-nonshared.filelist -n compat-libpthread-nonshared %changelog +* Wed Feb 27 2019 Carlos O'Donell - 2.29.9000-2 +- Fix build failure related to microbenchmarks. + * Tue Feb 26 2019 Carlos O'Donell - 2.29.9000-1 - Auto-sync with upstream branch master, commit e0cb7b6131ee5f2dca2938069b8b9590304e6f6b: