summaryrefslogtreecommitdiff
path: root/old-configure.in
diff options
context:
space:
mode:
authorJeremy Andrews <athenian200@outlook.com>2021-11-22 23:52:44 -0600
committerJeremy Andrews <athenian200@outlook.com>2021-11-22 23:52:44 -0600
commitaad9e8efc5de44949725d37f44ec2d125f33211a (patch)
tree5a363c6710fc0b3aa7290af76f87aec40529c8da /old-configure.in
parentbaad25e39733dfc3dd310198fdcced00ffbef68b (diff)
downloadaura-central-aad9e8efc5de44949725d37f44ec2d125f33211a.tar.gz
Issue %3041 - 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: http://xref.palemoon.org/goanna-central/source/platform/libs/nspr/src/pr/src/md/unix/Makefile.in%76 http://xref.palemoon.org/goanna-central/source/platform/libs/nss/src/coreconf/UNIX.mk%34 http://xref.palemoon.org/goanna-central/source/palemoon/app/Makefile.in%30 http://xref.palemoon.org/goanna-central/source/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.in19
1 files changed, 14 insertions, 5 deletions
diff --git a/old-configure.in b/old-configure.in
index 0bfc312a3..430a10937 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
@@ -4560,6 +4568,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)