fix shared library building

This commit is contained in:
Mike Frysinger 2005-09-08 01:51:36 +00:00
parent 74862dcd6c
commit 8df304656c
6 changed files with 1847 additions and 30 deletions

View File

@ -0,0 +1,41 @@
--- glib-1.2.10/gstrfuncs.c.orig 2001-02-27 07:00:22.000000000 +0100
+++ glib-1.2.10/gstrfuncs.c 2004-03-01 13:19:49.531603760 +0100
@@ -867,7 +867,7 @@
/* beware of positional parameters
*/
case '$':
- g_warning (G_GNUC_PRETTY_FUNCTION
+ g_warning ("%s%s", G_GNUC_PRETTY_FUNCTION,
"(): unable to handle positional parameters (%%n$)");
len += 1024; /* try adding some safety padding */
break;
@@ -1034,7 +1034,7 @@
/* n . dddddddddddddddddddddddd E +- eeee */
conv_len += 1 + 1 + MAX (24, spec.precision) + 1 + 1 + 4;
if (spec.mod_extra_long)
- g_warning (G_GNUC_PRETTY_FUNCTION
+ g_warning ("%s%s", G_GNUC_PRETTY_FUNCTION,
"(): unable to handle long double, collecting double only");
#ifdef HAVE_LONG_DOUBLE
#error need to implement special handling for long double
@@ -1077,7 +1077,7 @@
conv_done = TRUE;
if (spec.mod_long)
{
- g_warning (G_GNUC_PRETTY_FUNCTION
+ g_warning ("%s%s", G_GNUC_PRETTY_FUNCTION,
"(): unable to handle wide char strings");
len += 1024; /* try adding some safety padding */
}
@@ -1108,9 +1108,8 @@
conv_len += format - spec_start;
break;
default:
- g_warning (G_GNUC_PRETTY_FUNCTION
- "(): unable to handle `%c' while parsing format",
- c);
+ g_warning ("%s(): unable to handle `%c' while parsing format",
+ G_GNUC_PRETTY_FUNCTION, c);
break;
}
conv_done |= conv_len > 0;

Binary file not shown.

View File

@ -17,15 +17,16 @@ libglib12-source: $(DL_DIR)/$(LIBGLIB12_SOURCE)
$(LIBGLIB12_DIR)/.unpacked: $(DL_DIR)/$(LIBGLIB12_SOURCE)
$(LIBGLIB12_CAT) $(DL_DIR)/$(LIBGLIB12_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
toolchain/patch-kernel.sh $(LIBGLIB12_DIR) package/libglib12/ \*-patch\*
toolchain/patch-kernel.sh $(LIBGLIB12_DIR) package/libglib12/ \*.patch*
$(CONFIG_UPDATE) $(LIBGLIB12_DIR)
touch $(LIBGLIB12_DIR)/.unpacked
$(LIBGLIB12_DIR)/.configured: $(LIBGLIB12_DIR)/.unpacked
(cd $(LIBGLIB12_DIR); rm -rf config.cache; \
$(TARGET_CONFIGURE_OPTS) \
./configure \
--target=$(GNU_TARGET_NAME) \
--host=$(GNU_TARGET_NAME) \
--host=$(REAL_GNU_TARGET_NAME) \
--build=$(GNU_HOST_NAME) \
--prefix=/usr \
--exec-prefix=/usr \
--bindir=/usr/bin \
@ -63,8 +64,8 @@ $(STAGING_DIR)/lib/$(LIBGLIB12_BINARY): $(LIBGLIB12_DIR)/.libs/$(LIBGLIB12_BINAR
$(TARGET_DIR)/lib/$(LIBGLIB12_BINARY): $(STAGING_DIR)/lib/$(LIBGLIB12_BINARY)
cp -a $(STAGING_DIR)/lib/$(LIBGLIB12_BINARY) $(TARGET_DIR)/lib/
#cp -a $(STAGING_DIR)/lib/libglib.so $(TARGET_DIR)/lib/
#cp -a $(STAGING_DIR)/lib/libglib-1.2.so.0 $(TARGET_DIR)/lib/
cp -a $(STAGING_DIR)/lib/libglib.so $(TARGET_DIR)/lib/
cp -a $(STAGING_DIR)/lib/libglib-1.2.so.0 $(TARGET_DIR)/lib/
$(STRIP) --strip-unneeded $(TARGET_DIR)/lib/$(LIBGLIB12_BINARY)
libglib12: uclibc $(TARGET_DIR)/lib/$(LIBGLIB12_BINARY)

File diff suppressed because it is too large Load Diff

View File

@ -1,25 +0,0 @@
--- glib-1.2.10/glib.orig.h 2004-10-14 01:11:45.000000000 -0600
+++ glib-1.2.10/glib.h 2004-10-14 01:12:02.000000000 -0600
@@ -271,14 +271,15 @@
/* Wrap the gcc __PRETTY_FUNCTION__ and __FUNCTION__ variables with
* macros, so we can refer to them as strings unconditionally.
+ * usage not-recommended since gcc-3.0
*/
-#ifdef __GNUC__
-#define G_GNUC_FUNCTION __FUNCTION__
-#define G_GNUC_PRETTY_FUNCTION __PRETTY_FUNCTION__
-#else /* !__GNUC__ */
-#define G_GNUC_FUNCTION ""
-#define G_GNUC_PRETTY_FUNCTION ""
-#endif /* !__GNUC__ */
+#if defined (__GNUC__) && (__GNUC__ < 3)
+#define G_GNUC_FUNCTION __FUNCTION__
+#define G_GNUC_PRETTY_FUNCTION __PRETTY_FUNCTION__
+#else /* !__GNUC__ */
+#define G_GNUC_FUNCTION ""
+#define G_GNUC_PRETTY_FUNCTION ""
+#endif /* !__GNUC__ */
/* we try to provide a usefull equivalent for ATEXIT if it is
* not defined, but use is actually abandoned. people should