public inbox for libc-hacker@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] check_pf.c: Include alloca.h
@ 2007-07-06 21:55 Kaz Kojima
  2007-07-06 22:23 ` Ulrich Drepper
  0 siblings, 1 reply; 6+ messages in thread
From: Kaz Kojima @ 2007-07-06 21:55 UTC (permalink / raw)
  To: libc-hacker

I've tried the build with gcc-4.2 for SH and got an error like

  xsh-libc-gcc4/libc.so.6: undefined reference to `__libc_use_alloca'

It seems that the undefined reference happens on check_pf.os.
Currently sysdeps/unix/sysv/linux/check_pf.c uses alloca without
including alloca.h.  Although this is not a problem on x86 because
alloca.h is included indirectly on that architecture, it looks
that other users of alloca function include alloca.h explicitly.
How about the attached one-liner?

Regards,
	kaz
--
2007-07-06  Kaz Kojima  <kkojima@rr.iij4u.or.jp>

	* sysdeps/unix/sysv/linux/check_pf.c: Include alloca.h.

--- ORIG/libc/sysdeps/unix/sysv/linux/check_pf.c	2007-06-18 09:03:48.000000000 +0900
+++ LOCAL/libc/sysdeps/unix/sysv/linux/check_pf.c	2007-07-04 09:13:50.000000000 +0900
@@ -25,6 +25,7 @@
 #include <string.h>
 #include <time.h>
 #include <unistd.h>
+#include <alloca.h>
 #include <sys/socket.h>
 
 #include <asm/types.h>

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] check_pf.c: Include alloca.h
  2007-07-06 21:55 [PATCH] check_pf.c: Include alloca.h Kaz Kojima
@ 2007-07-06 22:23 ` Ulrich Drepper
  2007-07-06 22:43   ` Kaz Kojima
  0 siblings, 1 reply; 6+ messages in thread
From: Ulrich Drepper @ 2007-07-06 22:23 UTC (permalink / raw)
  To: Kaz Kojima; +Cc: libc-hacker

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Kaz Kojima wrote:
> Although this is not a problem on x86 because
> alloca.h is included indirectly on that architecture, it looks
> that other users of alloca function include alloca.h explicitly.

I've said several times that I want those differences in the headers to
be eliminated instead.  x86 and x86-64 set the standard and all other
archs have to include the same headers.

- --
➧ Ulrich Drepper ➧ Red Hat, Inc. ➧ 444 Castro St ➧ Mountain View, CA ❖
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (GNU/Linux)

iD8DBQFGjsDR2ijCOnn/RHQRAomQAKCqNrgB8PRRkw8+90VaFj22eQyk3ACgk7Pf
/bLTX8w/4hOJYvkBicnqWk0=
=IGam
-----END PGP SIGNATURE-----

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] check_pf.c: Include alloca.h
  2007-07-06 22:23 ` Ulrich Drepper
@ 2007-07-06 22:43   ` Kaz Kojima
  2007-07-06 23:54     ` Ulrich Drepper
  2007-07-07  0:10     ` Kaz Kojima
  0 siblings, 2 replies; 6+ messages in thread
From: Kaz Kojima @ 2007-07-06 22:43 UTC (permalink / raw)
  To: drepper; +Cc: libc-hacker

Ulrich Drepper <drepper@redhat.com> wrote:
> I've said several times that I want those differences in the headers to
> be eliminated instead.  x86 and x86-64 set the standard and all other
> archs have to include the same headers.

Ok.  I'd like to see why alloca.h isn't included indirectly
in that case on SH.

Regards,
	kaz

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] check_pf.c: Include alloca.h
  2007-07-06 22:43   ` Kaz Kojima
@ 2007-07-06 23:54     ` Ulrich Drepper
  2007-07-07  0:10     ` Kaz Kojima
  1 sibling, 0 replies; 6+ messages in thread
From: Ulrich Drepper @ 2007-07-06 23:54 UTC (permalink / raw)
  To: Kaz Kojima; +Cc: libc-hacker

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Kaz Kojima wrote:
> Ok.  I'd like to see why alloca.h isn't included indirectly
> in that case on SH.

It's not about that.  Of course it could.  But these kind of changes are
annoying and unnecessary.  Every arch should simply include all needed
headers.  This way all such future problems are handled.

- --
➧ Ulrich Drepper ➧ Red Hat, Inc. ➧ 444 Castro St ➧ Mountain View, CA ❖
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (GNU/Linux)

iD8DBQFGjtYo2ijCOnn/RHQRAkTuAKCzrEtrjgQSPcGO+vYllL2ck1kIMwCeIczY
YK1CBDesoE6/NbsJ9vUFqCI=
=lZjM
-----END PGP SIGNATURE-----

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] check_pf.c: Include alloca.h
  2007-07-06 22:43   ` Kaz Kojima
  2007-07-06 23:54     ` Ulrich Drepper
@ 2007-07-07  0:10     ` Kaz Kojima
  2007-07-07  1:54       ` Ulrich Drepper
  1 sibling, 1 reply; 6+ messages in thread
From: Kaz Kojima @ 2007-07-07  0:10 UTC (permalink / raw)
  To: drepper; +Cc: libc-hacker

> Ok.  I'd like to see why alloca.h isn't included indirectly
> in that case on SH.

It turned out that it's because nptl/sysdeps/sh/tls.h missed
including some standard headers.  Uli, could you please approve
the appended nptl patch?  Sorry for not noticing this ealier.

Regards,
	kaz
--
2007-07-06  Kaz Kojima  <kkojima@rr.iij4u.or.jp>

	* sysdeps/sh/tls.h: Include stdlib.h, list.h, sysdep.h and
	kernel-features.h.

--- ORIG/libc/nptl/sysdeps/sh/tls.h	2007-06-09 15:11:40.000000000 +0900
+++ LOCAL/libc/nptl/sysdeps/sh/tls.h	2007-07-07 08:03:19.000000000 +0900
@@ -26,6 +26,10 @@
 # include <stdbool.h>
 # include <stddef.h>
 # include <stdint.h>
+# include <stdlib.h>
+# include <list.h>
+# include <sysdep.h>
+# include <kernel-features.h>
 
 /* Type for the dtv.  */
 typedef union dtv

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] check_pf.c: Include alloca.h
  2007-07-07  0:10     ` Kaz Kojima
@ 2007-07-07  1:54       ` Ulrich Drepper
  0 siblings, 0 replies; 6+ messages in thread
From: Ulrich Drepper @ 2007-07-07  1:54 UTC (permalink / raw)
  To: Kaz Kojima; +Cc: libc-hacker

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Kaz Kojima wrote:
> Uli, could you please approve
> the appended nptl patch?

Applied.

- --
➧ Ulrich Drepper ➧ Red Hat, Inc. ➧ 444 Castro St ➧ Mountain View, CA ❖
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (GNU/Linux)

iD8DBQFGjvIy2ijCOnn/RHQRAuCQAKCCkBZeWWezWjLdVzJq+iHpY2WldACfWX7X
tScR2BoDYkq22BxYTXmMZTc=
=WlcM
-----END PGP SIGNATURE-----

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2007-07-07  1:54 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-07-06 21:55 [PATCH] check_pf.c: Include alloca.h Kaz Kojima
2007-07-06 22:23 ` Ulrich Drepper
2007-07-06 22:43   ` Kaz Kojima
2007-07-06 23:54     ` Ulrich Drepper
2007-07-07  0:10     ` Kaz Kojima
2007-07-07  1:54       ` Ulrich Drepper

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).