Subject: pkg/24415: libtool compile mode breaks with -l/-L arguments
To: None <>
From: None <>
List: netbsd-bugs
Date: 02/13/2004 18:42:18
>Number:         24415
>Category:       pkg
>Synopsis:       libtool compile mode breaks with -l/-L arguments
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Feb 13 17:42:00 UTC 2004
>Originator:     Julio M. Merino Vidal
>Release:        NetBSD 1.6ZJ
Julio M. Merino Vidal <>
The NetBSD Project -
System: NetBSD dawn.local 1.6ZJ NetBSD 1.6ZJ (DAWN) #2: Tue Feb 10 14:12:32 CET 2004 jmmv@dawn.local:/home/build/obj/home/NetBSD/src/sys/arch/i386/compile/DAWN i386
Architecture: i386
Machine: i386
        libtool 1.5.x breaks when -l/-L arguments are passed to a '--compile'
        call.  If these appear before the '-c' flag, it works, but not if they
        appear at the end of the call.  For example:

        $ libtool --mode=compile gcc -c foo.c -lm
        libtool: compile: cannot determine name of library object from `-lm' 

        $ libtool --mode=compile gcc -lm -c foo.c 
        (this works)

        buildlink3 is causing problems WRT this because it moves these flags
        to the end of the call, if they appear, even if they were placed
        properly in the first place.  (I agree that programs should never add
        such flags to CFLAGS, but...)
        jlam@ suggested to fill this PR because buildlink3 should handle this
        by sorting the arguments properly (or at least, not make the problem