public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [RFA:] fix bug in configure header-probing for stack protector support in target C library
@ 2012-05-31 23:38 Hans-Peter Nilsson
  2012-06-08  0:36 ` Ping: " Hans-Peter Nilsson
  0 siblings, 1 reply; 7+ messages in thread
From: Hans-Peter Nilsson @ 2012-05-31 23:38 UTC (permalink / raw)
  To: gcc-patches

This patch fixes target-header-probing for cross-builds that
aren't using sysroot (just --target and --prefix), as in the
difference for crisv32-axis-linux-gnu with an eglibc-2.15-based
port:

--- cllog.prev	Thu May 31 22:00:10 2012
+++ cllog	Thu May 31 22:00:09 2012
@@ -1276,7 +1276,7 @@ checking linker --as-needed support... y
 checking linker --build-id support... yes
 checking linker *_sol2 emulation support... no
 checking linker --sysroot support... yes
-checking __stack_chk_fail in target C library... no
+checking __stack_chk_fail in target C library... yes
 checking sys/sdt.h in the target C library... no
 checking dl_iterate_phdr in target C library... unknown
 Using ggc-page for garbage collection.

Without this patch, the non-existing directory
target_header_dir=NONE/crisv32-axis-linux-gnu/sys-include is
probed due to exec_prefix=NONE, duh.  There's code setting a
separate variable test_exec_prefix that is then used to handle
this kind of testing for sysroot configures, but it is inside
code only executed if --with-sysroot is used.  There's no reason
for it being there as it's not depending on the processing done
there or on sysroot settings.  So let's move it to before the
with-sysroot stuff and use it when setting target_header_dir.
Tested configuring for crisv32-axis-linux-gnu and building past
this part (build completes successfully with the expected
observable change as per the use in gcc.c); no difference for
--with-sysroot.

Ok to commit?

gcc:
	Fix configure test for "stack protector support in target C library".
	* configure.ac (test_prefix, test_exec_prefix): Move setting from
	inside sysroot handling to before and outside it.
	* configure: Regenerate.

--- gcc.prev/gcc/configure.ac	2012-05-25 14:28:50.000000000 +0200
+++ gcc/gcc/configure.ac	2012-05-31 21:20:07.000000000 +0200
@@ -747,6 +747,17 @@ AC_ARG_WITH(build-sysroot, 
   [SYSROOT_CFLAGS_FOR_TARGET=])
 AC_SUBST(SYSROOT_CFLAGS_FOR_TARGET)
 
+if test "x$prefix" = xNONE; then
+ test_prefix=/usr/local
+else
+ test_prefix=$prefix
+fi
+if test "x$exec_prefix" = xNONE; then
+ test_exec_prefix=$test_prefix
+else
+ test_exec_prefix=$exec_prefix
+fi
+
 AC_ARG_WITH(sysroot,
 [AS_HELP_STRING([[--with-sysroot[=DIR]]],
 		[search for usr/lib, usr/include, et al, within DIR])],
@@ -759,16 +770,6 @@ AC_ARG_WITH(sysroot,
  TARGET_SYSTEM_ROOT_DEFINE='-DTARGET_SYSTEM_ROOT=\"$(TARGET_SYSTEM_ROOT)\"'
  CROSS_SYSTEM_HEADER_DIR='$(TARGET_SYSTEM_ROOT)$${sysroot_headers_suffix}$(NATIVE_SYSTEM_HEADER_DIR)'
 	
- if test "x$prefix" = xNONE; then
-  test_prefix=/usr/local
- else
-  test_prefix=$prefix
- fi
- if test "x$exec_prefix" = xNONE; then
-  test_exec_prefix=$test_prefix
- else
-  test_exec_prefix=$exec_prefix
- fi
  case ${TARGET_SYSTEM_ROOT} in
  "${test_prefix}"|"${test_prefix}/"*|\
  "${test_exec_prefix}"|"${test_exec_prefix}/"*|\
@@ -4528,11 +4529,11 @@ if test x$host != x$target || test "x$TA
   if test "x$with_headers" != x; then
     target_header_dir=$with_headers
   elif test "x$with_sysroot" = x; then
-    target_header_dir="${exec_prefix}/${target_noncanonical}/sys-include"
+    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="${exec_prefix}/${target_noncanonical}/sys-root${native_system_header_dir}"
+    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


brgds, H-P

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

* Ping: [RFA:] fix bug in configure header-probing for stack protector support in target C library
  2012-05-31 23:38 [RFA:] fix bug in configure header-probing for stack protector support in target C library Hans-Peter Nilsson
@ 2012-06-08  0:36 ` Hans-Peter Nilsson
  2012-06-15  3:06   ` Ping*2: " Hans-Peter Nilsson
  0 siblings, 1 reply; 7+ messages in thread
From: Hans-Peter Nilsson @ 2012-06-08  0:36 UTC (permalink / raw)
  To: gcc-patches

> From: Hans-Peter Nilsson <hp@axis.com>
> Date: Fri, 1 Jun 2012 01:38:22 +0200

> gcc:
> 	Fix configure test for "stack protector support in target C library".
> 	* configure.ac (test_prefix, test_exec_prefix): Move setting from
> 	inside sysroot handling to before and outside it.
> 	* configure: Regenerate.

Ping, <http://gcc.gnu.org/ml/gcc-patches/2012-05/msg02137.html>.

brgds, H-P

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

* Ping*2: [RFA:] fix bug in configure header-probing for stack protector support in target C library
  2012-06-08  0:36 ` Ping: " Hans-Peter Nilsson
