3

With IBM's cc compiler there is one option -brtl.

cc-brtl .....

This option does the following:-

-brtl Tells the linkage editor to accept both .so and .a library file types.

I am using gcc compiler now on ubuntu. I want to know what is the corresponding option in gcc to achieve the same thing?

Grv
  • 273
  • 3
  • 14

1 Answers1

4

You don't need that option for gcc. The link editor will accept both so and a files by default, with so files being preferred. You can think of gcc as having the opposite behaviour to IBM's C compiler: The behaviour without any options is as if you provided -brtl to IBM's C compiler, while the option -static turns of dynamic linking (and thus causes gcc to not take so files into consideration), which is as if you didn't specify -brtl to IBM's C compiler.

fuz
  • 88,405
  • 25
  • 200
  • 352