Bug 24522 - gcc 2.96-69 fails to compile 2.2.17 checksum.S source
Summary: gcc 2.96-69 fails to compile 2.2.17 checksum.S source
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: gcc
Version: 7.0
Hardware: i686
OS: Linux
high
medium
Target Milestone: ---
Assignee: Jakub Jelinek
QA Contact: David Lawrence
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2001-01-21 22:01 UTC by Polo Talnir
Modified: 2007-03-27 03:39 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2001-01-21 22:01:32 UTC
Embargoed:


Attachments (Terms of Use)

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
2.96-69
 
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
change
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
Adaptec)
left strcpy() unresolved and could not be inserted into the kernel. The
strcpy()
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).


Note You need to log in before you can comment on or make changes to this bug.