AppImageCommunity / libappimage

Implements functionality for dealing with AppImage files
https://appimage.org
Other
46 stars 29 forks source link

Provide libappimage.[a,so] as linker scripts #187

Open darealshinji opened 1 year ago

darealshinji commented 1 year ago

libappimage.so should probably be provided as a linker script that links the shared library together with the static library parts. The file content would be: INPUT(libappimage.so.1.0 libappimage_hashlib.a libappimage_shared.a)

For libappimage.a I would to the same and copy/rename all the required static libraries that are used to link the shared library version:

INPUT
(
  libappimage_static.a
  libappimage_static_libxdg-basedir.a
  libappimage_hashlib.a
  libappimage_shared.a
  libappimage_static_libarchive.a
  libappimage_static_libXdgUtilsDesktopEntry.a
  libappimage_static_libXdgUtilsBaseDir.a
  libappimage_static_libsquashfuse.a
  libappimage_static_libsquashfuse_ll.a
  libappimage_static_libfuseprivate.a
  libappimage_static_liblzma.a
)

Examples of other libraries that do this:

cat /usr/lib/gcc/x86_64-linux-gnu/12/libgcc_s.so
cat /usr/lib/x86_64-linux-gnu/libncurses.so

I would also suggest to rename libappimage_shared.a to libappimage_private.a or something similar.