[U-Boot] [PATCH] nds32: Add a basic errno.h

This is available on other architectures, and nds32 will start to break without it as code starts to use error numbers more.
Signed-off-by: Simon Glass sjg@chromium.org --- arch/nds32/include/asm/errno.h | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) create mode 100644 arch/nds32/include/asm/errno.h
diff --git a/arch/nds32/include/asm/errno.h b/arch/nds32/include/asm/errno.h new file mode 100644 index 0000000..4c82b50 --- /dev/null +++ b/arch/nds32/include/asm/errno.h @@ -0,0 +1 @@ +#include <asm-generic/errno.h>

Hi Simon,
2013/1/6 Simon Glass sjg@chromium.org
This is available on other architectures, and nds32 will start to break without it as code starts to use error numbers more.
+++ b/arch/nds32/include/asm/errno.h @@ -0,0 +1 @@ +#include <asm-generic/errno.h
Thanks for your patch.
I've also noticed that NDS32 currently has compiling error because of -fstack-usage option has been enabled by default. However, the gcc-4.6 compiler for nds32 is still under developing. I've told compiler team to speed up developing work on gcc-4.6 and later. If there were fail on compiling test of nds32 architecture, please ignore it. Sorry for the inconvenince.

Hi,
On Sun, Jan 6, 2013 at 3:37 AM, Macpaul Lin macpaul@gmail.com wrote:
Hi Simon,
2013/1/6 Simon Glass sjg@chromium.org
This is available on other architectures, and nds32 will start to break without it as code starts to use error numbers more.
+++ b/arch/nds32/include/asm/errno.h @@ -0,0 +1 @@ +#include <asm-generic/errno.h
Thanks for your patch.
I've also noticed that NDS32 currently has compiling error because of -fstack-usage option has been enabled by default. However, the gcc-4.6 compiler for nds32 is still under developing. I've told compiler team to speed up developing work on gcc-4.6 and later. If there were fail on compiling test of nds32 architecture, please ignore it. Sorry for the inconvenince.
I don't see that one at present, but I do get these with gcc 4.4.4:
nds32: + adp-ag101p + adp-ag102 + adp-ag101 +ns16550.c: In function 'NS16550_init': +ns16550.c:47: warning: passing argument 2 of 'writeb' makes pointer from integer without a cast +/c/cosarm/src/third_party/u-boot/us-vboot7/.bm-work/27/build/include2/asm/io.h:109: note: expected 'unsigned char *' but argument is of type 'long unsigned int' +cmd_ide.c: In function '__ide_output_data': +cmd_ide.c:546: warning: passing argument 2 of 'ide_write_data' discards qualifiers from pointer target type +/c/cosarm/src/third_party/u-boot/us-vboot7/.bm-work/03/include/ide.h:76: note: expected 'ulong *' but argument is of type 'const ulong *' +/c/cosarm/src/third_party/u-boot/us-vboot7/.bm-work/03/build/include2/asm/io.h:109: note: expected 'unsigned char *' but argument is of type 'long unsigned int' +In file included from ext4fs.c:39: +ext4_common.h:39:23: error: asm/errno.h: No such file or directory +make[1]: *** No rule to make target `/c/cosarm/src/third_party/u-boot/us-vboot7/.bm-work/03/build/fs/ext4/.depend', needed by `/c/cosarm/src/third_party/u-boot/us-vboot7/.bm-work/03/build/fs/ext4/libext4fs.o'. Stop. +make: *** [/c/cosarm/src/third_party/u-boot/us-vboot7/.bm-work/03/build/fs/ext4/libext4fs.o] Error 2 +/c/cosarm/src/third_party/u-boot/us-vboot7/.bm-work/30/build/include2/asm/io.h:109: note: expected 'unsigned char *' but argument is of type 'long unsigned int'
If you don't support a gcc option it should be possible to disable it in U-Boot for your toolchain as a temporary workaround. It would be good to get a pointer to your toolchain at some point.
Regards, Simon
-- Best regards, Macpaul Lin

On Sun, Jan 06, 2013 at 08:28:39AM -0800, Simon Glass wrote:
[snip]
If you don't support a gcc option it should be possible to disable it in U-Boot for your toolchain as a temporary workaround. It would be good to get a pointer to your toolchain at some point.
Unfortunately gcc doesn't error nicely when you try and test for -fstack-usage support. The 'cc-option' check says that -fstack-usage works but then fails in real usage. It's possible that a more heavy-weight test would correctly detect the failure however.

Hi Tom,
On Sun, Jan 6, 2013 at 9:16 AM, Tom Rini trini@ti.com wrote:
On Sun, Jan 06, 2013 at 08:28:39AM -0800, Simon Glass wrote:
[snip]
If you don't support a gcc option it should be possible to disable it in U-Boot for your toolchain as a temporary workaround. It would be good to get a pointer to your toolchain at some point.
Unfortunately gcc doesn't error nicely when you try and test for -fstack-usage support. The 'cc-option' check says that -fstack-usage works but then fails in real usage. It's possible that a more heavy-weight test would correctly detect the failure however.
Well, if the problem is going to exist for a while, perhaps we could put up with explicit nds32 check?
-- Tom
Regards, Simon

-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
On 01/06/2013 12:24 PM, Simon Glass wrote:
Hi Tom,
On Sun, Jan 6, 2013 at 9:16 AM, Tom Rini trini@ti.com wrote:
On Sun, Jan 06, 2013 at 08:28:39AM -0800, Simon Glass wrote:
[snip]
If you don't support a gcc option it should be possible to disable it in U-Boot for your toolchain as a temporary workaround. It would be good to get a pointer to your toolchain at some point.
Unfortunately gcc doesn't error nicely when you try and test for -fstack-usage support. The 'cc-option' check says that -fstack-usage works but then fails in real usage. It's possible that a more heavy-weight test would correctly detect the failure however.
Well, if the problem is going to exist for a while, perhaps we could put up with explicit nds32 check?
OK with me.
- -- Tom

Hi Simon,
2013/1/6 Simon Glass sjg@chromium.org
This is available on other architectures, and nds32 will start to break without it as code starts to use error numbers more.
Signed-off-by: Simon Glass sjg@chromium.org
arch/nds32/include/asm/errno.h | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) create mode 100644 arch/nds32/include/asm/errno.h
This bug fix has been applied to u-boot-nds32.git/master Thanks for your help!
-- Best regards, Macpaul Lin
participants (3)
-
Macpaul Lin
-
Simon Glass
-
Tom Rini