[Bug target/69153] --with-advance-toolchain configure option does not correctly set configure variable target_header_dir

2016-12-07 Thread bergner at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69153

Peter Bergner  changed:

   What|Removed |Added

 Status|RESOLVED|CLOSED

--- Comment #5 from Peter Bergner  ---
Closing.

[Bug target/69153] --with-advance-toolchain configure option does not correctly set configure variable target_header_dir

2016-12-07 Thread bergner at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69153

Peter Bergner  changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution|--- |WORKSFORME

--- Comment #4 from Peter Bergner  ---
I'm going to close this bug as WORKSFORME, since this no longer fails due to
the change committed here:

  https://gcc.gnu.org/ml/gcc-patches/2016-11/msg00648.html

as well as we no longer need to modify test_header_dir if we instead use the
--with-glibc-version= configure option.

[Bug target/69153] --with-advance-toolchain configure option does not correctly set configure variable target_header_dir

2016-08-22 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69153

Richard Biener  changed:

   What|Removed |Added

   Target Milestone|6.2 |6.3

[Bug target/69153] --with-advance-toolchain configure option does not correctly set configure variable target_header_dir

2016-04-27 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69153

Jakub Jelinek  changed:

   What|Removed |Added

   Target Milestone|6.0 |6.2

--- Comment #3 from Jakub Jelinek  ---
GCC 6.1 has been released.

[Bug target/69153] --with-advance-toolchain configure option does not correctly set configure variable target_header_dir

2016-01-05 Thread bergner at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69153

--- Comment #2 from Peter Bergner  ---
(In reply to Andrew Pinski from comment #1)
> You are leaking a target specific configure option to the configure script. 
> This seems wrong.  Can't you set target_header_dir in config.gcc instead?

As the code is now, no, since config.gcc is included before the code that sets
$target_header_dir and that code unconditionally sets it, but I suppose we
could modify things such that the setting of $target_header_dir first tests
whether it's set or not before setting it, giving us the ability to set it in
config.gcc.  How about the following change that does that?

Index: gcc/configure.ac
===
--- gcc/configure.ac(revision 231201)
+++ gcc/configure.ac(working copy)
@@ -1401,6 +1401,7 @@
 . ${srcdir}/config.host

 target_gtfiles=
+target_header_dir=

 # Collect target-machine-specific information.
 . ${srcdir}/config.gcc
@@ -1997,20 +1998,22 @@
 SYSTEM_HEADER_DIR=$build_system_header_dir
 fi

-if test x$host != x$target || test "x$TARGET_SYSTEM_ROOT" != x; then
-  if test "x$with_headers" != x; then
-target_header_dir=$with_headers
-  elif test "x$with_sysroot" = x; then
-target_header_dir="${test_exec_prefix}/${target_noncanonical}/sys-include"
-  elif test "x$with_build_sysroot" != "x"; then
-target_header_dir="${with_build_sysroot}${native_system_header_dir}"
-  elif test "x$with_sysroot" = xyes; then
-   
target_header_dir="${test_exec_prefix}/${target_noncanonical}/sys-root${native_system_header_dir}"
+if test "x$target_header_dir" == x; then
+  if test x$host != x$target || test "x$TARGET_SYSTEM_ROOT" != x; then
+if test "x$with_headers" != x; then
+  target_header_dir=$with_headers
+elif test "x$with_sysroot" = x; then
+ 
target_header_dir="${test_exec_prefix}/${target_noncanonical}/sys-include"
+elif test "x$with_build_sysroot" != "x"; then
+  target_header_dir="${with_build_sysroot}${native_system_header_dir}"
+elif test "x$with_sysroot" = xyes; then
+ 
target_header_dir="${test_exec_prefix}/${target_noncanonical}/sys-root${native_system_header_dir}"
+else
+  target_header_dir="${with_sysroot}${native_system_header_dir}"
+fi
   else
-target_header_dir="${with_sysroot}${native_system_header_dir}"
+target_header_dir=${native_system_header_dir}
   fi
-else
-  target_header_dir=${native_system_header_dir}
 fi

 # If this is a cross-compiler that does not
Index: gcc/config.gcc
===
--- gcc/config.gcc  (revision 231201)
+++ gcc/config.gcc  (working copy)
@@ -4162,6 +4162,7 @@
-d "/opt/$with_advance_toolchain/bin/." -a \
-d "/opt/$with_advance_toolchain/include/."; then

+   target_header_dir=`find /opt/$with_advance_toolchain/
-path '*/include/features.h' | sed -e 's#/features.h##'`
tm_file="$tm_file ./advance-toolchain.h"
(at="/opt/$with_advance_toolchain"
 echo "/* Use Advance Toolchain $at */"

[Bug target/69153] --with-advance-toolchain configure option does not correctly set configure variable target_header_dir

2016-01-05 Thread bergner at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69153

Peter Bergner  changed:

   What|Removed |Added

 Target||powerpc*-linux
 CC||meissner at gcc dot gnu.org,
   ||tuliom at linux dot 
vnet.ibm.com,
   ||wschmidt at gcc dot gnu.org
   Target Milestone|--- |6.0

[Bug target/69153] --with-advance-toolchain configure option does not correctly set configure variable target_header_dir

2016-01-05 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69153

--- Comment #1 from Andrew Pinski  ---
You are leaking a target specific configure option to the configure script. 
This seems wrong.  Can't you set target_header_dir in config.gcc instead?