The 'driver_build.sh' script shipped with the cisco-vpnclient-3des hardcodes 'CC=cc' when compiling. The code references header files from the kernel (it *is* building a kernel module), and the headers look for macros defined automatically by gcc. In this case, __GNUC__ is what is required. The specific problem is that the typedef for 'loff_t' is not defined since #if defined(__GNUC__) typedef __kernel_loff_t loff_t; #endif never gets used. When a compiler that is *NOT* gcc is used (such as icc), __GNUC__ is not defined. Additionally, icc overwrites /usr/bin/cc, so 'cc' no longer defaults to gcc (this is arguably an icc bug). Reproducible: Always Steps to Reproduce: 1. Emerge icc, or any other non-gcc compiler 2. Run 'emerge cisco-vpnclient-3des' 3. Watch it break. Actual Results: Lots of errors and warning about undefined types. Expected Results: Compiled. There are two workarounds for this: 1) Edit driver_build.sh to correctly use $CC if defined, or gcc if it isn't. A patch for driver_build.sh is attached. Additionally, if $CC is used, you may have to override $CFLAGS as well. 2) Add '-D__GNUC__' to CFLAGS in driver_build.sh. This should not hurt when gcc is used, and make other compilers properly behave.
Created attachment 20753 [details, diff] diff to driver_build.sh This patch adds some logic to either use $CC (if given), or assign 'gcc' to $CC. Additionally, it will add -D__GNUC__ to $CFLAGS if it is not already present.
feel like bumping the rev while you're at it ?
Fixed in CVS. Thanks for the patch, Jesse.