[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[patch #10393] Fix shared library support on Android
From: |
Bruno Haible |
Subject: |
[patch #10393] Fix shared library support on Android |
Date: |
Mon, 18 Sep 2023 07:25:08 -0400 (EDT) |
URL:
<https://savannah.gnu.org/patch/?10393>
Summary: Fix shared library support on Android
Group: GNU Libtool
Submitter: haible
Submitted: Mon 18 Sep 2023 01:25:06 PM CEST
Category: None
Priority: 5 - Normal
Status: None
Privacy: Public
Assigned to: None
Originator Email:
Open/Closed: Open
Discussion Lock: Any
_______________________________________________________
Follow-up Comments:
-------------------------------------------------------
Date: Mon 18 Sep 2023 01:25:06 PM CEST By: Bruno Haible <haible>
On Android, within the termux environment, I encountered two problems during
the "make install" phase of GNU gettext. The attached patch fixes them.
1) On this platform, libtool is configured to relink libraries during "make
install". This leads to a problem during the installation of libgettextsrc:
The relink command that libtool emits has the form
$CC -shared -fPIC -DPIC .libs/*.o -L$(libdir) ... -lgettextlib ... -o
.libs/libgettextsrc-@VERSION@.soT
The option -lgettextlib resolves to $(libdir)/libgettextlib.a, not to
$(libdir)/libgettextlib-@VERSION@.so. Thus the linker attempts to include many
object files from libgettextlib.a into libgettextsrc-@VERSION@.soT, but some
of these reference global variables in a non-PIC way, and the linker thus
complains
ld.lld: error: relocation R_ARM_REL32 cannot be used against symbol
'program_name'; recompile with -fPIC
2) The installed executables don't have a RUNPATH property that points to the
directory that contains the shared libraries. Thus these executables don't
run.
_______________________________________________________
File Attachments:
-------------------------------------------------------
Date: Mon 18 Sep 2023 01:25:06 PM CEST Name:
0001-Fix-shared-library-support-on-Android.patch Size: 2KiB By: haible
<http://savannah.gnu.org/patch/download.php?file_id=55144>
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/patch/?10393>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
- [patch #10393] Fix shared library support on Android,
Bruno Haible <=