LDFLAGS not respected for libgif.so
A library and utilities for processing GIFs
Brought to you by:
abadger1999,
esr
Currently LDFLAGS are respected when building executables (e.g. gif2rgb, gifbuild, gifecho, giffilter), but not when building libgif.so library which has custom rule in Makefile.
Makefile sets LDFLAGS = -g which does not make sense. ld tool does not use such option. ld(1) man page says:
-g Ignored. Provided for compatibility with other tools.
Suggested fix:
--- Makefile
+++ Makefile
@@ -10,7 +10,6 @@
OFLAGS = -O0 -g
#OFLAGS = -O2 -fwhole-program
CFLAGS = -std=gnu99 -fPIC -Wall -Wno-format-truncation $(OFLAGS)
-LDFLAGS = -g
SHELL = /bin/sh
TAR = tar
@@ -66,7 +65,7 @@
$(UTILS):: libgif.a
libgif.so: $(OBJECTS) $(HEADERS)
- $(CC) $(CFLAGS) -shared $(OFLAGS) -Wl,-soname -Wl,libgif.so.$(LIBMAJOR) -o libgif.so $(OBJECTS)
+ $(CC) $(CFLAGS) -shared $(LDFLAGS) -Wl,-soname -Wl,libgif.so.$(LIBMAJOR) -o libgif.so $(OBJECTS)
libgif.a: $(OBJECTS) $(HEADERS)
$(AR) rcs libgif.a $(OBJECTS)
xxx
Patch accepted and pushed,