A
Allan
Hi all,
I've a C program which was originally developed under Sun
Solaris(OS,2.6,gcc 2.95).
I'm trying to migrate it to our linux system(Mandrake 9.0,2.4.19,gcc
3.2).
Following is the MAKEFILE:
CC=gcc
CFLAGS= -march=athlon-mp -O3 -pipe -fomit-frame-pointer
CHOST= -i686-pc-linux-gnu
LIBS=$(SYSLIB) -lm
OBJS=filename.o
# Rules to create .o files from .c files
..c.o:
$(CC) -c $(CFLAGS) $(INCLUDES) $*.c
all: filename
filename: $(OBJS)
$(CC) $(OBJS) $(CFLAGS) $(LIBS) $(CHOST) -o $@
The program can be run very well under Solaris.
Under Linux,there is no error when I compile it.But I got
"Segmentation fault" when execute the program.
Any help will be appreciated,
TIA,
I've a C program which was originally developed under Sun
Solaris(OS,2.6,gcc 2.95).
I'm trying to migrate it to our linux system(Mandrake 9.0,2.4.19,gcc
3.2).
Following is the MAKEFILE:
CC=gcc
CFLAGS= -march=athlon-mp -O3 -pipe -fomit-frame-pointer
CHOST= -i686-pc-linux-gnu
LIBS=$(SYSLIB) -lm
OBJS=filename.o
# Rules to create .o files from .c files
..c.o:
$(CC) -c $(CFLAGS) $(INCLUDES) $*.c
all: filename
filename: $(OBJS)
$(CC) $(OBJS) $(CFLAGS) $(LIBS) $(CHOST) -o $@
The program can be run very well under Solaris.
Under Linux,there is no error when I compile it.But I got
"Segmentation fault" when execute the program.
Any help will be appreciated,
TIA,