Mailing List Archive

How to compile the unstable source for arm at sstabellini/xen-unstable.git/.git
---------- Forwarded message ----------
From: Krishna Pavan <post4pavan@gmail.com>
Date: Mon, Feb 6, 2012 at 2:27 PM
Subject: Re: [XenARM] [help] How to compile the unstable source for arm at
sstabellini/xen-unstable.git/.git
To: "Frank, Chen" <chysun2000@163.com>


Hi Xen-ARM, Chen,

You can download that tool chain by installing a downloaded package from
codesourcery.
Re: How to compile the unstable source for arm at sstabellini/xen-unstable.git/.git [ In reply to ]
Hi Xen-ARM, Krishna Pavan,

Thanks. :-)

I am downloading the latest arm-none-linux-gnueabi cross compiler now, and try it again.

Best Regards,
Frank
--


At 2012-02-06 16:59:04,"Krishna Pavan" <post4pavan@gmail.com> wrote:




---------- Forwarded message ----------
From: Krishna Pavan<post4pavan@gmail.com>
Date: Mon, Feb 6, 2012 at 2:27 PM
Subject: Re: [XenARM] [help] How to compile the unstable source for arm at sstabellini/xen-unstable.git/.git
To: "Frank, Chen" <chysun2000@163.com>



Hi Xen-ARM, Chen,

You can download that tool chain by installing a downloaded package from codesourcery.
Re: How to compile the unstable source for arm at sstabellini/xen-unstable.git/.git [ In reply to ]
Hi all,


I succeed in compiling the unstable source for arm at sstabellini/xen-unstable.git/.git with a little modification of xen/arch/arm/Makefile by the latest arm-none-linux-gnueabi- compiler from code sourcery.


- The URL for the latest cross compiler:
https://sourcery.mentor.com/sgpp/lite/arm/portal/package9728/public/arm-none-linux-gnueabi/arm-2011.09-70-arm-none-linux-gnueabi-i686-pc-linux-gnu.tar.bz2


- Compiling command : XEN_TARGET_ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi make xen

- The patch is the following:
diff --git a/xen/arch/arm/Makefile b/xen/arch/arm/Makefile
index 9bc2fc8..244a19f 100644
--- a/xen/arch/arm/Makefile
+++ b/xen/arch/arm/Makefile
@@ -51,15 +51,15 @@ $(BASEDIR)/common/symbols-dummy.o:
$(MAKE) -f $(BASEDIR)/Rules.mk -C $(BASEDIR)/common symbols-dummy.o

$(TARGET)-syms: prelink.o xen.lds $(BASEDIR)/common/symbols-dummy.o
- $(LD) $(LDFLAGS) -T xen.lds -N prelink.o \
+ $(LD) $(LDFLAGS) -T xen.lds -r prelink.o \
$(BASEDIR)/common/symbols-dummy.o -o $(@D)/.$(@F).0
$(NM) -n $(@D)/.$(@F).0 | $(BASEDIR)/tools/symbols >$(@D)/.$(@F).0.S
$(MAKE) -f $(BASEDIR)/Rules.mk $(@D)/.$(@F).0.o
- $(LD) $(LDFLAGS) -T xen.lds -N prelink.o \
+ $(LD) $(LDFLAGS) -T xen.lds -r prelink.o \
$(@D)/.$(@F).0.o -o $(@D)/.$(@F).1
$(NM) -n $(@D)/.$(@F).1 | $(BASEDIR)/tools/symbols >$(@D)/.$(@F).1.S
$(MAKE) -f $(BASEDIR)/Rules.mk $(@D)/.$(@F).1.o
- $(LD) $(LDFLAGS) -T xen.lds -N prelink.o \
+ $(LD) $(LDFLAGS) -T xen.lds -r prelink.o \
$(@D)/.$(@F).1.o -o $@
rm -f $(@D)/.$(@F).[0-9]*


- Without applying this patch, the compiling will output the following error.
---
make[4]: Leaving directory `/home/frank/workspace/xen/src/xen-arm-v6/xen/common'
arm-none-linux-gnueabi-ld -marmelf_linux_eabi -T xen.lds -N prelink.o \
/home/frank/workspace/xen/src/xen-arm-v6/xen/common/symbols-dummy.o -o /home/frank/workspace/xen/src/xen-arm-v6/xen/.xen-syms.0
prelink.o:(.ARM.exidx.init.text+0x0): undefined reference to `__aeabi_unwind_cpp_pr1'
prelink.o:(.ARM.exidx.init.text+0x8): undefined reference to `__aeabi_unwind_cpp_pr1'
prelink.o:(.ARM.exidx.init.text+0x10): undefined reference to `__aeabi_unwind_cpp_pr1'
prelink.o:(.ARM.exidx.init.text+0x18): undefined reference to `__aeabi_unwind_cpp_pr1'
prelink.o:(.ARM.exidx.init.text+0x20): undefined reference to `__aeabi_unwind_cpp_pr1'
prelink.o:(.ARM.exidx.init.text+0x28): more undefined references to `__aeabi_unwind_cpp_pr1' follow
prelink.o:(.ARM.exidx.init.text+0x38): undefined reference to `__aeabi_unwind_cpp_pr0'
prelink.o:(.ARM.exidx.init.text+0x50): undefined reference to `__aeabi_unwind_cpp_pr1'
prelink.o:(.ARM.exidx.init.text+0x58): undefined reference to `__aeabi_unwind_cpp_pr1'
prelink.o:(.ARM.exidx.init.text+0x68): undefined reference to `__aeabi_unwind_cpp_pr1'
prelink.o:(.ARM.exidx.init.text+0xa8): undefined reference to `__aeabi_unwind_cpp_pr1'
prelink.o:(.ARM.exidx.init.text+0xb0): undefined reference to `__aeabi_unwind_cpp_pr0'
prelink.o:(.ARM.exidx.init.text+0xb8): undefined reference to `__aeabi_unwind_cpp_pr1'
prelink.o:(.ARM.exidx.init.text+0xc0): undefined reference to `__aeabi_unwind_cpp_pr1'
..... <-- a lot of similar error message
make[3]: *** [/home/frank/workspace/xen/src/xen-arm-v6/xen/xen-syms] Error 1
make[3]: Leaving directory `/home/frank/workspace/xen/src/xen-arm-v6/xen/arch/arm'
make[2]: *** [/home/frank/workspace/xen/src/xen-arm-v6/xen/xen] Error 2
---


Best Regards,
Frank
--


At 2012-02-06 16:59:04,"Krishna Pavan" <post4pavan@gmail.com> wrote:




---------- Forwarded message ----------
From: Krishna Pavan<post4pavan@gmail.com>
Date: Mon, Feb 6, 2012 at 2:27 PM
Subject: Re: [XenARM] [help] How to compile the unstable source for arm at sstabellini/xen-unstable.git/.git
To: "Frank, Chen" <chysun2000@163.com>



Hi Xen-ARM, Chen,

You can download that tool chain by installing a downloaded package from codesourcery.
Re: How to compile the unstable source for arm at sstabellini/xen-unstable.git/.git [ In reply to ]
At 20:31 +0800 on 07 Feb (1328646671), Frank, Chen wrote:
> Hi all,
>
>
> I succeed in compiling the unstable source for arm at sstabellini/xen-unstable.git/.git with a little modification of xen/arch/arm/Makefile by the latest arm-none-linux-gnueabi- compiler from code sourcery.
>
>
> - The URL for the latest cross compiler:
> https://sourcery.mentor.com/sgpp/lite/arm/portal/package9728/public/arm-none-linux-gnueabi/arm-2011.09-70-arm-none-linux-gnueabi-i686-pc-linux-gnu.tar.bz2
>
>
> - Compiling command : XEN_TARGET_ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi make xen
>
> - The patch is the following:
> diff --git a/xen/arch/arm/Makefile b/xen/arch/arm/Makefile
> index 9bc2fc8..244a19f 100644
> --- a/xen/arch/arm/Makefile
> +++ b/xen/arch/arm/Makefile
> @@ -51,15 +51,15 @@ $(BASEDIR)/common/symbols-dummy.o:
> $(MAKE) -f $(BASEDIR)/Rules.mk -C $(BASEDIR)/common symbols-dummy.o
>
> $(TARGET)-syms: prelink.o xen.lds $(BASEDIR)/common/symbols-dummy.o
> - $(LD) $(LDFLAGS) -T xen.lds -N prelink.o \
> + $(LD) $(LDFLAGS) -T xen.lds -r prelink.o \
> $(BASEDIR)/common/symbols-dummy.o -o $(@D)/.$(@F).0
> $(NM) -n $(@D)/.$(@F).0 | $(BASEDIR)/tools/symbols >$(@D)/.$(@F).0.S
> $(MAKE) -f $(BASEDIR)/Rules.mk $(@D)/.$(@F).0.o
> - $(LD) $(LDFLAGS) -T xen.lds -N prelink.o \
> + $(LD) $(LDFLAGS) -T xen.lds -r prelink.o \
> $(@D)/.$(@F).0.o -o $(@D)/.$(@F).1
> $(NM) -n $(@D)/.$(@F).1 | $(BASEDIR)/tools/symbols >$(@D)/.$(@F).1.S
> $(MAKE) -f $(BASEDIR)/Rules.mk $(@D)/.$(@F).1.o
> - $(LD) $(LDFLAGS) -T xen.lds -N prelink.o \
> + $(LD) $(LDFLAGS) -T xen.lds -r prelink.o \
> $(@D)/.$(@F).1.o -o $@
> rm -f $(@D)/.$(@F).[0-9]*

That may link successfully but I'd be surprised if it runs. You're
building a relocatable object instead of an executable binary. If you
check your output file you'll probably find that it's still got an
unresolved symbol '__aeabi_unwind_cpp_pr1' in it.

The real problem is that whatever compiler you're using is expecting
this __aeabi_unwind_cpp_pr1() helper function to exist and it doesn't.

IIUC, __aeabi_unwind_cpp_pr1() is part ofthe C++ exception-handling
code, so it's surprising to see it linked from Xen code! You coud try
adding -fno-exceptions to the CFLAGS in config/arm.mk

For the record, GCC 4.6.2 arm-linux-gnueabihf compiles Xen without this
error for me.

Tim.

>
>
> - Without applying this patch, the compiling will output the following error.
> ---
> make[4]: Leaving directory `/home/frank/workspace/xen/src/xen-arm-v6/xen/common'
> arm-none-linux-gnueabi-ld -marmelf_linux_eabi -T xen.lds -N prelink.o \
> /home/frank/workspace/xen/src/xen-arm-v6/xen/common/symbols-dummy.o -o /home/frank/workspace/xen/src/xen-arm-v6/xen/.xen-syms.0
> prelink.o:(.ARM.exidx.init.text+0x0): undefined reference to `__aeabi_unwind_cpp_pr1'

_______________________________________________
Xen-arm mailing list
Xen-arm@lists.xensource.com
http://lists.xensource.com/mailman/listinfo/xen-arm
Re: How to compile the unstable source for arm at sstabellini/xen-unstable.git/.git [ In reply to ]
Hi Tim, and Xen-ARM

Thanks for the help.

You are right partly. The unresolved symbol '__aeabi_unwind_cpp_pr1' does still exist.
Using -fno-exceptions cannot solve the problem.

I will try to compile one 4.6.2 cross compiler.

Best Regards,
Frank
--




At 2012-02-07 21:19:12,"Tim Deegan" <tim@xen.org> wrote:
>At 20:31 +0800 on 07 Feb (1328646671), Frank, Chen wrote:
>> Hi all,
>>
>>
>> I succeed in compiling the unstable source for arm at sstabellini/xen-unstable.git/.git with a little modification of xen/arch/arm/Makefile by the latest arm-none-linux-gnueabi- compiler from code sourcery.
>>
>>
>> - The URL for the latest cross compiler:
>> https://sourcery.mentor.com/sgpp/lite/arm/portal/package9728/public/arm-none-linux-gnueabi/arm-2011.09-70-arm-none-linux-gnueabi-i686-pc-linux-gnu.tar.bz2
>>
>>
>> - Compiling command : XEN_TARGET_ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi make xen
>>
>> - The patch is the following:
>> diff --git a/xen/arch/arm/Makefile b/xen/arch/arm/Makefile
>> index 9bc2fc8..244a19f 100644
>> --- a/xen/arch/arm/Makefile
>> +++ b/xen/arch/arm/Makefile
>> @@ -51,15 +51,15 @@ $(BASEDIR)/common/symbols-dummy.o:
>> $(MAKE) -f $(BASEDIR)/Rules.mk -C $(BASEDIR)/common symbols-dummy.o
>>
>> $(TARGET)-syms: prelink.o xen.lds $(BASEDIR)/common/symbols-dummy.o
>> - $(LD) $(LDFLAGS) -T xen.lds -N prelink.o \
>> + $(LD) $(LDFLAGS) -T xen.lds -r prelink.o \
>> $(BASEDIR)/common/symbols-dummy.o -o $(@D)/.$(@F).0
>> $(NM) -n $(@D)/.$(@F).0 | $(BASEDIR)/tools/symbols >$(@D)/.$(@F).0.S
>> $(MAKE) -f $(BASEDIR)/Rules.mk $(@D)/.$(@F).0.o
>> - $(LD) $(LDFLAGS) -T xen.lds -N prelink.o \
>> + $(LD) $(LDFLAGS) -T xen.lds -r prelink.o \
>> $(@D)/.$(@F).0.o -o $(@D)/.$(@F).1
>> $(NM) -n $(@D)/.$(@F).1 | $(BASEDIR)/tools/symbols >$(@D)/.$(@F).1.S
>> $(MAKE) -f $(BASEDIR)/Rules.mk $(@D)/.$(@F).1.o
>> - $(LD) $(LDFLAGS) -T xen.lds -N prelink.o \
>> + $(LD) $(LDFLAGS) -T xen.lds -r prelink.o \
>> $(@D)/.$(@F).1.o -o $@
>> rm -f $(@D)/.$(@F).[0-9]*
>
>That may link successfully but I'd be surprised if it runs. You're
>building a relocatable object instead of an executable binary. If you
>check your output file you'll probably find that it's still got an
>unresolved symbol '__aeabi_unwind_cpp_pr1' in it.
>
>The real problem is that whatever compiler you're using is expecting
>this __aeabi_unwind_cpp_pr1() helper function to exist and it doesn't.
>
>IIUC, __aeabi_unwind_cpp_pr1() is part ofthe C++ exception-handling
>code, so it's surprising to see it linked from Xen code! You coud try
>adding -fno-exceptions to the CFLAGS in config/arm.mk
>
>For the record, GCC 4.6.2 arm-linux-gnueabihf compiles Xen without this
>error for me.
>
>Tim.
>
>>
>>
>> - Without applying this patch, the compiling will output the following error.
>> ---
>> make[4]: Leaving directory `/home/frank/workspace/xen/src/xen-arm-v6/xen/common'
>> arm-none-linux-gnueabi-ld -marmelf_linux_eabi -T xen.lds -N prelink.o \
>> /home/frank/workspace/xen/src/xen-arm-v6/xen/common/symbols-dummy.o -o /home/frank/workspace/xen/src/xen-arm-v6/xen/.xen-syms.0
>> prelink.o:(.ARM.exidx.init.text+0x0): undefined reference to `__aeabi_unwind_cpp_pr1'
Re: How to compile the unstable source for arm at sstabellini/xen-unstable.git/.git [ In reply to ]
For me the only way to get it working was to explicitly add
-fno-exceptions to the arm Rules.mk and then compiling and running Xen
worked.

diff --git a/xen/arch/arm/Rules.mk b/xen/arch/arm/Rules.mk
index 336e209..77250e5 100644
--- a/xen/arch/arm/Rules.mk
+++ b/xen/arch/arm/Rules.mk
@@ -12,6 +12,7 @@ CFLAGS += -I$(BASEDIR)/include

# Prevent floating-point variables from creeping into Xen.
CFLAGS += -msoft-float
+CFLAGS += -fno-exceptions -fno-unwind-tables

$(call cc-options-add,CFLAGS,CC,$(EMBEDDED_EXTRA_CFLAGS))
$(call cc-option-add,CFLAGS,CC,-Wnested-externs)


Jenny



