summaryrefslogtreecommitdiff
path: root/gcc/configure.ac
diff options
context:
space:
mode:
authorppalka <ppalka@138bc75d-0d04-0410-961f-82ee72b054a4>2016-07-20 14:09:20 +0000
committerppalka <ppalka@138bc75d-0d04-0410-961f-82ee72b054a4>2016-07-20 14:09:20 +0000
commit655e3fb1e1c820f79952bd8c79d6cb753ca23ecf (patch)
treee493a2b224e1d6b742eeae1b08d074cd841ea941 /gcc/configure.ac
parentd0f11d683993cac93ddfa00c7628e167d08585a1 (diff)
downloadgcc-655e3fb1e1c820f79952bd8c79d6cb753ca23ecf.tar.gz
Build libbackend.a as a thin archive if possible
gcc/ChangeLog: * configure.ac (thin_archive_support): New variable. AC_SUBST it. * configure: Regenerate. * Makefile.in (THIN_ARCHIVE_SUPPORT): New variable. (USE_THIN_ARCHIVES): New variable. (libbackend.a): If USE_THIN_ARCHIVES then pass T to ar to build this archive as a thin archive. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@238524 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/configure.ac')
-rw-r--r--gcc/configure.ac13
1 files changed, 13 insertions, 0 deletions
diff --git a/gcc/configure.ac b/gcc/configure.ac
index 086d0fc3eca..241e82dfc72 100644
--- a/gcc/configure.ac
+++ b/gcc/configure.ac
@@ -4899,6 +4899,19 @@ if test "x$gcc_cv_as_line_zero" = xyes; then
[Define if the assembler won't complain about a line such as # 0 "" 2.])
fi
+AC_MSG_CHECKING(support for thin archives)
+thin_archive_support=no
+echo 'int main (void) { return 0; }' > conftest.c
+if ($AR --version | sed 1q | grep "GNU ar" \
+ && $CC $CFLAGS -c conftest.c \
+ && $AR rcT conftest.a conftest.o \
+ && $CC $CFLAGS $LDFLAGS -o conftest conftest.a) >/dev/null 2>&1; then
+ thin_archive_support=yes
+fi
+rm -f conftest.c conftest.o conftest.a conftest
+AC_MSG_RESULT($thin_archive_support)
+AC_SUBST(thin_archive_support)
+
AC_MSG_CHECKING(linker PT_GNU_EH_FRAME support)
gcc_cv_ld_eh_frame_hdr=no
if test $in_tree_ld = yes ; then