Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* Patch for readline
@ 2001-07-15 12:10 H . J . Lu
  2001-07-15 15:27 ` Daniel Jacobowitz
  0 siblings, 1 reply; 3+ messages in thread
From: H . J . Lu @ 2001-07-15 12:10 UTC (permalink / raw)
  To: GDB; +Cc: gdb-patches

When you configure gdb with --prefix=/usr, readline will compile with
-I/usr/include, which is very bad with gcc and cross compile. Here is
a patch.


H.J.
----
2001-07-15  H.J. Lu  (hjl@gnu.org)

	*  Makefile.in (INCLUDES): Never add -I/usr/include.

--- readline/Makefile.in.include	Sun Jul 15 11:38:10 2001
+++ readline/Makefile.in	Sun Jul 15 11:42:30 2001
@@ -63,7 +63,10 @@ LOCAL_DEFS = @LOCAL_DEFS@
 TERMCAP_LIB = @TERMCAP_LIB@
 
 # For libraries which include headers from other libraries.
-INCLUDES = -I. -I$(srcdir) -I$(includedir)
+INCLUDES = -I. -I$(srcdir) \
+  `if test "$(includedir)" != "/usr/include"; then \
+     echo -I$(includedir); \
+   else true; fi`
 
 CCFLAGS = $(DEFS) $(LOCAL_DEFS) $(CPPFLAGS) $(INCLUDES) $(LOCAL_CFLAGS) $(CFLAGS)
 


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

* Re: Patch for readline
  2001-07-15 12:10 Patch for readline H . J . Lu
@ 2001-07-15 15:27 ` Daniel Jacobowitz
  2001-07-15 17:28   ` H . J . Lu
  0 siblings, 1 reply; 3+ messages in thread
From: Daniel Jacobowitz @ 2001-07-15 15:27 UTC (permalink / raw)
  To: H . J . Lu; +Cc: gdb-patches

On Sun, Jul 15, 2001 at 12:10:10PM -0700, H . J . Lu wrote:
> When you configure gdb with --prefix=/usr, readline will compile with
> -I/usr/include, which is very bad with gcc and cross compile. Here is
> a patch.
> 
> 
> H.J.
> ----
> 2001-07-15  H.J. Lu  (hjl@gnu.org)
> 
> 	*  Makefile.in (INCLUDES): Never add -I/usr/include.
> 
> --- readline/Makefile.in.include	Sun Jul 15 11:38:10 2001
> +++ readline/Makefile.in	Sun Jul 15 11:42:30 2001
> @@ -63,7 +63,10 @@ LOCAL_DEFS = @LOCAL_DEFS@
>  TERMCAP_LIB = @TERMCAP_LIB@
>  
>  # For libraries which include headers from other libraries.
> -INCLUDES = -I. -I$(srcdir) -I$(includedir)
> +INCLUDES = -I. -I$(srcdir) \
> +  `if test "$(includedir)" != "/usr/include"; then \
> +     echo -I$(includedir); \
> +   else true; fi`
>  
>  CCFLAGS = $(DEFS) $(LOCAL_DEFS) $(CPPFLAGS) $(INCLUDES) $(LOCAL_CFLAGS) $(CFLAGS)

Is -I$(includedir) ever actually right?  I've always considered it to
be where include files should be installed, not referenced from.

-- 
Daniel Jacobowitz                           Carnegie Mellon University
MontaVista Software                         Debian GNU/Linux Developer


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

* Re: Patch for readline
  2001-07-15 15:27 ` Daniel Jacobowitz
@ 2001-07-15 17:28   ` H . J . Lu
  0 siblings, 0 replies; 3+ messages in thread
From: H . J . Lu @ 2001-07-15 17:28 UTC (permalink / raw)
  To: gdb-patches

On Sun, Jul 15, 2001 at 03:27:44PM -0700, Daniel Jacobowitz wrote:
> >  
> >  CCFLAGS = $(DEFS) $(LOCAL_DEFS) $(CPPFLAGS) $(INCLUDES) $(LOCAL_CFLAGS) $(CFLAGS)
> 
> Is -I$(includedir) ever actually right?  I've always considered it to
> be where include files should be installed, not referenced from.

That was my thinking too. Certainly Linux doesn't need it. But I cannot
speak for all other platforms.


H.J.


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

end of thread, other threads:[~2001-07-15 17:28 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-07-15 12:10 Patch for readline H . J . Lu
2001-07-15 15:27 ` Daniel Jacobowitz
2001-07-15 17:28   ` H . J . Lu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox