Re: Undefined use of weak symbols in gnulib

2021-05-02 Thread Alan Modra
ist or are both NULL. ppc gets that one wrong too. -- Alan Modra Australia Development Lab, IBM

Re: powerpc64le-linux long double math test failures

2013-12-17 Thread Alan Modra
y to come up with a patch, but I'd appreciate some guidance what > direction it should take. -- Alan Modra Australia Development Lab, IBM

Re: powerpc64le-linux long double math test failures

2014-04-29 Thread Alan Modra
Ping? https://lists.gnu.org/archive/html/bug-gnulib/2013-12/msg00107.html -- Alan Modra Australia Development Lab, IBM

[PATCH 1/5] obstack tidy

2014-07-25 Thread Alan Modra
a) Delete nonsense about "not polluting the namespace with stddef.h symbols" since string.h includes stddef.h a little later anyway. b) Don't roll our own slow memcpy in _obstack_newchunk. c) Rename obstack_free to _obstack_free. This makes the naming consistent with other obstack functions and

[PATCH 0/5] obstacks

2014-07-25 Thread Alan Modra
ready takes signigicant time in libiberty. I don't want to double that time. Alan Modra (5): obstack tidy 64-bit obstack support, part 1 64-bit obstack support, part 2 64-bit obstack support, part 3 obstack usability lib/obstack.

[PATCH] glibc 64-bit obstack support

2014-07-25 Thread Alan Modra
And >2G on 32-bit. * include/gnu-versions.h (_GNU_OBSTACK_INTERFACE_VERSION): Bump. * include/obstack.h: Add _obstack2_newchunk hidden proto. * malloc/obstack.h: Import from gnulib. * malloc/obstack.c: Likewise. * malloc/obstackv1.c: New file. * mall

[PATCH 2/5] 64-bit obstack support, part 1

2014-07-25 Thread Alan Modra
a) Correct calls to alloc function, to use a size_t arg. "long" is just wrong on targets like x86_64-mingw64 where "long" is 32 bits and "size_t" 64 bits. b) Consolidate _obstack_begin and _obstack_begin1 code. * lib/obstack.h (struct obstack ): Correct prototype to use "siz

[PATCH 4/5] 64-bit obstack support, part 3

2014-07-25 Thread Alan Modra
This finally enables full 64-bit obstack support. Renaming the _obstack_* functions to _obstack2_* is necessary to prevent a shared library using version 1 obstack functions from having these functions overridden by version 2 functions in the main executable. Not all shared libraries are created

[PATCH 3/5] 64-bit obstack support, part 2

2014-07-25 Thread Alan Modra
This gets us 4G obstack support, without changing ABI compatibility. a) Replace "int" size parameters, return values, and macro local vars with __OBSTACK_SIZE_T, an "unsigned int" for now. b) Make obstack.chunk_size a __CHUNK_SIZE_T, an "unsigned long" for now. c) Make all obstack macros checki

[PATCH 5/5] obstack usability

2014-07-25 Thread Alan Modra
When using obstack.h/c in other projects it isn't very nice that gnulib headers like exitfail.h and gettext.h need to be present. Far worse is a dependency on gnulib's version of stdlib.h for __attribute_pure__ and _Noreturn. This only works if a project is willing to import rather a lot of gnuli

Re: [PATCH 5/5] obstack usability

2014-07-26 Thread Alan Modra
On Sat, Jul 26, 2014 at 09:20:36AM +0200, Andreas Schwab wrote: > Alan Modra writes: > > > +# elif defined _MSC_VER && 1200 <= _MSC_VER > > Please write that as "_MSC_VER >= 1200". Thanks for looking over the patch. This line was taken out of gnul

Re: [PATCH 5/5] obstack usability

2014-07-26 Thread Alan Modra
On Sat, Jul 26, 2014 at 07:48:21AM -0400, Paul Eggert wrote: > On 07/26/2014 01:57 AM, Alan Modra wrote: > >When using obstack.h/c in other projects it isn't very nice that gnulib > >headers like exitfail.h and gettext.h need to be present. Far worse > >is a depende

Re: [PATCH 1/5] obstack tidy

2014-07-28 Thread Alan Modra
f you also want > ptrdiff_t for use in obstack.h, with GCC's stddef.h you can do: > #define __need_ptrdiff_t > #include > > That said, I don't think anybody actually cares about a GNU extension > header like obstack.h implicitly defining common stan

Re: [PATCH] glibc 64-bit obstack support

2014-07-28 Thread Alan Modra
o be negotiated before a patch can be committed.. It's not just gnulib and glibc, but eg. to update the ancient obstack.h in libiberty, gcc, gdb and gas all needed fixes to remove improper use of obstack internals. https://sourceware.org/bugzilla/show_bug.cgi?id=14483 https://bugzilla

Re: [PATCH 0/5] obstacks

2014-08-03 Thread Alan Modra
On Sat, Jul 26, 2014 at 03:27:07PM +0930, Alan Modra wrote: > This patch series gives obstacks some much needed TLC. The first patch Ping. It's been over a week, and I haven't seen any comments on the bulk of the patch series, except for Roland's comment about including stddef

