Skip to content

Commit

Permalink
app-benchmarks/i7z: Fix for gcc10 and some typos
Browse files Browse the repository at this point in the history
(from Debian)

Package-Manager: Portage-2.3.100, Repoman-2.3.22
Signed-off-by: Pacho Ramos <[email protected]>
  • Loading branch information
pacho2 committed May 31, 2020
1 parent d98e07d commit 9eda907
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 3 deletions.
17 changes: 17 additions & 0 deletions app-benchmarks/i7z/files/gcc-10.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
Author: Andreas Beckmann <[email protected]>
Description: fix FTBFS with gcc-10
gcc-10 defaults to -fno-common
see https://gcc.gnu.org/gcc-10/porting_to.html
Bug-Debian: https://bugs.debian.org/957351

--- a/i7z_Dual_Socket.c
+++ b/i7z_Dual_Socket.c
@@ -37,7 +37,7 @@ float Read_Voltage_CPU(int cpu_num);
extern struct program_options prog_options;
FILE *fp_log_file;

-struct timespec global_ts;
+extern struct timespec global_ts;
extern FILE *fp_log_file_freq_1, *fp_log_file_freq_2;

extern char* CPU_FREQUENCY_LOGGING_FILE_single;
25 changes: 25 additions & 0 deletions app-benchmarks/i7z/files/typos.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
Author: Andreas Beckmann <[email protected]>
Description: fix typos found by Lintian

--- a/helper_functions.c
+++ b/helper_functions.c
@@ -528,7 +528,7 @@ void Test_Or_Make_MSR_DEVICE_FILES()
n=`expr $n + 1`; \
done; \
");
- printf ("i7z DEBUG: modprobbing for msr\n");
+ printf ("i7z DEBUG: modprobing for msr\n");
system ("modprobe msr");
} else {
printf ("i7z DEBUG: You DO NOT have root privileges, mknod to create device entries won't work out\n");
--- a/perfmon-i7z/helper_functions.cpp
+++ b/perfmon-i7z/helper_functions.cpp
@@ -484,7 +484,7 @@ void Test_Or_Make_MSR_DEVICE_FILES()
n=`expr $n + 1`; \
done; \
");
- printf ("i7z DEBUG: modprobbing for msr\n");
+ printf ("i7z DEBUG: modprobing for msr\n");
system ("modprobe msr");
} else {
printf ("i7z DEBUG: You DONOT have root privileges, mknod to create device entries won't work out\n");
5 changes: 2 additions & 3 deletions app-benchmarks/i7z/i7z-93_p20131012-r2.ebuild
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,13 @@ PATCHES=(
"${FILESDIR}"/install-i7z_rw_registers.patch
"${FILESDIR}"/use_stdbool.patch
"${FILESDIR}"/nehalem.patch
"${FILESDIR}"/gcc-10.patch
"${FILESDIR}"/typos.patch
)

S="${WORKDIR}/${PN}-${COMMIT}"

src_configure() {
# Workaround to build with gcc-10 until I find a patch
append-cflags -fcommon

tc-export CC PKG_CONFIG
cd GUI || die
use qt5 && eqmake5 ${PN}_GUI.pro
Expand Down

0 comments on commit 9eda907

Please sign in to comment.