[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: MinGW status
From: |
Ralf Wildenhues |
Subject: |
Re: MinGW status |
Date: |
Sun, 3 Oct 2004 12:06:28 +0200 |
User-agent: |
Mutt/1.5.6+20040722i |
* Bob Friesenhahn wrote on Sun, Oct 03, 2004 at 12:00:28AM CEST:
> On Sat, 2 Oct 2004, Ralf Wildenhues wrote:
>
> >* Bob Friesenhahn wrote on Sat, Oct 02, 2004 at 09:51:57PM CEST:
> >>This build script represents the current state of building CVS libltdl
> >>under MinGW. Symbols show up as unresolved. For example 'lt__malloc'
> >>is reported as unresolved, but nm shows that there is a '_lt__malloc'
> >>symbol in lt_alloc.o.
> >
> >Might I suggest you try the patch below? As I have no MinGW available I
> >cannot try it myself, sorry. It might need some adapting.
>
> Adapting? My foot! The patch worked! :-))
Yeah, but probably one would want this instead (undef LT_SCOPE again
afterwards), see below. Not that I know whether argz.h is used outside
of Libtool or what this requirement is for.
> >*snip*
> >>//scooby/bfriesen/src/gnu/libtool/libltdl/lt__private.h:121: warning:
> >>array
> >>`lt__error_strings' assumed to have one element
> >*snip*
> >
> >This is bad news indeed (but a different matter). It essentially means
> >that we are breaking binary compatibility as soon as we add another
> >warning, right? (The array size is part of the ABI). Very unfortunate.
>
> At first glance it does not appear to be a problem since the interface
> is merely an array of string pointers and the index into the array
> should be generated by libltdl itself so the array index should always
> be in bounds. Am I wrong?
Well, I'm not an expert on this subject. In Drepper's `How To Write
Shared Libraries', chapter 3.1, he mentions that ``On platforms which
require copy relocations to handle access to variables defined in DSOs
in the main application (such as IA-32) the size of the variable must
not change at all. Otherwise variables might increase in size.''
I don't what exactly is meant here, and consequently I don't know if
it applies to this case.
> >BTW, the #define hacks make us get away with the namespace w.r.t argz.h,
> >but not w.r.t slist.h. I think that needs to be addressed, right?
>
> Don't know. What I do know is that 'make' for libtool has now
> succeeded under MinGW.
>
> As far as how libltdl's build goes, I do not like it at all that
> libltdl is unnecessary introducing another installed library. I don't
> see a need for it. I also don't like it that libltdl's Makefile.am is
> referencing Automake's internal variables.
Which ones are Automake internal and not published interface?
> We should be able to reference the necessary source file's in the
> loaders subdirectory so that no extra convenience library is
> necessary. This approach risks the possibility that Automake might
> demand that the dependent package include a `compile' script though.
> According to libtool's own documentation, this should work for
> Automake 1.4 and later.
At the moment, I do not feel qualified to comment on this and the extra
library requirement you mention above.
Regards,
Ralf
Updated patch:
2004-10-02 Ralf Wildenhues <address@hidden>
* libltdl/argz_.h, libltdl/lt__alloc.h: export functions
portably.
Index: libltdl/argz_.h
===================================================================
RCS file: /cvsroot/libtool/libtool/libltdl/argz_.h,v
retrieving revision 1.1
diff -u -r1.1 argz_.h
--- libltdl/argz_.h 22 Apr 2004 22:47:20 -0000 1.1
+++ libltdl/argz_.h 3 Oct 2004 09:21:11 -0000
@@ -35,23 +35,30 @@
#if defined(LTDL)
# include "lt__glibc.h"
+# include "lt_system.h"
+#else
+# define LT_SCOPE
#endif
#if defined(_cplusplus)
extern "C" {
#endif
-error_t argz_append (char **pargz, size_t *pargz_len,
- const char *buf, size_t buf_len);
-error_t argz_create_sep (const char *str, int delim,
- char **pargz, size_t *pargz_len);
-error_t argz_insert (char **pargz, size_t *pargz_len,
- char *before, const char *entry);
-char * argz_next (char *argz, size_t argz_len, const char *entry);
-void argz_stringify (char *argz, size_t argz_len, int sep);
+LT_SCOPE error_t argz_append (char **pargz, size_t *pargz_len,
+ const char *buf, size_t buf_len);
+LT_SCOPE error_t argz_create_sep(const char *str, int delim,
+ char **pargz, size_t *pargz_len);
+LT_SCOPE error_t argz_insert (char **pargz, size_t *pargz_len,
+ char *before, const char *entry);
+LT_SCOPE char * argz_next (char *argz, size_t argz_len, const
char *entry);
+LT_SCOPE void argz_stringify (char *argz, size_t argz_len, int sep);
#if defined(_cplusplus)
}
#endif
+#if !defined(LTDL)
+# undef LT_SCOPE
+#endif
+
#endif /*!defined(LT__ARGZ_H)*/
Index: libltdl/lt__alloc.h
===================================================================
RCS file: /cvsroot/libtool/libtool/libltdl/lt__alloc.h,v
retrieving revision 1.4
diff -u -r1.4 lt__alloc.h
--- libltdl/lt__alloc.h 15 Jul 2004 12:14:47 -0000 1.4
+++ libltdl/lt__alloc.h 2 Oct 2004 20:35:09 -0000
@@ -43,14 +43,14 @@
} LT_STMT_END
/* If set, this function is called when memory allocation has failed. */
-extern void (*lt__alloc_die) (void);
+LT_SCOPE void (*lt__alloc_die) (void);
-void *lt__malloc (size_t n);
-void *lt__zalloc (size_t n);
-void *lt__realloc (void *mem, size_t n);
-void *lt__memdup (void const *mem, size_t n);
+LT_SCOPE void *lt__malloc (size_t n);
+LT_SCOPE void *lt__zalloc (size_t n);
+LT_SCOPE void *lt__realloc (void *mem, size_t n);
+LT_SCOPE void *lt__memdup (void const *mem, size_t n);
-char *lt__strdup (const char *string);
+LT_SCOPE char *lt__strdup (const char *string);
LT_END_C_DECLS