Compile a C program on Linux using another glibc library

I have a Linux firewall device database that have glibc-2.3.4, and I don't have gcc to compile a program for this. when I compile the program using another Linux machine, the error message says:

glibc.xxx required

How can I compile a c program on another Linux machine for this version of glibc?

+3
source share
2 answers

The apbuild-apgcc tool installs everything related to older versions of glibc characters.

+1
source

, , . libc . , . , . , .

, libc, , -nostdinc -nostdlib- ( ) . gcc -v. :

/usr/bin/ld --eh-frame-hdr -V -dynamic-linker /libexec/ld-elf.so.1 \
  -o t /usr/lib/crt1.o /usr/lib/crti.o /usr/lib/crtbegin.o \
  -L/usr/lib -L/usr/lib /tmp//ccCb5j33.o -lgcc --as-needed -lgcc_s \
  --no-as-needed -lc -lgcc --as-needed -lgcc_s --no-as-needed \
  /usr/lib/crtend.o /usr/lib/crtn.o

libc . , startup (crt1.o crti.o), cleanup (crtend.o, crtn.o), libc ( -lc) ; , .

P.S. , , :)

+1

Source: https://habr.com/ru/post/1759748/


All Articles