qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH v2] configure: Deal with OpenBSD/i386 emulation linker
@ 2017-11-07 23:46 Brad Smith
  2017-11-20 13:46 ` Peter Maydell
  0 siblings, 1 reply; 3+ messages in thread
From: Brad Smith @ 2017-11-07 23:46 UTC (permalink / raw)
  To: qemu-devel

OpenBSD/i386 uses elf_i386_obsd for the emulation linker.

Signed-off-by: Brad Smith <brad@comstyle.com>


diff --git a/configure b/configure
index dd73cce62f..c9dd747283 100755
--- a/configure
+++ b/configure
@@ -5159,9 +5159,9 @@ if test \( "$cpu" = "i386" -o "$cpu" = "x86_64" \) -a \
         "$targetos" != "Darwin" -a "$targetos" != "SunOS" -a \
         "$softmmu" = yes ; then
     # Different host OS linkers have different ideas about the name of the ELF
-    # emulation. Linux and OpenBSD use 'elf_i386'; FreeBSD uses the _fbsd
-    # variant; and Windows uses i386pe.
-    for emu in elf_i386 elf_i386_fbsd i386pe; do
+    # emulation. Linux and OpenBSD/amd64 use 'elf_i386'; FreeBSD uses the _fbsd
+    # variant; OpenBSD/i386 uses the _obsd variant; and Windows uses i386pe.
+    for emu in elf_i386 elf_i386_fbsd elf_i386_obsd i386pe; do
         if "$ld" -verbose 2>&1 | grep -q "^[[:space:]]*$emu[[:space:]]*$"; then
             ld_i386_emulation="$emu"
             roms="optionrom"

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

* Re: [Qemu-devel] [PATCH v2] configure: Deal with OpenBSD/i386 emulation linker
  2017-11-07 23:46 [Qemu-devel] [PATCH v2] configure: Deal with OpenBSD/i386 emulation linker Brad Smith
@ 2017-11-20 13:46 ` Peter Maydell
  2017-11-23 18:48   ` Peter Maydell
  0 siblings, 1 reply; 3+ messages in thread
From: Peter Maydell @ 2017-11-20 13:46 UTC (permalink / raw)
  To: Brad Smith; +Cc: QEMU Developers

On 7 November 2017 at 23:46, Brad Smith <brad@comstyle.com> wrote:
> OpenBSD/i386 uses elf_i386_obsd for the emulation linker.
>
> Signed-off-by: Brad Smith <brad@comstyle.com>
>
>
> diff --git a/configure b/configure
> index dd73cce62f..c9dd747283 100755
> --- a/configure
> +++ b/configure
> @@ -5159,9 +5159,9 @@ if test \( "$cpu" = "i386" -o "$cpu" = "x86_64" \) -a \
>          "$targetos" != "Darwin" -a "$targetos" != "SunOS" -a \
>          "$softmmu" = yes ; then
>      # Different host OS linkers have different ideas about the name of the ELF
> -    # emulation. Linux and OpenBSD use 'elf_i386'; FreeBSD uses the _fbsd
> -    # variant; and Windows uses i386pe.
> -    for emu in elf_i386 elf_i386_fbsd i386pe; do
> +    # emulation. Linux and OpenBSD/amd64 use 'elf_i386'; FreeBSD uses the _fbsd
> +    # variant; OpenBSD/i386 uses the _obsd variant; and Windows uses i386pe.
> +    for emu in elf_i386 elf_i386_fbsd elf_i386_obsd i386pe; do
>          if "$ld" -verbose 2>&1 | grep -q "^[[:space:]]*$emu[[:space:]]*$"; then
>              ld_i386_emulation="$emu"
>              roms="optionrom"

Hi; just a reminder that this patch is still blocked on getting
an answer to why the correct answer for OpenBSD/x86_64 is
"elf_i386" and not "elf_i386_obsd"...

thanks
-- PMM

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

* Re: [Qemu-devel] [PATCH v2] configure: Deal with OpenBSD/i386 emulation linker
  2017-11-20 13:46 ` Peter Maydell
@ 2017-11-23 18:48   ` Peter Maydell
  0 siblings, 0 replies; 3+ messages in thread
From: Peter Maydell @ 2017-11-23 18:48 UTC (permalink / raw)
  To: Brad Smith; +Cc: QEMU Developers

On 20 November 2017 at 13:46, Peter Maydell <peter.maydell@linaro.org> wrote:
> On 7 November 2017 at 23:46, Brad Smith <brad@comstyle.com> wrote:
>> OpenBSD/i386 uses elf_i386_obsd for the emulation linker.
>>
>> Signed-off-by: Brad Smith <brad@comstyle.com>
>>
>>
>> diff --git a/configure b/configure
>> index dd73cce62f..c9dd747283 100755
>> --- a/configure
>> +++ b/configure
>> @@ -5159,9 +5159,9 @@ if test \( "$cpu" = "i386" -o "$cpu" = "x86_64" \) -a \
>>          "$targetos" != "Darwin" -a "$targetos" != "SunOS" -a \
>>          "$softmmu" = yes ; then
>>      # Different host OS linkers have different ideas about the name of the ELF
>> -    # emulation. Linux and OpenBSD use 'elf_i386'; FreeBSD uses the _fbsd
>> -    # variant; and Windows uses i386pe.
>> -    for emu in elf_i386 elf_i386_fbsd i386pe; do
>> +    # emulation. Linux and OpenBSD/amd64 use 'elf_i386'; FreeBSD uses the _fbsd
>> +    # variant; OpenBSD/i386 uses the _obsd variant; and Windows uses i386pe.
>> +    for emu in elf_i386 elf_i386_fbsd elf_i386_obsd i386pe; do
>>          if "$ld" -verbose 2>&1 | grep -q "^[[:space:]]*$emu[[:space:]]*$"; then
>>              ld_i386_emulation="$emu"
>>              roms="optionrom"
>
> Hi; just a reminder that this patch is still blocked on getting
> an answer to why the correct answer for OpenBSD/x86_64 is
> "elf_i386" and not "elf_i386_obsd"...

I went and looked through the binutils source, and as far as
I can tell the _obsd variant sets some extra defaults which
we probably don't care about for ROM images, and in practice
the binary blobs are the same for both if run on openbsd/x86_64.
So I think that the current behaviour (use elf_i386 in preference
to elf_i386_obsd) is the right thing, because the binaries we're
creating are not specifically openbsd binaries.

So I've applied this patch to master.

thanks
-- PMM

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

end of thread, other threads:[~2017-11-23 18:49 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-11-07 23:46 [Qemu-devel] [PATCH v2] configure: Deal with OpenBSD/i386 emulation linker Brad Smith
2017-11-20 13:46 ` Peter Maydell
2017-11-23 18:48   ` Peter Maydell

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 NNTP newsgroup(s).