I downloaded the DS-5 community to build my OS on ARM cpus but I don't have a free compiler for C so i downloaded the ARM c compiler 6 but can't work for no license . now what do i do ? i need help
You can supply GCC with a number of options to restrict it to a more "bare metal" environment.
the only thing that makes "arm-linux-gnueabihf" and "arm-none-eabi" different is the C library and default options.
if you're going extreme bare metal (and will implement C library stuff like printf and memcpy yourself) then you can do something like -nostdlib -nostdinc to prevent searching for the default (for Linux compilers this is usually glibc and you don't want that).
when a compiler is 'hf' by default you can override it with -mfloat-abi=soft or -mfloat-abi=softfp and -mfpu and -march/cpu.
so, you can use a Linux compiler just fine. Just recall that Linux itself - the kernel - doesn't want to use the userspace C libraries or headers and has specific requirements but you still build it with the userspace compiler.