Created attachment 303501 [details] Fix --as-needed unneded usage After compile, i get error on execute: ~ # faketime '2011-10-20 01:10:10' /bin/date date: symbol lookup error: /usr/lib/faketime/libfaketime.so.1: undefined symbol: dlsym because "--as-needed" added to default LD_FLAGS Adding " pkg_setup() { append-ldflags $(no-as-needed) } " fix these problem. Before: " i686-pc-linux-gnu-gcc -o libfaketime.so.1 -Wl,-soname,libfaketime.so.1 -Wl,-O1 -Wl,--as-needed -shared -ldl -lm -lpthread faketime.o i686-pc-linux-gnu-gcc -o libfaketimeMT.so.1 -Wl,-soname,libfaketimeMT.so.1 -Wl,-O1 -Wl,--as-needed -shared -ldl -lm -lpthread faketimeMT.o " After: " i686-pc-linux-gnu-gcc -o libfaketime.so.1 -Wl,-soname,libfaketime.so.1 -Wl,-O1 -Wl,--as-needed -Wl,--no-as-needed -shared -ldl -lm -lpthread faketime.o i686-pc-linux-gnu-gcc -o libfaketimeMT.so.1 -Wl,-soname,libfaketimeMT.so.1 -Wl,-O1 -Wl,--as-needed -Wl,--no-as-needed -shared -ldl -lm -lpthread faketimeMT.o "
I fixed the underlying linking order problem so building with --as-needed works fine with the latest revision.