Skip to contentSkip to conversation

ALSA compile error

DISCUSSION Ulf Carlsson 2 participants 2 messages Apr 2, 1999 – Apr 3, 1999 MIPS

lore
Share & tools
lore
#0 lore raw

Hi,

I've written an ALSA driver for the HAL2 today, programming ALSA was a very nice experience. Anyhow, to compile ALSA wasn't as nice as writing a driver. The problem is that I can't compile it (even without my driver).

Maybe I should learn how to fix gcc and as on my own.. *sigh*

I've been trying with egcs 1.0.2, gcc 2.7.2, binutils 2.8.1 and binutils 2.9.1 and it doesn't make any difference. I've also been trying without -pipe and -fomit-frame-pointer.

This is the error message:

gcc -O2 -DLINUX -mips2 -mcpu=r4600 -Wall -Wstrict-prototypes -fomit-frame-pointer -pipe -I/usr/src/linux/include -I../include -c -o sound.o sound.c /tmp/cca03757.s: Assembler messages:
/tmp/cca03757.s:1228: Error: Can not represent BFD_RELOC_16_PCREL_S2 relocation in this object file format /tmp/cca03757.s:1285: Error: Can not represent BFD_RELOC_16_PCREL_S2 relocation in this object file format

I think I've had this error message before when I was compiling the kernel. That was about half a year ago so I don't remember exactly how I fixed it that time. It was something about the haifa scheduler I think.

	[snip]

	.set	macro
	.set	reorder

#APP

	1:	lw	$4,0($5)
	move	$2,$0
2:
	.section	.fixup,"ax"
3:	li	$2,-14
	move	$4,$0
	j	2b			<---- line 1228
	.previous
	.section	__ex_table,"a"
	.word	1b,3b
	.previous
 #NO_APP
	move	$2,$4
$L977:
	lw	$31,28($sp)
	addu	$sp,$sp,32
	j	$31
	.end	snd_ioctl_in_R1cd575d7

	[snap]

	[snip]

	bltz	$3,$L991
	move	$2,$0
	.set	macro
	.set	reorder

#APP

	1:	sw	$5,0($4)
	move	$2,$0
2:
	.section	.fixup,"ax"
3:	li	$2,-14
	j	2b			<---- line 1285
	.previous
	.section	__ex_table,"a"
	.word	1b,3b
	.previous

#NO_APP

[snap]

- Ulf

#1 lore raw
Quoted 3 lines · Ulf Carlsson

I've been trying with egcs 1.0.2, gcc 2.7.2, binutils 2.8.1 and binutils 2.9.1 and it doesn't make any difference. I've also been trying without -pipe and -fomit-frame-pointer.

Use egcs 1.0.x and binutils 2.8.1.

Quoted 8 lines

This is the error message:

gcc -O2 -DLINUX -mips2 -mcpu=r4600 -Wall -Wstrict-prototypes -fomit-frame-pointer -pipe -I/usr/src/linux/include -I../include -c -o sound.o sound.c /tmp/cca03757.s: Assembler messages:
/tmp/cca03757.s:1228: Error: Can not represent BFD_RELOC_16_PCREL_S2 relocation in this object file format /tmp/cca03757.s:1285: Error: Can not represent BFD_RELOC_16_PCREL_S2 relocation in this object file format

It was something about the haifa scheduler I think.

Haifa is innocent. You are trying to compile the thing into PIC code and that won't work for kernel code. Add -fno-pic -mno-abicalls and for modules also add -mlong-calls.

Ralf