Operating System - HP-UX
1827295 Members
2182 Online
109717 Solutions
New Discussion

how to include libgcc.a in the makefile

 
Hanry Zhou
Super Advisor

how to include libgcc.a in the makefile

I am trying to compile openssh 3.8 on 11.0 box, and it needs libgcc.a. It is located under /usr/local/lib/gcc-lib/hppa2.on-hp-hpux11.00/3.3.2.

In Makefile, there is a line:
LIBS=-lcrypto -lnsl -lxnet -lsec -lz
How should I add the libgcc in the line, and
any other chnages I need to make, ex, SHLIB_PATH, or LD_LIBRARY_PATH.

Please let me know.

Thanks,

none
3 REPLIES 3
A. Clay Stephenson
Acclaimed Contributor

Re: how to include libgcc.a in the makefile

The convention is that -lnsl (for example) is shorthand for libnsl.a (if I assume you are using the archive .a versions of the library). This also means that the linker expect the libraries to be found in the standard locations (usually /usr/lib). The list of standard lirary locations can be augmented with -L options like -L /usr/local/lib/gcc-lib/hppa2. These are generally defined in $(LDFLAGS) in a makefile but that is determined by the makefile. In the worst case, you can spell out the pathname of the library in full detail.


Man ld for details.
If it ain't broke, I can fix that.
Tom Elder
Advisor

Re: how to include libgcc.a in the makefile

IMHO you copy libgcc.a into /usr/local/lib and then do ./configure and then make; this has generally resolved my problems on linux OS's; seems to be true for HP_UX as well but have not tried what you are attempting.
T G Manikandan
Honored Contributor

Re: how to include libgcc.a in the makefile

Yes,add it to the variable LD_LIBRARY_PATH