* needed-list fails in libiberty
@ 2009-04-14 14:10 Eli Zaretskii
2009-04-14 14:46 ` Joseph S. Myers
0 siblings, 1 reply; 13+ messages in thread
From: Eli Zaretskii @ 2009-04-14 14:10 UTC (permalink / raw)
To: gcc, gcc-patches; +Cc: gdb-patches
The following snippet from libiberty/Makefile.in:
# needed-list is used by libstdc++. NEEDED is the list of functions
# to include there. Do not add anything LGPL to this list; libstdc++
# can't use anything encumbering.
NEEDED = atexit calloc memchr memcmp memcpy memmove memset rename strchr \
strerror strncmp strrchr strstr strtol strtoul tmpnam vfprintf vprintf \
vfork waitpid bcmp bcopy bzero
needed-list: Makefile
rm -f needed-list; touch needed-list; \
for f in $(NEEDED); do \
for g in $(LIBOBJS) $(EXTRA_OFILES); do \
case "$$g" in \
*$$f*) echo $$g >> needed-list ;; \
esac; \
done; \
done
assumes that either $(LIBOBJS) or $(EXTRA_OFILES), or both, will be
non-empty. If that assumption is wrong, building libiberty fails:
rm -f needed-list; touch needed-list; \
for f in atexit calloc memchr memcmp memcpy memmove memset rename strchr strerror strncmp strrchr strstr strtol strtoul tmpnam vfprintf vprintf vfork waitpid bcmp bcopy bzero; do \
for g in ; do \
case "$g" in \
*$f*) echo $g >> needed-list ;; \
esac; \
done; \
done
d:\usr\tmp/dj850000: line 1: syntax error near unexpected token `;'
This was in a DJGPP build of GDB, and the root cause of $(LIBOBJS)
being empty was another bug (see my other mail today about "libiberty
configuration for DJGPP"). But in principle, some build that has all
of the required functions in the system library can potentially fail
in the same way, no?
So how about the following patch?
2009-04-14 Eli Zaretskii <eliz@gnu.org>
* Makefile.in (needed-list): Add "notused" to the list of the
inner `for', to avoid failure when both $(LIBOBJS) and
$(EXTRA_OFILES) are empty.
--- libiberty/Makefile.i~0 2009-03-28 05:07:29.000000000 +0300
+++ libiberty/Makefile.in 2009-04-11 12:27:37.284000000 +0300
@@ -383,10 +383,12 @@
NEEDED = atexit calloc memchr memcmp memcpy memmove memset rename strchr \
strerror strncmp strrchr strstr strtol strtoul tmpnam vfprintf vprintf \
vfork waitpid bcmp bcopy bzero
+# The notused gork is for when both LIBOBJS and EXTRA_OFILES end up
+# empty: the for loop will then barf.
needed-list: Makefile
rm -f needed-list; touch needed-list; \
for f in $(NEEDED); do \
- for g in $(LIBOBJS) $(EXTRA_OFILES); do \
+ for g in $(LIBOBJS) $(EXTRA_OFILES) notused; do \
case "$$g" in \
*$$f*) echo $$g >> needed-list ;; \
esac; \
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: needed-list fails in libiberty
2009-04-14 14:46 ` Joseph S. Myers
@ 2009-04-14 14:42 ` Eli Zaretskii
2009-04-15 0:30 ` Ian Lance Taylor
0 siblings, 1 reply; 13+ messages in thread
From: Eli Zaretskii @ 2009-04-14 14:42 UTC (permalink / raw)
To: Joseph S. Myers; +Cc: gcc-patches, gdb-patches
> Date: Tue, 14 Apr 2009 14:19:39 +0000 (UTC)
> From: "Joseph S. Myers" <joseph@codesourcery.com>
> cc: gcc@gcc.gnu.org, gcc-patches@gcc.gnu.org, gdb-patches@sources.redhat.com
>
> On Tue, 14 Apr 2009, Eli Zaretskii wrote:
>
> > The following snippet from libiberty/Makefile.in:
> >
> > # needed-list is used by libstdc++. NEEDED is the list of functions
> > # to include there. Do not add anything LGPL to this list; libstdc++
> > # can't use anything encumbering.
>
> Since this comment relates to libstdc++ v2 and GCC 3.0 and later do not
> use this, removing all the obsolete code (and maybe everything relating to
> building a target libiberty) would be the obvious fix for any problems
> with it.
Something like this?
Btw, what are needed.awk and needed2.awk? should they be deleted as
well?
2009-04-14 Eli Zaretskii <eliz@gnu.org>
* Makefile.in (needed-list): Target removed (not used in GCC
3.0 and later). All references deleted.
--- libiberty/Makefile.in~ 2009-04-08 18:09:34.906250000 +0300
+++ libiberty/Makefile.in 2009-04-14 17:37:56.796875000 +0300
@@ -100,7 +100,7 @@
SUBDIRS = testsuite
# FIXME: add @BUILD_INFO@ once we're sure it works for everyone.
-all: stamp-picdir $(TARGETLIB) needed-list required-list all-subdir
+all: stamp-picdir $(TARGETLIB) required-list all-subdir
@: $(MAKE) ; exec $(MULTIDO) $(FLAGS_TO_PASS) multi-do DO=all
.PHONY: check installcheck
@@ -377,22 +377,6 @@
mv -f $(DESTDIR)$(tooldir)/lib/$(MULTIOSDIR)/$(TARGETLIB)n $(DESTDIR)$(tooldir)/lib/$(MULTIOSDIR)/$(TARGETLIB)
@$(MULTIDO) $(FLAGS_TO_PASS) multi-do DO=install
-# needed-list is used by libstdc++. NEEDED is the list of functions
-# to include there. Do not add anything LGPL to this list; libstdc++
-# can't use anything encumbering.
-NEEDED = atexit calloc memchr memcmp memcpy memmove memset rename strchr \
- strerror strncmp strrchr strstr strtol strtoul tmpnam vfprintf vprintf \
- vfork waitpid bcmp bcopy bzero
-needed-list: Makefile
- rm -f needed-list; touch needed-list; \
- for f in $(NEEDED); do \
- for g in $(LIBOBJS) $(EXTRA_OFILES); do \
- case "$$g" in \
- *$$f*) echo $$g >> needed-list ;; \
- esac; \
- done; \
- done
-
# required-list was used when building a shared bfd/opcodes/libiberty
# library. I don't know if it used by anything currently.
required-list: Makefile
@@ -440,8 +424,8 @@
# multiple times, hence our explicit recursion with an empty SUBDIRS.
mostlyclean: mostlyclean-subdir
-rm -rf *.o pic core errs \#* *.E a.out
- -rm -f needed.awk needed2.awk errors dummy needed-list config.h stamp-*
- -rm -f $(CONFIG_H) $(NEEDED_LIST) stamp-picdir
+ -rm -f needed.awk needed2.awk errors dummy config.h stamp-*
+ -rm -f $(CONFIG_H) stamp-picdir
-rm -f libiberty.aux libiberty.cp libiberty.cps libiberty.fn libiberty.ky
-rm -f libiberty.log libiberty.tmp libiberty.tps libiberty.pg
-rm -f libiberty.pgs libiberty.toc libiberty.tp libiberty.tpl libiberty.vr
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: needed-list fails in libiberty
2009-04-14 14:10 needed-list fails in libiberty Eli Zaretskii
@ 2009-04-14 14:46 ` Joseph S. Myers
2009-04-14 14:42 ` Eli Zaretskii
0 siblings, 1 reply; 13+ messages in thread
From: Joseph S. Myers @ 2009-04-14 14:46 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: gcc, gcc-patches, gdb-patches
On Tue, 14 Apr 2009, Eli Zaretskii wrote:
> The following snippet from libiberty/Makefile.in:
>
> # needed-list is used by libstdc++. NEEDED is the list of functions
> # to include there. Do not add anything LGPL to this list; libstdc++
> # can't use anything encumbering.
Since this comment relates to libstdc++ v2 and GCC 3.0 and later do not
use this, removing all the obsolete code (and maybe everything relating to
building a target libiberty) would be the obvious fix for any problems
with it.
(As far as I can tell, the only use of any libiberty code for the target
is libstdc++-v3 using a demangler source file; libiberty built for the
target doesn't seem to be used at all.)
--
Joseph S. Myers
joseph@codesourcery.com
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: needed-list fails in libiberty
2009-04-14 14:42 ` Eli Zaretskii
@ 2009-04-15 0:30 ` Ian Lance Taylor
2009-04-15 8:15 ` Eli Zaretskii
0 siblings, 1 reply; 13+ messages in thread
From: Ian Lance Taylor @ 2009-04-15 0:30 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: Joseph S. Myers, gcc-patches, gdb-patches
Eli Zaretskii <eliz@gnu.org> writes:
> 2009-04-14 Eli Zaretskii <eliz@gnu.org>
>
> * Makefile.in (needed-list): Target removed (not used in GCC
> 3.0 and later). All references deleted.
This is OK if you've done a clean bootstrap on a primary platform.
> Btw, what are needed.awk and needed2.awk? should they be deleted as
> well?
needed.awk and needed2.awk were the old scripts which were used to
generate needed-list before I converted libiberty to use autoconf.
Please feel free to remove the remaining references to them in
libiberty/Makefile.in.
Thanks.
Ian
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: needed-list fails in libiberty
2009-04-15 0:30 ` Ian Lance Taylor
@ 2009-04-15 8:15 ` Eli Zaretskii
2009-04-15 13:50 ` Ian Lance Taylor
0 siblings, 1 reply; 13+ messages in thread
From: Eli Zaretskii @ 2009-04-15 8:15 UTC (permalink / raw)
To: Ian Lance Taylor; +Cc: joseph, gcc-patches, gdb-patches
> Cc: "Joseph S. Myers" <joseph@codesourcery.com>, gcc-patches@gcc.gnu.org,
> gdb-patches@sources.redhat.com
> From: Ian Lance Taylor <iant@google.com>
> Date: Tue, 14 Apr 2009 17:29:40 -0700
>
> Eli Zaretskii <eliz@gnu.org> writes:
>
> > 2009-04-14 Eli Zaretskii <eliz@gnu.org>
> >
> > * Makefile.in (needed-list): Target removed (not used in GCC
> > 3.0 and later). All references deleted.
>
> This is OK if you've done a clean bootstrap on a primary platform.
You mean, bootstrapping GCC? Or something else?
Would this platform be good enough?
Linux fencepost 2.6.16.29-xen #1 SMP Wed Dec 6 07:32:36 EST 2006 x86_64 GNU/Linux
> > Btw, what are needed.awk and needed2.awk? should they be deleted as
> > well?
>
> needed.awk and needed2.awk were the old scripts which were used to
> generate needed-list before I converted libiberty to use autoconf.
> Please feel free to remove the remaining references to them in
> libiberty/Makefile.in.
Will do.
Thanks.
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: needed-list fails in libiberty
2009-04-15 8:15 ` Eli Zaretskii
@ 2009-04-15 13:50 ` Ian Lance Taylor
2009-04-16 17:47 ` Eli Zaretskii
0 siblings, 1 reply; 13+ messages in thread
From: Ian Lance Taylor @ 2009-04-15 13:50 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: joseph, gcc-patches, gdb-patches
Eli Zaretskii <eliz@gnu.org> writes:
>> > 2009-04-14 Eli Zaretskii <eliz@gnu.org>
>> >
>> > * Makefile.in (needed-list): Target removed (not used in GCC
>> > 3.0 and later). All references deleted.
>>
>> This is OK if you've done a clean bootstrap on a primary platform.
>
> You mean, bootstrapping GCC? Or something else?
Yes, bootstrapping gcc. This is a normal requirement for a gcc patch,
as documented at http://gcc.gnu.org/contribute.html#testing . My
concern here is merely to make sure that we aren't missing a hidden
dependency of libstdc++ on libiberty; such dependencies have certainly
been missed in the past. For a patch like this only the libiberty
testsuite need be run.
> Would this platform be good enough?
>
> Linux fencepost 2.6.16.29-xen #1 SMP Wed Dec 6 07:32:36 EST 2006 x86_64 GNU/Linux
Yes. The current list of primary platforms may be found at
http://gcc.gnu.org/gcc-4.5/criteria.html .
Thanks.
Ian
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: needed-list fails in libiberty
2009-04-15 13:50 ` Ian Lance Taylor
@ 2009-04-16 17:47 ` Eli Zaretskii
2009-04-25 10:18 ` Eli Zaretskii
0 siblings, 1 reply; 13+ messages in thread
From: Eli Zaretskii @ 2009-04-16 17:47 UTC (permalink / raw)
To: Ian Lance Taylor; +Cc: joseph, gcc-patches, gdb-patches
> Cc: joseph@codesourcery.com, gcc-patches@gcc.gnu.org,
> gdb-patches@sources.redhat.com
> From: Ian Lance Taylor <iant@google.com>
> Date: Wed, 15 Apr 2009 06:49:48 -0700
>
> Eli Zaretskii <eliz@gnu.org> writes:
>
> >> > 2009-04-14 Eli Zaretskii <eliz@gnu.org>
> >> >
> >> > * Makefile.in (needed-list): Target removed (not used in GCC
> >> > 3.0 and later). All references deleted.
> >>
> >> This is OK if you've done a clean bootstrap on a primary platform.
I bootstrapped yesterday's SVN on this platform:
Linux fencepost 2.6.16.29-xen #1 SMP Wed Dec 6 07:32:36 EST 2006 x86_64 GNU/Linux
> For a patch like this only the libiberty testsuite need be run.
After a successful bootstrap, I typed "make -C libiberty check", and
the test ran to completion without any errors.
Here's again the patch I suggest (this time including the removal of 2
obsolete Awk scripts). As I don't have write access, could someone
please commit it?
Thanks.
2009-04-16 Eli Zaretskii <eliz@gnu.org>
* Makefile.in (needed-list): Target removed (not used in GCC
3.0 and later). All references deleted.
(mostlyclean): Remove references to needed.awk and needed2.awk.
--- libiberty/Makefile.in~ 2009-04-15 14:07:06.825412329 -0400
+++ libiberty/Makefile.in 2009-04-15 15:15:03.574853288 -0400
@@ -100,7 +100,7 @@
SUBDIRS = testsuite
# FIXME: add @BUILD_INFO@ once we're sure it works for everyone.
-all: stamp-picdir $(TARGETLIB) needed-list required-list all-subdir
+all: stamp-picdir $(TARGETLIB) required-list all-subdir
@: $(MAKE) ; exec $(MULTIDO) $(FLAGS_TO_PASS) multi-do DO=all
.PHONY: check installcheck
@@ -377,22 +377,6 @@
mv -f $(DESTDIR)$(tooldir)/lib/$(MULTIOSDIR)/$(TARGETLIB)n $(DESTDIR)$(tooldir)/lib/$(MULTIOSDIR)/$(TARGETLIB)
@$(MULTIDO) $(FLAGS_TO_PASS) multi-do DO=install
-# needed-list is used by libstdc++. NEEDED is the list of functions
-# to include there. Do not add anything LGPL to this list; libstdc++
-# can't use anything encumbering.
-NEEDED = atexit calloc memchr memcmp memcpy memmove memset rename strchr \
- strerror strncmp strrchr strstr strtol strtoul tmpnam vfprintf vprintf \
- vfork waitpid bcmp bcopy bzero
-needed-list: Makefile
- rm -f needed-list; touch needed-list; \
- for f in $(NEEDED); do \
- for g in $(LIBOBJS) $(EXTRA_OFILES); do \
- case "$$g" in \
- *$$f*) echo $$g >> needed-list ;; \
- esac; \
- done; \
- done
-
# required-list was used when building a shared bfd/opcodes/libiberty
# library. I don't know if it used by anything currently.
required-list: Makefile
@@ -440,8 +424,8 @@
# multiple times, hence our explicit recursion with an empty SUBDIRS.
mostlyclean: mostlyclean-subdir
-rm -rf *.o pic core errs \#* *.E a.out
- -rm -f needed.awk needed2.awk errors dummy needed-list config.h stamp-*
- -rm -f $(CONFIG_H) $(NEEDED_LIST) stamp-picdir
+ -rm -f errors dummy config.h stamp-*
+ -rm -f $(CONFIG_H) stamp-picdir
-rm -f libiberty.aux libiberty.cp libiberty.cps libiberty.fn libiberty.ky
-rm -f libiberty.log libiberty.tmp libiberty.tps libiberty.pg
-rm -f libiberty.pgs libiberty.toc libiberty.tp libiberty.tpl libiberty.vr
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: needed-list fails in libiberty
2009-04-16 17:47 ` Eli Zaretskii
@ 2009-04-25 10:18 ` Eli Zaretskii
2009-04-25 23:00 ` Ian Lance Taylor
2009-04-26 7:21 ` DJ Delorie
0 siblings, 2 replies; 13+ messages in thread
From: Eli Zaretskii @ 2009-04-25 10:18 UTC (permalink / raw)
To: iant, joseph, gcc-patches, gdb-patches
> Date: Thu, 16 Apr 2009 20:47:56 +0300
> From: Eli Zaretskii <eliz@gnu.org>
> Cc: joseph@codesourcery.com, gcc-patches@gcc.gnu.org, gdb-patches@sources.redhat.com
Ping.
> > Cc: joseph@codesourcery.com, gcc-patches@gcc.gnu.org,
> > gdb-patches@sources.redhat.com
> > From: Ian Lance Taylor <iant@google.com>
> > Date: Wed, 15 Apr 2009 06:49:48 -0700
> >
> > Eli Zaretskii <eliz@gnu.org> writes:
> >
> > >> > 2009-04-14 Eli Zaretskii <eliz@gnu.org>
> > >> >
> > >> > * Makefile.in (needed-list): Target removed (not used in GCC
> > >> > 3.0 and later). All references deleted.
> > >>
> > >> This is OK if you've done a clean bootstrap on a primary platform.
>
> I bootstrapped yesterday's SVN on this platform:
>
> Linux fencepost 2.6.16.29-xen #1 SMP Wed Dec 6 07:32:36 EST 2006 x86_64 GNU/Linux
>
> > For a patch like this only the libiberty testsuite need be run.
>
> After a successful bootstrap, I typed "make -C libiberty check", and
> the test ran to completion without any errors.
>
> Here's again the patch I suggest (this time including the removal of 2
> obsolete Awk scripts). As I don't have write access, could someone
> please commit it?
>
> Thanks.
>
> 2009-04-16 Eli Zaretskii <eliz@gnu.org>
>
> * Makefile.in (needed-list): Target removed (not used in GCC
> 3.0 and later). All references deleted.
> (mostlyclean): Remove references to needed.awk and needed2.awk.
>
>
> --- libiberty/Makefile.in~ 2009-04-15 14:07:06.825412329 -0400
> +++ libiberty/Makefile.in 2009-04-15 15:15:03.574853288 -0400
> @@ -100,7 +100,7 @@
> SUBDIRS = testsuite
>
> # FIXME: add @BUILD_INFO@ once we're sure it works for everyone.
> -all: stamp-picdir $(TARGETLIB) needed-list required-list all-subdir
> +all: stamp-picdir $(TARGETLIB) required-list all-subdir
> @: $(MAKE) ; exec $(MULTIDO) $(FLAGS_TO_PASS) multi-do DO=all
>
> .PHONY: check installcheck
> @@ -377,22 +377,6 @@
> mv -f $(DESTDIR)$(tooldir)/lib/$(MULTIOSDIR)/$(TARGETLIB)n $(DESTDIR)$(tooldir)/lib/$(MULTIOSDIR)/$(TARGETLIB)
> @$(MULTIDO) $(FLAGS_TO_PASS) multi-do DO=install
>
> -# needed-list is used by libstdc++. NEEDED is the list of functions
> -# to include there. Do not add anything LGPL to this list; libstdc++
> -# can't use anything encumbering.
> -NEEDED = atexit calloc memchr memcmp memcpy memmove memset rename strchr \
> - strerror strncmp strrchr strstr strtol strtoul tmpnam vfprintf vprintf \
> - vfork waitpid bcmp bcopy bzero
> -needed-list: Makefile
> - rm -f needed-list; touch needed-list; \
> - for f in $(NEEDED); do \
> - for g in $(LIBOBJS) $(EXTRA_OFILES); do \
> - case "$$g" in \
> - *$$f*) echo $$g >> needed-list ;; \
> - esac; \
> - done; \
> - done
> -
> # required-list was used when building a shared bfd/opcodes/libiberty
> # library. I don't know if it used by anything currently.
> required-list: Makefile
> @@ -440,8 +424,8 @@
> # multiple times, hence our explicit recursion with an empty SUBDIRS.
> mostlyclean: mostlyclean-subdir
> -rm -rf *.o pic core errs \#* *.E a.out
> - -rm -f needed.awk needed2.awk errors dummy needed-list config.h stamp-*
> - -rm -f $(CONFIG_H) $(NEEDED_LIST) stamp-picdir
> + -rm -f errors dummy config.h stamp-*
> + -rm -f $(CONFIG_H) stamp-picdir
> -rm -f libiberty.aux libiberty.cp libiberty.cps libiberty.fn libiberty.ky
> -rm -f libiberty.log libiberty.tmp libiberty.tps libiberty.pg
> -rm -f libiberty.pgs libiberty.toc libiberty.tp libiberty.tpl libiberty.vr
>
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: needed-list fails in libiberty
2009-04-25 10:18 ` Eli Zaretskii
@ 2009-04-25 23:00 ` Ian Lance Taylor
2009-04-26 17:44 ` Eli Zaretskii
2009-04-26 7:21 ` DJ Delorie
1 sibling, 1 reply; 13+ messages in thread
From: Ian Lance Taylor @ 2009-04-25 23:00 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: joseph, gcc-patches, gdb-patches
This patch has already been approved, but I gather that Eli does not
have write access to the repository. Does anybody want to volunteer to
commit it?
Ian
Eli Zaretskii <eliz@gnu.org> writes:
>> Date: Thu, 16 Apr 2009 20:47:56 +0300
>> From: Eli Zaretskii <eliz@gnu.org>
>> Cc: joseph@codesourcery.com, gcc-patches@gcc.gnu.org, gdb-patches@sources.redhat.com
>
> Ping.
>
>> > Cc: joseph@codesourcery.com, gcc-patches@gcc.gnu.org,
>> > gdb-patches@sources.redhat.com
>> > From: Ian Lance Taylor <iant@google.com>
>> > Date: Wed, 15 Apr 2009 06:49:48 -0700
>> >
>> > Eli Zaretskii <eliz@gnu.org> writes:
>> >
>> > >> > 2009-04-14 Eli Zaretskii <eliz@gnu.org>
>> > >> >
>> > >> > * Makefile.in (needed-list): Target removed (not used in GCC
>> > >> > 3.0 and later). All references deleted.
>> > >>
>> > >> This is OK if you've done a clean bootstrap on a primary platform.
>>
>> I bootstrapped yesterday's SVN on this platform:
>>
>> Linux fencepost 2.6.16.29-xen #1 SMP Wed Dec 6 07:32:36 EST 2006 x86_64 GNU/Linux
>>
>> > For a patch like this only the libiberty testsuite need be run.
>>
>> After a successful bootstrap, I typed "make -C libiberty check", and
>> the test ran to completion without any errors.
>>
>> Here's again the patch I suggest (this time including the removal of 2
>> obsolete Awk scripts). As I don't have write access, could someone
>> please commit it?
>>
>> Thanks.
>>
>> 2009-04-16 Eli Zaretskii <eliz@gnu.org>
>>
>> * Makefile.in (needed-list): Target removed (not used in GCC
>> 3.0 and later). All references deleted.
>> (mostlyclean): Remove references to needed.awk and needed2.awk.
>>
>>
>> --- libiberty/Makefile.in~ 2009-04-15 14:07:06.825412329 -0400
>> +++ libiberty/Makefile.in 2009-04-15 15:15:03.574853288 -0400
>> @@ -100,7 +100,7 @@
>> SUBDIRS = testsuite
>>
>> # FIXME: add @BUILD_INFO@ once we're sure it works for everyone.
>> -all: stamp-picdir $(TARGETLIB) needed-list required-list all-subdir
>> +all: stamp-picdir $(TARGETLIB) required-list all-subdir
>> @: $(MAKE) ; exec $(MULTIDO) $(FLAGS_TO_PASS) multi-do DO=all
>>
>> .PHONY: check installcheck
>> @@ -377,22 +377,6 @@
>> mv -f $(DESTDIR)$(tooldir)/lib/$(MULTIOSDIR)/$(TARGETLIB)n $(DESTDIR)$(tooldir)/lib/$(MULTIOSDIR)/$(TARGETLIB)
>> @$(MULTIDO) $(FLAGS_TO_PASS) multi-do DO=install
>>
>> -# needed-list is used by libstdc++. NEEDED is the list of functions
>> -# to include there. Do not add anything LGPL to this list; libstdc++
>> -# can't use anything encumbering.
>> -NEEDED = atexit calloc memchr memcmp memcpy memmove memset rename strchr \
>> - strerror strncmp strrchr strstr strtol strtoul tmpnam vfprintf vprintf \
>> - vfork waitpid bcmp bcopy bzero
>> -needed-list: Makefile
>> - rm -f needed-list; touch needed-list; \
>> - for f in $(NEEDED); do \
>> - for g in $(LIBOBJS) $(EXTRA_OFILES); do \
>> - case "$$g" in \
>> - *$$f*) echo $$g >> needed-list ;; \
>> - esac; \
>> - done; \
>> - done
>> -
>> # required-list was used when building a shared bfd/opcodes/libiberty
>> # library. I don't know if it used by anything currently.
>> required-list: Makefile
>> @@ -440,8 +424,8 @@
>> # multiple times, hence our explicit recursion with an empty SUBDIRS.
>> mostlyclean: mostlyclean-subdir
>> -rm -rf *.o pic core errs \#* *.E a.out
>> - -rm -f needed.awk needed2.awk errors dummy needed-list config.h stamp-*
>> - -rm -f $(CONFIG_H) $(NEEDED_LIST) stamp-picdir
>> + -rm -f errors dummy config.h stamp-*
>> + -rm -f $(CONFIG_H) stamp-picdir
>> -rm -f libiberty.aux libiberty.cp libiberty.cps libiberty.fn libiberty.ky
>> -rm -f libiberty.log libiberty.tmp libiberty.tps libiberty.pg
>> -rm -f libiberty.pgs libiberty.toc libiberty.tp libiberty.tpl libiberty.vr
>>
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: needed-list fails in libiberty
2009-04-25 10:18 ` Eli Zaretskii
2009-04-25 23:00 ` Ian Lance Taylor
@ 2009-04-26 7:21 ` DJ Delorie
2009-04-26 18:15 ` Eli Zaretskii
1 sibling, 1 reply; 13+ messages in thread
From: DJ Delorie @ 2009-04-26 7:21 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: iant, joseph, gcc-patches, gdb-patches
Committed. Thanks!
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: needed-list fails in libiberty
2009-04-25 23:00 ` Ian Lance Taylor
@ 2009-04-26 17:44 ` Eli Zaretskii
0 siblings, 0 replies; 13+ messages in thread
From: Eli Zaretskii @ 2009-04-26 17:44 UTC (permalink / raw)
To: Ian Lance Taylor; +Cc: joseph, gcc-patches, gdb-patches
> Cc: joseph@codesourcery.com, gcc-patches@gcc.gnu.org,
> gdb-patches@sources.redhat.com
> From: Ian Lance Taylor <iant@google.com>
> Date: Sat, 25 Apr 2009 15:41:03 -0700
>
> This patch has already been approved
Thanks!
> but I gather that Eli does not have write access to the repository.
That's right.
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: needed-list fails in libiberty
2009-04-26 7:21 ` DJ Delorie
@ 2009-04-26 18:15 ` Eli Zaretskii
0 siblings, 0 replies; 13+ messages in thread
From: Eli Zaretskii @ 2009-04-26 18:15 UTC (permalink / raw)
To: DJ Delorie; +Cc: iant, joseph, gcc-patches, gdb-patches
> Date: Sat, 25 Apr 2009 22:23:32 -0400
> From: DJ Delorie <dj@redhat.com>
> CC: iant@google.com, joseph@codesourcery.com, gcc-patches@gcc.gnu.org, gdb-patches@sources.redhat.com
>
>
> Committed. Thanks!
Thank you.
^ permalink raw reply [flat|nested] 13+ messages in thread
* needed-list fails in libiberty
@ 2009-04-14 14:10 Eli Zaretskii
0 siblings, 0 replies; 13+ messages in thread
From: Eli Zaretskii @ 2009-04-14 14:10 UTC (permalink / raw)
To: gcc, gcc-patches; +Cc: gdb-patches
The following snippet from libiberty/Makefile.in:
# needed-list is used by libstdc++. NEEDED is the list of functions
# to include there. Do not add anything LGPL to this list; libstdc++
# can't use anything encumbering.
NEEDED = atexit calloc memchr memcmp memcpy memmove memset rename strchr \
strerror strncmp strrchr strstr strtol strtoul tmpnam vfprintf vprintf \
vfork waitpid bcmp bcopy bzero
needed-list: Makefile
rm -f needed-list; touch needed-list; \
for f in $(NEEDED); do \
for g in $(LIBOBJS) $(EXTRA_OFILES); do \
case "$$g" in \
*$$f*) echo $$g >> needed-list ;; \
esac; \
done; \
done
assumes that either $(LIBOBJS) or $(EXTRA_OFILES), or both, will be
non-empty. If that assumption is wrong, building libiberty fails:
rm -f needed-list; touch needed-list; \
for f in atexit calloc memchr memcmp memcpy memmove memset rename strchr strerror strncmp strrchr strstr strtol strtoul tmpnam vfprintf vprintf vfork waitpid bcmp bcopy bzero; do \
for g in ; do \
case "$g" in \
*$f*) echo $g >> needed-list ;; \
esac; \
done; \
done
d:\usr\tmp/dj850000: line 1: syntax error near unexpected token `;'
This was in a DJGPP build of GDB, and the root cause of $(LIBOBJS)
being empty was another bug (see my other mail today about "libiberty
configuration for DJGPP"). But in principle, some build that has all
of the required functions in the system library can potentially fail
in the same way, no?
So how about the following patch?
2009-04-14 Eli Zaretskii <eliz@gnu.org>
* Makefile.in (needed-list): Add "notused" to the list of the
inner `for', to avoid failure when both $(LIBOBJS) and
$(EXTRA_OFILES) are empty.
--- libiberty/Makefile.i~0 2009-03-28 05:07:29.000000000 +0300
+++ libiberty/Makefile.in 2009-04-11 12:27:37.284000000 +0300
@@ -383,10 +383,12 @@
NEEDED = atexit calloc memchr memcmp memcpy memmove memset rename strchr \
strerror strncmp strrchr strstr strtol strtoul tmpnam vfprintf vprintf \
vfork waitpid bcmp bcopy bzero
+# The notused gork is for when both LIBOBJS and EXTRA_OFILES end up
+# empty: the for loop will then barf.
needed-list: Makefile
rm -f needed-list; touch needed-list; \
for f in $(NEEDED); do \
- for g in $(LIBOBJS) $(EXTRA_OFILES); do \
+ for g in $(LIBOBJS) $(EXTRA_OFILES) notused; do \
case "$$g" in \
*$$f*) echo $$g >> needed-list ;; \
esac; \
^ permalink raw reply [flat|nested] 13+ messages in thread
end of thread, other threads:[~2009-04-26 17:44 UTC | newest]
Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-04-14 14:10 needed-list fails in libiberty Eli Zaretskii
2009-04-14 14:46 ` Joseph S. Myers
2009-04-14 14:42 ` Eli Zaretskii
2009-04-15 0:30 ` Ian Lance Taylor
2009-04-15 8:15 ` Eli Zaretskii
2009-04-15 13:50 ` Ian Lance Taylor
2009-04-16 17:47 ` Eli Zaretskii
2009-04-25 10:18 ` Eli Zaretskii
2009-04-25 23:00 ` Ian Lance Taylor
2009-04-26 17:44 ` Eli Zaretskii
2009-04-26 7:21 ` DJ Delorie
2009-04-26 18:15 ` Eli Zaretskii
2009-04-14 14:10 Eli Zaretskii
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).