This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
sun 0s -> gcc ERROR question
- From: "Jim M." <msg124 at hotmail dot com>
- To: gcc at gcc dot gnu dot org
- Date: Thu, 31 Jan 2002 20:45:17 +0000
- Subject: sun 0s -> gcc ERROR question
- Bcc:
HI,
How can i compile myapp using gcc. How can modify the makefile
to compile and run with gcc instead of sun compiler.
it gives me the following error.
Jim
myserver% make
/usr/local/bin/gcc -D_KERNEL -xarch=v9 -xcode=abs32 -xregs=no%appl -xO3 -c
ast
ropci.c
gcc: language O3 not recognized <------ERROR
gcc: myapp.c: linker input file unused since linking not done
ld -r myapp.o -o myapp
ld: fatal: file myapp.o: open failed: No such file or directory
make: *** [myapp] Error 1
******************************888
myserver% cat Makefile
CC = /usr/local/bin/gcc
#DEFS = -D_KERNEL -DSOLARIS2_7
CFLAGS = -D_KERNEL -xarch=v9 -xcode=abs32 -xregs=no%appl -xO3
LD = ld
LDFLAGS = -r
SRCS = myapp.c myapp_impl.h myapp_io.h
DOCS =
%.o : %.c
$(CC) $(CFLAGS) $(DEFS) -c $<
myapp: myapp.o
$(LD) $(LDFLAGS) myapp.o -o myapp
install: myapp
echo "You must be superuser to install"
cp -p myapp /kernel/drv/sparcv9/
cp -p myapp.conf /kernel/drv/
add_drv -i '"pci1057,1801"' -m '* 0666 bin bin' myapp
reinstall: myapp
echo "You must be superuser to re-install"
rem_drv myapp
cp myapp /kernel/drv/sparcv9/
add_drv -i '"pci1057,1801"' -m '* 0666 bin bin' myapp
clean:
$(RM) myapp.o myapp .myapp*
pack: myapp clean
tar cvf myapp.tar myapp $(SRCS) Makefile $(DOCS)
compress myapp.tar
myapp.o : myapp.c
_________________________________________________________________
Send and receive Hotmail on your mobile device: http://mobile.msn.com