Re: [PATCH 0/5] obstacks

2014-08-28 Thread Alan Modra
On Mon, Aug 04, 2014 at 02:16:06PM +0930, Alan Modra wrote: > On Sat, Jul 26, 2014 at 03:27:07PM +0930, Alan Modra wrote: > > This patch series gives obstacks some much needed TLC. The first patch http://lists.gnu.org/archive/html/bug-gnulib/2014-07/msg00106.html > Ping. It's

Re: [PATCH 0/5] obstacks

2014-08-29 Thread Alan Modra
On Fri, Aug 29, 2014 at 09:57:49AM +0200, Thien-Thi Nguyen wrote: > () Alan Modra > () Fri, 29 Aug 2014 11:15:57 +0930 > >On Mon, Aug 04, 2014 at 02:16:06PM +0930, Alan Modra wrote: >> On Sat, Jul 26, 2014 at 03:27:07PM +0930, Alan Modra wrote: >> > This

[PATCH] 64-bit obstack support

2014-10-28 Thread Alan Modra
har *) (h)->chunk))\ ? ((h)->next_free = (h)->chunk_limit) : 0), \ (h)->object_base = (h)->next_free,\ - (h)->temp.tempptr) + (h)->temp.p) # define obstack_free(h, obj)\ - ((h)->temp.tempint = (char *) (obj) - (char *) (h)->chunk, \ - h)->temp.tempint > 0 \ - && (h)->temp.tempint < (h)->chunk_limit - (char *) (h)->chunk))\ -? (void) ((h)->next_free = (h)->object_base \ - = (h)->temp.tempint + (char *) (h)->chunk) \ -: (__obstack_free) (h, (h)->temp.tempint + (char *) (h)->chunk))) + ((h)->temp.p = (void *) (obj), \ + (((h)->temp.p > (void *) (h)->chunk \ + && (h)->temp.p < (void *) (h)->chunk_limit) \ +? (void) ((h)->next_free = (h)->object_base = (char *) (h)->temp.p) \ +: _obstack_free ((h), (h)->temp.p))) #endif /* not __GNUC__ */ @@ -512,4 +513,4 @@ extern int obstack_exit_failure; } /* C++ */ #endif -#endif /* obstack.h */ +#endif /* _OBSTACK_H */ -- Alan Modra Australia Development Lab, IBM

[PATCH 0/5] obstacks again

2014-10-28 Thread Alan Modra
nt/misc/../sysdeps/unix/syscall-template.S:81: multiple definition of `vm86@GLIBC_2.21' /home/alan/build/glibc32/libc_pic.a(oldgetrlimit.os): In function `__old_getrlimit': /src/glibc-current/misc/../sysdeps/unix/syscall-template.S:81: multiple definition of `getrlimit@GLIBC_2.21'

[PATCH 5/5] 64-bit obstack support, part 3

2014-10-28 Thread Alan Modra
ecially for 64-bit hosts. */ +# define _OBSTACK_SIZE_T size_t +# define _CHUNK_SIZE_T size_t +#endif /* If B is the base of an object addressed by P, return the result of aligning P to the next multiple of A + 1. B and P must be of type @@ -126,8 +139,6 @@ __BPTR_ALIGN (sizeof (ptrdiff_t) < sizeof (void *) ? (B) : (char *) 0, \ P, A) -#include - #ifndef __attribute_pure__ # define __attribute_pure__ _GL_ATTRIBUTE_PURE #endif -- Alan Modra Australia Development Lab, IBM

[PATCH 2/5] obstack tidy part 2

2014-10-28 Thread Alan Modra
mp.i < (h)->chunk_limit - (char *) (h)->chunk)) \ ? (void) ((h)->next_free = (h)->object_base \ = (h)->temp.i + (char *) (h)->chunk) \ - : (__obstack_free) (h, (h)->temp.i + (char *) (h)->chunk))) +: _obstack_free (h, (h)->temp.i + (char *) (h)->chunk))) #endif /* not __GNUC__ */ @@ -512,4 +497,4 @@ extern int obstack_exit_failure; } /* C++ */ #endif -#endif /* obstack.h */ +#endif /* _OBSTACK_H */ -- Alan Modra Australia Development Lab, IBM

[PATCH 3/5] 64-bit obstack support, part 1

2014-10-28 Thread Alan Modra
uct _obstack_chunk *(*)(void *, long))(newchunkfun)) + ((h)->chunkfun = (struct _obstack_chunk *(*)(void *, size_t))(newchunkfun)) #define obstack_freefun(h, newfreefun) \ ((h)->freefun = (void (*)(void *, struct _obstack_chunk *))(newfreefun)) -- Alan Modra Australia Development Lab, IBM

[PATCH 4/5] 64-bit obstack support, part 2

