-
Notifications
You must be signed in to change notification settings - Fork 571
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
libjulia: update to 1.8.2 and latest 1.9-DEV (#5506)
* libjulia: update to 1.8.2 and latest 1.9-DEV * Fix aarch64 unwind stuff and more Co-authored-by: Benjamin Lorenz <[email protected]>
- Loading branch information
Showing
5 changed files
with
93 additions
and
43 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26 changes: 0 additions & 26 deletions
26
L/libjulia/bundled/patches/1.8.0-DEV/debuginfo-32-bit-arm.patch
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
From cc7f4029d82343f1c109d925fa4beb1c87a62387 Mon Sep 17 00:00:00 2001 | ||
From: Max Horn <[email protected]> | ||
Date: Thu, 27 Oct 2022 17:06:17 +0200 | ||
Subject: [PATCH] Provider cycleclock() for 32bit ARM targets | ||
|
||
Taken from https://github.com/google/benchmark/blob/main/src/cycleclock.h | ||
--- | ||
src/julia_internal.h | 23 +++++++++++++++++++++++ | ||
1 file changed, 23 insertions(+) | ||
|
||
diff --git a/src/julia_internal.h b/src/julia_internal.h | ||
index 7eb34239e7..9eec7f5b69 100644 | ||
--- a/src/julia_internal.h | ||
+++ b/src/julia_internal.h | ||
@@ -20,6 +20,9 @@ | ||
#else | ||
#define sleep(x) Sleep(1000*x) | ||
#endif | ||
+#if defined(_CPU_ARM_) | ||
+#include <sys/time.h> | ||
+#endif | ||
|
||
#ifdef __cplusplus | ||
extern "C" { | ||
@@ -216,6 +219,26 @@ static inline uint64_t cycleclock(void) JL_NOTSAFEPOINT | ||
int64_t virtual_timer_value; | ||
__asm__ volatile("mrs %0, cntvct_el0" : "=r"(virtual_timer_value)); | ||
return virtual_timer_value; | ||
+#elif defined(_CPU_ARM_) | ||
+ // V6 is the earliest arch that has a standard cyclecount | ||
+#if (__ARM_ARCH >= 6) | ||
+ uint32_t pmccntr; | ||
+ uint32_t pmuseren; | ||
+ uint32_t pmcntenset; | ||
+ // Read the user mode perf monitor counter access permissions. | ||
+ asm volatile("mrc p15, 0, %0, c9, c14, 0" : "=r"(pmuseren)); | ||
+ if (pmuseren & 1) { // Allows reading perfmon counters for user mode code. | ||
+ asm volatile("mrc p15, 0, %0, c9, c12, 1" : "=r"(pmcntenset)); | ||
+ if (pmcntenset & 0x80000000ul) { // Is it counting? | ||
+ asm volatile("mrc p15, 0, %0, c9, c13, 0" : "=r"(pmccntr)); | ||
+ // The counter is set up to count every 64th cycle | ||
+ return (int64_t)(pmccntr) * 64; // Should optimize to << 6 | ||
+ } | ||
+ } | ||
+#endif | ||
+ struct timeval tv; | ||
+ gettimeofday(&tv, NULL); | ||
+ return (int64_t)(tv.tv_sec) * 1000000 + tv.tv_usec; | ||
#elif defined(_CPU_PPC64_) | ||
// This returns a time-base, which is not always precisely a cycle-count. | ||
// https://reviews.llvm.org/D78084 | ||
-- | ||
2.38.1 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
diff --git a/Make.inc b/Make.inc | ||
index dfc2594c40..72fb4b4b01 100644 | ||
--- a/Make.inc | ||
+++ b/Make.inc | ||
@@ -774,7 +774,7 @@ else ifeq (cygwin, $(shell $(CC) -dumpmachine | cut -d\- -f3)) | ||
$(error "cannot build julia with cygwin-target compilers. set XC_HOST to i686-w64-mingw32 or x86_64-w64-mingw32 for mingw cross-compile") | ||
else ifeq (msys, $(shell $(CC) -dumpmachine | cut -d\- -f3)) | ||
$(error "cannot build julia with msys-target compilers. please see the README.windows document for instructions on setting up mingw-w64 compilers") | ||
-else ifneq (,$(findstring MSYS,$(shell uname))) | ||
+else ifneq (,$(findstring MSYS,$(BUILD_OS))) | ||
$(error "cannot build julia from a msys shell. please launch a mingw shell instead by setting MSYSTEM=MINGW64") | ||
endif | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters