This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: libgomp bootstrap failure on i486-linux with --enable-targets=all
- From: Matthias Klose <doko at cs dot tu-berlin dot de>
- To: gcc-patches at gcc dot gnu dot org
- Cc: Jakub Jelinek <jakub at redhat dot com>, Janis Johnson <janis187 at us dot ibm dot com>
- Date: Tue, 2 Jan 2007 22:05:10 +0100
- Subject: Re: libgomp bootstrap failure on i486-linux with --enable-targets=all
- References: <17790.48304.928067.459797@gargle.gargle.HOWL> <20061212143857.GE29911@devserv.devel.redhat.com> <17790.60299.378593.838548@gargle.gargle.HOWL> <17797.19338.695659.120533@gargle.gargle.HOWL> <20061218185423.GA5036@us.ibm.com>
Janis Johnson writes:
> On Sun, Dec 17, 2006 at 02:52:10PM +0100, Matthias Klose wrote:
> >
> > updated patch attached (keeping the -mtune settings). libgomp
> > testsuite shows no failures with
> > RUNTESTFLAGS='--target_board=unix\{-m64,\}' make check. ok to checkin?
> >
> > 2006-12-17 Matthias Klose <doko@debian.org>
> >
> > * configure.tgt (i[456]86-*-linux*): Only add ia32 specific
> > flags if not building with -m64.
> > * testsuite/lib/libgomp-dg.exp (libgomp_init): Don't add -march
> > flag for i?86-*-* targets, if current target matches -m64.
>
> I'll let the libgomp maintainers review this, but
>
> > - if [istarget i?86-*-*] {
> > + if { [istarget i?86-*-*] && [string match *-m64* $current_target_name] == -1} {
>
> The second condition should be [is-effective-target ilp32].
>
> Test support should avoid looking for options like -m32 and -m64 because
> compilers can usually be configured to generate either one by default.
thanks for the review. Updated patch attached.
Matthias
2007-01-02 Matthias Klose <doko@debian.org>
* configure.tgt (i[456]86-*-linux*): Only add ia32 specific
flags if not building with -m64.
* testsuite/lib/libgomp-dg.exp (libgomp_init): Only add the
-march=i486 flag for ilp32 targets.
Index: libgomp/configure.tgt
===================================================================
--- libgomp/configure.tgt (revision 119778)
+++ libgomp/configure.tgt (working copy)
@@ -49,9 +49,14 @@
# Note that bare i386 is not included here. We need cmpxchg.
i[456]86-*-linux*)
config_path="linux/x86 linux posix"
- if test -z "$with_arch"; then
- XCFLAGS="${XCFLAGS} -march=i486 -mtune=${target_cpu}"
- fi
+ case " ${CC} ${CFLAGS} " in
+ *" -m64 "*)
+ ;;
+ *)
+ if test -z "$with_arch"; then
+ XCFLAGS="${XCFLAGS} -march=i486 -mtune=${target_cpu}"
+ fi
+ esac
;;
# Similar jiggery-pokery for x86_64 multilibs, except here we
Index: libgomp/testsuite/lib/libgomp-dg.exp
===================================================================
--- libgomp/testsuite/lib/libgomp-dg.exp (revision 119778)
+++ libgomp/testsuite/lib/libgomp-dg.exp (working copy)
@@ -130,7 +131,7 @@
}
# We use atomic operations in the testcases to validate results.
- if [istarget i?86-*-*] {
+ if { [istarget i?86-*-*] && [is-effective-target ilp32] } {
lappend ALWAYS_CFLAGS "additional_flags=-march=i486"
}
if [istarget sparc*-*-*] {