This patch enables building glibc-2.2.5 using TCC and GNU Make 4.x and Mes C Library. * Makefile: Do not link with (non-existent) libgc_eh. * Makefile: Add SHELL variable, ready for substitution, export it. * Makefile: Do not build or assume librpc_compat_pic. * Makefile: Do not build libmesusage. * gen-as-const: Always add preamble. * [BOOTSTRAP_GLIBC]: Really disable rpc. Upstream status: Not presented upstream. diff '--exclude=*.orig' -purN /home/janneke/src/glibc-2.16.0/elf/Makefile glibc-2.16.0/elf/Makefile --- /home/janneke/src/glibc-2.16.0/elf/Makefile 2012-06-30 21:12:34.000000000 +0200 +++ glibc-2.16.0/elf/Makefile 2018-09-02 12:54:44.616962543 +0200 @@ -17,6 +17,8 @@ # Makefile for elf subdirectory of GNU C Library. +SHELL := /bin/sh + subdir := elf headers = elf.h bits/elfclass.h link.h bits/link.h diff '--exclude=*.orig' -purN /home/janneke/src/glibc-2.16.0/include/libc-symbols.h glibc-2.16.0/include/libc-symbols.h --- /home/janneke/src/glibc-2.16.0/include/libc-symbols.h 2012-06-30 21:12:34.000000000 +0200 +++ glibc-2.16.0/include/libc-symbols.h 2018-09-02 22:41:00.798467803 +0200 @@ -558,9 +558,9 @@ for linking") # define libc_hidden_weak(name) hidden_weak (name) # ifdef LINK_OBSOLETE_RPC /* libc_hidden_nolink_sunrpc should only get used in sunrpc code. */ -# define libc_hidden_nolink_sunrpc(name, version) hidden_def (name) +# define libc_hidden_nolink_sunrpc(name, version) # else -# define libc_hidden_nolink_sunrpc(name, version) hidden_nolink (name, libc, version) +# define libc_hidden_nolink_sunrpc(name, version) # endif # define libc_hidden_ver(local, name) hidden_ver (local, name) # define libc_hidden_data_def(name) hidden_data_def (name) diff '--exclude=*.orig' -purN /home/janneke/src/glibc-2.16.0/Makeconfig glibc-2.16.0/Makeconfig --- /home/janneke/src/glibc-2.16.0/Makeconfig 2012-06-30 21:12:34.000000000 +0200 +++ glibc-2.16.0/Makeconfig 2018-09-03 00:00:25.290357414 +0200 @@ -23,6 +23,9 @@ ifneq (,) This makefile requires GNU Make. endif +SHELL := /bin/sh +export SHELL + all: # Make this the default goal ifneq "$(origin +included-Makeconfig)" "file" @@ -521,9 +524,9 @@ ifneq ($(have-cc-with-libunwind),yes) else libunwind = -lunwind endif -libgcc_eh := -Wl,--as-needed -lgcc_s $(libunwind) -Wl,--no-as-needed +libgcc_eh := #-Wl,--as-needed -lgcc_s $(libunwind) -Wl,--no-as-needed gnulib := -lgcc $(libgcc_eh) -static-gnulib := -lgcc -lgcc_eh $(libunwind) +static-gnulib := -lgcc $(libunwind) libc.so-gnulib := -lgcc endif +preinit = $(addprefix $(csu-objpfx),crti.o) diff '--exclude=*.orig' -purN /home/janneke/src/glibc-2.16.0/Mak