Posted Jul 27, 2006 21:56 UTC (Thu) by bluefoxicy
In reply to: Options
Parent article: Optimizing Linker Load Times
Actually most Makefiles allow the build system to accept variables from the environment or command line; portage puts CFLAGS and LDFLAGS in the environment, and dpkg-buildpackage tends to put them on the make command line.
These are all linker options, so 'gcc -O99' won't do it. It'd be more like 'gcc -Wl,-O1,-Bdirect,-z,dynsort,-hashvals' or (since hashvals and dynsort are getting merged as --hash-style) 'gcc -Wl,-O1,-Bdirect,--hash-style=both'.
To that end, you'd see something like LDFLAGS="-Wl,-O1,-Bdirect,--hash-style=both" either as an argument to make or in the environment. The Makefile will adapt, at least with automake; if it won't, then the distro maintainers will patch it to accept LDFLAGS properly.
to post comments)