On Tue, Feb 7, 2012 at 1:19 PM, Tim Deegan <tim@xen.org> wrote:
> At 20:31 +0800 on 07 Feb (1328646671), Frank, Chen wrote:
>> Hi all,
>>
>>
>> I succeed in compiling the unstable source for arm at sstabellini/xen-unstable.git/.git with a little modification of xen/arch/arm/Makefile by the latest arm-none-linux-gnueabi- compiler from code sourcery.
>>
>>
>> - The URL for the latest cross compiler:
>> https://sourcery.mentor.com/sgpp/lite/arm/portal/package9728/public/arm-none-linux-gnueabi/arm-2011.09-70-arm-none-linux-gnueabi-i686-pc-linux-gnu.tar.bz2
>>
>>
>> - Compiling command : XEN_TARGET_ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi make xen
>>
>> - The patch is the following:
>> diff --git a/xen/arch/arm/Makefile b/xen/arch/arm/Makefile
>> index 9bc2fc8..244a19f 100644
>> --- a/xen/arch/arm/Makefile
>> +++ b/xen/arch/arm/Makefile
>> @@ -51,15 +51,15 @@ $(BASEDIR)/common/symbols-dummy.o:
>>         $(MAKE) -f $(BASEDIR)/Rules.mk -C $(BASEDIR)/common symbols-dummy.o
>>
>>  $(TARGET)-syms: prelink.o xen.lds $(BASEDIR)/common/symbols-dummy.o
>> -       $(LD) $(LDFLAGS) -T xen.lds -N prelink.o \
>> +       $(LD) $(LDFLAGS) -T xen.lds -r prelink.o \
>>             $(BASEDIR)/common/symbols-dummy.o -o $(@D)/.$(@F).0
>>         $(NM) -n $(@D)/.$(@F).0 | $(BASEDIR)/tools/symbols >$(@D)/.$(@F).0.S
>>         $(MAKE) -f $(BASEDIR)/Rules.mk $(@D)/.$(@F).0.o
>> -       $(LD) $(LDFLAGS) -T xen.lds -N prelink.o \
>> +       $(LD) $(LDFLAGS) -T xen.lds -r prelink.o \
>>             $(@D)/.$(@F).0.o -o $(@D)/.$(@F).1
>>         $(NM) -n $(@D)/.$(@F).1 | $(BASEDIR)/tools/symbols >$(@D)/.$(@F).1.S
>>         $(MAKE) -f $(BASEDIR)/Rules.mk $(@D)/.$(@F).1.o
>> -       $(LD) $(LDFLAGS) -T xen.lds -N prelink.o \
>> +       $(LD) $(LDFLAGS) -T xen.lds -r prelink.o \
>>             $(@D)/.$(@F).1.o -o $@
>>         rm -f $(@D)/.$(@F).[0-9]*
>
> That may link successfully but I'd be surprised if it runs.  You're
> building a relocatable object instead of an executable binary.  If you
> check your output file you'll probably find that it's still got an
> unresolved symbol '__aeabi_unwind_cpp_pr1' in it.
>
> The real problem is that whatever compiler you're using is expecting
> this __aeabi_unwind_cpp_pr1() helper function to exist and it doesn't.
>
> IIUC, __aeabi_unwind_cpp_pr1() is part ofthe C++ exception-handling
> code, so it's surprising to see it linked from Xen code!  You coud try
> adding -fno-exceptions to the CFLAGS in config/arm.mk
>
> For the record, GCC 4.6.2 arm-linux-gnueabihf compiles Xen without this
> error for me.
>
> Tim.
>
>>
>>
>> - Without applying this patch, the compiling will output the following error.
>> ---
>> make[4]: Leaving directory `/home/frank/workspace/xen/src/xen-arm-v6/xen/common'
>> arm-none-linux-gnueabi-ld    -marmelf_linux_eabi  -T xen.lds -N prelink.o \
>>    /home/frank/workspace/xen/src/xen-arm-v6/xen/common/symbols-dummy.o -o /home/frank/workspace/xen/src/xen-arm-v6/xen/.xen-syms.0
>> prelink.o:(.ARM.exidx.init.text+0x0): undefined reference to `__aeabi_unwind_cpp_pr1'
>
> _______________________________________________
> Xen-arm mailing list
> Xen-arm@lists.xensource.com
> http://lists.xensource.com/mailman/listinfo/xen-arm

_______________________________________________
Xen-arm mailing list
Xen-arm@lists.xensource.com
http://lists.xensource.com/mailman/listinfo/xen-arm
Re: How to compile the unstable source for arm at sstabellini/xen-unstable.git/.git [ In reply to ]
Sure. I tried your way, it is OK for me.
Thanks.

Best Regards,
Frank
--




At 2012-02-14 20:44:03,"Jenny Smith" <smithjenny183@gmail.com> wrote:
>For me the only way to get it working was to explicitly add
>-fno-exceptions to the arm Rules.mk and then compiling and running Xen
>worked.
>
>diff --git a/xen/arch/arm/Rules.mk b/xen/arch/arm/Rules.mk
>index 336e209..77250e5 100644
>--- a/xen/arch/arm/Rules.mk
>+++ b/xen/arch/arm/Rules.mk
>@@ -12,6 +12,7 @@ CFLAGS += -I$(BASEDIR)/include
>
> # Prevent floating-point variables from creeping into Xen.
> CFLAGS += -msoft-float
>+CFLAGS += -fno-exceptions -fno-unwind-tables
>
> $(call cc-options-add,CFLAGS,CC,$(EMBEDDED_EXTRA_CFLAGS))
> $(call cc-option-add,CFLAGS,CC,-Wnested-externs)
>
>
>Jenny
>
>
>
>On Tue, Feb 7, 2012 at 1:19 PM, Tim Deegan <tim@xen.org> wrote:
>> At 20:31 +0800 on 07 Feb (1328646671), Frank, Chen wrote:
>>> Hi all,
>>>
>>>
>>> I succeed in compiling the unstable source for arm at sstabellini/xen-unstable.git/.git with a little modification of xen/arch/arm/Makefile by the latest arm-none-linux-gnueabi- compiler from code sourcery.
>>>
>>>
>>> - The URL for the latest cross compiler:
>>> https://sourcery.mentor.com/sgpp/lite/arm/portal/package9728/public/arm-none-linux-gnueabi/arm-2011.09-70-arm-none-linux-gnueabi-i686-pc-linux-gnu.tar.bz2
>>>
>>>
>>> - Compiling command : XEN_TARGET_ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi make xen
>>>
>>> - The patch is the following:
>>> diff --git a/xen/arch/arm/Makefile b/xen/arch/arm/Makefile
>>> index 9bc2fc8..244a19f 100644
>>> --- a/xen/arch/arm/Makefile
>>> +++ b/xen/arch/arm/Makefile
>>> @@ -51,15 +51,15 @@ $(BASEDIR)/common/symbols-dummy.o:
>>> $(MAKE) -f $(BASEDIR)/Rules.mk -C $(BASEDIR)/common symbols-dummy.o
>>>
>>> $(TARGET)-syms: prelink.o xen.lds $(BASEDIR)/common/symbols-dummy.o
>>> - $(LD) $(LDFLAGS) -T xen.lds -N prelink.o \
>>> + $(LD) $(LDFLAGS) -T xen.lds -r prelink.o \
>>> $(BASEDIR)/common/symbols-dummy.o -o $(@D)/.$(@F).0
>>> $(NM) -n $(@D)/.$(@F).0 | $(BASEDIR)/tools/symbols >$(@D)/.$(@F).0.S
>>> $(MAKE) -f $(BASEDIR)/Rules.mk $(@D)/.$(@F).0.o
>>> - $(LD) $(LDFLAGS) -T xen.lds -N prelink.o \
>>> + $(LD) $(LDFLAGS) -T xen.lds -r prelink.o \
>>> $(@D)/.$(@F).0.o -o $(@D)/.$(@F).1
>>> $(NM) -n $(@D)/.$(@F).1 | $(BASEDIR)/tools/symbols >$(@D)/.$(@F).1.S
>>> $(MAKE) -f $(BASEDIR)/Rules.mk $(@D)/.$(@F).1.o
>>> - $(LD) $(LDFLAGS) -T xen.lds -N prelink.o \
>>> + $(LD) $(LDFLAGS) -T xen.lds -r prelink.o \
>>> $(@D)/.$(@F).1.o -o $@
>>> rm -f $(@D)/.$(@F).[0-9]*
>>
>> That may link successfully but I'd be surprised if it runs. You're
>> building a relocatable object instead of an executable binary. If you
>> check your output file you'll probably find that it's still got an
>> unresolved symbol '__aeabi_unwind_cpp_pr1' in it.
>>
>> The real problem is that whatever compiler you're using is expecting
>> this __aeabi_unwind_cpp_pr1() helper function to exist and it doesn't.
>>
>> IIUC, __aeabi_unwind_cpp_pr1() is part ofthe C++ exception-handling
>> code, so it's surprising to see it linked from Xen code! You coud try
>> adding -fno-exceptions to the CFLAGS in config/arm.mk
>>
>> For the record, GCC 4.6.2 arm-linux-gnueabihf compiles Xen without this
>> error for me.
>>
>> Tim.
>>
>>>
>>>
>>> - Without applying this patch, the compiling will output the following error.
>>> ---
>>> make[4]: Leaving directory `/home/frank/workspace/xen/src/xen-arm-v6/xen/common'
>>> arm-none-linux-gnueabi-ld -marmelf_linux_eabi -T xen.lds -N prelink.o \
>>> /home/frank/workspace/xen/src/xen-arm-v6/xen/common/symbols-dummy.o -o /home/frank/workspace/xen/src/xen-arm-v6/xen/.xen-syms.0
>>> prelink.o:(.ARM.exidx.init.text+0x0): undefined reference to `__aeabi_unwind_cpp_pr1'
>>
>> _______________________________________________
>> Xen-arm mailing list
>> Xen-arm@lists.xensource.com
>> http://lists.xensource.com/mailman/listinfo/xen-arm
Re: How to compile the unstable source for arm at sstabellini/xen-unstable.git/.git [ In reply to ]
Please can you not top-post. It is very disruptive to the flow of the
conversation.

On Tue, 2012-02-14 at 12:44 +0000, Jenny Smith wrote:
> For me the only way to get it working was to explicitly add
> -fno-exceptions to the arm Rules.mk and then compiling and running Xen
> worked.
>
> diff --git a/xen/arch/arm/Rules.mk b/xen/arch/arm/Rules.mk
> index 336e209..77250e5 100644
> --- a/xen/arch/arm/Rules.mk
> +++ b/xen/arch/arm/Rules.mk
> @@ -12,6 +12,7 @@ CFLAGS += -I$(BASEDIR)/include
>
> # Prevent floating-point variables from creeping into Xen.
> CFLAGS += -msoft-float
> +CFLAGS += -fno-exceptions -fno-unwind-tables

This is very strange. Xen does not use this for other architectures and
neither does Linux, including on arm.

Which compiler is this with?

My gcc manpage says this will only be enabled by frontends which need it
(such as C++) and explicitly calls out the C frontend as not doing this.
Is there anything in your environment which might cause this (e.g. do
you have a global $CFLAGS set?)

Are both -fno-excepitons and -fno-unwind-tables required or is one or
the other sufficient by itself?

Ian.



_______________________________________________
Xen-arm mailing list
Xen-arm@lists.xensource.com
http://lists.xensource.com/mailman/listinfo/xen-arm
Re: How to compile the unstable source for arm at sstabellini/xen-unstable.git/.git [ In reply to ]
On Tue, Feb 14, 2012 at 1:04 PM, Ian Campbell <Ian.Campbell@citrix.com> wrote:
> Please can you not top-post. It is very disruptive to the flow of the
> conversation.
>
> On Tue, 2012-02-14 at 12:44 +0000, Jenny Smith wrote:
>> For me the only way to get it working was to explicitly add
>> -fno-exceptions to the arm Rules.mk and then compiling and running Xen
>> worked.
>>
>> diff --git a/xen/arch/arm/Rules.mk b/xen/arch/arm/Rules.mk
>> index 336e209..77250e5 100644
>> --- a/xen/arch/arm/Rules.mk
>> +++ b/xen/arch/arm/Rules.mk
>> @@ -12,6 +12,7 @@ CFLAGS += -I$(BASEDIR)/include
>>
>>  # Prevent floating-point variables from creeping into Xen.
>>  CFLAGS += -msoft-float
>> +CFLAGS += -fno-exceptions -fno-unwind-tables
>
> This is very strange. Xen does not use this for other architectures and
> neither does Linux, including on arm.
>
> Which compiler is this with?

arm-none-linux-gnueabi-gcc --version
arm-none-linux-gnueabi-gcc (Sourcery CodeBench Lite 2011.09-70) 4.6.1
Copyright (C) 2011 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.


> My gcc manpage says this will only be enabled by frontends which need it
> (such as C++) and explicitly calls out the C frontend as not doing this.
> Is there anything in your environment which might cause this (e.g. do
> you have a global $CFLAGS set?)

I'm not sure. Definitely not explicitly.


> Are both -fno-excepitons and -fno-unwind-tables required or is one or
> the other sufficient by itself?

Actually just -fno-unwind-tables is sufficient. -fno-excepitons
doesn't seem to do anything.

Jenny

_______________________________________________
Xen-arm mailing list
Xen-arm@lists.xensource.com
http://lists.xensource.com/mailman/listinfo/xen-arm
Re: How to compile the unstable source for arm at sstabellini/xen-unstable.git/.git [ In reply to ]
On Tue, 2012-02-14 at 13:12 +0000, Jenny Smith wrote:
> On Tue, Feb 14, 2012 at 1:04 PM, Ian Campbell <Ian.Campbell@citrix.com> wrote:
> > Please can you not top-post. It is very disruptive to the flow of the
> > conversation.
> >
> > On Tue, 2012-02-14 at 12:44 +0000, Jenny Smith wrote:
> >> For me the only way to get it working was to explicitly add
> >> -fno-exceptions to the arm Rules.mk and then compiling and running Xen
> >> worked.
> >>
> >> diff --git a/xen/arch/arm/Rules.mk b/xen/arch/arm/Rules.mk
> >> index 336e209..77250e5 100644
> >> --- a/xen/arch/arm/Rules.mk
> >> +++ b/xen/arch/arm/Rules.mk
> >> @@ -12,6 +12,7 @@ CFLAGS += -I$(BASEDIR)/include
> >>
> >> # Prevent floating-point variables from creeping into Xen.
> >> CFLAGS += -msoft-float
> >> +CFLAGS += -fno-exceptions -fno-unwind-tables
> >
> > This is very strange. Xen does not use this for other architectures and
> > neither does Linux, including on arm.
> >
> > Which compiler is this with?
>
> arm-none-linux-gnueabi-gcc --version
> arm-none-linux-gnueabi-gcc (Sourcery CodeBench Lite 2011.09-70) 4.6.1
> Copyright (C) 2011 Free Software Foundation, Inc.
> This is free software; see the source for copying conditions. There is NO
> warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
>
>
> > My gcc manpage says this will only be enabled by frontends which need it
> > (such as C++) and explicitly calls out the C frontend as not doing this.
> > Is there anything in your environment which might cause this (e.g. do
> > you have a global $CFLAGS set?)
>
> I'm not sure. Definitely not explicitly.
>
>
> > Are both -fno-excepitons and -fno-unwind-tables required or is one or
> > the other sufficient by itself?
>
> Actually just -fno-unwind-tables is sufficient. -fno-excepitons
> doesn't seem to do anything.

Linux contains arch/arm/kernel/unwind.c with stuff like:
/* Dummy functions to avoid linker complaints */
void __aeabi_unwind_cpp_pr0(void)
{
};
EXPORT_SYMBOL(__aeabi_unwind_cpp_pr0);

void __aeabi_unwind_cpp_pr1(void)
{
};
EXPORT_SYMBOL(__aeabi_unwind_cpp_pr1);

void __aeabi_unwind_cpp_pr2(void)
{
};
EXPORT_SYMBOL(__aeabi_unwind_cpp_pr2);

I think -fno-unwind-tables is probably the right answer for us until
such a time as we have an in-hypervisor unwinder.

Please could you submit per
http://wiki.xen.org/wiki/SubmittingXenPatches

Thanks,
Ian.
>
> Jenny



_______________________________________________
Xen-arm mailing list
Xen-arm@lists.xensource.com
http://lists.xensource.com/mailman/listinfo/xen-arm