Bug 36584 - Does not build kernel correctly
Does not build kernel correctly
Status: CLOSED NOTABUG
Product: Red Hat Linux
Classification: Retired
Component: gcc (Show other bugs)
7.0
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Jakub Jelinek
David Lawrence
: Security
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2001-04-18 18:42 EDT by d-zhao
Modified: 2007-04-18 12:32 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2001-04-18 18:42:57 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description d-zhao 2001-04-18 18:42:53 EDT
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux 2.2.18 i686; en-US; 0.8.1)
Gecko/20010326


I have the following packages:
binutils-2.10.0.18-1
gcc-2.96-69
gcc-c++-2.96-69
gcc-g77-2.96-69
When I am building a 2.2.18 or 2.2.19 kernel with aic7xxx support, it bombs
at the end and says something like scsis.a(aic7xxx.o): in
aic7xxx_load_seeprom -- undefined reference to "memcpy"

There is not a memcpy in that function, and the kernel builds fine in linux
6.2:

which has the following egcs related files:

compat-egcs-c++-5.2-1.0.3a.1
egcs-c++-1.1.2-30
compat-egcs-5.2-1.0.3a.1
compat-egcs-g77-5.2-1.0.3a.1
egcs-1.1.2-30
egcs-g77-1.1.2-30
compat-egcs-objc-5.2-1.0.3a.1
egcs-objc-1.1.2-30


Reproducible: Always
Steps to Reproduce:
1.run up2date -u on RH7.0 and get all updates
2.download kernel 2.2.19 from kernel.org
3.configure kernel with aic7xxx driver
4. make dep; make bzImage -- and it fails

	

Actual Results:  all the build messages are fine, at the end when
everything is put together:

cc -D__KERNEL__ -I/usr/src/linux/include -E -C -P -I/usr/src/linux/include
-imacros /usr/src/linux/include/asm-i386/page_offset.h -Ui386
arch/i386/vmlinux.lds.S >arch/i386/vmlinux.lds
ld -m elf_i386 -T /usr/src/linux/arch/i386/vmlinux.lds -e stext
arch/i386/kernel/head.o arch/i386/kernel/init_task.o init/main.o
init/version.o \
	--start-group \
	arch/i386/kernel/kernel.o arch/i386/mm/mm.o kernel/kernel.o mm/mm.o fs/fs.o
ipc/ipc.o \
	fs/filesystems.a \
	net/network.a \
	drivers/block/block.a drivers/char/char.o drivers/misc/misc.a
drivers/net/net.a drivers/scsi/scsi.a drivers/cdrom/cdrom.a
drivers/pci/pci.a drivers/video/video.a \
	/usr/src/linux/arch/i386/lib/lib.a /usr/src/linux/lib/lib.a
/usr/src/linux/arch/i386/lib/lib.a \
	--end-group \
	-o vmlinux
drivers/scsi/scsi.a(aic7xxx.o): In function `aic7xxx_load_seeprom':
aic7xxx.o(.text+0x117cf): undefined reference to `memcpy'
make: *** [vmlinux] Error 1


Expected Results:  Should have built correctly.

I don't think this a problem with the kernel, because it builds under egcs
in 6.2. It could have to do with the binutils since it's calling ld ..
Important because 2.2.19 fixes some security issues and people wh use
custom kernels cannot upgrade.
Comment 1 Jakub Jelinek 2001-04-20 04:37:45 EDT
2.2.x kernels (unless patched) should be built with kgcc compiler.
2.2.18/2.2.19 Makefile already looks if kgcc is present in the $PATH, so it looks
like you don't have kgcc package installed.
memcpy is generated internally by gcc for structure copies, it is kernel's
fault that it is not exporting memcpy and relying gcc on always expanding
even huge memcpys inline (which gcc does for small copies but not when it
generates too big code). 2.4.x kernels already export memcpy/memset even
on ia32 architecture.

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