On Wed, Dec 01, 2010 at 12:00:51AM +0000, Connor Lane Smith wrote:
 
> What is the reason for the failure on OpenBSD?

Before doing anything, I had the same message as Josh's :

make                                                                            
                                                                                
       
dmenu build options:
CFLAGS   = -std=c99 -pedantic -Wall -Os -I/usr/X11R6/include -D_BSD_SOURCE 
-DVERSION="4.2.1" 
LDFLAGS  = -s -L/usr/X11R6/lib -lX11 
CC       = cc
CC -c dmenu.c
CC -c draw.c
CC -o dmenu
/usr/X11R6/lib/libX11.so.13.0: warning: strcpy() is almost always misused, 
please use strlcpy()
/usr/X11R6/lib/libX11.so.13.0: warning: sprintf() is often misused, please use 
snprintf()
/usr/X11R6/lib/libX11.so.13.0: warning: strcat() is almost always misused, 
please use strlcat()
/usr/lib/crt0.o(.text+0x93): In function `___start':
: undefined reference to `main'
collect2: ld returned 1 exit status
*** Error code 1

> I ask because the given
> patch bloats the dmenu_path binary with unnecessary X symbols. The
> reason for individual declarations for dmenu and dmenu_path, btw, was
> because otherwise GNU make decides that it can attempt to compile them
> without any of the specified flags. 

I first just tried to revert 320 while keeping along
with the style of the current Makefile,
I mean with the individual declarations:

dmenu dmenu_path:
        @echo CC -o $@
        @${CC} -o $@ $< draw.o ${LDFLAGS}

but make answered :

make                                                                            
                                                                                
       
dmenu build options:
CFLAGS   = -std=c99 -pedantic -Wall -Os -I/usr/X11R6/include -D_BSD_SOURCE 
-DVERSION="4.2.1" 
LDFLAGS  = -s -L/usr/X11R6/lib -lX11 
CC       = cc
CC -c dmenu.c
CC -c draw.c
Using $< in a non-suffix rule context is a GNUmake idiom (line 23 of Makefile)

and stopped, so I tried with a suffix rule and then it compiled happily,
but as I don't know much about all these stuffs,
I had no clue concerning the hidden consequences.

If my proposition bloats something it certainly
isn't ok for inclusion in mainline, but seems to show
that the issue could maybe be solved
using a different syntaxe in the Makefile, don't ask me which though.



Reply via email to