Wednesday 18 September 2013

g++: error: unrecognized option ‘--as-needed’

g++: error: unrecognized option '--as-needed'

I am using Ubuntu 12.10 with a gcc version 4.6.3. I am trying to build my
code and getting an error when using 'make' command
g++: error: unrecognized option '--as-needed'
My Makefile looks as follows:
LFLAGS = -Wl,-rpath,. -Wl,-rpath-link,../bin --as-needed
LDFLAGS = $(RPATH) $(RPATHLINK) -L$(USRLIB) --as-needed
Previously this code was successfully building on RedHat Linux. But now I
need to run this code on Ubuntu.
If anyone knows about this. Please help
Regards Gaurav

No comments:

Post a Comment