[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
FYI: only warn about -l/-L when suitable
From: |
Ralf Wildenhues |
Subject: |
FYI: only warn about -l/-L when suitable |
Date: |
Sat, 12 Jan 2008 14:58:47 +0100 |
User-agent: |
Mutt/1.5.13 (2006-08-11) |
The duplicate_conv test exposed a bogus warning:
| ../../libtool/tests/duplicate_conv.at:79: $LIBTOOL --mode=link --tag=CC $CC
$CFLAGS $LDFLAGS -o cee.$OBJEXT c.lo a/liba.la b/liba.la
| ++ /tmp/libtool/HEAD/build/libtool --mode=link --tag=CC gcc -g -O2 -o cee.o
c.lo a/liba.la b/liba.la
| stderr:
| libtool: link: warning: `-l' and `-L' are ignored for objects
| stdout:
| libtool: link: /usr/bin/ld -m elf_x86_64 -r -o cee.o .libs/c.o
--whole-archive a/.libs/liba.a b/.libs/liba.a --no-whole-archive
which was also present for oldlib outputs (`-o libfoo.a').
There is code later in ltmain that errors out if any deplibs passed are
not in fact convenience archives (in both cases).
So I figured it was safe to apply this patch, HEAD and branch-1-5.
Cheers,
Ralf
2008-01-12 Ralf Wildenhues <address@hidden>
* libltdl/config/ltmain.m4sh (func_mode_link): Fix warning
about -l and -L for archives and objects as output, to not
trigger for *.la files. Non-convenience archives are diagnosed
later on.
Index: libltdl/config/ltmain.m4sh
===================================================================
RCS file: /cvsroot/libtool/libtool/libltdl/config/ltmain.m4sh,v
retrieving revision 1.94
diff -u -r1.94 ltmain.m4sh
--- libltdl/config/ltmain.m4sh 2 Jan 2008 19:35:56 -0000 1.94
+++ libltdl/config/ltmain.m4sh 11 Jan 2008 19:36:39 -0000
@@ -5080,9 +5080,10 @@
func_warning "\`-dlopen' is ignored for archives"
fi
- test -n "$deplibs" && \
- func_warning "\`-l' and \`-L' are ignored for archives"
-
+ case " $deplibs" in
+ *\ -l* | *\ -L*)
+ func_warning "\`-l' and \`-L' are ignored for archives" ;;
+ esac
test -n "$rpath" && \
func_warning "\`-rpath' is ignored for archives"
@@ -6359,8 +6360,10 @@
func_warning "\`-dlopen' is ignored for objects"
fi
- test -n "$deplibs" && \
- func_warning "\`-l' and \`-L' are ignored for objects"
+ case " $deplibs" in
+ *\ -l* | *\ -L*)
+ func_warning "\`-l' and \`-L' are ignored for objects" ;;
+ esac
test -n "$rpath" && \
func_warning "\`-rpath' is ignored for objects"
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- FYI: only warn about -l/-L when suitable,
Ralf Wildenhues <=