Current-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: 'build.sh release' broken for evbarm-eb and -el



On Sun, 25 Nov 2012, Paul Goyette wrote:

From sources as of 2012-11-25 at 04:54:05 UTC...

A 'build.sh release' for evbarm-eb fails with the following error:

cc1: warnings being treated as errors
In file included from ./machine/lock.h:3:0,
from /build/netbsd-local/src/lib/librump/../../sys/rump/../sys/simplelock.h:80,
                from ./arm/arm32/vmparam.h:48,
                from ./machine/vmparam.h:37,
from /build/netbsd-local/src/lib/librump/../../sys/rump/../uvm/uvm_param.h:76, from /build/netbsd-local/src/lib/librump/../../sys/rump/../sys/param.h:141, from /build/netbsd-local/src/lib/librump/../../sys/rump/../lib/libkern/arc4random.c:54:
./arm/lock.h:78:1: error: type qualifiers ignored on function return type
*** [arc4random.pico] Error code 1


sys/arch/arm/include/lock.h contains the following function definition:

#if defined(_KERNEL)
static __inline __cpu_simple_lock_t
__swp(__cpu_simple_lock_t __val, volatile __cpu_simple_lock_t *__ptr)
{
...
}
#else
static __inline int
__swp(int __val, volatile int *__ptr)
{
...
}

And, in sys/arch/arm/include/types.h we have:

#if defined(_KERNEL)
typedef volatile unsigned char  __cpu_simple_lock_t;
#else
typedef volatile int            __cpu_simple_lock_t;
#endif /* _KERNEL */


It would seem that, when _KERNEL is defined, we are unable to have the inline function return a volatile value?


Should the definition of __swp() in lock.h be changed to

#if defined(_KERNEL)
static __inline unsigned char
__swp(__cpu_simple_lock_t __val, volatile __cpu_simple_lock_t *__ptr)
{

to remove the volatile attribute?

The above change lets the build proceed nearly to completion. An since it is consistent with the current non-KERNEL definition of the function, I think I will commit it (despite my earlier comments in the thread).

The only remaining issue with the evbarm-eb/el ports is a few files that need to be cleaned up in the sets lists:

=======  4 extra files in DESTDIR  =========
Files in DESTDIR but missing from flist.
File is obsolete or flist is out of date ?
------------------------------------------
./usr/mdec/bootimx23
./usr/sbin/elftosb
./usr/sbin/sbkeygen
./usr/sbin/sbtool
=========  end of 4 extra files  ===========
*** [checkflist] Error code 1



-------------------------------------------------------------------------
| Paul Goyette     | PGP Key fingerprint:     | E-mail addresses:       |
| Customer Service | FA29 0E3B 35AF E8AE 6651 | paul at whooppee.com    |
| Network Engineer | 0786 F758 55DE 53BA 7731 | pgoyette at juniper.net |
| Kernel Developer |                          | pgoyette at netbsd.org  |
-------------------------------------------------------------------------


Home | Main Index | Thread Index | Old Index