Since there are many programs that are not related to my interests, I'd like to build a specific program in GNU binutils on Ubuntu.

Program means that one binary file (e.g., ar, objcopy)

for example, I'm interested in the ar among the ar, objdump, objcopy, readelf, ...

What should I do for this?

I've tried to remove other source code in binutils-version/binutils/Makefile

But, Makefile still produced object files for all programs (Makefile also exists in binutils-version/)

Give me a fresh idea to build one program, please.


You can disable building specific directories in the GNU binutils repository by calling configure.sh with --disable-DIR switches, as per this question on StackOverflow.

I don't know a way to enable/disable components more targeted, but when you use for example --disable-gdb and --disable-ld, this speeds up the build significantly.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.