@ 2012-06-15  3:06   ` Hans-Peter Nilsson
  2012-06-22  7:46     ` Ping*3: " Hans-Peter Nilsson
  0 siblings, 1 reply; 7+ messages in thread
From: Hans-Peter Nilsson @ 2012-06-15  3:06 UTC (permalink / raw)
  To: gcc-patches

> From: Hans-Peter Nilsson <hp@axis.com>
> Date: Fri, 8 Jun 2012 02:31:10 +0200
> > From: Hans-Peter Nilsson <hp@axis.com>
> > Date: Fri, 1 Jun 2012 01:38:22 +0200
> 
> > gcc:
> > 	Fix configure test for "stack protector support in target C library".
> > 	* configure.ac (test_prefix, test_exec_prefix): Move setting from
> > 	inside sysroot handling to before and outside it.
> > 	* configure: Regenerate.
> 
> Ping, <http://gcc.gnu.org/ml/gcc-patches/2012-05/msg02137.html>.

and a ping (this will look pretty after a few weeks).

brgds, H-P

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

* Ping*3: [RFA:] fix bug in configure header-probing for stack protector support in target C library
  2012-06-15  3:06   ` Ping*2: " Hans-Peter Nilsson
@ 2012-06-22  7:46     ` Hans-Peter Nilsson
  2012-06-22 11:45       ` Joseph S. Myers
  0 siblings, 1 reply; 7+ messages in thread
From: Hans-Peter Nilsson @ 2012-06-22  7:46 UTC (permalink / raw)
  To: gcc-patches

> From: Hans-Peter Nilsson <hp@axis.com>
> Date: Fri, 15 Jun 2012 03:48:35 +0200

> > From: Hans-Peter Nilsson <hp@axis.com>
> > Date: Fri, 8 Jun 2012 02:31:10 +0200
> > > From: Hans-Peter Nilsson <hp@axis.com>
> > > Date: Fri, 1 Jun 2012 01:38:22 +0200
> >
> > > gcc:
> > > 	Fix configure test for "stack protector support in target C library".
> > > 	* configure.ac (test_prefix, test_exec_prefix): Move setting from
> > > 	inside sysroot handling to before and outside it.
> > > 	* configure: Regenerate.
> >
> > Ping, <http://gcc.gnu.org/ml/gcc-patches/2012-05/msg02137.html>.
> 
> and a ping (this will look pretty after a few weeks).
and a ping (you see now what I meant).

brgds, H-P

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

* Re: Ping*3: [RFA:] fix bug in configure header-probing for stack protector support in target C library
  2012-06-22  7:46     ` Ping*3: " Hans-Peter Nilsson
@ 2012-06-22 11:45       ` Joseph S. Myers
  2012-06-29 13:49         ` Ping*4: " Hans-Peter Nilsson
  0 siblings, 1 reply; 7+ messages in thread
From: Joseph S. Myers @ 2012-06-22 11:45 UTC (permalink / raw)
  To: Hans-Peter Nilsson; +Cc: gcc-patches

On Fri, 22 Jun 2012, Hans-Peter Nilsson wrote:

