From 51aee962a46ae24169a2519567ebaa52313acbeb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C3=A9ter=20G=C3=A1l?= Date: Tue, 28 Jul 2020 14:36:45 +0200 Subject: [PATCH] Fix inline errors with fPIC (#4078) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit In case of `-fPIC` and single file build one of the Regexp's method raises an error during linking: ``` ecma-regexp-object.c: In function ‘ecma_regexp_run’: re-bytecode.c:258:1: error: inlining failed in call to ‘always_inline’ ‘re_get_value’: function body can be overwritten at link time ``` By adding the `inline` keyword for the method the build error can be resolved. JerryScript-DCO-1.0-Signed-off-by: Peter Gal pgal.usz@partner.samsung.com --- jerry-core/parser/regexp/re-bytecode.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jerry-core/parser/regexp/re-bytecode.c b/jerry-core/parser/regexp/re-bytecode.c index 015894518..92ac0604b 100644 --- a/jerry-core/parser/regexp/re-bytecode.c +++ b/jerry-core/parser/regexp/re-bytecode.c @@ -254,7 +254,7 @@ re_insert_value (re_compiler_ctx_t *re_ctx_p, /**< RegExp bytecode context */ * * @return decoded value */ -uint32_t JERRY_ATTR_ALWAYS_INLINE +inline uint32_t JERRY_ATTR_ALWAYS_INLINE re_get_value (const uint8_t **bc_p) /** refence to bytecode pointer */ { uint32_t value = *(*bc_p)++;