3

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.

1
  • Did you find a way to build a "one program"? I'm building only objdump. What arguments I need to pass to configure to build only objdump (and required by objdump libraries)?
    – pmor
    Apr 24, 2023 at 9:40

1 Answer 1

3

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.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .