Serious regressions due to newlib's HAVE_INITFINI_ARRAY (Re: [PATCH] Fix up --enable-initfini-array autodetection in configure (PR bootstrap/50237))

2012-02-22 Thread Ulrich Weigand
Jakub Jelinek wrote: PR bootstrap/50237 * config/initfini-array.h: Guard content of the header with #ifdef HAVE_INITFINI_ARRAY. * configure.ac: Move gcc_AC_INITFINI_ARRAY much later into the file. Add initfini-array.h to tm_file here. * acinclude.m4

Re: Serious regressions due to newlib's HAVE_INITFINI_ARRAY (Re: [PATCH] Fix up --enable-initfini-array autodetection in configure (PR bootstrap/50237))

2012-02-22 Thread Jakub Jelinek
On Wed, Feb 22, 2012 at 03:55:34PM +0100, Ulrich Weigand wrote: However, the macro HAVE_INITFINI_ARRAY is defined anyway; this definition is done by an internal newlib.h header that is pulled in via the stdio.h include in GCC's tsystem.h. [ This is clearly a violation of C namespace rules,

Re: [PATCH] Fix up --enable-initfini-array autodetection in configure (PR bootstrap/50237)

2012-02-20 Thread Richard Guenther
On Fri, Feb 17, 2012 at 2:51 PM, Rainer Orth r...@cebitec.uni-bielefeld.de wrote: Rainer Orth r...@cebitec.uni-bielefeld.de writes: Richard Guenther richard.guent...@gmail.com writes: I'm not sure about the varasm.c change - it's definitely not a no-op (callback will be not set, and the

Re: [PATCH] Fix up --enable-initfini-array autodetection in configure (PR bootstrap/50237)

2012-02-17 Thread Rainer Orth
Rainer Orth r...@cebitec.uni-bielefeld.de writes: Richard Guenther richard.guent...@gmail.com writes: I'm not sure about the varasm.c change - it's definitely not a no-op (callback will be not set, and the flags will be different). Certainly As I've demonstrated in my response to H.J., the

Re: [PATCH] Fix up --enable-initfini-array autodetection in configure (PR bootstrap/50237)

2012-02-16 Thread Richard Guenther
On Wed, Feb 15, 2012 at 6:09 PM, Rainer Orth r...@cebitec.uni-bielefeld.de wrote: Paolo Bonzini bonz...@gnu.org writes: This must be a separate macro in acinclude.m4 that is AC_REQUIREd from gcc_AC_INITFINI_ARRAY. Here's an updated patch that does so.  During testing, I found one additional

Re: [PATCH] Fix up --enable-initfini-array autodetection in configure (PR bootstrap/50237)

2012-02-16 Thread H.J. Lu
On Thu, Feb 16, 2012 at 1:32 AM, Richard Guenther richard.guent...@gmail.com wrote: On Wed, Feb 15, 2012 at 6:09 PM, Rainer Orth r...@cebitec.uni-bielefeld.de wrote: Paolo Bonzini bonz...@gnu.org writes: This must be a separate macro in acinclude.m4 that is AC_REQUIREd from

Re: [PATCH] Fix up --enable-initfini-array autodetection in configure (PR bootstrap/50237)

2012-02-16 Thread Rainer Orth
H.J. Lu hjl.to...@gmail.com writes: GNU assembler understands: .section.init_array* If Solaris assembler doesn't, I don't know how it will work with .init_array with priority. That's not the issue: merging .init_array* sections is handled all right by gld irrespective of sh_type;

Re: [PATCH] Fix up --enable-initfini-array autodetection in configure (PR bootstrap/50237)

2012-02-16 Thread Rainer Orth
Richard Guenther richard.guent...@gmail.com writes: I'm not sure about the varasm.c change - it's definitely not a no-op (callback will be not set, and the flags will be different). Certainly As I've demonstrated in my response to H.J., the effect with gas is none. the current code is

Re: [PATCH] Fix up --enable-initfini-array autodetection in configure (PR bootstrap/50237)

2012-02-15 Thread Paolo Bonzini
On 02/15/2012 06:09 PM, Rainer Orth wrote: Paolo Bonzini bonz...@gnu.org writes: This must be a separate macro in acinclude.m4 that is AC_REQUIREd from gcc_AC_INITFINI_ARRAY. Here's an updated patch that does so. During testing, I found one additional complication, though. With the Sun

Re: [PATCH] Fix up --enable-initfini-array autodetection in configure (PR bootstrap/50237)

2012-01-30 Thread Rainer Orth
Jakub Jelinek ja...@redhat.com writes: The following patch attempts to perform a separate linker check (grepping objdump of a linked binary) and checks so far glibc version which is known to support .init_array properly. Perhaps other C libraries could be added there too (does e.g. Solaris

Re: [PATCH] Fix up --enable-initfini-array autodetection in configure (PR bootstrap/50237)

2012-01-30 Thread Paolo Bonzini
Jakub Jelinek ja...@redhat.com writes: The following patch attempts to perform a separate linker check (grepping objdump of a linked binary) and checks so far glibc version which is known to support .init_array properly. Perhaps other C libraries could be added there too (does e.g. Solaris

Re: [PATCH] Fix up --enable-initfini-array autodetection in configure (PR bootstrap/50237)

2012-01-30 Thread Rainer Orth
Paolo Bonzini bonz...@gnu.org writes: changequote(,)dnl +if test x${build} = x${target} test x${build} = x${host}; then + case ${target} in +*-*-solaris2*) + # ld.so.1 and ld are guaranteed to be updated in lockstep, so check + # ld version number for use in ld.so.1 feature

Re: [PATCH] Fix up --enable-initfini-array autodetection in configure (PR bootstrap/50237)

2012-01-30 Thread Paolo Bonzini
On 01/30/2012 06:00 PM, Rainer Orth wrote: Can you test Linux too? The change of -e0 looks good, but I'd rather check on the actual system. I can test on x86_64-unknown-linux-gnu, just not on my laptop at home. Note that you only need to test ./configure, not bootstrap/regtest.

Re: [PATCH] Fix up --enable-initfini-array autodetection in configure (PR bootstrap/50237)

2012-01-19 Thread Paolo Bonzini
On 01/19/2012 12:24 AM, Jakub Jelinek wrote: if test x${build} = x${target} test x${build} = x${host}; then This test is no longer necessary, is it? ia64 does its own cross-compile detection via AC_RUN_IFELSE, and other hosts are cross-compile safe. The patch is okay if you remove it.

Re: [PATCH] Fix up --enable-initfini-array autodetection in configure (PR bootstrap/50237)

2012-01-19 Thread Jakub Jelinek
On Thu, Jan 19, 2012 at 09:54:43AM +0100, Paolo Bonzini wrote: On 01/19/2012 12:24 AM, Jakub Jelinek wrote: if test x${build} = x${target} test x${build} = x${host}; then This test is no longer necessary, is it? ia64 does its own cross-compile detection via AC_RUN_IFELSE, and other

[PATCH] Fix up --enable-initfini-array autodetection in configure (PR bootstrap/50237)

2012-01-18 Thread Jakub Jelinek
Hi! As discussed in the PR, compiling the initfini testcase with the host compiler and running it is problematic for bootstrap, as in stage1 we use the host compiler which might use one version of as/ld, but stage2 is using stage1 compiler as host compiler and might use a different as/ld. If one