diff options
author | Christian Hesse <mail@eworm.de> | 2014-01-03 07:58:01 +0100 |
---|---|---|
committer | Christian Hesse <mail@eworm.de> | 2014-01-03 07:58:01 +0100 |
commit | c9f687e0c16a7f6ea6471f69b6be8cb2f0a3268d (patch) | |
tree | 105ccf66173270f2a2bb09636a5fdccd085f04b3 /arch.h | |
parent | 0f7b07e716648bd563b71d58584273d3ced0c987 (diff) | |
download | paccache-c9f687e0c16a7f6ea6471f69b6be8cb2f0a3268d.tar.gz paccache-c9f687e0c16a7f6ea6471f69b6be8cb2f0a3268d.tar.zst |
move arch specific macros to separate header file
Diffstat (limited to 'arch.h')
-rw-r--r-- | arch.h | 30 |
1 files changed, 30 insertions, 0 deletions
@@ -0,0 +1,30 @@ +/* + * (C) 2013-2014 by Christian Hesse <mail@eworm.de> + * + * This software may be used and distributed according to the terms + * of the GNU General Public License, incorporated herein by reference. + */ + +#ifndef _ARCH_H +#define _ARCH_H + +/* the binary needs to know its own architecture */ +#if defined __x86_64__ +# define ARCH "x86_64" +#elif defined __i386__ +# define ARCH "i686" +#elif defined __ARM_ARCH_7__ +# define ARCH "armv7h" +#elif defined __ARM_ARCH_6__ +# if defined __VFP_FP__ +# define ARCH "armv6h" +# else +# define ARCH "arm" +# endif +#else +# error Unknown architecture! +#endif + +#endif /* _ARCH_H */ + +// vim: set syntax=c: |