diff options
author | Jeremy Andrews <athenian200@outlook.com> | 2021-11-22 23:52:44 -0600 |
---|---|---|
committer | Moonchild <moonchild@palemoon.org> | 2022-04-06 00:04:36 +0200 |
commit | e6c662b5c67830c09df604aff125f7cf5bea3014 (patch) | |
tree | 3e9d328ad9d29dbc57ba2e07137e06136dee33c9 /old-configure.in | |
parent | 6abe7e7914006e6477f41c4d3f418ffd9da2c281 (diff) | |
download | uxp-e6c662b5c67830c09df604aff125f7cf5bea3014.tar.gz |
Issue # 1824 - Restore NSDISTMODE, and have SunOS use it by default.
To make a long story short, there's an old flag called NSDISTMODE that
was never added to old-configure so it could be passed down through the
build system to all the places it needs to go nowadays if used in your
.mozconfig, but which still sort of works when set as an environment
variable. If you leave it unset, it uses relative symlinks. However, it
has two other modes. One of them is "copy" and the other is
"absolute_symlink." Copy simply copies the files into the directory, and
absolute_symlink attempts to use absolute symlinks instead of relative
ones.
I've been wondering for a while now if there was a way to make the
shared library files in `dist/bin` that we use `./mach run` against
*not* be relative symlinks, and this seems to be that elusive technique.
It seems to be a part of the institutional memory that was all but lost
shortly after Netscape went under. You mostly see a few references to it
in NSS, NSPR, and the Makefiles in the `config` directory. And also
there is one reference in a Makefile in the application directory, which
seems to explains why application executables themselves usually aren't
symlinks:
/platform/libs/nspr/src/pr/src/md/unix/Makefile.in#76
/platform/libs/nss/src/coreconf/UNIX.mk#34
/palemoon/app/Makefile.in#30
/platform/config/config.mk#396
My patch essentially revives NSDISTMODE and makes it work as intended
again, more or less. Some parts of the work are loosely inspired by this
bug that was never finished upstream, showing that Mozilla only
rediscovered it earlier this year while trying to disable symlinks in
dist/bin for WSL, as far as I can tell.
https://bugzilla.mozilla.org/show_bug.cgi?id=1699855
Diffstat (limited to 'old-configure.in')
-rw-r--r-- | old-configure.in | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/old-configure.in b/old-configure.in index faed99df57..0d617a2236 100644 --- a/old-configure.in +++ b/old-configure.in @@ -1063,12 +1063,20 @@ case "$target" in fi ;; -i*86-*-solaris*) - MOZ_FIX_LINK_PATHS="-L${DIST}/bin -R'\$\$ORIGIN':/usr/gcc/7/lib" - ;; +*-solaris*) +dnl Set NSDISTMODE to copy mode on SunOS automatically. The dynamic linker +dnl uses the real path of a symlink after resolving it, which breaks the +dnl default mode that relies on relative symlinks being handled a certain way. + + if test -z "$NSDISTMODE"; then + NSDISTMODE=copy + fi -x86_64-*-solaris*) - MOZ_FIX_LINK_PATHS="-L${DIST}/bin -R'\$\$ORIGIN':/usr/gcc/7/lib/amd64" + if test "$CPU_ARCH" = "x86"; then + MOZ_FIX_LINK_PATHS="-L${DIST}/bin -R'\$\$ORIGIN':/usr/gcc/7/lib" + elif test "$CPU_ARCH" = "x86_64"; then + MOZ_FIX_LINK_PATHS="-L${DIST}/bin -R'\$\$ORIGIN':/usr/gcc/7/lib/amd64" + fi ;; esac @@ -4621,6 +4629,7 @@ AC_SUBST(INCREMENTAL_LINKER) AC_SUBST(MOZ_COMPONENTS_VERSION_SCRIPT_LDFLAGS) AC_SUBST(MOZ_FIX_LINK_PATHS) +AC_SUBST(NSDISTMODE) AC_SUBST(MOZ_POST_PROGRAM_COMMAND) AC_SUBST(MOZ_LINKER_EXTRACT) |