Skip to contentSkip to conversation

nds32: Add a basic errno.h

PATCH New Simon Glass 3 participants 7 messages Jan 5, 2013 – Feb 18, 2013

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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.

---
 arch/nds32/include/asm/errno.h |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
 create mode 100644 arch/nds32/include/asm/errno.h
arch/nds32/include/asm/errno.h new file +1 -0
new file mode 100644
index 0000000..4c82b50
@@ -0,0 +1 @@
+#include <asm-generic/errno.h>
Signature · 1 line
1.7.7.3
#1 lore raw

PATCH 1/1 nds32: Add a basic errno.h

Hi Simon,

2013/1/6 Simon Glass <[email protected]>

Review line 1

Quoted 6 lines

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

(quoted diff) +1 -0
@@ -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.

Signature · 2 lines
Best regards,
Macpaul Lin
#2 lore raw

PATCH 1/1 nds32: Add a basic errno.h

Hi,

Quoted 14 lines · Macpaul Lin

Hi Simon,

2013/1/6 Simon Glass <[email protected]>

Review line 1

Quoted 7 lines

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

(quoted diff) +1 -0
@@ -0,0 +1 @@
+#include <asm-generic/errno.h

Thanks for your patch.

Quoted 7 lines

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

Quoted 5 lines

--
Best regards,
Macpaul Lin

#3 lore raw

PATCH 1/1 nds32: Add a basic errno.h

On Sun, Jan 06, 2013 at 08:28:39AM -0800, Simon Glass wrote:

[snip]

Quoted 3 lines

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.

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20130106/f624bdd3/attachment.pgp>
#4 lore raw

PATCH 1/1 nds32: Add a basic errno.h

Hi Tom,

Quoted 11 lines · Tom Rini

On Sun, Jan 06, 2013 at 08:28:39AM -0800, Simon Glass wrote:

[snip]

Quoted 3 lines

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?

Quoted 3 lines

--
Tom

Regards,
Simon

#5 lore raw

PATCH 1/1 nds32: Add a basic errno.h

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Quoted 11 lines · Simon Glass

Hi Tom,

Quoted 8 lines · Tom Rini

On Sun, Jan 06, 2013 at 08:28:39AM -0800, Simon Glass wrote:

[snip]

Quoted 4 lines

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.

Quoted 8 lines
Quoted 5 lines

Unfortunately gcc doesn't error nicely when you try and test for

(quoted diff) +0 -2
-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
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with undefined - http://www.enigmail.net/

iQIcBAEBAgAGBQJQ6tOAAAoJENk4IS6UOR1WNJgP/jcmod/mIfTWL12/otXDmBT5 FDdxHjLXuuImFiniJp92L+Svp0XGdX4A6NHyR5IFiRiPdU/vD/MACFFeoZ/pMM0w uSAUWS9Qg+A2C5ysM+TG1/SxAHnF5APA6Us5X9QR4vAe0aq7y8MaOx9O6J3QvHQl tTNWklWdf7mn9nQqH8zh4gWbwfO8nWK2Nmnau9oxMNx9RYzonuAJ1OMpxsdmLJ9n Kj90+MfoeNAyx3yZVgGFxs0WXrgDHSe+z2SFZ5Ob84KOFse8sMGzYqPc3n2Mkw9e +KpztGSHCuYGCPOce9g18Q7gEcHxGwt4NY9/1RzEkhWUXH1JfrGhxze0KSrl4vKo sy0NOpMLpXAyGsRZvrP3/tWkGJ6XKAdQjh929UsznbSg4bE0tg/ZaPekAF2kxohz b4TPANZAgE0xois4sq5/lNsryntgsMxNlDOIxL0LVZhQiIyAxw6+6uVfFfOEA0Yj 9u84oRhK6SHD5vybBU9LPILkCzBxaDXI2W/22gO5JQH/RHrSTlxdLm+1sO+adzbZ dHbGuZzKZ4c2+VclyRgrWwMOtB2dElQYoISOA5TyoceNhPul3AgpwvFg2xPr7UeC Ab68wWV1A8YBvfjlFq1fmiZXzqK1fEmE7q1wczV6ricRbH5xiGZy3GqSDorb71vD klcCZc49EHSb/dJ+ofTr
=no2O
-----END PGP SIGNATURE-----

#6 lore raw

PATCH 1/1 nds32: Add a basic errno.h

In reply to Simon Glass

Hi Simon,

2013/1/6 Simon Glass <[email protected]>

Quoted 10 lines

This is available on other architectures, and nds32 will start to break without it as code starts to use error numbers more.

---
 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