LWN.net Logo

Advertisement

E-Commerce & credit card processing - the Open Source way!

Advertise here

Options

Options

Posted Jul 27, 2006 18:47 UTC (Thu) by NAR (subscriber, #1313)
Parent article: Optimizing Linker Load Times

If I understood correctly, these optimizations are enabled by "magic" options (e.g. -Bdirect, -zdynsort), i.e. application developers need to put these options into their Makefiles to enable them. Of course, first they need to find these options and understand them. However, I'm afraid most application developers doesn't have a clue about these delicate details of runtime linking, so will there be a --make-as-fast-as-possible option for the mere mortals? Or will -O<high> turn these options on?

Bye,NAR


(Log in to post comments)

Options

Posted Jul 27, 2006 21:56 UTC (Thu) by bluefoxicy (guest, #25366) [Link]

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.

Copyright © 2008, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds