Bug 39172 - libada parsing of multilib options
Summary: libada parsing of multilib options
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: ada (show other bugs)
Version: unknown
: P3 normal
Target Milestone: ---
Assignee: Paolo Bonzini
URL: http://gcc.gnu.org/ml/gcc-patches/200...
Keywords:
Depends on:
Blocks:
 
Reported: 2009-02-12 19:23 UTC by Joel Sherrill
Modified: 2014-03-16 08:32 UTC (History)
3 users (show)

See Also:
Host:
Target: m68k-*.*
Build:
Known to work:
Known to fail:
Last reconfirmed: 2009-02-26 11:07:00


Attachments
Candidate patch (525 bytes, patch)
2009-02-25 16:57 UTC, Andreas Schwab
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Joel Sherrill 2009-02-12 19:23:01 UTC
The magic that groks the multilib set in libada is unable to process the
one for the m68k.  Maybe someone who is configure/awk proficient can spot
the issue.  This works on other targets.

	make -C ../.././gcc/ada "MAKEOVERRIDES=" "LDFLAGS=" "LN_S=ln -s" "SHELL=/bin/sh" "GNATLIBFLAGS=-W -Wall -gnatpg " "GNATLIBCFLAGS=-g -O2 " "TARGET_LIBGCC2_CFLAGS=" "THREAD_KIND=native" "TRACE=no" "MULTISUBDIR=" "libsubdir=/home/joel/test-gcc/install/lib/gcc/m68k-rtems4.10/4.4.0" "objext=.o" "prefix=/home/joel/test-gcc/install" "exeext=.exeext.should.not.be.used " 'CC=the.host.compiler.should.not.be.needed' "GCC_FOR_TARGET=/home/joel/test-gcc/b-gcc2-m68k/./gcc/xgcc -B/home/joel/test-gcc/b-gcc2-m68k/./gcc/ -nostdinc -B/home/joel/test-gcc/b-gcc2-m68k/m68k-rtems4.10/newlib/ -isystem /home/joel/test-gcc/b-gcc2-m68k/m68k-rtems4.10/newlib/targ-include -isystem /home/joel/test-gcc/gcc-svn/newlib/libc/include -B/home/joel/test-gcc/install/m68k-rtems4.10/bin/ -B/home/joel/test-gcc/install/m68k-rtems4.10/lib/ -isystem /home/joel/test-gcc/install/m68k-rtems4.10/include -isystem /home/joel/test-gcc/install/m68k-rtems4.10/sys-include" "CFLAGS=-B/home/joel/test-gcc/bsp-install/m68k-rtems4.10/mcf5206elite/lib/   -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes" gnatlib \
	&& touch stamp-libada
make[3]: BEGIN { FS="[ \t]*[,()][ \t]*"; ORS=" " }; /^M68K_DEVICE/ { CPU=$3; FLAGS=$8; CPU_NAME=substr($2,2,length($2)-2); MLIB=substr($5,2,length($5)-2); if ( (CPU_NAME == MLIB) && (match(MLIB, "^68") || MLIB == "cpu32" || MLIB == "5206" || MLIB == "5208" || MLIB == "5307" || MLIB == "5407" || MLIB == "5475")) print  "m"MLIB }: Command not found
make[3]: Entering directory `/home/joel/test-gcc/b-gcc2-m68k/gcc/ada'
make[3]: BEGIN { FS="[ \t]*[,()][ \t]*"; ORS=" " }; /^M68K_DEVICE/ { CPU=$3; FLAGS=$8; CPU_NAME=substr($2,2,length($2)-2); MLIB=substr($5,2,length($5)-2); if ( CPU == "") print  MLIB }: Command not found
Comment 1 Joel Sherrill 2009-02-12 19:29:00 UTC
this is on the svn trunk as libada multilib is new since 4.3.
Comment 2 Andreas Schwab 2009-02-25 16:43:35 UTC
The problem seems to be that the AWK makefile variable is not properly passed down to submakes.
Comment 3 Andreas Schwab 2009-02-25 16:57:38 UTC
Created attachment 17360 [details]
Candidate patch
Comment 4 Andreas Schwab 2009-02-25 16:58:20 UTC
Can you please try out the attached patch?
Comment 5 Paolo Bonzini 2009-02-25 17:03:39 UTC
Subject: Re:  libada parsing of multilib options

schwab at suse dot de wrote:
> ------- Comment #3 from schwab at suse dot de  2009-02-25 16:57 -------
> Created an attachment (id=17360)
>  --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=17360&action=view)
> Candidate patch

That's fine, or you can probably add AWK=@AWK@ in
gcc/ada/gcc-interface/Makefile.in.  That was the patch I was meaning to
test.

If you don't want to test this other thing, your patch is okay if it is
tested.
Comment 6 Joel Sherrill 2009-02-25 17:04:50 UTC
Can you include the generated files please?  I do not have autoconf 2.59 installed.   I can test the Ada build quickly though.

Thanks.
Comment 7 Andreas Schwab 2009-02-26 11:07:00 UTC
(In reply to comment #5)
> That's fine, or you can probably add AWK=@AWK@ in
> gcc/ada/gcc-interface/Makefile.in.  That was the patch I was meaning to
> test.

I agree, this is a much simpler patch.  Unfortunately there is more to do:

gawk: fatal: cannot open file `../../../gcc/gcc/ada/config/m68k/m68k-devices.def' for reading (No such file or directory)

The reference to $(srcdir) is not working correctly.
Comment 8 Paolo Bonzini 2009-02-26 15:48:31 UTC
Subject: Re:  libada parsing of multilib options

I'll ping Marcello Presulli to submit his patch.

Paolo
Comment 9 Paolo Bonzini 2009-02-27 07:40:30 UTC
Andreas, the patch you posted on gcc-patches is okay.  Thanks very much!
Comment 10 Andreas Schwab 2009-02-27 09:57:29 UTC
Fixed.
Comment 11 Andreas Schwab 2014-03-16 08:32:56 UTC
Author: schwab
Date: Sun Mar 16 08:32:23 2014
New Revision: 208605

URL: http://gcc.gnu.org/viewcvs?rev=208605&root=gcc&view=rev
Log:
PR ada/39172
* gcc/ada/gcc-interface/Makefile.in (target_cpu_default): Revert
2013-10-11 change.

Modified:
    trunk/gcc/ada/ChangeLog
    trunk/gcc/ada/gcc-interface/Makefile.in