This is the mail archive of the
libc-help@sourceware.org
mailing list for the glibc project.
Re: Build a program using a custom glibc
On May 25, 2012, at 11:38 PM, Paul Pluzhnikov wrote:
> On Fri, May 25, 2012 at 8:28 PM, Amittai Aviram <amittai.aviram@yale.edu> wrote:
>> gcc -nodefaultlibs -static -libgcc -L~/GLIBC/glibc_install/lib -o myprog myprog.c
>
> Also note that your command line currently is *completely* bogus:
> -llibgcc asks the linker to look for liblibgcc.{a,so}; perhaps you
> meant '-lc' to link with libc?
Sorry--that was a typo in my e-mail, not in my command line. I had -lgcc. I was trying to follow the suggestions found here:
http://gcc.gnu.org/onlinedocs/gcc-4.7.0/gcc/Link-Options.html#Link-Options
--under "-nodefaultlibs."
> The order of libraries and sources on the command line matters:
> http://webpages.charter.net/ppluzhnikov/linker.html
I know, but my command line only had one library search path and one source file. Anyway, I'll try your suggestion with "make check."
> Finally, "-L~/..." will not be expanded by the shell. Try '-L ~/...'
> or '-L$HOME/...' instead.
>
Actually, I entered the absolute path, but had the same results.
Amittai