mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* Module problems with gcc-3.2.x (please CC hamilton@sedsystems.ca)
@ 2003-05-21 21:20 Kendrick Hamilton
  2003-05-21 22:09 ` Felipe Alfaro Solana
  0 siblings, 1 reply; 2+ messages in thread
From: Kendrick Hamilton @ 2003-05-21 21:20 UTC (permalink / raw)
  To: linux-kernel

[-- Attachment #1: Type: TEXT/PLAIN, Size: 827 bytes --]

Hi,
	I have been continuing the track down problems with a module I am 
making. If I compile the kernel and module with gcc-2.95.3, the module 
installs and works correctly. If I compile the kernel and module with 
gcc-3.2.3, the module finishes installation and its interrupt service 
routine runs, then the kernel crashes. I am using linux 2.4.18 and 2.4.20. 
The computers are all pentium computers (I, II, III, celeron, xeon) with 
Redhat Linux 7.3. Any suggestions would be appreciated.

 I am assuming there is a problem with my makefiles and 
have attached them. I can tgz the entire driver and mail it to the list.

-- 
Kendrick Hamilton E.I.T.
SED Systems, a division of Calian Ltd.
18 Innovation Blvd.
PO Box 1464
Saskatoon, Saskatchewan
Canada
S7N 3R1

Hamilton@sedsystems.ca
Tel: (306) 933-1453
Fax: (306) 933-1486

[-- Attachment #2: Type: TEXT/PLAIN, Size: 1942 bytes --]

#NOTE:	CPP refers to the C pre-processor, CXX referes to C++ compiler.
KERNEL_LOCATION	:=	/usr/src/linux
# Sub directories containing files to make.
SRCDIR		:=	dasm eah fifo main pci pll qduc tsp
# C source files
SRC		:=	version.c

OBJS		:=	$(foreach DIR, $(SRCDIR), $(DIR).o)
PKGS		:=	$(foreach DIR, $(SRCDIR), $(DIR).o)
OBJS		+=	$(SRCXX:.cpp=.o)
OBJS		+=	$(SRC:.c=.o)

TOPDIR		:=	$(shell /bin/pwd)
USERNAME	:=	$(shell /usr/bin/whoami)
DATE		:=	$(shell /bin/date)

KERNEL_HEADERS	:=	$(KERNEL_LOCATION)/include

include $(KERNEL_LOCATION)/.config

CPPFLAGS	:=	-I$(TOPDIR) -I$(KERNEL_HEADERS) -D__KERNEL__ -DMODULE \
			-DEXPORT_SYMTAB -DSED_USERNAME="\"$(USERNAME)\"" \
			-DSED_DATE="\"$(DATE)\"" -D__NO_VERSION__
ifdef CONFIG_SMP
	CPPFLAGS += -D__SMP__ -DSMP
endif

CC		:=	gcc
LD		:=	ld
CFLAGS		:=	-Wall -O2 -finline-functions -pipe



EXE		:=	spflsmdd.o

export CC CPPFLAGS CFLAGS CXXFLAGS TOPDIR LD

%.d: %.c
	set -e; $(CC) -MM $(CPPFLAGS) $< \
	| sed 's/\($*\)\.o[ :]*/\1.o $@ : /g' > $@; \
	[ -s $@ ] || rm -f $@

.PHONY : all
all: $(EXE)

.PHONY : doc
doc: Doxyfile
	@echo "Generating documents using doxygen..."
	@doxygen $<


DEPENDS		= $(SRC:.c=.d)

ifneq ($(SRC), )
include $(DEPENDS)
endif

$(EXE): $(OBJS)
	$(LD) -r -o $@ $^

dasm.o: FORCE
	$(MAKE) -C dasm

eah.o: FORCE
	$(MAKE) -C eah

fifo.o: FORCE
	$(MAKE) -C fifo

main.o: FORCE
	$(MAKE) -C main

pci.o: FORCE
	$(MAKE) -C pci

pll.o: FORCE
	$(MAKE) -C pll

qduc.o: FORCE
	$(MAKE) -C qduc

tsp.o: FORCE
	$(MAKE) -C tsp

version.o: FORCE

FORCE:

.PHONY : clean
clean: neat
	rm -rf $(EXE) $(OBJS)

.PHONY : neat
neat:
	rm -f $(OBJS) $(EXE)
	rm -f $(DEPENDS)
	rm -f core
	@for pkg in $(SRCDIR); do \
		$(MAKE) -C $$pkg clean; \
	done;
	find * -type f | grep '~' | xargs rm -f

.PHONY : dep
dep: $(DEPENDS)
	@for pkg in $(SRCDIR); do \
		$(MAKE) -C $$pkg dep; \
	done;


[-- Attachment #3: Type: TEXT/PLAIN, Size: 499 bytes --]

# C Source Files
SRC		:=	eah_error.c
PACKAGE		:=	../eah.o

OBJS		:=
OBJS		+=  $(SRC:.c=.o)

%.d: %.c
	set -e; $(CC) -MM $(CPPFLAGS) $< \
	| sed 's/\($*\)\.o[ :]*/\1.o $@ : /g' > $@; \
	[ -s $@ ] || rm -f $@

.PHONY : all

all: $(PACKAGE)

ifneq ($(SRC), )
include $(SRC:.c=.d)
endif
DEPENDS     = $(SRC:.c=.d)

$(PACKAGE): $(OBJS)
	$(LD) -r -o $@ $^

FORCE:

.PHONY : clean
clean:
	rm -f $(OBJS) $(DEPENDS)

.PHONY : install
install:

.PHONY : dep
dep: $(DEPENDS)

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Module problems with gcc-3.2.x (please CC hamilton@sedsystems.ca)
  2003-05-21 21:20 Module problems with gcc-3.2.x (please CC hamilton@sedsystems.ca) Kendrick Hamilton
@ 2003-05-21 22:09 ` Felipe Alfaro Solana
  0 siblings, 0 replies; 2+ messages in thread
From: Felipe Alfaro Solana @ 2003-05-21 22:09 UTC (permalink / raw)
  To: Kendrick Hamilton; +Cc: LKML

On Wed, 2003-05-21 at 23:20, Kendrick Hamilton wrote:
> Hi,
> 	I have been continuing the track down problems with a module I am 
> making. If I compile the kernel and module with gcc-2.95.3, the module 
> installs and works correctly. If I compile the kernel and module with 
> gcc-3.2.3, the module finishes installation and its interrupt service 
> routine runs, then the kernel crashes. I am using linux 2.4.18 and 2.4.20. 
> The computers are all pentium computers (I, II, III, celeron, xeon) with 
> Redhat Linux 7.3. Any suggestions would be appreciated.

Can't offer any suggestion, except that I suffered the same pain as you
with 2.5.69-mm7: if I compile 2.5.69-mm7 with gcc 3.2.3, the ymfpci
(Yamaha DS-XG PCI driver) causes a lot of problems, like oopses when
compiled as a module, or panics when built-in.

The problems went away the moment I compiled using gcc 2.96. I think
this is caused by some gcc compiler bug (in fact, I've never been able
to make gcc 3.2 compile itself and pass all tests).


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2003-05-21 21:56 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-05-21 21:20 Module problems with gcc-3.2.x (please CC hamilton@sedsystems.ca) Kendrick Hamilton
2003-05-21 22:09 ` Felipe Alfaro Solana

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®