So now I tried to compile the same driver, on a 64 Bit version of Haiku. Again I used "MAKE" but the results were very different.
Walter hrev51740 x86_64
mkdir -p objects.x86_64-cc5-release; \
mkdepend -I./ -p .c:objects.x86_64-cc5-release/%n.o -m -f "objects.x86_64-cc5-release/xxxx.d" xxxx.c
cc -c xxxx.c -iquote./ -iquote./ -D_KERNEL_MODE=1 -fno-pic -O0 -Wall -Wno-multichar -Wno-ctor-dtor-privacy -o "objects.x86_64-cc5-release/xxxx.o"
cc1: warning: command line option '-Wno-ctor-dtor-privacy' is valid for C++/ObjC++ but not for C
cc -o "objects.x86_64-cc5-release/xxxx" objects.x86_64-cc5-release/xxxx.o -nostdlib /boot/system/develop/lib/_KERNEL_ /boot/system/develop/lib/haiku_version_glue.o -L./
/boot/system/develop/tools/bin/../lib/gcc/x86_64-unknown-haiku/5.4.0/../../../../x86_64-unknown-haiku/bin/ld: objects.x86_64-cc5-release/xxxx.o: relocation R_X86_64_32 against `.rodata' can not be used when making a shared object; recompile with -fPIC
/boot/system/develop/tools/bin/../lib/gcc/x86_64-unknown-haiku/5.4.0/../../../../x86_64-unknown-haiku/bin/ld: final link failed: Nonrepresentable section on output
collect2: error: ld returned 1 exit status
/boot/system/develop/etc/makefile-engine:246: recipe for target 'objects.x86_64-cc5-release/xxxx' failed
make: *** [objects.x86_64-cc5-release/xxxx] Error 1
As you can see the make engine does not compile the driver.
I also tried trying different command lines to force a compile, but the resulting driver when it did compile reported "bad data" in the 'syslog' and did not add a driver to the /dev/ directory.
Tomorrow, I will try the very latest 64 Bit Nightly and see what happens.