arm-none-eabi-gcc will not recognize __uint128_t typedef on OS X

Asked by Nick

Hello,

I've compiled from source (using GNU gcc 4.9, not clang) and also tried the binary-- same problem. The arm-none-eabi-gcc apparently doesn't have or can't find the typedef struct for __uint128_t. Is this intended? I've scoured google but can't seem to find anybody else having this issue. When I try to grep the directory structure of the compiler, the only references I see to __uint128_t are in the docs (example below):

../../gcc-arm-none-eabi-4_9-2015q3/./share/doc/gcc-arm-none-eabi/info/gcc.info: vector __uint128_t vec_vaddcuq (vector __uint128_t, vector __uint128_t);

Is there some flag I need to use to enable support for this? I'm trying to build a kernel for the new Galaxy Note 5 (on the Exynos 7420) and I might need a different toolchain, but I figured this would be just fine.

Output of compiler is below:

[mother@osx: ~/Documents/android/SpaceX-Kernel-Exynos7420/TMB] $ make ARCH=arm64
  CHK include/generated/uapi/linux/version.h
  CHK include/generated/utsrelease.h
  CC arch/arm64/kernel/asm-offsets.s
In file included from ~/Documents/android/SpaceX-Kernel-Exynos7420/TMB/arch/arm64/include/asm/ptrace.h:22:0,
                 from ~/Documents/android/SpaceX-Kernel-Exynos7420/TMB/arch/arm64/include/asm/irqflags.h:21,
                 from include/linux/irqflags.h:15,
                 from include/linux/spinlock.h:53,
                 from include/linux/seqlock.h:29,
                 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 arch/arm64/kernel/asm-offsets.c:23:
~/Documents/android/SpaceX-Kernel-Exynos7420/TMB/arch/arm64/include/uapi/asm/ptrace.h:76:2: error: unknown type name '__uint128_t'
  __uint128_t vregs[32];
  ^
In file included from ~/Documents/android/SpaceX-Kernel-Exynos7420/TMB/arch/arm64/include/asm/processor.h:32:0,
                 from ~/Documents/android/SpaceX-Kernel-Exynos7420/TMB/arch/arm64/include/asm/spinlock.h:20,
                 from include/linux/spinlock.h:87,
                 from include/linux/seqlock.h:29,
                 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 arch/arm64/kernel/asm-offsets.c:23:
~/Documents/android/SpaceX-Kernel-Exynos7420/TMB/arch/arm64/include/asm/fpsimd.h:35:4: error: unknown type name '__uint128_t'
    __uint128_t vregs[32];
    ^
~/Documents/android/SpaceX-Kernel-Exynos7420/TMB/arch/arm64/include/asm/fpsimd.h:49:2: error: unknown type name '__uint128_t'
  __uint128_t vregs[32];
  ^
make[1]: *** [arch/arm64/kernel/asm-offsets.s] Error 1
make: *** [prepare0] Error 2

Question information

Language:
English Edit question
Status:
Solved
For:
GNU Arm Embedded Toolchain Edit question
Assignee:
No assignee Edit question
Solved by:
Nick
Solved:
Last query:
Last reply:
Revision history for this message
Andre Vieira (andre-simoesdiasvieira) said :
#1

Hi Nick,

Do you want to compile for aarch64, i.e. ARM's 64-bit architecture? Or are you trying to build for a 32-bit architecture?

This is the launchpad page for the GNU toolchain for the ARM embedded architectures. So basically we do not support aarch64 and our toolchain doesn't compile for it. If you are trying to compile for aarch64, then you will need to use a GCC for aarch64. For linux you can get it using a package manager (aptitude has gcc-aarch64-linux-gnu) or use a linaro toolchain http://releases.linaro.org/14.04/components/toolchain/binaries/ (also available for windows).

I don't know of any pre-built OSX aarch64 toolchains. You can try home-brew...

Hope this helps.

Best Regards,

Revision history for this message
Nick (nick-lindberg-b) said :
#2

Hello,

Heh, apparently I do. :-) Didn't know that I did until I ran into this bug-- trying to compile a kernel for the samsung note 5 using the new Exynos 7420 chip, which uses arch=arm64.

I'll try the Linaro toolchain, and probably just install a VM to get it on Ubuntu or something. Thanks for the heads up.