This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
[PATCH]: Recognise i586-pc-syllable
- From: Kristian Van Der Vliet <vanders at liqwyd dot com>
- To: libc-alpha at sourceware dot org
- Date: Tue, 04 Dec 2007 11:41:17 +0000
- Subject: [PATCH]: Recognise i586-pc-syllable
Syllable has now been using our port of Glibc on Syllable for over three
years, and I'd now like to get some of the more obvious patches merged
into the mainline sources.
There are three patches. The first adds i586-pc-syllable as a valid
target to configure.in, and the patch for shlib-versions likewise. I've
also included a patch for Makerules which adds a few Syllable-specific
portions which work around the lack of ld.so on Syllable (The RTLD is in
the kernel instead). Hopefully the first two are not a problem. I'd like
to see the Makerule patch merged also, but I understand if it isn't.
We're quite happy to maintain all the other patches and the Syllable
add-on sources out of the Glibc tree.
2007-12-04 Kristian Van Der Vliet <vanders@liqwyd.com>
* configure.in: Recognise target i586-pc-syllable
* configure: Regenerate.
* shlib-versions: Recognise i586-pc-syllable
* Makerules: Define build-module-helper-objlist diferently for
Syllable.
* Makerules (libc.so): Likewise.
--
Vanders
http://www.syllable.org
http://www.liqwyd.com
Index: configure.in
===================================================================
RCS file: /cvs/glibc/libc/configure.in,v
retrieving revision 1.471
diff -u -r1.471 configure.in
--- configure.in 19 Oct 2007 06:59:32 -0000 1.471
+++ configure.in 4 Dec 2007 11:16:53 -0000
@@ -283,7 +283,7 @@
# i586-linuxaout is mangled into i586-pc-linux-gnuaout
linux*ecoff* | linux*aout* | gnu*aout* | gnu*ecoff*)
;;
-gnu* | linux* | freebsd* | netbsd* | sysv4* | solaris2* | irix6*)
+gnu* | linux* | freebsd* | netbsd* | sysv4* | solaris2* | irix6* | syllable*)
# These systems (almost) always use the ELF format.
elf=yes
;;
@@ -463,7 +463,7 @@
###
if test -z "$enable_hacker_mode" && test x"$libc_config_ok" != xyes; then
case "$machine-$host_os" in
- *-linux* | *-gnu* | arm*-none* | powerpc-aix4.3.*)
+ *-linux* | *-gnu* | arm*-none* | powerpc-aix4.3.* | *-syllable*)
;;
*)
echo "*** The GNU C library is currently not available for this platform."
@@ -542,7 +542,7 @@
base_os=unix/bsd/bsd4.4 ;;
osf* | sunos* | ultrix* | newsos* | dynix* | *bsd*)
base_os=unix/bsd ;;
-sysv* | isc* | esix* | sco* | minix* | irix4* | linux*)
+sysv* | isc* | esix* | sco* | minix* | irix4* | linux* | syllable*)
base_os=unix/sysv ;;
irix6*)
base_os=unix/sysv/irix6/$os ;;
@@ -1351,6 +1351,9 @@
fi
fi
+ if test $host_os = syllable; then
+ libc_cv_initfinit_array=no
+ else
AC_CACHE_CHECK(for .preinit_array/.init_array/.fini_array support,
libc_cv_initfini_array, [dnl
cat > conftest.c <<EOF
@@ -1374,6 +1377,7 @@
if test $libc_cv_initfini_array != yes; then
AC_MSG_ERROR([Need linker with .init_array/.fini_array support.])
fi
+ fi
AC_CACHE_CHECK(for libunwind-support in compiler,
libc_cv_cc_with_libunwind, [
Index: Makerules
===================================================================
RCS file: /cvs/glibc/libc/Makerules,v
retrieving revision 1.450
diff -u -r1.450 Makerules
--- Makerules 26 Aug 2007 02:18:03 -0000 1.450
+++ Makerules 4 Dec 2007 11:17:37 -0000
@@ -581,9 +581,15 @@
endif
endif
+ifneq (syllable,$(config-os))
build-module-helper-objlist = \
$(patsubst %_pic.a,$(whole-archive) %_pic.a $(no-whole-archive),\
$(filter-out %.lds $(map-file) $(+preinit) $(+postinit),$^))
+else
+build-module-helper-objlist = \
+ $(patsubst %_pic.a,$(whole-archive) %_pic.a $(no-whole-archive),\
+ $(filter-out %.lds $(map-file) $(+preinit) $(+postinit) %ld.so %ld.so.1,$^))
+endif
whole-archive := -Wl,--whole-archive
build-module-objlist = $(build-module-helper-objlist) $(LDLIBS-$(@F:%.so=%).so)
@@ -611,6 +617,7 @@
$(common-objpfx)libc_pic.os: $(common-objpfx)libc_pic.a
$(LINK.o) -nostdlib -nostartfiles -r -o $@ \
$(LDFLAGS-c_pic.os) -Wl,-d -Wl,--whole-archive $^
+ifneq ($(config-os),syllable)
# Use our own special initializer and finalizer files for libc.so.
$(common-objpfx)libc.so: $(elfobjdir)/soinit.os \
$(common-objpfx)libc_pic.os \
@@ -618,6 +625,14 @@
$(elfobjdir)/interp.os $(elfobjdir)/ld.so \
$(common-objpfx)shlib.lds
$(build-shlib)
+else
+# No ld.so exists on Syllable
+$(common-objpfx)libc.so: $(elfobjdir)/soinit.os \
+ $(common-objpfx)libc_pic.os \
+ $(elfobjdir)/sofini.os \
+ $(elfobjdir)/interp.os $(common-objpfx)shlib.lds
+ $(build-shlib)
+endif
ifeq ($(versioning),yes)
$(common-objpfx)libc.so: $(common-objpfx)libc.map
endif
Index: shlib-versions
===================================================================
RCS file: /cvs/glibc/libc/shlib-versions,v
retrieving revision 1.73
diff -u -r1.73 shlib-versions
--- shlib-versions 6 Mar 2006 01:25:35 -0000 1.73
+++ shlib-versions 4 Dec 2007 11:17:48 -0000
@@ -31,6 +31,7 @@
x86_64-.*-linux.* DEFAULT GLIBC_2.2.5
powerpc64-.*-linux.* DEFAULT GLIBC_2.3
.*-.*-gnu-gnu.* DEFAULT GLIBC_2.2.6
+.*-.*-syllable.* DEFAULT GLIBC_2.3
# Configuration WORDSIZE[32|64] Alternate configuration
# ------------- ---------- -----------------------
@@ -53,6 +54,7 @@
sh.*-.*-linux.* libm=6 GLIBC_2.2
.*-.*-linux.* libm=6
.*-.*-gnu-gnu.* libm=6
+.*-.*-syllable.* libm=2
# We provide libc.so.6 for Linux kernel versions 2.0 and later.
alpha.*-.*-linux.* libc=6.1
@@ -60,6 +62,7 @@
sh.*-.*-linux.* libc=6 GLIBC_2.2
sparc64.*-.*-linux.* libc=6 GLIBC_2.2
.*-.*-linux.* libc=6
+.*-.*-syllable.* libc=2
# libmachuser.so.1 corresponds to mach/*.defs as of Utah's UK22 release.
.*-.*-gnu-gnu.* libmachuser=1
@@ -91,16 +94,25 @@
# So far the -lutil interface is the same on all platforms, except for the
# `struct utmp' format, which depends on libc.
alpha.*-.*-linux.* libutil=1.1
+.*-.*-syllable.* libutil=1.1
.*-.*-.* libutil=1
# Version number 2 is used on other systems for the BIND 4.9.5 resolver
# interface.
alpha.*-.*-linux.* libresolv=2.1
+.*-.*-syllable.* libresolv=2.1
.*-.*-.* libresolv=2
# Interface revision of nss_* modules. This must match NSS_SHLIB_REVISION
# in nss/nsswitch.h, which determines the library names used for service
# names given in /etc/nsswitch.conf.
+.*-.*-syllable.* libnss_files=2.1
+.*-.*-syllable.* libnss_dns=2.1
+.*-.*-syllable.* libnss_compat=2.1
+.*-.*-syllable.* libnss_nis=2.1
+.*-.*-syllable.* libnss_nisplus=2.1
+.*-.*-syllable.* libnss_ldap=2.1
+.*-.*-syllable.* libnss_hesiod=2.1
.*-.*-.* libnss_files=2
.*-.*-.* libnss_dns=2
.*-.*-.* libnss_compat=2
@@ -111,10 +123,12 @@
# Version for libnsl with YP and NIS+ functions.
alpha.*-.*-linux.* libnsl=1.1
+.*-.*-syllable.* libnsl=1.1
.*-.*-.* libnsl=1
# This defines the shared library version numbers we will install.
alpha.*-.*-linux.* libcrypt=1.1
+.*-.*-syllable.* libcrypt=1.1
.*-.*-.* libcrypt=1
# The gross patch for programs assuming broken locale implementations.
@@ -122,6 +136,7 @@
ia64-.*-.* libBrokenLocale=1 GLIBC_2.2
sh.*-.*-.* libBrokenLocale=1 GLIBC_2.2
sparc64.*-.*-.* libBrokenLocale=1 GLIBC_2.2
+.*-.*-syllable.* libBrokenLocale=1.1
.*-.*-.* libBrokenLocale=1
# The real-time library from POSIX.1b.
@@ -129,3 +144,4 @@
# The asynchronous name lookup library.
.*-.*-.* libanl=1
+