Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Bug 837618 - teach expandlibs_exec.py about OS X's -filelist linker o…
…ption; r=glandium
  • Loading branch information
froydnj committed Apr 16, 2013
1 parent 0e69d13 commit 95b3000
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 2 deletions.
8 changes: 7 additions & 1 deletion build/autoconf/expandlibs.m4
Expand Up @@ -20,7 +20,13 @@ AC_CACHE_CHECK(what kind of list files are supported by the linker,
EXPAND_LIBS_LIST_STYLE=linkerscript
else
echo "conftest.${OBJ_SUFFIX}" > conftest.list
if AC_TRY_COMMAND(${CC-cc} -o conftest${ac_exeext} $LDFLAGS @conftest.list $LIBS 1>&5) && test -s conftest${ac_exeext}; then
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(${CC-cc} -o conftest${ac_exeext} $LDFLAGS [-Wl,-filelist,conftest.list] $LIBS 1>&5) && test -s conftest${ac_exeext}; then
EXPAND_LIBS_LIST_STYLE=filelist
elif AC_TRY_COMMAND(${CC-cc} -o conftest${ac_exeext} $LDFLAGS @conftest.list $LIBS 1>&5) && test -s conftest${ac_exeext}; then
EXPAND_LIBS_LIST_STYLE=list
else
EXPAND_LIBS_LIST_STYLE=none
Expand Down
3 changes: 3 additions & 0 deletions config/expandlibs_exec.py
Expand Up @@ -98,6 +98,9 @@ def makelist(self):
if conf.EXPAND_LIBS_LIST_STYLE == "linkerscript":
content = ['INPUT("%s")\n' % obj for obj in objs]
ref = tmp
elif conf.EXPAND_LIBS_LIST_STYLE == "filelist":
content = ["%s\n" % obj for obj in objs]
ref = "-Wl,-filelist," + tmp
elif conf.EXPAND_LIBS_LIST_STYLE == "list":
content = ["%s\n" % obj for obj in objs]
ref = "@" + tmp
Expand Down
8 changes: 7 additions & 1 deletion js/src/build/autoconf/expandlibs.m4
Expand Up @@ -20,7 +20,13 @@ AC_CACHE_CHECK(what kind of list files are supported by the linker,
EXPAND_LIBS_LIST_STYLE=linkerscript
else
echo "conftest.${OBJ_SUFFIX}" > conftest.list
if AC_TRY_COMMAND(${CC-cc} -o conftest${ac_exeext} $LDFLAGS @conftest.list $LIBS 1>&5) && test -s conftest${ac_exeext}; then
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(${CC-cc} -o conftest${ac_exeext} $LDFLAGS [-Wl,-filelist,conftest.list] $LIBS 1>&5) && test -s conftest${ac_exeext}; then
EXPAND_LIBS_LIST_STYLE=filelist
elif AC_TRY_COMMAND(${CC-cc} -o conftest${ac_exeext} $LDFLAGS @conftest.list $LIBS 1>&5) && test -s conftest${ac_exeext}; then
EXPAND_LIBS_LIST_STYLE=list
else
EXPAND_LIBS_LIST_STYLE=none
Expand Down
3 changes: 3 additions & 0 deletions js/src/config/expandlibs_exec.py
Expand Up @@ -98,6 +98,9 @@ def makelist(self):
if conf.EXPAND_LIBS_LIST_STYLE == "linkerscript":
content = ['INPUT("%s")\n' % obj for obj in objs]
ref = tmp
elif conf.EXPAND_LIBS_LIST_STYLE == "filelist":
content = ["%s\n" % obj for obj in objs]
ref = "-Wl,-filelist," + tmp
elif conf.EXPAND_LIBS_LIST_STYLE == "list":
content = ["%s\n" % obj for obj in objs]
ref = "@" + tmp
Expand Down

0 comments on commit 95b3000

Please sign in to comment.