# hardened-sources make failure on ARM

## grant123

I get the below atomic64_sub_return messages throughout the make until it finally fails on my ARM device.  Should I file a bug?

                 from include/linux/time.h:5,

                 from include/linux/stat.h:18,

                 from include/linux/module.h:10,

                 from block/cfq-iosched.c:9:

/usr/src/linux-3.13.3-hardened-r1/arch/arm/include/asm/atomic.h: In function ‘atomic64_sub_return’:

/usr/src/linux-3.13.3-hardened-r1/arch/arm/include/asm/atomic.h:716:1: warning: no return statement in function returning non-void [-Wreturn-type]

  LD      block/built-in.o

  CC      grsecurity/grsec_chdir.o

In file included from include/linux/atomic.h:4:0,

                 from include/linux/debug_locks.h:5,

                 from include/linux/lockdep.h:23,

                 from include/linux/spinlock_types.h:18,

                 from include/linux/spinlock.h:81,

                 from include/linux/seqlock.h:35,

                 from include/linux/time.h:5,

                 from include/uapi/linux/timex.h:56,

                 from include/linux/timex.h:56,

                 from include/linux/sched.h:17,

                 from grsecurity/grsec_chdir.c:2:

/usr/src/linux-3.13.3-hardened-r1/arch/arm/include/asm/atomic.h: In function ‘atomic64_sub_return’:

/usr/src/linux-3.13.3-hardened-r1/arch/arm/include/asm/atomic.h:716:1: error: no return statement in function returning non-void [-Werror=return-type]

cc1: all warnings being treated as errors

make[1]: *** [grsecurity/grsec_chdir.o] Error 1

make: *** [grsecurity] Error 2

----------

## Hu

Yes.  Does it work in sys-kernel/gentoo-sources?

----------

## grant123

It works great in gentoo-sources.  I'll file a bug.

----------

## N8Fear

Are you compiling with -Werror ?

Just thinking because of

```
cc1: all warnings being treated as errors 
```

If yes: first try without it: I nearly always get warnings for my kernels (also for x86_64)...

----------

## grant123

I don't have that explicitly set anywhere.

----------

## Hu

It looks like that is set by the Makefile for grsecurity-specific files.  Look how when building block/cfg-iosched.c, the diagnostic is a warning, but when building grsecurity/grsec_chdir.c, the diagnostic is an error.  This suggests to me that the grsecurity directory uses stricter flags.

----------

## grant123

Here's the bug for reference:

https://bugs.gentoo.org/show_bug.cgi?id=502058

----------

