dmd.snap:2.087

Last commit made on 2019-08-13
Get this branch:
git clone -b 2.087 https://git.launchpad.net/dmd.snap

Branch merges

Branch information

Name:
2.087
Repository:
lp:dmd.snap

Recent commits

4269f9b... by Ermesto Castellotti

Update to 2.087.1 stable release

https://dlang.org/changelog/2.087.1.html
https://github.com/dlang/dmd/releases/tag/v2.087.1

d8335d0... by Ermesto Castellotti

Update to 2.087.0 stable release (#40)

* Update to 2.087.0 stable release

https://dlang.org/changelog/2.087.0.html
https://github.com/dlang/dmd/releases/tag/v2.087.0

* Removed the hack for the soname symlink

Since the versions starting from phobos 2.087 have this
merged pull request: dlang/phobos#6966
It is no longer necessary to manually create the symlink.

762b4be... by Joseph Wakeling

Update to 2.086.1 stable release

https://dlang.org/changelog/2.086.1.html
https://github.com/dlang/dmd/releases/tag/v2.086.1

41590ac... by Joseph Wakeling

Revert "Removed the hack for the soname symlink"

This reverts commit 81121388003524852b37a72a0506bfa3da2c5c15.

Upstream phobos still does not generate the symlink, even though the PR
adding it was merged before the 2.086.0 release. We therefore need to
keep this workaround in the snap package.

bcc978c... by Ermesto Castellotti

Update to 2.086.0 stable release

https://dlang.org/changelog/2.086.0.html
https://github.com/dlang/dmd/releases/tag/v2.086.0

8112138... by Ermesto Castellotti

Removed the hack for the soname symlink

The phobos makefile during the "install" task does not create the
Since the versions starting from phobos 2.086 have this
merged pull request: https://github.com/dlang/phobos/pull/6966
it is no longer necessary to manually create the symlink.

0767d8c... by Ermesto Castellotti

Fixed build problem for i386

f456839... by Ermesto Castellotti

Added the missing sys link of libphobos
The phobos makefile during the "install" task does not create the
symbolic link of libphobos2.so.X.Y.Z to libphobos2.so.X.Y, this causes
problems loading the shared phobos library, so we go to create the
symbolic link manually.

6e80be2... by Ermesto Castellotti

Makes LD_LIBRARY_PATH more priority
An expert user might want to replace the shared phobos library
with a compiled by him, generally using LD_LIBRARY_PATH to
specify the path of a temporary library.

Unfortunately rpath has more priority than LD_LIBRARY_PATH,
so in the presence of the snap package it would be impossible to
use LD_LIBRARY_PATH.

Fortunately GNU-LD.SO contains the functionality new-dtags, which
allows to give more priority to LD_LIBRARY_PATH.

So just enable it to change how the linker works as follows:
path specified with LD_LIBRARY_PATH -> if missing -> RPATH in our package -> if missing -> path specified in ld.so.conf -> default path of ld.so (/usr/lib and /lib)

4f79f83... by Ermesto Castellotti

 Setup rpath for compiled executables

In order to use phobos as a shared library, the linker needs
to know where to look for the library (the .so file), generally
all libraries are placed in /usr/lib or in /usr/lib/x86_64-linux-gnu.

Unfortunately the path in which the snaps are installed
(/snap/<snap name)> is not configured in /etc/ld.so.conf,
which describes the path where the linker can look for libraries,
because of this it would be impossible to load the phobos shared
library contained in this snap package.

To make up for this lack we can use the rpath, which allows us to
specify in the compiled executable the position in which the linker
should go looking before using ld.so.conf.
By setting the path for all the executables compiled by dmd
contained in our package, we will force the linker to search first in our
path, in this way it will be possible to use the shared phobos library
because the linker will have the possibility to find it within the
path specified with rpath.

In short, the linker will search like this:
RPATH in our package -> if missing -> path specified with LD_LIBRARY_PATH -> if missing -> path specified in ld.so.conf -> default path of ld.so (/usr/lib and /lib)

Using rpath it will not cause any incompatibility problem with the
compiled executables because in case of lack of the specified path it
will go anyway to look for ld.so.conf
Furthermore the use of rpath will increase the security of the
executables linked with the shared phobos library because it will be
impossible to replace the library in the presence of the snap package.