summaryrefslogtreecommitdiffstats
path: root/build/autoconf
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-12 05:43:14 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-12 05:43:14 +0000
commit8dd16259287f58f9273002717ec4d27e97127719 (patch)
tree3863e62a53829a84037444beab3abd4ed9dfc7d0 /build/autoconf
parentReleasing progress-linux version 126.0.1-1~progress7.99u1. (diff)
downloadfirefox-8dd16259287f58f9273002717ec4d27e97127719.tar.xz
firefox-8dd16259287f58f9273002717ec4d27e97127719.zip
Merging upstream version 127.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'build/autoconf')
-rw-r--r--build/autoconf/expandlibs.m433
1 files changed, 13 insertions, 20 deletions
diff --git a/build/autoconf/expandlibs.m4 b/build/autoconf/expandlibs.m4
index 70bc153e66..b0fc6caf95 100644
--- a/build/autoconf/expandlibs.m4
+++ b/build/autoconf/expandlibs.m4
@@ -14,32 +14,25 @@ dnl ========================================================
AC_CACHE_CHECK(what kind of list files are supported by the linker,
moz_cv_expand_libs_list_style,
[echo "int main() {return 0;}" > conftest.${ac_ext}
- dnl Because BFD ld doesn't work with LTO + linker scripts, we
- dnl must pass the LTO CFLAGS to the compile command, and the LTO
- dnl LDFLAGS to all subsequent link commands.
- dnl https://sourceware.org/bugzilla/show_bug.cgi?id=23600
- if AC_TRY_COMMAND(${CC-cc} -o conftest.${OBJ_SUFFIX} -c $MOZ_LTO_CFLAGS $CFLAGS $CPPFLAGS conftest.${ac_ext} 1>&5) && test -s conftest.${OBJ_SUFFIX}; then
- echo "INPUT(conftest.${OBJ_SUFFIX})" > conftest.list
+ if AC_TRY_COMMAND(${CC-cc} -o conftest.${OBJ_SUFFIX} -c $CFLAGS $CPPFLAGS conftest.${ac_ext} 1>&5) && test -s conftest.${OBJ_SUFFIX}; then
if test "$CC_TYPE" = "clang-cl"; then
link="$LINKER -OUT:conftest${ac_exeext}"
else
link="${CC-cc} -o conftest${ac_exeext}"
fi
- if AC_TRY_COMMAND($link $MOZ_LTO_LDFLAGS $LDFLAGS conftest.list $LIBS 1>&5) && test -s conftest${ac_exeext}; then
- moz_cv_expand_libs_list_style=linkerscript
+ echo "conftest.${OBJ_SUFFIX}" > conftest.list
+ if AC_TRY_COMMAND($link $LDFLAGS [-Wl,@conftest.list] $LIBS 1>&5) && test -s conftest${ac_exeext}; then
+ moz_cv_expand_libs_list_style=linkerlist
+
+ dnl -filelist is for the OS X linker. We need to try -filelist first
+ dnl because clang understands @file, but may pass an oversized argument
+ dnl list to the linker depending on the contents of @file.
+ elif AC_TRY_COMMAND($link $LDFLAGS [-Wl,-filelist,conftest.list] $LIBS 1>&5) && test -s conftest${ac_exeext}; then
+ moz_cv_expand_libs_list_style=filelist
+ elif AC_TRY_COMMAND($link $LDFLAGS [@conftest.list] $LIBS 1>&5) && test -s conftest${ac_exeext}; then
+ moz_cv_expand_libs_list_style=list
else
- echo "conftest.${OBJ_SUFFIX}" > conftest.list
- dnl -filelist is for the OS X linker. We need to try -filelist
- dnl first because clang understands @file, but may pass an
- dnl oversized argument list to the linker depending on the
- dnl contents of @file.
- if AC_TRY_COMMAND($link $MOZ_LTO_LDFLAGS $LDFLAGS [-Wl,-filelist,conftest.list] $LIBS 1>&5) && test -s conftest${ac_exeext}; then
- moz_cv_expand_libs_list_style=filelist
- elif AC_TRY_COMMAND($link $MOZ_LTO_LDFLAGS $LDFLAGS @conftest.list $LIBS 1>&5) && test -s conftest${ac_exeext}; then
- moz_cv_expand_libs_list_style=list
- else
- AC_ERROR([Couldn't find one that works])
- fi
+ AC_ERROR([Couldn't find one that works])
fi
else
dnl We really don't expect to get here, but just in case