Link with --as-needed option fails
Vitaliy Tomin
highwaystar.ru at gmail.com
Sun Aug 15 12:18:45 CEST 2010
Current getstream fails to link when compiling with --as-needed gcc
option. This happens because libraries to link defined before objects,
but --as-needed requires objects then libraries to link.
I suggest small patch for Makefile:
all: getstream tsdecode
tsdecode: $(OBJ-tsdecode)
- gcc $(LDFLAGS) -o $@ $+
+ gcc -o $@ $+ $(LDFLAGS)
getstream: $(OBJ-getstream)
- gcc $(LDFLAGS) -o $@ $+
+ gcc -o $@ $+ $(LDFLAGS)
clean:
Some reading about --as-needed :
http://www.gentoo.org/proj/en/qa/asneeded.xml
By the way, latest getstream packages for openSUSE 11.1, 11.2, 11.3 in
my buildservice project:
https://build.opensuse.org/package/show?package=getstream&project=home:HighwayStar:sandbox
and repository:
http://download.opensuse.org/repositories/home:/HighwayStar:/sandbox/
More information about the Getstream
mailing list