Bug 24522

Summary: gcc 2.96-69 fails to compile 2.2.17 checksum.S source
Product: [Retired] Red Hat Linux Reporter: Polo Talnir <polo_talnir>
Component: gccAssignee: Jakub Jelinek <jakub>
Status: CLOSED NOTABUG QA Contact: David Lawrence <dkl>
Severity: medium Docs Contact:
Priority: high    
Version: 7.0CC: polo_talnir
Target Milestone: ---   
Target Release: ---   
Hardware: i686   
OS: Linux   
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2001-01-21 22:01:32 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Description Polo Talnir 2001-01-21 22:01:28 UTC
/usr/src/linux-2.2.17/arch/i386/lib/checksum.S does not compile with gcc
The macros SRC and DST report "punctuation error" using gcc 2.96-69
during build of the Kernel with gcc 2.96-69
Compilation with egcs works.

cc -D__KERNEL__ -I/usr/src/linux/include -D__ASSEMBLY__  -traditional -c
checksum.S -o checksum.o
checksum.S:231: badly punctuated parameter list in #define
checksum.S:237: badly punctuated parameter list in #define
make[2]: *** [checksum.o] Error 1

Eliminating the "-traditional" made the build succeed. The source didn't
for a while now so that it is a compiler (or cpp) problem.

Also this: one module that succeeded to compile (SCSI driver aic7xxx.c for
left strcpy() unresolved and could not be inserted into the kernel. The
should have been compiled in-line according to the strings.h header file.
I will post a separate bug for this. Also seems a cpp problem.

Comment 1 Jakub Jelinek 2001-01-22 09:14:41 UTC
No, the bug is in kernel which should not preprocess checksum.S with -traditional
in the first case because it uses GNU preprocessor extensions which have
nothing to do with original K&R. This has been fixed e.g. in 2.4 kernels
simply by removing -traditional where it was not needed.
You should not compile 2.2.17 kernel with gcc but kgcc (= egcs), only 2.4
kernels can be built with gcc 2.96-RH (you could get undefined memcpy/memset
references as well).