2014-10-28 Thread Alan Modra
\ - && (h)->temp.i < (h)->chunk_limit - (char *) (h)->chunk)) \ -? (void) ((h)->next_free = (h)->object_base \ - = (h)->temp.i + (char *) (h)->chunk) \ -: _obstack_free (h, (h)->temp.i + (char *) (h)->chunk))) + ((h)->temp.p = (void *) (obj), \ + (((h)->temp.p > (void *) (h)->chunk \ + && (h)->temp.p < (void *) (h)->chunk_limit) \ +? (void) ((h)->next_free = (h)->object_base = (char *) (h)->temp.p) \ +: _obstack_free ((h), (h)->temp.p))) #endif /* not __GNUC__ */ -- Alan Modra Australia Development Lab, IBM

[PATCH 1/5] obstack tidy part 1

2014-10-28 Thread Alan Modra
gt;chunk))\ + ((h)->temp.i = (char *) (obj) - (char *) (h)->chunk, \ + h)->temp.i > 0\ + && (h)->temp.i < (h)->chunk_limit - (char *) (h)->chunk)) \ ? (void) ((h)->next_free = (h)->object_base \ - = (h)->temp.tempint + (char *) (h)->chunk) \ -: (__obstack_free) (h, (h)->temp.tempint + (char *) (h)->chunk))) + = (h)->temp.i + (char *) (h)->chunk) \ +: (__obstack_free) (h, (h)->temp.i + (char *) (h)->chunk))) #endif /* not __GNUC__ */ -- Alan Modra Australia Development Lab, IBM

Re: [PATCH 0/5] obstacks again

2014-10-29 Thread Alan Modra
e argument to make the current object smaller. Just don't try to shrink it beyond zero length---there's no telling what will happen if you do that. It is no longer possible to shrink an obstack with obstack_blank (but you can still do that with obstack_blank_fast). -- Alan Modra Australia Development Lab, IBM

Re: [PATCH] 64-bit obstack support

2014-10-29 Thread Alan Modra
On Wed, Oct 29, 2014 at 06:34:02PM +, Joseph S. Myers wrote: > On Wed, 29 Oct 2014, Alan Modra wrote: > > > And >2G on 32-bit. > > > > [BZ #14483] > > in the ChangeLog entry. Thanks, added. Since the stdalign.h change won't do for glibc, I&#

Re: [PATCH 0/5] obstacks again

2014-10-29 Thread Alan Modra
On Wed, Oct 29, 2014 at 08:35:18PM -0700, Paul Eggert wrote: > Alan Modra wrote: > >It is no longer possible to shrink an obstack with obstack_blank (but > >you can still do that with obstack_blank_fast). > > Ouch, I hadn't noticed that. That's an incompatible chan

Re: [PATCH 3/5] 64-bit obstack support, part 1

2014-10-31 Thread Alan Modra
attached. -- Alan Modra Australia Development Lab, IBM >From fb249df2535a4fcd913589e27cd3c30a60cd5308 Mon Sep 17 00:00:00 2001 From: Alan Modra Date: Fri, 31 Oct 2014 10:54:55 +1030 Subject: [PATCH 1/2] 64-bit obstack support, part 1a a) Correct calls to alloc function, to use a size_t arg

Re: [PATCH 2/5] obstack tidy part 2

2014-10-31 Thread Alan Modra
ed F + _obstack_newchunk F I also looked at exported obstack symbols for various other non-standard builds, and checked that __GI__obstack_newchunk matched the proper _obstack_newchunk (I had it wrong at one stage). -- Alan Modra Australia Development Lab, IBM

Re: [PATCH 0/5] obstacks again

2014-11-02 Thread Alan Modra
to me the easiest solution is to always include obstack.o in libgnu.a. If the system libc is up to date, then obstack.o will be empty. And another small tweak: Don't use alignof.h if __IBM__ALIGNOF__ is defined (alignof.h just uses __alignof__ in that case), or when __alignof__ is define

Re: [PATCH 0/5] obstacks again

2014-11-05 Thread Alan Modra
id) ((h)->chunkfun.extra = _OBSTACK_CAST (void *(*) (void *, size_t), \ newchunkfun))) and in obstack_freefun. I think you need to keep the casts, otherwise you can only specify new extra arg alloc and free functions. -- Alan Modra Australia Development Lab, IBM

Re: [PATCH 0/5] obstacks again

2014-12-05 Thread Alan Modra
ould - kill >2G obstacks on 32-bit targets, - lose the nice symmetry with other obstack functions, and obstack_blank_fast is the right interface to use for shrinking. -- Alan Modra Australia Development Lab, IBM

Silence obstack.c -Wc++compat warning

2015-11-08 Thread Alan Modra
!new_chunk) (*obstack_alloc_failed_handler)(); h->chunk = new_chunk; -- Alan Modra Australia Development Lab, IBM

Re: Silence obstack.c -Wc++compat warning

2015-11-09 Thread Alan Modra
eption? Not really. binutils, gdb, and gcc are all built with -Wc++compat nowadays so I have applied this patch to the obstack source in libiberty, to pacify the C++ fanatics. I'm not concerned that the sources diverge, given the low frequency of updates to libiberty's obstack code in the pa