> > > > 	Fix configure test for "stack protector support in target C library".
> > > > 	* configure.ac (test_prefix, test_exec_prefix): Move setting from
> > > > 	inside sysroot handling to before and outside it.
> > > > 	* configure: Regenerate.
> > >
> > > Ping, <http://gcc.gnu.org/ml/gcc-patches/2012-05/msg02137.html>.
> > 
> > and a ping (this will look pretty after a few weeks).
> and a ping (you see now what I meant).

I advise CC:ing pings to relevant maintainers (in this case, build-system 
maintainers).

-- 
Joseph S. Myers
joseph@codesourcery.com

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

* Ping*4: [RFA:] fix bug in configure header-probing for stack protector support in target C library
  2012-06-22 11:45       ` Joseph S. Myers
@ 2012-06-29 13:49         ` Hans-Peter Nilsson
  2012-07-05 18:44           ` Nathanael Nerode (GCC)
  0 siblings, 1 reply; 7+ messages in thread
From: Hans-Peter Nilsson @ 2012-06-29 13:49 UTC (permalink / raw)
  To: joseph; +Cc: gcc-patches, bonzini, dj, neroden, aoliva, Ralf.Wildenhues

> From: "Joseph S. Myers" <joseph@codesourcery.com>
> Date: Fri, 22 Jun 2012 13:09:42 +0200

> On Fri, 22 Jun 2012, Hans-Peter Nilsson wrote:
> 
> > > > > 	Fix configure test for "stack protector support in target C library".
> > > > > 	* configure.ac (test_prefix, test_exec_prefix): Move setting from
> > > > > 	inside sysroot handling to before and outside it.
> > > > > 	* configure: Regenerate.
> > > >
> > > > Ping, <http://gcc.gnu.org/ml/gcc-patches/2012-05/msg02137.html>.
> > > 
> > > and a ping (this will look pretty after a few weeks).
> > and a ping (you see now what I meant).

And another ping, now with artistic asymmetry. :-}

> I advise CC:ing pings to relevant maintainers (in this case, build-system 
> maintainers).

But they're so many...  Very well, as a pragmatic measure.

brgds, H-P

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

* Re: Ping*4: [RFA:] fix bug in configure header-probing for stack protector support in target C library
  2012-06-29 13:49         ` Ping*4: " Hans-Peter Nilsson
@ 2012-07-05 18:44           ` Nathanael Nerode (GCC)
  0 siblings, 0 replies; 7+ messages in thread
From: Nathanael Nerode (GCC) @ 2012-07-05 18:44 UTC (permalink / raw)
  To: Hans-Peter Nilsson; +Cc: gcc-patches

On 06/29/2012 09:15 AM, Hans-Peter Nilsson wrote:
>> From: "Joseph S. Myers" <joseph@codesourcery.com>
>> Date: Fri, 22 Jun 2012 13:09:42 +0200
> 
>> On Fri, 22 Jun 2012, Hans-Peter Nilsson wrote:
>>
>>>>>> 	Fix configure test for "stack protector support in target C library".
>>>>>> 	* configure.ac (test_prefix, test_exec_prefix): Move setting from
>>>>>> 	inside sysroot handling to before and outside it.
>>>>>> 	* configure: Regenerate.
>>>>>
>>>>> Ping, <http://gcc.gnu.org/ml/gcc-patches/2012-05/msg02137.html>.
>>>>
>>>> and a ping (this will look pretty after a few weeks).
>>> and a ping (you see now what I meant).
> 
> And another ping, now with artistic asymmetry. :-}
> 
>> I advise CC:ing pings to relevant maintainers (in this case, build-system 
>> maintainers).
> 
> But they're so many...  Very well, as a pragmatic measure.
> 
> brgds, H-P

Approved.  Finally, someone submits a patch in a section of the code I
think I still understand.  ;-)

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

end of thread, other threads:[~2012-07-05 18:44 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-05-31 23:38 [RFA:] fix bug in configure header-probing for stack protector support in target C library Hans-Peter Nilsson
2012-06-08  0:36 ` Ping: " Hans-Peter Nilsson
2012-06-15  3:06   ` Ping*2: " Hans-Peter Nilsson
2012-06-22  7:46     ` Ping*3: " Hans-Peter Nilsson
2012-06-22 11:45       ` Joseph S. Myers
2012-06-29 13:49         ` Ping*4: " Hans-Peter Nilsson
2012-07-05 18:44           ` Nathanael Nerode (GCC)

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