Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 33488 - cisco-vpnclient-3des forces use of 'CC=cc'
Summary: cisco-vpnclient-3des forces use of 'CC=cc'
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: x86 Linux
: High minor (vote)
Assignee: Bart Lauwers (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-11-14 15:37 UTC by Jesse Becker
Modified: 2003-12-12 16:03 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
diff to driver_build.sh (driver_build_CC.patch,547 bytes, patch)
2003-11-14 16:03 UTC, Jesse Becker
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jesse Becker 2003-11-14 15:37:16 UTC
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.
Comment 1 Jesse Becker 2003-11-14 16:03:51 UTC
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.
Comment 2 SpanKY gentoo-dev 2003-12-02 16:41:28 UTC
feel like bumping the rev while you're at it ?
Comment 3 Chris Gianelloni (RETIRED) gentoo-dev 2003-12-12 16:03:12 UTC
Fixed in CVS.

Thanks for the patch, Jesse.