lkml.org 
[lkml]   [2003]   [May]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectModule problems with gcc-3.2.x (please CC )
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
#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;

# 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)
\
 
 \ /
  Last update: 2005-03-22 13:35    [W:0.398 / U:0.008 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site