From 864d80e14bf5746efb238ed6bb791bd5ac718797 Mon Sep 17 00:00:00 2001 From: Petko Bordjukov Date: Tue, 17 May 2016 02:17:48 +0300 Subject: [PATCH] Enable the -fPIC flag for arm, too It seems that -fPIC is required for 32-bit ARM, too. Trying to link against libv8 on an armv7l was causing the following linking error: relocation R_ARM_THM_MOVW_ABS_NC against `a local symbol' can not be used when making a shared object; recompile with -fPIC --- CHANGELOG.md | 2 ++ patches/fPIC-for-static.patch | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d6cf2cb..c64e724 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,7 @@ ### Unreleased +* Enable the -fPIC flag for ARM + ### 5.0.71.48.2, 5.0.71.48.3 - 2016-05-13: * Upgrade upstream v8 version to 5.0.71.45 diff --git a/patches/fPIC-for-static.patch b/patches/fPIC-for-static.patch index 05f6782..1a19c34 100644 --- a/patches/fPIC-for-static.patch +++ b/patches/fPIC-for-static.patch @@ -7,7 +7,7 @@ index 1252094..308a7e3 100644 'cflags': [ '-fvisibility=hidden' ], }], - [ 'component=="shared_library"', { -+ [ 'component=="shared_library" or component=="static_library" and (v8_target_arch=="x64" or v8_target_arch=="arm64")', { ++ [ 'component=="shared_library" or component=="static_library" and (v8_target_arch=="x64" or v8_target_arch=="arm64" or v8_target_arch=="arm")', { 'cflags': [ '-fPIC', ], }], [ 'coverage==1', {