diff options
author | Khem Raj <raj.khem@gmail.com> | 2019-03-15 17:13:48 -0700 |
---|---|---|
committer | Khem Raj <raj.khem@gmail.com> | 2019-03-15 17:15:05 -0700 |
commit | 319789e47c8d730820f3fb52059654a2a35d82fd (patch) | |
tree | b764d9bddd53f6414307972b90f378d5c8747533 /meta-oe/recipes-dbs | |
parent | 98461f1c2e8e4e82b87515a2eb7244e287966dff (diff) | |
download | meta-openembedded-319789e47c8d730820f3fb52059654a2a35d82fd.tar.gz |
postgresql: Fix build for RISC-V
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'meta-oe/recipes-dbs')
-rw-r--r-- | meta-oe/recipes-dbs/postgresql/files/0001-Add-support-for-RISC-V.patch | 41 | ||||
-rw-r--r-- | meta-oe/recipes-dbs/postgresql/postgresql_11.2.bb | 1 |
2 files changed, 42 insertions, 0 deletions
diff --git a/meta-oe/recipes-dbs/postgresql/files/0001-Add-support-for-RISC-V.patch b/meta-oe/recipes-dbs/postgresql/files/0001-Add-support-for-RISC-V.patch new file mode 100644 index 000000000..865ad3287 --- /dev/null +++ b/meta-oe/recipes-dbs/postgresql/files/0001-Add-support-for-RISC-V.patch | |||
@@ -0,0 +1,41 @@ | |||
1 | From b06a228a5fd1589fc9bed654b3288b321fc21aa1 Mon Sep 17 00:00:00 2001 | ||
2 | From: "Richard W.M. Jones" <rjones@redhat.com> | ||
3 | Date: Sun, 20 Nov 2016 15:04:52 +0000 | ||
4 | Subject: [PATCH] Add support for RISC-V. | ||
5 | |||
6 | The architecture is sufficiently similar to aarch64 that simply | ||
7 | extending the existing aarch64 macro works. | ||
8 | --- | ||
9 | src/include/storage/s_lock.h | 5 +++-- | ||
10 | 1 file changed, 3 insertions(+), 2 deletions(-) | ||
11 | |||
12 | diff --git a/src/include/storage/s_lock.h b/src/include/storage/s_lock.h | ||
13 | index 3fe29ce..7cd578f 100644 | ||
14 | --- a/src/include/storage/s_lock.h | ||
15 | +++ b/src/include/storage/s_lock.h | ||
16 | @@ -316,11 +316,12 @@ tas(volatile slock_t *lock) | ||
17 | |||
18 | /* | ||
19 | * On ARM and ARM64, we use __sync_lock_test_and_set(int *, int) if available. | ||
20 | + * On RISC-V, the same. | ||
21 | * | ||
22 | * We use the int-width variant of the builtin because it works on more chips | ||
23 | * than other widths. | ||
24 | */ | ||
25 | -#if defined(__arm__) || defined(__arm) || defined(__aarch64__) || defined(__aarch64) | ||
26 | +#if defined(__arm__) || defined(__arm) || defined(__aarch64__) || defined(__aarch64) || defined(__riscv) | ||
27 | #ifdef HAVE_GCC__SYNC_INT32_TAS | ||
28 | #define HAS_TEST_AND_SET | ||
29 | |||
30 | @@ -337,7 +338,7 @@ tas(volatile slock_t *lock) | ||
31 | #define S_UNLOCK(lock) __sync_lock_release(lock) | ||
32 | |||
33 | #endif /* HAVE_GCC__SYNC_INT32_TAS */ | ||
34 | -#endif /* __arm__ || __arm || __aarch64__ || __aarch64 */ | ||
35 | +#endif /* __arm__ || __arm || __aarch64__ || __aarch64 || __riscv */ | ||
36 | |||
37 | |||
38 | /* S/390 and S/390x Linux (32- and 64-bit zSeries) */ | ||
39 | -- | ||
40 | 2.9.3 | ||
41 | |||
diff --git a/meta-oe/recipes-dbs/postgresql/postgresql_11.2.bb b/meta-oe/recipes-dbs/postgresql/postgresql_11.2.bb index b87289a1b..0f59c8dd1 100644 --- a/meta-oe/recipes-dbs/postgresql/postgresql_11.2.bb +++ b/meta-oe/recipes-dbs/postgresql/postgresql_11.2.bb | |||
@@ -4,6 +4,7 @@ LIC_FILES_CHKSUM = "file://COPYRIGHT;md5=87da2b84884860b71f5f24ab37e7da78" | |||
4 | 4 | ||
5 | SRC_URI += "\ | 5 | SRC_URI += "\ |
6 | file://not-check-libperl.patch \ | 6 | file://not-check-libperl.patch \ |
7 | file://0001-Add-support-for-RISC-V.patch \ | ||
7 | " | 8 | " |
8 | 9 | ||
9 | SRC_URI[md5sum] = "19d43be679cb0d55363feb8926af3a0f" | 10 | SRC_URI[md5sum] = "19d43be679cb0d55363feb8926af3a0f" |