Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Pedro Alves <palves@redhat.com>
To: Yao Qi <qiyaoltc@gmail.com>
Cc: gdb-patches@sourceware.org, jan.kratochvil@redhat.com,
	pmuldoon@redhat.com
Subject: Re: [PATCH] Run gdb.compile/*.exp on {x86,x86_64,s390}-linux only
Date: Tue, 16 Jan 2018 17:20:00 -0000	[thread overview]
Message-ID: <baeeb539-206f-f2f3-acc2-85aebb8b6f93@redhat.com> (raw)
In-Reply-To: <c4937d76-0111-1e8c-0607-5dc65cbf2461@redhat.com>

On 01/16/2018 04:59 PM, Pedro Alves wrote:
>> searching for compiler matching regex ^aarch64(-[^-]*)?-linux(-gnu)?-gcc$^M
>> found compiler /home/yaoqi01/fsf-trunk-build/build-native-aarch64-none-linux-gnu/install/sysroot/usr/bin/aarch64-none-linux-gnu-gcc^M
>> Passing 11 compiler options:^M
>> Compiler option 0: <>^M
>> Compiler option 1: <-std=gnu11>^M
>> Compiler option 2: <-fno-exceptions>^M
>> Compiler option 3: <-O0>^M
>> Compiler option 4: <-gdwarf-4>^M
>> Compiler option 5: <-fPIE>^M
>> Compiler option 6: <-Wall>^M
>> Compiler option 7: <-Wno-implicit-function-declaration>^M
>> Compiler option 8: <-Wno-unused-but-set-variable>^M
>> Compiler option 9: <-Wno-unused-variable>^M
>> Compiler option 10: <-fno-stack-protector>^M
>> source file produced: /tmp/gdbobj-6vzbkt/out3.c^M
>> ^M
>> aarch64-none-linux-gnu-gcc: error: : No such file or directory
> 
> It sounds like the empty argument passed as "Compiler option 0" is
> being interpreted by the compiler as a source file name?  And then
> the error message is including the file name that is not found, 
> but since the file name is the empty string, it reads a bit
> cryptic.
> 
> The fix is probably to not pass that option at all if empty.
> 

Yes, I could reproduce this by hacking default_gcc_target_options
to return "" like you were doing:

 Passing 15 compiler options:
 Compiler option 0: <>                 <<<<<< BAD
 Compiler option 1: <-mtune=generic>
 Compiler option 2: <-march=x86-64>
 ...

Making default_gcc_target_options return NULL instead works:

 Passing 14 compiler options:
 Compiler option 0: <-mtune=generic>
 Compiler option 1: <-march=x86-64>
 ...

Thanks,
Pedro Alves


  reply	other threads:[~2018-01-16 17:20 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-16 11:50 Yao Qi
2018-01-16 12:18 ` Pedro Alves
2018-01-16 15:14   ` Yao Qi
2018-01-16 16:47     ` Phil Muldoon
2018-01-16 16:59     ` Pedro Alves
2018-01-16 17:20       ` Pedro Alves [this message]
2018-01-16 17:45         ` Yao Qi
2018-01-16 18:58     ` Sergio Durigan Junior
2018-01-17 10:06       ` Yao Qi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=baeeb539-206f-f2f3-acc2-85aebb8b6f93@redhat.com \
    --to=palves@redhat.com \
    --cc=gdb-patches@sourceware.org \
    --cc=jan.kratochvil@redhat.com \
    --cc=pmuldoon@redhat.com \
    --cc=qiyaoltc@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox