This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] gcc/configure.ac: Do not output paths containing 'NONE'.


The following patch prevents PREFIX_INCLUDE_DIR from being output as
'NONE/include' when $prefix is 'NONE'. The patch prevents a bogus define
of PREFIX_INCLUDE_DIR in gcc/auto-host.h as:

/* Define to PREFIX/include if cpp should also search that directory. */
#ifndef USED_FOR_TARGET
#define PREFIX_INCLUDE_DIR "NONE/include"
#endif

Tested on x86_64-unknown-linux-gnu without regressions.

OK to checkin this fix?

Cheers,
Carlos.
-- 
Carlos O'Donell
CodeSourcery
carlos@codesourcery.com
(650) 331-3385 x716

gcc/

2006-10-02  Carlos O'Donell  <carlos@codesourcery.com>

	* configure.ac: Do not set PREFIX_INCLUDE_DIR if $prefix
	is NONE.
	* configure: Regenerate.

Index: gcc/configure
===================================================================
--- gcc/configure	(revision 117374)
+++ gcc/configure	(working copy)
@@ -15846,7 +15846,8 @@ _ACEOF
 fi
 
 if test x$with_sysroot = x && test x$host = x$target \
-   && test "$prefix" != "/usr" && test "x$prefix" != "x$local_prefix" ; then
+   && test "$prefix" != "/usr" && test "x$prefix" != "x$local_prefix" \
+   && test "$prefix" != "NONE"; then
 
 cat >>confdefs.h <<_ACEOF
 #define PREFIX_INCLUDE_DIR "$prefix/include"
Index: gcc/configure.ac
===================================================================
--- gcc/configure.ac	(revision 117374)
+++ gcc/configure.ac	(working copy)
@@ -3182,7 +3182,8 @@ if test x"$gcc_cv_ld_sysroot" = xyes; th
 fi	  
 
 if test x$with_sysroot = x && test x$host = x$target \
-   && test "$prefix" != "/usr" && test "x$prefix" != "x$local_prefix" ; then
+   && test "$prefix" != "/usr" && test "x$prefix" != "x$local_prefix" \
+   && test "$prefix" != "NONE"; then
   AC_DEFINE_UNQUOTED(PREFIX_INCLUDE_DIR, "$prefix/include",
 [Define to PREFIX/include if cpp should also search that directory.])
 fi


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]