* [PATCH] ld: don't hardcode "-melf_i386"
@ 2014-04-15 17:22 Roger Pau Monne
2014-04-15 17:57 ` [SeaBIOS] " Idwer Vollering
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Roger Pau Monne @ 2014-04-15 17:22 UTC (permalink / raw)
To: seabios, xen-devel; +Cc: Ian Campbell, Roger Pau Monne
On FreeBSD, the name of the emulation is "-melf_i386_fbsd", so allow
SeaBIOS to fetch the emulation to use from the environment variables.
This allows SeaBIOS to compile on FreeBSD with gcc.
Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Cc: Ian Campbell <ian.campbell@citrix.com>
---
Makefile | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/Makefile b/Makefile
index 759bbbb..6a51305 100644
--- a/Makefile
+++ b/Makefile
@@ -67,6 +67,7 @@ STRIP=strip
PYTHON=python
CPP=cpp
IASL:=iasl
+LD32BIT_FLAG:=-melf_i386
# Default targets
-include $(KCONFIG_CONFIG)
@@ -143,8 +144,8 @@ $(OUT)romlayout16.lds: $(OUT)ccode32flat.o $(OUT)code32seg.o $(OUT)ccode16.o $(O
@echo " Building ld scripts"
$(Q)./tools/buildversion.sh $(OUT)version.c
$(Q)$(CC) $(CFLAGS32FLAT) -c $(OUT)version.c -o $(OUT)version.o
- $(Q)$(LD) -melf_i386 -r $(OUT)ccode32flat.o $(OUT)version.o -o $(OUT)code32flat.o
- $(Q)$(LD) -melf_i386 -r $(OUT)ccode16.o $(OUT)romlayout.o -o $(OUT)code16.o
+ $(Q)$(LD) $(LD32BIT_FLAG) -r $(OUT)ccode32flat.o $(OUT)version.o -o $(OUT)code32flat.o
+ $(Q)$(LD) $(LD32BIT_FLAG) -r $(OUT)ccode16.o $(OUT)romlayout.o -o $(OUT)code16.o
$(Q)$(OBJDUMP) -thr $(OUT)code32flat.o > $(OUT)code32flat.o.objdump
$(Q)$(OBJDUMP) -thr $(OUT)code32seg.o > $(OUT)code32seg.o.objdump
$(Q)$(OBJDUMP) -thr $(OUT)code16.o > $(OUT)code16.o.objdump
--
1.7.7.5 (Apple Git-26)
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [SeaBIOS] [PATCH] ld: don't hardcode "-melf_i386"
2014-04-15 17:22 [PATCH] ld: don't hardcode "-melf_i386" Roger Pau Monne
@ 2014-04-15 17:57 ` Idwer Vollering
2014-04-15 18:11 ` Igor Kozhukhov
[not found] ` <CAPp9OrnMGEBPCfQXDPd2Z_vARa-m_Ta7zZv=ZNYC49mmcfRUgQ@mail.gmail.com>
2 siblings, 0 replies; 4+ messages in thread
From: Idwer Vollering @ 2014-04-15 17:57 UTC (permalink / raw)
To: Roger Pau Monne; +Cc: xen-devel, seabios, Ian Campbell
2014-04-15 19:22 GMT+02:00 Roger Pau Monne <roger.pau@citrix.com>:
> On FreeBSD, the name of the emulation is "-melf_i386_fbsd", so allow
> SeaBIOS to fetch the emulation to use from the environment variables.
>
> This allows SeaBIOS to compile on FreeBSD with gcc.
What about clang? On FreeBSD >= 10 you need gcc from ports.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] ld: don't hardcode "-melf_i386"
2014-04-15 17:22 [PATCH] ld: don't hardcode "-melf_i386" Roger Pau Monne
2014-04-15 17:57 ` [SeaBIOS] " Idwer Vollering
@ 2014-04-15 18:11 ` Igor Kozhukhov
[not found] ` <CAPp9OrnMGEBPCfQXDPd2Z_vARa-m_Ta7zZv=ZNYC49mmcfRUgQ@mail.gmail.com>
2 siblings, 0 replies; 4+ messages in thread
From: Igor Kozhukhov @ 2014-04-15 18:11 UTC (permalink / raw)
To: Roger Pau Monne; +Cc: xen-devel, seabios, Ian Campbell
On 15 Apr 2014, at 21:22, Roger Pau Monne <roger.pau@citrix.com> wrote:
> On FreeBSD, the name of the emulation is "-melf_i386_fbsd", so allow
> SeaBIOS to fetch the emulation to use from the environment variables.
the same with -melf_i386_sol2 on illumos based platform.
LGTM from me here.
-Igor
> This allows SeaBIOS to compile on FreeBSD with gcc.
>
> Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
> Cc: Ian Campbell <ian.campbell@citrix.com>
> ---
> Makefile | 5 +++--
> 1 files changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/Makefile b/Makefile
> index 759bbbb..6a51305 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -67,6 +67,7 @@ STRIP=strip
> PYTHON=python
> CPP=cpp
> IASL:=iasl
> +LD32BIT_FLAG:=-melf_i386
>
> # Default targets
> -include $(KCONFIG_CONFIG)
> @@ -143,8 +144,8 @@ $(OUT)romlayout16.lds: $(OUT)ccode32flat.o $(OUT)code32seg.o $(OUT)ccode16.o $(O
> @echo " Building ld scripts"
> $(Q)./tools/buildversion.sh $(OUT)version.c
> $(Q)$(CC) $(CFLAGS32FLAT) -c $(OUT)version.c -o $(OUT)version.o
> - $(Q)$(LD) -melf_i386 -r $(OUT)ccode32flat.o $(OUT)version.o -o $(OUT)code32flat.o
> - $(Q)$(LD) -melf_i386 -r $(OUT)ccode16.o $(OUT)romlayout.o -o $(OUT)code16.o
> + $(Q)$(LD) $(LD32BIT_FLAG) -r $(OUT)ccode32flat.o $(OUT)version.o -o $(OUT)code32flat.o
> + $(Q)$(LD) $(LD32BIT_FLAG) -r $(OUT)ccode16.o $(OUT)romlayout.o -o $(OUT)code16.o
> $(Q)$(OBJDUMP) -thr $(OUT)code32flat.o > $(OUT)code32flat.o.objdump
> $(Q)$(OBJDUMP) -thr $(OUT)code32seg.o > $(OUT)code32seg.o.objdump
> $(Q)$(OBJDUMP) -thr $(OUT)code16.o > $(OUT)code16.o.objdump
> --
> 1.7.7.5 (Apple Git-26)
>
>
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xen.org
> http://lists.xen.org/xen-devel
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [SeaBIOS] [PATCH] ld: don't hardcode "-melf_i386"
[not found] ` <CAPp9OrnMGEBPCfQXDPd2Z_vARa-m_Ta7zZv=ZNYC49mmcfRUgQ@mail.gmail.com>
@ 2014-04-15 18:22 ` Roger Pau Monné
0 siblings, 0 replies; 4+ messages in thread
From: Roger Pau Monné @ 2014-04-15 18:22 UTC (permalink / raw)
To: Idwer Vollering; +Cc: xen-devel, seabios, Ian Campbell
On 15/04/14 19:57, Idwer Vollering wrote:
> 2014-04-15 19:22 GMT+02:00 Roger Pau Monne <roger.pau@citrix.com>:
>> On FreeBSD, the name of the emulation is "-melf_i386_fbsd", so allow
>> SeaBIOS to fetch the emulation to use from the environment variables.
>>
>> This allows SeaBIOS to compile on FreeBSD with gcc.
>
> What about clang? On FreeBSD >= 10 you need gcc from ports.
Well, as stated on the commit message, this only fixes the linker issue,
it still requires gcc. I will certainly look into getting it compiled
with clang, but it is not a priority for me right now.
Roger.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2014-04-15 18:22 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-04-15 17:22 [PATCH] ld: don't hardcode "-melf_i386" Roger Pau Monne
2014-04-15 17:57 ` [SeaBIOS] " Idwer Vollering
2014-04-15 18:11 ` Igor Kozhukhov
[not found] ` <CAPp9OrnMGEBPCfQXDPd2Z_vARa-m_Ta7zZv=ZNYC49mmcfRUgQ@mail.gmail.com>
2014-04-15 18:22 ` [SeaBIOS] " Roger Pau Monné
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.